m3-svelte 6.0.0 → 6.0.2

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 (42) hide show
  1. package/README.md +1 -1
  2. package/package/buttons/Button.svelte +15 -46
  3. package/package/buttons/FAB.svelte +1 -8
  4. package/package/buttons/SplitButton.svelte +2 -9
  5. package/package/containers/BottomSheet.svelte +4 -4
  6. package/package/containers/Dialog.svelte +3 -15
  7. package/package/containers/ListItem.svelte +7 -31
  8. package/package/containers/MenuItem.svelte +4 -10
  9. package/package/containers/Snackbar.svelte +3 -15
  10. package/package/containers/StandardSideSheet.svelte +1 -7
  11. package/package/forms/Checkbox.svelte +2 -3
  12. package/package/forms/Chip.svelte +4 -11
  13. package/package/forms/CircularProgressEstimate.svelte +1 -33
  14. package/package/forms/DateField.svelte +7 -19
  15. package/package/forms/DateFieldOutlined.svelte +9 -21
  16. package/package/forms/LinearProgressEstimate.svelte +1 -98
  17. package/package/forms/RadioAnim1.svelte +1 -2
  18. package/package/forms/RadioAnim2.svelte +1 -2
  19. package/package/forms/RadioAnim3.svelte +1 -2
  20. package/package/forms/Select.svelte +4 -16
  21. package/package/forms/SelectOutlined.svelte +4 -16
  22. package/package/forms/Slider.svelte +6 -12
  23. package/package/forms/Switch.svelte +7 -8
  24. package/package/forms/TextField.svelte +10 -29
  25. package/package/forms/TextFieldMultiline.svelte +11 -37
  26. package/package/forms/TextFieldOutlined.svelte +8 -27
  27. package/package/forms/TextFieldOutlinedMultiline.svelte +9 -35
  28. package/package/forms/_picker/CalendarPicker.svelte +1 -7
  29. package/package/forms/_picker/FocusPicker.svelte +1 -7
  30. package/package/forms/_picker/Header.svelte +2 -8
  31. package/package/forms/_picker/Item.svelte +2 -8
  32. package/package/misc/Layer.svelte +18 -16
  33. package/package/misc/recommended-styles.css +1 -1
  34. package/package/misc/styles.css +109 -16
  35. package/package/misc/tailwind-styles.css +15 -105
  36. package/package/nav/NavCMLX.svelte +8 -38
  37. package/package/nav/NavCMLXItem.svelte +19 -277
  38. package/package/nav/Tabs.svelte +1 -8
  39. package/package/nav/TabsLink.svelte +1 -8
  40. package/package/nav/VariableTabs.svelte +1 -8
  41. package/package/nav/VariableTabsLink.svelte +1 -8
  42. package/package.json +7 -5
@@ -1,70 +1,5 @@
1
1
  <script lang="ts">
2
2
  let { sToHalfway = 1, height = 4 }: { sToHalfway?: number; height?: number } = $props();
