@kdcloudjs/kdesign 1.2.0 → 1.2.1
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/CHANGELOG.md +24 -0
- package/dist/kdesign-complete.less +476 -464
- package/dist/kdesign.css +135 -209
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +234 -215
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.js +33 -11
- package/es/collapse/panel.d.ts +1 -0
- package/es/collapse/panel.js +17 -5
- package/es/collapse/style/index.css +32 -6
- package/es/collapse/style/index.less +24 -1
- package/es/collapse/style/token.less +12 -10
- package/es/drawer/drawer.d.ts +1 -0
- package/es/drawer/drawer.js +56 -21
- package/es/radio/radio.js +3 -1
- package/es/radio/style/index.css +46 -18
- package/es/radio/style/index.less +27 -1
- package/es/radio/style/token.less +4 -4
- package/es/select/option.js +1 -1
- package/es/select/style/index.css +14 -5
- package/es/select/style/index.less +374 -368
- package/es/select/style/token.less +2 -2
- package/es/steps/style/index.css +40 -32
- package/es/steps/style/index.less +23 -33
- package/es/steps/style/token.less +6 -9
- package/es/tag/style/index.css +2 -147
- package/es/tag/style/index.less +4 -24
- package/es/tag/style/mixin.less +0 -13
- package/es/tag/style/token.less +1 -1
- package/lib/_utils/usePopper.js +34 -11
- package/lib/collapse/panel.d.ts +1 -0
- package/lib/collapse/panel.js +17 -5
- package/lib/collapse/style/index.css +32 -6
- package/lib/collapse/style/index.less +24 -1
- package/lib/collapse/style/token.less +12 -10
- package/lib/drawer/drawer.d.ts +1 -0
- package/lib/drawer/drawer.js +61 -27
- package/lib/radio/radio.js +3 -1
- package/lib/radio/style/index.css +46 -18
- package/lib/radio/style/index.less +27 -1
- package/lib/radio/style/token.less +4 -4
- package/lib/select/option.js +1 -1
- package/lib/select/style/index.css +14 -5
- package/lib/select/style/index.less +374 -368
- package/lib/select/style/token.less +2 -2
- package/lib/steps/style/index.css +40 -32
- package/lib/steps/style/index.less +23 -33
- package/lib/steps/style/token.less +6 -9
- package/lib/tag/style/index.css +2 -147
- package/lib/tag/style/index.less +4 -24
- package/lib/tag/style/mixin.less +0 -13
- package/lib/tag/style/token.less +1 -1
- package/package.json +1 -1
|
@@ -113,9 +113,11 @@
|
|
|
113
113
|
list-style: none;
|
|
114
114
|
-webkit-font-feature-settings: 'tnum';
|
|
115
115
|
font-feature-settings: 'tnum';
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
text-overflow: ellipsis;
|
|
116
118
|
position: relative;
|
|
117
119
|
display: inline-block;
|
|
118
|
-
padding-left: var(--kd-c-radio-square-sizing-width-height,
|
|
120
|
+
padding-left: var(--kd-c-radio-square-sizing-width-height, 14px);
|
|
119
121
|
margin-right: var(--kd-c-radio-spacing-margin-right, 8px);
|
|
120
122
|
white-space: nowrap;
|
|
121
123
|
cursor: pointer;
|
|
@@ -127,8 +129,8 @@
|
|
|
127
129
|
position: absolute;
|
|
128
130
|
top: 50%;
|
|
129
131
|
left: 0;
|
|
130
|
-
height: var(--kd-c-radio-square-sizing-width-height,
|
|
131
|
-
width: var(--kd-c-radio-square-sizing-width-height,
|
|
132
|
+
height: var(--kd-c-radio-square-sizing-width-height, 14px);
|
|
133
|
+
width: var(--kd-c-radio-square-sizing-width-height, 14px);
|
|
132
134
|
content: '';
|
|
133
135
|
border-radius: 50%;
|
|
134
136
|
-webkit-box-sizing: border-box;
|
|
@@ -146,8 +148,8 @@
|
|
|
146
148
|
position: absolute;
|
|
147
149
|
top: 50%;
|
|
148
150
|
left: 2px;
|
|
149
|
-
width: calc(var(--kd-c-radio-square-sizing-width-height,
|
|
150
|
-
height: calc(var(--kd-c-radio-square-sizing-width-height,
|
|
151
|
+
width: calc(var(--kd-c-radio-square-sizing-width-height, 14px) - 4px);
|
|
152
|
+
height: calc(var(--kd-c-radio-square-sizing-width-height, 14px) - 4px);
|
|
151
153
|
content: '';
|
|
152
154
|
border-radius: 50%;
|
|
153
155
|
background-color: var(--kd-c-radio-color-theme, var(--kd-g-color-theme, #5582f3));
|
|
@@ -165,7 +167,10 @@
|
|
|
165
167
|
opacity: 0;
|
|
166
168
|
}
|
|
167
169
|
.kd-radio > span {
|
|
168
|
-
padding: 0 6px 0 var(--kd-c-radio-spacing-padding-left,
|
|
170
|
+
padding: 0 6px 0 var(--kd-c-radio-spacing-padding-left, 4px);
|
|
171
|
+
}
|
|
172
|
+
.kd-radio:hover {
|
|
173
|
+
color: var(--kd-c-radio-color-theme, var(--kd-g-color-theme, #5582f3));
|
|
169
174
|
}
|
|
170
175
|
.kd-radio:hover::before {
|
|
171
176
|
border-color: var(--kd-c-radio-color-theme, var(--kd-g-color-theme, #5582f3));
|
|
@@ -181,8 +186,8 @@
|
|
|
181
186
|
position: absolute;
|
|
182
187
|
top: 50%;
|
|
183
188
|
left: 2px;
|
|
184
|
-
width: calc(var(--kd-c-radio-square-sizing-width-height,
|
|
185
|
-
height: calc(var(--kd-c-radio-square-sizing-width-height,
|
|
189
|
+
width: calc(var(--kd-c-radio-square-sizing-width-height, 14px) - 4px);
|
|
190
|
+
height: calc(var(--kd-c-radio-square-sizing-width-height, 14px) - 4px);
|
|
186
191
|
content: '';
|
|
187
192
|
border-radius: 50%;
|
|
188
193
|
background-color: var(--kd-c-radio-color-theme, var(--kd-g-color-theme, #5582f3));
|
|
@@ -213,6 +218,13 @@
|
|
|
213
218
|
-webkit-animation: none;
|
|
214
219
|
animation: none;
|
|
215
220
|
}
|
|
221
|
+
.kd-radio-disabled.kd-radio-checked,
|
|
222
|
+
.kd-radio-disabled:hover.kd-radio-checked {
|
|
223
|
+
color: var(--kd-c-radio-color-font, var(--kd-g-color-text-primary, #212121));
|
|
224
|
+
}
|
|
225
|
+
.kd-radio-text {
|
|
226
|
+
line-height: 1.5;
|
|
227
|
+
}
|
|
216
228
|
.kd-radio-square {
|
|
217
229
|
-webkit-box-sizing: border-box;
|
|
218
230
|
box-sizing: border-box;
|
|
@@ -222,15 +234,17 @@
|
|
|
222
234
|
list-style: none;
|
|
223
235
|
-webkit-font-feature-settings: 'tnum';
|
|
224
236
|
font-feature-settings: 'tnum';
|
|
237
|
+
white-space: nowrap;
|
|
238
|
+
text-overflow: ellipsis;
|
|
225
239
|
position: relative;
|
|
226
240
|
display: inline-block;
|
|
227
241
|
height: var(--kd-c-radio-square-sizing-height, 32px);
|
|
228
|
-
padding-top: var(--kd-c-radio-square-spacing-padding-vertical,
|
|
229
|
-
padding-right: var(--kd-c-radio-square-spacing-padding-horizontal,
|
|
230
|
-
padding-bottom: var(--kd-c-radio-square-spacing-padding-vertical,
|
|
231
|
-
padding-left: var(--kd-c-radio-square-spacing-padding-horizontal,
|
|
242
|
+
padding-top: var(--kd-c-radio-square-spacing-padding-vertical, 6px);
|
|
243
|
+
padding-right: var(--kd-c-radio-square-spacing-padding-horizontal, 12px);
|
|
244
|
+
padding-bottom: var(--kd-c-radio-square-spacing-padding-vertical, 6px);
|
|
245
|
+
padding-left: var(--kd-c-radio-square-spacing-padding-horizontal, 12px);
|
|
232
246
|
margin-right: var(--kd-c-radio-spacing-margin-right, 8px);
|
|
233
|
-
line-height: calc(var(--kd-c-radio-square-sizing-height, 32px) - (var(--kd-c-radio-square-spacing-padding-vertical,
|
|
247
|
+
line-height: calc(var(--kd-c-radio-square-sizing-height, 32px) - (var(--kd-c-radio-square-spacing-padding-vertical, 6px) * 2) - (var(--kd-c-radio-radius-border-width, 1px) * 2));
|
|
234
248
|
vertical-align: middle;
|
|
235
249
|
color: var(--kd-c-radio-color-font, var(--kd-g-color-text-primary, #212121));
|
|
236
250
|
font-size: var(--kd-c-radio-font-size, var(--kd-g-font-size-small, 12px));
|
|
@@ -314,6 +328,13 @@
|
|
|
314
328
|
-webkit-animation: none;
|
|
315
329
|
animation: none;
|
|
316
330
|
}
|
|
331
|
+
.kd-radio-square-disabled.kd-radio-square-checked,
|
|
332
|
+
.kd-radio-square-disabled:hover.kd-radio-square-checked {
|
|
333
|
+
color: var(--kd-c-radio-color-font, var(--kd-g-color-text-primary, #212121));
|
|
334
|
+
}
|
|
335
|
+
.kd-radio-square-text {
|
|
336
|
+
line-height: 1.5;
|
|
337
|
+
}
|
|
317
338
|
.kd-radio-button {
|
|
318
339
|
-webkit-box-sizing: border-box;
|
|
319
340
|
box-sizing: border-box;
|
|
@@ -326,11 +347,11 @@
|
|
|
326
347
|
position: relative;
|
|
327
348
|
display: inline-block;
|
|
328
349
|
height: var(--kd-c-radio-square-sizing-height, 32px);
|
|
329
|
-
padding-top: var(--kd-c-radio-square-spacing-padding-vertical,
|
|
330
|
-
padding-right: var(--kd-c-radio-square-spacing-padding-horizontal,
|
|
331
|
-
padding-bottom: var(--kd-c-radio-square-spacing-padding-vertical,
|
|
332
|
-
padding-left: var(--kd-c-radio-square-spacing-padding-horizontal,
|
|
333
|
-
line-height: calc(var(--kd-c-radio-square-sizing-height, 32px) - (var(--kd-c-radio-square-spacing-padding-vertical,
|
|
350
|
+
padding-top: var(--kd-c-radio-square-spacing-padding-vertical, 6px);
|
|
351
|
+
padding-right: var(--kd-c-radio-square-spacing-padding-horizontal, 12px);
|
|
352
|
+
padding-bottom: var(--kd-c-radio-square-spacing-padding-vertical, 6px);
|
|
353
|
+
padding-left: var(--kd-c-radio-square-spacing-padding-horizontal, 12px);
|
|
354
|
+
line-height: calc(var(--kd-c-radio-square-sizing-height, 32px) - (var(--kd-c-radio-square-spacing-padding-vertical, 6px) * 2) - (var(--kd-c-radio-radius-border-width, 1px) * 2));
|
|
334
355
|
vertical-align: middle;
|
|
335
356
|
color: var(--kd-c-radio-color-font, var(--kd-g-color-text-primary, #212121));
|
|
336
357
|
font-size: var(--kd-c-radio-font-size, var(--kd-g-font-size-small, 12px));
|
|
@@ -411,3 +432,10 @@
|
|
|
411
432
|
border-color: var(--kd-c-radio-color-border, var(--kd-g-color-border-strong, #d9d9d9));
|
|
412
433
|
cursor: not-allowed;
|
|
413
434
|
}
|
|
435
|
+
.kd-radio-button-text {
|
|
436
|
+
white-space: nowrap;
|
|
437
|
+
overflow: hidden;
|
|
438
|
+
text-overflow: ellipsis;
|
|
439
|
+
display: block;
|
|
440
|
+
line-height: 1.5;
|
|
441
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@import '../../style/themes/index';
|
|
2
2
|
@import 'token.less';
|
|
3
|
+
@import '../../style/mixins/index.less';
|
|
3
4
|
@radio-prefix-cls: ~'@{kd-prefix}-radio';
|
|
4
5
|
@radio-square-prefix-cls: ~'@{radio-prefix-cls}-square';
|
|
5
6
|
@radio-button-prefix-cls: ~'@{radio-prefix-cls}-button';
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
// 默认类型(单选项)
|
|
10
11
|
.@{radio-prefix-cls} {
|
|
11
12
|
.reset-component();
|
|
13
|
+
.ellipsis();
|
|
12
14
|
|
|
13
15
|
// 默认状态
|
|
14
16
|
position: relative;
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
// 悬停状态
|
|
65
67
|
&:hover {
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
color: @radio-color-theme;
|
|
68
70
|
&::before {
|
|
69
71
|
border-color: @radio-color-theme;
|
|
70
72
|
}
|
|
@@ -113,6 +115,14 @@
|
|
|
113
115
|
background-color: @radio-color-disabled;
|
|
114
116
|
animation: none;
|
|
115
117
|
}
|
|
118
|
+
|
|
119
|
+
&.@{radio-prefix-cls}-checked {
|
|
120
|
+
color: @radio-font-color;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&-text {
|
|
125
|
+
line-height: 1.5;
|
|
116
126
|
}
|
|
117
127
|
}
|
|
118
128
|
|
|
@@ -120,6 +130,8 @@
|
|
|
120
130
|
.@{radio-square-prefix-cls} {
|
|
121
131
|
.reset-component();
|
|
122
132
|
|
|
133
|
+
.ellipsis();
|
|
134
|
+
|
|
123
135
|
// 默认状态
|
|
124
136
|
position: relative;
|
|
125
137
|
display: inline-block;
|
|
@@ -211,6 +223,14 @@
|
|
|
211
223
|
background-color: @radio-color-disabled;
|
|
212
224
|
animation: none;
|
|
213
225
|
}
|
|
226
|
+
|
|
227
|
+
&.@{radio-square-prefix-cls}-checked {
|
|
228
|
+
color: @radio-font-color;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&-text {
|
|
233
|
+
line-height: 1.5;
|
|
214
234
|
}
|
|
215
235
|
}
|
|
216
236
|
|
|
@@ -324,4 +344,10 @@
|
|
|
324
344
|
// background-color: @radio-color-background-disabled;
|
|
325
345
|
cursor: not-allowed;
|
|
326
346
|
}
|
|
347
|
+
|
|
348
|
+
&-text {
|
|
349
|
+
.ellipsis();
|
|
350
|
+
display: block;
|
|
351
|
+
line-height: 1.5;
|
|
352
|
+
}
|
|
327
353
|
}
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
@radio-border-width: var(~'@{radio-prefix}-radius-border-width',1px);
|
|
21
21
|
|
|
22
22
|
// sizing
|
|
23
|
-
@radio-circle-size:var(~'@{radio-prefix}-square-sizing-width-height',
|
|
23
|
+
@radio-circle-size:var(~'@{radio-prefix}-square-sizing-width-height',14px);//单选图标大小
|
|
24
24
|
@radio-square-height: var(~'@{radio-prefix}-square-sizing-height',32px);//单选框 高度
|
|
25
25
|
|
|
26
26
|
// spacing
|
|
27
27
|
@radio-margin-right: var(~'@{radio-prefix}-spacing-margin-right',8px);
|
|
28
|
-
@radio-square-padding-vertical: var(~'@{radio-prefix}-square-spacing-padding-vertical',
|
|
29
|
-
@radio-square-padding-horizontal: var(~'@{radio-prefix}-square-spacing-padding-horizontal',
|
|
30
|
-
@radio-padding-left: var(~'@{radio-prefix}-spacing-padding-left',
|
|
28
|
+
@radio-square-padding-vertical: var(~'@{radio-prefix}-square-spacing-padding-vertical',6px); //内间距 纵向
|
|
29
|
+
@radio-square-padding-horizontal: var(~'@{radio-prefix}-square-spacing-padding-horizontal',12px);//内间距 横向 /单选框 宽度
|
|
30
|
+
@radio-padding-left: var(~'@{radio-prefix}-spacing-padding-left',4px);//图标与文字间距
|
|
31
31
|
|
package/lib/select/option.js
CHANGED
|
@@ -83,7 +83,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
83
83
|
|
|
84
84
|
var titleText = (0, _typeof2.default)(children) !== 'object' ? children : null;
|
|
85
85
|
var checkStyle = {
|
|
86
|
-
height: '
|
|
86
|
+
height: '22px',
|
|
87
87
|
background: 'none'
|
|
88
88
|
};
|
|
89
89
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -330,6 +330,9 @@
|
|
|
330
330
|
.kd-select-bordered:hover:not(.kd-select-multiple-disabled):not(.kd-select-single-disabled) {
|
|
331
331
|
border: 1px solid var(--kd-c-select-color-border-hover, var(--kd-g-color-theme, #5582f3));
|
|
332
332
|
}
|
|
333
|
+
.kd-select-bordered .kd-select-suffix {
|
|
334
|
+
right: 10px;
|
|
335
|
+
}
|
|
333
336
|
.kd-select-wrapper {
|
|
334
337
|
-webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
335
338
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
@@ -399,6 +402,12 @@
|
|
|
399
402
|
min-width: 75px;
|
|
400
403
|
}
|
|
401
404
|
.kd-select-item-option-content {
|
|
405
|
+
display: -webkit-box;
|
|
406
|
+
display: -ms-flexbox;
|
|
407
|
+
display: flex;
|
|
408
|
+
-webkit-box-align: center;
|
|
409
|
+
-ms-flex-align: center;
|
|
410
|
+
align-items: center;
|
|
402
411
|
-webkit-box-flex: 1;
|
|
403
412
|
-ms-flex: auto;
|
|
404
413
|
flex: auto;
|
|
@@ -407,10 +416,10 @@
|
|
|
407
416
|
text-overflow: ellipsis;
|
|
408
417
|
}
|
|
409
418
|
.kd-select-item-option:hover:not(.kd-select-item-option-selected):not(.kd-select-item-option-disabled) {
|
|
410
|
-
background-color: var(--kd-c-select-color-background,
|
|
419
|
+
background-color: var(--kd-c-select-color-background, #f5f5f5);
|
|
411
420
|
}
|
|
412
421
|
.kd-select-item-option-active:not(.kd-select-item-option-disabled) {
|
|
413
|
-
background-color: var(--kd-c-select-color-background,
|
|
422
|
+
background-color: var(--kd-c-select-color-background, #f5f5f5);
|
|
414
423
|
}
|
|
415
424
|
.kd-select-item-option-selected:not(.kd-select-item-option-disabled) {
|
|
416
425
|
color: var(--kd-c-select-item-color-text-selected, var(--kd-g-color-theme, #5582f3));
|
|
@@ -440,7 +449,7 @@
|
|
|
440
449
|
font-size: var(--kd-c-select-font-size-large, 16px);
|
|
441
450
|
}
|
|
442
451
|
.kd-select-suffix {
|
|
443
|
-
right:
|
|
452
|
+
right: 0;
|
|
444
453
|
position: absolute;
|
|
445
454
|
display: -webkit-box;
|
|
446
455
|
display: -ms-flexbox;
|
|
@@ -456,7 +465,7 @@
|
|
|
456
465
|
-webkit-box-pack: center;
|
|
457
466
|
-ms-flex-pack: center;
|
|
458
467
|
justify-content: center;
|
|
459
|
-
margin-left:
|
|
468
|
+
margin-left: 8px;
|
|
460
469
|
}
|
|
461
470
|
.kd-select-single-focused {
|
|
462
471
|
border-color: var(--kd-c-select-color-border-foucs, var(--kd-g-color-theme, #5582f3)) !important;
|
|
@@ -594,7 +603,7 @@
|
|
|
594
603
|
padding-left: 12px;
|
|
595
604
|
}
|
|
596
605
|
.kd-select-multiple-footer-hadSelected > span {
|
|
597
|
-
color: var(--kd-c-select-footer-color-text-selected,
|
|
606
|
+
color: var(--kd-c-select-footer-color-text-selected, #0e5fd8);
|
|
598
607
|
padding: 0 2px;
|
|
599
608
|
}
|
|
600
609
|
.kd-select.topLeft.hidden,
|