@kdcloudjs/kdesign 1.6.4 → 1.6.6

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 (78) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/kdesign-complete.less +110 -87
  3. package/dist/kdesign.css +44 -32
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +125 -57
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +3 -3
  8. package/dist/kdesign.min.js +6 -6
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/_utils/hooks.js +1 -9
  11. package/es/cascader/cascader.js +2 -2
  12. package/es/cascader/style/index.css +4 -1
  13. package/es/cascader/style/index.less +5 -1
  14. package/es/cascader/style/token.less +1 -0
  15. package/es/config-provider/compDefaultProps.d.ts +1 -0
  16. package/es/config-provider/compDefaultProps.js +1 -0
  17. package/es/input/TextArea.d.ts +1 -0
  18. package/es/input/TextArea.js +8 -6
  19. package/es/input/style/index.css +10 -3
  20. package/es/input/style/index.less +7 -0
  21. package/es/input/style/token.less +1 -1
  22. package/es/locale/locale.d.ts +2 -3
  23. package/es/locale/zh-CN.d.ts +2 -0
  24. package/es/locale/zh-CN.js +3 -1
  25. package/es/pagination/pagination.d.ts +3 -0
  26. package/es/pagination/pagination.js +34 -15
  27. package/es/pagination/style/index.css +24 -21
  28. package/es/pagination/style/index.less +85 -79
  29. package/es/rate/rate.js +1 -1
  30. package/es/rate/style/index.css +3 -3
  31. package/es/rate/style/index.less +9 -3
  32. package/es/search/search.js +12 -6
  33. package/es/table/interface.d.ts +8 -0
  34. package/es/table/table.d.ts +2 -2
  35. package/es/table/table.js +18 -6
  36. package/es/tooltip/style/index.css +1 -1
  37. package/es/tooltip/style/token.less +1 -1
  38. package/es/transfer/list.d.ts +1 -1
  39. package/es/transfer/list.js +8 -2
  40. package/es/transfer/transfer.d.ts +1 -1
  41. package/es/transfer/transfer.js +29 -4
  42. package/es/upload/style/index.css +1 -2
  43. package/es/upload/style/index.less +1 -2
  44. package/lib/_utils/hooks.js +1 -9
  45. package/lib/cascader/cascader.js +2 -2
  46. package/lib/cascader/style/index.css +4 -1
  47. package/lib/cascader/style/index.less +5 -1
  48. package/lib/cascader/style/token.less +1 -0
  49. package/lib/config-provider/compDefaultProps.d.ts +1 -0
  50. package/lib/config-provider/compDefaultProps.js +1 -0
  51. package/lib/input/TextArea.d.ts +1 -0
  52. package/lib/input/TextArea.js +9 -7
  53. package/lib/input/style/index.css +10 -3
  54. package/lib/input/style/index.less +7 -0
  55. package/lib/input/style/token.less +1 -1
  56. package/lib/locale/locale.d.ts +2 -3
  57. package/lib/locale/zh-CN.d.ts +2 -0
  58. package/lib/locale/zh-CN.js +3 -1
  59. package/lib/pagination/pagination.d.ts +3 -0
  60. package/lib/pagination/pagination.js +36 -16
  61. package/lib/pagination/style/index.css +24 -21
  62. package/lib/pagination/style/index.less +85 -79
  63. package/lib/rate/rate.js +1 -1
  64. package/lib/rate/style/index.css +3 -3
  65. package/lib/rate/style/index.less +9 -3
  66. package/lib/search/search.js +12 -6
  67. package/lib/table/interface.d.ts +8 -0
  68. package/lib/table/table.d.ts +2 -2
  69. package/lib/table/table.js +17 -4
  70. package/lib/tooltip/style/index.css +1 -1
  71. package/lib/tooltip/style/token.less +1 -1
  72. package/lib/transfer/list.d.ts +1 -1
  73. package/lib/transfer/list.js +8 -1
  74. package/lib/transfer/transfer.d.ts +1 -1
  75. package/lib/transfer/transfer.js +29 -3
  76. package/lib/upload/style/index.css +1 -2
  77. package/lib/upload/style/index.less +1 -2
  78. package/package.json +1 -1
@@ -186,107 +186,113 @@
186
186
 
187
187
  // 简化版分页
