@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,218 @@
1
+ @use '../variables';
2
+ @use '../mixins';
3
+
4
+ $tree-select-option-height: 32px;
5
+
6
+ @include mixins.b(tree-select) {
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}tree-select-size, var(--#{variables.$prefix}size-small));
63
+ --horizontal-space: var(--#{variables.$prefix}tree-select-horizontal-space, var(--#{variables.$prefix}horizontal-space-small));
64
+ --font-size: var(--#{variables.$prefix}tree-select-font-size, var(--#{variables.$prefix}font-size-small));
65
+ }
66
+
67
+ @include mixins.m(medium) {
68
+ --size: var(--#{variables.$prefix}tree-select-size, var(--#{variables.$prefix}size-medium));
69
+ --horizontal-space: var(--#{variables.$prefix}tree-select-horizontal-space, var(--#{variables.$prefix}horizontal-space-medium));
70
+ --font-size: var(--#{variables.$prefix}tree-select-font-size, var(--#{variables.$prefix}font-size-medium));
71
+ }
72
+
73
+ @include mixins.m(large) {
74
+ --size: var(--#{variables.$prefix}tree-select-size, var(--#{variables.$prefix}size-large));
75
+ --horizontal-space: var(--#{variables.$prefix}tree-select-horizontal-space, var(--#{variables.$prefix}horizontal-space-large));
76
+ --font-size: var(--#{variables.$prefix}tree-select-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
+
189
+ @include mixins.b(tree-select-popup) {
190
+ position: fixed;
191
+ overflow: auto hidden;
192
+ white-space: nowrap;
193
+ background-color: var(--#{variables.$prefix}background-color);
194
+ border-radius: var(--#{variables.$prefix}border-radius);
195
+ box-shadow: var(--#{variables.$prefix}box-shadow-popup);
196
+
197
+ @include mixins.e(loading) {
198
+ position: absolute;
199
+ top: 0;
200
+ left: 0;
201
+ z-index: 5;
202
+ display: flex;
203
+ align-items: center;
204
+ justify-content: center;
205
+ width: 100%;
206
+ height: 100%;
207
+ color: var(--#{variables.$prefix}color-primary);
208
+ background-color: rgb(var(--#{variables.$prefix}background-color-rgb) / 80%);
209
+
210
+ @include mixins.m(empty) {
211
+ position: relative;
212
+ justify-content: flex-start;
213
+ height: 40px;
214
+ padding: 0 12px;
215
+ background-color: var(--#{variables.$prefix}background-color);
216
+ }
217
+ }
218
+ }
@@ -0,0 +1,169 @@
1
+ @use '../variables';
2
+ @use '../mixins';
3
+
4
+ $tree-option-height: 32px;
5
+
6
+ @include mixins.b(tree) {
7
+ $selector: &;
8
+
9
+ position: relative;
10
+ padding: 0;
11
+ margin: 0;
12
+ overflow: auto;
13
+ list-style: none;
14
+ outline: none;
15
+
16
+ @include mixins.when(disabled) {
17
+ pointer-events: none;
18
+ filter: opacity(50%);
19
+ }
20
+
21
+ @include mixins.m(line) {
22
+ @include mixins.e(group) {
23
+ &[role='treeitem']:not(#{$selector}__group--root)::after {
24
+ position: absolute;
25
+ top: 0;
26
+ bottom: 0;
27
+ left: -18px;
28
+ width: 1px;
29
+ pointer-events: none;
30
+ content: '';
31
+ background-color: var(--#{variables.$prefix}background-color-indicator);
32
+ }
33
+ }
34
+
35
+ @include mixins.e(option) {
36
+ &:not(#{$selector}__option--root) {
37
+ &::before,
38
+ &::after {
39
+ position: absolute;
40
+ pointer-events: none;
41
+ content: '';
42
+ background-color: var(--#{variables.$prefix}background-color-indicator);
43
+ }
44
+
45
+ &::before {
46
+ top: -50%;
47
+ left: -18px;
48
+ width: 1px;
49
+ height: 100%;
50
+ }
51
+
52
+ &::after {
53
+ left: -18px;
54
+ width: 18px;
55
+ height: 1px;
56
+ }
57
+
58
+ &[role='treeitem'] {
59
+ &::before {
60
+ left: -42px;
61
+ }
62
+
63
+ &::after {
64
+ left: -42px;
65
+ width: 42px;
66
+ }
67
+ }
68
+
69
+ &#{$selector}__option--first::before {
70
+ top: 0;
71
+ height: 50%;
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+ @include mixins.e(group) {
78
+ position: relative;
79
+ padding: 0;
80
+ margin: 0;
81
+ list-style: none;
82
+
83
+ &[role='group']:not(#{$selector}__group--root) {
84
+ padding-left: 34px;
85
+ }
86
+ }
87
+
88
+ @include mixins.e(option) {
89
+ position: relative;
90
+ display: flex;
91
+ align-items: center;
92
+ min-height: $tree-option-height;
93
+ padding: 0 12px;
94
+ cursor: pointer;
95
+ transition: background-color var(--#{variables.$prefix}animation-duration-base) linear;
96
+
97
+ &[role='treeitem'] {
98
+ margin-left: 24px;
99
+ }
100
+
101
+ &:not(.is-selected):hover {
102
+ background-color: var(--#{variables.$prefix}background-color-hover);
103
+ }
104
+
105
+ @include mixins.when(selected) {
106
+ background-color: var(--#{variables.$prefix}background-color-primary);
107
+ }
108
+
109
+ @include mixins.when(disabled) {
110
+ color: var(--#{variables.$prefix}color-disabled);
111
+ pointer-events: none;
112
+ }
113
+ }
114
+
115
+ @include mixins.e(option-dot) {
116
+ position: absolute;
117
+ top: 50%;
118
+ left: 4px;
119
+ width: 4px;
120
+ height: 4px;
121
+ content: '';
122
+ background-color: var(--#{variables.$prefix}color-primary);
123
+ border-radius: 50%;
124
+ transform: translateY(-50%);
125
+ }
126
+
127
+ @include mixins.e(option-icon) {
128
+ position: relative;
129
+ display: inline-flex;
130
+ align-items: center;
131
+ width: 24px;
132
+ height: $tree-option-height;
133
+ user-select: none;
134
+
135
+ &::after {
136
+ position: absolute;
137
+ top: 0;
138
+ right: 0;
139
+ bottom: 0;
140
+ left: -8px;
141
+ content: '';
142
+ }
143
+ }
144
+
145
+ @include mixins.e(option-arrow) {
146
+ transition: transform var(--#{variables.$prefix}animation-duration-base) linear;
147
+
148
+ @include mixins.when(expand) {
149
+ transform: rotate(90deg);
150
+ }
151
+ }
152
+
153
+ @include mixins.e(option-checkbox) {
154
+ display: inline-flex;
155
+ margin-right: 8px;
156
+ }
157
+
158
+ @include mixins.e(option-content) {
159
+ flex: 1 0 0;
160
+ }
161
+
162
+ @include mixins.e(empty) {
163
+ display: flex;
164
+ align-items: center;
165
+ height: $tree-option-height;
166
+ padding: 0 12px;
167
+ color: var(--#{variables.$prefix}color-disabled);
168
+ }
169
+ }