@shortfuse/materialdesignweb 0.7.0 → 0.7.1-1

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 (141) hide show
  1. package/bin/generate-css.js +1 -2
  2. package/components/Badge.js +40 -3
  3. package/components/Body.js +16 -2
  4. package/components/BottomAppBar.js +25 -2
  5. package/components/Box.js +33 -3
  6. package/components/Button.js +146 -9
  7. package/components/Card.js +111 -3
  8. package/components/Checkbox.js +91 -3
  9. package/components/CheckboxIcon.js +92 -4
  10. package/components/Chip.js +38 -2
  11. package/components/Dialog.js +237 -3
  12. package/components/DialogActions.js +3 -2
  13. package/components/Divider.js +44 -3
  14. package/components/ExtendedFab.js +27 -2
  15. package/components/Fab.js +26 -2
  16. package/components/FilterChip.js +83 -2
  17. package/components/Headline.js +16 -2
  18. package/components/Icon.js +80 -4
  19. package/components/IconButton.js +153 -2
  20. package/components/Label.js +16 -2
  21. package/components/Layout.js +21 -3
  22. package/components/List.js +15 -2
  23. package/components/ListItem.js +229 -3
  24. package/components/ListOption.js +37 -3
  25. package/components/ListSelect.js +12 -2
  26. package/components/Menu.js +173 -3
  27. package/components/MenuItem.js +55 -2
  28. package/components/Nav.js +19 -2
  29. package/components/NavBar.js +37 -2
  30. package/components/NavBarItem.js +44 -2
  31. package/components/NavDrawer.js +34 -2
  32. package/components/NavDrawerItem.js +44 -2
  33. package/components/NavItem.js +183 -3
  34. package/components/NavRail.js +50 -2
  35. package/components/NavRailItem.js +25 -2
  36. package/components/Pane.js +263 -3
  37. package/components/Progress.js +469 -10
  38. package/components/Radio.js +97 -3
  39. package/components/RadioIcon.js +77 -5
  40. package/components/Ripple.js +76 -3
  41. package/components/SegmentedButton.js +97 -2
  42. package/components/SegmentedButtonGroup.js +15 -2
  43. package/components/Select.js +54 -2
  44. package/components/Shape.js +55 -18
  45. package/components/Slider.js +309 -3
  46. package/components/Snackbar.js +82 -2
  47. package/components/Surface.js +13 -4
  48. package/components/Switch.js +67 -4
  49. package/components/SwitchIcon.js +272 -5
  50. package/components/Tab.js +87 -3
  51. package/components/TabContent.js +21 -21
  52. package/components/TabList.js +131 -2
  53. package/components/TextArea.js +97 -3
  54. package/components/Title.js +16 -2
  55. package/components/Tooltip.js +42 -2
  56. package/components/TopAppBar.js +212 -3
  57. package/core/template.js +36 -9
  58. package/index.js +77 -0
  59. package/mixins/ControlMixin.js +65 -2
  60. package/mixins/DensityMixin.js +17 -3
  61. package/mixins/FlexableMixin.js +81 -3
  62. package/mixins/RippleMixin.js +15 -4
  63. package/mixins/ShapeMixin.js +279 -8
  64. package/mixins/StateMixin.js +87 -5
  65. package/mixins/SurfaceMixin.js +152 -3
  66. package/mixins/TextFieldMixin.js +661 -2
  67. package/mixins/ThemableMixin.js +206 -3
  68. package/mixins/TooltipTriggerMixin.js +30 -4
  69. package/mixins/TouchTargetMixin.js +29 -4
  70. package/package.json +3 -1
  71. package/theming/index.js +0 -121
  72. package/theming/loader.js +0 -2
  73. package/utils/svg.js +0 -117
  74. package/components/Badge.css +0 -30
  75. package/components/Body.css +0 -14
  76. package/components/BottomAppBar.css +0 -23
  77. package/components/Box.css +0 -31
  78. package/components/Button.css +0 -146
  79. package/components/Card.css +0 -109
  80. package/components/Checkbox.css +0 -77
  81. package/components/CheckboxIcon.css +0 -89
  82. package/components/Chip.css +0 -35
  83. package/components/Dialog.css +0 -235
  84. package/components/Divider.css +0 -41
  85. package/components/ExtendedFab.css +0 -24
  86. package/components/Fab.css +0 -23
  87. package/components/FilterChip.css +0 -80
  88. package/components/Headline.css +0 -14
  89. package/components/Icon.css +0 -76
  90. package/components/IconButton.css +0 -151
  91. package/components/Label.css +0 -14
  92. package/components/Layout.css +0 -19
  93. package/components/List.css +0 -12
  94. package/components/ListItem.css +0 -224
  95. package/components/ListOption.css +0 -34
  96. package/components/ListSelect.css +0 -9
  97. package/components/Menu.css +0 -171
  98. package/components/MenuItem.css +0 -53
  99. package/components/Nav.css +0 -17
  100. package/components/NavBar.css +0 -34
  101. package/components/NavBarItem.css +0 -41
  102. package/components/NavDrawer.css +0 -31
  103. package/components/NavDrawerItem.css +0 -42
  104. package/components/NavItem.css +0 -181
  105. package/components/NavRail.css +0 -47
  106. package/components/NavRailItem.css +0 -25
  107. package/components/Outline.css +0 -138
  108. package/components/Pane.css +0 -261
  109. package/components/Progress.css +0 -74
  110. package/components/ProgressCircle.css +0 -226
  111. package/components/ProgressLine.css +0 -155
  112. package/components/Radio.css +0 -83
  113. package/components/RadioIcon.css +0 -73
  114. package/components/Ripple.css +0 -74
  115. package/components/SegmentedButton.css +0 -94
  116. package/components/SegmentedButtonGroup.css +0 -12
  117. package/components/Select.css +0 -52
  118. package/components/Shape.css +0 -132
  119. package/components/Slider.css +0 -306
  120. package/components/Snackbar.css +0 -80
  121. package/components/Surface.css +0 -10
  122. package/components/Switch.css +0 -63
  123. package/components/SwitchIcon.css +0 -177
  124. package/components/SwitchIconAnimations.css +0 -89
  125. package/components/Tab.css +0 -85
  126. package/components/TabList.css +0 -129
  127. package/components/TextArea.css +0 -93
  128. package/components/Title.css +0 -14
  129. package/components/Tooltip.css +0 -40
  130. package/components/TopAppBar.css +0 -209
  131. package/mixins/ControlMixin.css +0 -57
  132. package/mixins/DensityMixin.css +0 -40
  133. package/mixins/FlexableMixin.css +0 -79
  134. package/mixins/RippleMixin.css +0 -12
  135. package/mixins/ShapeMixin.css +0 -135
  136. package/mixins/StateMixin.css +0 -82
  137. package/mixins/SurfaceMixin.css +0 -150
  138. package/mixins/TextFieldMixin.css +0 -657
  139. package/mixins/ThemableMixin.css +0 -204
  140. package/mixins/TooltipTriggerMixin.css +0 -27
  141. package/mixins/TouchTargetMixin.css +0 -26
