@stackific/md3 0.1.0 → 0.1.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 (113) hide show
  1. package/README.md +1 -43
  2. package/dist/md3.css +1 -1
  3. package/dist/md3.js +1 -621
  4. package/package.json +2 -5
  5. package/src/main.js +0 -5
  6. package/src/runtime/elements/dialogs.js +0 -72
  7. package/src/runtime/elements/fields.js +0 -181
  8. package/src/runtime/elements/menus.js +0 -42
  9. package/src/runtime/elements/pages.js +0 -7
  10. package/src/runtime/elements/progress.js +0 -35
  11. package/src/runtime/elements/sliders.js +0 -78
  12. package/src/runtime/elements/snackbars.js +0 -27
  13. package/src/runtime/helpers/ripples.js +0 -46
  14. package/src/runtime/md3.js +0 -141
  15. package/src/runtime/palette.js +0 -64
  16. package/src/runtime/settings/theme.js +0 -194
  17. package/src/runtime/utils.js +0 -165
  18. package/src/styles/_config.scss +0 -142
  19. package/src/styles/_mixins.scss +0 -80
  20. package/src/styles/elements/_badges.scss +0 -65
  21. package/src/styles/elements/_bars.scss +0 -83
  22. package/src/styles/elements/_buttons.scss +0 -119
  23. package/src/styles/elements/_cards.scss +0 -32
  24. package/src/styles/elements/_chips.scss +0 -46
  25. package/src/styles/elements/_dialogs.scss +0 -143
  26. package/src/styles/elements/_dividers.scss +0 -46
  27. package/src/styles/elements/_expansions.scss +0 -19
  28. package/src/styles/elements/_fields.scss +0 -458
  29. package/src/styles/elements/_grids.scss +0 -35
  30. package/src/styles/elements/_icons.scss +0 -70
  31. package/src/styles/elements/_layouts.scss +0 -24
  32. package/src/styles/elements/_lists.scss +0 -76
  33. package/src/styles/elements/_main-layouts.scss +0 -45
  34. package/src/styles/elements/_media.scss +0 -104
  35. package/src/styles/elements/_menus.scss +0 -289
  36. package/src/styles/elements/_navigations.scss +0 -450
  37. package/src/styles/elements/_overlays.scss +0 -34
  38. package/src/styles/elements/_pages.scss +0 -28
  39. package/src/styles/elements/_progress.scss +0 -141
  40. package/src/styles/elements/_selections.scss +0 -248
  41. package/src/styles/elements/_shapes.scss +0 -151
  42. package/src/styles/elements/_sliders.scss +0 -336
  43. package/src/styles/elements/_snackbars.scss +0 -44
  44. package/src/styles/elements/_tables.scss +0 -67
  45. package/src/styles/elements/_tabs.scss +0 -49
  46. package/src/styles/elements/_tooltips.scss +0 -125
  47. package/src/styles/helpers/_alignments.scss +0 -29
  48. package/src/styles/helpers/_blurs.scss +0 -26
  49. package/src/styles/helpers/_colors.scss +0 -39
  50. package/src/styles/helpers/_directions.scss +0 -30
  51. package/src/styles/helpers/_elevates.scss +0 -20
  52. package/src/styles/helpers/_forms.scss +0 -76
  53. package/src/styles/helpers/_margins.scss +0 -39
  54. package/src/styles/helpers/_opacities.scss +0 -18
  55. package/src/styles/helpers/_paddings.scss +0 -35
  56. package/src/styles/helpers/_positions.scss +0 -44
  57. package/src/styles/helpers/_responsive.scss +0 -24
  58. package/src/styles/helpers/_ripples.scss +0 -40
  59. package/src/styles/helpers/_scrolls.scss +0 -7
  60. package/src/styles/helpers/_shadows.scss +0 -22
  61. package/src/styles/helpers/_sizes.scss +0 -34
  62. package/src/styles/helpers/_spaces.scss +0 -22
  63. package/src/styles/helpers/_typography.scss +0 -132
  64. package/src/styles/helpers/_waves.scss +0 -52
  65. package/src/styles/helpers/_zoom.scss +0 -18
  66. package/src/styles/md3.scss +0 -61
  67. package/src/styles/settings/_fonts.scss +0 -42
  68. package/src/styles/settings/_globals.scss +0 -104
  69. package/src/styles/settings/_reset.scss +0 -82
  70. package/src/styles/settings/_theme.scss +0 -126
  71. package/src/styles/settings/_themes.scss +0 -1525
  72. /package/dist/{shapes → assets}/arch.svg +0 -0
  73. /package/dist/{shapes → assets}/arrow.svg +0 -0
  74. /package/dist/{shapes → assets}/boom.svg +0 -0
  75. /package/dist/{shapes → assets}/bun.svg +0 -0
  76. /package/dist/{shapes → assets}/burst.svg +0 -0
  77. /package/dist/{shapes → assets}/circle.svg +0 -0
  78. /package/dist/{shapes → assets}/clamshell.svg +0 -0
  79. /package/dist/{shapes → assets}/diamond.svg +0 -0
  80. /package/dist/{shapes → assets}/fan.svg +0 -0
  81. /package/dist/{shapes → assets}/flower.svg +0 -0
  82. /package/dist/{shapes → assets}/gem.svg +0 -0
  83. /package/dist/{shapes → assets}/ghost-ish.svg +0 -0
  84. /package/dist/{shapes → assets}/heart.svg +0 -0
  85. /package/dist/{shapes → assets}/leaf-clover4.svg +0 -0
  86. /package/dist/{shapes → assets}/leaf-clover8.svg +0 -0
  87. /package/dist/{shapes → assets}/loading-indicator.svg +0 -0
  88. /package/dist/{fonts → assets}/material-symbols-outlined.woff2 +0 -0
  89. /package/dist/{fonts → assets}/material-symbols-rounded.woff2 +0 -0
  90. /package/dist/{fonts → assets}/material-symbols-sharp.woff2 +0 -0
  91. /package/dist/{fonts → assets}/material-symbols-subset.woff2 +0 -0
  92. /package/dist/{shapes → assets}/oval.svg +0 -0
  93. /package/dist/{shapes → assets}/pentagon.svg +0 -0
  94. /package/dist/{shapes → assets}/pill.svg +0 -0
  95. /package/dist/{shapes → assets}/pixel-circle.svg +0 -0
  96. /package/dist/{shapes → assets}/pixel-triangle.svg +0 -0
  97. /package/dist/{shapes → assets}/puffy-diamond.svg +0 -0
  98. /package/dist/{shapes → assets}/puffy.svg +0 -0
  99. /package/dist/{shapes → assets}/semicircle.svg +0 -0
  100. /package/dist/{shapes → assets}/sided-cookie12.svg +0 -0
  101. /package/dist/{shapes → assets}/sided-cookie4.svg +0 -0
  102. /package/dist/{shapes → assets}/sided-cookie6.svg +0 -0
  103. /package/dist/{shapes → assets}/sided-cookie7.svg +0 -0
  104. /package/dist/{shapes → assets}/sided-cookie9.svg +0 -0
  105. /package/dist/{shapes → assets}/slanted.svg +0 -0
  106. /package/dist/{shapes → assets}/soft-boom.svg +0 -0
  107. /package/dist/{shapes → assets}/soft-burst.svg +0 -0
  108. /package/dist/{shapes → assets}/square.svg +0 -0
  109. /package/dist/{shapes → assets}/sunny.svg +0 -0
  110. /package/dist/{shapes → assets}/triangle.svg +0 -0
  111. /package/dist/{shapes → assets}/very-sunny.svg +0 -0
  112. /package/dist/{shapes → assets}/wavy-circle.svg +0 -0
  113. /package/dist/{shapes → assets}/wavy.svg +0 -0
