@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,143 @@
1
+ // <dialog> modal surface with size + edge-pin (top/right/bottom/left/max) variants.
2
+
3
+ dialog {
4
+ --_padding: 1.5rem;
5
+ --_top: calc(var(--_padding, 0) + var(--top, 0));
6
+ --_bottom: calc(var(--_padding, 0) + var(--bottom, 0));
7
+ display: block;
8
+ visibility: hidden;
9
+ border: none;
10
+ opacity: 0;
11
+ position: fixed;
12
+ box-shadow: var(--elevate2);
13
+ color: var(--on-surface);
14
+ background-color: var(--surface-container-high);
15
+ padding: var(--_padding);
16
+ z-index: 100;
17
+ inset: 10% auto auto 50%;
18
+ min-inline-size: 20rem;
19
+ max-inline-size: 100%;
20
+ max-block-size: 80%;
21
+ overflow-x: hidden;
22
+ overflow-y: auto;
23
+ transition: all var(--speed3), 0s background-color;
24
+ border-radius: 1.75rem;
25
+ transform: translate(-50%, -4rem);
26
+ outline: none;
27
+
28
+ &:is(.active, [open]),
29
+ &:popover-open {
30
+ visibility: visible;
31
+ opacity: 1;
32
+ transform: translate(-50%, 0);
33
+ }
34
+
35
+ &:is(.top, .right, .bottom, .left, .max) {
36
+ --_padding: 1rem;
37
+ }
38
+ }
39
+
40
+ // Base size variants come BEFORE the edge-pin (.top/.bottom/.left/.right/.max)
41
+ // rules so an edge-pinned `.large` dialog uses the side variant's block-size
42
+ // (100%) instead of `.large`'s default 75%. Matches upstream cascade.
43
+ $-dialog-base-sizes: (
44
+ "small": 25%,
45
+ "medium": 50%,
46
+ "large": 75%,
47
+ );
48
+
49
+ @each $name, $value in $-dialog-base-sizes {
50
+ dialog.#{$name} {
51
+ inline-size: $value;
52
+ block-size: $value;
53
+ }
54
+ }
55
+
56
+ dialog {
57
+ &:is(.top, .bottom) {
58
+ opacity: 1;
59
+ block-size: auto;
60
+ inline-size: 100%;
61
+ min-inline-size: auto;
62
+ max-block-size: 100%;
63
+ }
64
+
65
+ &.top {
66
+ inset: 0 auto auto 0;
67
+ transform: translateY(-100%);
68
+ border-radius: 0 0 1rem 1rem;
69
+ padding-block-start: var(--_top);
70
+ }
71
+
72
+ &.bottom {
73
+ inset: auto auto 0 0;
74
+ transform: translateY(100%);
75
+ border-radius: 1rem 1rem 0 0;
76
+ padding-block-end: var(--_bottom);
77
+ }
78
+
79
+ &:is(.left, .right) {
80
+ opacity: 1;
81
+ inset: 0 auto auto 0;
82
+ inline-size: auto;
83
+ block-size: 100%;
84
+ max-block-size: 100%;
85
+ background-color: var(--surface);
86
+ padding-block: var(--_top) var(--_bottom);
87
+ }
88
+
89
+ &.max {
90
+ inset: 0 auto auto 0;
91
+ inline-size: 100%;
92
+ block-size: 100%;
93
+ max-inline-size: 100%;
94
+ max-block-size: 100%;
95
+ transform: translateY(4rem);
96
+ background-color: var(--surface);
97
+ border-radius: 0;
98
+ padding-block: var(--_top) var(--_bottom);
99
+ }
100
+
101
+ &:is(.active, [open]):is(.left, .right, .top, .bottom, .max),
102
+ &:popover-open:is(.left, .right, .top, .bottom, .max) {
103
+ transform: translate(0, 0);
104
+ }
105
+ }
106
+
107
+ [dir="rtl"] dialog.right,
108
+ dialog.left {
109
+ inset: 0 auto auto 0;
110
+ border-radius: 0 1rem 1rem 0;
111
+ transform: translateX(-100%);
112
+ }
113
+
114
+ [dir="rtl"] dialog.left,
115
+ dialog.right {
116
+ inset: 0 0 auto auto;
117
+ border-radius: 1rem 0 0 1rem;
118
+ transform: translateX(100%);
119
+ }
120
+
121
+ $-dialog-side-sizes: (
122
+ "small": 20rem,
123
+ "medium": 32rem,
124
+ "large": 44rem,
125
+ );
126
+
127
+ @each $name, $value in $-dialog-side-sizes {
128
+ dialog.#{$name}:is(.left, .right) {
129
+ inline-size: $value;
130
+ }
131
+ }
132
+
133
+ $-dialog-vert-sizes: (
134
+ "small": 16rem,
135
+ "medium": 24rem,
136
+ "large": 32rem,
137
+ );
138
+
139
+ @each $name, $value in $-dialog-vert-sizes {
140
+ dialog.#{$name}:is(.top, .bottom) {
141
+ block-size: $value;
142
+ }
143
+ }
@@ -0,0 +1,46 @@
1
+ // <hr> + .divider — horizontal/vertical rule. Size modifiers share a margin map.
2
+
3
+ hr,
4
+ [class*="divider"] {
5
+ all: unset;
6
+ inline-size: -webkit-fill-available;
7
+ min-block-size: auto;
8
+ block-size: 0.0625rem;
9
+ background-color: var(--outline-variant);
10
+ display: block;
11
+
12
+ + * {
13
+ margin: 0 !important;
14
+ }
15
+ }
16
+
17
+ $-divider-margins: (
18
+ "small": 0.5rem,
19
+ "medium": 1rem,
20
+ "large": 1.5rem,
21
+ );
22
+
23
+ @each $name, $value in $-divider-margins {
24
+ hr.#{$name},
25
+ .#{$name}-divider {
26
+ margin: #{$value} 0 !important;
27
+ }
28
+ }
29
+
30
+ li:has(> :is(hr, .divider)) {
31
+ padding: 0 !important;
32
+ align-self: normal !important;
33
+ min-inline-size: auto !important;
34
+ min-block-size: auto !important;
35
+ inline-size: -webkit-fill-available;
36
+ background: none !important;
37
+ }
38
+
39
+ :is(hr, .divider).vertical,
40
+ li:has(> :is(hr, .divider).vertical) {
41
+ padding: 0 !important;
42
+ align-self: center !important;
43
+ min-inline-size: auto;
44
+ min-block-size: 1.5rem;
45
+ inline-size: 0.0625rem;
46
+ }
@@ -0,0 +1,19 @@
1
+ // <details>/<summary> expansion behavior.
2
+
3
+ summary {
4
+ list-style-type: none;
5
+ cursor: pointer;
6
+
7
+ &::-webkit-details-marker {
8
+ display: none;
9
+ }
10
+
11
+ > * {
12
+ pointer-events: none;
13
+ margin: 0;
14
+ }
15
+ }
16
+
17
+ li > details > summary + .list {
18
+ margin: 0 !important;
19
+ }
@@ -0,0 +1,458 @@
1
+ // .field — form-input wrapper. By far the largest single component
2
+ // (handles size, fill, border, round, prefix/suffix, label, invalid, helper).
3
+ // Reuse opportunities: size scale, side-icon positioning, focus/disabled states.
4
+
5
+ @use "sass:list";
6
+ @use "sass:map";
7
+
8
+ .field {
9
+ --_input: 3rem;
10
+ --_start: 1.2rem;
11
+ --_middle: calc(var(--_input, 0) / 2);
12
+ border-radius: 0.25rem 0.25rem 0 0;
13
+ min-block-size: var(--_input);
14
+ display: flex;
15
+ flex-direction: column;
16
+
17
+ &.fill {
18
+ --_background: var(--surface-variant);
19
+ background-color: unset !important;
20
+ color: unset !important;
21
+
22
+ > :is(input, select, textarea) {
23
+ background-color: var(--_background);
24
+ z-index: 0;
25
+ }
26
+ }
27
+
28
+ &.border {
29
+ border-radius: 0.25rem;
30
+ }
31
+
32
+ &.invalid > i {
33
+ color: var(--error);
34
+ }
35
+
36
+ > progress.circle {
37
+ border-width: 0.1875rem;
38
+ }
39
+ }
40
+
41
+ $-field-sizes: (
42
+ "small": (input: 2.5rem, start: 1rem),
43
+ "large": (input: 3.5rem, start: 1.4rem),
44
+ "extra": (input: 4rem, start: 1.6rem),
45
+ );
46
+
47
+ @each $name, $values in $-field-sizes {
48
+ .field.#{$name} {
49
+ --_input: #{map.get($values, input)};
50
+ --_start: #{map.get($values, start)};
51
+ }
52
+ }
53
+
54
+ $-field-rounds: (
55
+ "small": 1.25rem,
56
+ "default": 1.5rem,
57
+ "large": 1.75rem,
58
+ "extra": 2rem,
59
+ );
60
+
61
+ @each $name, $value in $-field-rounds {
62
+ @if $name == "default" {
63
+ .field[class*="round"] {
64
+ border-radius: $value;
65
+ }
66
+ } @else {
67
+ .field[class*="round"].#{$name} {
68
+ border-radius: $value;
69
+ }
70
+ }
71
+ }
72
+
73
+ // icon — left/right side affordance
74
+ .field {
75
+ > :is(i, img, svg, progress.circle, a) {
76
+ position: absolute;
77
+ inset: calc((var(--_input, 0) / 2) - 0.75rem) auto auto auto;
78
+ cursor: pointer;
79
+ z-index: 10;
80
+ inline-size: 1.5rem;
81
+ block-size: 1.5rem;
82
+ margin: auto 0;
83
+ pointer-events: none;
84
+ }
85
+
86
+ > :is(a, .front) {
87
+ pointer-events: all !important;
88
+ }
89
+
90
+ > a > :is(i, img, svg, progress.circle, a) {
91
+ inline-size: 1.5rem;
92
+ block-size: 1.5rem;
93
+ }
94
+ }
95
+
96
+ .field > :is(i, img, svg, progress.circle, a),
97
+ [dir="rtl"] .field > :is(i, img, svg, progress.circle, a):first-child {
98
+ inset: calc(var(--_middle, 0) - 0.75rem) 1rem auto auto;
99
+ }
100
+
101
+ .field > :is(i, img, svg, progress.circle, a):first-child,
102
+ [dir="rtl"] .field > :is(i, img, svg, progress.circle, a) {
103
+ inset: calc(var(--_middle, 0) - 0.75rem) auto auto 1rem;
104
+ }
105
+
106
+ // input, textarea, select
107
+ .field > :is(input, textarea, select) {
108
+ all: unset;
109
+ position: relative;
110
+ display: flex;
111
+ align-items: center;
112
+ box-sizing: border-box;
113
+ border-radius: inherit;
114
+ border: 0.0625rem solid transparent;
115
+ padding: 0 0.9375rem;
116
+ font-family: inherit;
117
+ font-size: 1rem;
118
+ min-block-size: var(--_input);
119
+ outline: none;
120
+ z-index: 1;
121
+ background: none;
122
+ resize: none;
123
+ text-align: start;
124
+ cursor: text;
125
+
126
+ &:focus {
127
+ border: 0.125rem solid transparent;
128
+ padding-inline: 0.875rem;
129
+ }
130
+ }
131
+
132
+ input::-webkit-date-and-time-value {
133
+ text-align: start;
134
+ }
135
+
136
+ :is(input, select, textarea):is(:-webkit-autofill, :autofill) {
137
+ -webkit-background-clip: text;
138
+ -webkit-text-fill-color: var(--on-surface);
139
+ }
140
+
141
+ .field > textarea:not([rows]) {
142
+ field-sizing: content;
143
+ max-block-size: 12rem;
144
+ }
145
+
146
+ input[type="file"],
147
+ input[type="color"],
148
+ :not(.field) > input:is([type^="date"], [type^="time"], [type="month"], [type="week"]),
149
+ input::-webkit-calendar-picker-indicator {
150
+ opacity: 0;
151
+ position: absolute;
152
+ inset: 0;
153
+ inline-size: 100%;
154
+ block-size: 100%;
155
+ margin: 0;
156
+ padding: 0;
157
+ border: 0;
158
+ outline: 0;
159
+ z-index: 2 !important;
160
+ }
161
+
162
+ @media (pointer: fine) {
163
+ .field > input::-webkit-calendar-picker-indicator {
164
+ z-index: -1 !important;
165
+ }
166
+ }
167
+
168
+ input::-webkit-search-decoration,
169
+ input::-webkit-search-cancel-button,
170
+ input::-webkit-search-results-button,
171
+ input::-webkit-search-results-decoration,
172
+ input::-webkit-inner-spin-button,
173
+ input::-webkit-outer-spin-button {
174
+ display: none;
175
+ }
176
+
177
+ input[type="number"] {
178
+ appearance: textfield;
179
+ }
180
+
181
+ .field.border > :is(input, textarea, select) {
182
+ border-color: var(--outline);
183
+
184
+ &:focus {
185
+ border-color: var(--primary);
186
+ }
187
+ }
188
+
189
+ .field[class*="round"] > :is(input, textarea, select) {
190
+ padding-inline: 1.4376rem;
191
+
192
+ &:focus {
193
+ padding-inline: 1.375rem;
194
+ }
195
+ }
196
+
197
+ // prefix/suffix padding tweaks
198
+ $-field-edges: (
199
+ "prefix": (padding-inline-start, margin-inline-start),
200
+ "suffix": (padding-inline-end, margin-inline-end),
201
+ );
202
+
203
+ @each $side, $props in $-field-edges {
204
+ $padded: list.nth($props, 1);
205
+ $margin: list.nth($props, 2);
206
+
207
+ .field.#{$side} > :is(input, textarea, select) {
208
+ #{$padded}: 2.9375rem;
209
+
210
+ &:focus {
211
+ #{$padded}: 2.875rem;
212
+ }
213
+ }
214
+
215
+ .field.#{$side} > .slider {
216
+ #{$margin}: 3.5rem;
217
+ }
218
+ }
219
+
220
+ .field:not(.border, [class*="round"]) > :is(input, textarea, select) {
221
+ border-block-end-color: var(--outline);
222
+
223
+ &:focus {
224
+ border-block-end-color: var(--primary);
225
+ }
226
+ }
227
+
228
+ .field[class*="round"]:not(.border, .fill) > :is(input, textarea, select),
229
+ .field[class*="round"]:not(.border) > :is(input, textarea, select):focus {
230
+ box-shadow: var(--elevate1);
231
+ }
232
+
233
+ .field[class*="round"]:not(.border, .fill) > :is(input, textarea, select):focus {
234
+ box-shadow: var(--elevate2);
235
+ }
236
+
237
+ .field.invalid:not(.border, [class*="round"]) > :is(input, textarea, select),
238
+ .field.invalid:not(.border, [class*="round"]) > :is(input, textarea, select):focus {
239
+ border-block-end-color: var(--error);
240
+ }
241
+
242
+ .field.invalid.border > :is(input, textarea, select),
243
+ .field.invalid.border > :is(input, textarea, select):focus {
244
+ border-color: var(--error);
245
+ }
246
+
247
+ .field:has(> :disabled) {
248
+ opacity: 0.5;
249
+ cursor: not-allowed;
250
+ }
251
+
252
+ .field > :disabled {
253
+ cursor: not-allowed;
254
+ }
255
+
256
+ .field > select {
257
+ user-select: none;
258
+ }
259
+
260
+ @-moz-document url-prefix() {
261
+ .field > select:focus {
262
+ background-color: var(--surface);
263
+ }
264
+
265
+ .field.fill > select:focus {
266
+ background-color: var(--surface-variant);
267
+ }
268
+
269
+ .field > select:focus + label {
270
+ z-index: 1;
271
+ }
272
+ }
273
+
274
+ .field > select > option {
275
+ background-color: var(--surface);
276
+ }
277
+
278
+ .field > :is(input, select) {
279
+ padding-block-start: 1rem;
280
+ }
281
+
282
+ .field:not(.label) > :is(input, select),
283
+ .field.border:not(.fill) > :is(input, select) {
284
+ padding-block-start: 0;
285
+ }
286
+
287
+ .field > textarea {
288
+ padding-block-start: var(--_start) !important;
289
+
290
+ &:focus {
291
+ padding-block-start: calc(var(--_start, 0) - 0.01rem) !important;
292
+ }
293
+ }
294
+
295
+ .field:not(.label) > textarea,
296
+ .field.border:not(.fill) > textarea {
297
+ padding-block-start: calc(var(--_start, 0) - 0.5rem) !important;
298
+ }
299
+
300
+ .field:not(.label) > textarea:focus,
301
+ .field.border:not(.fill) > textarea:focus {
302
+ padding-block-start: calc(var(--_start, 0) - 0.51rem) !important;
303
+ }
304
+
305
+ // label
306
+ .field.label > label {
307
+ --_start: 1rem;
308
+ position: absolute;
309
+ inset: -0.5rem 0.9375rem 0 var(--_start);
310
+ display: flex;
311
+ block-size: calc(var(--_input, 0) + 1rem);
312
+ line-height: calc(var(--_input, 0) + 1rem);
313
+ font-size: 1rem;
314
+ transition: all 0.2s;
315
+ gap: 0.25rem;
316
+ white-space: nowrap;
317
+ pointer-events: none;
318
+ }
319
+
320
+ [dir="rtl"] .field.label > label {
321
+ inset: -0.5rem calc(var(--_start) - 0.0625rem) 0 0.9375rem;
322
+ }
323
+
324
+ .field.label[class*="round"] > label {
325
+ inset: -0.5rem 1.9375rem 0 var(--_start);
326
+ }
327
+
328
+ [dir="rtl"] .field.label[class*="round"] > label {
329
+ inset: -0.5rem var(--_start) 0 1.9375rem;
330
+ }
331
+
332
+ .field.label.border.prefix:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
333
+ --_start: 1rem;
334
+ }
335
+
336
+ .field.label[class*="round"] > label,
337
+ .field.label.border.prefix[class*="round"]:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
338
+ --_start: 1.5rem;
339
+ }
340
+
341
+ .field.label.prefix > label {
342
+ --_start: 3rem;
343
+ }
344
+
345
+ .field.label > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
346
+ block-size: 2.5rem;
347
+ line-height: 2.5rem;
348
+ font-size: 0.75rem;
349
+ }
350
+
351
+ .field.label.border:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
352
+ block-size: 1rem;
353
+ line-height: 1rem;
354
+ }
355
+
356
+ .field.label.border:not(.fill) > label::after {
357
+ content: "";
358
+ display: block;
359
+ margin: 0.5rem 0 0 0;
360
+ border-block-start: 0.0625rem solid var(--outline);
361
+ block-size: 1rem;
362
+ transition: none;
363
+ flex: auto;
364
+ }
365
+
366
+ .field.label.border:not(.fill) > :focus + label::after {
367
+ border-block-start: 0.125rem solid var(--primary);
368
+ }
369
+
370
+ .field.label.border:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
371
+ .field.label.border:not(.fill) > select {
372
+ clip-path: polygon(-2% -2%, 0.75rem -2%, 0.75rem 0.5rem, calc(100% - 1rem) 0.5rem, calc(100% - 1rem) -2%, 102% -2%, 102% 102%, -2% 102%);
373
+ }
374
+
375
+ [dir="rtl"] .field.label.border:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
376
+ [dir="rtl"] .field.label.border:not(.fill) > select {
377
+ clip-path: polygon(-2% -2%, 1rem -2%, 1rem 0.5rem, calc(100% - 0.75rem) 0.5rem, calc(100% - 0.75rem) -2%, 102% -2%, 102% 102%, -2% 102%);
378
+ }
379
+
380
+ .field.label.border[class*="round"]:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
381
+ .field.label.border[class*="round"]:not(.fill) > select {
382
+ clip-path: polygon(-2% -2%, 1.25rem -2%, 1.25rem 0.5rem, calc(100% - 2rem) 0.5rem, calc(100% - 2rem) -2%, 102% -2%, 102% 102%, -2% 102%);
383
+ }
384
+
385
+ [dir="rtl"] .field.label.border[class*="round"]:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
386
+ [dir="rtl"] .field.label.border[class*="round"]:not(.fill) > select {
387
+ clip-path: polygon(-2% -2%, 2rem -2%, 2rem 0.5rem, calc(100% - 1.25rem) 0.5rem, calc(100% - 1.25rem) -2%, 102% -2%, 102% 102%, -2% 102%);
388
+ }
389
+
390
+ .field.label > :focus + label {
391
+ color: var(--primary);
392
+ }
393
+
394
+ .field.label.invalid > label,
395
+ .field.label.invalid > label::after {
396
+ color: var(--error) !important;
397
+ border-color: var(--error) !important;
398
+ }
399
+
400
+ .field.label > label > a {
401
+ block-size: inherit;
402
+ line-height: inherit;
403
+ inline-size: 1rem;
404
+
405
+ > :is(i, img, svg) {
406
+ block-size: 1rem;
407
+ line-height: 1rem;
408
+ inline-size: 1rem;
409
+ font-size: 1rem;
410
+ }
411
+ }
412
+
413
+ // helper output
414
+ .field > output {
415
+ display: inline-block;
416
+ font-size: 0.75rem;
417
+ background: none !important;
418
+ padding: 0.25rem 1rem;
419
+ line-height: 1.25rem;
420
+ align-self: start;
421
+
422
+ &.invalid {
423
+ color: var(--error) !important;
424
+ }
425
+ }
426
+
427
+ .field[class*="round"] > output {
428
+ padding: 0.25rem 1.5rem;
429
+ }
430
+
431
+ .field.invalid > output:not(.invalid),
432
+ .field:not(.invalid) > output.invalid {
433
+ display: none;
434
+ }
435
+
436
+ .field.invalid > output.invalid ~ menu,
437
+ .field:not(.invalid) > output:not(.invalid) ~ menu {
438
+ inset: auto auto 1.75rem 0;
439
+ }
440
+
441
+ table td > .field {
442
+ margin: 0;
443
+ }
444
+
445
+ fieldset {
446
+ border-radius: 0.25rem;
447
+ padding: 1rem;
448
+ border: 0.0625rem solid var(--outline-variant);
449
+
450
+ > legend {
451
+ margin: 0 -0.25rem;
452
+ padding: 0 0.25rem;
453
+
454
+ + * {
455
+ margin-block-start: 0 !important;
456
+ }
457
+ }
458
+ }
@@ -0,0 +1,35 @@
1
+ // 12-column grid with .s1-12 / .m1-12 / .l1-12 span classes.
2
+ // Per-breakpoint sets emitted via a single @each over $-grid-breakpoints.
3
+
4
+ .grid {
5
+ --_gap: 1rem;
6
+ display: grid;
7
+ grid-template-columns: repeat(12, 1fr);
8
+ gap: var(--_gap);
9
+ block-size: auto;
10
+
11
+ > * {
12
+ margin: 0;
13
+ }
14
+
15
+ &.no-space { --_gap: 0rem; }
16
+ &.medium-space { --_gap: 1.5rem; }
17
+ &.large-space { --_gap: 2rem; }
18
+ }
19
+
20
+ @for $i from 1 through 12 {
21
+ .s#{$i} { grid-area: auto/span $i; }
22
+ }
23
+
24
+ $-grid-breakpoints: (
25
+ "m": 601px,
26
+ "l": 993px,
27
+ );
28
+
29
+ @each $prefix, $min in $-grid-breakpoints {
30
+ @media only screen and (min-width: #{$min}) {
31
+ @for $i from 1 through 12 {
32
+ .#{$prefix}#{$i} { grid-area: auto/span $i; }
33
+ }
34
+ }
35
+ }