@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
package/es/tree/treeNode.js
CHANGED
|
@@ -23,7 +23,8 @@ var TreeNode = React.forwardRef(function (props) {
|
|
|
23
23
|
var _useContext = useContext(ConfigContext),
|
|
24
24
|
getPrefixCls = _useContext.getPrefixCls,
|
|
25
25
|
prefixCls = _useContext.prefixCls,
|
|
26
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
26
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
27
|
+
direction = _useContext.direction;
|
|
27
28
|
var TreeNodeProps = getCompProps('TreeNode', userDefaultProps, props);
|
|
28
29
|
var nodeKey = TreeNodeProps.nodeKey,
|
|
29
30
|
customPrefixcls = TreeNodeProps.prefixCls,
|
|
@@ -176,7 +177,7 @@ var TreeNode = React.forwardRef(function (props) {
|
|
|
176
177
|
className: classNames("".concat(treeNodePrefixCls, "-icon"), (_classNames3 = {}, _defineProperty(_classNames3, "".concat(treeNodePrefixCls, "-animation-expand"), expandState), _defineProperty(_classNames3, "".concat(treeNodePrefixCls, "-animation-collapse"), !expandState), _defineProperty(_classNames3, "".concat(treeNodePrefixCls, "-icon-hover"), !expandOnClickNode), _classNames3)),
|
|
177
178
|
onClick: expandOnClickNode ? onlyExpandOnClickIcon ? handleExpandIconClick : undefined : handleExpandIconClick
|
|
178
179
|
}, renderIcon(switcherIcon || React.createElement(Icon, {
|
|
179
|
-
type: "arrow-right-solid"
|
|
180
|
+
type: "arrow-".concat(direction === 'rtl' ? 'left' : 'right', "-solid")
|
|
180
181
|
})));
|
|
181
182
|
} else {
|
|
182
183
|
return React.createElement("span", {
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
opacity: 0;
|
|
165
165
|
overflow: hidden;
|
|
166
166
|
}
|
|
167
|
-
.kd-upload-input input[type=
|
|
167
|
+
.kd-upload-input input[type='file'] {
|
|
168
168
|
position: absolute;
|
|
169
169
|
top: -20%;
|
|
170
170
|
left: 0;
|
|
@@ -386,3 +386,26 @@
|
|
|
386
386
|
color: var(--kd-c-upload-panel-button-color, #0E5FD8);
|
|
387
387
|
font-size: var(--kd-c-upload-picture-action-font-size, var(--kd-g-font-size-small, 12px));
|
|
388
388
|
}
|
|
389
|
+
.kd-upload-rtl {
|
|
390
|
+
direction: rtl;
|
|
391
|
+
}
|
|
392
|
+
.kd-upload-rtl.kd-upload .kd-upload-text-list-item-name {
|
|
393
|
+
margin: 0 var(--kd-c-upload-text-list-item-name-padding-left, 4px) 0 var(--kd-c-upload-text-list-item-name-padding-right, 8px);
|
|
394
|
+
}
|
|
395
|
+
.kd-upload-rtl.kd-upload .kd-upload-text-list-item-action {
|
|
396
|
+
left: 0;
|
|
397
|
+
right: auto;
|
|
398
|
+
-webkit-transform: translateX(-5px);
|
|
399
|
+
transform: translateX(-5px);
|
|
400
|
+
}
|
|
401
|
+
.kd-upload-rtl.kd-upload .kd-upload-text-list-item-action a:not(:first-child) {
|
|
402
|
+
margin-right: 20px;
|
|
403
|
+
margin-left: 0;
|
|
404
|
+
}
|
|
405
|
+
.kd-upload-rtl.kd-upload .kd-upload-picture-list-item {
|
|
406
|
+
margin: 0 0 28px 28px;
|
|
407
|
+
}
|
|
408
|
+
.kd-upload-rtl.kd-upload .kd-upload-picture-list-item-error a:not(:first-child) {
|
|
409
|
+
margin-right: 10px;
|
|
410
|
+
margin-left: auto;
|
|
411
|
+
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
opacity: 0;
|
|
47
47
|
overflow: hidden;
|
|
48
48
|
|
|
49
|
-
input[type=
|
|
49
|
+
input[type='file'] {
|
|
50
50
|
position: absolute;
|
|
51
51
|
top: -20%;
|
|
52
52
|
left: 0;
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
font-size: @upload-font-size;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
&-name
|
|
97
|
+
&-name,
|
|
98
|
+
&-icon {
|
|
98
99
|
cursor: pointer;
|
|
99
100
|
}
|
|
100
101
|
|
|
@@ -239,3 +240,40 @@
|
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
242
|
}
|
|
243
|
+
|
|
244
|
+
.@{upload-prefix-cls}-rtl {
|
|
245
|
+
direction: rtl;
|
|
246
|
+
&.@{upload-prefix-cls} {
|
|
247
|
+
.@{upload-prefix-text-list-cls} {
|
|
248
|
+
&-item {
|
|
249
|
+
&-name {
|
|
250
|
+
margin: 0 @upload-text-list-item-name-padding-left 0 @upload-text-list-item-name-padding-right;
|
|
251
|
+
}
|
|
252
|
+
&-action {
|
|
253
|
+
left: 0;
|
|
254
|
+
right: auto;
|
|
255
|
+
transform: translateX(-5px);
|
|
256
|
+
a {
|
|
257
|
+
&:not(:first-child) {
|
|
258
|
+
margin-right: 20px;
|
|
259
|
+
margin-left: 0;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
.@{upload-prefix-picture-list-cls} {
|
|
266
|
+
&-item {
|
|
267
|
+
margin: 0 0 28px 28px;
|
|
268
|
+
&-error {
|
|
269
|
+
a {
|
|
270
|
+
&:not(:first-child) {
|
|
271
|
+
margin-right: 10px;
|
|
272
|
+
margin-left: auto;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
package/es/upload/upload.js
CHANGED
|
@@ -77,7 +77,8 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
77
77
|
var _useContext = useContext(ConfigContext),
|
|
78
78
|
getPrefixCls = _useContext.getPrefixCls,
|
|
79
79
|
pkgPrefixCls = _useContext.prefixCls,
|
|
80
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
80
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
81
|
+
direction = _useContext.direction;
|
|
81
82
|
var inputRef = useRef(null);
|
|
82
83
|
var allProps = getCompProps('Upload', userDefaultProps, props);
|
|
83
84
|
var type = allProps.type,
|
|
@@ -313,6 +314,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
313
314
|
}
|
|
314
315
|
};
|
|
315
316
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'upload', customPrefixcls);
|
|
317
|
+
var rtlCls = direction === 'rtl' ? "".concat(prefixCls, "-rtl") : null;
|
|
316
318
|
var inputFileProps = {
|
|
317
319
|
accept: accept,
|
|
318
320
|
onClick: onClick,
|
|
@@ -386,7 +388,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
386
388
|
};
|
|
387
389
|
});
|
|
388
390
|
return React.createElement("div", {
|
|
389
|
-
className: classNames(prefixCls, {
|
|
391
|
+
className: classNames(prefixCls, rtlCls, {
|
|
390
392
|
disabled: disabled
|
|
391
393
|
}, className),
|
|
392
394
|
style: style
|
package/lib/anchor/anchor.js
CHANGED
|
@@ -118,7 +118,8 @@ var InternalAnchor = function InternalAnchor(props, ref) {
|
|
|
118
118
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
119
119
|
getPrefixCls = _useContext.getPrefixCls,
|
|
120
120
|
prefixCls = _useContext.prefixCls,
|
|
121
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
121
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
122
|
+
direction = _useContext.direction;
|
|
122
123
|
var anchorProps = (0, _utils.getCompProps)('Anchor', userDefaultProps, props);
|
|
123
124
|
var customPrefixcls = anchorProps.prefixCls,
|
|
124
125
|
className = anchorProps.className,
|
|
@@ -141,6 +142,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
|
|
|
141
142
|
dropdownStyle = anchorProps.dropdownStyle,
|
|
142
143
|
onVisibleChange = anchorProps.onVisibleChange;
|
|
143
144
|
var anchorPrefixCls = getPrefixCls(prefixCls, 'anchor', customPrefixcls);
|
|
145
|
+
var rtlCls = direction === 'rtl' ? "".concat(anchorPrefixCls, "-rtl") : null;
|
|
144
146
|
(0, _devwarning.default)(AnchorTypes.indexOf(type) === -1, 'anchor', "cannot found anchor type '".concat(type, "'"));
|
|
145
147
|
var _useState = (0, _react.useState)(null),
|
|
146
148
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -192,7 +194,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
|
|
|
192
194
|
var anchorRef = ref || normalRef;
|
|
193
195
|
var linksWidthRef = _react.default.useRef([]);
|
|
194
196
|
var animating = _react.default.useRef(false);
|
|
195
|
-
var wrapperClass = (0, _classnames.default)(className, (0, _defineProperty2.default)({}, "".concat(anchorPrefixCls, "-wrapper"), true));
|
|
197
|
+
var wrapperClass = (0, _classnames.default)(className, rtlCls, (0, _defineProperty2.default)({}, "".concat(anchorPrefixCls, "-wrapper"), true));
|
|
196
198
|
var anchorMenuClass = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(anchorPrefixCls, "-menu"), true));
|
|
197
199
|
var anchorAdvancedClass = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(anchorPrefixCls, "-advanced"), true));
|
|
198
200
|
var inkClass = (0, _classnames.default)("".concat(anchorPrefixCls, "-line-slider"), {
|
|
@@ -431,7 +433,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
|
|
|
431
433
|
className: leftClasses,
|
|
432
434
|
onClick: handleLeft
|
|
433
435
|
}, _react.default.createElement(_index.Icon, {
|
|
434
|
-
type: "arrow-left
|
|
436
|
+
type: "".concat(direction === 'rtl' ? 'arrow-right' : 'arrow-left')
|
|
435
437
|
}));
|
|
436
438
|
};
|
|
437
439
|
var findCurrentLinkPosition = function findCurrentLinkPosition(linksWidth, boxWidth, position) {
|
|
@@ -461,12 +463,12 @@ var InternalAnchor = function InternalAnchor(props, ref) {
|
|
|
461
463
|
className: rightClasses,
|
|
462
464
|
onClick: handleRight
|
|
463
465
|
}, _react.default.createElement(_index.Icon, {
|
|
464
|
-
type: "arrow-right
|
|
466
|
+
type: "".concat(direction === 'rtl' ? 'arrow-left' : 'arrow-right')
|
|
465
467
|
}));
|
|
466
468
|
};
|
|
467
469
|
var anchorMenuContent = _react.default.createElement("div", {
|
|
468
470
|
ref: anchorRef,
|
|
469
|
-
className: "".concat(anchorPrefixCls, "-menu-wrapper"),
|
|
471
|
+
className: (0, _classnames.default)("".concat(anchorPrefixCls, "-menu-wrapper"), rtlCls),
|
|
470
472
|
style: (0, _extends2.default)({
|
|
471
473
|
width: '100%'
|
|
472
474
|
}, style)
|
|
@@ -297,3 +297,17 @@
|
|
|
297
297
|
-webkit-transition: all calc(var(--kd-c-anchor-duration-duration, var(--kd-g-duration, 0.3s)) - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
298
298
|
transition: all calc(var(--kd-c-anchor-duration-duration, var(--kd-g-duration, 0.3s)) - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
299
299
|
}
|
|
300
|
+
.kd-anchor-rtl {
|
|
301
|
+
direction: rtl;
|
|
302
|
+
}
|
|
303
|
+
.kd-anchor-rtl .kd-anchor {
|
|
304
|
+
padding-right: var(--kd-c-anchor-spacing-horizontal, 7px);
|
|
305
|
+
padding-left: 0;
|
|
306
|
+
}
|
|
307
|
+
.kd-anchor-rtl .kd-anchor-line {
|
|
308
|
+
right: var(--kd-c-anchor-spacing-horizontal, 7px);
|
|
309
|
+
left: auto;
|
|
310
|
+
}
|
|
311
|
+
.kd-anchor-rtl .kd-anchor-link {
|
|
312
|
+
text-align: right;
|
|
313
|
+
}
|
|
@@ -198,3 +198,18 @@
|
|
|
198
198
|
transition: all calc(@anchor-transition-duration - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
+
|
|
202
|
+
.@{anchor-prefix-cls}-rtl {
|
|
203
|
+
direction: rtl;
|
|
204
|
+
.@{anchor-prefix-cls} {
|
|
205
|
+
padding-right: @anchor-link-left;
|
|
206
|
+
padding-left: 0;
|
|
207
|
+
&-line {
|
|
208
|
+
right: @anchor-link-left;
|
|
209
|
+
left: auto;
|
|
210
|
+
}
|
|
211
|
+
&-link {
|
|
212
|
+
text-align: right;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
package/lib/button/button.js
CHANGED
|
@@ -44,7 +44,8 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
44
44
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
45
45
|
getPrefixCls = _useContext.getPrefixCls,
|
|
46
46
|
prefixCls = _useContext.prefixCls,
|
|
47
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
47
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
48
|
+
direction = _useContext.direction;
|
|
48
49
|
var buttonProps = (0, _utils.getCompProps)('Button', userDefaultProps, props);
|
|
49
50
|
var type = buttonProps.type,
|
|
50
51
|
iconPlace = buttonProps.iconPlace,
|
|
@@ -65,6 +66,7 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
65
66
|
others = __rest(buttonProps, ["type", "iconPlace", "children", "className", "prefixCls", "size", "loading", "shape", "bordered", "onClick", "icon", "ghost", "block", "disabled", "htmlType"]);
|
|
66
67
|
(0, _devwarning.default)(ButtonTypes.indexOf(type) === -1, 'button', "cannot found button type '".concat(type, "'"));
|
|
67
68
|
var btnPrefixCls = getPrefixCls(prefixCls, 'btn', customPrefixcls);
|
|
69
|
+
var rtlCls = direction === 'rtl' ? "".concat(btnPrefixCls, "-rtl") : null;
|
|
68
70
|
var handleClick = function handleClick(e) {
|
|
69
71
|
if (loading || disabled) {
|
|
70
72
|
return;
|
|
@@ -94,7 +96,7 @@ var InternalButton = function InternalButton(props, ref) {
|
|
|
94
96
|
return child;
|
|
95
97
|
};
|
|
96
98
|
var isTextBtn = type === 'text';
|
|
97
|
-
var btnClasses = (0, _classnames.default)(btnPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(btnPrefixCls, "-")).call(_context, type), type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(btnPrefixCls, "-size-")).call(_context2, size), size), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(btnPrefixCls, "-shape-")).call(_context3, shape), shape && !isTextBtn), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-no-border"), !bordered), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-background-ghost"), ghost && !disabled), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-loading"), loading && !isTextBtn), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-block"), block && !shape), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-icon-only"), !children && children !== 0 && icon), _classNames));
|
|
99
|
+
var btnClasses = (0, _classnames.default)(btnPrefixCls, rtlCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(btnPrefixCls, "-")).call(_context, type), type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(btnPrefixCls, "-size-")).call(_context2, size), size), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(btnPrefixCls, "-shape-")).call(_context3, shape), shape && !isTextBtn), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-no-border"), !bordered), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-background-ghost"), ghost && !disabled), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-loading"), loading && !isTextBtn), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-block"), block && !shape), (0, _defineProperty2.default)(_classNames, "".concat(btnPrefixCls, "-icon-only"), !children && children !== 0 && icon), _classNames));
|
|
98
100
|
var iconWrapperClassName = (0, _concat.default)(_context4 = "".concat(btnPrefixCls, "-iconWrapper-")).call(_context4, iconPlace === 'left' ? 'left' : 'right');
|
|
99
101
|
var iconNode = icon && !loading ? _react.default.createElement("span", {
|
|
100
102
|
className: iconWrapperClassName
|
package/lib/button/group.js
CHANGED
|
@@ -30,7 +30,8 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
30
30
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
31
31
|
getPrefixCls = _useContext.getPrefixCls,
|
|
32
32
|
prefixCls = _useContext.prefixCls,
|
|
33
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
33
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
34
|
+
direction = _useContext.direction;
|
|
34
35
|
var buttonGoupProps = (0, _utils.getCompProps)('ButtonGroup', userDefaultProps, props);
|
|
35
36
|
var style = buttonGoupProps.style,
|
|
36
37
|
className = buttonGoupProps.className,
|
|
@@ -54,6 +55,7 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
54
55
|
var triggerRef = _react.default.useRef(null);
|
|
55
56
|
var isBsicType = type === 'basic';
|
|
56
57
|
var btnGroupPrefixCls = getPrefixCls(prefixCls, 'btn-group', customPrefixcls);
|
|
58
|
+
var rtlCls = direction === 'rtl' ? "".concat(btnGroupPrefixCls, "-rtl") : null;
|
|
57
59
|
var btnGroupClasses = (0, _classnames.default)("".concat(btnGroupPrefixCls), className, (0, _defineProperty2.default)({}, (0, _concat.default)(_context = "".concat(btnGroupPrefixCls, "-")).call(_context, type), type));
|
|
58
60
|
var renderTriggerButton = (0, _react.useCallback)(function () {
|
|
59
61
|
var _toArray = (0, _reactChildren.toArray)(icon),
|
|
@@ -121,11 +123,11 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
121
123
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(visible);
|
|
122
124
|
};
|
|
123
125
|
var popperProps = (0, _extends2.default)((0, _extends2.default)({
|
|
124
|
-
placement: 'bottomLeft',
|
|
126
|
+
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft',
|
|
125
127
|
trigger: 'click',
|
|
126
128
|
gap: 0
|
|
127
129
|
}, buttonGoupProps), {
|
|
128
|
-
prefixCls: btnGroupPrefixCls,
|
|
130
|
+
prefixCls: (0, _classnames.default)(btnGroupPrefixCls, rtlCls),
|
|
129
131
|
defaultVisible: optionShow,
|
|
130
132
|
visible: optionShow,
|
|
131
133
|
onVisibleChange: handleVisibleChange,
|
|
@@ -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
|
+
}
|