@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,202 @@
1
+ @use 'sass:map';
2
+ @use '../variables';
3
+ @use '../mixins';
4
+
5
+ @include mixins.b(slider) {
6
+ --color: var(--#{variables.$prefix}slider-color, var(--#{variables.$prefix}color-primary));
7
+
8
+ position: relative;
9
+ cursor: pointer;
10
+
11
+ @each $invalid, $color in ('warning': 'warning', 'error': 'danger') {
12
+ &[data-l-form-invalid='#{$invalid}'] {
13
+ --color: var(--#{variables.$prefix}slider-color, var(--#{variables.$prefix}color-#{$color})) !important;
14
+ }
15
+ }
16
+
17
+ @include mixins.when(disabled) {
18
+ pointer-events: none;
19
+ filter: opacity(50%);
20
+ }
21
+
22
+ @include mixins.m(horizontal) {
23
+ width: calc(100% - 14px);
24
+ padding: 8px 0;
25
+ margin: 0 7px;
26
+
27
+ @include mixins.e(track) {
28
+ width: 100%;
29
+ height: 4px;
30
+ }
31
+
32
+ @include mixins.e(thumb) {
33
+ top: 0;
34
+ height: 100%;
35
+
36
+ @include mixins.when(focused) {
37
+ transform: scaleY(1.25);
38
+ }
39
+
40
+ @include mixins.m(draggable) {
41
+ &:hover {
42
+ transform: scaleY(1.25);
43
+ }
44
+ }
45
+ }
46
+
47
+ @include mixins.e(input-wrapper) {
48
+ top: -5px;
49
+ }
50
+
51
+ @include mixins.e(mark) {
52
+ top: 9px;
53
+ }
54
+
55
+ @include mixins.e(mark-label) {
56
+ top: 6px;
57
+ left: 1px;
58
+ transform: translateX(-50%);
59
+ }
60
+ }
61
+
62
+ @include mixins.m(vertical) {
63
+ display: inline-block;
64
+ height: calc(100% - 14px);
65
+ padding: 0 8px;
66
+ margin: 7px 0;
67
+
68
+ @include mixins.e(track) {
69
+ width: 4px;
70
+ height: 100%;
71
+ }
72
+
73
+ @include mixins.e(thumb) {
74
+ left: 0;
75
+ width: 100%;
76
+
77
+ @include mixins.when(focused) {
78
+ transform: scaleX(1.25);
79
+ }
80
+
81
+ @include mixins.m(draggable) {
82
+ &:hover {
83
+ transform: scaleX(1.25);
84
+ }
85
+ }
86
+ }
87
+
88
+ @include mixins.e(input-wrapper) {
89
+ left: -5px;
90
+ }
91
+
92
+ @include mixins.e(mark) {
93
+ left: 9px;
94
+ }
95
+
96
+ @include mixins.e(mark-label) {
97
+ top: 1px;
98
+ left: 10px;
99
+ transform: translateY(-50%);
100
+ }
101
+ }
102
+
103
+ @include mixins.e(track) {
104
+ position: relative;
105
+ background-color: var(--#{variables.$prefix}background-color-indicator);
106
+ /* stylelint-disable-next-line declaration-property-value-allowed-list */
107
+ border-radius: 2px;
108
+
109
+ @include mixins.m(reverse) {
110
+ transform: rotate(180deg);
111
+ }
112
+ }
113
+
114
+ @include mixins.e(thumb) {
115
+ position: absolute;
116
+ background-color: var(--color);
117
+ border-radius: inherit;
118
+
119
+ @include mixins.m(draggable) {
120
+ transition: transform var(--#{variables.$prefix}animation-duration-fast) linear;
121
+ }
122
+ }
123
+
124
+ @include mixins.e(mark) {
125
+ position: absolute;
126
+ width: 2px;
127
+ height: 2px;
128
+ background-color: map.get(variables.$colors, 'white');
129
+ border-radius: 50%;
130
+
131
+ @include mixins.m(hidden) {
132
+ background-color: transparent;
133
+ }
134
+ }
135
+
136
+ @include mixins.e(mark-label) {
137
+ position: absolute;
138
+ /* stylelint-disable-next-line declaration-property-value-allowed-list */
139
+ font-size: 12px;
140
+ opacity: 0.5;
141
+ transition: opacity var(--#{variables.$prefix}animation-duration-fast) linear;
142
+
143
+ @include mixins.when(active) {
144
+ opacity: 1;
145
+ }
146
+ }
147
+
148
+ @include mixins.e(input-wrapper) {
149
+ position: absolute;
150
+ z-index: 1;
151
+ width: 14px;
152
+ height: 14px;
153
+ background-color: var(--#{variables.$prefix}background-color);
154
+ border: solid 2px var(--color);
155
+ border-radius: 50%;
156
+
157
+ &::after {
158
+ position: absolute;
159
+ top: 0;
160
+ right: 0;
161
+ bottom: 0;
162
+ left: 0;
163
+ content: '';
164
+ border-radius: 50%;
165
+ opacity: var(--#{variables.$prefix}box-shadow-opacity-normal);
166
+ transition: box-shadow var(--#{variables.$prefix}animation-duration-fast) linear;
167
+ }
168
+
169
+ &:hover {
170
+ &::after {
171
+ box-shadow: 0 0 0 6px var(--color);
172
+ }
173
+ }
174
+
175
+ &:focus-within {
176
+ z-index: 5;
177
+
178
+ &::after {
179
+ box-shadow: 0 0 0 6px var(--color);
180
+ }
181
+ }
182
+ }
183
+
184
+ @include mixins.e(input) {
185
+ position: absolute;
186
+ top: 0;
187
+ right: 0;
188
+ bottom: 0;
189
+ left: 0;
190
+ display: inline-block;
191
+ width: 100%;
192
+ height: 100%;
193
+ padding: 0;
194
+ margin: 0;
195
+ overflow: hidden;
196
+ appearance: none;
197
+ pointer-events: none;
198
+ cursor: pointer;
199
+ border: none;
200
+ opacity: 0;
201
+ }
202
+ }
@@ -0,0 +1,211 @@
1
+ @use '../variables';
2
+ @use '../mixins';
3
+
4
+ @include mixins.b(slides) {
5
+ position: relative;
6
+ overflow: hidden;
7
+ transition: height var(--#{variables.$prefix}animation-duration-base) linear;
8
+
9
+ @include mixins.m(vertical) {
10
+ @include mixins.e(container) {
11
+ flex-direction: column;
12
+ }
13
+
14
+ @include mixins.e(arrow) {
15
+ @include mixins.m(prev) {
16
+ top: 12px;
17
+ right: unset;
18
+ bottom: unset;
19
+ left: 50%;
20
+ transform: translate(-50%, 0) rotate(90deg);
21
+
22
+ @include mixins.when(hidden) {
23
+ transform: translate(-50%, -50%) rotate(90deg);
24
+ }
25
+ }
26
+
27
+ @include mixins.m(next) {
28
+ top: unset;
29
+ right: unset;
30
+ bottom: 12px;
31
+ left: 50%;
32
+ transform: translate(-50%, 0) rotate(90deg);
33
+
34
+ @include mixins.when(hidden) {
35
+ transform: translate(-50%, 50%) rotate(90deg);
36
+ }
37
+ }
38
+ }
39
+
40
+ @include mixins.e(pagination) {
41
+ right: 10px;
42
+ bottom: unset;
43
+ flex-direction: column;
44
+ width: unset;
45
+ height: 100%;
46
+
47
+ @include mixins.when(hidden) {
48
+ transform: translate(100%, 0);
49
+ }
50
+
51
+ @include mixins.m(dynamic) {
52
+ top: calc(50% - 40px);
53
+ left: unset;
54
+ width: unset;
55
+ height: 80px;
56
+ }
57
+ }
58
+
59
+ @include mixins.e(pagination-radio) {
60
+ margin: 4px 0;
61
+ }
62
+ }
63
+
64
+ @include mixins.m(fade) {
65
+ @include mixins.e(slide) {
66
+ position: absolute;
67
+ top: 0;
68
+ right: 0;
69
+ left: 0;
70
+ opacity: 0;
71
+ transition: opacity var(--#{variables.$prefix}animation-duration-base) linear;
72
+ }
73
+ }
74
+
75
+ @include mixins.e(container) {
76
+ position: absolute;
77
+ display: flex;
78
+ width: 100%;
79
+ transition: transform var(--#{variables.$prefix}animation-duration-base) linear;
80
+ }
81
+
82
+ @include mixins.e(slide) {
83
+ flex: 0 0 100%;
84
+ margin-bottom: auto;
85
+ }
86
+
87
+ @include mixins.e(arrow) {
88
+ position: absolute;
89
+ z-index: 5;
90
+ display: inline-flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ width: 36px;
94
+ height: 36px;
95
+ padding: 0;
96
+ margin: 0;
97
+ font: inherit;
98
+ /* stylelint-disable-next-line declaration-property-value-allowed-list */
99
+ font-size: 18px;
100
+ color: var(--#{variables.$prefix}text-color);
101
+ white-space: nowrap;
102
+ vertical-align: top;
103
+ appearance: none;
104
+ cursor: pointer;
105
+ background-color: var(--#{variables.$prefix}background-color);
106
+ border: none;
107
+ border-radius: 50%;
108
+ box-shadow: 0 1px 4px 0 var(--#{variables.$prefix}shadow-color);
109
+ transition:
110
+ opacity var(--#{variables.$prefix}animation-duration-base) linear,
111
+ color var(--#{variables.$prefix}animation-duration-base) linear,
112
+ background-color var(--#{variables.$prefix}animation-duration-base) linear,
113
+ transform var(--#{variables.$prefix}animation-duration-base) linear;
114
+
115
+ &:disabled {
116
+ cursor: default;
117
+ opacity: 0.5;
118
+ }
119
+
120
+ &:not(:disabled):hover {
121
+ color: var(--#{variables.$prefix}color-primary);
122
+ background-color: var(--#{variables.$prefix}background-color-primary-gray);
123
+ }
124
+
125
+ @include mixins.when(hidden) {
126
+ opacity: 0;
127
+ }
128
+
129
+ @include mixins.m(prev) {
130
+ top: 50%;
131
+ left: 16px;
132
+ transform: translate(0, -50%);
133
+
134
+ @include mixins.when(hidden) {
135
+ transform: translate(-50%, -50%);
136
+ }
137
+ }
138
+
139
+ @include mixins.m(next) {
140
+ top: 50%;
141
+ right: 16px;
142
+ transform: translate(0, -50%);
143
+
144
+ @include mixins.when(hidden) {
145
+ transform: translate(50%, -50%);
146
+ }
147
+ }
148
+ }
149
+
150
+ @include mixins.e(pagination) {
151
+ position: absolute;
152
+ bottom: 12px;
153
+ z-index: 5;
154
+ display: flex;
155
+ justify-content: center;
156
+ width: 100%;
157
+ overflow: hidden;
158
+ pointer-events: none;
159
+ transition:
160
+ opacity var(--#{variables.$prefix}animation-duration-base) linear,
161
+ transform var(--#{variables.$prefix}animation-duration-base) linear;
162
+
163
+ @include mixins.when(hidden) {
164
+ opacity: 0;
165
+ transform: translate(0, 100%);
166
+ }
167
+
168
+ @include mixins.m(dynamic) {
169
+ left: calc(50% - 40px);
170
+ justify-content: flex-start;
171
+ width: 80px;
172
+ }
173
+ }
174
+
175
+ @include mixins.e(pagination-radio) {
176
+ position: relative;
177
+ flex-shrink: 0;
178
+ width: 8px;
179
+ height: 8px;
180
+ margin: 0 4px;
181
+ appearance: none;
182
+ pointer-events: all;
183
+ cursor: pointer;
184
+ background: var(--#{variables.$prefix}background-color-mask);
185
+ border-radius: 50%;
186
+ transition:
187
+ transform var(--#{variables.$prefix}animation-duration-base) linear,
188
+ left var(--#{variables.$prefix}animation-duration-base) linear,
189
+ top var(--#{variables.$prefix}animation-duration-base) linear;
190
+
191
+ @include mixins.when(checked) {
192
+ background: var(--#{variables.$prefix}color-primary);
193
+ }
194
+
195
+ @include mixins.m(prev-1) {
196
+ transform: scale(0.66);
197
+ }
198
+
199
+ @include mixins.m(prev-2) {
200
+ transform: scale(0.33);
201
+ }
202
+
203
+ @include mixins.m(next-1) {
204
+ transform: scale(0.66);
205
+ }
206
+
207
+ @include mixins.m(next-2) {
208
+ transform: scale(0.33);
209
+ }
210
+ }
211
+ }
@@ -0,0 +1,43 @@
1
+ @use '../variables';
2
+ @use '../mixins';
3
+
4
+ @include mixins.b(spinner) {
5
+ $selector: &;
6
+
7
+ position: absolute;
8
+ top: 0;
9
+ right: 0;
10
+ bottom: 0;
11
+ left: 0;
12
+ z-index: var(--#{variables.$prefix}zindex-absolute);
13
+ display: flex;
14
+ justify-content: center;
15
+ overflow: hidden;
16
+ color: var(--#{variables.$prefix}color-primary);
17
+ background-color: rgb(var(--#{variables.$prefix}background-color-rgb) / 80%);
18
+
19
+ @include mixins.m(alone) {
20
+ position: relative;
21
+ top: unset;
22
+ right: unset;
23
+ bottom: unset;
24
+ left: unset;
25
+ display: inline-flex;
26
+ vertical-align: top;
27
+ background-color: transparent;
28
+ }
29
+
30
+ @include mixins.e(container) {
31
+ position: relative;
32
+ display: inline-flex;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ justify-content: center;
36
+ }
37
+
38
+ @include mixins.e(icon) {
39
+ & + #{$selector}__text {
40
+ margin-top: 8px;
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,226 @@
1
+ @use 'sass:map';
2
+ @use '../variables';
3
+ @use '../mixins';
4
+
5
+ @keyframes #{variables.$prefix}stepper-active {
6
+ 0% {
7
+ box-shadow: 0 0 0 4px var(--color);
8
+ opacity: var(--#{variables.$prefix}box-shadow-opacity-normal);
9
+ }
10
+
11
+ 100% {
12
+ box-shadow: 0 0 0 6px var(--color);
13
+ opacity: var(--#{variables.$prefix}box-shadow-opacity-dark);
14
+ }
15
+ }
16
+
17
+ @include mixins.b(stepper) {
18
+ $selector: &;
19
+
20
+ display: flex;
21
+
22
+ @include mixins.m(button) {
23
+ @include mixins.e(step) {
24
+ cursor: pointer;
25
+ transition: color var(--#{variables.$prefix}animation-duration-base) linear;
26
+
27
+ @include mixins.when(wait) {
28
+ @include mixins.e(step-dot) {
29
+ transition: border-color var(--#{variables.$prefix}animation-duration-base) linear;
30
+ }
31
+ }
32
+
33
+ &:hover,
34
+ &:focus {
35
+ color: var(--#{variables.$prefix}color-light-primary);
36
+
37
+ @include mixins.when(wait) {
38
+ @include mixins.e(step-dot) {
39
+ border: 1px solid var(--#{variables.$prefix}color-light-primary);
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ @include mixins.m(label-bottom) {
47
+ @include mixins.e(step-header) {
48
+ justify-content: center;
49
+ }
50
+
51
+ @include mixins.e(step-title) {
52
+ margin: 8px 0 0;
53
+ font-size: 1.1em;
54
+ text-align: center;
55
+ }
56
+
57
+ @include mixins.e(step-separator) {
58
+ position: absolute;
59
+ }
60
+
61
+ @include mixins.e(step-description) {
62
+ text-align: center;
63
+ }
64
+ }
65
+
66
+ @include mixins.m(vertical) {
67
+ flex-direction: column;
68
+
69
+ @include mixins.e(step) {
70
+ &:not(:last-child) {
71
+ padding-bottom: 20px;
72
+ }
73
+ }
74
+
75
+ @include mixins.e(step-separator) {
76
+ position: absolute;
77
+ width: 2px;
78
+
79
+ &::after {
80
+ top: 10px;
81
+ right: 0;
82
+ bottom: 10px;
83
+ left: 0;
84
+ }
85
+ }
86
+ }
87
+
88
+ @include mixins.e(step) {
89
+ position: relative;
90
+ display: flex;
91
+ flex-direction: column;
92
+
93
+ &:not(:last-child) {
94
+ flex: 1 0 0;
95
+ }
96
+
97
+ @include mixins.when(wait) {
98
+ --color: var(--#{variables.$prefix}stepper-color, var(--#{variables.$prefix}color-disabled));
99
+
100
+ color: var(--color);
101
+
102
+ @include mixins.e(step-dot) {
103
+ border: 1px solid var(--color);
104
+ }
105
+ }
106
+
107
+ @include mixins.when(active) {
108
+ --color: var(--#{variables.$prefix}stepper-color, var(--#{variables.$prefix}color-primary));
109
+
110
+ @include mixins.e(step-dot) {
111
+ color: map.get(variables.$colors, 'white');
112
+ background-color: var(--color);
113
+
114
+ &:not(#{$selector}__step-dot--progress)::after {
115
+ animation: #{variables.$prefix}stepper-active 1.2s linear infinite alternate;
116
+ animation-fill-mode: both;
117
+ }
118
+ }
119
+ }
120
+
121
+ @include mixins.when(completed) {
122
+ --color: var(--#{variables.$prefix}stepper-color, var(--#{variables.$prefix}color-primary));
123
+
124
+ @include mixins.e(step-dot) {
125
+ color: map.get(variables.$colors, 'white');
126
+ background-color: var(--color);
127
+ }
128
+
129
+ @include mixins.e(step-separator) {
130
+ &::after {
131
+ background-color: var(--color);
132
+ }
133
+ }
134
+ }
135
+
136
+ @include mixins.when(warning) {
137
+ --color: var(--#{variables.$prefix}stepper-color, var(--#{variables.$prefix}color-warning));
138
+
139
+ color: var(--color);
140
+
141
+ @include mixins.e(step-dot) {
142
+ color: map.get(variables.$colors, 'white');
143
+ background-color: var(--color);
144
+ }
145
+
146
+ @include mixins.e(step-separator) {
147
+ &::after {
148
+ background-color: var(--color);
149
+ }
150
+ }
151
+ }
152
+
153
+ @include mixins.when(error) {
154
+ --color: var(--#{variables.$prefix}stepper-color, var(--#{variables.$prefix}color-danger));
155
+
156
+ color: var(--color);
157
+
158
+ @include mixins.e(step-dot) {
159
+ color: map.get(variables.$colors, 'white');
160
+ background-color: var(--color);
161
+ }
162
+
163
+ @include mixins.e(step-separator) {
164
+ &::after {
165
+ background-color: var(--color);
166
+ }
167
+ }
168
+ }
169
+ }
170
+
171
+ @include mixins.e(step-header) {
172
+ position: relative;
173
+ display: flex;
174
+ font-size: 1.1em;
175
+ }
176
+
177
+ @include mixins.e(step-title) {
178
+ margin-left: 8px;
179
+ font-weight: var(--#{variables.$prefix}font-weight-bold);
180
+ }
181
+
182
+ @include mixins.e(step-description) {
183
+ margin-top: 4px;
184
+ }
185
+
186
+ @include mixins.e(step-dot) {
187
+ position: relative;
188
+ display: inline-flex;
189
+ flex-shrink: 0;
190
+ align-items: center;
191
+ justify-content: center;
192
+ border-radius: 50%;
193
+
194
+ &::after {
195
+ position: absolute;
196
+ top: 0;
197
+ right: 0;
198
+ bottom: 0;
199
+ left: 0;
200
+ content: '';
201
+ border-radius: 50%;
202
+ }
203
+ }
204
+
205
+ @include mixins.e(step-separator) {
206
+ position: relative;
207
+ flex: 1 0 0;
208
+ height: 2px;
209
+
210
+ &::after {
211
+ position: absolute;
212
+ top: 0;
213
+ right: 10px;
214
+ bottom: 0;
215
+ left: 10px;
216
+ content: '';
217
+ background-color: var(--#{variables.$prefix}background-color-indicator);
218
+ }
219
+ }
220
+
221
+ @include mixins.e(step-progress) {
222
+ position: absolute;
223
+ top: -4px;
224
+ left: -4px;
225
+ }
226
+ }