@unicom-cloud/ui 0.8.99 → 0.8.100

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 (136) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +7 -6
  3. package/Copy.js +49 -2
  4. package/Flex.js +12 -0
  5. package/Grid.js +1 -1
  6. package/LiquidFill.js +3 -2
  7. package/Marquee.js +3 -2
  8. package/QrCode.js +3 -2
  9. package/Splitter.js +4 -5
  10. package/Tag.js +3 -2
  11. package/Tour.js +3 -2
  12. package/alert/index.js +38 -39
  13. package/anchor/index.js +5 -3
  14. package/badge/index.js +19 -18
  15. package/copy/index.js +83 -35
  16. package/flex/index.js +59 -0
  17. package/flex/interface.js +34 -0
  18. package/flex/utils.js +13 -0
  19. package/grid/{GridItem.js → Item.js} +15 -15
  20. package/grid/index.js +1 -1
  21. package/index.js +503 -493
  22. package/input/Button.js +39 -34
  23. package/input/Textarea.js +108 -104
  24. package/liquid-fill/index.js +3 -2
  25. package/marquee/index.js +3 -2
  26. package/package.json +1 -1
  27. package/qr-code/index.js +3 -2
  28. package/segmented/index.js +112 -104
  29. package/spin/index.js +75 -62
  30. package/splitter/Panel.js +39 -0
  31. package/splitter/SplitBar.js +157 -0
  32. package/splitter/Splitter.js +139 -0
  33. package/splitter/hooks/useEvent.js +12 -0
  34. package/splitter/hooks/useItems.js +26 -0
  35. package/splitter/hooks/useResizable.js +26 -0
  36. package/splitter/hooks/useResize.js +68 -0
  37. package/splitter/hooks/useSizes.js +60 -0
  38. package/splitter/index.js +5 -115
  39. package/style.css +1 -1
  40. package/table/Table.js +1 -1
  41. package/table/hook/useThResizable.js +72 -26
  42. package/table/tbody/Td.js +80 -77
  43. package/table/th-resizable/index.js +92 -35
  44. package/tag/index.js +42 -41
  45. package/tooltip/index.js +89 -82
  46. package/tour/index.js +5 -6
  47. package/types/common/space/index.d.ts +2 -1
  48. package/types/pc/affix/interface.d.ts +0 -2
  49. package/types/pc/alert/index.d.ts +2 -2
  50. package/types/pc/anchor/index.d.ts +2 -1
  51. package/types/pc/anchor/interface.d.ts +0 -2
  52. package/types/pc/auto-complete/interface.d.ts +0 -6
  53. package/types/pc/avatar/interface.d.ts +0 -4
  54. package/types/pc/breadcrumb/interface.d.ts +0 -3
  55. package/types/pc/carousel/interface.d.ts +2 -6
  56. package/types/pc/cascader/interface.d.ts +6 -18
  57. package/types/pc/checkbox/interface.d.ts +0 -1
  58. package/types/pc/collapse/interface.d.ts +0 -2
  59. package/types/pc/color-picker/interface.d.ts +0 -2
  60. package/types/pc/config-provider/interface.d.ts +13 -17
  61. package/types/pc/copy/interface.d.ts +2 -1
  62. package/types/pc/date-picker/interface.d.ts +0 -17
  63. package/types/pc/descriptions/interface.d.ts +0 -1
  64. package/types/pc/drawer/interface.d.ts +0 -7
  65. package/types/pc/dropdown/interface.d.ts +0 -1
  66. package/types/pc/flex/index.d.ts +9 -0
  67. package/types/pc/flex/interface.d.ts +61 -0
  68. package/types/pc/flex/utils.d.ts +9 -0
  69. package/types/pc/form/interface.d.ts +9 -22
  70. package/types/pc/form/util.d.ts +1 -1
  71. package/types/pc/grid/index.d.ts +3 -3
  72. package/types/pc/grid/interface.d.ts +1 -6
  73. package/types/pc/image/interface.d.ts +0 -13
  74. package/types/pc/index.d.ts +6 -2
  75. package/types/pc/input/Textarea.d.ts +2 -6
  76. package/types/pc/input/interface.d.ts +5 -13
  77. package/types/pc/input-number/interface.d.ts +0 -4
  78. package/types/pc/input-tag/interface.d.ts +0 -13
  79. package/types/pc/layout/interface.d.ts +0 -1
  80. package/types/pc/link/interface.d.ts +0 -1
  81. package/types/pc/list/interface.d.ts +0 -4
  82. package/types/pc/menu/interface.d.ts +0 -8
  83. package/types/pc/message/interface.d.ts +0 -2
  84. package/types/pc/modal/interface.d.ts +0 -5
  85. package/types/pc/notification/interface.d.ts +0 -1
  86. package/types/pc/pagination/interface.d.ts +0 -2
  87. package/types/pc/popconfirm/interface.d.ts +8 -10
  88. package/types/pc/popover/interface.d.ts +0 -1
  89. package/types/pc/progress/interface.d.ts +0 -3
  90. package/types/pc/resize-box/interface.d.ts +1 -7
  91. package/types/pc/select/interface.d.ts +0 -12
  92. package/types/pc/select-view/interface.d.ts +0 -7
  93. package/types/pc/slider/interface.d.ts +0 -4
  94. package/types/pc/space/index.d.ts +1 -0
  95. package/types/pc/spin/interface.d.ts +4 -1
  96. package/types/pc/splitter/Panel.d.ts +8 -0
  97. package/types/pc/splitter/SplitBar.d.ts +21 -0
  98. package/types/pc/splitter/Splitter.d.ts +4 -0
  99. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  100. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  101. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  102. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  103. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  104. package/types/pc/splitter/index.d.ts +8 -4
  105. package/types/pc/splitter/interface.d.ts +181 -38
  106. package/types/pc/statistic/interface.d.ts +0 -4
  107. package/types/pc/steps/interface.d.ts +0 -3
  108. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  109. package/types/pc/table/interface.d.ts +4 -15
  110. package/types/pc/tabs/interface.d.ts +0 -7
  111. package/types/pc/tag/index.d.ts +2 -0
  112. package/types/pc/tag/interface.d.ts +0 -1
  113. package/types/pc/time-picker/interface.d.ts +0 -7
  114. package/types/pc/tooltip/interface.d.ts +4 -1
  115. package/types/pc/transfer/interface.d.ts +2 -9
  116. package/types/pc/tree/interface.d.ts +2 -8
  117. package/types/pc/tree-select/interface.d.ts +0 -8
  118. package/types/pc/trigger/interface.d.ts +0 -5
  119. package/types/pc/typography/EditContent.d.ts +2 -1
  120. package/types/pc/typography/interface.d.ts +45 -30
  121. package/types/pc/upload/interface.d.ts +6 -11
  122. package/types/pc/utils/index.d.ts +1 -0
  123. package/types/pc/utils/names.d.ts +6 -0
  124. package/types/pc/utils/toArray.d.ts +7 -0
  125. package/types/pc/verification-code/interface.d.ts +0 -2
  126. package/types/pc/watermark/interface.d.ts +0 -2
  127. package/typography/Base.js +73 -73
  128. package/typography/EditContent.js +43 -33
  129. package/typography/Ellipsis.js +117 -184
  130. package/typography/Operations.js +97 -49
  131. package/typography/useCssEllipsis.js +7 -6
  132. package/utils/index.js +117 -115
  133. package/utils/names.js +4 -0
  134. package/utils/toArray.js +12 -0
  135. package/version/index.js +1 -1
  136. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
