@lumx/core 2.0.3 → 2.1.0-alpha-css-test2

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 (37) hide show
  1. package/css/_retro-compat-v2.css +117 -0
  2. package/css/design-tokens.css +768 -92
  3. package/css/material.css +56 -57
  4. package/js/constants/design-tokens.js +3406 -414
  5. package/js/constants/design-tokens.min.js +1 -1
  6. package/js/constants/design-tokens.min.js.map +1 -1
  7. package/js/constants/design-tokens.ts +3386 -394
  8. package/lumx.css +1 -1
  9. package/lumx.min.css +1 -1
  10. package/package.json +2 -2
  11. package/scss/_design-tokens.scss +1670 -224
  12. package/scss/_retro-compat-v2.scss +95 -0
  13. package/scss/components/button/_index.scss +6 -42
  14. package/scss/components/button/_mixins.scss +144 -29
  15. package/scss/components/checkbox/_mixins.scss +9 -9
  16. package/scss/components/chip/_index.scss +2 -2
  17. package/scss/components/chip/_mixins.scss +2 -2
  18. package/scss/components/image-block/_index.scss +4 -5
  19. package/scss/components/input-helper/_mixins.scss +3 -3
  20. package/scss/components/input-label/_mixins.scss +3 -3
  21. package/scss/components/progress/_index.scss +2 -2
  22. package/scss/components/radio-button/_mixins.scss +12 -12
  23. package/scss/components/select/_index.scss +99 -10
  24. package/scss/components/select/_mixins.scss +6 -1
  25. package/scss/components/skeleton/_index.scss +2 -2
  26. package/scss/components/switch/_mixins.scss +15 -15
  27. package/scss/components/tabs/_index.scss +27 -55
  28. package/scss/components/tabs/_mixins.scss +66 -31
  29. package/scss/components/text-field/_index.scss +114 -9
  30. package/scss/components/text-field/_mixins.scss +42 -66
  31. package/scss/components/user-block/_index.scss +2 -9
  32. package/scss/core/base/_variables.scss +1 -0
  33. package/scss/core/state/_mixins.scss +11 -7
  34. package/scss/core/typography/_index.scss +9 -2
  35. package/scss/core/typography/_mixins.scss +13 -4
  36. package/scss/core/typography/_variables.scss +2 -1
  37. package/scss/lumx.scss +4 -0
@@ -5,19 +5,34 @@
5
5
  .#{$lumx-base-prefix}-text-field {
6
6
  $self: &;
7
7
 
8
- padding-top: var(--lumx-text-field-padding-top);
9
- padding-bottom: var(--lumx-text-field-padding-bottom);
8
+ --lumx-text-field-wrapper-padding-vertical: calc(
9
+ (var(--lumx-text-field-input-min-height) - var(--lumx-material-text-field-input-content-line-height)) / 2
10
+ );
11
+
12
+ padding-top: var(--lumx-material-text-field-padding-top);
13
+ padding-bottom: var(--lumx-material-text-field-padding-bottom);
10
14
 
11
15
  &__header {
12
16
  display: flex;
13
17
  align-items: center;
14
- margin-bottom: var(--lumx-text-field-header-margin-bottom);
18
+ margin-bottom: var(--lumx-material-text-field-header-wrapper-margin-bottom);
15
19
  }
16
20
 
17
21
  &__label {
18
22
  @include lumx-text-field-label;
19
23
 
20
24
  flex: 1 1 auto;
25
+
26
+ #{$self}--theme-light & {
27
+ @include lumx-text-field-label-color(
28
+ lumx-base-const('state', 'DEFAULT'),
29
+ lumx-base-const('theme', 'LIGHT')
30
+ );
31
+ }
32
+
33
+ #{$self}--theme-dark & {
34
+ @include lumx-text-field-label-color(lumx-base-const('state', 'DEFAULT'), lumx-base-const('theme', 'DARK'));
35
+ }
21
36
  }
22
37
 