3
- /*
4
- Easing calculated with
5
- // 1) define the original mapping f(y)=time-%, capped at 100% for y=1
6
- const whenReached = (y) => Math.log(1 - y) / Math.log(0.5);
7
- const makePoints = () => {
8
- const pts = [];
9
- for (let i = 0; i < 100; i++) {
10
- const v = i / 100;
11
- const t = (whenReached(v) * 100) / 8;
12
- pts.push([v, t]);
13
- }
14
- // add the final point (1, 100)
15
- pts.push([1, 100]);
16
- return pts;
17
- };
18
-
19
- // 2) helper: compute perpendicular distance from pt to line (p0→p1)
20
- const perpDist = (pt, p0, p1) => {
21
- const [x, y] = pt;
22
- const [x1, y1] = p0;
23
- const [x2, y2] = p1;
24
- const num = Math.abs((y2 - y1) * x - (x2 - x1) * y + x2 * y1 - y2 * x1);
25
- const den = Math.hypot(y2 - y1, x2 - x1);
26
- return den === 0 ? 0 : num / den;
27
- };
28
-
29
- // 3) RDP (recursive)
30
- function rdp(points, eps) {
31
- if (points.length < 3) return points;
32
- let maxD = 0,
33
- idx = 0;
34
- for (let i = 1; i < points.length - 1; i++) {
35
- const d = perpDist(points[i], points[0], points[points.length - 1]);
36
- if (d > maxD) {
37
- maxD = d;
38
- idx = i;
39
- }
40
- }
41
- if (maxD > eps) {
42
- const left = rdp(points.slice(0, idx + 1), eps);
43
- const right = rdp(points.slice(idx), eps);
44
- return left.slice(0, -1).concat(right);
45
- }
46
- return [points[0], points[points.length - 1]];
47
- }
48
-
49
- // 4) round x to 2 decimals (keep trailing zeros); round y to 2 decimals (cap tiny negatives to 0)
50
- const fmt = (v, t) => {
51
- const xv = v.toFixed(2);
52
- let tv = Math.round(t * 100) / 100; // round to 2 decimals
53
- if (Math.abs(tv) < 1e-8) tv = 0; // avoid "-0.00"
54
- return `${xv} ${tv.toFixed(2)}%`;
55
- };
56
-
57
- // 5) put it all together
58
- function buildCompressedLinear(tolerance) {
59
- const raw = makePoints();
60
- const reduced = rdp(raw, tolerance);
61
- return `linear(${reduced.map(([v, t]) => fmt(v, t)).join(", ")})`;
62
- }
63
-
64
- // 6) example result
65
- const compressed = buildCompressedLinear(0.001);
66
- console.log(compressed);
67
- */
68
3
  </script>
69
4
 
70
5
  <div
@@ -86,39 +21,7 @@
86
21
  background-color: var(--m3c-primary);
87
22
  border-radius: var(--m3-shape-full);
88
23
  flex-shrink: 0;
89
- animation: grow
90
- linear(
91
- 0,
92
- 0.08 1.5%,
93
- 0.15 2.93%,
94
- 0.22 4.48%,
95
- 0.29 6.18%,
96
- 0.35 7.77%,
97
- 0.41 9.52%,
98
- 0.47 11.45%,
99
- 0.52 13.24%,
100
- 0.57 15.22%,
101
- 0.61 16.98%,
102
- 0.65 18.93%,
103
- 0.69 21.12%,
104
- 0.73 23.61%,
105
- 0.76 25.74%,
106
- 0.79 28.14%,
107
- 0.82 30.92%,
108
- 0.84 33.05%,
109
- 0.86 35.46%,
110
- 0.88 38.24%,
111
- 0.9 41.52%,
112
- 0.92 45.55%,
113
- 0.93 47.96%,
114
- 0.95 54.02%,
115
- 0.96 58.05%,
116
- 0.97 63.24%,
117
- 0.98 70.55%,
118
- 0.99 83.05%,
119
- 1
120
- )
121
- var(--speed) both;
24
+ animation: grow var(--m3-timing-function-zeno) var(--speed) both;
122
25
  }
123
26
  @keyframes grow {
124
27
  0% {
@@ -79,13 +79,12 @@
79
79
  }
80
80
 
81
81
  :global(input:disabled) + .layer-container {
82
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
82
+ color: --translucent(var(--m3c-on-surface), 0.38);
83
83
  cursor: not-allowed;
84
84
  }
85
85
 
86
86
  .m3-container {
87
87
  print-color-adjust: exact;
88
- -webkit-print-color-adjust: exact;
89
88
  }
90
89
 
91
90
  @media screen and (forced-colors: active) {
@@ -79,13 +79,12 @@
79
79
  }
80
80
 
81
81
  :global(input:disabled) + .layer-container {
82
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
82
+ color: --translucent(var(--m3c-on-surface), 0.38);
83
83
  cursor: not-allowed;
84
84
  }
85
85
 
86
86
  .m3-container {
87
87
  print-color-adjust: exact;
88
- -webkit-print-color-adjust: exact;
89
88
  }
90
89
 
91
90
  @media screen and (forced-colors: active) {
@@ -79,13 +79,12 @@
79
79
  }
80
80
 
81
81
  :global(input:disabled) + .layer-container {
82
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
82
+ color: --translucent(var(--m3c-on-surface), 0.38);
83
83
  cursor: not-allowed;
84
84
  }
85
85
 
86
86
  .m3-container {
87
87
  print-color-adjust: exact;
88
- -webkit-print-color-adjust: exact;
89
88
  }
90
89
 
91
90
  @media screen and (forced-colors: active) {
@@ -70,13 +70,7 @@
70
70
  }
71
71
  }
