@kdcloudjs/kdesign 1.5.10 → 1.6.1

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 (80) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/kdesign-complete.less +6 -9
  3. package/dist/kdesign.css +10 -13
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +974 -232
  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/KeyCode.d.ts +436 -0
  11. package/es/_utils/KeyCode.js +623 -0
  12. package/es/_utils/hooks.d.ts +1 -0
  13. package/es/_utils/hooks.js +51 -1
  14. package/es/alert/style/index.css +0 -1
  15. package/es/alert/style/index.less +0 -1
  16. package/es/avatar/style/index.css +4 -4
  17. package/es/avatar/style/mixin.less +1 -1
  18. package/es/button/style/index.css +3 -0
  19. package/es/button/style/mixin.less +3 -0
  20. package/es/config-provider/compDefaultProps.d.ts +1 -0
  21. package/es/config-provider/compDefaultProps.js +2 -1
  22. package/es/date-picker/date-picker.js +15 -14
  23. package/es/date-picker/hooks/use-picker-input.js +44 -38
  24. package/es/date-picker/range-picker.js +24 -13
  25. package/es/drawer/drawer.d.ts +1 -0
  26. package/es/drawer/drawer.js +6 -3
  27. package/es/dropdown/dropdown.js +1 -1
  28. package/es/input/ClearableLabeledInput.d.ts +1 -1
  29. package/es/input/ClearableLabeledInput.js +3 -3
  30. package/es/input/TextArea.d.ts +1 -1
  31. package/es/input/TextArea.js +2 -2
  32. package/es/input/input.d.ts +1 -1
  33. package/es/notification-base/notification.js +4 -4
  34. package/es/pagination/style/index.css +1 -3
  35. package/es/pagination/style/index.less +1 -3
  36. package/es/slider/slider.js +1 -1
  37. package/es/slider/sliderTooltip.js +4 -3
  38. package/es/steps/Steps.js +0 -1
  39. package/es/transfer/style/index.css +0 -3
  40. package/es/transfer/style/index.less +0 -3
  41. package/es/tree/style/index.css +1 -1
  42. package/es/tree/style/token.less +1 -1
  43. package/es/tree/tree.js +2 -0
  44. package/es/tree/treeNode.js +1 -0
  45. package/lib/_utils/KeyCode.d.ts +436 -0
  46. package/lib/_utils/KeyCode.js +631 -0
  47. package/lib/_utils/hooks.d.ts +1 -0
  48. package/lib/_utils/hooks.js +54 -1
  49. package/lib/alert/style/index.css +0 -1
  50. package/lib/alert/style/index.less +0 -1
  51. package/lib/avatar/style/index.css +4 -4
  52. package/lib/avatar/style/mixin.less +1 -1
  53. package/lib/button/style/index.css +3 -0
  54. package/lib/button/style/mixin.less +3 -0
  55. package/lib/config-provider/compDefaultProps.d.ts +1 -0
  56. package/lib/config-provider/compDefaultProps.js +2 -1
  57. package/lib/date-picker/date-picker.js +15 -15
  58. package/lib/date-picker/hooks/use-picker-input.js +45 -37
  59. package/lib/date-picker/range-picker.js +24 -14
  60. package/lib/drawer/drawer.d.ts +1 -0
  61. package/lib/drawer/drawer.js +5 -2
  62. package/lib/dropdown/dropdown.js +1 -1
  63. package/lib/input/ClearableLabeledInput.d.ts +1 -1
  64. package/lib/input/ClearableLabeledInput.js +3 -3
  65. package/lib/input/TextArea.d.ts +1 -1
  66. package/lib/input/TextArea.js +2 -2
  67. package/lib/input/input.d.ts +1 -1
  68. package/lib/notification-base/notification.js +4 -3
  69. package/lib/pagination/style/index.css +1 -3
  70. package/lib/pagination/style/index.less +1 -3
  71. package/lib/slider/slider.js +1 -1
  72. package/lib/slider/sliderTooltip.js +4 -3
  73. package/lib/steps/Steps.js +0 -1
  74. package/lib/transfer/style/index.css +0 -3
  75. package/lib/transfer/style/index.less +0 -3
  76. package/lib/tree/style/index.css +1 -1
  77. package/lib/tree/style/token.less +1 -1
  78. package/lib/tree/tree.js +2 -0
  79. package/lib/tree/treeNode.js +1 -0
  80. package/package.json +2 -2