23
38
  &__char-counter {
@@ -27,9 +42,9 @@
27
42
  margin-left: $lumx-spacing-unit;
28
43
 
29
44
  span {
30
- font-size: var(--lumx-text-field-label-font-size);
31
- font-weight: var(--lumx-text-field-label-font-weight);
32
- line-height: var(--lumx-text-field-label-font-size);
45
+ font-size: var(--lumx-material-text-field-header-label-font-size);
46
+ font-weight: var(--lumx-material-text-field-header-label-font-weight);
47
+ line-height: var(--lumx-material-text-field-header-label-line-height);
33
48
 
34
49
  #{$self}--theme-light & {
35
50
  color: lumx-color-variant('dark', 'L2');
@@ -66,10 +81,18 @@
66
81
  &__input-icon {
67
82
  #{$self}--theme-light & {
68
83
  @include lumx-text-field-input-icon(lumx-base-const('theme', 'LIGHT'));
84
+ @include lumx-text-field-input-content-color(
85
+ lumx-base-const('state', 'DEFAULT'),
86
+ lumx-base-const('theme', 'LIGHT')
87
+ );
69
88
  }
70
89
 
71
90
  #{$self}--theme-dark & {
72
91
  @include lumx-text-field-input-icon(lumx-base-const('theme', 'DARK'));
92
+ @include lumx-text-field-input-content-color(
93
+ lumx-base-const('state', 'DEFAULT'),
94
+ lumx-base-const('theme', 'DARK')
95
+ );
73
96
  }
74
97
  }
75
98
 
@@ -80,17 +103,31 @@
80
103
  &__input-native {
81
104
  #{$self}--theme-light & {
82
105
  @include lumx-text-field-input-native(lumx-base-const('theme', 'LIGHT'));
106
+ @include lumx-text-field-input-content-color(
107
+ lumx-base-const('state', 'DEFAULT'),
108
+ lumx-base-const('theme', 'LIGHT')
109
+ );
83
110
 
84
111
  &::placeholder {
85
- @include lumx-text-field-placeholder(lumx-base-const('theme', 'LIGHT'));
112
+ @include lumx-text-field-input-placeholder-color(
113
+ lumx-base-const('state', 'DEFAULT'),
114
+ lumx-base-const('theme', 'LIGHT')
115
+ );
86
116
  }
87
117
  }
88
118
 
89
119
  #{$self}--theme-dark & {
90
120
  @include lumx-text-field-input-native(lumx-base-const('theme', 'DARK'));
121
+ @include lumx-text-field-input-content-color(
122
+ lumx-base-const('state', 'DEFAULT'),
123
+ lumx-base-const('theme', 'DARK')
124
+ );
91
125
 
92
126
  &::placeholder {
93
- @include lumx-text-field-placeholder(lumx-base-const('theme', 'DARK'));
127
+ @include lumx-text-field-input-placeholder-color(
128
+ lumx-base-const('state', 'DEFAULT'),
129
+ lumx-base-const('theme', 'DARK')
130
+ );
94
131
  }
95
132
  }
96
133
 
@@ -99,7 +136,7 @@
99
136
  min-width: $lumx-text-field-min-width;
100
137
  flex: 1 1 auto;
101
138
  margin: $lumx-chip-group-spacing 0;
102
- line-height: var(--lumx-chip-size-s-height);
139
+ line-height: var(--lumx-material-chip-size-s-height);
103
140
  }
104
141
 
105
142
  &--textarea {
@@ -149,25 +186,93 @@
149
186
  .#{$lumx-base-prefix}-text-field__wrapper:hover {
150
187
  @include lumx-text-field-wrapper-state(lumx-base-const('state', 'HOVER'), lumx-base-const('theme', 'LIGHT'));
151
188
  }
189
+
190
+ .#{$lumx-base-prefix}-text-field__input-icon,
191
+ .#{$lumx-base-prefix}-text-field__input-native {
192
+ @include lumx-text-field-input-content-color(
193
+ lumx-base-const('state', 'HOVER'),
194
+ lumx-base-const('theme', 'LIGHT')
195
+ );
196
+ }
197
+
198
+ .#{$lumx-base-prefix}-text-field__input-native::placeholder {
199
+ @include lumx-text-field-input-placeholder-color(
200
+ lumx-base-const('state', 'HOVER'),
201
+ lumx-base-const('theme', 'LIGHT')
202
+ );
203
+ }
152
204
  }
