acud 0.0.72 → 0.0.75
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/acud.css +1958 -1950
- package/dist/acud.css.map +1 -1
- package/dist/acud.js +168 -132
- package/dist/acud.js.map +1 -1
- package/dist/acud.min.css +1 -1
- package/dist/acud.min.css.map +1 -1
- package/dist/acud.min.js +8 -10
- package/dist/acud.min.js.map +1 -1
- package/es/card/Card.js +4 -2
- package/es/cascader/index.js +3 -2
- package/es/cascader/style/css.js +5 -1
- package/es/cascader/style/index.d.ts +4 -0
- package/es/cascader/style/index.js +5 -1
- package/es/modal/style/css.js +3 -1
- package/es/modal/style/index.d.ts +1 -0
- package/es/modal/style/index.js +3 -1
- package/es/modal/style/index.less +8 -8
- package/es/modal/style/mixin.less +12 -3
- package/es/progress/CircleProgress.js +3 -2
- package/es/progress/LineProgress.js +3 -2
- package/es/progress/index.js +3 -1
- package/es/progress/interface.d.ts +1 -0
- package/es/select/src/OptionList.d.ts +5 -4
- package/es/select/src/OptionList.js +12 -4
- package/es/select/src/generate.d.ts +1 -0
- package/es/select/src/generate.js +3 -1
- package/es/select/style/css.js +2 -1
- package/es/select/style/index.css +6 -0
- package/es/select/style/index.d.ts +1 -0
- package/es/select/style/index.js +2 -1
- package/es/select/style/index.less +6 -0
- package/es/tree/tree.js +6 -2
- package/es/upload/style/index.css +4 -2
- package/es/upload/style/index.less +7 -5
- package/lib/card/Card.js +4 -2
- package/lib/cascader/index.js +4 -2
- package/lib/cascader/style/css.js +9 -1
- package/lib/cascader/style/index.d.ts +4 -0
- package/lib/cascader/style/index.js +9 -1
- package/lib/modal/style/css.js +3 -1
- package/lib/modal/style/index.d.ts +1 -0
- package/lib/modal/style/index.js +3 -1
- package/lib/modal/style/index.less +8 -8
- package/lib/modal/style/mixin.less +12 -3
- package/lib/progress/CircleProgress.js +3 -2
- package/lib/progress/LineProgress.js +3 -2
- package/lib/progress/index.js +3 -1
- package/lib/progress/interface.d.ts +1 -0
- package/lib/select/src/OptionList.d.ts +5 -4
- package/lib/select/src/OptionList.js +12 -4
- package/lib/select/src/generate.d.ts +1 -0
- package/lib/select/src/generate.js +3 -1
- package/lib/select/style/css.js +3 -1
- package/lib/select/style/index.css +6 -0
- package/lib/select/style/index.d.ts +1 -0
- package/lib/select/style/index.js +3 -1
- package/lib/select/style/index.less +6 -0
- package/lib/tree/tree.js +6 -2
- package/lib/upload/style/index.css +4 -2
- package/lib/upload/style/index.less +7 -5
- package/package.json +1 -1
package/es/card/Card.js
CHANGED
|
@@ -78,7 +78,9 @@ var Card = function Card(_a) {
|
|
|
78
78
|
hoverable = _a.hoverable,
|
|
79
79
|
_a$tabProps = _a.tabProps,
|
|
80
80
|
tabProps = _a$tabProps === void 0 ? {} : _a$tabProps,
|
|
81
|
-
|
|
81
|
+
_a$className = _a.className,
|
|
82
|
+
className = _a$className === void 0 ? '' : _a$className,
|
|
83
|
+
restProps = __rest(_a, ["prefixCls", "simple", "description", "disabled", "footerExtra", "footerStyle", "children", "loading", "headStyle", "bodyStyle", "style", "bordered", "type", "title", "extra", "cover", "actions", "actionsExtra", "multiMedia", "multiMediaPosition", "tabList", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "className"]);
|
|
82
84
|
|
|
83
85
|
var _React$useContext = React.useContext(ConfigContext),
|
|
84
86
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -226,7 +228,7 @@ var Card = function Card(_a) {
|
|
|
226
228
|
}, multiMedia), /*#__PURE__*/React.createElement("div", {
|
|
227
229
|
className: "".concat(cardPrefixCls, "-con-wrap ").concat(multiMedia ? "".concat(multiMediaPosition === 'left' ? 'right' : 'left') : '')
|
|
228
230
|
}, head, coverDom, body, footer, actionRender));
|
|
229
|
-
var classString = classNames(cardPrefixCls, (_classNames3 = {}, _defineProperty(_classNames3, "".concat(cardPrefixCls, "-loading"), loading), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-bordered"), bordered), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-hoverable"), hoverable), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-contain-grid"), isContainGrid()), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-contain-tabs"), tabList && tabList.length), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-type-").concat(type), !!type), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-rtl"), direction === 'rtl'), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-simple"), simple), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-selected"), isSelected), _classNames3));
|
|
231
|
+
var classString = classNames(cardPrefixCls, (_classNames3 = {}, _defineProperty(_classNames3, "".concat(cardPrefixCls, "-loading"), loading), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-bordered"), bordered), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-hoverable"), hoverable), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-contain-grid"), isContainGrid()), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-contain-tabs"), tabList && tabList.length), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-type-").concat(type), !!type), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-rtl"), direction === 'rtl'), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-simple"), simple), _defineProperty(_classNames3, "".concat(cardPrefixCls, "-selected"), isSelected), _defineProperty(_classNames3, className, !!className), _classNames3));
|
|
230
232
|
return /*#__PURE__*/React.createElement("div", {
|
|
231
233
|
className: classString,
|
|
232
234
|
disabled: simple && disabled,
|
package/es/cascader/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
import get from 'lodash/get';
|
|
24
|
+
import map from 'lodash/map';
|
|
24
25
|
import first from 'lodash/first';
|
|
25
26
|
import isEqual from 'lodash/isEqual';
|
|
26
27
|
import React, { useImperativeHandle, forwardRef, useRef, useCallback, useMemo, useState, useEffect, useLayoutEffect, Fragment } from 'react';
|
|
@@ -400,7 +401,7 @@ var Cascader = function Cascader(props, ref) {
|
|
|
400
401
|
var names = getFilledFieldNames(props);
|
|
401
402
|
|
|
402
403
|
if (isMulti) {
|
|
403
|
-
var _selectedOptions =
|
|
404
|
+
var _selectedOptions = map(value, function (valueItem) {
|
|
404
405
|
return arrayTreeFilter(options, function (o, level) {
|
|
405
406
|
return o[names.value] === valueItem[level];
|
|
406
407
|
}, {
|
|
@@ -414,7 +415,7 @@ var Cascader = function Cascader(props, ref) {
|
|
|
414
415
|
});
|
|
415
416
|
}) : value;
|
|
416
417
|
|
|
417
|
-
return
|
|
418
|
+
return map(_label, function (labelItem) {
|
|
418
419
|
return displayRender(labelItem, _selectedOptions);
|
|
419
420
|
});
|
|
420
421
|
}
|
package/es/cascader/style/css.js
CHANGED
|
@@ -2,4 +2,8 @@ import '../../style/index.css';
|
|
|
2
2
|
import './index.css'; // style dependencies
|
|
3
3
|
|
|
4
4
|
import '../../empty/style/css';
|
|
5
|
-
import '../../input/style/css';
|
|
5
|
+
import '../../input/style/css';
|
|
6
|
+
import '../../tag/style/css';
|
|
7
|
+
import '../../tooltip/style/css';
|
|
8
|
+
import '../../clear/style/css';
|
|
9
|
+
import '../../checkbox/style/css';
|
|
@@ -2,4 +2,8 @@ import '../../style/index.less';
|
|
|
2
2
|
import './index.less'; // style dependencies
|
|
3
3
|
|
|
4
4
|
import '../../empty/style';
|
|
5
|
-
import '../../input/style';
|
|
5
|
+
import '../../input/style';
|
|
6
|
+
import '../../tag/style';
|
|
7
|
+
import '../../tooltip/style';
|
|
8
|
+
import '../../clear/style';
|
|
9
|
+
import '../../checkbox/style';
|
package/es/modal/style/css.js
CHANGED
package/es/modal/style/index.js
CHANGED
|
@@ -19,35 +19,35 @@
|
|
|
19
19
|
max-width: calc(100vw - 32px);
|
|
20
20
|
|
|
21
21
|
&-sm {
|
|
22
|
-
.modal-size-config(sm
|
|
22
|
+
.modal-size-config(sm);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&-sm > &-content {
|
|
26
|
-
.modal-size-config(sm
|
|
26
|
+
.modal-size-config-content(sm);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&-md {
|
|
30
|
-
.modal-size-config(md
|
|
30
|
+
.modal-size-config(md);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&-md > &-content {
|
|
34
|
-
.modal-size-config(md
|
|
34
|
+
.modal-size-config-content(md);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&-lg {
|
|
38
|
-
.modal-size-config(lg
|
|
38
|
+
.modal-size-config(lg);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
&-lg > &-content {
|
|
42
|
-
.modal-size-config(lg
|
|
42
|
+
.modal-size-config-content(lg);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&-xl {
|
|
46
|
-
.modal-size-config(xl
|
|
46
|
+
.modal-size-config(xl);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&-xl > &-content {
|
|
50
|
-
.modal-size-config(xl
|
|
50
|
+
.modal-size-config-content(xl);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// 弹框内容
|
|
@@ -37,11 +37,20 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.modal-size
|
|
41
|
-
@width: ~'modal-width-@{type}';
|
|
40
|
+
.modal-size(@type) {
|
|
42
41
|
@min-height: ~'modal-height-@{type}';
|
|
43
42
|
@max-height: ~'modal-max-height-@{type}';
|
|
44
|
-
width: if(@content, 100%, @@width);
|
|
45
43
|
min-height: @@min-height;
|
|
46
44
|
max-height: @@max-height;
|
|
47
45
|
}
|
|
46
|
+
|
|
47
|
+
.modal-size-config-content(@type) {
|
|
48
|
+
width: 100%;
|
|
49
|
+
.modal-size(@type);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.modal-size-config(@type) {
|
|
53
|
+
@width: ~'modal-width-@{type}';
|
|
54
|
+
width: @@width;
|
|
55
|
+
.modal-size(@type);
|
|
56
|
+
}
|
|
@@ -18,6 +18,7 @@ var CircleProgress = function CircleProgress(_ref) {
|
|
|
18
18
|
status = _ref.status,
|
|
19
19
|
size = _ref.size,
|
|
20
20
|
strokeColor = _ref.strokeColor,
|
|
21
|
+
iconStrokeColor = _ref.iconStrokeColor,
|
|
21
22
|
_ref$infoType = _ref.infoType,
|
|
22
23
|
infoType = _ref$infoType === void 0 ? 'text' : _ref$infoType,
|
|
23
24
|
trailColor = _ref.trailColor,
|
|
@@ -82,13 +83,13 @@ var CircleProgress = function CircleProgress(_ref) {
|
|
|
82
83
|
ProgressLabel = /*#__PURE__*/React.createElement(OutlinedCheck, {
|
|
83
84
|
className: labelClassNames,
|
|
84
85
|
width: iconWidth,
|
|
85
|
-
fill:
|
|
86
|
+
fill: iconStrokeColor
|
|
86
87
|
});
|
|
87
88
|
} else if (status === 'error') {
|
|
88
89
|
ProgressLabel = /*#__PURE__*/React.createElement(OutlinedClose, {
|
|
89
90
|
className: labelClassNames,
|
|
90
91
|
width: iconWidth,
|
|
91
|
-
fill:
|
|
92
|
+
fill: iconStrokeColor
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -19,6 +19,7 @@ var LineProgress = function LineProgress(_ref) {
|
|
|
19
19
|
status = _ref.status,
|
|
20
20
|
size = _ref.size,
|
|
21
21
|
strokeColor = _ref.strokeColor,
|
|
22
|
+
iconStrokeColor = _ref.iconStrokeColor,
|
|
22
23
|
_ref$infoType = _ref.infoType,
|
|
23
24
|
infoType = _ref$infoType === void 0 ? 'text' : _ref$infoType,
|
|
24
25
|
trailColor = _ref.trailColor,
|
|
@@ -70,13 +71,13 @@ var LineProgress = function LineProgress(_ref) {
|
|
|
70
71
|
if (status === 'success') {
|
|
71
72
|
ProgressLabel = /*#__PURE__*/React.createElement(MultiToneSuccess, {
|
|
72
73
|
className: labelClassNames,
|
|
73
|
-
color:
|
|
74
|
+
color: iconStrokeColor,
|
|
74
75
|
width: "16px"
|
|
75
76
|
});
|
|
76
77
|
} else if (status === 'error') {
|
|
77
78
|
ProgressLabel = /*#__PURE__*/React.createElement(MultiToneError, {
|
|
78
79
|
className: labelClassNames,
|
|
79
|
-
color:
|
|
80
|
+
color: iconStrokeColor,
|
|
80
81
|
width: "16px"
|
|
81
82
|
});
|
|
82
83
|
}
|
package/es/progress/index.js
CHANGED
|
@@ -54,7 +54,8 @@ var Progress = function Progress(_a) {
|
|
|
54
54
|
|
|
55
55
|
var status = customizeStatus in statusColorMap ? customizeStatus : 'active'; // strokeColor取值异常时,将使用status对应的颜色
|
|
56
56
|
|
|
57
|
-
var strokeColor = isHexColor(customizeStrokeColor) ? customizeStrokeColor :
|
|
57
|
+
var strokeColor = isHexColor(customizeStrokeColor) ? customizeStrokeColor : '';
|
|
58
|
+
var iconStrokeColor = strokeColor || statusColorMap[status]; // 解构进度100时的样式
|
|
58
59
|
|
|
59
60
|
var successStrokeColor = successStyle.strokeColor,
|
|
60
61
|
successTextColor = successStyle.textColor,
|
|
@@ -75,6 +76,7 @@ var Progress = function Progress(_a) {
|
|
|
75
76
|
size: size,
|
|
76
77
|
status: status,
|
|
77
78
|
strokeColor: strokeColor,
|
|
79
|
+
iconStrokeColor: iconStrokeColor,
|
|
78
80
|
textColor: textColor,
|
|
79
81
|
textSize: textSize,
|
|
80
82
|
labelText: labelText,
|
|
@@ -15,10 +15,11 @@ export interface OptionListProps<OptionsType extends object[]> {
|
|
|
15
15
|
notFoundContent?: React.ReactNode;
|
|
16
16
|
mode?: string;
|
|
17
17
|
menuItemSelectedIcon?: RenderNode;
|
|
18
|
-
childrenAsData
|
|
19
|
-
searchValue
|
|
20
|
-
virtual
|
|
21
|
-
|
|
18
|
+
childrenAsData?: boolean;
|
|
19
|
+
searchValue?: string;
|
|
20
|
+
virtual?: boolean;
|
|
21
|
+
keepExpand?: boolean;
|
|
22
|
+
defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
|
|
22
23
|
renderEmpty?: (componentName?: string, des?: string | undefined) => React.ReactNode;
|
|
23
24
|
onSelect: (value: RawValueType, option: {
|
|
24
25
|
selected: boolean;
|
|
@@ -61,6 +61,8 @@ var OptionList = function OptionList(_ref, ref) {
|
|
|
61
61
|
mode = _ref.mode,
|
|
62
62
|
open = _ref.open,
|
|
63
63
|
virtual = _ref.virtual,
|
|
64
|
+
_ref$keepExpand = _ref.keepExpand,
|
|
65
|
+
keepExpand = _ref$keepExpand === void 0 ? false : _ref$keepExpand,
|
|
64
66
|
_ref$defaultExpandGro = _ref.defaultExpandGroupKey,
|
|
65
67
|
defaultExpandGroupKey = _ref$defaultExpandGro === void 0 ? false : _ref$defaultExpandGro,
|
|
66
68
|
renderEmpty = _ref.renderEmpty,
|
|
@@ -399,6 +401,8 @@ var OptionList = function OptionList(_ref, ref) {
|
|
|
399
401
|
e.stopPropagation();
|
|
400
402
|
};
|
|
401
403
|
|
|
404
|
+
var isKeepExpand = !multiple && keepExpand;
|
|
405
|
+
|
|
402
406
|
var renderOption = function renderOption(data, values, groupOption, label, itemIndex, groupKey) {
|
|
403
407
|
var _classNames;
|
|
404
408
|
|
|
@@ -416,7 +420,7 @@ var OptionList = function OptionList(_ref, ref) {
|
|
|
416
420
|
|
|
417
421
|
var selected = values.has(value);
|
|
418
422
|
var optionPrefixCls = "".concat(itemPrefixCls, "-option");
|
|
419
|
-
var optionClassName = classNames(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), _defineProperty(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames));
|
|
423
|
+
var optionClassName = classNames(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), _defineProperty(_classNames, "".concat(optionPrefixCls, "-grouped-keep-expand"), isKeepExpand), _defineProperty(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames));
|
|
420
424
|
var mergedLabel = childrenAsData ? children : label; // const iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected;
|
|
421
425
|
|
|
422
426
|
var content = mergedLabel || value;
|
|
@@ -444,7 +448,7 @@ var OptionList = function OptionList(_ref, ref) {
|
|
|
444
448
|
}
|
|
445
449
|
},
|
|
446
450
|
style: _extends({
|
|
447
|
-
display: groupOption && !expandGroupKey.includes(groupKey) ? 'none' : ''
|
|
451
|
+
display: groupOption && !expandGroupKey.includes(groupKey) && !isKeepExpand ? 'none' : ''
|
|
448
452
|
}, style)
|
|
449
453
|
}), multiple && /*#__PURE__*/React.createElement(Checkbox, {
|
|
450
454
|
checked: selected,
|
|
@@ -501,8 +505,12 @@ var OptionList = function OptionList(_ref, ref) {
|
|
|
501
505
|
|
|
502
506
|
if (group) {
|
|
503
507
|
return /*#__PURE__*/React.createElement("div", {
|
|
504
|
-
className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group")),
|
|
508
|
+
className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group"), _defineProperty({}, "".concat(itemPrefixCls, "-group-keep-expand"), isKeepExpand)),
|
|
505
509
|
onClick: function onClick() {
|
|
510
|
+
if (isKeepExpand) {
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
|
|
506
514
|
var gIndex = expandGroupKey.indexOf(key);
|
|
507
515
|
|
|
508
516
|
var newGroupKey = _toConsumableArray(expandGroupKey);
|
|
@@ -510,7 +518,7 @@ var OptionList = function OptionList(_ref, ref) {
|
|
|
510
518
|
gIndex !== -1 ? newGroupKey.splice(gIndex, 1) : newGroupKey.push(key);
|
|
511
519
|
setExpandGroupKey(newGroupKey);
|
|
512
520
|
}
|
|
513
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
521
|
+
}, !isKeepExpand && /*#__PURE__*/React.createElement("span", {
|
|
514
522
|
className: "".concat(itemPrefixCls, "-group-arrow")
|
|
515
523
|
}, expandGroupKey.includes(key) ? /*#__PURE__*/React.createElement(OutlinedDown, null) : /*#__PURE__*/React.createElement(OutlinedRight, null)), multiple && /*#__PURE__*/React.createElement(Checkbox, {
|
|
516
524
|
className: "".concat(itemPrefixCls, "-group-checkbox"),
|
|
@@ -81,6 +81,7 @@ export interface SelectProps<OptionsType extends object[], ValueType> extends Re
|
|
|
81
81
|
showAction?: ('focus' | 'click')[];
|
|
82
82
|
tabIndex?: number;
|
|
83
83
|
renderEmpty?: (componentName?: string, des?: string | undefined) => React.ReactNode;
|
|
84
|
+
keepExpand?: boolean;
|
|
84
85
|
defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
|
|
85
86
|
onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
86
87
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
@@ -119,6 +119,7 @@ export default function generateSelector(config) {
|
|
|
119
119
|
tokenSeparators = props.tokenSeparators,
|
|
120
120
|
tagRender = props.tagRender,
|
|
121
121
|
renderEmpty = props.renderEmpty,
|
|
122
|
+
keepExpand = props.keepExpand,
|
|
122
123
|
defaultExpandGroupKey = props.defaultExpandGroupKey,
|
|
123
124
|
onPopupScroll = props.onPopupScroll,
|
|
124
125
|
onDropdownVisibleChange = props.onDropdownVisibleChange,
|
|
@@ -133,7 +134,7 @@ export default function generateSelector(config) {
|
|
|
133
134
|
onClear = props.onClear,
|
|
134
135
|
_props$internalProps = props.internalProps,
|
|
135
136
|
internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,
|
|
136
|
-
restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "renderEmpty", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
|
|
137
|
+
restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "renderEmpty", "keepExpand", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
|
|
137
138
|
|
|
138
139
|
var useInternalProps = internalProps.mark === INTERNAL_PROPS_MARK;
|
|
139
140
|
var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;
|
|
@@ -782,6 +783,7 @@ export default function generateSelector(config) {
|
|
|
782
783
|
defaultActiveFirstOption: mergedDefaultActiveFirstOption,
|
|
783
784
|
notFoundContent: notFoundContent,
|
|
784
785
|
renderEmpty: renderEmpty,
|
|
786
|
+
keepExpand: keepExpand,
|
|
785
787
|
defaultExpandGroupKey: defaultExpandGroupKey,
|
|
786
788
|
onScroll: onPopupScroll,
|
|
787
789
|
searchValue: mergedSearchValue,
|
package/es/select/style/css.js
CHANGED
|
@@ -674,6 +674,9 @@
|
|
|
674
674
|
.acud-select-item-group-checkbox {
|
|
675
675
|
margin-right: 8px;
|
|
676
676
|
}
|
|
677
|
+
.acud-select-item-group.acud-select-item-group-keep-expand {
|
|
678
|
+
color: #B8BABF;
|
|
679
|
+
}
|
|
677
680
|
.acud-select-item-option {
|
|
678
681
|
display: flex;
|
|
679
682
|
}
|
|
@@ -704,6 +707,9 @@
|
|
|
704
707
|
.acud-select-item-option-grouped {
|
|
705
708
|
padding-left: 48px;
|
|
706
709
|
}
|
|
710
|
+
.acud-select-item-option-grouped.acud-select-item-option-grouped-keep-expand {
|
|
711
|
+
padding-left: 24px;
|
|
712
|
+
}
|
|
707
713
|
.acud-select-lg {
|
|
708
714
|
font-size: 14px;
|
|
709
715
|
}
|
package/es/select/style/index.js
CHANGED
|
@@ -287,6 +287,9 @@
|
|
|
287
287
|
&-checkbox {
|
|
288
288
|
margin-right: 2 * @P;
|
|
289
289
|
}
|
|
290
|
+
&&-keep-expand {
|
|
291
|
+
color: @G6;
|
|
292
|
+
}
|
|
290
293
|
}
|
|
291
294
|
|
|
292
295
|
// =========== Option ===========
|
|
@@ -328,6 +331,9 @@
|
|
|
328
331
|
|
|
329
332
|
&-grouped {
|
|
330
333
|
padding-left: 12 * @P;
|
|
334
|
+
&&-keep-expand {
|
|
335
|
+
padding-left: 6 * @P;
|
|
336
|
+
}
|
|
331
337
|
}
|
|
332
338
|
// .basic-config-select-item(@select-dropdown-default-tp, @select-dropdown-default-p);
|
|
333
339
|
}
|
package/es/tree/tree.js
CHANGED
|
@@ -352,6 +352,11 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
352
352
|
|
|
353
353
|
if (treeDataOrigin) {
|
|
354
354
|
newProps.treeData = formatedTreeData;
|
|
355
|
+
} // expandedKeys和defaultExpandAll冲突需动态赋值
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
if (expandedKeys.length) {
|
|
359
|
+
newProps.expandedKeys = expandedKeys;
|
|
355
360
|
}
|
|
356
361
|
|
|
357
362
|
useEffect(function () {
|
|
@@ -362,7 +367,7 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
362
367
|
return /*#__PURE__*/React.createElement(React.Fragment, null, searchable && /*#__PURE__*/React.createElement(Input, {
|
|
363
368
|
className: "".concat(prefixCls, "-search-input"),
|
|
364
369
|
onChange: onSearchInputChange
|
|
365
|
-
}), !expandedKeys.length && searchText ? "\u672A\u627E\u5230\u4E0E".concat(searchText, "\u76F8\u5173\u7684\u7ED3\u679C") : /*#__PURE__*/React.createElement(RcTree, _extends({
|
|
370
|
+
}), !expandedKeys.length && searchText ? "\u672A\u627E\u5230\u4E0E".concat(searchText, "\u76F8\u5173\u7684\u7ED3\u679C") : (!treeDataOrigin || !!formatedTreeData.length) && /*#__PURE__*/React.createElement(RcTree, _extends({
|
|
366
371
|
ref: treeRef
|
|
367
372
|
}, newProps, {
|
|
368
373
|
className: classes,
|
|
@@ -373,7 +378,6 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
373
378
|
checkable: checkable ? /*#__PURE__*/React.createElement("span", {
|
|
374
379
|
className: "".concat(prefixCls, "-checkbox-inner")
|
|
375
380
|
}) : checkable,
|
|
376
|
-
expandedKeys: expandedKeys,
|
|
377
381
|
autoExpandParent: autoExpandParent,
|
|
378
382
|
switcherIcon: function switcherIcon(nodeProps) {
|
|
379
383
|
return renderSwitcherIcon(prefixCls, nodeProps);
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
border-color: #144BCC;
|
|
131
131
|
}
|
|
132
132
|
.acud-upload.acud-upload-drag.acud-upload-disabled {
|
|
133
|
-
background: #
|
|
133
|
+
background: #F7F7F9;
|
|
134
134
|
cursor: not-allowed;
|
|
135
135
|
}
|
|
136
136
|
.acud-upload.acud-upload-drag .acud-upload-btn {
|
|
@@ -546,9 +546,11 @@
|
|
|
546
546
|
.acud-upload-list-picture-card .acud-upload-list-item-progress {
|
|
547
547
|
position: absolute;
|
|
548
548
|
top: 44px;
|
|
549
|
+
left: 50%;
|
|
549
550
|
padding-left: 8px;
|
|
550
551
|
padding-right: 8px;
|
|
551
|
-
width:
|
|
552
|
+
width: 96px;
|
|
553
|
+
transform: translateX(-50%);
|
|
552
554
|
}
|
|
553
555
|
.acud-upload-list-text-container,
|
|
554
556
|
.acud-upload-list-picture-container {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
&.@{upload-prefix-cls}-disabled {
|
|
107
|
-
background: @
|
|
107
|
+
background: @G10;
|
|
108
108
|
cursor: not-allowed;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -540,10 +540,12 @@
|
|
|
540
540
|
|
|
541
541
|
.@{upload-item}-progress {
|
|
542
542
|
position: absolute;
|
|
543
|
-
top:
|
|
544
|
-
|
|
545
|
-
padding-
|
|
546
|
-
|
|
543
|
+
top: 11 * @P;
|
|
544
|
+
left: 50%;
|
|
545
|
+
padding-left: 2 * @P;
|
|
546
|
+
padding-right: 2 * @P;
|
|
547
|
+
width: 24 * @P;
|
|
548
|
+
transform: translateX(-50%);
|
|
547
549
|
}
|
|
548
550
|
}
|
|
549
551
|
|
package/lib/card/Card.js
CHANGED
|
@@ -105,7 +105,9 @@ var Card = function Card(_a) {
|
|
|
105
105
|
hoverable = _a.hoverable,
|
|
106
106
|
_a$tabProps = _a.tabProps,
|
|
107
107
|
tabProps = _a$tabProps === void 0 ? {} : _a$tabProps,
|
|
108
|
-
|
|
108
|
+
_a$className = _a.className,
|
|
109
|
+
className = _a$className === void 0 ? '' : _a$className,
|
|
110
|
+
restProps = __rest(_a, ["prefixCls", "simple", "description", "disabled", "footerExtra", "footerStyle", "children", "loading", "headStyle", "bodyStyle", "style", "bordered", "type", "title", "extra", "cover", "actions", "actionsExtra", "multiMedia", "multiMediaPosition", "tabList", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "className"]);
|
|
109
111
|
|
|
110
112
|
var _React$useContext = _react["default"].useContext(_configProvider.ConfigContext),
|
|
111
113
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -258,7 +260,7 @@ var Card = function Card(_a) {
|
|
|
258
260
|
className: "".concat(cardPrefixCls, "-con-wrap ").concat(multiMedia ? "".concat(multiMediaPosition === 'left' ? 'right' : 'left') : '')
|
|
259
261
|
}, head, coverDom, body, footer, actionRender));
|
|
260
262
|
|
|
261
|
-
var classString = (0, _classnames["default"])(cardPrefixCls, (_classNames3 = {}, (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-loading"), loading), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-bordered"), bordered), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-hoverable"), hoverable), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-contain-grid"), isContainGrid()), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-contain-tabs"), tabList && tabList.length), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-type-").concat(type), !!type), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-rtl"), direction === 'rtl'), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-simple"), simple), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-selected"), isSelected), _classNames3));
|
|
263
|
+
var classString = (0, _classnames["default"])(cardPrefixCls, (_classNames3 = {}, (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-loading"), loading), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-bordered"), bordered), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-hoverable"), hoverable), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-contain-grid"), isContainGrid()), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-contain-tabs"), tabList && tabList.length), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-type-").concat(type), !!type), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-rtl"), direction === 'rtl'), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-simple"), simple), (0, _defineProperty2["default"])(_classNames3, "".concat(cardPrefixCls, "-selected"), isSelected), (0, _defineProperty2["default"])(_classNames3, className, !!className), _classNames3));
|
|
262
264
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
263
265
|
className: classString,
|
|
264
266
|
disabled: simple && disabled,
|
package/lib/cascader/index.js
CHANGED
|
@@ -19,6 +19,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
19
19
|
|
|
20
20
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
21
21
|
|
|
22
|
+
var _map = _interopRequireDefault(require("lodash/map"));
|
|
23
|
+
|
|
22
24
|
var _first = _interopRequireDefault(require("lodash/first"));
|
|
23
25
|
|
|
24
26
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
@@ -444,7 +446,7 @@ var Cascader = function Cascader(props, ref) {
|
|
|
444
446
|
var names = getFilledFieldNames(props);
|
|
445
447
|
|
|
446
448
|
if (isMulti) {
|
|
447
|
-
var _selectedOptions = value
|
|
449
|
+
var _selectedOptions = (0, _map["default"])(value, function (valueItem) {
|
|
448
450
|
return (0, _arrayTreeFilter["default"])(options, function (o, level) {
|
|
449
451
|
return o[names.value] === valueItem[level];
|
|
450
452
|
}, {
|
|
@@ -458,7 +460,7 @@ var Cascader = function Cascader(props, ref) {
|
|
|
458
460
|
});
|
|
459
461
|
}) : value;
|
|
460
462
|
|
|
461
|
-
return _label
|
|
463
|
+
return (0, _map["default"])(_label, function (labelItem) {
|
|
462
464
|
return displayRender(labelItem, _selectedOptions);
|
|
463
465
|
});
|
|
464
466
|
}
|
|
@@ -6,4 +6,12 @@ require("./index.css");
|
|
|
6
6
|
|
|
7
7
|
require("../../empty/style/css");
|
|
8
8
|
|
|
9
|
-
require("../../input/style/css");
|
|
9
|
+
require("../../input/style/css");
|
|
10
|
+
|
|
11
|
+
require("../../tag/style/css");
|
|
12
|
+
|
|
13
|
+
require("../../tooltip/style/css");
|
|
14
|
+
|
|
15
|
+
require("../../clear/style/css");
|
|
16
|
+
|
|
17
|
+
require("../../checkbox/style/css");
|
|
@@ -6,4 +6,12 @@ require("./index.less");
|
|
|
6
6
|
|
|
7
7
|
require("../../empty/style");
|
|
8
8
|
|
|
9
|
-
require("../../input/style");
|
|
9
|
+
require("../../input/style");
|
|
10
|
+
|
|
11
|
+
require("../../tag/style");
|
|
12
|
+
|
|
13
|
+
require("../../tooltip/style");
|
|
14
|
+
|
|
15
|
+
require("../../clear/style");
|
|
16
|
+
|
|
17
|
+
require("../../checkbox/style");
|
package/lib/modal/style/css.js
CHANGED