@qsxy/element-plus-react 1.0.0-next.18 → 1.0.0-next.21

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 (144) hide show
  1. package/README.md +12 -39
  2. package/dist/Breadcrumb/BreadcrumbItem.js +4 -7
  3. package/dist/Switch/Switch.js +50 -17
  4. package/dist/Switch/typings.d.ts +4 -0
  5. package/dist/Tooltip/Tooltip.js +2 -1
  6. package/dist/index.css +1 -1
  7. package/dist/index.d.ts +5 -5
  8. package/dist/index.js +2 -2
  9. package/package.json +1 -2
  10. package/theme-chalk/{avatar/index.scss → avatar.scss} +1 -1
  11. package/theme-chalk/{badge/index.scss → badge.scss} +1 -1
  12. package/theme-chalk/{breadcrumb/index.scss → breadcrumb.scss} +1 -1
  13. package/theme-chalk/build.scss +1 -1
  14. package/theme-chalk/button/_mixins.scss +3 -3
  15. package/theme-chalk/button/button-group.scss +1 -1
  16. package/theme-chalk/button/button.scss +2 -2
  17. package/theme-chalk/button/index.scss +2 -2
  18. package/theme-chalk/button--bak/_mixins.scss +317 -0
  19. package/theme-chalk/button--bak/button-group.scss +83 -0
  20. package/theme-chalk/button--bak/button.scss +382 -0
  21. package/theme-chalk/button--bak/index.scss +2 -0
  22. package/theme-chalk/button-group.scss +80 -0
  23. package/theme-chalk/button.scss +304 -0
  24. package/theme-chalk/calendar/date-picker.scss +1 -1
  25. package/theme-chalk/calendar/date-range-picker.scss +1 -1
  26. package/theme-chalk/calendar/date-table.scss +164 -156
  27. package/theme-chalk/calendar/date-table.scss--bak +156 -0
  28. package/theme-chalk/calendar/index.scss +6 -6
  29. package/theme-chalk/calendar/month-table.scss +1 -1
  30. package/theme-chalk/calendar/picker-panel.scss +1 -1
  31. package/theme-chalk/calendar/year-table.scss +1 -1
  32. package/theme-chalk/{card/index.scss → card.scss} +1 -1
  33. package/theme-chalk/{carousel/index.scss → carousel.scss} +1 -1
  34. package/theme-chalk/{cascader/cascader-panel.scss → cascader-panel.scss} +1 -1
  35. package/theme-chalk/{cascader/cascader.scss → cascader.scss} +1 -1
  36. package/theme-chalk/{checkbox-button/index.scss → checkbox-button.scss} +1 -1
  37. package/theme-chalk/{checkbox-group/index.scss → checkbox-group.scss} +1 -1
  38. package/theme-chalk/{checkbox/index.scss → checkbox.scss} +2 -1
  39. package/theme-chalk/col/_mixins.scss +5 -3
  40. package/theme-chalk/col/index.scss +2 -2
  41. package/theme-chalk/{collapse/index.scss → collapse.scss} +1 -1
  42. package/theme-chalk/color/index.scss +20 -0
  43. package/theme-chalk/{color-picker/index.scss → color-picker.scss} +3 -3
  44. package/theme-chalk/common/index.scss +127 -178
  45. package/theme-chalk/common/var.scss +1632 -0
  46. package/theme-chalk/dark/css-vars.scss +39 -0
  47. package/theme-chalk/dark/var.scss +225 -0
  48. package/theme-chalk/{date-picker/index.scss → date-picker.scss} +1 -1
  49. package/theme-chalk/{date-time-picker/time-picker.scss → date-time-picker.scss} +1 -1
  50. package/theme-chalk/{descriptions/descriptions-item.scss → descriptions-item.scss} +1 -1
  51. package/theme-chalk/{descriptions/descriptions.scss → descriptions.scss} +1 -1
  52. package/theme-chalk/dev.scss +2 -2
  53. package/theme-chalk/{dialog/index.scss → dialog.scss} +1 -1
  54. package/theme-chalk/display.scss +1 -1
  55. package/theme-chalk/{divider/index.scss → divider.scss} +1 -1
  56. package/theme-chalk/doc.scss +2 -2
  57. package/theme-chalk/{drawer/index.scss → drawer.scss} +1 -1
  58. package/theme-chalk/{dropdown/index.scss → dropdown.scss} +1 -1
  59. package/theme-chalk/{empty/index.scss → empty.scss} +1 -1
  60. package/theme-chalk/{form/index.scss → form.scss} +1 -1
  61. package/theme-chalk/icon/fonts.scss +9 -9
  62. package/theme-chalk/icon/index.scss +1 -1
  63. package/theme-chalk/icon/scss/_animated.scss +1 -0
  64. package/theme-chalk/icon/scss/_bordered-pulled.scss +1 -0
  65. package/theme-chalk/icon/scss/_core.scss +2 -0
  66. package/theme-chalk/icon/scss/_duotone-icons.scss +3 -4
  67. package/theme-chalk/icon/scss/_fixed-width.scss +1 -0
  68. package/theme-chalk/icon/scss/_functions.scss +2 -1
  69. package/theme-chalk/icon/scss/_icons.scss +3 -4
  70. package/theme-chalk/icon/scss/_list.scss +1 -0
  71. package/theme-chalk/icon/scss/_mixins.scss +10 -7
  72. package/theme-chalk/icon/scss/_rotated-flipped.scss +1 -0
  73. package/theme-chalk/icon/scss/_screen-reader.scss +2 -0
  74. package/theme-chalk/icon/scss/_shims.scss +292 -290
  75. package/theme-chalk/icon/scss/_sizing.scss +2 -0
  76. package/theme-chalk/icon/scss/_stacked.scss +1 -0
  77. package/theme-chalk/icon/scss/brands.scss +8 -6
  78. package/theme-chalk/icon/scss/duotone.scss +6 -5
  79. package/theme-chalk/icon/scss/fontawesome.scss +13 -13
  80. package/theme-chalk/icon/scss/index.scss +12 -15
  81. package/theme-chalk/icon/scss/light.scss +3 -2
  82. package/theme-chalk/icon/scss/regular.scss +3 -2
  83. package/theme-chalk/icon/scss/solid.scss +3 -2
  84. package/theme-chalk/icon/scss/thin.scss +3 -2
  85. package/theme-chalk/icon/scss/{_variables.scss → variables.scss} +2 -0
  86. package/theme-chalk/index.scss +63 -57
  87. package/theme-chalk/input/_mixins.scss +1 -1
  88. package/theme-chalk/input/index.scss +2 -3
  89. package/theme-chalk/input/input-range.scss +2 -1
  90. package/theme-chalk/input/input.scss +2 -1
  91. package/theme-chalk/{input-number/index.scss → input-number.scss} +4 -4
  92. package/theme-chalk/{link/index.scss → link.scss} +1 -1
  93. package/theme-chalk/{loading/index.scss → loading.scss} +1 -1
  94. package/theme-chalk/{message-box/index.scss → message-box.scss} +1 -1
  95. package/theme-chalk/{message/index.scss → message.scss} +2 -1
  96. package/theme-chalk/mixins/_button.scss +224 -0
  97. package/theme-chalk/mixins/_col.scss +33 -0
  98. package/theme-chalk/mixins/_var.scss +67 -0
  99. package/theme-chalk/{common/_var.scss → mixins/config.scss} +5 -6
  100. package/theme-chalk/mixins/function.scss +99 -0
  101. package/theme-chalk/mixins/mixins.scss +240 -0
  102. package/theme-chalk/mixins/utils.scss +39 -0
  103. package/theme-chalk/{notification/index.scss → notification.scss} +2 -1
  104. package/theme-chalk/pagination.scss +303 -0
  105. package/theme-chalk/{popconfirm/index.scss → popconfirm.scss} +1 -1
  106. package/theme-chalk/{popover/index.scss → popover.scss} +1 -1
  107. package/theme-chalk/popper.scss +104 -0
  108. package/theme-chalk/{popper/index.scss → popper.scss--bak} +1 -1
  109. package/theme-chalk/{progress/index.scss → progress.scss} +1 -1
  110. package/theme-chalk/radio-button.scss +169 -0
  111. package/theme-chalk/{radio/radio-button.scss → radio-button.scss--bak} +1 -1
  112. package/theme-chalk/{radio-group/index.scss → radio-group.scss} +1 -10
  113. package/theme-chalk/{radio/radio.scss → radio.scss} +1 -1
  114. package/theme-chalk/{row/index.scss → row.scss} +1 -1
  115. package/theme-chalk/{scrollbar/index.scss → scrollbar.scss} +1 -1
  116. package/theme-chalk/select/index.scss +1 -1
  117. package/theme-chalk/{skeleton/index.scss → skeleton.scss} +1 -1
  118. package/theme-chalk/switch.scss +300 -0
  119. package/theme-chalk/{switch/index.scss → switch.scss--bak} +1 -1
  120. package/theme-chalk/{table/index.scss → table.scss} +1 -1
  121. package/theme-chalk/{tabs/index.scss → tabs.scss} +1 -1
  122. package/theme-chalk/{tag/index.scss → tag.scss} +1 -1
  123. package/theme-chalk/{time-line/_timeline.scss → time-line.scss} +1 -1
  124. package/theme-chalk/{time-picker/index.scss → time-picker.scss} +1 -1
  125. package/theme-chalk/{date-time-picker/time-range-picker.scss → time-range-picker.scss} +1 -1
  126. package/theme-chalk/{time-line/_timeline-item.scss → timeline-item.scss} +1 -1
  127. package/theme-chalk/{tooltip/index.scss → tooltip.scss} +1 -1
  128. package/theme-chalk/{transfer/index.scss → transfer.scss} +1 -1
  129. package/theme-chalk/{transition/index.scss → transition.scss} +1 -1
  130. package/theme-chalk/tree/_directory.scss +1 -1
  131. package/theme-chalk/tree/_tree.scss +1 -1
  132. package/theme-chalk/tree/index.scss +2 -2
  133. package/theme-chalk/{tree-select/index.scss → tree-select.scss} +1 -1
  134. package/theme-chalk/{upload/index.scss → upload.scss} +1 -1
  135. package/theme-chalk/var.scss +83 -0
  136. package/theme-chalk/cascader/index.scss +0 -2
  137. package/theme-chalk/common/index.ts +0 -1
  138. package/theme-chalk/date-time-picker/index.scss +0 -3
  139. package/theme-chalk/descriptions/index.scss +0 -2
  140. package/theme-chalk/icon/scss/v4-shims.scss +0 -3
  141. package/theme-chalk/pagination/index.scss +0 -303
  142. package/theme-chalk/placeholder/index.scss +0 -120
  143. package/theme-chalk/radio/index.scss +0 -2
  144. package/theme-chalk/time-line/index.scss +0 -2