153
205
 
154
206
  .#{$lumx-base-prefix}-text-field--theme-dark {
155
207
  .#{$lumx-base-prefix}-text-field__wrapper:hover {
156
208
  @include lumx-text-field-wrapper-state(lumx-base-const('state', 'HOVER'), lumx-base-const('theme', 'DARK'));
157
209
  }
210
+
211
+ .#{$lumx-base-prefix}-text-field__input-icon,
212
+ .#{$lumx-base-prefix}-text-field__input-native {
213
+ @include lumx-text-field-input-content-color(
214
+ lumx-base-const('state', 'HOVER'),
215
+ lumx-base-const('theme', 'DARK')
216
+ );
217
+ }
218
+
219
+ .#{$lumx-base-prefix}-text-field__input-native::placeholder {
220
+ @include lumx-text-field-input-placeholder-color(
221
+ lumx-base-const('state', 'HOVER'),
222
+ lumx-base-const('theme', 'DARK')
223
+ );
224
+ }
158
225
  }
159
226
 
160
227
  // Focus state
161
228
  .#{$lumx-base-prefix}-text-field--theme-light.#{$lumx-base-prefix}-text-field--is-focus {
229
+ .#{$lumx-base-prefix}-text-field__label {
230
+ @include lumx-text-field-label-color(lumx-base-const('state', 'FOCUS'), lumx-base-const('theme', 'LIGHT'));
231
+ }
232
+
162
233
  .#{$lumx-base-prefix}-text-field__wrapper {
163
234
  @include lumx-text-field-wrapper-state(lumx-base-const('state', 'FOCUS'), lumx-base-const('theme', 'LIGHT'));
164
235
  }
236
+
237
+ .#{$lumx-base-prefix}-text-field__input-icon,
238
+ .#{$lumx-base-prefix}-text-field__input-native {
239
+ @include lumx-text-field-input-content-color(
240
+ lumx-base-const('state', 'FOCUS'),
241
+ lumx-base-const('theme', 'LIGHT')
242
+ );
243
+ }
244
+
245
+ .#{$lumx-base-prefix}-text-field__input-native::placeholder {
246
+ @include lumx-text-field-input-placeholder-color(
247
+ lumx-base-const('state', 'FOCUS'),
248
+ lumx-base-const('theme', 'LIGHT')
249
+ );
250
+ }
165
251
  }
166
252
 
167
253
  .#{$lumx-base-prefix}-text-field--theme-dark.#{$lumx-base-prefix}-text-field--is-focus {
254
+ .#{$lumx-base-prefix}-text-field__label {
255
+ @include lumx-text-field-label-color(lumx-base-const('state', 'FOCUS'), lumx-base-const('theme', 'DARK'));
256
+ }
257
+
168
258
  .#{$lumx-base-prefix}-text-field__wrapper {
169
259
  @include lumx-text-field-wrapper-state(lumx-base-const('state', 'FOCUS'), lumx-base-const('theme', 'DARK'));
170
260
  }
261
+
262
+ .#{$lumx-base-prefix}-text-field__input-icon,
263
+ .#{$lumx-base-prefix}-text-field__input-native {
264
+ @include lumx-text-field-input-content-color(
265
+ lumx-base-const('state', 'FOCUS'),
266
+ lumx-base-const('theme', 'DARK')
267
+ );
268
+ }
269
+
270
+ .#{$lumx-base-prefix}-text-field__input-native::placeholder {
271
+ @include lumx-text-field-input-placeholder-color(
272
+ lumx-base-const('state', 'FOCUS'),
273
+ lumx-base-const('theme', 'DARK')
274
+ );
275
+ }
171
276
  }
172
277
 
