ep-craft 0.1.1 → 0.1.3

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 (161) hide show
  1. package/dist/components/button/EpButton.vue.d.ts +157 -0
  2. package/dist/components/button/EpButton.vue.js +171 -0
  3. package/dist/components/button/EpButton2.vue.js +4 -0
  4. package/dist/components/button/button.d.ts +88 -0
  5. package/dist/components/button/button.js +95 -0
  6. package/dist/components/button/index.d.ts +5 -2
  7. package/dist/components/button/index.js +7 -4
  8. package/dist/index.css +2 -1
  9. package/dist/node_modules/@ctrl/tinycolor/dist/module/conversion.js +134 -0
  10. package/dist/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +153 -0
  11. package/dist/node_modules/@ctrl/tinycolor/dist/module/format-input.js +77 -0
  12. package/dist/node_modules/@ctrl/tinycolor/dist/module/index.js +354 -0
  13. package/dist/node_modules/@ctrl/tinycolor/dist/module/util.js +32 -0
  14. package/dist/resolver.d.ts +4 -0
  15. package/dist/resolver.js +11 -11
  16. package/package.json +5 -2
  17. package/theme-chalk/src/affix.scss +7 -0
  18. package/theme-chalk/src/alert.scss +115 -0
  19. package/theme-chalk/src/anchor-link.scss +45 -0
  20. package/theme-chalk/src/anchor.scss +93 -0
  21. package/theme-chalk/src/aside.scss +8 -0
  22. package/theme-chalk/src/autocomplete.scss +95 -0
  23. package/theme-chalk/src/avatar-group.scss +25 -0
  24. package/theme-chalk/src/avatar.scss +55 -0
  25. package/theme-chalk/src/backtop.scss +29 -0
  26. package/theme-chalk/src/badge.scss +58 -0
  27. package/theme-chalk/src/base.scss +3 -0
  28. package/theme-chalk/src/breadcrumb-item.scss +58 -0
  29. package/theme-chalk/src/breadcrumb.scss +9 -0
  30. package/theme-chalk/src/button-group.scss +133 -0
  31. package/theme-chalk/src/button.scss +325 -0
  32. package/theme-chalk/src/calendar.scss +94 -0
  33. package/theme-chalk/src/card.scss +49 -0
  34. package/theme-chalk/src/carousel-item.scss +58 -0
  35. package/theme-chalk/src/carousel.scss +195 -0
  36. package/theme-chalk/src/cascader-panel.scss +150 -0
  37. package/theme-chalk/src/cascader.scss +289 -0
  38. package/theme-chalk/src/check-tag.scss +60 -0
  39. package/theme-chalk/src/checkbox-button.scss +142 -0
  40. package/theme-chalk/src/checkbox-group.scss +7 -0
  41. package/theme-chalk/src/checkbox.scss +300 -0
  42. package/theme-chalk/src/col.scss +56 -0
  43. package/theme-chalk/src/collapse-item.scss +72 -0
  44. package/theme-chalk/src/collapse-transition.scss +1 -0
  45. package/theme-chalk/src/collapse.scss +29 -0
  46. package/theme-chalk/src/color/index.scss +20 -0
  47. package/theme-chalk/src/color-picker-panel.scss +294 -0
  48. package/theme-chalk/src/color-picker.scss +165 -0
  49. package/theme-chalk/src/common/popup.scss +47 -0
  50. package/theme-chalk/src/common/transition.scss +125 -0
  51. package/theme-chalk/src/common/var.scss +1730 -0
  52. package/theme-chalk/src/config-provider.scss +0 -0
  53. package/theme-chalk/src/container.scss +14 -0
  54. package/theme-chalk/src/dark/css-vars.scss +45 -0
  55. package/theme-chalk/src/dark/var.scss +224 -0
  56. package/theme-chalk/src/date-picker/date-picker.scss +121 -0
  57. package/theme-chalk/src/date-picker/date-range-picker.scss +165 -0
  58. package/theme-chalk/src/date-picker/date-table.scss +164 -0
  59. package/theme-chalk/src/date-picker/month-table.scss +112 -0
  60. package/theme-chalk/src/date-picker/picker-panel.scss +152 -0
  61. package/theme-chalk/src/date-picker/picker.scss +217 -0
  62. package/theme-chalk/src/date-picker/time-picker.scss +90 -0
  63. package/theme-chalk/src/date-picker/time-range-picker.scss +33 -0
  64. package/theme-chalk/src/date-picker/time-spinner.scss +115 -0
  65. package/theme-chalk/src/date-picker/utils.scss +14 -0
  66. package/theme-chalk/src/date-picker/year-table.scss +108 -0
  67. package/theme-chalk/src/date-picker-panel.scss +34 -0
  68. package/theme-chalk/src/date-picker.scss +0 -0
  69. package/theme-chalk/src/descriptions-item.scss +77 -0
  70. package/theme-chalk/src/descriptions.scss +151 -0
  71. package/theme-chalk/src/dialog.scss +207 -0
  72. package/theme-chalk/src/display.scss +12 -0
  73. package/theme-chalk/src/divider.scss +48 -0
  74. package/theme-chalk/src/drawer.scss +251 -0
  75. package/theme-chalk/src/dropdown-item.scss +0 -0
  76. package/theme-chalk/src/dropdown-menu.scss +0 -0
  77. package/theme-chalk/src/dropdown.scss +208 -0
  78. package/theme-chalk/src/empty.scss +49 -0
  79. package/theme-chalk/src/footer.scss +12 -0
  80. package/theme-chalk/src/form-item.scss +246 -0
  81. package/theme-chalk/src/form.scss +28 -0
  82. package/theme-chalk/src/header.scss +12 -0
  83. package/theme-chalk/src/icon.scss +41 -0
  84. package/theme-chalk/src/image-viewer.scss +161 -0
  85. package/theme-chalk/src/image.scss +49 -0
  86. package/theme-chalk/src/index.scss +116 -0
  87. package/theme-chalk/src/infinite-scroll.scss +0 -0
  88. package/theme-chalk/src/input-number.scss +192 -0
  89. package/theme-chalk/src/input-otp.scss +191 -0
  90. package/theme-chalk/src/input-tag.scss +249 -0
  91. package/theme-chalk/src/input.scss +541 -0
  92. package/theme-chalk/src/link.scss +90 -0
  93. package/theme-chalk/src/loading.scss +104 -0
  94. package/theme-chalk/src/main.scss +14 -0
  95. package/theme-chalk/src/mention.scss +88 -0
  96. package/theme-chalk/src/menu-item-group.scss +0 -0
  97. package/theme-chalk/src/menu-item.scss +0 -0
  98. package/theme-chalk/src/menu.scss +376 -0
  99. package/theme-chalk/src/message-box.scss +220 -0
  100. package/theme-chalk/src/message.scss +123 -0
  101. package/theme-chalk/src/mixins/_button.scss +240 -0
  102. package/theme-chalk/src/mixins/_col.scss +41 -0
  103. package/theme-chalk/src/mixins/_var.scss +67 -0
  104. package/theme-chalk/src/mixins/config.scss +5 -0
  105. package/theme-chalk/src/mixins/function.scss +99 -0
  106. package/theme-chalk/src/mixins/mixins.scss +257 -0
  107. package/theme-chalk/src/mixins/utils.scss +39 -0
  108. package/theme-chalk/src/notification.scss +109 -0
  109. package/theme-chalk/src/option-group.scss +33 -0
  110. package/theme-chalk/src/option.scss +71 -0
  111. package/theme-chalk/src/overlay.scss +17 -0
  112. package/theme-chalk/src/page-header.scss +60 -0
  113. package/theme-chalk/src/pagination.scss +235 -0
  114. package/theme-chalk/src/popconfirm.scss +17 -0
  115. package/theme-chalk/src/popover.scss +61 -0
  116. package/theme-chalk/src/popper.scss +117 -0
  117. package/theme-chalk/src/progress.scss +179 -0
  118. package/theme-chalk/src/radio-button.scss +165 -0
  119. package/theme-chalk/src/radio-group.scss +9 -0
  120. package/theme-chalk/src/radio.scss +220 -0
  121. package/theme-chalk/src/rate.scss +121 -0
  122. package/theme-chalk/src/reset.scss +99 -0
  123. package/theme-chalk/src/result.scss +57 -0
  124. package/theme-chalk/src/row.scss +34 -0
  125. package/theme-chalk/src/scrollbar.scss +97 -0
  126. package/theme-chalk/src/segmented.scss +186 -0
  127. package/theme-chalk/src/select-dropdown-v2.scss +1 -0
  128. package/theme-chalk/src/select-dropdown.scss +57 -0
  129. package/theme-chalk/src/select-v2.scss +4 -0
  130. package/theme-chalk/src/select.scss +269 -0
  131. package/theme-chalk/src/skeleton-item.scss +83 -0
  132. package/theme-chalk/src/skeleton.scss +44 -0
  133. package/theme-chalk/src/slider.scss +212 -0
  134. package/theme-chalk/src/space.scss +20 -0
  135. package/theme-chalk/src/spinner.scss +43 -0
  136. package/theme-chalk/src/splitter-panel.scss +8 -0
  137. package/theme-chalk/src/splitter.scss +148 -0
  138. package/theme-chalk/src/statistic.scss +35 -0
  139. package/theme-chalk/src/step.scss +320 -0
  140. package/theme-chalk/src/steps.scss +22 -0
  141. package/theme-chalk/src/sub-menu.scss +0 -0
  142. package/theme-chalk/src/switch.scss +294 -0
  143. package/theme-chalk/src/tab-pane.scss +0 -0
  144. package/theme-chalk/src/table-column.scss +100 -0
  145. package/theme-chalk/src/table-v2.scss +239 -0
  146. package/theme-chalk/src/table.scss +698 -0
  147. package/theme-chalk/src/tabs.scss +699 -0
  148. package/theme-chalk/src/tag.scss +195 -0
  149. package/theme-chalk/src/text.scss +51 -0
  150. package/theme-chalk/src/time-picker.scss +5 -0
  151. package/theme-chalk/src/time-select.scss +37 -0
  152. package/theme-chalk/src/timeline-item.scss +135 -0
  153. package/theme-chalk/src/timeline.scss +101 -0
  154. package/theme-chalk/src/tooltip.scss +0 -0
  155. package/theme-chalk/src/tour.scss +187 -0
  156. package/theme-chalk/src/transfer.scss +201 -0
  157. package/theme-chalk/src/tree-select.scss +41 -0
  158. package/theme-chalk/src/tree.scss +134 -0
  159. package/theme-chalk/src/upload.scss +660 -0
  160. package/theme-chalk/src/var.scss +87 -0
  161. package/theme-chalk/src/virtual-list.scss +40 -0
