asterui 0.12.25 → 0.12.27

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.
Files changed (167) hide show
  1. package/dist/components/Cascader.d.ts +2 -0
  2. package/dist/components/Descriptions.d.ts +35 -3
  3. package/dist/components/Empty.d.ts +10 -1
  4. package/dist/components/Image.d.ts +13 -1
  5. package/dist/components/List.d.ts +74 -8
  6. package/dist/components/Table.d.ts +64 -10
  7. package/dist/components/Tag.d.ts +16 -4
  8. package/dist/components/Timeline.d.ts +62 -7
  9. package/dist/components/Tree.d.ts +2 -0
  10. package/dist/index.d.ts +6 -8
  11. package/dist/index.js +151 -152
  12. package/dist/index.js.map +1 -1
  13. package/dist/index10.js +1 -1
  14. package/dist/index100.js +5 -32
  15. package/dist/index100.js.map +1 -1
  16. package/dist/index101.js +13 -5
  17. package/dist/index101.js.map +1 -1
  18. package/dist/index102.js +43 -11
  19. package/dist/index102.js.map +1 -1
  20. package/dist/index103.js +11 -44
  21. package/dist/index103.js.map +1 -1
  22. package/dist/index104.js +12 -10
  23. package/dist/index104.js.map +1 -1
  24. package/dist/index105.js +7 -14
  25. package/dist/index105.js.map +1 -1
  26. package/dist/index106.js +12 -7
  27. package/dist/index106.js.map +1 -1
  28. package/dist/index107.js +29 -11
  29. package/dist/index107.js.map +1 -1
  30. package/dist/index108.js +16 -29
  31. package/dist/index108.js.map +1 -1
  32. package/dist/index109.js +31 -16
  33. package/dist/index109.js.map +1 -1
  34. package/dist/index110.js +517 -30
  35. package/dist/index110.js.map +1 -1
  36. package/dist/index111.js +45 -515
  37. package/dist/index111.js.map +1 -1
  38. package/dist/index15.js.map +1 -1
  39. package/dist/index22.js +1 -1
  40. package/dist/index23.js +127 -93
  41. package/dist/index23.js.map +1 -1
  42. package/dist/index39.js +162 -115
  43. package/dist/index39.js.map +1 -1
  44. package/dist/index40.js +398 -40
  45. package/dist/index40.js.map +1 -1
  46. package/dist/index41.js +132 -389
  47. package/dist/index41.js.map +1 -1
  48. package/dist/index42.js +252 -91
  49. package/dist/index42.js.map +1 -1
  50. package/dist/index43.js +143 -247
  51. package/dist/index43.js.map +1 -1
  52. package/dist/index44.js +15 -154
  53. package/dist/index44.js.map +1 -1
  54. package/dist/index45.js +17 -15
  55. package/dist/index45.js.map +1 -1
  56. package/dist/index46.js +136 -16
  57. package/dist/index46.js.map +1 -1
  58. package/dist/index47.js +118 -133
  59. package/dist/index47.js.map +1 -1
  60. package/dist/index48.js +35 -13
  61. package/dist/index48.js.map +1 -1
  62. package/dist/index49.js +34 -35
  63. package/dist/index49.js.map +1 -1
  64. package/dist/index50.js +81 -34
  65. package/dist/index50.js.map +1 -1
  66. package/dist/index51.js +166 -71
  67. package/dist/index51.js.map +1 -1
  68. package/dist/index52.js +144 -167
  69. package/dist/index52.js.map +1 -1
  70. package/dist/index53.js +11 -152
  71. package/dist/index53.js.map +1 -1
  72. package/dist/index54.js +55 -10
  73. package/dist/index54.js.map +1 -1
  74. package/dist/index55.js +12 -55
  75. package/dist/index55.js.map +1 -1
  76. package/dist/index56.js +7 -14
  77. package/dist/index56.js.map +1 -1
  78. package/dist/index57.js +333 -6
  79. package/dist/index57.js.map +1 -1
  80. package/dist/index58.js +47 -334
  81. package/dist/index58.js.map +1 -1
  82. package/dist/index59.js +122 -47
  83. package/dist/index59.js.map +1 -1
  84. package/dist/index60.js +108 -120
  85. package/dist/index60.js.map +1 -1
  86. package/dist/index61.js +167 -107
  87. package/dist/index61.js.map +1 -1
  88. package/dist/index62.js +29 -167
  89. package/dist/index62.js.map +1 -1
  90. package/dist/index63.js +120 -30
  91. package/dist/index63.js.map +1 -1
  92. package/dist/index64.js +80 -116
  93. package/dist/index64.js.map +1 -1
  94. package/dist/index65.js +19 -85
  95. package/dist/index65.js.map +1 -1
  96. package/dist/index66.js +73 -19
  97. package/dist/index66.js.map +1 -1
  98. package/dist/index67.js +54 -71
  99. package/dist/index67.js.map +1 -1
  100. package/dist/index68.js +44 -56
  101. package/dist/index68.js.map +1 -1
  102. package/dist/index69.js +49 -42
  103. package/dist/index69.js.map +1 -1
  104. package/dist/index70.js +121 -50
  105. package/dist/index70.js.map +1 -1
  106. package/dist/index71.js +102 -118
  107. package/dist/index71.js.map +1 -1
  108. package/dist/index72.js +72 -105
  109. package/dist/index72.js.map +1 -1
  110. package/dist/index73.js +67 -73
  111. package/dist/index73.js.map +1 -1
  112. package/dist/index74.js +19 -66
  113. package/dist/index74.js.map +1 -1
  114. package/dist/index75.js +55 -18
  115. package/dist/index75.js.map +1 -1
  116. package/dist/index76.js +251 -55
  117. package/dist/index76.js.map +1 -1
  118. package/dist/index77.js +22 -254
  119. package/dist/index77.js.map +1 -1
  120. package/dist/index78.js +31 -22
  121. package/dist/index78.js.map +1 -1
  122. package/dist/index79.js +93 -30
  123. package/dist/index79.js.map +1 -1
  124. package/dist/index80.js +626 -86
  125. package/dist/index80.js.map +1 -1
  126. package/dist/index81.js +73 -322
  127. package/dist/index81.js.map +1 -1
  128. package/dist/index82.js +39 -79
  129. package/dist/index82.js.map +1 -1
  130. package/dist/index83.js +23 -40
  131. package/dist/index83.js.map +1 -1
  132. package/dist/index84.js +207 -23
  133. package/dist/index84.js.map +1 -1
  134. package/dist/index85.js +149 -122
  135. package/dist/index85.js.map +1 -1
  136. package/dist/index86.js +152 -147
  137. package/dist/index86.js.map +1 -1
  138. package/dist/index87.js +143 -156
  139. package/dist/index87.js.map +1 -1
  140. package/dist/index88.js +35 -65
  141. package/dist/index88.js.map +1 -1
  142. package/dist/index89.js +234 -35
  143. package/dist/index89.js.map +1 -1
  144. package/dist/index90.js +31 -231
  145. package/dist/index90.js.map +1 -1
  146. package/dist/index91.js +210 -34
  147. package/dist/index91.js.map +1 -1
  148. package/dist/index92.js +418 -187
  149. package/dist/index92.js.map +1 -1
  150. package/dist/index93.js +686 -376
  151. package/dist/index93.js.map +1 -1
  152. package/dist/index94.js +165 -738
  153. package/dist/index94.js.map +1 -1
  154. package/dist/index95.js +253 -173
  155. package/dist/index95.js.map +1 -1
  156. package/dist/index96.js +64 -256
  157. package/dist/index96.js.map +1 -1
  158. package/dist/index97.js +121 -61
  159. package/dist/index97.js.map +1 -1
  160. package/dist/index98.js +14 -126
  161. package/dist/index98.js.map +1 -1
  162. package/dist/index99.js +31 -12
  163. package/dist/index99.js.map +1 -1
  164. package/package.json +1 -1
  165. package/dist/components/Indicator.d.ts +0 -7
  166. package/dist/index112.js +0 -53
  167. package/dist/index112.js.map +0 -1
