ep-craft 0.1.2 → 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 (154) hide show
  1. package/dist/components/button/EpButton.vue.d.ts +4 -4
  2. package/dist/components/button/EpButton.vue.js +19 -19
  3. package/dist/components/button/button.d.ts +2 -2
  4. package/dist/components/button/button.js +1 -1
  5. package/dist/components/button/index.d.ts +2 -1
  6. package/dist/components/button/index.js +4 -3
  7. package/dist/index.css +2 -2
  8. package/dist/resolver.js +9 -12
  9. package/package.json +4 -2
  10. package/theme-chalk/src/affix.scss +7 -0
  11. package/theme-chalk/src/alert.scss +115 -0
  12. package/theme-chalk/src/anchor-link.scss +45 -0
  13. package/theme-chalk/src/anchor.scss +93 -0
  14. package/theme-chalk/src/aside.scss +8 -0
  15. package/theme-chalk/src/autocomplete.scss +95 -0
  16. package/theme-chalk/src/avatar-group.scss +25 -0
  17. package/theme-chalk/src/avatar.scss +55 -0
  18. package/theme-chalk/src/backtop.scss +29 -0
  19. package/theme-chalk/src/badge.scss +58 -0
  20. package/theme-chalk/src/base.scss +3 -0
  21. package/theme-chalk/src/breadcrumb-item.scss +58 -0
  22. package/theme-chalk/src/breadcrumb.scss +9 -0
  23. package/theme-chalk/src/button-group.scss +133 -0
  24. package/theme-chalk/src/button.scss +325 -0
  25. package/theme-chalk/src/calendar.scss +94 -0
  26. package/theme-chalk/src/card.scss +49 -0
  27. package/theme-chalk/src/carousel-item.scss +58 -0
  28. package/theme-chalk/src/carousel.scss +195 -0
  29. package/theme-chalk/src/cascader-panel.scss +150 -0
  30. package/theme-chalk/src/cascader.scss +289 -0
  31. package/theme-chalk/src/check-tag.scss +60 -0
  32. package/theme-chalk/src/checkbox-button.scss +142 -0
  33. package/theme-chalk/src/checkbox-group.scss +7 -0
  34. package/theme-chalk/src/checkbox.scss +300 -0
  35. package/theme-chalk/src/col.scss +56 -0
  36. package/theme-chalk/src/collapse-item.scss +72 -0
  37. package/theme-chalk/src/collapse-transition.scss +1 -0
  38. package/theme-chalk/src/collapse.scss +29 -0
  39. package/theme-chalk/src/color/index.scss +20 -0
  40. package/theme-chalk/src/color-picker-panel.scss +294 -0
  41. package/theme-chalk/src/color-picker.scss +165 -0
  42. package/theme-chalk/src/common/popup.scss +47 -0
  43. package/theme-chalk/src/common/transition.scss +125 -0
  44. package/theme-chalk/src/common/var.scss +1730 -0
  45. package/theme-chalk/src/config-provider.scss +0 -0
  46. package/theme-chalk/src/container.scss +14 -0
  47. package/theme-chalk/src/dark/css-vars.scss +45 -0
  48. package/theme-chalk/src/dark/var.scss +224 -0
  49. package/theme-chalk/src/date-picker/date-picker.scss +121 -0
  50. package/theme-chalk/src/date-picker/date-range-picker.scss +165 -0
  51. package/theme-chalk/src/date-picker/date-table.scss +164 -0
  52. package/theme-chalk/src/date-picker/month-table.scss +112 -0
  53. package/theme-chalk/src/date-picker/picker-panel.scss +152 -0
  54. package/theme-chalk/src/date-picker/picker.scss +217 -0
  55. package/theme-chalk/src/date-picker/time-picker.scss +90 -0
  56. package/theme-chalk/src/date-picker/time-range-picker.scss +33 -0
  57. package/theme-chalk/src/date-picker/time-spinner.scss +115 -0
  58. package/theme-chalk/src/date-picker/utils.scss +14 -0
  59. package/theme-chalk/src/date-picker/year-table.scss +108 -0
  60. package/theme-chalk/src/date-picker-panel.scss +34 -0
  61. package/theme-chalk/src/date-picker.scss +0 -0
  62. package/theme-chalk/src/descriptions-item.scss +77 -0
  63. package/theme-chalk/src/descriptions.scss +151 -0
  64. package/theme-chalk/src/dialog.scss +207 -0
  65. package/theme-chalk/src/display.scss +12 -0
  66. package/theme-chalk/src/divider.scss +48 -0
  67. package/theme-chalk/src/drawer.scss +251 -0
  68. package/theme-chalk/src/dropdown-item.scss +0 -0
  69. package/theme-chalk/src/dropdown-menu.scss +0 -0
  70. package/theme-chalk/src/dropdown.scss +208 -0
  71. package/theme-chalk/src/empty.scss +49 -0
  72. package/theme-chalk/src/footer.scss +12 -0
  73. package/theme-chalk/src/form-item.scss +246 -0
  74. package/theme-chalk/src/form.scss +28 -0
  75. package/theme-chalk/src/header.scss +12 -0
  76. package/theme-chalk/src/icon.scss +41 -0
  77. package/theme-chalk/src/image-viewer.scss +161 -0
  78. package/theme-chalk/src/image.scss +49 -0
  79. package/theme-chalk/src/index.scss +116 -0
  80. package/theme-chalk/src/infinite-scroll.scss +0 -0
  81. package/theme-chalk/src/input-number.scss +192 -0
  82. package/theme-chalk/src/input-otp.scss +191 -0
  83. package/theme-chalk/src/input-tag.scss +249 -0
  84. package/theme-chalk/src/input.scss +541 -0
  85. package/theme-chalk/src/link.scss +90 -0
  86. package/theme-chalk/src/loading.scss +104 -0
  87. package/theme-chalk/src/main.scss +14 -0
  88. package/theme-chalk/src/mention.scss +88 -0
  89. package/theme-chalk/src/menu-item-group.scss +0 -0
  90. package/theme-chalk/src/menu-item.scss +0 -0
  91. package/theme-chalk/src/menu.scss +376 -0
  92. package/theme-chalk/src/message-box.scss +220 -0
  93. package/theme-chalk/src/message.scss +123 -0
  94. package/theme-chalk/src/mixins/_button.scss +240 -0
  95. package/theme-chalk/src/mixins/_col.scss +41 -0
  96. package/theme-chalk/src/mixins/_var.scss +67 -0
  97. package/theme-chalk/src/mixins/config.scss +5 -0
  98. package/theme-chalk/src/mixins/function.scss +99 -0
  99. package/theme-chalk/src/mixins/mixins.scss +257 -0
  100. package/theme-chalk/src/mixins/utils.scss +39 -0
  101. package/theme-chalk/src/notification.scss +109 -0
  102. package/theme-chalk/src/option-group.scss +33 -0
  103. package/theme-chalk/src/option.scss +71 -0
  104. package/theme-chalk/src/overlay.scss +17 -0
  105. package/theme-chalk/src/page-header.scss +60 -0
  106. package/theme-chalk/src/pagination.scss +235 -0
  107. package/theme-chalk/src/popconfirm.scss +17 -0
  108. package/theme-chalk/src/popover.scss +61 -0
  109. package/theme-chalk/src/popper.scss +117 -0
  110. package/theme-chalk/src/progress.scss +179 -0
  111. package/theme-chalk/src/radio-button.scss +165 -0
  112. package/theme-chalk/src/radio-group.scss +9 -0
  113. package/theme-chalk/src/radio.scss +220 -0
  114. package/theme-chalk/src/rate.scss +121 -0
  115. package/theme-chalk/src/reset.scss +99 -0
  116. package/theme-chalk/src/result.scss +57 -0
  117. package/theme-chalk/src/row.scss +34 -0
  118. package/theme-chalk/src/scrollbar.scss +97 -0
  119. package/theme-chalk/src/segmented.scss +186 -0
  120. package/theme-chalk/src/select-dropdown-v2.scss +1 -0
  121. package/theme-chalk/src/select-dropdown.scss +57 -0
  122. package/theme-chalk/src/select-v2.scss +4 -0
  123. package/theme-chalk/src/select.scss +269 -0
  124. package/theme-chalk/src/skeleton-item.scss +83 -0
  125. package/theme-chalk/src/skeleton.scss +44 -0
  126. package/theme-chalk/src/slider.scss +212 -0
  127. package/theme-chalk/src/space.scss +20 -0
  128. package/theme-chalk/src/spinner.scss +43 -0
  129. package/theme-chalk/src/splitter-panel.scss +8 -0
  130. package/theme-chalk/src/splitter.scss +148 -0
  131. package/theme-chalk/src/statistic.scss +35 -0
  132. package/theme-chalk/src/step.scss +320 -0
  133. package/theme-chalk/src/steps.scss +22 -0
  134. package/theme-chalk/src/sub-menu.scss +0 -0
  135. package/theme-chalk/src/switch.scss +294 -0
  136. package/theme-chalk/src/tab-pane.scss +0 -0
  137. package/theme-chalk/src/table-column.scss +100 -0
  138. package/theme-chalk/src/table-v2.scss +239 -0
  139. package/theme-chalk/src/table.scss +698 -0
  140. package/theme-chalk/src/tabs.scss +699 -0
  141. package/theme-chalk/src/tag.scss +195 -0
  142. package/theme-chalk/src/text.scss +51 -0
  143. package/theme-chalk/src/time-picker.scss +5 -0
  144. package/theme-chalk/src/time-select.scss +37 -0
  145. package/theme-chalk/src/timeline-item.scss +135 -0
  146. package/theme-chalk/src/timeline.scss +101 -0
  147. package/theme-chalk/src/tooltip.scss +0 -0
  148. package/theme-chalk/src/tour.scss +187 -0
  149. package/theme-chalk/src/transfer.scss +201 -0
  150. package/theme-chalk/src/tree-select.scss +41 -0
  151. package/theme-chalk/src/tree.scss +134 -0
  152. package/theme-chalk/src/upload.scss +660 -0
  153. package/theme-chalk/src/var.scss +87 -0
  154. package/theme-chalk/src/virtual-list.scss +40 -0
