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