@stackific/md3 0.1.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.
Files changed (116) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +17 -0
  3. package/README.md +316 -0
  4. package/THIRD-PARTY-NOTICES +40 -0
  5. package/dist/fonts/material-symbols-outlined.woff2 +0 -0
  6. package/dist/fonts/material-symbols-rounded.woff2 +0 -0
  7. package/dist/fonts/material-symbols-sharp.woff2 +0 -0
  8. package/dist/fonts/material-symbols-subset.woff2 +0 -0
  9. package/dist/md3.css +1 -0
  10. package/dist/md3.js +621 -0
  11. package/dist/shapes/arch.svg +1 -0
  12. package/dist/shapes/arrow.svg +1 -0
  13. package/dist/shapes/boom.svg +1 -0
  14. package/dist/shapes/bun.svg +1 -0
  15. package/dist/shapes/burst.svg +1 -0
  16. package/dist/shapes/circle.svg +1 -0
  17. package/dist/shapes/clamshell.svg +1 -0
  18. package/dist/shapes/diamond.svg +1 -0
  19. package/dist/shapes/fan.svg +1 -0
  20. package/dist/shapes/flower.svg +1 -0
  21. package/dist/shapes/gem.svg +1 -0
  22. package/dist/shapes/ghost-ish.svg +1 -0
  23. package/dist/shapes/heart.svg +1 -0
  24. package/dist/shapes/leaf-clover4.svg +1 -0
  25. package/dist/shapes/leaf-clover8.svg +1 -0
  26. package/dist/shapes/loading-indicator.svg +1 -0
  27. package/dist/shapes/oval.svg +1 -0
  28. package/dist/shapes/pentagon.svg +1 -0
  29. package/dist/shapes/pill.svg +1 -0
  30. package/dist/shapes/pixel-circle.svg +1 -0
  31. package/dist/shapes/pixel-triangle.svg +1 -0
  32. package/dist/shapes/puffy-diamond.svg +1 -0
  33. package/dist/shapes/puffy.svg +1 -0
  34. package/dist/shapes/semicircle.svg +1 -0
  35. package/dist/shapes/sided-cookie12.svg +1 -0
  36. package/dist/shapes/sided-cookie4.svg +1 -0
  37. package/dist/shapes/sided-cookie6.svg +1 -0
  38. package/dist/shapes/sided-cookie7.svg +1 -0
  39. package/dist/shapes/sided-cookie9.svg +1 -0
  40. package/dist/shapes/slanted.svg +1 -0
  41. package/dist/shapes/soft-boom.svg +1 -0
  42. package/dist/shapes/soft-burst.svg +1 -0
  43. package/dist/shapes/square.svg +1 -0
  44. package/dist/shapes/sunny.svg +1 -0
  45. package/dist/shapes/triangle.svg +1 -0
  46. package/dist/shapes/very-sunny.svg +1 -0
  47. package/dist/shapes/wavy-circle.svg +1 -0
  48. package/dist/shapes/wavy.svg +1 -0
  49. package/package.json +63 -0
  50. package/src/main.js +5 -0
  51. package/src/runtime/elements/dialogs.js +72 -0
  52. package/src/runtime/elements/fields.js +181 -0
  53. package/src/runtime/elements/menus.js +42 -0
  54. package/src/runtime/elements/pages.js +7 -0
  55. package/src/runtime/elements/progress.js +35 -0
  56. package/src/runtime/elements/sliders.js +78 -0
  57. package/src/runtime/elements/snackbars.js +27 -0
  58. package/src/runtime/helpers/ripples.js +46 -0
  59. package/src/runtime/md3.js +141 -0
  60. package/src/runtime/palette.js +64 -0
  61. package/src/runtime/settings/theme.js +194 -0
  62. package/src/runtime/utils.js +165 -0
  63. package/src/styles/_config.scss +142 -0
  64. package/src/styles/_mixins.scss +80 -0
  65. package/src/styles/elements/_badges.scss +65 -0
  66. package/src/styles/elements/_bars.scss +83 -0
  67. package/src/styles/elements/_buttons.scss +119 -0
  68. package/src/styles/elements/_cards.scss +32 -0
  69. package/src/styles/elements/_chips.scss +46 -0
  70. package/src/styles/elements/_dialogs.scss +143 -0
  71. package/src/styles/elements/_dividers.scss +46 -0
  72. package/src/styles/elements/_expansions.scss +19 -0
  73. package/src/styles/elements/_fields.scss +458 -0
  74. package/src/styles/elements/_grids.scss +35 -0
  75. package/src/styles/elements/_icons.scss +70 -0
  76. package/src/styles/elements/_layouts.scss +24 -0
  77. package/src/styles/elements/_lists.scss +76 -0
  78. package/src/styles/elements/_main-layouts.scss +45 -0
  79. package/src/styles/elements/_media.scss +104 -0
  80. package/src/styles/elements/_menus.scss +289 -0
  81. package/src/styles/elements/_navigations.scss +450 -0
  82. package/src/styles/elements/_overlays.scss +34 -0
  83. package/src/styles/elements/_pages.scss +28 -0
  84. package/src/styles/elements/_progress.scss +141 -0
  85. package/src/styles/elements/_selections.scss +248 -0
  86. package/src/styles/elements/_shapes.scss +151 -0
  87. package/src/styles/elements/_sliders.scss +336 -0
  88. package/src/styles/elements/_snackbars.scss +44 -0
  89. package/src/styles/elements/_tables.scss +67 -0
  90. package/src/styles/elements/_tabs.scss +49 -0
  91. package/src/styles/elements/_tooltips.scss +125 -0
  92. package/src/styles/helpers/_alignments.scss +29 -0
  93. package/src/styles/helpers/_blurs.scss +26 -0
  94. package/src/styles/helpers/_colors.scss +39 -0
  95. package/src/styles/helpers/_directions.scss +30 -0
  96. package/src/styles/helpers/_elevates.scss +20 -0
  97. package/src/styles/helpers/_forms.scss +76 -0
  98. package/src/styles/helpers/_margins.scss +39 -0
  99. package/src/styles/helpers/_opacities.scss +18 -0
  100. package/src/styles/helpers/_paddings.scss +35 -0
  101. package/src/styles/helpers/_positions.scss +44 -0
  102. package/src/styles/helpers/_responsive.scss +24 -0
  103. package/src/styles/helpers/_ripples.scss +40 -0
  104. package/src/styles/helpers/_scrolls.scss +7 -0
  105. package/src/styles/helpers/_shadows.scss +22 -0
  106. package/src/styles/helpers/_sizes.scss +34 -0
  107. package/src/styles/helpers/_spaces.scss +22 -0
  108. package/src/styles/helpers/_typography.scss +132 -0
  109. package/src/styles/helpers/_waves.scss +52 -0
  110. package/src/styles/helpers/_zoom.scss +18 -0
  111. package/src/styles/md3.scss +61 -0
  112. package/src/styles/settings/_fonts.scss +42 -0
  113. package/src/styles/settings/_globals.scss +104 -0
  114. package/src/styles/settings/_reset.scss +82 -0
  115. package/src/styles/settings/_theme.scss +126 -0
  116. package/src/styles/settings/_themes.scss +1525 -0
