@xinghunm/compass-ui 0.1.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,1154 @@
1
+ import * as React$1 from 'react';
2
+ import React__default, { CSSProperties, ReactElement, ReactNode } from 'react';
3
+ import { Placement } from '@floating-ui/react';
4
+
5
+ interface ButtonBaseProps {
6
+ /** Whether to enable ripple effect */
7
+ hasRipple?: boolean;
8
+ /** Custom class name */
9
+ className?: string;
10
+ /** Custom style */
11
+ style?: React.CSSProperties;
12
+ /** Whether the button is disabled */
13
+ disabled?: boolean;
14
+ /** Ripple background color */
15
+ rippleBgColor?: string;
16
+ /** Ripple opacity */
17
+ rippleOpacity?: number;
18
+ /** Button content */
19
+ children?: React.ReactNode;
20
+ /** Click event handler */
21
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
22
+ }
23
+
24
+ interface ButtonProps extends ButtonBaseProps {
25
+ /** Button type */
26
+ variant?: 'primary' | 'default' | 'dashed' | 'text' | 'link';
27
+ /** Button size */
28
+ size?: 'small' | 'default' | 'large';
29
+ /** Button shape */
30
+ shape?: 'default' | 'circle' | 'round';
31
+ /** Whether the button is disabled */
32
+ disabled?: boolean;
33
+ /** Whether the button is in loading state */
34
+ loading?: boolean;
35
+ /** Whether the button is a danger button */
36
+ danger?: boolean;
37
+ /** Whether the button fits the width of its parent container */
38
+ block?: boolean;
39
+ /** Button icon */
40
+ icon?: React.ReactNode;
41
+ }
42
+
43
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
44
+
45
+ type StepStatus = 'wait' | 'process' | 'finish' | 'error';
46
+ interface StepProps {
47
+ /** Title of the step */
48
+ title?: React__default.ReactNode;
49
+ /** Subtitle of the step */
50
+ subTitle?: React__default.ReactNode;
51
+ /** Description of the step */
52
+ description?: React__default.ReactNode;
53
+ /** Icon of the step */
54
+ icon?: React__default.ReactNode;
55
+ /** Status of the step */
56
+ status?: StepStatus;
57
+ /** Disabled state */
58
+ disabled?: boolean;
59
+ /** Custom className */
60
+ className?: string;
61
+ /** Custom style */
62
+ style?: React__default.CSSProperties;
63
+ }
64
+ interface StepsProps {
65
+ /** Current step, 0-indexed */
66
+ current?: number;
67
+ /** Status of the current step */
68
+ status?: StepStatus;
69
+ /** Direction of the steps */
70
+ direction?: 'horizontal' | 'vertical';
71
+ /** Label placement */
72
+ labelPlacement?: 'horizontal' | 'vertical';
73
+ /** Steps variant */
74
+ variant?: 'default' | 'dot';
75
+ /** Step items */
76
+ items?: StepProps[];
77
+ /** Children steps */
78
+ children?: React__default.ReactNode;
79
+ /** Change handler */
80
+ onChange?: (current: number) => void;
81
+ /** Custom className */
82
+ className?: string;
83
+ /** Custom style */
84
+ style?: React__default.CSSProperties;
85
+ }
86
+
87
+ declare const Step: React__default.FC<StepProps>;
88
+ declare const Steps: React__default.FC<StepsProps> & {
89
+ Step: typeof Step;
90
+ };
91
+
92
+ interface DataNode {
93
+ key: string | number;
94
+ title?: React__default.ReactNode;
95
+ children?: DataNode[];
96
+ disabled?: boolean;
97
+ selectable?: boolean;
98
+ checkable?: boolean;
99
+ icon?: React__default.ReactNode;
100
+ isLeaf?: boolean;
101
+ [key: string]: unknown;
102
+ }
103
+ interface TreeProps {
104
+ /** Tree data */
105
+ treeData?: DataNode[];
106
+ /** Whether to show checkboxes */
107
+ checkable?: boolean;
108
+ /** Whether treeNodes are selectable */
109
+ selectable?: boolean;
110
+ /** Whether to show connecting lines */
111
+ showLine?: boolean;
112
+ /** Whether to show icon */
113
+ showIcon?: boolean;
114
+ /** Default expanded keys */
115
+ defaultExpandedKeys?: (string | number)[];
116
+ /** Expanded keys (controlled) */
117
+ expandedKeys?: (string | number)[];
118
+ /** Callback when keys are expanded/collapsed */
119
+ onExpand?: (expandedKeys: (string | number)[], info: {
120
+ node: DataNode;
121
+ expanded: boolean;
122
+ }) => void;
123
+ /** Default selected keys */
124
+ defaultSelectedKeys?: (string | number)[];
125
+ /** Selected keys (controlled) */
126
+ selectedKeys?: (string | number)[];
127
+ /** Callback when node is selected */
128
+ onSelect?: (selectedKeys: (string | number)[], info: {
129
+ node: DataNode;
130
+ selected: boolean;
131
+ event: React__default.MouseEvent;
132
+ }) => void;
133
+ /** Default checked keys */
134
+ defaultCheckedKeys?: (string | number)[];
135
+ /** Checked keys (controlled) */
136
+ checkedKeys?: (string | number)[];
137
+ /** Callback when node is checked */
138
+ onCheck?: (checkedKeys: (string | number)[], info: {
139
+ node: DataNode;
140
+ checked: boolean;
141
+ event: React__default.MouseEvent;
142
+ }) => void;
143
+ /** Custom expand icon */
144
+ switcherIcon?: React__default.ReactNode | ((props: {
145
+ expanded: boolean;
146
+ }) => React__default.ReactNode);
147
+ /** Custom title render */
148
+ titleRender?: (node: DataNode) => React__default.ReactNode;
149
+ /** Virtual scroll height */
150
+ height?: number;
151
+ /** Virtual scroll item height */
152
+ itemHeight?: number;
153
+ /** Enable virtual scrolling */
154
+ virtual?: boolean;
155
+ /** Virtual List props */
156
+ virtualListProps?: Record<string, unknown>;
157
+ /** Class name */
158
+ className?: string;
159
+ /** Style */
160
+ style?: React__default.CSSProperties;
161
+ }
162
+ interface TreeNodeProps extends Omit<DataNode, 'children'> {
163
+ eventKey: string | number;
164
+ level?: number;
165
+ expanded?: boolean;
166
+ selected?: boolean;
167
+ checked?: boolean;
168
+ halfChecked?: boolean;
169
+ loading?: boolean;
170
+ domRef?: React__default.Ref<HTMLDivElement>;
171
+ className?: string;
172
+ style?: React__default.CSSProperties;
173
+ onExpand?: (e: React__default.MouseEvent) => void;
174
+ onSelect?: (e: React__default.MouseEvent) => void;
175
+ onCheck?: (e: React__default.MouseEvent) => void;
176
+ children?: React__default.ReactNode;
177
+ switcherIcon?: React__default.ReactNode | ((props: {
178
+ expanded: boolean;
179
+ }) => React__default.ReactNode);
180
+ showLine?: boolean;
181
+ showIcon?: boolean;
182
+ isLast?: boolean;
183
+ indentLines?: boolean[];
184
+ }
185
+
186
+ declare const Tree: React$1.FC<TreeProps>;
187
+
188
+ interface ItemType {
189
+ /**
190
+ * Unique key
191
+ */
192
+ key: string | number;
193
+ /**
194
+ * Label content
195
+ */
196
+ label: React__default.ReactNode;
197
+ /**
198
+ * Icon element
199
+ */
200
+ icon?: React__default.ReactNode;
201
+ /**
202
+ * Whether the item is disabled
203
+ */
204
+ disabled?: boolean;
205
+ /**
206
+ * Danger state
207
+ */
208
+ danger?: boolean;
209
+ /**
210
+ * Click handler
211
+ */
212
+ onClick?: (e: React__default.MouseEvent) => void;
213
+ /**
214
+ * Custom class name
215
+ */
216
+ className?: string;
217
+ /**
218
+ * Custom style
219
+ */
220
+ style?: React__default.CSSProperties;
221
+ }
222
+ interface MenuProps {
223
+ /**
224
+ * Menu content (legacy)
225
+ */
226
+ children?: React__default.ReactNode;
227
+ /**
228
+ * Menu items (data-driven)
229
+ */
230
+ items?: ItemType[];
231
+ /**
232
+ * Custom class name
233
+ */
234
+ className?: string;
235
+ /**
236
+ * Custom style
237
+ */
238
+ style?: React__default.CSSProperties;
239
+ /**
240
+ * Menu click handler
241
+ */
242
+ onClick?: (e: React__default.MouseEvent, key?: string | number) => void;
243
+ }
244
+ interface MenuItemProps {
245
+ /**
246
+ * Item content
247
+ */
248
+ children: React__default.ReactNode;
249
+ /**
250
+ * Click handler
251
+ */
252
+ onClick?: (e: React__default.MouseEvent) => void;
253
+ /**
254
+ * Whether the item is disabled
255
+ */
256
+ disabled?: boolean;
257
+ /**
258
+ * Icon element
259
+ */
260
+ icon?: React__default.ReactNode;
261
+ /**
262
+ * Danger state
263
+ */
264
+ danger?: boolean;
265
+ /**
266
+ * Custom class name
267
+ */
268
+ className?: string;
269
+ /**
270
+ * Custom style
271
+ */
272
+ style?: React__default.CSSProperties;
273
+ }
274
+
275
+ declare const MenuItem: React__default.FC<MenuItemProps>;
276
+ declare const Menu: React__default.FC<MenuProps> & {
277
+ Item: typeof MenuItem;
278
+ };
279
+
280
+ interface DropdownProps {
281
+ /**
282
+ * Trigger mode
283
+ * @default 'hover'
284
+ */
285
+ trigger?: 'click' | 'hover';
286
+ /**
287
+ * Placement of the dropdown menu
288
+ * @default 'bottom-start'
289
+ */
290
+ placement?: Placement;
291
+ /**
292
+ * The content of the dropdown menu
293
+ */
294
+ overlay?: React__default.ReactNode;
295
+ /**
296
+ * The menu configuration (data-driven)
297
+ */
298
+ menu?: MenuProps;
299
+ /**
300
+ * Whether the dropdown is visible (controlled)
301
+ */
302
+ visible?: boolean;
303
+ /**
304
+ * Callback when visibility changes
305
+ */
306
+ onVisibleChange?: (visible: boolean) => void;
307
+ /**
308
+ * The trigger element
309
+ */
310
+ children: React__default.ReactNode;
311
+ /**
312
+ * Whether the dropdown is disabled
313
+ */
314
+ disabled?: boolean;
315
+ /**
316
+ * Custom class name
317
+ */
318
+ className?: string;
319
+ /**
320
+ * Custom style
321
+ */
322
+ style?: React__default.CSSProperties;
323
+ }
324
+
325
+ declare const Dropdown: React__default.FC<DropdownProps>;
326
+
327
+ interface InputFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
328
+ /**
329
+ * The type of input.
330
+ * @default 'text'
331
+ */
332
+ type?: 'text' | 'password' | 'search';
333
+ /**
334
+ * The label content.
335
+ */
336
+ label?: React__default.ReactNode;
337
+ /**
338
+ * The error content.
339
+ */
340
+ error?: boolean | React__default.ReactNode;
341
+ /**
342
+ * The helper text content.
343
+ */
344
+ helperText?: React__default.ReactNode;
345
+ /**
346
+ * If `true`, the input will take up the full width of its container.
347
+ */
348
+ fullWidth?: boolean;
349
+ /**
350
+ * Start adornment for this component.
351
+ */
352
+ prefix?: React__default.ReactNode;
353
+ /**
354
+ * End adornment for this component.
355
+ */
356
+ suffix?: React__default.ReactNode;
357
+ /**
358
+ * If `true`, a clear icon will appear when the input has value.
359
+ */
360
+ allowClear?: boolean;
361
+ /**
362
+ * The value of the input element, required for a controlled component.
363
+ */
364
+ value?: string | number;
365
+ /**
366
+ * The default value. Use when the component is not controlled.
367
+ */
368
+ defaultValue?: string | number;
369
+ /**
370
+ * The size of the component.
371
+ * @default 'medium'
372
+ */
373
+ size?: 'small' | 'medium' | 'large';
374
+ /**
375
+ * The callback function that is triggered when Enter key is pressed.
376
+ */
377
+ onPressEnter?: (event: React__default.KeyboardEvent<HTMLInputElement>) => void;
378
+ }
379
+
380
+ /**
381
+ * InputField component for user input.
382
+ */
383
+ declare const InputField: React__default.ForwardRefExoticComponent<InputFieldProps & React__default.RefAttributes<HTMLInputElement>>;
384
+
385
+ type MessageType$1 = 'info' | 'success' | 'error' | 'warning' | 'loading';
386
+ interface MessageProps {
387
+ key?: string;
388
+ type?: MessageType$1;
389
+ content: React__default.ReactNode;
390
+ duration?: number;
391
+ onClose?: () => void;
392
+ icon?: React__default.ReactNode;
393
+ className?: string;
394
+ style?: React__default.CSSProperties;
395
+ }
396
+ interface TypeOpen {
397
+ (content: React__default.ReactNode, duration?: number, onClose?: () => void): void;
398
+ (config: MessageProps): void;
399
+ }
400
+ interface MessageInstance {
401
+ info: TypeOpen;
402
+ success: TypeOpen;
403
+ error: TypeOpen;
404
+ warning: TypeOpen;
405
+ loading: TypeOpen;
406
+ open(config: MessageProps): void;
407
+ destroy(key?: string): void;
408
+ }
409
+
410
+ declare const _default: {
411
+ info: (content: React__default.ReactNode | MessageProps, duration?: number, onClose?: () => void) => void;
412
+ success: (content: React__default.ReactNode | MessageProps, duration?: number, onClose?: () => void) => void;
413
+ error: (content: React__default.ReactNode | MessageProps, duration?: number, onClose?: () => void) => void;
414
+ warning: (content: React__default.ReactNode | MessageProps, duration?: number, onClose?: () => void) => void;
415
+ loading: (content: React__default.ReactNode | MessageProps, duration?: number, onClose?: () => void) => void;
416
+ open: (config: MessageProps) => void;
417
+ destroy: () => void;
418
+ };
419
+
420
+ declare function useMessage(): [MessageInstance, React__default.ReactElement];
421
+
422
+ type MessageType = typeof _default & {
423
+ useMessage: typeof useMessage;
424
+ };
425
+ declare const messageWithHook: MessageType;
426
+
427
+ /** Modal type */
428
+ type ModalType$1 = 'info' | 'success' | 'error' | 'warning' | 'confirm';
429
+ interface ModalBaseProps {
430
+ /** Whether the modal is open */
431
+ isOpen: boolean;
432
+ /** Whether to show the mask */
433
+ maskVisible?: boolean;
434
+ /** Custom footer content */
435
+ footer?: React__default.ReactNode;
436
+ /** Modal content */
437
+ children?: React__default.ReactNode;
438
+ /** Custom class name */
439
+ className?: string;
440
+ /** Custom style */
441
+ style?: CSSProperties;
442
+ /** Modal title */
443
+ title?: React__default.ReactNode;
444
+ /** Whether to show the close button */
445
+ closable?: boolean;
446
+ /** Width of the modal */
447
+ width?: string | number;
448
+ /** Callback when the OK button is clicked */
449
+ onOk?: (e?: React__default.MouseEvent<HTMLElement>) => void | Promise<void>;
450
+ /** Callback when the Cancel button is clicked */
451
+ onCancel?: (e?: React__default.MouseEvent<HTMLElement>) => void | Promise<void>;
452
+ /** Text of the OK button */
453
+ okText?: React__default.ReactNode;
454
+ /** Text of the Cancel button */
455
+ cancelText?: React__default.ReactNode;
456
+ /** Whether the OK button is loading */
457
+ confirmLoading?: boolean;
458
+ /** Callback when the modal is completely closed (after animation) */
459
+ afterClose?: () => void;
460
+ }
461
+
462
+ declare const Modal: (props: ModalBaseProps) => React__default.ReactPortal;
463
+
464
+ interface ModalFuncProps extends Omit<ModalBaseProps, 'isOpen' | 'children'> {
465
+ title?: React__default.ReactNode;
466
+ content?: React__default.ReactNode;
467
+ onOk?: () => void | Promise<void>;
468
+ onCancel?: () => void | Promise<void>;
469
+ okText?: string;
470
+ cancelText?: string;
471
+ icon?: React__default.ReactNode;
472
+ type?: ModalType$1;
473
+ }
474
+ declare const info: (props: ModalFuncProps) => {
475
+ destroy: typeof close;
476
+ update: (newConfig: ModalFuncProps) => void;
477
+ };
478
+ declare const success: (props: ModalFuncProps) => {
479
+ destroy: typeof close;
480
+ update: (newConfig: ModalFuncProps) => void;
481
+ };
482
+ declare const error: (props: ModalFuncProps) => {
483
+ destroy: typeof close;
484
+ update: (newConfig: ModalFuncProps) => void;
485
+ };
486
+ declare const warning: (props: ModalFuncProps) => {
487
+ destroy: typeof close;
488
+ update: (newConfig: ModalFuncProps) => void;
489
+ };
490
+ declare const confirm: (props: ModalFuncProps) => {
491
+ destroy: typeof close;
492
+ update: (newConfig: ModalFuncProps) => void;
493
+ };
494
+
495
+ type ModalFunc = (props: ModalFuncProps) => {
496
+ destroy: () => void;
497
+ update: (config: ModalFuncProps) => void;
498
+ };
499
+ interface ModalInstance {
500
+ info: ModalFunc;
501
+ success: ModalFunc;
502
+ error: ModalFunc;
503
+ warning: ModalFunc;
504
+ confirm: ModalFunc;
505
+ }
506
+ declare function useModal(): [ModalInstance, ReactElement];
507
+
508
+ type ModalType = typeof Modal & {
509
+ info: typeof info;
510
+ success: typeof success;
511
+ error: typeof error;
512
+ warning: typeof warning;
513
+ confirm: typeof confirm;
514
+ useModal: typeof useModal;
515
+ };
516
+ declare const ModalWithStatics: ModalType;
517
+
518
+ type ProgressType = 'line' | 'circle';
519
+ type ProgressSize = 'small' | 'medium' | 'large' | number | {
520
+ width: number;
521
+ height: number;
522
+ };
523
+ type ProgressStatus = 'normal' | 'success' | 'error' | 'warning';
524
+ interface ProgressProps {
525
+ /** Progress type */
526
+ type?: ProgressType;
527
+ /** Progress percentage (0-100) */
528
+ percent?: number;
529
+ /** Progress size - for line: height (string/number) or { width, height }, for circle: diameter */
530
+ size?: ProgressSize;
531
+ /** Progress status */
532
+ status?: ProgressStatus;
533
+ /** Show percentage text */
534
+ showInfo?: boolean;
535
+ /** Custom format function for percentage text */
536
+ format?: (percent?: number) => ReactNode;
537
+ /** Stroke width for line progress or circle progress */
538
+ strokeWidth?: number;
539
+ /** Stroke color */
540
+ strokeColor?: string | {
541
+ from: string;
542
+ to: string;
543
+ direction?: string;
544
+ };
545
+ /** Trail color (background color) */
546
+ trailColor?: string;
547
+ /** Whether to show success icon when percent is 100 */
548
+ success?: ReactNode;
549
+ /** Custom className */
550
+ className?: string;
551
+ /** Custom style */
552
+ style?: React.CSSProperties;
553
+ /** Gap degree for circle progress */
554
+ gapDegree?: number;
555
+ /** Gap position for circle progress */
556
+ gapPosition?: 'top' | 'bottom' | 'left' | 'right';
557
+ }
558
+
559
+ /**
560
+ * Progress component for showing task completion status.
561
+ * Supports both linear and circular progress indicators.
562
+ */
563
+ declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps & React__default.RefAttributes<HTMLDivElement>>;
564
+
565
+ type SelectValue = string | number | (string | number)[];
566
+ interface SelectOption {
567
+ label: React__default.ReactNode;
568
+ value: string | number;
569
+ disabled?: boolean;
570
+ [key: string]: unknown;
571
+ }
572
+ interface SelectProps {
573
+ /**
574
+ * Selected value(s)
575
+ */
576
+ value?: SelectValue;
577
+ /**
578
+ * Default selected value(s)
579
+ */
580
+ defaultValue?: SelectValue;
581
+ /**
582
+ * Callback when value changes
583
+ */
584
+ onChange?: (value: SelectValue, option?: SelectOption | SelectOption[]) => void;
585
+ /**
586
+ * Options for data-driven rendering
587
+ */
588
+ options?: SelectOption[];
589
+ /**
590
+ * Whether to allow multiple selection
591
+ */
592
+ multiple?: boolean;
593
+ /**
594
+ * Used for setting specific mode, e.g. 'tags' (combined with multiple)
595
+ */
596
+ mode?: 'multiple' | 'tags';
597
+ /**
598
+ * Whether the select is disabled
599
+ */
600
+ disabled?: boolean;
601
+ /**
602
+ * Whether the select is loading
603
+ */
604
+ loading?: boolean;
605
+ /**
606
+ * Whether to show search input
607
+ */
608
+ showSearch?: boolean;
609
+ /**
610
+ * Placeholder text
611
+ */
612
+ placeholder?: string;
613
+ /**
614
+ * Whether to allow clearing the selection
615
+ */
616
+ allowClear?: boolean;
617
+ /**
618
+ * Custom class name
619
+ */
620
+ className?: string;
621
+ /**
622
+ * Custom style
623
+ */
624
+ style?: React__default.CSSProperties;
625
+ /**
626
+ * Size of the select input
627
+ * @default 'medium'
628
+ */
629
+ size?: 'small' | 'medium' | 'large';
630
+ /**
631
+ * Status of the select input
632
+ */
633
+ status?: 'error' | 'warning';
634
+ /**
635
+ * Custom dropdown width
636
+ */
637
+ dropdownStyle?: React__default.CSSProperties;
638
+ /**
639
+ * Custom dropdown class name
640
+ */
641
+ dropdownClassName?: string;
642
+ /**
643
+ * Children for declarative usage
644
+ */
645
+ children?: React__default.ReactNode;
646
+ /**
647
+ * Trigger mode
648
+ * @default 'click'
649
+ */
650
+ trigger?: 'click' | 'hover';
651
+ }
652
+ interface OptionProps {
653
+ value: string | number;
654
+ children?: React__default.ReactNode;
655
+ disabled?: boolean;
656
+ className?: string;
657
+ style?: React__default.CSSProperties;
658
+ /**
659
+ * Internal prop to pass label if children is complex
660
+ */
661
+ label?: React__default.ReactNode;
662
+ }
663
+
664
+ declare const Option: React__default.FC<OptionProps>;
665
+
666
+ declare const Select: React__default.FC<SelectProps> & {
667
+ Option: typeof Option;
668
+ };
669
+
670
+ interface PaginationProps {
671
+ /** Current page number */
672
+ current?: number;
673
+ /** Default initial page number */
674
+ defaultCurrent?: number;
675
+ /** Total number of data items */
676
+ total?: number;
677
+ /** Number of data items per page */
678
+ pageSize?: number;
679
+ /** Default number of data items per page */
680
+ defaultPageSize?: number;
681
+ /** Callback executed when page number or pageSize is changed */
682
+ onChange?: (page: number, pageSize: number) => void;
683
+ /** Disable pagination */
684
+ disabled?: boolean;
685
+ /** Determine whether to show the size changer */
686
+ showSizeChanger?: boolean;
687
+ /** Specify the size changer options */
688
+ pageSizeOptions?: number[];
689
+ /** Determine whether you can jump to pages directly */
690
+ showQuickJumper?: boolean;
691
+ /** To display the total number and range */
692
+ showTotal?: (total: number, range: [number, number]) => React.ReactNode;
693
+ /** Specify the alignment of total text */
694
+ totalAlign?: 'left' | 'right';
695
+ /** Whether to use simple mode */
696
+ simple?: boolean;
697
+ /** Specify the size of pagination component */
698
+ size?: 'default' | 'small';
699
+ /** Custom class name */
700
+ className?: string;
701
+ /** Custom style */
702
+ style?: React.CSSProperties;
703
+ }
704
+
705
+ declare const Pagination: React__default.FC<PaginationProps>;
706
+
707
+ type DatePickerMode = 'date' | 'week' | 'month' | 'quarter' | 'year';
708
+ interface DatePickerProps {
709
+ /** Selected date (JS Date) */
710
+ value?: Date | null;
711
+ /** Default selected date (JS Date) (Only effective on mount) */
712
+ defaultValue?: Date | null;
713
+ /** Callback when date changes */
714
+ onChange?: (date: Date | null) => void;
715
+ /** Picker mode */
716
+ picker?: DatePickerMode;
717
+ /** Whether to show time picker */
718
+ showTime?: boolean;
719
+ /** Date format string */
720
+ format?: string;
721
+ /** Disabled state */
722
+ disabled?: boolean;
723
+ /** Placeholder text */
724
+ placeholder?: string;
725
+ /** Clearable */
726
+ clearable?: boolean;
727
+ /** Custom class name */
728
+ className?: string;
729
+ /** Custom style */
730
+ style?: React.CSSProperties;
731
+ /** Whether the picker should take up the full width of its container */
732
+ fullWidth?: boolean;
733
+ }
734
+ interface DateRangePickerProps {
735
+ /** Selected date range */
736
+ value?: [Date | null, Date | null];
737
+ /** Default selected date range */
738
+ defaultValue?: [Date | null, Date | null];
739
+ /** Callback when date range changes */
740
+ onChange?: (dates: [Date | null, Date | null]) => void;
741
+ /** Picker mode */
742
+ picker?: DatePickerMode;
743
+ /** Whether to show time picker */
744
+ showTime?: boolean;
745
+ /** Date format string */
746
+ format?: string;
747
+ /** Disabled state */
748
+ disabled?: boolean;
749
+ /** Placeholder text */
750
+ placeholder?: [string, string];
751
+ /** Clearable */
752
+ clearable?: boolean;
753
+ /** Custom class name */
754
+ className?: string;
755
+ /** Custom style */
756
+ style?: React.CSSProperties;
757
+ /** Whether the picker should take up the full width of its container */
758
+ fullWidth?: boolean;
759
+ }
760
+
761
+ declare const DatePicker$1: React__default.ForwardRefExoticComponent<DatePickerProps & React__default.RefAttributes<HTMLDivElement>>;
762
+
763
+ declare const DateRangePicker: React__default.ForwardRefExoticComponent<DateRangePickerProps & React__default.RefAttributes<HTMLDivElement>>;
764
+
765
+ type InternalDatePickerType = typeof DatePicker$1;
766
+ interface DatePickerInterface extends InternalDatePickerType {
767
+ RangePicker: typeof DateRangePicker;
768
+ }
769
+ declare const DatePicker: DatePickerInterface;
770
+
771
+ interface Theme {
772
+ colors: {
773
+ primary: string;
774
+ primaryHover: string;
775
+ primaryActive: string;
776
+ success: string;
777
+ warning: string;
778
+ error: string;
779
+ info: string;
780
+ text: string;
781
+ textSecondary: string;
782
+ textTertiary: string;
783
+ textDisabled: string;
784
+ background: string;
785
+ backgroundSecondary: string;
786
+ backgroundTertiary: string;
787
+ border: string;
788
+ borderSecondary: string;
789
+ borderHover: string;
790
+ };
791
+ spacing: {
792
+ xs: number;
793
+ sm: number;
794
+ md: number;
795
+ lg: number;
796
+ xl: number;
797
+ xxl: number;
798
+ };
799
+ borderRadius: {
800
+ xs: number;
801
+ sm: number;
802
+ md: number;
803
+ lg: number;
804
+ xl: number;
805
+ };
806
+ fontSize: {
807
+ xs: number;
808
+ sm: number;
809
+ md: number;
810
+ lg: number;
811
+ xl: number;
812
+ xxl: number;
813
+ };
814
+ fontWeight: {
815
+ light: number;
816
+ normal: number;
817
+ medium: number;
818
+ semibold: number;
819
+ bold: number;
820
+ };
821
+ lineHeight: {
822
+ tight: number;
823
+ normal: number;
824
+ relaxed: number;
825
+ };
826
+ shadows: {
827
+ sm: string;
828
+ md: string;
829
+ lg: string;
830
+ xl: string;
831
+ };
832
+ transitions: {
833
+ fast: string;
834
+ normal: string;
835
+ slow: string;
836
+ };
837
+ breakpoints: {
838
+ xs: string;
839
+ sm: string;
840
+ md: string;
841
+ lg: string;
842
+ xl: string;
843
+ };
844
+ components: {
845
+ button: ButtonTheme;
846
+ message: MessageTheme;
847
+ modal: ModalTheme;
848
+ progress: ProgressTheme;
849
+ steps: StepsTheme;
850
+ input: InputTheme;
851
+ dropdown: DropdownTheme;
852
+ menu: MenuTheme;
853
+ datePicker: DatePickerTheme;
854
+ select: SelectTheme;
855
+ pagination: PaginationTheme;
856
+ tree: TreeTheme;
857
+ };
858
+ }
859
+ interface TreeTheme {
860
+ nodeSelectedBg: string;
861
+ nodeHoverBg: string;
862
+ nodeColor: string;
863
+ nodeSelectedColor: string;
864
+ switcherColor: string;
865
+ switcherHoverColor: string;
866
+ fontSize: string;
867
+ borderRadius: string;
868
+ indentSize: string;
869
+ }
870
+ interface SelectTheme {
871
+ borderRadius: string;
872
+ backgroundColor: string;
873
+ borderColor: string;
874
+ hoverBorderColor: string;
875
+ activeBorderColor: string;
876
+ placeholderColor: string;
877
+ optionSelectedBg: string;
878
+ optionHoverBg: string;
879
+ optionColor: string;
880
+ optionSelectedColor: string;
881
+ tagBg: string;
882
+ tagColor: string;
883
+ tagBorderColor: string;
884
+ padding: {
885
+ sm: string;
886
+ md: string;
887
+ lg: string;
888
+ };
889
+ fontSize: {
890
+ sm: string;
891
+ md: string;
892
+ lg: string;
893
+ };
894
+ }
895
+ interface DatePickerTheme {
896
+ cellWidth: string;
897
+ cellHeight: string;
898
+ cellPadding: string;
899
+ cellMargin: string;
900
+ cellFontSize: string;
901
+ cellBorderRadius: string;
902
+ headerPadding: string;
903
+ headerHeight: string;
904
+ headerFontSize: string;
905
+ weekDayFontSize: string;
906
+ cellActiveBg: string;
907
+ cellHoverBg: string;
908
+ cellColor: string;
909
+ cellActiveColor: string;
910
+ cellDisabledColor: string;
911
+ borderColor: string;
912
+ boxShadow: string;
913
+ zIndex: number;
914
+ }
915
+ interface PaginationTheme {
916
+ itemSize: string;
917
+ itemBg: string;
918
+ itemActiveBg: string;
919
+ itemBorderRadius: string;
920
+ itemColor: string;
921
+ itemActiveColor: string;
922
+ itemHoverBg: string;
923
+ itemHoverColor: string;
924
+ fontSize: string;
925
+ }
926
+ interface MenuTheme {
927
+ itemHoverBg: string;
928
+ itemColor: string;
929
+ itemHeight: string;
930
+ itemPadding: string;
931
+ fontSize: string;
932
+ borderRadius: string;
933
+ }
934
+ interface ButtonTheme {
935
+ padding: {
936
+ sm: string;
937
+ md: string;
938
+ };
939
+ fontSize: {
940
+ sm: string;
941
+ md: string;
942
+ lg: string;
943
+ };
944
+ borderRadius: {
945
+ sm: string;
946
+ md: string;
947
+ lg: string;
948
+ };
949
+ }
950
+ interface MessageTheme {
951
+ contentPadding: string;
952
+ borderRadius: string;
953
+ boxShadow: string;
954
+ zIndex: number;
955
+ }
956
+ interface ModalTheme {
957
+ maskColor: string;
958
+ contentBg: string;
959
+ borderRadius: string;
960
+ boxShadow: string;
961
+ headerPadding: string;
962
+ bodyPadding: string;
963
+ footerPadding: string;
964
+ zIndex: number;
965
+ }
966
+ interface ProgressTheme {
967
+ trackColor: string;
968
+ successColor: string;
969
+ errorColor: string;
970
+ warningColor: string;
971
+ infoColor: string;
972
+ fontSize: string;
973
+ }
974
+ interface StepsTheme {
975
+ descriptionColor: string;
976
+ titleColor: string;
977
+ subTitleColor: string;
978
+ waitIconColor: string;
979
+ processIconColor: string;
980
+ finishIconColor: string;
981
+ errorIconColor: string;
982
+ waitTitleColor: string;
983
+ processTitleColor: string;
984
+ finishTitleColor: string;
985
+ errorTitleColor: string;
986
+ waitDescriptionColor: string;
987
+ processDescriptionColor: string;
988
+ finishDescriptionColor: string;
989
+ errorDescriptionColor: string;
990
+ iconSize: string;
991
+ dotSize: string;
992
+ titleFontSize: string;
993
+ descriptionFontSize: string;
994
+ }
995
+ interface InputTheme {
996
+ padding: {
997
+ sm: string;
998
+ md: string;
999
+ lg: string;
1000
+ };
1001
+ fontSize: {
1002
+ sm: string;
1003
+ md: string;
1004
+ lg: string;
1005
+ };
1006
+ borderRadius: string;
1007
+ activeBorderColor: string;
1008
+ hoverBorderColor: string;
1009
+ }
1010
+ interface DropdownTheme {
1011
+ zIndex: number;
1012
+ backgroundColor: string;
1013
+ boxShadow: string;
1014
+ borderRadius: string;
1015
+ padding: string;
1016
+ }
1017
+ type ThemeMode = 'light' | 'dark';
1018
+ type DeepPartial<T> = {
1019
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
1020
+ };
1021
+
1022
+ interface ModalLocale {
1023
+ okText: string;
1024
+ cancelText: string;
1025
+ justOkText: string;
1026
+ }
1027
+ interface DatePickerLocale {
1028
+ monthBeforeYear?: boolean;
1029
+ yearFormat: string;
1030
+ monthFormat: string;
1031
+ quarterFormat: string;
1032
+ today: string;
1033
+ now: string;
1034
+ backToToday: string;
1035
+ ok: string;
1036
+ timeSelect: string;
1037
+ dateSelect: string;
1038
+ weekSelect: string;
1039
+ clear: string;
1040
+ month: string;
1041
+ year: string;
1042
+ previousMonth: string;
1043
+ nextMonth: string;
1044
+ monthSelect: string;
1045
+ yearSelect: string;
1046
+ decadeSelect: string;
1047
+ dayFormat: string;
1048
+ dateFormat: string;
1049
+ dateTimeFormat: string;
1050
+ previousYear: string;
1051
+ nextYear: string;
1052
+ previousDecade: string;
1053
+ nextDecade: string;
1054
+ previousCentury: string;
1055
+ nextCentury: string;
1056
+ shortWeekDays: string[];
1057
+ weekDays: string[];
1058
+ months: string[];
1059
+ shortMonths: string[];
1060
+ hour: string;
1061
+ minute: string;
1062
+ second: string;
1063
+ startDate: string;
1064
+ endDate: string;
1065
+ weekFormat: string;
1066
+ }
1067
+ interface PaginationLocale {
1068
+ items_per_page: string;
1069
+ jump_to: string;
1070
+ jump_to_confirm: string;
1071
+ page: string;
1072
+ prev_page: string;
1073
+ next_page: string;
1074
+ prev_5: string;
1075
+ next_5: string;
1076
+ prev_3: string;
1077
+ next_3: string;
1078
+ }
1079
+ interface Locale {
1080
+ locale: string;
1081
+ Modal: ModalLocale;
1082
+ DatePicker: DatePickerLocale;
1083
+ Pagination: PaginationLocale;
1084
+ }
1085
+ interface ThemeConfig {
1086
+ token?: DeepPartial<Theme>;
1087
+ light?: DeepPartial<Theme>;
1088
+ dark?: DeepPartial<Theme>;
1089
+ defaultMode?: ThemeMode;
1090
+ }
1091
+ interface ConfigProviderProps {
1092
+ /**
1093
+ * 国际化配置 (Locale)。
1094
+ * 包含 Modal, DatePicker, Pagination 等组件的语言包。
1095
+ */
1096
+ locale?: Locale;
1097
+ /**
1098
+ * 主题配置 (ThemeConfig)。
1099
+ * 可以配置全局 token、深色/浅色模式覆盖以及默认主题模式。
1100
+ */
1101
+ theme?: ThemeConfig;
1102
+ /**
1103
+ * 子元素
1104
+ */
1105
+ children?: React.ReactNode;
1106
+ }
1107
+
1108
+ declare const ConfigProvider: React__default.FC<ConfigProviderProps>;
1109
+
1110
+ interface InputNumberProps extends Omit<InputFieldProps, 'onChange' | 'value' | 'defaultValue' | 'type' | 'allowClear'> {
1111
+ /**
1112
+ * The current value.
1113
+ */
1114
+ value?: number | null;
1115
+ /**
1116
+ * The default value.
1117
+ */
1118
+ defaultValue?: number | null;
1119
+ /**
1120
+ * The minimum value.
1121
+ */
1122
+ min?: number;
1123
+ /**
1124
+ * The maximum value.
1125
+ */
1126
+ max?: number;
1127
+ /**
1128
+ * The step size for increment/decrement.
1129
+ * @default 1
1130
+ */
1131
+ step?: number;
1132
+ /**
1133
+ * Callback when the value changes.
1134
+ */
1135
+ onChange?: (value: number | null) => void;
1136
+ /**
1137
+ * Precision of the input value.
1138
+ */
1139
+ precision?: number;
1140
+ /**
1141
+ * Whether to show increment/decrement buttons.
1142
+ * @default true
1143
+ */
1144
+ controls?: boolean;
1145
+ /**
1146
+ * Whether to enable keyboard up/down keys.
1147
+ * @default true
1148
+ */
1149
+ keyboard?: boolean;
1150
+ }
1151
+
1152
+ declare const InputNumber: React__default.ForwardRefExoticComponent<InputNumberProps & React__default.RefAttributes<HTMLInputElement>>;
1153
+
1154
+ export { Button, type ButtonProps, ConfigProvider, type ConfigProviderProps, type DataNode, DatePicker, type DatePickerProps, type DateRangePickerProps, Dropdown, type DropdownProps, InputField, type InputFieldProps, InputNumber, type InputNumberProps, type ItemType, Menu, type MenuItemProps, type MenuProps, messageWithHook as Message, type MessageProps, ModalWithStatics as Modal, type ModalBaseProps as ModalProps, Pagination, type PaginationProps, Progress, type ProgressProps, Select, type SelectOption, type SelectProps, type SelectValue, Steps, type StepsProps, Tree, type TreeNodeProps, type TreeProps };