lvetech-ui-lib 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1072 @@
1
+ import { default as default_2 } from 'react';
2
+ import { Dispatch } from 'react';
3
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
4
+ import { RefObject } from 'react';
5
+ import { SetStateAction } from 'react';
6
+
7
+ export declare function Alert({ type, title, children, showIcon, closable, onClose, action, variant, className, }: AlertProps): JSX_2.Element | null;
8
+
9
+ export declare interface AlertProps {
10
+ /** 警告类型 */
11
+ type?: 'info' | 'success' | 'warning' | 'error';
12
+ /** 标题 */
13
+ title?: string;
14
+ /** 内容 */
15
+ children: default_2.ReactNode;
16
+ /** 是否显示图标 */
17
+ showIcon?: boolean;
18
+ /** 是否可关闭 */
19
+ closable?: boolean;
20
+ /** 关闭回调 */
21
+ onClose?: () => void;
22
+ /** 操作区域 */
23
+ action?: default_2.ReactNode;
24
+ /** 变体样式 */
25
+ variant?: 'soft' | 'solid' | 'outline';
26
+ /** 自定义类名 */
27
+ className?: string;
28
+ }
29
+
30
+ export declare const animations: {
31
+ durations: {
32
+ fast: string;
33
+ normal: string;
34
+ slow: string;
35
+ };
36
+ easings: {
37
+ default: string;
38
+ in: string;
39
+ out: string;
40
+ bounce: string;
41
+ };
42
+ };
43
+
44
+ export declare const Avatar: default_2.ForwardRefExoticComponent<AvatarProps & default_2.RefAttributes<HTMLDivElement>>;
45
+
46
+ export declare function AvatarGroup({ children, max, size, spacing }: AvatarGroupProps): JSX_2.Element;
47
+
48
+ export declare interface AvatarGroupProps {
49
+ children: default_2.ReactNode;
50
+ max?: number;
51
+ size?: AvatarProps['size'];
52
+ spacing?: number;
53
+ }
54
+
55
+ export declare interface AvatarProps extends default_2.HTMLAttributes<HTMLDivElement> {
56
+ /** 图片地址 */
57
+ src?: string;
58
+ /** 替代文本 */
59
+ alt?: string;
60
+ /** 显示的名字(用于生成首字母) */
61
+ name?: string;
62
+ /** 尺寸 */
63
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number;
64
+ /** 形状 */
65
+ shape?: 'circle' | 'square' | 'rounded';
66
+ /** 背景颜色(无图片时) */
67
+ color?: 'violet' | 'cyan' | 'emerald' | 'rose' | 'amber' | 'gray' | 'auto';
68
+ /** 是否显示边框 */
69
+ bordered?: boolean;
70
+ /** 状态指示器 */
71
+ status?: 'online' | 'offline' | 'busy' | 'away';
72
+ /** 徽标 */
73
+ badge?: default_2.ReactNode;
74
+ /** 图标(无图片时显示) */
75
+ icon?: default_2.ReactNode;
76
+ }
77
+
78
+ export declare const baseStyles = "\n/* \u52A8\u753B\u7C7B */\n@keyframes shimmer {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(100%); }\n}\n\n@keyframes bars {\n 0%, 40%, 100% { transform: scaleY(0.4); }\n 20% { transform: scaleY(1); }\n}\n\n.animate-shimmer {\n animation: shimmer 2s infinite;\n}\n\n/* Tailwind \u52A8\u753B\u6269\u5C55 */\n@keyframes fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes slide-in-from-top-2 {\n from { transform: translateY(-8px); }\n to { transform: translateY(0); }\n}\n\n@keyframes slide-in-from-right {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n@keyframes zoom-in-95 {\n from { transform: scale(0.95); }\n to { transform: scale(1); }\n}\n\n.animate-in {\n animation-duration: 150ms;\n animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n animation-fill-mode: forwards;\n}\n\n.fade-in { animation-name: fade-in; }\n.slide-in-from-top-2 { animation-name: slide-in-from-top-2; }\n.slide-in-from-right { animation-name: slide-in-from-right; }\n.zoom-in-95 { animation-name: zoom-in-95; }\n";
79
+
80
+ export declare const borderRadius: {
81
+ none: string;
82
+ sm: string;
83
+ DEFAULT: string;
84
+ md: string;
85
+ lg: string;
86
+ xl: string;
87
+ '2xl': string;
88
+ '3xl': string;
89
+ full: string;
90
+ };
91
+
92
+ export declare const Button: default_2.ForwardRefExoticComponent<ButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
93
+
94
+ export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
95
+ /** 按钮内容 */
96
+ children: default_2.ReactNode;
97
+ /** 按钮变体 */
98
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success';
99
+ /** 按钮尺寸 */
100
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
101
+ /** 是否占满宽度 */
102
+ fullWidth?: boolean;
103
+ /** 是否加载中 */
104
+ loading?: boolean;
105
+ /** 左侧图标 */
106
+ leftIcon?: default_2.ReactNode;
107
+ /** 右侧图标 */
108
+ rightIcon?: default_2.ReactNode;
109
+ /** 是否为圆形按钮 */
110
+ rounded?: boolean;
111
+ /** 是否只显示图标 */
112
+ iconOnly?: boolean;
113
+ }
114
+
115
+ export declare const Card: default_2.ForwardRefExoticComponent<CardProps & default_2.RefAttributes<HTMLDivElement>>;
116
+
117
+ export declare interface CardProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, 'title'> {
118
+ /** 卡片内容 */
119
+ children?: default_2.ReactNode;
120
+ /** 卡片标题 */
121
+ title?: default_2.ReactNode;
122
+ /** 卡片副标题 */
123
+ subtitle?: string;
124
+ /** 头部额外内容 */
125
+ extra?: default_2.ReactNode;
126
+ /** 底部内容 */
127
+ footer?: default_2.ReactNode;
128
+ /** 封面图片 */
129
+ cover?: string;
130
+ /** 变体样式 */
131
+ variant?: 'elevated' | 'outlined' | 'filled' | 'glass';
132
+ /** 是否可悬浮 */
133
+ hoverable?: boolean;
134
+ /** 是否可点击 */
135
+ clickable?: boolean;
136
+ /** 是否有边框 */
137
+ bordered?: boolean;
138
+ /** 内边距大小 */
139
+ padding?: 'none' | 'sm' | 'md' | 'lg';
140
+ }
141
+
142
+ export declare const Checkbox: default_2.ForwardRefExoticComponent<CheckboxProps & default_2.RefAttributes<HTMLInputElement>>;
143
+
144
+ export declare interface CheckboxProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'> {
145
+ /** 复选框标签 */
146
+ label?: default_2.ReactNode;
147
+ /** 描述文本 */
148
+ description?: string;
149
+ /** 是否选中 */
150
+ checked?: boolean;
151
+ /** 默认是否选中 */
152
+ defaultChecked?: boolean;
153
+ /** 不确定状态 */
154
+ indeterminate?: boolean;
155
+ /** 尺寸 */
156
+ size?: 'sm' | 'md' | 'lg';
157
+ /** 颜色 */
158
+ color?: 'violet' | 'cyan' | 'emerald' | 'rose' | 'amber';
159
+ /** 是否禁用 */
160
+ disabled?: boolean;
161
+ /** 是否有错误 */
162
+ error?: boolean;
163
+ /** 选中变化回调 */
164
+ onChange?: (checked: boolean) => void;
165
+ }
166
+
167
+ declare type ClassObject = Record<string, boolean | undefined | null>;
168
+
169
+ declare type ClassValue = string | number | boolean | undefined | null | ClassValue[];
170
+
171
+ /**
172
+ * 合并 CSS 类名,支持条件类名
173
+ * @example
174
+ * cn('base', condition && 'conditional', { active: isActive })
175
+ */
176
+ export declare function cn(...inputs: (ClassValue | ClassObject)[]): string;
177
+
178
+ export declare function CodeEditor({ value, onChange, language, readOnly, height, className, showLineNumbers, theme, tabs, activeTab, onTabChange, }: CodeEditorProps): JSX_2.Element;
179
+
180
+ declare interface CodeEditorProps {
181
+ /** 代码内容 */
182
+ value: string;
183
+ /** 代码变化回调 */
184
+ onChange?: (value: string) => void;
185
+ /** 语言 */
186
+ language?: 'tsx' | 'jsx' | 'css' | 'json';
187
+ /** 是否只读 */
188
+ readOnly?: boolean;
189
+ /** 高度 */
190
+ height?: string | number;
191
+ /** 自定义类名 */
192
+ className?: string;
193
+ /** 显示行号 */
194
+ showLineNumbers?: boolean;
195
+ /** 主题 */
196
+ theme?: 'dark' | 'light';
197
+ /** 标签页 */
198
+ tabs?: Array<{
199
+ id: string;
200
+ label: string;
201
+ value: string;
202
+ }>;
203
+ /** 当前标签 */
204
+ activeTab?: string;
205
+ /** 标签切换 */
206
+ onTabChange?: (tabId: string) => void;
207
+ }
208
+
209
+ export declare const colors: {
210
+ primary: {
211
+ 50: string;
212
+ 100: string;
213
+ 200: string;
214
+ 300: string;
215
+ 400: string;
216
+ 500: string;
217
+ 600: string;
218
+ 700: string;
219
+ 800: string;
220
+ 900: string;
221
+ };
222
+ secondary: {
223
+ 50: string;
224
+ 100: string;
225
+ 200: string;
226
+ 300: string;
227
+ 400: string;
228
+ 500: string;
229
+ 600: string;
230
+ 700: string;
231
+ 800: string;
232
+ 900: string;
233
+ };
234
+ success: {
235
+ 50: string;
236
+ 100: string;
237
+ 200: string;
238
+ 300: string;
239
+ 400: string;
240
+ 500: string;
241
+ 600: string;
242
+ 700: string;
243
+ 800: string;
244
+ 900: string;
245
+ };
246
+ warning: {
247
+ 50: string;
248
+ 100: string;
249
+ 200: string;
250
+ 300: string;
251
+ 400: string;
252
+ 500: string;
253
+ 600: string;
254
+ 700: string;
255
+ 800: string;
256
+ 900: string;
257
+ };
258
+ error: {
259
+ 50: string;
260
+ 100: string;
261
+ 200: string;
262
+ 300: string;
263
+ 400: string;
264
+ 500: string;
265
+ 600: string;
266
+ 700: string;
267
+ 800: string;
268
+ 900: string;
269
+ };
270
+ gray: {
271
+ 50: string;
272
+ 100: string;
273
+ 200: string;
274
+ 300: string;
275
+ 400: string;
276
+ 500: string;
277
+ 600: string;
278
+ 700: string;
279
+ 800: string;
280
+ 900: string;
281
+ };
282
+ };
283
+
284
+ export declare type ColorVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error';
285
+
286
+ export declare interface ComponentDefinition {
287
+ type: ComponentType;
288
+ name: string;
289
+ icon: string;
290
+ category: 'basic' | 'form' | 'layout' | 'feedback' | 'data';
291
+ description: string;
292
+ properties: ComponentProperty[];
293
+ defaultProps: Record<string, unknown>;
294
+ }
295
+
296
+ export declare const componentDefinitions: ComponentDefinition[];
297
+
298
+ export declare function ComponentDesigner({ initialNodes, onChange, onExport, className, height, }: ComponentDesignerProps): JSX_2.Element;
299
+
300
+ declare interface ComponentDesignerProps {
301
+ /** 初始节点 */
302
+ initialNodes?: DesignNode[];
303
+ /** 节点变化回调 */
304
+ onChange?: (nodes: DesignNode[]) => void;
305
+ /** 导出代码回调 */
306
+ onExport?: (code: string) => void;
307
+ /** 自定义类名 */
308
+ className?: string;
309
+ /** 设计器高度 */
310
+ height?: string | number;
311
+ }
312
+
313
+ export declare interface ComponentProperty {
314
+ name: string;
315
+ type: 'string' | 'number' | 'boolean' | 'select' | 'color' | 'icon';
316
+ label: string;
317
+ defaultValue?: unknown;
318
+ options?: Array<{
319
+ label: string;
320
+ value: string | number | boolean;
321
+ }>;
322
+ description?: string;
323
+ }
324
+
325
+ export declare type ComponentType = 'Button' | 'Input' | 'Card' | 'Select' | 'Checkbox' | 'Switch' | 'Radio' | 'Textarea' | 'Avatar' | 'Tag' | 'Alert' | 'Progress' | 'Container' | 'Divider' | 'Dialog' | 'Skeleton' | 'Spinner' | 'Popover' | 'Tabs' | 'Text' | 'Image';
326
+
327
+ export declare const Container: default_2.ForwardRefExoticComponent<ContainerProps & default_2.RefAttributes<HTMLDivElement>>;
328
+
329
+ export declare interface ContainerProps extends default_2.HTMLAttributes<HTMLDivElement> {
330
+ /** 子元素 */
331
+ children?: default_2.ReactNode;
332
+ /** Flex 方向 */
333
+ direction?: 'row' | 'column';
334
+ /** 主轴对齐 */
335
+ justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
336
+ /** 交叉轴对齐 */
337
+ align?: 'start' | 'end' | 'center' | 'stretch';
338
+ /** 间距 */
339
+ gap?: number | 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
340
+ /** 是否换行 */
341
+ wrap?: boolean;
342
+ /** 内边距 */
343
+ padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
344
+ /** 背景色 */
345
+ bg?: string;
346
+ /** 是否居中内容 */
347
+ center?: boolean;
348
+ /** 最小高度 */
349
+ minHeight?: string | number;
350
+ }
351
+
352
+ export declare const cssVariables = "\n:root {\n --color-primary-50: #f5f3ff;\n --color-primary-100: #ede9fe;\n --color-primary-200: #ddd6fe;\n --color-primary-300: #c4b5fd;\n --color-primary-400: #a78bfa;\n --color-primary-500: #8b5cf6;\n --color-primary-600: #7c3aed;\n --color-primary-700: #6d28d9;\n --color-primary-800: #5b21b6;\n --color-primary-900: #4c1d95;\n \n --color-secondary-500: #06b6d4;\n --color-success-500: #10b981;\n --color-warning-500: #f59e0b;\n --color-error-500: #ef4444;\n \n --shadow-glow: 0 0 20px rgb(139 92 246 / 0.3);\n --shadow-glow-lg: 0 0 40px rgb(139 92 246 / 0.4);\n}\n";
353
+
354
+ export declare const defaultTheme: ThemeConfig;
355
+
356
+ export declare interface DesignerAction {
357
+ type: 'ADD_NODE' | 'UPDATE_NODE' | 'DELETE_NODE' | 'SELECT_NODE' | 'MOVE_NODE' | 'UNDO' | 'REDO' | 'CLEAR';
358
+ payload?: unknown;
359
+ }
360
+
361
+ export declare interface DesignNode {
362
+ id: string;
363
+ type: ComponentType;
364
+ props: Record<string, unknown>;
365
+ children?: DesignNode[];
366
+ parentId?: string;
367
+ }
368
+
369
+ export declare interface DesignState {
370
+ nodes: DesignNode[];
371
+ selectedId: string | null;
372
+ hoveredId: string | null;
373
+ history: DesignNode[][];
374
+ historyIndex: number;
375
+ }
376
+
377
+ export declare interface DesignTemplate {
378
+ id: string;
379
+ name: string;
380
+ description: string;
381
+ icon: string;
382
+ category: 'form' | 'card' | 'layout' | 'feedback' | 'page';
383
+ preview?: string;
384
+ nodes: Omit<DesignNode, 'id'>[];
385
+ }
386
+
387
+ export declare const designTemplates: DesignTemplate[];
388
+
389
+ export declare function Dialog({ title, children, footer, visible, onVisibleChange, onClose, size, closable, maskClosable, centered, onOk, onCancel, okText, cancelText, showFooter, className, zIndex, loading, dialogClassName, headerClassName, bodyClassName, footerClassName }: DialogProps): default_2.ReactPortal | null;
390
+
391
+ export declare interface DialogProps {
392
+ /** 标题 */
393
+ title?: default_2.ReactNode;
394
+ /** 内容 */
395
+ children?: default_2.ReactNode;
396
+ /** 底部按钮 */
397
+ footer?: default_2.ReactNode;
398
+ /** 是否可见 */
399
+ visible?: boolean;
400
+ /** 可见性变化回调 */
401
+ onVisibleChange?: (visible: boolean) => void;
402
+ /** 可见性变化回调 (更直接的方式) */
403
+ onClose?: () => void;
404
+ /** 尺寸 */
405
+ size?: 'sm' | 'md' | 'lg' | 'xl';
406
+ /** 是否可关闭 */
407
+ closable?: boolean;
408
+ /** 点击背景关闭 */
409
+ maskClosable?: boolean;
410
+ /** 居中展示 */
411
+ centered?: boolean;
412
+ /** 确认回调 */
413
+ onOk?: () => void | Promise<void>;
414
+ /** 取消回调 */
415
+ onCancel?: () => void;
416
+ /** 确认按钮文本 */
417
+ okText?: string;
418
+ /** 取消按钮文本 */
419
+ cancelText?: string;
420
+ /** 是否显示底部按钮 */
421
+ showFooter?: boolean;
422
+ /** 自定义 class */
423
+ className?: string;
424
+ /** z-index */
425
+ zIndex?: number;
426
+ /** 加载中 */
427
+ loading?: boolean;
428
+ /** 弹框类名 */
429
+ dialogClassName?: string;
430
+ /** 标题类名 */
431
+ headerClassName?: string;
432
+ /** 内容类名 */
433
+ bodyClassName?: string;
434
+ /** 底部类名 */
435
+ footerClassName?: string;
436
+ }
437
+
438
+ export declare const Divider: default_2.ForwardRefExoticComponent<DividerProps & default_2.RefAttributes<HTMLDivElement>>;
439
+
440
+ export declare interface DividerProps extends default_2.HTMLAttributes<HTMLDivElement> {
441
+ /** 方向 */
442
+ direction?: 'horizontal' | 'vertical';
443
+ /** 样式变体 */
444
+ variant?: 'solid' | 'dashed' | 'dotted';
445
+ /** 颜色 */
446
+ color?: 'default' | 'light' | 'dark' | 'violet';
447
+ /** 文本位置 */
448
+ textPosition?: 'left' | 'center' | 'right';
449
+ /** 分割线粗细 */
450
+ thickness?: 'thin' | 'medium' | 'thick';
451
+ /** 子元素(文本) */
452
+ children?: default_2.ReactNode;
453
+ }
454
+
455
+ export declare interface FlexProps extends default_2.HTMLAttributes<HTMLDivElement> {
456
+ /** 子元素 */
457
+ children: default_2.ReactNode;
458
+ /** 主轴方向 */
459
+ direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
460
+ /** 主轴对齐 */
461
+ justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
462
+ /** 交叉轴对齐 */
463
+ align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
464
+ /** 是否换行 */
465
+ wrap?: boolean | 'reverse';
466
+ /** 间距 */
467
+ gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12;
468
+ /** 是否为内联元素 */
469
+ inline?: boolean;
470
+ }
471
+
472
+ export declare function generateId(): string;
473
+
474
+ export declare function getAllCategories(): Array<{
475
+ id: DesignTemplate['category'];
476
+ name: string;
477
+ icon: string;
478
+ }>;
479
+
480
+ export declare function getComponentDefinition(type: ComponentType): ComponentDefinition | undefined;
481
+
482
+ export declare function getTemplatesByCategory(category: DesignTemplate['category']): DesignTemplate[];
483
+
484
+ export declare interface GridItemProps extends default_2.HTMLAttributes<HTMLDivElement> {
485
+ children: default_2.ReactNode;
486
+ /** 列跨度 */
487
+ colSpan?: 1 | 2 | 3 | 4 | 5 | 6 | 12 | 'full';
488
+ /** 行跨度 */
489
+ rowSpan?: 1 | 2 | 3 | 4 | 5 | 6;
490
+ /** 列起始 */
491
+ colStart?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 'auto';
492
+ /** 行起始 */
493
+ rowStart?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 'auto';
494
+ }
495
+
496
+ export declare interface GridProps extends default_2.HTMLAttributes<HTMLDivElement> {
497
+ /** 子元素 */
498
+ children: default_2.ReactNode;
499
+ /** 列数 */
500
+ cols?: 1 | 2 | 3 | 4 | 5 | 6 | 12 | 'none';
501
+ /** 行数 */
502
+ rows?: 1 | 2 | 3 | 4 | 5 | 6 | 'none';
503
+ /** 间距 */
504
+ gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12;
505
+ /** 列间距 */
506
+ gapX?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12;
507
+ /** 行间距 */
508
+ gapY?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12;
509
+ /** 内容对齐 */
510
+ align?: 'start' | 'end' | 'center' | 'stretch';
511
+ /** 项目对齐 */
512
+ justify?: 'start' | 'end' | 'center' | 'stretch';
513
+ /** 自动流动方向 */
514
+ flow?: 'row' | 'col' | 'dense' | 'row-dense' | 'col-dense';
515
+ }
516
+
517
+ export declare const Input: default_2.ForwardRefExoticComponent<InputProps & default_2.RefAttributes<HTMLInputElement>>;
518
+
519
+ export declare interface InputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size'> {
520
+ /** 标签文本 */
521
+ label?: string;
522
+ /** 错误信息 */
523
+ error?: string;
524
+ /** 帮助文本 */
525
+ helper?: string;
526
+ /** 输入框尺寸 */
527
+ size?: 'sm' | 'md' | 'lg';
528
+ /** 变体样式 */
529
+ variant?: 'default' | 'filled' | 'flushed';
530
+ /** 左侧图标 */
531
+ leftIcon?: default_2.ReactNode;
532
+ /** 右侧图标 */
533
+ rightIcon?: default_2.ReactNode;
534
+ /** 前缀文本 */
535
+ prefix?: string;
536
+ /** 后缀文本 */
537
+ suffix?: string;
538
+ /** 是否必填 */
539
+ required?: boolean;
540
+ /** 清除按钮 */
541
+ clearable?: boolean;
542
+ /** 清除回调 */
543
+ onClear?: () => void;
544
+ }
545
+
546
+ export declare function instantiateTemplate(template: DesignTemplate): DesignNode[];
547
+
548
+ export declare function Popover({ children, title, content, footer, placement, trigger, visible: controlledVisible, onVisibleChange, delay, disabled, bgColor, arrow, offset, maxWidth, minWidth, className, zIndex, closable, }: PopoverProps): JSX_2.Element;
549
+
550
+ export declare interface PopoverProps {
551
+ /** 触发元素 */
552
+ children?: default_2.ReactElement;
553
+ /** 标题 */
554
+ title?: default_2.ReactNode;
555
+ /** 内容 */
556
+ content?: default_2.ReactNode;
557
+ /** 底部操作按钮 */
558
+ footer?: default_2.ReactNode;
559
+ /** 位置 */
560
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
561
+ /** 触发方式 */
562
+ trigger?: 'hover' | 'click' | 'focus';
563
+ /** 是否可见(受控) */
564
+ visible?: boolean;
565
+ /** 可见性变化回调 */
566
+ onVisibleChange?: (visible: boolean) => void;
567
+ /** 延迟显示(毫秒) */
568
+ delay?: number;
569
+ /** 是否禁用 */
570
+ disabled?: boolean;
571
+ /** 背景色 */
572
+ bgColor?: 'white' | 'dark' | 'violet';
573
+ /** 是否显示箭头 */
574
+ arrow?: boolean;
575
+ /** 偏移量 */
576
+ offset?: number;
577
+ /** 最大宽度 */
578
+ maxWidth?: number;
579
+ /** 最小宽度 */
580
+ minWidth?: number;
581
+ /** 自定义 class */
582
+ className?: string;
583
+ /** z-index */
584
+ zIndex?: number;
585
+ /** 是否可关闭 */
586
+ closable?: boolean;
587
+ }
588
+
589
+ export declare function Progress({ value, max, size, color, variant, showLabel, label, labelPosition, circular, circleSize, className, }: ProgressProps): JSX_2.Element;
590
+
591
+ export declare interface ProgressProps {
592
+ /** 当前进度 0-100 */
593
+ value: number;
594
+ /** 最大值 */
595
+ max?: number;
596
+ /** 尺寸 */
597
+ size?: 'xs' | 'sm' | 'md' | 'lg';
598
+ /** 颜色 */
599
+ color?: 'violet' | 'cyan' | 'emerald' | 'rose' | 'amber' | 'gradient';
600
+ /** 变体 */
601
+ variant?: 'default' | 'striped' | 'animated';
602
+ /** 是否显示标签 */
603
+ showLabel?: boolean;
604
+ /** 自定义标签 */
605
+ label?: string | ((value: number, max: number) => string);
606
+ /** 标签位置 */
607
+ labelPosition?: 'inside' | 'outside' | 'top';
608
+ /** 是否为圆形进度 */
609
+ circular?: boolean;
610
+ /** 圆形进度尺寸 */
611
+ circleSize?: number;
612
+ /** 自定义类名 */
613
+ className?: string;
614
+ }
615
+
616
+ export declare const Radio: default_2.ForwardRefExoticComponent<RadioProps & default_2.RefAttributes<HTMLInputElement>>;
617
+
618
+ export declare function RadioGroup({ name, value, defaultValue, label, children, size, color, disabled, direction, onChange, className, }: RadioGroupProps): JSX_2.Element;
619
+
620
+ export declare interface RadioGroupProps {
621
+ /** 组名称 */
622
+ name?: string;
623
+ /** 当前值 */
624
+ value?: string | number;
625
+ /** 默认值 */
626
+ defaultValue?: string | number;
627
+ /** 标签文本 */
628
+ label?: string;
629
+ /** 子元素 */
630
+ children: default_2.ReactNode;
631
+ /** 尺寸 */
632
+ size?: 'sm' | 'md' | 'lg';
633
+ /** 颜色 */
634
+ color?: 'violet' | 'cyan' | 'emerald' | 'rose' | 'amber';
635
+ /** 是否禁用 */
636
+ disabled?: boolean;
637
+ /** 排列方向 */
638
+ direction?: 'horizontal' | 'vertical';
639
+ /** 值变化回调 */
640
+ onChange?: (value: string | number) => void;
641
+ /** 自定义类名 */
642
+ className?: string;
643
+ }
644
+
645
+ export declare interface RadioProps {
646
+ /** 单选框的值 */
647
+ value: string | number;
648
+ /** 标签文本 */
649
+ label?: default_2.ReactNode;
650
+ /** 描述文本 */
651
+ description?: string;
652
+ /** 是否禁用 */
653
+ disabled?: boolean;
654
+ /** 自定义类名 */
655
+ className?: string;
656
+ }
657
+
658
+ export declare const Select: default_2.ForwardRefExoticComponent<SelectProps & default_2.RefAttributes<HTMLDivElement>>;
659
+
660
+ export declare interface SelectOption {
661
+ value: string | number;
662
+ label: string;
663
+ disabled?: boolean;
664
+ icon?: default_2.ReactNode;
665
+ }
666
+
667
+ export declare interface SelectProps {
668
+ /** 选项列表 */
669
+ options?: SelectOption[];
670
+ /** 当前值 */
671
+ value?: string | number;
672
+ /** 默认值 */
673
+ defaultValue?: string | number;
674
+ /** 占位文本 */
675
+ placeholder?: string;
676
+ /** 标签文本 */
677
+ label?: string;
678
+ /** 错误信息 */
679
+ error?: string;
680
+ /** 帮助文本 */
681
+ helper?: string;
682
+ /** 是否禁用 */
683
+ disabled?: boolean;
684
+ /** 是否必填 */
685
+ required?: boolean;
686
+ /** 尺寸 */
687
+ size?: 'sm' | 'md' | 'lg';
688
+ /** 是否可搜索 */
689
+ searchable?: boolean;
690
+ /** 是否可清除 */
691
+ clearable?: boolean;
692
+ /** 值变化回调 */
693
+ onChange?: (value: string | number) => void;
694
+ /** 自定义类名 */
695
+ className?: string;
696
+ }
697
+
698
+ export declare const shadows: {
699
+ sm: string;
700
+ DEFAULT: string;
701
+ md: string;
702
+ lg: string;
703
+ xl: string;
704
+ '2xl': string;
705
+ glow: string;
706
+ 'glow-lg': string;
707
+ };
708
+
709
+ export declare type SizeVariant = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
710
+
711
+ export declare function Skeleton({ variant, width, height, animation, lines, className, }: SkeletonProps): JSX_2.Element;
712
+
713
+ export declare function SkeletonAvatar({ size }: {
714
+ size?: number;
715
+ }): JSX_2.Element;
716
+
717
+ export declare function SkeletonButton({ width, height }: {
718
+ width?: number;
719
+ height?: number;
720
+ }): JSX_2.Element;
721
+
722
+ export declare function SkeletonCard({ className }: {
723
+ className?: string;
724
+ }): JSX_2.Element;
725
+
726
+ export declare interface SkeletonProps {
727
+ /** 变体类型 */
728
+ variant?: 'text' | 'circular' | 'rectangular' | 'rounded';
729
+ /** 宽度 */
730
+ width?: string | number;
731
+ /** 高度 */
732
+ height?: string | number;
733
+ /** 是否有动画 */
734
+ animation?: 'pulse' | 'wave' | 'none';
735
+ /** 行数(仅 text 变体) */
736
+ lines?: number;
737
+ /** 自定义类名 */
738
+ className?: string;
739
+ }
740
+
741
+ export declare function SkeletonTable({ rows, cols }: {
742
+ rows?: number;
743
+ cols?: number;
744
+ }): JSX_2.Element;
745
+
746
+ export declare const spacing: {
747
+ 0: string;
748
+ 1: string;
749
+ 2: string;
750
+ 3: string;
751
+ 4: string;
752
+ 5: string;
753
+ 6: string;
754
+ 8: string;
755
+ 10: string;
756
+ 12: string;
757
+ 16: string;
758
+ 20: string;
759
+ 24: string;
760
+ };
761
+
762
+ export declare function Spinner({ size, color, thickness, speed, variant, label, className, }: SpinnerProps): JSX_2.Element | null;
763
+
764
+ export declare interface SpinnerProps {
765
+ /** 尺寸 */
766
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
767
+ /** 颜色 */
768
+ color?: 'violet' | 'cyan' | 'emerald' | 'rose' | 'white' | 'gray';
769
+ /** 厚度 */
770
+ thickness?: number;
771
+ /** 速度 */
772
+ speed?: 'slow' | 'normal' | 'fast';
773
+ /** 变体 */
774
+ variant?: 'spinner' | 'dots' | 'bars' | 'ring';
775
+ /** 标签文本 */
776
+ label?: string;
777
+ /** 自定义类名 */
778
+ className?: string;
779
+ }
780
+
781
+ export declare const Switch: default_2.ForwardRefExoticComponent<SwitchProps & default_2.RefAttributes<HTMLButtonElement>>;
782
+
783
+ export declare interface SwitchProps {
784
+ /** 是否开启 */
785
+ checked?: boolean;
786
+ /** 默认是否开启 */
787
+ defaultChecked?: boolean;
788
+ /** 标签文本 */
789
+ label?: default_2.ReactNode;
790
+ /** 描述文本 */
791
+ description?: string;
792
+ /** 尺寸 */
793
+ size?: 'sm' | 'md' | 'lg';
794
+ /** 颜色 */
795
+ color?: 'violet' | 'cyan' | 'emerald' | 'rose' | 'amber';
796
+ /** 是否禁用 */
797
+ disabled?: boolean;
798
+ /** 是否显示状态图标 */
799
+ showIcons?: boolean;
800
+ /** 开启时的文本 */
801
+ onLabel?: string;
802
+ /** 关闭时的文本 */
803
+ offLabel?: string;
804
+ /** 状态变化回调 */
805
+ onChange?: (checked: boolean) => void;
806
+ /** 自定义类名 */
807
+ className?: string;
808
+ }
809
+
810
+ export declare function Tab({ value, children, disabled, icon, className }: TabProps): JSX_2.Element;
811
+
812
+ export declare function TabList({ children, className }: TabListProps): JSX_2.Element;
813
+
814
+ export declare interface TabListProps {
815
+ children?: default_2.ReactNode;
816
+ className?: string;
817
+ }
818
+
819
+ export declare function TabPanel({ value, children, className }: TabPanelProps): JSX_2.Element | null;
820
+
821
+ export declare interface TabPanelProps {
822
+ /** 对应的标签值 */
823
+ value: string;
824
+ /** 面板内容 */
825
+ children?: default_2.ReactNode;
826
+ /** 自定义类名 */
827
+ className?: string;
828
+ }
829
+
830
+ export declare interface TabProps {
831
+ /** 标签值 */
832
+ value: string;
833
+ /** 标签内容 */
834
+ children?: default_2.ReactNode;
835
+ /** 是否禁用 */
836
+ disabled?: boolean;
837
+ /** 图标 */
838
+ icon?: default_2.ReactNode;
839
+ /** 自定义类名 */
840
+ className?: string;
841
+ }
842
+
843
+ export declare function Tabs({ items, value, defaultValue, variant, size, onChange, className, }: TabsProps): JSX_2.Element;
844
+
845
+ export declare interface TabsProps {
846
+ /** 通过 items 数组快速声明标签列表 */
847
+ items?: {
848
+ label: string;
849
+ key: string;
850
+ children?: default_2.ReactNode;
851
+ disabled?: boolean;
852
+ }[];
853
+ /** 当前激活的标签 */
854
+ value?: string;
855
+ /** 默认激活的标签 */
856
+ defaultValue?: string;
857
+ /** 变体样式 */
858
+ variant?: 'line' | 'enclosed' | 'pills' | 'soft';
859
+ /** 尺寸 */
860
+ size?: 'sm' | 'md' | 'lg';
861
+ /** 值变化回调 */
862
+ onChange?: (value: string) => void;
863
+ /** 自定义类名 */
864
+ className?: string;
865
+ }
866
+
867
+ export declare const Tag: default_2.ForwardRefExoticComponent<TagProps & default_2.RefAttributes<HTMLSpanElement>>;
868
+
869
+ export declare interface TagProps extends default_2.HTMLAttributes<HTMLSpanElement> {
870
+ /** 内容 */
871
+ children: default_2.ReactNode;
872
+ /** 颜色 */
873
+ color?: 'violet' | 'cyan' | 'emerald' | 'rose' | 'amber' | 'gray' | 'blue' | 'pink';
874
+ /** 变体 */
875
+ variant?: 'solid' | 'soft' | 'outline';
876
+ /** 尺寸 */
877
+ size?: 'sm' | 'md' | 'lg';
878
+ /** 是否可关闭 */
879
+ closable?: boolean;
880
+ /** 关闭回调 */
881
+ onClose?: () => void;
882
+ /** 左侧图标 */
883
+ icon?: default_2.ReactNode;
884
+ /** 是否为圆角药丸形状 */
885
+ rounded?: boolean;
886
+ }
887
+
888
+ export declare const tailwindConfig: {
889
+ content: string[];
890
+ theme: {
891
+ extend: {
892
+ colors: {
893
+ primary: {
894
+ 50: string;
895
+ 100: string;
896
+ 200: string;
897
+ 300: string;
898
+ 400: string;
899
+ 500: string;
900
+ 600: string;
901
+ 700: string;
902
+ 800: string;
903
+ 900: string;
904
+ };
905
+ };
906
+ animation: {
907
+ 'spin-slow': string;
908
+ 'bounce-slow': string;
909
+ shimmer: string;
910
+ };
911
+ keyframes: {
912
+ shimmer: {
913
+ '0%': {
914
+ transform: string;
915
+ };
916
+ '100%': {
917
+ transform: string;
918
+ };
919
+ };
920
+ bars: {
921
+ '0%, 40%, 100%': {
922
+ transform: string;
923
+ };
924
+ '20%': {
925
+ transform: string;
926
+ };
927
+ };
928
+ };
929
+ };
930
+ };
931
+ plugins: never[];
932
+ };
933
+
934
+ export declare const Textarea: default_2.ForwardRefExoticComponent<TextareaProps & default_2.RefAttributes<HTMLTextAreaElement>>;
935
+
936
+ export declare interface TextareaProps extends default_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
937
+ /** 标签文本 */
938
+ label?: string;
939
+ /** 错误信息 */
940
+ error?: string;
941
+ /** 帮助文本 */
942
+ helper?: string;
943
+ /** 变体样式 */
944
+ variant?: 'default' | 'filled' | 'flushed';
945
+ /** 是否必填 */
946
+ required?: boolean;
947
+ /** 是否显示字数统计 */
948
+ showCount?: boolean;
949
+ /** 最大字符数 */
950
+ maxLength?: number;
951
+ /** 是否自动调整高度 */
952
+ autoSize?: boolean | {
953
+ minRows?: number;
954
+ maxRows?: number;
955
+ };
956
+ /** 调整大小方式 */
957
+ resize?: 'none' | 'vertical' | 'horizontal' | 'both';
958
+ }
959
+
960
+ export declare interface ThemeConfig {
961
+ colors: typeof colors;
962
+ spacing: typeof spacing;
963
+ borderRadius: typeof borderRadius;
964
+ shadows: typeof shadows;
965
+ typography: typeof typography;
966
+ animations: typeof animations;
967
+ }
968
+
969
+ declare interface ToastContextValue {
970
+ toast: (options: Omit<ToastItem, 'id'>) => void;
971
+ info: (message: string, duration?: number) => void;
972
+ success: (message: string, duration?: number) => void;
973
+ warning: (message: string, duration?: number) => void;
974
+ error: (message: string, duration?: number) => void;
975
+ }
976
+
977
+ export declare interface ToastItem {
978
+ id: string;
979
+ type: ToastType;
980
+ message: string;
981
+ duration?: number;
982
+ closable?: boolean;
983
+ }
984
+
985
+ declare type ToastPosition = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';
986
+
987
+ export declare function ToastProvider({ children, position, maxToasts, }: ToastProviderProps): JSX_2.Element;
988
+
989
+ export declare interface ToastProviderProps {
990
+ children: default_2.ReactNode;
991
+ position?: ToastPosition;
992
+ maxToasts?: number;
993
+ }
994
+
995
+ declare type ToastType = 'info' | 'success' | 'warning' | 'error';
996
+
997
+ export declare const typography: {
998
+ fontFamily: {
999
+ sans: string;
1000
+ mono: string;
1001
+ };
1002
+ fontSize: {
1003
+ xs: (string | {
1004
+ lineHeight: string;
1005
+ })[];
1006
+ sm: (string | {
1007
+ lineHeight: string;
1008
+ })[];
1009
+ base: (string | {
1010
+ lineHeight: string;
1011
+ })[];
1012
+ lg: (string | {
1013
+ lineHeight: string;
1014
+ })[];
1015
+ xl: (string | {
1016
+ lineHeight: string;
1017
+ })[];
1018
+ '2xl': (string | {
1019
+ lineHeight: string;
1020
+ })[];
1021
+ '3xl': (string | {
1022
+ lineHeight: string;
1023
+ })[];
1024
+ '4xl': (string | {
1025
+ lineHeight: string;
1026
+ })[];
1027
+ };
1028
+ };
1029
+
1030
+ export declare function useAnimation(isOpen: boolean, duration?: number): {
1031
+ shouldRender: boolean;
1032
+ isAnimating: boolean;
1033
+ };
1034
+
1035
+ export declare function useClickOutside<T extends HTMLElement>(callback: () => void): RefObject<T>;
1036
+
1037
+ export declare function useControllableState<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void): readonly [T, (nextValue: T | ((prev: T) => T)) => void];
1038
+
1039
+ export declare function useCopyToClipboard(): {
1040
+ copied: boolean;
1041
+ copy: (text: string) => Promise<boolean>;
1042
+ };
1043
+
1044
+ export declare function useDesignerHistory(initialNodes?: DesignNode[]): UseDesignerHistoryReturn;
1045
+
1046
+ export declare interface UseDesignerHistoryReturn {
1047
+ nodes: DesignNode[];
1048
+ setNodes: (nodes: DesignNode[] | ((prev: DesignNode[]) => DesignNode[])) => void;
1049
+ undo: () => void;
1050
+ redo: () => void;
1051
+ canUndo: boolean;
1052
+ canRedo: boolean;
1053
+ reset: (initialNodes?: DesignNode[]) => void;
1054
+ historyLength: number;
1055
+ currentIndex: number;
1056
+ }
1057
+
1058
+ export declare function useId(prefix?: string): string;
1059
+
1060
+ export declare function useKeyboardNavigation(itemCount: number, onSelect: (index: number) => void): {
1061
+ activeIndex: number;
1062
+ setActiveIndex: Dispatch<SetStateAction<number>>;
1063
+ handleKeyDown: (event: React.KeyboardEvent) => void;
1064
+ };
1065
+
1066
+ export declare function useLocalStorage<T>(key: string, initialValue: T): readonly [T, (value: T | ((val: T) => T)) => void];
1067
+
1068
+ export declare function useMediaQuery(query: string): boolean;
1069
+
1070
+ export declare function useToast(): ToastContextValue;
1071
+
1072
+ export { }