@@ -69,7 +69,6 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
69
69
  * @zh 是否在 required 的时候显示加重的红色星号,设置 position 可选择将星号置于 label 前/后
70
70
  * @en Whether show red symbol when item is required,Set position props, you can choose to place the symbol before/after the label
71
71
  * @defaultValue true
72
- * @version `position` in 2.24.0
73
72
  */
74
73
  requiredSymbol?: boolean | {
75
74
  position: 'start' | 'end';
@@ -91,7 +90,6 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
91
90
  * @en
92
91
  * When to trigger verification.
93
92
  * @defaultValue onChange
94
- * @version 2.28.0
95
93
  */
96
94
  validateTrigger?: string | string[];
97
95
  /**
@@ -121,19 +119,18 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
121
119
  */
122
120
  disabled?: boolean;
123
121
  /**
124
- * @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。(`ReactNode` in `v2.41.0`)
125
- * @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.(`ReactNode` in `v2.41.0`)
122
+ * @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。
123
+ * @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.
126
124
  */
127
125
  colon?: boolean | ReactNode;
128
126
  /**
129
- * @zh 验证失败后滚动到第一个错误字段。(`ScrollIntoViewOptions` 类型在 `2.19.0` 开始支持)
130
- * @en Whether scroll to first error item after validation fails. (`ScrollIntoViewOptions` is supported at `2.19.0`)
127
+ * @zh 验证失败后滚动到第一个错误字段。
128
+ * @en Whether scroll to first error item after validation fails.
131
129
  */
132
130
  scrollToFirstError?: boolean | ScrollIntoViewOptions;
133
131
  /**
134
132
  * @zh 校验提示信息模板 [demo](/react/component/form#表单校验信息模板)
135
133
  * @en validation prompt template [demo](/react/en-US/component/form#validate%20messages)
136
- * @version 2.32.0
137
134
  */
138
135
  validateMessages?: Partial<{
139
136
  [key in keyof ValidateMessagesTemplateType]: ValidateMessagesTemplateType[key] extends string ? ValidateMessagesTemplateType[key] | ((data: any, { label }: {
@@ -155,7 +152,6 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
155
152
  /**
156
153
  * @zh 数据验证失败后回调事件
157
154
  * @en Callback when validate fail
158
- * @version 2.21.0
159
155
  */
160
156
  onSubmitFailed?: (errors: {
161
157
  [key: string]: FieldError;
@@ -213,7 +209,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
213
209
  /**
214
210
  * @zh 提示文本
215
211
  * @en Tooltip text
216
- * @version 2.43.0
217
212
  */
218
213
  tooltip?: ReactNode | (TooltipProps & {
219
214
  icon?: ReactElement;
@@ -232,8 +227,8 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
232
227
  */
233
228
  wrapperCol?: ColProps;
234
229
  /**
235
- * @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。(`ReactNode` in `v2.41.0`)
236
- * @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.(`ReactNode` in `v2.41.0`)
230
+ * @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。
231
+ * @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.
237
232
  */
238
233
  colon?: boolean | ReactNode;
239
234
  /**
@@ -261,7 +256,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
261
256
  /**
262
257
  * @zh 指定在子节点触发`onChange`事件时如何处理值。(如果自定义了`trigger`属性,那么这里的参数就是对应的事件回调函数的参数类型)
263
258
  * @en Specify how to handle the value when the child node triggers the `onChange` event. (If the `trigger` attribute is customized, then the parameter here is the parameter type of the corresponding event callback function)
264
- * @version 2.23.0
265
259
  */
266
260
  getValueFromEvent?: (...args: any[]) => FieldValue;
267
261
  /**
@@ -279,10 +273,10 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
279
273
  /**
280
274
  * @zh
281
275
  * 不渲染任何外部标签/样式,只进行字段绑定。**注意**: 设置该属性为true时,该字段若未通过校验,
282
- * 错误信息将不会显示出来。可以传入对象,并设置 showErrorTip `2.5.0` 开始支持) 为true,错误信息将会展示在上层 formItem 节点下。
276
+ * 错误信息将不会显示出来。可以传入对象,并设置 showErrorTip 为true,错误信息将会展示在上层 formItem 节点下。
283
277
  * @en
284
278
  * No external tags/styles are rendered, only binding field. **Notice**: When set to true, if the field verification failed,
285
- * the error message will not be displayed. You can pass in an object and set showErrorTip to true(Support at `2.5.0`),
279
+ * the error message will not be displayed. You can pass in an object and set showErrorTip to true,
286
280
  * The error message will be displayed under the upper formItem node
287
281
  */
288
282
  noStyle?: boolean | {
@@ -299,7 +293,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
299
293
  /**
300
294
  * @zh 隐藏表单项. 表单字段值仍然会被获取
301
295
  * @en hide the form item
302
- * @version
303
296
  */
304
297
  hidden?: boolean;
305
298
  /**
@@ -330,13 +323,11 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
330
323
  /**
331
324
  * @zh 将Form内保存的当前控件对应的值进行一定的转换,再传递给控件。
332
325
  * @en Convert the `value` of the FormItem to children;
333
- * @version 2.23.0
334
326
  */
335
327
  formatter?: (value: FieldValue | undefined) => any;
336
328
  /**
337
329
  * @zh 设置依赖字段。当依赖的字段值改变时,触发自身的校验。如果是想动态渲染某个表单控件/表单区域,使用 shouldUpdate
338
330
  * @en the dependency fields. When the value of the dependent field changes, trigger its own validation.If you want to dynamically render a form control/form area, use shouldUpdate
339
- * @version 2.40.0
340
331
  */
341
332
  dependencies?: string[];
342
333
  /**
@@ -363,7 +354,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
363
354
  * @zh 是否在 required 的时候显示加重的红色星号,设置 position 可选择将星号置于 label 前/后
364
355
  * @en Whether show red symbol when item is required,Set position props, you can choose to place the symbol before/after the label
365
356
  * @defaultValue true
366
- * @version `position` in 2.24.0
367
357
  */
368
358
  requiredSymbol?: boolean | {
369
359
  position: 'start' | 'end';
@@ -417,19 +407,16 @@ export interface FormListProps<SubFieldValue = any, SubFieldKey extends KeyType
417
407
  /**
418
408
  * @zh 初始值
419
409
  * @en Default value
420
- * @version 2.22.0
421
410
  */
422
411
  initialValue?: SubFieldValue[];
423
412
  /**
424
413
  * @zh FormItemProps['noStyle']. `rules` 存在时默认为 `false`(需要渲染校验信息),否则默认为 `true`
425
414
  * @en FormItemProps['noStyle'].Defaults to `false` when `rules` exists (requires rendering validation information), otherwise defaults to `true`
426
- * @version 2.46.0
427
415
  */
428
416
  noStyle?: FormItemProps['noStyle'];
429
417
  /**
430
418
  * @zh 受控模式下的验证规则,[RulesProps](#rules)
431
419
  * @en Validation rules in controlled component, [RulesProps](#rules)
432
- * @version 2.46.0
433
420
  */
434
421
  rules?: RulesProps<SubFieldValue[]>[];
435
422
  /**
@@ -502,7 +489,7 @@ export declare const VALIDATE_STATUS: {
502
489
  validating: string;
503
490
  };
504
491
  /**
505
- * @title Form.Provider(`2.30.0`)
492
+ * @title Form.Provider
506
493
  */
507
494
  export interface FormProviderProps {
508
495
  /**
@@ -1,4 +1,4 @@
1
- import { PropertyPath } from 'lodash';
1
+ import type { PropertyPath } from 'lodash';
2
2
  import { ReactNode } from 'react';
3
3
  import { RulesProps } from '../form/interface';
4
4
  import { FormProps, IndexedObject } from './interface';
@@ -1,12 +1,12 @@
1
1
  import Col from './Col';
2
2
  import OriginGrid from './Grid';
3
- import GridItem from './GridItem';
3
+ import Item from './Item';
4
4
  import Row from './Row';
5
5
  declare const Grid: typeof OriginGrid & {
6
6
  Col: typeof Col;
7
7
  Row: typeof Row;
8
- Item: typeof GridItem;
8
+ Item: typeof Item;
9
9
  };
10
- export { Col, Col as GridCol, GridItem, Row as GridRow, Row };
10
+ export { Col, Col as GridCol, Item as GridItem, Row as GridRow, Row };
11
11
  export default Grid;
12
12
  export type { ColProps, GridProps, ResponsiveValue, RowProps, } from './interface';
@@ -13,7 +13,6 @@ export interface RowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
13
13
  * @en
14
14
  * Spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}.
15
15
  * Or you can use array to make horizontal and vertical spacing work at the same time [horizontal, vertical]
16
- * @version vertical gutter in 2.5.0
17
16
  * @defaultValue 0
18
17
  */
19
18
  gutter?: GridRowGutter | Array<GridRowGutter>;
@@ -60,13 +59,11 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
60
59
  /**
61
60
  * @zh 对元素进行排序
62
61
  * @en Raster order
63
- * @version 2.20.0
64
62
  */
65
63
  push?: number;
66
64
  /**
67
65
  * @zh 对元素进行排序
68
66
  * @en Raster order
69
- * @version 2.20.0
70
67
  */
71
68
  pull?: number;
72
69
  /**
@@ -114,7 +111,6 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
114
111
  /**
115
112
  * @zh >= 2000px 响应式栅格
116
113
  * @en `screen >= 2000px`
117
- * @version 2.40.0
118
114
  */
119
115
  xxxl?: number | {
120
116
  [key: string]: any;
@@ -122,7 +118,6 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
122
118
  /**
123
119
  * @zh 设置 flex 布局属性
124
120
  * @en Set flex layout properties
125
- * @version 2.26.0
126
121
  */
127
122
  flex?: FlexType;
128
123
  }
@@ -164,7 +159,7 @@ export interface GridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
164
159
  collapsedRows?: number;
165
160
  }
166
161
  /**
167
- * @title GridItem
162
+ * @title Item
168
163
  */
169
164
  export interface GridItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
170
165
  style?: CSSProperties;
@@ -76,13 +76,11 @@ export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'c
76
76
  /**
77
77
  * @zh 使用 `Image.PreviewGroup`包裹时的预览索引,一般不用指定,当多图预览顺序出现问题时,可手动指定当前 `image` 的预览顺序
78
78
  * @en Use `Image.PreviewGroup` to wrap the preview index. Generally, you don't need to specify it. When there is a problem with the preview order of multiple images, you can manually specify the preview order of the current `image`
79
- * @version 2.23.0
80
79
  */
81
80
  index?: number;
82
81
  /**
83
82
  * @zh 开启懒加载 [Intersection_Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
84
83
  * @en lazyload loading [Intersection_Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
85
- * @version 2.47.0
86
84
  */
87
85
  lazyload?: boolean | IntersectionObserverInit;
88
86
  /**
@@ -110,13 +108,11 @@ export interface ImagePreviewProps {
110
108
  /**
111
109
  * @zh 图片属性,透传至预览弹窗中的 `img` 标签上
112
110
  * @en Image props, passthrough to the `img` tag in the preview modal
113
- * @version 2.39.0
114
111
  */
115
112
  imgAttributes?: Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'>;
116
113
  /**
117
114
  * @zh 自定义图片预览区域的额外节点
118
115
  * @en Additional nodes add to the image preview area
119
- * @version 2.53.0
120
116
  */
121
117
  extra?: ReactNode;
122
118
  /**
@@ -145,7 +141,6 @@ export interface ImagePreviewProps {
145
141
  * @zh 是否显示关闭按钮
146
142
  * @en Whether display close button
147
143
  * @defaultValue true
148
- * @version 2.16.0
149
144
  */
150
145
  closable?: boolean;
151
146
  /**
@@ -163,7 +158,6 @@ export interface ImagePreviewProps {
163
158
  * @zh 在预览缩放时会使用当前数组中的缩放百分比。若不包含 `100%`,则会自动添加在最相邻的位置。
164
159
  * @en The zoom percentage in the current array is used when previewing zooms. If `100%` is not included, the `100%` scale will be automatically added in the most adjacent position.
165
160
  * @defaultValue [25, 33, 50, 67, 75, 80, 90, 100, 110, 125, 150, 175, 200, 250, 300, 400, 500];
166
- * @version 2.30.0
167
161
  */
168
162
  scales?: number[];
169
163
  /**
@@ -175,35 +169,29 @@ export interface ImagePreviewProps {
175
169
  * @zh 弹出层挂载的节点
176
170
  * @en Get popup's parent node
177
171
  * @defaultValue () => document.body
178
- * @version 2.16.0
179
172
  */
180
173
  getPopupContainer?: () => HTMLElement;
181
174
  /**
182
175
  * @zh 按 `ESC` 键关闭预览
183
176
  * @en Whether to enable pressing `ESC` to close the preview.
184
177
  * @defaultValue true
185
- * @version 2.24.0
186
178
  */
187
179
  escToExit?: boolean;
188
180
  /**
189
181
  * @zh 自定义 IMG 元素的渲染
190
182
  * @en Rendering of custom IMG elements
191
- * @version 2.58.0
192
183
  */
193
184
  imageRender?: (originalNode: ReactElement) => ReactNode;
194
185
  /**
195
186
  * @zh 开启位置修正
196
187
  * @en Enable position correction
197
188
  * @defaultValue true
198
- * @version 2.61.0
199
189
  */
200
190
  resetTranslate?: boolean;
201
191
  }
202
192
  export type PartialImagePreviewProps = Partial<ImagePreviewProps>;
203
193
  /**
204
194
  * @title Image.PreviewGroup
205
- * @zh 从 `v2.14.0` 开始支持
206
- * @en Start from `v2.14.0`
207
195
  */
208
196
  export interface ImagePreviewGroupProps extends Omit<PartialImagePreviewProps, 'src'> {
209
197
  /**
@@ -229,7 +217,6 @@ export interface ImagePreviewGroupProps extends Omit<PartialImagePreviewProps, '
229
217
  /**
230
218
  * @zh 是否渲染图片列表,用于提前加载图片
231
219
  * @en Whether to render the image list for loading images in advance
232
- * @version 2.58.0
233
220
  */
234
221
  forceRender?: boolean;
235
222
  /**
@@ -2,7 +2,7 @@ export * from './hooks';
2
2
  export * from './utils';
3
3
  export { default as Affix } from './affix';
4
4
  export { default as Alert } from './alert';
5
- export { default as Anchor, AnchorLink } from './anchor';
5
+ export { default as Anchor, AnchorLink, findAnchorLinkNode } from './anchor';
6
6
  export { default as AutoComplete, AutoCompleteOptGroup, AutoCompleteOption, } from './auto-complete';
7
7
  export { default as Avatar, AvatarGroup } from './avatar';
8
8
  export { default as BackTop } from './back-top';
@@ -73,6 +73,8 @@ export type { DividerProps } from './divider/interface';
73
73
  export type { DrawerProps } from './drawer/interface';
74
74
  export type { DropdownButtonProps, DropdownProps } from './dropdown/interface';
75
75
  export type { EmptyProps } from './empty/interface';
76
+ export { default as Flex, FlexVertical } from './flex';
77
+ export type { FlexProps } from './flex/interface';
76
78
  export type { FormInstance, FormItemProps, FormListProps, FormProps, RulesProps, } from './form/interface';
77
79
  export type { ColProps, GridItemProps, GridProps, RowProps, } from './grid/interface';
78
80
  export { default as IconHover } from './icon-hover';
@@ -122,6 +124,8 @@ export type { SpaceGap, SpaceProps } from './space/interface';
122
124
  export { default as SpeechSynthesis } from './speech-synthesis';
123
125
  export { default as Spin } from './spin';
124
126
  export type { SpinProps } from './spin/interface';
127
+ export { default as Splitter } from './splitter';
128
+ export type { SplitterProps } from './splitter/interface';
125
129
  export { default as Statistic, StatisticCountdown } from './statistic';
126
130
  export type { CountdownProps, StatisticProps } from './statistic/interface';
127
131
  export { default as Steps, StepsItem, StepsStep } from './steps';
@@ -134,7 +138,7 @@ export type { ColumnProps as TableColumnProps, TableProps, RowSelectionProps as
134
138
  export type { TableInstance } from './table/Table';
135
139
  export { TabPane, default as Tabs, TabsTabPane } from './tabs';
136
140
  export type { TabsProps } from './tabs/interface';
137
- export { default as Tag } from './tag';
141
+ export { default as Tag, TAG_COLORS } from './tag';
138
142
  export type { TagProps } from './tag/interface';
139
143
  export { default as TimePicker, TimePickerRange } from './time-picker';
140
144
  export type { TimePickerProps, RangePickerProps as TimeRangePickerProps, } from './time-picker/interface';
@@ -1,12 +1,8 @@
1
1
  import React from 'react';
2
- import { TextAreaProps } from './interface';
2
+ import { TextAreaProps, type RefInputType } from './interface';
3
3
  export type RefTextAreaType = {
4
- /** 使输入框失去焦点 */
5
- blur: () => void;
6
- /** 使输入框获取焦点 */
7
- focus: () => void;
8
4
  /** textarea dom元素 */
9
5
  dom: HTMLTextAreaElement;
10
- };
6
+ } & RefInputType;
11
7
  declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<RefTextAreaType>>;
12
8
  export default TextArea;
@@ -43,13 +43,11 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
43
43
  /**
44
44
  * @zh 状态
45
45
  * @en Status
46
- * @version 2.45.0
47
46
  */
48
- status?: 'error' | 'warning';
47
+ status?: 'error' | 'warning' | 'success';
49
48
  /**
50
49
  * @zh 设置宽度自适应。minWidth 默认为 0,maxWidth 默认为 100%
51
50
  * @en auto width. minWidth defaults to 0, maxWidth defaults to 100%
52
- * @version 2.54.0
53
51
  */
54
52
  autoWidth?: boolean | {
55
53
  minWidth?: CSSProperties['minWidth'];
@@ -74,14 +72,12 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
74
72
  /**
75
73
  * @zh 指定 normalize 执行的时机
76
74
  * @en Specify the timing of normalize execution
77
- * @version 2.50.0
78
75
  * @defaultValue ['onBlur']
79
76
  */
80
77
  normalizeTrigger?: ('onBlur' | 'onPressEnter')[];
81
78
  /**
82
79
  * @zh 在指定时机对用户输入的值进行格式化处理。前后值不一致时,会触发 onChange
83
80
  * @en Format the value entered by the user at the specified time, and when the previous and subsequent values are inconsistent, onChange will be triggered
84
- * @version 2.50.0
85
81
  */
86
82
  normalize?: (value: string) => string;
87
83
  /**
@@ -133,7 +129,6 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
133
129
  /**
134
130
  * @zh 输入框最大输入的长度;设置 `errorOnly`为 `true` 后,超过 `maxLength` 会展示 `error` 状态,并不限制用户输入。
135
131
  * @en The max content length;After setting `errorOnly` to `true`, if `maxLength` is exceeded, the `error` status will be displayed, and user input will not be restricted.
136
- * @version `errorOnly` in 2.23.0
137
132
  */
138
133
  maxLength?: number | {
139
134
  length: number;
@@ -147,7 +142,6 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
147
142
  /**
148
143
  * @zh `allowClear` 时配置清除按钮的图标。
149
144
  * @en Configure the icon of the clear button when `allowClear`.
150
- * @version 2.50.0
151
145
  */
152
146
  clearIcon?: ReactNode;
153
147
  }
@@ -185,6 +179,10 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
185
179
  minRows?: number;
186
180
  maxRows?: number;
187
181
  };
182
+ /**
183
+ * @zh 用于设置元素是否可调整尺寸,以及可调整的方向
184
+ */
185
+ resize?: 'none' | 'both' | 'horizontal' | 'vertical' | 'block' | 'inline' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';
188
186
  /**
189
187
  * @zh 是否是错误状态。(废弃,下个大版本移除,使用 status='error' 替代)
190
188
  * @en Whether the textarea is error.(Deprecated, removed in the next major version, use status='error' instead)
@@ -194,7 +192,6 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
194
192
  /**
195
193
  * @zh 状态
196
194
  * @en Status
197
- * @version 2.45.0
198
195
  */
199
196
  status?: 'error' | 'warning';
200
197
  /**
@@ -215,7 +212,6 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
215
212
  /**
216
213
  * @zh 输入框最大输入的长度;设置 `errorOnly`为 `true` 后,超过 `maxLength` 会展示 `error` 状态,并不限制用户输入。
217
214
  * @en The max content length;After setting `errorOnly` to `true`, if `maxLength` is exceeded, the `error` status will be displayed, and user input will not be restricted.
218
- * @version `errorOnly` in 2.23.0
219
215
  */
220
216
  maxLength?: number | {
221
217
  length: number;
@@ -225,19 +221,16 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
225
221
  /**
226
222
  * @zh 允许清空输入框
227
223
  * @en Whether allow clear the content
228
- * @version 2.2.0
229
224
  */
230
225
  allowClear?: boolean;
231
226
  /**
232
227
  * @zh 点击清除按钮的回调
233
228
  * @en Callback when click clear button
234
- * @version 2.2.0
235
229
  */
236
230
  onClear?: () => void;
237
231
  /**
238
232
  * @zh `allowClear` 时配置清除按钮的图标。
239
233
  * @en Configure the icon of the clear button when `allowClear`.
240
- * @version 2.50.0
241
234
  */
242
235
  clearIcon?: ReactNode;
243
236
  }
@@ -289,7 +282,6 @@ export interface InputSearchProps extends InputButtonProps {
289
282
  /**
290
283
  * @zh 搜索按钮
291
284
  * @en Search button
292
- * @version `ReactNode` in 2.6.0
293
285
  */
294
286
  searchButton?: boolean | ReactNode;
295
287
  }
@@ -42,13 +42,11 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
42
42
  /**
43
43
  * @zh 是否只读
44
44
  * @en Whether input is readonly
45
- * @version 2.17.0
46
45
  */
47
46
  readOnly?: boolean;
48
47
  /**
49
48
  * @zh 严格模式下,`onChange` 回调将返回字符串类型
50
49
  * @en `onChange` will return a string in strict mode
51
- * @version 2.42.0
52
50
  */
53
51
  strictMode?: boolean;
54
52
  /**
@@ -90,7 +88,6 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
90
88
  /**
91
89
  * @zh 定义输入框展示值
92
90
  * @en Specifies the format of the value presented
93
- * @version Param `info` in `2.41.0`
94
91
  */
95
92
  formatter?: (value: number | string, info: {
96
93
  userTyping: boolean;
@@ -105,7 +102,6 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
105
102
  /**
106
103
  * @zh 变化回调
107
104
  * @en Callback when the value changes
108
- * @version `reason` in 2.61.0
109
105
  */
110
106
  onChange?: (value: number, reason?: InputNumberValueChangeReason) => void;
111
107
  /**
@@ -31,7 +31,6 @@ export interface InputTagProps<T = unknown> {
31
31
  /**
32
32
  * @zh 状态
33
33
  * @en Status
34
- * @version 2.45.0
35
34
  */
36
35
  status?: 'error' | 'warning';
37
36
  /**
@@ -57,14 +56,12 @@ export interface InputTagProps<T = unknown> {
57
56
  /**
58
57
  * @zh 是否为内部标签变化添加动画。
59
58
  * @en Whether to add animation for internal label changes
60
- * @version 2.15.0
61
59
  * @defaultValue true
62
60
  */
63
61
  animation?: boolean;
64
62
  /**
65
63
  * @zh 是否在失焦时自动存储正在输入的文本
66
64
  * @en Whether to automatically store the text entering when blur InputTag
67
- * @version 2.25.0
68
65
  */
69
66
  saveOnBlur?: boolean;
70
67
  /**
@@ -90,13 +87,11 @@ export interface InputTagProps<T = unknown> {
90
87
  /**
91
88
  * @zh 是否可以通过拖拽为 Tag 排序
92
89
  * @en Weather it is possible to sort tags by drag
93
- * @version 2.27.0
94
90
  */
95
91
  dragToSort?: boolean;
96
92
  /**
97
93
  * @zh 最多显示多少个 `tag`
98
94
  * @en The maximum number of `tags` is displayed
99
- * @version 2.59.0. `responsive ` in `2.62.0`
100
95
  */
101
96
  maxTagCount?: number | 'responsive' | {
102
97
  count: number | 'responsive';
@@ -106,7 +101,6 @@ export interface InputTagProps<T = unknown> {
106
101
  /**
107
102
  * @zh 添加前缀文字或者图标
108
103
  * @en The prefix icon or text for the input-tag
109
- * @version 2.47.0
110
104
  */
111
105
  prefix?: ReactNode;
112
106
  /**
@@ -117,13 +111,11 @@ export interface InputTagProps<T = unknown> {
117
111
  /**
118
112
  * @zh 输入框前添加元素
119
113
  * @en The label text displayed before (on the left side of) the input-tag field
120
- * @version 2.47.0
121
114
  */
122
115
  addBefore?: ReactNode;
123
116
  /**
124
117
  * @zh 输入框后添加元素
125
118
  * @en The label text displayed after (on the right side of) the input-tag field
126
- * @version 2.47.0
127
119
  */
128
120
  addAfter?: ReactNode;
129
121
  /**
@@ -137,20 +129,17 @@ export interface InputTagProps<T = unknown> {
137
129
  /**
138
130
  * @zh 触发自动分词的分隔符
139
131
  * @en Separator used to tokenize
140
- * @version 2.44.0
141
132
  */
142
133
  tokenSeparators?: string[];
143
134
  /**
144
135
  * @zh 校验函数,默认在 按下enter时候触发。
145
136
  * @en Function to check user's input, which is triggered when `Enter` is pressed
146
137
  * @defaultValue (inputValue, values) => inputValue && values.every((item) => item !== inputValue)
147
- * @version return type T and `Promise<T>` in 2.37.0
148
138
  */
149
139
  validate?: (inputValue: string, values: T[]) => boolean | Promise<boolean> | T | Promise<T>;
150
140
  /**
151
141
  * @zh 自定义标签渲染,`props` 为当前标签属性,`index` 为当前标签的顺序,`values` 为所有标签的值.
152
142
  * @en Custom tag rendering, `props` is the current tag attribute, `index` is the order of the current tag, `values` is the value of all tags
153
- * @version index、values added in 2.15.0
154
143
  */
155
144
  renderTag?: (props: {
156
145
  value: any;
@@ -166,7 +155,6 @@ export interface InputTagProps<T = unknown> {
166
155
  /**
167
156
  * @zh 控件值改变时触发
168
157
  * @en Callback when value changes
169
- * @version `reason` in 2.27.0
170
158
  */
171
159
  onChange?: (value: T[], reason: ValueChangeReason) => void;
172
160
  /**
@@ -202,7 +190,6 @@ export interface InputTagProps<T = unknown> {
202
190
  /**
203
191
  * @zh 点击清除按钮的回调
204
192
  * @en Callback when clear button is clicked
205
- * @version 2.20.0
206
193
  */
207
194
  onClear?: () => void;
208
195
  /**
@@ -113,7 +113,6 @@ export interface SiderProps {
113
113
  /**
114
114
  * @zh 可以接受 `ResizeBox` 所有参数,在伸缩开启时,可以通过 `resizeBoxProps` 对菜单栏的 `width` 进行受控展示或者与 `collapsed` 联动
115
115
  * @en All props of `ResizeBox` can be accepted. The `width` of the menu bar can be displayed in a controlled manner through `resizeBoxProps` or linked with `collapsed`
116
- * @version 2.34.0
117
116
  */
118
117
  resizeBoxProps?: ResizeBoxProps;
119
118
  onSiderMount?: (id: string) => void;
@@ -24,7 +24,6 @@ export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>,
24
24
  * @zh 悬浮状态是否有底色
25
25
  * @en Whether to hide background when hover
26
26
  * @defaultValue true
27
- * @version 2.23.0
28
27
  */
29
28
  hoverable?: boolean;
30
29
  }
@@ -77,7 +77,6 @@ export interface ListProps<T = any> {
77
77
  /**
78
78
  * @zh 列表栅格配置
79
79
  * @en The grid type of list
80
- * @version `column` in 2.20.0
81
80
  */
82
81
  grid?: ListGridProps;
83
82
  /**
@@ -88,7 +87,6 @@ export interface ListProps<T = any> {
88
87
  /**
89
88
  * @zh 列表项是否可悬浮
90
89
  * @en Whether list items have hover style
91
- * @version 2.9.0
92
90
  */
93
91
  hoverable?: boolean;
94
92
  /**
@@ -117,7 +115,6 @@ export interface ListProps<T = any> {
117
115
  /**
118
116
  * @zh 当前列表的引用
119
117
  * @en Reference to the current list
120
- * @version 2.20.0
121
118
  */
122
119
  listRef?: MutableRefObject<ListHandle>;
123
120
  /**
@@ -138,7 +135,6 @@ export interface ListProps<T = any> {
138
135
  /**
139
136
  * @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动
140
137
  * @en Pass the virtual-list properties, pass in this parameter to turn on virtual scrolling
141
- * @version 2.11.0
142
138
  */
143
139
  virtualListProps?: AvailableVirtualListProps;
144
140
  }