adtec-core-package 0.0.2 → 0.0.4

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 (164) hide show
  1. package/package.json +10 -4
  2. package/src/App.vue +0 -3
  3. package/src/assets/base.css +0 -86
  4. package/src/assets/main.css +0 -35
  5. package/src/components/ElFlex/ElFlex.vue +297 -0
  6. package/src/components/OperationAuth/operationAuth.vue +26 -0
  7. package/src/components/Search/ElIconSearch.vue +239 -0
  8. package/src/components/Search/ElSearch.vue +132 -0
  9. package/src/components/Title/ElTitle.vue +49 -0
  10. package/src/components/icon/ElIconBtn.vue +182 -0
  11. package/src/components/icon/ElIcons.vue +38 -0
  12. package/src/config/ElementPlusConfig.ts +95 -0
  13. package/src/css/elementUI/affix.scss +7 -0
  14. package/src/css/elementUI/alert.scss +115 -0
  15. package/src/css/elementUI/anchor-link.scss +41 -0
  16. package/src/css/elementUI/anchor.scss +88 -0
  17. package/src/css/elementUI/aside.scss +8 -0
  18. package/src/css/elementUI/autocomplete.scss +89 -0
  19. package/src/css/elementUI/avatar.scss +55 -0
  20. package/src/css/elementUI/backtop.scss +29 -0
  21. package/src/css/elementUI/badge.scss +58 -0
  22. package/src/css/elementUI/base.scss +3 -0
  23. package/src/css/elementUI/breadcrumb-item.scss +0 -0
  24. package/src/css/elementUI/breadcrumb.scss +62 -0
  25. package/src/css/elementUI/button-group.scss +80 -0
  26. package/src/css/elementUI/button.scss +304 -0
  27. package/src/css/elementUI/calendar.scss +80 -0
  28. package/src/css/elementUI/card.scss +45 -0
  29. package/src/css/elementUI/carousel-item.scss +58 -0
  30. package/src/css/elementUI/carousel.scss +188 -0
  31. package/src/css/elementUI/cascader-panel.scss +138 -0
  32. package/src/css/elementUI/cascader.scss +230 -0
  33. package/src/css/elementUI/check-tag.scss +60 -0
  34. package/src/css/elementUI/checkbox-button.scss +140 -0
  35. package/src/css/elementUI/checkbox-group.scss +7 -0
  36. package/src/css/elementUI/checkbox.scss +298 -0
  37. package/src/css/elementUI/col.scss +48 -0
  38. package/src/css/elementUI/collapse-item.scss +0 -0
  39. package/src/css/elementUI/collapse-transition.scss +0 -0
  40. package/src/css/elementUI/collapse.scss +70 -0
  41. package/src/css/elementUI/color/index.scss +20 -0
  42. package/src/css/elementUI/color-picker.scss +392 -0
  43. package/src/css/elementUI/common/popup.scss +47 -0
  44. package/src/css/elementUI/common/transition.scss +122 -0
  45. package/src/css/elementUI/common/var.scss +1549 -0
  46. package/src/css/elementUI/config-provider.scss +0 -0
  47. package/src/css/elementUI/container.scss +14 -0
  48. package/src/css/elementUI/dark/css-vars.scss +39 -0
  49. package/src/css/elementUI/dark/var.scss +222 -0
  50. package/src/css/elementUI/date-picker/date-picker.scss +110 -0
  51. package/src/css/elementUI/date-picker/date-range-picker.scss +113 -0
  52. package/src/css/elementUI/date-picker/date-table.scss +158 -0
  53. package/src/css/elementUI/date-picker/month-table.scss +112 -0
  54. package/src/css/elementUI/date-picker/picker-panel.scss +131 -0
  55. package/src/css/elementUI/date-picker/picker.scss +219 -0
  56. package/src/css/elementUI/date-picker/time-picker.scss +90 -0
  57. package/src/css/elementUI/date-picker/time-range-picker.scss +33 -0
  58. package/src/css/elementUI/date-picker/time-spinner.scss +111 -0
  59. package/src/css/elementUI/date-picker/year-table.scss +108 -0
  60. package/src/css/elementUI/date-picker.scss +9 -0
  61. package/src/css/elementUI/descriptions-item.scss +73 -0
  62. package/src/css/elementUI/descriptions.scss +152 -0
  63. package/src/css/elementUI/dialog.scss +199 -0
  64. package/src/css/elementUI/display.scss +12 -0
  65. package/src/css/elementUI/divider.scss +48 -0
  66. package/src/css/elementUI/drawer.scss +164 -0
  67. package/src/css/elementUI/dropdown-item.scss +0 -0
  68. package/src/css/elementUI/dropdown-menu.scss +0 -0
  69. package/src/css/elementUI/dropdown.scss +208 -0
  70. package/src/css/elementUI/empty.scss +49 -0
  71. package/src/css/elementUI/footer.scss +12 -0
  72. package/src/css/elementUI/form-item.scss +0 -0
  73. package/src/css/elementUI/form.scss +243 -0
  74. package/src/css/elementUI/header.scss +12 -0
  75. package/src/css/elementUI/icon.scss +45 -0
  76. package/src/css/elementUI/image-viewer.scss +139 -0
  77. package/src/css/elementUI/image.scss +49 -0
  78. package/src/css/elementUI/index.scss +110 -0
  79. package/src/css/elementUI/infinite-scroll.scss +0 -0
  80. package/src/css/elementUI/input-number.scss +178 -0
  81. package/src/css/elementUI/input.scss +478 -0
  82. package/src/css/elementUI/link.scss +90 -0
  83. package/src/css/elementUI/loading.scss +104 -0
  84. package/src/css/elementUI/main.scss +14 -0
  85. package/src/css/elementUI/mention.scss +88 -0
  86. package/src/css/elementUI/menu-item-group.scss +0 -0
  87. package/src/css/elementUI/menu-item.scss +0 -0
  88. package/src/css/elementUI/menu.scss +339 -0
  89. package/src/css/elementUI/message-box.scss +213 -0
  90. package/src/css/elementUI/message.scss +98 -0
  91. package/src/css/elementUI/mixins/_button.scss +165 -0
  92. package/src/css/elementUI/mixins/_col.scss +33 -0
  93. package/src/css/elementUI/mixins/_var.scss +67 -0
  94. package/src/css/elementUI/mixins/config.scss +5 -0
  95. package/src/css/elementUI/mixins/function.scss +88 -0
  96. package/src/css/elementUI/mixins/mixins.scss +237 -0
  97. package/src/css/elementUI/mixins/utils.scss +39 -0
  98. package/src/css/elementUI/notification.scss +104 -0
  99. package/src/css/elementUI/option-group.scss +33 -0
  100. package/src/css/elementUI/option.scss +71 -0
  101. package/src/css/elementUI/overlay.scss +17 -0
  102. package/src/css/elementUI/page-header.scss +60 -0
  103. package/src/css/elementUI/pagination.scss +238 -0
  104. package/src/css/elementUI/popconfirm.scss +16 -0
  105. package/src/css/elementUI/popover.scss +61 -0
  106. package/src/css/elementUI/popper.scss +106 -0
  107. package/src/css/elementUI/progress.scss +179 -0
  108. package/src/css/elementUI/radio-button.scss +169 -0
  109. package/src/css/elementUI/radio-group.scss +9 -0
  110. package/src/css/elementUI/radio.scss +215 -0
  111. package/src/css/elementUI/rate.scss +108 -0
  112. package/src/css/elementUI/reset.scss +98 -0
  113. package/src/css/elementUI/result.scss +57 -0
  114. package/src/css/elementUI/row.scss +35 -0
  115. package/src/css/elementUI/scrollbar.scss +97 -0
  116. package/src/css/elementUI/segmented.scss +183 -0
  117. package/src/css/elementUI/select-dropdown-v2.scss +1 -0
  118. package/src/css/elementUI/select-dropdown.scss +57 -0
  119. package/src/css/elementUI/select-v2.scss +4 -0
  120. package/src/css/elementUI/select.scss +253 -0
  121. package/src/css/elementUI/skeleton-item.scss +83 -0
  122. package/src/css/elementUI/skeleton.scss +44 -0
  123. package/src/css/elementUI/slider.scss +212 -0
  124. package/src/css/elementUI/space.scss +20 -0
  125. package/src/css/elementUI/spinner.scss +43 -0
  126. package/src/css/elementUI/statistic.scss +35 -0
  127. package/src/css/elementUI/step.scss +316 -0
  128. package/src/css/elementUI/steps.scss +21 -0
  129. package/src/css/elementUI/sub-menu.scss +0 -0
  130. package/src/css/elementUI/switch.scss +300 -0
  131. package/src/css/elementUI/tab-pane.scss +0 -0
  132. package/src/css/elementUI/table-column.scss +98 -0
  133. package/src/css/elementUI/table-v2.scss +236 -0
  134. package/src/css/elementUI/table.scss +694 -0
  135. package/src/css/elementUI/tabs.scss +659 -0
  136. package/src/css/elementUI/tag.scss +181 -0
  137. package/src/css/elementUI/text.scss +51 -0
  138. package/src/css/elementUI/time-picker.scss +5 -0
  139. package/src/css/elementUI/time-select.scss +37 -0
  140. package/src/css/elementUI/timeline-item.scss +84 -0
  141. package/src/css/elementUI/timeline.scss +46 -0
  142. package/src/css/elementUI/tooltip-v2.scss +95 -0
  143. package/src/css/elementUI/tooltip.scss +0 -0
  144. package/src/css/elementUI/tour.scss +187 -0
  145. package/src/css/elementUI/transfer.scss +203 -0
  146. package/src/css/elementUI/tree-select.scss +41 -0
  147. package/src/css/elementUI/tree.scss +134 -0
  148. package/src/css/elementUI/upload.scss +654 -0
  149. package/src/css/elementUI/var.scss +87 -0
  150. package/src/css/elementUI/virtual-list.scss +40 -0
  151. package/src/interface/ISysMenuDataVo.ts +22 -0
  152. package/src/interface/ISysMenuInfoVo.ts +83 -0
  153. package/src/interface/ISysMenuOperationVo.ts +21 -0
  154. package/src/interface/enum/FlexEnum.ts +85 -0
  155. package/src/views/HomeView.vue +2 -2
  156. package/vite.config.ts +2 -9
  157. package/src/components/HelloWorld.vue +0 -41
  158. package/src/components/TheWelcome.vue +0 -94
  159. package/src/components/WelcomeItem.vue +0 -87
  160. package/src/components/icons/IconCommunity.vue +0 -7
  161. package/src/components/icons/IconDocumentation.vue +0 -7
  162. package/src/components/icons/IconEcosystem.vue +0 -7
  163. package/src/components/icons/IconSupport.vue +0 -7
  164. package/src/components/icons/IconTooling.vue +0 -19
