@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.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/_mixins.scss +5 -0
  4. package/_variables.scss +17 -0
  5. package/animations.scss +19 -0
  6. package/common.scss +9 -0
  7. package/components/accordion.scss +52 -0
  8. package/components/alert.scss +110 -0
  9. package/components/anchor.scss +69 -0
  10. package/components/avatar.scss +36 -0
  11. package/components/badge.scss +54 -0
  12. package/components/breadcrumb.scss +50 -0
  13. package/components/button.scss +245 -0
  14. package/components/card.scss +77 -0
  15. package/components/cascader.scss +313 -0
  16. package/components/checkbox.scss +194 -0
  17. package/components/circular-progress.scss +30 -0
  18. package/components/compose.scss +121 -0
  19. package/components/date-picker.scss +310 -0
  20. package/components/drawer.scss +113 -0
  21. package/components/dropdown.scss +156 -0
  22. package/components/empty.scss +27 -0
  23. package/components/fab.scss +293 -0
  24. package/components/form.scss +137 -0
  25. package/components/icon.scss +17 -0
  26. package/components/image.scss +213 -0
  27. package/components/input.scss +172 -0
  28. package/components/mask.scss +11 -0
  29. package/components/menu.scss +327 -0
  30. package/components/modal.scss +139 -0
  31. package/components/notification.scss +127 -0
  32. package/components/pagination.scss +134 -0
  33. package/components/popover.scss +197 -0
  34. package/components/progress.scss +125 -0
  35. package/components/radio.scss +203 -0
  36. package/components/rating.scss +75 -0
  37. package/components/select.scss +282 -0
  38. package/components/separator.scss +95 -0
  39. package/components/skeleton.scss +44 -0
  40. package/components/slider.scss +202 -0
  41. package/components/slides.scss +211 -0
  42. package/components/spinner.scss +43 -0
  43. package/components/stepper.scss +226 -0
  44. package/components/switch.scss +151 -0
  45. package/components/table.scss +297 -0
  46. package/components/tabs.scss +517 -0
  47. package/components/tag.scss +59 -0
  48. package/components/textarea.scss +69 -0
  49. package/components/time-picker.scss +212 -0
  50. package/components/timeline.scss +107 -0
  51. package/components/toast.scss +101 -0
  52. package/components/tooltip.scss +118 -0
  53. package/components/transfer.scss +122 -0
  54. package/components/tree-select.scss +218 -0
  55. package/components/tree.scss +169 -0
  56. package/components/upload.scss +367 -0
  57. package/components/wave.scss +36 -0
  58. package/index.scss +58 -0
  59. package/mixins/_polyfill.scss +34 -0
  60. package/mixins/_utils.scss +5 -0
  61. package/mixins/bem/_bem.scss +71 -0
  62. package/mixins/bem/_config.scss +4 -0
  63. package/mixins/bem/_function.scss +45 -0
  64. package/package.json +28 -0
  65. package/reboot.scss +5 -0
  66. package/root.scss +90 -0
  67. package/theme-dark.scss +62 -0