@@ -124,7 +124,7 @@
124
124
  font-size: var(--kd-c-avatar-font-size-base, 22px);
125
125
  }
126
126
  .kd-avatar.kd-avatar-icon > .kdicon {
127
- vertical-align: unset !important;
127
+ vertical-align: top;
128
128
  }
129
129
  .kd-avatar-lg {
130
130
  width: var(--kd-c-avatar-size-large, 60px);
@@ -142,7 +142,7 @@
142
142
  font-size: var(--kd-c-avatar-font-size-large, 36px);
143
143
  }
144
144
  .kd-avatar-lg.kd-avatar-icon > .kdicon {
145
- vertical-align: unset !important;
145
+ vertical-align: top;
146
146
  }
147
147
  .kd-avatar-sm {
148
148
  width: var(--kd-c-avatar-size-small, 32px);
@@ -160,7 +160,7 @@
160
160
  font-size: var(--kd-c-avatar-font-size-small, 18px);
161
161
  }
162
162
  .kd-avatar-sm.kd-avatar-icon > .kdicon {
163
- vertical-align: unset !important;
163
+ vertical-align: top;
164
164
  }
165
165
  .kd-avatar-xs {
166
166
  width: var(--kd-c-avatar-size-x-small, 24px);
@@ -178,7 +178,7 @@
178
178
  font-size: var(--kd-c-avatar-font-size-x-small, 14px);
179
179
  }
180
180
  .kd-avatar-xs.kd-avatar-icon > .kdicon {
181
- vertical-align: unset !important;
181
+ vertical-align: top;
182
182
  }
183
183
  .kd-avatar-square {
184
184
  border-radius: var(--kd-c-avatar-border-radius, 2px);
@@ -16,7 +16,7 @@
16
16
  font-size: @font-size;
17
17
 
18
18
  & > .@{icon-prefix-cls} {
19
- vertical-align: unset !important;
19
+ vertical-align: top;
20
20
  }
21
21
  }
22
22
  }
@@ -118,6 +118,9 @@
118
118
  text-align: center;
119
119
  background-color: transparent;
120
120
  cursor: pointer;
121
+ white-space: nowrap;
122
+ overflow: hidden;
123
+ text-overflow: ellipsis;
121
124
  -webkit-transition: color 0.3s, background-color 0.3s, border-color 0.3s;
122
125
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
123
126
  }
@@ -14,6 +14,9 @@
14
14
  text-align: center;
15
15
  background-color: transparent;
16
16
  cursor: pointer;
17
+ white-space: nowrap;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
17
20
  &,
18
21
  &:active,
