asterui 0.12.26 → 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.
- package/dist/components/Descriptions.d.ts +35 -3
- package/dist/components/Empty.d.ts +10 -1
- package/dist/components/Image.d.ts +13 -1
- package/dist/components/List.d.ts +74 -8
- package/dist/components/Table.d.ts +64 -10
- package/dist/components/Timeline.d.ts +62 -7
- package/dist/index.d.ts +4 -6
- package/dist/index.js +148 -150
- package/dist/index.js.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index100.js +5 -32
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +13 -5
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +43 -11
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +11 -44
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +12 -10
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +7 -14
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +12 -7
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +29 -11
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +16 -29
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +31 -16
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +517 -30
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +45 -515
- package/dist/index111.js.map +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.js +127 -93
- package/dist/index23.js.map +1 -1
- package/dist/index39.js +162 -115
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +398 -40
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +132 -389
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +252 -91
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +143 -247
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +15 -154
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +17 -15
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +136 -16
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +118 -133
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +35 -13
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +34 -35
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +81 -34
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +166 -71
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +144 -167
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +11 -152
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +55 -10
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +12 -55
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +7 -14
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +333 -6
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +47 -334
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +122 -47
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +108 -120
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +167 -107
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +29 -167
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +120 -30
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +80 -116
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +19 -85
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +73 -19
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +54 -71
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +44 -56
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +49 -42
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +121 -50
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +102 -118
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +72 -105
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +67 -73
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +19 -66
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +55 -18
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +251 -55
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +22 -254
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +31 -22
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +93 -30
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +626 -86
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +73 -322
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +39 -79
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +23 -40
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +207 -23
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +148 -199
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +152 -147
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +143 -156
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +35 -65
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +234 -35
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +31 -231
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +210 -34
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +418 -187
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +686 -376
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +165 -738
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +253 -173
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +64 -256
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +121 -61
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +14 -126
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +31 -12
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Indicator.d.ts +0 -7
- package/dist/index112.js +0 -53
- package/dist/index112.js.map +0 -1
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export type DescriptionsSize = '
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
3
|
-
|
|
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
|
|
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
|
-
|
|
9
|
-
declare
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
6
|
+
export type TableSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
export interface ColumnType<T> {
|
|
7
8
|
key: string;
|
|
8
|
-
title:
|
|
9
|
-
dataIndex?: string;
|
|
10
|
-
render?: (value:
|
|
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
|
|
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
|
-
|
|
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
|
|
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?:
|
|
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
|
|
103
|
+
export declare const Table: <T extends Record<string, unknown>>(props: TableProps<T> & {
|
|
104
|
+
ref?: React.ForwardedRef<HTMLTableElement>;
|
|
105
|
+
}) => React.ReactElement;
|
|
@@ -1,24 +1,79 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export
|
|
3
|
-
|
|
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
|
|
20
|
-
|
|
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 {};
|
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,7 +155,7 @@ 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';
|
|
@@ -171,7 +169,7 @@ export type { ThemeControllerSwapProps, ThemeControllerDropdownProps, ThemeContr
|
|
|
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';
|