@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
|
@@ -365,3 +365,49 @@
|
|
|
365
365
|
line-height: 1.5;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
+
|
|
369
|
+
.@{radio-prefix-cls}-rtl {
|
|
370
|
+
direction: rtl;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.@{radio-button-prefix-cls}-rtl {
|
|
374
|
+
direction: rtl;
|
|
375
|
+
&.@{radio-button-prefix-cls} {
|
|
376
|
+
border: @radio-border-width solid @radio-color-border;
|
|
377
|
+
border-right: none;
|
|
378
|
+
&.@{radio-button-prefix-cls}:first-child {
|
|
379
|
+
border-radius: 0 @radius-size @radius-size 0;
|
|
380
|
+
border-right: @radio-border-width solid @radio-color-border;
|
|
381
|
+
&::before {
|
|
382
|
+
content: none;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
&.@{radio-button-prefix-cls}:last-child {
|
|
387
|
+
border-radius: @radius-size 0 0 @radius-size;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.@{radio-square-prefix-cls}-rtl {
|
|
394
|
+
direction: rtl;
|
|
395
|
+
&.@{radio-square-prefix-cls} {
|
|
396
|
+
margin-left: @radio-margin-right;
|
|
397
|
+
margin-right: 0;
|
|
398
|
+
&.@{radio-square-prefix-cls}::after {
|
|
399
|
+
left: calc(-1 * (@radio-square-height - 10px) / 2);
|
|
400
|
+
right: auto;
|
|
401
|
+
}
|
|
402
|
+
&.@{radio-square-prefix-cls}-checked {
|
|
403
|
+
&::after {
|
|
404
|
+
left: calc(-1 * (@radio-square-height - 10px) / 2);
|
|
405
|
+
right: auto;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
}
|
|
411
|
+
.@{radio-group-prefix-cls}-rtl {
|
|
412
|
+
direction: rtl;
|
|
413
|
+
}
|
package/es/select/option.js
CHANGED
|
@@ -29,8 +29,10 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
29
29
|
var optionProps = _extends({}, props);
|
|
30
30
|
var _useContext = useContext(ConfigContext),
|
|
31
31
|
getPrefixCls = _useContext.getPrefixCls,
|
|
32
|
-
prefixCls = _useContext.prefixCls
|
|
32
|
+
prefixCls = _useContext.prefixCls,
|
|
33
|
+
direction = _useContext.direction;
|
|
33
34
|
var selectOptionPrefixCls = getPrefixCls(prefixCls, 'select-item');
|
|
35
|
+
var rtlCls = direction === 'rtl' ? "".concat(selectOptionPrefixCls, "-rtl") : null;
|
|
34
36
|
useEffect(function () {
|
|
35
37
|
if (isMultiple) {
|
|
36
38
|
setSelected((values === null || values === void 0 ? void 0 : values.indexOf(value)) > -1);
|
|
@@ -38,7 +40,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
38
40
|
setSelected(value !== undefined ? value === values : false);
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
|
-
var optionCls = classNames(selectOptionPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option"), true), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option-active"), activeIndex === index), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option-selected"), isSelected), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option-disabled"), disabled), _classNames));
|
|
43
|
+
var optionCls = classNames(selectOptionPrefixCls, rtlCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option"), true), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option-active"), activeIndex === index), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option-selected"), isSelected), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-option-disabled"), disabled), _classNames));
|
|
42
44
|
var contentCls = classNames(_defineProperty({}, "".concat(selectOptionPrefixCls, "-option-content"), true));
|
|
43
45
|
var handleClick = function handleClick(e) {
|
|
44
46
|
e.preventDefault();
|
package/es/select/select.js
CHANGED
|
@@ -7,7 +7,7 @@ import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray
|
|
|
7
7
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
8
8
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
9
9
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { var
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { var _context7; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context7 = Object.prototype.toString.call(o)).call(_context7, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
12
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
13
13
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
@@ -30,12 +30,13 @@ import VirtualList from '../virtual-list';
|
|
|
30
30
|
import KeyCode from '../_utils/KeyCode';
|
|
31
31
|
var INPUT_MIN_WIDTH = 4;
|
|
32
32
|
var InternalSelect = function InternalSelect(props, ref) {
|
|
33
|
-
var _context, _classNames5, _classNames6, _classNames12, _context5;
|
|
33
|
+
var _context, _classNames5, _classNames6, _classNames12, _context5, _context6;
|
|
34
34
|
var _useContext = useContext(ConfigContext),
|
|
35
35
|
getPrefixCls = _useContext.getPrefixCls,
|
|
36
36
|
prefixCls = _useContext.prefixCls,
|
|
37
37
|
userDefaultProps = _useContext.compDefaultProps,
|
|
38
|
-
locale = _useContext.locale
|
|
38
|
+
locale = _useContext.locale,
|
|
39
|
+
direction = _useContext.direction;
|
|
39
40
|
var selectProps = getCompProps('Select', userDefaultProps, props);
|
|
40
41
|
var selectLangMsg = locale.getCompLangMsg({
|
|
41
42
|
componentName: 'Select'
|
|
@@ -125,7 +126,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
125
126
|
return isBoolean(showSearch) ? showSearch : isMultiple;
|
|
126
127
|
}, [isMultiple, showSearch]);
|
|
127
128
|
var selectPrefixCls = getPrefixCls(prefixCls, 'select', customPrefixcls);
|
|
128
|
-
var
|
|
129
|
+
var rtlCls = direction === 'rtl' ? "".concat(selectPrefixCls, "-rtl") : null;
|
|
130
|
+
var selectCls = classNames(selectPrefixCls, rtlCls, className, _defineProperty({}, "".concat(selectPrefixCls, "-visible"), optionShow));
|
|
129
131
|
var selectionCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-selector"), true));
|
|
130
132
|
var dropContentCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-dropdown-scroll"), (isMultiple ? (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 8 : (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 10) || selectProps.dropdownRender));
|
|
131
133
|
var multipleFooterCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-multiple-footer"), true));
|
|
@@ -689,7 +691,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
689
691
|
var multipleCls = classNames(commCls, (_classNames10 = {}, _defineProperty(_classNames10, "".concat(selectPrefixCls, "-multiple-disabled"), disabled), _defineProperty(_classNames10, _concatInstanceProperty(_context3 = "".concat(selectPrefixCls, "-")).call(_context3, mode), mode), _defineProperty(_classNames10, "".concat(selectPrefixCls, "-focused"), focusd || optionShow), _classNames10));
|
|
690
692
|
var itemCls = classNames((_classNames11 = {}, _defineProperty(_classNames11, "".concat(selectPrefixCls, "-selection-item"), true), _defineProperty(_classNames11, _concatInstanceProperty(_context4 = "".concat(selectPrefixCls, "-selection-item-")).call(_context4, size), size), _classNames11));
|
|
691
693
|
var TagStyle = {
|
|
692
|
-
margin: '2px 8px 2px 0',
|
|
694
|
+
margin: direction === 'rtl' ? '2px 0 2px 8px' : '2px 8px 2px 0',
|
|
693
695
|
maxWidth: '100%'
|
|
694
696
|
};
|
|
695
697
|
var totalText = locale.getLangMsg('Select', 'total', {
|
|
@@ -905,7 +907,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
905
907
|
}
|
|
906
908
|
};
|
|
907
909
|
var popperProps = _extends(_extends({}, selectProps), {
|
|
908
|
-
prefixCls: _concatInstanceProperty(_context5 = "".concat(selectPrefixCls, "-dropdown-panel")).call(
|
|
910
|
+
prefixCls: _concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = "".concat(selectPrefixCls, "-dropdown-panel")).call(_context6, isMultiple ? " ".concat(selectPrefixCls, "-multiple-dropdown-panel") : '', " ")).call(_context5, rtlCls),
|
|
909
911
|
placement: 'bottomLeft',
|
|
910
912
|
popperStyle: catchStyle(),
|
|
911
913
|
defaultVisible: optionShow,
|
|
@@ -717,3 +717,64 @@
|
|
|
717
717
|
-webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
718
718
|
transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
719
719
|
}
|
|
720
|
+
.kd-select-rtl {
|
|
721
|
+
direction: rtl;
|
|
722
|
+
}
|
|
723
|
+
.kd-select-rtl .kd-select-selector .kd-select-wrapper {
|
|
724
|
+
padding: 1px 0 1px 28px;
|
|
725
|
+
}
|
|
726
|
+
.kd-select-rtl .kd-select-selector .kd-select-wrapper .kd-select-suffix {
|
|
727
|
+
position: absolute;
|
|
728
|
+
right: auto;
|
|
729
|
+
left: 0;
|
|
730
|
+
margin-left: 0;
|
|
731
|
+
margin-right: 8px;
|
|
732
|
+
}
|
|
733
|
+
.kd-select-rtl .kd-select-selector .kd-select-wrapper .kd-select-placeholder {
|
|
734
|
+
right: 0;
|
|
735
|
+
left: 28px;
|
|
736
|
+
}
|
|
737
|
+
.kd-select-rtl .kd-select-selector .kd-select-wrapper.kd-select-single .kd-select-selection-search {
|
|
738
|
+
padding-left: auto;
|
|
739
|
+
position: absolute;
|
|
740
|
+
left: 28px;
|
|
741
|
+
right: 0;
|
|
742
|
+
height: 100%;
|
|
743
|
+
top: 0;
|
|
744
|
+
bottom: 0;
|
|
745
|
+
}
|
|
746
|
+
.kd-select-rtl .kd-select-selector .kd-select-multiple .kd-select-selection-tag .kd-tag {
|
|
747
|
+
margin: 2px 0 2px 8px;
|
|
748
|
+
}
|
|
749
|
+
.kd-select-rtl .kd-select-selector .kd-select-multiple .kd-select-selection-tag .kd-tag-closeWrapper {
|
|
750
|
+
margin-right: 4px;
|
|
751
|
+
margin-left: 0;
|
|
752
|
+
}
|
|
753
|
+
.kd-select-rtl .kd-select-selector .kd-select-bordered {
|
|
754
|
+
padding-left: auto !important;
|
|
755
|
+
padding-right: var(--kd-c-select-bordered-spacing-padding-left, 8px) !important;
|
|
756
|
+
}
|
|
757
|
+
.kd-select-rtl .kd-select-selector .kd-select-bordered .kd-select-suffix {
|
|
758
|
+
padding-left: 8px;
|
|
759
|
+
}
|
|
760
|
+
.kd-select-rtl .kd-select-selector .kd-select-bordered.kd-select-single .kd-select-selection-search {
|
|
761
|
+
padding-right: var(--kd-c-select-bordered-spacing-padding-left, 8px);
|
|
762
|
+
}
|
|
763
|
+
.kd-select-rtl .kd-select-selector .kd-select-bordered .kd-select-placeholder {
|
|
764
|
+
padding-right: var(--kd-c-select-bordered-spacing-padding-left, 8px);
|
|
765
|
+
}
|
|
766
|
+
.kd-select-rtl .kd-select-dropdown .kd-select-multiple-footer-hadSelected {
|
|
767
|
+
padding-right: 12px;
|
|
768
|
+
padding-left: 0;
|
|
769
|
+
}
|
|
770
|
+
.kd-select-rtl .kd-select-dropdown .kd-select-multiple-footer .kd-checkbox-default-margin {
|
|
771
|
+
margin-right: 0;
|
|
772
|
+
margin-left: 4px;
|
|
773
|
+
}
|
|
774
|
+
.kd-select-item-rtl {
|
|
775
|
+
direction: rtl;
|
|
776
|
+
}
|
|
777
|
+
.kd-select-item-rtl.kd-select-item .kd-select-item-option-content .kd-checkbox-default-margin {
|
|
778
|
+
margin-right: 0;
|
|
779
|
+
margin-left: 4px;
|
|
780
|
+
}
|
|
@@ -459,3 +459,90 @@
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
+
|
|
463
|
+
.@{select-prefix-cls}-rtl {
|
|
464
|
+
direction: rtl;
|
|
465
|
+
.@{select-prefix-cls}-selector {
|
|
466
|
+
.@{select-prefix-cls}-wrapper {
|
|
467
|
+
padding: 1px 0 1px 28px;
|
|
468
|
+
.@{select-prefix-cls}-suffix {
|
|
469
|
+
position: absolute;
|
|
470
|
+
right: auto;
|
|
471
|
+
left: 0;
|
|
472
|
+
margin-left: 0;
|
|
473
|
+
margin-right: 8px;
|
|
474
|
+
}
|
|
475
|
+
.@{select-prefix-cls}-placeholder {
|
|
476
|
+
right: 0;
|
|
477
|
+
left: 28px;
|
|
478
|
+
}
|
|
479
|
+
&.@{select-prefix-cls}-single {
|
|
480
|
+
.@{select-prefix-cls}-selection-search {
|
|
481
|
+
padding-left: auto;
|
|
482
|
+
position: absolute;
|
|
483
|
+
left: 28px;
|
|
484
|
+
right: 0;
|
|
485
|
+
height: 100%;
|
|
486
|
+
top: 0;
|
|
487
|
+
bottom: 0;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
.@{select-prefix-cls}-multiple {
|
|
492
|
+
.@{select-prefix-cls}-selection-tag {
|
|
493
|
+
.@{kd-prefix}-tag {
|
|
494
|
+
margin: 2px 0 2px 8px;
|
|
495
|
+
&-closeWrapper {
|
|
496
|
+
margin-right: 4px;
|
|
497
|
+
margin-left: 0;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
.@{select-prefix-cls}-bordered {
|
|
503
|
+
padding-left: auto !important;
|
|
504
|
+
padding-right: @select-bordered !important;
|
|
505
|
+
.@{select-prefix-cls}-suffix {
|
|
506
|
+
padding-left: 8px;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
&.@{select-prefix-cls}-single {
|
|
510
|
+
.@{select-prefix-cls}-selection-search {
|
|
511
|
+
padding-right: @select-bordered;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.@{select-prefix-cls}-placeholder {
|
|
516
|
+
padding-right: @select-bordered;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
.@{select-prefix-cls}-dropdown {
|
|
521
|
+
.@{select-prefix-cls}-multiple-footer {
|
|
522
|
+
&-hadSelected {
|
|
523
|
+
padding-right: 12px;
|
|
524
|
+
padding-left: 0;
|
|
525
|
+
}
|
|
526
|
+
.@{kd-prefix}-checkbox {
|
|
527
|
+
&-default-margin {
|
|
528
|
+
margin-right: 0;
|
|
529
|
+
margin-left: 4px;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.@{select-prefix-cls}-item-rtl {
|
|
537
|
+
direction: rtl;
|
|
538
|
+
&.@{select-prefix-cls}-item {
|
|
539
|
+
.@{select-prefix-cls}-item-option-content {
|
|
540
|
+
.@{kd-prefix}-checkbox {
|
|
541
|
+
&-default-margin {
|
|
542
|
+
margin-right: 0;
|
|
543
|
+
margin-left: 4px;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
package/es/steps/Steps.js
CHANGED
|
@@ -24,7 +24,8 @@ var Steps = function Steps(props) {
|
|
|
24
24
|
var _useContext = useContext(ConfigContext),
|
|
25
25
|
getPrefixCls = _useContext.getPrefixCls,
|
|
26
26
|
prefixCls = _useContext.prefixCls,
|
|
27
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
27
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
28
|
+
rtlDirection = _useContext.direction;
|
|
28
29
|
var stepsProps = getCompProps('Steps', userDefaultProps, props);
|
|
29
30
|
var direction = stepsProps.direction,
|
|
30
31
|
initial = stepsProps.initial,
|
|
@@ -46,7 +47,8 @@ var Steps = function Steps(props) {
|
|
|
46
47
|
devWarning(Statuses.indexOf(status) === -1, 'steps', "cannot found steps status '".concat(status, "'"));
|
|
47
48
|
devWarning(LabelPlacements.indexOf(labelPlacement) === -1, 'steps', "cannot found steps labelPlacement '".concat(labelPlacement, "'"));
|
|
48
49
|
var stepsPrefixCls = getPrefixCls(prefixCls, 'steps', customPrefixcls);
|
|
49
|
-
var
|
|
50
|
+
var rtlCls = rtlDirection === 'rtl' ? "".concat(stepsPrefixCls, "-rtl") : null;
|
|
51
|
+
var stepsClassName = classNames(stepsPrefixCls, rtlCls, _concatInstanceProperty(_context = "".concat(stepsPrefixCls, "-")).call(_context, direction), className, (_classNames = {}, _defineProperty(_classNames, "".concat(stepsPrefixCls, "-leftLable"), labelPlacement === 'left'), _defineProperty(_classNames, "".concat(stepsPrefixCls, "-rightLable"), labelPlacement === 'right'), _defineProperty(_classNames, "".concat(stepsPrefixCls, "-bottomLable"), labelPlacement === 'bottom'), _defineProperty(_classNames, "".concat(stepsPrefixCls, "-topLable"), labelPlacement === 'top'), _classNames));
|
|
50
52
|
var onStepClick = function onStepClick(next) {
|
|
51
53
|
if (canClickCurrentStep || onChange && current !== next) {
|
|
52
54
|
onChange(next);
|
package/es/steps/style/index.css
CHANGED
|
@@ -337,3 +337,38 @@
|
|
|
337
337
|
text-align: left;
|
|
338
338
|
margin-top: 1px;
|
|
339
339
|
}
|
|
340
|
+
.kd-steps-rtl {
|
|
341
|
+
direction: rtl;
|
|
342
|
+
}
|
|
343
|
+
.kd-steps-rtl .kd-steps-item:first-child .kd-steps-item-iconContainer::before {
|
|
344
|
+
display: none;
|
|
345
|
+
}
|
|
346
|
+
.kd-steps-rtl.kd-steps-horizontal:first-child {
|
|
347
|
+
padding-right: 0;
|
|
348
|
+
}
|
|
349
|
+
.kd-steps-rtl.kd-steps-horizontal:last-child {
|
|
350
|
+
padding-right: 0;
|
|
351
|
+
padding-left: 0;
|
|
352
|
+
}
|
|
353
|
+
.kd-steps-rtl.kd-steps-horizontal .kd-steps-item .kd-steps-item-container .kd-steps-item-iconContainer::after {
|
|
354
|
+
display: none;
|
|
355
|
+
}
|
|
356
|
+
.kd-steps-rtl.kd-steps-horizontal .kd-steps-item .kd-steps-item-container .kd-steps-item-iconContainer::before {
|
|
357
|
+
content: '';
|
|
358
|
+
width: calc(100% + 35px);
|
|
359
|
+
height: var(--kd-c-steps-line-sizing-height, 1px);
|
|
360
|
+
border-bottom: 1px dashed var(--kd-c-steps-color-wait, #999);
|
|
361
|
+
border-left: 1px dashed var(--kd-c-steps-color-wait, #999);
|
|
362
|
+
position: absolute;
|
|
363
|
+
left: 50%;
|
|
364
|
+
top: calc(50% - var(--kd-c-steps-line-sizing-height, 1px) / 2);
|
|
365
|
+
-webkit-transition: width var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96), background-color var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96);
|
|
366
|
+
transition: width var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96), background-color var(--kd-c-steps-motion-duration, var(--kd-g-duration, 0.3s)) cubic-bezier(0.48, 0.04, 0.52, 0.96);
|
|
367
|
+
}
|
|
368
|
+
.kd-steps-rtl.kd-steps-vertical .kd-steps-item-iconContainer {
|
|
369
|
+
margin-left: 4px;
|
|
370
|
+
margin-right: 0;
|
|
371
|
+
}
|
|
372
|
+
.kd-steps-rtl.kd-steps-vertical .kd-steps-item-content {
|
|
373
|
+
text-align: right;
|
|
374
|
+
}
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
background-color: @steps-color-white;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
&-clickable&-wait {
|
|
@@ -60,7 +59,7 @@
|
|
|
60
59
|
|
|
61
60
|
&:hover {
|
|
62
61
|
.@{steps-prefix-cls}-item-title {
|
|
63
|
-
color: @steps-color-completed
|
|
62
|
+
color: @steps-color-completed;
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
}
|
|
@@ -85,7 +84,8 @@
|
|
|
85
84
|
position: absolute;
|
|
86
85
|
left: 50%;
|
|
87
86
|
top: calc(50% - @steps-line-sizing-height / 2);
|
|
88
|
-
transition: width @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96),
|
|
87
|
+
transition: width @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96),
|
|
88
|
+
background-color @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
&:last-child {
|
|
@@ -144,7 +144,8 @@
|
|
|
144
144
|
border-color: @steps-color-hover;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.@{steps-prefix-cls}-item-title,
|
|
147
|
+
.@{steps-prefix-cls}-item-title,
|
|
148
|
+
.@{steps-prefix-cls}-item-description {
|
|
148
149
|
color: @steps-color-hover;
|
|
149
150
|
}
|
|
150
151
|
}
|
|
@@ -173,7 +174,6 @@
|
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
|
|
176
|
-
|
|
177
177
|
&-error {
|
|
178
178
|
.@{steps-prefix-cls}-icon {
|
|
179
179
|
color: @steps-color-error;
|
|
@@ -261,3 +261,57 @@
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
+
|
|
265
|
+
.@{steps-prefix-cls}-rtl {
|
|
266
|
+
direction: rtl;
|
|
267
|
+
.@{steps-prefix-cls}-item:first-child {
|
|
268
|
+
.@{steps-prefix-cls}-item-iconContainer {
|
|
269
|
+
&::before {
|
|
270
|
+
display: none;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
&.@{steps-prefix-cls}-horizontal {
|
|
275
|
+
&:first-child {
|
|
276
|
+
padding-right: 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&:last-child {
|
|
280
|
+
padding-right: 0;
|
|
281
|
+
padding-left: 0;
|
|
282
|
+
}
|
|
283
|
+
.@{steps-prefix-cls}-item {
|
|
284
|
+
.@{steps-prefix-cls}-item-container {
|
|
285
|
+
.@{steps-prefix-cls}-item-iconContainer {
|
|
286
|
+
&::after {
|
|
287
|
+
display: none;
|
|
288
|
+
}
|
|
289
|
+
&::before {
|
|
290
|
+
content: '';
|
|
291
|
+
width: ~'calc(100% + 35px)';
|
|
292
|
+
height: @steps-line-sizing-height;
|
|
293
|
+
border-bottom: 1px dashed @steps-color-wait;
|
|
294
|
+
border-left: 1px dashed @steps-color-wait;
|
|
295
|
+
position: absolute;
|
|
296
|
+
left: 50%;
|
|
297
|
+
top: calc(50% - @steps-line-sizing-height / 2);
|
|
298
|
+
transition: width @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96),
|
|
299
|
+
background-color @steps-duration-promptly cubic-bezier(0.48, 0.04, 0.52, 0.96);
|
|
300
|
+
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
&.@{steps-prefix-cls}-vertical {
|
|
307
|
+
.@{steps-prefix-cls}-item {
|
|
308
|
+
&-iconContainer {
|
|
309
|
+
margin-left: 4px;
|
|
310
|
+
margin-right: 0;
|
|
311
|
+
}
|
|
312
|
+
&-content {
|
|
313
|
+
text-align: right;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
@@ -217,3 +217,12 @@
|
|
|
217
217
|
.kd-switch-size-large .kd-switch-inner {
|
|
218
218
|
margin: var(--kd-c-switch-inner-spacing-margin-large, 0 5px 0 21px);
|
|
219
219
|
}
|
|
220
|
+
.kd-switch-rtl {
|
|
221
|
+
direction: rtl;
|
|
222
|
+
-webkit-transform: rotateY(180deg);
|
|
223
|
+
transform: rotateY(180deg);
|
|
224
|
+
}
|
|
225
|
+
.kd-switch-rtl .kd-switch-inner {
|
|
226
|
+
-webkit-transform: rotateY(180deg);
|
|
227
|
+
transform: rotateY(180deg);
|
|
228
|
+
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@switch-prefix-cls: ~'@{kd-prefix}-switch';
|
|
5
5
|
@icon-prefix-cls: ~'@{kd-prefix}icon';
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
.@{switch-prefix-cls} {
|
|
9
8
|
.switch;
|
|
10
9
|
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
|
|
26
25
|
.@{icon-prefix-cls}-loadding-circle {
|
|
27
26
|
animation: loadingcircle 1s infinite;
|
|
28
|
-
animation-timing-function: cubic-bezier(0.42, 0
|
|
27
|
+
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
|
|
29
28
|
font-size: @switch-small-font-size;
|
|
30
29
|
line-height: 1;
|
|
31
30
|
vertical-align: baseline;
|
|
@@ -80,3 +79,11 @@
|
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
}
|
|
82
|
+
|
|
83
|
+
.@{switch-prefix-cls}-rtl {
|
|
84
|
+
direction: rtl;
|
|
85
|
+
transform: rotateY(180deg);
|
|
86
|
+
.@{switch-prefix-cls}-inner {
|
|
87
|
+
transform: rotateY(180deg);
|
|
88
|
+
}
|
|
89
|
+
}
|
package/es/switch/switch.js
CHANGED
|
@@ -24,7 +24,8 @@ var Switch = function Switch(props) {
|
|
|
24
24
|
var _useContext = useContext(ConfigContext),
|
|
25
25
|
getPrefixCls = _useContext.getPrefixCls,
|
|
26
26
|
prefixCls = _useContext.prefixCls,
|
|
27
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
27
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
28
|
+
direction = _useContext.direction;
|
|
28
29
|
var switchProps = getCompProps('Switch', userDefaultProps, props);
|
|
29
30
|
var size = switchProps.size,
|
|
30
31
|
className = switchProps.className,
|
|
@@ -46,6 +47,7 @@ var Switch = function Switch(props) {
|
|
|
46
47
|
newChecked = _useMergedState2[0],
|
|
47
48
|
setChecked = _useMergedState2[1];
|
|
48
49
|
var switchPrefixCls = getPrefixCls(prefixCls, 'switch', customPrefixcls);
|
|
50
|
+
var rtlCls = direction === 'rtl' ? "".concat(switchPrefixCls, "-rtl") : null;
|
|
49
51
|
var handleClick = function handleClick(e) {
|
|
50
52
|
var newV = triggerChange(!newChecked, e);
|
|
51
53
|
onClick && onClick(newV, e);
|
|
@@ -60,7 +62,7 @@ var Switch = function Switch(props) {
|
|
|
60
62
|
}
|
|
61
63
|
return afterChangedChecked;
|
|
62
64
|
}
|
|
63
|
-
var switchClasses = classNames(switchPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(switchPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(switchPrefixCls, "-disabled"), disabled || loading), _defineProperty(_classNames, "".concat(switchPrefixCls, "-loading"), loading), _defineProperty(_classNames, "".concat(switchPrefixCls, "-checked"), newChecked), _classNames));
|
|
65
|
+
var switchClasses = classNames(switchPrefixCls, rtlCls, className, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(switchPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(switchPrefixCls, "-disabled"), disabled || loading), _defineProperty(_classNames, "".concat(switchPrefixCls, "-loading"), loading), _defineProperty(_classNames, "".concat(switchPrefixCls, "-checked"), newChecked), _classNames));
|
|
64
66
|
var loadingIcon = loading ? React.createElement("span", {
|
|
65
67
|
className: "".concat(switchPrefixCls, "-loading-icon")
|
|
66
68
|
}, React.createElement(Icon, {
|
package/es/tag/style/index.css
CHANGED
package/es/tag/style/index.less
CHANGED
package/es/tag/tag.js
CHANGED
|
@@ -25,7 +25,8 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
25
25
|
var _useContext = useContext(ConfigContext),
|
|
26
26
|
getPrefixCls = _useContext.getPrefixCls,
|
|
27
27
|
prefixCls = _useContext.prefixCls,
|
|
28
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
28
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
29
|
+
direction = _useContext.direction;
|
|
29
30
|
var tagProps = getCompProps('Tag', userDefaultProps, props);
|
|
30
31
|
var className = tagProps.className,
|
|
31
32
|
clickable = tagProps.clickable,
|
|
@@ -45,6 +46,7 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
45
46
|
devWarning(TagTypes.indexOf(type) === -1, 'tag', "cannot found tag type '".concat(type, "'"));
|
|
46
47
|
devWarning(TagSizes.indexOf(size) === -1, 'tag', "cannot found tag size '".concat(size, "'"));
|
|
47
48
|
var tagPrefixCls = getPrefixCls(prefixCls, 'tag', customPrefixcls);
|
|
49
|
+
var rtlCls = direction === 'rtl' ? "".concat(tagPrefixCls, "-rtl") : null;
|
|
48
50
|
var handleClick = function handleClick(e) {
|
|
49
51
|
if (!clickable) return;
|
|
50
52
|
onClick && onClick(e);
|
|
@@ -72,7 +74,7 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
72
74
|
}, child);
|
|
73
75
|
};
|
|
74
76
|
var isPresetColor = ['process', 'success', 'warning', 'error', 'end', 'expired'].indexOf(color) > -1;
|
|
75
|
-
var tagClasses = classNames(tagPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(tagPrefixCls, "-shape-")).call(_context, type), type), _defineProperty(_classNames, _concatInstanceProperty(_context2 = "".concat(tagPrefixCls, "-")).call(_context2, color), isPresetColor), _defineProperty(_classNames, "".concat(tagPrefixCls, "-has-color"), !isPresetColor && color && type === 'attribute'), _defineProperty(_classNames, "".concat(tagPrefixCls, "-clickable"), clickable), _defineProperty(_classNames, "".concat(tagPrefixCls, "-closable"), closable), _defineProperty(_classNames, _concatInstanceProperty(_context3 = "".concat(tagPrefixCls, "-size-")).call(_context3, size), size), _defineProperty(_classNames, "".concat(tagPrefixCls, "-closable-disabled"), type === 'edit' && disabled), _classNames));
|
|
77
|
+
var tagClasses = classNames(tagPrefixCls, rtlCls, className, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(tagPrefixCls, "-shape-")).call(_context, type), type), _defineProperty(_classNames, _concatInstanceProperty(_context2 = "".concat(tagPrefixCls, "-")).call(_context2, color), isPresetColor), _defineProperty(_classNames, "".concat(tagPrefixCls, "-has-color"), !isPresetColor && color && type === 'attribute'), _defineProperty(_classNames, "".concat(tagPrefixCls, "-clickable"), clickable), _defineProperty(_classNames, "".concat(tagPrefixCls, "-closable"), closable), _defineProperty(_classNames, _concatInstanceProperty(_context3 = "".concat(tagPrefixCls, "-size-")).call(_context3, size), size), _defineProperty(_classNames, "".concat(tagPrefixCls, "-closable-disabled"), type === 'edit' && disabled), _classNames));
|
|
76
78
|
var tagColorStyle = !isPresetColor && color && type === 'attribute' ? {
|
|
77
79
|
backgroundColor: color
|
|
78
80
|
} : {};
|
package/es/tree/style/index.css
CHANGED
|
@@ -373,3 +373,22 @@
|
|
|
373
373
|
-ms-flex-align: center;
|
|
374
374
|
align-items: center;
|
|
375
375
|
}
|
|
376
|
+
.kd-tree-rtl {
|
|
377
|
+
direction: rtl;
|
|
378
|
+
}
|
|
379
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-indent {
|
|
380
|
+
margin-right: 0;
|
|
381
|
+
margin-left: 6px;
|
|
382
|
+
}
|
|
383
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-title-wrap {
|
|
384
|
+
padding-right: 4px;
|
|
385
|
+
padding-left: 0;
|
|
386
|
+
}
|
|
387
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-title-wrap .kd-checkbox-default-margin {
|
|
388
|
+
margin-right: 0;
|
|
389
|
+
margin-left: 4px;
|
|
390
|
+
}
|
|
391
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-animation-expand {
|
|
392
|
+
-webkit-transform: rotate(-90deg);
|
|
393
|
+
transform: rotate(-90deg);
|
|
394
|
+
}
|
package/es/tree/style/index.less
CHANGED
|
@@ -200,3 +200,30 @@
|
|
|
200
200
|
align-items: center;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
+
.@{tree-prefix-cls}-rtl {
|
|
204
|
+
direction: rtl;
|
|
205
|
+
.@{tree-prefix-cls}-root {
|
|
206
|
+
.@{tree-node-prefix-cls}-item {
|
|
207
|
+
.@{tree-node-prefix-cls}-root {
|
|
208
|
+
.@{tree-node-prefix-cls}-indent {
|
|
209
|
+
margin-right: 0;
|
|
210
|
+
margin-left: 6px;
|
|
211
|
+
}
|
|
212
|
+
.@{tree-node-prefix-cls}-title-wrap {
|
|
213
|
+
padding-right: 4px;
|
|
214
|
+
padding-left: 0;
|
|
215
|
+
.@{kd-prefix}-checkbox {
|
|
216
|
+
&-default-margin {
|
|
217
|
+
margin-right: 0;
|
|
218
|
+
margin-left: 4px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
.@{tree-node-prefix-cls}-animation-expand {
|
|
223
|
+
transform: rotate(-90deg);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
package/es/tree/tree.js
CHANGED
|
@@ -31,7 +31,8 @@ var InternalTree = React.forwardRef(function (props, ref) {
|
|
|
31
31
|
var _useContext = useContext(ConfigContext),
|
|
32
32
|
getPrefixCls = _useContext.getPrefixCls,
|
|
33
33
|
prefixCls = _useContext.prefixCls,
|
|
34
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
34
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
35
|
+
direction = _useContext.direction;
|
|
35
36
|
var TreeProps = getCompProps('Tree', userDefaultProps, props);
|
|
36
37
|
var customPrefixcls = TreeProps.prefixCls,
|
|
37
38
|
treeData = TreeProps.treeData,
|
|
@@ -80,7 +81,8 @@ var InternalTree = React.forwardRef(function (props, ref) {
|
|
|
80
81
|
renderExtra = TreeProps.renderExtra,
|
|
81
82
|
others = __rest(TreeProps, ["prefixCls", "treeData", "virtual", "showIcon", "switcherIcon", "icon", "checkable", "checkStrictly", "disabled", "draggable", "scrollToKey", "expandedKeys", "checkedKeys", "defaultExpandRoot", "defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys", "defaultCheckedKeys", "defaultSelectedKeys", "height", "onCheck", "onExpand", "onDragStart", "onDragOver", "onDragLeave", "onDragEnter", "onDragEnd", "onDrop", "onSelect", "selectedKeys", "setTreeNodeStyle", "setTreeNodeClassName", "estimatedItemSize", "style", "className", "filterTreeNode", "filterValue", "expandOnClickNode", "onlyExpandOnClickIcon", "loadData", "notFoundContent", "showLine", "expandOnFilterNode", "renderExtra"]);
|
|
82
83
|
var treePrefixCls = getPrefixCls(prefixCls, 'tree', customPrefixcls);
|
|
83
|
-
var
|
|
84
|
+
var rtlCls = direction === 'rtl' ? "".concat(treePrefixCls, "-rtl") : null;
|
|
85
|
+
var treeNodeClassName = classNames(className, rtlCls, (_classNames = {}, _defineProperty(_classNames, "".concat(treePrefixCls), true), _defineProperty(_classNames, "".concat(treePrefixCls, "-show-line"), showLine), _classNames));
|
|
84
86
|
var treeRootClassName = "".concat(treePrefixCls, "-root");
|
|
85
87
|
var estimatedItemSize = innerEstimatedItemSize;
|
|
86
88
|
var _React$useMemo = React.useMemo(function () {
|