19
22
  &:focus {
@@ -106,6 +106,7 @@ declare const compDefaultProps: {
106
106
  placement: string;
107
107
  width: number;
108
108
  zIndex: number;
109
+ disableScroll: boolean;
109
110
  };
110
111
  Empty: {};
111
112
  Filter: {
@@ -129,7 +129,8 @@ var compDefaultProps = {
129
129
  maskClosable: true,
130
130
  placement: 'right',
131
131
  width: 320,
132
- zIndex: 1050
132
+ zIndex: 1050,
133
+ disableScroll: true
133
134
  },
134
135
  Empty: {},
135
136
  Filter: {
@@ -23,8 +23,6 @@ var _react = _interopRequireWildcard(require("react"));
23
23
 
24
24
  var _classnames = _interopRequireDefault(require("classnames"));
25
25
 
26
- var _parse = _interopRequireDefault(require("date-fns/parse"));
27
-
28
26
  var _ConfigContext = _interopRequireDefault(require("../config-provider/ConfigContext"));
29
27
 
30
28
  var _hooks = require("../_utils/hooks");
@@ -211,19 +209,21 @@ function DatePicker(props) {
211
209
  var _useTextValueMapping = (0, _useTextValueMapping3.default)({
212
210
  valueText: valueText,
213
211
  onTextChange: function onTextChange(newText) {
214
- // if (typeof _format !== 'function') {
215
- var inputDate;
216
-
217
- if (picker !== 'year') {
218
- inputDate = (0, _dateFns.parseDate)(newText, _format);
219
- } else {
220
- var year = (0, _parse.default)(newText, _format, (0, _dateFns.newDate)());
221
- inputDate = (0, _dateFns.isValid)(year) ? year : null;
222
- }
223
-
224
- if (inputDate && (!disabledDate || !disabledDate(inputDate))) {
225
- setSelectedValue(inputDate);
226
- setViewDate(inputDate);
212
+ if (newText === '') {
213
+ setSelectedValue(null);
214
+ setDateValue(null);
215
+ } else if (newText && newText.length === _format.length) {
216
+ var inputTempDate = (0, _dateFns.parseDate)(newText, _format);
217
+
218
+ if (inputTempDate && (!disabledDate || !disabledDate(inputTempDate))) {
219
+ if (picker !== 'year') {
220
+ setSelectedValue(inputTempDate);
221
+ setDateValue(inputTempDate);
222
+ } else if ((0, _dateFns.isValid)(inputTempDate)) {
223
+ setSelectedValue(inputTempDate);
224
+ setDateValue(inputTempDate);
225
+ }
226
+ }
227
227
  }
228
228
  }
229
229
  }),
@@ -7,11 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = usePickerInput;
9
9
 
10
+ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
11
+
10
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
11
13
 
12
14
  var _react = require("react");
13
15
 
14
- // import KeyCode from '../../_utils/KeyCode'
16
+ var _KeyCode = _interopRequireDefault(require("../../_utils/KeyCode"));
17
+
15
18
  function usePickerInput(_ref) {
16
19
  var preventBlurRef = _ref.preventBlurRef,
17
20
  open = _ref.open,
@@ -40,42 +43,47 @@ function usePickerInput(_ref) {
40
43
  setTyping(true);
41
44
  triggerOpen(true);
42
45
  },
43
- // onKeyDown: (e) => {
44
- // switch (e.which) {
45
- // case KeyCode.ENTER: {
46
- // if (!open) {
47
- // triggerOpen(true)
48
- // } else if (onSubmit() !== false) {
49
- // setTyping(true)
50
- // }
51
- // e.preventDefault()
52
- // return
53
- // }
54
- // case KeyCode.TAB: {
55
- // if (typing && open && !e.shiftKey) {
56
- // setTyping(false)
57
- // e.preventDefault()
58
- // } else if (!typing && open) {
59
- // if (!forwardKeyDown(e) && e.shiftKey) {
60
- // setTyping(true)
61
- // e.preventDefault()
62
- // }
63
- // }
64
- // return
65
- // }
66
- // case KeyCode.ESC: {
67
- // setTyping(true)
68
- // onCancel()
69
- // return
70
- // }
71
- // }
72
- // if (!open && ![KeyCode.SHIFT].includes(e.which)) {
73
- // triggerOpen(true)
74
- // } else if (!typing) {
75
- // // Let popup panel handle keyboard
76
- // forwardKeyDown(e)
77
- // }
78
- // },
46
+ onKeyDown: function onKeyDown(e) {
47
+ var _context;
48
+
49
+ setTyping(true);
50
+ triggerOpen(true);
51
+
52
+ switch (e.which) {
53
+ case _KeyCode.default.ENTER:
54
+ {
55
+ if (!open) {
56
+ triggerOpen(true);
57
+ } else if (onSubmit() !== false) {
58
+ setTyping(true);
59
+ }
60
+
61
+ e.preventDefault();
62
+ return;
63
+ }
64
+
65
+ case _KeyCode.default.TAB:
66
+ {
67
+ if (typing && open && !e.shiftKey) {
68
+ setTyping(false);
69
+ e.preventDefault();
70
+ }
71
+
72
+ return;
73
+ }
74
+
75
+ case _KeyCode.default.ESC:
76
+ {
77
+ setTyping(true);
78
+ onCancel();
79
+ return;
80
+ }
81
+ }
82
+
83
+ if (!open && !(0, _includes.default)(_context = [_KeyCode.default.SHIFT]).call(_context, e.which)) {
84
+ triggerOpen(true);
85
+ }
86
+ },
79
87
  onFocus: function onFocus(e) {
80
88
  setTyping(true);
81
89
  setFocused(true);
@@ -29,8 +29,6 @@ var _react = _interopRequireWildcard(require("react"));
29
29
 
30
30
  var _isSameWeek = _interopRequireDefault(require("date-fns/isSameWeek"));
31
31
 
32
- var _parse = _interopRequireDefault(require("date-fns/parse"));
33
-
34
32
  var _ConfigContext = _interopRequireDefault(require("../config-provider/ConfigContext"));
35
33
 
36
34
  var _hooks = require("../_utils/hooks");
@@ -304,20 +302,32 @@ function DatePicker(props) {
304
302
  });
305
303
 
306
304
  var _onTextChange = function onTextChange(newText, index) {
307
- var inputDate;
308
-
309
- if (picker !== 'year') {
310
- inputDate = (0, _dateFns.parseDate)(newText, _format);
311
- } else {
312
- var year = (0, _parse.default)(newText, _format, (0, _dateFns.newDate)());
313
- inputDate = (0, _dateFns.isValid)(year) ? year : null;
314
- }
305
+ var inputTempDate;
315
306
 
316
- var disabledFunc = index === 0 ? disabledStartDate : disabledEndDate;
307
+ if (newText === '') {
308
+ if (index === 0 && selectedValue && selectedValue.length === 2) {
309
+ inputTempDate = selectedValue[1];
310
+ } else if (index === 1 && selectedValue && selectedValue.length === 2) {
311
+ inputTempDate = selectedValue[0];
312
+ }
317
313
 
318
- if (inputDate && (!disabledFunc || !disabledFunc(inputDate))) {
319
- setSelectedValue((0, _utils2.updateValues)(selectedValue, inputDate, index));
320
- setViewDate(inputDate, index);
314
+ if (inputTempDate) {
315
+ setSelectedValue((0, _utils2.updateValues)(selectedValue, inputTempDate, index));
316
+ setViewDate(inputTempDate, index);
317
+ }
318
+ } else if (newText && newText.length === _format.length) {
319
+ inputTempDate = (0, _dateFns.parseDate)(newText, _format);
320
+ var disabledFunc = index === 0 ? disabledStartDate : disabledEndDate;
321
+
322
+ if (inputTempDate && (!disabledFunc || !disabledFunc(inputTempDate))) {
323
+ if (picker !== 'year') {
324
+ setSelectedValue((0, _utils2.updateValues)(selectedValue, inputTempDate, index));
325
+ setViewDate(inputTempDate, index);
326
+ } else if ((0, _dateFns.isValid)(inputTempDate)) {
327
+ setSelectedValue((0, _utils2.updateValues)(selectedValue, inputTempDate, index));
328
+ setViewDate(inputTempDate, index);
329
+ }
330
+ }
321
331
  }
322
332
  }; // input 展示
323
333
 
@@ -36,6 +36,7 @@ export interface IDrawerProps {
36
36
  width?: string | number;
37
37
  height?: string | number;
38
38
  zIndex?: string | number;
39
+ disableScroll?: boolean;
39
40
  }
40
41
  declare const Drawer: React.ForwardRefExoticComponent<IDrawerProps & React.RefAttributes<unknown>>;
41
42
  export default Drawer;
@@ -73,6 +73,8 @@ var documentBody = document.body; // function transformSize(size: string | numbe
73
73
  var InternalDrawer = function InternalDrawer(props, ref) {
74
74
  var _classNames, _context2, _context3, _classNames2;
75
75
 
76
+ var _a;
77
+
76
78
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
77
79
  getPrefixCls = _useContext.getPrefixCls,
78
80
  prefixCls = _useContext.prefixCls,
@@ -106,7 +108,8 @@ var InternalDrawer = function InternalDrawer(props, ref) {
106
108
  getContainer = drawerProps.getContainer,
107
109
  forceRender = drawerProps.forceRender,
108
110
  destroyOnClose = drawerProps.destroyOnClose,
109
- customPrefixcls = drawerProps.prefixCls;
111
+ customPrefixcls = drawerProps.prefixCls,
112
+ disableScroll = drawerProps.disableScroll;
110
113
  var drawerPrefixCls = getPrefixCls(prefixCls, 'drawer', customPrefixcls);
111
114
 
112
115
  var _useState = (0, _react.useState)(false),
@@ -174,7 +177,7 @@ var InternalDrawer = function InternalDrawer(props, ref) {
174
177
 
175
178
  return drawerContainer || ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentNode);
176
179
  }, handleContainerResize);
177
- (0, _hooks.useHideDocumentScrollBar)(!!visible, isBody, !!mask); // 为了单测
180
+ (0, _hooks.useOverflowHidden)(drawerContainer || ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentNode), visible && mask, disableScroll); // 为了单测
178
181
 
179
182
  (0, _react.useEffect)(function () {
180
183
  setCurrentWidth(width);
@@ -36,7 +36,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
36
36
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
37
 
38
38
  var findItem = function findItem(element) {
39
- var isItem = /kd-dropdown-menu-item/.test(element.className);
39
+ var isItem = /dropdown-menu-item/.test(element.className);
40
40
 
41
41
  if (isItem) {
42
42
  return element;
@@ -6,7 +6,7 @@ interface ClearableInputProps {
6
6
  prefixCls: string;
7
7
  inputType: typeof ClearableInputType[number];
8
8
  value?: any;
9
- allowClear?: boolean;
9
+ allowClear?: boolean | React.ReactNode;
10
10
  element: React.ReactElement;
11
11
  handleReset?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
12
12
  className?: string;
@@ -57,13 +57,13 @@ var ClearableInput = function ClearableInput(props) {
57
57
  return /*#__PURE__*/_react.default.createElement("span", {
58
58
  onClick: handleReset,
59
59
  className: clearIconclasses
60
- }, /*#__PURE__*/_react.default.createElement(_index.Icon, {
60
+ }, typeof allowClear === 'boolean' ? /*#__PURE__*/_react.default.createElement(_index.Icon, {
61
61
  type: "close"
62
- }));
62
+ }) : allowClear);
63
63
  };
64
64
 
65
65
  var renderSuffix = function renderSuffix() {
66
- if (suffix || !disabled && allowClear) {
66
+ if (suffix || !disabled && !!allowClear) {
67
67
  return /*#__PURE__*/_react.default.createElement("span", {
68
68
  className: "".concat(prefixCls, "-suffix")
69
69
  }, renderClearIcon(), suffix);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { InputSiteType, BorderType } from './input';
3
3
  export interface textAreaProps extends React.TextareaHTMLAttributes<HTMLInputElement> {
4
- allowClear?: boolean;
4
+ allowClear?: boolean | React.ReactNode;
5
5
  borderType?: BorderType;
6
6
  defaultValue?: string;
7
7
  count?: boolean;
@@ -226,8 +226,8 @@ var InternalTextarea = function InternalTextarea(props, ref) {
226
226
  var textarea = /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({
227
227
  ref: textareaRef,
228
228
  disabled: disabled,
229
- style: (0, _extends2.default)({}, textareaStyles, hadCount || allowClear ? otherStyles : style),
230
- className: (0, _classnames.default)("".concat(prefixCls, "-textarea"), (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-no-resize"), canResize !== true), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-allowClear-spacing"), allowClear), _classNames), (0, _defineProperty2.default)({}, className, className && !allowClear && !hadCount)),
229
+ style: (0, _extends2.default)({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
230
+ className: (0, _classnames.default)("".concat(prefixCls, "-textarea"), (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-no-resize"), canResize !== true), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames), (0, _defineProperty2.default)({}, className, className && !allowClear && !hadCount)),
231
231
  onChange: handleChange,
232
232
  onFocus: !disabled ? handleFocus : undefined,
233
233
  onBlur: !disabled ? handleBlur : undefined,
@@ -10,7 +10,7 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
10
10
  size?: InputSiteType;
11
11
  defaultValue?: string;
12
12
  disabled?: boolean;
13
- allowClear?: boolean;
13
+ allowClear?: boolean | React.ReactNode;
14
14
  placeholderTobeValue?: boolean;
15
15
  addonAfter?: React.ReactNode;
16
16
  addonBefore?: React.ReactNode;
@@ -84,10 +84,11 @@ var Notification = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
84
84
  };
85
85
 
86
86
  var remove = function remove(key) {
87
- var filter = (0, _filter.default)(notices).call(notices, function (notice) {
88
- return notice.key !== key;
87
+ setNotices(function (preNotices) {
88
+ return (0, _filter.default)(preNotices).call(preNotices, function (notice) {
89
+ return notice.key !== key;
90
+ });
89
91
  });
90
- setNotices(filter);
91
92
  };
92
93
 
93
94
  var _onClose = function onClose(notice) {
@@ -430,9 +430,7 @@
430
430
  }
431
431
  .kd-pagination.less .kd-pagination-pages-item:hover button,
432
432
  .kd-pagination.less .kd-pagination-pages-item:active button,
433
- .kd-pagination.less .kd-pagination-pages-item.active button,
434
- .kd-pagination.less .kd-pagination-pages-item:first-child button,
435
- .kd-pagination.less .kd-pagination-pages-item:last-child button {
433
+ .kd-pagination.less .kd-pagination-pages-item.active button {
436
434
  color: var(--kd-g-color-theme, #5582f3);
437
435
  }
438
436
  .kd-pagination.less .kd-pagination-pages-item:first-child button,
@@ -314,9 +314,7 @@
314
314
 
315
315
  &:hover,
316
316
  &:active,
317
- &.active,
318
- &:first-child,
319
- &:last-child {
317
+ &.active {
320
318
  button {
321
319
  color: @color-theme;
322
320
  }
@@ -297,7 +297,7 @@ var InteranalSlider = function InteranalSlider(props, ref) {
297
297
  }), /*#__PURE__*/_react.default.createElement(_sliderTooltip.default, {
298
298
  ref: handleRef,
299
299
  placement: tooltipPlacement,
300
- tip: tipFormatter || value,
300
+ tip: tipFormatter === null || tipFormatter === void 0 ? void 0 : tipFormatter(value),
301
301
  visible: disabled ? false : tooltipVisible,
302
302
  prefixCls: sliderPrefixCls,
303
303
  vertical: vertical,
@@ -52,7 +52,8 @@ var SliderTooltip = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
52
52
  min = props.min,
53
53
  max = props.max,
54
54
  bound = props.bound,
55
- others = __rest(props, ["visible", "prefixCls", "reverse", "vertical", "min", "max", "bound"]);
55
+ tip = props.tip,
56
+ others = __rest(props, ["visible", "prefixCls", "reverse", "vertical", "min", "max", "bound", "tip"]);
56
57
 
57
58
  var thisTooltipRef = (0, _react.useRef)(null);
58
59
  var tooltipRef = ref || thisTooltipRef;
@@ -64,8 +65,8 @@ var SliderTooltip = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
64
65
  return /*#__PURE__*/_react.default.createElement(_tooltip.default, (0, _extends2.default)({
65
66
  ref: tooltipRef
66
67
  }, others, {
67
- tip: bound,
68
- visible: visible,
68
+ tip: tip || bound,
69
+ visible: tip !== null && visible,
69
70
  placement: placement
70
71
  }), /*#__PURE__*/_react.default.createElement("div", {
71
72
  className: sliderHandleClass,
@@ -136,7 +136,6 @@ var Steps = function Steps(props) {
136
136
  }
137
137
  }
138
138
 
139
- childProps.active = stepNumber === current;
140
139
  return /*#__PURE__*/(0, _react.cloneElement)(child, childProps);
141
140
  }));
142
141
  };
@@ -352,6 +352,3 @@
352
352
  .kd-transfer-operation .kd-btn + .kd-btn {
353
353
  margin-top: 20px;
354
354
  }
355
- .kd-transfer-operation .kd-btn .kd-btn-iconWrapper-left {
356
- float: none;
357
- }
@@ -182,9 +182,6 @@
182
182
  & + .@{kd-prefix}-btn {
183
183
  margin-top: 20px;
184
184
  }
185
- .@{kd-prefix}-btn-iconWrapper-left {
186
- float: none;
187
- }
188
185
  }
189
186
  }
190
187
  }
@@ -131,7 +131,7 @@
131
131
  flex-grow: 1;
132
132
  font-size: var(--kd-c-tree-font-size, var(--kd-g-font-size-small, 12px));
133
133
  color: var(--kd-c-tree-color-text, var(--kd-g-color-text-primary, #212121));
134
- margin-left: var(--kd-c-tree-spacing-margin-left, 16px);
134
+ margin-left: var(--kd-c-tree-spacing-margin-left, 0px);
135
135
  }
136
136
  .kd-tree-root {
137
137
  min-width: 100%;
@@ -22,7 +22,7 @@
22
22
  @tree-expand-icon-loading-width: var(~'@{tree-prefix}-expand-icon-loading-sizing-width', 16px);
23
23
  @tree-node-icon-height: var(~'@{tree-prefix}-node-icon-sizing-height', 16px);
24
24
  @tree-node-icon-width: var(~'@{tree-prefix}-node-icon-sizing-width', 16px);
25
- @tree-margin-left: var(~'@{tree-prefix}-spacing-margin-left', 16px);
25
+ @tree-margin-left: var(~'@{tree-prefix}-spacing-margin-left', 0px);
26
26
 
27
27
  // font
28
28
  @tree-font-size: var(~'@{tree-prefix}-font-size', @font-size-small);
package/lib/tree/tree.js CHANGED
@@ -374,6 +374,8 @@ var InternalTree = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
374
374
  var handleDrop = _react.default.useCallback(function (event, node, dragNode, dragNodesKeys) {
375
375
  var _context3;
376
376
 
377
+ setDragOverNodeKey(null);
378
+ setDropPosition(null);
377
379
  var pos = (0, _treeUtils.getPos)(flattenAllData, dragNodesKeys);
378
380
  var keys = (0, _concat.default)(_context3 = (0, _treeUtils.getAllChildKeys)(flattenAllData, pos)).call(_context3, dragNodesKeys);
379
381
  onDrop && onDrop({
@@ -352,6 +352,7 @@ var TreeNode = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
352
352
  var handleDrop = _react.default.useCallback(function (e) {
353
353
  if (!draggable) return;
354
354
  setShowDragLine(false);
355
+ setForbiddenChildrenPointerEvents(false);
355
356
  var data = getDragNode();
356
357
  var sourceKey = data === null || data === void 0 ? void 0 : data.key;
357
358
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.5.10",
3
+ "version": "1.6.1",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [
@@ -84,7 +84,7 @@
84
84
  "classnames": "^2.2.6",
85
85
  "copy-to-clipboard": "^3.3.1",
86
86
  "cropperjs": "^1.5.12",
87
- "date-fns": "^2.16.1",
87
+ "date-fns": "2.28.0",
88
88
  "lodash": "^4.17.20",
89
89
  "react-draggable": "^4.4.3",
90
90
  "react-popper": "^2.2.3",