@kdcloudjs/kdesign 1.1.2 → 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 +61 -0
- package/dist/kdesign-complete.less +1125 -926
- package/dist/kdesign.css +485 -432
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +516 -251
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +4 -4
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.js +37 -16
- package/es/anchor/anchor.js +0 -6
- package/es/anchor/style/index.css +5 -2
- package/es/anchor/style/index.less +6 -2
- package/es/anchor/style/token.less +2 -1
- package/es/button/button.d.ts +1 -1
- package/es/button/button.js +2 -2
- package/es/button/group.d.ts +21 -0
- package/es/button/group.js +130 -0
- package/es/button/index.d.ts +5 -1
- package/es/button/index.js +4 -1
- package/es/button/style/index.css +117 -21
- package/es/button/style/index.less +332 -192
- package/es/button/style/token.less +41 -25
- package/es/carousel/carousel.js +4 -0
- package/es/checkbox/checkbox.js +3 -4
- package/es/checkbox/style/index.css +36 -33
- package/es/checkbox/style/index.less +25 -18
- package/es/checkbox/style/token.less +34 -35
- 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/config-provider/compDefaultProps.d.ts +4 -0
- package/es/config-provider/compDefaultProps.js +4 -0
- package/es/drawer/drawer.d.ts +1 -0
- package/es/drawer/drawer.js +56 -21
- package/es/empty/defaultEmptyImg.js +5 -3
- package/es/empty/illustrationEmptyImg.js +6 -4
- package/es/icon/interface.js +1 -1
- package/es/image/preview.js +1 -1
- package/es/image/style/index.css +8 -8
- package/es/image/style/index.less +5 -5
- package/es/image/style/token.less +12 -25
- package/es/input/style/index.css +53 -50
- package/es/input/style/index.less +5 -4
- package/es/input/style/mixin.less +1 -0
- package/es/input/style/token.less +23 -20
- package/es/layout/style/index.css +1 -1
- package/es/layout/style/index.less +1 -1
- package/es/layout/style/token.less +5 -5
- package/es/menu/menu.js +1 -1
- package/es/menu/style/index.css +37 -31
- package/es/menu/style/index.less +14 -0
- package/es/menu/style/mixin.less +1 -1
- package/es/menu/style/token.less +13 -16
- package/es/pagination/pagination.js +4 -4
- package/es/pagination/style/index.css +70 -55
- package/es/pagination/style/index.less +61 -43
- package/es/pagination/style/token.less +4 -4
- package/es/radio/radio.js +23 -8
- 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/rate/style/index.css +9 -9
- package/es/rate/style/token.less +6 -6
- 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/stepper/style/index.css +1 -1
- package/es/stepper/style/token.less +1 -1
- 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/style/icon/kdicon.css +225 -0
- package/es/style/icon/kdicon.woff +0 -0
- package/es/switch/style/index.css +11 -11
- package/es/switch/style/index.less +2 -2
- package/es/switch/style/token.less +7 -10
- 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 +38 -16
- package/lib/anchor/anchor.js +0 -6
- package/lib/anchor/style/index.css +5 -2
- package/lib/anchor/style/index.less +6 -2
- package/lib/anchor/style/token.less +2 -1
- package/lib/button/button.d.ts +1 -1
- package/lib/button/button.js +2 -2
- package/lib/button/group.d.ts +21 -0
- package/lib/button/group.js +166 -0
- package/lib/button/index.d.ts +5 -1
- package/lib/button/index.js +5 -1
- package/lib/button/style/index.css +117 -21
- package/lib/button/style/index.less +332 -192
- package/lib/button/style/token.less +41 -25
- package/lib/carousel/carousel.js +4 -0
- package/lib/checkbox/checkbox.js +3 -4
- package/lib/checkbox/style/index.css +36 -33
- package/lib/checkbox/style/index.less +25 -18
- package/lib/checkbox/style/token.less +34 -35
- 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/config-provider/compDefaultProps.d.ts +4 -0
- package/lib/config-provider/compDefaultProps.js +4 -0
- package/lib/drawer/drawer.d.ts +1 -0
- package/lib/drawer/drawer.js +61 -27
- package/lib/empty/defaultEmptyImg.js +6 -3
- package/lib/empty/illustrationEmptyImg.js +7 -4
- package/lib/icon/interface.js +1 -1
- package/lib/image/preview.js +1 -1
- package/lib/image/style/index.css +8 -8
- package/lib/image/style/index.less +5 -5
- package/lib/image/style/token.less +12 -25
- package/lib/input/style/index.css +53 -50
- package/lib/input/style/index.less +5 -4
- package/lib/input/style/mixin.less +1 -0
- package/lib/input/style/token.less +23 -20
- package/lib/layout/style/index.css +1 -1
- package/lib/layout/style/index.less +1 -1
- package/lib/layout/style/token.less +5 -5
- package/lib/menu/menu.js +1 -1
- package/lib/menu/style/index.css +37 -31
- package/lib/menu/style/index.less +14 -0
- package/lib/menu/style/mixin.less +1 -1
- package/lib/menu/style/token.less +13 -16
- package/lib/pagination/pagination.js +4 -3
- package/lib/pagination/style/index.css +70 -55
- package/lib/pagination/style/index.less +61 -43
- package/lib/pagination/style/token.less +4 -4
- package/lib/radio/radio.js +23 -8
- 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/rate/style/index.css +9 -9
- package/lib/rate/style/token.less +6 -6
- 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/stepper/style/index.css +1 -1
- package/lib/stepper/style/token.less +1 -1
- 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/style/icon/kdicon.css +225 -0
- package/lib/style/icon/kdicon.woff +0 -0
- package/lib/switch/style/index.css +11 -11
- package/lib/switch/style/index.less +2 -2
- package/lib/switch/style/token.less +7 -10
- 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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@import './token.less';
|
|
4
4
|
|
|
5
5
|
@pagination-prefix-cls: ~'@{kd-prefix}-pagination';
|
|
6
|
+
@dropdown-prefix-cls: ~'@{kd-prefix}-dropdown';
|
|
6
7
|
@pagination-action-prefix-cls: ~'@{pagination-prefix-cls}-action';
|
|
7
8
|
@pagination-selector-prefix-cls: ~'@{pagination-prefix-cls}-selector';
|
|
8
9
|
@pagination-pages-prefix-cls: ~'@{pagination-prefix-cls}-pages';
|
|
@@ -22,11 +23,11 @@
|
|
|
22
23
|
|
|
23
24
|
.@{pagination-prefix-cls}-current {
|
|
24
25
|
display: inline-block;
|
|
25
|
-
margin-right:
|
|
26
|
+
margin-right: 12px;
|
|
26
27
|
vertical-align: middle;
|
|
27
28
|
.@{pagination-prefix-cls}-current-input {
|
|
28
29
|
box-sizing: border-box;
|
|
29
|
-
width:
|
|
30
|
+
width: 44px;
|
|
30
31
|
height: @pagination-size;
|
|
31
32
|
margin: 0 3px;
|
|
32
33
|
padding: 0;
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
&:disabled {
|
|
49
|
-
color: @
|
|
50
|
+
color: @pagination-disabled-color;
|
|
50
51
|
border: @pagination-border-size solid @pagination-border-disabled-color;
|
|
51
52
|
background: @pagination-button-disabled-background-color;
|
|
52
53
|
cursor: not-allowed;
|
|
@@ -107,7 +108,7 @@
|
|
|
107
108
|
cursor: not-allowed;
|
|
108
109
|
|
|
109
110
|
i {
|
|
110
|
-
color: @pagination-
|
|
111
|
+
color: @pagination-disabled-color;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
|
|
@@ -141,6 +142,7 @@
|
|
|
141
142
|
.@{pagination-selector-prefix-cls}-size {
|
|
142
143
|
box-sizing: border-box;
|
|
143
144
|
display: inline-block;
|
|
145
|
+
padding: 0;
|
|
144
146
|
line-height: @pagination-size;
|
|
145
147
|
font-size: @pagination-font-size;
|
|
146
148
|
color: @color-text-primary;
|
|
@@ -160,21 +162,34 @@
|
|
|
160
162
|
&.disabled,
|
|
161
163
|
&.disabled > i {
|
|
162
164
|
cursor: not-allowed;
|
|
163
|
-
color: @
|
|
165
|
+
color: @pagination-disabled-color;
|
|
164
166
|
}
|
|
165
167
|
|
|
166
168
|
i {
|
|
167
|
-
margin-left:
|
|
169
|
+
margin-left: 4px;
|
|
168
170
|
line-height: @pagination-size;
|
|
169
171
|
font-size: @pagination-icon-size;
|
|
170
172
|
color: @pagination-text-color;
|
|
171
173
|
}
|
|
172
174
|
}
|
|
175
|
+
|
|
176
|
+
.@{dropdown-prefix-cls}-menu-item {
|
|
177
|
+
text-align: right;
|
|
178
|
+
padding-right: @pagination-dropdown-item-spacing-horizontal;
|
|
179
|
+
padding-left: @pagination-dropdown-item-spacing-horizontal;
|
|
180
|
+
|
|
181
|
+
span {
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
173
185
|
}
|
|
174
186
|
|
|
175
187
|
// 简化版分页
|
|
176
188
|
&.simple {
|
|
177
|
-
display: inline-
|
|
189
|
+
display: inline-flex;
|
|
190
|
+
justify-content: space-around;
|
|
191
|
+
align-items: center;
|
|
192
|
+
height: @pagination-size;
|
|
178
193
|
border-radius: @radius-border;
|
|
179
194
|
border: @pagination-border-size solid transparent;
|
|
180
195
|
|
|
@@ -193,15 +208,17 @@
|
|
|
193
208
|
}
|
|
194
209
|
|
|
195
210
|
&.disabled > .@{pagination-prefix-cls}-item {
|
|
196
|
-
color: @
|
|
211
|
+
color: @pagination-disabled-color;
|
|
197
212
|
}
|
|
198
213
|
|
|
199
214
|
.@{pagination-prefix-cls}-item {
|
|
200
215
|
.reset-component;
|
|
201
216
|
display: inline-block;
|
|
217
|
+
height: @pagination-size;
|
|
218
|
+
overflow: hidden;
|
|
219
|
+
margin: 0 8px;
|
|
202
220
|
vertical-align: middle;
|
|
203
221
|
color: @color-text-primary;
|
|
204
|
-
margin: 0 18px;
|
|
205
222
|
|
|
206
223
|
&:first-child,
|
|
207
224
|
&:last-child {
|
|
@@ -216,7 +233,7 @@
|
|
|
216
233
|
margin: 0;
|
|
217
234
|
|
|
218
235
|
&:disabled {
|
|
219
|
-
color: @
|
|
236
|
+
color: @pagination-disabled-color;
|
|
220
237
|
cursor: not-allowed;
|
|
221
238
|
}
|
|
222
239
|
}
|
|
@@ -243,7 +260,7 @@
|
|
|
243
260
|
&:hover,
|
|
244
261
|
&:active {
|
|
245
262
|
&:not(:disabled) {
|
|
246
|
-
border-color: @pagination-border-hover-color
|
|
263
|
+
border-color: @pagination-border-hover-color;
|
|
247
264
|
}
|
|
248
265
|
|
|
249
266
|
i {
|
|
@@ -255,7 +272,7 @@
|
|
|
255
272
|
cursor: not-allowed;
|
|
256
273
|
|
|
257
274
|
i {
|
|
258
|
-
color: @pagination-
|
|
275
|
+
color: @pagination-disabled-color;
|
|
259
276
|
}
|
|
260
277
|
}
|
|
261
278
|
|
|
@@ -318,7 +335,7 @@
|
|
|
318
335
|
border-color: @pagination-border-hover-color;
|
|
319
336
|
|
|
320
337
|
&:disabled {
|
|
321
|
-
border-color: @pagination-border-disabled-color
|
|
338
|
+
border-color: @pagination-border-disabled-color;
|
|
322
339
|
}
|
|
323
340
|
}
|
|
324
341
|
}
|
|
@@ -339,7 +356,7 @@
|
|
|
339
356
|
|
|
340
357
|
&:disabled {
|
|
341
358
|
cursor: not-allowed;
|
|
342
|
-
color: @
|
|
359
|
+
color: @pagination-disabled-color;
|
|
343
360
|
}
|
|
344
361
|
}
|
|
345
362
|
}
|
|
@@ -377,11 +394,8 @@
|
|
|
377
394
|
background-color: @color-background-contain;
|
|
378
395
|
}
|
|
379
396
|
|
|
380
|
-
&:hover,
|
|
381
|
-
&:active,
|
|
382
397
|
&.active,
|
|
383
|
-
&:
|
|
384
|
-
&:last-child {
|
|
398
|
+
&:hover {
|
|
385
399
|
button {
|
|
386
400
|
color: @color-theme;
|
|
387
401
|
|
|
@@ -394,16 +408,16 @@
|
|
|
394
408
|
&:first-child,
|
|
395
409
|
&:last-child {
|
|
396
410
|
button {
|
|
397
|
-
width: @pagination-
|
|
411
|
+
width: @pagination-size;
|
|
398
412
|
padding: 0;
|
|
399
|
-
line-height: calc(@pagination-
|
|
413
|
+
line-height: calc(@pagination-size - 2px);
|
|
400
414
|
}
|
|
401
415
|
}
|
|
402
416
|
|
|
403
417
|
button {
|
|
404
418
|
.reset-component;
|
|
405
|
-
min-width: @pagination-
|
|
406
|
-
height: @pagination-
|
|
419
|
+
min-width: @pagination-size;
|
|
420
|
+
height: @pagination-size;
|
|
407
421
|
padding: 0 6px;
|
|
408
422
|
cursor: pointer;
|
|
409
423
|
outline: none;
|
|
@@ -416,7 +430,11 @@
|
|
|
416
430
|
|
|
417
431
|
&:disabled {
|
|
418
432
|
cursor: not-allowed;
|
|
419
|
-
color: @
|
|
433
|
+
color: @pagination-disabled-color;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
> i {
|
|
437
|
+
font-size: 16px;
|
|
420
438
|
}
|
|
421
439
|
|
|
422
440
|
.@{pagination-pages-prefix-cls}-jumper-icon {
|
|
@@ -427,7 +445,7 @@
|
|
|
427
445
|
width: 100%;
|
|
428
446
|
height: 100%;
|
|
429
447
|
color: @color-theme;
|
|
430
|
-
line-height: @pagination-
|
|
448
|
+
line-height: @pagination-size;
|
|
431
449
|
background-color: @color-background;
|
|
432
450
|
transition: opacity @duration-promptly;
|
|
433
451
|
}
|
|
@@ -437,13 +455,13 @@
|
|
|
437
455
|
|
|
438
456
|
.@{pagination-jumper-prefix-cls} {
|
|
439
457
|
display: inline-block;
|
|
440
|
-
margin-left:
|
|
458
|
+
margin-left: 4px;
|
|
441
459
|
vertical-align: middle;
|
|
442
460
|
|
|
443
461
|
.@{pagination-jumper-prefix-cls}-input {
|
|
444
462
|
box-sizing: border-box;
|
|
445
|
-
width:
|
|
446
|
-
height: @pagination-
|
|
463
|
+
width: 40px;
|
|
464
|
+
height: @pagination-size;
|
|
447
465
|
padding: 0;
|
|
448
466
|
outline: none;
|
|
449
467
|
text-align: center;
|
|
@@ -461,7 +479,7 @@
|
|
|
461
479
|
}
|
|
462
480
|
|
|
463
481
|
&:disabled {
|
|
464
|
-
color: @
|
|
482
|
+
color: @pagination-disabled-color;
|
|
465
483
|
border: @pagination-border-size solid @pagination-border-disabled-color;
|
|
466
484
|
background: @pagination-button-disabled-background-color;
|
|
467
485
|
cursor: not-allowed;
|
|
@@ -470,14 +488,14 @@
|
|
|
470
488
|
|
|
471
489
|
.@{pagination-jumper-prefix-cls}-button {
|
|
472
490
|
.reset-component;
|
|
473
|
-
width: @pagination-
|
|
474
|
-
height: @pagination-
|
|
491
|
+
width: @pagination-size;
|
|
492
|
+
height: @pagination-size;
|
|
475
493
|
margin-left: @pagination-button-spacing;
|
|
476
|
-
line-height: @pagination-
|
|
494
|
+
line-height: @pagination-size;
|
|
477
495
|
vertical-align: top;
|
|
478
496
|
cursor: pointer;
|
|
479
497
|
outline: none;
|
|
480
|
-
color: @color-
|
|
498
|
+
color: @color-text-primary;
|
|
481
499
|
font-size: @pagination-font-size;
|
|
482
500
|
border-radius: @radius-border;
|
|
483
501
|
border: @pagination-border-size solid @color-border-strong;
|
|
@@ -485,8 +503,8 @@
|
|
|
485
503
|
transition: border-color @duration-promptly;
|
|
486
504
|
|
|
487
505
|
&:hover,
|
|
488
|
-
&:active
|
|
489
|
-
|
|
506
|
+
&:active {
|
|
507
|
+
color: @color-theme;
|
|
490
508
|
border-color: @pagination-border-hover-color;
|
|
491
509
|
|
|
492
510
|
&:disabled {
|
|
@@ -495,7 +513,7 @@
|
|
|
495
513
|
}
|
|
496
514
|
|
|
497
515
|
&:disabled {
|
|
498
|
-
color: @
|
|
516
|
+
color: @pagination-disabled-color;
|
|
499
517
|
cursor: not-allowed;
|
|
500
518
|
}
|
|
501
519
|
}
|
|
@@ -505,9 +523,9 @@
|
|
|
505
523
|
.reset-component;
|
|
506
524
|
position: relative;
|
|
507
525
|
display: inline-block;
|
|
508
|
-
margin-left:
|
|
526
|
+
margin-left: 22px;
|
|
509
527
|
outline: none;
|
|
510
|
-
height: @pagination-
|
|
528
|
+
height: @pagination-size;
|
|
511
529
|
color: @color-text-primary;
|
|
512
530
|
vertical-align: middle;
|
|
513
531
|
|
|
@@ -515,11 +533,11 @@
|
|
|
515
533
|
position: relative;
|
|
516
534
|
box-sizing: border-box;
|
|
517
535
|
display: inline-block;
|
|
518
|
-
width:
|
|
519
|
-
height: @pagination-
|
|
536
|
+
min-width: 64px;
|
|
537
|
+
height: @pagination-size;
|
|
520
538
|
margin-right: 8px;
|
|
521
|
-
padding: 0
|
|
522
|
-
line-height: @pagination-
|
|
539
|
+
padding: 0 24px 0 4px;
|
|
540
|
+
line-height: @pagination-size;
|
|
523
541
|
font-size: @pagination-font-size;
|
|
524
542
|
color: @color-text-primary;
|
|
525
543
|
text-align: left;
|
|
@@ -542,7 +560,7 @@
|
|
|
542
560
|
&.disabled,
|
|
543
561
|
&.disabled > i {
|
|
544
562
|
cursor: not-allowed;
|
|
545
|
-
color: @
|
|
563
|
+
color: @pagination-disabled-color;
|
|
546
564
|
}
|
|
547
565
|
|
|
548
566
|
i {
|
|
@@ -554,7 +572,7 @@
|
|
|
554
572
|
color: @pagination-hover-color;
|
|
555
573
|
transform: translateY(-50%);
|
|
556
574
|
}
|
|
557
|
-
|
|
575
|
+
|
|
558
576
|
.@{pagination-prefix-cls}-dropdown-icon-open {
|
|
559
577
|
transform: rotate(180deg) translateY(50%);
|
|
560
578
|
}
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
// color
|
|
6
6
|
@pagination-text-color: var(~'@{pagination-custom-prefix}-text-color', @color-text-secondary);
|
|
7
7
|
@pagination-hover-color: var(~'@{pagination-custom-prefix}-color-text-hover', @color-theme);
|
|
8
|
-
@pagination-disabled-color: var(~'@{pagination-custom-prefix}-color-text-disabled', @color-border-disabled);
|
|
9
8
|
@pagination-icon-color: var(~'@{pagination-custom-prefix}-button-color', @color-text-secondary);
|
|
10
|
-
@pagination-
|
|
9
|
+
@pagination-disabled-color: var(~'@{pagination-custom-prefix}-color-disabled', @color-disabled);
|
|
11
10
|
@pagination-border-color: var(~'@{pagination-custom-prefix}-color-border', @color-border-strong);
|
|
12
|
-
@pagination-border-hover-color: var(~'@{pagination-custom-prefix}-color-border-hover', @color-theme);
|
|
11
|
+
@pagination-border-hover-color: var(~'@{pagination-custom-prefix}-color-border-hover', @color-theme-7);
|
|
13
12
|
@pagination-border-disabled-color: var(~'@{pagination-custom-prefix}-color-border-disabled', @color-border-strong);
|
|
14
13
|
@pagination-button-disabled-background-color: var(~'@{pagination-custom-prefix}-button-color-background-disabled', @color-background-contain-disabled);
|
|
15
14
|
|
|
@@ -17,13 +16,14 @@
|
|
|
17
16
|
@pagination-font-size: var(~'@{pagination-custom-prefix}-font-size', @font-size-small);
|
|
18
17
|
@pagination-icon-size: var(~'@{pagination-custom-prefix}-icon-font-size', @font-size-large);
|
|
19
18
|
|
|
19
|
+
|
|
20
20
|
// sizing
|
|
21
21
|
@pagination-size: var(~'@{pagination-custom-prefix}-sizing-square', 24px);
|
|
22
|
-
@pagination-nicety-size: var(~'@{pagination-custom-prefix}-nicety-sizing-square', 30px);
|
|
23
22
|
@pagination-border-size: var(~'@{pagination-custom-prefix}-sizing-border-width', 1px);
|
|
24
23
|
|
|
25
24
|
// spacing
|
|
26
25
|
@pagination-button-spacing: var(~'@{pagination-custom-prefix}-button-spacing', 4px);
|
|
26
|
+
@pagination-dropdown-item-spacing-horizontal: var(~'@{pagination-custom-prefix}-dropdown-item-spacing-padding-horizontal', 24px);
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
package/lib/radio/radio.js
CHANGED
|
@@ -110,14 +110,29 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
110
110
|
|
|
111
111
|
var classString = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-disabled"), radioProps.disabled), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-checked"), context ? radioProps.checked : isChecked), _classNames), className); // 单选包裹元素class名称
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
var handleRepeatClick = function handleRepeatClick(e) {
|
|
114
|
+
var element = e.target;
|
|
115
|
+
|
|
116
|
+
if (element.tagName !== 'INPUT') {
|
|
117
|
+
e.stopPropagation();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
/*#__PURE__*/
|
|
123
|
+
// eslint-disable-next-line
|
|
124
|
+
React.createElement("label", {
|
|
125
|
+
className: classString,
|
|
126
|
+
style: style,
|
|
127
|
+
ref: mergedRef,
|
|
128
|
+
onClick: handleRepeatClick
|
|
129
|
+
}, /*#__PURE__*/React.createElement("input", (0, _extends2.default)({
|
|
130
|
+
type: "radio",
|
|
131
|
+
className: "".concat(radioPrefixCls, "-input")
|
|
132
|
+
}, radioProps)), children !== undefined ? /*#__PURE__*/React.createElement("span", {
|
|
133
|
+
className: "".concat(radioPrefixCls, "-text")
|
|
134
|
+
}, children) : null)
|
|
135
|
+
);
|
|
121
136
|
};
|
|
122
137
|
|
|
123
138
|
var Radio = /*#__PURE__*/React.forwardRef(InternalRadio);
|
|
@@ -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/rate/style/index.css
CHANGED
|
@@ -121,13 +121,13 @@
|
|
|
121
121
|
justify-content: flex-start;
|
|
122
122
|
}
|
|
123
123
|
.kd-rate-size-large {
|
|
124
|
-
font-size: var(--kd-c-rate-font-size-large,
|
|
124
|
+
font-size: var(--kd-c-rate-font-size-large, 20px);
|
|
125
125
|
}
|
|
126
126
|
.kd-rate-size-middle {
|
|
127
|
-
font-size: var(--kd-c-rate-font-size-middle,
|
|
127
|
+
font-size: var(--kd-c-rate-font-size-middle, 16px);
|
|
128
128
|
}
|
|
129
129
|
.kd-rate-size-small {
|
|
130
|
-
font-size: var(--kd-c-rate-font-size-small,
|
|
130
|
+
font-size: var(--kd-c-rate-font-size-small, 12px);
|
|
131
131
|
}
|
|
132
132
|
.kd-rate-item {
|
|
133
133
|
display: -webkit-inline-box;
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
-ms-flex-align: center;
|
|
142
142
|
align-items: center;
|
|
143
143
|
line-height: 100%;
|
|
144
|
-
margin-right: var(--kd-c-rate-spacing-margin-right,
|
|
144
|
+
margin-right: var(--kd-c-rate-spacing-margin-right, 8px);
|
|
145
145
|
}
|
|
146
146
|
.kd-rate-item .kd-rate-icon-view {
|
|
147
147
|
position: relative;
|
|
@@ -171,20 +171,20 @@
|
|
|
171
171
|
left: 0;
|
|
172
172
|
width: 50%;
|
|
173
173
|
overflow: hidden;
|
|
174
|
-
color: var(--kd-c-rate-color-text-not-selected, #
|
|
174
|
+
color: var(--kd-c-rate-color-text-not-selected, #E5E5E5);
|
|
175
175
|
opacity: 1;
|
|
176
176
|
cursor: pointer;
|
|
177
177
|
-webkit-transition: color var(--kd-c-rate-motion-duration, var(--kd-g-duration, 0.3s));
|
|
178
178
|
transition: color var(--kd-c-rate-motion-duration, var(--kd-g-duration, 0.3s));
|
|
179
179
|
}
|
|
180
180
|
.kd-rate-item .kd-rate-icon-first:hover {
|
|
181
|
-
color: var(--kd-c-rate-color-text-selected, #
|
|
181
|
+
color: var(--kd-c-rate-color-text-selected, #FEC104);
|
|
182
182
|
}
|
|
183
183
|
.kd-rate-item .kd-rate-icon-second {
|
|
184
184
|
display: -webkit-inline-box;
|
|
185
185
|
display: -ms-inline-flexbox;
|
|
186
186
|
display: inline-flex;
|
|
187
|
-
color: var(--kd-c-rate-color-text-not-selected, #
|
|
187
|
+
color: var(--kd-c-rate-color-text-not-selected, #E5E5E5);
|
|
188
188
|
opacity: 1;
|
|
189
189
|
cursor: pointer;
|
|
190
190
|
-webkit-transition: color var(--kd-c-rate-motion-duration, var(--kd-g-duration, 0.3s));
|
|
@@ -196,10 +196,10 @@
|
|
|
196
196
|
display: inline-flex;
|
|
197
197
|
}
|
|
198
198
|
.kd-rate-item .kd-rate-icon-second:hover {
|
|
199
|
-
color: var(--kd-c-rate-color-text-selected, #
|
|
199
|
+
color: var(--kd-c-rate-color-text-selected, #FEC104);
|
|
200
200
|
}
|
|
201
201
|
.kd-rate-item .kd-rate-icon-selected {
|
|
202
|
-
color: var(--kd-c-rate-color-text-selected, #
|
|
202
|
+
color: var(--kd-c-rate-color-text-selected, #FEC104);
|
|
203
203
|
opacity: 1;
|
|
204
204
|
}
|
|
205
205
|
.kd-rate-item:last-child {
|