@kdcloudjs/kdesign 1.8.33 → 1.8.35
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 +21 -3
- package/dist/kdesign.css +11 -5
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +22 -22
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +4 -4
- package/dist/kdesign.min.js.map +1 -1
- package/es/button/group.js +3 -2
- package/es/city-picker/city-picker.js +1 -1
- package/es/city-picker/option.js +2 -7
- package/es/color-picker/color-picker-panel.js +6 -3
- package/es/color-picker/style/index.css +3 -0
- package/es/color-picker/style/index.less +7 -0
- package/es/date-picker/style/index.css +3 -0
- package/es/date-picker/style/index.less +7 -0
- package/es/dropdown/dropdown.js +1 -1
- package/es/locale/en-US.d.ts +3 -0
- package/es/locale/en-US.js +3 -0
- package/es/locale/locale.d.ts +3 -0
- package/es/locale/zh-CN.d.ts +3 -0
- package/es/locale/zh-CN.js +3 -0
- package/es/modal/modal.js +1 -1
- package/es/modal/style/index.css +4 -0
- package/es/modal/style/index.less +4 -0
- package/es/progress/style/index.css +0 -4
- package/es/progress/style/index.less +3 -3
- package/es/select/select.js +1 -1
- package/es/transfer/list.js +6 -7
- package/es/transfer/transfer.js +1 -2
- package/lib/button/group.js +3 -2
- package/lib/city-picker/city-picker.js +1 -1
- package/lib/city-picker/option.js +2 -7
- package/lib/color-picker/color-picker-panel.js +6 -3
- package/lib/color-picker/style/index.css +3 -0
- package/lib/color-picker/style/index.less +7 -0
- package/lib/date-picker/style/index.css +3 -0
- package/lib/date-picker/style/index.less +7 -0
- package/lib/dropdown/dropdown.js +1 -1
- package/lib/locale/en-US.d.ts +3 -0
- package/lib/locale/en-US.js +3 -0
- package/lib/locale/locale.d.ts +3 -0
- package/lib/locale/zh-CN.d.ts +3 -0
- package/lib/locale/zh-CN.js +3 -0
- package/lib/modal/modal.js +1 -1
- package/lib/modal/style/index.css +4 -0
- package/lib/modal/style/index.less +4 -0
- package/lib/progress/style/index.css +0 -4
- package/lib/progress/style/index.less +3 -3
- package/lib/select/select.js +1 -1
- package/lib/transfer/list.js +6 -7
- package/lib/transfer/transfer.js +1 -2
- package/package.json +1 -1
package/es/button/group.js
CHANGED
|
@@ -33,7 +33,8 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
33
33
|
buttonType = buttonGoupProps.buttonType,
|
|
34
34
|
disabled = buttonGoupProps.disabled,
|
|
35
35
|
onVisibleChange = buttonGoupProps.onVisibleChange,
|
|
36
|
-
loading = buttonGoupProps.loading
|
|
36
|
+
loading = buttonGoupProps.loading,
|
|
37
|
+
placement = buttonGoupProps.placement;
|
|
37
38
|
var _useState = useState(false),
|
|
38
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
39
40
|
optionShow = _useState2[0],
|
|
@@ -110,7 +111,7 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
110
111
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(visible);
|
|
111
112
|
};
|
|
112
113
|
var popperProps = _extends(_extends({
|
|
113
|
-
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft',
|
|
114
|
+
placement: placement || (direction === 'rtl' ? 'bottomRight' : 'bottomLeft'),
|
|
114
115
|
trigger: 'click',
|
|
115
116
|
gap: 0
|
|
116
117
|
}, buttonGoupProps), {
|
|
@@ -487,7 +487,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
487
487
|
};
|
|
488
488
|
var popperProps = _extends(_extends({}, selectProps), {
|
|
489
489
|
prefixCls: classNames("".concat(selectPrefixCls, "-dropdown"), rtlCls),
|
|
490
|
-
placement:
|
|
490
|
+
placement: 'bottomLeft',
|
|
491
491
|
popperStyle: catchStyle(),
|
|
492
492
|
defaultVisible: optionShow,
|
|
493
493
|
visible: optionShow,
|
package/es/city-picker/option.js
CHANGED
|
@@ -21,8 +21,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
21
21
|
name = city.name;
|
|
22
22
|
var _useContext = useContext(ConfigContext),
|
|
23
23
|
getPrefixCls = _useContext.getPrefixCls,
|
|
24
|
-
prefixCls = _useContext.prefixCls
|
|
25
|
-
direction = _useContext.direction;
|
|
24
|
+
prefixCls = _useContext.prefixCls;
|
|
26
25
|
var selectOptionPrefixCls = getPrefixCls(prefixCls, 'city-picker-list-item');
|
|
27
26
|
var isSelected = id !== undefined ? id === value : false;
|
|
28
27
|
var optionCls = classNames(selectOptionPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-selected"), isSelected), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(selectOptionPrefixCls, "-active"), activeIndex === index), _classNames));
|
|
@@ -40,11 +39,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
40
39
|
title: name,
|
|
41
40
|
onClick: handleClick,
|
|
42
41
|
onMouseEnter: handleOnMouseEnter
|
|
43
|
-
}, typeof itemRender === 'function' ? itemRender(city) :
|
|
44
|
-
className: "".concat(selectOptionPrefixCls, "-info")
|
|
45
|
-
}, renderCityInfo === null || renderCityInfo === void 0 ? void 0 : renderCityInfo(city, true)), React.createElement("span", {
|
|
46
|
-
className: "".concat(selectOptionPrefixCls, "-content")
|
|
47
|
-
}, children)) : React.createElement(React.Fragment, null, React.createElement("span", {
|
|
42
|
+
}, typeof itemRender === 'function' ? itemRender(city) : React.createElement(React.Fragment, null, React.createElement("span", {
|
|
48
43
|
className: "".concat(selectOptionPrefixCls, "-content")
|
|
49
44
|
}, children), React.createElement("span", {
|
|
50
45
|
className: "".concat(selectOptionPrefixCls, "-info")
|
|
@@ -82,6 +82,9 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
82
82
|
prefixCls = _useContext.prefixCls,
|
|
83
83
|
locale = _useContext.locale,
|
|
84
84
|
direction = _useContext.direction;
|
|
85
|
+
var colorPickerLangMsg = locale.getCompLangMsg({
|
|
86
|
+
componentName: 'ColorPicker'
|
|
87
|
+
});
|
|
85
88
|
var colorPickerPrefixCls = getPrefixCls(prefixCls, 'color-picker');
|
|
86
89
|
var panelCls = classNames("".concat(colorPickerPrefixCls, "-panel"));
|
|
87
90
|
var panelChromePickerCls = classNames("".concat(colorPickerPrefixCls, "-panel-chrome"), (_classNames = {}, _defineProperty(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-box"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showBox)), _defineProperty(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-hue"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showHue)), _defineProperty(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-opacity"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showOpacity)), _classNames));
|
|
@@ -430,7 +433,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
430
433
|
onClick: handleClearClick
|
|
431
434
|
}), React.createElement("span", {
|
|
432
435
|
className: panelClearColorText
|
|
433
|
-
},
|
|
436
|
+
}, colorPickerLangMsg === null || colorPickerLangMsg === void 0 ? void 0 : colorPickerLangMsg.noColor)), functionalColor && showSwitch && React.createElement("div", {
|
|
434
437
|
className: panelFollowThemeCls
|
|
435
438
|
}, React.createElement("span", null, (switchName === null || switchName === void 0 ? void 0 : switchName.internationalName) && locale.getLangMsg('ColorPicker', switchName.internationalName) || switchName.name), React.createElement(Switch, {
|
|
436
439
|
checked: isFollow,
|
|
@@ -497,7 +500,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
497
500
|
className: historicalColorBoxCls
|
|
498
501
|
}, React.createElement("div", {
|
|
499
502
|
className: historicalColorBoxTitleCls
|
|
500
|
-
},
|
|
503
|
+
}, colorPickerLangMsg === null || colorPickerLangMsg === void 0 ? void 0 : colorPickerLangMsg.recentColor), React.createElement("div", {
|
|
501
504
|
className: historicalColorBoxContainerCls
|
|
502
505
|
}, checkUserPresetColor(historicalColor) && _mapInstanceProperty(_context4 = presetColorToHEX(historicalColor)).call(_context4, function (colorValue, i) {
|
|
503
506
|
return React.createElement("li", {
|
|
@@ -517,7 +520,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
517
520
|
className: colorBoxCls
|
|
518
521
|
}, historicalColor && (historicalColor === null || historicalColor === void 0 ? void 0 : historicalColor.length) > 0 && React.createElement("div", {
|
|
519
522
|
className: colorBoxTitleCls
|
|
520
|
-
},
|
|
523
|
+
}, colorPickerLangMsg === null || colorPickerLangMsg === void 0 ? void 0 : colorPickerLangMsg.recommendColor), React.createElement("div", {
|
|
521
524
|
className: colorBoxContainerCls
|
|
522
525
|
}, _mapInstanceProperty(_context5 = checkUserPresetColor(presetColor) && presetColorToHEX(presetColor) || systemPresetColor).call(_context5, function (colorValue, i) {
|
|
523
526
|
return React.createElement("li", {
|
|
@@ -714,6 +714,9 @@
|
|
|
714
714
|
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
715
715
|
margin-top: 0;
|
|
716
716
|
}
|
|
717
|
+
.kd-color-picker-rtl.kd-color-picker-container-pure .kd-input-wrapper.kd-color-picker-input .kd-input-prefix {
|
|
718
|
+
margin: 0;
|
|
719
|
+
}
|
|
717
720
|
.kd-color-picker-rtl .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:first-child > div {
|
|
718
721
|
margin-right: 4px !important;
|
|
719
722
|
margin-left: 0 !important;
|
|
@@ -675,6 +675,13 @@
|
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
+
&.@{color-picker-prefix-cls}-container-pure {
|
|
679
|
+
.@{kd-prefix}-input-wrapper.@{color-picker-prefix-cls}-input {
|
|
680
|
+
.@{kd-prefix}-input-prefix {
|
|
681
|
+
margin: 0;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
678
685
|
.@{color-picker-prefix-cls}-panel {
|
|
679
686
|
&-chrome {
|
|
680
687
|
& > div:last-child {
|
package/es/dropdown/dropdown.js
CHANGED
|
@@ -135,7 +135,7 @@ var Dropdown = React.forwardRef(function (props, ref) {
|
|
|
135
135
|
animation: 'none'
|
|
136
136
|
}, popperStyle),
|
|
137
137
|
onVisibleChange: handleVisibleChange,
|
|
138
|
-
placement: placement
|
|
138
|
+
placement: typeof props.placement !== 'undefined' ? placement : direction === 'rtl' ? 'bottomRight' : placement
|
|
139
139
|
});
|
|
140
140
|
return usePopper(child, menuElement, popperProps);
|
|
141
141
|
});
|
package/es/locale/en-US.d.ts
CHANGED
|
@@ -65,6 +65,9 @@ declare const locale: {
|
|
|
65
65
|
'CityPicker.tabsInternation': string;
|
|
66
66
|
'CityPicker.title': string;
|
|
67
67
|
'ColorPicker.followFunctionalColor': string;
|
|
68
|
+
'ColorPicker.noColor': string;
|
|
69
|
+
'ColorPicker.recentColor': string;
|
|
70
|
+
'ColorPicker.recommendColor': string;
|
|
68
71
|
'Search.placeholder': string;
|
|
69
72
|
'Search.desc': string[];
|
|
70
73
|
'Search.nplDesc': string;
|
package/es/locale/en-US.js
CHANGED
|
@@ -65,6 +65,9 @@ var locale = {
|
|
|
65
65
|
'CityPicker.tabsInternation': 'International/China HK-MO-TW',
|
|
66
66
|
'CityPicker.title': 'City',
|
|
67
67
|
'ColorPicker.followFunctionalColor': 'Follow theme color',
|
|
68
|
+
'ColorPicker.noColor': 'No color fill',
|
|
69
|
+
'ColorPicker.recentColor': 'Recently used color',
|
|
70
|
+
'ColorPicker.recommendColor': 'Recommended color',
|
|
68
71
|
'Search.placeholder': 'Please enter search content',
|
|
69
72
|
'Search.desc': ["Space means 'or', Enter means 'and'"],
|
|
70
73
|
'Search.nplDesc': 'Smart search',
|
package/es/locale/locale.d.ts
CHANGED
|
@@ -72,6 +72,9 @@ declare class LocaleCache {
|
|
|
72
72
|
'CityPicker.tabsInternation': string;
|
|
73
73
|
'CityPicker.title': string;
|
|
74
74
|
'ColorPicker.followFunctionalColor': string;
|
|
75
|
+
'ColorPicker.noColor': string;
|
|
76
|
+
'ColorPicker.recentColor': string;
|
|
77
|
+
'ColorPicker.recommendColor': string;
|
|
75
78
|
'Search.placeholder': string;
|
|
76
79
|
'Search.desc': string[];
|
|
77
80
|
'Search.nplDesc': string;
|
package/es/locale/zh-CN.d.ts
CHANGED
|
@@ -44,6 +44,9 @@ declare const locale: {
|
|
|
44
44
|
'CityPicker.tabsInternation': string;
|
|
45
45
|
'CityPicker.title': string;
|
|
46
46
|
'ColorPicker.followFunctionalColor': string;
|
|
47
|
+
'ColorPicker.noColor': string;
|
|
48
|
+
'ColorPicker.recentColor': string;
|
|
49
|
+
'ColorPicker.recommendColor': string;
|
|
47
50
|
'Search.placeholder': string;
|
|
48
51
|
'Search.desc': string[];
|
|
49
52
|
'Search.nplDesc': string;
|
package/es/locale/zh-CN.js
CHANGED
|
@@ -48,6 +48,9 @@ var locale = _extends(_extends({
|
|
|
48
48
|
'CityPicker.tabsInternation': '国际/中国港澳台',
|
|
49
49
|
'CityPicker.title': '城市',
|
|
50
50
|
'ColorPicker.followFunctionalColor': '跟随功能色',
|
|
51
|
+
'ColorPicker.noColor': '无颜色填充',
|
|
52
|
+
'ColorPicker.recentColor': '最近使用颜色',
|
|
53
|
+
'ColorPicker.recommendColor': '推荐色',
|
|
51
54
|
'Search.placeholder': '请输入需要搜索的内容',
|
|
52
55
|
'Search.desc': ['空格代表"或",回车代表"且"'],
|
|
53
56
|
'Search.nplDesc': '智能搜索',
|
package/es/modal/modal.js
CHANGED
|
@@ -121,7 +121,7 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
121
121
|
modalContainer = document.body;
|
|
122
122
|
}
|
|
123
123
|
var _useState3 = useState(modalContainer && !overroll ? {
|
|
124
|
-
x: -(width / 2),
|
|
124
|
+
x: direction === 'rtl' ? width / 2 : -(width / 2),
|
|
125
125
|
y: -(height / 2)
|
|
126
126
|
} : {
|
|
127
127
|
x: 0,
|
package/es/modal/style/index.css
CHANGED
|
@@ -278,10 +278,6 @@
|
|
|
278
278
|
padding-right: 0;
|
|
279
279
|
padding-left: calc(var(--kd-c-progress-line-text-font-size, 16px) * 2 + 8px);
|
|
280
280
|
}
|
|
281
|
-
.kd-progress-rtl .kd-progress-inner {
|
|
282
|
-
-webkit-transform: rotateY(180deg);
|
|
283
|
-
transform: rotateY(180deg);
|
|
284
|
-
}
|
|
285
281
|
.kd-progress-rtl .kd-progress-text {
|
|
286
282
|
margin-right: var(--kd-c-progress-line-text-spacing-margin-left, 8px);
|
|
287
283
|
margin-left: 0;
|
|
@@ -215,9 +215,9 @@
|
|
|
215
215
|
padding-left: calc(@progress-line-text-font-size * 2 + 8px);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
.@{progress-prefix-cls}-inner {
|
|
219
|
-
|
|
220
|
-
}
|
|
218
|
+
// .@{progress-prefix-cls}-inner {
|
|
219
|
+
// // transform: rotateY(180deg);
|
|
220
|
+
// }
|
|
221
221
|
.@{progress-prefix-cls}-text {
|
|
222
222
|
margin-right: @progress-line-text-margin-left;
|
|
223
223
|
margin-left: 0;
|
package/es/select/select.js
CHANGED
|
@@ -908,7 +908,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
908
908
|
};
|
|
909
909
|
var popperProps = _extends(_extends({}, selectProps), {
|
|
910
910
|
prefixCls: _concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = "".concat(selectPrefixCls, "-dropdown-panel")).call(_context6, isMultiple ? " ".concat(selectPrefixCls, "-multiple-dropdown-panel") : '', " ")).call(_context5, rtlCls),
|
|
911
|
-
placement:
|
|
911
|
+
placement: 'bottomLeft',
|
|
912
912
|
popperStyle: catchStyle(),
|
|
913
913
|
defaultVisible: optionShow,
|
|
914
914
|
visible: optionShow,
|
package/es/transfer/list.js
CHANGED
|
@@ -37,8 +37,7 @@ var ITransferList = function ITransferList(props, ref) {
|
|
|
37
37
|
pagination = props.pagination,
|
|
38
38
|
footer = props.footer,
|
|
39
39
|
showRemove = props.showRemove,
|
|
40
|
-
placeholder = props.placeholder
|
|
41
|
-
rtl = props.rtl;
|
|
40
|
+
placeholder = props.placeholder;
|
|
42
41
|
var _useState = useState(''),
|
|
43
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
43
|
filterValue = _useState2[0],
|
|
@@ -135,11 +134,11 @@ var ITransferList = function ITransferList(props, ref) {
|
|
|
135
134
|
}, search, bodyNode);
|
|
136
135
|
};
|
|
137
136
|
var getSelectAllLabel = function getSelectAllLabel(selectedCount, totalCount) {
|
|
138
|
-
var _context2
|
|
137
|
+
var _context2;
|
|
139
138
|
if (showRemove) {
|
|
140
139
|
return React.createElement(React.Fragment, null, "".concat(totalCount));
|
|
141
140
|
}
|
|
142
|
-
return
|
|
141
|
+
return React.createElement(React.Fragment, null, _concatInstanceProperty(_context2 = "(".concat(totalCount, "/")).call(_context2, selectedCount, ")"));
|
|
143
142
|
};
|
|
144
143
|
var getCheckStatus = function getCheckStatus(filteredItems) {
|
|
145
144
|
if (checkedKeys.length === 0) {
|
|
@@ -162,10 +161,10 @@ var ITransferList = function ITransferList(props, ref) {
|
|
|
162
161
|
checked: checkedAll,
|
|
163
162
|
indeterminate: checkStatus === 'part',
|
|
164
163
|
onChange: function onChange() {
|
|
165
|
-
var
|
|
166
|
-
onItemSelectAll(_mapInstanceProperty(
|
|
164
|
+
var _context3;
|
|
165
|
+
onItemSelectAll(_mapInstanceProperty(_context3 = _filterInstanceProperty(filteredItems).call(filteredItems, function (item) {
|
|
167
166
|
return !item.disabled;
|
|
168
|
-
})).call(
|
|
167
|
+
})).call(_context3, function (_ref) {
|
|
169
168
|
var key = _ref.key;
|
|
170
169
|
return key;
|
|
171
170
|
}), !checkedAll);
|
package/es/transfer/transfer.js
CHANGED
|
@@ -270,8 +270,7 @@ var InternalTransfer = function InternalTransfer(props, ref) {
|
|
|
270
270
|
pagination: mergedPagination,
|
|
271
271
|
noDataContent: handleNoDataContent(noDataContent, 'left'),
|
|
272
272
|
footer: footer,
|
|
273
|
-
ref: leftListRef
|
|
274
|
-
rtl: direction === 'rtl'
|
|
273
|
+
ref: leftListRef
|
|
275
274
|
}), React.createElement(Operation, {
|
|
276
275
|
className: "".concat(transferPrefixCls, "-operation"),
|
|
277
276
|
rightActive: rightActive,
|
package/lib/button/group.js
CHANGED
|
@@ -46,7 +46,8 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
46
46
|
buttonType = buttonGoupProps.buttonType,
|
|
47
47
|
disabled = buttonGoupProps.disabled,
|
|
48
48
|
onVisibleChange = buttonGoupProps.onVisibleChange,
|
|
49
|
-
loading = buttonGoupProps.loading
|
|
49
|
+
loading = buttonGoupProps.loading,
|
|
50
|
+
placement = buttonGoupProps.placement;
|
|
50
51
|
var _useState = (0, _react.useState)(false),
|
|
51
52
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
52
53
|
optionShow = _useState2[0],
|
|
@@ -123,7 +124,7 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
123
124
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(visible);
|
|
124
125
|
};
|
|
125
126
|
var popperProps = (0, _extends2.default)((0, _extends2.default)({
|
|
126
|
-
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft',
|
|
127
|
+
placement: placement || (direction === 'rtl' ? 'bottomRight' : 'bottomLeft'),
|
|
127
128
|
trigger: 'click',
|
|
128
129
|
gap: 0
|
|
129
130
|
}, buttonGoupProps), {
|
|
@@ -499,7 +499,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
499
499
|
};
|
|
500
500
|
var popperProps = (0, _extends2.default)((0, _extends2.default)({}, selectProps), {
|
|
501
501
|
prefixCls: (0, _classnames.default)("".concat(selectPrefixCls, "-dropdown"), rtlCls),
|
|
502
|
-
placement:
|
|
502
|
+
placement: 'bottomLeft',
|
|
503
503
|
popperStyle: catchStyle(),
|
|
504
504
|
defaultVisible: optionShow,
|
|
505
505
|
visible: optionShow,
|
|
@@ -33,8 +33,7 @@ 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
|
|
37
|
-
direction = _useContext.direction;
|
|
36
|
+
prefixCls = _useContext.prefixCls;
|
|
38
37
|
var selectOptionPrefixCls = getPrefixCls(prefixCls, 'city-picker-list-item');
|
|
39
38
|
var isSelected = id !== undefined ? id === value : false;
|
|
40
39
|
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));
|
|
@@ -52,11 +51,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
52
51
|
title: name,
|
|
53
52
|
onClick: handleClick,
|
|
54
53
|
onMouseEnter: handleOnMouseEnter
|
|
55
|
-
}, typeof itemRender === 'function' ? itemRender(city) :
|
|
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", {
|
|
54
|
+
}, typeof itemRender === 'function' ? itemRender(city) : _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("span", {
|
|
60
55
|
className: "".concat(selectOptionPrefixCls, "-content")
|
|
61
56
|
}, children), _react.default.createElement("span", {
|
|
62
57
|
className: "".concat(selectOptionPrefixCls, "-info")
|
|
@@ -94,6 +94,9 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
94
94
|
prefixCls = _useContext.prefixCls,
|
|
95
95
|
locale = _useContext.locale,
|
|
96
96
|
direction = _useContext.direction;
|
|
97
|
+
var colorPickerLangMsg = locale.getCompLangMsg({
|
|
98
|
+
componentName: 'ColorPicker'
|
|
99
|
+
});
|
|
97
100
|
var colorPickerPrefixCls = getPrefixCls(prefixCls, 'color-picker');
|
|
98
101
|
var panelCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel"));
|
|
99
102
|
var panelChromePickerCls = (0, _classnames.default)("".concat(colorPickerPrefixCls, "-panel-chrome"), (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-box"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showBox)), (0, _defineProperty2.default)(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-hue"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showHue)), (0, _defineProperty2.default)(_classNames, "".concat(colorPickerPrefixCls, "-panel-chrome-no-opacity"), !(showColorPickerBox === null || showColorPickerBox === void 0 ? void 0 : showColorPickerBox.showOpacity)), _classNames));
|
|
@@ -442,7 +445,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
442
445
|
onClick: handleClearClick
|
|
443
446
|
}), _react.default.createElement("span", {
|
|
444
447
|
className: panelClearColorText
|
|
445
|
-
},
|
|
448
|
+
}, colorPickerLangMsg === null || colorPickerLangMsg === void 0 ? void 0 : colorPickerLangMsg.noColor)), functionalColor && showSwitch && _react.default.createElement("div", {
|
|
446
449
|
className: panelFollowThemeCls
|
|
447
450
|
}, _react.default.createElement("span", null, (switchName === null || switchName === void 0 ? void 0 : switchName.internationalName) && locale.getLangMsg('ColorPicker', switchName.internationalName) || switchName.name), _react.default.createElement(_index.Switch, {
|
|
448
451
|
checked: isFollow,
|
|
@@ -509,7 +512,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
509
512
|
className: historicalColorBoxCls
|
|
510
513
|
}, _react.default.createElement("div", {
|
|
511
514
|
className: historicalColorBoxTitleCls
|
|
512
|
-
},
|
|
515
|
+
}, colorPickerLangMsg === null || colorPickerLangMsg === void 0 ? void 0 : colorPickerLangMsg.recentColor), _react.default.createElement("div", {
|
|
513
516
|
className: historicalColorBoxContainerCls
|
|
514
517
|
}, checkUserPresetColor(historicalColor) && (0, _map.default)(_context4 = (0, _colorFormat.presetColorToHEX)(historicalColor)).call(_context4, function (colorValue, i) {
|
|
515
518
|
return _react.default.createElement("li", {
|
|
@@ -529,7 +532,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
529
532
|
className: colorBoxCls
|
|
530
533
|
}, historicalColor && (historicalColor === null || historicalColor === void 0 ? void 0 : historicalColor.length) > 0 && _react.default.createElement("div", {
|
|
531
534
|
className: colorBoxTitleCls
|
|
532
|
-
},
|
|
535
|
+
}, colorPickerLangMsg === null || colorPickerLangMsg === void 0 ? void 0 : colorPickerLangMsg.recommendColor), _react.default.createElement("div", {
|
|
533
536
|
className: colorBoxContainerCls
|
|
534
537
|
}, (0, _map.default)(_context5 = checkUserPresetColor(presetColor) && (0, _colorFormat.presetColorToHEX)(presetColor) || _systemPresetColor.systemPresetColor).call(_context5, function (colorValue, i) {
|
|
535
538
|
return _react.default.createElement("li", {
|
|
@@ -714,6 +714,9 @@
|
|
|
714
714
|
.kd-color-picker-rtl.kd-color-picker-pop .kd-color-picker-panel-historical-color-box-container-ie11 li:nth-child(-n + 12) {
|
|
715
715
|
margin-top: 0;
|
|
716
716
|
}
|
|
717
|
+
.kd-color-picker-rtl.kd-color-picker-container-pure .kd-input-wrapper.kd-color-picker-input .kd-input-prefix {
|
|
718
|
+
margin: 0;
|
|
719
|
+
}
|
|
717
720
|
.kd-color-picker-rtl .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:first-child > div {
|
|
718
721
|
margin-right: 4px !important;
|
|
719
722
|
margin-left: 0 !important;
|
|
@@ -675,6 +675,13 @@
|
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
+
&.@{color-picker-prefix-cls}-container-pure {
|
|
679
|
+
.@{kd-prefix}-input-wrapper.@{color-picker-prefix-cls}-input {
|
|
680
|
+
.@{kd-prefix}-input-prefix {
|
|
681
|
+
margin: 0;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
678
685
|
.@{color-picker-prefix-cls}-panel {
|
|
679
686
|
&-chrome {
|
|
680
687
|
& > div:last-child {
|
package/lib/dropdown/dropdown.js
CHANGED
|
@@ -147,7 +147,7 @@ var Dropdown = React.forwardRef(function (props, ref) {
|
|
|
147
147
|
animation: 'none'
|
|
148
148
|
}, popperStyle),
|
|
149
149
|
onVisibleChange: handleVisibleChange,
|
|
150
|
-
placement: placement
|
|
150
|
+
placement: typeof props.placement !== 'undefined' ? placement : direction === 'rtl' ? 'bottomRight' : placement
|
|
151
151
|
});
|
|
152
152
|
return (0, _usePopper.default)(child, menuElement, popperProps);
|
|
153
153
|
});
|
package/lib/locale/en-US.d.ts
CHANGED
|
@@ -65,6 +65,9 @@ declare const locale: {
|
|
|
65
65
|
'CityPicker.tabsInternation': string;
|
|
66
66
|
'CityPicker.title': string;
|
|
67
67
|
'ColorPicker.followFunctionalColor': string;
|
|
68
|
+
'ColorPicker.noColor': string;
|
|
69
|
+
'ColorPicker.recentColor': string;
|
|
70
|
+
'ColorPicker.recommendColor': string;
|
|
68
71
|
'Search.placeholder': string;
|
|
69
72
|
'Search.desc': string[];
|
|
70
73
|
'Search.nplDesc': string;
|
package/lib/locale/en-US.js
CHANGED
|
@@ -71,6 +71,9 @@ var locale = {
|
|
|
71
71
|
'CityPicker.tabsInternation': 'International/China HK-MO-TW',
|
|
72
72
|
'CityPicker.title': 'City',
|
|
73
73
|
'ColorPicker.followFunctionalColor': 'Follow theme color',
|
|
74
|
+
'ColorPicker.noColor': 'No color fill',
|
|
75
|
+
'ColorPicker.recentColor': 'Recently used color',
|
|
76
|
+
'ColorPicker.recommendColor': 'Recommended color',
|
|
74
77
|
'Search.placeholder': 'Please enter search content',
|
|
75
78
|
'Search.desc': ["Space means 'or', Enter means 'and'"],
|
|
76
79
|
'Search.nplDesc': 'Smart search',
|
package/lib/locale/locale.d.ts
CHANGED
|
@@ -72,6 +72,9 @@ declare class LocaleCache {
|
|
|
72
72
|
'CityPicker.tabsInternation': string;
|
|
73
73
|
'CityPicker.title': string;
|
|
74
74
|
'ColorPicker.followFunctionalColor': string;
|
|
75
|
+
'ColorPicker.noColor': string;
|
|
76
|
+
'ColorPicker.recentColor': string;
|
|
77
|
+
'ColorPicker.recommendColor': string;
|
|
75
78
|
'Search.placeholder': string;
|
|
76
79
|
'Search.desc': string[];
|
|
77
80
|
'Search.nplDesc': string;
|
package/lib/locale/zh-CN.d.ts
CHANGED
|
@@ -44,6 +44,9 @@ declare const locale: {
|
|
|
44
44
|
'CityPicker.tabsInternation': string;
|
|
45
45
|
'CityPicker.title': string;
|
|
46
46
|
'ColorPicker.followFunctionalColor': string;
|
|
47
|
+
'ColorPicker.noColor': string;
|
|
48
|
+
'ColorPicker.recentColor': string;
|
|
49
|
+
'ColorPicker.recommendColor': string;
|
|
47
50
|
'Search.placeholder': string;
|
|
48
51
|
'Search.desc': string[];
|
|
49
52
|
'Search.nplDesc': string;
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -55,6 +55,9 @@ var locale = (0, _extends2.default)((0, _extends2.default)({
|
|
|
55
55
|
'CityPicker.tabsInternation': '国际/中国港澳台',
|
|
56
56
|
'CityPicker.title': '城市',
|
|
57
57
|
'ColorPicker.followFunctionalColor': '跟随功能色',
|
|
58
|
+
'ColorPicker.noColor': '无颜色填充',
|
|
59
|
+
'ColorPicker.recentColor': '最近使用颜色',
|
|
60
|
+
'ColorPicker.recommendColor': '推荐色',
|
|
58
61
|
'Search.placeholder': '请输入需要搜索的内容',
|
|
59
62
|
'Search.desc': ['空格代表"或",回车代表"且"'],
|
|
60
63
|
'Search.nplDesc': '智能搜索',
|
package/lib/modal/modal.js
CHANGED
|
@@ -135,7 +135,7 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
135
135
|
modalContainer = document.body;
|
|
136
136
|
}
|
|
137
137
|
var _useState3 = (0, _react.useState)(modalContainer && !overroll ? {
|
|
138
|
-
x: -(width / 2),
|
|
138
|
+
x: direction === 'rtl' ? width / 2 : -(width / 2),
|
|
139
139
|
y: -(height / 2)
|
|
140
140
|
} : {
|
|
141
141
|
x: 0,
|
|
@@ -278,10 +278,6 @@
|
|
|
278
278
|
padding-right: 0;
|
|
279
279
|
padding-left: calc(var(--kd-c-progress-line-text-font-size, 16px) * 2 + 8px);
|
|
280
280
|
}
|
|
281
|
-
.kd-progress-rtl .kd-progress-inner {
|
|
282
|
-
-webkit-transform: rotateY(180deg);
|
|
283
|
-
transform: rotateY(180deg);
|
|
284
|
-
}
|
|
285
281
|
.kd-progress-rtl .kd-progress-text {
|
|
286
282
|
margin-right: var(--kd-c-progress-line-text-spacing-margin-left, 8px);
|
|
287
283
|
margin-left: 0;
|
|
@@ -215,9 +215,9 @@
|
|
|
215
215
|
padding-left: calc(@progress-line-text-font-size * 2 + 8px);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
.@{progress-prefix-cls}-inner {
|
|
219
|
-
|
|
220
|
-
}
|
|
218
|
+
// .@{progress-prefix-cls}-inner {
|
|
219
|
+
// // transform: rotateY(180deg);
|
|
220
|
+
// }
|
|
221
221
|
.@{progress-prefix-cls}-text {
|
|
222
222
|
margin-right: @progress-line-text-margin-left;
|
|
223
223
|
margin-left: 0;
|
package/lib/select/select.js
CHANGED
|
@@ -920,7 +920,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
920
920
|
};
|
|
921
921
|
var popperProps = (0, _extends2.default)((0, _extends2.default)({}, selectProps), {
|
|
922
922
|
prefixCls: (0, _concat.default)(_context5 = (0, _concat.default)(_context6 = "".concat(selectPrefixCls, "-dropdown-panel")).call(_context6, isMultiple ? " ".concat(selectPrefixCls, "-multiple-dropdown-panel") : '', " ")).call(_context5, rtlCls),
|
|
923
|
-
placement:
|
|
923
|
+
placement: 'bottomLeft',
|
|
924
924
|
popperStyle: catchStyle(),
|
|
925
925
|
defaultVisible: optionShow,
|
|
926
926
|
visible: optionShow,
|
package/lib/transfer/list.js
CHANGED
|
@@ -49,8 +49,7 @@ var ITransferList = function ITransferList(props, ref) {
|
|
|
49
49
|
pagination = props.pagination,
|
|
50
50
|
footer = props.footer,
|
|
51
51
|
showRemove = props.showRemove,
|
|
52
|
-
placeholder = props.placeholder
|
|
53
|
-
rtl = props.rtl;
|
|
52
|
+
placeholder = props.placeholder;
|
|
54
53
|
var _useState = (0, _react.useState)(''),
|
|
55
54
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
56
55
|
filterValue = _useState2[0],
|
|
@@ -147,11 +146,11 @@ var ITransferList = function ITransferList(props, ref) {
|
|
|
147
146
|
}, search, bodyNode);
|
|
148
147
|
};
|
|
149
148
|
var getSelectAllLabel = function getSelectAllLabel(selectedCount, totalCount) {
|
|
150
|
-
var _context2
|
|
149
|
+
var _context2;
|
|
151
150
|
if (showRemove) {
|
|
152
151
|
return _react.default.createElement(_react.default.Fragment, null, "".concat(totalCount));
|
|
153
152
|
}
|
|
154
|
-
return
|
|
153
|
+
return _react.default.createElement(_react.default.Fragment, null, (0, _concat.default)(_context2 = "(".concat(totalCount, "/")).call(_context2, selectedCount, ")"));
|
|
155
154
|
};
|
|
156
155
|
var getCheckStatus = function getCheckStatus(filteredItems) {
|
|
157
156
|
if (checkedKeys.length === 0) {
|
|
@@ -174,10 +173,10 @@ var ITransferList = function ITransferList(props, ref) {
|
|
|
174
173
|
checked: checkedAll,
|
|
175
174
|
indeterminate: checkStatus === 'part',
|
|
176
175
|
onChange: function onChange() {
|
|
177
|
-
var
|
|
178
|
-
onItemSelectAll((0, _map.default)(
|
|
176
|
+
var _context3;
|
|
177
|
+
onItemSelectAll((0, _map.default)(_context3 = (0, _filter.default)(filteredItems).call(filteredItems, function (item) {
|
|
179
178
|
return !item.disabled;
|
|
180
|
-
})).call(
|
|
179
|
+
})).call(_context3, function (_ref) {
|
|
181
180
|
var key = _ref.key;
|
|
182
181
|
return key;
|
|
183
182
|
}), !checkedAll);
|