72
72
  label {
73
-
74
- font-family: var(--m3-font);
75
- font-size: 0.75rem;
76
- line-height: 1.333;
77
- letter-spacing: 0.025rem;
78
- font-weight: 400;
79
-
73
+ @apply --m3-body-small;
80
74
  position: absolute;
81
75
  top: 0.5rem;
82
76
  inset-inline: 1rem;
@@ -94,16 +88,10 @@
94
88
  }
95
89
 
96
90
  select {
97
-
98
- font-family: var(--m3-font);
99
- font-size: 1rem;
100
- line-height: 1.5;
101
- letter-spacing: 0;
102
- font-weight: 400;
103
-
91
+ @apply --m3-body-large;
104
92
  display: flex;
105
93
  align-items: center;
106
- height: calc(3.5rem + (var(--m3v-density) * 0.25rem));
94
+ height: --m3-density(3.5rem);
107
95
  padding-top: 1rem;
108
96
  padding-inline: 1rem;
109
97
 
@@ -181,7 +169,7 @@
181
169
  display: grid;
182
170
  grid-template-columns: auto 1fr;
183
171
  padding-inline: 1rem;
184
- padding-block: calc((calc(3rem + (var(--m3v-density) * 0.25rem)) - 1lh) / 2);
172
+ padding-block: calc((--m3-density(3rem) - 1lh) / 2);
185
173
  &:first-child {
186
174
  margin-top: 0.5rem;
187
175
  }
@@ -86,13 +86,7 @@
86
86
  transition: all 100ms;
87
87
  }
88
88
  label {
89
-
90
- font-family: var(--m3-font);
91
- font-size: 0.75rem;
92
- line-height: 1.333;
93
- letter-spacing: 0.025rem;
94
- font-weight: 400;
95
-
89
+ @apply --m3-body-small;
96
90
  position: absolute;
97
91
  top: 0;
98
92
  inset-inline-start: 0.75rem;
@@ -113,16 +107,10 @@
113
107
  }
114
108
 
115
109
  select {
116
-
117
- font-family: var(--m3-font);
118
- font-size: 1rem;
119
- line-height: 1.5;
120
- letter-spacing: 0;
121
- font-weight: 400;
122
-
110
+ @apply --m3-body-large;
123
111
  display: flex;
124
112
  align-items: center;
125
- height: calc(3.5rem + (var(--m3v-density) * 0.25rem));
113
+ height: --m3-density(3.5rem);
126
114
  padding-inline: 1rem;
127
115
 
128
116
  border-radius: var(--m3-field-outlined-shape);
@@ -188,7 +176,7 @@
188
176
  display: grid;
189
177
  grid-template-columns: auto 1fr;
190
178
  padding-inline: 1rem;
191
- padding-block: calc((calc(3rem + (var(--m3v-density) * 0.25rem)) - 1lh) / 2);
179
+ padding-block: calc((--m3-density(3rem) - 1lh) / 2);
192
180
  &:first-child {
193
181
  margin-top: 0.5rem;
194
182
  }
@@ -127,7 +127,6 @@
127
127
  block-size: var(--handle-height);
128
128
  min-inline-size: 10rem;
129
129
  print-color-adjust: exact;
130
- -webkit-print-color-adjust: exact;
131
130
 
132
131
  --functional-width: calc(100% - 2 * (0.25rem + 0.125rem));
133
132
  --handle-left: calc(50% + var(--functional-width) * var(--handle) - 0.125rem - 0.375rem);
@@ -266,7 +265,7 @@
266
265
  background-color: selecteditem;
267
266
  }
268
267
  &:is(input:disabled ~ .track-1) {
269
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.38);
268
+ background-color: --translucent(var(--m3c-on-surface), 0.38);
270
269
  @media screen and (forced-colors: active) {
271
270
  background-color: canvastext;
272
271
  }
@@ -295,7 +294,7 @@
295
294
  background-color: canvastext;
296
295
  }
297
296
  &:is(input:disabled ~ .track-2) {
298
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.12);
297
+ background-color: --translucent(var(--m3c-on-surface), 0.12);
299
298
  @media screen and (forced-colors: active) {
300
299
  background-color: graytext;
301
300
  }
