acud 0.0.65 → 0.0.68
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 +299 -147
- package/dist/acud.css.map +1 -1
- package/dist/acud.js +1512 -1078
- 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 +11 -5
- package/dist/acud.min.js.map +1 -1
- package/es/breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/breadcrumb/BreadcrumbItem.js +16 -4
- package/es/button/button.d.ts +1 -0
- package/es/button/button.js +1 -0
- package/es/cascader/index.js +20 -5
- package/es/cascader/style/index.css +2 -57
- package/es/cascader/style/index.less +2 -17
- package/es/clear/index.d.ts +12 -0
- package/es/clear/index.js +41 -0
- package/es/clear/style/css.js +2 -0
- package/es/clear/style/index.css +63 -0
- package/es/clear/style/index.d.ts +2 -0
- package/es/clear/style/index.js +2 -0
- package/es/clear/style/index.less +18 -0
- package/es/date-picker/generatePicker/generateRangePicker.js +2 -2
- package/es/date-picker/generatePicker/generateSinglePicker.js +2 -2
- package/es/date-picker/src/PickerPanel.js +4 -1
- package/es/date-picker/src/utils/uiUtil.js +4 -4
- package/es/date-picker/style/index.css +106 -53
- package/es/date-picker/style/panel.less +83 -18
- package/es/dialog-box/style/index.css +4 -4
- package/es/dropdown/dropdown-button.js +7 -1
- package/es/dropdown/rc-dropdown/Dropdown.js +1 -0
- package/es/dropdown/style/index.css +2 -1
- package/es/dropdown/style/index.less +2 -1
- package/es/form/style/horizontal.less +1 -0
- package/es/form/style/index.css +3 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/modal/DialogBox.d.ts +1 -1
- package/es/modal/Modal.d.ts +5 -2
- package/es/modal/Modal.js +6 -4
- package/es/modal/style/index.css +41 -11
- package/es/modal/style/index.less +35 -7
- package/es/modal/style/mixin.less +4 -4
- package/es/progress/CircleProgress.js +2 -2
- package/es/progress/LineProgress.js +4 -2
- package/es/progress/style/common.less +5 -3
- package/es/progress/style/index.css +2 -1
- package/es/radio/index.d.ts +3 -0
- package/es/style/themes/dark/components/modal.less +14 -9
- package/es/style/themes/default/components/cascader.less +0 -4
- package/es/style/themes/default/components/clear.less +2 -0
- package/es/style/themes/default/components/datePicker.less +1 -0
- package/es/style/themes/default/components/index.less +1 -0
- package/es/style/themes/default/components/modal.less +13 -13
- package/es/switch/index.d.ts +2 -3
- package/es/switch/index.js +11 -3
- package/es/switch/interface.d.ts +4 -0
- package/es/switch/style/index.css +31 -0
- package/es/switch/style/index.less +33 -1
- package/es/tabs/src/TabNavList/index.js +2 -2
- package/es/tabs/style/index.css +0 -1
- package/es/tabs/style/index.less +0 -1
- package/es/time-picker/style/index.css +1 -0
- package/es/time-picker/style/index.less +1 -0
- package/es/tooltip/index.js +1 -1
- package/es/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
- package/es/transfer/{dataSource.js → DataSource.js} +37 -6
- package/{lib/transfer/sourceList.d.ts → es/transfer/SourceList.d.ts} +2 -2
- package/es/transfer/{sourceList.js → SourceList.js} +0 -0
- package/es/transfer/{target.d.ts → Target.d.ts} +1 -1
- package/es/transfer/{target.js → Target.js} +60 -4
- package/{lib/transfer/targetList.d.ts → es/transfer/TargetList.d.ts} +2 -2
- package/es/transfer/{targetList.js → TargetList.js} +0 -0
- package/es/transfer/index.d.ts +3 -0
- package/es/transfer/index.js +16 -7
- package/es/transfer/style/css.js +3 -1
- package/es/transfer/style/index.css +25 -5
- package/es/transfer/style/index.d.ts +1 -0
- package/es/transfer/style/index.js +3 -1
- package/es/transfer/style/index.less +30 -5
- package/es/upload/UploadList/ListItem.js +7 -2
- package/es/upload/UploadList/index.js +4 -7
- package/es/upload/style/index.css +17 -13
- package/es/upload/style/index.less +25 -20
- package/es/upload/utils.js +1 -1
- package/lib/breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/lib/breadcrumb/BreadcrumbItem.js +21 -8
- package/lib/button/button.d.ts +1 -0
- package/lib/button/button.js +1 -0
- package/lib/cascader/index.js +21 -6
- package/lib/cascader/style/index.css +2 -57
- package/lib/cascader/style/index.less +2 -17
- package/lib/clear/index.d.ts +12 -0
- package/lib/clear/index.js +55 -0
- package/lib/clear/style/css.js +5 -0
- package/lib/clear/style/index.css +63 -0
- package/lib/clear/style/index.d.ts +2 -0
- package/lib/clear/style/index.js +5 -0
- package/lib/clear/style/index.less +18 -0
- package/lib/date-picker/generatePicker/generateRangePicker.js +3 -3
- package/lib/date-picker/generatePicker/generateSinglePicker.js +3 -3
- package/lib/date-picker/src/PickerPanel.js +4 -1
- package/lib/date-picker/src/utils/uiUtil.js +4 -4
- package/lib/date-picker/style/index.css +106 -53
- package/lib/date-picker/style/panel.less +83 -18
- package/lib/dialog-box/style/index.css +4 -4
- package/lib/dropdown/dropdown-button.js +7 -1
- package/lib/dropdown/rc-dropdown/Dropdown.js +1 -0
- package/lib/dropdown/style/index.css +2 -1
- package/lib/dropdown/style/index.less +2 -1
- package/lib/form/style/horizontal.less +1 -0
- package/lib/form/style/index.css +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -0
- package/lib/modal/DialogBox.d.ts +1 -1
- package/lib/modal/Modal.d.ts +5 -2
- package/lib/modal/Modal.js +6 -4
- package/lib/modal/style/index.css +41 -11
- package/lib/modal/style/index.less +35 -7
- package/lib/modal/style/mixin.less +4 -4
- package/lib/progress/CircleProgress.js +2 -2
- package/lib/progress/LineProgress.js +4 -2
- package/lib/progress/style/common.less +5 -3
- package/lib/progress/style/index.css +2 -1
- package/lib/radio/index.d.ts +3 -0
- package/lib/style/components.less +1 -0
- package/lib/style/themes/dark/components/modal.less +14 -9
- package/lib/style/themes/default/components/cascader.less +0 -4
- package/lib/style/themes/default/components/clear.less +2 -0
- package/lib/style/themes/default/components/datePicker.less +1 -0
- package/lib/style/themes/default/components/index.less +1 -0
- package/lib/style/themes/default/components/modal.less +13 -13
- package/lib/switch/index.d.ts +2 -3
- package/lib/switch/index.js +12 -3
- package/lib/switch/interface.d.ts +4 -0
- package/lib/switch/style/index.css +31 -0
- package/lib/switch/style/index.less +33 -1
- package/lib/tabs/src/TabNavList/index.js +2 -2
- package/lib/tabs/style/index.css +0 -1
- package/lib/tabs/style/index.less +0 -1
- package/lib/time-picker/style/index.css +1 -0
- package/lib/time-picker/style/index.less +1 -0
- package/lib/tooltip/index.js +1 -1
- package/lib/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
- package/lib/transfer/{dataSource.js → DataSource.js} +38 -6
- package/{es/transfer/sourceList.d.ts → lib/transfer/SourceList.d.ts} +2 -2
- package/lib/transfer/{sourceList.js → SourceList.js} +0 -0
- package/lib/transfer/{target.d.ts → Target.d.ts} +1 -1
- package/lib/transfer/{target.js → Target.js} +63 -5
- package/{es/transfer/targetList.d.ts → lib/transfer/TargetList.d.ts} +2 -2
- package/lib/transfer/{targetList.js → TargetList.js} +0 -0
- package/lib/transfer/index.d.ts +3 -0
- package/lib/transfer/index.js +18 -10
- package/lib/transfer/style/css.js +3 -1
- package/lib/transfer/style/index.css +25 -5
- package/lib/transfer/style/index.d.ts +1 -0
- package/lib/transfer/style/index.js +3 -1
- package/lib/transfer/style/index.less +30 -5
- package/lib/upload/UploadList/ListItem.js +7 -2
- package/lib/upload/UploadList/index.js +4 -7
- package/lib/upload/style/index.css +17 -13
- package/lib/upload/style/index.less +25 -20
- package/lib/upload/utils.js +1 -1
- package/package.json +2 -2
package/lib/modal/Modal.js
CHANGED
|
@@ -87,15 +87,17 @@ var Modal = function Modal(props) {
|
|
|
87
87
|
var renderFooter = function renderFooter() {
|
|
88
88
|
var okText = props.okText,
|
|
89
89
|
cancelText = props.cancelText,
|
|
90
|
-
confirmLoading = props.confirmLoading
|
|
91
|
-
|
|
90
|
+
confirmLoading = props.confirmLoading,
|
|
91
|
+
okButtonProps = props.okButtonProps,
|
|
92
|
+
cancelButtonProps = props.cancelButtonProps;
|
|
93
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_button["default"], (0, _extends2["default"])({
|
|
92
94
|
onClick: handleCancel,
|
|
93
95
|
type: "default"
|
|
94
|
-
}, cancelText || '取消'), /*#__PURE__*/React.createElement(_button["default"], {
|
|
96
|
+
}, cancelButtonProps), cancelText || '取消'), /*#__PURE__*/React.createElement(_button["default"], (0, _extends2["default"])({
|
|
95
97
|
onClick: handleOk,
|
|
96
98
|
loading: confirmLoading,
|
|
97
99
|
type: "primary"
|
|
98
|
-
}, okText || '确定'));
|
|
100
|
+
}, okButtonProps), okText || '确定'));
|
|
99
101
|
};
|
|
100
102
|
|
|
101
103
|
var visible = props.visible,
|
|
@@ -57,23 +57,43 @@
|
|
|
57
57
|
}
|
|
58
58
|
.acud-modal-sm {
|
|
59
59
|
width: 520px;
|
|
60
|
-
height: 240px;
|
|
61
|
-
max-height:
|
|
60
|
+
min-height: 240px;
|
|
61
|
+
max-height: 560px;
|
|
62
|
+
}
|
|
63
|
+
.acud-modal-sm > .acud-modal-content {
|
|
64
|
+
width: 100%;
|
|
65
|
+
min-height: 240px;
|
|
66
|
+
max-height: 560px;
|
|
62
67
|
}
|
|
63
68
|
.acud-modal-md {
|
|
64
69
|
width: 800px;
|
|
65
|
-
height: 400px;
|
|
66
|
-
max-height:
|
|
70
|
+
min-height: 400px;
|
|
71
|
+
max-height: 560px;
|
|
72
|
+
}
|
|
73
|
+
.acud-modal-md > .acud-modal-content {
|
|
74
|
+
width: 100%;
|
|
75
|
+
min-height: 400px;
|
|
76
|
+
max-height: 560px;
|
|
67
77
|
}
|
|
68
78
|
.acud-modal-lg {
|
|
69
79
|
width: 1120px;
|
|
70
|
-
height: 480px;
|
|
71
|
-
max-height:
|
|
80
|
+
min-height: 480px;
|
|
81
|
+
max-height: 560px;
|
|
82
|
+
}
|
|
83
|
+
.acud-modal-lg > .acud-modal-content {
|
|
84
|
+
width: 100%;
|
|
85
|
+
min-height: 480px;
|
|
86
|
+
max-height: 560px;
|
|
72
87
|
}
|
|
73
88
|
.acud-modal-xl {
|
|
74
89
|
width: 1200px;
|
|
75
|
-
height: 480px;
|
|
76
|
-
max-height:
|
|
90
|
+
min-height: 480px;
|
|
91
|
+
max-height: 560px;
|
|
92
|
+
}
|
|
93
|
+
.acud-modal-xl > .acud-modal-content {
|
|
94
|
+
width: 100%;
|
|
95
|
+
min-height: 480px;
|
|
96
|
+
max-height: 560px;
|
|
77
97
|
}
|
|
78
98
|
.acud-modal-content {
|
|
79
99
|
position: relative;
|
|
@@ -126,16 +146,18 @@
|
|
|
126
146
|
.acud-modal-title {
|
|
127
147
|
font-size: 14px;
|
|
128
148
|
line-height: 22px;
|
|
149
|
+
padding-right: 12px;
|
|
129
150
|
word-wrap: break-word;
|
|
130
151
|
}
|
|
131
152
|
.acud-modal-body {
|
|
132
|
-
|
|
153
|
+
margin: 16px 24px 24px;
|
|
133
154
|
font-size: 12px;
|
|
134
155
|
font-weight: 400;
|
|
135
156
|
line-height: 20px;
|
|
136
157
|
word-wrap: break-word;
|
|
137
158
|
color: #151B26;
|
|
138
159
|
flex: 1;
|
|
160
|
+
overflow-y: auto;
|
|
139
161
|
}
|
|
140
162
|
.acud-modal-footer {
|
|
141
163
|
padding: 0 24px 24px;
|
|
@@ -165,12 +187,20 @@
|
|
|
165
187
|
align-items: center;
|
|
166
188
|
padding-top: 2px;
|
|
167
189
|
}
|
|
168
|
-
.acud-modal-dialogbox
|
|
169
|
-
|
|
190
|
+
.acud-modal-dialogbox-title {
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
padding-right: 12px;
|
|
170
193
|
}
|
|
171
194
|
.acud-modal-dialogbox-content {
|
|
195
|
+
width: 100%;
|
|
172
196
|
padding-left: 32px;
|
|
173
197
|
}
|
|
198
|
+
.acud-modal-dialogbox .acud-modal-title .acudicon {
|
|
199
|
+
font-size: 20px;
|
|
200
|
+
}
|
|
201
|
+
.acud-modal-dialogbox > .acud-modal-content {
|
|
202
|
+
min-height: 184px;
|
|
203
|
+
}
|
|
174
204
|
.acud-modal-dialogbox-warning .acud-modal-dialogbox-icon {
|
|
175
205
|
color: #FF9326;
|
|
176
206
|
}
|
|
@@ -19,19 +19,35 @@
|
|
|
19
19
|
max-width: calc(100vw - 32px);
|
|
20
20
|
|
|
21
21
|
&-sm {
|
|
22
|
-
.modal-size-config(sm);
|
|
22
|
+
.modal-size-config(sm, false);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-sm > &-content {
|
|
26
|
+
.modal-size-config(sm, true);
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
&-md {
|
|
26
|
-
.modal-size-config(md);
|
|
30
|
+
.modal-size-config(md, false);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-md > &-content {
|
|
34
|
+
.modal-size-config(md, true);
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
&-lg {
|
|
30
|
-
.modal-size-config(lg);
|
|
38
|
+
.modal-size-config(lg, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-lg > &-content {
|
|
42
|
+
.modal-size-config(lg, true);
|
|
31
43
|
}
|
|
32
44
|
|
|
33
45
|
&-xl {
|
|
34
|
-
.modal-size-config(xl);
|
|
46
|
+
.modal-size-config(xl, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-xl > &-content {
|
|
50
|
+
.modal-size-config(xl, true);
|
|
35
51
|
}
|
|
36
52
|
|
|
37
53
|
// 弹框内容
|
|
@@ -94,18 +110,20 @@
|
|
|
94
110
|
&-title {
|
|
95
111
|
font-size: @modal-heading-font-size;
|
|
96
112
|
line-height: @modal-heading-height;
|
|
113
|
+
padding-right: @P * 3;
|
|
97
114
|
word-wrap: break-word;
|
|
98
115
|
}
|
|
99
116
|
|
|
100
117
|
// 内容body部分
|
|
101
118
|
&-body {
|
|
102
|
-
|
|
119
|
+
margin: @modal-body-margin;
|
|
103
120
|
font-size: @modal-body-font-size;
|
|
104
121
|
font-weight: @modal-body-font-weight;
|
|
105
122
|
line-height: @modal-body-line-height;
|
|
106
123
|
word-wrap: break-word;
|
|
107
124
|
color: @modal-body-font-color;
|
|
108
125
|
flex: 1;
|
|
126
|
+
overflow-y: auto;
|
|
109
127
|
}
|
|
110
128
|
|
|
111
129
|
// 内容footer部分
|
|
@@ -143,14 +161,24 @@
|
|
|
143
161
|
padding-top: 2px;
|
|
144
162
|
}
|
|
145
163
|
|
|
164
|
+
&-title {
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
padding-right: @P * 3;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&-content {
|
|
170
|
+
width: 100%;
|
|
171
|
+
padding-left: @P * 3 + @T6;
|
|
172
|
+
}
|
|
173
|
+
|
|
146
174
|
.@{modal-prefix-cls}-title {
|
|
147
175
|
.acudicon {
|
|
148
176
|
font-size: @T6;
|
|
149
177
|
}
|
|
150
178
|
}
|
|
151
179
|
|
|
152
|
-
|
|
153
|
-
|
|
180
|
+
& > .@{modal-prefix-cls}-content {
|
|
181
|
+
min-height: @P * 46;
|
|
154
182
|
}
|
|
155
183
|
}
|
|
156
184
|
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.modal-size-config(@type) {
|
|
40
|
+
.modal-size-config(@type, @content) {
|
|
41
41
|
@width: ~'modal-width-@{type}';
|
|
42
|
-
@height: ~'modal-height-@{type}';
|
|
42
|
+
@min-height: ~'modal-height-@{type}';
|
|
43
43
|
@max-height: ~'modal-max-height-@{type}';
|
|
44
|
-
width: @@width;
|
|
45
|
-
height: @@height;
|
|
44
|
+
width: if(@content, 100%, @@width);
|
|
45
|
+
min-height: @@min-height;
|
|
46
46
|
max-height: @@max-height;
|
|
47
47
|
}
|
|
@@ -89,7 +89,7 @@ var CircleProgress = function CircleProgress(_ref) {
|
|
|
89
89
|
style: labelStyles
|
|
90
90
|
}, labelText);
|
|
91
91
|
|
|
92
|
-
var iconWidth = _common.sizeRatioMap[size] *
|
|
92
|
+
var iconWidth = _common.sizeRatioMap[size] * 12; // 若信息类型为图标,在成功和异常时,显示图标
|
|
93
93
|
|
|
94
94
|
if (infoType === 'icon') {
|
|
95
95
|
if (status === 'success') {
|
|
@@ -126,7 +126,7 @@ var CircleProgress = function CircleProgress(_ref) {
|
|
|
126
126
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
127
127
|
d: circlePath,
|
|
128
128
|
stroke: strokeColor || 'currentColor',
|
|
129
|
-
strokeWidth: strokeWidth,
|
|
129
|
+
strokeWidth: percent ? strokeWidth : 0,
|
|
130
130
|
strokeLinecap: strokeLinecap,
|
|
131
131
|
fill: "none",
|
|
132
132
|
style: progressStyles
|
|
@@ -84,12 +84,14 @@ var LineProgress = function LineProgress(_ref) {
|
|
|
84
84
|
if (status === 'success') {
|
|
85
85
|
ProgressLabel = /*#__PURE__*/_react["default"].createElement(_acudIcon.MultiToneSuccess, {
|
|
86
86
|
className: labelClassNames,
|
|
87
|
-
color: strokeColor
|
|
87
|
+
color: strokeColor,
|
|
88
|
+
width: "16px"
|
|
88
89
|
});
|
|
89
90
|
} else if (status === 'error') {
|
|
90
91
|
ProgressLabel = /*#__PURE__*/_react["default"].createElement(_acudIcon.MultiToneError, {
|
|
91
92
|
className: labelClassNames,
|
|
92
|
-
color: strokeColor
|
|
93
|
+
color: strokeColor,
|
|
94
|
+
width: "16px"
|
|
93
95
|
});
|
|
94
96
|
}
|
|
95
97
|
}
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
.@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label{
|
|
33
|
+
&.@{progress-prefix-cls}-label-outer, &.@{progress-prefix-cls}-label-inner{
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
.acud-progress-success .acud-progress-label-icon {
|
|
24
24
|
font-size: 0;
|
|
25
25
|
}
|
|
26
|
-
.acud-progress-label-hidden .acud-progress-label
|
|
26
|
+
.acud-progress-label-hidden .acud-progress-label.acud-progress-label-outer,
|
|
27
|
+
.acud-progress-label-hidden .acud-progress-label.acud-progress-label-inner {
|
|
27
28
|
display: none;
|
|
28
29
|
}
|
|
29
30
|
.acud-progress-line {
|
package/lib/radio/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
@import "../carousel/style/index.less";
|
|
10
10
|
@import "../cascader/style/index.less";
|
|
11
11
|
@import "../checkbox/style/index.less";
|
|
12
|
+
@import "../clear/style/index.less";
|
|
12
13
|
@import "../collapse/style/index.less";
|
|
13
14
|
@import "../config-provider/style/index.less";
|
|
14
15
|
@import "../date-picker/style/index.less";
|
|
@@ -10,15 +10,20 @@
|
|
|
10
10
|
@modal-mask-color: fade(@G5, 50%);
|
|
11
11
|
|
|
12
12
|
// 默认宽高设置
|
|
13
|
-
@modal-width-sm: 100
|
|
14
|
-
@modal-width-md: 150
|
|
15
|
-
@modal-width-lg: 200
|
|
16
|
-
@modal-width-xl: 300
|
|
13
|
+
@modal-width-sm: 100 * @P;
|
|
14
|
+
@modal-width-md: 150 * @P;
|
|
15
|
+
@modal-width-lg: 200 * @P;
|
|
16
|
+
@modal-width-xl: 300 * @P;
|
|
17
17
|
|
|
18
|
-
@modal-max-height-sm:
|
|
19
|
-
@modal-max-height-md:
|
|
20
|
-
@modal-max-height-lg:
|
|
21
|
-
@modal-max-height-xl:
|
|
18
|
+
@modal-max-height-sm: 140 * @P;
|
|
19
|
+
@modal-max-height-md: 140 * @P;
|
|
20
|
+
@modal-max-height-lg: 140 * @P;
|
|
21
|
+
@modal-max-height-xl: 140 * @P;
|
|
22
|
+
|
|
23
|
+
@modal-height-sm: 60 * @P;
|
|
24
|
+
@modal-height-md: 100 * @P;
|
|
25
|
+
@modal-height-lg: 120 * @P;
|
|
26
|
+
@modal-height-xl: 120 * @P;
|
|
22
27
|
|
|
23
28
|
// Content
|
|
24
29
|
@modal-content-bg-color: @G11;
|
|
@@ -36,7 +41,7 @@
|
|
|
36
41
|
@modal-close-font-size: @T4;
|
|
37
42
|
|
|
38
43
|
// Body
|
|
39
|
-
@modal-body-
|
|
44
|
+
@modal-body-margin: 4*@P 6*@P 6*@P;
|
|
40
45
|
@modal-body-bg-color: @G11;
|
|
41
46
|
@modal-body-font-size: @T2;
|
|
42
47
|
@modal-body-line-height: 5*@P;
|
|
@@ -34,10 +34,6 @@
|
|
|
34
34
|
@cascader-picker-font-size-md: @T2;
|
|
35
35
|
@cascader-picker-font-size-lg: @T3;
|
|
36
36
|
|
|
37
|
-
// clear
|
|
38
|
-
@cascader-picker-clear-tp: tp9;
|
|
39
|
-
@cascader-picker-clear-p: p9;
|
|
40
|
-
|
|
41
37
|
// 级联menus cascader-menus
|
|
42
38
|
@cascader-menus-z-index: 1050;
|
|
43
39
|
@cascader-menus-font-size: @T2;
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
@modal-mask-color: fade(@G5, 50%);
|
|
11
11
|
|
|
12
12
|
// 默认宽高设置
|
|
13
|
-
@modal-width-sm: 130
|
|
14
|
-
@modal-width-md: 200
|
|
15
|
-
@modal-width-lg: 280
|
|
16
|
-
@modal-width-xl: 300
|
|
13
|
+
@modal-width-sm: 130 * @P;
|
|
14
|
+
@modal-width-md: 200 * @P;
|
|
15
|
+
@modal-width-lg: 280 * @P;
|
|
16
|
+
@modal-width-xl: 300 * @P;
|
|
17
17
|
|
|
18
|
-
@modal-max-height-sm:
|
|
19
|
-
@modal-max-height-md:
|
|
20
|
-
@modal-max-height-lg:
|
|
21
|
-
@modal-max-height-xl:
|
|
18
|
+
@modal-max-height-sm: 140 * @P;
|
|
19
|
+
@modal-max-height-md: 140 * @P;
|
|
20
|
+
@modal-max-height-lg: 140 * @P;
|
|
21
|
+
@modal-max-height-xl: 140 * @P;
|
|
22
22
|
|
|
23
|
-
@modal-height-sm: 60
|
|
24
|
-
@modal-height-md: 100
|
|
25
|
-
@modal-height-lg: 120
|
|
26
|
-
@modal-height-xl: 120
|
|
23
|
+
@modal-height-sm: 60 * @P;
|
|
24
|
+
@modal-height-md: 100 * @P;
|
|
25
|
+
@modal-height-lg: 120 * @P;
|
|
26
|
+
@modal-height-xl: 120 * @P;
|
|
27
27
|
|
|
28
28
|
// Content
|
|
29
29
|
@modal-content-bg-color: @G11;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
@modal-close-font-size: @T4;
|
|
43
43
|
|
|
44
44
|
// Body
|
|
45
|
-
@modal-body-
|
|
45
|
+
@modal-body-margin: 4*@P 6*@P 6*@P;
|
|
46
46
|
@modal-body-bg-color: @G11;
|
|
47
47
|
@modal-body-font-color: @G2;
|
|
48
48
|
@modal-body-font-size: @T2;
|
package/lib/switch/index.d.ts
CHANGED
package/lib/switch/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
|
|
18
|
+
var _acudIcon = require("acud-icon");
|
|
19
|
+
|
|
18
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
21
|
|
|
20
22
|
var _useMergedState3 = _interopRequireDefault(require("../_util/hooks/useMergedState"));
|
|
@@ -41,12 +43,13 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
|
|
|
41
43
|
checked = _a.checked,
|
|
42
44
|
defaultChecked = _a.defaultChecked,
|
|
43
45
|
disabled = _a.disabled,
|
|
44
|
-
|
|
46
|
+
loading = _a.loading,
|
|
47
|
+
customLoadingIcon = _a.loadingIcon,
|
|
45
48
|
checkedChildren = _a.checkedChildren,
|
|
46
49
|
unCheckedChildren = _a.unCheckedChildren,
|
|
47
50
|
onClick = _a.onClick,
|
|
48
51
|
onChange = _a.onChange,
|
|
49
|
-
restProps = __rest(_a, ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange"]);
|
|
52
|
+
restProps = __rest(_a, ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loading", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange"]);
|
|
50
53
|
|
|
51
54
|
var _useMergedState = (0, _useMergedState3["default"])(false, {
|
|
52
55
|
value: checked,
|
|
@@ -56,6 +59,11 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
|
|
|
56
59
|
innerChecked = _useMergedState2[0],
|
|
57
60
|
setInnerChecked = _useMergedState2[1];
|
|
58
61
|
|
|
62
|
+
var loadingIcon = loading && (customLoadingIcon || /*#__PURE__*/_react["default"].createElement(_acudIcon.OutlinedLoading, {
|
|
63
|
+
className: "".concat(prefixCls, "-loading-icon"),
|
|
64
|
+
animation: "spin"
|
|
65
|
+
}));
|
|
66
|
+
|
|
59
67
|
function triggerChange(newChecked, event) {
|
|
60
68
|
var mergedChecked = innerChecked;
|
|
61
69
|
|
|
@@ -73,7 +81,7 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
|
|
|
73
81
|
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
|
|
74
82
|
}
|
|
75
83
|
|
|
76
|
-
var switchClassName = (0, _classnames["default"])(prefixCls, className, (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
|
|
84
|
+
var switchClassName = (0, _classnames["default"])(prefixCls, className, (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-loading"), loading), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
|
|
77
85
|
return /*#__PURE__*/_react["default"].createElement("button", (0, _extends2["default"])({}, restProps, {
|
|
78
86
|
type: "button",
|
|
79
87
|
role: "switch",
|
|
@@ -88,5 +96,6 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_a, ref) {
|
|
|
88
96
|
});
|
|
89
97
|
|
|
90
98
|
Switch.displayName = 'Switch';
|
|
99
|
+
Switch.__ACUD_SWITCH = true;
|
|
91
100
|
var _default = Switch;
|
|
92
101
|
exports["default"] = _default;
|
|
@@ -5,6 +5,7 @@ export interface SwitchProps extends Omit<React.HTMLAttributes<HTMLButtonElement
|
|
|
5
5
|
className?: string;
|
|
6
6
|
prefixCls?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
8
9
|
checkedChildren?: React.ReactNode;
|
|
9
10
|
unCheckedChildren?: React.ReactNode;
|
|
10
11
|
onChange?: SwitchChangeEventHandler;
|
|
@@ -16,3 +17,6 @@ export interface SwitchProps extends Omit<React.HTMLAttributes<HTMLButtonElement
|
|
|
16
17
|
style?: React.CSSProperties;
|
|
17
18
|
title?: string;
|
|
18
19
|
}
|
|
20
|
+
export interface CompoundedComponent extends React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLElement>> {
|
|
21
|
+
__ACUD_SWITCH: boolean;
|
|
22
|
+
}
|
|
@@ -148,6 +148,34 @@
|
|
|
148
148
|
.acud-switch-checked[disabled]:after {
|
|
149
149
|
background-color: #FFFFFF;
|
|
150
150
|
}
|
|
151
|
+
.acud-switch-checked[disabled].acud-switch-loading .acud-switch-loading-icon {
|
|
152
|
+
color: #D4E5FF;
|
|
153
|
+
}
|
|
154
|
+
.acud-switch-checked.acud-switch-loading .acud-switch-loading-icon {
|
|
155
|
+
color: #2468F2;
|
|
156
|
+
left: initial;
|
|
157
|
+
right: 2px;
|
|
158
|
+
}
|
|
159
|
+
.acud-switch-loading {
|
|
160
|
+
cursor: no-drop;
|
|
161
|
+
}
|
|
162
|
+
.acud-switch-loading:after {
|
|
163
|
+
cursor: no-drop;
|
|
164
|
+
-webkit-animation-name: none;
|
|
165
|
+
animation-name: none;
|
|
166
|
+
}
|
|
167
|
+
.acud-switch-loading:hover:after {
|
|
168
|
+
width: 16px;
|
|
169
|
+
-webkit-animation-name: none;
|
|
170
|
+
animation-name: none;
|
|
171
|
+
}
|
|
172
|
+
.acud-switch-loading .acud-switch-loading-icon {
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 1px;
|
|
175
|
+
z-index: 99;
|
|
176
|
+
color: #D4D6D9;
|
|
177
|
+
left: 2px;
|
|
178
|
+
}
|
|
151
179
|
.acud-switch-disabled {
|
|
152
180
|
cursor: no-drop;
|
|
153
181
|
}
|
|
@@ -162,6 +190,9 @@
|
|
|
162
190
|
-webkit-animation-name: none;
|
|
163
191
|
animation-name: none;
|
|
164
192
|
}
|
|
193
|
+
.acud-switch-disabled .acud-switch-loading-icon {
|
|
194
|
+
color: #F2F2F4;
|
|
195
|
+
}
|
|
165
196
|
.acud-switch-label {
|
|
166
197
|
display: inline-block;
|
|
167
198
|
padding-left: 10px;
|
|
@@ -96,9 +96,38 @@
|
|
|
96
96
|
&:after {
|
|
97
97
|
background-color: @switch-handle-color;
|
|
98
98
|
}
|
|
99
|
+
&.@{switch-prefix-cls}-loading {
|
|
100
|
+
.@{switch-prefix-cls}-loading-icon {
|
|
101
|
+
color: @B2;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
&.@{switch-prefix-cls}-loading {
|
|
106
|
+
.@{switch-prefix-cls}-loading-icon {
|
|
107
|
+
color: @B6;
|
|
108
|
+
left: initial;
|
|
109
|
+
right: 0.5 * @P;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
&-loading {
|
|
114
|
+
cursor: no-drop;
|
|
115
|
+
&:after {
|
|
116
|
+
cursor: no-drop;
|
|
117
|
+
animation-name: none;
|
|
118
|
+
}
|
|
119
|
+
&:hover:after {
|
|
120
|
+
width: @switch-inner-width;
|
|
121
|
+
animation-name: none;
|
|
122
|
+
}
|
|
123
|
+
.@{switch-prefix-cls}-loading-icon {
|
|
124
|
+
position: absolute;
|
|
125
|
+
top: 1px;
|
|
126
|
+
z-index: 99;
|
|
127
|
+
color: @G7;
|
|
128
|
+
left: 0.5 * @P;
|
|
99
129
|
}
|
|
100
130
|
}
|
|
101
|
-
|
|
102
131
|
&-disabled {
|
|
103
132
|
cursor: no-drop;
|
|
104
133
|
&:after {
|
|
@@ -110,6 +139,9 @@
|
|
|
110
139
|
width: @switch-inner-width;
|
|
111
140
|
animation-name: none;
|
|
112
141
|
}
|
|
142
|
+
.@{switch-prefix-cls}-loading-icon {
|
|
143
|
+
color: @G9;
|
|
144
|
+
}
|
|
113
145
|
}
|
|
114
146
|
|
|
115
147
|
&-label {
|
|
@@ -396,9 +396,9 @@ function TabNavList(props, ref) {
|
|
|
396
396
|
|
|
397
397
|
if (btnNode) {
|
|
398
398
|
newSizes.set(key, {
|
|
399
|
-
width: btnNode.offsetWidth,
|
|
399
|
+
width: btnNode.offsetWidth - 32,
|
|
400
400
|
height: btnNode.offsetHeight,
|
|
401
|
-
left: btnNode.offsetLeft,
|
|
401
|
+
left: btnNode.offsetLeft + 16,
|
|
402
402
|
top: btnNode.offsetTop
|
|
403
403
|
});
|
|
404
404
|
}
|
package/lib/tabs/style/index.css
CHANGED
package/lib/tooltip/index.js
CHANGED
|
@@ -63,7 +63,7 @@ var PresetColorRegex = new RegExp("^(".concat(PresetColorTypes.join('|'), ")(-in
|
|
|
63
63
|
function getDisabledCompatibleChildren(element, prefixCls) {
|
|
64
64
|
var elementType = element.type;
|
|
65
65
|
|
|
66
|
-
if ((elementType.
|
|
66
|
+
if ((elementType.__ACUD_BUTTON === true || elementType.__ACUD_SWITCH === true || elementType.__ACUD_CHECKBOX === true || element.type === 'button') && element.props.disabled) {
|
|
67
67
|
// Pick some layout related style properties up to span
|
|
68
68
|
var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']),
|
|
69
69
|
picked = _splitObject.picked,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TransferItem, TransferProps } from '
|
|
2
|
+
import { TransferItem, TransferProps } from '.';
|
|
3
3
|
export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
|
|
4
4
|
tKeys: string[];
|
|
5
5
|
setTKeys: (t: string[]) => void;
|