@m3e/web 2.0.0 → 2.0.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 (147) hide show
  1. package/dist/all.js +1161 -941
  2. package/dist/all.js.map +1 -1
  3. package/dist/all.min.js +59 -59
  4. package/dist/all.min.js.map +1 -1
  5. package/dist/bottom-sheet.js +1 -1
  6. package/dist/bottom-sheet.js.map +1 -1
  7. package/dist/bottom-sheet.min.js +1 -1
  8. package/dist/bottom-sheet.min.js.map +1 -1
  9. package/dist/button.js +387 -317
  10. package/dist/button.js.map +1 -1
  11. package/dist/button.min.js +2 -2
  12. package/dist/button.min.js.map +1 -1
  13. package/dist/card.js +73 -73
  14. package/dist/card.js.map +1 -1
  15. package/dist/card.min.js +5 -5
  16. package/dist/card.min.js.map +1 -1
  17. package/dist/checkbox.js +5 -1
  18. package/dist/checkbox.js.map +1 -1
  19. package/dist/checkbox.min.js +1 -1
  20. package/dist/checkbox.min.js.map +1 -1
  21. package/dist/core-a11y.js.map +1 -1
  22. package/dist/core-a11y.min.js.map +1 -1
  23. package/dist/core-bidi.js.map +1 -1
  24. package/dist/core-bidi.min.js.map +1 -1
  25. package/dist/core-layout.js.map +1 -1
  26. package/dist/core-layout.min.js.map +1 -1
  27. package/dist/core-platform.js.map +1 -1
  28. package/dist/core-platform.min.js.map +1 -1
  29. package/dist/core.js +42 -32
  30. package/dist/core.js.map +1 -1
  31. package/dist/core.min.js +2 -2
  32. package/dist/core.min.js.map +1 -1
  33. package/dist/css-custom-data.json +1356 -511
  34. package/dist/custom-elements.json +9890 -9217
  35. package/dist/fab.js +299 -258
  36. package/dist/fab.js.map +1 -1
  37. package/dist/fab.min.js +6 -6
  38. package/dist/fab.min.js.map +1 -1
  39. package/dist/form-field.js +10 -6
  40. package/dist/form-field.js.map +1 -1
  41. package/dist/form-field.min.js +4 -4
  42. package/dist/form-field.min.js.map +1 -1
  43. package/dist/html-custom-data.json +152 -152
  44. package/dist/icon-button.js +288 -232
  45. package/dist/icon-button.js.map +1 -1
  46. package/dist/icon-button.min.js +5 -5
  47. package/dist/icon-button.min.js.map +1 -1
  48. package/dist/list.js +18 -3
  49. package/dist/list.js.map +1 -1
  50. package/dist/list.min.js +8 -8
  51. package/dist/list.min.js.map +1 -1
  52. package/dist/menu.js +23 -12
  53. package/dist/menu.js.map +1 -1
  54. package/dist/menu.min.js +7 -7
  55. package/dist/menu.min.js.map +1 -1
  56. package/dist/nav-bar.js +1 -1
  57. package/dist/nav-bar.js.map +1 -1
  58. package/dist/nav-bar.min.js +1 -1
  59. package/dist/nav-bar.min.js.map +1 -1
  60. package/dist/nav-rail.js +1 -1
  61. package/dist/nav-rail.js.map +1 -1
  62. package/dist/nav-rail.min.js +4 -4
  63. package/dist/nav-rail.min.js.map +1 -1
  64. package/dist/option.js +1 -1
  65. package/dist/option.js.map +1 -1
  66. package/dist/option.min.js +1 -1
  67. package/dist/option.min.js.map +1 -1
  68. package/dist/radio-group.js +4 -0
  69. package/dist/radio-group.js.map +1 -1
  70. package/dist/radio-group.min.js +1 -1
  71. package/dist/radio-group.min.js.map +1 -1
  72. package/dist/slider.js +2 -2
  73. package/dist/slider.js.map +1 -1
  74. package/dist/slider.min.js +3 -3
  75. package/dist/slider.min.js.map +1 -1
  76. package/dist/snackbar.js.map +1 -1
  77. package/dist/snackbar.min.js.map +1 -1
  78. package/dist/split-button.js +1 -0
  79. package/dist/split-button.js.map +1 -1
  80. package/dist/split-button.min.js +1 -1
  81. package/dist/split-button.min.js.map +1 -1
  82. package/dist/src/bottom-sheet/BottomSheetElement.d.ts.map +1 -1
  83. package/dist/src/button/ButtonElement.d.ts +70 -0
  84. package/dist/src/button/ButtonElement.d.ts.map +1 -1
  85. package/dist/src/button/styles/ButtonSizeToken.d.ts.map +1 -1
  86. package/dist/src/button/styles/ButtonVariantToken.d.ts.map +1 -1
  87. package/dist/src/card/styles/CardVariantToken.d.ts.map +1 -1
  88. package/dist/src/checkbox/CheckboxElement.d.ts.map +1 -1
  89. package/dist/src/core/a11y/AriaDescriber.d.ts +3 -1
  90. package/dist/src/core/a11y/AriaDescriber.d.ts.map +1 -1
  91. package/dist/src/core/a11y/InteractivityChecker.d.ts +3 -1
  92. package/dist/src/core/a11y/InteractivityChecker.d.ts.map +1 -1
  93. package/dist/src/core/a11y/LiveAnnouncer.d.ts +3 -1
  94. package/dist/src/core/a11y/LiveAnnouncer.d.ts.map +1 -1
  95. package/dist/src/core/bidi/Directionality.d.ts +3 -1
  96. package/dist/src/core/bidi/Directionality.d.ts.map +1 -1
  97. package/dist/src/core/layout/BreakpointObserver.d.ts +3 -1
  98. package/dist/src/core/layout/BreakpointObserver.d.ts.map +1 -1
  99. package/dist/src/core/platform/Platform.d.ts +3 -1
  100. package/dist/src/core/platform/Platform.d.ts.map +1 -1
  101. package/dist/src/core/shared/controllers/PressedController.d.ts.map +1 -1
  102. package/dist/src/core/shared/primitives/FocusRingElement.d.ts +2 -0
  103. package/dist/src/core/shared/primitives/FocusRingElement.d.ts.map +1 -1
  104. package/dist/src/core/shared/primitives/FocusRingToken.d.ts +4 -0
  105. package/dist/src/core/shared/primitives/FocusRingToken.d.ts.map +1 -1
  106. package/dist/src/core/shared/primitives/ScrollContainerElement.d.ts.map +1 -1
  107. package/dist/src/fab/FabElement.d.ts +41 -0
  108. package/dist/src/fab/FabElement.d.ts.map +1 -1
  109. package/dist/src/fab/styles/FabSizeToken.d.ts.map +1 -1
  110. package/dist/src/fab/styles/FabVariantToken.d.ts.map +1 -1
  111. package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
  112. package/dist/src/icon-button/IconButtonElement.d.ts +56 -0
  113. package/dist/src/icon-button/IconButtonElement.d.ts.map +1 -1
  114. package/dist/src/icon-button/styles/IconButtonSizeToken.d.ts.map +1 -1
  115. package/dist/src/icon-button/styles/IconButtonVariantToken.d.ts.map +1 -1
  116. package/dist/src/list/ListItemButtonElement.d.ts +1 -0
  117. package/dist/src/list/ListItemButtonElement.d.ts.map +1 -1
  118. package/dist/src/list/ListItemElement.d.ts.map +1 -1
  119. package/dist/src/list/ListOptionElement.d.ts +1 -0
  120. package/dist/src/list/ListOptionElement.d.ts.map +1 -1
  121. package/dist/src/menu/MenuElement.d.ts +2 -0
  122. package/dist/src/menu/MenuElement.d.ts.map +1 -1
  123. package/dist/src/menu/MenuItemElementBase.d.ts +1 -0
  124. package/dist/src/menu/MenuItemElementBase.d.ts.map +1 -1
  125. package/dist/src/nav-rail/NavRailElement.d.ts.map +1 -1
  126. package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
  127. package/dist/src/radio-group/RadioElement.d.ts.map +1 -1
  128. package/dist/src/slider/SliderThumbElement.d.ts.map +1 -1
  129. package/dist/src/snackbar/Snackbar.d.ts +3 -1
  130. package/dist/src/snackbar/Snackbar.d.ts.map +1 -1
  131. package/dist/src/split-button/SplitButtonElement.d.ts.map +1 -1
  132. package/dist/src/switch/SwitchElement.d.ts.map +1 -1
  133. package/dist/src/tabs/TabElement.d.ts.map +1 -1
  134. package/dist/src/tabs/TabsElement.d.ts.map +1 -1
  135. package/dist/switch.js +5 -1
  136. package/dist/switch.js.map +1 -1
  137. package/dist/switch.min.js +2 -2
  138. package/dist/switch.min.js.map +1 -1
  139. package/dist/tabs.js +2 -2
  140. package/dist/tabs.js.map +1 -1
  141. package/dist/tabs.min.js +3 -3
  142. package/dist/tabs.min.js.map +1 -1
  143. package/dist/tooltip.js +1 -1
  144. package/dist/tooltip.js.map +1 -1
  145. package/dist/tooltip.min.js +1 -1
  146. package/dist/tooltip.min.js.map +1 -1
  147. package/package.json +1 -1
