@unicom-cloud/ui 0.8.98 → 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 (180) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +54 -7
  3. package/Copy.js +49 -2
  4. package/Flex.js +12 -0
  5. package/Grid.js +1 -1
  6. package/LiquidFill.js +60 -2
  7. package/Marquee.js +62 -0
  8. package/QrCode.js +14 -9
  9. package/Segmented.js +11 -0
  10. package/Space.js +14 -6
  11. package/Splitter.js +6 -0
  12. package/Tag.js +3 -2
  13. package/Tour.js +14 -9
  14. package/alert/index.js +38 -39
  15. package/anchor/index.js +5 -3
  16. package/badge/index.js +174 -80
  17. package/collapse/Collapse.js +54 -48
  18. package/components/common/space/index.js +90 -106
  19. package/copy/index.js +83 -35
  20. package/flex/index.js +59 -0
  21. package/flex/interface.js +34 -0
  22. package/flex/utils.js +13 -0
  23. package/grid/{GridItem.js → Item.js} +15 -15
  24. package/grid/index.js +1 -1
  25. package/index.js +490 -477
  26. package/input/Button.js +39 -34
  27. package/input/Textarea.js +108 -104
  28. package/liquid-fill/index.js +256 -2
  29. package/marquee/index.js +283 -0
  30. package/menu/Item.js +17 -16
  31. package/package.json +1 -1
  32. package/qr-code/index.js +54 -36
  33. package/rate/index.js +8 -8
  34. package/segmented/index.js +225 -0
  35. package/space/index.js +28 -29
  36. package/spin/index.js +75 -62
  37. package/splitter/Panel.js +39 -0
  38. package/splitter/SplitBar.js +157 -0
  39. package/splitter/Splitter.js +139 -0
  40. package/splitter/hooks/useEvent.js +12 -0
  41. package/splitter/hooks/useItems.js +26 -0
  42. package/splitter/hooks/useResizable.js +26 -0
  43. package/splitter/hooks/useResize.js +68 -0
  44. package/splitter/hooks/useSizes.js +60 -0
  45. package/splitter/index.js +7 -0
  46. package/splitter/interface.js +1 -0
  47. package/style.css +1 -1
  48. package/table/Table.js +1 -1
  49. package/table/hook/useThResizable.js +72 -26
  50. package/table/tbody/Td.js +80 -77
  51. package/table/th-resizable/index.js +92 -35
  52. package/tag/index.js +42 -41
  53. package/tooltip/index.js +89 -82
  54. package/tour/index.js +110 -89
  55. package/types/common/hooks/useMergeProps.d.ts +1 -1
  56. package/types/common/space/index.d.ts +7 -5
  57. package/types/common/space/interface.d.ts +29 -16
  58. package/types/pc/affix/interface.d.ts +0 -2
  59. package/types/pc/alert/index.d.ts +2 -2
  60. package/types/pc/anchor/index.d.ts +2 -1
  61. package/types/pc/anchor/interface.d.ts +0 -2
  62. package/types/pc/auto-complete/interface.d.ts +0 -6
  63. package/types/pc/avatar/interface.d.ts +0 -4
  64. package/types/pc/badge/index.d.ts +4 -4
  65. package/types/pc/badge/interface.d.ts +26 -0
  66. package/types/pc/breadcrumb/interface.d.ts +0 -3
  67. package/types/pc/carousel/interface.d.ts +2 -6
  68. package/types/pc/cascader/interface.d.ts +6 -18
  69. package/types/pc/checkbox/interface.d.ts +0 -1
  70. package/types/pc/collapse/interface.d.ts +4 -2
  71. package/types/pc/color-picker/interface.d.ts +0 -2
  72. package/types/pc/config-provider/interface.d.ts +16 -14
  73. package/types/pc/copy/interface.d.ts +2 -1
  74. package/types/pc/date-picker/RangePicker.d.ts +1 -1
  75. package/types/pc/date-picker/interface.d.ts +0 -17
  76. package/types/pc/descriptions/interface.d.ts +0 -1
  77. package/types/pc/drawer/interface.d.ts +0 -7
  78. package/types/pc/dropdown/interface.d.ts +0 -1
  79. package/types/pc/flex/index.d.ts +9 -0
  80. package/types/pc/flex/interface.d.ts +61 -0
  81. package/types/pc/flex/utils.d.ts +9 -0
  82. package/types/pc/form/interface.d.ts +9 -22
  83. package/types/pc/form/util.d.ts +1 -1
  84. package/types/pc/grid/index.d.ts +3 -3
  85. package/types/pc/grid/interface.d.ts +1 -6
  86. package/types/pc/image/interface.d.ts +0 -13
  87. package/types/pc/index.d.ts +16 -6
  88. package/types/pc/input/Textarea.d.ts +2 -6
  89. package/types/pc/input/interface.d.ts +5 -13
  90. package/types/pc/input-number/interface.d.ts +0 -4
  91. package/types/pc/input-tag/interface.d.ts +0 -13
  92. package/types/pc/layout/interface.d.ts +0 -1
  93. package/types/pc/link/interface.d.ts +0 -1
  94. package/types/pc/liquid-fill/index.d.ts +114 -1
  95. package/types/pc/list/interface.d.ts +0 -4
  96. package/types/pc/marquee/index.d.ts +61 -0
  97. package/types/pc/menu/context.d.ts +1 -1
  98. package/types/pc/menu/interface.d.ts +0 -8
  99. package/types/pc/message/interface.d.ts +0 -2
  100. package/types/pc/modal/interface.d.ts +0 -5
  101. package/types/pc/notification/interface.d.ts +0 -1
  102. package/types/pc/pagination/interface.d.ts +0 -2
  103. package/types/pc/popconfirm/interface.d.ts +8 -10
  104. package/types/pc/popover/interface.d.ts +0 -1
  105. package/types/pc/progress/interface.d.ts +0 -3
  106. package/types/pc/qr-code/index.d.ts +1 -1
  107. package/types/pc/rate/index.d.ts +2 -2
  108. package/types/pc/resize-box/interface.d.ts +1 -7
  109. package/types/pc/segmented/index.d.ts +8 -0
  110. package/types/pc/segmented/interface.d.ts +88 -0
  111. package/types/pc/select/interface.d.ts +0 -12
  112. package/types/pc/select-view/interface.d.ts +0 -7
  113. package/types/pc/slider/interface.d.ts +0 -4
  114. package/types/pc/space/index.d.ts +4 -1
  115. package/types/pc/space/interface.d.ts +6 -10
  116. package/types/pc/spin/interface.d.ts +4 -1
  117. package/types/pc/splitter/Panel.d.ts +8 -0
  118. package/types/pc/splitter/SplitBar.d.ts +21 -0
  119. package/types/pc/splitter/Splitter.d.ts +4 -0
  120. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  121. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  122. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  123. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  124. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  125. package/types/pc/splitter/index.d.ts +8 -0
  126. package/types/pc/splitter/interface.d.ts +213 -0
  127. package/types/pc/statistic/interface.d.ts +0 -4
  128. package/types/pc/steps/interface.d.ts +0 -3
  129. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  130. package/types/pc/table/interface.d.ts +4 -15
  131. package/types/pc/tabs/interface.d.ts +0 -7
  132. package/types/pc/tag/index.d.ts +2 -0
  133. package/types/pc/tag/interface.d.ts +0 -1
  134. package/types/pc/time-picker/interface.d.ts +0 -7
  135. package/types/pc/tooltip/interface.d.ts +4 -1
  136. package/types/pc/tour/index.d.ts +6 -1
  137. package/types/pc/transfer/interface.d.ts +2 -9
  138. package/types/pc/tree/interface.d.ts +2 -8
  139. package/types/pc/tree-select/interface.d.ts +0 -8
  140. package/types/pc/trigger/interface.d.ts +0 -5
  141. package/types/pc/typography/EditContent.d.ts +2 -1
  142. package/types/pc/typography/interface.d.ts +45 -30
  143. package/types/pc/upload/interface.d.ts +6 -11
  144. package/types/pc/utils/index.d.ts +1 -0
  145. package/types/pc/utils/names.d.ts +24 -0
  146. package/types/pc/utils/toArray.d.ts +7 -0
  147. package/types/pc/verification-code/interface.d.ts +0 -2
  148. package/types/pc/watermark/interface.d.ts +0 -2
  149. package/typography/Base.js +73 -73
  150. package/typography/EditContent.js +43 -33
  151. package/typography/Ellipsis.js +117 -184
  152. package/typography/Operations.js +97 -49
  153. package/typography/useCssEllipsis.js +7 -6
  154. package/utils/index.js +117 -115
  155. package/utils/names.js +16 -0
  156. package/utils/toArray.js +12 -0
  157. package/version/index.js +1 -1
  158. package/_virtual/_commonjsHelpers.js +0 -6
  159. package/_virtual/index.js +0 -7
  160. package/_virtual/index2.js +0 -4
  161. package/liquid-fill/LiquidFill.js +0 -226
  162. package/liquid-fill/LiquidFill2.js +0 -3
  163. package/space-/index.js +0 -93
  164. package/types/common/utils/color.d.ts +0 -1
  165. package/types/common/utils/computeScrollIntoView.d.ts +0 -1
  166. package/types/common/utils/index.d.ts +0 -45
  167. package/types/common/utils/math.d.ts +0 -1
  168. package/types/common/utils/reactTransitionGroup.d.ts +0 -1
  169. package/types/common/utils/tree.d.ts +0 -1
  170. package/types/common/utils/tween.d.ts +0 -1
  171. package/types/common/utils/uuid.d.ts +0 -1
  172. package/types/common/utils/validate.d.ts +0 -1
  173. package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
  174. package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
  175. package/types/pc/space-/index.d.ts +0 -6
  176. package/types/pc/space-/interface.d.ts +0 -38
  177. /package/{space- → components/common/space}/toArray.js +0 -0
  178. /package/{space- → segmented}/interface.js +0 -0
  179. /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
  180. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
