@unicom-cloud/ui 0.8.106 → 0.8.108
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/App.js +7 -0
- package/BackTop.js +2 -4
- package/Calendar.js +2 -2
- package/ColorPicker.js +15 -14
- package/Constant.js +4 -0
- package/Copy.js +4 -3
- package/Countdown.js +25 -0
- package/Grid.js +8 -10
- package/LiquidFill.js +4 -3
- package/List.js +7 -6
- package/Marquee.js +4 -3
- package/Modal.js +4 -2
- package/PageHeader.js +3 -2
- package/QrCode.js +4 -3
- package/RowCol.js +8 -0
- package/Segmented.js +14 -4
- package/Statistic.js +5 -4
- package/Tour.js +4 -3
- package/Transfer.js +4 -2
- package/anchor/Link.js +1 -1
- package/app/App.js +26 -0
- package/app/context.js +9 -0
- package/app/index.js +9 -0
- package/app/interface.js +1 -0
- package/app/useApp.js +8 -0
- package/avatar/Group.js +1 -1
- package/back-top/index.js +44 -56
- package/button/index.js +52 -51
- package/calendar/Lunar.js +71 -0
- package/calendar/index.js +11 -11
- package/cascader/base/node.js +22 -20
- package/cascader/base/store.js +10 -10
- package/cascader/util.js +29 -27
- package/color-picker/Mode.js +8 -7
- package/color-picker/hooks/useColorPicker.js +56 -55
- package/color-picker/index.js +49 -48
- package/color-picker/utils.js +58 -57
- package/components/common/empty/index.js +2 -2
- package/components/common/flex/index.js +64 -55
- package/components/common/flex/interface.js +6 -6
- package/components/common/hooks/useInterval.js +6 -6
- package/components/common/icons/file/index.js +13 -11
- package/components/common/space/index.js +53 -53
- package/components/common/utils/dayjs.js +114 -126
- package/components/common/utils/is.js +98 -104
- package/components/common/utils/setDir.js +12 -0
- package/components/common/utils/setTheme.js +13 -13
- package/components/common/utils/toArray.js +7 -5
- package/config-provider/ConfigProvider.js +32 -30
- package/constant/index.js +4 -0
- package/copy/index.js +2 -1
- package/countdown/index.js +113 -0
- package/countdown/interface.js +1 -0
- package/countdown/util.js +29 -0
- package/descriptions/index.js +45 -45
- package/divider/index.js +28 -20
- package/dropdown/Button.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +30 -29
- package/form/FormItem.js +126 -122
- package/grid/Grid.js +56 -90
- package/grid/Item.js +44 -65
- package/grid/context.js +2 -6
- package/grid/index.js +6 -8
- package/grid/util.js +6 -44
- package/hooks/useResponsiveState.js +54 -0
- package/index.js +614 -605
- package/input/Button.js +12 -12
- package/input/Group.js +11 -12
- package/input/Input.js +112 -102
- package/input/InputElement.js +25 -24
- package/input/Search.js +24 -24
- package/layout/Sider.js +1 -1
- package/liquid-fill/index.js +4 -3
- package/list/Item.js +21 -21
- package/list/index.js +53 -52
- package/marquee/index.js +20 -19
- package/marquee-/index.js +4 -3
- package/mentions/util.js +9 -8
- package/modal/Confirm.js +17 -17
- package/modal/Modal.js +247 -237
- package/modal/index.js +4 -2
- package/modal/use-modal/index.js +2 -2
- package/package.json +1 -1
- package/page-header/index.js +57 -56
- package/pagination/Pagination.js +89 -92
- package/qr-code/index.js +4 -3
- package/radio/Group.js +1 -1
- package/row-col/Col-.js +88 -0
- package/row-col/Col.js +159 -0
- package/row-col/Row.js +73 -0
- package/row-col/context.js +5 -0
- package/row-col/index.js +11 -0
- package/row-col/interface.js +1 -0
- package/segmented/index.js +257 -206
- package/select/Select.js +191 -191
- package/select/util.js +50 -50
- package/select-view/Core.js +31 -28
- package/space/index.js +15 -13
- package/splitter/SplitBar.js +44 -46
- package/statistic/index.js +56 -55
- package/statistic/interface.js +4 -1
- package/style.css +1 -1
- package/table/Table.js +198 -210
- package/table/hook/useColumns.js +27 -26
- package/table/hook/useStickyClassNames.js +9 -8
- package/table/hook/useThResizable.js +4 -3
- package/table/th-resizable/index.js +2 -2
- package/table/thead/index.js +18 -16
- package/time-picker/util.js +20 -30
- package/timeline/Item.js +1 -1
- package/tour/index.js +4 -3
- package/transfer/index.js +93 -91
- package/trigger/index.js +66 -66
- package/types/common/development/interface.d.ts +3 -3
- package/types/common/flex/index.d.ts +3 -9
- package/types/common/flex/interface.d.ts +15 -4
- package/types/common/space/index.d.ts +3 -5
- package/types/common/space/interface.d.ts +2 -0
- package/types/common/utils/dayjs.d.ts +3 -1
- package/types/common/utils/is.d.ts +3 -4
- package/types/common/utils/setDir.d.ts +2 -0
- package/types/pc/app/App.d.ts +6 -0
- package/types/pc/app/context.d.ts +4 -0
- package/types/pc/app/index.d.ts +5 -0
- package/types/pc/app/interface.d.ts +17 -0
- package/types/pc/app/useApp.d.ts +3 -0
- package/types/pc/back-top/interface.d.ts +4 -17
- package/types/pc/button/interface.d.ts +2 -2
- package/types/pc/calendar/Lunar.d.ts +17 -0
- package/types/pc/calendar/index.d.ts +1 -1
- package/types/pc/config-provider/interface.d.ts +17 -12
- package/types/pc/constant/index.d.ts +1 -0
- package/types/pc/countdown/interface.d.ts +65 -0
- package/types/pc/countdown/util.d.ts +7 -0
- package/types/pc/divider/interface.d.ts +1 -0
- package/types/pc/flex/index.d.ts +8 -6
- package/types/pc/flex/interface.d.ts +3 -10
- package/types/pc/form/FormItem.d.ts +1 -1
- package/types/pc/form/interface.d.ts +1 -1
- package/types/pc/grid/Grid.d.ts +2 -4
- package/types/pc/grid/Item.d.ts +1 -5
- package/types/pc/grid/context.d.ts +4 -15
- package/types/pc/grid/index.d.ts +4 -6
- package/types/pc/grid/interface.d.ts +14 -142
- package/types/pc/grid/util.d.ts +1 -10
- package/types/pc/hooks/useResponsiveState.d.ts +3 -0
- package/types/pc/index.d.ts +10 -4
- package/types/pc/input/Button.d.ts +2 -2
- package/types/pc/list/interface.d.ts +2 -1
- package/types/pc/message/index.d.ts +1 -9
- package/types/pc/message/interface.d.ts +8 -0
- package/types/pc/message/useMessage.d.ts +1 -2
- package/types/pc/modal/Modal.d.ts +1 -0
- package/types/pc/modal/config.d.ts +1 -2
- package/types/pc/modal/index.d.ts +2 -1
- package/types/pc/modal/interface.d.ts +17 -5
- package/types/pc/notification/index.d.ts +2 -9
- package/types/pc/notification/interface.d.ts +7 -0
- package/types/pc/notification/useNotification.d.ts +1 -2
- package/types/pc/pagination/PageOption.d.ts +0 -1
- package/types/pc/pagination/interface.d.ts +5 -6
- package/types/pc/{grid → row-col}/Col-.d.ts +1 -1
- package/types/pc/{grid → row-col}/Col.d.ts +1 -2
- package/types/pc/{grid → row-col}/Row.d.ts +1 -2
- package/types/pc/row-col/context.d.ts +6 -0
- package/types/pc/row-col/index.d.ts +7 -0
- package/types/pc/row-col/interface.d.ts +112 -0
- package/types/pc/segmented/index.d.ts +3 -7
- package/types/pc/segmented/interface.d.ts +38 -5
- package/types/pc/select-view/Core.d.ts +1 -8
- package/types/pc/select-view/index.d.ts +1 -8
- package/types/pc/select-view/interface.d.ts +9 -2
- package/types/pc/space/index.d.ts +5 -7
- package/types/pc/space/interface.d.ts +3 -10
- package/types/pc/statistic/index.d.ts +1 -1
- package/types/pc/statistic/interface.d.ts +1 -49
- package/types/pc/utils/is.d.ts +1 -1
- package/types/pc/utils/names.d.ts +422 -111
- package/types/pc/utils/responsiveObserve.d.ts +8 -8
- package/typography/Ellipsis.js +5 -4
- package/typography/Operations.js +4 -3
- package/utils/dayjs.js +13 -11
- package/utils/index.js +245 -244
- package/utils/is.js +65 -66
- package/utils/names.js +309 -150
- package/utils/responsiveObserve.js +43 -36
- package/version/index.js +1 -1
- package/grid/Col-.js +0 -86
- package/grid/Col.js +0 -169
- package/grid/Row.js +0 -96
- package/grid/hook/useResponsiveState.js +0 -38
- package/statistic/Countdown.js +0 -56
- package/statistic/util.js +0 -33
- package/types/pc/grid/hook/useResponsiveState.d.ts +0 -2
- package/types/pc/statistic/util.d.ts +0 -1
- /package/types/pc/{statistic/Countdown.d.ts → countdown/index.d.ts} +0 -0
|
@@ -1,127 +1,11 @@
|
|
|
1
1
|
import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type GridResponsiveBreakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className?: string | string[];
|
|
10
|
-
/**
|
|
11
|
-
* @zh
|
|
12
|
-
* 栅格间隔,单位是`px` 栅格间隔。可传入响应式对象写法 { xs: 4, sm: 6, md: 12},传入数组 [ 水平间距, 垂直间距 ] 来设置两个方向。
|
|
13
|
-
* @en
|
|
14
|
-
* Spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}.
|
|
15
|
-
* Or you can use array to make horizontal and vertical spacing work at the same time [horizontal, vertical]
|
|
16
|
-
* @defaultValue 0
|
|
17
|
-
*/
|
|
18
|
-
gutter?: GridRowGutter | Array<GridRowGutter>;
|
|
19
|
-
/**
|
|
20
|
-
* @zh 开启这个选项 `<Row>` 和 `<Col>` 都会被当作 div 而不会附带任何 Grid 相关的类和样式
|
|
21
|
-
* @en If true, `<Row>` and `<Col>` will be treated as a div without any Grid related classes and styles
|
|
22
|
-
*/
|
|
23
|
-
div?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* @zh 竖直对齐方式 ( `align-items` )
|
|
26
|
-
* @en Vertical alignment, same as css `align-items`
|
|
27
|
-
* @defaultValue start
|
|
28
|
-
*/
|
|
29
|
-
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
30
|
-
/**
|
|
31
|
-
* @zh 水平对齐方式 (`justify-content`)
|
|
32
|
-
* @en Horizontal alignment, same as css `justify-content`
|
|
33
|
-
* @defaultValue start
|
|
34
|
-
*/
|
|
35
|
-
justify?: 'start' | 'center' | 'end' | 'space-around' | 'space-between';
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @title Col
|
|
39
|
-
*/
|
|
40
|
-
export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'ref'> {
|
|
41
|
-
style?: CSSProperties;
|
|
42
|
-
className?: string | string[];
|
|
43
|
-
/**
|
|
44
|
-
* @zh 栅格占位格数
|
|
45
|
-
* @en Raster number of cells to occupy
|
|
46
|
-
* @defaultValue 24
|
|
47
|
-
*/
|
|
48
|
-
span?: number;
|
|
49
|
-
/**
|
|
50
|
-
* @zh 栅格左侧的间隔格数,间隔内不可以有栅格
|
|
51
|
-
* @en The number of cells to offset Col from the left
|
|
52
|
-
*/
|
|
53
|
-
offset?: number;
|
|
54
|
-
/**
|
|
55
|
-
* @zh 对元素进行排序
|
|
56
|
-
* @en Raster order
|
|
57
|
-
*/
|
|
58
|
-
order?: number;
|
|
59
|
-
/**
|
|
60
|
-
* @zh 对元素进行排序
|
|
61
|
-
* @en Raster order
|
|
62
|
-
*/
|
|
63
|
-
push?: number;
|
|
64
|
-
/**
|
|
65
|
-
* @zh 对元素进行排序
|
|
66
|
-
* @en Raster order
|
|
67
|
-
*/
|
|
68
|
-
pull?: number;
|
|
69
|
-
/**
|
|
70
|
-
* @zh < 576px 响应式栅格
|
|
71
|
-
* @en `screen < 576px`
|
|
72
|
-
*/
|
|
73
|
-
xs?: number | {
|
|
74
|
-
[key: string]: any;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* @zh >= 576px 响应式栅格
|
|
78
|
-
* @en `screen >= 576px`
|
|
79
|
-
*/
|
|
80
|
-
sm?: number | {
|
|
81
|
-
[key: string]: any;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* @zh >= 768px 响应式栅格
|
|
85
|
-
* @en `screen >= 768px`
|
|
86
|
-
*/
|
|
87
|
-
md?: number | {
|
|
88
|
-
[key: string]: any;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* @zh >= 992px 响应式栅格
|
|
92
|
-
* @en `screen >= 992px`
|
|
93
|
-
*/
|
|
94
|
-
lg?: number | {
|
|
95
|
-
[key: string]: any;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* @zh >= 1200px 响应式栅格
|
|
99
|
-
* @en `screen >= 1200px`
|
|
100
|
-
*/
|
|
101
|
-
xl?: number | {
|
|
102
|
-
[key: string]: any;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* @zh >= 1600px 响应式栅格
|
|
106
|
-
* @en `screen >= 1600px`
|
|
107
|
-
*/
|
|
108
|
-
xxl?: number | {
|
|
109
|
-
[key: string]: any;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* @zh >= 2000px 响应式栅格
|
|
113
|
-
* @en `screen >= 2000px`
|
|
114
|
-
*/
|
|
115
|
-
xxxl?: number | {
|
|
116
|
-
[key: string]: any;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* @zh 设置 flex 布局属性
|
|
120
|
-
* @en Set flex layout properties
|
|
121
|
-
*/
|
|
122
|
-
flex?: FlexType;
|
|
123
|
-
}
|
|
124
|
-
export type GridUnitProps = number | ResponsiveValue | undefined;
|
|
3
|
+
export type GridUnitProps = number | string | ResponsiveValue | undefined;
|
|
4
|
+
export type GridTemplateColumnsAuto = {
|
|
5
|
+
type: 'auto-fit' | 'auto-fill';
|
|
6
|
+
max: number | string;
|
|
7
|
+
min: number | string;
|
|
8
|
+
};
|
|
125
9
|
/**
|
|
126
10
|
* @title Grid
|
|
127
11
|
*/
|
|
@@ -133,7 +17,7 @@ export interface GridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
|
|
|
133
17
|
* @en Number of columns displayed in each row
|
|
134
18
|
* @defaultValue 24
|
|
135
19
|
*/
|
|
136
|
-
cols?: GridUnitProps;
|
|
20
|
+
cols?: GridUnitProps | GridTemplateColumnsAuto;
|
|
137
21
|
/**
|
|
138
22
|
* @zh 间距
|
|
139
23
|
* @defaultValue 0
|
|
@@ -151,18 +35,6 @@ export interface GridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
|
|
|
151
35
|
* @defaultValue 0
|
|
152
36
|
*/
|
|
153
37
|
colGap?: GridUnitProps;
|
|
154
|
-
/**
|
|
155
|
-
* @zh 是否折叠
|
|
156
|
-
* @en Whether to collapsed
|
|
157
|
-
* @defaultValue false
|
|
158
|
-
*/
|
|
159
|
-
collapsed?: boolean;
|
|
160
|
-
/**
|
|
161
|
-
* @zh 折叠时显示的行数
|
|
162
|
-
* @en Number of rows displayed when collapsed
|
|
163
|
-
* @defaultValue 1
|
|
164
|
-
*/
|
|
165
|
-
collapsedRows?: number;
|
|
166
38
|
}
|
|
167
39
|
/**
|
|
168
40
|
* @title Item
|
|
@@ -182,20 +54,21 @@ export interface GridItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'cla
|
|
|
182
54
|
* @defaultValue 0
|
|
183
55
|
*/
|
|
184
56
|
offset?: GridUnitProps;
|
|
57
|
+
/**
|
|
58
|
+
* @zh 在容器中的排序位置
|
|
59
|
+
*/
|
|
60
|
+
order?: number;
|
|
185
61
|
/**
|
|
186
62
|
* @zh 是否是后缀元素
|
|
187
63
|
* @en Is it a suffix element
|
|
188
64
|
* @defaultValue false
|
|
189
65
|
*/
|
|
190
66
|
suffix?: boolean;
|
|
191
|
-
|
|
192
|
-
children?: ReactNode | ((info: {
|
|
193
|
-
overflow: boolean;
|
|
194
|
-
}) => ReactNode);
|
|
67
|
+
children?: ReactNode;
|
|
195
68
|
}
|
|
196
69
|
export interface GridItemData extends GridItemProps {
|
|
197
|
-
span
|
|
198
|
-
offset
|
|
70
|
+
span?: number;
|
|
71
|
+
offset?: number;
|
|
199
72
|
}
|
|
200
73
|
/**
|
|
201
74
|
* @title ResponsiveValue
|
|
@@ -237,4 +110,3 @@ export interface ResponsiveValue {
|
|
|
237
110
|
*/
|
|
238
111
|
xs?: number;
|
|
239
112
|
}
|
|
240
|
-
export type FlexType = string | number | 'auto' | 'none';
|
package/types/pc/grid/util.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
1
|
import { GridItemData } from './interface';
|
|
2
|
-
export declare function resolveItemData(cols: number, { span, offset
|
|
3
|
-
export declare function setItemVisible({ cols, collapsed, collapsedRows, itemDataList, }: {
|
|
4
|
-
cols: number;
|
|
5
|
-
collapsed: boolean;
|
|
6
|
-
collapsedRows: number;
|
|
7
|
-
itemDataList: GridItemData[];
|
|
8
|
-
}): {
|
|
9
|
-
overflow: boolean;
|
|
10
|
-
displayIndexList: number[];
|
|
11
|
-
};
|
|
2
|
+
export declare function resolveItemData(cols: number, { span, offset }: GridItemData): GridItemData;
|
package/types/pc/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { default as Alert } from './alert';
|
|
|
6
6
|
export type { AlertProps } from './alert/interface';
|
|
7
7
|
export { default as Anchor, AnchorLink, findAnchorLinkNode } from './anchor';
|
|
8
8
|
export type { AnchorLinkProps, AnchorProps } from './anchor/interface';
|
|
9
|
+
export { default as App, useApp } from './app';
|
|
10
|
+
export type { AppProps } from './app/interface';
|
|
9
11
|
export { default as AutoComplete, AutoCompleteOptGroup, AutoCompleteOption, } from './auto-complete';
|
|
10
12
|
export type { AutoCompleteProps } from './auto-complete/interface';
|
|
11
13
|
export { default as Avatar, AvatarGroup } from './avatar';
|
|
@@ -38,6 +40,8 @@ export { ConfigConsumer, ConfigContext, default as ConfigProvider, ConfigProvide
|
|
|
38
40
|
export type { ConfigProviderProps } from './config-provider/interface';
|
|
39
41
|
export { default as Copy } from './copy';
|
|
40
42
|
export type { CopyProps } from './copy/interface';
|
|
43
|
+
export { default as Countdown } from './countdown';
|
|
44
|
+
export type { CountdownProps } from './countdown/interface';
|
|
41
45
|
export { default as DatePicker, DatePickerMonth, DatePickerQuarter, DatePickerRange, DatePickerWeek, DatePickerYear, } from './date-picker';
|
|
42
46
|
export type { DatePickerProps, MonthPickerProps, QuarterPickerProps, RangePickerProps, WeekPickerProps, YearPickerProps, } from './date-picker/interface';
|
|
43
47
|
export { default as Descriptions } from './descriptions';
|
|
@@ -58,8 +62,8 @@ export { default as Flex, FlexVertical } from './flex';
|
|
|
58
62
|
export type { FlexProps } from './flex/interface';
|
|
59
63
|
export { default as Form, FormControl, FormItem, FormList, FormProvider, useForm, useFormContext, useFormState, useFormWatch, } from './form';
|
|
60
64
|
export type { FormInstance, FormItemProps, FormListProps, FormProps, RulesProps, } from './form/interface';
|
|
61
|
-
export {
|
|
62
|
-
export type {
|
|
65
|
+
export { default as Grid, GridCol, GridItem, GridRow } from './grid';
|
|
66
|
+
export type { GridItemProps, GridProps } from './grid/interface';
|
|
63
67
|
export { addFromIconFontCn, default as Icon, IconContext, useIconProps, } from './icon';
|
|
64
68
|
export { default as IconHover } from './icon-hover';
|
|
65
69
|
export type { IconHoverProps } from './icon-hover/interface';
|
|
@@ -92,7 +96,7 @@ export { default as Menu, MenuItem, MenuItemGroup, MenuSubMenu, SubMenu, } from
|
|
|
92
96
|
export type { MenuItemGroupProps, MenuItemProps, MenuProps, MenuSubMenuProps, } from './menu/interface';
|
|
93
97
|
export { default as Message, useMessage } from './message';
|
|
94
98
|
export type { MessageHookReturnType, MessageProps } from './message/interface';
|
|
95
|
-
export { default as Modal } from './modal';
|
|
99
|
+
export { default as Modal, useModal } from './modal';
|
|
96
100
|
export type { ModalHookReturnType, ModalProps } from './modal/interface';
|
|
97
101
|
export { default as Notification, useNotification } from './notification';
|
|
98
102
|
export type { NotificationHookReturnType, NotificationProps, } from './notification/interface';
|
|
@@ -118,6 +122,8 @@ export { default as ResizeBox, ResizeBoxSplit, ResizeBoxSplitGroup, } from './re
|
|
|
118
122
|
export type { ResizeBoxProps } from './resize-box/interface';
|
|
119
123
|
export { default as Result } from './result';
|
|
120
124
|
export type { ResultProps } from './result/interface';
|
|
125
|
+
export { Col, default as Row, RowItem } from './row-col';
|
|
126
|
+
export type { ColProps, RowProps } from './row-col/interface';
|
|
121
127
|
export { default as Segmented } from './segmented';
|
|
122
128
|
export type { SegmentedProps } from './segmented/interface';
|
|
123
129
|
export { default as Select, SelectOption, SelectOptionGroup } from './select';
|
|
@@ -135,7 +141,7 @@ export type { SpinProps } from './spin/interface';
|
|
|
135
141
|
export { default as Splitter, SplitterPanel } from './splitter';
|
|
136
142
|
export type { SplitterProps } from './splitter/interface';
|
|
137
143
|
export { default as Statistic, StatisticCountdown } from './statistic';
|
|
138
|
-
export type {
|
|
144
|
+
export type { StatisticProps } from './statistic/interface';
|
|
139
145
|
export { default as Steps, StepsItem, StepsStep } from './steps';
|
|
140
146
|
export type { StepProps, StepsProps } from './steps/interface';
|
|
141
147
|
export { default as SuspenseFallbackTest } from './suspense-fallback-test';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputButtonProps, RefInputType } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const ButtonInput: React.ForwardRefExoticComponent<InputButtonProps & React.RefAttributes<RefInputType>>;
|
|
4
|
+
export default ButtonInput;
|
|
5
5
|
export type { InputButtonProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, HTMLAttributes, MutableRefObject, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { GridResponsiveBreakpoint } from '../grid/interface';
|
|
3
3
|
import { PaginationProps } from '../pagination/Pagination';
|
|
4
|
+
import type { ColProps, RowProps } from '../row-col/interface';
|
|
4
5
|
import { AvailableVirtualListProps } from '../virtual-list';
|
|
5
6
|
type ListGridProps = {
|
|
6
7
|
column?: number;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { JSX } from 'react/jsx-runtime';
|
|
2
|
-
import { MessageHookReturnType, MessageProps } from './interface';
|
|
2
|
+
import { ConfigProps, MessageHookReturnType, MessageProps } from './interface';
|
|
3
3
|
import useMessage from './useMessage';
|
|
4
4
|
export declare const messageTypes: string[];
|
|
5
|
-
export type ConfigProps = {
|
|
6
|
-
maxCount?: number;
|
|
7
|
-
prefixCls?: string;
|
|
8
|
-
getContainer?: () => HTMLElement;
|
|
9
|
-
duration?: number;
|
|
10
|
-
rtl?: boolean;
|
|
11
|
-
closable?: boolean;
|
|
12
|
-
};
|
|
13
5
|
export interface MessageType {
|
|
14
6
|
(): void;
|
|
15
7
|
}
|
|
@@ -79,4 +79,12 @@ export type MessageHookReturnType = {
|
|
|
79
79
|
loading?: messageHookFunction;
|
|
80
80
|
normal?: messageHookFunction;
|
|
81
81
|
};
|
|
82
|
+
export type ConfigProps = {
|
|
83
|
+
maxCount?: number;
|
|
84
|
+
prefixCls?: string;
|
|
85
|
+
getContainer?: () => HTMLElement;
|
|
86
|
+
duration?: number;
|
|
87
|
+
rtl?: boolean;
|
|
88
|
+
closable?: boolean;
|
|
89
|
+
};
|
|
82
90
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react/jsx-runtime';
|
|
2
|
-
import { ConfigProps } from '
|
|
3
|
-
import { MessageHookReturnType } from './interface';
|
|
2
|
+
import { ConfigProps, MessageHookReturnType } from './interface';
|
|
4
3
|
export type messageFuncType = MessageHookReturnType;
|
|
5
4
|
declare function useMessage(commonConfig?: ConfigProps): [MessageHookReturnType, JSX.Element];
|
|
6
5
|
export default useMessage;
|
|
@@ -15,5 +15,6 @@ export interface ModalComponent extends ForwardRefExoticComponent<PropsWithChild
|
|
|
15
15
|
useModal: typeof useModal;
|
|
16
16
|
}
|
|
17
17
|
declare const ExportedModalComponent: ModalComponent;
|
|
18
|
+
export { useModal };
|
|
18
19
|
export default ExportedModalComponent;
|
|
19
20
|
export type { ModalProps, ModalReturnProps };
|
|
@@ -2,9 +2,8 @@ import { ConfigProviderProps } from '../config-provider';
|
|
|
2
2
|
export declare function setConfigProviderProps(configProviderProps: ConfigProviderProps): void;
|
|
3
3
|
export declare function getConfigProviderProps(): ConfigProviderProps;
|
|
4
4
|
export type ModalConfigType = {
|
|
5
|
-
prefixCls?: string;
|
|
6
5
|
simple?: boolean;
|
|
7
6
|
};
|
|
8
7
|
export declare const setModalConfig: (config: ModalConfigType) => void;
|
|
9
8
|
export declare const getModalConfig: () => ModalConfigType;
|
|
10
|
-
export declare const destroyList: Array<
|
|
9
|
+
export declare const destroyList: Array<() => void>;
|
|
@@ -18,6 +18,18 @@ export interface ModalProps {
|
|
|
18
18
|
*/
|
|
19
19
|
onOk?: (e?: MouseEvent) => Promise<any> | void;
|
|
20
20
|
onConfirm?: (e?: MouseEvent) => Promise<any> | void;
|
|
21
|
+
cancelButton?: {
|
|
22
|
+
visible: boolean;
|
|
23
|
+
label: string;
|
|
24
|
+
text: string;
|
|
25
|
+
props: ButtonProps;
|
|
26
|
+
};
|
|
27
|
+
okButton?: {
|
|
28
|
+
visible: boolean;
|
|
29
|
+
label: string;
|
|
30
|
+
text: string;
|
|
31
|
+
props: ButtonProps;
|
|
32
|
+
};
|
|
21
33
|
/**
|
|
22
34
|
* @zh 指定弹出框挂载的父节点
|
|
23
35
|
* @en Specify the parent node of the Modal
|
|
@@ -75,10 +87,10 @@ export interface ModalProps {
|
|
|
75
87
|
*/
|
|
76
88
|
cancelButtonProps?: ButtonProps;
|
|
77
89
|
/**
|
|
78
|
-
* @zh 自定义页脚,传入 null 则不显示
|
|
90
|
+
* @zh 自定义页脚,传入 false | null | undefined 则不显示
|
|
79
91
|
* @en Custom `footer`. if it is null, the footer will not be displayed.
|
|
80
92
|
*/
|
|
81
|
-
footer?: ReactNode | ((cancelButtonNode: ReactNode, okButtonNode: ReactNode) => ReactNode);
|
|
93
|
+
footer?: ReactNode | ((cancelButtonNode: ReactNode, okButtonNode: ReactNode) => ReactNode) | boolean | null | undefined;
|
|
82
94
|
/**
|
|
83
95
|
* @zh 是否显示右上角的关闭按钮
|
|
84
96
|
* @en Whether to show the close button in TitleBar
|
|
@@ -154,7 +166,6 @@ export interface ModalProps {
|
|
|
154
166
|
* @en Custom the render of Modal
|
|
155
167
|
*/
|
|
156
168
|
modalRender?: (modalNode: ReactNode) => ReactNode;
|
|
157
|
-
prefixCls?: string;
|
|
158
169
|
/**
|
|
159
170
|
* @zh 是否开启全屏
|
|
160
171
|
* @en Whether to enable fullscreenable
|
|
@@ -163,8 +174,9 @@ export interface ModalProps {
|
|
|
163
174
|
draggable?: boolean;
|
|
164
175
|
}
|
|
165
176
|
export type ModalReturnProps = {
|
|
166
|
-
update:
|
|
167
|
-
close:
|
|
177
|
+
update: (newConfig: ConfirmProps) => void;
|
|
178
|
+
close: () => void;
|
|
179
|
+
destroy: () => void;
|
|
168
180
|
};
|
|
169
181
|
type modalHookFunction = (config: ConfirmProps) => {
|
|
170
182
|
close: () => void;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { ReactInstance } from 'react';
|
|
2
|
-
import { NotificationHookReturnType, NotificationProps } from './interface';
|
|
1
|
+
import React, { JSX, ReactInstance } from 'react';
|
|
2
|
+
import { ConfigProps, NotificationHookReturnType, NotificationProps } from './interface';
|
|
3
3
|
import useNotification from './useNotification';
|
|
4
4
|
export declare const notificationTypes: string[];
|
|
5
|
-
export type ConfigProps = {
|
|
6
|
-
maxCount?: number;
|
|
7
|
-
prefixCls?: string;
|
|
8
|
-
getContainer?: () => HTMLElement;
|
|
9
|
-
duration?: number;
|
|
10
|
-
rtl?: boolean;
|
|
11
|
-
};
|
|
12
5
|
export declare function getPosition(position: any, rtl_: any): any;
|
|
13
6
|
interface ComponentStaticProps {
|
|
14
7
|
displayName?: string;
|
|
@@ -74,4 +74,11 @@ export type NotificationHookReturnType = {
|
|
|
74
74
|
loading?: notificationHookFunction;
|
|
75
75
|
normal?: notificationHookFunction;
|
|
76
76
|
};
|
|
77
|
+
export type ConfigProps = {
|
|
78
|
+
maxCount?: number;
|
|
79
|
+
prefixCls?: string;
|
|
80
|
+
getContainer?: () => HTMLElement;
|
|
81
|
+
duration?: number;
|
|
82
|
+
rtl?: boolean;
|
|
83
|
+
};
|
|
77
84
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react/jsx-runtime';
|
|
2
|
-
import { ConfigProps } from '
|
|
3
|
-
import { NotificationHookReturnType } from './interface';
|
|
2
|
+
import { ConfigProps, NotificationHookReturnType } from './interface';
|
|
4
3
|
export type notificationFuncType = NotificationHookReturnType;
|
|
5
4
|
declare function useNotification(commonConfig?: ConfigProps): [NotificationHookReturnType, JSX.Element];
|
|
6
5
|
export default useNotification;
|
|
@@ -66,11 +66,6 @@ export interface PaginationProps {
|
|
|
66
66
|
* @en Whether to display the total number of data
|
|
67
67
|
*/
|
|
68
68
|
showTotal?: boolean | ((total: number, range: number[]) => ReactNode);
|
|
69
|
-
/**
|
|
70
|
-
* @zh 是否可以改变每页条数
|
|
71
|
-
* @en Is it possible to change page size
|
|
72
|
-
*/
|
|
73
|
-
sizeCanChange?: boolean;
|
|
74
69
|
/**
|
|
75
70
|
* @zh 每页可以显示数据条数
|
|
76
71
|
* @en The number of data items that can be displayed per page
|
|
@@ -128,7 +123,11 @@ export interface PaginationProps {
|
|
|
128
123
|
more?: ReactNode;
|
|
129
124
|
};
|
|
130
125
|
mini?: boolean;
|
|
131
|
-
|
|
126
|
+
/**
|
|
127
|
+
* @zh 是否显示每页条数,在 `simple` 模式下默认为 false
|
|
128
|
+
* @en Is it possible to change page size
|
|
129
|
+
*/
|
|
130
|
+
showPageOption?: boolean;
|
|
132
131
|
}
|
|
133
132
|
type itemRenderType = (page: number, type: 'page' | 'more' | 'prev' | 'next', originElement: ReactNode) => ReactNode;
|
|
134
133
|
export interface PagerProps {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Col from './Col';
|
|
2
|
+
declare const Row: import("react").ForwardRefExoticComponent<import("./interface").RowProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Item: import("react").ForwardRefExoticComponent<import("./interface").ColProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
Col: import("react").ForwardRefExoticComponent<import("./interface").ColProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
export { Col, Col as RowItem };
|
|
7
|
+
export default Row;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { CSSProperties, HTMLAttributes } from 'react';
|
|
2
|
+
import type { GridResponsiveBreakpoint } from '../grid/interface';
|
|
3
|
+
export type RowGutter = number | Partial<Record<GridResponsiveBreakpoint, number>>;
|
|
4
|
+
/**
|
|
5
|
+
* @title Row
|
|
6
|
+
*/
|
|
7
|
+
export interface RowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
className?: string | string[];
|
|
10
|
+
/**
|
|
11
|
+
* @zh
|
|
12
|
+
* 栅格间隔,单位是`px` 栅格间隔。可传入响应式对象写法 { xs: 4, sm: 6, md: 12},传入数组 [ 水平间距, 垂直间距 ] 来设置两个方向。
|
|
13
|
+
* @en
|
|
14
|
+
* Spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}.
|
|
15
|
+
* Or you can use array to make horizontal and vertical spacing work at the same time [horizontal, vertical]
|
|
16
|
+
* @defaultValue 0
|
|
17
|
+
*/
|
|
18
|
+
gutter?: RowGutter | Array<RowGutter>;
|
|
19
|
+
/**
|
|
20
|
+
* @zh 开启这个选项 `<Row>` 和 `<Col>` 都会被当作 div 而不会附带任何 Grid 相关的类和样式
|
|
21
|
+
* @en If true, `<Row>` and `<Col>` will be treated as a div without any Grid related classes and styles
|
|
22
|
+
*/
|
|
23
|
+
div?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @zh 竖直对齐方式 ( `align-items` )
|
|
26
|
+
* @en Vertical alignment, same as css `align-items`
|
|
27
|
+
* @defaultValue start
|
|
28
|
+
*/
|
|
29
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
30
|
+
/**
|
|
31
|
+
* @zh 水平对齐方式 (`justify-content`)
|
|
32
|
+
* @en Horizontal alignment, same as css `justify-content`
|
|
33
|
+
* @defaultValue start
|
|
34
|
+
*/
|
|
35
|
+
justify?: 'start' | 'center' | 'end' | 'space-around' | 'space-between';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @title 栅格布局列基础属性
|
|
39
|
+
* @title.en Grid Layout Base Properties
|
|
40
|
+
*/
|
|
41
|
+
export interface ColLayout {
|
|
42
|
+
/**
|
|
43
|
+
* @zh 栅格占位格数
|
|
44
|
+
* @en Raster number of cells to occupy
|
|
45
|
+
* @defaultValue 24
|
|
46
|
+
*/
|
|
47
|
+
span?: number;
|
|
48
|
+
/**
|
|
49
|
+
* @zh 栅格左侧的间隔格数,间隔内不可以有栅格
|
|
50
|
+
* @en The number of cells to offset Col from the left
|
|
51
|
+
*/
|
|
52
|
+
offset?: number;
|
|
53
|
+
order?: number;
|
|
54
|
+
push?: number;
|
|
55
|
+
pull?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @title 栅格响应式断点属性
|
|
59
|
+
* @title.en Grid Responsive Breakpoint Properties
|
|
60
|
+
*/
|
|
61
|
+
export interface ColResponsive {
|
|
62
|
+
/**
|
|
63
|
+
* @zh < 576px 响应式栅格
|
|
64
|
+
* @en `screen < 576px`
|
|
65
|
+
*/
|
|
66
|
+
xs?: number | ColLayout;
|
|
67
|
+
/**
|
|
68
|
+
* @zh >= 576px 响应式栅格
|
|
69
|
+
* @en `screen >= 576px`
|
|
70
|
+
*/
|
|
71
|
+
sm?: number | ColLayout;
|
|
72
|
+
/**
|
|
73
|
+
* @zh >= 768px 响应式栅格
|
|
74
|
+
* @en `screen >= 768px`
|
|
75
|
+
*/
|
|
76
|
+
md?: number | ColLayout;
|
|
77
|
+
/**
|
|
78
|
+
* @zh >= 992px 响应式栅格
|
|
79
|
+
* @en `screen >= 992px`
|
|
80
|
+
*/
|
|
81
|
+
lg?: number | ColLayout;
|
|
82
|
+
/**
|
|
83
|
+
* @zh >= 1200px 响应式栅格
|
|
84
|
+
* @en `screen >= 1200px`
|
|
85
|
+
*/
|
|
86
|
+
xl?: number | ColLayout;
|
|
87
|
+
/**
|
|
88
|
+
* @zh >= 1600px 响应式栅格
|
|
89
|
+
* @en `screen >= 1600px`
|
|
90
|
+
*/
|
|
91
|
+
xxl?: number | ColLayout;
|
|
92
|
+
/**
|
|
93
|
+
* @zh >= 2000px 响应式栅格
|
|
94
|
+
* @en `screen >= 2000px`
|
|
95
|
+
*/
|
|
96
|
+
xxxl?: number | ColLayout;
|
|
97
|
+
}
|
|
98
|
+
export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'ref'>, ColLayout, ColResponsive {
|
|
99
|
+
style?: CSSProperties;
|
|
100
|
+
className?: string | string[];
|
|
101
|
+
/**
|
|
102
|
+
* @zh 自定义断点配置,ColResponsiveProps 合集
|
|
103
|
+
* @en Custom breakpoints configuration
|
|
104
|
+
*/
|
|
105
|
+
breakpoints?: ColResponsive;
|
|
106
|
+
/**
|
|
107
|
+
* @zh 设置 flex 布局属性
|
|
108
|
+
* @en Set flex layout properties
|
|
109
|
+
*/
|
|
110
|
+
flex?: ColFlexType;
|
|
111
|
+
}
|
|
112
|
+
export type ColFlexType = string | number | 'auto' | 'none';
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* 支持多种样式变体、方向、尺寸和交互模式
|
|
6
|
-
*/
|
|
7
|
-
declare const Segmented: import("react").ForwardRefExoticComponent<SegmentedProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SegmentedProps, SegmentedRef } from './interface';
|
|
3
|
+
declare const Segmented: React.ForwardRefExoticComponent<SegmentedProps & React.RefAttributes<SegmentedRef>>;
|
|
8
4
|
export default Segmented;
|