@kdcloudjs/kdesign 1.5.8 → 1.5.11
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 +48 -0
- package/dist/default-theme.js +1 -1
- package/dist/kdesign-complete.less +156 -114
- package/dist/kdesign.css +122 -101
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +1083 -321
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +8 -8
- 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/_utils/usePopper.js +2 -2
- package/es/alert/style/index.css +0 -1
- package/es/alert/style/index.less +0 -1
- package/es/button/style/index.css +3 -0
- package/es/button/style/mixin.less +3 -0
- package/es/carousel/slidebar.d.ts +1 -0
- package/es/checkbox/checkbox.d.ts +1 -0
- package/es/checkbox/checkbox.js +21 -3
- package/es/city-picker/no-data.d.ts +1 -0
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/es/date-picker/calendar.d.ts +1 -0
- package/es/date-picker/date-picker.js +15 -14
- package/es/date-picker/hooks/use-picker-input.js +44 -38
- package/es/date-picker/panel/month/month.d.ts +1 -0
- package/es/date-picker/panel/quarter/quarter.d.ts +1 -0
- package/es/date-picker/panel/time/time.d.ts +1 -0
- package/es/date-picker/panel/week/week.d.ts +1 -0
- package/es/date-picker/panel/year/year.d.ts +1 -0
- package/es/date-picker/range-picker.js +24 -13
- package/es/date-picker/utils/get-ranges.d.ts +1 -0
- package/es/drawer/drawer.d.ts +1 -0
- package/es/drawer/drawer.js +6 -3
- package/es/dropdown/dropdown.js +1 -1
- package/es/empty/defaultEmptyImg.d.ts +1 -0
- package/es/empty/illustrationEmptyImg.d.ts +1 -0
- package/es/modal/style/index.css +1 -7
- package/es/modal/style/index.less +1 -7
- package/es/modal/style/token.less +7 -4
- 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/progress/progress.js +1 -1
- package/es/progress/style/index.css +18 -5
- package/es/progress/style/index.less +19 -5
- package/es/progress/style/token.less +5 -1
- package/es/slider/track.d.ts +1 -0
- package/es/style/themes/default.less +1 -1
- package/es/table/table.d.ts +1 -0
- package/es/tabs/style/index.css +79 -74
- package/es/tabs/style/index.less +76 -73
- package/es/tabs/style/mixin.less +0 -6
- package/es/tabs/style/token.less +8 -3
- package/es/transfer/style/index.css +0 -3
- package/es/transfer/style/index.less +0 -3
- package/es/tree/style/index.css +2 -1
- package/es/tree/style/index.less +5 -4
- package/es/tree/style/token.less +2 -1
- package/es/tree/treeNode.js +4 -1
- package/es/upload/style/index.css +17 -6
- package/es/upload/style/index.less +18 -5
- package/es/upload/style/token.less +11 -0
- package/es/upload/upload.js +6 -4
- 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/_utils/usePopper.js +2 -2
- package/lib/alert/style/index.css +0 -1
- package/lib/alert/style/index.less +0 -1
- package/lib/button/style/index.css +3 -0
- package/lib/button/style/mixin.less +3 -0
- package/lib/carousel/slidebar.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +1 -0
- package/lib/checkbox/checkbox.js +23 -4
- package/lib/city-picker/no-data.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/date-picker/calendar.d.ts +1 -0
- package/lib/date-picker/date-picker.js +15 -15
- package/lib/date-picker/hooks/use-picker-input.js +45 -37
- package/lib/date-picker/panel/month/month.d.ts +1 -0
- package/lib/date-picker/panel/quarter/quarter.d.ts +1 -0
- package/lib/date-picker/panel/time/time.d.ts +1 -0
- package/lib/date-picker/panel/week/week.d.ts +1 -0
- package/lib/date-picker/panel/year/year.d.ts +1 -0
- package/lib/date-picker/range-picker.js +24 -14
- package/lib/date-picker/utils/get-ranges.d.ts +1 -0
- package/lib/drawer/drawer.d.ts +1 -0
- package/lib/drawer/drawer.js +5 -2
- package/lib/dropdown/dropdown.js +1 -1
- package/lib/empty/defaultEmptyImg.d.ts +1 -0
- package/lib/empty/illustrationEmptyImg.d.ts +1 -0
- package/lib/modal/style/index.css +1 -7
- package/lib/modal/style/index.less +1 -7
- package/lib/modal/style/token.less +7 -4
- 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/progress/progress.js +1 -1
- package/lib/progress/style/index.css +18 -5
- package/lib/progress/style/index.less +19 -5
- package/lib/progress/style/token.less +5 -1
- package/lib/slider/track.d.ts +1 -0
- package/lib/style/themes/default.less +1 -1
- package/lib/table/table.d.ts +1 -0
- package/lib/tabs/style/index.css +79 -74
- package/lib/tabs/style/index.less +76 -73
- package/lib/tabs/style/mixin.less +0 -6
- package/lib/tabs/style/token.less +8 -3
- package/lib/transfer/style/index.css +0 -3
- package/lib/transfer/style/index.less +0 -3
- package/lib/tree/style/index.css +2 -1
- package/lib/tree/style/index.less +5 -4
- package/lib/tree/style/token.less +2 -1
- package/lib/tree/treeNode.js +4 -1
- package/lib/upload/style/index.css +17 -6
- package/lib/upload/style/index.less +18 -5
- package/lib/upload/style/token.less +11 -0
- package/lib/upload/upload.js +6 -4
- package/package.json +2 -2
|
@@ -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
|
}
|
|
@@ -16,6 +16,7 @@ export interface CheckboxProps {
|
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
name?: string;
|
|
19
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
19
20
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
21
|
}
|
|
21
22
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<unknown>>;
|
package/es/checkbox/checkbox.js
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
1
2
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
2
3
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
4
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
5
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
6
|
+
|
|
7
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
8
|
+
var t = {};
|
|
9
|
+
|
|
10
|
+
for (var p in s) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (s != null && typeof _Object$getOwnPropertySymbols === "function") for (var i = 0, p = _Object$getOwnPropertySymbols(s); i < p.length; i++) {
|
|
15
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
16
|
+
}
|
|
17
|
+
return t;
|
|
18
|
+
};
|
|
19
|
+
|
|
4
20
|
import React, { useCallback, useContext, useEffect, useState, useRef } from 'react';
|
|
5
21
|
import classNames from 'classnames';
|
|
6
22
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
@@ -21,6 +37,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
21
37
|
userDefaultProps = _useContext.compDefaultProps;
|
|
22
38
|
|
|
23
39
|
var CheckboxProps = getCompProps('Checkbox', userDefaultProps, props);
|
|
40
|
+
|
|
24
41
|
var checkboxType = CheckboxProps.checkboxType,
|
|
25
42
|
className = CheckboxProps.className,
|
|
26
43
|
customPrefixcls = CheckboxProps.prefixCls,
|
|
@@ -33,7 +50,8 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
33
50
|
style = CheckboxProps.style,
|
|
34
51
|
value = CheckboxProps.value,
|
|
35
52
|
indeterminate = CheckboxProps.indeterminate,
|
|
36
|
-
name = CheckboxProps.name
|
|
53
|
+
name = CheckboxProps.name,
|
|
54
|
+
rest = __rest(CheckboxProps, ["checkboxType", "className", "prefixCls", "defaultChecked", "checked", "size", "onChange", "disabled", "children", "style", "value", "indeterminate", "name"]);
|
|
37
55
|
|
|
38
56
|
var getChecked = function getChecked() {
|
|
39
57
|
return isBoolean(checked) ? checked : defaultChecked;
|
|
@@ -97,11 +115,11 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
97
115
|
return (
|
|
98
116
|
/*#__PURE__*/
|
|
99
117
|
// eslint-disable-next-line
|
|
100
|
-
React.createElement("label", {
|
|
118
|
+
React.createElement("label", _extends({
|
|
101
119
|
className: getRootClassName,
|
|
102
120
|
style: style,
|
|
103
121
|
ref: labelRef
|
|
104
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
122
|
+
}, rest), /*#__PURE__*/React.createElement("span", {
|
|
105
123
|
className: checkedWrapperClassName
|
|
106
124
|
}, selected && /*#__PURE__*/React.createElement("span", {
|
|
107
125
|
className: innerIconClassName
|
|
@@ -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 = /kd-dropdown-menu-item/.test(element.className);
|
|
13
13
|
|
|
14
14
|
if (isItem) {
|
|
15
15
|
return element;
|
package/es/modal/style/index.css
CHANGED
|
@@ -236,14 +236,8 @@
|
|
|
236
236
|
font-size: var(--kd-c-modal-footer-font-size, 14px);
|
|
237
237
|
color: var(--kd-c-modal-footer-text-color, var(--kd-g-color-text-secondary, #666));
|
|
238
238
|
}
|
|
239
|
-
.kd-modal-ok-btn,
|
|
240
|
-
.kd-modal-cancel-btn {
|
|
241
|
-
min-width: 88px;
|
|
242
|
-
min-height: 32px;
|
|
243
|
-
font-size: var(--kd-c-modal-footer-font-size, 14px);
|
|
244
|
-
}
|
|
245
239
|
.kd-modal-margin-btn {
|
|
246
|
-
margin-right:
|
|
240
|
+
margin-right: var(--kd-c-modal-footer-button-spacing, 12px);
|
|
247
241
|
}
|
|
248
242
|
.kd-modal-showline .kd-modal-header {
|
|
249
243
|
border-bottom: var(--kd-c-modal-sizing-border, 1px) solid var(--kd-c-modal-color-border, var(--kd-g-color-border-strong-2, #d9d9d9));
|
|
@@ -113,14 +113,8 @@
|
|
|
113
113
|
// });
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
&-ok-btn,
|
|
117
|
-
&-cancel-btn {
|
|
118
|
-
min-width: 88px;
|
|
119
|
-
min-height: 32px;
|
|
120
|
-
font-size: @modal-footer-font-size;
|
|
121
|
-
}
|
|
122
116
|
&-margin-btn {
|
|
123
|
-
margin-right:
|
|
117
|
+
margin-right: @modal-footer-button-spacing;
|
|
124
118
|
}
|
|
125
119
|
}
|
|
126
120
|
|
|
@@ -38,9 +38,12 @@
|
|
|
38
38
|
@icon-circle-radiu: var(~'@{modal-prefix}-icon-circle-sizing', 6px);
|
|
39
39
|
@modal-border-width: var(~'@{modal-prefix}-sizing-border', 1px);
|
|
40
40
|
@modal-close-icon-size: var(~'@{modal-prefix}-close-icon-font-size', 16px);
|
|
41
|
-
@modal-header-sizing-padding-horizontal: var(~'@{modal-prefix}-header-sizing-padding-horizontal', 20px);
|
|
42
|
-
@modal-header-sizing-padding-vertical: var(~'@{modal-prefix}-header-sizing-padding-vertical', 0px);
|
|
43
41
|
@modal-header-sizing-height: var(~'@{modal-prefix}-header-sizing-height', 50px);
|
|
44
|
-
@modal-body-sizing-padding: var(~'@{modal-prefix}-body-sizing-padding', 20px);
|
|
45
42
|
@modal-footer-sizing-height: var(~'@{modal-prefix}-footer-sizing-height', 50px);
|
|
46
|
-
|
|
43
|
+
|
|
44
|
+
// spacing
|
|
45
|
+
@modal-footer-button-spacing: var(~'@{modal-prefix}-footer-button-spacing', 12px);
|
|
46
|
+
@modal-title-icon-sizing-margin-right: var(~'@{modal-prefix}-title-icon-sizing-margin-right', 8px);
|
|
47
|
+
@modal-header-sizing-padding-horizontal: var(~'@{modal-prefix}-header-sizing-padding-horizontal', 20px);
|
|
48
|
+
@modal-header-sizing-padding-vertical: var(~'@{modal-prefix}-header-sizing-padding-vertical', 0px);
|
|
49
|
+
@modal-body-sizing-padding: var(~'@{modal-prefix}-body-sizing-padding', 20px);
|
|
@@ -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/progress/progress.js
CHANGED
|
@@ -57,7 +57,7 @@ var Progress = function Progress(props) {
|
|
|
57
57
|
|
|
58
58
|
var progressStatus = getProgressStatus(progressProps);
|
|
59
59
|
var progressPrefixCls = getPrefixCls(prefixCls, 'progress', customPrefixcls);
|
|
60
|
-
var progressClasses = classNames(progressPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(progressPrefixCls, "-type-")).call(_context, type), type), _defineProperty(_classNames, _concatInstanceProperty(_context2 = "".concat(progressPrefixCls, "-status-")).call(_context2, progressStatus), true), _defineProperty(_classNames, "".concat(progressPrefixCls, "-show-info"), showInfo), _classNames));
|
|
60
|
+
var progressClasses = classNames(progressPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(progressPrefixCls, "-type-")).call(_context, type), type), _defineProperty(_classNames, _concatInstanceProperty(_context2 = "".concat(progressPrefixCls, "-status-")).call(_context2, progressStatus), true), _defineProperty(_classNames, "".concat(progressPrefixCls, "-show-info"), showInfo), _defineProperty(_classNames, "".concat(progressPrefixCls, "-position-bottom"), progressProps.infoPosition !== 'right' && progressStatus === 'normal'), _classNames));
|
|
61
61
|
|
|
62
62
|
var renderProgressInfo = function renderProgressInfo(prefixCls, progressStatus, props) {
|
|
63
63
|
var _props$type = props.type,
|
|
@@ -115,9 +115,19 @@
|
|
|
115
115
|
}
|
|
116
116
|
.kd-progress-type-line {
|
|
117
117
|
width: 100%;
|
|
118
|
+
color: var(--kd-c-progress-line-color-font, #212121);
|
|
119
|
+
}
|
|
120
|
+
.kd-progress-type-line .kd-progress-special-text {
|
|
121
|
+
margin-top: var(--kd-c-progress-line-text-spacing-margin-top, 12px);
|
|
122
|
+
line-height: 24px;
|
|
123
|
+
}
|
|
124
|
+
.kd-progress-type-circle {
|
|
125
|
+
color: var(--kd-c-progress-circle-color-font, #666);
|
|
118
126
|
}
|
|
119
127
|
.kd-progress-type-circle .kd-progress-special-text {
|
|
128
|
+
margin-top: var(--kd-c-progress-circle-text-spacing-margin-top, 8px);
|
|
120
129
|
padding: 0;
|
|
130
|
+
line-height: 24px;
|
|
121
131
|
}
|
|
122
132
|
.kd-progress-outer {
|
|
123
133
|
display: inline-block;
|
|
@@ -129,9 +139,9 @@
|
|
|
129
139
|
padding-right: 0;
|
|
130
140
|
font-size: 0;
|
|
131
141
|
}
|
|
132
|
-
.kd-progress-show-info .kd-progress-outer {
|
|
133
|
-
margin-right: calc(-1 * var(--kd-c-progress-line-text-font-size, 16px) *
|
|
134
|
-
padding-right: calc(var(--kd-c-progress-line-text-font-size, 16px) *
|
|
142
|
+
.kd-progress-show-info:not(.kd-progress-position-bottom) .kd-progress-outer {
|
|
143
|
+
margin-right: calc(-1 * var(--kd-c-progress-line-text-font-size, 16px) * 2 - 8px);
|
|
144
|
+
padding-right: calc(var(--kd-c-progress-line-text-font-size, 16px) * 2 + 8px);
|
|
135
145
|
}
|
|
136
146
|
.kd-progress-inner {
|
|
137
147
|
position: relative;
|
|
@@ -165,7 +175,7 @@
|
|
|
165
175
|
display: inline-block;
|
|
166
176
|
-webkit-box-sizing: border-box;
|
|
167
177
|
box-sizing: border-box;
|
|
168
|
-
width: calc(var(--kd-c-progress-line-text-font-size, 16px)*
|
|
178
|
+
width: calc(var(--kd-c-progress-line-text-font-size, 16px)*2);
|
|
169
179
|
margin-left: var(--kd-c-progress-line-text-spacing-margin-left, 8px);
|
|
170
180
|
white-space: nowrap;
|
|
171
181
|
text-align: left;
|
|
@@ -176,7 +186,10 @@
|
|
|
176
186
|
font-size: var(--kd-c-progress-line-special-text-font-size, 16px);
|
|
177
187
|
text-align: center;
|
|
178
188
|
overflow: hidden;
|
|
179
|
-
padding-right: calc(var(--kd-c-progress-line-text-font-size, 16px)*
|
|
189
|
+
padding-right: calc(var(--kd-c-progress-line-text-font-size, 16px)*2 + 8px);
|
|
190
|
+
}
|
|
191
|
+
.kd-progress-position-bottom .kd-progress-special-text {
|
|
192
|
+
padding-right: 0;
|
|
180
193
|
}
|
|
181
194
|
.kd-progress-status-success .kd-progress-bg {
|
|
182
195
|
background-color: var(--kd-c-progress-color-success, var(--kd-g-color-success, #1ba854));
|
|
@@ -14,11 +14,21 @@
|
|
|
14
14
|
|
|
15
15
|
&-type-line {
|
|
16
16
|
width: 100%;
|
|
17
|
+
color: @progress-line-font-color;
|
|
18
|
+
|
|
19
|
+
.@{progress-prefix-cls}-special-text {
|
|
20
|
+
margin-top: @progress-line-text-margin-top;
|
|
21
|
+
line-height: 24px;
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
&-type-circle {
|
|
26
|
+
color: @progress-circle-font-color;
|
|
27
|
+
|
|
20
28
|
.@{progress-prefix-cls}-special-text {
|
|
29
|
+
margin-top: @progress-circle-text-margin-top;
|
|
21
30
|
padding: 0;
|
|
31
|
+
line-height: 24px;
|
|
22
32
|
}
|
|
23
33
|
}
|
|
24
34
|
|
|
@@ -31,9 +41,9 @@
|
|
|
31
41
|
padding-right: 0;
|
|
32
42
|
font-size: 0;
|
|
33
43
|
|
|
34
|
-
.@{progress-prefix-cls}-show-info & {
|
|
35
|
-
margin-right: calc(-1 * @progress-line-text-font-size *
|
|
36
|
-
padding-right: calc(@progress-line-text-font-size *
|
|
44
|
+
.@{progress-prefix-cls}-show-info:not(.@{progress-prefix-cls}-position-bottom) & {
|
|
45
|
+
margin-right: calc(-1 * @progress-line-text-font-size * 2 - 8px);
|
|
46
|
+
padding-right: calc(@progress-line-text-font-size * 2 + 8px);
|
|
37
47
|
}
|
|
38
48
|
}
|
|
39
49
|
|
|
@@ -71,7 +81,7 @@
|
|
|
71
81
|
&-text {
|
|
72
82
|
display: inline-block;
|
|
73
83
|
box-sizing: border-box;
|
|
74
|
-
width: calc(@progress-line-text-font-size*
|
|
84
|
+
width: calc(@progress-line-text-font-size*2);
|
|
75
85
|
margin-left: @progress-line-text-margin-left;
|
|
76
86
|
// font-size: @progress-line-text-font-size;
|
|
77
87
|
// line-height: 1;
|
|
@@ -85,7 +95,11 @@
|
|
|
85
95
|
font-size: @progress-line-special-text-font-size;
|
|
86
96
|
text-align: center;
|
|
87
97
|
overflow: hidden;
|
|
88
|
-
padding-right: calc(@progress-line-text-font-size*
|
|
98
|
+
padding-right: calc(@progress-line-text-font-size*2 + 8px);
|
|
99
|
+
|
|
100
|
+
.@{progress-prefix-cls}-position-bottom & {
|
|
101
|
+
padding-right: 0;
|
|
102
|
+
}
|
|
89
103
|
}
|
|
90
104
|
|
|
91
105
|
&-status-success {
|