@kdcloudjs/kdesign 1.5.7 → 1.5.10
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 +152 -107
- package/dist/kdesign.css +118 -94
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +187 -137
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.js +66 -38
- 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/date-picker/calendar.d.ts +1 -0
- 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/utils/get-ranges.d.ts +1 -0
- 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/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/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/usePopper.js +66 -38
- 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/date-picker/calendar.d.ts +1 -0
- 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/utils/get-ranges.d.ts +1 -0
- 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/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/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
package/es/_utils/usePopper.js
CHANGED
|
@@ -219,6 +219,11 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
219
219
|
visible = _useState10[0],
|
|
220
220
|
setVisible = _useState10[1];
|
|
221
221
|
|
|
222
|
+
var _useState11 = useState(false),
|
|
223
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
224
|
+
active = _useState12[0],
|
|
225
|
+
setActive = _useState12[1];
|
|
226
|
+
|
|
222
227
|
useEffect(function () {
|
|
223
228
|
if (props.visible) {
|
|
224
229
|
!exist && setExist(true);
|
|
@@ -229,20 +234,20 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
229
234
|
}
|
|
230
235
|
}, [exist, props.visible]);
|
|
231
236
|
|
|
232
|
-
var
|
|
233
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
234
|
-
evType = _useState12[0],
|
|
235
|
-
setEvType = _useState12[1];
|
|
236
|
-
|
|
237
|
-
var _useState13 = useState(),
|
|
237
|
+
var _useState13 = useState(''),
|
|
238
238
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
evType = _useState14[0],
|
|
240
|
+
setEvType = _useState14[1];
|
|
241
241
|
|
|
242
|
-
var _useState15 = useState(
|
|
242
|
+
var _useState15 = useState(),
|
|
243
243
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
align = _useState16[0],
|
|
245
|
+
setAlign = _useState16[1];
|
|
246
|
+
|
|
247
|
+
var _useState17 = useState(placement),
|
|
248
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
249
|
+
nextPlacement = _useState18[0],
|
|
250
|
+
setNextPlacement = _useState18[1];
|
|
246
251
|
|
|
247
252
|
var alignPopper = useCallback(function () {
|
|
248
253
|
if ((locatorRef === null || locatorRef === void 0 ? void 0 : locatorRef.current) && (popperRef === null || popperRef === void 0 ? void 0 : popperRef.current)) {
|
|
@@ -287,39 +292,51 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
287
292
|
bottom: locatorTop + borderTop + translateTop + height - containerTop - scrollTop
|
|
288
293
|
};
|
|
289
294
|
var currentPos = trigger === 'contextMenu' ? mousePos : locatorPos;
|
|
290
|
-
var
|
|
295
|
+
var currentPlacement = nextPlacement;
|
|
291
296
|
|
|
292
297
|
if (autoPlacement) {
|
|
298
|
+
var _context5;
|
|
299
|
+
|
|
293
300
|
if (top - gap - popperHeight <= 5 && bottom + gap + popperHeight < document.body.clientHeight - 5) {
|
|
294
|
-
|
|
301
|
+
currentPlacement = currentPlacement.replace('top', 'bottom');
|
|
295
302
|
}
|
|
296
303
|
|
|
297
304
|
if (bottom + gap + popperHeight >= document.body.clientHeight - 5 && top - gap - popperHeight > 5) {
|
|
298
|
-
|
|
305
|
+
currentPlacement = currentPlacement.replace('bottom', 'top');
|
|
299
306
|
}
|
|
300
307
|
|
|
301
308
|
if (left + popperWidth >= document.body.clientWidth - 5 && right - popperWidth > 5) {
|
|
302
|
-
|
|
309
|
+
currentPlacement = currentPlacement.replace('Left', 'Right');
|
|
303
310
|
}
|
|
304
311
|
|
|
305
312
|
if (right - popperWidth <= 5 && left + popperWidth < document.body.clientWidth - 5) {
|
|
306
|
-
|
|
313
|
+
currentPlacement = currentPlacement.replace('Right', 'Left');
|
|
307
314
|
}
|
|
308
315
|
|
|
309
316
|
if (top + popperHeight >= document.body.clientHeight - 5 && bottom - popperHeight > 5) {
|
|
310
|
-
|
|
317
|
+
currentPlacement = currentPlacement.replace('Top', 'Bottom');
|
|
311
318
|
}
|
|
312
319
|
|
|
313
320
|
if (bottom - popperHeight <= 5 && top + popperHeight < document.body.clientHeight - 5) {
|
|
314
|
-
|
|
321
|
+
currentPlacement = currentPlacement.replace('Bottom', 'Top');
|
|
315
322
|
}
|
|
316
323
|
|
|
317
324
|
if (left - gap - popperWidth <= 5 && right + gap + popperWidth < document.body.clientWidth - 5) {
|
|
318
|
-
|
|
325
|
+
currentPlacement = currentPlacement.replace('left', 'right');
|
|
319
326
|
}
|
|
320
327
|
|
|
321
328
|
if (right + gap + popperWidth >= document.body.clientWidth - 5 && left - gap - popperWidth > 5) {
|
|
322
|
-
|
|
329
|
+
currentPlacement = currentPlacement.replace('right', 'left');
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
if (_includesInstanceProperty(_context5 = ['top', 'bottom']).call(_context5, currentPlacement)) {
|
|
333
|
+
if (right - width / 2 + popperWidth / 2 >= document.body.clientWidth - 5 && right - popperWidth > 5) {
|
|
334
|
+
currentPlacement += 'Right';
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (left - width / 2 - popperWidth / 2 <= 5 && left + popperWidth < document.body.clientWidth - 5) {
|
|
338
|
+
currentPlacement += 'Left';
|
|
339
|
+
}
|
|
323
340
|
}
|
|
324
341
|
}
|
|
325
342
|
|
|
@@ -381,16 +398,16 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
381
398
|
top: topBottom
|
|
382
399
|
}
|
|
383
400
|
};
|
|
384
|
-
var alignPos = mapAlign[
|
|
401
|
+
var alignPos = mapAlign[currentPlacement];
|
|
385
402
|
var _arrowPos = {
|
|
386
403
|
top: 0,
|
|
387
404
|
left: 0
|
|
388
405
|
};
|
|
389
406
|
|
|
390
|
-
if (/left/.test(
|
|
391
|
-
if (/Top/.test(
|
|
407
|
+
if (/left/.test(currentPlacement) || /right/.test(currentPlacement)) {
|
|
408
|
+
if (/Top/.test(currentPlacement)) {
|
|
392
409
|
_arrowPos.top = arrowOffset;
|
|
393
|
-
} else if (/Bottom/.test(
|
|
410
|
+
} else if (/Bottom/.test(currentPlacement)) {
|
|
394
411
|
_arrowPos.top = popperHeight - arrowOffset - 2 * arrowSize;
|
|
395
412
|
} else {
|
|
396
413
|
_arrowPos.top = (popperHeight - arrowWidth) / 2 - 1;
|
|
@@ -417,29 +434,40 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
417
434
|
_arrowPos.top += scrollBottom - document.body.clientHeight;
|
|
418
435
|
}
|
|
419
436
|
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
if (/top/.test(_currentPlacement) || /bottom/.test(_currentPlacement)) {
|
|
423
|
-
if (/Left/.test(_currentPlacement)) {
|
|
437
|
+
} else if (/top/.test(currentPlacement) || /bottom/.test(currentPlacement)) {
|
|
438
|
+
if (/Left/.test(currentPlacement)) {
|
|
424
439
|
_arrowPos.left = arrowOffset;
|
|
425
|
-
} else if (/Right/.test(
|
|
440
|
+
} else if (/Right/.test(currentPlacement)) {
|
|
426
441
|
_arrowPos.left = popperWidth - arrowOffset - 2 * arrowSize;
|
|
427
442
|
} else {
|
|
428
443
|
_arrowPos.left = (popperWidth - arrowWidth) / 2 - 1;
|
|
429
444
|
}
|
|
445
|
+
|
|
446
|
+
if (left <= 0) {
|
|
447
|
+
alignPos.left = locatorPos.left;
|
|
448
|
+
_arrowPos.left = arrowOffset;
|
|
449
|
+
} else if (right >= document.body.clientWidth) {
|
|
450
|
+
delete alignPos.left;
|
|
451
|
+
alignPos.right = -1 * (right - document.body.clientWidth);
|
|
452
|
+
_arrowPos.left = popperWidth - arrowOffset - 2 * arrowSize;
|
|
453
|
+
}
|
|
430
454
|
}
|
|
431
455
|
|
|
432
456
|
setAlign(alignPos);
|
|
433
457
|
setArrowPos(_arrowPos);
|
|
434
|
-
|
|
458
|
+
setNextPlacement(currentPlacement);
|
|
435
459
|
}
|
|
436
|
-
}, [locatorRef, popperRef, container, trigger, mousePos,
|
|
460
|
+
}, [locatorRef, popperRef, container, trigger, mousePos, autoPlacement, gap, arrowOffset, arrowSize, arrowWidth]);
|
|
437
461
|
useEffect(function () {
|
|
438
462
|
if (canAlign) {
|
|
439
463
|
alignPopper();
|
|
440
464
|
setCanAlign(false);
|
|
441
465
|
props.visible === undefined && setVisible(true);
|
|
442
466
|
onVisibleChange && onVisibleChange(true);
|
|
467
|
+
setActive(true);
|
|
468
|
+
setTimeout(function () {
|
|
469
|
+
return setActive(false);
|
|
470
|
+
}, 200);
|
|
443
471
|
}
|
|
444
472
|
}, [alignPopper, canAlign, onVisibleChange, props]);
|
|
445
473
|
var arrowStyle = (_arrowStyle = {}, _defineProperty(_arrowStyle, "--arrowSize", arrowSize + 'px'), _defineProperty(_arrowStyle, "--arrowSpill", arrowWidth / -2 + 'px'), _arrowStyle);
|
|
@@ -453,10 +481,10 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
453
481
|
var popperProps = {
|
|
454
482
|
ref: popperRef,
|
|
455
483
|
style: popperContainerStyle,
|
|
456
|
-
className: classNames(prefixCls, popperClassName,
|
|
484
|
+
className: classNames(prefixCls, popperClassName, nextPlacement, _defineProperty({
|
|
457
485
|
arrow: arrow,
|
|
458
486
|
hidden: !visible
|
|
459
|
-
}, "".concat(
|
|
487
|
+
}, "".concat(nextPlacement, "-active"), active))
|
|
460
488
|
};
|
|
461
489
|
var popperNode = popperRef.current;
|
|
462
490
|
var locatorNode = locatorRef.current;
|
|
@@ -499,10 +527,10 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
499
527
|
var triggerNode = getTriggerElement(locatorRef.current);
|
|
500
528
|
var triggerRect = triggerNode.getBoundingClientRect();
|
|
501
529
|
var popperRect = popperRef.current.getBoundingClientRect();
|
|
502
|
-
var left = /left/.test(
|
|
503
|
-
var right = /right/.test(
|
|
504
|
-
var top = /top/.test(
|
|
505
|
-
var bottom = /bottom/.test(
|
|
530
|
+
var left = /left/.test(nextPlacement) ? popperRect.right : triggerRect.left;
|
|
531
|
+
var right = /right/.test(nextPlacement) ? popperRect.left : triggerRect.right;
|
|
532
|
+
var top = /top/.test(nextPlacement) ? popperRect.bottom : triggerRect.top;
|
|
533
|
+
var bottom = /bottom/.test(nextPlacement) ? popperRect.top : triggerRect.bottom;
|
|
506
534
|
var X = e.clientX,
|
|
507
535
|
Y = e.clientY;
|
|
508
536
|
var inTriggerRect = X > left - 2 && X < right + 2 && Y > top - 2 && Y < bottom + 2;
|
|
@@ -535,7 +563,7 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
535
563
|
}) : document.removeEventListener(mapEvent[trigger], debounceHidePopper);
|
|
536
564
|
};
|
|
537
565
|
}
|
|
538
|
-
}, [
|
|
566
|
+
}, [nextPlacement, evType, exist, getTriggerElement, hidePopper, locatorRef, mouseLeaveDelay, popperRef, visible]);
|
|
539
567
|
useEffect(function () {
|
|
540
568
|
if (visible) {
|
|
541
569
|
var scrollAlign = debounce(function (e) {
|
|
@@ -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
|
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);
|
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 {
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
// color
|
|
6
6
|
@progress-remaining-color: var(~'@{progress-prefix}-color-remaining', #e5e5e5);//背景色
|
|
7
|
+
@progress-line-font-color: var(~'@{progress-prefix}-line-color-font', #212121);
|
|
8
|
+
@progress-circle-font-color: var(~'@{progress-prefix}-circle-color-font', #666);
|
|
7
9
|
@progress-default-color: var(~'@{progress-prefix}-color-default', #5582f3);//进度条 默认色
|
|
8
10
|
@progress-success-color: var(~'@{progress-prefix}-color-success', @color-success);//进度条 成功
|
|
9
11
|
@progress-failure-color: var(~'@{progress-prefix}-color-failure', @color-error);//进度条 失败
|
|
@@ -27,6 +29,8 @@
|
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
// spacing
|
|
30
|
-
@progress-circle-unit-margin-top: var(~'@{progress-prefix}-circle-unit-spacing-margin-top', 18px);
|
|
32
|
+
@progress-circle-unit-margin-top: var(~'@{progress-prefix}-circle-unit-spacing-margin-top', 18px); // 百分比符号距离顶部的距离
|
|
31
33
|
@progress-line-text-margin-left: var(~'@{progress-prefix}-line-text-spacing-margin-left', 8px); //进度与文字或者图标的间距
|
|
34
|
+
@progress-line-text-margin-top: var(~'@{progress-prefix}-line-text-spacing-margin-top', 12px);
|
|
35
|
+
@progress-circle-text-margin-top: var(~'@{progress-prefix}-circle-text-spacing-margin-top', 8px);
|
|
32
36
|
|
package/es/slider/track.d.ts
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@warning-border-color: #ffcb78; // 警示反馈浮层的容器边框色
|
|
32
32
|
@error-color: #fb2323; // 失败色(深)
|
|
33
33
|
@error-bg-color: #fff2f4; // 失败反馈浮层的底色
|
|
34
|
-
@error-border-color: #
|
|
34
|
+
@error-border-color: #fc808B; // 失败反馈浮层的容器边框色
|
|
35
35
|
@ongoing-color: #276ff5; // 进行中(深)
|
|
36
36
|
@ongoing-bg-color: #f2f9ff; // 进行中反馈浮层的底色
|
|
37
37
|
@ongoing-border-color: #85b8ff; // 进行中反馈浮层的容器边框色
|
package/es/table/table.d.ts
CHANGED