@@ -14,7 +14,6 @@ export interface TagProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
14
14
  /**
15
15
  * @zh 是否显示边框
16
16
  * @en Whether the tag is bordered
17
- * @version 2.26.0
18
17
  */
19
18
  bordered?: boolean;
20
19
  /**
@@ -24,13 +24,11 @@ export interface PickerProps {
24
24
  /**
25
25
  * @zh 状态
26
26
  * @en Status
27
- * @version 2.45.0
28
27
  */
29
28
  status?: 'error' | 'warning';
30
29
  /**
31
30
  * @zh 前缀
32
31
  * @en prefix
33
- * @version 2.43.0
34
32
  */
35
33
  prefix?: ReactNode;
36
34
  /**
@@ -42,7 +40,6 @@ export interface PickerProps {
42
40
  /**
43
41
  * @zh 禁用确认步骤,开启后直接点选时间不需要点击确认按钮。
44
42
  * @en Disable the confirm step, click to select time directly without click the confirm button.
45
- * @version 2.12.0
46
43
  */
47
44
  disableConfirm?: boolean;
48
45
  /**
@@ -85,7 +82,6 @@ export interface PickerProps {
85
82
  /**
86
83
  * @zh 触发元素。
87
84
  * @en Trigger element.
88
- * @version 2.38.0
89
85
  */
