@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
|
@@ -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/es/collapse/collapse.js
CHANGED
|
@@ -17,7 +17,8 @@ var InternalCollapse = React.forwardRef(function (props, ref) {
|
|
|
17
17
|
var _React$useContext = React.useContext(ConfigContext),
|
|
18
18
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
19
19
|
prefixCls = _React$useContext.prefixCls,
|
|
20
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
20
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
21
|
+
direction = _React$useContext.direction;
|
|
21
22
|
var _getCompProps = getCompProps('Collapse', userDefaultProps, props),
|
|
22
23
|
accordion = _getCompProps.accordion,
|
|
23
24
|
activeKey = _getCompProps.activeKey,
|
|
@@ -31,6 +32,7 @@ var InternalCollapse = React.forwardRef(function (props, ref) {
|
|
|
31
32
|
children = _getCompProps.children,
|
|
32
33
|
customPrefixcls = _getCompProps.prefixCls;
|
|
33
34
|
var CollapsePrefixCls = getPrefixCls(prefixCls, 'collapse', customPrefixcls);
|
|
35
|
+
var rtlCls = direction === 'rtl' ? "".concat(CollapsePrefixCls, "-rtl") : null;
|
|
34
36
|
var _useState = useState([]),
|
|
35
37
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36
38
|
innerKey = _useState2[0],
|
|
@@ -97,7 +99,7 @@ var InternalCollapse = React.forwardRef(function (props, ref) {
|
|
|
97
99
|
}, item.props));
|
|
98
100
|
});
|
|
99
101
|
};
|
|
100
|
-
var rootClassName = classNames(className, _defineProperty({}, "".concat(CollapsePrefixCls), true));
|
|
102
|
+
var rootClassName = classNames(className, rtlCls, _defineProperty({}, "".concat(CollapsePrefixCls), true));
|
|
101
103
|
var collapseRef = ref || React.createRef();
|
|
102
104
|
return React.createElement("div", {
|
|
103
105
|
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
|
+
}
|
|
@@ -29,7 +29,8 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
|
|
|
29
29
|
var _useContext = useContext(ConfigContext),
|
|
30
30
|
getPrefixCls = _useContext.getPrefixCls,
|
|
31
31
|
prefixCls = _useContext.prefixCls,
|
|
32
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
32
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
33
|
+
direction = _useContext.direction;
|
|
33
34
|
var colorPickerProps = getCompProps('ColorPicker', userDefaultProps, props);
|
|
34
35
|
var value = colorPickerProps.value,
|
|
35
36
|
className = colorPickerProps.className,
|
|
@@ -106,8 +107,9 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
|
|
|
106
107
|
clickedHistoricalColorIndex = _useState22[0],
|
|
107
108
|
setClickedHistoricalColorIndex = _useState22[1];
|
|
108
109
|
var colorPickerPrefixCls = getPrefixCls(prefixCls, 'color-picker');
|
|
109
|
-
var
|
|
110
|
-
var
|
|
110
|
+
var rtlCls = direction === 'rtl' ? "".concat(colorPickerPrefixCls, "-rtl") : null;
|
|
111
|
+
var popUpLayer = classNames(getPrefixCls(prefixCls, 'color-picker-pop'), rtlCls, popperClassName);
|
|
112
|
+
var containerCls = classNames("".concat(colorPickerPrefixCls, "-container"), rtlCls, className, _defineProperty({}, "".concat(colorPickerPrefixCls, "-container-pure"), pure));
|
|
111
113
|
var inputCls = classNames("".concat(colorPickerPrefixCls, "-input"));
|
|
112
114
|
var inputRef = useRef(null);
|
|
113
115
|
var showColorPickerPanel = showColorTransfer || typeof showPresetColor === 'boolean' && showPresetColor && ((presetColor === null || presetColor === void 0 ? void 0 : presetColor.length) || systemPresetColor.length) || typeof showPresetColor === 'undefined' || showClear || (historicalColor === null || historicalColor === void 0 ? void 0 : historicalColor.length) || (functionalColor === null || functionalColor === void 0 ? void 0 : functionalColor.length) && showSwitch || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showBox) || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showHue) || (showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showOpacity);
|
|
@@ -298,7 +300,7 @@ var InternalColorPicker = function InternalColorPicker(props, ref) {
|
|
|
298
300
|
});
|
|
299
301
|
var popperProps = _extends(_extends({}, otherProps), {
|
|
300
302
|
popperClassName: popUpLayer,
|
|
301
|
-
placement: 'bottomLeft',
|
|
303
|
+
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft',
|
|
302
304
|
defaultVisible: showPanel,
|
|
303
305
|
visible: showPanel,
|
|
304
306
|
onVisibleChange: null,
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
box-sizing: border-box;
|
|
203
203
|
width: var(--kd-c-color-picker-panel-sizing-width, 304px);
|
|
204
204
|
padding: 4px 12px 16px;
|
|
205
|
-
background: #
|
|
205
|
+
background: #ffffff;
|
|
206
206
|
-webkit-box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
|
|
207
207
|
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
|
|
208
208
|
border-radius: 2px;
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
position: absolute;
|
|
407
407
|
width: 64px !important;
|
|
408
408
|
min-width: unset !important;
|
|
409
|
-
background: #
|
|
409
|
+
background: #ffffff;
|
|
410
410
|
right: 0;
|
|
411
411
|
left: unset !important;
|
|
412
412
|
-webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(12n) {
|
|
511
511
|
margin-right: 0;
|
|
512
512
|
}
|
|
513
|
-
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n+12) {
|
|
513
|
+
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
514
514
|
margin-top: 0;
|
|
515
515
|
}
|
|
516
516
|
.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container li {
|
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
.kd-color-picker-pop .kd-color-picker-panel-color-box-container-ie11 li:nth-child(12n) {
|
|
572
572
|
margin-right: 0;
|
|
573
573
|
}
|
|
574
|
-
.kd-color-picker-pop .kd-color-picker-panel-color-box-container-ie11 li:nth-child(-n+12) {
|
|
574
|
+
.kd-color-picker-pop .kd-color-picker-panel-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
575
575
|
margin-top: 0;
|
|
576
576
|
}
|
|
577
577
|
.kd-color-picker-pop .kd-color-picker-panel-color-box-container li {
|
|
@@ -605,3 +605,128 @@
|
|
|
605
605
|
.kd-color-picker-pop .kd-color-picker-panel-color-box-container li:hover .square {
|
|
606
606
|
display: block;
|
|
607
607
|
}
|
|
608
|
+
.kd-color-picker-rtl {
|
|
609
|
+
direction: rtl;
|
|
610
|
+
}
|
|
611
|
+
.kd-color-picker-rtl .kd-color-picker-input .kd-input-prefix {
|
|
612
|
+
margin-right: auto;
|
|
613
|
+
margin-left: 3px;
|
|
614
|
+
}
|
|
615
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel {
|
|
616
|
+
-webkit-transform-origin: top left;
|
|
617
|
+
transform-origin: top left;
|
|
618
|
+
}
|
|
619
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-clear-box {
|
|
620
|
+
margin-left: 4px;
|
|
621
|
+
}
|
|
622
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-switch span {
|
|
623
|
+
vertical-align: middle;
|
|
624
|
+
margin-right: 9px;
|
|
625
|
+
}
|
|
626
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container {
|
|
627
|
+
display: -webkit-box;
|
|
628
|
+
display: -ms-flexbox;
|
|
629
|
+
display: flex;
|
|
630
|
+
-ms-flex-wrap: nowrap;
|
|
631
|
+
flex-wrap: nowrap;
|
|
632
|
+
}
|
|
633
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-select {
|
|
634
|
+
margin-left: 8px;
|
|
635
|
+
margin-right: 0;
|
|
636
|
+
}
|
|
637
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-select .kd-select-bordered {
|
|
638
|
+
border-radius: 2px;
|
|
639
|
+
width: var(--kd-c-color-picker-panel-select-sizing-width, 212px);
|
|
640
|
+
height: var(--kd-c-color-picker-panel-select-sizing-height, 28px);
|
|
641
|
+
min-height: 28px;
|
|
642
|
+
padding: 0 28px 0 0;
|
|
643
|
+
}
|
|
644
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-select .active-option {
|
|
645
|
+
background-color: var(--kd-c-color-picker-panel-option-color-background-selected, var(--kd-g-color-theme-3, #e3eeff));
|
|
646
|
+
}
|
|
647
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input {
|
|
648
|
+
height: 28px;
|
|
649
|
+
-webkit-box-flex: 1;
|
|
650
|
+
-ms-flex: 1 1 auto;
|
|
651
|
+
flex: 1 1 auto;
|
|
652
|
+
padding: 0 8px;
|
|
653
|
+
}
|
|
654
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group {
|
|
655
|
+
display: -webkit-box;
|
|
656
|
+
display: -ms-flexbox;
|
|
657
|
+
display: flex;
|
|
658
|
+
-webkit-box-align: center;
|
|
659
|
+
-ms-flex-align: center;
|
|
660
|
+
align-items: center;
|
|
661
|
+
}
|
|
662
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item {
|
|
663
|
+
height: 28px;
|
|
664
|
+
-webkit-box-flex: 1;
|
|
665
|
+
-ms-flex: 1;
|
|
666
|
+
flex: 1;
|
|
667
|
+
}
|
|
668
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item.active {
|
|
669
|
+
z-index: 2;
|
|
670
|
+
}
|
|
671
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:first-child {
|
|
672
|
+
border-top-right-radius: 0;
|
|
673
|
+
border-bottom-right-radius: 0;
|
|
674
|
+
z-index: 1;
|
|
675
|
+
}
|
|
676
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:nth-child(2) {
|
|
677
|
+
margin-right: -1px;
|
|
678
|
+
margin-left: -1px;
|
|
679
|
+
border-radius: 0;
|
|
680
|
+
}
|
|
681
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:nth-child(2):hover {
|
|
682
|
+
z-index: 1;
|
|
683
|
+
}
|
|
684
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-input-group-item:last-child {
|
|
685
|
+
border-top-left-radius: 0;
|
|
686
|
+
border-bottom-left-radius: 0;
|
|
687
|
+
}
|
|
688
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-container-transparent {
|
|
689
|
+
-webkit-box-flex: 0;
|
|
690
|
+
-ms-flex: 0 0 54px;
|
|
691
|
+
flex: 0 0 54px;
|
|
692
|
+
height: 28px;
|
|
693
|
+
margin-right: 8px;
|
|
694
|
+
margin-left: 0;
|
|
695
|
+
padding: 0;
|
|
696
|
+
text-align: center;
|
|
697
|
+
font-size: var(--kd-c-color-picker-panel-alpha-font-size, var(--kd-g-font-size-middle, 14px));
|
|
698
|
+
}
|
|
699
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-title {
|
|
700
|
+
font-size: 12px;
|
|
701
|
+
color: #666666;
|
|
702
|
+
line-height: 18px;
|
|
703
|
+
font-weight: 400;
|
|
704
|
+
margin-bottom: 8px;
|
|
705
|
+
}
|
|
706
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container {
|
|
707
|
+
display: grid;
|
|
708
|
+
grid-template-columns: repeat(12, 1fr);
|
|
709
|
+
grid-column-gap: 8px;
|
|
710
|
+
grid-row-gap: 8px;
|
|
711
|
+
}
|
|
712
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 {
|
|
713
|
+
display: -webkit-box;
|
|
714
|
+
display: -ms-flexbox;
|
|
715
|
+
display: flex;
|
|
716
|
+
-ms-flex-wrap: wrap;
|
|
717
|
+
flex-wrap: wrap;
|
|
718
|
+
}
|
|
719
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li {
|
|
720
|
+
margin-right: 8px;
|
|
721
|
+
margin-top: 8px;
|
|
722
|
+
}
|
|
723
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(12n) {
|
|
724
|
+
margin-right: 0;
|
|
725
|
+
}
|
|
726
|
+
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
727
|
+
margin-top: 0;
|
|
728
|
+
}
|
|
729
|
+
.kd-color-picker-rtl .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:first-child > div {
|
|
730
|
+
margin-right: 4px !important;
|
|
731
|
+
margin-left: 0 !important;
|
|
732
|
+
}
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
box-sizing: border-box;
|
|
99
99
|
width: @color-picker-panel-sizing-width;
|
|
100
100
|
padding: 4px 12px 16px;
|
|
101
|
-
background: #
|
|
101
|
+
background: #ffffff;
|
|
102
102
|
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
|
|
103
103
|
border-radius: 2px;
|
|
104
104
|
transform-origin: top left;
|
|
105
105
|
z-index: @color-picker-panel-z-index;
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
& > div {
|
|
108
108
|
margin-top: 12px;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -174,15 +174,15 @@
|
|
|
174
174
|
width: 278px !important;
|
|
175
175
|
box-shadow: none !important;
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
& > div:last-child {
|
|
178
178
|
padding: 9px 0 4px !important;
|
|
179
179
|
|
|
180
180
|
.flexbox-fix:first-child {
|
|
181
181
|
display: flex;
|
|
182
182
|
flex-direction: row-reverse;
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
& > div:first-child {
|
|
185
|
+
& > div {
|
|
186
186
|
width: 28px !important;
|
|
187
187
|
height: 28px !important;
|
|
188
188
|
border-radius: 50% !important;
|
|
@@ -191,44 +191,42 @@
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
& > div:last-child {
|
|
196
195
|
.hue-horizontal {
|
|
197
196
|
width: 240px !important;
|
|
198
197
|
height: 12px !important;
|
|
199
198
|
border-radius: 6px !important;
|
|
200
199
|
padding: unset !important;
|
|
201
200
|
|
|
202
|
-
|
|
201
|
+
& > div > div {
|
|
203
202
|
margin-top: 1px;
|
|
204
203
|
}
|
|
205
204
|
}
|
|
206
205
|
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
& > div:last-child {
|
|
207
|
+
& > div {
|
|
209
208
|
width: 240px !important;
|
|
210
209
|
height: 12px !important;
|
|
211
210
|
margin: unset;
|
|
212
211
|
|
|
213
|
-
|
|
212
|
+
& > div:first-child {
|
|
214
213
|
border-radius: 6px !important;
|
|
215
214
|
}
|
|
216
215
|
|
|
217
|
-
|
|
216
|
+
& > div:nth-child(2) {
|
|
218
217
|
border-radius: 6px !important;
|
|
219
218
|
}
|
|
220
219
|
|
|
221
|
-
|
|
220
|
+
& > div:last-child {
|
|
222
221
|
margin: unset !important;
|
|
223
222
|
|
|
224
|
-
|
|
223
|
+
& > div > div {
|
|
225
224
|
margin-top: 1px;
|
|
226
225
|
}
|
|
227
226
|
}
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
}
|
|
231
|
-
|
|
232
230
|
}
|
|
233
231
|
|
|
234
232
|
.flexbox-fix:last-child {
|
|
@@ -237,20 +235,20 @@
|
|
|
237
235
|
}
|
|
238
236
|
|
|
239
237
|
&-no-box {
|
|
240
|
-
|
|
238
|
+
& > div:first-child {
|
|
241
239
|
display: none;
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
242
|
|
|
245
243
|
&-no-hue {
|
|
246
|
-
|
|
244
|
+
& > div:last-child {
|
|
247
245
|
.flexbox-fix:first-child {
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
& > div:last-child {
|
|
247
|
+
& > div:first-child {
|
|
250
248
|
display: none;
|
|
251
249
|
}
|
|
252
250
|
|
|
253
|
-
|
|
251
|
+
& > div:last-child {
|
|
254
252
|
margin-top: 8px;
|
|
255
253
|
}
|
|
256
254
|
}
|
|
@@ -259,14 +257,14 @@
|
|
|
259
257
|
}
|
|
260
258
|
|
|
261
259
|
&-no-opacity {
|
|
262
|
-
|
|
260
|
+
& > div:last-child {
|
|
263
261
|
.flexbox-fix:first-child {
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
& > div:last-child {
|
|
263
|
+
& > div:last-child {
|
|
266
264
|
display: none;
|
|
267
265
|
}
|
|
268
266
|
|
|
269
|
-
|
|
267
|
+
& > div:first-child {
|
|
270
268
|
margin-top: 8px;
|
|
271
269
|
}
|
|
272
270
|
}
|
|
@@ -280,7 +278,7 @@
|
|
|
280
278
|
}
|
|
281
279
|
|
|
282
280
|
.@{color-picker-prefix-cls}-panel-chrome-no-hue.@{color-picker-prefix-cls}-panel-chrome-no-opacity {
|
|
283
|
-
|
|
281
|
+
& > div:last-child {
|
|
284
282
|
display: none;
|
|
285
283
|
}
|
|
286
284
|
}
|
|
@@ -334,10 +332,10 @@
|
|
|
334
332
|
position: absolute;
|
|
335
333
|
width: 64px !important;
|
|
336
334
|
min-width: unset !important;
|
|
337
|
-
background: #
|
|
335
|
+
background: #ffffff;
|
|
338
336
|
right: 0;
|
|
339
337
|
left: unset !important;
|
|
340
|
-
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.
|
|
338
|
+
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
341
339
|
border-radius: 2px;
|
|
342
340
|
}
|
|
343
341
|
|
|
@@ -441,7 +439,7 @@
|
|
|
441
439
|
margin-right: 0;
|
|
442
440
|
}
|
|
443
441
|
|
|
444
|
-
&:nth-child(-n+12) {
|
|
442
|
+
&:nth-child(-n + 12) {
|
|
445
443
|
margin-top: 0;
|
|
446
444
|
}
|
|
447
445
|
}
|
|
@@ -510,7 +508,7 @@
|
|
|
510
508
|
margin-right: 0;
|
|
511
509
|
}
|
|
512
510
|
|
|
513
|
-
&:nth-child(-n+12) {
|
|
511
|
+
&:nth-child(-n + 12) {
|
|
514
512
|
margin-top: 0;
|
|
515
513
|
}
|
|
516
514
|
}
|
|
@@ -553,3 +551,150 @@
|
|
|
553
551
|
}
|
|
554
552
|
}
|
|
555
553
|
}
|
|
554
|
+
|
|
555
|
+
.@{color-picker-prefix-cls}-rtl {
|
|
556
|
+
direction: rtl;
|
|
557
|
+
.@{color-picker-prefix-cls}-input {
|
|
558
|
+
.@{kd-prefix}-input-prefix {
|
|
559
|
+
margin-right: auto;
|
|
560
|
+
margin-left: 3px;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
&.@{color-picker-prefix-cls}-pop {
|
|
564
|
+
.@{color-picker-prefix-cls}-panel {
|
|
565
|
+
transform-origin: top left;
|
|
566
|
+
&-clear {
|
|
567
|
+
&-box {
|
|
568
|
+
margin-left: 4px;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
&-switch {
|
|
572
|
+
span {
|
|
573
|
+
vertical-align: middle;
|
|
574
|
+
margin-right: 9px;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
&-container {
|
|
579
|
+
display: flex;
|
|
580
|
+
flex-wrap: nowrap;
|
|
581
|
+
|
|
582
|
+
&-select {
|
|
583
|
+
margin-left: 8px;
|
|
584
|
+
margin-right: 0;
|
|
585
|
+
.@{kd-prefix}-select-bordered {
|
|
586
|
+
border-radius: 2px;
|
|
587
|
+
width: @color-picker-panel-select-sizing-width;
|
|
588
|
+
height: @color-picker-panel-select-sizing-height;
|
|
589
|
+
min-height: 28px;
|
|
590
|
+
padding: 0 28px 0 0;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.active-option {
|
|
594
|
+
background-color: @color-picker-panel-option-color-background;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
&-input {
|
|
599
|
+
height: 28px;
|
|
600
|
+
flex: 1 1 auto;
|
|
601
|
+
padding: 0 8px;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
&-input-group {
|
|
605
|
+
display: flex;
|
|
606
|
+
align-items: center;
|
|
607
|
+
|
|
608
|
+
&-item {
|
|
609
|
+
height: 28px;
|
|
610
|
+
flex: 1;
|
|
611
|
+
|
|
612
|
+
&.active {
|
|
613
|
+
z-index: 2;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
&:first-child {
|
|
617
|
+
border-top-right-radius: 0;
|
|
618
|
+
border-bottom-right-radius: 0;
|
|
619
|
+
z-index: 1;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
&:nth-child(2) {
|
|
623
|
+
margin-right: -1px;
|
|
624
|
+
margin-left: -1px;
|
|
625
|
+
border-radius: 0;
|
|
626
|
+
|
|
627
|
+
&:hover {
|
|
628
|
+
z-index: 1;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
&:last-child {
|
|
633
|
+
border-top-left-radius: 0;
|
|
634
|
+
border-bottom-left-radius: 0;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
&-transparent {
|
|
640
|
+
flex: 0 0 54px;
|
|
641
|
+
height: 28px;
|
|
642
|
+
margin-right: 8px;
|
|
643
|
+
margin-left: 0;
|
|
644
|
+
padding: 0;
|
|
645
|
+
text-align: center;
|
|
646
|
+
font-size: @color-picker-panel-alpha-font-size;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
&-historical-color-box {
|
|
651
|
+
&-title {
|
|
652
|
+
font-size: 12px;
|
|
653
|
+
color: #666666;
|
|
654
|
+
line-height: 18px;
|
|
655
|
+
font-weight: 400;
|
|
656
|
+
margin-bottom: 8px;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
&-container {
|
|
660
|
+
display: grid;
|
|
661
|
+
grid-template-columns: repeat(12, 1fr);
|
|
662
|
+
grid-column-gap: 8px;
|
|
663
|
+
grid-row-gap: 8px;
|
|
664
|
+
|
|
665
|
+
&-ie11 {
|
|
666
|
+
display: flex;
|
|
667
|
+
flex-wrap: wrap;
|
|
668
|
+
|
|
669
|
+
li {
|
|
670
|
+
margin-right: 8px;
|
|
671
|
+
margin-top: 8px;
|
|
672
|
+
|
|
673
|
+
&:nth-child(12n) {
|
|
674
|
+
margin-right: 0;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
&:nth-child(-n + 12) {
|
|
678
|
+
margin-top: 0;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
.@{color-picker-prefix-cls}-panel {
|
|
687
|
+
&-chrome {
|
|
688
|
+
& > div:last-child {
|
|
689
|
+
.flexbox-fix:first-child {
|
|
690
|
+
& > div:first-child {
|
|
691
|
+
& > div {
|
|
692
|
+
margin-right: 4px !important;
|
|
693
|
+
margin-left: 0 !important;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LocaleConfigType, CompLangMsgParams, ComponentType } from '../locale';
|
|
3
|
+
export declare const DirectionTypes: ["ltr", "rtl"];
|
|
4
|
+
export declare type DirectionType = typeof DirectionTypes[number];
|
|
3
5
|
interface IntlUniversal {
|
|
4
6
|
getCompLangMsg: (compLangMsgParams: CompLangMsgParams, customGetLangMsg?: (componentName: string, labelName: string, params: any) => any) => any;
|
|
5
7
|
getLangMsg: (componentName: ComponentType | string, labelName: string, params?: any) => string | React.ReactNode[];
|
|
@@ -10,6 +12,7 @@ export interface IConfigProps {
|
|
|
10
12
|
prefixCls?: string;
|
|
11
13
|
localeConfig?: LocaleConfigType;
|
|
12
14
|
locale?: IntlUniversal;
|
|
15
|
+
direction?: DirectionType;
|
|
13
16
|
}
|
|
14
17
|
export interface IContextConfigProps {
|
|
15
18
|
getPrefixCls?: (configPrefixCls?: string, suffixCls?: string, customizePrefixCls?: string) => string;
|
|
@@ -17,6 +20,7 @@ export interface IContextConfigProps {
|
|
|
17
20
|
prefixCls?: string;
|
|
18
21
|
localeConfig?: LocaleConfigType;
|
|
19
22
|
locale: IntlUniversal;
|
|
23
|
+
direction?: DirectionType;
|
|
20
24
|
}
|
|
21
25
|
declare const ConfigContext: import("react").Context<IContextConfigProps>;
|
|
22
26
|
export default ConfigContext;
|