@@ -65,5 +65,7 @@ export interface CascaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>
65
65
  maxTagCount?: number | 'responsive';
66
66
  /** Accessible label */
67
67
  'aria-label'?: string;
68
+ /** Test ID for the component */
69
+ 'data-testid'?: string;
68
70
  }
69
71
  export declare const Cascader: React.ForwardRefExoticComponent<CascaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,16 +1,39 @@
1
1
  import { default as React } from 'react';
2
- export type DescriptionsSize = 'small' | 'default' | 'large';
2
+ export type DescriptionsSize = 'sm' | 'md' | 'lg';
3
3
  export type DescriptionsLayout = 'horizontal' | 'vertical';
4
4
  export interface DescriptionsItemProps {
5
+ /** Label for the item */
5
6
  label?: React.ReactNode;
7
+ /** Number of columns to span */
6
8
  span?: number;
9
+ /** Content of the item */
7
10
  children?: React.ReactNode;
11
+ /** Custom label styles */
8
12
  labelStyle?: React.CSSProperties;
13
+ /** Custom content styles */
14
+ contentStyle?: React.CSSProperties;
15
+ }
16
+ /** Item configuration for the items prop */
17
+ export interface DescriptionsItemConfig {
18
+ /** Label for the item */
19
+ label: React.ReactNode;
20
+ /** Content of the item */
21
+ children: React.ReactNode;
22
+ /** Number of columns to span */
23
+ span?: number;
24
+ /** Custom label styles */
25
+ labelStyle?: React.CSSProperties;
26
+ /** Custom content styles */
9
27
  contentStyle?: React.CSSProperties;
10
28
  }