@@ -0,0 +1,316 @@
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: inherit;
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: inherit;
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: inherit;
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
+
217
+ @include when(center) {
218
+ @include e(head) {
219
+ text-align: center;
220
+ }
221
+
222
+ @include e(main) {
223
+ text-align: center;
224
+ }
225
+
226
+ @include e(description) {
227
+ padding-left: 20%;
228
+ padding-right: 20%;
229
+ }
230
+
231
+ @include e(line) {
232
+ left: 50%;
233
+ right: -50%;
234
+ }
235
+ }
236
+
237
+ @include when(simple) {
238
+ display: flex;
239
+ align-items: center;
240
+
241
+ @include e(head) {
242
+ width: auto;
243
+ font-size: 0;
244
+ padding-right: 10px;
245
+ }
246
+
247
+ @include e(icon) {
248
+ background: transparent;
249
+ width: 16px;
250
+ height: 16px;
251
+ font-size: 12px;
252
+ }
253
+
254
+ @include e(icon-inner) {
255
+ &[class*='#{$namespace}-icon']:not(.is-status) {
256
+ font-size: 18px;
257
+ }
258
+
259
+ &.is-status {
260
+ transform: scale(0.8) translateY(1px);
261
+ }
262
+ }
263
+
264
+ @include e(main) {
265
+ position: relative;
266
+ display: flex;
267
+ align-items: stretch;
268
+ flex-grow: 1;
269
+ }
270
+
271
+ @include e(title) {
272
+ font-size: 16px;
273
+ line-height: 20px;
274
+ }
275
+
276
+ @include pseudo('not(:last-of-type)') {
277
+ @include e(title) {
278
+ max-width: 50%;
279
+ overflow-wrap: break-word;
280
+ }
281
+ }
282
+
283
+ @include e(arrow) {
284
+ flex-grow: 1;
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: center;
288
+
289
+ &::before,
290
+ &::after {
291
+ content: '';
292
+ display: inline-block;
293
+ position: absolute;
294
+ height: 15px;
295
+ width: 1px;
296
+ background: getCssVar('text-color', 'placeholder');
297
+ }
298
+
299
+ &::before {
300
+ transform: rotate(-45deg) translateY(-4px);
301
+ transform-origin: 0 0;
302
+ }
303
+
304
+ &::after {
305
+ transform: rotate(45deg) translateY(4px);
306
+ transform-origin: 100% 100%;
307
+ }
308
+ }
309
+
310
+ @include pseudo(last-of-type) {
311
+ @include e(arrow) {
312
+ display: none;
313
+ }
314
+ }
315
+ }
316
+ }
@@ -0,0 +1,21 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'common/var' as *;
3
+
4
+ @include b(steps) {
5
+ display: flex;
6
+
7
+ @include m(simple) {
8
+ padding: 13px 8%;
9
+ border-radius: 4px;
10
+ background: getCssVar('fill-color', 'light');
11
+ }
12
+
13
+ @include m(horizontal) {
14
+ white-space: nowrap;
15
+ }
16
+
17
+ @include m(vertical) {
18
+ height: 100%;
19
+ flex-flow: column;
20
+ }
21
+ }
File without changes
@@ -0,0 +1,300 @@
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: border-color getCssVar('transition-duration'),
164
+ background-color getCssVar('transition-duration');
165
+
166
+ .#{$namespace}-switch__inner {
167
+ width: 100%;
168
+ transition: all getCssVar('transition-duration');
169
+ height: map.get($switch-button-size, 'default');
170
+ display: flex;
171
+ justify-content: center;
172
+ align-items: center;
173
+ overflow: hidden;
174
+ padding: 0 #{map.get($switch-content-padding, 'default')} 0 calc(#{map.get(
175
+ $switch-button-size,
176
+ 'default'
177
+ )} + 2px);
178
+
179
+ .is-icon,
180
+ .is-text {
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 #{map.get(
218
+ $switch-content-padding,
219
+ 'default'
220
+ )};
221
+ }
222
+ }
223
+ }
224
+
225
+ @include when(disabled) {
226
+ opacity: 0.6;
227
+ }
228
+
229
+ @include m(wide) {
230
+ .#{$namespace}-switch__label {
231
+ &.#{$namespace}-switch__label--left {
232
+ span {
233
+ left: 10px;
234
+ }
235
+ }
236
+
237
+ &.#{$namespace}-switch__label--right {
238
+ span {
239
+ right: 10px;
240
+ }
241
+ }
242
+ }
243
+ }
244
+
245
+ & .label-fade-enter-from,
246
+ & .label-fade-leave-active {
247
+ opacity: 0;
248
+ }
249
+
250
+ @each $size in (large, small) {
251
+ @include m($size) {
252
+ font-size: map.get($switch-font-size, $size);
253
+ line-height: map.get($switch-core-height, $size);
254
+ height: map.get($switch-height, $size);
255
+
256
+ @include e(label) {
257
+ height: map.get($switch-core-height, $size);
258
+ font-size: map.get($switch-font-size, $size);
259
+
260
+ & * {
261
+ font-size: map.get($switch-font-size, $size);
262
+ }
263
+ }
264
+
265
+ @include e(core) {
266
+ min-width: map.get($switch-core-width, $size);
267
+ height: map.get($switch-core-height, $size);
268
+ border-radius: map.get($switch-core-border-radius, $size);
269
+
270
+ .#{$namespace}-switch__inner {
271
+ height: map.get($switch-button-size, $size);
272
+ padding: 0 #{map.get($switch-content-padding, $size)} 0 calc(#{map.get(
273
+ $switch-button-size,
274
+ $size
275
+ )} + 2px);
276
+ }
277
+
278
+ .#{$namespace}-switch__action {
279
+ width: map.get($switch-button-size, $size);
280
+ height: map.get($switch-button-size, $size);
281
+ }
282
+ }
283
+
284
+ @include when(checked) {
285
+ .#{$namespace}-switch__core {
286
+ .#{$namespace}-switch__action {
287
+ left: calc(100% - #{map.get($switch-button-size, $size) + 1px});
288
+ }
289
+
290
+ .#{$namespace}-switch__inner {
291
+ padding: 0 calc(#{map.get($switch-button-size, $size)} + 2px) 0 #{map.get(
292
+ $switch-content-padding,
293
+ $size
294
+ )};
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+ }
File without changes