@kdcloudjs/kdesign 1.1.3 → 1.2.2

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.
Files changed (132) hide show
  1. package/CHANGELOG.md +79 -3
  2. package/dist/kdesign-complete.less +1006 -783
  3. package/dist/kdesign.css +358 -268
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +529 -262
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +4 -4
  8. package/dist/kdesign.min.js +8 -8
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/_utils/usePopper.js +33 -12
  11. package/es/anchor/anchor.js +0 -6
  12. package/es/anchor/style/index.css +5 -2
  13. package/es/anchor/style/index.less +6 -2
  14. package/es/anchor/style/token.less +2 -1
  15. package/es/button/button.d.ts +1 -1
  16. package/es/button/button.js +2 -2
  17. package/es/button/group.d.ts +21 -0
  18. package/es/button/group.js +130 -0
  19. package/es/button/index.d.ts +5 -1
  20. package/es/button/index.js +4 -1
  21. package/es/button/style/index.css +117 -21
  22. package/es/button/style/index.less +332 -192
  23. package/es/button/style/token.less +41 -25
  24. package/es/carousel/carousel.js +4 -0
  25. package/es/carousel/displayList.js +8 -4
  26. package/es/carousel/fadeList.js +9 -5
  27. package/es/carousel/slideList.js +6 -3
  28. package/es/carousel/style/index.css +65 -0
  29. package/es/carousel/style/index.less +66 -1
  30. package/es/collapse/panel.d.ts +1 -0
  31. package/es/collapse/panel.js +17 -5
  32. package/es/collapse/style/index.css +32 -6
  33. package/es/collapse/style/index.less +24 -1
  34. package/es/collapse/style/token.less +12 -10
  35. package/es/config-provider/compDefaultProps.d.ts +4 -0
  36. package/es/config-provider/compDefaultProps.js +4 -0
  37. package/es/drawer/drawer.d.ts +1 -0
  38. package/es/drawer/drawer.js +56 -21
  39. package/es/empty/defaultEmptyImg.js +5 -3
  40. package/es/empty/illustrationEmptyImg.js +6 -4
  41. package/es/icon/interface.js +1 -1
  42. package/es/image/preview.js +1 -1
  43. package/es/image/style/index.css +8 -8
  44. package/es/image/style/index.less +5 -5
  45. package/es/image/style/token.less +12 -25
  46. package/es/radio/radio.js +3 -1
  47. package/es/radio/style/index.css +51 -24
  48. package/es/radio/style/index.less +28 -2
  49. package/es/radio/style/token.less +4 -4
  50. package/es/rate/style/index.css +9 -9
  51. package/es/rate/style/token.less +6 -6
  52. package/es/select/option.js +1 -1
  53. package/es/select/style/index.css +14 -5
  54. package/es/select/style/index.less +374 -368
  55. package/es/select/style/token.less +2 -2
  56. package/es/stepper/style/index.css +1 -1
  57. package/es/stepper/style/token.less +1 -1
  58. package/es/steps/style/index.css +40 -32
  59. package/es/steps/style/index.less +23 -33
  60. package/es/steps/style/token.less +6 -9
  61. package/es/style/icon/kdicon.css +2 -1
  62. package/es/style/icon/kdicon.woff +0 -0
  63. package/es/switch/style/index.css +11 -11
  64. package/es/switch/style/index.less +2 -2
  65. package/es/switch/style/token.less +7 -10
  66. package/es/tabs/tabs.js +5 -1
  67. package/es/tag/style/index.css +2 -147
  68. package/es/tag/style/index.less +4 -24
  69. package/es/tag/style/mixin.less +0 -13
  70. package/es/tag/style/token.less +1 -1
  71. package/lib/_utils/usePopper.js +34 -12
  72. package/lib/anchor/anchor.js +0 -6
  73. package/lib/anchor/style/index.css +5 -2
  74. package/lib/anchor/style/index.less +6 -2
  75. package/lib/anchor/style/token.less +2 -1
  76. package/lib/button/button.d.ts +1 -1
  77. package/lib/button/button.js +2 -2
  78. package/lib/button/group.d.ts +21 -0
  79. package/lib/button/group.js +166 -0
  80. package/lib/button/index.d.ts +5 -1
  81. package/lib/button/index.js +5 -1
  82. package/lib/button/style/index.css +117 -21
  83. package/lib/button/style/index.less +332 -192
  84. package/lib/button/style/token.less +41 -25
  85. package/lib/carousel/carousel.js +4 -0
  86. package/lib/carousel/displayList.js +9 -4
  87. package/lib/carousel/fadeList.js +10 -5
  88. package/lib/carousel/slideList.js +6 -3
  89. package/lib/carousel/style/index.css +65 -0
  90. package/lib/carousel/style/index.less +66 -1
  91. package/lib/collapse/panel.d.ts +1 -0
  92. package/lib/collapse/panel.js +17 -5
  93. package/lib/collapse/style/index.css +32 -6
  94. package/lib/collapse/style/index.less +24 -1
  95. package/lib/collapse/style/token.less +12 -10
  96. package/lib/config-provider/compDefaultProps.d.ts +4 -0
  97. package/lib/config-provider/compDefaultProps.js +4 -0
  98. package/lib/drawer/drawer.d.ts +1 -0
  99. package/lib/drawer/drawer.js +61 -27
  100. package/lib/empty/defaultEmptyImg.js +6 -3
  101. package/lib/empty/illustrationEmptyImg.js +7 -4
  102. package/lib/icon/interface.js +1 -1
  103. package/lib/image/preview.js +1 -1
  104. package/lib/image/style/index.css +8 -8
  105. package/lib/image/style/index.less +5 -5
  106. package/lib/image/style/token.less +12 -25
  107. package/lib/radio/radio.js +3 -1
  108. package/lib/radio/style/index.css +51 -24
  109. package/lib/radio/style/index.less +28 -2
  110. package/lib/radio/style/token.less +4 -4
  111. package/lib/rate/style/index.css +9 -9
  112. package/lib/rate/style/token.less +6 -6
  113. package/lib/select/option.js +1 -1
  114. package/lib/select/style/index.css +14 -5
  115. package/lib/select/style/index.less +374 -368
  116. package/lib/select/style/token.less +2 -2
  117. package/lib/stepper/style/index.css +1 -1
  118. package/lib/stepper/style/token.less +1 -1
  119. package/lib/steps/style/index.css +40 -32
  120. package/lib/steps/style/index.less +23 -33
  121. package/lib/steps/style/token.less +6 -9
  122. package/lib/style/icon/kdicon.css +2 -1
  123. package/lib/style/icon/kdicon.woff +0 -0
  124. package/lib/switch/style/index.css +11 -11
  125. package/lib/switch/style/index.less +2 -2
  126. package/lib/switch/style/token.less +7 -10
  127. package/lib/tabs/tabs.js +6 -1
  128. package/lib/tag/style/index.css +2 -147
  129. package/lib/tag/style/index.less +4 -24
  130. package/lib/tag/style/mixin.less +0 -13
  131. package/lib/tag/style/token.less +1 -1
  132. package/package.json +1 -1
