@qsxy/element-plus-react 1.0.0-next.11 → 1.0.0-next.13

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 (177) hide show
  1. package/dist/Avatar/Avatar.d.ts +2 -2
  2. package/dist/Avatar/Avatar.js +13 -6
  3. package/dist/Badge/Badge.d.ts +1 -1
  4. package/dist/Badge/Badge.js +15 -3
  5. package/dist/Checkbox/Checkbox.js +14 -12
  6. package/dist/Checkbox/CheckboxButton.js +15 -14
  7. package/dist/Checkbox/typings.d.ts +2 -1
  8. package/dist/Dropdown/Dropdown.d.ts +3 -3
  9. package/dist/Dropdown/Dropdown.js +20 -6
  10. package/dist/Dropdown/typings.d.ts +8 -1
  11. package/dist/Input/Input.js +3 -2
  12. package/dist/Input/typings.d.ts +1 -1
  13. package/dist/InputNumber/InputNumber.d.ts +2 -2
  14. package/dist/InputNumber/InputNumber.js +10 -5
  15. package/dist/Loading/Loading.d.ts +7 -2
  16. package/dist/Loading/Loading.js +108 -57
  17. package/dist/Loading/typings.d.ts +7 -1
  18. package/dist/Message/Main.d.ts +0 -7
  19. package/dist/Message/Main.js +0 -7
  20. package/dist/Message/Message.d.ts +2 -2
  21. package/dist/Message/Message.js +4 -3
  22. package/dist/Message/index.d.ts +0 -8
  23. package/dist/Message/index.js +5 -9
  24. package/dist/MessageBox/MessageBox.js +2 -1
  25. package/dist/MessageBox/index.d.ts +5 -5
  26. package/dist/MessageBox/index.js +1 -0
  27. package/dist/Notification/Main.d.ts +0 -7
  28. package/dist/Notification/Main.js +0 -7
  29. package/dist/Popover/Popover.d.ts +3 -2
  30. package/dist/Popover/Popover.js +10 -5
  31. package/dist/Popover/typings.d.ts +0 -1
  32. package/dist/Radio/Radio.js +14 -10
  33. package/dist/Radio/RadioButton.d.ts +2 -2
  34. package/dist/Radio/RadioButton.js +14 -4
  35. package/dist/Radio/typings.d.ts +2 -1
  36. package/dist/Switch/Switch.js +9 -3
  37. package/dist/Table/Table.d.ts +0 -1
  38. package/dist/Table/Table.js +1 -1
  39. package/dist/Table/hooks/useSelection.d.ts +1 -1
  40. package/dist/Tag/Tag.js +19 -8
  41. package/dist/TimePicker/TimeSpinnerPanel.js +5 -5
  42. package/dist/Tooltip/Tooltip.d.ts +3 -3
  43. package/dist/Tooltip/Tooltip.js +6 -6
  44. package/dist/Upload/use-handlers.d.ts +1 -1
  45. package/dist/index.css +1 -1
  46. package/package.json +1 -1
  47. package/theme-chalk/message/index.scss +11 -3
  48. package/dist/theme-chalk/avatar/index.scss +0 -50
  49. package/dist/theme-chalk/badge/index.scss +0 -63
  50. package/dist/theme-chalk/breadcrumb/index.scss +0 -65
  51. package/dist/theme-chalk/build.scss +0 -2
  52. package/dist/theme-chalk/button/_mixins.scss +0 -317
  53. package/dist/theme-chalk/button/button-group.scss +0 -83
  54. package/dist/theme-chalk/button/button.scss +0 -382
  55. package/dist/theme-chalk/button/index.scss +0 -2
  56. package/dist/theme-chalk/calendar/date-picker.scss +0 -112
  57. package/dist/theme-chalk/calendar/date-range-picker.scss +0 -139
  58. package/dist/theme-chalk/calendar/date-table.scss +0 -156
  59. package/dist/theme-chalk/calendar/index.scss +0 -6
  60. package/dist/theme-chalk/calendar/month-table.scss +0 -92
  61. package/dist/theme-chalk/calendar/picker-panel.scss +0 -136
  62. package/dist/theme-chalk/calendar/year-table.scss +0 -107
  63. package/dist/theme-chalk/card/index.scss +0 -44
  64. package/dist/theme-chalk/carousel/index.scss +0 -237
  65. package/dist/theme-chalk/cascader/cascader-panel.scss +0 -184
  66. package/dist/theme-chalk/cascader/cascader.scss +0 -239
  67. package/dist/theme-chalk/cascader/index.scss +0 -2
  68. package/dist/theme-chalk/checkbox/index.scss +0 -255
  69. package/dist/theme-chalk/checkbox-button/index.scss +0 -117
  70. package/dist/theme-chalk/checkbox-group/index.scss +0 -33
  71. package/dist/theme-chalk/col/_mixins.scss +0 -62
  72. package/dist/theme-chalk/col/index.scss +0 -50
  73. package/dist/theme-chalk/collapse/index.scss +0 -84
  74. package/dist/theme-chalk/color-picker/index.scss +0 -340
  75. package/dist/theme-chalk/common/_var.scss +0 -6
  76. package/dist/theme-chalk/common/index.d.ts +0 -1
  77. package/dist/theme-chalk/common/index.js +0 -1
  78. package/dist/theme-chalk/common/index.scss +0 -222
  79. package/dist/theme-chalk/date-picker/index.scss +0 -253
  80. package/dist/theme-chalk/date-time-picker/index.scss +0 -3
  81. package/dist/theme-chalk/date-time-picker/time-picker.scss +0 -83
  82. package/dist/theme-chalk/date-time-picker/time-range-picker.scss +0 -32
  83. package/dist/theme-chalk/descriptions/descriptions-item.scss +0 -66
  84. package/dist/theme-chalk/descriptions/descriptions.scss +0 -160
  85. package/dist/theme-chalk/descriptions/index.scss +0 -2
  86. package/dist/theme-chalk/dev.scss +0 -2
  87. package/dist/theme-chalk/dialog/index.scss +0 -190
  88. package/dist/theme-chalk/display.scss +0 -46
  89. package/dist/theme-chalk/divider/index.scss +0 -51
  90. package/dist/theme-chalk/doc.scss +0 -2
  91. package/dist/theme-chalk/drawer/index.scss +0 -250
  92. package/dist/theme-chalk/dropdown/index.scss +0 -147
  93. package/dist/theme-chalk/empty/index.scss +0 -69
  94. package/dist/theme-chalk/fonts/fa-brands-400.ttf +0 -0
  95. package/dist/theme-chalk/fonts/fa-brands-400.woff2 +0 -0
  96. package/dist/theme-chalk/fonts/fa-duotone-900.ttf +0 -0
  97. package/dist/theme-chalk/fonts/fa-duotone-900.woff2 +0 -0
  98. package/dist/theme-chalk/fonts/fa-light-300.ttf +0 -0
  99. package/dist/theme-chalk/fonts/fa-light-300.woff2 +0 -0
  100. package/dist/theme-chalk/fonts/fa-regular-400.ttf +0 -0
  101. package/dist/theme-chalk/fonts/fa-regular-400.woff2 +0 -0
  102. package/dist/theme-chalk/fonts/fa-solid-900.ttf +0 -0
  103. package/dist/theme-chalk/fonts/fa-solid-900.woff2 +0 -0
  104. package/dist/theme-chalk/fonts/fa-thin-100.ttf +0 -0
  105. package/dist/theme-chalk/fonts/fa-thin-100.woff2 +0 -0
  106. package/dist/theme-chalk/fonts/fa-v4compatibility.ttf +0 -0
  107. package/dist/theme-chalk/fonts/fa-v4compatibility.woff2 +0 -0
  108. package/dist/theme-chalk/form/index.scss +0 -378
  109. package/dist/theme-chalk/icon/fonts.scss +0 -9
  110. package/dist/theme-chalk/icon/index.scss +0 -44
  111. package/dist/theme-chalk/icon/scss/_animated.scss +0 -205
  112. package/dist/theme-chalk/icon/scss/_bordered-pulled.scss +0 -20
  113. package/dist/theme-chalk/icon/scss/_core.scss +0 -33
  114. package/dist/theme-chalk/icon/scss/_duotone-icons.scss +0 -12
  115. package/dist/theme-chalk/icon/scss/_fixed-width.scss +0 -7
  116. package/dist/theme-chalk/icon/scss/_functions.scss +0 -57
  117. package/dist/theme-chalk/icon/scss/_icons.scss +0 -11
  118. package/dist/theme-chalk/icon/scss/_list.scss +0 -20
  119. package/dist/theme-chalk/icon/scss/_mixins.scss +0 -102
  120. package/dist/theme-chalk/icon/scss/_rotated-flipped.scss +0 -31
  121. package/dist/theme-chalk/icon/scss/_screen-reader.scss +0 -14
  122. package/dist/theme-chalk/icon/scss/_shims.scss +0 -2606
  123. package/dist/theme-chalk/icon/scss/_sizing.scss +0 -16
  124. package/dist/theme-chalk/icon/scss/_stacked.scss +0 -32
  125. package/dist/theme-chalk/icon/scss/_variables.scss +0 -9189
  126. package/dist/theme-chalk/icon/scss/brands.scss +0 -27
  127. package/dist/theme-chalk/icon/scss/duotone.scss +0 -72
  128. package/dist/theme-chalk/icon/scss/fontawesome.scss +0 -13
  129. package/dist/theme-chalk/icon/scss/index.scss +0 -15
  130. package/dist/theme-chalk/icon/scss/light.scss +0 -21
  131. package/dist/theme-chalk/icon/scss/regular.scss +0 -21
  132. package/dist/theme-chalk/icon/scss/solid.scss +0 -21
  133. package/dist/theme-chalk/icon/scss/thin.scss +0 -21
  134. package/dist/theme-chalk/icon/scss/v4-shims.scss +0 -3
  135. package/dist/theme-chalk/index.scss +0 -67
  136. package/dist/theme-chalk/input/_mixins.scss +0 -16
  137. package/dist/theme-chalk/input/index.scss +0 -3
  138. package/dist/theme-chalk/input/input-range.scss +0 -208
  139. package/dist/theme-chalk/input/input.scss +0 -577
  140. package/dist/theme-chalk/input-number/index.scss +0 -172
  141. package/dist/theme-chalk/link/index.scss +0 -99
  142. package/dist/theme-chalk/loading/index.scss +0 -94
  143. package/dist/theme-chalk/message/index.scss +0 -169
  144. package/dist/theme-chalk/message-box/index.scss +0 -184
  145. package/dist/theme-chalk/notification/index.scss +0 -155
  146. package/dist/theme-chalk/pagination/index.scss +0 -515
  147. package/dist/theme-chalk/placeholder/index.scss +0 -135
  148. package/dist/theme-chalk/popconfirm/index.scss +0 -35
  149. package/dist/theme-chalk/popover/index.scss +0 -54
  150. package/dist/theme-chalk/popper/index.scss +0 -86
  151. package/dist/theme-chalk/progress/index.scss +0 -155
  152. package/dist/theme-chalk/radio/index.scss +0 -2
  153. package/dist/theme-chalk/radio/radio-button.scss +0 -128
  154. package/dist/theme-chalk/radio/radio.scss +0 -171
  155. package/dist/theme-chalk/radio-group/index.scss +0 -31
  156. package/dist/theme-chalk/row/index.scss +0 -30
  157. package/dist/theme-chalk/scrollbar/index.scss +0 -103
  158. package/dist/theme-chalk/select/index.scss +0 -244
  159. package/dist/theme-chalk/select/option-group.scss +0 -54
  160. package/dist/theme-chalk/select/option.scss +0 -63
  161. package/dist/theme-chalk/select/select-dropdown.scss +0 -57
  162. package/dist/theme-chalk/switch/index.scss +0 -273
  163. package/dist/theme-chalk/table/index.scss +0 -714
  164. package/dist/theme-chalk/tabs/index.scss +0 -620
  165. package/dist/theme-chalk/tag/index.scss +0 -360
  166. package/dist/theme-chalk/time-line/_timeline-item.scss +0 -90
  167. package/dist/theme-chalk/time-line/_timeline.scss +0 -50
  168. package/dist/theme-chalk/time-line/index.scss +0 -2
  169. package/dist/theme-chalk/time-picker/index.scss +0 -109
  170. package/dist/theme-chalk/tooltip/index.scss +0 -13
  171. package/dist/theme-chalk/transfer/index.scss +0 -247
  172. package/dist/theme-chalk/transition/index.scss +0 -756
  173. package/dist/theme-chalk/tree/_directory.scss +0 -73
  174. package/dist/theme-chalk/tree/_tree.scss +0 -401
  175. package/dist/theme-chalk/tree/index.scss +0 -2
  176. package/dist/theme-chalk/tree-select/index.scss +0 -25
  177. package/dist/theme-chalk/upload/index.scss +0 -631
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qsxy/element-plus-react",
3
- "version": "1.0.0-next.11",
3
+ "version": "1.0.0-next.13",
4
4
  "description": "element-plus-react",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,8 @@