173
278
  /* Text field validity
@@ -1,84 +1,60 @@
1
1
  @mixin lumx-text-field-label() {
2
- font-size: var(--lumx-text-field-label-font-size);
3
- font-weight: var(--lumx-text-field-label-font-weight);
4
- line-height: var(--lumx-text-field-label-line-height);
2
+ font-size: var(--lumx-material-text-field-header-label-font-size);
3
+ font-weight: var(--lumx-material-text-field-header-label-font-weight);
4
+ line-height: var(--lumx-material-text-field-header-label-line-height);
5
+ }
6
+
7
+ @mixin lumx-text-field-label-color($state, $theme) {
8
+ color: var(--lumx-text-field-#{$state}-#{$theme}-header-label-color);
5
9
  }
6
10
 
7
11
  @mixin lumx-text-field-wrapper($theme) {
8
12
  position: relative;
9
13
  display: flex;
10
- min-height: var(--lumx-text-field-wrapper-min-height);
14
+ min-height: var(--lumx-text-field-input-min-height);
11
15
  align-items: flex-start;
12
- padding: 0 var(--lumx-text-field-wrapper-padding-horizontal);
13
- border-radius: var(--lumx-text-field-wrapper-border-radius);
16
+ padding: 0 var(--lumx-text-field-input-padding-horizontal);
17
+ background-color: var(--lumx-text-field-state-default-#{$theme}-input-background-color);
18
+ border-radius: var(--lumx-text-field-input-border-radius);
14
19
  outline: none;
15
20
  transition-duration: $lumx-text-field-transition-duration;
16
21
  transition-property: background-color, box-shadow;
17
22
 
18
- @if $theme == lumx-base-const('theme', 'LIGHT') {
19
- background-color: var(--lumx-text-field-state-default-theme-light-background-color);
20
- } @else if $theme == lumx-base-const('theme', 'DARK') {
21
- background-color: var(--lumx-text-field-state-default-theme-dark-background-color);
22
- }
23
-
24
23
  &::before {
25
24
  position: absolute;
26
25
  top: 0;
27
26
  right: 0;
28
27
  bottom: 0;
29
28
  left: 0;
30
- border-style: solid;
31
- border-top-width: var(--lumx-text-field-state-default-border-top-width);
32
- border-right-width: var(--lumx-text-field-state-default-border-right-width);
33
- border-bottom-width: var(--lumx-text-field-state-default-border-bottom-width);
34
- border-left-width: var(--lumx-text-field-state-default-border-left-width);
35
- border-radius: var(--lumx-text-field-wrapper-border-radius);
29
+ border: 0 solid var(--lumx-text-field-state-default-#{$theme}-input-border-color);
30
+ border-top-width: var(--lumx-text-field-state-default-input-border-top-width);
31
+ border-right-width: var(--lumx-text-field-state-default-input-border-right-width);
32
+ border-bottom-width: var(--lumx-text-field-state-default-input-border-bottom-width);
33
+ border-left-width: var(--lumx-text-field-state-default-input-border-left-width);
34
+ border-radius: var(--lumx-text-field-input-border-radius);
36
35
  content: '';
37
36
  pointer-events: none;
38
-
39
- @if $theme == lumx-base-const('theme', 'LIGHT') {
40
- border-color: var(--lumx-text-field-state-default-theme-light-border-color);
41
- } @else if $theme == lumx-base-const('theme', 'DARK') {
42
- border-color: var(--lumx-text-field-state-default-theme-dark-border-color);
43
- }
44
37
  }
45
38
  }
46
39
 
47
40
  @mixin lumx-text-field-wrapper-state($state, $theme) {
48
- @if $state == lumx-base-const('state', 'HOVER') {
49
- @if $theme == lumx-base-const('theme', 'LIGHT') {
50
- background-color: var(--lumx-text-field-state-hover-theme-light-background-color);
51
- } @else if $theme == lumx-base-const('theme', 'DARK') {
52
- background-color: var(--lumx-text-field-state-hover-theme-dark-background-color);
53
- }
54
- } @else if $state == lumx-base-const('state', 'FOCUS') {
55
- @if $theme == lumx-base-const('theme', 'LIGHT') {
56
- background-color: var(--lumx-text-field-state-focus-theme-light-background-color);
57
- } @else if $theme == lumx-base-const('theme', 'DARK') {
58
- background-color: var(--lumx-text-field-state-focus-theme-dark-background-color);
59
- }
60
-
61
- &::before {
62
- border-top-width: var(--lumx-text-field-state-focus-border-top-width);
63
- border-right-width: var(--lumx-text-field-state-focus-border-right-width);
64
- border-bottom-width: var(--lumx-text-field-state-focus-border-bottom-width);
65
- border-left-width: var(--lumx-text-field-state-focus-border-left-width);
41
+ background-color: var(--lumx-text-field-#{$state}-#{$theme}-input-background-color);
66
42
 
67
- @if $theme == lumx-base-const('theme', 'LIGHT') {
68
- border-color: var(--lumx-text-field-state-focus-theme-light-border-color);
69
- } @else if $theme == lumx-base-const('theme', 'DARK') {
70
- border-color: var(--lumx-text-field-state-focus-theme-dark-border-color);
71
- }
72
- }
43
+ &::before {
44
+ border-color: var(--lumx-text-field-#{$state}-#{$theme}-input-border-color);
45
+ border-top-width: var(--lumx-text-field-#{$state}-input-border-top-width);
46
+ border-right-width: var(--lumx-text-field-#{$state}-input-border-right-width);
47
+ border-bottom-width: var(--lumx-text-field-#{$state}-input-border-bottom-width);
48
+ border-left-width: var(--lumx-text-field-#{$state}-input-border-left-width);
73
49
  }
74
50
  }
75
51
 
76
52
  @mixin lumx-text-field-wrapper-validity($validity, $theme) {
77
53
  &::before {
78
- border-top-width: var(--lumx-text-field-state-focus-border-top-width);
79
- border-right-width: var(--lumx-text-field-state-focus-border-right-width);
80
- border-bottom-width: var(--lumx-text-field-state-focus-border-bottom-width);
81
- border-left-width: var(--lumx-text-field-state-focus-border-left-width);
54
+ border-top-width: var(--lumx-text-field-state-focus-input-border-top-width);
55
+ border-right-width: var(--lumx-text-field-state-focus-input-border-right-width);
56
+ border-bottom-width: var(--lumx-text-field-state-focus-input-border-bottom-width);
57
+ border-left-width: var(--lumx-text-field-state-focus-input-border-left-width);
82
58
 
83
59
  @if $theme == lumx-base-const('theme', 'LIGHT') {
84
60
  @if $validity == 'valid' {
@@ -96,7 +72,7 @@
96
72
  flex-shrink: 0;
97
73
  margin-top: calc(
98
74
  var(--lumx-text-field-wrapper-padding-vertical) +
99
- calc(calc(var(--lumx-text-field-input-line-height) - var(--lumx-text-field-input-icon-size)) / 2)
75
+ ((var(--lumx-material-text-field-input-content-line-height) - var(--lumx-size-xs)) / 2)
100
76
  );
101
77
  margin-right: $lumx-spacing-unit;
102
78
 
@@ -119,8 +95,8 @@
119
95
  border: none;
120
96
  margin: 0;
121
97
  background-color: transparent;
122
- font-size: var(--lumx-text-field-input-font-size);
123
- line-height: var(--lumx-text-field-input-line-height);
98
+ font-size: var(--lumx-material-text-field-input-content-font-size);
99
+ line-height: var(--lumx-material-text-field-input-content-line-height);
124
100
  outline: none;
125
101
 
126
102
  &[type='number'] {
@@ -139,11 +115,19 @@
139
115
  }
140
116
  }
141
117
 
118
+ @mixin lumx-text-field-input-content-color($state, $theme) {
119
+ color: var(--lumx-text-field-#{$state}-#{$theme}-input-content-color);
120
+ }
121
+
122
+ @mixin lumx-text-field-input-placeholder-color($state, $theme) {
123
+ color: var(--lumx-text-field-#{$state}-#{$theme}-input-placeholder-color);
124
+ }
125
+
142
126
  @mixin lumx-text-field-input-validity($validity, $theme) {
143
127
  flex-shrink: 0;
144
128
  margin-top: calc(
145
129
  var(--lumx-text-field-wrapper-padding-vertical) +
146
- calc(calc(var(--lumx-text-field-input-line-height) - var(--lumx-text-field-input-validity-size)) / 2)
130
+ ((var(--lumx-material-text-field-input-content-line-height) - var(--lumx-size-xxs)) / 2)
147
131
  );
148
132
  margin-left: $lumx-spacing-unit;
149
133
 
@@ -162,7 +146,7 @@
162
146
  flex-shrink: 0;
163
147
  margin-top: calc(
164
148
  var(--lumx-text-field-wrapper-padding-vertical) +
165
- calc(calc(var(--lumx-text-field-input-line-height) - var(--lumx-text-field-input-clear-size)) / 2)
149
+ ((var(--lumx-material-text-field-input-content-line-height) - (var(--lumx-button-height) / 1.5)) / 2)
166
150
  );
167
151
  margin-left: $lumx-spacing-unit / 2;
168
152
  }
@@ -172,18 +156,10 @@
172
156
  flex: 1 1 auto;
173
157
  flex-wrap: wrap;
174
158
  align-items: center;
175
- margin: $lumx-chip-group-spacing 0;
159
+ margin: calc((var(--lumx-text-field-input-min-height) - (var(--lumx-size-s) - 6px)) / 2) 0;
176
160
 
177
161
  .#{$lumx-base-prefix}-chip {
178
162
  margin: $lumx-chip-group-spacing 0;
179
163
  margin-right: $lumx-chip-group-spacing * 2;
180
164
  }
181
165
  }
182
-
183
- @mixin lumx-text-field-placeholder($theme) {
184
- @if $theme == lumx-base-const('theme', 'LIGHT') {
185
- color: lumx-color-variant('dark', 'L2');
186
- } @else if $theme == lumx-base-const('theme', 'DARK') {
187
- color: lumx-color-variant('light', 'L2');
188
- }
189
- }
@@ -39,14 +39,7 @@
39
39
  &__name {
40
40
  outline: none;
41
41
 
42
- #{$self}--size-s & {
43
- @include lumx-typography('caption');
44
- }
45
-
46
- #{$self}--size-m &,
47
- #{$self}--size-l & {
48
- @include lumx-typography('body1');
49
- }
42
+ @include lumx-typography('subtitle1');
50
43
 
51
44
  #{$self}--orientation-vertical & {
52
45
  text-align: center;
@@ -87,7 +80,7 @@
87
80
  }
88
81
 
89
82
  &__field {
90
- @include lumx-typography('caption');
83
+ @include lumx-typography('body1');
91
84
 
92
85
  #{$self}--size-m & {
93
86
  &::after {
@@ -5,6 +5,7 @@ $lumx-base-constants: (
5
5
  'HIGH': 'emphasis-high',
6
6
  'MEDIUM': 'emphasis-medium',
7
7
  'LOW': 'emphasis-low',
8
+ 'SELECTED': 'emphasis-selected',
8
9
  ),
9
10
  'position': (
10
11
  'TOP': 'position-top',
@@ -48,12 +48,14 @@
48
48
  @mixin lumx-state-as-selected($state, $theme, $has-focus-inset: false) {
49
49
  @if $theme == lumx-base-const('theme', 'LIGHT') {
50
50
  @if $state == lumx-base-const('state', 'DEFAULT') {
51
- background-color: lumx-color-variant('primary', 'L4');
51
+ background-color: lumx-color-variant('primary', 'L5');
52
52
  color: lumx-color-variant('primary', 'D2');
53
53
  } @else if $state == lumx-base-const('state', 'HOVER') {
54
- background-color: lumx-color-variant('primary', 'L3');
54
+ background-color: lumx-color-variant('primary', 'L4');
55
+ color: lumx-color-variant('primary', 'D2');
55
56
  } @else if $state == lumx-base-const('state', 'ACTIVE') {
56
- background-color: lumx-color-variant('primary', 'L2');
57
+ background-color: lumx-color-variant('primary', 'L3');
58
+ color: lumx-color-variant('primary', 'D2');
57
59
  } @else if $state == lumx-base-const('state', 'FOCUS') {
58
60
  @if $has-focus-inset == true {
59
61
  box-shadow: inset 0 0 0 2px lumx-color-variant('primary', 'L3');
@@ -63,12 +65,14 @@
63
65
  }
64
66
  } @else if $theme == lumx-base-const('theme', 'DARK') {
65
67
  @if $state == lumx-base-const('state', 'DEFAULT') {
66
- background-color: lumx-color-variant('light', 'L2');
67
- color: lumx-color-variant('dark', 'N');
68
- } @else if $state == lumx-base-const('state', 'HOVER') {
69
68
  background-color: lumx-color-variant('light', 'L3');
70
- } @else if $state == lumx-base-const('state', 'ACTIVE') {
69
+ color: lumx-color-variant('light', 'N');
70
+ } @else if $state == lumx-base-const('state', 'HOVER') {
71
71
  background-color: lumx-color-variant('light', 'L4');
72
+ color: lumx-color-variant('light', 'N');
73
+ } @else if $state == lumx-base-const('state', 'ACTIVE') {
74
+ background-color: lumx-color-variant('light', 'L5');
75
+ color: lumx-color-variant('light', 'N');
72
76
  } @else if $state == lumx-base-const('state', 'FOCUS') {
73
77
  @if $has-focus-inset == true {
74
78
  box-shadow: inset 0 0 0 2px lumx-color-variant('light', 'L3');
@@ -2,8 +2,15 @@
2
2
  Typography
3
3
  ========================================================================== */