@@ -4,7 +4,7 @@
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import { LitElement, nothing, html, css, unsafeCSS } from 'lit';
7
- import { AttachInternals, MutationController, ResizeController, FocusController, HoverController, PressedController, isReadOnlyMixin, DesignToken, hasAssignedNodes, interceptProperty, getTextContent } from '@m3e/web/core';
7
+ import { AttachInternals, MutationController, ResizeController, FocusController, PressedController, HoverController, isReadOnlyMixin, DesignToken, hasAssignedNodes, interceptProperty, getTextContent } from '@m3e/web/core';
8
8
  import { M3eAriaDescriber } from '@m3e/web/core/a11y';
9
9
 
10
10
  /**
@@ -501,7 +501,7 @@ function e(e, r) {
501
501
  * Copyright (c) 2025 Google LLC
502
502
  * See LICENSE file in the project root for full license text.
503
503
  */
504
- var _M3eFormFieldElement_instances, _M3eFormFieldElement_control, _M3eFormFieldElement_removeValueInterceptor, _M3eFormFieldElement_formResetHandler, _M3eFormFieldElement_controlInvalidHandler, _M3eFormFieldElement_controlMutationController, _M3eFormFieldElement_resizeController, _M3eFormFieldElement_focusController, _M3eFormFieldElement_hintMutationController, _M3eFormFieldElement_errorMutationController, _M3eFormFieldElement_focused, _M3eFormFieldElement_hintText, _M3eFormFieldElement_errorText, _M3eFormFieldElement_shouldFloatLabel_get, _M3eFormFieldElement_stopPropagation, _M3eFormFieldElement_handleLabelSlotChange, _M3eFormFieldElement_handlePrefixSlotChange, _M3eFormFieldElement_handleSuffixSlotChange, _M3eFormFieldElement_handlePrefixResize, _M3eFormFieldElement_handleSlotChange, _M3eFormFieldElement_handleContainerClick, _M3eFormFieldElement_handleControlInvalid, _M3eFormFieldElement_handleControlChange, _M3eFormFieldElement_handleFormReset, _M3eFormFieldElement_changeControl, _M3eFormFieldElement_bindValueInterceptor, _M3eFormFieldElement_handleHintChange, _M3eFormFieldElement_handleErrorChange;
504
+ var _M3eFormFieldElement_instances, _M3eFormFieldElement_control, _M3eFormFieldElement_removeValueInterceptor, _M3eFormFieldElement_formResetHandler, _M3eFormFieldElement_controlInvalidHandler, _M3eFormFieldElement_controlMutationController, _M3eFormFieldElement_resizeController, _M3eFormFieldElement_focusController, _M3eFormFieldElement_hintMutationController, _M3eFormFieldElement_errorMutationController, _M3eFormFieldElement_pressedController, _M3eFormFieldElement_focused, _M3eFormFieldElement_hintText, _M3eFormFieldElement_errorText, _M3eFormFieldElement_shouldFloatLabel_get, _M3eFormFieldElement_stopPropagation, _M3eFormFieldElement_handleLabelSlotChange, _M3eFormFieldElement_handlePrefixSlotChange, _M3eFormFieldElement_handleSuffixSlotChange, _M3eFormFieldElement_handlePrefixResize, _M3eFormFieldElement_handleSlotChange, _M3eFormFieldElement_handleContainerClick, _M3eFormFieldElement_handleControlInvalid, _M3eFormFieldElement_handleControlChange, _M3eFormFieldElement_handleFormReset, _M3eFormFieldElement_changeControl, _M3eFormFieldElement_bindValueInterceptor, _M3eFormFieldElement_handleHintChange, _M3eFormFieldElement_handleErrorChange;
505
505
  /**
506
506
  * A container for form controls that applies Material Design styling and behavior.
507
507
  *
@@ -632,6 +632,11 @@ let M3eFormFieldElement = class M3eFormFieldElement extends AttachInternals(LitE
632
632
  callback: () => __classPrivateFieldGet(this, _M3eFormFieldElement_instances, "m", _M3eFormFieldElement_handleErrorChange).call(this)
633
633
  }));
634
634
  /** @private */
