@kdcloudjs/kdesign 1.8.29 → 1.8.31
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/dist/kdesign-complete.less +897 -83
- package/dist/kdesign.css +650 -7
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +188 -109
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +5 -5
- package/dist/kdesign.min.js.map +1 -1
- package/es/anchor/anchor.js +7 -5
- package/es/anchor/style/index.css +14 -0
- package/es/anchor/style/index.less +15 -0
- package/es/button/button.js +4 -2
- package/es/button/group.js +5 -3
- package/es/button/style/index.css +32 -0
- package/es/button/style/index.less +42 -1
- package/es/checkbox/checkbox.js +5 -3
- package/es/checkbox/group.js +4 -2
- package/es/checkbox/style/index.css +38 -1
- package/es/checkbox/style/index.less +56 -15
- package/es/city-picker/city-picker.js +32 -14
- package/es/city-picker/option.js +7 -2
- package/es/city-picker/style/index.css +54 -0
- package/es/city-picker/style/index.less +67 -0
- package/es/collapse/collapse.js +4 -2
- package/es/collapse/style/index.css +24 -0
- package/es/collapse/style/index.less +26 -0
- package/es/color-picker/color-picker.js +6 -4
- package/es/color-picker/style/index.css +129 -4
- package/es/color-picker/style/index.less +174 -29
- package/es/config-provider/ConfigContext.d.ts +4 -0
- package/es/config-provider/ConfigContext.js +2 -0
- package/es/config-provider/compDefaultProps.d.ts +0 -1
- package/es/config-provider/compDefaultProps.js +0 -5
- package/es/config-provider/defaultConfig.d.ts +1 -0
- package/es/config-provider/defaultConfig.js +2 -1
- package/es/dropdown/dropdown.js +4 -2
- package/es/dropdown/menu.js +4 -2
- package/es/dropdown/style/index.css +3 -0
- package/es/dropdown/style/index.less +4 -0
- package/es/image/preview.js +6 -4
- package/es/image/style/index.css +11 -0
- package/es/image/style/index.less +20 -4
- package/es/input/ClearableLabeledInput.d.ts +1 -0
- package/es/input/ClearableLabeledInput.js +6 -4
- package/es/input/TextArea.js +7 -4
- package/es/input/input.js +6 -3
- package/es/input/style/index.css +48 -0
- package/es/input/style/index.less +55 -0
- package/es/link/link.js +4 -2
- package/es/link/style/index.css +11 -0
- package/es/link/style/index.less +14 -0
- package/es/menu/menu.js +4 -2
- package/es/menu/menuItem.js +5 -3
- package/es/menu/style/index.css +10 -0
- package/es/menu/style/index.less +33 -22
- package/es/menu/subMenu.js +6 -4
- package/es/modal/modal.js +4 -2
- package/es/modal/style/index.css +7 -0
- package/es/modal/style/index.less +14 -0
- package/es/pagination/pagination.js +16 -13
- package/es/pagination/style/index.css +72 -0
- package/es/pagination/style/index.less +99 -0
- package/es/qr-code/qr-code.js +4 -2
- package/es/qr-code/style/index.css +3 -0
- package/es/qr-code/style/index.less +7 -3
- package/es/radio/group.js +4 -2
- package/es/radio/radio.js +4 -2
- package/es/radio/style/index.css +38 -0
- package/es/radio/style/index.less +46 -0
- package/es/select/option.js +4 -2
- package/es/select/select.js +8 -6
- package/es/select/style/index.css +61 -0
- package/es/select/style/index.less +87 -0
- package/es/steps/Steps.js +4 -2
- package/es/steps/style/index.css +35 -0
- package/es/steps/style/index.less +59 -5
- package/es/switch/style/index.css +9 -0
- package/es/switch/style/index.less +9 -2
- package/es/switch/switch.js +4 -2
- package/es/tag/style/index.css +7 -0
- package/es/tag/style/index.less +8 -0
- package/es/tag/tag.js +4 -2
- package/es/tree/style/index.css +19 -0
- package/es/tree/style/index.less +27 -0
- package/es/tree/tree.js +4 -2
- package/es/tree/treeNode.js +3 -2
- package/es/upload/style/index.css +24 -1
- package/es/upload/style/index.less +40 -2
- package/es/upload/upload.js +4 -2
- package/lib/anchor/anchor.js +7 -5
- package/lib/anchor/style/index.css +14 -0
- package/lib/anchor/style/index.less +15 -0
- package/lib/button/button.js +4 -2
- package/lib/button/group.js +5 -3
- package/lib/button/style/index.css +32 -0
- package/lib/button/style/index.less +42 -1
- package/lib/checkbox/checkbox.js +5 -3
- package/lib/checkbox/group.js +4 -2
- package/lib/checkbox/style/index.css +38 -1
- package/lib/checkbox/style/index.less +56 -15
- package/lib/city-picker/city-picker.js +32 -14
- package/lib/city-picker/option.js +7 -2
- package/lib/city-picker/style/index.css +54 -0
- package/lib/city-picker/style/index.less +67 -0
- package/lib/collapse/collapse.js +4 -2
- package/lib/collapse/style/index.css +24 -0
- package/lib/collapse/style/index.less +26 -0
- package/lib/color-picker/color-picker.js +6 -4
- package/lib/color-picker/style/index.css +129 -4
- package/lib/color-picker/style/index.less +174 -29
- package/lib/config-provider/ConfigContext.d.ts +4 -0
- package/lib/config-provider/ConfigContext.js +4 -1
- package/lib/config-provider/compDefaultProps.d.ts +0 -1
- package/lib/config-provider/compDefaultProps.js +0 -5
- package/lib/config-provider/defaultConfig.d.ts +1 -0
- package/lib/config-provider/defaultConfig.js +2 -1
- package/lib/dropdown/dropdown.js +4 -2
- package/lib/dropdown/menu.js +4 -2
- package/lib/dropdown/style/index.css +3 -0
- package/lib/dropdown/style/index.less +4 -0
- package/lib/image/preview.js +6 -4
- package/lib/image/style/index.css +11 -0
- package/lib/image/style/index.less +20 -4
- package/lib/input/ClearableLabeledInput.d.ts +1 -0
- package/lib/input/ClearableLabeledInput.js +6 -4
- package/lib/input/TextArea.js +7 -4
- package/lib/input/input.js +6 -3
- package/lib/input/style/index.css +48 -0
- package/lib/input/style/index.less +55 -0
- package/lib/link/link.js +4 -2
- package/lib/link/style/index.css +11 -0
- package/lib/link/style/index.less +14 -0
- package/lib/menu/menu.js +4 -2
- package/lib/menu/menuItem.js +5 -3
- package/lib/menu/style/index.css +10 -0
- package/lib/menu/style/index.less +33 -22
- package/lib/menu/subMenu.js +6 -4
- package/lib/modal/modal.js +4 -2
- package/lib/modal/style/index.css +7 -0
- package/lib/modal/style/index.less +14 -0
- package/lib/pagination/pagination.js +16 -13
- package/lib/pagination/style/index.css +72 -0
- package/lib/pagination/style/index.less +99 -0
- package/lib/qr-code/qr-code.js +4 -2
- package/lib/qr-code/style/index.css +3 -0
- package/lib/qr-code/style/index.less +7 -3
- package/lib/radio/group.js +4 -2
- package/lib/radio/radio.js +4 -2
- package/lib/radio/style/index.css +38 -0
- package/lib/radio/style/index.less +46 -0
- package/lib/select/option.js +4 -2
- package/lib/select/select.js +8 -6
- package/lib/select/style/index.css +61 -0
- package/lib/select/style/index.less +87 -0
- package/lib/steps/Steps.js +4 -2
- package/lib/steps/style/index.css +35 -0
- package/lib/steps/style/index.less +59 -5
- package/lib/switch/style/index.css +9 -0
- package/lib/switch/style/index.less +9 -2
- package/lib/switch/switch.js +4 -2
- package/lib/tag/style/index.css +7 -0
- package/lib/tag/style/index.less +8 -0
- package/lib/tag/tag.js +4 -2
- package/lib/tree/style/index.css +19 -0
- package/lib/tree/style/index.less +27 -0
- package/lib/tree/tree.js +4 -2
- package/lib/tree/treeNode.js +3 -2
- package/lib/upload/style/index.css +24 -1
- package/lib/upload/style/index.less +40 -2
- package/lib/upload/upload.js +4 -2
- package/package.json +1 -1
|
@@ -42,7 +42,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
42
42
|
getPrefixCls = _useContext.getPrefixCls,
|
|
43
43
|
prefixCls = _useContext.prefixCls,
|
|
44
44
|
userDefaultProps = _useContext.compDefaultProps,
|
|
45
|
-
locale = _useContext.locale
|
|
45
|
+
locale = _useContext.locale,
|
|
46
|
+
direction = _useContext.direction;
|
|
46
47
|
var selectProps = (0, _utils.getCompProps)('CityPicker', userDefaultProps, props);
|
|
47
48
|
var cityPickerLangMsg = locale.getCompLangMsg({
|
|
48
49
|
componentName: 'CityPicker'
|
|
@@ -133,7 +134,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
133
134
|
return type === 'domestic';
|
|
134
135
|
};
|
|
135
136
|
var selectPrefixCls = getPrefixCls(prefixCls, 'city-picker', customPrefixcls);
|
|
136
|
-
var
|
|
137
|
+
var rtlCls = direction === 'rtl' ? "".concat(selectPrefixCls, "-rtl") : null;
|
|
138
|
+
var cityPickerCls = (0, _classnames.default)(selectPrefixCls, rtlCls, className, (0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-visible"), optionShow));
|
|
137
139
|
var selectionCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-selector"), true));
|
|
138
140
|
var commCls = (0, _classnames.default)((_classNames3 = {}, (0, _defineProperty2.default)(_classNames3, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), (0, _defineProperty2.default)(_classNames3, "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames3, "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames3, (0, _concat.default)(_context = "".concat(selectPrefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames3, "".concat(selectPrefixCls, "-wrapper"), true), (0, _defineProperty2.default)(_classNames3, "".concat(selectPrefixCls, "-show-search"), focusd), _classNames3));
|
|
139
141
|
(0, _react.useEffect)(function () {
|
|
@@ -303,22 +305,38 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
303
305
|
var symbol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';
|
|
304
306
|
if (!data) return null;
|
|
305
307
|
if (isDomestic(type)) {
|
|
306
|
-
var
|
|
308
|
+
var _context8, _context10;
|
|
307
309
|
if (isCommon) {
|
|
308
|
-
var
|
|
310
|
+
var _context4;
|
|
309
311
|
var _curVal = (data === null || data === void 0 ? void 0 : data.province) ? data === null || data === void 0 ? void 0 : data.province : (data === null || data === void 0 ? void 0 : data.country) || '';
|
|
310
|
-
|
|
312
|
+
if (direction === 'rtl') {
|
|
313
|
+
var _context3;
|
|
314
|
+
return (0, _concat.default)(_context3 = "".concat(_curVal)).call(_context3, flag && _curVal ? symbol : '');
|
|
315
|
+
}
|
|
316
|
+
return (0, _concat.default)(_context4 = "".concat(flag && _curVal ? symbol : '')).call(_context4, _curVal);
|
|
311
317
|
}
|
|
312
318
|
if (data === null || data === void 0 ? void 0 : data.type) {
|
|
313
|
-
var
|
|
314
|
-
var _curVal2 = (data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : (0, _filter.default)(
|
|
315
|
-
|
|
319
|
+
var _context5, _context7;
|
|
320
|
+
var _curVal2 = (data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : (0, _filter.default)(_context5 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context5, Boolean).join(symbol)) || '';
|
|
321
|
+
if (direction === 'rtl') {
|
|
322
|
+
var _context6;
|
|
323
|
+
return (0, _concat.default)(_context6 = "".concat(_curVal2)).call(_context6, flag && _curVal2 ? symbol : '');
|
|
324
|
+
}
|
|
325
|
+
return (0, _concat.default)(_context7 = "".concat(flag && _curVal2 ? symbol : '')).call(_context7, _curVal2);
|
|
316
326
|
}
|
|
317
|
-
var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) || '' : (0, _filter.default)(
|
|
318
|
-
|
|
327
|
+
var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) || '' : (0, _filter.default)(_context8 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context8, Boolean).join(symbol);
|
|
328
|
+
if (direction === 'rtl') {
|
|
329
|
+
var _context9;
|
|
330
|
+
return (0, _concat.default)(_context9 = "".concat(curVal)).call(_context9, flag && curVal ? symbol : '');
|
|
331
|
+
}
|
|
332
|
+
return (0, _concat.default)(_context10 = "".concat(flag && curVal ? symbol : '')).call(_context10, curVal);
|
|
319
333
|
} else {
|
|
320
|
-
var
|
|
321
|
-
|
|
334
|
+
var _context13, _context14;
|
|
335
|
+
if (direction === 'rtl') {
|
|
336
|
+
var _context11, _context12;
|
|
337
|
+
return (0, _concat.default)(_context11 = "".concat((0, _filter.default)(_context12 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context12, Boolean).join(symbol))).call(_context11, flag && ((data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country)) ? symbol : '');
|
|
338
|
+
}
|
|
339
|
+
return (0, _concat.default)(_context13 = "".concat(flag && ((data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country)) ? symbol : '')).call(_context13, (0, _filter.default)(_context14 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context14, Boolean).join(symbol));
|
|
322
340
|
}
|
|
323
341
|
}, [type, tabsValue]);
|
|
324
342
|
var renderSingle = function renderSingle() {
|
|
@@ -479,8 +497,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
479
497
|
}
|
|
480
498
|
};
|
|
481
499
|
var popperProps = (0, _extends2.default)((0, _extends2.default)({}, selectProps), {
|
|
482
|
-
prefixCls: "".concat(selectPrefixCls, "-dropdown"),
|
|
483
|
-
placement: 'bottomLeft',
|
|
500
|
+
prefixCls: (0, _classnames.default)("".concat(selectPrefixCls, "-dropdown"), rtlCls),
|
|
501
|
+
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft',
|
|
484
502
|
popperStyle: catchStyle(),
|
|
485
503
|
defaultVisible: optionShow,
|
|
486
504
|
visible: optionShow,
|
|
@@ -33,7 +33,8 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
33
33
|
name = city.name;
|
|
34
34
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
35
35
|
getPrefixCls = _useContext.getPrefixCls,
|
|
36
|
-
prefixCls = _useContext.prefixCls
|
|
36
|
+
prefixCls = _useContext.prefixCls,
|
|
37
|
+
direction = _useContext.direction;
|
|
37
38
|
var selectOptionPrefixCls = getPrefixCls(prefixCls, 'city-picker-list-item');
|
|
38
39
|
var isSelected = id !== undefined ? id === value : false;
|
|
39
40
|
var optionCls = (0, _classnames.default)(selectOptionPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-selected"), isSelected), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(selectOptionPrefixCls, "-active"), activeIndex === index), _classNames));
|
|
@@ -51,7 +52,11 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
51
52
|
title: name,
|
|
52
53
|
onClick: handleClick,
|
|
53
54
|
onMouseEnter: handleOnMouseEnter
|
|
54
|
-
}, typeof itemRender === 'function' ? itemRender(city) : _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("span", {
|
|
55
|
+
}, typeof itemRender === 'function' ? itemRender(city) : direction === 'rtl' ? _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("span", {
|
|
56
|
+
className: "".concat(selectOptionPrefixCls, "-info")
|
|
57
|
+
}, renderCityInfo === null || renderCityInfo === void 0 ? void 0 : renderCityInfo(city, true)), _react.default.createElement("span", {
|
|
58
|
+
className: "".concat(selectOptionPrefixCls, "-content")
|
|
59
|
+
}, children)) : _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("span", {
|
|
55
60
|
className: "".concat(selectOptionPrefixCls, "-content")
|
|
56
61
|
}, children), _react.default.createElement("span", {
|
|
57
62
|
className: "".concat(selectOptionPrefixCls, "-info")
|
|
@@ -493,3 +493,57 @@
|
|
|
493
493
|
white-space: nowrap;
|
|
494
494
|
text-overflow: ellipsis;
|
|
495
495
|
}
|
|
496
|
+
.kd-city-picker-rtl {
|
|
497
|
+
direction: rtl;
|
|
498
|
+
}
|
|
499
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-description {
|
|
500
|
+
text-align: right;
|
|
501
|
+
}
|
|
502
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-selector .kd-city-picker-wrapper {
|
|
503
|
+
padding-right: 0;
|
|
504
|
+
padding-left: 24px;
|
|
505
|
+
}
|
|
506
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-placeholder {
|
|
507
|
+
position: absolute;
|
|
508
|
+
left: 24px;
|
|
509
|
+
right: 0;
|
|
510
|
+
top: 0;
|
|
511
|
+
bottom: 0;
|
|
512
|
+
}
|
|
513
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-bordered {
|
|
514
|
+
padding-right: var(--kd-c-city-picker-bordered-spacing-padding-left, 8px) !important;
|
|
515
|
+
padding-left: auto !important;
|
|
516
|
+
}
|
|
517
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-bordered .kd-city-picker-suffix {
|
|
518
|
+
padding-right: 8px;
|
|
519
|
+
padding-left: auto;
|
|
520
|
+
}
|
|
521
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-bordered .kd-city-picker-placeholder {
|
|
522
|
+
padding-right: var(--kd-c-city-picker-bordered-spacing-padding-left, 8px);
|
|
523
|
+
}
|
|
524
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-suffix {
|
|
525
|
+
left: 0;
|
|
526
|
+
right: auto;
|
|
527
|
+
top: 0;
|
|
528
|
+
bottom: 0;
|
|
529
|
+
position: absolute;
|
|
530
|
+
display: -webkit-box;
|
|
531
|
+
display: -ms-flexbox;
|
|
532
|
+
display: flex;
|
|
533
|
+
margin-right: 8px;
|
|
534
|
+
}
|
|
535
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-disabled.kd-city-picker-bordered {
|
|
536
|
+
padding-right: auto;
|
|
537
|
+
padding-left: var(--kd-c-city-picker-bordered-spacing-padding-left, 8px);
|
|
538
|
+
}
|
|
539
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-content-item {
|
|
540
|
+
position: absolute;
|
|
541
|
+
right: 0;
|
|
542
|
+
left: auto;
|
|
543
|
+
}
|
|
544
|
+
.kd-city-picker-rtl.kd-city-picker .kd-city-picker-content-info {
|
|
545
|
+
text-align: left;
|
|
546
|
+
overflow: hidden;
|
|
547
|
+
white-space: nowrap;
|
|
548
|
+
text-overflow: ellipsis;
|
|
549
|
+
}
|
|
@@ -367,3 +367,70 @@
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
+
|
|
371
|
+
.@{city-picker-prefix-cls}-rtl {
|
|
372
|
+
direction: rtl;
|
|
373
|
+
&.@{city-picker-prefix-cls} {
|
|
374
|
+
.@{city-picker-prefix-cls}-description {
|
|
375
|
+
text-align: right;
|
|
376
|
+
}
|
|
377
|
+
.@{city-picker-prefix-cls}-selector {
|
|
378
|
+
.@{city-picker-prefix-cls}-wrapper {
|
|
379
|
+
padding-right: 0;
|
|
380
|
+
padding-left: 24px;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
.@{city-picker-prefix-cls}-placeholder {
|
|
384
|
+
position: absolute;
|
|
385
|
+
left: 24px;
|
|
386
|
+
right: 0;
|
|
387
|
+
top: 0;
|
|
388
|
+
bottom: 0;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.@{city-picker-prefix-cls}-bordered {
|
|
392
|
+
padding-right: @city-picker-bordered !important;
|
|
393
|
+
padding-left: auto !important;
|
|
394
|
+
.@{city-picker-prefix-cls}-suffix {
|
|
395
|
+
padding-right: 8px;
|
|
396
|
+
padding-left: auto;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.@{city-picker-prefix-cls}-placeholder {
|
|
400
|
+
padding-right: @city-picker-bordered;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.@{city-picker-prefix-cls}-suffix {
|
|
405
|
+
left: 0;
|
|
406
|
+
right: auto;
|
|
407
|
+
top: 0;
|
|
408
|
+
bottom: 0;
|
|
409
|
+
position: absolute;
|
|
410
|
+
display: flex;
|
|
411
|
+
margin-right: 8px;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
.@{city-picker-prefix-cls}-disabled {
|
|
417
|
+
&.@{city-picker-prefix-cls}-bordered {
|
|
418
|
+
padding-right: auto;
|
|
419
|
+
padding-left: @city-picker-bordered;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.@{city-picker-prefix-cls}-content {
|
|
424
|
+
&-item {
|
|
425
|
+
position: absolute;
|
|
426
|
+
right: 0;
|
|
427
|
+
left: auto;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
&-info {
|
|
431
|
+
text-align: left;
|
|
432
|
+
.over();
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
package/lib/collapse/collapse.js
CHANGED
|
@@ -30,7 +30,8 @@ var InternalCollapse = _react.default.forwardRef(function (props, ref) {
|
|
|
30
30
|
var _React$useContext = _react.default.useContext(_ConfigContext.default),
|
|
31
31
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
32
32
|
prefixCls = _React$useContext.prefixCls,
|
|
33
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
33
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
34
|
+
direction = _React$useContext.direction;
|
|
34
35
|
var _getCompProps = (0, _utils.getCompProps)('Collapse', userDefaultProps, props),
|
|
35
36
|
accordion = _getCompProps.accordion,
|
|
36
37
|
activeKey = _getCompProps.activeKey,
|
|
@@ -44,6 +45,7 @@ var InternalCollapse = _react.default.forwardRef(function (props, ref) {
|
|
|
44
45
|
children = _getCompProps.children,
|
|
45
46
|
customPrefixcls = _getCompProps.prefixCls;
|
|
46
47
|
var CollapsePrefixCls = getPrefixCls(prefixCls, 'collapse', customPrefixcls);
|
|
48
|
+
var rtlCls = direction === 'rtl' ? "".concat(CollapsePrefixCls, "-rtl") : null;
|
|
47
49
|
var _useState = (0, _react.useState)([]),
|
|
48
50
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
51
|
innerKey = _useState2[0],
|
|
@@ -110,7 +112,7 @@ var InternalCollapse = _react.default.forwardRef(function (props, ref) {
|
|
|
110
112
|
}, item.props));
|
|
111
113
|
});
|
|
112
114
|
};
|
|
113
|
-
var rootClassName = (0, _classnames.default)(className, (0, _defineProperty2.default)({}, "".concat(CollapsePrefixCls), true));
|
|
115
|
+
var rootClassName = (0, _classnames.default)(className, rtlCls, (0, _defineProperty2.default)({}, "".concat(CollapsePrefixCls), true));
|
|
114
116
|
var collapseRef = ref || _react.default.createRef();
|
|
115
117
|
return _react.default.createElement("div", {
|
|
116
118
|
className: rootClassName,
|
|
@@ -262,3 +262,27 @@
|
|
|
262
262
|
cursor: not-allowed !important;
|
|
263
263
|
color: var(--kd-c-collapse-color-disabled, raba(178, 178, 178, 1));
|
|
264
264
|
}
|
|
265
|
+
.kd-collapse-rtl {
|
|
266
|
+
direction: rtl;
|
|
267
|
+
}
|
|
268
|
+
.kd-collapse-rtl .kd-collapse-panel-top {
|
|
269
|
+
padding: 8px 28px 8px 50px;
|
|
270
|
+
}
|
|
271
|
+
.kd-collapse-rtl .kd-collapse-panel-icon {
|
|
272
|
+
margin-left: var(--kd-c-collapse-spacing-margin-right, 6px);
|
|
273
|
+
margin-right: 0;
|
|
274
|
+
}
|
|
275
|
+
.kd-collapse-rtl .kd-collapse-panel-animation-expand {
|
|
276
|
+
-webkit-transform: rotate(180deg);
|
|
277
|
+
transform: rotate(180deg);
|
|
278
|
+
}
|
|
279
|
+
.kd-collapse-rtl .kd-collapse-panel-children > div {
|
|
280
|
+
text-align: right;
|
|
281
|
+
}
|
|
282
|
+
.kd-collapse-rtl .kd-collapse-panel-children-hide > div {
|
|
283
|
+
text-align: right;
|
|
284
|
+
}
|
|
285
|
+
.kd-collapse-rtl .kd-collapse-panel-middle {
|
|
286
|
+
margin-right: 22px;
|
|
287
|
+
margin-left: 0;
|
|
288
|
+
}
|
|
@@ -117,3 +117,29 @@
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
+
|
|
121
|
+
.@{collapse-prefix-cls}-rtl {
|
|
122
|
+
direction: rtl;
|
|
123
|
+
.@{collapse-prefix-cls}-panel {
|
|
124
|
+
&-top {
|
|
125
|
+
padding: 8px 28px 8px 50px;
|
|
126
|
+
}
|
|
127
|
+
&-icon {
|
|
128
|
+
margin-left: @collapse-icon-margin-right;
|
|
129
|
+
margin-right: 0;
|
|
130
|
+
}
|
|
131
|
+
&-animation-expand {
|
|
132
|
+
transform: rotate(180deg);
|
|
133
|
+
}
|
|
134
|
+
&-children > div {
|
|
135
|
+
text-align: right;
|
|
136
|
+
}
|
|
137
|
+
&-children-hide > div {
|
|
138
|
+
text-align: right;
|
|
139
|
+
}
|
|
140
|
+
&-middle {
|
|
141
|
+
margin-right: 22px;
|
|
142
|
+
margin-left: 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -41,7 +41,8 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_configProvider.ConfigContext),
|
|
42
42
|
getPrefixCls = _useContext.getPrefixCls,
|
|
43
43
|
prefixCls = _useContext.prefixCls,
|
|
44
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
44
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
45
|
+
direction = _useContext.direction;
|
|
45
46
|
var colorPickerProps = (0, _utils.getCompProps)('ColorPicker', userDefaultProps, props);
|
|
46
47
|
var value = colorPickerProps.value,
|
|
47
48
|
className = colorPickerProps.className,
|
|
@@ -118,8 +119,9 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
|
|
|
118
119
|
clickedHistoricalColorIndex = _useState22[0],
|
|
119
120
|
setClickedHistoricalColorIndex = _useState22[1];
|
|
120
121
|
var colorPickerPrefixCls = getPrefixCls(prefixCls, 'color-picker');
|
|
121
|
-
var
|
|
122
|
-
var
|
|
122
|
+
var rtlCls = direction === 'rtl' ? "".concat(colorPickerPrefixCls, "-rtl") : null;
|
|
123
|
+
var popUpLayer = (0, _classnames.default)(getPrefixCls(prefixCls, 'color-picker-pop'), rtlCls, popperClassName);
|
|
124
|
+
var containerCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-container"), rtlCls, className, (0, _defineProperty2.default)({}, "".concat(colorPickerPrefixCls, "-container-pure"), pure));
|
|
123
125
|
var inputCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-input"));
|
|
124
126
|
var inputRef = (0, _react.useRef)(null);
|
|
125
127
|
var showColorPickerPanel = showColorTransfer || typeof showPresetColor === 'boolean' && showPresetColor && ((presetColor === null || presetColor === void 0 ? void 0 : presetColor.length) || _systemPresetColor.systemPresetColor.length) || typeof showPresetColor === 'undefined' || showClear || (historicalColor === null || historicalColor === void 0 ? void 0 : historicalColor.length) || (functionalColor === null || functionalColor === void 0 ? void 0 : functionalColor.length) && showSwitch || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showBox) || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showHue) || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showOpacity);
|
|
@@ -310,7 +312,7 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
|
|
|
310
312
|
});
|
|
311
313
|
var popperProps = (0, _extends2.default)((0, _extends2.default)({}, otherProps), {
|
|
312
314
|
popperClassName: popUpLayer,
|
|
313
|
-
placement: 'bottomLeft',
|
|
315
|
+
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft',
|
|
314
316
|
defaultVisible: showPanel,
|
|
315
317
|
visible: showPanel,
|
|
316
318
|
onVisibleChange: null,
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
box-sizing: border-box;
|
|
203
203
|
width: var(--kd-c-color-picker-panel-sizing-width, 304px);
|
|
204
204
|
padding: 4px 12px 16px;
|
|
205
|
-
background: #
|
|
205
|
+
background: #ffffff;
|
|
206
206
|
-webkit-box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
|
|
207
207
|
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
|
|
208
208
|
border-radius: 2px;
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
position: absolute;
|
|
407
407
|
width: 64px !important;
|
|
408
408
|
min-width: unset !important;
|
|
409
|
-
background: #
|
|
409
|
+
background: #ffffff;
|
|
410
410
|
right: 0;
|
|
411
411
|
left: unset !important;
|
|
412
412
|
-webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(12n) {
|
|
511
511
|
margin-right: 0;
|
|
512
512
|
}
|
|
513
|
-
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n+12) {
|
|
513
|
+
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
514
514
|
margin-top: 0;
|
|
515
515
|
}
|
|
516
516
|
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container li {
|
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
.kd-color-picker-pop .kd-color-picker-panel-color-box-container-ie11 li:nth-child(12n) {
|
|
572
572
|
margin-right: 0;
|
|
573
573
|
}
|
|
574
|
-
.kd-color-picker-pop .kd-color-picker-panel-color-box-container-ie11 li:nth-child(-n+12) {
|
|
574
|
+
.kd-color-picker-pop .kd-color-picker-panel-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
575
575
|
margin-top: 0;
|
|
576
576
|
}
|
|
577
577
|
.kd-color-picker-pop .kd-color-picker-panel-color-box-container li {
|
|
@@ -605,3 +605,128 @@
|
|
|
605
605
|
.kd-color-picker-pop .kd-color-picker-panel-color-box-container li:hover .square {
|
|
606
606
|
display: block;
|
|
607
607
|
}
|
|
608
|
+
.kd-color-picker-rtl {
|
|
609
|
+
direction: rtl;
|
|
610
|
+
}
|
|
611
|
+
.kd-color-picker-rtl .kd-color-picker-input .kd-input-prefix {
|
|
612
|
+
margin-right: auto;
|
|
613
|
+
margin-left: 3px;
|
|
614
|
+
}
|
|
615
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel {
|
|
616
|
+
-webkit-transform-origin: top left;
|
|
617
|
+
transform-origin: top left;
|
|
618
|
+
}
|
|
619
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-clear-box {
|
|
620
|
+
margin-left: 4px;
|
|
621
|
+
}
|
|
622
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-switch span {
|
|
623
|
+
vertical-align: middle;
|
|
624
|
+
margin-right: 9px;
|
|
625
|
+
}
|
|
626
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container {
|
|
627
|
+
display: -webkit-box;
|
|
628
|
+
display: -ms-flexbox;
|
|
629
|
+
display: flex;
|
|
630
|
+
-ms-flex-wrap: nowrap;
|
|
631
|
+
flex-wrap: nowrap;
|
|
632
|
+
}
|
|
633
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-select {
|
|
634
|
+
margin-left: 8px;
|
|
635
|
+
margin-right: 0;
|
|
636
|
+
}
|
|
637
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-select .kd-select-bordered {
|
|
638
|
+
border-radius: 2px;
|
|
639
|
+
width: var(--kd-c-color-picker-panel-select-sizing-width, 212px);
|
|
640
|
+
height: var(--kd-c-color-picker-panel-select-sizing-height, 28px);
|
|
641
|
+
min-height: 28px;
|
|
642
|
+
padding: 0 28px 0 0;
|
|
643
|
+
}
|
|
644
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-select .active-option {
|
|
645
|
+
background-color: var(--kd-c-color-picker-panel-option-color-background-selected, var(--kd-g-color-theme-3, #e3eeff));
|
|
646
|
+
}
|
|
647
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input {
|
|
648
|
+
height: 28px;
|
|
649
|
+
-webkit-box-flex: 1;
|
|
650
|
+
-ms-flex: 1 1 auto;
|
|
651
|
+
flex: 1 1 auto;
|
|
652
|
+
padding: 0 8px;
|
|
653
|
+
}
|
|
654
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group {
|
|
655
|
+
display: -webkit-box;
|
|
656
|
+
display: -ms-flexbox;
|
|
657
|
+
display: flex;
|
|
658
|
+
-webkit-box-align: center;
|
|
659
|
+
-ms-flex-align: center;
|
|
660
|
+
align-items: center;
|
|
661
|
+
}
|
|
662
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item {
|
|
663
|
+
height: 28px;
|
|
664
|
+
-webkit-box-flex: 1;
|
|
665
|
+
-ms-flex: 1;
|
|
666
|
+
flex: 1;
|
|
667
|
+
}
|
|
668
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item.active {
|
|
669
|
+
z-index: 2;
|
|
670
|
+
}
|
|
671
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:first-child {
|
|
672
|
+
border-top-right-radius: 0;
|
|
673
|
+
border-bottom-right-radius: 0;
|
|
674
|
+
z-index: 1;
|
|
675
|
+
}
|
|
676
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:nth-child(2) {
|
|
677
|
+
margin-right: -1px;
|
|
678
|
+
margin-left: -1px;
|
|
679
|
+
border-radius: 0;
|
|
680
|
+
}
|
|
681
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:nth-child(2):hover {
|
|
682
|
+
z-index: 1;
|
|
683
|
+
}
|
|
684
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:last-child {
|
|
685
|
+
border-top-left-radius: 0;
|
|
686
|
+
border-bottom-left-radius: 0;
|
|
687
|
+
}
|
|
688
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-transparent {
|
|
689
|
+
-webkit-box-flex: 0;
|
|
690
|
+
-ms-flex: 0 0 54px;
|
|
691
|
+
flex: 0 0 54px;
|
|
692
|
+
height: 28px;
|
|
693
|
+
margin-right: 8px;
|
|
694
|
+
margin-left: 0;
|
|
695
|
+
padding: 0;
|
|
696
|
+
text-align: center;
|
|
697
|
+
font-size: var(--kd-c-color-picker-panel-alpha-font-size, var(--kd-g-font-size-middle, 14px));
|
|
698
|
+
}
|
|
699
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-title {
|
|
700
|
+
font-size: 12px;
|
|
701
|
+
color: #666666;
|
|
702
|
+
line-height: 18px;
|
|
703
|
+
font-weight: 400;
|
|
704
|
+
margin-bottom: 8px;
|
|
705
|
+
}
|
|
706
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container {
|
|
707
|
+
display: grid;
|
|
708
|
+
grid-template-columns: repeat(12, 1fr);
|
|
709
|
+
grid-column-gap: 8px;
|
|
710
|
+
grid-row-gap: 8px;
|
|
711
|
+
}
|
|
712
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 {
|
|
713
|
+
display: -webkit-box;
|
|
714
|
+
display: -ms-flexbox;
|
|
715
|
+
display: flex;
|
|
716
|
+
-ms-flex-wrap: wrap;
|
|
717
|
+
flex-wrap: wrap;
|
|
718
|
+
}
|
|
719
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li {
|
|
720
|
+
margin-right: 8px;
|
|
721
|
+
margin-top: 8px;
|
|
722
|
+
}
|
|
723
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(12n) {
|
|
724
|
+
margin-right: 0;
|
|
725
|
+
}
|
|
726
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
727
|
+
margin-top: 0;
|
|
728
|
+
}
|
|
729
|
+
.kd-color-picker-rtl .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:first-child > div {
|
|
730
|
+
margin-right: 4px !important;
|
|
731
|
+
margin-left: 0 !important;
|
|
732
|
+
}
|