@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,151 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
@use '../mixins';
|
|
4
|
+
|
|
5
|
+
@keyframes #{variables.$prefix}switch-focus {
|
|
6
|
+
0% {
|
|
7
|
+
box-shadow: 0 0 0 8px rgb(var(--#{variables.$prefix}color-primary-rgb) / var(--#{variables.$prefix}box-shadow-opacity-normal));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
100% {
|
|
11
|
+
box-shadow: 0 0 0 10px rgb(var(--#{variables.$prefix}color-primary-rgb) / var(--#{variables.$prefix}box-shadow-opacity-dark));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include mixins.b(switch) {
|
|
16
|
+
$selector: &;
|
|
17
|
+
|
|
18
|
+
position: relative;
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
font-size: var(--font-size);
|
|
22
|
+
vertical-align: top;
|
|
23
|
+
|
|
24
|
+
&:active {
|
|
25
|
+
@include mixins.e(state-dot) {
|
|
26
|
+
width: var(--size);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:focus-within {
|
|
31
|
+
@include mixins.e(state-dot) {
|
|
32
|
+
animation: #{variables.$prefix}switch-focus 1.2s linear infinite alternate;
|
|
33
|
+
animation-fill-mode: both;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include mixins.when(checked) {
|
|
38
|
+
@include mixins.e(state-container) {
|
|
39
|
+
background-color: var(--#{variables.$prefix}color-primary);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include mixins.when(loading) {
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
filter: opacity(70%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@include mixins.when(disabled) {
|
|
49
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
filter: brightness(110%) grayscale(50%);
|
|
52
|
+
|
|
53
|
+
@include mixins.when(checked) {
|
|
54
|
+
filter: saturate(50%) grayscale(50%);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include mixins.e(state-dot) {
|
|
58
|
+
filter: opacity(50%);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@include mixins.m(label-left) {
|
|
63
|
+
flex-direction: row-reverse;
|
|
64
|
+
|
|
65
|
+
@include mixins.e(label) {
|
|
66
|
+
margin-right: 8px;
|
|
67
|
+
margin-left: unset;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@include mixins.m(small) {
|
|
72
|
+
--size: var(--#{variables.$prefix}switch-size, 18px);
|
|
73
|
+
--font-size: var(--#{variables.$prefix}switch-font-size, var(--#{variables.$prefix}font-size-small));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include mixins.m(medium) {
|
|
77
|
+
--size: var(--#{variables.$prefix}switch-size, 22px);
|
|
78
|
+
--font-size: var(--#{variables.$prefix}switch-font-size, var(--#{variables.$prefix}font-size-medium));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include mixins.m(large) {
|
|
82
|
+
--size: var(--#{variables.$prefix}switch-size, 26px);
|
|
83
|
+
--font-size: var(--#{variables.$prefix}switch-font-size, var(--#{variables.$prefix}font-size-large));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include mixins.e(state-container) {
|
|
87
|
+
position: relative;
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
align-items: center;
|
|
91
|
+
min-width: calc((var(--size) * 2) - 2px);
|
|
92
|
+
height: var(--size);
|
|
93
|
+
padding: 0 calc(var(--size) / 4);
|
|
94
|
+
background-color: var(--#{variables.$prefix}background-color-img);
|
|
95
|
+
border-radius: calc(var(--size) / 2);
|
|
96
|
+
transition: background-color var(--#{variables.$prefix}animation-duration-fast) ease-out;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include mixins.e(state-content) {
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
min-width: calc((var(--size) - 4px) / 1.25);
|
|
103
|
+
font-size: calc((var(--size) - 4px) / 1.25);
|
|
104
|
+
line-height: 1;
|
|
105
|
+
color: map.get(variables.$colors, 'white');
|
|
106
|
+
transition: opacity var(--#{variables.$prefix}animation-duration-fast) ease-out;
|
|
107
|
+
|
|
108
|
+
@include mixins.m(left) {
|
|
109
|
+
margin-right: auto;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@include mixins.e(state-dot) {
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: 2px;
|
|
116
|
+
z-index: 1;
|
|
117
|
+
display: inline-flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
width: calc(var(--size) - 4px);
|
|
121
|
+
height: calc(var(--size) - 4px);
|
|
122
|
+
font-size: calc(var(--size) - 6px);
|
|
123
|
+
color: var(--#{variables.$prefix}color-primary);
|
|
124
|
+
background-color: var(--#{variables.$prefix}background-color);
|
|
125
|
+
border-radius: calc((var(--size) - 4px) / 2);
|
|
126
|
+
box-shadow:
|
|
127
|
+
0 2px 1px -1px var(--#{variables.$prefix}box-shadow-color),
|
|
128
|
+
0 0 4px 0 var(--#{variables.$prefix}box-shadow-color);
|
|
129
|
+
transition: width var(--#{variables.$prefix}animation-duration-fast) ease-in;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@include mixins.e(input) {
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: 0;
|
|
135
|
+
right: 0;
|
|
136
|
+
bottom: 0;
|
|
137
|
+
left: 0;
|
|
138
|
+
z-index: 5;
|
|
139
|
+
display: inline-block;
|
|
140
|
+
width: 100%;
|
|
141
|
+
height: 100%;
|
|
142
|
+
margin: 0;
|
|
143
|
+
appearance: none;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
opacity: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@include mixins.e(label) {
|
|
149
|
+
margin-left: 8px;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
@use '../mixins';
|
|
3
|
+
|
|
4
|
+
@include mixins.b(table) {
|
|
5
|
+
$selector: &;
|
|
6
|
+
|
|
7
|
+
--padding-size: var(--#{variables.$prefix}table-padding-size, 16px);
|
|
8
|
+
--color-border: var(--#{variables.$prefix}table-color-border, var(--#{variables.$prefix}color-divider));
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
table {
|
|
14
|
+
width: 100%;
|
|
15
|
+
table-layout: auto;
|
|
16
|
+
border-spacing: 0;
|
|
17
|
+
border-collapse: separate;
|
|
18
|
+
|
|
19
|
+
table {
|
|
20
|
+
margin-bottom: -1px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
caption {
|
|
25
|
+
margin-bottom: 10px;
|
|
26
|
+
font-size: var(--#{variables.$prefix}font-size-title);
|
|
27
|
+
font-weight: var(--#{variables.$prefix}font-weight-bold);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
th {
|
|
31
|
+
padding: var(--padding-size);
|
|
32
|
+
font-weight: var(--#{variables.$prefix}font-weight-bold);
|
|
33
|
+
background-color: var(--#{variables.$prefix}background-color-light-gray);
|
|
34
|
+
|
|
35
|
+
&:hover #{$selector}__th-action--sort {
|
|
36
|
+
color: var(--#{variables.$prefix}color-text-sub);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
td {
|
|
41
|
+
padding: var(--padding-size);
|
|
42
|
+
background-color: var(--#{variables.$prefix}background-color);
|
|
43
|
+
border-bottom: 1px solid var(--color-border);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
thead th {
|
|
47
|
+
border-bottom: 1px solid var(--#{variables.$prefix}color-border);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
tbody th {
|
|
51
|
+
border-bottom: 1px solid var(--color-border);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:not(#{$selector}--border) thead th:not(:last-child):not(#{$selector}__cell--fixed-left#{$selector}__cell--fixed-shadow):after {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 50%;
|
|
57
|
+
right: 0;
|
|
58
|
+
width: 1px;
|
|
59
|
+
height: 1.6em;
|
|
60
|
+
content: '';
|
|
61
|
+
background-color: var(--#{variables.$prefix}color-border);
|
|
62
|
+
transform: translateY(-50%);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include mixins.m(border) {
|
|
66
|
+
--color-border: var(--#{variables.$prefix}table-color-border, var(--#{variables.$prefix}color-border));
|
|
67
|
+
|
|
68
|
+
table {
|
|
69
|
+
border-top: 1px solid var(--color-border);
|
|
70
|
+
border-left: 1px solid var(--color-border);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
th {
|
|
74
|
+
border-right: 1px solid var(--color-border);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
td {
|
|
78
|
+
border-right: 1px solid var(--color-border);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@include mixins.e(cell) {
|
|
83
|
+
position: relative;
|
|
84
|
+
|
|
85
|
+
@include mixins.m(left) {
|
|
86
|
+
@include mixins.e(th-actions) {
|
|
87
|
+
margin-left: auto;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include mixins.m(right) {
|
|
92
|
+
@include mixins.e(cell-content) {
|
|
93
|
+
justify-content: flex-end;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@include mixins.e(cell-text) {
|
|
97
|
+
text-align: right;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@include mixins.m(center) {
|
|
102
|
+
@include mixins.e(cell-content) {
|
|
103
|
+
justify-content: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@include mixins.e(cell-text) {
|
|
107
|
+
text-align: center;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@include mixins.m(fixed-left) {
|
|
112
|
+
&::before {
|
|
113
|
+
position: absolute;
|
|
114
|
+
top: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
bottom: -1px;
|
|
117
|
+
width: 30px;
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
content: '';
|
|
120
|
+
transition: box-shadow var(--#{variables.$prefix}animation-duration-base) linear;
|
|
121
|
+
transform: translateX(100%);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&#{$selector}__cell--fixed-shadow::before {
|
|
125
|
+
box-shadow: inset 8px 0 12px -10px var(--#{variables.$prefix}box-shadow-color);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@include mixins.m(fixed-right) {
|
|
130
|
+
&::before {
|
|
131
|
+
position: absolute;
|
|
132
|
+
top: 0;
|
|
133
|
+
bottom: -1px;
|
|
134
|
+
left: 0;
|
|
135
|
+
width: 30px;
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
content: '';
|
|
138
|
+
transition: box-shadow var(--#{variables.$prefix}animation-duration-base) linear;
|
|
139
|
+
transform: translateX(-100%);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&#{$selector}__cell--fixed-shadow::before {
|
|
143
|
+
box-shadow: inset -8px 0 12px -10px var(--#{variables.$prefix}box-shadow-color);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@include mixins.m(ellipsis) {
|
|
148
|
+
@include mixins.e(cell-text) {
|
|
149
|
+
@include mixins.utils-ellipsis;
|
|
150
|
+
|
|
151
|
+
overflow-wrap: unset;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@include mixins.m(th-sort) {
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@include mixins.e(cell-content) {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@include mixins.e(cell-text) {
|
|
166
|
+
overflow-wrap: break-word;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@include mixins.e(th-actions) {
|
|
170
|
+
display: inline-flex;
|
|
171
|
+
padding-left: 4px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@include mixins.e(th-action) {
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
min-width: 1.25em;
|
|
179
|
+
min-height: 1.25em;
|
|
180
|
+
padding: 0;
|
|
181
|
+
margin: 0;
|
|
182
|
+
font: inherit;
|
|
183
|
+
color: var(--#{variables.$prefix}color-icon-decorator);
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
vertical-align: top;
|
|
186
|
+
appearance: none;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
background-color: transparent;
|
|
189
|
+
border: none;
|
|
190
|
+
outline: none;
|
|
191
|
+
transition: color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
192
|
+
|
|
193
|
+
&:hover,
|
|
194
|
+
&:active,
|
|
195
|
+
&:focus {
|
|
196
|
+
color: var(--#{variables.$prefix}color-text-sub);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@include mixins.when(active) {
|
|
200
|
+
color: var(--#{variables.$prefix}color-primary);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@include mixins.when(disabled) {
|
|
204
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
205
|
+
pointer-events: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@include mixins.m(sort) {
|
|
209
|
+
flex-direction: column;
|
|
210
|
+
min-width: 16px;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@include mixins.e(th-sort-icon) {
|
|
215
|
+
& + & {
|
|
216
|
+
margin-top: -4px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@include mixins.when(active) {
|
|
220
|
+
color: var(--#{variables.$prefix}color-primary);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@include mixins.e(filter) {
|
|
225
|
+
min-width: 120px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@include mixins.e(empty-content) {
|
|
229
|
+
display: flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
justify-content: center;
|
|
232
|
+
min-height: 128px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@include mixins.e(expand) {
|
|
236
|
+
position: relative;
|
|
237
|
+
display: inline-flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
justify-content: center;
|
|
240
|
+
width: 17px;
|
|
241
|
+
height: 17px;
|
|
242
|
+
padding: 0;
|
|
243
|
+
margin: 0;
|
|
244
|
+
font: inherit;
|
|
245
|
+
color: var(--#{variables.$prefix}color-text);
|
|
246
|
+
white-space: nowrap;
|
|
247
|
+
vertical-align: top;
|
|
248
|
+
appearance: none;
|
|
249
|
+
cursor: pointer;
|
|
250
|
+
background-color: transparent;
|
|
251
|
+
border: 1px solid var(--#{variables.$prefix}color-border);
|
|
252
|
+
border-radius: var(--#{variables.$prefix}border-radius);
|
|
253
|
+
outline: none;
|
|
254
|
+
transition: border-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
255
|
+
|
|
256
|
+
&:hover,
|
|
257
|
+
&:focus {
|
|
258
|
+
border-color: var(--#{variables.$prefix}color-light-primary);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
&:active {
|
|
262
|
+
border-color: var(--#{variables.$prefix}color-dark-primary);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&::before {
|
|
266
|
+
position: absolute;
|
|
267
|
+
top: 7px;
|
|
268
|
+
right: 3px;
|
|
269
|
+
left: 3px;
|
|
270
|
+
height: 1px;
|
|
271
|
+
content: '';
|
|
272
|
+
background-color: currentcolor;
|
|
273
|
+
transition: transform var(--#{variables.$prefix}animation-duration-base) linear;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&::after {
|
|
277
|
+
position: absolute;
|
|
278
|
+
top: 3px;
|
|
279
|
+
bottom: 3px;
|
|
280
|
+
left: 7px;
|
|
281
|
+
width: 1px;
|
|
282
|
+
content: '';
|
|
283
|
+
background-color: currentcolor;
|
|
284
|
+
transition: transform var(--#{variables.$prefix}animation-duration-base) linear;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
@include mixins.when(expand) {
|
|
288
|
+
&::before {
|
|
289
|
+
transform: rotate(180deg);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
&::after {
|
|
293
|
+
transform: rotate(90deg);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|