@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.
Files changed (197) hide show
  1. package/App.js +7 -0
  2. package/BackTop.js +2 -4
  3. package/Calendar.js +2 -2
  4. package/ColorPicker.js +15 -14
  5. package/Constant.js +4 -0
  6. package/Copy.js +4 -3
  7. package/Countdown.js +25 -0
  8. package/Grid.js +8 -10
  9. package/LiquidFill.js +4 -3
  10. package/List.js +7 -6
  11. package/Marquee.js +4 -3
  12. package/Modal.js +4 -2
  13. package/PageHeader.js +3 -2
  14. package/QrCode.js +4 -3
  15. package/RowCol.js +8 -0
  16. package/Segmented.js +14 -4
  17. package/Statistic.js +5 -4
  18. package/Tour.js +4 -3
  19. package/Transfer.js +4 -2
  20. package/anchor/Link.js +1 -1
  21. package/app/App.js +26 -0
  22. package/app/context.js +9 -0
  23. package/app/index.js +9 -0
  24. package/app/interface.js +1 -0
  25. package/app/useApp.js +8 -0
  26. package/avatar/Group.js +1 -1
  27. package/back-top/index.js +44 -56
  28. package/button/index.js +52 -51
  29. package/calendar/Lunar.js +71 -0
  30. package/calendar/index.js +11 -11
  31. package/cascader/base/node.js +22 -20
  32. package/cascader/base/store.js +10 -10
  33. package/cascader/util.js +29 -27
  34. package/color-picker/Mode.js +8 -7
  35. package/color-picker/hooks/useColorPicker.js +56 -55
  36. package/color-picker/index.js +49 -48
  37. package/color-picker/utils.js +58 -57
  38. package/components/common/empty/index.js +2 -2
  39. package/components/common/flex/index.js +64 -55
  40. package/components/common/flex/interface.js +6 -6
  41. package/components/common/hooks/useInterval.js +6 -6
  42. package/components/common/icons/file/index.js +13 -11
  43. package/components/common/space/index.js +53 -53
  44. package/components/common/utils/dayjs.js +114 -126
  45. package/components/common/utils/is.js +98 -104
  46. package/components/common/utils/setDir.js +12 -0
  47. package/components/common/utils/setTheme.js +13 -13
  48. package/components/common/utils/toArray.js +7 -5
  49. package/config-provider/ConfigProvider.js +32 -30
  50. package/constant/index.js +4 -0
  51. package/copy/index.js +2 -1
  52. package/countdown/index.js +113 -0
  53. package/countdown/interface.js +1 -0
  54. package/countdown/util.js +29 -0
  55. package/descriptions/index.js +45 -45
  56. package/divider/index.js +28 -20
  57. package/dropdown/Button.js +1 -1
  58. package/empty/index.js +1 -1
  59. package/flex/index.js +30 -29
  60. package/form/FormItem.js +126 -122
  61. package/grid/Grid.js +56 -90
  62. package/grid/Item.js +44 -65
  63. package/grid/context.js +2 -6
  64. package/grid/index.js +6 -8
  65. package/grid/util.js +6 -44
  66. package/hooks/useResponsiveState.js +54 -0
  67. package/index.js +614 -605
  68. package/input/Button.js +12 -12
  69. package/input/Group.js +11 -12
  70. package/input/Input.js +112 -102
  71. package/input/InputElement.js +25 -24
  72. package/input/Search.js +24 -24
  73. package/layout/Sider.js +1 -1
  74. package/liquid-fill/index.js +4 -3
  75. package/list/Item.js +21 -21
  76. package/list/index.js +53 -52
  77. package/marquee/index.js +20 -19
  78. package/marquee-/index.js +4 -3
  79. package/mentions/util.js +9 -8
  80. package/modal/Confirm.js +17 -17
  81. package/modal/Modal.js +247 -237
  82. package/modal/index.js +4 -2
  83. package/modal/use-modal/index.js +2 -2
  84. package/package.json +1 -1
  85. package/page-header/index.js +57 -56
  86. package/pagination/Pagination.js +89 -92
  87. package/qr-code/index.js +4 -3
  88. package/radio/Group.js +1 -1
  89. package/row-col/Col-.js +88 -0
  90. package/row-col/Col.js +159 -0
  91. package/row-col/Row.js +73 -0
  92. package/row-col/context.js +5 -0
  93. package/row-col/index.js +11 -0
  94. package/row-col/interface.js +1 -0
  95. package/segmented/index.js +257 -206
  96. package/select/Select.js +191 -191
  97. package/select/util.js +50 -50
  98. package/select-view/Core.js +31 -28
  99. package/space/index.js +15 -13
  100. package/splitter/SplitBar.js +44 -46
  101. package/statistic/index.js +56 -55
  102. package/statistic/interface.js +4 -1
  103. package/style.css +1 -1
  104. package/table/Table.js +198 -210
  105. package/table/hook/useColumns.js +27 -26
  106. package/table/hook/useStickyClassNames.js +9 -8
  107. package/table/hook/useThResizable.js +4 -3
  108. package/table/th-resizable/index.js +2 -2
  109. package/table/thead/index.js +18 -16
  110. package/time-picker/util.js +20 -30
  111. package/timeline/Item.js +1 -1
  112. package/tour/index.js +4 -3
  113. package/transfer/index.js +93 -91
  114. package/trigger/index.js +66 -66
  115. package/types/common/development/interface.d.ts +3 -3
  116. package/types/common/flex/index.d.ts +3 -9
  117. package/types/common/flex/interface.d.ts +15 -4
  118. package/types/common/space/index.d.ts +3 -5
  119. package/types/common/space/interface.d.ts +2 -0
  120. package/types/common/utils/dayjs.d.ts +3 -1
  121. package/types/common/utils/is.d.ts +3 -4
  122. package/types/common/utils/setDir.d.ts +2 -0
  123. package/types/pc/app/App.d.ts +6 -0
  124. package/types/pc/app/context.d.ts +4 -0
  125. package/types/pc/app/index.d.ts +5 -0
  126. package/types/pc/app/interface.d.ts +17 -0
  127. package/types/pc/app/useApp.d.ts +3 -0
  128. package/types/pc/back-top/interface.d.ts +4 -17
  129. package/types/pc/button/interface.d.ts +2 -2
  130. package/types/pc/calendar/Lunar.d.ts +17 -0
  131. package/types/pc/calendar/index.d.ts +1 -1
  132. package/types/pc/config-provider/interface.d.ts +17 -12
  133. package/types/pc/constant/index.d.ts +1 -0
  134. package/types/pc/countdown/interface.d.ts +65 -0
  135. package/types/pc/countdown/util.d.ts +7 -0
  136. package/types/pc/divider/interface.d.ts +1 -0
  137. package/types/pc/flex/index.d.ts +8 -6
  138. package/types/pc/flex/interface.d.ts +3 -10
  139. package/types/pc/form/FormItem.d.ts +1 -1
  140. package/types/pc/form/interface.d.ts +1 -1
  141. package/types/pc/grid/Grid.d.ts +2 -4
  142. package/types/pc/grid/Item.d.ts +1 -5
  143. package/types/pc/grid/context.d.ts +4 -15
  144. package/types/pc/grid/index.d.ts +4 -6
  145. package/types/pc/grid/interface.d.ts +14 -142
  146. package/types/pc/grid/util.d.ts +1 -10
  147. package/types/pc/hooks/useResponsiveState.d.ts +3 -0
  148. package/types/pc/index.d.ts +10 -4
  149. package/types/pc/input/Button.d.ts +2 -2
  150. package/types/pc/list/interface.d.ts +2 -1
  151. package/types/pc/message/index.d.ts +1 -9
  152. package/types/pc/message/interface.d.ts +8 -0
  153. package/types/pc/message/useMessage.d.ts +1 -2
  154. package/types/pc/modal/Modal.d.ts +1 -0
  155. package/types/pc/modal/config.d.ts +1 -2
  156. package/types/pc/modal/index.d.ts +2 -1
  157. package/types/pc/modal/interface.d.ts +17 -5
  158. package/types/pc/notification/index.d.ts +2 -9
  159. package/types/pc/notification/interface.d.ts +7 -0
  160. package/types/pc/notification/useNotification.d.ts +1 -2
  161. package/types/pc/pagination/PageOption.d.ts +0 -1
  162. package/types/pc/pagination/interface.d.ts +5 -6
  163. package/types/pc/{grid → row-col}/Col-.d.ts +1 -1
  164. package/types/pc/{grid → row-col}/Col.d.ts +1 -2
  165. package/types/pc/{grid → row-col}/Row.d.ts +1 -2
  166. package/types/pc/row-col/context.d.ts +6 -0
  167. package/types/pc/row-col/index.d.ts +7 -0
  168. package/types/pc/row-col/interface.d.ts +112 -0
  169. package/types/pc/segmented/index.d.ts +3 -7
  170. package/types/pc/segmented/interface.d.ts +38 -5
  171. package/types/pc/select-view/Core.d.ts +1 -8
  172. package/types/pc/select-view/index.d.ts +1 -8
  173. package/types/pc/select-view/interface.d.ts +9 -2
  174. package/types/pc/space/index.d.ts +5 -7
  175. package/types/pc/space/interface.d.ts +3 -10
  176. package/types/pc/statistic/index.d.ts +1 -1
  177. package/types/pc/statistic/interface.d.ts +1 -49
  178. package/types/pc/utils/is.d.ts +1 -1
  179. package/types/pc/utils/names.d.ts +422 -111
  180. package/types/pc/utils/responsiveObserve.d.ts +8 -8
  181. package/typography/Ellipsis.js +5 -4
  182. package/typography/Operations.js +4 -3
  183. package/utils/dayjs.js +13 -11
  184. package/utils/index.js +245 -244
  185. package/utils/is.js +65 -66
  186. package/utils/names.js +309 -150
  187. package/utils/responsiveObserve.js +43 -36
  188. package/version/index.js +1 -1
  189. package/grid/Col-.js +0 -86
  190. package/grid/Col.js +0 -169
  191. package/grid/Row.js +0 -96
  192. package/grid/hook/useResponsiveState.js +0 -38
  193. package/statistic/Countdown.js +0 -56
  194. package/statistic/util.js +0 -33
  195. package/types/pc/grid/hook/useResponsiveState.d.ts +0 -2
  196. package/types/pc/statistic/util.d.ts +0 -1
  197. /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 GridRowGutter = 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?: 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