90
86
  triggerElement?: ReactNode;
91
87
  /**
@@ -131,7 +127,6 @@ export interface PickerProps {
131
127
  * @zh 时间列在滚动的时候自动吸附和选中
132
128
  * @en The time column is automatically adsorbed and selected when scrolling
133
129
  * @defaultValue true
134
- * @version 2.23.0
135
130
  */
136
131
  scrollSticky?: boolean;
137
132
  /**
@@ -196,7 +191,6 @@ export type BaseTimePickerProps = {
196
191
  * @zh 是否显示选择当前时间的按钮
197
192
  * @en Whether to show the button to select current time
198
193
  * @defaultValue true
199
- * @version 2.21.0
200
194
  */
201
195
  showNowBtn?: boolean;
202
196
  };
@@ -234,7 +228,6 @@ export type BaseRangePickerProps = {
234
228
  * @zh 起止时间是否自动排序
235
229
  * @en Whether the start and end times are automatically sorted
236
230
  * @defaultValue true
237
- * @version 2.21.0
238
231
  */
239
232
  order?: boolean;
240
233
  };
@@ -21,7 +21,6 @@ export interface TooltipProps {
21
21
  /**
22
22
  * @zh 弹出层背景色
23
23
  * @en background color of the popup-layer
24
- * @version 2.22.0
25
24
  */
26
25
  color?: string;
27
26
  /**
@@ -89,4 +88,8 @@ export interface TooltipProps {
89
88
  * @en Set an additional class name(`${childrenPrefix}-open`) for the container of the popup.
90
89
  */
91
90
  childrenPrefix?: string;
91
+ /**
92
+ * @zh 是否以 HTML <pre> 元素预定义格式文本展示。在该元素中的文本通常按照原文件中的编排,以等宽字体的形式展现出来,文本中的空白符(比如空格和换行符)都会显示出来。(紧跟在 <pre> 开始标签后的换行符也会被省略)
93
+ */
94
+ pre?: boolean;
92
95
  }
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from 'react';
1
2
  type Placement = 'top' | 'bottom' | 'left' | 'right';
2
3
  type TourType = 'default' | 'primary';
