@lumx/core 2.1.9 → 2.2.0
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/css/design-tokens.css +176 -605
- package/css/material.css +2 -0
- package/js/constants/design-tokens.js +2315 -2707
- package/js/constants/design-tokens.min.js +1 -1
- package/js/constants/design-tokens.min.js.map +1 -1
- package/js/constants/design-tokens.ts +992 -4311
- package/js/custom-colors.min.js.map +1 -1
- package/js/date-picker.min.js.map +1 -1
- package/js/utils.min.js.map +1 -1
- package/lumx.css +1 -1
- package/lumx.min.css +1 -1
- package/package.json +2 -2
- package/scss/_components.scss +1 -0
- package/scss/_design-tokens.scss +190 -610
- package/scss/components/skeleton/_index.scss +4 -7
- package/scss/components/skeleton/_mixins.scss +10 -0
- package/scss/components/thumbnail/_index.scss +107 -49
- package/scss/core/color/_functions.scss +2 -6
|
@@ -18,15 +18,14 @@
|
|
|
18
18
|
========================================================================== */
|
|
19
19
|
|
|
20
20
|
.#{$lumx-base-prefix}-skeleton-circle {
|
|
21
|
-
animation: skeleton-loading 1s ease-in-out 0s infinite;
|
|
22
21
|
border-radius: 50%;
|
|
23
22
|
|
|
24
23
|
&--theme-light {
|
|
25
|
-
|
|
24
|
+
@include lumx-skeleton('light');
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
&--theme-dark {
|
|
29
|
-
|
|
28
|
+
@include lumx-skeleton('dark');
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -47,18 +46,16 @@
|
|
|
47
46
|
========================================================================== */
|
|
48
47
|
|
|
49
48
|
.#{$lumx-base-prefix}-skeleton-rectangle {
|
|
50
|
-
animation: skeleton-loading 1s ease-in-out 0s infinite;
|
|
51
|
-
|
|
52
49
|
&--variant-rounded {
|
|
53
50
|
border-radius: var(--lumx-border-radius);
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
&--theme-light {
|
|
57
|
-
|
|
54
|
+
@include lumx-skeleton('light');
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
&--theme-dark {
|
|
61
|
-
|
|
58
|
+
@include lumx-skeleton('dark');
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
61
|
|
|
@@ -12,44 +12,43 @@
|
|
|
12
12
|
background: none;
|
|
13
13
|
outline: none;
|
|
14
14
|
|
|
15
|
-
&--fill-height
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
&--fill-height {
|
|
16
|
+
&,
|
|
17
|
+
#{$self}__background {
|
|
18
|
+
display: flex;
|
|
19
|
+
height: fit-content;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex: 1 1 auto;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
#{$self}__image {
|
|
27
|
+
width: unset;
|
|
28
|
+
}
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
&__background {
|
|
31
32
|
position: relative;
|
|
32
33
|
width: 100%;
|
|
33
|
-
background-position: center;
|
|
34
|
-
background-repeat: no-repeat;
|
|
35
|
-
background-size: cover;
|
|
36
34
|
|
|
37
35
|
#{$self}--variant-rounded & {
|
|
38
36
|
border-radius: var(--lumx-border-radius);
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
&__focused-image {
|
|
43
|
-
max-width: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&__background,
|
|
47
40
|
&__image {
|
|
48
41
|
display: block;
|
|
42
|
+
width: fit-content;
|
|
49
43
|
max-width: 100%;
|
|
50
|
-
|
|
51
|
-
min-height: 1px;
|
|
44
|
+
height: fit-content;
|
|
52
45
|
max-height: 100%;
|
|
46
|
+
font-size: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__background,
|
|
50
|
+
&__image {
|
|
51
|
+
overflow: hidden;
|
|
53
52
|
|
|
54
53
|
#{$self}--align-left & {
|
|
55
54
|
margin-right: auto;
|
|
@@ -62,16 +61,6 @@
|
|
|
62
61
|
#{$self}--align-right & {
|
|
63
62
|
margin-left: auto;
|
|
64
63
|
}
|
|
65
|
-
|
|
66
|
-
#{$self}--variant-rounded & {
|
|
67
|
-
border-radius: var(--lumx-border-radius);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&__fallback {
|
|
72
|
-
width: fit-content;
|
|
73
|
-
/* Center fallback icon when using fill-height prop */
|
|
74
|
-
margin: 0 auto;
|
|
75
64
|
}
|
|
76
65
|
|
|
77
66
|
&__badge {
|
|
@@ -90,9 +79,30 @@
|
|
|
90
79
|
}
|
|
91
80
|
}
|
|
92
81
|
|
|
82
|
+
.#{$lumx-base-prefix}-thumbnail[class*='#{$lumx-base-prefix}-thumbnail--size-'] {
|
|
83
|
+
.#{$lumx-base-prefix}-thumbnail__background,
|
|
84
|
+
.#{$lumx-base-prefix}-thumbnail__image {
|
|
85
|
+
width: 100%;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
93
89
|
/* Thumbnail aspect ratio
|
|
94
90
|
========================================================================== */
|
|
95
91
|
|
|
92
|
+
.#{$lumx-base-prefix}-thumbnail:not(.#{$lumx-base-prefix}-thumbnail--aspect-ratio-original) {
|
|
93
|
+
.#{$lumx-base-prefix}-thumbnail__image {
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
right: 0;
|
|
97
|
+
bottom: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
width: 100%;
|
|
100
|
+
height: 100%;
|
|
101
|
+
object-fit: cover;
|
|
102
|
+
object-position: center;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
@each $key, $aspect-ratio in $lumx-thumbnail-aspect-ratio {
|
|
97
107
|
.#{$lumx-base-prefix}-thumbnail--aspect-ratio-#{$key}:not(.#{$lumx-base-prefix}-thumbnail--fill-height)
|
|
98
108
|
.#{$lumx-base-prefix}-thumbnail__background {
|
|
@@ -103,8 +113,9 @@
|
|
|
103
113
|
/* Thumbnail states
|
|
104
114
|
========================================================================== */
|
|
105
115
|
|
|
106
|
-
.#{$lumx-base-prefix}-thumbnail
|
|
116
|
+
.#{$lumx-base-prefix}-thumbnail--is-clickable {
|
|
107
117
|
position: relative;
|
|
118
|
+
display: block;
|
|
108
119
|
cursor: pointer;
|
|
109
120
|
|
|
110
121
|
&::after {
|
|
@@ -119,48 +130,95 @@
|
|
|
119
130
|
pointer-events: none;
|
|
120
131
|
}
|
|
121
132
|
|
|
122
|
-
|
|
133
|
+
/* Hover */
|
|
134
|
+
&:hover::after,
|
|
135
|
+
&:focus::after {
|
|
123
136
|
@include lumx-state(lumx-base-const('state', 'HOVER'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
124
137
|
}
|
|
125
138
|
|
|
139
|
+
/* Active */
|
|
126
140
|
&:active::after {
|
|
127
141
|
@include lumx-state(lumx-base-const('state', 'ACTIVE'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
128
142
|
}
|
|
129
143
|
}
|
|
130
144
|
|
|
131
|
-
|
|
145
|
+
/* Focused (variant rounded) */
|
|
146
|
+
.#{$lumx-base-prefix}-thumbnail--variant-rounded.#{$lumx-base-prefix}-thumbnail--is-clickable {
|
|
132
147
|
&[data-focus-visible-added]::after {
|
|
133
148
|
border-radius: var(--lumx-border-radius);
|
|
134
149
|
}
|
|
135
150
|
}
|
|
136
151
|
|
|
137
|
-
|
|
152
|
+
/* Focused (light theme) */
|
|
153
|
+
.#{$lumx-base-prefix}-thumbnail--theme-light.#{$lumx-base-prefix}-thumbnail--is-clickable {
|
|
138
154
|
&[data-focus-visible-added]::after {
|
|
139
155
|
@include lumx-state(lumx-base-const('state', 'FOCUS'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
140
156
|
}
|
|
141
157
|
}
|
|
142
158
|
|
|
143
|
-
|
|
159
|
+
/* Focused (dark theme) */
|
|
160
|
+
.#{$lumx-base-prefix}-thumbnail--theme-dark.#{$lumx-base-prefix}-thumbnail--is-clickable {
|
|
144
161
|
&[data-focus-visible-added]::after {
|
|
145
162
|
@include lumx-state(lumx-base-const('state', 'FOCUS'), lumx-base-const('emphasis', 'LOW'), 'light');
|
|
146
163
|
}
|
|
147
164
|
}
|
|
148
165
|
|
|
149
|
-
/*
|
|
150
|
-
|
|
166
|
+
/* Loading state */
|
|
167
|
+
.#{$lumx-base-prefix}-thumbnail--is-loading {
|
|
168
|
+
&.#{$lumx-base-prefix}-thumbnail--theme-light .#{$lumx-base-prefix}-thumbnail__background {
|
|
169
|
+
@include lumx-skeleton('light');
|
|
170
|
+
}
|
|
151
171
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
172
|
+
&.#{$lumx-base-prefix}-thumbnail--theme-dark .#{$lumx-base-prefix}-thumbnail__background {
|
|
173
|
+
@include lumx-skeleton('dark');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
155
176
|
|
|
156
|
-
|
|
157
|
-
|
|
177
|
+
/* Error state */
|
|
178
|
+
.#{$lumx-base-prefix}-thumbnail--has-error {
|
|
179
|
+
/** Icon fallback */
|
|
180
|
+
&.#{$lumx-base-prefix}-thumbnail--has-icon-error-fallback {
|
|
158
181
|
.#{$lumx-base-prefix}-thumbnail__fallback {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: 0;
|
|
184
|
+
right: 0;
|
|
185
|
+
bottom: 0;
|
|
186
|
+
left: 0;
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&.#{$lumx-base-prefix}-thumbnail--theme-light .#{$lumx-base-prefix}-thumbnail__fallback {
|
|
193
|
+
background-color: lumx-color-variant('dark', 'L6');
|
|
164
194
|
}
|
|
195
|
+
|
|
196
|
+
&.#{$lumx-base-prefix}-thumbnail--theme-dark .#{$lumx-base-prefix}-thumbnail__fallback {
|
|
197
|
+
background-color: lumx-color-variant('light', 'L6');
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Custom fallback */
|
|
202
|
+
&.#{$lumx-base-prefix}-thumbnail--has-custom-error-fallback {
|
|
203
|
+
/* Disable aspect ratio */
|
|
204
|
+
.#{$lumx-base-prefix}-thumbnail__background {
|
|
205
|
+
padding-top: 0;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Thumbnail badge mask
|
|
211
|
+
========================================================================== */
|
|
212
|
+
|
|
213
|
+
$badge-radius-size: map-get($lumx-sizes, lumx-base-const('size', 'XS')) / 2 + 2;
|
|
214
|
+
|
|
215
|
+
.#{$lumx-base-prefix}-thumbnail--has-badge {
|
|
216
|
+
.#{$lumx-base-prefix}-thumbnail__background,
|
|
217
|
+
.#{$lumx-base-prefix}-thumbnail__fallback {
|
|
218
|
+
mask-image: radial-gradient(
|
|
219
|
+
circle at calc(100% - #{$badge-radius-size - 6}) calc(100% - #{$badge-radius-size - 6}),
|
|
220
|
+
transparent $badge-radius-size,
|
|
221
|
+
/* offset circle size (+1) to soften the edge */ black $badge-radius-size + 1
|
|
222
|
+
);
|
|
165
223
|
}
|
|
166
224
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
@function lumx-color-variant($color, $variant) {
|
|
2
2
|
@if map-has-key($lumx-color-palette, $color) {
|
|
3
|
-
@
|
|
4
|
-
@return var(--lumx-color-#{$color}-#{$variant});
|
|
5
|
-
} @else {
|
|
6
|
-
@return map-get(map-get($lumx-color-palette, $color), $variant);
|
|
7
|
-
}
|
|
3
|
+
@return var(--lumx-color-#{$color}-#{$variant});
|
|
8
4
|
} @else {
|
|
9
|
-
@return
|
|
5
|
+
@return var(--lumx-color-dark-N);
|
|
10
6
|
}
|
|
11
7
|
}
|