@@ -0,0 +1,150 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'mixins/var' as *;
3
+ @use 'common/var' as *;
4
+
5
+ @include b(cascader-panel) {
6
+ @include set-component-css-var('cascader', $cascader);
7
+ }
8
+
9
+ @include b(cascader-panel) {
10
+ display: flex;
11
+ width: fit-content;
12
+ border-radius: getCssVar('cascader-menu', 'radius');
13
+ font-size: getCssVar('cascader-menu', 'font-size');
14
+
15
+ @include when(bordered) {
16
+ border: getCssVar('cascader-menu', 'border');
17
+ border-radius: getCssVar('cascader-menu', 'radius');
18
+ }
19
+ }
20
+
21
+ @include b(cascader-menu) {
22
+ min-width: 180px;
23
+ box-sizing: border-box;
24
+ color: getCssVar('cascader-menu', 'text-color');
25
+ border-right: getCssVar('cascader-menu', 'border');
26
+
27
+ &:last-child {
28
+ border-right: none;
29
+
30
+ .#{$namespace}-cascader-node {
31
+ padding-right: 20px;
32
+ }
33
+ }
34
+
35
+ @include e(wrap) {
36
+ // Raise the priority
37
+ &.#{$namespace}-scrollbar__wrap {
38
+ height: 204px;
39
+ }
40
+ }
41
+
42
+ @include e(list) {
43
+ position: relative;
44
+ min-height: 100%;
45
+ margin: 0;
46
+ padding: 6px 0;
47
+ list-style: none;
48
+ box-sizing: border-box;
49
+
50
+ &.#{$namespace}-vl__window {
51
+ // for virtual scroll
52
+ margin: 6px 0;
53
+ padding: 0;
54
+ ul {
55
+ margin: 0;
56
+ padding: 0;
57
+ }
58
+ }
59
+ }
60
+
61
+ @include e(hover-zone) {
62
+ position: absolute;
63
+ top: 0;
64
+ left: 0;
65
+ width: 100%;
66
+ height: 100%;
67
+ pointer-events: none;
68
+ }
69
+
70
+ @include e(empty-text) {
71
+ position: absolute;
72
+ top: 50%;
73
+ left: 50%;
74
+ transform: translate(-50%, -50%);
75
+ display: flex;
76
+ align-items: center;
77
+ color: getCssVar('cascader', 'color-empty');
78
+
79
+ .is-loading {
80
+ margin-right: 2px;
81
+ }
82
+ }
83
+ }
84
+
85
+ @include b(cascader-node) {
86
+ position: relative;
87
+ display: flex;
88
+ align-items: center;
89
+ padding: 0 30px 0 20px;
90
+ height: 34px;
91
+ line-height: 34px;
92
+ outline: none;
93
+ box-sizing: border-box;
94
+
95
+ &.is-selectable.in-active-path {
96
+ color: getCssVar('cascader-menu', 'text-color');
97
+ }
98
+
99
+ &.in-active-path,
100
+ &.is-selectable.in-checked-path,
101
+ &.is-active {
102
+ color: getCssVar('cascader-menu', 'selected-text-color');
103
+ font-weight: bold;
104
+ }
105
+
106
+ &:not(.is-disabled) {
107
+ cursor: pointer;
108
+
109
+ &:hover,
110
+ &:focus {
111
+ background: getCssVar('cascader-node', 'background-hover');
112
+ }
113
+ }
114
+
115
+ @include when(disabled) {
116
+ color: getCssVar('cascader-node', 'color-disabled');
117
+ cursor: not-allowed;
118
+ }
119
+
120
+ @include e(prefix) {
121
+ position: absolute;
122
+ left: 10px;
123
+ }
124
+
125
+ @include e(postfix) {
126
+ position: absolute;
127
+ right: 10px;
128
+ }
129
+
130
+ @include e(label) {
131
+ flex: 1;
132
+ text-align: left;
133
+ padding: 0 8px;
134
+ white-space: nowrap;
135
+ overflow: hidden;
136
+ text-overflow: ellipsis;
137
+ }
138
+
139
+ > .#{$namespace}-checkbox {
140
+ margin-right: 0;
141
+ }
142
+
143
+ > .#{$namespace}-radio {
144
+ margin-right: 0;
145
+
146
+ .#{$namespace}-radio__label {
147
+ padding-left: 0;
148
+ }
149
+ }
150
+ }
@@ -0,0 +1,289 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @mixin cascader-tag-normal($background-color) {
8
+ .#{$namespace}-tag {
9
+ display: inline-flex;
10
+ align-items: center;
11
+ max-width: 100%;
12
+ text-overflow: ellipsis;
13
+ background: $background-color;
14
+
15
+ &.#{$namespace}-tag--dark,
16
+ &.#{$namespace}-tag--plain {
17
+ background-color: getCssVar('tag', 'bg-color');
18
+ }
19
+
20
+ &:not(.is-hit) {
21
+ border-color: transparent;
22
+
23
+ &.#{$namespace}-tag--dark,
24
+ &.#{$namespace}-tag--plain {
25
+ border-color: getCssVar('tag', 'border-color');
26
+ }
27
+ }
28
+
29
+ > span {
30
+ flex: 1;
31
+ line-height: normal;
32
+ overflow: hidden;
33
+ text-overflow: ellipsis;
34
+ }
35
+
36
+ .#{$namespace}-icon-close {
37
+ flex: none;
38
+ background-color: getCssVar('text-color', 'placeholder');
39
+ color: getCssVar('color-white');
40
+
41
+ &:hover {
42
+ background-color: getCssVar('text-color', 'secondary');
43
+ }
44
+ }
45
+
46
+ & + input {
47
+ margin-left: 0;
48
+ }
49
+ }
50
+ }
51
+
52
+ @include b(cascader) {
53
+ @include set-component-css-var('cascader', $cascader);
54
+
55
+ display: inline-block;
56
+ vertical-align: middle;
57
+ position: relative;
58
+ font-size: getCssVar('font-size', 'base');
59
+ line-height: map.get($input-height, 'default');
60
+ outline: none;
61
+
62
+ &:not(.is-disabled):hover {
63
+ .#{$namespace}-input__wrapper {
64
+ cursor: pointer;
65
+ box-shadow: 0 0 0 1px getCssVar('input', 'hover-border-color') inset;
66
+ }
67
+ }
68
+
69
+ .#{$namespace}-input {
70
+ display: flex;
71
+ cursor: pointer;
72
+
73
+ .#{$namespace}-input__inner {
74
+ text-overflow: ellipsis;
75
+ &:read-only {
76
+ cursor: pointer;
77
+ }
78
+ &:disabled {
79
+ cursor: not-allowed;
80
+ }
81
+ }
82
+
83
+ .#{$namespace}-input__suffix-inner {
84
+ .#{$namespace}-icon {
85
+ svg {
86
+ vertical-align: middle;
87
+ }
88
+ }
89
+ }
90
+
91
+ .icon-arrow-down {
92
+ transition: transform getCssVar('transition-duration');
93
+ font-size: 14px;
94
+
95
+ @include when(reverse) {
96
+ transform: rotateZ(180deg);
97
+ }
98
+ }
99
+
100
+ .icon-circle-close:hover {
101
+ color: var(
102
+ #{getCssVarName('input', 'clear-hover-color')},
103
+ map.get($input, 'clear-hover-color')
104
+ );
105
+ }
106
+
107
+ @include when(focus) {
108
+ .#{$namespace}-input__wrapper {
109
+ box-shadow: 0 0 0 1px
110
+ var(
111
+ #{getCssVarName('input', 'focus-border-color')},
112
+ map.get($input, 'focus-border-color')
113
+ )
114
+ inset;
115
+ }
116
+ }
117
+ }
118
+
119
+ @each $size in (large, small) {
120
+ @include m($size) {
121
+ font-size: map.get($input-font-size, $size);
122
+ line-height: map.get($input-height, $size);
123
+
124
+ @include e(tags) {
125
+ gap: map.get($cascader-item-gap, $size);
126
+ padding: map.get($cascader-wrapper-padding, $size);
127
+ }
128
+
129
+ @include e(search-input) {
130
+ height: map.get($cascader-item-height, $size);
131
+ margin-left: map.get($cascader-search-input-margin-left, $size);
132
+ }
133
+ }
134
+ }
135
+
136
+ @include when(disabled) {
137
+ .#{$namespace}-cascader__label {
138
+ z-index: calc(getCssVar('index', 'normal') + 1);
139
+ color: getCssVar('disabled-text-color');
140
+ }
141
+ }
142
+
143
+ @include e(dropdown) {
144
+ @include set-component-css-var('cascader', $cascader);
145
+ }
146
+
147
+ @include e(dropdown) {
148
+ font-size: getCssVar('cascader-menu-font-size');
149
+ border-radius: getCssVar('cascader-menu-radius');
150
+
151
+ @include picker-popper(
152
+ getCssVar('cascader-menu-fill'),
153
+ getCssVar('cascader-menu-border'),
154
+ getCssVar('cascader-menu-shadow')
155
+ );
156
+
157
+ &.#{$namespace}-popper {
158
+ box-shadow: getCssVar('cascader-menu-shadow');
159
+ }
160
+ }
161
+
162
+ @include e(header) {
163
+ padding: map.get($cascader-dropdown, 'header-padding');
164
+ border-bottom: map.get($cascader-dropdown, 'border');
165
+ }
166
+
167
+ @include e(footer) {
168
+ padding: map.get($cascader-dropdown, 'footer-padding');
169
+ border-top: map.get($cascader-dropdown, 'border');
170
+ }
171
+
172
+ @include e(tags) {
173
+ position: absolute;
174
+ left: 0;
175
+ right: 30px;
176
+ top: 50%;
177
+ transform: translateY(-50%);
178
+ display: flex;
179
+ flex-wrap: wrap;
180
+ padding: map.get($cascader-wrapper-padding, 'default');
181
+ gap: map.get($cascader-item-gap, 'default');
182
+ line-height: normal;
183
+ text-align: left;
184
+ box-sizing: border-box;
185
+ @include cascader-tag-normal(getCssVar('cascader-tag-background'));
186
+
187
+ &.is-validate {
188
+ right: 55px;
189
+ }
190
+ }
191
+
192
+ @include e(collapse-tags) {
193
+ white-space: normal;
194
+ z-index: getCssVar('index-normal');
195
+ @include cascader-tag-normal(getCssVar('fill-color'));
196
+
197
+ .#{$namespace}-tag {
198
+ margin: 2px 0;
199
+ }
200
+ }
201
+
202
+ @include e(suggestion-panel) {
203
+ border-radius: getCssVar('cascader-menu', 'radius');
204
+ }
205
+
206
+ @include e(suggestion-wrap) {
207
+ max-height: 204px;
208
+ }
209
+
210
+ @include e(suggestion-list) {
211
+ list-style: none;
212
+ margin: 0;
213
+ padding: 6px 0;
214
+ font-size: getCssVar('font-size', 'base');
215
+ color: getCssVar('cascader-menu', 'text-color');
216
+ text-align: center;
217
+
218
+ &.#{$namespace}-vl__window {
219
+ // for virtual scroll
220
+ margin: 6px 0;
221
+ padding: 0;
222
+ ul {
223
+ margin: 0;
224
+ padding: 0;
225
+ }
226
+ }
227
+ }
228
+
229
+ @include e(suggestion-item) {
230
+ display: flex;
231
+ justify-content: space-between;
232
+ align-items: center;
233
+ height: 34px;
234
+ padding: 0 15px;
235
+ text-align: left;
236
+ outline: none;
237
+ cursor: pointer;
238
+ box-sizing: border-box;
239
+
240
+ &:hover,
241
+ &:focus {
242
+ background: getCssVar('cascader-node', 'background-hover');
243
+ }
244
+
245
+ &.is-checked {
246
+ color: getCssVar('cascader', 'menu-selected-text-color');
247
+ font-weight: bold;
248
+ }
249
+
250
+ > :not(.#{$namespace}-icon) {
251
+ white-space: nowrap;
252
+ overflow: hidden;
253
+ text-overflow: ellipsis;
254
+ flex: 1;
255
+ min-width: 0;
256
+ }
257
+
258
+ > span {
259
+ margin-right: 10px;
260
+ }
261
+
262
+ .#{$namespace}-icon {
263
+ flex-shrink: 0;
264
+ }
265
+ }
266
+
267
+ @include e(empty-text) {
268
+ margin: 10px 0;
269
+ color: getCssVar('cascader', 'color-empty');
270
+ }
271
+
272
+ @include e(search-input) {
273
+ flex: 1;
274
+ height: map.get($cascader-item-height, 'default');
275
+ min-width: 60px;
276
+ margin-left: map.get($cascader-search-input-margin-left, 'default');
277
+ padding: 0;
278
+ color: getCssVar('cascader', 'menu-text-color');
279
+ border: none;
280
+ outline: none;
281
+ box-sizing: border-box;
282
+ background: transparent;
283
+
284
+ &::placeholder {
285
+ // two input overlap
286
+ color: transparent;
287
+ }
288
+ }
289
+ }
@@ -0,0 +1,60 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'common/var' as *;
3
+
4
+ @include b(check-tag) {
5
+ background-color: getCssVar('color', 'info', 'light-9');
6
+ border-radius: getCssVar('border-radius', 'base');
7
+ color: getCssVar('color', 'info');
8
+ cursor: pointer;
9
+ display: inline-block;
10
+ font-size: getCssVar('font-size', 'base');
11
+ line-height: getCssVar('font-size', 'base');
12
+ padding: 7px 15px;
13
+ transition: getCssVar('transition', 'all');
14
+ font-weight: bold;
15
+
16
+ &:hover {
17
+ background-color: getCssVar('color', 'info', 'light-7');
18
+ }
19
+
20
+ @each $type in $types {
21
+ &.#{bem('check-tag', '', $type)} {
22
+ @include when(checked) {
23
+ background-color: getCssVar('color', $type, 'light-8');
24
+ color: getCssVar('color', $type);
25
+
26
+ &:hover {
27
+ background-color: getCssVar('color', $type, 'light-7');
28
+ }
29
+
30
+ @include when(disabled) {
31
+ background-color: getCssVar('color', $type, 'light-8');
32
+ color: getCssVar('disabled-text-color');
33
+ cursor: not-allowed;
34
+
35
+ &:hover {
36
+ background-color: getCssVar('color', $type, 'light-8');
37
+ }
38
+ }
39
+ }
40
+
41
+ @include when(disabled) {
42
+ @if $type == 'primary' {
43
+ background-color: getCssVar('color', 'info', 'light-9');
44
+ } @else {
45
+ background-color: getCssVar('color', $type, 'light-9');
46
+ }
47
+ color: getCssVar('disabled-text-color');
48
+ cursor: not-allowed;
49
+
50
+ &:hover {
51
+ @if $type == 'primary' {
52
+ background-color: getCssVar('color', 'info', 'light-9');
53
+ } @else {
54
+ background-color: getCssVar('color', $type, 'light-9');
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,142 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'common/var' as *;
4
+ @use 'mixins/mixins' as *;
5
+ @use 'mixins/var' as *;
6
+ @use 'mixins/button' as *;
7
+
8
+ @include b(checkbox-button) {
9
+ @include set-component-css-var('checkbox-button', $checkbox-button);
10
+ }
11
+
12
+ @include b(checkbox-button) {
13
+ position: relative;
14
+ display: inline-block;
15
+
16
+ @include e(inner) {
17
+ display: inline-block;
18
+ line-height: 1;
19
+ font-weight: getCssVar('checkbox-font-weight');
20
+ white-space: nowrap;
21
+ vertical-align: middle;
22
+ cursor: pointer;
23
+ background: var(
24
+ #{getCssVarName('button-bg-color')},
25
+ map.get($button, 'bg-color')
26
+ );
27
+ outline: getCssVar('border');
28
+ color: var(
29
+ #{getCssVarName('button-text-color')},
30
+ map.get($button, 'text-color')
31
+ );
32
+ -webkit-appearance: none;
33
+ text-align: center;
34
+ box-sizing: border-box;
35
+ margin: 0;
36
+ position: relative;
37
+ transition: getCssVar('transition-all');
38
+ user-select: none;
39
+
40
+ @include button-size(
41
+ map.get($button-padding-vertical, 'default') - $button-border-width,
42
+ map.get($button-padding-horizontal, 'default') - $button-border-width,
43
+ map.get($button-font-size, 'default'),
44
+ 0
45
+ );
46
+
47
+ &:hover {
48
+ color: getCssVar('color-primary');
49
+ }
50
+
51
+ & [class*='#{$namespace}-icon-'] {
52
+ line-height: 0.9;
53
+
54
+ & + span {
55
+ margin-left: 5px;
56
+ }
57
+ }
58
+ }
59
+
60
+ @include e(original) {
61
+ opacity: 0;
62
+ outline: none;
63
+ position: absolute;
64
+ margin: 0;
65
+ z-index: -1;
66
+ }
67
+
68
+ &.is-checked {
69
+ & .#{$namespace}-checkbox-button__inner {
70
+ color: getCssVar('checkbox-button-checked-text-color');
71
+ background-color: getCssVar('checkbox-button-checked-bg-color');
72
+ border-color: getCssVar('checkbox-button-checked-border-color');
73
+ box-shadow: -1px 0 0 0 getCssVar('color-primary-light-7');
74
+ }
75
+ &:first-child .#{$namespace}-checkbox-button__inner {
76
+ border-left-color: getCssVar('checkbox-button-checked-border-color');
77
+ }
78
+ }
79
+
80
+ &.is-disabled {
81
+ & .#{$namespace}-checkbox-button__inner {
82
+ color: getCssVar('disabled-text-color');
83
+ cursor: not-allowed;
84
+ background-image: none;
85
+ background-color: var(
86
+ #{getCssVarName('button-disabled-bg-color')},
87
+ map.get($button, 'disabled-bg-color')
88
+ );
89
+ border-color: var(
90
+ #{getCssVarName('button-disabled-border-color')},
91
+ map.get($button, 'disabled-border-color')
92
+ );
93
+ box-shadow: none;
94
+ }
95
+ &:first-child .#{$namespace}-checkbox-button__inner {
96
+ border-left-color: var(
97
+ #{getCssVarName('button-disabled-border-color')},
98
+ map.get($button, 'disabled-border-color')
99
+ );
100
+ }
101
+
102
+ @include when(checked) {
103
+ .#{$namespace}-checkbox-button__inner {
104
+ background-color: getCssVar('checkbox-button-disabled-checked-fill');
105
+ }
106
+ }
107
+ }
108
+
109
+ &:first-child {
110
+ .#{$namespace}-checkbox-button__inner {
111
+ border-top-left-radius: getCssVar('border-radius-base');
112
+ border-bottom-left-radius: getCssVar('border-radius-base');
113
+ box-shadow: none !important;
114
+ }
115
+ }
116
+
117
+ &.is-focus {
118
+ & .#{$namespace}-checkbox-button__inner {
119
+ border-color: getCssVar('checkbox-button-checked-border-color');
120
+ }
121
+ }
122
+
123
+ &:last-child {
124
+ .#{$namespace}-checkbox-button__inner {
125
+ border-top-right-radius: getCssVar('border-radius-base');
126
+ border-bottom-right-radius: getCssVar('border-radius-base');
127
+ }
128
+ }
129
+
130
+ @each $size in (large, small) {
131
+ @include m($size) {
132
+ .#{$namespace}-checkbox-button__inner {
133
+ @include button-size(
134
+ map.get($button-padding-vertical, $size) - $button-border-width,
135
+ map.get($button-padding-horizontal, $size) - $button-border-width,
136
+ map.get($button-font-size, $size),
137
+ 0
138
+ );
139
+ }
140
+ }
141
+ }
142
+ }
@@ -0,0 +1,7 @@
1
+ @use 'common/var' as *;
2
+ @use 'mixins/mixins' as *;
3
+
4
+ @include b(checkbox-group) {
5
+ font-size: 0;
6
+ line-height: 0;
7
+ }