9
9
 
10
10
  .#{$namespace}-message {
11
11
  min-width: 380px;
12
+ width: fit-content;
13
+ max-width: calc(100% - 32px);
12
14
  box-sizing: border-box;
13
15
  border-radius: 4px;
14
16
  border-width: 1px;
@@ -21,8 +23,8 @@
21
23
  background-color: var(--#{$namespace}-message-bg-color);
22
24
  color: var(--#{$namespace}-message-text-color);
23
25
  transition: opacity 0.3s, transform 0.4s, top 0.4s;
24
- overflow: hidden;
25
- padding: 15px 15px 15px 20px;
26
+ // overflow: hidden;
27
+ padding: 15px 19px;
26
28
  display: flex;
27
29
  align-items: center;
28
30
 
@@ -32,7 +34,7 @@
32
34
 
33
35
  &.is-closable {
34
36
  .#{$namespace}-message__content {
35
- padding-right: 16px;
37
+ padding-right: 31px;
36
38
  }
37
39
  }
38
40
 
@@ -159,6 +161,12 @@
159
161
  font-weight: bold;
160
162
  }
161
163
  }
164
+
165
+ .#{$namespace}-message__badge {
166
+ position: absolute;
167
+ top: -8px;
168
+ right: -8px;
169
+ }
162
170
  }