@@ -1,7 +1,6 @@
1
1
  import '../components/Icon.js';
2
2
  import DensityMixin from './DensityMixin.js';
3
3
  import ShapeMixin from './ShapeMixin.js';
4
- import styles from './TextFieldMixin.css' assert { type: 'css' };
5
4
 
6
5
  /** @typedef {import('../core/CustomElement.js').default} CustomElement */
7
6
 
@@ -117,5 +116,665 @@ export default function TextFieldMixin(Base) {
117
116
  sizeChanged(oldValue, newValue) {
118
117
  this.refs.control.style.setProperty('--size', `${newValue}ch`);
119
118
  },
120
- });
119
+ })
120
+ .css`
121
+ /* https://m3.material.io/components/text-fields/specs */
122
+
123
+ /**
124
+ * States: Enabled / Hover / Focus / Error / Error Hover / Error Focus
125
+ * Input: on-surface / on-surface / on-surface / on-surface / on-surface / on-surface
126
+ * Inline: on-surface-variant / on-surface-variant / on-surface-variant / on-surface-variant / on-surface-variant / on-surface-variant
127
+ * Label: on-surface-variant / on-surface* / ink / error / on-error-container / error
128
+ * Indicator: on-surface-variant / on-surface / ink / error / on-error-container / error
129
+ * Caret: (any) / (any) / ink / (any) / (any) / error
130
+ * Outline: outline / on-surface / ink / error / on-error-container / error
131
+ * Selection: on-* / on-* / ink / error / on-error-container / error
132
+ *
133
+ *
134
+ * *Filled hovered unpopulated label may be on-surface-variant instead
135
+ *
136
+ * Input: Always on-surface
137
+ * Inline: Always on-surface-variant
138
+ * Indicator: same as label
139
+ * Label: same as indicator
140
+ * Outline: outline default, same as label+indicator on :hover or :focus
141
+ * Caret: same as label+indicator+outline (cannot inherit color or use currentColor)
142
+ * Selection: (cannot inherit color or use currentColor)
143
+ */
144
+
145
+ :host {
146
+ --mdw-shape__size: var(--mdw-shape__extra-small);
147
+ /* --mdw-shape__size: 8px; */
148
+ /* --mdw-shape__size__bottom-start-size: var(--mdw-shape__size); */
149
+ /* --mdw-shape__size__bottom-end-size: var(--mdw-shape__size); */
150
+ --mdw-text-field__ratio: calc(var(--mdw-density) * 0.125 + 1);
151
+
152
+ --control__margin-top: calc(var(--mdw-typescale__body-small__line-height) / 2);
153
+ --control__padding-top: calc((var(--mdw-text-field__ratio) * 16px) - calc(var(--mdw-typescale__body-small__line-height) / 2));
154
+ --control__padding-bottom: calc(var(--mdw-text-field__ratio) * 16px);
155
+ --control__margin-bottom: 0px;
156
+
157
+ --inline-color: rgb(var(--mdw-color__on-surface-variant));
158
+
159
+ --descriptor-opacity: 0.5;
160
+ --mdw-ink: var(--mdw-color__primary);
161
+ --mdw-bg: var(--mdw-color__surface-variant);
162
+
163
+ --mdw-type__font: var(--mdw-typescale__body-large__font);
164
+ --mdw-type__letter-spacing: var(--mdw-typescale__body-large__letter-spacing);
165
+
166
+ display: inline-block;
167
+
168
+ /* State layer */
169
+ color: rgb(var(--mdw-color__on-surface));
170
+
171
+ font: var(--mdw-type__font);
172
+ letter-spacing: var(--mdw-type__letter-spacing);
173
+ }
174
+
175
+ :host([icon]) {
176
+ --padding-inline-start: 12px;
177
+ }
178
+
179
+ :host([trailing-icon]) {
180
+ --padding-inline-end: 12px;
181
+ }
182
+
183
+ :host(:is([color], [ink])) {
184
+ background-color: transparent;
185
+ color: rgb(var(--mdw-color__on-surface));
186
+ }
187
+
188
+ #label {
189
+ position: relative;
190
+
191
+ display: flex;
192
+
193
+ align-items: center;
194
+ overflow: visible;
195
+
196
+ padding-inline-start: 16px;
197
+ padding-inline-end: 16px;
198
+
199
+ cursor: inherit;
200
+
201
+ z-index: 0;
202
+
203
+ background-color: transparent;
204
+
205
+ font-weight: inherit;
206
+ font-size: inherit;
207
+ line-height: inherit;
208
+ font-family: inherit;
209
+ letter-spacing: inherit;
210
+
211
+ transition: none 200ms cubic-bezier(0.0, 0.0, 0.2, 1);
212
+ }
213
+
214
+ #label:is([filled],[color]) {
215
+ background-color: rgb(var(--mdw-bg));
216
+ color: rgb(var(--mdw-color__on-surface));
217
+ }
218
+
219
+ #label[outlined] {
220
+ background-color: transparent;
221
+ }
222
+
223
+ #label-text,
224
+ #indicator {
225
+ color: rgb(var(--mdw-color__on-surface-variant))
226
+ }
227
+
228
+ :is(#label-text, #indicator)[focused] {
229
+ color: rgb(var(--mdw-ink))
230
+ }
231
+
232
+ #label[icon] {
233
+ padding-inline-start: 12px;
234
+ }
235
+
236
+ #label[trailing-icon] {
237
+ padding-inline-end: 12px;
238
+ }
239
+
240
+ #label[focused] {
241
+ transition: none 100ms cubic-bezier(0.4, 0.0, 1, 1);
242
+ }
243
+
244
+ #prefix,
245
+ #suffix,
246
+ #control::placeholder {
247
+ opacity: var(--descriptor-opacity);
248
+
249
+ color: var(--inline-color);
250
+
251
+ transition-duration: inherit;
252
+ transition-property: opacity;
253
+ transition-timing-function: inherit;
254
+ will-change: opacity;
255
+ }
256
+
257
+ :host([label]:is([filled],[outlined])) {
258
+ --descriptor-opacity: 0;
259
+ }
260
+
261
+ #control {
262
+ position: relative;
263
+ inset: auto;
264
+ align-self: flex-start;
265
+
266
+ display: inline;
267
+
268
+ box-sizing: border-box;
269
+
270
+ block-size: auto;
271
+ min-block-size: none;
272
+ inline-size: 100%;
273
+ min-inline-size: none;
274
+ flex: 1;
275
+ border-block-start: solid var(--control__margin-top) transparent;
276
+ border-block-end: solid var(--control__margin-bottom) transparent;
277
+ padding-block: var(--control__padding-top) var(--control__padding-bottom);
278
+
279
+ appearance: none;
280
+ caret-color: rgb(var(--mdw-ink));
281
+ cursor: auto;
282
+
283
+ transform: none;
284
+
285
+ visibility: visible;
286
+
287
+ background-color: transparent;
288
+ border-color: transparent;
289
+ color: inherit;
290
+ /* rgb(var(--mdw-color__on-surface)); */
291
+
292
+ font-weight: inherit;
293
+ font-size: inherit;
294
+ line-height: inherit;
295
+ font-family: inherit;
296
+ letter-spacing: inherit;
297
+
298
+ transition-duration: inherit;
299
+ transition-property: color;
300
+ transition-timing-function: inherit;
301
+ }
302
+
303
+ #suffix,
304
+ #prefix {
305
+ /* Symmetrical to allow centering */
306
+ margin-block: var(--control__margin-top) var(--control__margin-bottom);
307
+ padding-block: var(--control__padding-top) var(--control__padding-bottom);
308
+ }
309
+
310
+ /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
311
+ #control::selection {
312
+ background-color: rgb(var(--mdw-ink));
313
+ color: rgb(var(--mdw-color__surface));
314
+ }
315
+
316
+ #state {
317
+ --mdw-state__focus-opacity: 0;
318
+ --mdw-state__pressed-opacity: 0;
319
+ }
320
+
321
+ mdw-icon {
322
+ --mdw-icon__size: 24px;
323
+ align-self: center;
324
+
325
+ color: var(--inline-color);
326
+ }
327
+
328
+ #icon {
329
+ order: -2;
330
+
331
+ margin-inline-end: 16px;
332
+
333
+ font-size: 24px;
334
+ }
335
+
336
+ #prefix {
337
+ order: -1;
338
+ }
339
+
340
+ #suffix {
341
+ order: 1;
342
+ }
343
+
344
+ #trailing-icon {
345
+ order: 2;
346
+
347
+ margin-inline-start: 16px;
348
+ }
349
+
350
+ #indicator {
351
+ position: absolute;
352
+ inset-block-end: 0;
353
+ inset-inline: 0;
354
+
355
+ border-block-end: 2px solid currentColor;
356
+
357
+ pointer-events: none;
358
+
359
+ transform: scaleY(0.5);
360
+ z-index: 1; /* Force new layer to avoid repaint */
361
+
362
+ transition-duration: inherit;
363
+ transition-property: transform;
364
+ transition-timing-function: inherit;
365
+ will-change: transform;
366
+ }
367
+
368
+ #indicator[focused] {
369
+ transform: scaleY(1);
370
+
371
+ }
372
+
373
+ /** Label Text **/
374
+
375
+ #label-text {
376
+ position: absolute;
377
+ inset-block-start: 0;
378
+ inset-inline: 0;
379
+
380
+ display: block;
381
+ overflow-x: clip;
382
+ overflow-y: visible;
383
+
384
+ padding-inline: 16px;
385
+
386
+ pointer-events: none;
387
+
388
+ opacity: 1;
389
+ transform: translateY(calc((var(--control__margin-top) + var(--control__padding-top) + 100% + var(--control__padding-bottom) + var(--control__margin-bottom)) / 2)) translateY(-50%);
390
+ z-index: 4;
391
+ /* FireFox bug */
392
+
393
+ color: rgb(var(--mdw-color__on-surface-variant));
394
+
395
+ text-overflow: ellipsis;
396
+ white-space: nowrap;
397
+
398
+ transition-duration: 200ms;
399
+ transition-property: inset-inline-start, font-size, transform;
400
+ /* transition-timing-function: inherit; */
401
+ /*Expand*/
402
+
403
+ will-change: inset-inline-start, font-size, transform;
404
+ }
405
+
406
+ @supports (-moz-appearance:none ) {
407
+ #label-text {
408
+ /* Firefox clips Y as well as X */
409
+ overflow-x: hidden;
410
+ }
411
+ }
412
+
413
+ #label-text[focused] {
414
+ color: rgb(var(--mdw-ink));
415
+ }
416
+
417
+ #label-text[icon] {
418
+ inset-inline-start: calc(12px + 24px);
419
+ }
420
+
421
+ #label-text[trailing-icon] {
422
+ inset-inline-end: calc(24px + 12px);
423
+ }
424
+
425
+ #label-text:is([focused], [populated]) {
426
+ transform: translateY(calc(var(--mdw-text-field__ratio) * 8px));
427
+
428
+ font: var(--mdw-typescale__body-small__font);
429
+ /* Not spec: Should only use font-size and line-height */
430
+ letter-spacing: var(--mdw-typescale__body-small__letter-spacing);
431
+ }
432
+
433
+ #label-text[outlined]:is([focused], [populated]) {
434
+ inset-inline: 0;
435
+
436
+ transform: translateY(-50%);
437
+ }
438
+
439
+ #label[label][outlined] {
440
+ /** Guard against bleed */
441
+ --mdw-shape__size__top-start-size: min(var(--mdw-shape__size), 12px);
442
+ --mdw-shape__size__bottom-start-size: min(var(--mdw-shape__size), 12px);
443
+ --mdw-shape__size__top-end-size: min(var(--mdw-shape__size), 12px);
444
+ --mdw-shape__size__bottom-end-size: min(var(--mdw-shape__size), 12px);
445
+ -webkit-mask-box-image-width: min(var(--mdw-shape__size), 12px);
446
+ }
447
+
448
+ :is(#prefix, #suffix):is([focused], [populated]) {
449
+ opacity: 1;
450
+ }
451
+
452
+ /* If no label */
453
+ #control:is(:focus, :not(:placeholder-shown))::placeholder {
454
+ opacity: 0.70;
455
+ }
456
+
457
+ #control[input-suffix] {
458
+ text-align: end;
459
+ }
460
+
461
+ /** Outlined **/
462
+
463
+ #outline::before {
464
+ content: none;
465
+ }
466
+
467
+ .outline-section {
468
+ position: relative;
469
+
470
+ border: 1px solid currentColor;
471
+ }
472
+
473
+ .outline-section[focused] {
474
+ border-width: 2px;
475
+ }
476
+
477
+ #outline-left {
478
+ /* stylelint-disable-next-line liberty/use-logical-spec */
479
+ border-right-width: 0;
480
+ /* stylelint-disable-next-line liberty/use-logical-spec */
481
+ border-top-left-radius: inherit;
482
+ /* stylelint-disable-next-line liberty/use-logical-spec */
483
+ border-bottom-left-radius: inherit;
484
+ }
485
+
486
+ #outline-right {
487
+ /* stylelint-disable-next-line liberty/use-logical-spec */
488
+ border-left-width: 0;
489
+ /* stylelint-disable-next-line liberty/use-logical-spec */
490
+ border-top-right-radius: inherit;
491
+ /* stylelint-disable-next-line liberty/use-logical-spec */
492
+ border-bottom-right-radius: inherit;
493
+ }
494
+
495
+ #outline {
496
+ display: grid;
497
+ grid-auto-flow: column;
498
+ grid-template-columns: 12px minmax(0,auto) minmax(12px, 1fr);
499
+
500
+ color: rgb(var(--mdw-color__outline));
501
+
502
+
503
+ }
504
+
505
+ #outline[hovered] {
506
+ color: rgb(var(--mdw-color__on-surface));
507
+ }
508
+
509
+ #outline[focused] {
510
+ color: rgb(var(--mdw-ink));
511
+ }
512
+
513
+ .outline-section {
514
+ min-inline-size: 12px;
515
+ }
516
+
517
+ .outline-section::before,
518
+ .outline-section::after {
519
+ max-inline-size: none;
520
+ }
521
+
522
+ .outline-left {
523
+ grid-column: calc(2 - var(--mdw-dir, 1)) / span 1; /* 1 on LTR, 3 on RTL */
524
+ }
525
+
526
+ .outline-right {
527
+ grid-column: calc(2 + var(--mdw-dir, 1)) / span 1;
528
+ }
529
+
530
+ #gap {
531
+ position: relative;
532
+
533
+ display: inline-block;
534
+ overflow: clip hidden;
535
+
536
+ max-inline-size: 100%;
537
+ grid-column: 2;
538
+
539
+ font: var(--mdw-typescale__body-small__font);
540
+ /* Not spec: Should only use font-size and line-height */
541
+ letter-spacing: var(--mdw-typescale__body-small__letter-spacing);
542
+
543
+ /* Close gap */
544
+ transition-duration: inherit;
545
+ transition-property: padding;
546
+ transition-timing-function: inherit;
547
+ }
548
+
549
+ #gap-label {
550
+ display: inline-block;
551
+ overflow: clip hidden;
552
+
553
+ padding-inline: 4px;
554
+
555
+ color:transparent;
556
+
557
+ white-space: nowrap;
558
+ }
559
+
560
+ #gap::after {
561
+ content: '';
562
+
563
+ position: absolute;
564
+ inset: 0;
565
+
566
+ border-block-end: solid 1px currentColor;
567
+ }
568
+
569
+ #gap[focused]::after {
570
+ border-block-end-width: 2px;
571
+ }
572
+
573
+ #gap-slot {
574
+ position: absolute;
575
+ inset: 0;
576
+
577
+ }
578
+
579
+ #gap-slot::before,
580
+ #gap-slot::after {
581
+ content: '';
582
+
583
+ position: absolute;
584
+ inset: 0;
585
+
586
+ border-block-start: solid 1px currentColor;
587
+
588
+ transition: transform 200ms;
589
+ will-change: transform;
590
+ }
591
+
592
+ #gap-slot[focused]::before,
593
+ #gap-slot[focused]::after {
594
+ border-block-start-width: 2px;
595
+ }
596
+
597
+ @supports(-webkit-mask-box-image: none) {
598
+ #outline[focused] {
599
+ /** Fake 2px outline */
600
+ filter:
601
+ drop-shadow(1px 0px 0px currentColor)
602
+ drop-shadow(0px 1px 0px currentColor)
603
+ drop-shadow(-1px 0px 0px currentColor)
604
+ drop-shadow(0px -1px 0px currentColor);
605
+ }
606
+
607
+ #outline::before {
608
+ content: '';
609
+
610
+ position: absolute;
611
+ inset: 0;
612
+
613
+ grid-column: calc(2 - var(--mdw-dir, 1)) / span 1;
614
+ /* stylelint-disable-next-line liberty/use-logical-spec */
615
+ margin-right: -0.99px;
616
+ border: none;
617
+
618
+ background-color: currentColor;
619
+ -webkit-mask-box-image: var(--mdw-shape__mask-image__edges)
620
+ 8 fill /
621
+ auto
622
+ stretch;
623
+ -webkit-mask-box-image-width: auto 0 auto auto;
624
+ }
625
+
626
+ #outline::after {
627
+ grid-column: calc(2 + var(--mdw-dir, 1)) / span 1;
628
+ grid-row: 1;
629
+
630
+ /* stylelint-disable-next-line liberty/use-logical-spec */
631
+ margin-left: -0.99px;
632
+ -webkit-mask-box-image-width: auto auto auto 0;
633
+ }
634
+
635
+ .outline-section {
636
+ border: none;
637
+ }
638
+
639
+ #gap::after {
640
+ border: none;
641
+
642
+ background-color: currentColor;
643
+ -webkit-mask-box-image: var(--mdw-shape__mask-image__edges)
644
+ 8 fill /
645
+ auto
646
+ stretch;
647
+ -webkit-mask-box-image-width: 0 0 auto 0;
648
+ }
649
+
650
+ #gap-slot::before,
651
+ #gap-slot::after {
652
+ border: none;
653
+
654
+ background-color: currentColor;
655
+
656
+ -webkit-mask-box-image: var(--mdw-shape__mask-image__edges)
657
+ 8 fill /
658
+ auto
659
+ stretch;
660
+ -webkit-mask-box-image-width: auto 0 0 0;
661
+ }
662
+ }
663
+
664
+ #gap-slot::before {
665
+ /* stylelint-disable-next-line liberty/use-logical-spec */
666
+ margin-right: -0.99px;
667
+
668
+ transform: var(--gap-transform, scaleX(0.5));
669
+ transform-origin: 0 0;
670
+ }
671
+
672
+ #gap-slot::after {
673
+ /* stylelint-disable-next-line liberty/use-logical-spec */
674
+ margin-left: -0.99px;
675
+
676
+ transform: var(--gap-transform, scaleX(0.5));
677
+ transform-origin: 100% 0;
678
+ }
679
+
680
+ #gap:is([focused], [populated]) {
681
+ /* Open gap */
682
+ --gap-transform: scaleX(0);
683
+ }
684
+
685
+ #gap:empty {
686
+ padding: 0;
687
+ }
688
+
689
+ #label[label][filled] {
690
+ align-items: flex-start;
691
+ }
692
+
693
+ :host([filled]) {
694
+ --mdw-shape__size__bottom-start-size: 0px;
695
+ --mdw-shape__size__bottom-end-size: 0px;
696
+ --mdw-text-field__ratio: calc(var(--mdw-density) * 0.25 + 1);
697
+ }
698
+
699
+ :host(:is([filled][label])) {
700
+ --control__margin-top: calc((var(--mdw-text-field__ratio) * 8px) + var(--mdw-typescale__body-small__line-height));
701
+ --control__padding-top: 0px;
702
+ --control__padding-bottom: calc(var(--mdw-text-field__ratio) * 4px);
703
+ --control__margin-bottom: calc(var(--mdw-text-field__ratio) * 4px);
704
+ }
705
+
706
+ #supporting {
707
+ min-block-size: var(--mdw-typescale__body-small__line-height);
708
+ margin-block-start: 4px;
709
+ margin-inline: 16px;
710
+
711
+ font-weight: var(--mdw-typescale__body-small__font-weight); /* Not spec */
712
+ font-size: var(--mdw-typescale__body-small__font-size);
713
+ line-height: var(--mdw-typescale__body-small__line-height);
714
+ font-family: var(--mdw-typescale__body-small__font-family); /* Not spec */
715
+ letter-spacing: var(--mdw-typescale__body-small__letter-spacing); /* Not spec */
716
+ }
717
+
718
+ /* Error States */
719
+
720
+ #control[errored] {
721
+ caret-color: rgb(var(--mdw-color__error));
722
+ }
723
+
724
+ #control[errored]::selection {
725
+ background-color: rgb(var(--mdw-color__on-error-container));
726
+ }
727
+
728
+ :is(#indicator, #label-text, #supporting, #outline)[errored] {
729
+ color: rgb(var(--mdw-color__error));
730
+ }
731
+
732
+ :is(#indicator, #label-text, #supporting, #outline)[errored]:where([hovered]) {
733
+ color: rgb(var(--mdw-color__on-error-container));
734
+ }
735
+
736
+ :is(#indicator, #label-text, #supporting, #outline)[errored]:where([focused]) {
737
+ color: rgb(var(--mdw-color__error));
738
+ }
739
+
740
+ /* stylelint-disable-next-line selector-max-compound-selectors */
741
+ #label[disabled],
742
+ #label[disabled] #control {
743
+ cursor: not-allowed;
744
+ }
745
+
746
+ #outline[disabled] {
747
+ color: rgba(var(--mdw-color__outline), 0.12);
748
+ }
749
+
750
+ #label-text[disabled] {
751
+ color: rgba(var(--mdw-color__on-surface), 0.38);
752
+ }
753
+
754
+ #supporting[disabled] {
755
+ color: rgba(var(--mdw-color__on-surface), 0.38);
756
+ }
757
+
758
+ .inline[disabled] {
759
+ color: rgba(var(--mdw-color__on-surface), 0.38);
760
+ }
761
+
762
+ mdw-icon[disabled] {
763
+ color: rgba(var(--mdw-color__on-surface), 0.38);
764
+ }
765
+
766
+ #label[disabled] {
767
+ background-color: rgba(var(--mdw-color__on-surface), calc(0.04));
768
+ color: rgba(var(--mdw-color__on-surface), 0.38);
769
+ }
770
+
771
+ #indicator[disabled] {
772
+ color: rgba(var(--mdw-color__on-surface), 0.38);
773
+ }
774
+
775
+ #label[disabled][outlined] {
776
+ background-color: transparent;
777
+ }
778
+
779
+ `;
121
780
  }