@@ -324,7 +323,7 @@
324
323
  &:is(.track-2 > .stop) {
325
324
  background-color: var(--m3c-primary);
326
325
  &:is(input:disabled ~ .track-2 > .stop) {
327
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.38);
326
+ background-color: --translucent(var(--m3c-on-surface), 0.38);
328
327
  }
329
328
  }
330
329
  pointer-events: none;
@@ -352,7 +351,7 @@
352
351
  background-color: selecteditem;
353
352
  }
354
353
  &:is(input:disabled ~ .handle) {
355
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.38);
354
+ background-color: --translucent(var(--m3c-on-surface), 0.38);
356
355
  @media screen and (forced-colors: active) {
357
356
  background-color: graytext;
358
357
  }
@@ -360,13 +359,7 @@
360
359
  }
361
360
 
362
361
  .value {
363
-
364
- font-family: var(--m3-font);
365
- font-size: 0.875rem;
366
- line-height: 1.429;
367
- letter-spacing: 0.006rem;
368
- font-weight: 500;
369
-
362
+ @apply --m3-label-large;
370
363
  display: flex;
371
364
  align-items: center;
372
365
  justify-content: center;
@@ -387,6 +380,7 @@
387
380
 
388
381
  opacity: 0;
389
382
  pointer-events: none;
383
+ user-select: none;
390
384
  transition: opacity var(--m3-easing);
391
385
  z-index: 1;
392
386
  @media screen and (forced-colors: active) {
@@ -159,10 +159,10 @@
159
159
  color: var(--m3c-on-primary-container);
160
160
  }
161
161
  .m3-container:hover > input ~ .hover {
162
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.08);
162
+ background-color: --translucent(var(--m3c-on-surface), 0.08);
163
163
  }
164
164
  .m3-container:hover > input:checked ~ .hover {
165
- background-color: oklab(from var(--m3c-primary) l a b / 0.08);
165
+ background-color: --translucent(var(--m3c-primary), 0.08);
166
166
  }
167
167
 
168
168
  input:checked {
@@ -189,23 +189,23 @@
189
189
  }
190
190
 
191
191
  input:disabled {
192
- background-color: oklab(from var(--m3c-surface-container-highest) l a b / 0.12);
193
- border-color: oklab(from var(--m3c-outline) l a b / 0.12);
192
+ background-color: --translucent(var(--m3c-surface-container-highest), 0.12);
193
+ border-color: --translucent(var(--m3c-outline), 0.12);
194
194
  cursor: auto;
195
195
  }
196
196
  input:disabled:checked {
197
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.12);
197
+ background-color: --translucent(var(--m3c-on-surface), 0.12);
198
198
  border-color: transparent;
199
199
  }
200
200
  input:disabled + .handle {
201
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.38);
201
+ background-color: --translucent(var(--m3c-on-surface), 0.38);
202
202
  cursor: auto;
203
203
  }
204
204
  input:disabled:checked + .handle {
205
205
  background-color: var(--m3c-surface);
206
206
  }
207
207
  input:disabled:checked + .handle > :global(svg) {
208
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
208
+ color: --translucent(var(--m3c-on-surface), 0.38);
209
209
  }