@@ -0,0 +1,77 @@
1
+ @use '../variables';
2
+ @use '../mixins';
3
+
4
+ @include mixins.b(card) {
5
+ background-color: var(--#{variables.$prefix}background-color);
6
+ border: 1px solid var(--#{variables.$prefix}color-border);
7
+ border-radius: var(--#{variables.$prefix}border-radius);
8
+ transition: box-shadow var(--#{variables.$prefix}animation-duration-base) linear;
9
+
10
+ @include mixins.m(shadow) {
11
+ box-shadow: 0 2px 8px 0 var(--#{variables.$prefix}box-shadow-color);
12
+ }
13
+
14
+ @include mixins.m(shadow-hover) {
15
+ &:hover {
16
+ box-shadow: 0 2px 8px 0 var(--#{variables.$prefix}box-shadow-color);
17
+ }
18
+ }
19
+
20
+ @include mixins.e(header) {
21
+ display: flex;
22
+ align-items: center;
23
+ padding: 16px;
24
+ border-bottom: 1px solid var(--#{variables.$prefix}color-border);
25
+ }
26
+
27
+ @include mixins.e(header-title) {
28
+ @include mixins.utils-ellipsis;
29
+
30
+ flex: 1 0 0;
31
+ font-size: var(--#{variables.$prefix}font-size-title);
32
+ font-weight: var(--#{variables.$prefix}font-weight-bold);
33
+ }
34
+
35
+ @include mixins.e(header-action) {
36
+ margin-left: 10px;
37
+ }
38
+
39
+ @include mixins.e(content) {
40
+ position: relative;
41
+ padding: 16px;
42
+ }
43
+
44
+ @include mixins.e(actions) {
45
+ display: flex;
46
+ height: 48px;
47
+ border-top: 1px solid var(--#{variables.$prefix}color-border);
48
+ }
49
+
50
+ @include mixins.e(action) {
51
+ display: inline-flex;
52
+ flex: 1 0 0;
53
+ align-items: center;
54
+ justify-content: center;
55
+ padding: 0;
56
+ margin: 0;
57
+ font: inherit;
58
+ color: var(--#{variables.$prefix}color-text-sub);
59
+ vertical-align: top;
60
+ appearance: none;
61
+ cursor: pointer;
62
+ background-color: transparent;
63
+ border: none;
64
+ outline: none;
65
+ transition: color var(--#{variables.$prefix}animation-duration-base) linear;
66
+
67
+ &:hover,
68
+ &:focus {
69
+ color: var(--#{variables.$prefix}color-light-primary);
70
+ }
71
+
72
+ @include mixins.when(disabled) {
73
+ color: var(--#{variables.$prefix}color-disabled);
74
+ pointer-events: none;
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,313 @@
1
+ @use '../variables';
2
+ @use '../mixins';
3
+
4
+ $cascader-option-height: 32px;
5
+
6
+ @include mixins.b(cascader) {
7
+ $selector: &;
8
+
9
+ position: relative;
10
+ display: inline-flex;
11
+ align-items: center;
12
+ height: var(--size);
13
+ padding: 0 calc(var(--horizontal-space) - 1px);
14
+ font-size: var(--font-size);
15
+ vertical-align: top;
16
+ cursor: pointer;
17
+ background-color: var(--#{variables.$prefix}background-color-input);
18
+ border: 1px solid var(--#{variables.$prefix}color-border);
19
+ border-radius: var(--#{variables.$prefix}border-radius);
20
+ transition: border-color var(--#{variables.$prefix}animation-duration-base) linear;
21
+
22
+ &:hover,
23
+ &:focus-within {
24
+ border-color: var(--#{variables.$prefix}color-light-primary);
25
+ }
26
+
27
+ @each $invalid, $color in ('warning': 'warning', 'error': 'danger') {
28
+ &[data-l-form-invalid='#{$invalid}'] {
29
+ border-color: var(--#{variables.$prefix}color-#{$color}) !important;
30
+
31
+ #{$selector}__search {
32
+ caret-color: var(--#{variables.$prefix}color-#{$color}) !important;
33
+ }
34
+ }
35
+ }
36
+
37
+ @include mixins.when(expanded) {
38
+ border-color: var(--#{variables.$prefix}color-primary);
39
+
40
+ @include mixins.e(arrow) {
41
+ transform: rotate(180deg);
42
+ }
43
+ }
44
+
45
+ @include mixins.when(disabled) {
46
+ --#{variables.$prefix}tag-color: var(--#{variables.$prefix}color-disabled);
47
+
48
+ color: var(--#{variables.$prefix}color-disabled);
49
+ pointer-events: none;
50
+ background-color: var(--#{variables.$prefix}background-color-disabled);
51
+
52
+ @include mixins.e(placeholder) {
53
+ opacity: 0.5;
54
+ }
55
+
56
+ @include mixins.e(icon) {
57
+ color: var(--#{variables.$prefix}color-disabled);
58
+ }
59
+ }
60
+
61
+ @include mixins.m(small) {
62
+ --size: var(--#{variables.$prefix}cascader-size, var(--#{variables.$prefix}size-small));
63
+ --horizontal-space: var(--#{variables.$prefix}cascader-horizontal-space, var(--#{variables.$prefix}horizontal-space-small));
64
+ --font-size: var(--#{variables.$prefix}cascader-font-size, var(--#{variables.$prefix}font-size-small));
65
+ }
66
+
67
+ @include mixins.m(medium) {
68
+ --size: var(--#{variables.$prefix}cascader-size, var(--#{variables.$prefix}size-medium));
69
+ --horizontal-space: var(--#{variables.$prefix}cascader-horizontal-space, var(--#{variables.$prefix}horizontal-space-medium));
70
+ --font-size: var(--#{variables.$prefix}cascader-font-size, var(--#{variables.$prefix}font-size-medium));
71
+ }
72
+
73
+ @include mixins.m(large) {
74
+ --size: var(--#{variables.$prefix}cascader-size, var(--#{variables.$prefix}size-large));
75
+ --horizontal-space: var(--#{variables.$prefix}cascader-horizontal-space, var(--#{variables.$prefix}horizontal-space-large));
76
+ --font-size: var(--#{variables.$prefix}cascader-font-size, var(--#{variables.$prefix}font-size-large));
77
+ }
78
+
79
+ @include mixins.e(container) {
80
+ position: relative;
81
+ display: inline-flex;
82
+ flex-grow: 1;
83
+ align-items: center;
84
+ height: 100%;
85
+ overflow: hidden;
86
+ }
87
+
88
+ @include mixins.e(content) {
89
+ @include mixins.utils-ellipsis;
90
+
91
+ .#{variables.$prefix}tag + .#{variables.$prefix}tag {
92
+ margin-left: 8px;
93
+ }
94
+ }
95
+
96
+ @include mixins.e(search) {
97
+ position: absolute;
98
+ top: 0;
99
+ right: 0;
100
+ bottom: 0;
101
+ left: 0;
102
+ z-index: 5;
103
+ display: inline-block;
104
+ min-width: 0;
105
+ padding: 0;
106
+ margin: 0;
107
+ font: inherit;
108
+ color: var(--#{variables.$prefix}color-text);
109
+ letter-spacing: inherit;
110
+ appearance: none;
111
+ caret-color: var(--#{variables.$prefix}color-primary);
112
+ background-color: transparent;
113
+ border: none;
114
+ outline: none;
115
+
116
+ &::-webkit-search-cancel-button {
117
+ display: none;
118
+ appearance: none;
119
+ }
120
+ }
121
+
122
+ @include mixins.e(placeholder-wrapper) {
123
+ position: absolute;
124
+ top: 0;
125
+ right: 0;
126
+ bottom: 0;
127
+ left: 0;
128
+ display: flex;
129
+ align-items: center;
130
+ user-select: none;
131
+ }
132
+
133
+ @include mixins.e(placeholder) {
134
+ @include mixins.utils-ellipsis;
135
+
136
+ color: var(--#{variables.$prefix}color-disabled);
137
+ }
138
+
139
+ @include mixins.e(multiple-count) {
140
+ z-index: 1;
141
+ flex-shrink: 0;
142
+ margin-left: 4px;
143
+ }
144
+
145
+ @include mixins.e(close) {
146
+ margin: 0 0 0 4px;
147
+ color: var(--#{variables.$prefix}color-icon-decorator);
148
+ transition: color var(--#{variables.$prefix}animation-duration-base) linear;
149
+
150
+ &:hover,
151
+ &:focus {
152
+ color: var(--#{variables.$prefix}color-light-primary);
153
+ }
154
+
155
+ &:active {
156
+ color: var(--#{variables.$prefix}color-dark-primary);
157
+ }
158
+ }
159
+
160
+ @include mixins.e(clear) {
161
+ position: absolute;
162
+ right: calc(var(--horizontal-space) - 1px);
163
+ z-index: 5;
164
+ color: var(--#{variables.$prefix}color-icon-decorator);
165
+ transition: color var(--#{variables.$prefix}animation-duration-base) linear;
166
+
167
+ &:hover,
168
+ &:focus {
169
+ color: var(--#{variables.$prefix}color-light-primary);
170
+ }
171
+
172
+ &:active {
173
+ color: var(--#{variables.$prefix}color-dark-primary);
174
+ }
175
+ }
176
+
177
+ @include mixins.e(icon) {
178
+ z-index: 1;
179
+ flex-shrink: 0;
180
+ margin-left: 4px;
181
+ color: var(--#{variables.$prefix}color-icon-decorator);
182
+ }
183
+
184
+ @include mixins.e(arrow) {
185
+ transition: transform var(--#{variables.$prefix}animation-duration-base) linear;
186
+ }
187
+
188
+ @include mixins.e(list) {
189
+ position: relative;
190
+ max-height: calc(8px + #{$cascader-option-height} * 6);
191
+ padding: 4px 0;
192
+ margin: 0;
193
+ overflow: hidden auto;
194
+ list-style: none;
195
+
196
+ & + & {
197
+ border-left: 1px solid var(--#{variables.$prefix}color-divider);
198
+ }
199
+
200
+ @include mixins.m(inline) {
201
+ display: inline-block;
202
+ vertical-align: top;
203
+ }
204
+ }
205
+
206
+ @include mixins.e(option) {
207
+ position: relative;
208
+ display: flex;
209
+ align-items: center;
210
+ min-height: $cascader-option-height;
211
+ padding: 0 12px;
212
+ cursor: pointer;
213
+ transition: background-color var(--#{variables.$prefix}animation-duration-base) linear;
214
+
215
+ &:not(.is-selected):hover {
216
+ background-color: var(--#{variables.$prefix}background-color-hover);
217
+ }
218
+
219
+ @include mixins.when(focused) {
220
+ color: var(--#{variables.$prefix}color-light-primary);
221
+ }
222
+
223
+ @include mixins.when(selected) {
224
+ background-color: var(--#{variables.$prefix}background-color-primary);
225
+ }
226
+
227
+ @include mixins.when(disabled) {
228
+ color: var(--#{variables.$prefix}color-disabled);
229
+ pointer-events: none;
230
+ }
231
+ }
232
+
233
+ @include mixins.e(option-dot) {
234
+ position: absolute;
235
+ top: 50%;
236
+ left: 4px;
237
+ width: 4px;
238
+ height: 4px;
239
+ content: '';
240
+ background-color: var(--#{variables.$prefix}color-primary);
241
+ border-radius: 50%;
242
+ transform: translateY(-50%);
243
+ }
244
+
245
+ @include mixins.e(option-prefix) {
246
+ display: inline-flex;
247
+ margin-right: 8px;
248
+ }
249
+
250
+ @include mixins.e(option-content) {
251
+ @include mixins.utils-ellipsis;
252
+
253
+ flex: 1 0 0;
254
+ }
255
+
256
+ @include mixins.e(option-icon) {
257
+ margin-left: 8px;
258
+ }
259
+
260
+ @include mixins.e(option-group) {
261
+ padding: 0;
262
+ margin: 0;
263
+ list-style: none;
264
+ }
265
+
266
+ @include mixins.e(option-group-label) {
267
+ display: flex;
268
+ align-items: center;
269
+ min-height: $cascader-option-height;
270
+ padding: 0 12px;
271
+ font-size: var(--#{variables.$prefix}font-size-subtitle);
272
+ color: var(--#{variables.$prefix}color-text-sub);
273
+ }
274
+
275
+ @include mixins.e(empty) {
276
+ display: flex;
277
+ align-items: center;
278
+ height: $cascader-option-height;
279
+ padding: 0 12px;
280
+ color: var(--#{variables.$prefix}color-disabled);
281
+ }
282
+ }
283
+
284
+ @include mixins.b(cascader-popup) {
285
+ position: fixed;
286
+ overflow: auto hidden;
287
+ white-space: nowrap;
288
+ background-color: var(--#{variables.$prefix}background-color);
289
+ border-radius: var(--#{variables.$prefix}border-radius);
290
+ box-shadow: var(--#{variables.$prefix}box-shadow-popup);
291
+
292
+ @include mixins.e(loading) {
293
+ position: absolute;
294
+ top: 0;
295
+ left: 0;
296
+ z-index: 5;
297
+ display: flex;
298
+ align-items: center;
299
+ justify-content: center;
300
+ width: 100%;
301
+ height: 100%;
302
+ color: var(--#{variables.$prefix}color-primary);
303
+ background-color: rgb(var(--#{variables.$prefix}background-color-rgb) / 80%);
304
+
305
+ @include mixins.m(empty) {
306
+ position: relative;
307
+ justify-content: flex-start;
308
+ height: 40px;
309
+ padding: 0 12px;
310
+ background-color: var(--#{variables.$prefix}background-color);
311
+ }
312
+ }
313
+ }
@@ -0,0 +1,194 @@
1
+ @use 'sass:map';
2
+ @use '../variables';
3
+ @use '../mixins';
4
+
5
+ @keyframes #{variables.$prefix}checkbox-tick {
6
+ 0% {
7
+ transform: scale(0.7);
8
+ }
9
+
10
+ 90% {
11
+ transform: scale(1.2);
12
+ }
13
+
14
+ 100% {
15
+ transform: scale(1);
16
+ }
17
+ }
18
+
19
+ @include mixins.b(checkbox) {
20
+ position: relative;
21
+ display: inline-flex;
22
+ align-items: center;
23
+ vertical-align: top;
24
+
25
+ &:hover {
26
+ @include mixins.e(input) {
27
+ border-color: var(--#{variables.$prefix}color-light-primary);
28
+ }
29
+ }
30
+
31
+ @include mixins.when(checked) {
32
+ &:not(.is-disabled) {
33
+ @include mixins.e(input) {
34
+ border-color: var(--#{variables.$prefix}color-primary);
35
+ }
36
+
37
+ @include mixins.e(state-container) {
38
+ &::before {
39
+ animation: #{variables.$prefix}wave-spread 0.36s linear;
40
+ animation-fill-mode: backwards;
41
+ }
42
+
43
+ &::after {
44
+ background-color: var(--#{variables.$prefix}color-primary);
45
+ }
46
+ }
47
+
48
+ @include mixins.e(tick) {
49
+ animation: #{variables.$prefix}checkbox-tick 133ms linear;
50
+ animation-fill-mode: backwards;
51
+ }
52
+ }
53
+ }
54
+
55
+ @include mixins.when(indeterminate) {
56
+ &:not(.is-disabled) {
57
+ @include mixins.e(input) {
58
+ border-color: var(--#{variables.$prefix}color-primary);
59
+ }
60
+
61
+ @include mixins.e(state-container) {
62
+ &::before {
63
+ animation: #{variables.$prefix}wave-spread 0.36s linear;
64
+ animation-fill-mode: backwards;
65
+ }
66
+
67
+ &::after {
68
+ background-color: var(--#{variables.$prefix}color-primary);
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ @include mixins.when(disabled) {
75
+ color: var(--#{variables.$prefix}color-disabled);
76
+ pointer-events: none;
77
+
78
+ @include mixins.e(state-container) {
79
+ &::before {
80
+ border-color: var(--#{variables.$prefix}color-disabled);
81
+ }
82
+
83
+ &::after {
84
+ background-color: var(--#{variables.$prefix}background-color-disabled);
85
+ }
86
+ }
87
+
88
+ @include mixins.e(tick) {
89
+ &::after {
90
+ border-bottom-color: var(--#{variables.$prefix}color-disabled);
91
+ border-left-color: var(--#{variables.$prefix}color-disabled);
92
+ }
93
+ }
94
+
95
+ @include mixins.e(indeterminate) {
96
+ background-color: var(--#{variables.$prefix}color-disabled);
97
+ }
98
+ }
99
+
100
+ @include mixins.e(state-container) {
101
+ position: relative;
102
+ width: 16px;
103
+ height: 16px;
104
+ cursor: pointer;
105
+ background-color: var(--#{variables.$prefix}background-color-input);
106
+ border-radius: var(--#{variables.$prefix}border-radius);
107
+
108
+ &::before {
109
+ position: absolute;
110
+ top: 0;
111
+ right: 0;
112
+ bottom: 0;
113
+ left: 0;
114
+ content: '';
115
+ border: 1px solid transparent;
116
+ border-radius: var(--#{variables.$prefix}border-radius);
117
+ }
118
+
119
+ &::after {
120
+ position: absolute;
121
+ top: 0;
122
+ right: 0;
123
+ bottom: 0;
124
+ left: 0;
125
+ content: '';
126
+ background-color: transparent;
127
+ border-radius: var(--#{variables.$prefix}border-radius);
128
+ transition:
129
+ transform var(--#{variables.$prefix}animation-duration-fast) linear,
130
+ background-color var(--#{variables.$prefix}animation-duration-fast) linear;
131
+ }
132
+ }
133
+
134
+ @include mixins.e(input) {
135
+ position: absolute;
136
+ top: 0;
137
+ right: 0;
138
+ bottom: 0;
139
+ left: 0;
140
+ z-index: 5;
141
+ display: inline-block;
142
+ width: 100%;
143
+ height: 100%;
144
+ margin: 0;
145
+ appearance: none;
146
+ cursor: inherit;
147
+ border: 1px solid var(--#{variables.$prefix}color-border);
148
+ border-radius: var(--#{variables.$prefix}border-radius);
149
+ transition: border-color var(--#{variables.$prefix}animation-duration-base) linear;
150
+
151
+ &:focus {
152
+ border-color: var(--#{variables.$prefix}color-light-primary);
153
+ box-shadow: 0 0 0 3px rgb(var(--#{variables.$prefix}color-primary-rgb) / var(--#{variables.$prefix}box-shadow-opacity-normal));
154
+ }
155
+ }
156
+
157
+ @include mixins.e(indeterminate) {
158
+ position: absolute;
159
+ top: 7px;
160
+ left: 4px;
161
+ z-index: 1;
162
+ width: 8px;
163
+ height: 2px;
164
+ background-color: map.get(variables.$colors, 'white');
165
+ }
166
+
167
+ @include mixins.e(tick) {
168
+ position: absolute;
169
+ top: 0;
170
+ right: 0;
171
+ bottom: 0;
172
+ left: 0;
173
+ z-index: 1;
174
+ overflow: hidden;
175
+ border-radius: var(--#{variables.$prefix}border-radius);
176
+
177
+ &::after {
178
+ position: absolute;
179
+ top: 3px;
180
+ left: 3px;
181
+ display: block;
182
+ width: 10px;
183
+ height: 6px;
184
+ content: '';
185
+ border-bottom: 2px solid map.get(variables.$colors, 'white');
186
+ border-left: 2px solid map.get(variables.$colors, 'white');
187
+ transform: rotate(-45deg);
188
+ }
189
+ }
190
+
191
+ @include mixins.e(label) {
192
+ margin-left: 8px;
193
+ }
194
+ }
@@ -0,0 +1,30 @@
1
+ @use '../variables';
2
+ @use '../mixins';
3
+
4
+ @keyframes #{variables.$prefix}circular-progress {
5
+ 0% {
6
+ stroke-dasharray: 1px, 200px;
7
+ stroke-dashoffset: 0;
8
+ }
9
+
10
+ 50% {
11
+ stroke-dasharray: 100px, 200px;
12
+ stroke-dashoffset: -15px;
13
+ }
14
+
15
+ 100% {
16
+ stroke-dasharray: 100px, 200px;
17
+ stroke-dashoffset: -125px;
18
+ }
19
+ }
20
+
21
+ @include mixins.b(circular-progress) {
22
+ animation: #{variables.$prefix}spin 1.4s infinite linear;
23
+
24
+ @include mixins.e(circle) {
25
+ stroke: currentcolor;
26
+ stroke-dasharray: 80px, 200px;
27
+ stroke-dashoffset: 0;
28
+ animation: #{variables.$prefix}circular-progress 1.4s infinite ease-in-out;
29
+ }
30
+ }