635
+ _M3eFormFieldElement_pressedController.set(this, new PressedController(this, {
636
+ target: null,
637
+ callback: pressed => this.classList.toggle("-pressed", pressed && !(__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.disabled ?? true))
638
+ }));
639
+ /** @private */
635
640
  _M3eFormFieldElement_focused.set(this, false);
636
641
  /** @private */
637
642
  this._pseudoLabel = "";
@@ -668,9 +673,6 @@ let M3eFormFieldElement = class M3eFormFieldElement extends AttachInternals(LitE
668
673
  new HoverController(this, {
669
674
  callback: () => this.classList.toggle("-no-animate", false)
670
675
  });
671
- new PressedController(this, {
672
- callback: pressed => this.classList.toggle("-pressed", pressed && !(__classPrivateFieldGet(this, _M3eFormFieldElement_control, "f")?.disabled ?? true))
673
- });
674
676
  }
675
677
  /** A reference to the element used to anchor dropdown menus. */
676
678
  get menuAnchor() {
@@ -716,6 +718,7 @@ let M3eFormFieldElement = class M3eFormFieldElement extends AttachInternals(LitE
716
718
  firstUpdated(_changedProperties) {
717
719
  super.firstUpdated(_changedProperties);
718
720
  __classPrivateFieldGet(this, _M3eFormFieldElement_focusController, "f").observe(this._base);
721
+ __classPrivateFieldGet(this, _M3eFormFieldElement_pressedController, "f").observe(this._base);
719
722
  __classPrivateFieldGet(this, _M3eFormFieldElement_hintMutationController, "f").observe(this._hint);
720
723
  __classPrivateFieldGet(this, _M3eFormFieldElement_instances, "m", _M3eFormFieldElement_handleHintChange).call(this);
721
724
  __classPrivateFieldGet(this, _M3eFormFieldElement_errorMutationController, "f").observe(this._error);
@@ -749,6 +752,7 @@ _M3eFormFieldElement_resizeController = new WeakMap();
749
752
  _M3eFormFieldElement_focusController = new WeakMap();
750
753
  _M3eFormFieldElement_hintMutationController = new WeakMap();
751
754
  _M3eFormFieldElement_errorMutationController = new WeakMap();
755
+ _M3eFormFieldElement_pressedController = new WeakMap();
752
756
  _M3eFormFieldElement_focused = new WeakMap();
753
757
  _M3eFormFieldElement_hintText = new WeakMap();
754
758
  _M3eFormFieldElement_errorText = new WeakMap();
@@ -888,7 +892,7 @@ M3eFormFieldElement.styles = css`:host { display: inline-flex; flex-direction: c
888
892
  font-size ${DesignToken.motion.duration.short4},
889
893
  line-height ${DesignToken.motion.duration.short4}`)}; } :host(.-with-select) .label { margin-inline-end: 1.5rem; } ::slotted([slot="label"]) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .subscript { display: inline-flex; width: 100%; margin-top: 0.25rem; font-size: var(--m3e-form-field-subscript-font-size, ${DesignToken.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-subscript-font-weight, ${DesignToken.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-subscript-line-height, ${DesignToken.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-subscript-tracking, ${DesignToken.typescale.standard.body.small.tracking}); min-height: var(--m3e-form-field-subscript-line-height, ${DesignToken.typescale.standard.body.small.lineHeight}); color: var(--m3e-form-field-subscript-color, ${DesignToken.color.onSurfaceVariant}); } .error, .hint { flex: 1 1 auto; } :host([hide-subscript="always"]) .subscript { display: none; } :host([hide-subscript="auto"]:not(.-invalid)) .subscript { opacity: 0; margin-top: 0px; margin-bottom: 0.25rem; transition: ${unsafeCSS(`opacity ${DesignToken.motion.duration.short4},
890
894
  margin-top ${DesignToken.motion.duration.short4},
891
- margin-bottom ${DesignToken.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(.-invalid):focus-within) .subscript, :host([hide-subscript="auto"]:not(.-invalid).-pressed) .subscript { opacity: 1; margin-top: 0.25rem; margin-bottom: 0; } :host(.-invalid) .hint { display: none; } :host(:not(.-invalid)) .error { display: none; } ::slotted(input), ::slotted(textarea), ::slotted(select) { outline: unset; border: unset; background-color: transparent; box-shadow: none; font-family: inherit; font-size: inherit; line-height: initial; letter-spacing: inherit; color: var(--_form-field-input-color, inherit); flex: 1 1 auto; min-width: 0; padding: unset; } ::slotted(textarea) { scrollbar-width: ${DesignToken.scrollbar.thinWidth}; scrollbar-color: ${DesignToken.scrollbar.color}; } ::slotted(m3e-select), ::slotted(m3e-input-chip-set) { flex: 1 1 auto; min-width: 0; } :host([float-label="auto"]:not(.-float-label):not(.-pressed)) .label { font-size: inherit; } :host([float-label="auto"]:not(.-float-label).-with-label) .prefix-text, :host([float-label="auto"]:not(.-float-label).-with-label) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(.-with-prefix) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(.-with-suffix) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(.-with-suffix.-with-select) .suffix { margin-inline-start: unset; } :host(.-with-select) .suffix-text { display: none; } :host([variant="outlined"]) .label { margin-top: calc(0px - var(--_form-field-label-line-height) / 2); } :host([variant="outlined"]) .outline { position: absolute; display: flex; pointer-events: none; left: 0; top: 0; bottom: 0; right: 0; } :host([variant="outlined"]) .pseudo-label { visibility: hidden; margin-inline-end: 0.25rem; font-size: var(--_form-field-label-font-size); line-height: var(--_form-field-label-line-height); letter-spacing: var(--_form-field-label-tracking); max-width: 100%; transition-property: max-width, margin-inline-end; transition-duration: 1ms; } :host([variant="outlined"][float-label="auto"]:not(.-float-label):not(.-pressed)) .pseudo-label { max-width: 0; margin-inline-end: 0px; transition-delay: ${DesignToken.motion.duration.short2}; } :host([variant="outlined"]) .outline-start, :host([variant="outlined"]) .outline-notch, :host([variant="outlined"]) .outline-end { box-sizing: border-box; border-width: var(--_form-field-outline-size, 0.0625rem); border-color: var(--_form-field-outline-color); transition: border-color ${DesignToken.motion.duration.short4}; } :host([variant="outlined"]:not(.-with-label)) .outline-notch { display: none; } :host([variant="outlined"]) .outline-start { min-width: 0.75rem; border-top-style: solid; border-inline-start-style: solid; border-bottom-style: solid; border-start-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); } :host([variant="outlined"]) .outline-notch { border-bottom-style: solid; } :host([variant="outlined"]) .outline-end { flex-grow: 1; min-width: 1rem; border-top-style: solid; border-inline-end-style: solid; border-bottom-style: solid; border-start-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); } :host([variant="outlined"].-with-prefix) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(.-disabled)) .base:hover .outline, :host([variant="outlined"]:not(.-disabled):focus-within) .outline, :host([variant="outlined"]:not(.-disabled).-pressed) .outline { --_form-field-outline-size: 0.125rem; } :host([variant="outlined"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="outlined"]) .content { min-height: calc(3.5rem + ${DesignToken.density.calc(-2)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize} ); } :host([variant="outlined"][float-label="auto"]:not(.-float-label):not(.-pressed)) .label { margin-top: unset; line-height: calc(3.5rem + ${DesignToken.density.calc(-2)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize} ); } :host([variant="filled"]) .base { --_select-arrow-margin-top: calc( 0px - calc(1rem / max(calc(0 - calc(var(--md-sys-density-scale, 0) + var(--md-sys-density-scale, 0))), 1)) ); } :host([variant="filled"]) .base::before { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; border-bottom-style: solid; border-width: 0.0625rem; border-radius: var(--m3e-form-field-container-shape, ${DesignToken.shape.corner.extraSmallTop}); border-color: var(--_form-field-outline-color); background-color: var(--_form-field-container-color); } :host([variant="filled"]:not(.-disabled)) .base:hover::before, :host([variant="filled"]:not(.-disabled):focus-within) .base::before, :host([variant="filled"]:not(.-disabled).-pressed) .base::before { border-width: 0.1875rem; } :host([variant="filled"]) .base::after { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--_form-field-hover-container-color); transition: background-color ${DesignToken.motion.duration.short4}; } :host([variant="filled"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="filled"]) .content { padding-top: calc(1.5rem + ${DesignToken.density.calc(-2)}); margin-bottom: 0.5rem; } :host([variant="filled"]) .label { top: calc(0.5rem + ${DesignToken.density.calc(-2)}); } :host([variant="filled"][float-label="auto"]:not(.-float-label):not(.-pressed)) .label { top: 0px; line-height: calc(3.5rem + ${DesignToken.density.calc(-2)} - 0.0625rem); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize} ); } :host(:not(.-disabled):not(:focus-within):not(.-pressed)) .base:hover { --_form-field-hover-container-color: color-mix( in srgb, var(--m3e-form-field-hover-container-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-hover-container-opacity, 8%), transparent ); } :host(:not(.-disabled):not(.-invalid)) { color: var(--m3e-form-field-color, ${DesignToken.color.onSurface}); } :host([variant="outlined"]:not(.-disabled):not(.-invalid)) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.outline}); } :host([variant="filled"]:not(.-disabled):not(.-invalid)) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.onSurfaceVariant}); } :host([variant="outlined"]:not(.-disabled):not(.-invalid):focus-within) .base, :host([variant="outlined"]:not(.-disabled):not(.-invalid).-pressed) .base, :host([variant="filled"]:not(.-disabled):not(.-invalid):focus-within) .base, :host([variant="filled"]:not(.-disabled):not(.-invalid).-pressed) .base { --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${DesignToken.color.primary}); --_form-field-label-color: var(--m3e-form-field-focused-color, ${DesignToken.color.primary}); } :host(:not(.-disabled)) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${DesignToken.color.surfaceContainerHighest} ); } :host(:not(.-disabled).-invalid) .base { --_form-field-label-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error}); --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error}); } :host(:not(.-disabled).-invalid) .subscript { color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error}); } :host(.-disabled) { color: color-mix( in srgb, var(--m3e-form-field-disabled-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%), transparent ); } :host(.-disabled) .base { --_form-field-container-color: color-mix( in srgb, var(--m3e-form-field-disabled-container-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-disabled-container-opacity, 4%), transparent ); } :host(.-no-animate) *, :host(.-no-animate) *::before, :host(.-no-animate) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(.-disabled) { --_form-field-input-color: GrayText; --_form-field-color: GrayText; --_form-field-label-color: GrayText; --_form-field-outline-color: GrayText; } } @media (prefers-reduced-motion) { .base::before, .prefix-text, .suffix-text, .label, .subscript, .outline-start, .outline-notch, .outline-end, .pseudo-label { transition: none !important; } }`;
895
+ margin-bottom ${DesignToken.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(.-invalid):focus-within) .subscript, :host([hide-subscript="auto"]:not(.-invalid).-pressed) .subscript { opacity: 1; margin-top: 0.25rem; margin-bottom: 0; } :host(.-invalid) .hint { display: none; } :host(:not(.-invalid)) .error { display: none; } ::slotted(input), ::slotted(textarea), ::slotted(select) { outline: unset; border: unset; background-color: transparent; box-shadow: none; font-family: inherit; font-size: inherit; line-height: initial; letter-spacing: inherit; color: var(--_form-field-input-color, inherit); flex: 1 1 auto; min-width: 0; padding: unset; } ::slotted(textarea) { scrollbar-width: ${DesignToken.scrollbar.thinWidth}; scrollbar-color: ${DesignToken.scrollbar.color}; } ::slotted(m3e-select), ::slotted(m3e-input-chip-set) { flex: 1 1 auto; min-width: 0; } :host([float-label="auto"]:not(.-float-label):not(.-pressed)) .label { font-size: inherit; } :host([float-label="auto"]:not(.-float-label).-with-label) .prefix-text, :host([float-label="auto"]:not(.-float-label).-with-label) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(.-with-prefix) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(.-with-suffix) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(.-with-suffix.-with-select) .suffix { margin-inline-start: unset; } :host(.-with-select) .suffix-text { display: none; } :host([variant="outlined"]) .label { margin-top: calc(0px - var(--_form-field-label-line-height) / 2); } :host([variant="outlined"]) .outline { position: absolute; display: flex; pointer-events: none; left: 0; top: 0; bottom: 0; right: 0; } :host([variant="outlined"]) .pseudo-label { visibility: hidden; margin-inline-end: 0.5rem; font-size: var(--_form-field-label-font-size); line-height: var(--_form-field-label-line-height); letter-spacing: var(--_form-field-label-tracking); max-width: 100%; transition-property: max-width, margin-inline-end; transition-duration: 1ms; } :host([variant="outlined"].-required:not([hide-required-marker])) .pseudo-label { margin-inline-end: 0.25rem; } :host([variant="outlined"][float-label="auto"]:not(.-float-label):not(.-pressed)) .pseudo-label { max-width: 0; margin-inline-end: 0px; transition-delay: ${DesignToken.motion.duration.short2}; } :host([variant="outlined"]) .outline-start, :host([variant="outlined"]) .outline-notch, :host([variant="outlined"]) .outline-end { box-sizing: border-box; border-width: var(--_form-field-outline-size, 1px); border-color: var(--_form-field-outline-color); transition: border-color ${DesignToken.motion.duration.short4}; } :host([variant="outlined"]:not(.-with-label)) .outline-notch { display: none; } :host([variant="outlined"]) .outline-start { min-width: 0.75rem; border-top-style: solid; border-inline-start-style: solid; border-bottom-style: solid; border-start-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); } :host([variant="outlined"]) .outline-notch { border-bottom-style: solid; } :host([variant="outlined"]) .outline-end { flex-grow: 1; min-width: 1rem; border-top-style: solid; border-inline-end-style: solid; border-bottom-style: solid; border-start-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall}); } :host([variant="outlined"].-with-prefix) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(.-disabled)) .base:hover .outline, :host([variant="outlined"]:not(.-disabled):focus-within) .outline, :host([variant="outlined"]:not(.-disabled).-pressed) .outline { --_form-field-outline-size: 2px; } :host([variant="outlined"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="outlined"]) .content { min-height: calc(3.5rem + ${DesignToken.density.calc(-2)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize} ); } :host([variant="outlined"][float-label="auto"]:not(.-float-label):not(.-pressed)) .label { margin-top: unset; line-height: calc(3.5rem + ${DesignToken.density.calc(-2)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize} ); } :host([variant="filled"]) .base { --_select-arrow-margin-top: calc( 0px - calc(1rem / max(calc(0 - calc(var(--md-sys-density-scale, 0) + var(--md-sys-density-scale, 0))), 1)) ); } :host([variant="filled"]) .base::before { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; border-bottom-style: solid; border-width: 1px; border-radius: var(--m3e-form-field-container-shape, ${DesignToken.shape.corner.extraSmallTop}); border-color: var(--_form-field-outline-color); background-color: var(--_form-field-container-color); } :host([variant="filled"]:not(.-disabled)) .base:hover::before, :host([variant="filled"]:not(.-disabled):focus-within) .base::before, :host([variant="filled"]:not(.-disabled).-pressed) .base::before { border-width: 3px; } :host([variant="filled"]) .base::after { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--_form-field-hover-container-color); transition: background-color ${DesignToken.motion.duration.short4}; } :host([variant="filled"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="filled"]) .content { padding-top: calc(1.5rem + ${DesignToken.density.calc(-2)}); margin-bottom: 0.5rem; } :host([variant="filled"]) .label { top: calc(0.5rem + ${DesignToken.density.calc(-2)}); } :host([variant="filled"][float-label="auto"]:not(.-float-label):not(.-pressed)) .label { top: 0px; line-height: calc(3.5rem + ${DesignToken.density.calc(-2)} - 0.0625rem); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize} ); } :host(:not(.-disabled):not(:focus-within):not(.-pressed)) .base:hover { --_form-field-hover-container-color: color-mix( in srgb, var(--m3e-form-field-hover-container-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-hover-container-opacity, 8%), transparent ); } :host(:not(.-disabled):not(.-invalid)) { color: var(--m3e-form-field-color, ${DesignToken.color.onSurface}); } :host([variant="outlined"]:not(.-disabled):not(.-invalid)) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.outline}); } :host([variant="filled"]:not(.-disabled):not(.-invalid)) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.onSurfaceVariant}); } :host([variant="outlined"]:not(.-disabled):not(.-invalid):focus-within) .base, :host([variant="outlined"]:not(.-disabled):not(.-invalid).-pressed) .base, :host([variant="filled"]:not(.-disabled):not(.-invalid):focus-within) .base, :host([variant="filled"]:not(.-disabled):not(.-invalid).-pressed) .base { --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${DesignToken.color.primary}); --_form-field-label-color: var(--m3e-form-field-focused-color, ${DesignToken.color.primary}); } :host(:not(.-disabled)) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${DesignToken.color.surfaceContainerHighest} ); } :host(:not(.-disabled).-invalid) .base { --_form-field-label-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error}); --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error}); } :host(:not(.-disabled).-invalid) .subscript { color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error}); } :host(.-disabled) { color: color-mix( in srgb, var(--m3e-form-field-disabled-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%), transparent ); } :host(.-disabled) .base { --_form-field-container-color: color-mix( in srgb, var(--m3e-form-field-disabled-container-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-disabled-container-opacity, 4%), transparent ); } :host(.-no-animate) *, :host(.-no-animate) *::before, :host(.-no-animate) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(.-disabled) { --_form-field-input-color: GrayText; --_form-field-color: GrayText; --_form-field-label-color: GrayText; --_form-field-outline-color: GrayText; } } @media (prefers-reduced-motion) { .base::before, .prefix-text, .suffix-text, .label, .subscript, .outline-start, .outline-notch, .outline-end, .pseudo-label { transition: none !important; } }`;
892
896
  __decorate([e(".base")], M3eFormFieldElement.prototype, "_base", void 0);
893
897
  __decorate([e(".prefix")], M3eFormFieldElement.prototype, "_prefix", void 0);
894
898
  __decorate([e(".error")], M3eFormFieldElement.prototype, "_error", void 0);