From f92adbd683835b0b9ccad7ae4ad5902a1457f775 Mon Sep 17 00:00:00 2001 From: Kyryll O Date: Fri, 29 May 2026 22:04:11 +0300 Subject: [PATCH] feat: add DatePicker component to UIKit and CLI scaffold --- src/cli/index.ts | 18 +++++++++++++++--- src/frontend/uikit.d.ts | 12 ++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/cli/index.ts b/src/cli/index.ts index a048dcf..177fa9d 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -565,16 +565,18 @@ export default defineConfig({ }, { relativePath: 'frontend/src/App.tsx', - content: `import React from 'react'; -import { Puzzle } from 'lucide-react'; + content: `import React, { useState } from 'react'; +import { Puzzle, Calendar } from 'lucide-react'; // @ts-ignore -import { Card, Typography } from 'host/UIKit'; +import { Card, Typography, DatePicker } from 'host/UIKit'; interface AppProps { language?: string; } const App: React.FC = ({ language = 'en' }) => { + const [dateValue, setDateValue] = useState(undefined); + return (
@@ -585,6 +587,16 @@ const App: React.FC = ({ language = 'en' }) => { ? 'Плагін успішно створено та підключено до CRM.' : 'Plugin successfully created and connected to CRM.'} +
+ } + /> +
); diff --git a/src/frontend/uikit.d.ts b/src/frontend/uikit.d.ts index 350354c..a18bbce 100644 --- a/src/frontend/uikit.d.ts +++ b/src/frontend/uikit.d.ts @@ -68,4 +68,16 @@ declare module 'host/UIKit' { style?: React.CSSProperties; language?: string; }>; + + export interface DatePickerProps { + label?: string; + mode?: 'single' | 'range'; + value?: string | { from?: string; to?: string }; + onChange?: (value: any) => void; + placeholder?: string; + language?: string; + error?: string; + icon?: React.ReactNode; + } + export const DatePicker: React.FC; }