11
29
  export interface DescriptionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
30
+ /** Title of the descriptions block */
12
31
  title?: React.ReactNode;
32
+ /** Extra content in the top-right corner */
33
+ extra?: React.ReactNode;
34
+ /** Show borders around cells */
13
35
  bordered?: boolean;
36
+ /** Number of columns (or responsive config) */
14
37
  column?: number | {
15
38
  xs?: number;
16
39
  sm?: number;
@@ -19,16 +42,25 @@ export interface DescriptionsProps extends Omit<React.HTMLAttributes<HTMLDivElem
19
42
  xl?: number;
20
43
  '2xl'?: number;
21
44
  };
45
+ /** Size variant */
22
46
  size?: DescriptionsSize;
47
+ /** Layout direction */
23
48
  layout?: DescriptionsLayout;
49
+ /** Show colon after labels */
24
50
  colon?: boolean;
51
+ /** Default label styles */
25
52
  labelStyle?: React.CSSProperties;
53
+ /** Default content styles */
26
54
  contentStyle?: React.CSSProperties;
55
+ /** Item configurations (alternative to children) */
56
+ items?: DescriptionsItemConfig[];
57
+ /** Children (Descriptions.Item elements) */
27
58
  children?: React.ReactNode;
59
+ /** Test ID for the component */
60
+ 'data-testid'?: string;
28
61
  }
29
62
  declare function DescriptionsItem(_props: DescriptionsItemProps): null;
30
- declare function DescriptionsRoot({ title, bordered, column, size, layout, colon, labelStyle, contentStyle, className, style, children, ...rest }: DescriptionsProps): import("react/jsx-runtime").JSX.Element;
31
- export declare const Descriptions: typeof DescriptionsRoot & {
63
+ export declare const Descriptions: React.ForwardRefExoticComponent<DescriptionsProps & React.RefAttributes<HTMLDivElement>> & {
32
64
  Item: typeof DescriptionsItem;
33
65
  };
34
66
  export default Descriptions;
@@ -1,8 +1,17 @@
1
1
  import { default as React } from 'react';
2
2
  export interface EmptyProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Extra content like buttons or actions */
3
4
  children?: React.ReactNode;
5
+ /** Text or node to display as description */
4
6
  description?: React.ReactNode;
7
+ /** Custom image or icon; set to null to hide */
5
8
  image?: React.ReactNode;
9
+ /** Styling applied to the image container */
6
10
  imageStyle?: React.CSSProperties;
11
+ /** Test ID for the component */
12
+ 'data-testid'?: string;
7
13
  }
8
- export declare const Empty: React.FC<EmptyProps>;
14
+ export declare const Empty: React.ForwardRefExoticComponent<EmptyProps & React.RefAttributes<HTMLDivElement>> & {
15
+ PRESENTED_IMAGE_DEFAULT: import("react/jsx-runtime").JSX.Element;
16
+ PRESENTED_IMAGE_SIMPLE: import("react/jsx-runtime").JSX.Element;
17
+ };
@@ -1,14 +1,26 @@
1
1
  import { default as React } from 'react';