210
210
  input:disabled ~ .hover {
211
211
  display: none;
@@ -213,7 +213,6 @@
213
213
 
214
214
  .m3-container {
215
215
  print-color-adjust: exact;
216
- -webkit-print-color-adjust: exact;
217
216
  }
218
217
  @media screen and (forced-colors: active) {
219
218
  input:checked {
@@ -69,17 +69,11 @@
69
69
  display: inline-flex;
70
70
  position: relative;
71
71
  align-items: center;
72
- height: calc(3.5rem + (var(--m3v-density) * 0.25rem));
72
+ height: --m3-density(3.5rem);
73
73
  min-width: 15rem;
74
74
  }
75
75
  input {
76
-
77
- font-family: var(--m3-font);
78
- font-size: 1rem;
79
- line-height: 1.5;
80
- letter-spacing: 0;
81
- font-weight: 400;
82
-
76
+ @apply --m3-body-large;
83
77
  position: absolute;
84
78
  inset: 0;
85
79
  width: 100%;
@@ -92,13 +86,7 @@
92
86
  color: var(--m3c-on-surface);
93
87
  }
94
88
  label {
95
-
96
- font-family: var(--m3-font);
97
- font-size: 1rem;
98
- line-height: 1.5;
99
- letter-spacing: 0;
100
- font-weight: 400;
101
-
89
+ @apply --m3-body-large;
102
90
  position: absolute;
103
91
  inset-inline-start: 1rem;
104
92
  top: 50%;
@@ -111,16 +99,10 @@
111
99
  color: var(--error, var(--m3c-primary));
112
100
  }
113
101
  &:is(input:disabled ~ label) {
114
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
102
+ color: --translucent(var(--m3c-on-surface), 0.38);
115
103
  }
116
104
  &:is(input:focus ~ label, input:not(:placeholder-shown) ~ label) {
117
-
118
- font-family: var(--m3-font);
119
- font-size: 0.75rem;
120
- line-height: 1.333;
121
- letter-spacing: 0.025rem;
122
- font-weight: 400;
123
-
105
+ @apply --m3-body-small;
124
106
  top: 0.5rem;
125
107
  translate: 0 0;
126
108
  }
@@ -140,7 +122,7 @@
140
122
  pointer-events: none;
141
123
  transition: all 100ms;
142
124
  &:is(input:enabled:hover ~ .layer) {
143
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.08);
125
+ background-color: --translucent(var(--m3c-on-surface), 0.08);
144
126
  }
145
127
  }
146
128
  .layer::after {
@@ -203,19 +185,18 @@
203
185
  --error: var(--m3c-on-error-container);
204
186
  }
205
187
  input:disabled {
206
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.04);
207
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
188
+ background-color: --translucent(var(--m3c-on-surface), 0.04);
189
+ color: --translucent(var(--m3c-on-surface), 0.38);
208
190
  }
209
191
  input:disabled ~ .layer::after {
210
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.38);
192
+ background-color: --translucent(var(--m3c-on-surface), 0.38);
211
193
  }
212
194
  input:disabled ~ :global(svg) {
213
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
195
+ color: --translucent(var(--m3c-on-surface), 0.38);
214
196
  }
215
197
 
216
198
  .m3-container {
217
199
  print-color-adjust: exact;
218
- -webkit-print-color-adjust: exact;
219
200
  }
220
201
  @media screen and (forced-colors: active) {
221
202
  input {
@@ -37,14 +37,7 @@
37
37
  </script>
38
38
 
39
39
  <div class="m3-container" class:leading-icon={leadingIcon} class:error use:resize>
40
- <textarea
41
- class="focus-none"
42
- placeholder=" "
43
- bind:value
44
- {id}
45
- {disabled}
46
- {required}
47
- {...extra}
40
+ <textarea class="focus-none" placeholder=" " bind:value {id} {disabled} {required} {...extra}
48
41
  ></textarea>
49
42
  <label for={id}>{label}</label>
50
43
  <div class="layer"></div>
@@ -63,17 +56,11 @@
63
56
  display: inline-flex;
64
57
  position: relative;
65
58
  align-items: center;
66
- min-height: calc(5rem + (var(--m3v-density) * 0.25rem));
59
+ min-height: --m3-density(5rem);
67
60
  min-width: 15rem;
68
61
  }
69
62
  textarea {
70
-
71
- font-family: var(--m3-font);
72
- font-size: 1rem;
73
- line-height: 1.5;
74
- letter-spacing: 0;
75
- font-weight: 400;
76
-
63
+ @apply --m3-body-large;
77
64
  position: absolute;
78
65
  inset: 0;
79
66
  width: 100%;
@@ -87,13 +74,7 @@
87
74
  resize: none;
88
75
  }
89
76
  label {
90
-
91
- font-family: var(--m3-font);
92
- font-size: 1rem;
93
- line-height: 1.5;
94
- letter-spacing: 0;
95
- font-weight: 400;
96
-
77
+ @apply --m3-body-large;
97
78
  position: absolute;
98
79
  inset-inline-start: 1rem;
99
80
  top: 50%;
@@ -106,16 +87,10 @@
106
87
  color: var(--error, var(--m3c-primary));
107
88
  }
108
89
  &:is(textarea:disabled ~ label) {
109
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
90
+ color: --translucent(var(--m3c-on-surface), 0.38);
110
91
  }
111
92
  &:is(textarea:focus ~ label, textarea:not(:placeholder-shown) ~ label) {
112
-
113
- font-family: var(--m3-font);
114
- font-size: 0.75rem;
115
- line-height: 1.333;
116
- letter-spacing: 0.025rem;
117
- font-weight: 400;
118
-
93
+ @apply --m3-body-small;
119
94
  top: 0.5rem;
120
95
  translate: 0 0;
121
96
  }
@@ -135,7 +110,7 @@
135
110
  pointer-events: none;
136
111
  transition: all 100ms;
137
112
  &:is(textarea:enabled:hover ~ .layer) {
138
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.08);
113
+ background-color: --translucent(var(--m3c-on-surface), 0.08);
139
114
  }