@@ -0,0 +1,382 @@
1
+ @use '../mixins/config' as *;
2
+
3
+ @use 'sass:map';
4
+ @use './mixins' as *;
5
+
6
+ $button-icon-span-gap: () !default;
7
+ $button-icon-span-gap: map.merge(
8
+ (
9
+ 'large': 8px,
10
+ 'default': 6px,
11
+ 'small': 4px,
12
+ ),
13
+ $button-icon-span-gap
14
+ );
15
+
16
+ .#{$namespace}-button {
17
+ --#{$namespace}-button-bg-color: var(--#{$namespace}-fill-color-blank);
18
+ --#{$namespace}-button-border-style: solid;
19
+ --#{$namespace}-button-text-color: var(--#{$namespace}-text-color-regular);
20
+ --#{$namespace}-button-border-color: var(--#{$namespace}-border-color, var(--#{$namespace}-color-primary));
21
+ --#{$namespace}-button-hover-bg-color: var(--#{$namespace}-color-primary-light-9);
22
+ --#{$namespace}-button-active-border-color: var(--#{$namespace}-color-primary);
23
+ --#{$namespace}-button-active-bg-color: var(--#{$namespace}-button-hover-bg-color);
24
+ --#{$namespace}-button-active-color: var(--#{$namespace}-text-color-primary);
25
+ --#{$namespace}-button-hover-text-color: var(--#{$namespace}-color-primary);
26
+ --#{$namespace}-button-hover-border-color: var(--#{$namespace}-color-primary-light-7);
27
+ --#{$namespace}-button-hover-link-text-color: var(--#{$namespace}-color-info);
28
+ --#{$namespace}-button-active-text-color: var(--#{$namespace}-button-hover-text-color);
29
+ --#{$namespace}-button-disabled-text-color: var(--#{$namespace}-disabled-text-color);
30
+ --#{$namespace}-button-disabled-bg-color: var(--#{$namespace}-fill-color-blank);
31
+ --#{$namespace}-button-disabled-border-color: var(--#{$namespace}-border-color-light);
32
+ --#{$namespace}-button-divide-border-color: rgba(255, 255, 255, 0.5);
33
+ --#{$namespace}-button-outline-color: var(--#{$namespace}-color-primary-light-5);
34
+ --#{$namespace}-button-border-radius-round: 20px;
35
+ }
36
+
37
+ .#{$namespace}-button {
38
+ display: inline-flex;
39
+ justify-content: center;
40
+ align-items: center;
41
+ line-height: 1;
42
+ height: 32px;
43
+ white-space: nowrap;
44
+ cursor: pointer;
45
+ background: var(--#{$namespace}-button-bg-color);
46
+ border: 1px var(--#{$namespace}-button-border-style);
47
+ border-color: var(--#{$namespace}-button-border-color);
48
+ color: var(--#{$namespace}-button-text-color);
49
+ // -webkit-appearance: none;
50
+ text-align: center;
51
+ box-sizing: border-box;
52
+ outline: none;
53
+ transition: 0.1s;
54
+ font-weight: 500;
55
+ user-select: none;
56
+ vertical-align: middle;
57
+ padding: 8px 15px;
58
+ font-size: 14px;
59
+ border-radius: 4px;
60
+
61
+ & > span {
62
+ display: inline-flex;
63
+ align-items: center;
64
+ }
65
+
66
+ & + & {
67
+ margin-left: 12px;
68
+ }
69
+
70
+ // @include button-size(
71
+ // map.get($button-padding-vertical, 'default') - $button-border-width,
72
+ // map.get($button-padding-horizontal, 'default') - $button-border-width,
73
+ // map.get($button-font-size, 'default'),
74
+ // map.get($button-border-radius, 'default')
75
+ // );
76
+
77
+ &:hover,
78
+ &:focus {
79
+ color: var(--#{$namespace}-button-hover-text-color, var(--#{$namespace}-color-primary));
80
+ border-color: var(--#{$namespace}-button-hover-border-color);
81
+ background: var(--#{$namespace}-button-hover-bg-color, #ecf5ff);
82
+ outline: none;
83
+ }
84
+
85
+ &:active,
86
+ &.is-active {
87
+ color: var(--#{$namespace}-button-active-text-color, var(--#{$namespace}-color-primary));
88
+ border-color: var(--#{$namespace}-button-active-border-color);
89
+ background: var(--#{$namespace}-button-active-bg-color, #ecf5ff);
90
+ outline: none;
91
+ }
92
+
93
+ &::-moz-focus-inner {
94
+ border: 0;
95
+ }
96
+
97
+ & [class*='#{$namespace}-icon'] {
98
+ & + span {
99
+ margin-left: 6px;
100
+ }
101
+ svg {
102
+ vertical-align: bottom;
103
+ }
104
+ }
105
+
106
+ &.is-plain,
107
+ &.is-dashed {
108
+ --#{$namespace}-button-hover-text-color: var(--#{$namespace}-color-primary);
109
+ --#{$namespace}-button-hover-bg-color: var(--#{$namespace}-fill-color-blank);
110
+ --#{$namespace}-button-hover-border-color: var(--#{$namespace}-color-primary);
111
+ }
112
+
113
+ &.is-dashed {
114
+ --#{$namespace}-button-border-style: dashed;
115
+ --#{$namespace}-button-active-bg-color: var(--#{$namespace}-fill-color-blank);
116
+ --#{$namespace}-button-active-text-color: var(--#{$namespace}-color-primary-light-3);
117
+ --#{$namespace}-button-active-border-color: var(--#{$namespace}-color-primary-light-3);
118
+ }
119
+
120
+ &.is-disabled {
121
+ &,
122
+ &:hover,
123
+ &:focus {
124
+ color: var(--#{$namespace}-button-disabled-text-color, #a8abb2);
125
+ cursor: not-allowed;
126
+ background-image: none;
127
+ background: var(--#{$namespace}-button-disabled-bg-color, #ffffff);
128
+ border-color: var(--#{$namespace}-button-disabled-border-color, #e4e7ed);
129
+ }
130
+ }
131
+
132
+ &.is-loading {
133
+ position: relative;
134
+ pointer-events: none;
135
+
136
+ &:before {
137
+ // mask the button
138
+ z-index: 1;
139
+ pointer-events: none;
140
+ content: '';
141
+ position: absolute;
142
+ left: -1px;
143
+ top: -1px;
144
+ right: -1px;
145
+ bottom: -1px;
146
+ border-radius: inherit;
147
+ background: rgba(255, 255, 255, 0.1);
148
+ }
149
+ }
150
+
151
+ &.is-round {
152
+ border-radius: 20px;
153
+ }
154
+
155
+ &.is-circle {
156
+ border-radius: 50%;
157
+ padding: 8px;
158
+ }
159
+
160
+ &.is-block {
161
+ width: 100%;
162
+ }
163
+
164
+ &.is-text {
165
+ color: var(--#{$namespace}-button-text-color);
166
+ border: 0 solid transparent;
167
+ background: transparent;
168
+
169
+ &.is-disabled {
170
+ color: var(--#{$namespace}-button-disabled-text-color);
171
+ background: transparent;
172
+ }
173
+
174
+ &:not(.is-disabled) {
175
+ &:hover,
176
+ &:focus {
177
+ background: var(--#{$namespace}-fill-color-light);
178
+ }
179
+
180
+ &:focus-visible {
181
+ outline: 2px solid var(--#{$namespace}-button-outline-color);
182
+ outline-offset: 1px;
183
+ }
184
+
185
+ &:active {
186
+ background: var(--#{$namespace}-fill-color);
187
+ }
188
+
189
+ &.is-has-bg {
190
+ background: var(--#{$namespace}-fill-color-light);
191
+
192
+ &:hover,
193
+ &:focus {
194
+ background: var(--#{$namespace}-fill-color);
195
+ }
196
+
197
+ &:active {
198
+ background: var(--#{$namespace}-fill-color-dark);
199
+ }
200
+ }
201
+ }
202
+ }
203
+
204
+ &.is-link {
205
+ border-color: transparent;
206
+ color: var(--#{$namespace}-button-text-color);
207
+ background: transparent;
208
+ padding: 2px;
209
+ height: auto;
210
+
211
+ &:hover,
212
+ &:focus {
213
+ color: var(--#{$namespace}-button-hover-link-text-color);
214
+ }
215
+
216
+ &.is-disabled {
217
+ color: var(--#{$namespace}-button-disabled-text-color);
218
+ background: transparent;
219
+ border-color: transparent;
220
+ }
221
+
222
+ &:not(.is-disabled) {
223
+ &:hover,
224
+ &:focus {
225
+ border-color: transparent;
226
+ background: transparent;
227
+ }
228
+
229
+ &:active {
230
+ color: var(--#{$namespace}-button-active-color);
231
+ border-color: transparent;
232
+ background: transparent;
233
+ }
234
+ }
235
+ }
236
+ }
237
+
238
+ .#{$namespace}-button__text--expand {
239
+ letter-spacing: 0.3em;
240
+ margin-right: -0.3em;
241
+ }
242
+
243
+ .#{$namespace}-button--primary {
244
+ --#{$namespace}-button-text-color: var(--#{$namespace}-color-white);
245
+ --#{$namespace}-button-bg-color: var(--#{$namespace}-bg-color-primary, var(--#{$namespace}-color-primary));
246
+ --#{$namespace}-button-border-color: var(--btn-border-color, #4f8ffa);
247
+ --#{$namespace}-button-hover-text-color: var(--#{$namespace}-color-white);
248
+ --#{$namespace}-button-hover-bg-color: var(--#{$namespace}-bg-color-primary, #79bbff);
249
+ --#{$namespace}-button-hover-border-color: var(--btn-border-color, #79bbff);
250
+ --#{$namespace}-button-hover-link-text-color: var(--#{$namespace}-color-primary-light-5);
251
+ --#{$namespace}-button-active-text-color: var(--#{$namespace}-color-white);
252
+ --#{$namespace}-button-active-bg-color: var(--#{$namespace}-bg-color-primary, #337ecc);
253
+ --#{$namespace}-button-active-border-color: var(--btn-border-color, #337ecc);
254
+ --#{$namespace}-button-disabled-text-color: var(--#{$namespace}-color-white);
255
+ --#{$namespace}-button-disabled-bg-color: var(--#{$namespace}-bg-color-primary, #a0cfff);
256
+ --#{$namespace}-button-disabled-border-color: var(--btn-border-color, #a0cfff);
257
+ // 我是默认按钮悬浮透明度
258
+ --#{$namespace}-button-hover-opacity: 0.8;
259
+ // 我是默认按钮禁用状态透明度
260
+ --#{$namespace}-button--disabled-opacity: 0.5;
261
+
262
+ &:hover,
263
+ &:focus {
264
+ opacity: var(--#{$namespace}-button-hover-opacity, 1);
265
+ }
266
+
267
+ &:active,
268
+ &.is-active {
269
+ opacity: calc(var(--#{$namespace}-button-hover-opacity, 1) * 10);
270
+ }
271
+
272
+ &.is-disabled {
273
+ &,
274
+ &:hover,
275
+ &:focus {
276
+ opacity: var(--#{$namespace}-button--disabled-opacity, 1);
277
+ }
278
+ }
279
+
280
+ &.is-plain {
281
+ --#{$namespace}-button-text-color: var(--#{$namespace}-color-primary);
282
+ --#{$namespace}-button-bg-color: var(--#{$namespace}-color-primary-light-9, #ecf5ff);
283
+ --#{$namespace}-button-border-color: var(--#{$namespace}-color-primary-light-5, #a0cfff);
284
+ --#{$namespace}-button-hover-text-color: var(--#{$namespace}-color-white);
285
+ --#{$namespace}-button-hover-bg-color: var(--#{$namespace}-bg-color-primary, var(--#{$namespace}-color-primary));
286
+ --#{$namespace}-button-hover-border-color: var(--btn-border-color, #4f8ffa);
287
+
288
+ &.is-disabled,
289
+ &.is-disabled:hover,
290
+ &.is-disabled:focus,
291
+ &.is-disabled:active {
292
+ color: var(--#{$namespace}-color-primary-light-5, #a0cfff);
293
+ background: var(--#{$namespace}-color-primary-light-9, #ecf5ff);
294
+ border-color: var(--#{$namespace}-color-primary-light-8, #d9ecff);
295
+ opacity: 1;
296
+ }
297
+ }
298
+
299
+ &.is-dashed {
300
+ --#{$namespace}-button-text-color: var(--#{$namespace}-color-primary);
301
+ --#{$namespace}-button-bg-color: var(--#{$namespace}-fill-color-blank);
302
+ --#{$namespace}-button-hover-text-color: var(--#{$namespace}-color-primary);
303
+ --#{$namespace}-button-hover-bg-color: var(--#{$namespace}-fill-color-blank);
304
+ --#{$namespace}-button-hover-border-color: var(--btn-border-color);
305
+ --#{$namespace}-button-active-text-color: var(--#{$namespace}-color-primary);
306
+ --#{$namespace}-button-active-border-color: var(--#{$namespace}-color-primary);
307
+
308
+ &.is-disabled,
309
+ &.is-disabled:hover,
310
+ &.is-disabled:focus,
311
+ &.is-disabled:active {
312
+ color: var(--#{$namespace}-color-primary-light-5, #a0cfff);
313
+ background: var(--#{$namespace}-fill-color-blank);
314
+ border-color: var(--#{$namespace}-color-primary-light-8, #d9ecff);
315
+ opacity: 1;
316
+ }
317
+ }
318
+
319
+ &.is-link,
320
+ &.is-text {
321
+ --#{$namespace}-button-text-color: var(--#{$namespace}-color-primary);
322
+ --#{$namespace}-button-bg-color: var(--#{$namespace}-color-primary-light-9, #ecf5ff);
323
+ --#{$namespace}-button-border-color: var(--#{$namespace}-color-primary-light-5, #a0cfff);
324
+ --#{$namespace}-button-hover-text-color: var(--#{$namespace}-color-white);
325
+ --#{$namespace}-button-hover-bg-color: var(--#{$namespace}-bg-color-primary, var(--#{$namespace}-color-primary));
326
+ --#{$namespace}-button-hover-border-color: var(--btn-border-color, #4f8ffa);
327
+
328
+ &.is-disabled,
329
+ &.is-disabled:hover,
330
+ &.is-disabled:focus,
331
+ &.is-disabled:active {
332
+ color: var(--#{$namespace}-color-primary-light-5, #a0cfff);
333
+ opacity: 1;
334
+ }
335
+ }
336
+ }
337
+
338
+ @each $type in (success, warning, danger, error, info) {
339
+ .#{$namespace}-button--#{$type} {
340
+ @include button-variant($type);
341
+ }
342
+ }
343
+
344
+ .#{$namespace}-button--large {
345
+ height: var(--#{$namespace}-component-size-large);
346
+ padding: 12px 19px;
347
+ font-size: 14px;
348
+ border-radius: 4px;
349
+
350
+ [class*='#{$namespace}-icon'] + span {
351
+ margin-left: 8px;
352
+ }
353
+
354
+ &.is-round {
355
+ padding: 12px 19px;
356
+ }
357
+
358
+ &.is-circle {
359
+ width: var(--#{$namespace}-component-size-large);
360
+ padding: 12px;
361
+ }
362
+ }
363
+
364
+ .#{$namespace}-button--small {
365
+ height: var(--#{$namespace}-component-size-small);
366
+ padding: 5px 11px;
367
+ font-size: 12px;
368
+ border-radius: 3px;
369
+ }
370
+
371
+ .#{$namespace}-button--small [class*='#{$namespace}-icon'] + span {
372
+ margin-left: 4px;
373
+ }
374
+
375
+ .#{$namespace}-button--small.is-round {
376
+ padding: 5px 11px;
377
+ }
378
+
379
+ .#{$namespace}-button--small.is-circle {
380
+ width: var(--#{$namespace}-component-size-small);
381
+ padding: 5px;
382
+ }
@@ -0,0 +1,2 @@
1
+ @use './button.scss';
2
+ @use './button-group.scss';
@@ -0,0 +1,80 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'common/var' as *;
4
+ @use 'mixins/mixins' as *;
5
+ @use 'mixins/utils' as *;
6
+
7
+ @include b(button-group) {
8
+ display: inline-block;
9
+ vertical-align: middle;
10
+ @include utils-clearfix;
11
+
12
+ & > .#{$namespace}-button {
13
+ float: left;
14
+ position: relative;
15
+ & + .#{$namespace}-button {
16
+ margin-left: 0;
17
+ }
18
+ &:first-child {
19
+ border-top-right-radius: 0;
20
+ border-bottom-right-radius: 0;
21
+ }
22
+ &:last-child {
23
+ border-top-left-radius: 0;
24
+ border-bottom-left-radius: 0;
25
+ }
26
+ &:first-child:last-child {
27
+ border-top-right-radius: map.get($button-border-radius, 'default');
28
+ border-bottom-right-radius: map.get($button-border-radius, 'default');
29
+ border-top-left-radius: map.get($button-border-radius, 'default');
30
+ border-bottom-left-radius: map.get($button-border-radius, 'default');
31
+
32
+ &.is-round {
33
+ border-radius: getCssVar('border-radius', 'round');
34
+ }
35
+
36
+ &.is-circle {
37
+ border-radius: 50%;
38
+ }
39
+ }
40
+ &:not(:first-child):not(:last-child) {
41
+ border-radius: 0;
42
+ }
43
+ &:not(:last-child) {
44
+ margin-right: -1px;
45
+ }
46
+
47
+ &:hover,
48
+ &:focus,
49
+ &:active {
50
+ z-index: 1;
51
+ }
52
+
53
+ @include when(active) {
54
+ z-index: 1;
55
+ }
56
+ }
57
+
58
+ & > .#{$namespace}-dropdown {
59
+ & > .#{$namespace}-button {
60
+ border-top-left-radius: 0;
61
+ border-bottom-left-radius: 0;
62
+ border-left-color: getCssVar('button', 'divide-border-color');
63
+ }
64
+ }
65
+
66
+ @each $type in (primary, success, warning, danger, info) {
67
+ .#{$namespace}-button--#{$type} {
68
+ &:first-child {
69
+ border-right-color: getCssVar('button', 'divide-border-color');
70
+ }
71
+ &:last-child {
72
+ border-left-color: getCssVar('button', 'divide-border-color');
73
+ }
74
+ &:not(:first-child):not(:last-child) {
75
+ border-left-color: getCssVar('button', 'divide-border-color');
76
+ border-right-color: getCssVar('button', 'divide-border-color');
77
+ }
78
+ }
79
+ }
80
+ }