2
2
  export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'placeholder'> {
3
+ /** Image source URL */
3
4
  src: string;
5
+ /** Alternative text for the image */
4
6
  alt?: string;
7
+ /** Fallback image URL when source fails to load */
5
8
  fallback?: string;
9
+ /** Placeholder content shown while loading */
6
10
  placeholder?: React.ReactNode;
11
+ /** Enable click to preview image in lightbox */
7
12
  preview?: boolean;
13
+ /** Image width */
8
14
  width?: string | number;
15
+ /** Image height */
9
16
  height?: string | number;
17
+ /** Additional CSS classes */
10
18
  className?: string;
19
+ /** Callback when image loads successfully */
11
20
  onLoad?: () => void;
21
+ /** Callback when image fails to load */
12
22
  onError?: () => void;
23
+ /** Test ID for the component */
24
+ 'data-testid'?: string;
13
25
  }
14
- export declare const Image: React.FC<ImageProps>;
26
+ export declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>;
@@ -1,13 +1,79 @@
1
1
  import { default as React } from 'react';
2
- export interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
3
- children: React.ReactNode;
2
+ export interface ListPaginationConfig {
3
+ current?: number;
4
+ pageSize?: number;
5
+ total?: number;
6
+ onChange?: (page: number, pageSize: number) => void;
7
+ }
8
+ export interface ListGridConfig {
9
+ gutter?: number;
10
+ column?: number;
11
+ xs?: number;
12
+ sm?: number;
13
+ md?: number;
14
+ lg?: number;
15
+ xl?: number;
4
16
  }
5
- export interface ListRowProps extends React.LiHTMLAttributes<HTMLLIElement> {
17
+ export interface ListProps<T = unknown> extends Omit<React.HTMLAttributes<HTMLUListElement>, 'children'> {
18
+ /** Data source array */
19
+ dataSource?: T[];
20
+ /** Function to render each item */
21
+ renderItem?: (item: T, index: number) => React.ReactNode;
22
+ /** List header content */
23
+ header?: React.ReactNode;
24
+ /** List footer content */
25
+ footer?: React.ReactNode;
26
+ /** Show loading state */
27
+ loading?: boolean;
28
+ /** Pagination configuration or false to disable */
29
+ pagination?: ListPaginationConfig | false;
30
+ /** Grid layout configuration */
31
+ grid?: ListGridConfig;
32
+ /** Show border around list */
33
+ bordered?: boolean;
34
+ /** Show divider between items */
35
+ split?: boolean;
36
+ /** Size variant */
37
+ size?: 'sm' | 'md' | 'lg';
38
+ /** Layout direction */
39
+ itemLayout?: 'horizontal' | 'vertical';
40
+ /** Empty state text */
41
+ locale?: {
42
+ emptyText?: React.ReactNode;
43
+ };
44
+ /** Load more content (e.g., button) */
45
+ loadMore?: React.ReactNode;
46
+ /** Custom key extraction function */
47
+ rowKey?: keyof T | ((item: T) => React.Key);
48
+ /** Compound pattern children */
49
+ children?: React.ReactNode;
50
+ /** Accessible label for the list */
51
+ 'aria-label'?: string;
52
+ /** Test ID for the component */
53
+ 'data-testid'?: string;
54
+ }
55
+ export interface ListItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
56
+ /** Item content */
6
57
  children: React.ReactNode;
58
+ /** Action buttons */
59
+ actions?: React.ReactNode[];
60
+ /** Extra content on the right */
61
+ extra?: React.ReactNode;
62
+ /** Test ID for this item */
63
+ 'data-testid'?: string;
64
+ }
65
+ export interface ListItemMetaProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
66
+ /** Avatar or icon */
67
+ avatar?: React.ReactNode;
68
+ /** Title content */
69
+ title?: React.ReactNode;
70
+ /** Description content */
71
+ description?: React.ReactNode;
7
72
  }