3
4
  export interface TourStep {
@@ -11,6 +12,10 @@ export interface TourStep {
11
12
  placement?: Placement;
12
13
  }
13
14
  export interface TourProps {
15
+ /** 自定义样式 */
16
+ style?: CSSProperties;
17
+ /** 自定义类名 */
18
+ className?: string | string[];
14
19
  /** 引导步骤数组 */
15
20
  steps: TourStep[];
16
21
  /** 是否显示引导 */
@@ -38,5 +43,5 @@ export interface TourProps {
38
43
  /** 步骤改变回调 */
39
44
  onStepChange?: (current: number) => void;
40
45
  }
41
- declare function Tour(props: TourProps): React.ReactElement;
46
+ declare function Tour(baseProps: TourProps): React.ReactElement | null;
42
47
  export default Tour;
@@ -19,31 +19,26 @@ interface TransferPropsWithArrayType {
19
19
  /**
20
20
  * @zh 搜索框默认提示文字,通过数组为左右列表传入不同属性
21
21
  * @en Placeholder of search box, pass in different properties for lists through array
22
- * @version Array format in '2.40.0'
23
22
  */
24
23
  searchPlaceholder?: string | string[];
25
24
  /**
26
25
  * @zh 左右两栏是否显示搜索框,通过数组为左右列表传入不同属性
27
26
  * @en Whether to display the search box in columns, pass in different properties for lists through array
28
- * @version Array format in '2.40.0'
29
27
  */
30
28
  showSearch?: boolean | InputProps | Array<boolean | InputProps>;
31
29
  /**
32
30
  * @zh 左右两栏是否显示底部重置按钮,通过数组为左右列表传入不同属性
33
31
  * @en Whether to display the reset-button in columns, pass in different properties for lists through array
34
- * @version ReactNode in `2.11.0`, array format in '2.40.0'
35
32
  */
36
33
  showFooter?: boolean | ReactNode | Array<boolean | ReactNode>;
37
34
  /**
38
35
  * @zh 是否使用分页,也可传入 `Pagination` 的配置,通过数组为左右列表传入不同属性
39
36
  * @en Whether to divide into pages, you can also pass in the configuration of `Pagination`, pass in different properties for lists through array
40
- * @version Array format in '2.40.0'
41
37
  */
42
38
  pagination?: boolean | PaginationProps | Array<boolean | PaginationProps>;
43
39
  /**
44
40
  * @zh 左右两栏框的样式,通过数组为左右列表传入不同属性
45
41
  * @en The additional css style of columns, pass in different properties for lists through array
46
- * @version Array format in '2.40.0'
47
42
  */
48
43
  listStyle?: CSSProperties | CSSProperties[];
49
44
  }
@@ -87,8 +82,8 @@ export interface TransferProps extends TransferPropsWithArrayType {
87
82
  */
88
83
  selectedKeys?: string[];
89
84
  /**
90
- * @zh 穿梭框左右栏标题数组。(函数写法 `2.18.0` 开始支持)
91
- * @en Title list of Transfer columns. (`2.18.0` began to support function)
85
+ * @zh 穿梭框左右栏标题数组。
86
+ * @en Title list of Transfer columns.
92
87
  * @defaultValue ['Source', 'Target']
93
88
  */
94
89
  titleTexts?: Array<TransferListTitle>;
@@ -110,7 +105,6 @@ export interface TransferProps extends TransferPropsWithArrayType {
110
105
  /**
111
106
  * @zh 简单模式
112
107
  * @en Whether to automatically move an item when it is selected
113
- * @version `retainSelectedItems` in '2.21.0'
114
108
  */
115
109
  simple?: boolean | {
116
110
  retainSelectedItems?: boolean;
@@ -128,7 +122,6 @@ export interface TransferProps extends TransferPropsWithArrayType {
128
122
  /**
129
123
  * @zh 传递虚拟滚动属性。
130
124
  * @en Pass properties used by VirtualList.
131
- * @version 2.42.0
132
125
  */
133
126
  virtualListProps?: AvailableVirtualListProps;
134
127
  /**
@@ -88,10 +88,9 @@ export interface TreeProps {
88
88
  */
89
89
  animation?: boolean;
90
90
  /**
91
- * @zh 是否允许拖拽时放置在该节点。 (`dragNode` in `2.23.0`)
92
- * @en Whether to allow dropping on node. (`dragNode` in `2.23.0`)
91
+ * @zh 是否允许拖拽时放置在该节点。
92
+ * @en Whether to allow dropping on node.
93
93
  * @defaultValue () => true
94
- * @version 2.7.0
95
94
  */
96
95
  allowDrop?: AllowDrop;
97
96
  /**
@@ -137,7 +136,6 @@ export interface TreeProps {
137
136
  /**
138
137
  * @zh 半选状态的节点.仅在 checkable 且 checkStrictly 时生效
139
138
  * @en the keys of half checked
140
- * @version 2.27.0
141
139
  */
142
140
  halfCheckedKeys?: string[];
143
141
  /**
@@ -158,14 +156,12 @@ export interface TreeProps {
158
156
  /**
159
157
  * @zh 指定 key,title,isLeaf,disabled,children 对应的字段
160
158
  * @en Custom field name for key, title, isLeaf, disabled and children
161
- * @version 2.11.0
162
159
  */
163
160
  fieldNames?: FieldNamesType;
164
161
  /**
165
162
  * @zh 定制节点图标
166
163
  * @en Customize node icon
167
164
  * @defaultValue FieldNamesType
168
- * @version 2.9.0
169
165
  */
170
166
  icons?: ((nodeProps: NodeProps) => {
171
167
  dragIcon?: ReactNode;
@@ -179,7 +175,6 @@ export interface TreeProps {
179
175
  /**
180
176
  * @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动
181
177
  * @en Pass the virtual-list properties, pass in this parameter to turn on virtual scrolling
182
- * @version 2.11.0
183
178
  */
184
179
  virtualListProps?: AvailableVirtualListProps;
185
180
  /**
@@ -200,7 +195,6 @@ export interface TreeProps {
200
195
  /**
201
196
  * @zh 点击节点时对应的操作,可以是选中,复选选中,展开/收起
202
197
  * @en The action when click node
203
- * @version select
204
198
  */
205
199
  actionOnClick?: ActionOnClick | ActionOnClick[];
206
200
  /**
@@ -51,20 +51,17 @@ export interface TreeSelectProps extends SelectViewCommonProps {
51
51
  * @en
52
52
  * Customize the content that will be displayed in the Select.
53
53
  * If the `Option` corresponding to `value` does not exist, the first parameter will be `null`
54
- * @version 2.46.0
55
54
  */
56
55
  renderFormat?: (option: NodeProps | null, value: string | LabelValue) => ReactNode;
57
56
  /**
58
57
  * @zh 输入框搜索文本的受控值
59
58
  * @en To set input search value
60
- * @version 2.39.0
61
59
  */
62
60
  inputValue?: string;
63
61
  /**
64
62
  * @zh 指定 key,title,isLeaf,disabled,children 对应的字段
65
63
  * @en Custom field name for key, title, isLeaf, disabled and children
66
64
  * @defaultValue DefaultFieldNames
67
- * @version 2.11.0
68
65
  */
69
66
  fieldNames?: TreeProps['fieldNames'];
70
67
  /**
@@ -111,7 +108,6 @@ export interface TreeSelectProps extends SelectViewCommonProps {
111
108
  /**
112
109
  * @zh 自定义上方显示元素
113
110
  * @en Customize the trigger element
114
- * @version `() => ReactNode` in 2.31.0
115
111
  */
116
112
  triggerElement?: ReactNode | ((params: {
117
113
  value: any;
@@ -135,19 +131,16 @@ export interface TreeSelectProps extends SelectViewCommonProps {
135
131
  /**
136
132
  * @zh 设置下拉框样式
137
133
  * @en The additional css style for dropdown menu
138
- * @version 2.3.0
139
134
  */
140
135
  dropdownMenuStyle?: CSSProperties;
141
136
  /**
142
137
  * @zh 自定义下拉框展示
143
138
  * @en Customize dropdown rendering
144
- * @version 2.3.0
145
139
  */
146
140
  dropdownRender?: (dom: ReactNode) => ReactNode;
147
141
  /**
148
142
  * @zh 选中值改变的回调
149
143
  * @en Callback when the selection changed
150
- * @version `extra` in `2.29.0`
151
144
  */
152
145
  onChange?: (value: any, extra: {
153
146
  trigger?: NodeProps;
@@ -185,7 +178,6 @@ export interface TreeSelectProps extends SelectViewCommonProps {
185
178
  /**
186
179
  * @zh 输入框搜索文本改变的回调。
187
180
  * @en Callback when the search value of input is changed.
188
- * @version 2.39.0
189
181
  */
190
182
  onInputValueChange?: (value: string, reason: InputValueChangeReason) => void;
191
183
  /**
@@ -115,7 +115,6 @@ export interface TriggerProps {
115
115
  /**
116
116
  * @zh 默认弹出层位置会根据视口边界进行定位及微调,此参数可以设置到视口边界一定距离时即进行定位调整。仅在 autoFitPosition=true 且 alignPoint=false 生效。
117
117
  * @en The default pop-up layer position will be positioned and fine-tuned according to the viewport boundary. This parameter can be set to adjust the positioning when it is a certain distance from the viewport boundary. Only takes effect when autoFitPosition=true and alignPoint=false.
118
- * @version 2.59.0
119
118
  */
120
119
  boundaryDistance?: {
121
120
  left?: number;
@@ -146,7 +145,6 @@ export interface TriggerProps {
146
145
  * @zh 是否在鼠标移出触发节点和弹出层的时候关闭弹出层
147
146
  * @en Whether to allow close the popup by clicking the child node.
148
147
  * @defaultValue true
149
- * @version 2.22.0
150
148
  */
151
149
  mouseLeaveToClose?: boolean;
152
150
  /**
@@ -158,7 +156,6 @@ export interface TriggerProps {
158
156
  * @zh 是否在点击空白处(触发节点和弹出框以外的区域)时关闭弹出层。 关闭时会触发 `onVisibleChange`。默认是在冒泡阶段触发该逻辑,可设置 `{ capture: true }` 指定捕获阶段触发
159
157
  * @en Whether to allow close the popup by clicking the area outside the child node and the popup box.By default, this logic is triggered in the bubbling phase. You can set `{ capture: true }` to specify the triggering phase in the capture phase.
160
158
  * @defaultValue true
161
- * @version `{ capture: boolean }` in `2.55.0`
162
159
  */
163
160
  clickOutsideToClose?: boolean | {
164
161
  capture: boolean;
@@ -171,7 +168,6 @@ export interface TriggerProps {
171
168
  /**
172
169
  * @zh 是否在容器滚动时关闭弹出框
173
170
  * @en Whether to close the popup when the container is scrolled
174
- * @version 2.34.0
175
171
  */
176
172
  containerScrollToClose?: boolean;
177
173
  /**
@@ -232,7 +228,6 @@ export interface TriggerProps {
232
228
  /**
233
229
  * @zh 是否在容器滚动时更新弹出框的位置
234
230
  * @en Whether to update the popover's position when the container is scrolled
235
- * @version 2.32.0
236
231
  */
237
232
  updateOnScroll?: boolean;
238
233
  children?: ReactNode;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { EditContentProps } from './interface';
2
- declare const _default: import("react").ForwardRefExoticComponent<EditContentProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ declare const _default: React.ForwardRefExoticComponent<EditContentProps & React.RefAttributes<HTMLDivElement>>;
3
4
  export default _default;
@@ -1,5 +1,17 @@
1
1
  import React, { CSSProperties, ReactNode } from 'react';
2
+ import type { InputProps, TextAreaProps } from '../input';
2
3
  import { TooltipProps } from '../tooltip';
4
+ /**
5
+ * @zh 开启复制功能
6
+ * @en Whether to be copyable
7
+ */
8
+ type Copyable = boolean | {
9
+ text?: string | (() => string);
10
+ onCopy?: (text: string, e: any) => void;
11
+ icon?: ReactNode;
12
+ tooltips?: [ReactNode, ReactNode];
13
+ tooltipProps?: TooltipProps;
14
+ };
3
15
  /**
4
16
  * @title Typography
5
17
  */
@@ -12,27 +24,13 @@ export interface OperationsProps extends Omit<React.HTMLAttributes<HTMLElement>,
12
24
  /**
13
25
  * @zh 开启复制功能
14
26
  * @en Whether to be copyable
15
- * @version `onCopy` params `e` in `2.31.0`
16
- */
17
- copyable?: boolean | {
18
- text?: string;
19
- onCopy?: (text: string, e: any) => void;
20
- icon?: ReactNode;
21
- tooltips?: [ReactNode, ReactNode];
22
- tooltipProps?: TooltipProps;
23
- };
27
+ */
28
+ copyable?: Copyable;
24
29
  /**
25
30
  * @zh 开启可编辑功能
26
31
  * @en If editable. Can control edit state when is object
27
- * @version `onStart` params `e` in `2.31.0`
28
- */
29
- editable?: boolean | {
30
- editing?: boolean;
31
- tooltipProps?: TooltipProps;
32
- onStart?: (text: any, e: any) => void;
33
- onChange?: (text: any) => void;
34
- onEnd?: (text: any) => void;
35
- };
32
+ */
33
+ editable?: boolean | EditableConfig;
36
34
  /**
37
35
  * @zh 自动溢出省略(只支持字符串),具体参数配置看 [EllipsisConfig](#ellipsisconfig)。不推荐使用,建议 `Typography.Ellipsis` 替代
38
36
  * @en Auto overflow omitted, see [EllipsisConfig](#ellipsisconfig)。Deprecated, `Typography.Ellipsis` is recommended instead
@@ -117,18 +115,33 @@ export interface TypographyParagraphProps extends CommonProps {
117
115
  */
118
116
  spacing?: 'default' | 'close';
119
117
  }
118
+ export interface EditableConfig {
119
+ /** 是否处于编辑状态 */
120
+ editing?: boolean;
121
+ /** 工具提示属性 */
122
+ tooltipProps?: TooltipProps;
123
+ /** 开始编辑回调 */
124
+ onStart?: (text: string, e: React.MouseEvent) => void;
125
+ /** 内容变化回调 */
126
+ onChange?: (text: string) => void;
127
+ /** 结束编辑回调 */
128
+ onEnd?: (text: string) => void;
129
+ /**
130
+ * Input 组件属性,如果有此属性,则使用 Input 组件,否则使用 TextArea 组件。
131
+ */
132
+ inputProps?: InputProps;
133
+ /**
134
+ * Input.TextArea 组件属性。
135
+ */
136
+ textAreaProps?: TextAreaProps;
137
+ }
120
138
  export interface EditContentProps {
121
139
  prefixCls?: string;
122
140
  style?: CSSProperties;
123
141
  className?: string | string[];
124
142
  children?: ReactNode;
125
143
  setEditing?: (editing: boolean) => void;
126
- editableConfig?: {
127
- editing?: boolean;
128
- onStart?: (text: any, e: any) => void;
129
- onChange?: (text: any) => void;
130
- onEnd?: (text: any) => void;
131
- };
144
+ editableConfig?: EditableConfig;
132
145
  }
133
146
  /**
134
147
  * @title Typography.Text
@@ -141,7 +154,6 @@ export type EllipsisConfig = {
141
154
  /**
142
155
  * @zh 自动溢出省略(只支持字符串),在大量使用情况下建议开启提高性能。
143
156
  * @en Automatic overflow omission (only strings are supported). In the case of simple single-line, css will be used by default to handle ellipsis to avoid complicated calculations.
144
- * @version `2.36.0` 将默认值改为 `false` 并支持多行CSS省略。
145
157
  */
146
158
  cssEllipsis?: boolean;
147
159
  /**
@@ -179,7 +191,6 @@ export type EllipsisConfig = {
179
191
  /**
180
192
  * @zh 在折叠/展开状态发生改变的时候触发,通常是点击折叠/展开按钮触发。
181
193
  * @en Callback when the expand state changes, usually triggered by clicking the button
182
- * @version e in `2.27.0`
183
194
  */
184
195
  onExpand?: (isExpand: boolean, e: any) => void;
185
196
  /**
@@ -193,13 +204,11 @@ export type EllipsisConfig = {
193
204
  /**
194
205
  * @zh 是否展开
195
206
  * @en whether to expand
196
- * @version `2.33.0`
197
207
  */
198
208
  expanded?: boolean;
199
209
  /**
200
210
  * @zh 默认展开
201
211
  * @en Default expanded state
202
- * @version `2.33.0`
203
212
  */
204
213
  defaultExpanded?: boolean;
205
214
  wrapper?: string | React.FC<any> | React.ComponentClass<any>;
@@ -210,6 +219,11 @@ export type EllipsisConfig = {
210
219
  export interface TypographyEllipsisProps {
211
220
  style?: CSSProperties;
212
221
  className?: string | string[];
222
+ /**
223
+ * @zh 开启复制功能
224
+ * @en Whether to be copyable
225
+ */
226
+ copyable?: Copyable;
213
227
  /**
214
228
  * @zh 显示省略的行数
215
229
  * @en The number of omitted rows
@@ -227,8 +241,8 @@ export interface TypographyEllipsisProps {
227
241
  */
228
242
  showTooltip?: boolean | TooltipProps;
229
243
  /**
230
- * @zh 是否显示操控按钮。`2.61.0` 版本支持 `single` 属性
231
- * @en Whether to show control button. `2.61.0` version supports `single` attribute
244
+ * @zh 是否显示操控按钮。
245
+ * @en Whether to show control button.
232
246
  * @defaultValue true
233
247
  */
234
248
  expandable?: boolean | {
@@ -260,3 +274,4 @@ export interface TypographyEllipsisProps {
260
274
  */
261
275
  onEllipsis?: (isEllipsis: boolean) => void;
262
276
  }
277
+ export {};
@@ -49,12 +49,11 @@ export interface UploadProps {
49
49
  /**
50
50
  * @zh 文件夹上传
51
51
  * @en Support upload whole directory
52
- * @version 2.11.0
53
52
  */
54
53
  directory?: boolean;
55
54
  /**
56
- * @zh 接受上传的类型 [详细请参考](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)。(`strict` in `2.53.0`,默认为 true。设置为 false 时,accept 表现和原生一致。设置为 true 时,会严格匹配文件后缀名,过滤掉不符合 accept 规则的文件。)
57
- * @en Accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)(`strict` in `2.53.0`, defaultValue is true. When set to false, accept behaves the same as native. When set to true, file extensions will be strictly matched and files that do not meet the accept rules will be filtered out. )
55
+ * @zh 接受上传的类型 [详细请参考](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)。(`strict` 默认为 true。设置为 false 时,accept 表现和原生一致。设置为 true 时,会严格匹配文件后缀名,过滤掉不符合 accept 规则的文件。)
56
+ * @en Accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)(`strict` defaultValue is true. When set to false, accept behaves the same as native. When set to true, file extensions will be strictly matched and files that do not meet the accept rules will be filtered out. )
58
57
  */
59
58
  accept?: string | {
60
59
  type: string;
@@ -72,8 +71,8 @@ export interface UploadProps {
72
71
  */
73
72
  listType?: 'text' | 'picture-list' | 'picture-card';
74
73
  /**
75
- * @zh 启用内置的图片预览,仅在 listType='picture-card' 时生效。(`v2.41.0`)
76
- * @en Enable built-in image preview, only works when listType='picture-card'. (`v2.41.0`)
74
+ * @zh 启用内置的图片预览,仅在 listType='picture-card' 时生效。
75
+ * @en Enable built-in image preview, only works when listType='picture-card'.
77
76
  */
78
77
  imagePreview?: boolean;
79
78
  /**
@@ -100,12 +99,11 @@ export interface UploadProps {
100
99
  * @zh 上传请求的 http method
101
100
  * @en The http method of upload request
102
101
  * @defaultValue post
103
- * @version 2.55.0
104
102
  */
105
103
  method?: string;
106
104
  /**
107
- * @zh 限制上传数量。默认超出后会隐藏上传节点。对象类型在 `2.28.0` 支持
108
- * @en maximum number of uploads allowed. Object type is supported in `2.28.0`
105
+ * @zh 限制上传数量。默认超出后会隐藏上传节点。
106
+ * @en maximum number of uploads allowed.
109
107
  */
110
108
  limit?: number | {
111
109
  maxCount: number;
@@ -205,19 +203,16 @@ export interface UploadProps {
205
203
  /**
206
204
  * @zh 拖拽上传文件时执行的回调
207
205
  * @en Callback after drag file to the upload area and drop.
208
- * @version 2.37.0
209
206
  */
210
207
  onDrop?: (e: React.DragEvent) => void;
211
208
  /**
212
209
  * @zh 拖拽上传文件进入拖拽区时的回调
213
210
  * @en Callback when drag and drop uploaded file into the drag area
214
- * @version 2.41.0
215
211
  */
216
212
  onDragOver?: (e: React.DragEvent) => void;
217
213
  /**
218
214
  * @zh 拖拽上传文件离开拖拽区时的回调
219
215
  * @en Callback when drag and drop uploaded file leaves the drag area
220
- * @version 2.41.0
221
216
  */
222
217
  onDragLeave?: (e: React.DragEvent) => void;
223
218
  }
@@ -40,6 +40,7 @@ export * from './setTheme';
40
40
  export * from './style';
41
41
  export * from './throttleByRaf';
42
42
  export * from './tinycolor';
43
+ export * from './toArray';
43
44
  export * from './tree';
44
45
  export * from './tween';
45
46
  export * from './type';
@@ -837,4 +837,28 @@ export namespace COMPONENT_NAMES {
837
837
  let en_139: string;
838
838
  export { en_139 as en };
839
839
  }
840
+ namespace Marquee {
841
+ let zh_140: string;
842
+ export { zh_140 as zh };
843
+ let en_140: string;
844
+ export { en_140 as en };
845
+ }
846
+ namespace Segmented {
847
+ let zh_141: string;
848
+ export { zh_141 as zh };
849
+ let en_141: string;
850
+ export { en_141 as en };
851
+ }
852
+ namespace Splitter {
853
+ let zh_142: string;
854
+ export { zh_142 as zh };
855
+ let en_142: string;
856
+ export { en_142 as en };
857
+ }
858
+ namespace Flex {
859
+ let zh_143: string;
860
+ export { zh_143 as zh };
861
+ let en_143: string;
862
+ export { en_143 as en };
863
+ }
840
864
  }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface ToArrayOptions {
3
+ keepEmpty?: boolean;
4
+ }
5
+ declare function toArray(children: React.ReactNode, options?: ToArrayOptions): React.ReactElement[];
6
+ export { toArray };
7
+ export default toArray;
@@ -2,8 +2,6 @@ import { CSSProperties, ReactNode } from 'react';
2
2
  import { InputProps } from '../input';
3
3
  /**
4
4
  * @title VerificationCode
5
- * @zh `2.55.0` 支持
6
- * @en 2.55.0
7
5
  */
8
6
  export interface VerificationCodeProps {
9
7
  style?: CSSProperties;
@@ -1,8 +1,6 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  /**
3
3
  * @title Watermark
4
- * @zh `2.56.0` 支持
5
- * @en 2.56.0
6
4
  */
7
5
  export interface WatermarkProps {
8
6
  style?: CSSProperties;