@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
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import './locale/i18n';
2
2
  export { Link as ElLink } from './Link';
3
- export type { LinkProps as ElLinkProps } from './Link';
3
+ export type { LinkProps } from './Link';
4
4
  export { Button as ElButton } from './Button';
5
5
  export type { ButtonGroupProps, ButtonProps } from './Button';
6
6
  export { Col as ElCol } from './Col';
7
- export type { ColProps as ElColProps } from './Col';
7
+ export type { ColProps } from './Col';
8
8
  export { Icon as ElIcon } from './Icon';
9
9
  export type { IconName, IconPrefix, IconProps } from './Icon';
10
10
  export * from './Icon/IconList';
11
11
  export { Row as ElRow, RowContext } from './Row';
12
- export type { RowProps as ElRowProps } from './Row';
12
+ export type { RowProps } from './Row';
13
13
  export { Scrollbar as ElScrollbar } from './Scrollbar';
14
14
  export type { BarProps, ScrollbarProps, ScrollbarRef } from './Scrollbar';
15
15
  export { Popper as ElPopper } from './Popper';
@@ -105,8 +105,8 @@ export type { PopoverProps } from './Popover';
105
105
  export { Divider as ElDivider } from './Divider';
106
106
  export type { DividerProps } from './Divider';
107
107
  export { PopupManager, download, genFileId, generateTree, getScrollWidth, isEmpty, isNotEmpty, randomCode } from './Util';
108
- export * from './hooks';
108
+ export { htmlInputAttrs, htmlInputEvents, htmlInputProps, partitionAnimationProps, partitionHTMLProps, partitionPopperPropsUtils, partitionTreePropsUtils, prefix, useChildrenInstance, useClassNames, useClickOutside, useComponentWillMount, useControlled, useDisabled, useForceUpdate, useSize, } from './hooks';
109
109
  export type { AnimationEventProps, BaseProps, FormControlBaseProps, NativeProps, StandardProps, TooltipBaseProps, TypeAttributes } from './types/common';
110
110
  /** 全局配置 */
111
- export { ConfigProvider } from './ConfigProvider';
111
+ export { ConfigProvider as ElConfigProvider } from './ConfigProvider';
112
112
  export type { ConfigProviderProps } from './ConfigProvider';
package/dist/index.js CHANGED
@@ -64,9 +64,9 @@ export { Popover as ElPopover } from "./Popover";
64
64
  export { Divider as ElDivider } from "./Divider";
65
65
  /* 工具库与hooks */
66
66
  export { PopupManager, download, genFileId, generateTree, getScrollWidth, isEmpty, isNotEmpty, randomCode } from "./Util";
67
- export * from "./hooks";
67
+ export { htmlInputAttrs, htmlInputEvents, htmlInputProps, partitionAnimationProps, partitionHTMLProps, partitionPopperPropsUtils, partitionTreePropsUtils, prefix, useChildrenInstance, useClassNames, useClickOutside, useComponentWillMount, useControlled, useDisabled, useForceUpdate, useSize } from "./hooks";
68
68
 
69
69
  /* 通用types */
70
70
 
71
71
  /** 全局配置 */
72
- export { ConfigProvider } from "./ConfigProvider";
72
+ export { ConfigProvider as ElConfigProvider } from "./ConfigProvider";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qsxy/element-plus-react",
3
- "version": "1.0.0-next.18",
3
+ "version": "1.0.0-next.21",
4
4
  "description": "element-plus-react",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -38,7 +38,6 @@
38
38
  "react-i18next": "^15.5.3",
39
39
  "react-is": "^19.0.0",
40
40
  "react-popper": "^2.3.0",
41
- "react-router-dom": "^6.22.1",
42
41
  "react-sortable-hoc": "^2.0.0",
43
42
  "resize-observer-polyfill": "^1.5.1",
44
43
  "scroll-into-view-if-needed": "^3.1.0"
@@ -1,4 +1,4 @@
1
- @use '../common/var';
1
+ @use './mixins/config' as *;
2
2
 
3
3
  .#{$namespace}-avatar {
4
4
  --#{$namespace}-avatar-text-color: var(--#{$namespace}-color-white);
@@ -1,4 +1,4 @@
1
- @use '../common/var';
1
+ @use './mixins/config' as *;
2
2
 
3
3
  @use 'sass:math';
4
4
  @use 'sass:map';
@@ -1,4 +1,4 @@
1
- @use '../common/var';
1
+ @use './mixins/config' as *;
2
2
 
