@stackific/md3 0.1.1 → 0.1.3

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 (114) hide show
  1. package/README.md +2486 -191
  2. package/dist/internal.md +274 -0
  3. package/dist/md3.css +1 -1
  4. package/dist/md3.js +1 -1
  5. package/package.json +1 -3
  6. package/src/main.js +0 -5
  7. package/src/runtime/elements/dialogs.js +0 -72
  8. package/src/runtime/elements/fields.js +0 -181
  9. package/src/runtime/elements/menus.js +0 -42
  10. package/src/runtime/elements/pages.js +0 -7
  11. package/src/runtime/elements/progress.js +0 -35
  12. package/src/runtime/elements/sliders.js +0 -78
  13. package/src/runtime/elements/snackbars.js +0 -27
  14. package/src/runtime/helpers/ripples.js +0 -46
  15. package/src/runtime/md3.js +0 -141
  16. package/src/runtime/palette.js +0 -64
  17. package/src/runtime/settings/theme.js +0 -194
  18. package/src/runtime/utils.js +0 -165
  19. package/src/styles/_config.scss +0 -142
  20. package/src/styles/_mixins.scss +0 -80
  21. package/src/styles/elements/_badges.scss +0 -65
  22. package/src/styles/elements/_bars.scss +0 -83
  23. package/src/styles/elements/_buttons.scss +0 -119
  24. package/src/styles/elements/_cards.scss +0 -32
  25. package/src/styles/elements/_chips.scss +0 -46
  26. package/src/styles/elements/_dialogs.scss +0 -143
  27. package/src/styles/elements/_dividers.scss +0 -46
  28. package/src/styles/elements/_expansions.scss +0 -19
  29. package/src/styles/elements/_fields.scss +0 -458
  30. package/src/styles/elements/_grids.scss +0 -35
  31. package/src/styles/elements/_icons.scss +0 -70
  32. package/src/styles/elements/_layouts.scss +0 -24
  33. package/src/styles/elements/_lists.scss +0 -76
  34. package/src/styles/elements/_main-layouts.scss +0 -45
  35. package/src/styles/elements/_media.scss +0 -104
  36. package/src/styles/elements/_menus.scss +0 -289
  37. package/src/styles/elements/_navigations.scss +0 -450
  38. package/src/styles/elements/_overlays.scss +0 -34
  39. package/src/styles/elements/_pages.scss +0 -28
  40. package/src/styles/elements/_progress.scss +0 -141
  41. package/src/styles/elements/_selections.scss +0 -248
  42. package/src/styles/elements/_shapes.scss +0 -153
  43. package/src/styles/elements/_sliders.scss +0 -336
  44. package/src/styles/elements/_snackbars.scss +0 -44
  45. package/src/styles/elements/_tables.scss +0 -67
  46. package/src/styles/elements/_tabs.scss +0 -49
  47. package/src/styles/elements/_tooltips.scss +0 -125
  48. package/src/styles/fonts/material-symbols-outlined.woff2 +0 -0
  49. package/src/styles/fonts/material-symbols-rounded.woff2 +0 -0
  50. package/src/styles/fonts/material-symbols-sharp.woff2 +0 -0
  51. package/src/styles/fonts/material-symbols-subset.woff2 +0 -0
  52. package/src/styles/helpers/_alignments.scss +0 -29
  53. package/src/styles/helpers/_blurs.scss +0 -26
  54. package/src/styles/helpers/_colors.scss +0 -39
  55. package/src/styles/helpers/_directions.scss +0 -30
  56. package/src/styles/helpers/_elevates.scss +0 -20
  57. package/src/styles/helpers/_forms.scss +0 -76
  58. package/src/styles/helpers/_margins.scss +0 -39
  59. package/src/styles/helpers/_opacities.scss +0 -18
  60. package/src/styles/helpers/_paddings.scss +0 -35
  61. package/src/styles/helpers/_positions.scss +0 -44
  62. package/src/styles/helpers/_responsive.scss +0 -24
  63. package/src/styles/helpers/_ripples.scss +0 -40
  64. package/src/styles/helpers/_scrolls.scss +0 -7
  65. package/src/styles/helpers/_shadows.scss +0 -22
  66. package/src/styles/helpers/_sizes.scss +0 -34
  67. package/src/styles/helpers/_spaces.scss +0 -22
  68. package/src/styles/helpers/_typography.scss +0 -132
  69. package/src/styles/helpers/_waves.scss +0 -52
  70. package/src/styles/helpers/_zoom.scss +0 -18
  71. package/src/styles/md3.scss +0 -61
  72. package/src/styles/settings/_fonts.scss +0 -41
  73. package/src/styles/settings/_globals.scss +0 -104
  74. package/src/styles/settings/_reset.scss +0 -82
  75. package/src/styles/settings/_theme.scss +0 -126
  76. package/src/styles/settings/_themes.scss +0 -1525
  77. package/src/styles/shapes/arch.svg +0 -1
  78. package/src/styles/shapes/arrow.svg +0 -1
  79. package/src/styles/shapes/boom.svg +0 -1
  80. package/src/styles/shapes/bun.svg +0 -1
  81. package/src/styles/shapes/burst.svg +0 -1
  82. package/src/styles/shapes/circle.svg +0 -1
  83. package/src/styles/shapes/clamshell.svg +0 -1
  84. package/src/styles/shapes/diamond.svg +0 -1
  85. package/src/styles/shapes/fan.svg +0 -1
  86. package/src/styles/shapes/flower.svg +0 -1
  87. package/src/styles/shapes/gem.svg +0 -1
  88. package/src/styles/shapes/ghost-ish.svg +0 -1
  89. package/src/styles/shapes/heart.svg +0 -1
  90. package/src/styles/shapes/leaf-clover4.svg +0 -1
  91. package/src/styles/shapes/leaf-clover8.svg +0 -1
  92. package/src/styles/shapes/loading-indicator.svg +0 -1
  93. package/src/styles/shapes/oval.svg +0 -1
  94. package/src/styles/shapes/pentagon.svg +0 -1
  95. package/src/styles/shapes/pill.svg +0 -1
  96. package/src/styles/shapes/pixel-circle.svg +0 -1
  97. package/src/styles/shapes/pixel-triangle.svg +0 -1
  98. package/src/styles/shapes/puffy-diamond.svg +0 -1
  99. package/src/styles/shapes/puffy.svg +0 -1
  100. package/src/styles/shapes/semicircle.svg +0 -1
  101. package/src/styles/shapes/sided-cookie12.svg +0 -1
  102. package/src/styles/shapes/sided-cookie4.svg +0 -1
  103. package/src/styles/shapes/sided-cookie6.svg +0 -1
  104. package/src/styles/shapes/sided-cookie7.svg +0 -1
  105. package/src/styles/shapes/sided-cookie9.svg +0 -1
  106. package/src/styles/shapes/slanted.svg +0 -1
  107. package/src/styles/shapes/soft-boom.svg +0 -1
  108. package/src/styles/shapes/soft-burst.svg +0 -1
  109. package/src/styles/shapes/square.svg +0 -1
  110. package/src/styles/shapes/sunny.svg +0 -1
  111. package/src/styles/shapes/triangle.svg +0 -1
  112. package/src/styles/shapes/very-sunny.svg +0 -1
  113. package/src/styles/shapes/wavy-circle.svg +0 -1
  114. package/src/styles/shapes/wavy.svg +0 -1
@@ -1,450 +0,0 @@
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
- }
@@ -1,34 +0,0 @@
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
- }
@@ -1,28 +0,0 @@
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
- }
@@ -1,141 +0,0 @@
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
- }