163
171
 
164
172
  .#{$namespace}-fade-enter-from,
@@ -1,50 +0,0 @@
1
- @use '../common/var';
2
-
3
- .#{$namespace}-avatar {
4
- --#{$namespace}-avatar-text-color: var(--#{$namespace}-color-white);
5
- --#{$namespace}-avatar-bg-color: var(--#{$namespace}-text-color-disabled);
6
- --#{$namespace}-avatar-text-size: 14px;
7
- --#{$namespace}-avatar-icon-size: 18px;
8
- --#{$namespace}-avatar-border-radius: var(--#{$namespace}-border-radius-base);
9
- --#{$namespace}-avatar-size-large: 56px;
10
- --#{$namespace}-avatar-size-small: 24px;
11
- --#{$namespace}-avatar-size: 40px;
12
- display: inline-flex;
13
- justify-content: center;
14
- align-items: center;
15
- box-sizing: border-box;
16
- text-align: center;
17
- overflow: hidden;
18
- outline: none;
19
- color: var(--#{$namespace}-avatar-text-color);
20
- background: var(--#{$namespace}-avatar-bg-color);
21
- width: var(--#{$namespace}-avatar-size);
22
- height: var(--#{$namespace}-avatar-size);
23
- font-size: var(--#{$namespace}-avatar-text-size);
24
- }
25
-
26
- .#{$namespace}-avatar > img {
27
- display: block;
28
- width: 100%;
29
- height: 100%;
30
- }
31
-
32
- .#{$namespace}-avatar--circle {
33
- border-radius: 50%;
34
- }
35
-
36
- .#{$namespace}-avatar--square {
37
- border-radius: var(--#{$namespace}-avatar-border-radius);
38
- }
39
-
40
- .#{$namespace}-avatar--icon {
41
- font-size: var(--#{$namespace}-avatar-icon-size);
42
- }
43
-
44
- .#{$namespace}-avatar--small {
45
- --#{$namespace}-avatar-size: 24px;
46
- }
47
-
48
- .#{$namespace}-avatar--large {
49
- --#{$namespace}-avatar-size: 56px;
50
- }
@@ -1,63 +0,0 @@
1
- @use '../common/var';
2
-
3
- @use 'sass:math';
4
- @use 'sass:map';
5
-
6
- .#{$namespace}-badge {
7
- --#{$namespace}-badge-bg-color: var(--#{$namespace}-color-error);
8
- --#{$namespace}-badge-radius: 10px;
9
- --#{$namespace}-badge-font-size: 12px;
10
- --#{$namespace}-badge-padding: 6px;
11
- --#{$namespace}-badge-size: 18px;
12
-
13
- position: relative;
14
- vertical-align: middle;
15
- display: inline-block;
16
- width: fit-content;
17
- }
18
-
19
- .#{$namespace}-badge__content {
20
- background-color: var(--#{$namespace}-badge-bg-color);
21
- border-radius: var(--#{$namespace}-badge-radius);
22
- color: var(--#{$namespace}-color-white);
23
-
24
- display: inline-flex;
25
- justify-content: center;
26
- align-items: center;
27
-
28
- font-size: var(--#{$namespace}-badge-font-size);
29
- height: var(--#{$namespace}-badge-size);
30
- padding: 0 var(--#{$namespace}-badge-padding);
31
- white-space: nowrap;
32
- border: 1px solid var(--#{$namespace}-bg-color);
33
-
34
- &.is-fixed {
35
- position: absolute;
36
- top: 0;
37
- right: calc(1px + #{var(--#{$namespace}-badge-size)} / 2);
38
- transform: translateY(-50%) translateX(100%);
39
- z-index: 1;
40
-
41
- &.is-dot {
42
- right: 5px;
43
- }
44
- }
45
-
46
- &.is-dot {
47
- height: 8px;
48
- width: 8px;
49
- padding: 0;
50
- right: 0;
51
- border-radius: 50%;
52
- }
53
- }
54
-
55
- .#{$namespace}-badge__content--primary {
56
- background-color: var(--#{$namespace}-color-primary);
57
- }
58
-
59
- @each $type in (success, warning, info, error) {
60
- .#{$namespace}-badge__content--#{$type} {
61
- background-color: var(--#{$namespace}-color-#{$type});
62
- }
63
- }
@@ -1,65 +0,0 @@
1
- @use '../common/var';
2
-
3
- .#{$namespace}-breadcrumb {
4
- font-size: 14px;
5
- line-height: 1;
6
-
7
- &::before,
8
- &::after {
9
- display: table;
10
- content: '';
11
- }
12
- }
13
-
14
- .#{$namespace}-breadcrumb__separator {
15
- margin: 0 9px;
16
- font-weight: bold;
17
- color: var(--#{$namespace}-text-color-placeholder);
18
-
19
- &.#{$namespace}-icon {
20
- margin: 0 6px;
21
- font-weight: normal;
22
- svg {
23
- vertical-align: middle;
24
- }
25
- }
26
- }
27
-
28
- .#{$namespace}-breadcrumb__item {
29
- float: left;
30
- display: flex;
31
- align-items: center;
32
-
33
- &:last-child {
34
- .#{$namespace}-breadcrumb__inner:not(.is-link),
35
- .#{$namespace}-breadcrumb__inner:not(.is-link) a {
36
- &,
37
- &:hover {
38
- font-weight: normal;
39
- color: var(--#{$namespace}-text-color-regular);
40
- cursor: text;
41
- }
42
- }
43
-
44
- .#{$namespace}-breadcrumb__separator {
45
- display: none;
46
- }
47
- }
48
- }
49
-
50
- .#{$namespace}-breadcrumb__inner {
51
- color: var(--#{$namespace}-text-color-regular);
52
-
53
- &.is-link,
54
- & a {
55
- font-weight: bold;
56
- text-decoration: none;
57
- transition: var(--#{$namespace}-transition-color);
58
- color: var(--#{$namespace}-text-color-primary);
59
-
60
- &:hover {
61
- color: var(--#{$namespace}-color-primary);
62
- cursor: pointer;
63
- }
64
- }
65
- }
@@ -1,2 +0,0 @@
1
- $fa-font-path: './fonts' !default;
2
- @import './index.scss';
@@ -1,317 +0,0 @@
1
- @use 'sass:map';
2
- @use '../common/var';
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
- }
@@ -1,83 +0,0 @@
1
- @use '../common/var';
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
- }