@@ -1,10 +1,11 @@
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';
6
7
  @radio-group-prefix-cls: ~'@{radio-prefix-cls}-group';
7
- @radio-focus-shadow: 0 0 0 3px rgba(@radio-color-theme, 10%);
8
+ @radio-focus-shadow: 0 0 0 3px rgba(85, 130, 243, 10%);
8
9
 
9
10
  // 默认类型(单选项)
10
11
  .@{radio-prefix-cls} {
@@ -16,6 +17,7 @@
16
17
  padding-left: @radio-circle-size;
17
18
  margin-right: @radio-margin-right;
18
19
  white-space: nowrap;
20
+ text-overflow: ellipsis;
19
21
  cursor: pointer;
20
22
  vertical-align: middle;
21
23
  color: @radio-font-color;
@@ -64,7 +66,7 @@
64
66
  // 悬停状态
65
67
  &:hover {
66
68
 
67
- // color: @radio-color-theme;
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',13px);//单选图标大小
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',0px); //内间距 纵向
29
- @radio-square-padding-horizontal: var(~'@{radio-prefix}-square-spacing-padding-horizontal',20px);//内间距 横向 /单选框 宽度
30
- @radio-padding-left: var(~'@{radio-prefix}-spacing-padding-left',6px);//图标与文字间距
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
 
@@ -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, var(--kd-g-font-size-large, 16px));
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, var(--kd-g-font-size-middle, 14px));
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, var(--kd-g-font-size-small, 12px));
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, 10px);
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, #d9d9d9);
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, #fdc200);
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, #d9d9d9);
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, #fdc200);
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, #fdc200);
202
+ color: var(--kd-c-rate-color-text-selected, #FEC104);
203
203
  opacity: 1;
204
204
  }
205
205
  .kd-rate-item:last-child {
@@ -3,16 +3,16 @@
3
3
  @rate-prefix: '--@{kd-prefix}-c-rate';
4
4
 
5
5
  // color
6
- @rate-selected-color: var(~'@{rate-prefix}-color-text-selected', #fdc200);
7
- @rate-not-selected-color: var(~'@{rate-prefix}-color-text-not-selected', #d9d9d9);
6
+ @rate-selected-color: var(~'@{rate-prefix}-color-text-selected', #FEC104);
7
+ @rate-not-selected-color: var(~'@{rate-prefix}-color-text-not-selected', #E5E5E5);
8
8
 
9
9
  // font
10
- @rate-small-font-size: var(~'@{rate-prefix}-font-size-small', @font-size-small);
11
- @rate-middle-font-size: var(~'@{rate-prefix}-font-size-middle', @font-size-middle);
12
- @rate-large-font-size: var(~'@{rate-prefix}-font-size-large', @font-size-large);
10
+ @rate-small-font-size: var(~'@{rate-prefix}-font-size-small', 12px);
11
+ @rate-middle-font-size: var(~'@{rate-prefix}-font-size-middle', 16px);
12
+ @rate-large-font-size: var(~'@{rate-prefix}-font-size-large', 20px);
13
13
 
14
14
  // motion
15
15
  @rate-transition-duration: var(~'@{rate-prefix}-motion-duration', @duration-promptly);
16
16
 
17
17
  // spacing
18
- @rate-icon-margin: var(~'@{rate-prefix}-spacing-margin-right', 10px);
18
+ @rate-icon-margin: var(~'@{rate-prefix}-spacing-margin-right', 8px);
@@ -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: '30px',
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, var(--kd-g-color-hover, #f5f5f5));
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, var(--kd-g-color-hover, #f5f5f5));
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: 10px;
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: 4px;
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, var(--kd-g-color-text-link, #0e5fd8));
606
+ color: var(--kd-c-select-footer-color-text-selected, #0e5fd8);
598
607
  padding: 0 2px;
599
608
  }
600
609
  .kd-select.topLeft.hidden,