- __index__?: number;
192
- children?: ReactNode | ((info: {
193
- overflow: boolean;
194
- }) => ReactNode);
67
+ children?: ReactNode;
195
68
  }
196
69
  export interface GridItemData extends GridItemProps {
197
- span: number;
198
- offset: number;
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';
@@ -1,11 +1,2 @@
1
1
  import { GridItemData } from './interface';
2
- export declare function resolveItemData(cols: number, { span, offset, suffix }: GridItemData): GridItemData;
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;
@@ -0,0 +1,3 @@
1
+ export declare function isResponsiveValue(value: unknown): boolean;
2
+ export declare function useResponsive(enabled?: boolean): Partial<Record<import("..").Breakpoint, boolean>>;
3
+ export declare function useResponsiveState(value: unknown, defaultValue?: number): unknown;
@@ -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 { Col, default as Grid, GridCol, GridItem, GridRow, Row } from './grid';
62
- export type { ColProps, GridItemProps, GridProps, RowProps, } from './grid/interface';
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 { CountdownProps, StatisticProps } from './statistic/interface';
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 Button: React.ForwardRefExoticComponent<InputButtonProps & React.RefAttributes<RefInputType>>;
4
- export default Button;
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 { ColProps, GridResponsiveBreakpoint, RowProps } from '../grid/interface';
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<Function>;
9
+ export declare const destroyList: Array<() => void>;
@@ -1,3 +1,4 @@
1
- import Modal from './Modal';
1
+ import Modal, { useModal } from './Modal';
2
+ export { useModal };
2
3
  export default Modal;
3
4
  export type { ModalComponent, ModalProps, ModalReturnProps } from './Modal';
@@ -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: Function;
167
- close: Function;
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;
@@ -3,7 +3,6 @@ import { SelectProps } from '../select/interface';
3
3
  export interface PageOptionProps {
4
4
  disabled?: boolean;
5
5
  rootPrefixCls?: string;
6
- sizeCanChange?: boolean;
7
6
  sizeOptions?: number[];
8
7
  onPageSizeChange?: (value: any) => void;
9
8
  pageSize?: number;
@@ -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
- pageOption?: boolean | ReactNode;
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 {
@@ -1,4 +1,4 @@
1
- import { ColProps } from './interface';
1
+ import type { ColProps } from './interface';
2
2
  declare const Col: import("react").ForwardRefExoticComponent<ColProps & import("react").RefAttributes<unknown>>;
3
3
  export default Col;
4
4
  export type { ColProps };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { ColProps } from './interface';
2
+ import type { ColProps } from './interface';
3
3
  declare const Col: React.ForwardRefExoticComponent<ColProps & React.RefAttributes<HTMLDivElement>>;
4
4
  export default Col;
5
- export type { ColProps };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { RowProps } from './interface';
2
+ import type { RowProps } from './interface';
3
3
  declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<HTMLDivElement>>;
4
4
  export default Row;
5
- export type { RowProps };
@@ -0,0 +1,6 @@
1
+ type RowContextType = {
2
+ gutter?: [number, number];
3
+ div?: boolean;
4
+ };
5
+ export declare const RowContext: import("react").Context<RowContextType>;
6
+ export {};
@@ -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 type { SegmentedProps } from './interface';
2
- /**
3
- * Segmented 分段控制器组件
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;