3
3
  .#{$namespace}-breadcrumb {
4
4
  font-size: 14px;
@@ -1,2 +1,2 @@
1
1
  $fa-font-path: './fonts' !default;
2
- @import './index.scss';
2
+ @use './index.scss';
@@ -1,5 +1,5 @@
1
1
  @use 'sass:map';
2
- @use '../common/var';
2
+ @use '../mixins/config' as *;
3
3
 
4
4
  // join var name
5
5
  // joinVarName(('button', 'text-color')) => '--el-button-text-color'
@@ -170,7 +170,7 @@
170
170
  // 'color',
171
171
  // $type,
172
172
  // 'transparent',
173
- // ),,,,,,,,,,,
173
+ // ),,,,,,,,,,,,,,
174
174
  ),
175
175
  'hover': (
176
176
  'text-color': (
@@ -184,7 +184,7 @@
184
184
  // 'border-color': (
185
185
  // 'color',
186
186
  // $type,
187
- // ),,,,,,,,,,,
187
+ // ),,,,,,,,,,,,,,
188
188
  ),
189
189
  'active': (
190
190
  'text-color': (
@@ -1,4 +1,4 @@
1
- @use '../common/var';
1
+ @use '../mixins/config' as *;
2
2
  .#{$namespace}-button-group {
3
3
  display: inline-block;
4
4
  vertical-align: middle;
@@ -1,7 +1,7 @@
1
- @use '../common/var';
1
+ @use '../mixins/config' as *;
2
2
 
3
3
  @use 'sass:map';
4
- @import './mixins';
4
+ @use './mixins' as *;
5
5
 
6
6
  $button-icon-span-gap: () !default;
7
7
  $button-icon-span-gap: map.merge(
@@ -1,2 +1,2 @@
1
- @import './button.scss';
2
- @import './button-group.scss';
1
+ @use './button.scss';
2
+ @use './button-group.scss';
@@ -0,0 +1,317 @@
1
+ @use 'sass:map';
2
+ @use '../mixins/config' as *;
3
+
4
+ // join var name
5
+ // joinVarName(('button', 'text-color')) => '--el-button-text-color'
6
+ @function joinVarName($list) {
7
+ $name: '--el';
8
+ @each $item in $list {
9
+ @if $item != '' {
10
+ $name: $name + '-' + $item;
11
+ }
12
+ }
13
+ @return $name;
14
+ }
15
+
16
+ // getCssVar('button', 'text-color') => var(--el-button-text-color)
17
+ @function getCssVar($args...) {
18
+ @return var(#{joinVarName($args)});
19
+ }
20
+
21
+ // set css var value, because we need translate value to string
22
+ // for example:
23
+ // @include set-css-var-value(('color', 'primary'), red);
24
+ // --el-color-primary: red;
25
+ @mixin set-css-var-value($name, $value) {
26
+ #{joinVarName($name)}: #{$value};
27
+ }
28
+
29
+ // generate css var from existing css var
30
+ // for example:
31
+ // @include css-var-from-global(('button', 'text-color'), ('color', $type))
32
+ // --el-button-text-color: var(--el-color-#{$type});
33
+ @mixin css-var-from-global($var, $gVar) {
34
+ $varName: joinVarName($var);
35
+ $gVarName: joinVarName($gVar);
36
+ #{$varName}: var(#{$gVarName});
37
+ }
38
+
39
+ @mixin button-plain($type) {
40
+ $button-color-types: (
41
+ '': (
42
+ 'text-color': (
43
+ 'color',
44
+ $type,
45
+ ),
46
+ 'bg-color': (
47
+ 'color',
48
+ $type,
49
+ 'light-9',
50
+ ),
51
+ 'border-color': (
52
+ 'color',
53
+ $type,
54
+ 'light-5',
55
+ ),
56
+ ),
57
+ 'hover': (
58
+ 'text-color': (
59
+ 'color',
60
+ 'white',
61
+ ),
62
+ 'bg-color': (
63
+ 'color',
64
+ $type,
65
+ ),
66
+ 'border-color': (
67
+ 'color',
68
+ $type,
69
+ ),
70
+ ),
71
+ 'active': (
72
+ 'text-color': (
73
+ 'color',
74
+ 'white',
75
+ ),
76
+ ),
77
+ );
78
+
79
+ @each $type, $typeMap in $button-color-types {
80
+ @each $typeColor, $list in $typeMap {
81
+ @include css-var-from-global(('button', $type, $typeColor), $list);
82
+ }
83
+ }
84
+
85
+ &.is-disabled {
86
+ &,
87
+ &:hover,
88
+ &:focus,
89
+ &:active {
90
+ color: getCssVar('color', $type, 'light-5');
91
+ background-color: getCssVar('color', $type, 'light-9');
92
+ border-color: getCssVar('color', $type, 'light-8');
93
+ }
94
+ }
95
+ }
96
+
97
+ @mixin button-dashed($type) {
98
+ $button-color-types: (
99
+ '': (
100
+ 'text-color': (
101
+ 'color',
102
+ $type,
103
+ ),
104
+ 'bg-color': (
105
+ 'fill-color-blank',
106
+ ),
107
+ 'border-color': (
108
+ 'color',
109
+ $type,
110
+ ),
111
+ ),
112
+ 'hover': (
113
+ 'text-color': (
114
+ 'color',
115
+ $type,
116
+ 'light-3',
117
+ ),
118
+ 'bg-color': (
119
+ 'fill-color-blank',
120
+ ),
121
+ 'border-color': (
122
+ 'color',
123
+ $type,
124
+ 'light-3',
125
+ ),
126
+ ),
127
+ 'active': (
128
+ 'text-color': (
129
+ 'color',
130
+ $type,
131
+ ),
132
+ 'border-color': (
133
+ 'color',
134
+ $type,
135
+ ),
136
+ ),
137
+ );
138
+
139
+ @each $type, $typeMap in $button-color-types {
140
+ @each $typeColor, $list in $typeMap {
141
+ @include css-var-from-global(('button', $type, $typeColor), $list);
142
+ }
143
+ }
144
+
145
+ &.is-disabled {
146
+ &,
147
+ &:hover,
148
+ &:focus,
149
+ &:active {
150
+ color: getCssVar('color', $type, 'light-5');
151
+ background-color: var(--#{$namespace}-fill-color-blank);
152
+ border-color: getCssVar('color', $type, 'light-8');
153
+ }
154
+ }
155
+ }
156
+
157
+ @mixin button-link($type) {
158
+ $button-color-types: (
159
+ '': (
160
+ 'text-color': (
161
+ 'color',
162
+ $type,
163
+ ),
164
+ // 'bg-color': (
165
+ // 'color',
166
+ // $type,
167
+ // 'light-9',
168
+ // ),
169
+ // 'border-color': (
170
+ // 'color',
171
+ // $type,
172
+ // 'transparent',
173
+ // ),,,,,,,,,,,,,,
174
+ ),
175
+ 'hover': (
176
+ 'text-color': (
177
+ 'color',
178
+ 'white',
179
+ ),
180
+ // 'bg-color': (
181
+ // 'color',
182
+ // $type,
183
+ // ),
184
+ // 'border-color': (
185
+ // 'color',
186
+ // $type,
187
+ // ),,,,,,,,,,,,,,
188
+ ),
189
+ 'active': (
190
+ 'text-color': (
191
+ 'color',
192
+ 'white',
193
+ ),
194
+ ),
195
+ );
196
+
197
+ @each $type, $typeMap in $button-color-types {
198
+ @each $typeColor, $list in $typeMap {
199
+ @include css-var-from-global(('button', $type, $typeColor), $list);
200
+ }
201
+ }
202
+
203
+ &.is-disabled {
204
+ &,
205
+ &:hover,
206
+ &:focus,
207
+ &:active {
208
+ color: getCssVar('color', $type, 'light-5');
209
+ }
210
+ }
211
+ }
212
+
213
+ @mixin button-variant($type) {
214
+ $button-color-types: (
215
+ '': (
216
+ 'text-color': (
217
+ 'color',
218
+ 'white',
219
+ ),
220
+ 'bg-color': (
221
+ 'color',
222
+ $type,
223
+ ),
224
+ 'border-color': (
225
+ 'color',
226
+ $type,
227
+ ),
228
+ 'outline-color': (
229
+ 'color',
230
+ $type,
231
+ 'light-5',
232
+ ),
233
+ 'active-color': (
234
+ 'color',
235
+ $type,
236
+ 'dark-2',
237
+ ),
238
+ ),
239
+ 'hover': (
240
+ 'text-color': (
241
+ 'color',
242
+ 'white',
243
+ ),
244
+ 'link-text-color': (
245
+ 'color',
246
+ $type,
247
+ 'light-5',
248
+ ),
249
+ 'bg-color': (
250
+ 'color',
251
+ $type,
252
+ 'light-3',
253
+ ),
254
+ 'border-color': (
255
+ 'color',
256
+ $type,
257
+ 'light-3',
258
+ ),
259
+ ),
260
+ 'active': (
261
+ 'bg-color': (
262
+ 'color',
263
+ $type,
264
+ 'dark-2',
265
+ ),
266
+ 'border-color': (
267
+ 'color',
268
+ $type,
269
+ 'dark-2',
270
+ ),
271
+ ),
272
+ 'disabled': (
273
+ 'text-color': (
274
+ 'color',
275
+ 'white',
276
+ ),
277
+ 'bg-color': (
278
+ 'color',
279
+ $type,
280
+ 'light-5',
281
+ ),
282
+ 'border-color': (
283
+ 'color',
284
+ $type,
285
+ 'light-5',
286
+ ),
287
+ ),
288
+ );
289
+
290
+ @each $type, $typeMap in $button-color-types {
291
+ @each $typeColor, $list in $typeMap {
292
+ @include css-var-from-global(('button', $type, $typeColor), $list);
293
+ }
294
+ }
295
+
296
+ &.is-plain {
297
+ @include button-plain($type);
298
+ }
299
+
300
+ &.is-dashed {
301
+ @include button-dashed($type);
302
+ }
303
+
304
+ &.is-text,
305
+ &.is-link {
306
+ @include button-link($type);
307
+ }
308
+ }
309
+
310
+ @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
311
+ padding: $padding-vertical $padding-horizontal;
312
+ font-size: $font-size;
313
+ border-radius: $border-radius;
314
+ &.is-round {
315
+ padding: $padding-vertical $padding-horizontal;
316
+ }
317
+ }
@@ -0,0 +1,83 @@
1
+ @use '../mixins/config' as *;
2
+ .#{$namespace}-button-group {
3
+ display: inline-block;
4
+ vertical-align: middle;
5
+
6
+ &::before,
7
+ &::after {
8
+ display: table;
9
+ content: '';
10
+ }
11
+ &::after {
12
+ clear: both;
13
+ }
14
+
15
+ & > .#{$namespace}-button {
16
+ float: left;
17
+ position: relative;
18
+ & + .#{$namespace}-button {
19
+ margin-left: 0;
20
+ }
21
+ &:first-child {
22
+ border-top-right-radius: 0;
23
+ border-bottom-right-radius: 0;
24
+ }
25
+ &:last-child {
26
+ border-top-left-radius: 0;
27
+ border-bottom-left-radius: 0;
28
+ }
29
+ &:first-child:last-child {
30
+ border-top-right-radius: 4px;
31
+ border-bottom-right-radius: 4px;
32
+ border-top-left-radius: 4px;
33
+ border-bottom-left-radius: 4px;
34
+
35
+ &.is-round {
36
+ border-radius: var(--#{$namespace}-button-border-radius-round);
37
+ }
38
+
39
+ &.is-circle {
40
+ border-radius: 50%;
41
+ }
42
+ }
43
+ &:not(:first-child):not(:last-child) {
44
+ border-radius: 0;
45
+ }
46
+ &:not(:last-child) {
47
+ margin-right: -1px;
48
+ }
49
+
50
+ &:hover,
51
+ &:focus,
52
+ &:active {
53
+ z-index: 1;
54
+ }
55
+
56
+ &.is-active {
57
+ z-index: 1;
58
+ }
59
+ }
60
+
61
+ & > .#{$namespace}-dropdown {
62
+ & > .#{$namespace}-button {
63
+ border-top-left-radius: 0;
64
+ border-bottom-left-radius: 0;
65
+ border-left-color: var(--#{$namespace}-button-divide-border-color);
66
+ }
67
+ }
68
+
69
+ @each $type in (primary, success, warning, danger, info) {
70
+ .#{$namespace}-button--#{$type} {
71
+ &:first-child {
72
+ border-right-color: var(--#{$namespace}-button-divide-border-color) !important;
73
+ }
74
+ &:last-child {
75
+ border-left-color: var(--#{$namespace}-button-divide-border-color) !important;
76
+ }
77
+ &:not(:first-child):not(:last-child) {
78
+ border-left-color: var(--#{$namespace}-button-divide-border-color) !important;
79
+ border-right-color: var(--#{$namespace}-button-divide-border-color) !important;
80
+ }
81
+ }
82
+ }
83
+ }