@@ -0,0 +1,450 @@
1
+ // <nav> + .row containers. Edge-rail vs tabbed vs toolbar vs group variants.
2
+ // Largest non-form component file in the framework.
3
+
4
+ // ────────────────────────────── shared selectors ───────────────────────────
5
+ $-nav-item-direct: "nav:is(.left, .right, .top, .bottom) > a:not(.button, .chip)";
6
+ $-nav-item-nested: "nav:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class='active']) > a:not(.button, .chip)";
7
+
8
+ // ────────────────────────────── base reset ─────────────────────────────────
9
+ nav > :is(ol, ul),
10
+ nav > :is(ol, ul) > li {
11
+ all: unset;
12
+ }
13
+
14
+ nav,
15
+ .row,
16
+ a.row {
17
+ display: flex;
18
+ align-items: center;
19
+ align-self: normal;
20
+ text-align: start;
21
+ justify-content: flex-start;
22
+ white-space: nowrap;
23
+ gap: 1rem;
24
+ border-radius: 0;
25
+ }
26
+
27
+ a.row,
28
+ nav.row {
29
+ min-block-size: 3rem;
30
+ margin: 0;
31
+ }
32
+
33
+ :is(nav, .row, .max) > :only-child,
34
+ :is(nav, .row, .max) > span > *,
35
+ nav > :is(ol, ul) > li > :only-child,
36
+ nav > :is(ol, ul) > li > span > * {
37
+ margin: 0;
38
+ }
39
+
40
+ :is(nav, .row) > :not(ul, ol, header, footer) {
41
+ margin: 0;
42
+ white-space: normal;
43
+ flex: none;
44
+ }
45
+
46
+ :is(nav, .row).min {
47
+ display: inline-flex;
48
+ }
49
+
50
+ // gap scale
51
+ $-nav-gaps: (
52
+ "no": 0,
53
+ "tiny": 0.5rem,
54
+ "medium": 1.5rem,
55
+ "large": 2rem,
56
+ );
57
+
58
+ @each $name, $value in $-nav-gaps {
59
+ :is(nav, .row, li).#{$name}-space {
60
+ gap: $value;
61
+ }
62
+ }
63
+
64
+ :is(nav, .row) > .max,
65
+ :is(nav, .row) > :is(ol, ul) > .max {
66
+ flex: 1;
67
+ }
68
+
69
+ :is(nav, .row).wrap {
70
+ display: flex;
71
+ flex-wrap: wrap;
72
+ }
73
+
74
+ :is(header, footer) > :is(nav, .row) {
75
+ min-block-size: inherit;
76
+ }
77
+
78
+ // ────────────────────────── edge-rail navs ─────────────────────────────────
79
+ nav:is(.left, .right, .top, .bottom) {
80
+ --_padding: 0.5rem;
81
+ --_top: calc(var(--_padding, 0) + var(--top, 0));
82
+ --_bottom: calc(var(--_padding, 0) + var(--bottom, 0));
83
+ position: sticky;
84
+ inset: 0;
85
+ border: 0;
86
+ color: var(--on-surface);
87
+ transform: none;
88
+ z-index: 100;
89
+ text-align: center;
90
+ padding: var(--_padding);
91
+ margin: 0;
92
+ }
93
+
94
+ nav:is(.left, .right) {
95
+ justify-content: flex-start;
96
+ flex-direction: column;
97
+ background-color: var(--surface);
98
+ block-size: 100dvh;
99
+ min-inline-size: 6rem;
100
+ padding-block: var(--_top) var(--_bottom);
101
+ }
102
+
103
+ nav:is(.top, .bottom) {
104
+ position: sticky;
105
+ inset: 0;
106
+ padding: 0.5rem;
107
+ justify-content: center;
108
+ flex-direction: row;
109
+ background-color: var(--surface-container);
110
+ block-size: auto;
111
+ min-block-size: 4.5rem;
112
+ }
113
+
114
+ nav.top {
115
+ block-size: calc(var(--top, 0) + 4.5rem);
116
+ padding-block-start: var(--_top);
117
+ }
118
+
119
+ nav.bottom {
120
+ block-size: calc(var(--bottom, 0) + 4.5rem);
121
+ padding-block-end: var(--_bottom);
122
+ }
123
+
124
+ // ───────────────────────── nav <header> child ──────────────────────────────
125
+ nav > header {
126
+ min-block-size: auto;
127
+ padding: 0;
128
+ margin: 0 0 1rem 0;
129
+ align-items: flex-start;
130
+ gap: 1rem;
131
+ background: none !important;
132
+
133
+ > * {
134
+ margin: 0;
135
+ transition: none;
136
+ }
137
+
138
+ > .extend:hover {
139
+ --_padding: 0;
140
+ inline-size: var(--_size);
141
+
142
+ > span:not([class]) {
143
+ display: none;
144
+ }
145
+ }
146
+ }
147
+
148
+ nav:is(.top, .bottom) > header {
149
+ flex-direction: row;
150
+ align-items: center;
151
+ margin: 0 1rem 0 0;
152
+ }
153
+
154
+ nav.max > header > * {
155
+ transition: all var(--speed1);
156
+ }
157
+
158
+ nav > :is(ol, ul) {
159
+ all: inherit;
160
+ min-inline-size: auto;
161
+ margin: 0;
162
+ padding: 0;
163
+ flex: auto;
164
+ }
165
+
166
+ // ───────────────────────────── nav.max ─────────────────────────────────────
167
+ nav.max:is(.left, .right, .top, .bottom) {
168
+ gap: 0;
169
+ inline-size: auto;
170
+ align-items: flex-start;
171
+ min-inline-size: 12.75rem;
172
+ padding: var(--_top) 1.25rem var(--_bottom) 1.25rem;
173
+ }
174
+
175
+ nav.max > :is(ol, ul) {
176
+ padding: 0;
177
+ }
178
+
179
+ nav.max > header {
180
+ margin: 0 0 1.25rem 0;
181
+ }
182
+
183
+ nav.max:is(.top, .bottom) > header {
184
+ margin: 0 1.25rem 0 0;
185
+ }
186
+
187
+ nav.max > header > .extend {
188
+ --_padding: 1.5rem;
189
+ inline-size: auto;
190
+ padding: 0 var(--_padding);
191
+
192
+ > span:not([class]) {
193
+ display: block;
194
+ margin-inline-start: var(--_padding);
195
+ }
196
+
197
+ > :is(img, svg) + span {
198
+ margin-inline-start: calc(1rem + var(--_padding, 0));
199
+ }
200
+ }
201
+
202
+ nav.max:is(.top, .bottom) {
203
+ padding: 0 0.5rem;
204
+ align-items: center;
205
+ min-inline-size: auto;
206
+ max-inline-size: none;
207
+ }
208
+
209
+ // ─────────────────────────── nav items ─────────────────────────────────────
210
+ #{$-nav-item-direct},
211
+ #{$-nav-item-nested} {
212
+ display: flex;
213
+ flex-direction: column;
214
+ gap: 0.25rem;
215
+ line-height: normal;
216
+ inline-size: 3.5rem;
217
+ font-size: 0.8rem;
218
+ }
219
+
220
+ nav:not(.max):is(.left, .right, .top, .bottom) > a:not(.button, .chip) > i,
221
+ nav:not(.max):is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class="active"]) > a:not(.button, .chip) > i {
222
+ padding: 0.25rem 1rem;
223
+ border-radius: 2rem;
224
+ margin: 0 auto;
225
+ }
226
+
227
+ nav.max:is(.left, .right, .top, .bottom) > a:not(.button, .chip),
228
+ nav.max:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class="active"]) > a:not(.button, .chip) {
229
+ flex-direction: row;
230
+ gap: 0.5rem;
231
+ inline-size: auto;
232
+ block-size: 3.5rem;
233
+ padding: 0 1rem;
234
+ border-radius: 2rem;
235
+ font-size: inherit;
236
+ }
237
+
238
+ #{$-nav-item-direct}.active,
239
+ #{$-nav-item-nested}.active {
240
+ transition: padding var(--speed1) linear;
241
+ }
242
+
243
+ nav.max:is(.top, .bottom) > a:not(.button, .chip),
244
+ nav.max:is(.top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class="active"]) > a:not(.button, .chip) {
245
+ gap: 0.25rem;
246
+ block-size: 2.5rem;
247
+ font-size: 0.8rem;
248
+ }
249
+
250
+ nav.max:is(.left, .right, .top, .bottom) > a.active:not(.button, .chip),
251
+ nav.max:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class="active"]) > a.active:not(.button, .chip),
252
+ nav:is(.left, .right, .top, .bottom):not(.max) > a.active:not(.button, .chip) > i,
253
+ nav:is(.left, .right, .top, .bottom):not(.max) > :is(ol > li, ul > li, div:not([class]), div[class="active"]) > a.active:not(.button, .chip) > i {
254
+ background-color: var(--secondary-container);
255
+ color: var(--on-secondary-container);
256
+ }
257
+
258
+ nav.vertical > :is(ol, ul) {
259
+ align-items: normal;
260
+ }
261
+
262
+ // ──────────────────────── alignment helpers ────────────────────────────────
263
+ :is(nav, .row):is(.left-align, .top-align, .vertical) {
264
+ justify-content: flex-start;
265
+ }
266
+
267
+ :is(nav, .row):is(.right-align, .bottom-align) {
268
+ justify-content: flex-end;
269
+ }
270
+
271
+ :is(nav, .row):is(.center-align, .middle-align) {
272
+ justify-content: center;
273
+ }
274
+
275
+ :is(nav, .row):is(.left-align, .top-align, .vertical).vertical {
276
+ align-items: flex-start;
277
+ }
278
+
279
+ :is(nav, .row):is(.right-align, .bottom-align).vertical {
280
+ align-items: flex-end;
281
+ }
282
+
283
+ :is(nav, .row):is(.center-align, .middle-align).vertical {
284
+ align-items: center;
285
+ }
286
+
287
+ // horizontal nav spacers
288
+ $-nav-spacers: (
289
+ "space": 0.5rem,
290
+ "medium-space": 1rem,
291
+ "large-space": 1.5rem,
292
+ );
293
+
294
+ @each $name, $value in $-nav-spacers {
295
+ nav:not(.left, .right) > .#{$name} {
296
+ inline-size: $value;
297
+ }
298
+ }
299
+
300
+ // ─────────────────────────── nav.tabbed ────────────────────────────────────
301
+ nav.tabbed {
302
+ background-color: var(--surface-container);
303
+ border-radius: 4rem !important;
304
+ gap: 0rem;
305
+ block-size: 4rem;
306
+
307
+ &.small { block-size: 3rem; }
308
+ &.large { block-size: 5rem; }
309
+
310
+ > a {
311
+ border-radius: inherit;
312
+ block-size: inherit;
313
+ display: inline-flex;
314
+ align-items: center;
315
+ padding-inline: 1rem;
316
+ gap: 0.5rem;
317
+ font-size: 1rem;
318
+ flex: 1;
319
+
320
+ &.active {
321
+ background-color: var(--primary-container);
322
+ }
323
+ }
324
+ }
325
+
326
+ // ─────────────────────────── nav.toolbar ───────────────────────────────────
327
+ nav.toolbar {
328
+ display: inline-flex;
329
+ justify-content: space-around;
330
+ border-radius: 2rem;
331
+ background-color: var(--surface-container);
332
+ color: var(--on-surface);
333
+ padding: 0 1rem;
334
+ gap: 0.5rem;
335
+ min-block-size: 4rem;
336
+ min-inline-size: 4rem;
337
+
338
+ > a {
339
+ display: inline-flex;
340
+ gap: 0.5rem;
341
+ min-inline-size: 2.5rem;
342
+ min-block-size: 2.5rem;
343
+ border-radius: 1.75rem;
344
+
345
+ &:has(> :not(i)) {
346
+ padding: 0 1rem;
347
+ }
348
+
349
+ &.active {
350
+ background-color: var(--secondary-container);
351
+ color: var(--on-secondary-container);
352
+ }
353
+ }
354
+
355
+ &.fill {
356
+ background-color: var(--primary-container) !important;
357
+ color: var(--on-primary-container) !important;
358
+
359
+ > a.active {
360
+ background-color: var(--surface-container) !important;
361
+ color: var(--on-surface) !important;
362
+ }
363
+ }
364
+
365
+ &.vertical {
366
+ flex-direction: column !important;
367
+ min-inline-size: 4rem;
368
+ padding: 1rem 0;
369
+ align-self: center;
370
+ align-items: center !important;
371
+
372
+ > a {
373
+ inline-size: 2.5rem;
374
+ block-size: 2.5rem;
375
+
376
+ > :is(div, span):not(.badge, .tooltip) {
377
+ display: none;
378
+ }
379
+ }
380
+ }
381
+
382
+ &.max {
383
+ border-radius: 0;
384
+ display: flex;
385
+ }
386
+ }
387
+
388
+ // ─────────────────────────── nav.group ─────────────────────────────────────
389
+ nav.group {
390
+ background: none !important;
391
+
392
+ &:is(.connected, .split) {
393
+ gap: 0.125rem;
394
+
395
+ > :is(.button, button).active {
396
+ border-radius: 2rem !important;
397
+ }
398
+ }
399
+
400
+ &:not(.split) > :is(.button, button) {
401
+ &:not(.border) {
402
+ background-color: var(--surface-container);
403
+ color: var(--on-surface-container);
404
+ }
405
+
406
+ &.active {
407
+ background-color: var(--primary);
408
+ color: var(--on-primary);
409
+ }
410
+ }
411
+
412
+ &.connected > :is(.button, button) {
413
+ &:not(.border) {
414
+ background-color: var(--surface-container);
415
+ color: var(--on-surface-container);
416
+ }
417
+
418
+ &.active {
419
+ background-color: var(--secondary-container);
420
+ color: var(--on-secondary-container);
421
+ }
422
+ }
423
+
424
+ &.split > :is(.button, button) {
425
+ &:active {
426
+ border-radius: 2rem !important;
427
+ }
428
+
429
+ &:not(.chip, .fill, .border) {
430
+ background-color: var(--primary);
431
+ color: var(--on-primary);
432
+ }
433
+ }
434
+ }
435
+
436
+ :not(nav) > :is(ul, ol) {
437
+ all: revert;
438
+ }
439
+
440
+ :is(.scroll, .no-scroll, .no-space, .tabs, .tabbed) > :focus-visible {
441
+ outline: 0.125rem solid var(--primary);
442
+ outline-offset: -0.125rem;
443
+ }
444
+
445
+ @media only screen and (max-width: 600px) {
446
+ nav.top,
447
+ nav.bottom {
448
+ justify-content: space-around;
449
+ }
450
+ }
@@ -0,0 +1,34 @@
1
+ // Modal scrim shared by .overlay and dialog::backdrop.
2
+
3
+ .overlay,
4
+ dialog::backdrop {
5
+ display: block !important;
6
+ opacity: 0;
7
+ visibility: hidden;
8
+ position: fixed;
9
+ inset: 0;
10
+ color: var(--on-surface);
11
+ background-color: var(--overlay);
12
+ z-index: 100;
13
+ transition: all var(--speed3), 0s background-color;
14
+ border-radius: 0;
15
+ }
16
+
17
+ .overlay.active {
18
+ opacity: 1;
19
+ visibility: visible;
20
+ }
21
+
22
+ dialog:popover-open::backdrop {
23
+ opacity: 1;
24
+ visibility: visible;
25
+ }
26
+
27
+ .overlay + dialog::backdrop,
28
+ .snackbar::backdrop {
29
+ display: none;
30
+ }
31
+
32
+ [popover] {
33
+ border: 0;
34
+ }
@@ -0,0 +1,28 @@
1
+ // .page transitions for SPA-style routing.
2
+
3
+ .page {
4
+ --_transform: translate(0, 0);
5
+ opacity: 0;
6
+ position: absolute;
7
+ display: none;
8
+
9
+ &.active {
10
+ opacity: 1;
11
+ position: relative;
12
+ display: inherit;
13
+ animation: var(--speed4) to-page ease;
14
+ }
15
+ }
16
+
17
+ $-page-transforms: (
18
+ "top": translate(0, -4rem),
19
+ "bottom": translate(0, 4rem),
20
+ "left": translate(-4rem, 0),
21
+ "right": translate(4rem, 0),
22
+ );
23
+
24
+ @each $name, $transform in $-page-transforms {
25
+ .page.active.#{$name} {
26
+ --_transform: #{$transform};
27
+ }
28
+ }
@@ -0,0 +1,141 @@
1
+ // <progress> — linear + circular + wavy variants. .max stacks one inside a row.
2
+
3
+ progress {
4
+ --_size: 0.25rem;
5
+ position: relative;
6
+ inline-size: 100%;
7
+ block-size: var(--_size);
8
+ color: var(--primary);
9
+ background: var(--image);
10
+ border-radius: 1rem;
11
+ flex: none;
12
+ border: none;
13
+ overflow: hidden;
14
+ writing-mode: horizontal-tb;
15
+ direction: ltr;
16
+ -webkit-appearance: none;
17
+ appearance: none;
18
+ }
19
+
20
+ $-progress-sizes: (
21
+ "small": 0.25rem,
22
+ "medium": 0.35rem,
23
+ "large": 0.45rem,
24
+ );
25
+
26
+ @each $name, $value in $-progress-sizes {
27
+ progress.#{$name} {
28
+ --_size: #{$value};
29
+ }
30
+ }
31
+
32
+ progress.indeterminate {
33
+ --_value: 100;
34
+ animation: 3.2s to-indeterminate-progress ease infinite;
35
+ }
36
+
37
+ progress:not(.circle, [value])::after {
38
+ content: "";
39
+ position: absolute;
40
+ inset: 0;
41
+ inline-size: 100%;
42
+ block-size: 100%;
43
+ clip-path: none;
44
+ background: currentcolor;
45
+ animation: 3.2s to-linear-progress ease infinite;
46
+ }
47
+
48
+ progress:not(.circle, [value])::-moz-progress-bar {
49
+ animation: 3.2s to-linear-progress ease infinite;
50
+ }
51
+
52
+ progress:not(.circle, [value])::-webkit-progress-value {
53
+ animation: 3.2s to-linear-progress ease infinite;
54
+ }
55
+
56
+ progress::-webkit-progress-bar { background: none; }
57
+ progress::-webkit-progress-value { background: currentColor; }
58
+ progress::-moz-progress-bar { background: currentColor; }
59
+
60
+ progress.wavy {
61
+ block-size: calc(var(--_size, 0) * 2);
62
+ background: none;
63
+ background-image: var(--image);
64
+ background-repeat: repeat-x;
65
+ background-position: 0 50%;
66
+ background-size: auto calc(var(--_size, 0) / 2);
67
+
68
+ &::-webkit-progress-value,
69
+ &:not(.circle, [value])::after {
70
+ mask-image: url(/shapes/wavy.svg);
71
+ mask-position: 0 50%;
72
+ mask-repeat: repeat-x;
73
+ mask-size: auto 100%;
74
+ }
75
+
76
+ &::-moz-progress-bar {
77
+ mask-image: url(/shapes/wavy.svg);
78
+ mask-position: 0 50%;
79
+ mask-repeat: repeat-x;
80
+ mask-size: auto 100%;
81
+ }
82
+ }
83
+
84
+ progress.circle {
85
+ --_value: attr(value type(<number>), 50);
86
+ inline-size: 2.5rem;
87
+ block-size: 2.5rem;
88
+ background: conic-gradient(currentColor calc(var(--_value, 0) * 1%), var(--active) 0%);
89
+ border-radius: 50%;
90
+ mask-image: radial-gradient(circle at center, transparent 57%, currentColor 60%);
91
+
92
+ &::-webkit-progress-value { background: none; }
93
+ &::-moz-progress-bar { background: none; }
94
+
95
+ &.wavy {
96
+ background: conic-gradient(currentColor calc(var(--_value, 0) * 1%), var(--active) 0);
97
+ mask-repeat: no-repeat;
98
+ mask-position: center;
99
+ mask-size: contain;
100
+ mask-image: url(/shapes/wavy-circle.svg);
101
+ }
102
+
103
+ &.small { inline-size: 1.5rem; block-size: 1.5rem; }
104
+ &.large { inline-size: 3.5rem; block-size: 3.5rem; }
105
+
106
+ &:not([value]),
107
+ &.indeterminate {
108
+ --_value: 50;
109
+ animation: to-rotate 1s infinite linear;
110
+ }
111
+ }
112
+
113
+ :is(nav, .row, .field) > progress:not(.circle, .small, .medium, .large) {
114
+ flex: auto;
115
+ }
116
+
117
+ progress.max {
118
+ display: unset;
119
+ position: absolute;
120
+ inline-size: 100% !important;
121
+ block-size: 100% !important;
122
+ color: currentColor;
123
+ background: none;
124
+ inset: 0;
125
+ border-radius: inherit;
126
+ animation: none;
127
+ writing-mode: horizontal-tb;
128
+ opacity: 0.33;
129
+
130
+ &[class*="-text"] {
131
+ opacity: 1;
132
+ }
133
+
134
+ + * {
135
+ margin-block-start: 0;
136
+ }
137
+ }
138
+
139
+ :is(.button, button, .chip) > progress.circle {
140
+ color: inherit;
141
+ }