8
- declare function ListRoot({ children, className, ...rest }: ListProps): import("react/jsx-runtime").JSX.Element;
9
- declare function ListRow({ children, className, ...rest }: ListRowProps): import("react/jsx-runtime").JSX.Element;
10
- export declare const List: typeof ListRoot & {
11
- Row: typeof ListRow;
73
+ export type ListRowProps = ListItemProps;
74
+ export declare const List: React.ForwardRefExoticComponent<ListProps<unknown> & React.RefAttributes<HTMLUListElement>> & {
75
+ Item: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLLIElement>> & {
76
+ Meta: React.FC<ListItemMetaProps>;
77
+ };
78
+ Row: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLLIElement>>;
12
79
  };
13
- export {};
@@ -3,41 +3,79 @@ export interface FilterConfig {
3
3
  text: string;
4
4
  value: string | number | boolean;
5
5
  }
6
- export interface ColumnType<T = any> {
6
+ export type TableSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ export interface ColumnType<T> {
7
8
  key: string;
8
- title: string;
9
- dataIndex?: string;
10
- render?: (value: any, record: T, index: number) => React.ReactNode;
9
+ title: React.ReactNode;
10
+ dataIndex?: keyof T & string;
11
+ render?: (value: T[keyof T] | undefined, record: T, index: number) => React.ReactNode;
11
12
  width?: string | number;
12
13
  align?: 'left' | 'center' | 'right';
13
14
  fixed?: 'left' | 'right';
14
15
  sorter?: boolean | ((a: T, b: T) => number);
16
+ sortOrder?: 'ascend' | 'descend' | null;
15
17
  filters?: FilterConfig[];
18
+ filteredValue?: (string | number | boolean)[];
16
19
  onFilter?: (value: string | number | boolean, record: T) => boolean;
17
20
  defaultSortOrder?: 'ascend' | 'descend';
18
21
  defaultFilteredValue?: (string | number | boolean)[];
22
+ ellipsis?: boolean;
23
+ hidden?: boolean;
19
24
  }
20
- export interface RowSelection<T = any> {
25
+ export interface RowSelection<T> {
21
26
  type?: 'checkbox' | 'radio';
22
27
  selectedRowKeys?: React.Key[];
23
28
  onChange?: (selectedRowKeys: React.Key[], selectedRows: T[]) => void;
24
29
  getCheckboxProps?: (record: T) => {
25
30
  disabled?: boolean;
26
- [key: string]: any;
31
+ name?: string;
27
32
  };
28
33
  }
34
+ export interface ExpandableConfig<T> {
35
+ expandedRowKeys?: React.Key[];
36
+ defaultExpandedRowKeys?: React.Key[];
37
+ expandedRowRender: (record: T, index: number, expanded: boolean) => React.ReactNode;
38
+ rowExpandable?: (record: T) => boolean;
39
+ onExpand?: (expanded: boolean, record: T) => void;
40
+ onExpandedRowsChange?: (expandedKeys: React.Key[]) => void;
41
+ expandRowByClick?: boolean;
42
+ expandIcon?: (props: {
43
+ expanded: boolean;
44
+ onExpand: () => void;
45
+ record: T;
46
+ }) => React.ReactNode;
47
+ }
29
48
  export interface PaginationConfig {
30
49
  current?: number;
31
50
  pageSize?: number;
32
51
  total?: number;
52
+ showSizeChanger?: boolean;
53
+ showQuickJumper?: boolean;
54
+ showTotal?: (total: number, range: [number, number]) => React.ReactNode;
55
+ pageSizeOptions?: number[];
33
56
  onChange?: (page: number, pageSize: number) => void;
57
+ onShowSizeChange?: (current: number, size: number) => void;
58
+ position?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
59
+ }
60
+ export interface ScrollConfig {
61
+ x?: number | string;
62
+ y?: number | string;
63
+ }
64
+ export interface SorterResult<T> {
65
+ column?: ColumnType<T>;
66
+ order?: 'ascend' | 'descend' | null;
67
+ field?: string;
34
68
  }
35
- export interface TableProps<T = any> {
69
+ export interface TableChangeExtra<T> {
70
+ currentDataSource: T[];
71
+ action: 'paginate' | 'sort' | 'filter';
72
+ }
73
+ export interface TableProps<T> {
36
74
  columns: ColumnType<T>[];
37
75
  dataSource: T[];
38
- rowKey?: string | ((record: T) => string);
76
+ rowKey?: (keyof T & string) | ((record: T) => string);
39
77
  loading?: boolean;
40
- size?: 'xs' | 'sm' | 'md' | 'lg';
78
+ size?: TableSize;
41
79
  bordered?: boolean;
42
80
  hoverable?: boolean;
43
81
  striped?: boolean;
@@ -45,7 +83,23 @@ export interface TableProps<T = any> {
45
83
  pinCols?: boolean;
46
84
  pagination?: false | PaginationConfig;
47
85
  rowSelection?: RowSelection<T>;
86
+ expandable?: ExpandableConfig<T>;
87
+ scroll?: ScrollConfig;
48
88
  className?: string;
49
89
  onRow?: (record: T, index: number) => React.HTMLAttributes<HTMLTableRowElement>;
90
+ onChange?: (pagination: PaginationConfig, filters: Record<string, (string | number | boolean)[] | null>, sorter: SorterResult<T>, extra: TableChangeExtra<T>) => void;
91
+ onSortChange?: (sorter: SorterResult<T>) => void;
92
+ onFilterChange?: (filters: Record<string, (string | number | boolean)[] | null>) => void;
93
+ locale?: {
94
+ emptyText?: React.ReactNode;
95
+ filterConfirm?: string;
96
+ filterReset?: string;
97
+ selectAll?: string;
98
+ selectInvert?: string;
99
+ };
100
+ 'data-testid'?: string;
101
+ 'aria-label'?: string;
50
102
  }
51
- export declare function Table<T extends Record<string, any>>({ columns, dataSource, rowKey, loading, size, bordered, hoverable, striped, pinRows, pinCols, pagination, rowSelection, className, onRow, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
103
+ export declare const Table: <T extends Record<string, unknown>>(props: TableProps<T> & {
104
+ ref?: React.ForwardedRef<HTMLTableElement>;
105
+ }) => React.ReactElement;
@@ -1,22 +1,34 @@
1
1
  import { default as React } from 'react';
2
- export type TagSize = 'xs' | 'sm' | 'md' | 'lg';
2
+ export type TagSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
3
  export type TagColor = 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error' | 'ghost';
4
- export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> {
4
+ export type TagVariant = 'filled' | 'outlined' | 'soft' | 'dash';
5
+ export interface TagProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {
5
6
  closable?: boolean;
6
7
  closeIcon?: React.ReactNode;
7
8
  onClose?: () => void;
8
9
  color?: TagColor | string;
9
10
  icon?: React.ReactNode;
10
11
  size?: TagSize;
12
+ variant?: TagVariant;
13
+ visible?: boolean;
14
+ disabled?: boolean;
15
+ href?: string;
16
+ target?: string;
11
17
  children?: React.ReactNode;
12
18
  'data-testid'?: string;
19
+ 'aria-label'?: string;
13
20
  }
14
- export interface CheckableTagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'onChange'> {
21
+ export interface CheckableTagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'onChange' | 'color'> {
15
22
  checked?: boolean;
16
23
  onChange?: (checked: boolean) => void;
17
24
  icon?: React.ReactNode;
25
+ size?: TagSize;
26
+ color?: TagColor;
27
+ disabled?: boolean;
18
28
  children?: React.ReactNode;
19
29
  'data-testid'?: string;
20
30
  }
21
- export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
31
+ declare const TagLiveRegion: React.FC;
32
+ export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLElement>>;
22
33
  export declare const CheckableTag: React.ForwardRefExoticComponent<CheckableTagProps & React.RefAttributes<HTMLSpanElement>>;
34
+ export { TagLiveRegion };
@@ -1,24 +1,79 @@
1
1
  import { default as React } from 'react';
2
- export interface TimelineProps extends React.HTMLAttributes<HTMLUListElement> {
3
- children: React.ReactNode;
2
+ export type TimelineMode = 'start' | 'alternate' | 'end';
3
+ export type TimelineColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral';
4
+ export interface TimelineItemConfig {
5
+ /** Unique key for the item */
6
+ key?: React.Key;
7
+ /** Content at start position (left/top) */
8
+ start?: React.ReactNode;
9
+ /** Content at end position (right/bottom) */
10
+ end?: React.ReactNode;
11
+ /** Central icon or marker */
12
+ icon?: React.ReactNode;
13
+ /** Wrap start content in timeline-box */
14
+ startBox?: boolean;
15
+ /** Wrap end content in timeline-box */
16
+ endBox?: boolean;
17
+ /** Color of the timeline dot/connector */
18
+ color?: TimelineColor;
19
+ /** Show loading spinner instead of icon */
20
+ loading?: boolean;
21
+ /** Additional CSS classes for this item */
22
+ className?: string;
23
+ }
24
+ export interface TimelineProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'children'> {
25
+ /** Timeline items (compound pattern) */
26
+ children?: React.ReactNode;
27
+ /** Timeline items (declarative API) */
28
+ items?: TimelineItemConfig[];
29
+ /** Vertical layout orientation */
4
30
  vertical?: boolean;
31
+ /** Horizontal layout (default) */
5
32
  horizontal?: boolean;
33
+ /** All items on one side */
6
34
  compact?: boolean;
35
+ /** Snap icon to start instead of center */
7
36
  snapIcon?: boolean;
37
+ /** Item distribution layout */
38
+ mode?: TimelineMode;
39
+ /** Reverse item order */
40
+ reverse?: boolean;
41
+ /** Show pending/loading indicator at end */
42
+ pending?: React.ReactNode;
43
+ /** Custom icon for pending item */
44
+ pendingIcon?: React.ReactNode;
45
+ /** Test ID for the component */
46
+ 'data-testid'?: string;
47
+ /** Accessible label for the timeline */
48
+ 'aria-label'?: string;
8
49
  }
9
- export interface TimelineItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
50
+ export interface TimelineItemProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'color'> {
51
+ /** Content at start position (left/top) */
10
52
  start?: React.ReactNode;
53
+ /** Content at end position (right/bottom) */
11
54
  end?: React.ReactNode;
55
+ /** Central icon or marker */
12
56
  icon?: React.ReactNode;
57
+ /** Wrap start content in timeline-box */
13
58
  startBox?: boolean;
59
+ /** Wrap end content in timeline-box */
14
60
  endBox?: boolean;
61
+ /** Color of the timeline dot/connector */
62
+ color?: TimelineColor;
63
+ /** Show loading spinner instead of icon */
64
+ loading?: boolean;
65
+ /** Test ID for this item */
66
+ 'data-testid'?: string;
67
+ }
68
+ interface TimelineItemInternalProps extends TimelineItemProps {
15
69
  _index?: number;
70
+ _total?: number;
16
71
  _compact?: boolean;
17
72
  _vertical?: boolean;
73
+ _mode?: TimelineMode;
74
+ _baseTestId?: string;
18
75
  }
19
- declare function TimelineRoot({ children, className, vertical, horizontal, compact, snapIcon, ...rest }: TimelineProps): import("react/jsx-runtime").JSX.Element;
20
- declare function TimelineItem({ start, end, icon, startBox, endBox, className, _index, _compact, _vertical, ...rest }: TimelineItemProps): import("react/jsx-runtime").JSX.Element;
21
- export declare const Timeline: typeof TimelineRoot & {
22
- Item: typeof TimelineItem;
76
+ export declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLUListElement>> & {
77
+ Item: React.ForwardRefExoticComponent<TimelineItemInternalProps & React.RefAttributes<HTMLLIElement>>;
23
78
  };
24
79
  export {};
@@ -85,6 +85,8 @@ export interface TreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
85
85
  title?: string;
86
86
  children?: string;
87
87
  };
88
+ /** Test ID for the component */
89
+ 'data-testid'?: string;
88
90
  }
89
91
  export interface TreeNodeProps {
90
92
  /** Unique key for the node (uses React's key prop) */
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ export type { CountdownProps } from './components/Countdown';
41
41
  export { DatePicker } from './components/DatePicker';
42
42
  export type { DatePickerProps } from './components/DatePicker';
43
43
  export { Descriptions } from './components/Descriptions';
44
- export type { DescriptionsProps, DescriptionsItemProps, DescriptionsSize, DescriptionsLayout } from './components/Descriptions';
44
+ export type { DescriptionsProps, DescriptionsItemProps, DescriptionsItemConfig, DescriptionsSize, DescriptionsLayout } from './components/Descriptions';
45
45
  export { Diff } from './components/Diff';
46
46
  export type { DiffProps } from './components/Diff';
47
47
  export { Dock } from './components/Dock';
@@ -74,8 +74,6 @@ export { HoverGallery } from './components/HoverGallery';
74
74
  export type { HoverGalleryProps } from './components/HoverGallery';
75
75
  export { Image } from './components/Image';
76
76
  export type { ImageProps } from './components/Image';
77
- export { Indicator } from './components/Indicator';
78
- export type { IndicatorProps, IndicatorPosition } from './components/Indicator';
79
77
  export { Dropdown } from './components/Dropdown';
80
78
  export type { DropdownProps, DropdownTriggerProps, DropdownMenuProps, DropdownItemProps, DropdownSubMenuProps, DropdownDividerProps, DropdownMenuItem, DropdownMenuDivider, DropdownMenuItemType, DropdownTriggerType, } from './components/Dropdown';
81
79
  export { Empty } from './components/Empty';
@@ -91,7 +89,7 @@ export type { KbdProps } from './components/Kbd';
91
89
  export { Layout, useSiderContext } from './components/Layout';
92
90
  export type { LayoutProps, LayoutHeaderProps, LayoutFooterProps, LayoutContentProps, LayoutSiderProps } from './components/Layout';
93
91
  export { List } from './components/List';
94
- export type { ListProps, ListRowProps } from './components/List';
92
+ export type { ListProps, ListRowProps, ListItemProps, ListItemMetaProps, ListPaginationConfig, ListGridConfig } from './components/List';
95
93
  export { Loading } from './components/Loading';
96
94
  export type { LoadingProps } from './components/Loading';
97
95
  export { Mask } from './components/Mask';
@@ -157,21 +155,21 @@ export type { StatusProps, StatusType, StatusSize } from './components/Status';
157
155
  export { Steps } from './components/Steps';
158
156
  export type { StepsProps, StepProps, StepItem, StepsDirection } from './components/Steps';
159
157
  export { Table } from './components/Table';
160
- export type { TableProps, ColumnType, PaginationConfig, FilterConfig, RowSelection } from './components/Table';
158
+ export type { TableProps, TableSize, ColumnType, PaginationConfig, FilterConfig, RowSelection, ExpandableConfig, ScrollConfig, SorterResult, TableChangeExtra, } from './components/Table';
161
159
  export { Tabs } from './components/Tabs';
162
160
  export type { TabsProps, TabPanelProps, TabItem, TabsVariant, TabsSize, TabsPosition } from './components/Tabs';
163
161
  export { Textarea } from './components/Textarea';
164
162
  export type { TextareaProps } from './components/Textarea';
165
163
  export { TextRotate } from './components/TextRotate';
166
164
  export type { TextRotateProps, TextRotateDuration } from './components/TextRotate';
167
- export { Tag, CheckableTag } from './components/Tag';
168
- export type { TagProps, CheckableTagProps, TagSize, TagColor } from './components/Tag';
165
+ export { Tag, CheckableTag, TagLiveRegion } from './components/Tag';
166
+ export type { TagProps, CheckableTagProps, TagSize, TagColor, TagVariant } from './components/Tag';
169
167
  export { ThemeController } from './components/ThemeController';
170
168
  export type { ThemeControllerSwapProps, ThemeControllerDropdownProps, ThemeControllerToggleProps } from './components/ThemeController';
171
169
  export { TimePicker } from './components/TimePicker';
172
170
  export type { TimePickerProps } from './components/TimePicker';
173
171
  export { Timeline } from './components/Timeline';
174
- export type { TimelineProps, TimelineItemProps } from './components/Timeline';
172
+ export type { TimelineProps, TimelineItemProps, TimelineItemConfig, TimelineMode, TimelineColor } from './components/Timeline';
175
173
  export { Toggle } from './components/Toggle';
176
174
  export type { ToggleProps } from './components/Toggle';
177
175
  export { Tour } from './components/Tour';