@@ -0,0 +1,320 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'common/var' as *;
3
+
4
+ @include b(step) {
5
+ position: relative;
6
+ flex-shrink: 1;
7
+
8
+ @include pseudo(last-of-type) {
9
+ @include e(line) {
10
+ display: none;
11
+ }
12
+
13
+ // 只有未设置 space 的情况下才自适应宽度
14
+ @include when(flex) {
15
+ flex-basis: auto !important;
16
+ flex-shrink: 0;
17
+ flex-grow: 0;
18
+ }
19
+
20
+ @include e((main, description)) {
21
+ padding-right: 0;
22
+ }
23
+ }
24
+
25
+ @include e(head) {
26
+ position: relative;
27
+ width: 100%;
28
+
29
+ @include when(process) {
30
+ color: getCssVar('text-color', 'primary');
31
+ border-color: getCssVar('text-color', 'primary');
32
+ }
33
+
34
+ @include when(wait) {
35
+ color: getCssVar('text-color', 'placeholder');
36
+ border-color: getCssVar('text-color', 'placeholder');
37
+ }
38
+
39
+ @include when(success) {
40
+ color: getCssVar('color-success');
41
+ border-color: getCssVar('color-success');
42
+ }
43
+
44
+ @include when(error) {
45
+ color: getCssVar('color-danger');
46
+ border-color: getCssVar('color-danger');
47
+ }
48
+
49
+ @include when(finish) {
50
+ color: getCssVar('color-primary');
51
+ border-color: getCssVar('color-primary');
52
+ }
53
+ }
54
+
55
+ @include e(icon) {
56
+ position: relative;
57
+ z-index: 1;
58
+ display: inline-flex;
59
+ justify-content: center;
60
+ align-items: center;
61
+ width: 24px;
62
+ height: 24px;
63
+ font-size: 14px;
64
+ box-sizing: border-box;
65
+ background: getCssVar('bg-color');
66
+ transition: 0.15s ease-out;
67
+
68
+ @include when(text) {
69
+ border-radius: 50%;
70
+ border: 2px solid;
71
+ border-color: currentColor;
72
+ }
73
+
74
+ @include when(icon) {
75
+ width: 40px;
76
+ }
77
+ }
78
+
79
+ @include e(icon-inner) {
80
+ display: inline-block;
81
+ user-select: none;
82
+ text-align: center;
83
+ font-weight: bold;
84
+ line-height: 1;
85
+ color: inherit;
86
+
87
+ &[class*='#{$namespace}-icon']:not(.is-status) {
88
+ font-size: 25px;
89
+ font-weight: normal;
90
+ }
91
+
92
+ // 组件自身表示状态的图标
93
+ @include when(status) {
94
+ transform: translateY(1px);
95
+ }
96
+ }
97
+
98
+ @include e(line) {
99
+ position: absolute;
100
+ border-color: currentColor;
101
+ background-color: getCssVar('text-color', 'placeholder');
102
+ }
103
+
104
+ @include e(line-inner) {
105
+ display: block;
106
+ border-width: 1px;
107
+ border-style: solid;
108
+ border-color: currentColor;
109
+ transition: 0.15s ease-out;
110
+ box-sizing: border-box;
111
+ width: 0;
112
+ height: 0;
113
+ }
114
+
115
+ @include e(main) {
116
+ white-space: normal;
117
+ text-align: left;
118
+ }
119
+
120
+ @include e(title) {
121
+ font-size: 16px;
122
+ line-height: 38px;
123
+
124
+ @include when(process) {
125
+ font-weight: bold;
126
+ color: getCssVar('text-color', 'primary');
127
+ }
128
+
129
+ @include when(wait) {
130
+ color: getCssVar('text-color', 'placeholder');
131
+ }
132
+
133
+ @include when(success) {
134
+ color: getCssVar('color-success');
135
+ }
136
+
137
+ @include when(error) {
138
+ color: getCssVar('color-danger');
139
+ }
140
+
141
+ @include when(finish) {
142
+ color: getCssVar('color-primary');
143
+ }
144
+ }
145
+
146
+ @include e(description) {
147
+ padding-right: 10%;
148
+ margin-top: -5px;
149
+ font-size: 12px;
150
+ line-height: 20px;
151
+ font-weight: normal;
152
+
153
+ @include when(process) {
154
+ color: getCssVar('text-color', 'primary');
155
+ }
156
+
157
+ @include when(wait) {
158
+ color: getCssVar('text-color', 'placeholder');
159
+ }
160
+
161
+ @include when(success) {
162
+ color: getCssVar('color-success');
163
+ }
164
+
165
+ @include when(error) {
166
+ color: getCssVar('color-danger');
167
+ }
168
+
169
+ @include when(finish) {
170
+ color: getCssVar('color-primary');
171
+ }
172
+ }
173
+
174
+ @include when(horizontal) {
175
+ display: inline-block;
176
+
177
+ @include e(line) {
178
+ height: 2px;
179
+ top: 11px;
180
+ left: 0;
181
+ right: 0;
182
+ }
183
+ }
184
+
185
+ @include when(vertical) {
186
+ display: flex;
187
+
188
+ @include e(head) {
189
+ flex-grow: 0;
190
+ width: 24px;
191
+ }
192
+
193
+ @include e(main) {
194
+ padding-left: 10px;
195
+ flex-grow: 1;
196
+ }
197
+
198
+ @include e(title) {
199
+ line-height: 24px;
200
+ padding-bottom: 8px;
201
+ }
202
+
203
+ @include e(line) {
204
+ width: 2px;
205
+ top: 0;
206
+ bottom: 0;
207
+ left: 11px;
208
+ }
209
+
210
+ @include e(icon) {
211
+ @include when(icon) {
212
+ width: 24px;
213
+ }
214
+ }
215
+
216
+ @include e(description) {
217
+ padding-right: 0;
218
+ }
219
+ }
220
+
221
+ @include when(center) {
222
+ @include e(head) {
223
+ text-align: center;
224
+ }
225
+
226
+ @include e(main) {
227
+ text-align: center;
228
+ }
229
+
230
+ @include e(description) {
231
+ padding-left: 20%;
232
+ padding-right: 20%;
233
+ }
234
+
235
+ @include e(line) {
236
+ left: 50%;
237
+ right: -50%;
238
+ }
239
+ }
240
+
241
+ @include when(simple) {
242
+ display: flex;
243
+ align-items: center;
244
+
245
+ @include e(head) {
246
+ width: auto;
247
+ font-size: 0;
248
+ padding-right: 10px;
249
+ }
250
+
251
+ @include e(icon) {
252
+ background: transparent;
253
+ width: 16px;
254
+ height: 16px;
255
+ font-size: 12px;
256
+ }
257
+
258
+ @include e(icon-inner) {
259
+ &[class*='#{$namespace}-icon']:not(.is-status) {
260
+ font-size: 18px;
261
+ }
262
+
263
+ &.is-status {
264
+ transform: scale(0.8) translateY(1px);
265
+ }
266
+ }
267
+
268
+ @include e(main) {
269
+ position: relative;
270
+ display: flex;
271
+ align-items: stretch;
272
+ flex-grow: 1;
273
+ }
274
+
275
+ @include e(title) {
276
+ font-size: 16px;
277
+ line-height: 20px;
278
+ }
279
+
280
+ @include pseudo('not(:last-of-type)') {
281
+ @include e(title) {
282
+ max-width: 50%;
283
+ overflow-wrap: break-word;
284
+ }
285
+ }
286
+
287
+ @include e(arrow) {
288
+ flex-grow: 1;
289
+ display: flex;
290
+ align-items: center;
291
+ justify-content: center;
292
+
293
+ &::before,
294
+ &::after {
295
+ content: '';
296
+ display: inline-block;
297
+ position: absolute;
298
+ height: 15px;
299
+ width: 1px;
300
+ background: getCssVar('text-color', 'placeholder');
301
+ }
302
+
303
+ &::before {
304
+ transform: rotate(-45deg) translateY(-4px);
305
+ transform-origin: 0 0;
306
+ }
307
+
308
+ &::after {
309
+ transform: rotate(45deg) translateY(4px);
310
+ transform-origin: 100% 100%;
311
+ }
312
+ }
313
+
314
+ @include pseudo(last-of-type) {
315
+ @include e(arrow) {
316
+ display: none;
317
+ }
318
+ }
319
+ }
320
+ }
@@ -0,0 +1,22 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'common/var' as *;
3
+
4
+ @include b(steps) {
5
+ display: flex;
6
+ line-height: normal;
7
+
8
+ @include m(simple) {
9
+ padding: 13px 8%;
10
+ border-radius: 4px;
11
+ background: getCssVar('fill-color', 'light');
12
+ }
13
+
14
+ @include m(horizontal) {
15
+ white-space: nowrap;
16
+ }
17
+
18
+ @include m(vertical) {
19
+ height: 100%;
20
+ flex-flow: column;
21
+ }
22
+ }
File without changes
@@ -0,0 +1,294 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/utils' as *;
5
+ @use 'mixins/var' as *;
6
+ @use 'common/var' as *;
7
+
8
+ $switch-height: () !default;
9
+ $switch-height: map.merge(
10
+ (
11
+ 'large': 40px,
12
+ 'default': 32px,
13
+ 'small': 24px,
14
+ ),
15
+ $switch-height
16
+ );
17
+
18
+ $switch-font-size: () !default;
19
+ $switch-font-size: map.merge(
20
+ (
21
+ 'large': 14px,
22
+ 'default': 14px,
23
+ 'small': 12px,
24
+ ),
25
+ $switch-font-size
26
+ );
27
+
28
+ $switch-core-border-radius: () !default;
29
+ $switch-core-border-radius: map.merge(
30
+ (
31
+ 'large': 12px,
32
+ 'default': 10px,
33
+ 'small': 8px,
34
+ ),
35
+ $switch-core-border-radius
36
+ );
37
+
38
+ $switch-core-width: () !default;
39
+ $switch-core-width: map.merge(
40
+ (
41
+ 'large': 50px,
42
+ 'default': 40px,
43
+ 'small': 30px,
44
+ ),
45
+ $switch-core-width
46
+ );
47
+
48
+ $switch-core-height: () !default;
49
+ $switch-core-height: map.merge(
50
+ (
51
+ 'large': 24px,
52
+ 'default': 20px,
53
+ 'small': 16px,
54
+ ),
55
+ $switch-core-height
56
+ );
57
+
58
+ $switch-button-size: () !default;
59
+ $switch-button-size: map.merge(
60
+ (
61
+ 'large': 20px,
62
+ 'default': 16px,
63
+ 'small': 12px,
64
+ ),
65
+ $switch-button-size
66
+ );
67
+
68
+ $switch-content-padding: () !default;
69
+ $switch-content-padding: map.merge(
70
+ (
71
+ 'large': 6px,
72
+ 'default': 4px,
73
+ 'small': 2px,
74
+ ),
75
+ $switch-content-padding
76
+ );
77
+
78
+ @include b(switch) {
79
+ @include set-component-css-var('switch', $switch);
80
+ }
81
+
82
+ @include b(switch) {
83
+ display: inline-flex;
84
+ align-items: center;
85
+ position: relative;
86
+ font-size: map.get($switch-font-size, 'default');
87
+ line-height: map.get($switch-core-height, 'default');
88
+ height: map.get($switch-height, 'default');
89
+ vertical-align: middle;
90
+
91
+ @include when(disabled) {
92
+ & .#{$namespace}-switch__core,
93
+ & .#{$namespace}-switch__label {
94
+ cursor: not-allowed;
95
+ }
96
+ }
97
+
98
+ @include e(label) {
99
+ transition: getCssVar('transition-duration-fast');
100
+ height: map.get($switch-core-height, 'default');
101
+ display: inline-block;
102
+ font-size: map.get($switch-font-size, 'default');
103
+ font-weight: 500;
104
+ cursor: pointer;
105
+ vertical-align: middle;
106
+ color: getCssVar('text-color', 'primary');
107
+
108
+ @include when(active) {
109
+ color: getCssVar('color-primary');
110
+ }
111
+
112
+ @include m(left) {
113
+ margin-right: 10px;
114
+ }
115
+ @include m(right) {
116
+ margin-left: 10px;
117
+ }
118
+ & * {
119
+ line-height: 1;
120
+ font-size: map.get($switch-font-size, 'default');
121
+ display: inline-block;
122
+ }
123
+ .#{$namespace}-icon {
124
+ height: inherit;
125
+
126
+ svg {
127
+ vertical-align: middle;
128
+ }
129
+ }
130
+ }
131
+
132
+ @include e(input) {
133
+ position: absolute;
134
+ width: 0;
135
+ height: 0;
136
+ opacity: 0;
137
+ margin: 0;
138
+
139
+ &:focus-visible {
140
+ & ~ .#{$namespace}-switch__core {
141
+ outline: 2px solid getCssVar('switch-on-color');
142
+ outline-offset: 1px;
143
+ }
144
+ }
145
+ }
146
+
147
+ @include e(core) {
148
+ display: inline-flex;
149
+ position: relative;
150
+ align-items: center;
151
+ min-width: map.get($switch-core-width, 'default');
152
+ height: map.get($switch-core-height, 'default');
153
+ border: 1px solid
154
+ var(
155
+ #{getCssVarName('switch-border-color')},
156
+ #{getCssVar('switch-off-color')}
157
+ );
158
+ outline: none;
159
+ border-radius: map.get($switch-core-border-radius, 'default');
160
+ box-sizing: border-box;
161
+ background: getCssVar('switch-off-color');
162
+ cursor: pointer;
163
+ transition:
164
+ border-color getCssVar('transition-duration'),
165
+ background-color getCssVar('transition-duration');
166
+
167
+ .#{$namespace}-switch__inner {
168
+ width: 100%;
169
+ transition: all getCssVar('transition-duration');
170
+ height: map.get($switch-button-size, 'default');
171
+ display: flex;
172
+ justify-content: center;
173
+ align-items: center;
174
+ overflow: hidden;
175
+ padding: 0 #{map.get($switch-content-padding, 'default')} 0
176
+ calc(#{map.get($switch-button-size, 'default')} + 2px);
177
+
178
+ &-wrapper {
179
+ display: flex;
180
+ align-items: center;
181
+ font-size: 12px;
182
+ color: getCssVar('color-white');
183
+ user-select: none;
184
+ @include utils-ellipsis;
185
+ }
186
+ }
187
+
188
+ .#{$namespace}-switch__action {
189
+ position: absolute;
190
+ left: 1px;
191
+ border-radius: getCssVar('border-radius-circle');
192
+ transition: all getCssVar('transition-duration');
193
+ width: map.get($switch-button-size, 'default');
194
+ height: map.get($switch-button-size, 'default');
195
+ background-color: getCssVar('color-white');
196
+ display: flex;
197
+ justify-content: center;
198
+ align-items: center;
199
+ color: getCssVar('switch-off-color');
200
+ }
201
+ }
202
+
203
+ @include when(checked) {
204
+ .#{$namespace}-switch__core {
205
+ border-color: var(
206
+ #{getCssVarName('switch-border-color')},
207
+ #{getCssVar('switch-on-color')}
208
+ );
209
+ background-color: getCssVar('switch-on-color');
210
+
211
+ .#{$namespace}-switch__action {
212
+ left: calc(100% - #{map.get($switch-button-size, 'default') + 1px});
213
+ color: getCssVar('switch-on-color');
214
+ }
215
+
216
+ .#{$namespace}-switch__inner {
217
+ padding: 0 calc(#{map.get($switch-button-size, 'default')} + 2px) 0
218
+ #{map.get($switch-content-padding, 'default')};
219
+ }
220
+ }
221
+ }
222
+
223
+ @include when(disabled) {
224
+ opacity: 0.6;
225
+ }
226
+
227
+ @include m(wide) {
228
+ .#{$namespace}-switch__label {
229
+ &.#{$namespace}-switch__label--left {
230
+ span {
231
+ left: 10px;
232
+ }
233
+ }
234
+
235
+ &.#{$namespace}-switch__label--right {
236
+ span {
237
+ right: 10px;
238
+ }
239
+ }
240
+ }
241
+ }
242
+
243
+ & .label-fade-enter-from,
244
+ & .label-fade-leave-active {
245
+ opacity: 0;
246
+ }
247
+
248
+ @each $size in (large, small) {
249
+ @include m($size) {
250
+ font-size: map.get($switch-font-size, $size);
251
+ line-height: map.get($switch-core-height, $size);
252
+ height: map.get($switch-height, $size);
253
+
254
+ @include e(label) {
255
+ height: map.get($switch-core-height, $size);
256
+ font-size: map.get($switch-font-size, $size);
257
+
258
+ & * {
259
+ font-size: map.get($switch-font-size, $size);
260
+ }
261
+ }
262
+
263
+ @include e(core) {
264
+ min-width: map.get($switch-core-width, $size);
265
+ height: map.get($switch-core-height, $size);
266
+ border-radius: map.get($switch-core-border-radius, $size);
267
+
268
+ .#{$namespace}-switch__inner {
269
+ height: map.get($switch-button-size, $size);
270
+ padding: 0 #{map.get($switch-content-padding, $size)} 0
271
+ calc(#{map.get($switch-button-size, $size)} + 2px);
272
+ }
273
+
274
+ .#{$namespace}-switch__action {
275
+ width: map.get($switch-button-size, $size);
276
+ height: map.get($switch-button-size, $size);
277
+ }
278
+ }
279
+
280
+ @include when(checked) {
281
+ .#{$namespace}-switch__core {
282
+ .#{$namespace}-switch__action {
283
+ left: calc(100% - #{map.get($switch-button-size, $size) + 1px});
284
+ }
285
+
286
+ .#{$namespace}-switch__inner {
287
+ padding: 0 calc(#{map.get($switch-button-size, $size)} + 2px) 0
288
+ #{map.get($switch-content-padding, $size)};
289
+ }
290
+ }
291
+ }
292
+ }
293
+ }
294
+ }
File without changes