@kdcloudjs/kdesign 1.8.30 → 1.8.32
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 +798 -83
- package/dist/kdesign.css +578 -7
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +166 -93
- 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/compDefaultProps.d.ts +0 -1
- package/es/config-provider/compDefaultProps.js +0 -5
- package/es/dropdown/dropdown.js +5 -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/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/compDefaultProps.d.ts +0 -1
- package/lib/config-provider/compDefaultProps.js +0 -5
- package/lib/dropdown/dropdown.js +5 -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/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
|
@@ -462,3 +462,35 @@
|
|
|
462
462
|
-webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
463
463
|
transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
464
464
|
}
|
|
465
|
+
.kd-btn-rtl {
|
|
466
|
+
direction: rtl;
|
|
467
|
+
}
|
|
468
|
+
.kd-btn-rtl .kd-btn-iconWrapper-left {
|
|
469
|
+
float: right;
|
|
470
|
+
margin-left: 4px;
|
|
471
|
+
}
|
|
472
|
+
.kd-btn-rtl .kd-btn-iconWrapper-right {
|
|
473
|
+
float: left;
|
|
474
|
+
margin-right: 4px;
|
|
475
|
+
}
|
|
476
|
+
.kd-btn-rtl .kd-btn-group-basic-icon {
|
|
477
|
+
margin-right: 5px;
|
|
478
|
+
margin-left: 0;
|
|
479
|
+
}
|
|
480
|
+
.kd-btn-rtl .btn-space {
|
|
481
|
+
margin-left: 0;
|
|
482
|
+
}
|
|
483
|
+
.kd-btn-rtl-similar .kd-btn-group-trigger .kd-btn {
|
|
484
|
+
border-top-left-radius: var(--kd-c-button-radius-border, var(--kd-g-radius-border, 2px));
|
|
485
|
+
border-bottom-left-radius: var(--kd-c-button-radius-border, var(--kd-g-radius-border, 2px));
|
|
486
|
+
border-top-right-radius: 0;
|
|
487
|
+
border-bottom-right-radius: 0;
|
|
488
|
+
margin-right: -1px;
|
|
489
|
+
}
|
|
490
|
+
.kd-btn-rtl-similar > .kd-btn:first-child {
|
|
491
|
+
border-top-right-radius: var(--kd-c-button-radius-border, var(--kd-g-radius-border, 2px));
|
|
492
|
+
border-bottom-right-radius: var(--kd-c-button-radius-border, var(--kd-g-radius-border, 2px));
|
|
493
|
+
}
|
|
494
|
+
.kd-btn-group-rtl {
|
|
495
|
+
direction: rtl;
|
|
496
|
+
}
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
|
|
301
|
+
& > .@{btn-prefix-cls} {
|
|
302
302
|
&:first-child {
|
|
303
303
|
border-top-right-radius: 0;
|
|
304
304
|
border-bottom-right-radius: 0;
|
|
@@ -353,3 +353,44 @@
|
|
|
353
353
|
transition: all calc(@transition-duration - 0.1s) @ease;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
+
.@{btn-prefix-cls}-rtl {
|
|
357
|
+
direction: rtl;
|
|
358
|
+
.@{btn-prefix-cls}-iconWrapper-left {
|
|
359
|
+
float: right;
|
|
360
|
+
margin-left: 4px;
|
|
361
|
+
}
|
|
362
|
+
.@{btn-prefix-cls}-iconWrapper-right {
|
|
363
|
+
float: left;
|
|
364
|
+
margin-right: 4px;
|
|
365
|
+
}
|
|
366
|
+
.@{btn-prefix-cls}-group-basic {
|
|
367
|
+
&-icon {
|
|
368
|
+
margin-right: 5px;
|
|
369
|
+
margin-left: 0;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
.btn-space {
|
|
373
|
+
margin-left: 0;
|
|
374
|
+
}
|
|
375
|
+
&-similar {
|
|
376
|
+
.@{btn-prefix-cls}-group-trigger {
|
|
377
|
+
.@{btn-prefix-cls} {
|
|
378
|
+
border-top-left-radius: @btn-g-radius-border;
|
|
379
|
+
border-bottom-left-radius: @btn-g-radius-border;
|
|
380
|
+
border-top-right-radius: 0;
|
|
381
|
+
border-bottom-right-radius: 0;
|
|
382
|
+
margin-right: -1px;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
& > .@{btn-prefix-cls} {
|
|
386
|
+
&:first-child {
|
|
387
|
+
border-top-right-radius: @btn-g-radius-border;
|
|
388
|
+
border-bottom-right-radius: @btn-g-radius-border;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.@{btn-prefix-cls}-group-rtl {
|
|
395
|
+
direction: rtl;
|
|
396
|
+
}
|
package/lib/checkbox/checkbox.js
CHANGED
|
@@ -36,7 +36,8 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
36
36
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
37
37
|
getPrefixCls = _useContext.getPrefixCls,
|
|
38
38
|
prefixCls = _useContext.prefixCls,
|
|
39
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
39
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
40
|
+
direction = _useContext.direction;
|
|
40
41
|
var CheckboxProps = (0, _utils.getCompProps)('Checkbox', userDefaultProps, props);
|
|
41
42
|
var checkboxType = CheckboxProps.checkboxType,
|
|
42
43
|
className = CheckboxProps.className,
|
|
@@ -75,8 +76,9 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
75
76
|
var getIndeterminate = function getIndeterminate() {
|
|
76
77
|
return selected ? false : indeterminate;
|
|
77
78
|
};
|
|
78
|
-
var
|
|
79
|
-
var
|
|
79
|
+
var rtlCls = direction === 'rtl' ? "".concat(checkboxPrefixCls, "-rtl") : null;
|
|
80
|
+
var getDefaultClassName = (0, _classnames.default)(className, rtlCls, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(checkboxPrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(checkboxPrefixCls, "-no-child"), !children), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(checkboxPrefixCls, "-")).call(_context, mergedSize), !!children), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(checkboxPrefixCls, "-")).call(_context2, mergedCheckboxType), true), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(checkboxPrefixCls, "-")).call(_context3, mergedCheckboxType, "-disabled"), mergedDisabled), (0, _defineProperty2.default)(_classNames, "checked", selected), _classNames));
|
|
81
|
+
var getSquareClassName = (0, _classnames.default)(className, rtlCls, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(checkboxPrefixCls), true), (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context4 = "".concat(checkboxPrefixCls, "-")).call(_context4, mergedCheckboxType), true), (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context5 = "".concat(checkboxPrefixCls, "-")).call(_context5, mergedSize), !!children), (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context6 = "".concat(checkboxPrefixCls, "-")).call(_context6, mergedCheckboxType, "-disabled"), mergedDisabled), (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context7 = "".concat(checkboxPrefixCls, "-")).call(_context7, mergedCheckboxType, "-checked"), selected && !mergedDisabled), (0, _defineProperty2.default)(_classNames2, "checked", selected), _classNames2));
|
|
80
82
|
var getRootClassName = isDefaultType() ? getDefaultClassName : getSquareClassName;
|
|
81
83
|
var inputClassName = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(checkboxPrefixCls, "-input"), true));
|
|
82
84
|
var checkedWrapperClassName = (0, _classnames.default)((_classNames4 = {}, (0, _defineProperty2.default)(_classNames4, (0, _concat.default)(_context8 = "".concat(checkboxPrefixCls, "-")).call(_context8, mergedCheckboxType, "-wrapper"), true), (0, _defineProperty2.default)(_classNames4, (0, _concat.default)(_context9 = "".concat(checkboxPrefixCls, "-")).call(_context9, mergedCheckboxType, "-wrapper-size"), true), (0, _defineProperty2.default)(_classNames4, (0, _concat.default)(_context10 = "".concat(checkboxPrefixCls, "-")).call(_context10, mergedCheckboxType, "-margin"), !!children), (0, _defineProperty2.default)(_classNames4, (0, _concat.default)(_context11 = "".concat(checkboxPrefixCls, "-")).call(_context11, mergedCheckboxType, "-checked"), selected), (0, _defineProperty2.default)(_classNames4, (0, _concat.default)(_context12 = "".concat(checkboxPrefixCls, "-")).call(_context12, mergedCheckboxType, "-indeterminate"), getIndeterminate()), (0, _defineProperty2.default)(_classNames4, (0, _concat.default)(_context13 = "".concat(checkboxPrefixCls, "-")).call(_context13, mergedCheckboxType, "-disabled"), mergedDisabled && !selected), (0, _defineProperty2.default)(_classNames4, (0, _concat.default)(_context14 = "".concat(checkboxPrefixCls, "-")).call(_context14, mergedCheckboxType, "-checked-disabled"), mergedDisabled && selected), _classNames4));
|
package/lib/checkbox/group.js
CHANGED
|
@@ -42,7 +42,8 @@ var CheckboxGroup = _react.default.forwardRef(function (props, ref) {
|
|
|
42
42
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
43
43
|
getPrefixCls = _useContext.getPrefixCls,
|
|
44
44
|
prefixCls = _useContext.prefixCls,
|
|
45
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
45
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
46
|
+
direction = _useContext.direction;
|
|
46
47
|
var CheckboxProps = (0, _utils.getCompProps)('CheckboxGroup', userDefaultProps, props);
|
|
47
48
|
var checkboxType = CheckboxProps.checkboxType,
|
|
48
49
|
className = CheckboxProps.className,
|
|
@@ -69,6 +70,7 @@ var CheckboxGroup = _react.default.forwardRef(function (props, ref) {
|
|
|
69
70
|
}, [value, defaultValue]);
|
|
70
71
|
var isControlled = typeof value !== 'undefined';
|
|
71
72
|
var checkboxGroupPrefixCls = getPrefixCls(prefixCls, 'checkbox-group', customPrefixcls);
|
|
73
|
+
var rtlCls = direction === 'rtl' ? "".concat(checkboxGroupPrefixCls, "-rtl") : null;
|
|
72
74
|
(0, _devwarning.default)((0, _arrayUtil.isArrayValueRepeat)(groupValue), 'checkboxGroup', "variable value's value should be unique ");
|
|
73
75
|
var getReduceItem = function getReduceItem(targetValue) {
|
|
74
76
|
var _context;
|
|
@@ -119,7 +121,7 @@ var CheckboxGroup = _react.default.forwardRef(function (props, ref) {
|
|
|
119
121
|
});
|
|
120
122
|
};
|
|
121
123
|
return _react.default.createElement("ul", (0, _extends2.default)({
|
|
122
|
-
className: (0, _classnames.default)(checkboxGroupPrefixCls, className),
|
|
124
|
+
className: (0, _classnames.default)(checkboxGroupPrefixCls, rtlCls, className),
|
|
123
125
|
style: style,
|
|
124
126
|
ref: ref
|
|
125
127
|
}, rest), _react.default.createElement(GroupContext.Provider, {
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
-webkit-transform: translate(-50%, -50%) scale(1);
|
|
389
389
|
transform: translate(-50%, -50%) scale(1);
|
|
390
390
|
opacity: 1;
|
|
391
|
-
content:
|
|
391
|
+
content: ' ';
|
|
392
392
|
}
|
|
393
393
|
.kd-checkbox-default.checked .kd-checkbox-children {
|
|
394
394
|
color: var(--kd-c-checkbox-color-text-primary, #212121);
|
|
@@ -396,3 +396,40 @@
|
|
|
396
396
|
.kd-checkbox-default-indeterminate .kd-checkbox-children {
|
|
397
397
|
color: var(--kd-c-checkbox-color-text-primary, #212121);
|
|
398
398
|
}
|
|
399
|
+
.kd-checkbox-rtl {
|
|
400
|
+
direction: rtl;
|
|
401
|
+
}
|
|
402
|
+
.kd-checkbox-rtl.kd-checkbox-default .kd-checkbox-default-margin {
|
|
403
|
+
margin-right: 0;
|
|
404
|
+
margin-left: var(--kd-c-checkbox-default-input-spacing-margin-right, 4px);
|
|
405
|
+
}
|
|
406
|
+
.kd-checkbox-group-rtl {
|
|
407
|
+
direction: rtl;
|
|
408
|
+
}
|
|
409
|
+
.kd-checkbox-group-rtl.kd-checkbox-group {
|
|
410
|
+
text-align: right;
|
|
411
|
+
}
|
|
412
|
+
.kd-checkbox-group-rtl.kd-checkbox-group > .kd-checkbox-rtl:not(:last-child) {
|
|
413
|
+
margin-left: var(--kd-c-checkbox-group-spacing-margin-right, 12px);
|
|
414
|
+
margin-right: 0;
|
|
415
|
+
}
|
|
416
|
+
.kd-checkbox-group-rtl.kd-checkbox-group .kd-checkbox {
|
|
417
|
+
margin-left: var(--kd-c-checkbox-group-spacing-margin-right, 12px);
|
|
418
|
+
margin-right: 0;
|
|
419
|
+
}
|
|
420
|
+
.kd-checkbox-group-rtl .kd-checkbox-square-triangle,
|
|
421
|
+
.kd-checkbox-group-rtl .kd-checkbox-square-triangle-checked {
|
|
422
|
+
position: absolute;
|
|
423
|
+
content: '';
|
|
424
|
+
height: 0;
|
|
425
|
+
width: 0;
|
|
426
|
+
right: auto;
|
|
427
|
+
left: 0;
|
|
428
|
+
bottom: 0;
|
|
429
|
+
border-style: solid;
|
|
430
|
+
border-width: 0 var(--kd-c-checkbox-square-triangle-sizing-width, 18px) var(--kd-c-checkbox-square-triangle-sizing-height, 18px) 0;
|
|
431
|
+
border-top-color: transparent;
|
|
432
|
+
border-right-color: transparent;
|
|
433
|
+
border-left-color: transparent;
|
|
434
|
+
border-bottom-color: var(--kd-c-checkbox-color-border-active, var(--kd-g-color-theme, #5582f3));
|
|
435
|
+
}
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
|
|
56
55
|
.@{checkbox-prefix-cls}-square {
|
|
57
56
|
border-radius: 2px;
|
|
58
57
|
border: 1px solid @checkbox-border-color;
|
|
@@ -89,8 +88,8 @@
|
|
|
89
88
|
border-bottom-color: @checkbox-checked-border-color;
|
|
90
89
|
}
|
|
91
90
|
&-triangle {
|
|
92
|
-
animation: kdZoomBounceLeaveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0
|
|
93
|
-
transition: all @checkbox-transition-duration cubic-bezier(0.4,0,0.6,1);
|
|
91
|
+
animation: kdZoomBounceLeaveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards;
|
|
92
|
+
transition: all @checkbox-transition-duration cubic-bezier(0.4, 0, 0.6, 1);
|
|
94
93
|
visibility: hidden;
|
|
95
94
|
opacity: 0;
|
|
96
95
|
}
|
|
@@ -108,7 +107,7 @@
|
|
|
108
107
|
&-inner-icon {
|
|
109
108
|
font-size: inherit;
|
|
110
109
|
line-height: 100%;
|
|
111
|
-
animation: kdZoomLeaveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0
|
|
110
|
+
animation: kdZoomLeaveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
112
111
|
}
|
|
113
112
|
&-triangle-disabled {
|
|
114
113
|
border-bottom-color: @checkbox-disabled-text-color;
|
|
@@ -124,14 +123,14 @@
|
|
|
124
123
|
&-checked {
|
|
125
124
|
border-color: @checkbox-checked-border-color;
|
|
126
125
|
&:not(&-disabled)::after {
|
|
127
|
-
animation: fadeEffect calc(@checkbox-transition-duration + 0.1s) cubic-bezier(0
|
|
128
|
-
waveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0
|
|
126
|
+
animation: fadeEffect calc(@checkbox-transition-duration + 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards,
|
|
127
|
+
waveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards;
|
|
129
128
|
}
|
|
130
129
|
.@{checkbox-prefix-cls}-square-triangle-checked:not(.@{checkbox-prefix-cls}-square-disabled) {
|
|
131
|
-
animation: kdZoomBounceEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0.4,0,0.6,1);
|
|
130
|
+
animation: kdZoomBounceEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
132
131
|
}
|
|
133
132
|
.@{checkbox-prefix-cls}-square-inner-icon:not(.@{checkbox-prefix-cls}-square-disabled) {
|
|
134
|
-
animation: kdZoomEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0
|
|
133
|
+
animation: kdZoomEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
136
|
&-checked-disabled {
|
|
@@ -212,14 +211,14 @@
|
|
|
212
211
|
&-checked {
|
|
213
212
|
background-color: @checkbox-checked-border-color;
|
|
214
213
|
border-color: @checkbox-checked-border-color;
|
|
215
|
-
transition: background-color calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0
|
|
216
|
-
border-color calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0
|
|
214
|
+
transition: background-color calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1),
|
|
215
|
+
border-color calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
|
|
217
216
|
&:not(&-disabled)::after {
|
|
218
|
-
animation: fadeEffect calc(@checkbox-transition-duration + 0.1s) cubic-bezier(0
|
|
219
|
-
waveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0
|
|
217
|
+
animation: fadeEffect calc(@checkbox-transition-duration + 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards,
|
|
218
|
+
waveEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards;
|
|
220
219
|
}
|
|
221
220
|
.@{checkbox-prefix-cls}-default-inner:not(&-disabled .@{checkbox-prefix-cls}-default-inner) {
|
|
222
|
-
animation: kdZoomBounceDefaultEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0.4,0,0.6,1) !important;
|
|
221
|
+
animation: kdZoomBounceDefaultEffect calc(@checkbox-transition-duration - 0.1s) cubic-bezier(0.4, 0, 0.6, 1) !important;
|
|
223
222
|
}
|
|
224
223
|
}
|
|
225
224
|
&-inner {
|
|
@@ -245,9 +244,9 @@
|
|
|
245
244
|
height: @checkbox-default-indeterminate-square;
|
|
246
245
|
background-color: @checkbox-checked-border-color;
|
|
247
246
|
border: 0;
|
|
248
|
-
transform: translate(-50
|
|
247
|
+
transform: translate(-50%, -50%) scale(1);
|
|
249
248
|
opacity: 1;
|
|
250
|
-
content:
|
|
249
|
+
content: ' ';
|
|
251
250
|
}
|
|
252
251
|
&.checked {
|
|
253
252
|
.@{checkbox-prefix-cls}-children {
|
|
@@ -260,3 +259,45 @@
|
|
|
260
259
|
}
|
|
261
260
|
}
|
|
262
261
|
}
|
|
262
|
+
|
|
263
|
+
.@{checkbox-prefix-cls}-rtl {
|
|
264
|
+
direction: rtl;
|
|
265
|
+
&.@{checkbox-prefix-cls}-default {
|
|
266
|
+
.@{checkbox-prefix-cls}-default-margin {
|
|
267
|
+
margin-right: 0;
|
|
268
|
+
margin-left: @checkbox-default-input-margin-right;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
.@{checkbox-prefix-cls}-group-rtl {
|
|
273
|
+
direction: rtl;
|
|
274
|
+
&.@{checkbox-prefix-cls}-group {
|
|
275
|
+
text-align: right;
|
|
276
|
+
> .@{checkbox-prefix-cls}-rtl:not(:last-child) {
|
|
277
|
+
margin-left: @checkbox-group-margin-right;
|
|
278
|
+
margin-right: 0;
|
|
279
|
+
}
|
|
280
|
+
.@{checkbox-prefix-cls} {
|
|
281
|
+
margin-left: @checkbox-group-margin-right;
|
|
282
|
+
margin-right: 0;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
.@{checkbox-prefix-cls}-square {
|
|
286
|
+
&-triangle,
|
|
287
|
+
&-triangle-checked {
|
|
288
|
+
position: absolute;
|
|
289
|
+
content: '';
|
|
290
|
+
height: 0;
|
|
291
|
+
width: 0;
|
|
292
|
+
right: auto;
|
|
293
|
+
left: 0;
|
|
294
|
+
bottom: 0;
|
|
295
|
+
border-style: solid;
|
|
296
|
+
border-width: 0 @checkbox-square-triangle-width @checkbox-square-triangle-height 0;
|
|
297
|
+
border-top-color: transparent;
|
|
298
|
+
border-right-color: transparent;
|
|
299
|
+
border-left-color: transparent;
|
|
300
|
+
border-bottom-color: @checkbox-checked-border-color;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
@@ -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
|
+
}
|