@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.
- package/CHANGELOG.md +41 -0
- package/dist/kdesign-complete.less +6 -9
- package/dist/kdesign.css +10 -13
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +974 -232
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +6 -6
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/KeyCode.d.ts +436 -0
- package/es/_utils/KeyCode.js +623 -0
- package/es/_utils/hooks.d.ts +1 -0
- package/es/_utils/hooks.js +51 -1
- package/es/alert/style/index.css +0 -1
- package/es/alert/style/index.less +0 -1
- package/es/avatar/style/index.css +4 -4
- package/es/avatar/style/mixin.less +1 -1
- package/es/button/style/index.css +3 -0
- package/es/button/style/mixin.less +3 -0
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/es/date-picker/date-picker.js +15 -14
- package/es/date-picker/hooks/use-picker-input.js +44 -38
- package/es/date-picker/range-picker.js +24 -13
- package/es/drawer/drawer.d.ts +1 -0
- package/es/drawer/drawer.js +6 -3
- package/es/dropdown/dropdown.js +1 -1
- package/es/input/ClearableLabeledInput.d.ts +1 -1
- package/es/input/ClearableLabeledInput.js +3 -3
- package/es/input/TextArea.d.ts +1 -1
- package/es/input/TextArea.js +2 -2
- package/es/input/input.d.ts +1 -1
- package/es/notification-base/notification.js +4 -4
- package/es/pagination/style/index.css +1 -3
- package/es/pagination/style/index.less +1 -3
- package/es/slider/slider.js +1 -1
- package/es/slider/sliderTooltip.js +4 -3
- package/es/steps/Steps.js +0 -1
- package/es/transfer/style/index.css +0 -3
- package/es/transfer/style/index.less +0 -3
- package/es/tree/style/index.css +1 -1
- package/es/tree/style/token.less +1 -1
- package/es/tree/tree.js +2 -0
- package/es/tree/treeNode.js +1 -0
- package/lib/_utils/KeyCode.d.ts +436 -0
- package/lib/_utils/KeyCode.js +631 -0
- package/lib/_utils/hooks.d.ts +1 -0
- package/lib/_utils/hooks.js +54 -1
- package/lib/alert/style/index.css +0 -1
- package/lib/alert/style/index.less +0 -1
- package/lib/avatar/style/index.css +4 -4
- package/lib/avatar/style/mixin.less +1 -1
- package/lib/button/style/index.css +3 -0
- package/lib/button/style/mixin.less +3 -0
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/date-picker/date-picker.js +15 -15
- package/lib/date-picker/hooks/use-picker-input.js +45 -37
- package/lib/date-picker/range-picker.js +24 -14
- package/lib/drawer/drawer.d.ts +1 -0
- package/lib/drawer/drawer.js +5 -2
- package/lib/dropdown/dropdown.js +1 -1
- package/lib/input/ClearableLabeledInput.d.ts +1 -1
- package/lib/input/ClearableLabeledInput.js +3 -3
- package/lib/input/TextArea.d.ts +1 -1
- package/lib/input/TextArea.js +2 -2
- package/lib/input/input.d.ts +1 -1
- package/lib/notification-base/notification.js +4 -3
- package/lib/pagination/style/index.css +1 -3
- package/lib/pagination/style/index.less +1 -3
- package/lib/slider/slider.js +1 -1
- package/lib/slider/sliderTooltip.js +4 -3
- package/lib/steps/Steps.js +0 -1
- package/lib/transfer/style/index.css +0 -3
- package/lib/transfer/style/index.less +0 -3
- package/lib/tree/style/index.css +1 -1
- package/lib/tree/style/token.less +1 -1
- package/lib/tree/tree.js +2 -0
- package/lib/tree/treeNode.js +1 -0
- 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:
|
|
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:
|
|
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:
|
|
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:
|
|
181
|
+
vertical-align: top;
|
|
182
182
|
}
|
|
183
183
|
.kd-avatar-square {
|
|
184
184
|
border-radius: var(--kd-c-avatar-border-radius, 2px);
|
|
@@ -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
|
}
|
|
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
|
3
3
|
import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
|
|
4
4
|
import React, { useContext, useEffect } from 'react';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
|
-
import parse from 'date-fns/parse';
|
|
7
6
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
8
7
|
import { useMergedState, useOnClickOutside } from '../_utils/hooks';
|
|
9
8
|
import { getCompProps } from '../_utils';
|
|
@@ -168,19 +167,21 @@ function DatePicker(props) {
|
|
|
168
167
|
var _useTextValueMapping = useTextValueMapping({
|
|
169
168
|
valueText: valueText,
|
|
170
169
|
onTextChange: function onTextChange(newText) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
if (
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
170
|
+
if (newText === '') {
|
|
171
|
+
setSelectedValue(null);
|
|
172
|
+
setDateValue(null);
|
|
173
|
+
} else if (newText && newText.length === _format.length) {
|
|
174
|
+
var inputTempDate = parseDate(newText, _format);
|
|
175
|
+
|
|
176
|
+
if (inputTempDate && (!disabledDate || !disabledDate(inputTempDate))) {
|
|
177
|
+
if (picker !== 'year') {
|
|
178
|
+
setSelectedValue(inputTempDate);
|
|
179
|
+
setDateValue(inputTempDate);
|
|
180
|
+
} else if (isValid(inputTempDate)) {
|
|
181
|
+
setSelectedValue(inputTempDate);
|
|
182
|
+
setDateValue(inputTempDate);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
}),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
3
|
+
import { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import KeyCode from '../../_utils/KeyCode';
|
|
4
5
|
export default function usePickerInput(_ref) {
|
|
5
6
|
var preventBlurRef = _ref.preventBlurRef,
|
|
6
7
|
open = _ref.open,
|
|
@@ -29,42 +30,47 @@ export default function usePickerInput(_ref) {
|
|
|
29
30
|
setTyping(true);
|
|
30
31
|
triggerOpen(true);
|
|
31
32
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
33
|
+
onKeyDown: function onKeyDown(e) {
|
|
34
|
+
var _context;
|
|
35
|
+
|
|
36
|
+
setTyping(true);
|
|
37
|
+
triggerOpen(true);
|
|
38
|
+
|
|
39
|
+
switch (e.which) {
|
|
40
|
+
case KeyCode.ENTER:
|
|
41
|
+
{
|
|
42
|
+
if (!open) {
|
|
43
|
+
triggerOpen(true);
|
|
44
|
+
} else if (onSubmit() !== false) {
|
|
45
|
+
setTyping(true);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
case KeyCode.TAB:
|
|
53
|
+
{
|
|
54
|
+
if (typing && open && !e.shiftKey) {
|
|
55
|
+
setTyping(false);
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
case KeyCode.ESC:
|
|
63
|
+
{
|
|
64
|
+
setTyping(true);
|
|
65
|
+
onCancel();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (!open && !_includesInstanceProperty(_context = [KeyCode.SHIFT]).call(_context, e.which)) {
|
|
71
|
+
triggerOpen(true);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
68
74
|
onFocus: function onFocus(e) {
|
|
69
75
|
setTyping(true);
|
|
70
76
|
setFocused(true);
|
|
@@ -6,7 +6,6 @@ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
|
6
6
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
7
7
|
import React, { useContext, useEffect } from 'react';
|
|
8
8
|
import isSameWeek from 'date-fns/isSameWeek';
|
|
9
|
-
import parse from 'date-fns/parse';
|
|
10
9
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
11
10
|
import { useMergedState, useOnClickOutside } from '../_utils/hooks';
|
|
12
11
|
import { getCompProps } from '../_utils';
|
|
@@ -249,20 +248,32 @@ function DatePicker(props) {
|
|
|
249
248
|
});
|
|
250
249
|
|
|
251
250
|
var _onTextChange = function onTextChange(newText, index) {
|
|
252
|
-
var
|
|
251
|
+
var inputTempDate;
|
|
253
252
|
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
var disabledFunc = index === 0 ? disabledStartDate : disabledEndDate;
|
|
253
|
+
if (newText === '') {
|
|
254
|
+
if (index === 0 && selectedValue && selectedValue.length === 2) {
|
|
255
|
+
inputTempDate = selectedValue[1];
|
|
256
|
+
} else if (index === 1 && selectedValue && selectedValue.length === 2) {
|
|
257
|
+
inputTempDate = selectedValue[0];
|
|
258
|
+
}
|
|
262
259
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
260
|
+
if (inputTempDate) {
|
|
261
|
+
setSelectedValue(updateValues(selectedValue, inputTempDate, index));
|
|
262
|
+
setViewDate(inputTempDate, index);
|
|
263
|
+
}
|
|
264
|
+
} else if (newText && newText.length === _format.length) {
|
|
265
|
+
inputTempDate = parseDate(newText, _format);
|
|
266
|
+
var disabledFunc = index === 0 ? disabledStartDate : disabledEndDate;
|
|
267
|
+
|
|
268
|
+
if (inputTempDate && (!disabledFunc || !disabledFunc(inputTempDate))) {
|
|
269
|
+
if (picker !== 'year') {
|
|
270
|
+
setSelectedValue(updateValues(selectedValue, inputTempDate, index));
|
|
271
|
+
setViewDate(inputTempDate, index);
|
|
272
|
+
} else if (isValid(inputTempDate)) {
|
|
273
|
+
setSelectedValue(updateValues(selectedValue, inputTempDate, index));
|
|
274
|
+
setViewDate(inputTempDate, index);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
266
277
|
}
|
|
267
278
|
}; // input 展示
|
|
268
279
|
|
package/es/drawer/drawer.d.ts
CHANGED
|
@@ -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;
|
package/es/drawer/drawer.js
CHANGED
|
@@ -12,7 +12,7 @@ import classNames from 'classnames';
|
|
|
12
12
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
13
13
|
import { getCompProps } from '../_utils';
|
|
14
14
|
import devWarning from '../_utils/devwarning';
|
|
15
|
-
import { useResizeObserver,
|
|
15
|
+
import { useResizeObserver, useOverflowHidden } from '../_utils/hooks'; // import { usePrevious } from '../_utils/hooks'
|
|
16
16
|
|
|
17
17
|
import { toArray } from '../_utils/react-children';
|
|
18
18
|
export var PlacementTypes = tuple('top', 'right', 'bottom', 'left');
|
|
@@ -37,6 +37,8 @@ var documentBody = document.body; // function transformSize(size: string | numbe
|
|
|
37
37
|
var InternalDrawer = function InternalDrawer(props, ref) {
|
|
38
38
|
var _classNames, _context2, _context3, _classNames2;
|
|
39
39
|
|
|
40
|
+
var _a;
|
|
41
|
+
|
|
40
42
|
var _useContext = useContext(ConfigContext),
|
|
41
43
|
getPrefixCls = _useContext.getPrefixCls,
|
|
42
44
|
prefixCls = _useContext.prefixCls,
|
|
@@ -70,7 +72,8 @@ var InternalDrawer = function InternalDrawer(props, ref) {
|
|
|
70
72
|
getContainer = drawerProps.getContainer,
|
|
71
73
|
forceRender = drawerProps.forceRender,
|
|
72
74
|
destroyOnClose = drawerProps.destroyOnClose,
|
|
73
|
-
customPrefixcls = drawerProps.prefixCls
|
|
75
|
+
customPrefixcls = drawerProps.prefixCls,
|
|
76
|
+
disableScroll = drawerProps.disableScroll;
|
|
74
77
|
var drawerPrefixCls = getPrefixCls(prefixCls, 'drawer', customPrefixcls);
|
|
75
78
|
|
|
76
79
|
var _useState = useState(false),
|
|
@@ -138,7 +141,7 @@ var InternalDrawer = function InternalDrawer(props, ref) {
|
|
|
138
141
|
|
|
139
142
|
return drawerContainer || ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentNode);
|
|
140
143
|
}, handleContainerResize);
|
|
141
|
-
|
|
144
|
+
useOverflowHidden(drawerContainer || ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentNode), visible && mask, disableScroll); // 为了单测
|
|
142
145
|
|
|
143
146
|
useEffect(function () {
|
|
144
147
|
setCurrentWidth(width);
|
package/es/dropdown/dropdown.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Menu, Item } from './menu';
|
|
|
9
9
|
import usePopper from '../_utils/usePopper';
|
|
10
10
|
|
|
11
11
|
var findItem = function findItem(element) {
|
|
12
|
-
var isItem = /
|
|
12
|
+
var isItem = /dropdown-menu-item/.test(element.className);
|
|
13
13
|
|
|
14
14
|
if (isItem) {
|
|
15
15
|
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;
|
|
@@ -40,13 +40,13 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
40
40
|
return /*#__PURE__*/React.createElement("span", {
|
|
41
41
|
onClick: handleReset,
|
|
42
42
|
className: clearIconclasses
|
|
43
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
43
|
+
}, typeof allowClear === 'boolean' ? /*#__PURE__*/React.createElement(Icon, {
|
|
44
44
|
type: "close"
|
|
45
|
-
}));
|
|
45
|
+
}) : allowClear);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
var renderSuffix = function renderSuffix() {
|
|
49
|
-
if (suffix || !disabled && allowClear) {
|
|
49
|
+
if (suffix || !disabled && !!allowClear) {
|
|
50
50
|
return /*#__PURE__*/React.createElement("span", {
|
|
51
51
|
className: "".concat(prefixCls, "-suffix")
|
|
52
52
|
}, renderClearIcon(), suffix);
|
package/es/input/TextArea.d.ts
CHANGED
|
@@ -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;
|
package/es/input/TextArea.js
CHANGED
|
@@ -194,8 +194,8 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
194
194
|
var textarea = /*#__PURE__*/React.createElement("textarea", _extends({
|
|
195
195
|
ref: textareaRef,
|
|
196
196
|
disabled: disabled,
|
|
197
|
-
style: _extends({}, textareaStyles, hadCount || allowClear ? otherStyles : style),
|
|
198
|
-
className: classNames("".concat(prefixCls, "-textarea"), (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames, "".concat(prefixCls, "-allowClear-spacing"), allowClear), _classNames), _defineProperty({}, className, className && !allowClear && !hadCount)),
|
|
197
|
+
style: _extends({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
|
|
198
|
+
className: classNames("".concat(prefixCls, "-textarea"), (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames), _defineProperty({}, className, className && !allowClear && !hadCount)),
|
|
199
199
|
onChange: handleChange,
|
|
200
200
|
onFocus: !disabled ? handleFocus : undefined,
|
|
201
201
|
onBlur: !disabled ? handleBlur : undefined,
|
package/es/input/input.d.ts
CHANGED
|
@@ -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;
|
|
@@ -60,11 +60,11 @@ var Notification = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
var remove = function remove(key) {
|
|
63
|
-
|
|
64
|
-
return
|
|
63
|
+
setNotices(function (preNotices) {
|
|
64
|
+
return _filterInstanceProperty(preNotices).call(preNotices, function (notice) {
|
|
65
|
+
return notice.key !== key;
|
|
66
|
+
});
|
|
65
67
|
});
|
|
66
|
-
|
|
67
|
-
setNotices(filter);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
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,
|
package/es/slider/slider.js
CHANGED
|
@@ -265,7 +265,7 @@ var InteranalSlider = function InteranalSlider(props, ref) {
|
|
|
265
265
|
}), /*#__PURE__*/React.createElement(SliderTooltip, {
|
|
266
266
|
ref: handleRef,
|
|
267
267
|
placement: tooltipPlacement,
|
|
268
|
-
tip: tipFormatter || value,
|
|
268
|
+
tip: tipFormatter === null || tipFormatter === void 0 ? void 0 : tipFormatter(value),
|
|
269
269
|
visible: disabled ? false : tooltipVisible,
|
|
270
270
|
prefixCls: sliderPrefixCls,
|
|
271
271
|
vertical: vertical,
|
|
@@ -28,7 +28,8 @@ var SliderTooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
28
28
|
min = props.min,
|
|
29
29
|
max = props.max,
|
|
30
30
|
bound = props.bound,
|
|
31
|
-
|
|
31
|
+
tip = props.tip,
|
|
32
|
+
others = __rest(props, ["visible", "prefixCls", "reverse", "vertical", "min", "max", "bound", "tip"]);
|
|
32
33
|
|
|
33
34
|
var thisTooltipRef = useRef(null);
|
|
34
35
|
var tooltipRef = ref || thisTooltipRef;
|
|
@@ -40,8 +41,8 @@ var SliderTooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
40
41
|
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
41
42
|
ref: tooltipRef
|
|
42
43
|
}, others, {
|
|
43
|
-
tip: bound,
|
|
44
|
-
visible: visible,
|
|
44
|
+
tip: tip || bound,
|
|
45
|
+
visible: tip !== null && visible,
|
|
45
46
|
placement: placement
|
|
46
47
|
}), /*#__PURE__*/React.createElement("div", {
|
|
47
48
|
className: sliderHandleClass,
|
package/es/steps/Steps.js
CHANGED
package/es/tree/style/index.css
CHANGED
|
@@ -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,
|
|
134
|
+
margin-left: var(--kd-c-tree-spacing-margin-left, 0px);
|
|
135
135
|
}
|
|
136
136
|
.kd-tree-root {
|
|
137
137
|
min-width: 100%;
|
package/es/tree/style/token.less
CHANGED
|
@@ -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',
|
|
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/es/tree/tree.js
CHANGED
|
@@ -322,6 +322,8 @@ var InternalTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
322
322
|
var handleDrop = React.useCallback(function (event, node, dragNode, dragNodesKeys) {
|
|
323
323
|
var _context3;
|
|
324
324
|
|
|
325
|
+
setDragOverNodeKey(null);
|
|
326
|
+
setDropPosition(null);
|
|
325
327
|
var pos = getPos(flattenAllData, dragNodesKeys);
|
|
326
328
|
|
|
327
329
|
var keys = _concatInstanceProperty(_context3 = getAllChildKeys(flattenAllData, pos)).call(_context3, dragNodesKeys);
|
package/es/tree/treeNode.js
CHANGED
|
@@ -312,6 +312,7 @@ var TreeNode = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
312
312
|
var handleDrop = React.useCallback(function (e) {
|
|
313
313
|
if (!draggable) return;
|
|
314
314
|
setShowDragLine(false);
|
|
315
|
+
setForbiddenChildrenPointerEvents(false);
|
|
315
316
|
var data = getDragNode();
|
|
316
317
|
var sourceKey = data === null || data === void 0 ? void 0 : data.key;
|
|
317
318
|
|