140
115
  }
141
116
  .layer::after {
@@ -177,19 +152,18 @@
177
152
  --error: var(--m3c-on-error-container);
178
153
  }
179
154
  textarea:disabled {
180
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.04);
181
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
155
+ background-color: --translucent(var(--m3c-on-surface), 0.04);
156
+ color: --translucent(var(--m3c-on-surface), 0.38);
182
157
  }
183
158
  textarea:disabled ~ .layer::after {
184
- background-color: oklab(from var(--m3c-on-surface) l a b / 0.38);
159
+ background-color: --translucent(var(--m3c-on-surface), 0.38);
185
160
  }
186
161
  textarea:disabled ~ :global(svg) {
187
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
162
+ color: --translucent(var(--m3c-on-surface), 0.38);
188
163
  }
189
164
 
190
165
  .m3-container {
191
166
  print-color-adjust: exact;
192
- -webkit-print-color-adjust: exact;
193
167
  }
194
168
  @media screen and (forced-colors: active) {
195
169
  textarea {
@@ -72,17 +72,11 @@
72
72
  display: inline-flex;
73
73
  position: relative;
74
74
  align-items: center;
75
- height: calc(3.5rem + (var(--m3v-density) * 0.25rem));
75
+ height: --m3-density(3.5rem);
76
76
  min-width: 15rem;
77
77
  }
78
78
  input {
79
-
80
- font-family: var(--m3-font);
81
- font-size: 1rem;
82
- line-height: 1.5;
83
- letter-spacing: 0;
84
- font-weight: 400;
85
-
79
+ @apply --m3-body-large;
86
80
  position: absolute;
87
81
  inset: 0;
88
82
  width: 100%;
@@ -95,13 +89,7 @@
95
89
  color: var(--m3c-on-surface);
96
90
  }
97
91
  label {
98
-
99
- font-family: var(--m3-font);
100
- font-size: 1rem;
101
- line-height: 1.5;
102
- letter-spacing: 0;
103
- font-weight: 400;
104
-
92
+ @apply --m3-body-large;
105
93
  position: absolute;
106
94
  inset-inline-start: 0.75rem;
107
95
  top: 50%;
@@ -116,16 +104,10 @@
116
104
  color: var(--error, var(--m3c-primary));
117
105
  }
118
106
  &:is(input:disabled ~ label) {
119
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
107
+ color: --translucent(var(--m3c-on-surface), 0.38);
120
108
  }
121
109
  &:is(input:focus ~ label, input:not(:placeholder-shown) ~ label) {
122
-
123
- font-family: var(--m3-font);
124
- font-size: 0.75rem;
125
- line-height: 1.333;
126
- letter-spacing: 0.025rem;
127
- font-weight: 400;
128
-
110
+ @apply --m3-body-small;
129
111
  top: 0;
130
112
  }
131
113
  pointer-events: none;
@@ -197,17 +179,16 @@
197
179
  }
198
180
 
199
181
  input:disabled {
200
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
182
+ color: --translucent(var(--m3c-on-surface), 0.38);
201
183
  }
202
184
  input:disabled ~ .layer {
203
- border-color: oklab(from var(--m3c-on-surface) l a b / 0.38);
185
+ border-color: --translucent(var(--m3c-on-surface), 0.38);
204
186
  }
205
187
  input:disabled ~ :global(svg) {
206
- color: oklab(from var(--m3c-on-surface) l a b / 0.38);
188
+ color: --translucent(var(--m3c-on-surface), 0.38);
207
189
  }
208
190
 
209
191
  .m3-container {
210
192
  print-color-adjust: exact;
211
- -webkit-print-color-adjust: exact;
212
193
  }
213
194
  </style>