@xinghunm/compass-ui 0.6.0 → 0.7.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.
package/dist/index.d.mts CHANGED
@@ -1,23 +1,21 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { CSSProperties, ReactElement, ReactNode } from 'react';
3
- import { Placement } from '@floating-ui/react';
4
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { Placement } from '@floating-ui/react';
5
5
  import { RuleItem } from 'async-validator';
6
+ export { RuleItem } from 'async-validator';
6
7
 
7
8
  interface ButtonBaseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
8
9
  /** Whether to enable ripple effect */
9
10
  hasRipple?: boolean;
10
- /** Ripple background color */
11
- rippleBgColor?: string;
12
- /** Ripple opacity */
13
- rippleOpacity?: number;
11
+ children?: React.ReactNode;
14
12
  }
15
13
 
16
14
  interface ButtonProps extends ButtonBaseProps {
17
15
  /** Button type */
18
16
  variant?: 'primary' | 'default' | 'dashed' | 'text' | 'link';
19
17
  /** Button size */
20
- size?: 'small' | 'default' | 'large';
18
+ size?: 'small' | 'medium' | 'large';
21
19
  /** Button shape */
22
20
  shape?: 'default' | 'circle' | 'round';
23
21
  /** Whether the button is disabled */
@@ -30,6 +28,20 @@ interface ButtonProps extends ButtonBaseProps {
30
28
  block?: boolean;
31
29
  /** Button icon */
32
30
  icon?: React.ReactNode;
31
+ /** Custom class names for internal elements */
32
+ classNames?: {
33
+ root?: string;
34
+ icon?: string;
35
+ text?: string;
36
+ loading?: string;
37
+ };
38
+ /** Custom styles for internal elements */
39
+ styles?: {
40
+ root?: React.CSSProperties;
41
+ icon?: React.CSSProperties;
42
+ text?: React.CSSProperties;
43
+ loading?: React.CSSProperties;
44
+ };
33
45
  }
34
46
 
35
47
  declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
@@ -48,9 +60,7 @@ interface StepProps {
48
60
  status?: StepStatus;
49
61
  /** Disabled state */
50
62
  disabled?: boolean;
51
- /** Custom className */
52
63
  className?: string;
53
- /** Custom style */
54
64
  style?: React__default.CSSProperties;
55
65
  }
56
66
  interface StepsProps {
@@ -70,10 +80,40 @@ interface StepsProps {
70
80
  children?: React__default.ReactNode;
71
81
  /** Change handler */
72
82
  onChange?: (current: number) => void;
73
- /** Custom className */
83
+ /**
84
+ * Custom class name for root element
85
+ */
74
86
  className?: string;
75
- /** Custom style */
87
+ /**
88
+ * Custom style for root element
89
+ */
76
90
  style?: React__default.CSSProperties;
91
+ /**
92
+ * Granular styles
93
+ */
94
+ styles?: {
95
+ root?: React__default.CSSProperties;
96
+ item?: React__default.CSSProperties;
97
+ icon?: React__default.CSSProperties;
98
+ content?: React__default.CSSProperties;
99
+ title?: React__default.CSSProperties;
100
+ subtitle?: React__default.CSSProperties;
101
+ description?: React__default.CSSProperties;
102
+ tail?: React__default.CSSProperties;
103
+ };
104
+ /**
105
+ * Granular class names
106
+ */
107
+ classNames?: {
108
+ root?: string;
109
+ item?: string;
110
+ icon?: string;
111
+ content?: string;
112
+ title?: string;
113
+ subtitle?: string;
114
+ description?: string;
115
+ tail?: string;
116
+ };
77
117
  }
78
118
 
79
119
  declare const Step: React__default.FC<StepProps>;
@@ -81,6 +121,156 @@ declare const Steps: React__default.FC<StepsProps> & {
81
121
  Step: typeof Step;
82
122
  };
83
123
 
124
+ interface PaginationProps {
125
+ /** Current page number */
126
+ current?: number;
127
+ /** Default initial page number */
128
+ defaultCurrent?: number;
129
+ /** Total number of data items */
130
+ total?: number;
131
+ /** Number of data items per page */
132
+ pageSize?: number;
133
+ /** Default number of data items per page */
134
+ defaultPageSize?: number;
135
+ /** Callback executed when page number or pageSize is changed */
136
+ onChange?: (page: number, pageSize: number) => void;
137
+ /** Disable pagination */
138
+ disabled?: boolean;
139
+ /** Determine whether to show the size changer */
140
+ showSizeChanger?: boolean;
141
+ /** Specify the size changer options */
142
+ pageSizeOptions?: number[];
143
+ /** Determine whether you can jump to pages directly */
144
+ showQuickJumper?: boolean;
145
+ /** To display the total number and range */
146
+ showTotal?: (total: number, range: [number, number]) => React.ReactNode;
147
+ /** Specify the alignment of total text */
148
+ totalAlign?: 'left' | 'right';
149
+ /** Whether to use simple mode */
150
+ simple?: boolean;
151
+ /** Specify the size of pagination component */
152
+ size?: 'default' | 'small';
153
+ /** Custom class name */
154
+ className?: string;
155
+ /** Custom style */
156
+ style?: React.CSSProperties;
157
+ /**
158
+ * Granular styles
159
+ */
160
+ styles?: {
161
+ root?: React.CSSProperties;
162
+ item?: React.CSSProperties;
163
+ activeItem?: React.CSSProperties;
164
+ jumpItem?: React.CSSProperties;
165
+ options?: React.CSSProperties;
166
+ total?: React.CSSProperties;
167
+ };
168
+ /**
169
+ * Granular class names
170
+ */
171
+ classNames?: {
172
+ root?: string;
173
+ item?: string;
174
+ activeItem?: string;
175
+ jumpItem?: string;
176
+ options?: string;
177
+ total?: string;
178
+ };
179
+ }
180
+
181
+ declare const Pagination: React__default.FC<PaginationProps>;
182
+
183
+ interface ColumnType<T = unknown> {
184
+ /** Column title */
185
+ title: React__default.ReactNode;
186
+ /** Unique key for column */
187
+ key?: React__default.Key;
188
+ /** Field name to get value from record */
189
+ dataIndex?: keyof T;
190
+ /** Render function */
191
+ render?: (value: any, record: T, index: number) => React__default.ReactNode;
192
+ /** Column alignment */
193
+ align?: 'left' | 'center' | 'right';
194
+ /** Column width */
195
+ width?: string | number;
196
+ /** Fixed column */
197
+ fixed?: 'left' | 'right' | boolean;
198
+ /** Sorter function */
199
+ sorter?: (a: T, b: T) => number;
200
+ }
201
+ interface RowSelection<T> {
202
+ /** Selected row keys */
203
+ selectedRowKeys?: React__default.Key[];
204
+ /** Callback when selection changes */
205
+ onChange?: (selectedRowKeys: React__default.Key[], selectedRows: T[]) => void;
206
+ }
207
+ interface TableProps<T = unknown> {
208
+ /** Data source array */
209
+ dataSource: T[];
210
+ /** Columns configuration */
211
+ columns: ColumnType<T>[];
212
+ /**
213
+ * Row's unique key
214
+ * @default 'key'
215
+ */
216
+ rowKey?: string | ((record: T) => string);
217
+ /** Whether to show border */
218
+ bordered?: boolean;
219
+ /** Table size */
220
+ size?: 'small' | 'medium' | 'large';
221
+ /** Loading status */
222
+ loading?: boolean;
223
+ /** Custom loading indicator */
224
+ loadingIndicator?: React__default.ReactNode;
225
+ /** Pagination config, set false to hide */
226
+ pagination?: PaginationProps | false;
227
+ /** Row selection config */
228
+ rowSelection?: RowSelection<T>;
229
+ /** Empty text */
230
+ emptyText?: React__default.ReactNode;
231
+ /** Scroll config */
232
+ scroll?: {
233
+ x?: string | number;
234
+ y?: string | number;
235
+ };
236
+ /** Set header row properties */
237
+ onHeaderRow?: (columns: ColumnType<T>[], index?: number) => React__default.HTMLAttributes<HTMLTableRowElement>;
238
+ /** Set row properties */
239
+ onRow?: (record: T, index?: number) => React__default.HTMLAttributes<HTMLTableRowElement>;
240
+ /** Custom class name */
241
+ className?: string;
242
+ /** Custom style */
243
+ style?: React__default.CSSProperties;
244
+ /** Granular styles */
245
+ styles?: {
246
+ root?: React__default.CSSProperties;
247
+ table?: React__default.CSSProperties;
248
+ thead?: React__default.CSSProperties;
249
+ tbody?: React__default.CSSProperties;
250
+ tr?: React__default.CSSProperties;
251
+ th?: React__default.CSSProperties;
252
+ td?: React__default.CSSProperties;
253
+ pagination?: React__default.CSSProperties;
254
+ empty?: React__default.CSSProperties;
255
+ loadingOverlay?: React__default.CSSProperties;
256
+ };
257
+ /** Granular class names */
258
+ classNames?: {
259
+ root?: string;
260
+ table?: string;
261
+ thead?: string;
262
+ tbody?: string;
263
+ tr?: string;
264
+ th?: string;
265
+ td?: string;
266
+ pagination?: string;
267
+ empty?: string;
268
+ loadingOverlay?: string;
269
+ };
270
+ }
271
+
272
+ declare function Table<T = unknown>(props: TableProps<T>): react_jsx_runtime.JSX.Element;
273
+
84
274
  interface DataNode {
85
275
  key: string | number;
86
276
  title?: React__default.ReactNode;
@@ -90,7 +280,8 @@ interface DataNode {
90
280
  checkable?: boolean;
91
281
  icon?: React__default.ReactNode;
92
282
  isLeaf?: boolean;
93
- [key: string]: unknown;
283
+ /** Additional custom data fields */
284
+ extraData?: Record<string, unknown>;
94
285
  }
95
286
  interface TreeProps {
96
287
  /** Tree data */
@@ -138,18 +329,46 @@ interface TreeProps {
138
329
  }) => React__default.ReactNode);
139
330
  /** Custom title render */
140
331
  titleRender?: (node: DataNode) => React__default.ReactNode;
332
+ /** Whether to expand node on click */
333
+ expandOnClick?: boolean;
141
334
  /** Virtual scroll height */
142
335
  height?: number;
143
336
  /** Virtual scroll item height */
144
337
  itemHeight?: number;
145
338
  /** Enable virtual scrolling */
146
339
  virtual?: boolean;
147
- /** Virtual List props */
148
- virtualListProps?: Record<string, unknown>;
149
- /** Class name */
340
+ /**
341
+ * Custom class name for root element
342
+ */
150
343
  className?: string;
151
- /** Style */
344
+ /**
345
+ * Custom style for root element
346
+ */
152
347
  style?: React__default.CSSProperties;
348
+ /**
349
+ * Granular styles
350
+ */
351
+ styles?: {
352
+ root?: React__default.CSSProperties;
353
+ node?: React__default.CSSProperties;
354
+ content?: React__default.CSSProperties;
355
+ switcher?: React__default.CSSProperties;
356
+ checkbox?: React__default.CSSProperties;
357
+ icon?: React__default.CSSProperties;
358
+ title?: React__default.CSSProperties;
359
+ };
360
+ /**
361
+ * Granular class names
362
+ */
363
+ classNames?: {
364
+ root?: string;
365
+ node?: string;
366
+ content?: string;
367
+ switcher?: string;
368
+ checkbox?: string;
369
+ icon?: string;
370
+ title?: string;
371
+ };
153
372
  }
154
373
  interface TreeNodeProps extends Omit<DataNode, 'children'> {
155
374
  eventKey: string | number;
@@ -173,6 +392,9 @@ interface TreeNodeProps extends Omit<DataNode, 'children'> {
173
392
  showIcon?: boolean;
174
393
  isLast?: boolean;
175
394
  indentLines?: boolean[];
395
+ hasTitleRender?: boolean;
396
+ styles?: TreeProps['styles'];
397
+ classNames?: TreeProps['classNames'];
176
398
  }
177
399
 
178
400
  declare const Tree: React$1.FC<TreeProps>;
@@ -182,7 +404,6 @@ interface SelectOption {
182
404
  label: React__default.ReactNode;
183
405
  value: string | number;
184
406
  disabled?: boolean;
185
- [key: string]: unknown;
186
407
  }
187
408
  interface SelectProps {
188
409
  /**
@@ -229,14 +450,6 @@ interface SelectProps {
229
450
  * Whether to allow clearing the selection
230
451
  */
231
452
  allowClear?: boolean;
232
- /**
233
- * Custom class name
234
- */
235
- className?: string;
236
- /**
237
- * Custom style
238
- */
239
- style?: React__default.CSSProperties;
240
453
  /**
241
454
  * Size of the select input
242
455
  * @default 'medium'
@@ -263,6 +476,45 @@ interface SelectProps {
263
476
  * @default 'click'
264
477
  */
265
478
  trigger?: 'click' | 'hover';
479
+ /** Custom class name */
480
+ className?: string;
481
+ /** Custom style */
482
+ style?: React__default.CSSProperties;
483
+ /**
484
+ * Granular styles for internal components
485
+ */
486
+ styles?: {
487
+ root?: React__default.CSSProperties;
488
+ trigger?: React__default.CSSProperties;
489
+ dropdown?: React__default.CSSProperties;
490
+ option?: React__default.CSSProperties;
491
+ tag?: React__default.CSSProperties;
492
+ };
493
+ /**
494
+ * Granular class names for internal components
495
+ */
496
+ classNames?: {
497
+ root?: string;
498
+ trigger?: string;
499
+ dropdown?: string;
500
+ option?: string;
501
+ tag?: string;
502
+ };
503
+ /**
504
+ * Custom option renderer
505
+ */
506
+ optionRender?: (option: SelectOption, info: {
507
+ index: number;
508
+ selected: boolean;
509
+ }) => React__default.ReactNode;
510
+ /**
511
+ * Custom label renderer (for the selected value in the trigger)
512
+ */
513
+ labelRender?: (props: SelectOption) => React__default.ReactNode;
514
+ /**
515
+ * Custom selected icon in the dropdown menu
516
+ */
517
+ menuItemSelectedIcon?: React__default.ReactNode;
266
518
  }
267
519
  interface OptionProps {
268
520
  value: string | number;
@@ -270,6 +522,7 @@ interface OptionProps {
270
522
  disabled?: boolean;
271
523
  className?: string;
272
524
  style?: React__default.CSSProperties;
525
+ menuItemSelectedIcon?: React__default.ReactNode;
273
526
  /**
274
527
  * Internal prop to pass label if children is complex
275
528
  */
@@ -322,6 +575,18 @@ interface TreeSelectProps extends Omit<SelectProps, 'options' | 'onChange'> {
322
575
  switcherIcon?: React__default.ReactNode | ((props: {
323
576
  expanded: boolean;
324
577
  }) => React__default.ReactNode);
578
+ /**
579
+ * Only allow selecting leaf nodes
580
+ */
581
+ onlyLeafSelect?: boolean;
582
+ /**
583
+ * Custom className
584
+ */
585
+ className?: string;
586
+ /**
587
+ * Custom style
588
+ */
589
+ style?: React__default.CSSProperties;
325
590
  }
326
591
 
327
592
  declare const TreeSelect: React__default.FC<TreeSelectProps>;
@@ -393,6 +658,24 @@ interface MenuProps {
393
658
  * Select handler
394
659
  */
395
660
  onSelect?: (keys: (string | number)[]) => void;
661
+ /**
662
+ * Granular styles
663
+ */
664
+ styles?: {
665
+ root?: React__default.CSSProperties;
666
+ item?: React__default.CSSProperties;
667
+ icon?: React__default.CSSProperties;
668
+ content?: React__default.CSSProperties;
669
+ };
670
+ /**
671
+ * Granular class names
672
+ */
673
+ classNames?: {
674
+ root?: string;
675
+ item?: string;
676
+ icon?: string;
677
+ content?: string;
678
+ };
396
679
  }
397
680
  interface MenuItemProps {
398
681
  /**
@@ -415,6 +698,10 @@ interface MenuItemProps {
415
698
  * Danger state
416
699
  */
417
700
  danger?: boolean;
701
+ /**
702
+ * Unique key for event handling
703
+ */
704
+ eventKey?: string | number;
418
705
  /**
419
706
  * Custom class name
420
707
  */
@@ -423,17 +710,18 @@ interface MenuItemProps {
423
710
  * Custom style
424
711
  */
425
712
  style?: React__default.CSSProperties;
426
- /**
427
- * Unique key for event handling
428
- */
429
- eventKey?: string | number;
430
713
  }
431
714
 
432
- declare const Menu: React__default.FC<MenuProps> & {
715
+ declare const InternalMenu: React__default.ForwardRefExoticComponent<MenuProps & React__default.RefAttributes<HTMLUListElement>>;
716
+ declare const MenuItem: React__default.ForwardRefExoticComponent<MenuItemProps & React__default.RefAttributes<HTMLLIElement>>;
717
+ type MenuComponent = typeof InternalMenu & {
433
718
  Item: typeof MenuItem;
434
719
  };
435
- declare const MenuItem: React__default.FC<MenuItemProps>;
720
+ declare const Menu: MenuComponent;
436
721
 
722
+ /**
723
+ * Dropdown component properties
724
+ */
437
725
  interface DropdownProps {
438
726
  /**
439
727
  * Trigger mode
@@ -470,13 +758,43 @@ interface DropdownProps {
470
758
  */
471
759
  disabled?: boolean;
472
760
  /**
473
- * Custom class name
761
+ * Custom root element class name
474
762
  */
475
763
  className?: string;
476
764
  /**
477
- * Custom style
765
+ * Custom root element style
478
766
  */
479
767
  style?: React__default.CSSProperties;
768
+ /**
769
+ * Custom overlay element class name
770
+ */
771
+ overlayClassName?: string;
772
+ /**
773
+ * Custom overlay element style
774
+ */
775
+ overlayStyle?: React__default.CSSProperties;
776
+ /**
777
+ * Semantic class names for internal elements
778
+ */
779
+ classNames?: {
780
+ /** Class name for the trigger element */
781
+ trigger?: string;
782
+ /** Class name for the overlay container */
783
+ overlay?: string;
784
+ /** Class name for the content wrapper */
785
+ content?: string;
786
+ };
787
+ /**
788
+ * Semantic styles for internal elements
789
+ */
790
+ styles?: {
791
+ /** Style for the trigger element */
792
+ trigger?: React__default.CSSProperties;
793
+ /** Style for the overlay container */
794
+ overlay?: React__default.CSSProperties;
795
+ /** Style for the content wrapper */
796
+ content?: React__default.CSSProperties;
797
+ };
480
798
  /**
481
799
  * Whether to close the dropdown when a menu item is selected
482
800
  * @default true
@@ -492,20 +810,9 @@ interface InputFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLIn
492
810
  * @default 'text'
493
811
  */
494
812
  type?: 'text' | 'password' | 'search';
495
- /**
496
- * The label content.
497
- */
498
- label?: React__default.ReactNode;
499
- /**
500
- * The error content.
501
- */
502
- error?: boolean | React__default.ReactNode;
503
- /**
504
- * The helper text content.
505
- */
506
- helperText?: React__default.ReactNode;
507
813
  /**
508
814
  * If `true`, the input will take up the full width of its container.
815
+ * @default false
509
816
  */
510
817
  fullWidth?: boolean;
511
818
  /**
@@ -518,6 +825,7 @@ interface InputFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLIn
518
825
  suffix?: React__default.ReactNode;
519
826
  /**
520
827
  * If `true`, a clear icon will appear when the input has value.
828
+ * @default false
521
829
  */
522
830
  allowClear?: boolean;
523
831
  /**
@@ -537,6 +845,40 @@ interface InputFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLIn
537
845
  * The callback function that is triggered when Enter key is pressed.
538
846
  */
539
847
  onPressEnter?: (event: React__default.KeyboardEvent<HTMLInputElement>) => void;
848
+ /**
849
+ * The validation status.
850
+ */
851
+ status?: 'error' | 'warning';
852
+ /**
853
+ * Semantic class names for internal elements
854
+ */
855
+ classNames?: {
856
+ /** Class name for the root element */
857
+ root?: string;
858
+ /** Class name for the input element */
859
+ input?: string;
860
+ /** Class name for the prefix element */
861
+ prefix?: string;
862
+ /** Class name for the suffix element */
863
+ suffix?: string;
864
+ /** Class name for the clear button */
865
+ clear?: string;
866
+ };
867
+ /**
868
+ * Semantic styles for internal elements
869
+ */
870
+ styles?: {
871
+ /** Style for the root element */
872
+ root?: React__default.CSSProperties;
873
+ /** Style for the input element */
874
+ input?: React__default.CSSProperties;
875
+ /** Style for the prefix element */
876
+ prefix?: React__default.CSSProperties;
877
+ /** Style for the suffix element */
878
+ suffix?: React__default.CSSProperties;
879
+ /** Style for the clear button */
880
+ clear?: React__default.CSSProperties;
881
+ };
540
882
  }
541
883
 
542
884
  /**
@@ -544,6 +886,77 @@ interface InputFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLIn
544
886
  */
545
887
  declare const InputField: React__default.ForwardRefExoticComponent<InputFieldProps & React__default.RefAttributes<HTMLInputElement>>;
546
888
 
889
+ interface AutoCompleteOption {
890
+ /** The value of the option */
891
+ value: string;
892
+ /** The label to display for the option */
893
+ label?: React__default.ReactNode;
894
+ /** Whether the option is disabled */
895
+ disabled?: boolean;
896
+ /** Allow additional custom fields */
897
+ [key: string]: unknown;
898
+ }
899
+ interface AutoCompleteProps extends Omit<InputFieldProps, 'onChange' | 'onSelect'> {
900
+ /**
901
+ * Current value of the input
902
+ */
903
+ value?: string;
904
+ /**
905
+ * Default value of the input
906
+ */
907
+ defaultValue?: string;
908
+ /**
909
+ * Data source for suggestions
910
+ */
911
+ options?: AutoCompleteOption[];
912
+ /**
913
+ * Callback when searching (search value change)
914
+ */
915
+ onSearch?: (value: string) => void;
916
+ /**
917
+ * Callback when selecting an option
918
+ */
919
+ onSelect?: (value: string, option: AutoCompleteOption) => void;
920
+ /**
921
+ * Callback when input value changes
922
+ */
923
+ onChange?: (value: string) => void;
924
+ /**
925
+ * Custom filter function or true to filter by label
926
+ * default: true
927
+ */
928
+ filterOption?: boolean | ((inputValue: string, option: AutoCompleteOption) => boolean);
929
+ /**
930
+ * Whether the dropdown width should match the input width
931
+ * default: true
932
+ */
933
+ dropdownMatchSelectWidth?: boolean | number;
934
+ /**
935
+ * Content to show when no options match
936
+ */
937
+ notFoundContent?: React__default.ReactNode;
938
+ /**
939
+ * Semantic DOM class names
940
+ */
941
+ classNames?: {
942
+ root?: string;
943
+ input?: string;
944
+ dropdown?: string;
945
+ option?: string;
946
+ };
947
+ /**
948
+ * Semantic DOM styles
949
+ */
950
+ styles?: {
951
+ root?: React__default.CSSProperties;
952
+ input?: React__default.CSSProperties;
953
+ dropdown?: React__default.CSSProperties;
954
+ option?: React__default.CSSProperties;
955
+ };
956
+ }
957
+
958
+ declare const AutoComplete: React__default.FC<AutoCompleteProps>;
959
+
547
960
  type MessageType$1 = 'info' | 'success' | 'error' | 'warning' | 'loading';
548
961
  interface MessageProps {
549
962
  key?: string;
@@ -603,6 +1016,8 @@ interface ModalBaseProps {
603
1016
  style?: CSSProperties;
604
1017
  /** Modal title */
605
1018
  title?: React__default.ReactNode;
1019
+ /** Custom header content */
1020
+ header?: React__default.ReactNode;
606
1021
  /** Whether to show the close button */
607
1022
  closable?: boolean;
608
1023
  /** Width of the modal */
@@ -618,7 +1033,26 @@ interface ModalBaseProps {
618
1033
  /** Whether the OK button is loading */
619
1034
  confirmLoading?: boolean;
620
1035
  /** Callback when the modal is completely closed (after animation) */
1036
+ /** Callback when the modal is completely closed (after animation) */
621
1037
  afterClose?: () => void;
1038
+ /** Granular styles */
1039
+ styles?: {
1040
+ root?: React__default.CSSProperties;
1041
+ mask?: React__default.CSSProperties;
1042
+ content?: React__default.CSSProperties;
1043
+ header?: React__default.CSSProperties;
1044
+ body?: React__default.CSSProperties;
1045
+ footer?: React__default.CSSProperties;
1046
+ };
1047
+ /** Granular class names */
1048
+ classNames?: {
1049
+ root?: string;
1050
+ mask?: string;
1051
+ content?: string;
1052
+ header?: string;
1053
+ body?: string;
1054
+ footer?: string;
1055
+ };
622
1056
  }
623
1057
 
624
1058
  declare const Modal: (props: ModalBaseProps) => React__default.ReactPortal;
@@ -724,51 +1158,26 @@ interface ProgressProps {
724
1158
  */
725
1159
  declare const Progress: React__default.ForwardRefExoticComponent<ProgressProps & React__default.RefAttributes<HTMLDivElement>>;
726
1160
 
727
- interface PaginationProps {
728
- /** Current page number */
729
- current?: number;
730
- /** Default initial page number */
731
- defaultCurrent?: number;
732
- /** Total number of data items */
733
- total?: number;
734
- /** Number of data items per page */
735
- pageSize?: number;
736
- /** Default number of data items per page */
737
- defaultPageSize?: number;
738
- /** Callback executed when page number or pageSize is changed */
739
- onChange?: (page: number, pageSize: number) => void;
740
- /** Disable pagination */
741
- disabled?: boolean;
742
- /** Determine whether to show the size changer */
743
- showSizeChanger?: boolean;
744
- /** Specify the size changer options */
745
- pageSizeOptions?: number[];
746
- /** Determine whether you can jump to pages directly */
747
- showQuickJumper?: boolean;
748
- /** To display the total number and range */
749
- showTotal?: (total: number, range: [number, number]) => React.ReactNode;
750
- /** Specify the alignment of total text */
751
- totalAlign?: 'left' | 'right';
752
- /** Whether to use simple mode */
753
- simple?: boolean;
754
- /** Specify the size of pagination component */
755
- size?: 'default' | 'small';
756
- /** Custom class name */
757
- className?: string;
758
- /** Custom style */
759
- style?: React.CSSProperties;
760
- }
761
-
762
- declare const Pagination: React__default.FC<PaginationProps>;
763
-
764
1161
  type DatePickerMode = 'date' | 'week' | 'month' | 'quarter' | 'year';
765
- interface DatePickerProps {
766
- /** Selected date (JS Date) */
767
- value?: Date | null;
768
- /** Default selected date (JS Date) (Only effective on mount) */
769
- defaultValue?: Date | null;
770
- /** Callback when date changes */
771
- onChange?: (date: Date | null) => void;
1162
+ interface DatePickerStyles {
1163
+ root?: React.CSSProperties;
1164
+ input?: React.CSSProperties;
1165
+ popup?: React.CSSProperties;
1166
+ header?: React.CSSProperties;
1167
+ body?: React.CSSProperties;
1168
+ footer?: React.CSSProperties;
1169
+ day?: React.CSSProperties;
1170
+ }
1171
+ interface DatePickerClassNames {
1172
+ root?: string;
1173
+ input?: string;
1174
+ popup?: string;
1175
+ header?: string;
1176
+ body?: string;
1177
+ footer?: string;
1178
+ day?: string;
1179
+ }
1180
+ interface DatePickerSharedProps {
772
1181
  /** Picker mode */
773
1182
  picker?: DatePickerMode;
774
1183
  /** Whether to show time picker */
@@ -777,8 +1186,6 @@ interface DatePickerProps {
777
1186
  format?: string;
778
1187
  /** Disabled state */
779
1188
  disabled?: boolean;
780
- /** Placeholder text */
781
- placeholder?: string;
782
1189
  /** Clearable */
783
1190
  clearable?: boolean;
784
1191
  /** Custom class name */
@@ -787,32 +1194,36 @@ interface DatePickerProps {
787
1194
  style?: React.CSSProperties;
788
1195
  /** Whether the picker should take up the full width of its container */
789
1196
  fullWidth?: boolean;
1197
+ /** Validation status */
1198
+ status?: 'error' | 'warning';
1199
+ /**
1200
+ * Granular styles for internal components
1201
+ */
1202
+ styles?: DatePickerStyles;
1203
+ /**
1204
+ * Granular class names for internal components
1205
+ */
1206
+ classNames?: DatePickerClassNames;
1207
+ }
1208
+ interface DatePickerProps extends DatePickerSharedProps {
1209
+ /** Selected date (JS Date) */
1210
+ value?: Date | null;
1211
+ /** Default selected date (JS Date) (Only effective on mount) */
1212
+ defaultValue?: Date | null;
1213
+ /** Callback when date changes */
1214
+ onChange?: (date: Date | null) => void;
1215
+ /** Placeholder text */
1216
+ placeholder?: string;
790
1217
  }
791
- interface DateRangePickerProps {
1218
+ interface DateRangePickerProps extends DatePickerSharedProps {
792
1219
  /** Selected date range */
793
1220
  value?: [Date | null, Date | null];
794
1221
  /** Default selected date range */
795
1222
  defaultValue?: [Date | null, Date | null];
796
1223
  /** Callback when date range changes */
797
1224
  onChange?: (dates: [Date | null, Date | null]) => void;
798
- /** Picker mode */
799
- picker?: DatePickerMode;
800
- /** Whether to show time picker */
801
- showTime?: boolean;
802
- /** Date format string */
803
- format?: string;
804
- /** Disabled state */
805
- disabled?: boolean;
806
1225
  /** Placeholder text */
807
1226
  placeholder?: [string, string];
808
- /** Clearable */
809
- clearable?: boolean;
810
- /** Custom class name */
811
- className?: string;
812
- /** Custom style */
813
- style?: React.CSSProperties;
814
- /** Whether the picker should take up the full width of its container */
815
- fullWidth?: boolean;
816
1227
  }
817
1228
 
818
1229
  declare const DatePicker$1: React__default.ForwardRefExoticComponent<DatePickerProps & React__default.RefAttributes<HTMLDivElement>>;
@@ -828,8 +1239,8 @@ declare const DatePicker: DatePickerInterface;
828
1239
  interface Theme {
829
1240
  colors: {
830
1241
  primary: string;
831
- primaryHover: string;
832
- primaryActive: string;
1242
+ primaryHover?: string;
1243
+ primaryActive?: string;
833
1244
  success: string;
834
1245
  warning: string;
835
1246
  error: string;
@@ -841,9 +1252,11 @@ interface Theme {
841
1252
  background: string;
842
1253
  backgroundSecondary: string;
843
1254
  backgroundTertiary: string;
1255
+ backgroundHover: string;
844
1256
  border: string;
845
1257
  borderSecondary: string;
846
1258
  borderHover: string;
1259
+ white: string;
847
1260
  };
848
1261
  spacing: {
849
1262
  xs: number;
@@ -913,8 +1326,18 @@ interface Theme {
913
1326
  tree: TreeTheme;
914
1327
  form: FormTheme;
915
1328
  tabs: TabsTheme;
1329
+ table: TableTheme;
916
1330
  };
917
1331
  }
1332
+ interface TableTheme {
1333
+ headerBg: string;
1334
+ headerColor: string;
1335
+ rowHoverBg: string;
1336
+ borderColor: string;
1337
+ bodyBg: string;
1338
+ color: string;
1339
+ cellPadding: string;
1340
+ }
918
1341
  interface FormTheme {
919
1342
  itemMarginBottom: string;
920
1343
  labelColor: string;
@@ -1031,9 +1454,12 @@ interface ButtonTheme {
1031
1454
  md: string;
1032
1455
  lg: string;
1033
1456
  };
1457
+ rippleOpacity: number;
1034
1458
  }
1035
1459
  interface MessageTheme {
1036
1460
  contentPadding: string;
1461
+ contentBg: string;
1462
+ contentColor: string;
1037
1463
  borderRadius: string;
1038
1464
  boxShadow: string;
1039
1465
  zIndex: number;
@@ -1047,6 +1473,7 @@ interface ModalTheme {
1047
1473
  bodyPadding: string;
1048
1474
  footerPadding: string;
1049
1475
  zIndex: number;
1476
+ padding: string;
1050
1477
  }
1051
1478
  interface ProgressTheme {
1052
1479
  trackColor: string;
@@ -1172,6 +1599,8 @@ interface ThemeConfig {
1172
1599
  light?: DeepPartial<Theme>;
1173
1600
  dark?: DeepPartial<Theme>;
1174
1601
  defaultMode?: ThemeMode;
1602
+ /** Whether to inject CSS variables to :root. */
1603
+ global?: boolean;
1175
1604
  }
1176
1605
  interface ConfigProviderProps {
1177
1606
  /**
@@ -1232,14 +1661,40 @@ interface InputNumberProps extends Omit<InputFieldProps, 'onChange' | 'value' |
1232
1661
  * @default true
1233
1662
  */
1234
1663
  keyboard?: boolean;
1664
+ /**
1665
+ * Semantic class names for internal elements
1666
+ */
1667
+ classNames?: {
1668
+ root?: string;
1669
+ input?: string;
1670
+ inputWrapper?: string;
1671
+ prefix?: string;
1672
+ suffix?: string;
1673
+ upHandler?: string;
1674
+ downHandler?: string;
1675
+ };
1676
+ /**
1677
+ * Semantic styles for internal elements
1678
+ */
1679
+ styles?: {
1680
+ root?: React.CSSProperties;
1681
+ input?: React.CSSProperties;
1682
+ inputWrapper?: React.CSSProperties;
1683
+ prefix?: React.CSSProperties;
1684
+ suffix?: React.CSSProperties;
1685
+ upHandler?: React.CSSProperties;
1686
+ downHandler?: React.CSSProperties;
1687
+ };
1235
1688
  }
1236
1689
 
1237
1690
  declare const InputNumber: React__default.ForwardRefExoticComponent<InputNumberProps & React__default.RefAttributes<HTMLInputElement>>;
1238
1691
 
1692
+ type InternalNamePath = (string | number)[];
1693
+ type NamePath = string | number | InternalNamePath;
1239
1694
  type StoreValue = unknown;
1240
1695
  type Store = Record<string, StoreValue>;
1241
1696
  interface FieldData {
1242
- name: string;
1697
+ name: InternalNamePath;
1243
1698
  value?: StoreValue;
1244
1699
  touched?: boolean;
1245
1700
  validating?: boolean;
@@ -1253,16 +1708,11 @@ interface FieldEntity {
1253
1708
  validateRules: (options?: {
1254
1709
  triggerName?: string;
1255
1710
  }) => Promise<string[] | null>;
1256
- getName: () => string;
1711
+ getNamePath: () => InternalNamePath;
1257
1712
  getErrors: () => string[];
1258
1713
  isFieldValidating: () => boolean;
1259
1714
  isFieldTouched: () => boolean;
1260
- props: {
1261
- name?: string;
1262
- rules?: RuleItem[];
1263
- dependencies?: string[];
1264
- initialValue?: unknown;
1265
- };
1715
+ props: FormItemProps;
1266
1716
  setErrors: (errors: string[]) => void;
1267
1717
  }
1268
1718
  interface Callbacks<Values = Record<string, unknown>> {
@@ -1274,72 +1724,122 @@ interface Callbacks<Values = Record<string, unknown>> {
1274
1724
  interface ValidateErrorEntity<Values = Record<string, unknown>> {
1275
1725
  values: Values;
1276
1726
  errorFields: {
1277
- name: string;
1727
+ name: InternalNamePath;
1278
1728
  errors: string[];
1279
1729
  }[];
1280
1730
  outOfDate: boolean;
1281
1731
  }
1282
1732
  interface InternalHooks {
1283
1733
  registerField: (entity: FieldEntity) => () => void;
1284
- registerWatch: (callback: (name: string) => void) => () => void;
1734
+ registerWatch: (callback: (namePath: InternalNamePath) => void) => () => void;
1285
1735
  setInitialValues: (values: Store, init: boolean) => void;
1286
1736
  setCallbacks: (callbacks: Callbacks) => void;
1287
1737
  dispatch: (action: ReducerAction) => void;
1288
- getFieldValue: (name: string) => StoreValue;
1289
- notifyFieldChange: (name: string) => void;
1738
+ getFieldValue: (name: NamePath) => StoreValue;
1739
+ notifyFieldChange: (name: InternalNamePath) => void;
1290
1740
  }
1291
1741
  interface FormInstance<Values = Record<string, unknown>> {
1292
- getFieldValue: (name: string) => StoreValue;
1742
+ getFieldValue: (name: NamePath) => StoreValue;
1293
1743
  getFieldsValue: () => Values;
1294
- getFieldError: (name: string) => string[];
1295
- isFieldsTouched: (nameList?: string[]) => boolean;
1296
- isFieldTouched: (name: string) => boolean;
1297
- isFieldValidating: (name: string) => boolean;
1298
- resetFields: (fields?: string[]) => void;
1744
+ getFieldError: (name: NamePath) => string[];
1745
+ isFieldsTouched: (nameList?: NamePath[]) => boolean;
1746
+ isFieldTouched: (name: NamePath) => boolean;
1747
+ isFieldValidating: (name: NamePath) => boolean;
1748
+ resetFields: (fields?: NamePath[]) => void;
1299
1749
  setFields: (fields: FieldData[]) => void;
1300
- setFieldValue: (name: string, value: unknown) => void;
1750
+ setFieldValue: (name: NamePath, value: unknown) => void;
1301
1751
  setFieldsValue: (values: RecursivePartial<Values>) => void;
1302
- validateFields: (nameList?: string[]) => Promise<Values>;
1752
+ validateFields: (nameList?: NamePath[]) => Promise<Values>;
1303
1753
  submit: () => void;
1304
1754
  getInternalHooks: (secret: string) => InternalHooks | null;
1305
1755
  }
1306
- type RecursivePartial<T> = {
1307
- [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
1308
- };
1309
- interface ReducerAction {
1310
- type: string;
1311
- payload: unknown;
1312
- }
1313
-
1756
+ /**
1757
+ * Form properties
1758
+ */
1314
1759
  interface FormProps<Values = Record<string, unknown>> {
1760
+ /** Form instance */
1315
1761
  form?: FormInstance<Values>;
1762
+ /** Form layout */
1763
+ layout?: 'horizontal' | 'vertical' | 'inline';
1764
+ /** Initial values for the form */
1316
1765
  initialValues?: Store;
1766
+ /** Form items and other content */
1317
1767
  children?: ReactNode;
1768
+ /** Callback triggered after successfully submitting the form and validation */
1318
1769
  onFinish?: (values: Values) => void;
1770
+ /** Callback triggered after submitting the form and validation fails */
1319
1771
  onFinishFailed?: (errorInfo: ValidateErrorEntity<Values>) => void;
1772
+ /** Callback triggered when any field value changes */
1320
1773
  onValuesChange?: (changedValues: Store, values: Values) => void;
1774
+ /** Callback triggered when any field state changes */
1321
1775
  onFieldsChange?: (changedFields: FieldData[], allFields: FieldData[]) => void;
1776
+ /** Custom root element class name */
1322
1777
  className?: string;
1778
+ /** Custom root element style */
1323
1779
  style?: React__default.CSSProperties;
1780
+ /** Semantic class names for internal elements */
1781
+ classNames?: {
1782
+ /** Class name for the form element */
1783
+ form?: string;
1784
+ /** Class name for the form items */
1785
+ item?: string;
1786
+ /** Class name for the labels */
1787
+ label?: string;
1788
+ /** Class name for the error messages */
1789
+ error?: string;
1790
+ };
1791
+ /** Semantic styles for internal elements */
1792
+ styles?: {
1793
+ /** Style for the form element */
1794
+ form?: React__default.CSSProperties;
1795
+ /** Style for the form items */
1796
+ item?: React__default.CSSProperties;
1797
+ /** Style for the labels */
1798
+ label?: React__default.CSSProperties;
1799
+ /** Style for the error messages */
1800
+ error?: React__default.CSSProperties;
1801
+ };
1324
1802
  }
1325
- declare const Form$1: <Values extends Record<string, unknown> = Record<string, unknown>>({ form, initialValues, children, onFinish, onFinishFailed, onValuesChange, onFieldsChange, className, style, }: FormProps<Values>) => react_jsx_runtime.JSX.Element;
1326
-
1803
+ /**
1804
+ * Form Item properties
1805
+ */
1327
1806
  interface FormItemProps {
1328
- name?: string;
1329
- label?: string;
1807
+ /** Field name */
1808
+ name?: NamePath;
1809
+ /** Label text or node */
1810
+ label?: React__default.ReactNode;
1811
+ /** Validation rules */
1330
1812
  rules?: RuleItem[];
1813
+ /** Field components */
1331
1814
  children: ReactElement;
1815
+ /** Validation trigger */
1332
1816
  validateTrigger?: string | string[];
1817
+ /** Initial value of the field */
1333
1818
  initialValue?: unknown;
1819
+ /** Custom root element class name */
1334
1820
  className?: string;
1821
+ /** Custom root element style */
1335
1822
  style?: React__default.CSSProperties;
1823
+ /** The prompt message. If not provided, use the validation result. */
1336
1824
  help?: React__default.ReactNode;
1825
+ /** Related fields. If any related field changes, this field will be validated. */
1826
+ dependencies?: NamePath[];
1827
+ }
1828
+ type RecursivePartial<T> = {
1829
+ [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
1830
+ };
1831
+ interface ReducerAction {
1832
+ type: string;
1833
+ payload: unknown;
1337
1834
  }
1835
+
1836
+ declare const Form$1: React__default.ForwardRefExoticComponent<FormProps<Record<string, unknown>> & React__default.RefAttributes<HTMLFormElement>>;
1837
+
1338
1838
  declare const FormItem: React__default.FC<FormItemProps>;
1339
1839
 
1340
1840
  declare const useForm: <Values extends Record<string, unknown> = Record<string, unknown>>(form?: FormInstance<Values>) => [FormInstance<Values>];
1341
1841
 
1342
- declare const useWatch: <T = unknown>(name: string | string[], form?: FormInstance) => T;
1842
+ declare const useWatch: <T = unknown>(name: NamePath, form?: FormInstance) => T;
1343
1843
 
1344
1844
  type InternalFormType = typeof Form$1;
1345
1845
  interface FormInterface extends InternalFormType {
@@ -1370,14 +1870,30 @@ interface TabsProps {
1370
1870
  type?: 'line' | 'card' | 'editable-card';
1371
1871
  /** Tab size */
1372
1872
  size?: 'small' | 'default' | 'large';
1373
- /** Custom className */
1374
- className?: string;
1375
- /** Custom style */
1376
- style?: React__default.CSSProperties;
1873
+ /** Tab bar position (controls layout separate from styling) */
1874
+ tabBarPosition?: 'top' | 'right' | 'bottom' | 'left';
1377
1875
  /** Children (TabPane components) */
1378
1876
  children?: React__default.ReactNode;
1379
1877
  /** Callback when tab is edited */
1380
1878
  onEdit?: (targetKey: string, action: 'add' | 'remove') => void;
1879
+ /** Custom class name */
1880
+ className?: string;
1881
+ /** Custom style */
1882
+ style?: React__default.CSSProperties;
1883
+ /** Granular styles */
1884
+ styles?: {
1885
+ root?: React__default.CSSProperties;
1886
+ nav?: React__default.CSSProperties;
1887
+ inkBar?: React__default.CSSProperties;
1888
+ content?: React__default.CSSProperties;
1889
+ };
1890
+ /** Granular class names */
1891
+ classNames?: {
1892
+ root?: string;
1893
+ nav?: string;
1894
+ inkBar?: string;
1895
+ content?: string;
1896
+ };
1381
1897
  }
1382
1898
  interface TabItem {
1383
1899
  key: string;
@@ -1412,4 +1928,4 @@ type TabsComponent = typeof Tabs & {
1412
1928
  };
1413
1929
  declare const _default: TabsComponent;
1414
1930
 
1415
- export { Button, type ButtonProps, ConfigProvider, type ConfigProviderProps, type DataNode, DatePicker, type DatePickerProps, type DateRangePickerProps, Dropdown, type DropdownProps, type FieldData, Form, type FormInstance, type FormItemProps, type FormProps, 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, type TabItem, type TabPaneProps, _default as Tabs, type TabsProps, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity };
1931
+ export { AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Button, type ButtonProps, type ColumnType, ConfigProvider, type ConfigProviderProps, type DataNode, DatePicker, type DatePickerProps, type DateRangePickerProps, Dropdown, type DropdownProps, type FieldData, Form, type FormInstance, type FormItemProps, type FormProps, 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, type NamePath, Pagination, type PaginationProps, Progress, type ProgressProps, type RowSelection, Select, type SelectOption, type SelectProps, type SelectValue, Steps, type StepsProps, type TabItem, type TabPaneProps, Table, type TableProps, _default as Tabs, type TabsProps, Tree, type TreeNodeProps, type TreeProps, TreeSelect, type TreeSelectProps, type ValidateErrorEntity };