@laser-ui/themes 0.0.1
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.
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/_mixins.scss +5 -0
- package/_variables.scss +17 -0
- package/animations.scss +19 -0
- package/common.scss +9 -0
- package/components/accordion.scss +52 -0
- package/components/alert.scss +110 -0
- package/components/anchor.scss +69 -0
- package/components/avatar.scss +36 -0
- package/components/badge.scss +54 -0
- package/components/breadcrumb.scss +50 -0
- package/components/button.scss +245 -0
- package/components/card.scss +77 -0
- package/components/cascader.scss +313 -0
- package/components/checkbox.scss +194 -0
- package/components/circular-progress.scss +30 -0
- package/components/compose.scss +121 -0
- package/components/date-picker.scss +310 -0
- package/components/drawer.scss +113 -0
- package/components/dropdown.scss +156 -0
- package/components/empty.scss +27 -0
- package/components/fab.scss +293 -0
- package/components/form.scss +137 -0
- package/components/icon.scss +17 -0
- package/components/image.scss +213 -0
- package/components/input.scss +172 -0
- package/components/mask.scss +11 -0
- package/components/menu.scss +327 -0
- package/components/modal.scss +139 -0
- package/components/notification.scss +127 -0
- package/components/pagination.scss +134 -0
- package/components/popover.scss +197 -0
- package/components/progress.scss +125 -0
- package/components/radio.scss +203 -0
- package/components/rating.scss +75 -0
- package/components/select.scss +282 -0
- package/components/separator.scss +95 -0
- package/components/skeleton.scss +44 -0
- package/components/slider.scss +202 -0
- package/components/slides.scss +211 -0
- package/components/spinner.scss +43 -0
- package/components/stepper.scss +226 -0
- package/components/switch.scss +151 -0
- package/components/table.scss +297 -0
- package/components/tabs.scss +517 -0
- package/components/tag.scss +59 -0
- package/components/textarea.scss +69 -0
- package/components/time-picker.scss +212 -0
- package/components/timeline.scss +107 -0
- package/components/toast.scss +101 -0
- package/components/tooltip.scss +118 -0
- package/components/transfer.scss +122 -0
- package/components/tree-select.scss +218 -0
- package/components/tree.scss +169 -0
- package/components/upload.scss +367 -0
- package/components/wave.scss +36 -0
- package/index.scss +58 -0
- package/mixins/_polyfill.scss +34 -0
- package/mixins/_utils.scss +5 -0
- package/mixins/bem/_bem.scss +71 -0
- package/mixins/bem/_config.scss +4 -0
- package/mixins/bem/_function.scss +45 -0
- package/package.json +28 -0
- package/reboot.scss +5 -0
- package/root.scss +90 -0
- package/theme-dark.scss +62 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
@use '../mixins';
|
|
4
|
+
|
|
5
|
+
@include mixins.b(upload) {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@include mixins.b(upload-button) {
|
|
10
|
+
$selector: &;
|
|
11
|
+
|
|
12
|
+
--color: var(--#{variables.$prefix}upload-button-color);
|
|
13
|
+
|
|
14
|
+
position: relative;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
width: 104px;
|
|
20
|
+
height: 104px;
|
|
21
|
+
padding: 8px;
|
|
22
|
+
vertical-align: top;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
background-color: var(--#{variables.$prefix}background-color-light-gray);
|
|
25
|
+
border: 1px solid var(--color, var(--#{variables.$prefix}color-border));
|
|
26
|
+
border-style: dashed;
|
|
27
|
+
outline: none;
|
|
28
|
+
transition: border-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
@include mixins.e(actions) {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:not(#{$selector}--error):hover,
|
|
37
|
+
&:not(#{$selector}--error):focus {
|
|
38
|
+
border-color: var(--#{variables.$prefix}color-primary);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include mixins.when(disabled) {
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include mixins.m(load) {
|
|
46
|
+
background-color: transparent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@include mixins.m(error) {
|
|
50
|
+
--color: var(--#{variables.$prefix}upload-button-color, var(--#{variables.$prefix}color-danger));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@include mixins.e(thumbnail) {
|
|
54
|
+
width: 100%;
|
|
55
|
+
height: 100%;
|
|
56
|
+
object-fit: contain;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@include mixins.e(name) {
|
|
60
|
+
@include mixins.utils-ellipsis;
|
|
61
|
+
|
|
62
|
+
max-width: 100%;
|
|
63
|
+
margin-top: 8px;
|
|
64
|
+
color: var(--color);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@include mixins.e(actions) {
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 8px;
|
|
70
|
+
right: 8px;
|
|
71
|
+
bottom: 8px;
|
|
72
|
+
left: 8px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
background-color: var(--#{variables.$prefix}background-color-mask);
|
|
77
|
+
opacity: 0;
|
|
78
|
+
transition: opacity var(--#{variables.$prefix}animation-duration-base) linear;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include mixins.e(icon) {
|
|
82
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
83
|
+
font-size: 20px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include mixins.e(text) {
|
|
87
|
+
margin-top: 8px;
|
|
88
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@include mixins.b(upload-action) {
|
|
94
|
+
$selector: &;
|
|
95
|
+
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
min-width: 24px;
|
|
100
|
+
height: 24px;
|
|
101
|
+
padding: 0;
|
|
102
|
+
margin: 0;
|
|
103
|
+
font: inherit;
|
|
104
|
+
color: var(--#{variables.$prefix}color-text);
|
|
105
|
+
vertical-align: top;
|
|
106
|
+
appearance: none;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
background-color: transparent;
|
|
109
|
+
border: none;
|
|
110
|
+
outline: none;
|
|
111
|
+
transition: color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
112
|
+
|
|
113
|
+
&:not(#{$selector}--light):hover,
|
|
114
|
+
&:not(#{$selector}--light):focus {
|
|
115
|
+
color: var(--#{variables.$prefix}color-primary);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@include mixins.when(disabled) {
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
filter: opacity(50%);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@include mixins.m(light) {
|
|
124
|
+
color: map.get(variables.$colors, 'white');
|
|
125
|
+
transition: background-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
126
|
+
|
|
127
|
+
&:hover,
|
|
128
|
+
&:focus {
|
|
129
|
+
background-color: var(--#{variables.$prefix}background-color-light-hover);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@include mixins.m(preview) {
|
|
134
|
+
text-decoration: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@include mixins.b(upload-list) {
|
|
139
|
+
--color: var(--#{variables.$prefix}upload-list-color);
|
|
140
|
+
|
|
141
|
+
padding: 0;
|
|
142
|
+
margin: 0;
|
|
143
|
+
list-style: none;
|
|
144
|
+
|
|
145
|
+
@include mixins.e(item) {
|
|
146
|
+
position: relative;
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
height: 24px;
|
|
150
|
+
transition: background-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
151
|
+
|
|
152
|
+
& + & {
|
|
153
|
+
margin-top: 8px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:hover {
|
|
157
|
+
background-color: var(--#{variables.$prefix}background-color-hover);
|
|
158
|
+
|
|
159
|
+
@include mixins.e(actions) {
|
|
160
|
+
opacity: 1;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@include mixins.m(error) {
|
|
165
|
+
--color: var(--#{variables.$prefix}upload-list-color, var(--#{variables.$prefix}color-danger));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@include mixins.e(icon) {
|
|
169
|
+
width: calc(1em + 8px);
|
|
170
|
+
color: var(--color, var(--#{variables.$prefix}color-text-sub));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@include mixins.e(link) {
|
|
174
|
+
@include mixins.utils-ellipsis;
|
|
175
|
+
|
|
176
|
+
display: inline-block;
|
|
177
|
+
flex: 1 0 0;
|
|
178
|
+
color: var(--color, var(--#{variables.$prefix}color-text));
|
|
179
|
+
text-decoration: none;
|
|
180
|
+
|
|
181
|
+
@include mixins.when(active) {
|
|
182
|
+
color: var(--#{variables.$prefix}color-primary);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@include mixins.e(actions) {
|
|
187
|
+
margin-left: auto;
|
|
188
|
+
opacity: 0;
|
|
189
|
+
transition: opacity var(--#{variables.$prefix}animation-duration-base) linear;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@include mixins.e(progress-wrapper) {
|
|
193
|
+
position: absolute;
|
|
194
|
+
bottom: -4px;
|
|
195
|
+
left: 24px;
|
|
196
|
+
width: calc(100% - 24px);
|
|
197
|
+
height: 2px;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@include mixins.b(upload-picture) {
|
|
203
|
+
--color: var(--#{variables.$prefix}upload-picture-color);
|
|
204
|
+
--gutter-x: var(--#{variables.$prefix}upload-picture-gutter-x, 8px);
|
|
205
|
+
--gutter-y: var(--#{variables.$prefix}upload-picture-gutter-y, 8px);
|
|
206
|
+
|
|
207
|
+
padding: 0;
|
|
208
|
+
margin: 0;
|
|
209
|
+
list-style: none;
|
|
210
|
+
|
|
211
|
+
@include mixins.e(row) {
|
|
212
|
+
display: flex;
|
|
213
|
+
flex-wrap: wrap;
|
|
214
|
+
align-items: center;
|
|
215
|
+
margin: calc(-1 * var(--gutter-y)) calc(-0.5 * var(--gutter-x)) 0 calc(-0.5 * var(--gutter-x));
|
|
216
|
+
|
|
217
|
+
& > * {
|
|
218
|
+
padding-right: calc(var(--gutter-x) * 0.5);
|
|
219
|
+
padding-left: calc(var(--gutter-x) * 0.5);
|
|
220
|
+
margin-top: var(--gutter-y);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@include mixins.e(item) {
|
|
225
|
+
position: relative;
|
|
226
|
+
display: inline-flex;
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
align-items: center;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
width: 104px;
|
|
231
|
+
height: 104px;
|
|
232
|
+
padding: 8px;
|
|
233
|
+
vertical-align: top;
|
|
234
|
+
background-color: var(--#{variables.$prefix}background-color-light-gray);
|
|
235
|
+
border: 1px solid var(--#{variables.$prefix}color-border);
|
|
236
|
+
|
|
237
|
+
&:hover {
|
|
238
|
+
@include mixins.e(actions) {
|
|
239
|
+
opacity: 1;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@include mixins.when(disabled) {
|
|
244
|
+
pointer-events: none;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@include mixins.m(load) {
|
|
248
|
+
background-color: transparent;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@include mixins.m(error) {
|
|
252
|
+
--color: var(--#{variables.$prefix}upload-picture-color, var(--#{variables.$prefix}color-danger));
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@include mixins.e(thumbnail) {
|
|
257
|
+
width: 100%;
|
|
258
|
+
height: 100%;
|
|
259
|
+
object-fit: contain;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@include mixins.e(name) {
|
|
263
|
+
@include mixins.utils-ellipsis;
|
|
264
|
+
|
|
265
|
+
max-width: 100%;
|
|
266
|
+
margin-top: 8px;
|
|
267
|
+
color: var(--color);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@include mixins.e(actions) {
|
|
271
|
+
position: absolute;
|
|
272
|
+
top: 8px;
|
|
273
|
+
right: 8px;
|
|
274
|
+
bottom: 8px;
|
|
275
|
+
left: 8px;
|
|
276
|
+
display: flex;
|
|
277
|
+
align-items: center;
|
|
278
|
+
justify-content: center;
|
|
279
|
+
background-color: var(--#{variables.$prefix}background-color-mask);
|
|
280
|
+
opacity: 0;
|
|
281
|
+
transition: opacity var(--#{variables.$prefix}animation-duration-base) linear;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@include mixins.e(progress-text) {
|
|
285
|
+
margin-bottom: 8px;
|
|
286
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
287
|
+
font-size: 14px;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@include mixins.b(upload-picture-list) {
|
|
292
|
+
--color: var(--#{variables.$prefix}upload-picture-list-color);
|
|
293
|
+
|
|
294
|
+
padding: 0;
|
|
295
|
+
margin: 0;
|
|
296
|
+
list-style: none;
|
|
297
|
+
|
|
298
|
+
@include mixins.e(item) {
|
|
299
|
+
position: relative;
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
height: 66px;
|
|
303
|
+
padding: 8px;
|
|
304
|
+
border: 1px solid var(--#{variables.$prefix}color-border);
|
|
305
|
+
transition: background-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
306
|
+
|
|
307
|
+
& + & {
|
|
308
|
+
margin-top: 8px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&:hover {
|
|
312
|
+
background-color: var(--#{variables.$prefix}background-color-hover);
|
|
313
|
+
|
|
314
|
+
@include mixins.e(actions) {
|
|
315
|
+
opacity: 1;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@include mixins.m(error) {
|
|
320
|
+
--color: var(--#{variables.$prefix}upload-picture-list-color, var(--#{variables.$prefix}color-danger));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@include mixins.e(thumbnail) {
|
|
324
|
+
display: inline-flex;
|
|
325
|
+
align-items: center;
|
|
326
|
+
justify-content: center;
|
|
327
|
+
width: 48px;
|
|
328
|
+
height: 48px;
|
|
329
|
+
margin-right: 8px;
|
|
330
|
+
color: var(--color, var(--#{variables.$prefix}color-text-sub));
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@include mixins.e(thumbnail-img) {
|
|
334
|
+
width: 100%;
|
|
335
|
+
height: 100%;
|
|
336
|
+
object-fit: contain;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@include mixins.e(link) {
|
|
340
|
+
@include mixins.utils-ellipsis;
|
|
341
|
+
|
|
342
|
+
display: inline-block;
|
|
343
|
+
flex: 1 0 0;
|
|
344
|
+
line-height: 48px;
|
|
345
|
+
color: var(--color, var(--#{variables.$prefix}color-text));
|
|
346
|
+
text-decoration: none;
|
|
347
|
+
|
|
348
|
+
@include mixins.when(active) {
|
|
349
|
+
color: var(--#{variables.$prefix}color-primary);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@include mixins.e(actions) {
|
|
354
|
+
margin-left: auto;
|
|
355
|
+
opacity: 0;
|
|
356
|
+
transition: opacity var(--#{variables.$prefix}animation-duration-base) linear;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@include mixins.e(progress-wrapper) {
|
|
360
|
+
position: absolute;
|
|
361
|
+
bottom: 16px;
|
|
362
|
+
left: 64px;
|
|
363
|
+
width: calc(100% - 74px);
|
|
364
|
+
height: 2px;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
@use '../mixins';
|
|
3
|
+
|
|
4
|
+
@keyframes #{variables.$prefix}wave-wave {
|
|
5
|
+
0% {
|
|
6
|
+
box-shadow: 0 0 0 0 currentcolor;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
100% {
|
|
10
|
+
box-shadow: 0 0 0 6px currentcolor;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes #{variables.$prefix}wave-fade-out {
|
|
15
|
+
0% {
|
|
16
|
+
opacity: 0.2;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
100% {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include mixins.b(wave) {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
border-radius: inherit;
|
|
32
|
+
animation:
|
|
33
|
+
#{variables.$prefix}wave-wave 0.4s cubic-bezier(0.08, 0.82, 0.17, 1),
|
|
34
|
+
#{variables.$prefix}wave-fade-out 2s cubic-bezier(0.08, 0.82, 0.17, 1);
|
|
35
|
+
animation-fill-mode: both;
|
|
36
|
+
}
|
package/index.scss
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@use 'root';
|
|
2
|
+
|
|
3
|
+
@use 'reboot';
|
|
4
|
+
@use 'animations';
|
|
5
|
+
@use 'common';
|
|
6
|
+
|
|
7
|
+
@use 'components/circular-progress';
|
|
8
|
+
@use 'components/mask';
|
|
9
|
+
@use 'components/wave';
|
|
10
|
+
|
|
11
|
+
@use 'components/accordion';
|
|
12
|
+
@use 'components/alert';
|
|
13
|
+
@use 'components/anchor';
|
|
14
|
+
@use 'components/avatar';
|
|
15
|
+
@use 'components/badge';
|
|
16
|
+
@use 'components/breadcrumb';
|
|
17
|
+
@use 'components/button';
|
|
18
|
+
@use 'components/card';
|
|
19
|
+
@use 'components/cascader';
|
|
20
|
+
@use 'components/checkbox';
|
|
21
|
+
@use 'components/compose';
|
|
22
|
+
@use 'components/date-picker';
|
|
23
|
+
@use 'components/drawer';
|
|
24
|
+
@use 'components/dropdown';
|
|
25
|
+
@use 'components/empty';
|
|
26
|
+
@use 'components/fab';
|
|
27
|
+
@use 'components/form';
|
|
28
|
+
@use 'components/icon';
|
|
29
|
+
@use 'components/image';
|
|
30
|
+
@use 'components/input';
|
|
31
|
+
@use 'components/menu';
|
|
32
|
+
@use 'components/modal';
|
|
33
|
+
@use 'components/notification';
|
|
34
|
+
@use 'components/pagination';
|
|
35
|
+
@use 'components/popover';
|
|
36
|
+
@use 'components/progress';
|
|
37
|
+
@use 'components/radio';
|
|
38
|
+
@use 'components/rating';
|
|
39
|
+
@use 'components/select';
|
|
40
|
+
@use 'components/separator';
|
|
41
|
+
@use 'components/skeleton';
|
|
42
|
+
@use 'components/slider';
|
|
43
|
+
@use 'components/slides';
|
|
44
|
+
@use 'components/spinner';
|
|
45
|
+
@use 'components/stepper';
|
|
46
|
+
@use 'components/switch';
|
|
47
|
+
@use 'components/table';
|
|
48
|
+
@use 'components/tabs';
|
|
49
|
+
@use 'components/tag';
|
|
50
|
+
@use 'components/textarea';
|
|
51
|
+
@use 'components/time-picker';
|
|
52
|
+
@use 'components/timeline';
|
|
53
|
+
@use 'components/toast';
|
|
54
|
+
@use 'components/tooltip';
|
|
55
|
+
@use 'components/transfer';
|
|
56
|
+
@use 'components/tree';
|
|
57
|
+
@use 'components/tree-select';
|
|
58
|
+
@use 'components/upload';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
@mixin polyfill-row-gap($row-gap) {
|
|
4
|
+
@if variables.$enable-gap == true {
|
|
5
|
+
row-gap: #{$row-gap};
|
|
6
|
+
} @else {
|
|
7
|
+
& {
|
|
8
|
+
margin-top: -#{$row-gap};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
& > * {
|
|
12
|
+
margin-top: #{$row-gap};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin polyfill-column-gap($column-gap) {
|
|
18
|
+
@if variables.$enable-gap == true {
|
|
19
|
+
column-gap: #{$column-gap};
|
|
20
|
+
} @else {
|
|
21
|
+
& > *:not(:last-child) {
|
|
22
|
+
margin-right: #{$column-gap};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin polyfill-gap($row-gap, $column-gap) {
|
|
28
|
+
@if variables.$enable-gap == true {
|
|
29
|
+
gap: #{$row-gap} #{$column-gap};
|
|
30
|
+
} @else {
|
|
31
|
+
@include polyfill-row-gap($row-gap);
|
|
32
|
+
@include polyfill-column-gap($row-gap);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@use '../../variables';
|
|
2
|
+
@use 'config';
|
|
3
|
+
@use 'function';
|
|
4
|
+
|
|
5
|
+
$block-prefix: variables.$namespace !default;
|
|
6
|
+
|
|
7
|
+
@mixin b($block) {
|
|
8
|
+
$B: $block-prefix + '-' + $block !global;
|
|
9
|
+
|
|
10
|
+
.#{$B} {
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin e($element) {
|
|
16
|
+
$E: $element !global;
|
|
17
|
+
$selector: &;
|
|
18
|
+
$currentSelector: '';
|
|
19
|
+
@each $unit in $element {
|
|
20
|
+
$currentSelector: #{$currentSelector + '.' + $B + config.$element-separator + $unit + ','};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@if function.hitAllSpecialNestRule($selector) {
|
|
24
|
+
@at-root {
|
|
25
|
+
#{$selector} {
|
|
26
|
+
#{$currentSelector} {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} @else {
|
|
32
|
+
@at-root {
|
|
33
|
+
#{$currentSelector} {
|
|
34
|
+
@content;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin m($modifier) {
|
|
41
|
+
$selector: &;
|
|
42
|
+
$currentSelector: '';
|
|
43
|
+
@each $unit in $modifier {
|
|
44
|
+
$currentSelector: #{$currentSelector + & + config.$modifier-separator + $unit + ','};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@at-root {
|
|
48
|
+
#{$currentSelector} {
|
|
49
|
+
@content;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Signify that a class is responsible for adding a Theme to a view.
|
|
55
|
+
@mixin theme($theme) {
|
|
56
|
+
@at-root {
|
|
57
|
+
&.#{config.$theme-prefix + $theme} {
|
|
58
|
+
@content;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Signify that the piece of UI in question is currently
|
|
64
|
+
// styled a certain way because of a state or condition.
|
|
65
|
+
@mixin when($state) {
|
|
66
|
+
@at-root {
|
|
67
|
+
&.#{config.$state-prefix + $state} {
|
|
68
|
+
@content;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use 'config';
|
|
2
|
+
|
|
3
|
+
@function containsModifier($selector) {
|
|
4
|
+
$selector: selectortostring($selector);
|
|
5
|
+
|
|
6
|
+
@if str-index($selector, config.$modifier-separator) {
|
|
7
|
+
@return true;
|
|
8
|
+
} @else {
|
|
9
|
+
@return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@function containThemeFlag($selector) {
|
|
14
|
+
$selector: selectortostring($selector);
|
|
15
|
+
|
|
16
|
+
@if str-index($selector, '.' + config.$theme-prefix) {
|
|
17
|
+
@return true;
|
|
18
|
+
} @else {
|
|
19
|
+
@return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@function containWhenFlag($selector) {
|
|
24
|
+
$selector: selectortostring($selector);
|
|
25
|
+
|
|
26
|
+
@if str-index($selector, '.' + config.$state-prefix) {
|
|
27
|
+
@return true;
|
|
28
|
+
} @else {
|
|
29
|
+
@return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@function containPseudoClass($selector) {
|
|
34
|
+
$selector: selectortostring($selector);
|
|
35
|
+
|
|
36
|
+
@if str-index($selector, ':') {
|
|
37
|
+
@return true;
|
|
38
|
+
} @else {
|
|
39
|
+
@return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@function hitAllSpecialNestRule($selector) {
|
|
44
|
+
@return containsModifier($selector) or containThemeFlag($selector) or containWhenFlag($selector) or containPseudoClass($selector);
|
|
45
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@laser-ui/themes",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "The Sass-based styling solution of Laser UI.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ui",
|
|
7
|
+
"laser-ui",
|
|
8
|
+
"css",
|
|
9
|
+
"sass"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/laser-ui/laser-ui",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/laser-ui/laser-ui/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/laser-ui/laser-ui.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "Xie Jay <xiejay97@gmail.com>",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"rfs": "^10.0.0"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public",
|
|
26
|
+
"directory": "../../dist/libs/themes"
|
|
27
|
+
}
|
|
28
|
+
}
|