188
188
  &.simple {
189
- display: inline-flex;
190
- justify-content: space-around;
191
- align-items: center;
192
- height: @pagination-size;
193
- border-radius: @radius-border;
194
- border: @pagination-border-size solid transparent;
189
+ .@{pagination-prefix-cls}-action {
190
+ display: inline-flex;
191
+ justify-content: space-around;
192
+ align-items: center;
193
+ height: @pagination-size;
194
+ border-radius: @radius-border;
195
+ border: @pagination-border-size solid transparent;
195
196
 
196
- &.bordered {
197
- border-color: @pagination-border-color;
198
- transition: border-color @duration-promptly;
197
+ &.bordered {
198
+ border-color: @pagination-border-color;
199
+ transition: border-color @duration-promptly;
199
200
 
200
- &:active:not(.disabled) {
201
- border-color: @pagination-border-hover-color;
202
- }
201
+ &:active:not(.disabled) {
202
+ border-color: @pagination-border-hover-color;
203
+ }
203
204
 
204
- &.disabled,
205
- &.disabled > .@{pagination-prefix-cls}-item > button {
206
- background-color: @pagination-button-disabled-background-color;
205
+ &.disabled,
206
+ &.disabled > .@{pagination-prefix-cls}-item > button {
207
+ background-color: @pagination-button-disabled-background-color;
208
+ }
207
209
  }
208
- }
209
-
210
- &.disabled > .@{pagination-prefix-cls}-item {
211
- color: @pagination-disabled-color;
212
- }
213
-
214
- .@{pagination-prefix-cls}-item {
215
- .reset-component;
216
- display: inline-block;
217
- height: @pagination-size;
218
- overflow: hidden;
219
- margin: 0 8px;
220
- vertical-align: middle;
221
- color: @color-text-primary;
222
210
 
223
- &:first-child,
224
- &:last-child {
225
- margin: 0;
211
+ &.disabled > .@{pagination-prefix-cls}-action-item {
212
+ color: @pagination-disabled-color;
226
213
  }
227
214
 
228
- .@{pagination-prefix-cls}-current {
229
- margin-right: 2px;
215
+ &-item {
216
+ .reset-component;
217
+ display: inline-block;
218
+ height: @pagination-size;
219
+ overflow: hidden;
220
+ margin: 0 8px;
230
221
  vertical-align: middle;
222
+ color: @color-text-primary;
231
223
 
232
- .@{pagination-prefix-cls}-current-input {
224
+ &:first-child,
225
+ &:last-child {
233
226
  margin: 0;
227
+ }
234
228
 
235
- &:disabled {
236
- color: @pagination-disabled-color;
237
- cursor: not-allowed;
229
+ .@{pagination-prefix-cls}-current {
230
+ margin-right: 2px;
231
+ vertical-align: middle;
232
+
233
+ .@{pagination-prefix-cls}-current-input {
234
+ margin: 0;
235
+
236
+ &:disabled {
237
+ color: @pagination-disabled-color;
238
+ cursor: not-allowed;
239
+ }
238
240
  }
239
241
  }
240
- }
241
242
 
242
- .@{pagination-prefix-cls}-total {
243
- vertical-align: middle;
244
- margin-right: 0;
245
- }
243
+ .@{pagination-prefix-cls}-total {
244
+ vertical-align: middle;
245
+ margin-right: 0;
246
+ }
246
247
 
247
- button {
248
- box-sizing: border-box;
249
- position: relative;
250
- width: calc(@pagination-size - 2px);
251
- height: calc(@pagination-size - 2px);
252
- border: none;
253
- background-color: @color-background;
254
- border-radius: @radius-border;
255
- cursor: pointer;
256
- outline: none;
257
- vertical-align: middle;
258
- transition: border-color @duration-promptly;
248
+ &.bordered > button {
249
+ border: none;
250
+ }
259
251
 
260
- &:hover,
261
- &:active {
262
- &:not(:disabled) {
263
- border-color: @pagination-border-hover-color;
264
- }
252
+ button {
253
+ box-sizing: border-box;
254
+ position: relative;
255
+ width: calc(@pagination-size - 2px);
256
+ height: calc(@pagination-size - 2px);
257
+ border: none;
258
+ background-color: @color-background;
259
+ border-radius: @radius-border;
260
+ cursor: pointer;
261
+ outline: none;
262
+ vertical-align: middle;
263
+ transition: border-color @duration-promptly;
265
264
 
266
- i {
267
- color: @pagination-hover-color;
265
+ &:hover,
266
+ &:active {
267
+ &:not(:disabled) {
268
+ border-color: @pagination-border-hover-color;
269
+ }
270
+
271
+ i {
272
+ color: @pagination-hover-color;
273
+ }
268
274
  }
269
- }
270
275
 
271
- &:disabled {
272
- cursor: not-allowed;
276
+ &:disabled {
277
+ cursor: not-allowed;
273
278
 
274
- i {
275
- color: @pagination-disabled-color;
279
+ i {
280
+ color: @pagination-disabled-color;
281
+ }
276
282
  }
277
- }
278
283
 
279
- i {
280
- position: absolute;
281
- top: 0;
282
- right: 0;
283
- bottom: 0;
284
- left: 0;
285
- margin: auto;
286
- line-height: calc(@pagination-size - 2px);
287
- font-size: @pagination-icon-size;
288
- color: @pagination-icon-color;
289
- transition: color @duration-promptly;
284
+ i {
285
+ position: absolute;
286
+ top: 0;
287
+ right: 0;
288
+ bottom: 0;
289
+ left: 0;
290
+ margin: auto;
291
+ line-height: calc(@pagination-size - 2px);
292
+ font-size: @pagination-icon-size;
293
+ color: @pagination-icon-color;
294
+ transition: color @duration-promptly;
295
+ }
290
296
  }
291
297
  }
292
298
  }
package/es/rate/rate.js CHANGED
@@ -54,7 +54,7 @@ var Rate = function Rate(props) {
54
54
 
55
55
 
56
56
  React.useEffect(function () {
57
- if (value && value !== 0 && value !== selectedValue) {
57
+ if (value !== undefined && value !== selectedValue) {
58
58
  setSelectedValue(value);
59
59
  }
60
60
  }, [value, selectedValue]); // const shouldSetValue = (value: number) => {
@@ -120,13 +120,13 @@
120
120
  -ms-flex-pack: start;
121
121
  justify-content: flex-start;
122
122
  }
123
- .kd-rate-size-large {
123
+ .kd-rate-size-large .kdicon {
124
124
  font-size: var(--kd-c-rate-font-size-large, 20px);
125
125
  }
126
- .kd-rate-size-middle {
126
+ .kd-rate-size-middle .kdicon {
127
127
  font-size: var(--kd-c-rate-font-size-middle, 16px);
128
128
  }
129
- .kd-rate-size-small {
129
+ .kd-rate-size-small .kdicon {
130
130
  font-size: var(--kd-c-rate-font-size-small, 12px);
131
131
  }
132
132
  .kd-rate-item {
@@ -9,13 +9,19 @@
9
9
  display: inline-flex;
10
10
  justify-content: flex-start;
11
11
  &-size-large {
12
- font-size: @rate-large-font-size;
12
+ .@{kd-prefix}icon {
13
+ font-size: @rate-large-font-size;
14
+ }
13
15
  }
14
16
  &-size-middle {
15
- font-size: @rate-middle-font-size;
17
+ .@{kd-prefix}icon {
18
+ font-size: @rate-middle-font-size;
19
+ }
16
20
  }
17
21
  &-size-small {
18
- font-size: @rate-small-font-size;
22
+ .@{kd-prefix}icon {
23
+ font-size: @rate-small-font-size;
24
+ }
19
25
  }
20
26
  }
21
27
  .@{rate-prefix-cls}-item {
@@ -54,7 +54,9 @@ var InternalSearch = function InternalSearch(props, ref) {
54
54
  type = searchProps.type,
55
55
  placeholder = searchProps.placeholder,
56
56
  onSearch = searchProps.onSearch,
57
- restProps = __rest(searchProps, ["prefixCls", "className", "style", "size", "disabled", "onPressEnter", "prefix", "suffix", "borderType", "children", "type", "placeholder", "onSearch"]);
57
+ onFocus = searchProps.onFocus,
58
+ onBlur = searchProps.onBlur,
59
+ restProps = __rest(searchProps, ["prefixCls", "className", "style", "size", "disabled", "onPressEnter", "prefix", "suffix", "borderType", "children", "type", "placeholder", "onSearch", "onFocus", "onBlur"]);
58
60
 
59
61
  devWarning(SearchSizeTypes.indexOf(size) === -1, 'search', "cannot found search size '".concat(size, "'"));
60
62
  devWarning(BorderTypes.indexOf(borderType) === -1, 'search', "cannot found search borderType '".concat(borderType, "'"));
@@ -73,12 +75,14 @@ var InternalSearch = function InternalSearch(props, ref) {
73
75
  var handlePressEnter = useCallback(function (_, event) {
74
76
  onPressEnter && (onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(searchRef.current.value, event));
75
77
  }, [onPressEnter, searchRef]);
76
- var handleFocus = useCallback(function () {
78
+ var handleFocus = useCallback(function (event) {
77
79
  setFocused(true);
78
- }, []);
79
- var handleBlur = useCallback(function () {
80
+ onFocus && onFocus(event);
81
+ }, [onFocus]);
82
+ var handleBlur = useCallback(function (event) {
80
83
  setFocused(false);
81
- }, []);
84
+ onBlur && onBlur(event);
85
+ }, [onBlur]);
82
86
  var renderPrefix = useCallback(function () {
83
87
  if (!prefix) {
84
88
  return null;
@@ -111,7 +115,9 @@ var InternalSearch = function InternalSearch(props, ref) {
111
115
  onSearch: onSearch,
112
116
  className: className,
113
117
  style: style,
114
- placeholder: placeholder
118
+ placeholder: placeholder,
119
+ onFocus: onFocus,
120
+ onBlur: onBlur
115
121
  }), children);
116
122
  }
117
123
 
@@ -10,6 +10,14 @@ declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
10
10
  };
11
11
  };
12
12
  declare type TablePropsOfExtend = Omit<BaseTableProps, 'components'>;
13
+ export declare type TableApi = {
14
+ getColumns: () => any[];
15
+ getDataSource: () => any[];
16
+ getFooterDataSource: () => any[];
17
+ };
18
+ export declare type TableInstance = {
19
+ api: TableApi;
20
+ };
13
21
  export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
14
22
  rowSelection?: TableRowSelection;
15
23
  prefixCls?: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TableProps } from './interface';
3
- declare function Table(props: TableProps): JSX.Element;
3
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<unknown>>;
4
4
  export default Table;
package/es/table/table.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
3
3
  import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
4
- import React, { useContext } from 'react';
4
+ import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
5
5
  import { Table as BaseTable, useTablePipeline } from '@kdcloudjs/table';
6
6
  import ConfigContext from '../config-provider/ConfigContext';
7
7
  import Checkbox from '../checkbox/index';
@@ -19,8 +19,7 @@ import useColumnDrag from './feature/columnDrag';
19
19
  import useContextMenu from './feature/contextMenu';
20
20
  import useRangeSelection from './feature/useRangeSelection';
21
21
  import devWarning from '../_utils/devwarning';
22
-
23
- function Table(props) {
22
+ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
24
23
  var columns = props.columns,
25
24
  dataSource = props.dataSource,
26
25
  columnDrag = props.columnDrag,
@@ -68,19 +67,32 @@ function Table(props) {
68
67
  columns: columns,
69
68
  dataSource: dataSource
70
69
  });
70
+ var pipelineRef = useRef(pipeline);
71
+ pipelineRef.current = pipeline;
71
72
 
72
73
  if (footerDataSource) {
73
74
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
74
75
  // @ts-ignore
75
76
  pipeline.footerDataSource(footerDataSource);
76
77
  }
78
+
79
+ useImperativeHandle(ref, function () {
80
+ var _a, _b, _c;
81
+
82
+ return {
83
+ api: {
84
+ getColumns: (_a = pipelineRef.current.getColumns) === null || _a === void 0 ? void 0 : _a.bind(pipelineRef.current),
85
+ getDataSource: (_b = pipelineRef.current.getDataSource) === null || _b === void 0 ? void 0 : _b.bind(pipelineRef.current),
86
+ getFooterDataSource: (_c = pipelineRef.current.getFooterDataSource) === null || _c === void 0 ? void 0 : _c.bind(pipelineRef.current)
87
+ }
88
+ };
89
+ });
77
90
  /* -------------------------------------------------------------------------- */
78
91
 
79
92
  /* features */
80
93
 
81
94
  /* -------------------------------------------------------------------------- */
82
95
 
83
-
84
96
  useRowSelection(pipeline, rowSelection);
85
97
  useRowDetail(pipeline, rowDetail);
86
98
  useFilter(pipeline, filter);
@@ -135,6 +147,6 @@ function Table(props) {
135
147
  scrollbarWidth: scrollbarWidth,
136
148
  scrollLoad: scrollLoad
137
149
  }));
138
- }
139
-
150
+ });
151
+ Table.displayName = 'Table';
140
152
  export default Table;
@@ -114,7 +114,7 @@
114
114
  -webkit-font-feature-settings: 'tnum';
115
115
  font-feature-settings: 'tnum';
116
116
  max-width: var(--kd-c-tooltip-sizing-max-width, 360px);
117
- padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-vertical, 12px);
117
+ padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-horizontal, 12px);
118
118
  color: var(--kd-c-tooltip-color-text, var(--kd-g-color-text-primary, #212121));
119
119
  border-radius: var(--kd-c-tooltip-radius-border, var(--kd-g-radius-border, 2px));
120
120
  font-size: var(--kd-c-tooltip-color-text, var(--kd-g-font-size-small, 12px));
@@ -11,7 +11,7 @@
11
11
 
12
12
  // spacing
13
13
  @tooltip-vertical-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 8px);
14
- @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 12px);
14
+ @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-horizontal', 12px);
15
15
 
16
16
  // sizing
17
17
  @tooltip-max-width: var(~'@{tooltip-custom-prefix}-sizing-max-width', 360px);
@@ -32,5 +32,5 @@ export interface TransferListProps {
32
32
  showRemove?: boolean;
33
33
  pagination?: PaginationType;
34
34
  }
35
- declare const TransferList: React.FC<TransferListProps>;
35
+ declare const TransferList: React.ForwardRefExoticComponent<TransferListProps & React.RefAttributes<unknown>>;
36
36
  export default TransferList;
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
4
4
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
5
5
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
6
6
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
7
- import React, { useState } from 'react';
7
+ import React, { useState, useImperativeHandle } from 'react';
8
8
  import { omit } from '../_utils/omit';
9
9
  import Search from './search';
10
10
  import DefaultListBody, { OmitProps } from './list-body';
@@ -19,7 +19,7 @@ function isRenderResultPlainObject(result) {
19
19
  return result && ! /*#__PURE__*/React.isValidElement(result) && Object.prototype.toString.call(result) === '[object Object]';
20
20
  }
21
21
 
22
- var TransferList = function TransferList(props) {
22
+ var ITransferList = function ITransferList(props, ref) {
23
23
  var _classNames;
24
24
 
25
25
  var prefixCls = props.prefixCls,
@@ -50,6 +50,11 @@ var TransferList = function TransferList(props) {
50
50
 
51
51
 
52
52
  var footerDom = footer && footer(props);
53
+ useImperativeHandle(ref, function () {
54
+ return {
55
+ onClear: onClear
56
+ };
57
+ });
53
58
 
54
59
  var renderItem = function renderItem(item) {
55
60
  var renderResult = render(item);
@@ -226,6 +231,7 @@ var TransferList = function TransferList(props) {
226
231
  }, getSelectAllLabel(checkedKeys.length, filteredItems.length))), listBody, listFooter);
227
232
  };
228
233
 
234
+ var TransferList = /*#__PURE__*/React.forwardRef(ITransferList);
229
235
  TransferList.defaultProps = {
230
236
  dataSource: [],
231
237
  titleText: '',
@@ -29,5 +29,5 @@ export interface TransferProps {
29
29
  pagination?: PaginationType;
30
30
  footer?: (props: TransferListProps) => React.ReactNode;
31
31
  }
32
- declare const Transfer: React.FC<TransferProps>;
32
+ declare const Transfer: React.ForwardRefExoticComponent<TransferProps & React.RefAttributes<unknown>>;
33
33
  export default Transfer;
@@ -6,7 +6,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
6
6
  import _Set from "@babel/runtime-corejs3/core-js-stable/set";
7
7
  import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
8
8
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
9
- import React, { useContext, useState } from 'react';
9
+ import React, { useContext, useState, useImperativeHandle, useRef } from 'react';
10
10
  import classNames from 'classnames';
11
11
  import List from './list';
12
12
  import Operation from './operation';
@@ -14,7 +14,7 @@ import ConfigContext from '../config-provider/ConfigContext';
14
14
  import { getCompProps } from '../_utils';
15
15
  import noDataImg from './img/transfer-empty.png';
16
16
 
17
- var Transfer = function Transfer(props) {
17
+ var InternalTransfer = function InternalTransfer(props, ref) {
18
18
  var _classNames;
19
19
 
20
20
  var _useContext = useContext(ConfigContext),
@@ -75,6 +75,8 @@ var Transfer = function Transfer(props) {
75
75
  targetSelectedKeys = _useState4[0],
76
76
  setTargetSelectedKeys = _useState4[1];
77
77
 
78
+ var leftListRef = useRef(null);
79
+ var rightListRef = useRef(null);
78
80
  var leftActive = targetSelectedKeys.length > 0;
79
81
  var rightActive = sourceSelectedKeys.length > 0;
80
82
  var mergedPagination = !children && pagination;
@@ -82,6 +84,25 @@ var Transfer = function Transfer(props) {
82
84
  var rightTitle = titles[1] || transferLang.rightTitle;
83
85
  var leftPlaceholder = searchPlaceholder[0] || transferLang.searchPlaceholder[0];
84
86
  var rightPlaceholder = searchPlaceholder[1] || transferLang.searchPlaceholder[1];
87
+ useImperativeHandle(ref, function () {
88
+ return {
89
+ clearSearch: clearSearch
90
+ };
91
+ });
92
+
93
+ var clearSearch = function clearSearch(position) {
94
+ var _a, _b;
95
+
96
+ if (position === 'left' || position === undefined) {
97
+ ;
98
+ (_a = leftListRef === null || leftListRef === void 0 ? void 0 : leftListRef.current) === null || _a === void 0 ? void 0 : _a.onClear();
99
+ }
100
+
101
+ if (position === 'right' || position === undefined) {
102
+ ;
103
+ (_b = rightListRef === null || rightListRef === void 0 ? void 0 : rightListRef.current) === null || _b === void 0 ? void 0 : _b.onClear();
104
+ }
105
+ };
85
106
 
86
107
  var setStateKeys = function setStateKeys(direction, keys) {
87
108
  if (direction === 'left') {
@@ -301,7 +322,8 @@ var Transfer = function Transfer(props) {
301
322
  showSelectAll: showSelectAll,
302
323
  pagination: mergedPagination,
303
324
  noDataContent: handleNoDataContent(noDataContent, 'left'),
304
- footer: footer
325
+ footer: footer,
326
+ ref: leftListRef
305
327
  }), /*#__PURE__*/React.createElement(Operation, {
306
328
  className: "".concat(transferPrefixCls, "-operation"),
307
329
  rightActive: rightActive,
@@ -335,8 +357,11 @@ var Transfer = function Transfer(props) {
335
357
  pagination: mergedPagination,
336
358
  noDataContent: handleNoDataContent(noDataContent, 'right'),
337
359
  footer: footer,
338
- showRemove: oneWay
360
+ showRemove: oneWay,
361
+ ref: rightListRef
339
362
  }));
340
363
  };
341
364
 
365
+ var Transfer = /*#__PURE__*/React.forwardRef(InternalTransfer);
366
+ Transfer.displayName = 'Transfer';
342
367
  export default Transfer;
@@ -207,7 +207,6 @@
207
207
  visibility: visible;
208
208
  -webkit-transform: translateX(0);
209
209
  transform: translateX(0);
210
- background-color: var(--kd-c-upload-color-background-hover, var(--kd-g-color-hover, #f5f5f5));
211
210
  }
212
211
  .kd-upload .kd-upload-text-list-item.error i,
213
212
  .kd-upload .kd-upload-text-list-item.error .kd-upload-text-list-item-name {
@@ -234,7 +233,7 @@
234
233
  padding: 0 var(--kd-c-upload-text-list-item-padding-horizontal, 20px);
235
234
  height: var(--kd-c-upload-list-item-height, 44px);
236
235
  line-height: var(--kd-c-upload-list-item-height, 44px);
237
- background-color: transparent;
236
+ background: transparent;
238
237
  opacity: 0;
239
238
  visibility: hidden;
240
239
  -webkit-transform: translateX(5px);
@@ -80,7 +80,6 @@
80
80
  opacity: 1;
81
81
  visibility: visible;
82
82
  transform: translateX(0);
83
- background-color: @upload-background-color-hover;
84
83
  }
85
84
  }
86
85
 
@@ -113,7 +112,7 @@
113
112
  padding: 0 @upload-text-list-item-padding-horizontal;
114
113
  height: @upload-list-item-height;
115
114
  line-height: @upload-list-item-height;
116
- background-color: transparent;
115
+ background: transparent;
117
116
  opacity: 0;
118
117
  visibility: hidden;
119
118
  transform: translateX(5px);
@@ -252,15 +252,7 @@ function useResizeObserver(element, handler) {
252
252
  }, contentRect);
253
253
  ['width', 'height', 'x', 'y', 'bottom', 'top', 'left', 'right'].forEach(function (prop) {
254
254
  rect[prop] = contentRect[prop];
255
- }); // rect.width = contentRect.width
256
- // rect.height = contentRect.height
257
- // rect.x = contentRect.x
258
- // rect.y = contentRect.y
259
- // rect.bottom = contentRect.bottom
260
- // rect.top = contentRect.top
261
- // rect.left = contentRect.left
262
- // rect.right = contentRect.right
263
-
255
+ });
264
256
  handler && handler(rect);
265
257
  };
266
258
 
@@ -164,7 +164,7 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
164
164
  };
165
165
 
166
166
  var handleClear = function handleClear() {
167
- setValue([]);
167
+ onChange([]);
168
168
  };
169
169
 
170
170
  var inputProps = {
@@ -196,7 +196,7 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
196
196
  }, /*#__PURE__*/React.createElement(_input.default, (0, _extends2.default)({}, inputProps)), /*#__PURE__*/React.createElement("span", {
197
197
  className: "".concat(prefixCls, "-picker-label")
198
198
  }, (labels === null || labels === void 0 ? void 0 : labels.length) ? displayRender(labels, currentOptions) : '')), allowClear && /*#__PURE__*/React.createElement(_icon.default, {
199
- type: "close",
199
+ type: "close-solid",
200
200
  className: "".concat(prefixCls, "-picker-close"),
201
201
  onClick: handleClear
202
202
  })));
@@ -188,7 +188,7 @@
188
188
  opacity: 0;
189
189
  cursor: pointer;
190
190
  visibility: hidden;
191
- color: var(--kd-c-cascader-color-active, var(--kd-g-color-theme, #5582f3));
191
+ color: var(--kd-c-cascader-clear-color-text, #666);
192
192
  -webkit-transition: all 0.1s;
193
193
  transition: all 0.1s;
194
194
  -webkit-transform-origin: 50% 50%;
@@ -196,6 +196,9 @@
196
196
  -webkit-transform: scale(0.9) translateY(-50%);
197
197
  transform: scale(0.9) translateY(-50%);
198
198
  }
199
+ .kd-cascader-picker-close:hover {
200
+ color: var(--kd-c-cascader-color-active, var(--kd-g-color-theme, #5582f3));
201
+ }
199
202
  .kd-cascader-menus {
200
203
  -webkit-box-sizing: border-box;
201
204
  box-sizing: border-box;
@@ -99,10 +99,14 @@
99
99
  opacity: 0;
100
100
  cursor: pointer;
101
101
  visibility: hidden;
102
- color: @cascader-active-color;
102
+ color: @cascader-clear-color;
103
103
  transition: all 0.1s;
104
104
  transform-origin: 50% 50%;
105
105
  transform: scale(0.9) translateY(-50%);
106
+
107
+ &:hover {
108
+ color: @cascader-active-color;
109
+ }
106
110
  }
107
111
  }
108
112
 
@@ -19,6 +19,7 @@
19
19
  @cascader-selected-color: var(~'@{cascader-prefix}-color-text-selected', @color-theme);
20
20
  @cascader-selected-bg-color: var(~'@{cascader-prefix}-color-background-selected', @color-background-ongoing);
21
21
  @cascader-disabled-color: var(~'@{cascader-prefix}-color-text-disabled', @color-disabled);
22
+ @cascader-clear-color: var(~'@{cascader-prefix}-clear-color-text', #666);
22
23
 
23
24
  // font
24
25
  @cascader-font-size: var(~'@{cascader-prefix}-font-size', @font-size-small);
@@ -283,6 +283,7 @@ declare const compDefaultProps: {
283
283
  borderType: string;
284
284
  disabled: boolean;
285
285
  count: boolean;
286
+ countPosition: string;
286
287
  maxLength: number;
287
288
  };
288
289
  Timeline: {
@@ -312,6 +312,7 @@ var compDefaultProps = {
312
312
  borderType: 'underline',
313
313
  disabled: false,
314
314
  count: true,
315
+ countPosition: 'outter',
315
316
  maxLength: 255
316
317
  },
317
318
  Timeline: {