4
4
 
5
- @each $key, $style in $lumx-typography-styles {
6
- .#{$lumx-base-prefix}-typography-#{$key} {
5
+ @each $key, $style in $lumx-typography-interface {
6
+ .#{$lumx-base-prefix}-typography-#{$key},
7
+ .#{$lumx-base-prefix}-typography-interface-#{$key} {
7
8
  @include lumx-typography($key);
8
9
  }
9
10
  }
11
+
12
+ @each $key, $style in $lumx-typography-custom {
13
+ .#{$lumx-base-prefix}-typography-custom-#{$key} {
14
+ @include lumx-typography($key, 'custom');
15
+ }
16
+ }
@@ -4,10 +4,19 @@
4
4
  -webkit-font-smoothing: antialiased;
5
5
  }
6
6
 
7
- @mixin lumx-typography($key) {
8
- font-size: var(--lumx-typography-style-#{$key}-font-size);
9
- font-weight: var(--lumx-typography-style-#{$key}-font-weight);
10
- line-height: var(--lumx-typography-style-#{$key}-line-height);
7
+ @mixin lumx-typography($key, $type: 'interface') {
8
+ @if $type == 'custom' {
9
+ font-family: var(--lumx-typography-custom-#{$key}-font-family, var(--lumx-typography-font-family));
10
+ font-size: var(--lumx-typography-custom-#{$key}-font-size);
11
+ font-style: var(--lumx-typography-custom-#{$key}-font-style);
12
+ font-weight: var(--lumx-typography-custom-#{$key}-font-weight);
13
+ line-height: var(--lumx-typography-custom-#{$key}-line-height);
14
+ } @else if $type == 'interface' {
15
+ font-family: var(--lumx-typography-font-family);
16
+ font-size: map-get(map-get($lumx-typography-interface, $key), 'font-size');
17
+ font-weight: var(--lumx-typography-interface-#{$key}-font-weight);
18
+ line-height: map-get(map-get($lumx-typography-interface, $key), 'line-height');
19
+ }
11
20
 
12
21
  @if $key == 'overline' {
13
22
  text-transform: uppercase;
@@ -1,4 +1,5 @@
1
1
  $lumx-typography-default-font-size: 16px;
2
2
  $lumx-typography-default-line-height: 24px;
3
3
 
4
- $lumx-typography-styles: map-get(map-get($lumx-design-tokens, 'typography'), 'style');
4
+ $lumx-typography-interface: map-get(map-get($lumx-design-tokens, 'typography'), 'interface');
5
+ $lumx-typography-custom: map-get(map-get($lumx-design-tokens, 'typography'), 'custom');
package/scss/lumx.scss CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  @import '~sass-mq';
4
4
  @import '../css/design-tokens';
5
+ // TODO: remove in next major version
6
+ @import '../css/retro-compat-v2';
5
7
  @import './design-tokens';
8
+ // TODO: remove in next major version
9
+ @import './retro-compat-v2';
6
10
  @import './core';
7
11
  @import './components';
8
12
  @import './core/base/normalize';