@@ -1,104 +0,0 @@
1
- // img/svg/video sizing for icons, avatars, hero images, and inline media.
2
-
3
- svg {
4
- fill: currentcolor;
5
- }
6
-
7
- :is(img, svg, video):is(.small, .medium, .large, .tiny, .extra, .round, .circle, .square, .responsive) {
8
- --_size: 3rem;
9
- object-fit: cover;
10
- object-position: center;
11
- transition:
12
- transform var(--speed3),
13
- border-radius var(--speed3),
14
- padding var(--speed3);
15
- block-size: var(--_size);
16
- inline-size: var(--_size);
17
- }
18
-
19
- :is(img, svg, video).round {
20
- --_round: 0.5rem;
21
- }
22
-
23
- $-media-sizes: (
24
- "tiny": 2rem,
25
- "small": 2.5rem,
26
- "large": 3.5rem,
27
- "extra": 4rem,
28
- );
29
-
30
- @each $name, $value in $-media-sizes {
31
- :is(img, svg, video).#{$name} {
32
- --_size: #{$value};
33
- }
34
- }
35
-
36
- :is(img, svg, video).responsive {
37
- --_size: 100%;
38
- margin: 0 auto;
39
- }
40
-
41
- $-responsive-heights: (
42
- "tiny": 4rem,
43
- "small": 8rem,
44
- "medium": 12rem,
45
- "large": 16rem,
46
- "extra": 20rem,
47
- );
48
-
49
- @each $name, $value in $-responsive-heights {
50
- :is(img, svg, video).responsive.#{$name} {
51
- inline-size: 100%;
52
- block-size: $value;
53
- }
54
- }
55
-
56
- :is(img, svg, video).responsive.round {
57
- --_round: 2rem;
58
- }
59
-
60
- :is(img, svg, video).empty-state {
61
- max-inline-size: 100%;
62
- inline-size: 24rem;
63
- }
64
-
65
- :is(button, .button, .chip):not(.transparent) > .responsive {
66
- border: 0.25rem solid transparent;
67
- }
68
-
69
- :is(button, .button, .chip, .field) > :is(img, svg):not(.responsive),
70
- .tabs :is(img, svg):not(.responsive) {
71
- min-inline-size: 1.5rem;
72
- max-inline-size: 1.5rem;
73
- min-block-size: 1.5rem;
74
- max-block-size: 1.5rem;
75
- }
76
-
77
- :is(button, .button, .chip):not(.extend) > .responsive:first-child {
78
- margin-inline-start: calc(-1 * var(--_padding, 0));
79
- }
80
-
81
- :is(button, .button, .chip):not(.extend) > .responsive:not(:first-child) {
82
- margin-inline-end: calc(-1 * var(--_padding, 0));
83
- }
84
-
85
- :is(button, .button, .chip, .circle, .square, .extend) > .responsive {
86
- --_size: inherit;
87
- margin: 0 auto;
88
- }
89
-
90
- .extend > :is(.responsive, i) {
91
- margin: 0;
92
- position: absolute;
93
- inset-inline: 1rem;
94
- z-index: 1;
95
- }
96
-
97
- .extend > .responsive {
98
- inset-inline: 0;
99
- inline-size: 3.5rem;
100
- }
101
-
102
- .extend.border > .responsive {
103
- inline-size: 3.375rem;
104
- }
@@ -1,289 +0,0 @@
1
- // <menu> — anchored popover. Spacing / position / submenu offset variants
2
- // loop over a few small numeric scales.
3
-
4
- menu {
5
- opacity: 0;
6
- visibility: hidden;
7
- position: absolute;
8
- box-shadow: var(--elevate2);
9
- background-color: var(--surface-container);
10
- z-index: 13;
11
- inset: auto auto 0 0;
12
- inline-size: 100%;
13
- max-block-size: 50vh;
14
- max-inline-size: none !important;
15
- overflow-x: hidden;
16
- overflow-y: auto;
17
- font-size: 0.875rem;
18
- font-weight: normal;
19
- text-transform: none;
20
- color: var(--on-surface);
21
- line-height: normal;
22
- text-align: start;
23
- border-radius: 1rem;
24
- transform: scale(0.8) translateY(120%);
25
- transition: all var(--speed2) var(--speed2);
26
- justify-content: flex-start;
27
- padding: 0.25rem;
28
- display: flex;
29
- flex-direction: column;
30
- gap: 0.125rem;
31
-
32
- &.no-wrap {
33
- inline-size: max-content !important;
34
- white-space: nowrap !important;
35
- }
36
-
37
- * {
38
- white-space: inherit !important;
39
- }
40
- }
41
-
42
- $-menu-gaps: (
43
- "no": 0,
44
- "small": 0.25rem,
45
- "medium": 0.375rem,
46
- "large": 0.5rem,
47
- "extra": 0.625rem,
48
- );
49
-
50
- @each $name, $value in $-menu-gaps {
51
- menu.#{$name}-space {
52
- gap: $value;
53
- }
54
- }
55
-
56
- [dir="rtl"] menu {
57
- inset: auto 0 0 auto;
58
- }
59
-
60
- menu.active,
61
- :not([data-ui]):focus-within > menu,
62
- menu > li:hover > menu,
63
- menu > li > menu:hover {
64
- opacity: 1;
65
- visibility: visible;
66
- transform: scale(1) translateY(100%);
67
- transition: all var(--speed2), background-color 0s;
68
- }
69
-
70
- menu.top.active,
71
- :not([data-ui]):focus-within > menu.top,
72
- menu > li:hover > menu.top,
73
- menu > li > menu.top:hover {
74
- transform: scale(1) translateY(-100%);
75
- }
76
-
77
- menu:is(.min, .max).active,
78
- :not([data-ui]):focus-within > menu:is(.min, .max) {
79
- transform: scale(1);
80
- }
81
-
82
- menu {
83
- > li,
84
- > li > a:only-child {
85
- all: unset;
86
- box-sizing: border-box;
87
- position: relative;
88
- display: flex;
89
- align-items: center;
90
- align-self: normal;
91
- text-align: start;
92
- justify-content: inherit;
93
- white-space: nowrap;
94
- gap: 1rem;
95
- padding: 0.5rem 1rem;
96
- min-block-size: 2.75rem;
97
- flex: 1;
98
- margin: 0 !important;
99
- cursor: pointer;
100
- border-radius: 0.25rem;
101
- transition: border-radius var(--speed2);
102
- }
103
-
104
- > li {
105
- &:first-child {
106
- border-top-left-radius: inherit;
107
- border-top-right-radius: inherit;
108
- }
109
-
110
- &:last-child {
111
- border-bottom-left-radius: inherit;
112
- border-bottom-right-radius: inherit;
113
- }
114
-
115
- &:hover {
116
- background-color: color-mix(in srgb, currentColor 10%, transparent);
117
- }
118
-
119
- &.active {
120
- background-color: var(--tertiary-container);
121
- color: var(--on-tertiary-container);
122
- }
123
-
124
- &:is(.active, :active) {
125
- border-radius: 0.75rem;
126
- }
127
-
128
- > :is(.max, .field),
129
- > a:only-child > .max {
130
- flex: 1;
131
- padding: 0;
132
- margin: 0;
133
- }
134
- }
135
-
136
- > li:has(.field, a:only-child) {
137
- flex: 1;
138
- padding: 0;
139
- margin: 0;
140
- }
141
- }
142
-
143
- menu.min {
144
- inset: 0 0 auto 0;
145
- transform: scale(0.8);
146
- }
147
-
148
- [dir="rtl"] menu.min.right,
149
- menu.min.left,
150
- menu.top.left {
151
- inset: 0 0 auto auto;
152
- }
153
-
154
- [dir="rtl"] menu.min.left,
155
- menu.min.right,
156
- menu.top,
157
- menu.top.right {
158
- inset: 0 auto auto 0;
159
- }
160
-
161
- menu.max {
162
- position: fixed;
163
- inset: 0;
164
- block-size: 100%;
165
- max-block-size: none;
166
- min-block-size: auto;
167
- z-index: 100;
168
- transform: scale(0.8);
169
- border-radius: 0;
170
-
171
- > li {
172
- flex: none !important;
173
- }
174
- }
175
-
176
- menu.no-wrap:is(.min, .max) {
177
- min-inline-size: 16rem;
178
- }
179
-
180
- [dir="rtl"] menu.right,
181
- [dir="rtl"] menu.top.min.right,
182
- menu.left,
183
- menu.top.min.left {
184
- inset: auto 0 0 auto;
185
- }
186
-
187
- [dir="rtl"] menu.left,
188
- [dir="rtl"] menu.top.min.left,
189
- menu.right,
190
- menu.top.min {
191
- inset: auto auto 0 0;
192
- }
193
-
194
- menu.top {
195
- transform: scale(0.8) translateY(-120%);
196
- }
197
-
198
- menu:has(menu) {
199
- --_child: 1;
200
- --_type: 0;
201
- overflow: unset;
202
- white-space: nowrap;
203
- inline-size: auto;
204
- min-inline-size: 12rem;
205
- max-block-size: none;
206
- }
207
-
208
- menu > li > :is(menu, menu.right),
209
- [dir="rtl"] menu > li > menu.left {
210
- inset: auto auto calc(3rem * (var(--_child, 0) - var(--_type, 0))) 100%;
211
- }
212
-
213
- [dir="rtl"] menu > li > :is(menu, menu.right),
214
- menu > li > menu.left {
215
- inset: auto 100% calc(3rem * (var(--_child, 0) - var(--_type, 0))) auto;
216
- }
217
-
218
- menu > li > :is(menu.top, menu.top.right),
219
- [dir="rtl"] menu > li > menu.top.left {
220
- inset: calc(3rem * (var(--_child, 0) - var(--_type, 0))) auto auto 100%;
221
- }
222
-
223
- [dir="rtl"] menu > li > :is(menu.top, menu.top.right),
224
- menu > li > menu.top.left {
225
- inset: calc(3rem * (var(--_child, 0) - var(--_type, 0))) 100% auto auto;
226
- }
227
-
228
- menu.group {
229
- padding: 0.5rem 0;
230
- inline-size: 100%;
231
- min-inline-size: auto;
232
- max-block-size: none;
233
- overflow: unset;
234
- background: none;
235
- box-shadow: none;
236
-
237
- > li {
238
- box-shadow: none;
239
- padding: 0;
240
- min-block-size: auto;
241
-
242
- &:hover {
243
- background: none;
244
- }
245
-
246
- > menu,
247
- > menu:hover {
248
- opacity: 1;
249
- visibility: visible;
250
- position: relative;
251
- inset: 0;
252
- max-block-size: none;
253
- transform: none;
254
- transition: none;
255
- border-radius: 1rem 1rem 0.5rem 0.5rem;
256
- z-index: auto;
257
- flex: 1;
258
- }
259
-
260
- &:last-child > menu {
261
- border-radius: 0.5rem 0.5rem 1rem 1rem;
262
- }
263
- }
264
- }
265
-
266
- // Submenu offset counters — emitted via @for to replace 22 hand-written rules.
267
- @for $i from 2 through 11 {
268
- menu > li:nth-last-child(#{$i}) {
269
- --_child: #{$i};
270
- }
271
- }
272
-
273
- @for $i from 2 through 11 {
274
- menu > li:nth-last-of-type(#{$i}) {
275
- --_type: #{$i - 1};
276
- }
277
- }
278
-
279
- @media (pointer: coarse) {
280
- :not(menu, [data-ui]):hover > menu {
281
- opacity: 1;
282
- visibility: visible;
283
- transform: scale(1) translateY(100%);
284
- }
285
-
286
- :not(menu, [data-ui]):hover > menu.top {
287
- transform: scale(1) translateY(-100%);
288
- }
289
- }