@m3e/web 2.5.11 → 2.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/all.js +20532 -16074
  2. package/dist/all.js.map +1 -1
  3. package/dist/all.min.js +174 -62
  4. package/dist/all.min.js.map +1 -1
  5. package/dist/autocomplete.js +23 -5
  6. package/dist/autocomplete.js.map +1 -1
  7. package/dist/autocomplete.min.js +1 -1
  8. package/dist/autocomplete.min.js.map +1 -1
  9. package/dist/breadcrumb.js +1 -1
  10. package/dist/breadcrumb.js.map +1 -1
  11. package/dist/breadcrumb.min.js +1 -1
  12. package/dist/breadcrumb.min.js.map +1 -1
  13. package/dist/calendar.js +45 -9
  14. package/dist/calendar.js.map +1 -1
  15. package/dist/calendar.min.js +5 -5
  16. package/dist/calendar.min.js.map +1 -1
  17. package/dist/core-anchoring.js +19 -16
  18. package/dist/core-anchoring.js.map +1 -1
  19. package/dist/core-anchoring.min.js +1 -1
  20. package/dist/core-anchoring.min.js.map +1 -1
  21. package/dist/core.js +122 -105
  22. package/dist/core.js.map +1 -1
  23. package/dist/core.min.js +1 -1
  24. package/dist/core.min.js.map +1 -1
  25. package/dist/css-custom-data.json +50 -50
  26. package/dist/custom-elements.json +1626 -968
  27. package/dist/datepicker.js +53 -27
  28. package/dist/datepicker.js.map +1 -1
  29. package/dist/datepicker.min.js +1 -1
  30. package/dist/datepicker.min.js.map +1 -1
  31. package/dist/fab-menu.js +115 -113
  32. package/dist/fab-menu.js.map +1 -1
  33. package/dist/fab-menu.min.js +1 -1
  34. package/dist/fab-menu.min.js.map +1 -1
  35. package/dist/fab.js +1 -1
  36. package/dist/fab.js.map +1 -1
  37. package/dist/fab.min.js +1 -1
  38. package/dist/fab.min.js.map +1 -1
  39. package/dist/form-field.js +10 -7
  40. package/dist/form-field.js.map +1 -1
  41. package/dist/form-field.min.js +2 -2
  42. package/dist/form-field.min.js.map +1 -1
  43. package/dist/html-custom-data.json +29 -14
  44. package/dist/icon.js +1 -1
  45. package/dist/icon.js.map +1 -1
  46. package/dist/icon.min.js +1 -1
  47. package/dist/icon.min.js.map +1 -1
  48. package/dist/menu.js +26 -19
  49. package/dist/menu.js.map +1 -1
  50. package/dist/menu.min.js +1 -1
  51. package/dist/menu.min.js.map +1 -1
  52. package/dist/option.js +12 -2
  53. package/dist/option.js.map +1 -1
  54. package/dist/option.min.js +1 -1
  55. package/dist/option.min.js.map +1 -1
  56. package/dist/select.js +18 -2
  57. package/dist/select.js.map +1 -1
  58. package/dist/select.min.js +1 -1
  59. package/dist/select.min.js.map +1 -1
  60. package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
  61. package/dist/src/calendar/CalendarElement.d.ts +2 -0
  62. package/dist/src/calendar/CalendarElement.d.ts.map +1 -1
  63. package/dist/src/calendar/CalendarViewElementBase.d.ts +2 -0
  64. package/dist/src/calendar/CalendarViewElementBase.d.ts.map +1 -1
  65. package/dist/src/calendar/MonthViewElement.d.ts +1 -0
  66. package/dist/src/calendar/MonthViewElement.d.ts.map +1 -1
  67. package/dist/src/calendar/MultiYearViewElement.d.ts.map +1 -1
  68. package/dist/src/calendar/YearViewElement.d.ts.map +1 -1
  69. package/dist/src/core/anchoring/FloatingPanelElement.d.ts.map +1 -1
  70. package/dist/src/core/shared/controllers/ClickOutsideController.d.ts +24 -0
  71. package/dist/src/core/shared/controllers/ClickOutsideController.d.ts.map +1 -0
  72. package/dist/src/core/shared/controllers/FocusController.d.ts +5 -11
  73. package/dist/src/core/shared/controllers/FocusController.d.ts.map +1 -1
  74. package/dist/src/core/shared/controllers/HoverController.d.ts +2 -8
  75. package/dist/src/core/shared/controllers/HoverController.d.ts.map +1 -1
  76. package/dist/src/core/shared/controllers/IntersectionController.d.ts +2 -8
  77. package/dist/src/core/shared/controllers/IntersectionController.d.ts.map +1 -1
  78. package/dist/src/core/shared/controllers/LongPressController.d.ts +2 -8
  79. package/dist/src/core/shared/controllers/LongPressController.d.ts.map +1 -1
  80. package/dist/src/core/shared/controllers/MonitorControllerBase.d.ts +4 -0
  81. package/dist/src/core/shared/controllers/MonitorControllerBase.d.ts.map +1 -1
  82. package/dist/src/core/shared/controllers/PressedController.d.ts +6 -8
  83. package/dist/src/core/shared/controllers/PressedController.d.ts.map +1 -1
  84. package/dist/src/core/shared/controllers/ResizeController.d.ts +2 -8
  85. package/dist/src/core/shared/controllers/ResizeController.d.ts.map +1 -1
  86. package/dist/src/core/shared/controllers/index.d.ts +1 -0
  87. package/dist/src/core/shared/controllers/index.d.ts.map +1 -1
  88. package/dist/src/core/shared/mixins/LinkButton.d.ts.map +1 -1
  89. package/dist/src/core/shared/tokens/DesignToken.d.ts +3 -0
  90. package/dist/src/core/shared/tokens/DesignToken.d.ts.map +1 -1
  91. package/dist/src/core/shared/tokens/MeasurementToken.d.ts +13 -7
  92. package/dist/src/core/shared/tokens/MeasurementToken.d.ts.map +1 -1
  93. package/dist/src/datepicker/DatepickerElement.d.ts +1 -2
  94. package/dist/src/datepicker/DatepickerElement.d.ts.map +1 -1
  95. package/dist/src/fab-menu/FabMenuElement.d.ts.map +1 -1
  96. package/dist/src/form-field/FormFieldElement.d.ts +1 -0
  97. package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
  98. package/dist/src/menu/MenuElement.d.ts.map +1 -1
  99. package/dist/src/option/OptionElement.d.ts.map +1 -1
  100. package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
  101. package/dist/src/select/SelectElement.d.ts.map +1 -1
  102. package/dist/src/theme/ThemeElement.d.ts.map +1 -1
  103. package/dist/src/tooltip/RichTooltipElement.d.ts +0 -2
  104. package/dist/src/tooltip/RichTooltipElement.d.ts.map +1 -1
  105. package/dist/theme.js +10 -7
  106. package/dist/theme.js.map +1 -1
  107. package/dist/theme.min.js +6 -6
  108. package/dist/theme.min.js.map +1 -1
  109. package/dist/tooltip.js +24 -25
  110. package/dist/tooltip.js.map +1 -1
  111. package/dist/tooltip.min.js +1 -1
  112. package/dist/tooltip.min.js.map +1 -1
  113. package/package.json +1 -1
@@ -11,7 +11,7 @@ import{__classPrivateFieldGet as t,__classPrivateFieldSet as e,__decorate as i}f
11
11
  * @license MIT
12
12
  * Copyright (c) 2025 Google LLC
13
13
  * See LICENSE file in the project root for full license text.
14
- */const M=["m3e-input-chip-set","m3e-select"];function L(t){return t instanceof HTMLElement&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||M.includes(t.tagName.toLowerCase()))}function W(t){for(const e of t.assignedElements({flatten:!0})){if(L(e))return e;const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;t.nextNode();)if(L(t.currentNode))return t.currentNode}return null}
14
+ */const M=["m3e-input-chip-set","m3e-select"];function q(t){return t instanceof HTMLElement&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||M.includes(t.tagName.toLowerCase()))}function L(t){for(const e of t.assignedElements({flatten:!0})){if(q(e))return e;const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;t.nextNode();)if(q(t.currentNode))return t.currentNode}return null}
15
15
  /**
16
16
  * Adapted from Angular Material Form Field
17
17
  * Source: https://github.com/angular/components/blob/main/src/material/form-field/form-field.ts
@@ -19,5 +19,5 @@ import{__classPrivateFieldGet as t,__classPrivateFieldSet as e,__decorate as i}f
19
19
  * @license MIT
20
20
  * Copyright (c) 2025 Google LLC
21
21
  * See LICENSE file in the project root for full license text.
22
- */var E,q,T,H,N,P,D,A,R,U,V,F,G,I,O,Y,j,B,X,J,K,Q,Z,tt,et,it,st,at,ot,lt;let rt=class extends(h(c(s))){constructor(){super(),E.add(this),q.set(this,null),T.set(this,void 0),H.set(this,()=>t(this,E,"m",it).call(this)),N.set(this,()=>t(this,E,"m",tt).call(this)),P.set(this,new m(this,{target:null,config:{attributeFilter:["disabled","readonly","required"]},callback:()=>this.notifyControlStateChange()})),D.set(this,new b(this,{target:null,callback:()=>t(this,E,"m",K).call(this)})),A.set(this,new p(this,{target:null,callback:i=>{i=i&&!(t(this,q,"f")?.disabled??1),u(this,"--no-animate",!1),e(this,F,i,"f"),i?u(this,"--float-label",!0):(this._invalid=!(t(this,q,"f")?.checkValidity?.()??1),this.notifyControlStateChange())}})),R.set(this,new m(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,E,"m",ot).call(this)})),U.set(this,new m(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,E,"m",lt).call(this)})),V.set(this,new v(this,{target:null,callback:e=>u(this,"--pressed",e&&!(t(this,q,"f")?.disabled??1))})),F.set(this,!1),this._pseudoLabel="",this._required=!1,this._invalid=!1,this._validationMessage="",G.set(this,""),I.set(this,""),this.variant="outlined",this.hideRequiredMarker=!1,this.hideSubscript="auto",this.floatLabel="auto",new g(this,{callback:()=>u(this,"--no-animate",!1)})}get menuAnchor(){return this._base}get control(){return t(this,q,"f")}notifyControlStateChange(e=!1){this._required=!0===t(this,q,"f")?.required,u(this,"--required",this._required),u(this,"--disabled",!0===t(this,q,"f")?.disabled),u(this,"--readonly",y(t(this,q,"f"))&&!0===t(this,q,"f").readOnly),"auto"===this.floatLabel&&u(this,"--float-label",t(this,E,"a",O)||t(this,F,"f")),e&&(this._invalid=!(t(this,q,"f")?.checkValidity?.()??1)),u(this,"--invalid",this._invalid),this._validationMessage=t(this,q,"f")?.validationMessage??"",this.isUpdatePending||this.performUpdate()}connectedCallback(){super.connectedCallback(),u(this,"--no-animate",!0)}disconnectedCallback(){super.disconnectedCallback(),t(this,E,"m",st).call(this,null)}reconnectedCallback(){super.reconnectedCallback(),t(this,E,"m",Y).call(this)}firstUpdated(e){super.firstUpdated(e),t(this,E,"m",Y).call(this)}update(e){super.update(e),e.has("_invalid")&&t(this,q,"f")&&(t(this,q,"f").ariaInvalid=this._invalid?"true":null,t(this,I,"f")&&(this._invalid?S.describe(t(this,q,"f"),t(this,I,"f")):S.removeDescription(t(this,q,"f"),t(this,I,"f"))))}render(){return o`<div class="base" @click="${t(this,E,"m",Z)}">${"outlined"===this.variant?o`<div class="outline" aria-hidden="true"><div class="outline-start"></div><div class="outline-notch"><div class="pseudo-label">${this._pseudoLabel} ${!this.hideRequiredMarker&&this._required?o`&nbsp;*`:a}</div></div><div class="outline-end"></div></div>`:a}<div class="prefix"><slot name="prefix" @slotchange="${t(this,E,"m",X)}"></slot></div><div class="content"><span class="prefix-text"><slot name="prefix-text"></slot></span><span class="input"><slot @slotchange="${t(this,E,"m",Q)}" @change="${t(this,E,"m",et)}"></slot></span><span class="suffix-text"><slot name="suffix-text"></slot></span><span class="label"><slot name="label" @slotchange="${t(this,E,"m",B)}"></slot>${!this.hideRequiredMarker&&this._required?o`<span class="required-marker" aria-hidden="true">&nbsp;*</span>`:a}</span></div><div class="suffix" @click="${t(this,E,"m",j)}" @focusin="${t(this,E,"m",j)}" @focusout="${t(this,E,"m",j)}" @pointerdown="${t(this,E,"m",j)}" @keydown="${t(this,E,"m",j)}" @keyup="${t(this,E,"m",j)}"><slot name="suffix" @slotchange="${t(this,E,"m",J)}"></slot></div></div><span class="subscript" aria-hidden="true"><span class="error"><slot name="error">${this._validationMessage}</slot></span><span class="hint"><slot name="hint"></slot></span></span>`}};q=new WeakMap,T=new WeakMap,H=new WeakMap,N=new WeakMap,P=new WeakMap,D=new WeakMap,A=new WeakMap,R=new WeakMap,U=new WeakMap,V=new WeakMap,F=new WeakMap,G=new WeakMap,I=new WeakMap,E=new WeakSet,O=function(){return void 0!==t(this,q,"f")?.shouldLabelFloat?!0===t(this,q,"f").shouldLabelFloat:"string"==typeof t(this,q,"f")?.value&&t(this,q,"f").value.length>0},Y=function(){t(this,A,"f").observe(this._base),t(this,V,"f").observe(this._base),t(this,R,"f").observe(this._hint),t(this,E,"m",ot).call(this),t(this,U,"f").observe(this._error),t(this,E,"m",lt).call(this)},j=function(t){t.stopImmediatePropagation(),t.stopPropagation()},B=function(t){const e=t.target.assignedElements({flatten:!0});u(this,"--with-label",e.length>0),this._pseudoLabel=e[0]?.textContent??""},X=function(e){u(this,"--with-prefix",x(e.target)),t(this,D,"f").observe(this._prefix)},J=function(t){u(this,"--with-suffix",x(t.target))},K=function(){"outlined"===this.variant&&this._base.style.setProperty("--_prefix-width",`${this._prefix.clientWidth}px`)},Q=function(e){t(this,E,"m",st).call(this,W(e.target))},Z=function(e){!t(this,q,"f")||t(this,F,"f")||t(this,q,"f").disabled||(t(this,q,"f").onContainerClick?t(this,q,"f").onContainerClick(e):t(this,q,"f").focus())},tt=function(){this._invalid=!0,this.notifyControlStateChange()},et=function(){this._invalid=!(t(this,q,"f")?.checkValidity?.()??1),this.notifyControlStateChange()},it=function(){this._invalid=!1,setTimeout(()=>this.notifyControlStateChange())},st=function(i){if(t(this,q,"f")!==i&&(t(this,q,"f")&&(t(this,G,"f")&&S.removeDescription(t(this,q,"f"),t(this,G,"f")),t(this,I,"f")&&S.removeDescription(t(this,q,"f"),t(this,I,"f")),t(this,P,"f").unobserve(t(this,q,"f")),t(this,q,"f").removeEventListener("invalid",t(this,N,"f")),t(this,q,"f").form?.removeEventListener("reset",t(this,H,"f")),t(this,T,"f")?.call(this),e(this,T,void 0,"f")),e(this,q,i,"f"),["INPUT","TEXTAREA"].includes(t(this,q,"f")?.tagName??"")?this._base.style.setProperty("--_form-field-cursor","text"):this._base.style.removeProperty("--_form-field-cursor"),u(this,"--with-select","M3E-SELECT"===t(this,q,"f")?.tagName),w(this,"--with-select")&&this._base.style.setProperty("--_form-field-cursor","pointer"),t(this,q,"f"))){t(this,P,"f").observe(t(this,q,"f")),t(this,q,"f").addEventListener("invalid",t(this,N,"f")),t(this,q,"f").form?.addEventListener("reset",t(this,H,"f")),t(this,q,"f").removeAttribute("aria-invalid"),t(this,G,"f")&&S.describe(t(this,q,"f"),t(this,G,"f")),this.notifyControlStateChange();const e=t(this,q,"f").tagName.toLowerCase();e.startsWith("m3e-")&&!customElements.get(e)?customElements.whenDefined(e).then(()=>t(this,E,"m",at).call(this)):t(this,E,"m",at).call(this)}},at=function(){t(this,q,"f")&&e(this,T,_(t(this,q,"f"),"value",{set:(t,e)=>{e(t),this.notifyControlStateChange(!0)}}),"f")},ot=function(){const i=$(this._hint,!0);i!==t(this,G,"f")&&(t(this,q,"f")&&t(this,G,"f")&&S.removeDescription(t(this,q,"f"),t(this,G,"f")),e(this,G,i,"f"),t(this,q,"f")&&t(this,G,"f")&&S.describe(t(this,q,"f"),t(this,G,"f")))},lt=function(){const i=$(this._error,!0);i!==t(this,I,"f")&&(t(this,q,"f")&&t(this,I,"f")&&S.removeDescription(t(this,q,"f"),t(this,I,"f")),e(this,I,i,"f"),t(this,q,"f")&&t(this,I,"f")&&this._invalid&&S.describe(t(this,q,"f"),t(this,I,"f")))},k(l`m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { user-select: none; color: currentColor; transition: opacity ${z.motion.duration.extraLong1}; } m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) input::placeholder, m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) textarea::placeholder { opacity: 0; transition: opacity 0s; } m3e-form-field[variant="outlined"] m3e-input-chip-set { margin-block: calc(calc(3.5rem + ${z.density.calc(-3)}) / 4); } @media (prefers-reduced-motion) { m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { transition: none !important; } }`),rt.styles=l`:host { display: inline-flex; flex-direction: column; vertical-align: middle; font-size: var(--m3e-form-field-font-size, ${z.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-form-field-font-weight, ${z.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-form-field-line-height, ${z.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-form-field-tracking, ${z.typescale.standard.body.large.tracking}); width: var(--m3e-form-field-width, 14.5rem); color: var(--_form-field-color); } :host(:not(:is(:state(--disabled), :--disabled))) .base { cursor: var(--_form-field-cursor); } .base { display: flex; align-items: center; position: relative; min-height: calc(3.5rem + ${z.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize} ); --_form-field-label-line-height: var( --m3e-form-field-label-line-height, ${z.typescale.standard.body.small.lineHeight} ); } .content { display: flex; align-items: center; position: relative; flex: 1 1 auto; min-width: 0; min-height: var(--m3e-form-field-icon-size, 1.5rem); } .prefix, .suffix { display: flex; align-items: center; position: relative; user-select: none; flex: none; font-size: var(--m3e-form-field-icon-size, 1.5rem); } .prefix-text, .suffix-text { opacity: 1; transition: opacity ${z.motion.duration.extraLong1}; user-select: none; flex: none; } .input { display: inline-flex; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; } .label { display: flex; position: absolute; pointer-events: none; user-select: none; top: 0; left: 0; right: 0; font-size: var(--m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-label-font-weight, ${z.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-label-line-height, ${z.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-label-tracking, ${z.typescale.standard.body.small.tracking}); color: var(--_form-field-label-color, inherit); transition: ${r(`top ${z.motion.duration.short4}, \n font-size ${z.motion.duration.short4}, \n line-height ${z.motion.duration.short4}`)}; } :host(:is(:state(--with-select), :--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, ${z.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-subscript-font-weight, ${z.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-subscript-line-height, ${z.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-subscript-tracking, ${z.typescale.standard.body.small.tracking}); min-height: var(--m3e-form-field-subscript-line-height, ${z.typescale.standard.body.small.lineHeight}); color: var(--m3e-form-field-subscript-color, ${z.color.onSurfaceVariant}); } .error, .hint { flex: 1 1 auto; } :host([hide-subscript="always"]) .subscript { display: none; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid))) .subscript { opacity: 0; margin-top: 0.25rem; transform: translateY(-0.25rem); transition: ${r(`opacity ${z.motion.duration.short4}, \n transform ${z.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):focus-within) .subscript, :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):is(:state(--pressed), :--pressed)) .subscript { opacity: 1; transform: translateY(0); } :host(:is(:state(--invalid), :--invalid)) .hint { display: none; } :host(:not(:is(:state(--invalid), :--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: inherit; letter-spacing: inherit; color: var(--_form-field-input-color, inherit); flex: 1 1 auto; min-width: 0; padding: unset; } ::slotted(textarea) { scrollbar-width: ${z.scrollbar.thinWidth}; scrollbar-color: ${z.scrollbar.color}; } ::slotted(m3e-select), ::slotted(m3e-input-chip-set) { flex: 1 1 auto; min-width: 0; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not(:is(:state(--pressed), :--pressed))) .label { font-size: inherit; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .prefix-text, :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(:is(:state(--with-prefix), :--with-prefix)) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(:is(:state(--with-suffix), :--with-suffix)) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(:is(:state(--with-suffix), :--with-suffix):is(:state(--with-select), :--with-select)) .suffix { margin-inline-start: unset; } :host(:is(:state(--with-select), :--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"]:is(:state(--required), :--required):not([hide-required-marker])) .pseudo-label { margin-inline-end: 0.25rem; } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .pseudo-label { max-width: 0; margin-inline-end: 0px; transition-delay: ${z.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 ${z.motion.duration.short4}; } :host([variant="outlined"]:not(:is(:state(--with-label), :--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, ${z.shape.corner.extraSmall}); border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${z.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, ${z.shape.corner.extraSmall}); border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${z.shape.corner.extraSmall}); } :host([variant="outlined"]:is(:state(--with-prefix), :--with-prefix)) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled))) .base:hover .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):focus-within) .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--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 + ${z.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize} ); } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { margin-top: unset; line-height: calc(3.5rem + ${z.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.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, ${z.shape.corner.extraSmallTop}); border-color: var(--_form-field-outline-color); background-color: var(--_form-field-container-color); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled))) .base:hover::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):focus-within) .base::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--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 ${z.motion.duration.short4}; } :host([variant="filled"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="filled"]) .content { padding-top: calc(1.5rem + ${z.density.calc(-3)}); margin-bottom: 0.5rem; } :host([variant="filled"]) .label { top: max(0px, calc(0.5rem + ${z.density.calc(-3)})); } :host( [variant="filled"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { top: 0px; line-height: calc(3.5rem + ${z.density.calc(-3)} - 0.0625rem); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize} ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:focus-within):not(:is(:state(--pressed), :--pressed))) .base:hover { --_form-field-hover-container-color: color-mix( in srgb, var(--m3e-form-field-hover-container-color, ${z.color.onSurface}) var(--m3e-form-field-hover-container-opacity, 8%), transparent ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) { color: var(--m3e-form-field-color, ${z.color.onSurface}); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${z.color.outline}); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${z.color.onSurfaceVariant}); } :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base { --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${z.color.primary}); --_form-field-label-color: var(--m3e-form-field-focused-color, ${z.color.primary}); } :host(:not(:is(:state(--disabled), :--disabled))) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${z.color.surfaceContainerHighest} ); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .base { --_form-field-label-color: var(--m3e-form-field-invalid-color, ${z.color.error}); --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${z.color.error}); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .subscript { color: var(--m3e-form-field-invalid-color, ${z.color.error}); } :host(:is(:state(--disabled), :--disabled)) { color: color-mix( in srgb, var(--m3e-form-field-disabled-color, ${z.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%), transparent ); } :host(:is(:state(--disabled), :--disabled)) .base { --_form-field-container-color: color-mix( in srgb, var(--m3e-form-field-disabled-container-color, ${z.color.onSurface}) var(--m3e-form-field-disabled-container-opacity, 4%), transparent ); } :host(:is(:state(--no-animate), :--no-animate)) *, :host(:is(:state(--no-animate), :--no-animate)) *::before, :host(:is(:state(--no-animate), :--no-animate)) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(:is(:state(--disabled), :--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; } }`,i([n(".base")],rt.prototype,"_base",void 0),i([n(".prefix")],rt.prototype,"_prefix",void 0),i([n(".error")],rt.prototype,"_error",void 0),i([n(".hint")],rt.prototype,"_hint",void 0),i([d()],rt.prototype,"_pseudoLabel",void 0),i([d()],rt.prototype,"_required",void 0),i([d()],rt.prototype,"_invalid",void 0),i([d()],rt.prototype,"_validationMessage",void 0),i([f({reflect:!0})],rt.prototype,"variant",void 0),i([f({attribute:"hide-required-marker",type:Boolean,reflect:!0})],rt.prototype,"hideRequiredMarker",void 0),i([f({attribute:"hide-subscript",reflect:!0})],rt.prototype,"hideSubscript",void 0),i([f({attribute:"float-label",reflect:!0})],rt.prototype,"floatLabel",void 0),rt=i([C("m3e-form-field")],rt);export{rt as M3eFormFieldElement,W as findFormFieldControl,L as isFormFieldControl};
22
+ */var W,E,T,H,N,P,D,A,R,U,V,F,G,I,O,Y,j,B,X,J,K,Q,Z,tt,et,it,st,at,ot,lt;let rt=class extends(h(c(s))){constructor(){super(),W.add(this),E.set(this,null),T.set(this,void 0),H.set(this,()=>t(this,W,"m",et).call(this)),N.set(this,()=>t(this,W,"m",Z).call(this)),P.set(this,new m(this,{target:null,config:{attributeFilter:["disabled","readonly","required"]},callback:()=>this.notifyControlStateChange()})),D.set(this,new b(this,{target:null,callback:()=>t(this,W,"m",J).call(this)})),A.set(this,new p(this,{target:null,filter:e=>t(this,W,"m",it).call(this,e),callback:i=>{i=i&&!(t(this,E,"f")?.disabled??1),u(this,"--no-animate",!1),e(this,F,i,"f"),i?u(this,"--float-label",!0):(this._invalid=!(t(this,E,"f")?.checkValidity?.()??1),this.notifyControlStateChange())}})),R.set(this,new m(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,W,"m",ot).call(this)})),U.set(this,new m(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,W,"m",lt).call(this)})),V.set(this,new v(this,{target:null,filter:e=>t(this,W,"m",it).call(this,e),callback:e=>u(this,"--pressed",e&&!(t(this,E,"f")?.disabled??1))})),F.set(this,!1),this._pseudoLabel="",this._required=!1,this._invalid=!1,this._validationMessage="",G.set(this,""),I.set(this,""),this.variant="outlined",this.hideRequiredMarker=!1,this.hideSubscript="auto",this.floatLabel="auto",new g(this,{callback:()=>u(this,"--no-animate",!1)})}get menuAnchor(){return this._base}get control(){return t(this,E,"f")}notifyControlStateChange(e=!1){this._required=!0===t(this,E,"f")?.required,u(this,"--required",this._required),u(this,"--disabled",!0===t(this,E,"f")?.disabled),u(this,"--readonly",y(t(this,E,"f"))&&!0===t(this,E,"f").readOnly),"auto"===this.floatLabel&&u(this,"--float-label",t(this,W,"a",O)||t(this,F,"f")),e&&(this._invalid=!(t(this,E,"f")?.checkValidity?.()??1)),u(this,"--invalid",this._invalid),this._validationMessage=t(this,E,"f")?.validationMessage??"",this.isUpdatePending||this.performUpdate()}connectedCallback(){super.connectedCallback(),u(this,"--no-animate",!0)}disconnectedCallback(){super.disconnectedCallback(),t(this,W,"m",st).call(this,null)}reconnectedCallback(){super.reconnectedCallback(),t(this,W,"m",Y).call(this)}firstUpdated(e){super.firstUpdated(e),t(this,W,"m",Y).call(this)}update(e){super.update(e),e.has("_invalid")&&t(this,E,"f")&&(t(this,E,"f").ariaInvalid=this._invalid?"true":null,t(this,I,"f")&&(this._invalid?S.describe(t(this,E,"f"),t(this,I,"f")):S.removeDescription(t(this,E,"f"),t(this,I,"f"))))}render(){return o`<div class="base" @click="${t(this,W,"m",Q)}">${"outlined"===this.variant?o`<div class="outline" aria-hidden="true"><div class="outline-start"></div><div class="outline-notch"><div class="pseudo-label">${this._pseudoLabel} ${!this.hideRequiredMarker&&this._required?o`&nbsp;*`:a}</div></div><div class="outline-end"></div></div>`:a}<div class="prefix"><slot name="prefix" @slotchange="${t(this,W,"m",B)}"></slot></div><div class="content"><span class="prefix-text"><slot name="prefix-text"></slot></span><span class="input"><slot @slotchange="${t(this,W,"m",K)}" @change="${t(this,W,"m",tt)}"></slot></span><span class="suffix-text"><slot name="suffix-text"></slot></span><span class="label"><slot name="label" @slotchange="${t(this,W,"m",j)}"></slot>${!this.hideRequiredMarker&&this._required?o`<span class="required-marker" aria-hidden="true">&nbsp;*</span>`:a}</span></div><div class="suffix"><slot name="suffix" @slotchange="${t(this,W,"m",X)}"></slot></div></div><span class="subscript" aria-hidden="true"><span class="error"><slot name="error">${this._validationMessage}</slot></span><span class="hint"><slot name="hint"></slot></span></span>`}};E=new WeakMap,T=new WeakMap,H=new WeakMap,N=new WeakMap,P=new WeakMap,D=new WeakMap,A=new WeakMap,R=new WeakMap,U=new WeakMap,V=new WeakMap,F=new WeakMap,G=new WeakMap,I=new WeakMap,W=new WeakSet,O=function(){return void 0!==t(this,E,"f")?.shouldLabelFloat?!0===t(this,E,"f").shouldLabelFloat:"string"==typeof t(this,E,"f")?.value&&t(this,E,"f").value.length>0},Y=function(){t(this,A,"f").observe(this._base),t(this,V,"f").observe(this._base),t(this,R,"f").observe(this._hint),t(this,W,"m",ot).call(this),t(this,U,"f").observe(this._error),t(this,W,"m",lt).call(this)},j=function(t){const e=t.target.assignedElements({flatten:!0});u(this,"--with-label",e.length>0),this._pseudoLabel=e[0]?.textContent??""},B=function(e){u(this,"--with-prefix",x(e.target)),t(this,D,"f").observe(this._prefix)},X=function(t){u(this,"--with-suffix",x(t.target))},J=function(){"outlined"===this.variant&&this._base.style.setProperty("--_prefix-width",`${this._prefix.clientWidth}px`)},K=function(e){t(this,W,"m",st).call(this,L(e.target))},Q=function(e){t(this,W,"m",it).call(this,e)||!t(this,E,"f")||t(this,F,"f")||t(this,E,"f").disabled||(t(this,E,"f").onContainerClick?t(this,E,"f").onContainerClick(e):t(this,E,"f").focus())},Z=function(){this._invalid=!0,this.notifyControlStateChange()},tt=function(){this._invalid=!(t(this,E,"f")?.checkValidity?.()??1),this.notifyControlStateChange()},et=function(){this._invalid=!1,setTimeout(()=>this.notifyControlStateChange())},it=function(t){return t.composed&&t.composedPath().includes(this._suffix)},st=function(i){if(t(this,E,"f")!==i&&(t(this,E,"f")&&(t(this,G,"f")&&S.removeDescription(t(this,E,"f"),t(this,G,"f")),t(this,I,"f")&&S.removeDescription(t(this,E,"f"),t(this,I,"f")),t(this,P,"f").unobserve(t(this,E,"f")),t(this,E,"f").removeEventListener("invalid",t(this,N,"f")),t(this,E,"f").form?.removeEventListener("reset",t(this,H,"f")),t(this,T,"f")?.call(this),e(this,T,void 0,"f")),e(this,E,i,"f"),["INPUT","TEXTAREA"].includes(t(this,E,"f")?.tagName??"")?this._base.style.setProperty("--_form-field-cursor","text"):this._base.style.removeProperty("--_form-field-cursor"),u(this,"--with-select","M3E-SELECT"===t(this,E,"f")?.tagName),w(this,"--with-select")&&this._base.style.setProperty("--_form-field-cursor","pointer"),t(this,E,"f"))){t(this,P,"f").observe(t(this,E,"f")),t(this,E,"f").addEventListener("invalid",t(this,N,"f")),t(this,E,"f").form?.addEventListener("reset",t(this,H,"f")),t(this,E,"f").removeAttribute("aria-invalid"),t(this,G,"f")&&S.describe(t(this,E,"f"),t(this,G,"f")),this.notifyControlStateChange();const e=t(this,E,"f").tagName.toLowerCase();e.startsWith("m3e-")&&!customElements.get(e)?customElements.whenDefined(e).then(()=>t(this,W,"m",at).call(this)):t(this,W,"m",at).call(this)}},at=function(){t(this,E,"f")&&e(this,T,_(t(this,E,"f"),"value",{set:(t,e)=>{e(t),this.notifyControlStateChange(!0)}}),"f")},ot=function(){const i=$(this._hint,!0);i!==t(this,G,"f")&&(t(this,E,"f")&&t(this,G,"f")&&S.removeDescription(t(this,E,"f"),t(this,G,"f")),e(this,G,i,"f"),t(this,E,"f")&&t(this,G,"f")&&S.describe(t(this,E,"f"),t(this,G,"f")))},lt=function(){const i=$(this._error,!0);i!==t(this,I,"f")&&(t(this,E,"f")&&t(this,I,"f")&&S.removeDescription(t(this,E,"f"),t(this,I,"f")),e(this,I,i,"f"),t(this,E,"f")&&t(this,I,"f")&&this._invalid&&S.describe(t(this,E,"f"),t(this,I,"f")))},k(l`m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { user-select: none; color: currentColor; transition: opacity ${z.motion.duration.extraLong1}; } m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) input::placeholder, m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) textarea::placeholder { opacity: 0; transition: opacity 0s; } m3e-form-field[variant="outlined"] m3e-input-chip-set { margin-block: calc(calc(3.5rem + ${z.density.calc(-3)}) / 4); } @media (prefers-reduced-motion) { m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { transition: none !important; } }`),rt.styles=l`:host { display: inline-flex; flex-direction: column; vertical-align: middle; font-size: var(--m3e-form-field-font-size, ${z.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-form-field-font-weight, ${z.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-form-field-line-height, ${z.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-form-field-tracking, ${z.typescale.standard.body.large.tracking}); width: var(--m3e-form-field-width, 14.5rem); color: var(--_form-field-color); } :host(:not(:is(:state(--disabled), :--disabled))) .base { cursor: var(--_form-field-cursor); } .base { display: flex; align-items: center; position: relative; min-height: calc(3.5rem + ${z.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize} ); --_form-field-label-line-height: var( --m3e-form-field-label-line-height, ${z.typescale.standard.body.small.lineHeight} ); } .content { display: flex; align-items: center; position: relative; flex: 1 1 auto; min-width: 0; min-height: var(--m3e-form-field-icon-size, 1.5rem); } .prefix, .suffix { display: flex; align-items: center; position: relative; user-select: none; flex: none; font-size: var(--m3e-form-field-icon-size, 1.5rem); } .prefix-text, .suffix-text { opacity: 1; transition: opacity ${z.motion.duration.extraLong1}; user-select: none; flex: none; } .input { display: inline-flex; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; } .label { display: flex; position: absolute; pointer-events: none; user-select: none; top: 0; left: 0; right: 0; font-size: var(--m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-label-font-weight, ${z.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-label-line-height, ${z.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-label-tracking, ${z.typescale.standard.body.small.tracking}); color: var(--_form-field-label-color, inherit); transition: ${r(`top ${z.motion.duration.short4}, \n font-size ${z.motion.duration.short4}, \n line-height ${z.motion.duration.short4}`)}; } :host(:is(:state(--with-select), :--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, ${z.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-subscript-font-weight, ${z.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-subscript-line-height, ${z.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-subscript-tracking, ${z.typescale.standard.body.small.tracking}); min-height: var(--m3e-form-field-subscript-line-height, ${z.typescale.standard.body.small.lineHeight}); color: var(--m3e-form-field-subscript-color, ${z.color.onSurfaceVariant}); } .error, .hint { flex: 1 1 auto; } :host([hide-subscript="always"]) .subscript { display: none; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid))) .subscript { opacity: 0; margin-top: 0.25rem; transform: translateY(-0.25rem); transition: ${r(`opacity ${z.motion.duration.short4}, \n transform ${z.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):focus-within) .subscript, :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):is(:state(--pressed), :--pressed)) .subscript { opacity: 1; transform: translateY(0); } :host(:is(:state(--invalid), :--invalid)) .hint { display: none; } :host(:not(:is(:state(--invalid), :--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: inherit; letter-spacing: inherit; color: var(--_form-field-input-color, inherit); flex: 1 1 auto; min-width: 0; padding: unset; } ::slotted(textarea) { scrollbar-width: ${z.scrollbar.thinWidth}; scrollbar-color: ${z.scrollbar.color}; } ::slotted(m3e-select), ::slotted(m3e-input-chip-set) { flex: 1 1 auto; min-width: 0; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not(:is(:state(--pressed), :--pressed))) .label { font-size: inherit; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .prefix-text, :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(:is(:state(--with-prefix), :--with-prefix)) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(:is(:state(--with-suffix), :--with-suffix)) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(:is(:state(--with-suffix), :--with-suffix):is(:state(--with-select), :--with-select)) .suffix { margin-inline-start: unset; } :host(:is(:state(--with-select), :--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( :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label)) ) .pseudo-label, :host( :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label)) ) .required-marker { display: none; } :host([variant="outlined"]:is(:state(--required), :--required):not([hide-required-marker])) .pseudo-label { margin-inline-end: 0.25rem; } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .pseudo-label { max-width: 0; margin-inline-end: 0px; transition-delay: ${z.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 ${z.motion.duration.short4}; } :host([variant="outlined"]:not(:is(:state(--with-label), :--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, ${z.shape.corner.extraSmall}); border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${z.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, ${z.shape.corner.extraSmall}); border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${z.shape.corner.extraSmall}); } :host([variant="outlined"]:is(:state(--with-prefix), :--with-prefix)) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled))) .base:hover .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):focus-within) .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--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 + ${z.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize} ); } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { margin-top: unset; line-height: calc(3.5rem + ${z.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.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, ${z.shape.corner.extraSmallTop}); border-color: var(--_form-field-outline-color); background-color: var(--_form-field-container-color); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled))) .base:hover::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):focus-within) .base::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--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 ${z.motion.duration.short4}; } :host([variant="filled"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="filled"]) .content { padding-top: calc(1.5rem + ${z.density.calc(-3)}); margin-bottom: 0.5rem; } :host([variant="filled"]) .label { top: max(0px, calc(0.5rem + ${z.density.calc(-3)})); } :host( [variant="filled"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { top: 0px; line-height: calc(3.5rem + ${z.density.calc(-3)} - 0.0625rem); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${z.typescale.standard.body.small.fontSize} ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:focus-within):not(:is(:state(--pressed), :--pressed))) .base:hover { --_form-field-hover-container-color: color-mix( in srgb, var(--m3e-form-field-hover-container-color, ${z.color.onSurface}) var(--m3e-form-field-hover-container-opacity, 8%), transparent ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) { color: var(--m3e-form-field-color, ${z.color.onSurface}); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${z.color.outline}); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${z.color.onSurfaceVariant}); } :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base { --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${z.color.primary}); --_form-field-label-color: var(--m3e-form-field-focused-color, ${z.color.primary}); } :host(:not(:is(:state(--disabled), :--disabled))) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${z.color.surfaceContainerHighest} ); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .base { --_form-field-label-color: var(--m3e-form-field-invalid-color, ${z.color.error}); --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${z.color.error}); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .subscript { color: var(--m3e-form-field-invalid-color, ${z.color.error}); } :host(:is(:state(--disabled), :--disabled)) { color: color-mix( in srgb, var(--m3e-form-field-disabled-color, ${z.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%), transparent ); } :host(:is(:state(--disabled), :--disabled)) .base { --_form-field-container-color: color-mix( in srgb, var(--m3e-form-field-disabled-container-color, ${z.color.onSurface}) var(--m3e-form-field-disabled-container-opacity, 4%), transparent ); } :host(:is(:state(--no-animate), :--no-animate)) *, :host(:is(:state(--no-animate), :--no-animate)) *::before, :host(:is(:state(--no-animate), :--no-animate)) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(:is(:state(--disabled), :--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; } }`,i([n(".base")],rt.prototype,"_base",void 0),i([n(".prefix")],rt.prototype,"_prefix",void 0),i([n(".suffix")],rt.prototype,"_suffix",void 0),i([n(".error")],rt.prototype,"_error",void 0),i([n(".hint")],rt.prototype,"_hint",void 0),i([d()],rt.prototype,"_pseudoLabel",void 0),i([d()],rt.prototype,"_required",void 0),i([d()],rt.prototype,"_invalid",void 0),i([d()],rt.prototype,"_validationMessage",void 0),i([f({reflect:!0})],rt.prototype,"variant",void 0),i([f({attribute:"hide-required-marker",type:Boolean,reflect:!0})],rt.prototype,"hideRequiredMarker",void 0),i([f({attribute:"hide-subscript",reflect:!0})],rt.prototype,"hideSubscript",void 0),i([f({attribute:"float-label",reflect:!0})],rt.prototype,"floatLabel",void 0),rt=i([C("m3e-form-field")],rt);export{rt as M3eFormFieldElement,L as findFormFieldControl,q as isFormFieldControl};
23
23
  //# sourceMappingURL=form-field.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.min.js","sources":["../../src/form-field/FormFieldControl.ts","../../src/form-field/FormFieldElement.ts"],"sourcesContent":["/**\r\n * Adapted from Angular Material Form Field Control\r\n * Source: https://github.com/angular/components/blob/main/src/material/form-field/form-field-control.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\n/** An interface which allows a control to work inside of a `M3eFormField`. */\r\nexport interface FormFieldControl extends HTMLElement {\r\n /** A value indicating whether the control is disabled. */\r\n disabled: boolean;\r\n\r\n /** The value of the control. */\r\n value?: unknown;\r\n\r\n /** A value indicating whether the control is required. */\r\n required?: boolean;\r\n\r\n /** A value indicated whether the content of the control is read-only. */\r\n readonly?: boolean;\r\n\r\n /** A value indicating whether the form field's label should try to float. */\r\n readonly shouldLabelFloat?: boolean;\r\n\r\n /** The error message that would be displayed if the user submits the form, or an empty string if no error message. */\r\n readonly validationMessage?: string;\r\n\r\n /** The `HTMLFormElement` associated with this element. */\r\n readonly form?: HTMLFormElement | null;\r\n\r\n /**\r\n * Handles the click event on the control's container.\r\n * @param {MouseEvent} event The `MouseEvent`.\r\n */\r\n onContainerClick?: (event: MouseEvent) => void;\r\n\r\n /**\r\n * Returns `true` if the element has no validity problems; otherwise,\r\n * returns `false`, fires an invalid event.\r\n */\r\n checkValidity?: () => boolean;\r\n}\r\n\r\nconst KNOWN_FORM_FIELD_TAGS = [\"m3e-input-chip-set\", \"m3e-select\"];\r\n\r\n/**\r\n * Determines whether a value is a `FormFieldControl`.\r\n * @param {unknown} value The value to test.\r\n * @returns {value is FormFieldControl} A value indicating whether `value` is a `FormFieldControl`.\r\n */\r\nexport function isFormFieldControl(value: unknown): value is FormFieldControl {\r\n return (\r\n value instanceof HTMLElement &&\r\n (value instanceof HTMLInputElement ||\r\n value instanceof HTMLTextAreaElement ||\r\n value instanceof HTMLSelectElement ||\r\n KNOWN_FORM_FIELD_TAGS.includes(value.tagName.toLowerCase()))\r\n );\r\n}\r\n\r\n/**\r\n * Locates the first `FormFieldControl` in a given slot.\r\n * @param {HTMLSlotElement} slot The slot in which to locate a `FormFieldControl`.\r\n * @returns {FormFieldControl | null} The `FormFieldControl` located in `slot`.\r\n */\r\nexport function findFormFieldControl(slot: HTMLSlotElement): FormFieldControl | null {\r\n for (const element of slot.assignedElements({ flatten: true })) {\r\n if (isFormFieldControl(element)) {\r\n return element;\r\n }\r\n\r\n const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT);\r\n while (walker.nextNode()) {\r\n if (isFormFieldControl(walker.currentNode)) {\r\n return walker.currentNode;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","/**\r\n * Adapted from Angular Material Form Field\r\n * Source: https://github.com/angular/components/blob/main/src/material/form-field/form-field.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\nimport { css, CSSResultGroup, html, LitElement, nothing, PropertyValues, unsafeCSS } from \"lit\";\r\nimport { property, query, state } from \"lit/decorators.js\";\r\n\r\nimport {\r\n AttachInternals,\r\n customElement,\r\n DesignToken,\r\n FocusController,\r\n getTextContent,\r\n hasAssignedNodes,\r\n hasCustomState,\r\n HoverController,\r\n interceptProperty,\r\n isReadOnlyMixin,\r\n MutationController,\r\n PressedController,\r\n ReconnectedCallback,\r\n registerStyleSheet,\r\n ResizeController,\r\n setCustomState,\r\n} from \"@m3e/web/core\";\r\n\r\nimport { M3eAriaDescriber } from \"@m3e/web/core/a11y\";\r\n\r\nimport { findFormFieldControl, FormFieldControl } from \"./FormFieldControl\";\r\nimport { FormFieldVariant } from \"./FormFieldVariant\";\r\nimport { HideSubscriptType } from \"./HideSubscriptType\";\r\nimport { FloatLabelType } from \"./FloatLabelType\";\r\n\r\n/**\r\n * A container for form controls that applies Material Design styling and behavior.\r\n *\r\n * @description\r\n * The `m3e-form-field` component is a semantic, expressive container for form controls that anchors\r\n * label behavior, subscript messaging, and variant-specific layout. Designed according to Material Design 3\r\n * guidelines, it supports two visual variants—`outlined` and `filled`—each with dynamic elevation,\r\n * shape transitions, and adaptive color theming. The component responds to control state changes\r\n * (focus, hover, press, disabled, invalid) with smooth motion and semantic clarity, ensuring\r\n * visual hierarchy and emotional resonance.\r\n\r\n * The component is accessible by default, with ARIA annotations, contrast-safe color tokens,\r\n * and dynamic descriptions for hint and error messaging. It supports prefix and suffix content,\r\n * floating labels, and adaptive subscript visibility. When hosting a control with validation,\r\n * error messages are surfaced with `aria-invalid` and described for assistive technology.\r\n\r\n * Native form controls may not expose full state or messaging on their own. `m3e-form-field` bridges\r\n * these gaps by coordinating label floating, container styling, and subscript feedback.\r\n *\r\n * @example\r\n * The following example illustrates a basic usage of the `m3e-form-field`.\r\n * ```html\r\n * <m3e-form-field>\r\n * <label slot=\"label\" for=\"field\">Text field</label>\r\n * <input id=\"field\" />\r\n * </m3e-form-field>\r\n * ```\r\n * \r\n * @tag m3e-form-field\r\n *\r\n * @slot - Renders the control of the field.\r\n * @slot prefix - Renders content before the fields's control.\r\n * @slot prefix-text - Renders text before the fields's control.\r\n * @slot suffix - Renders content after the fields's control.\r\n * @slot suffix-text - Renders text after the fields's control.\r\n * @slot hint - Renders hint text in the fields's subscript, when the control is valid.\r\n * @slot error - Renders error text in the fields's subscript, when the control is invalid.\r\n *\r\n * @attr float-label - Specifies whether the label should float always or only when necessary.\r\n * @attr hide-required-marker - Whether the required marker should be hidden.\r\n * @attr hide-subscript - Whether subscript content is hidden.\r\n * @attr variant - The appearance variant of the field.\r\n *\r\n * @cssprop --m3e-form-field-font-size - Font size for the form field container text.\r\n * @cssprop --m3e-form-field-font-weight - Font weight for the form field container text.\r\n * @cssprop --m3e-form-field-line-height - Line height for the form field container text.\r\n * @cssprop --m3e-form-field-tracking - Letter spacing for the form field container text.\r\n * @cssprop --m3e-form-field-label-font-size - Font size for the floating label.\r\n * @cssprop --m3e-form-field-label-font-weight - Font weight for the floating label.\r\n * @cssprop --m3e-form-field-label-line-height - Line height for the floating label.\r\n * @cssprop --m3e-form-field-label-tracking - Letter spacing for the floating label.\r\n * @cssprop --m3e-form-field-subscript-font-size - Font size for hint and error text.\r\n * @cssprop --m3e-form-field-subscript-font-weight - Font weight for hint and error text.\r\n * @cssprop --m3e-form-field-subscript-line-height - Line height for hint and error text.\r\n * @cssprop --m3e-form-field-subscript-tracking - Letter spacing for hint and error text.\r\n * @cssprop --m3e-form-field-color - Text color for the form field container.\r\n * @cssprop --m3e-form-field-subscript-color - Color for hint and error text.\r\n * @cssprop --m3e-form-field-invalid-color - Color used when the control is invalid.\r\n * @cssprop --m3e-form-field-focused-outline-color - Outline color when focused.\r\n * @cssprop --m3e-form-field-focused-color - Label color when focused.\r\n * @cssprop --m3e-form-field-outline-color - Outline color in outlined variant.\r\n * @cssprop --m3e-form-field-container-color - Background color in filled variant.\r\n * @cssprop --m3e-form-field-hover-container-color - Hover background color in filled variant.\r\n * @cssprop --m3e-form-field-width - Width of the form field container.\r\n * @cssprop --m3e-form-field-icon-size - Size of prefix and suffix icons.\r\n * @cssprop --m3e-outlined-form-field-container-shape - Corner radius for outlined container.\r\n * @cssprop --m3e-form-field-container-shape - Corner radius for filled container.\r\n * @cssprop --m3e-form-field-hover-container-opacity - Opacity for hover background in filled variant.\r\n * @cssprop --m3e-form-field-disabled-opacity - Opacity for disabled text.\r\n * @cssprop --m3e-form-field-disabled-container-opacity - Opacity for disabled container background.\r\n */\r\n@customElement(\"m3e-form-field\")\r\nexport class M3eFormFieldElement extends ReconnectedCallback(AttachInternals(LitElement)) {\r\n static {\r\n registerStyleSheet(css`\r\n m3e-form-field input::placeholder,\r\n m3e-form-field textarea::placeholder {\r\n user-select: none;\r\n color: currentColor;\r\n transition: opacity ${DesignToken.motion.duration.extraLong1};\r\n }\r\n m3e-form-field[float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(\r\n :state(--with-label),\r\n :--with-label\r\n )\r\n input::placeholder,\r\n m3e-form-field[float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(\r\n :state(--with-label),\r\n :--with-label\r\n )\r\n textarea::placeholder {\r\n opacity: 0;\r\n transition: opacity 0s;\r\n }\r\n m3e-form-field[variant=\"outlined\"] m3e-input-chip-set {\r\n margin-block: calc(calc(3.5rem + ${DesignToken.density.calc(-3)}) / 4);\r\n }\r\n @media (prefers-reduced-motion) {\r\n m3e-form-field input::placeholder,\r\n m3e-form-field textarea::placeholder {\r\n transition: none !important;\r\n }\r\n }\r\n `);\r\n }\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: inline-flex;\r\n flex-direction: column;\r\n vertical-align: middle;\r\n font-size: var(--m3e-form-field-font-size, ${DesignToken.typescale.standard.body.large.fontSize});\r\n font-weight: var(--m3e-form-field-font-weight, ${DesignToken.typescale.standard.body.large.fontWeight});\r\n line-height: var(--m3e-form-field-line-height, ${DesignToken.typescale.standard.body.large.lineHeight});\r\n letter-spacing: var(--m3e-form-field-tracking, ${DesignToken.typescale.standard.body.large.tracking});\r\n width: var(--m3e-form-field-width, 14.5rem);\r\n color: var(--_form-field-color);\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled))) .base {\r\n cursor: var(--_form-field-cursor);\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n min-height: calc(3.5rem + ${DesignToken.density.calc(-3)});\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n --_form-field-label-line-height: var(\r\n --m3e-form-field-label-line-height,\r\n ${DesignToken.typescale.standard.body.small.lineHeight}\r\n );\r\n }\r\n .content {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n min-height: var(--m3e-form-field-icon-size, 1.5rem);\r\n }\r\n .prefix,\r\n .suffix {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n user-select: none;\r\n flex: none;\r\n font-size: var(--m3e-form-field-icon-size, 1.5rem);\r\n }\r\n .prefix-text,\r\n .suffix-text {\r\n opacity: 1;\r\n transition: opacity ${DesignToken.motion.duration.extraLong1};\r\n user-select: none;\r\n flex: none;\r\n }\r\n .input {\r\n display: inline-flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n }\r\n .label {\r\n display: flex;\r\n position: absolute;\r\n pointer-events: none;\r\n user-select: none;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n font-size: var(--m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize});\r\n font-weight: var(--m3e-form-field-label-font-weight, ${DesignToken.typescale.standard.body.small.fontWeight});\r\n line-height: var(--m3e-form-field-label-line-height, ${DesignToken.typescale.standard.body.small.lineHeight});\r\n letter-spacing: var(--m3e-form-field-label-tracking, ${DesignToken.typescale.standard.body.small.tracking});\r\n color: var(--_form-field-label-color, inherit);\r\n transition: ${unsafeCSS(\r\n `top ${DesignToken.motion.duration.short4}, \r\n font-size ${DesignToken.motion.duration.short4}, \r\n line-height ${DesignToken.motion.duration.short4}`,\r\n )};\r\n }\r\n :host(:is(:state(--with-select), :--with-select)) .label {\r\n margin-inline-end: 1.5rem;\r\n }\r\n ::slotted([slot=\"label\"]) {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n .subscript {\r\n display: inline-flex;\r\n width: 100%;\r\n margin-top: 0.25rem;\r\n font-size: var(--m3e-form-field-subscript-font-size, ${DesignToken.typescale.standard.body.small.fontSize});\r\n font-weight: var(--m3e-form-field-subscript-font-weight, ${DesignToken.typescale.standard.body.small.fontWeight});\r\n line-height: var(--m3e-form-field-subscript-line-height, ${DesignToken.typescale.standard.body.small.lineHeight});\r\n letter-spacing: var(--m3e-form-field-subscript-tracking, ${DesignToken.typescale.standard.body.small.tracking});\r\n min-height: var(--m3e-form-field-subscript-line-height, ${DesignToken.typescale.standard.body.small.lineHeight});\r\n color: var(--m3e-form-field-subscript-color, ${DesignToken.color.onSurfaceVariant});\r\n }\r\n .error,\r\n .hint {\r\n flex: 1 1 auto;\r\n }\r\n :host([hide-subscript=\"always\"]) .subscript {\r\n display: none;\r\n }\r\n :host([hide-subscript=\"auto\"]:not(:is(:state(--invalid), :--invalid))) .subscript {\r\n opacity: 0;\r\n margin-top: 0.25rem;\r\n transform: translateY(-0.25rem);\r\n transition: ${unsafeCSS(\r\n `opacity ${DesignToken.motion.duration.short4}, \r\n transform ${DesignToken.motion.duration.short4}`,\r\n )};\r\n }\r\n :host([hide-subscript=\"auto\"]:not(:is(:state(--invalid), :--invalid)):focus-within) .subscript,\r\n :host([hide-subscript=\"auto\"]:not(:is(:state(--invalid), :--invalid)):is(:state(--pressed), :--pressed))\r\n .subscript {\r\n opacity: 1;\r\n transform: translateY(0);\r\n }\r\n :host(:is(:state(--invalid), :--invalid)) .hint {\r\n display: none;\r\n }\r\n :host(:not(:is(:state(--invalid), :--invalid))) .error {\r\n display: none;\r\n }\r\n ::slotted(input),\r\n ::slotted(textarea),\r\n ::slotted(select) {\r\n outline: unset;\r\n border: unset;\r\n background-color: transparent;\r\n box-shadow: none;\r\n font-family: inherit;\r\n font-size: inherit;\r\n line-height: inherit;\r\n letter-spacing: inherit;\r\n color: var(--_form-field-input-color, inherit);\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n padding: unset;\r\n }\r\n ::slotted(textarea) {\r\n scrollbar-width: ${DesignToken.scrollbar.thinWidth};\r\n scrollbar-color: ${DesignToken.scrollbar.color};\r\n }\r\n ::slotted(m3e-select),\r\n ::slotted(m3e-input-chip-set) {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n }\r\n :host([float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(:is(:state(--pressed), :--pressed)))\r\n .label {\r\n font-size: inherit;\r\n }\r\n\r\n :host([float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label))\r\n .prefix-text,\r\n :host([float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label))\r\n .suffix-text {\r\n opacity: 0;\r\n transition: opacity 0s;\r\n }\r\n .prefix {\r\n margin-inline-start: 1rem;\r\n }\r\n :host(:is(:state(--with-prefix), :--with-prefix)) .prefix {\r\n margin-inline-end: 1rem;\r\n margin-inline-start: 0.75rem;\r\n }\r\n .suffix {\r\n margin-inline-end: 1rem;\r\n }\r\n :host(:is(:state(--with-suffix), :--with-suffix)) .suffix {\r\n margin-inline-start: 0.25rem;\r\n margin-inline-end: 0.5rem;\r\n }\r\n :host(:is(:state(--with-suffix), :--with-suffix):is(:state(--with-select), :--with-select)) .suffix {\r\n margin-inline-start: unset;\r\n }\r\n :host(:is(:state(--with-select), :--with-select)) .suffix-text {\r\n display: none;\r\n }\r\n :host([variant=\"outlined\"]) .label {\r\n margin-top: calc(0px - var(--_form-field-label-line-height) / 2);\r\n }\r\n :host([variant=\"outlined\"]) .outline {\r\n position: absolute;\r\n display: flex;\r\n pointer-events: none;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n }\r\n :host([variant=\"outlined\"]) .pseudo-label {\r\n visibility: hidden;\r\n margin-inline-end: 0.5rem;\r\n font-size: var(--_form-field-label-font-size);\r\n line-height: var(--_form-field-label-line-height);\r\n letter-spacing: var(--_form-field-label-tracking);\r\n max-width: 100%;\r\n transition-property: max-width, margin-inline-end;\r\n transition-duration: 1ms;\r\n }\r\n :host([variant=\"outlined\"]:is(:state(--required), :--required):not([hide-required-marker])) .pseudo-label {\r\n margin-inline-end: 0.25rem;\r\n }\r\n :host(\r\n [variant=\"outlined\"][float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(\r\n :is(:state(--pressed), :--pressed)\r\n )\r\n )\r\n .pseudo-label {\r\n max-width: 0;\r\n margin-inline-end: 0px;\r\n transition-delay: ${DesignToken.motion.duration.short2};\r\n }\r\n :host([variant=\"outlined\"]) .outline-start,\r\n :host([variant=\"outlined\"]) .outline-notch,\r\n :host([variant=\"outlined\"]) .outline-end {\r\n box-sizing: border-box;\r\n border-width: var(--_form-field-outline-size, 1px);\r\n border-color: var(--_form-field-outline-color);\r\n transition: border-color ${DesignToken.motion.duration.short4};\r\n }\r\n :host([variant=\"outlined\"]:not(:is(:state(--with-label), :--with-label))) .outline-notch {\r\n display: none;\r\n }\r\n :host([variant=\"outlined\"]) .outline-start {\r\n min-width: 0.75rem;\r\n border-top-style: solid;\r\n border-inline-start-style: solid;\r\n border-bottom-style: solid;\r\n border-start-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n }\r\n :host([variant=\"outlined\"]) .outline-notch {\r\n border-bottom-style: solid;\r\n }\r\n :host([variant=\"outlined\"]) .outline-end {\r\n flex-grow: 1;\r\n min-width: 1rem;\r\n border-top-style: solid;\r\n border-inline-end-style: solid;\r\n border-bottom-style: solid;\r\n border-start-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n }\r\n :host([variant=\"outlined\"]:is(:state(--with-prefix), :--with-prefix)) .outline-start {\r\n min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem);\r\n }\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled))) .base:hover .outline,\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):focus-within) .outline,\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed)) .outline {\r\n --_form-field-outline-size: 2px;\r\n }\r\n :host([variant=\"outlined\"]) .subscript {\r\n margin-inline: 1rem;\r\n width: calc(100% - 2rem);\r\n }\r\n :host([variant=\"outlined\"]) .content {\r\n min-height: calc(3.5rem + ${DesignToken.density.calc(-3)});\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n }\r\n :host(\r\n [variant=\"outlined\"][float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(\r\n :is(:state(--pressed), :--pressed)\r\n )\r\n )\r\n .label {\r\n margin-top: unset;\r\n line-height: calc(3.5rem + ${DesignToken.density.calc(-3)});\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n }\r\n :host([variant=\"filled\"]) .base {\r\n --_select-arrow-margin-top: calc(\r\n 0px - calc(1rem / max(calc(0 - calc(var(--md-sys-density-scale, 0) + var(--md-sys-density-scale, 0))), 1))\r\n );\r\n }\r\n :host([variant=\"filled\"]) .base::before {\r\n content: \"\";\r\n box-sizing: border-box;\r\n position: absolute;\r\n pointer-events: none;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n border-bottom-style: solid;\r\n border-width: 1px;\r\n border-radius: var(--m3e-form-field-container-shape, ${DesignToken.shape.corner.extraSmallTop});\r\n border-color: var(--_form-field-outline-color);\r\n background-color: var(--_form-field-container-color);\r\n }\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled))) .base:hover::before,\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):focus-within) .base::before,\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed))\r\n .base::before {\r\n border-width: 3px;\r\n }\r\n :host([variant=\"filled\"]) .base::after {\r\n content: \"\";\r\n box-sizing: border-box;\r\n position: absolute;\r\n pointer-events: none;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: var(--_form-field-hover-container-color);\r\n transition: background-color ${DesignToken.motion.duration.short4};\r\n }\r\n :host([variant=\"filled\"]) .subscript {\r\n margin-inline: 1rem;\r\n width: calc(100% - 2rem);\r\n }\r\n :host([variant=\"filled\"]) .content {\r\n padding-top: calc(1.5rem + ${DesignToken.density.calc(-3)});\r\n margin-bottom: 0.5rem;\r\n }\r\n :host([variant=\"filled\"]) .label {\r\n top: max(0px, calc(0.5rem + ${DesignToken.density.calc(-3)}));\r\n }\r\n :host(\r\n [variant=\"filled\"][float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(\r\n :is(:state(--pressed), :--pressed)\r\n )\r\n )\r\n .label {\r\n top: 0px;\r\n line-height: calc(3.5rem + ${DesignToken.density.calc(-3)} - 0.0625rem);\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):not(:focus-within):not(:is(:state(--pressed), :--pressed)))\r\n .base:hover {\r\n --_form-field-hover-container-color: color-mix(\r\n in srgb,\r\n var(--m3e-form-field-hover-container-color, ${DesignToken.color.onSurface})\r\n var(--m3e-form-field-hover-container-opacity, 8%),\r\n transparent\r\n );\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) {\r\n color: var(--m3e-form-field-color, ${DesignToken.color.onSurface});\r\n }\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)))\r\n .base {\r\n --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.outline});\r\n }\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base {\r\n --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.onSurfaceVariant});\r\n }\r\n :host(\r\n [variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):not(\r\n :is(:state(--invalid), :--invalid)\r\n ):focus-within\r\n )\r\n .base,\r\n :host(\r\n [variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is(\r\n :state(--pressed),\r\n :--pressed\r\n )\r\n )\r\n .base,\r\n :host(\r\n [variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):not(\r\n :is(:state(--invalid), :--invalid)\r\n ):focus-within\r\n )\r\n .base,\r\n :host(\r\n [variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is(\r\n :state(--pressed),\r\n :--pressed\r\n )\r\n )\r\n .base {\r\n --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${DesignToken.color.primary});\r\n --_form-field-label-color: var(--m3e-form-field-focused-color, ${DesignToken.color.primary});\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled))) .base {\r\n --_form-field-container-color: var(\r\n --m3e-form-field-container-color,\r\n ${DesignToken.color.surfaceContainerHighest}\r\n );\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .base {\r\n --_form-field-label-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error});\r\n --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error});\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .subscript {\r\n color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error});\r\n }\r\n :host(:is(:state(--disabled), :--disabled)) {\r\n color: color-mix(\r\n in srgb,\r\n var(--m3e-form-field-disabled-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%),\r\n transparent\r\n );\r\n }\r\n :host(:is(:state(--disabled), :--disabled)) .base {\r\n --_form-field-container-color: color-mix(\r\n in srgb,\r\n var(--m3e-form-field-disabled-container-color, ${DesignToken.color.onSurface})\r\n var(--m3e-form-field-disabled-container-opacity, 4%),\r\n transparent\r\n );\r\n }\r\n :host(:is(:state(--no-animate), :--no-animate)) *,\r\n :host(:is(:state(--no-animate), :--no-animate)) *::before,\r\n :host(:is(:state(--no-animate), :--no-animate)) *::after {\r\n transition: none !important;\r\n }\r\n @media (forced-colors: active) {\r\n :host([variant=\"filled\"]) .base::after {\r\n transition: none;\r\n }\r\n :host {\r\n --_form-field-outline-color: CanvasText;\r\n }\r\n :host(:is(:state(--disabled), :--disabled)) {\r\n --_form-field-input-color: GrayText;\r\n --_form-field-color: GrayText;\r\n --_form-field-label-color: GrayText;\r\n --_form-field-outline-color: GrayText;\r\n }\r\n }\r\n @media (prefers-reduced-motion) {\r\n .base::before,\r\n .prefix-text,\r\n .suffix-text,\r\n .label,\r\n .subscript,\r\n .outline-start,\r\n .outline-notch,\r\n .outline-end,\r\n .pseudo-label {\r\n transition: none !important;\r\n }\r\n }\r\n `;\r\n\r\n /** @private */ #control: FormFieldControl | null = null;\r\n /** @private */ #removeValueInterceptor?: () => void;\r\n /** @private */ readonly #formResetHandler = () => this.#handleFormReset();\r\n /** @private */ readonly #controlInvalidHandler = () => this.#handleControlInvalid();\r\n\r\n /** @private */\r\n readonly #controlMutationController = new MutationController(this, {\r\n target: null,\r\n config: { attributeFilter: [\"disabled\", \"readonly\", \"required\"] },\r\n callback: () => this.notifyControlStateChange(),\r\n });\r\n\r\n /** @private */\r\n readonly #resizeController = new ResizeController(this, {\r\n target: null,\r\n callback: () => this.#handlePrefixResize(),\r\n });\r\n\r\n /** @private */\r\n readonly #focusController = new FocusController(this, {\r\n target: null,\r\n callback: (focused) => {\r\n focused = focused && !(this.#control?.disabled ?? true);\r\n setCustomState(this, \"--no-animate\", false);\r\n this.#focused = focused;\r\n if (focused) {\r\n setCustomState(this, \"--float-label\", true);\r\n } else {\r\n this._invalid = !(this.#control?.checkValidity?.() ?? true);\r\n this.notifyControlStateChange();\r\n }\r\n },\r\n });\r\n\r\n /** @private */ @query(\".base\") private readonly _base!: HTMLElement;\r\n /** @private */ @query(\".prefix\") private readonly _prefix!: HTMLElement;\r\n /** @private */ @query(\".error\") private readonly _error!: HTMLElement;\r\n /** @private */ @query(\".hint\") private readonly _hint!: HTMLElement;\r\n\r\n /** @private */\r\n readonly #hintMutationController = new MutationController(this, {\r\n target: null,\r\n config: { childList: true, subtree: true },\r\n callback: () => this.#handleHintChange(),\r\n });\r\n\r\n /** @private */\r\n readonly #errorMutationController = new MutationController(this, {\r\n target: null,\r\n config: { childList: true, subtree: true },\r\n callback: () => this.#handleErrorChange(),\r\n });\r\n\r\n /** @private */\r\n readonly #pressedController = new PressedController(this, {\r\n target: null,\r\n callback: (pressed) => setCustomState(this, \"--pressed\", pressed && !(this.#control?.disabled ?? true)),\r\n });\r\n\r\n /** @private */ #focused = false;\r\n /** @private */ @state() private _pseudoLabel = \"\";\r\n /** @private */ @state() private _required = false;\r\n /** @private */ @state() private _invalid = false;\r\n /** @private */ @state() private _validationMessage = \"\";\r\n /** @private */ #hintText = \"\";\r\n /** @private */ #errorText = \"\";\r\n\r\n constructor() {\r\n super();\r\n\r\n new HoverController(this, { callback: () => setCustomState(this, \"--no-animate\", false) });\r\n }\r\n\r\n /** @private */\r\n get #shouldFloatLabel(): boolean {\r\n return this.#control?.shouldLabelFloat !== undefined\r\n ? this.#control.shouldLabelFloat === true\r\n : typeof this.#control?.value == \"string\" && this.#control.value.length > 0;\r\n }\r\n\r\n /** A reference to the element used to anchor dropdown menus. */\r\n get menuAnchor() {\r\n return this._base;\r\n }\r\n\r\n /** A reference to the hosted form field control. */\r\n get control() {\r\n return this.#control;\r\n }\r\n\r\n /**\r\n * The appearance variant of the field.\r\n * @default \"outlined\"\r\n */\r\n @property({ reflect: true }) variant: FormFieldVariant = \"outlined\";\r\n\r\n /**\r\n * Whether the required marker should be hidden.\r\n * @default false\r\n */\r\n @property({ attribute: \"hide-required-marker\", type: Boolean, reflect: true }) hideRequiredMarker = false;\r\n\r\n /**\r\n * Whether subscript content is hidden.\r\n * @default \"auto\"\r\n */\r\n @property({ attribute: \"hide-subscript\", reflect: true }) hideSubscript: HideSubscriptType = \"auto\";\r\n\r\n /**\r\n * Specifies whether the label should float always or only when necessary.\r\n * @default \"auto\"\r\n */\r\n @property({ attribute: \"float-label\", reflect: true }) floatLabel: FloatLabelType = \"auto\";\r\n\r\n /**\r\n * Notifies the form field that the state of the hosted `control` has changed.\r\n * @param {boolean} [checkValidity=false] Whether to check validity.\r\n */\r\n notifyControlStateChange(checkValidity: boolean = false): void {\r\n this._required = this.#control?.required === true;\r\n setCustomState(this, \"--required\", this._required);\r\n setCustomState(this, \"--disabled\", this.#control?.disabled === true);\r\n setCustomState(this, \"--readonly\", isReadOnlyMixin(this.#control) && this.#control.readOnly === true);\r\n if (this.floatLabel === \"auto\") {\r\n setCustomState(this, \"--float-label\", this.#shouldFloatLabel || this.#focused);\r\n }\r\n\r\n if (checkValidity) {\r\n this._invalid = !(this.#control?.checkValidity?.() ?? true);\r\n }\r\n\r\n setCustomState(this, \"--invalid\", this._invalid);\r\n\r\n this._validationMessage = this.#control?.validationMessage ?? \"\";\r\n if (!this.isUpdatePending) {\r\n this.performUpdate();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n // Label animations are disabled on initial paint.\r\n setCustomState(this, \"--no-animate\", true);\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.#changeControl(null);\r\n }\r\n\r\n /** @inheritdoc */\r\n override reconnectedCallback(): void {\r\n super.reconnectedCallback();\r\n this.#initialize();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues): void {\r\n super.firstUpdated(_changedProperties);\r\n this.#initialize();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"_invalid\") && this.#control) {\r\n this.#control.ariaInvalid = this._invalid ? \"true\" : null;\r\n\r\n if (this.#errorText) {\r\n if (this._invalid) {\r\n M3eAriaDescriber.describe(this.#control, this.#errorText);\r\n } else {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#errorText);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\" @click=\"${this.#handleContainerClick}\">\r\n ${this.variant === \"outlined\"\r\n ? html`<div class=\"outline\" aria-hidden=\"true\">\r\n <div class=\"outline-start\"></div>\r\n <div class=\"outline-notch\">\r\n <div class=\"pseudo-label\">\r\n ${this._pseudoLabel} ${!this.hideRequiredMarker && this._required ? html`&nbsp;*` : nothing}\r\n </div>\r\n </div>\r\n <div class=\"outline-end\"></div>\r\n </div>`\r\n : nothing}\r\n <div class=\"prefix\">\r\n <slot name=\"prefix\" @slotchange=\"${this.#handlePrefixSlotChange}\"></slot>\r\n </div>\r\n <div class=\"content\">\r\n <span class=\"prefix-text\"><slot name=\"prefix-text\"></slot></span>\r\n <span class=\"input\">\r\n <slot @slotchange=\"${this.#handleSlotChange}\" @change=\"${this.#handleControlChange}\"></slot>\r\n </span>\r\n <span class=\"suffix-text\"><slot name=\"suffix-text\"></slot></span>\r\n <span class=\"label\">\r\n <slot name=\"label\" @slotchange=\"${this.#handleLabelSlotChange}\"></slot>\r\n ${!this.hideRequiredMarker && this._required\r\n ? html`<span class=\"required-marker\" aria-hidden=\"true\">&nbsp;*</span>`\r\n : nothing}\r\n </span>\r\n </div>\r\n <div\r\n class=\"suffix\"\r\n @click=\"${this.#stopPropagation}\"\r\n @focusin=\"${this.#stopPropagation}\"\r\n @focusout=\"${this.#stopPropagation}\"\r\n @pointerdown=\"${this.#stopPropagation}\"\r\n @keydown=\"${this.#stopPropagation}\"\r\n @keyup=\"${this.#stopPropagation}\"\r\n >\r\n <slot name=\"suffix\" @slotchange=\"${this.#handleSuffixSlotChange}\"></slot>\r\n </div>\r\n </div>\r\n <span class=\"subscript\" aria-hidden=\"true\">\r\n <span class=\"error\"><slot name=\"error\">${this._validationMessage}</slot></span>\r\n <span class=\"hint\"><slot name=\"hint\"></slot></span>\r\n </span>`;\r\n }\r\n\r\n /** @private */\r\n #initialize(): void {\r\n this.#focusController.observe(this._base);\r\n this.#pressedController.observe(this._base);\r\n\r\n this.#hintMutationController.observe(this._hint);\r\n this.#handleHintChange();\r\n\r\n this.#errorMutationController.observe(this._error);\r\n this.#handleErrorChange();\r\n }\r\n\r\n /** @private */\r\n #stopPropagation(e: Event): void {\r\n e.stopImmediatePropagation();\r\n e.stopPropagation();\r\n }\r\n\r\n /** @private */\r\n #handleLabelSlotChange(e: Event): void {\r\n const assignedElements = (<HTMLSlotElement>e.target).assignedElements({ flatten: true });\r\n setCustomState(this, \"--with-label\", assignedElements.length > 0);\r\n this._pseudoLabel = assignedElements[0]?.textContent ?? \"\";\r\n }\r\n\r\n /** @private */\r\n #handlePrefixSlotChange(e: Event): void {\r\n setCustomState(this, \"--with-prefix\", hasAssignedNodes(<HTMLSlotElement>e.target));\r\n this.#resizeController.observe(this._prefix);\r\n }\r\n\r\n /** @private */\r\n #handleSuffixSlotChange(e: Event): void {\r\n setCustomState(this, \"--with-suffix\", hasAssignedNodes(<HTMLSlotElement>e.target));\r\n }\r\n\r\n /** @private */\r\n #handlePrefixResize(): void {\r\n if (this.variant === \"outlined\") {\r\n this._base.style.setProperty(\"--_prefix-width\", `${this._prefix.clientWidth}px`);\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(e: Event): void {\r\n this.#changeControl(findFormFieldControl(<HTMLSlotElement>e.target));\r\n }\r\n\r\n /** @private */\r\n #handleContainerClick(e: MouseEvent): void {\r\n if (this.#control && !this.#focused && !this.#control.disabled) {\r\n if (this.#control.onContainerClick) {\r\n this.#control.onContainerClick(e);\r\n } else {\r\n this.#control.focus();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleControlInvalid(): void {\r\n this._invalid = true;\r\n this.notifyControlStateChange();\r\n }\r\n\r\n /** @private */\r\n #handleControlChange(): void {\r\n this._invalid = !(this.#control?.checkValidity?.() ?? true);\r\n this.notifyControlStateChange();\r\n }\r\n\r\n /** @private */\r\n #handleFormReset(): void {\r\n this._invalid = false;\r\n setTimeout(() => this.notifyControlStateChange());\r\n }\r\n\r\n /** @private */\r\n #changeControl(control: FormFieldControl | null): void {\r\n if (this.#control === control) return;\r\n if (this.#control) {\r\n if (this.#hintText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#hintText);\r\n }\r\n if (this.#errorText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#errorText);\r\n }\r\n\r\n this.#controlMutationController.unobserve(this.#control);\r\n this.#control.removeEventListener(\"invalid\", this.#controlInvalidHandler);\r\n this.#control.form?.removeEventListener(\"reset\", this.#formResetHandler);\r\n this.#removeValueInterceptor?.();\r\n this.#removeValueInterceptor = undefined;\r\n }\r\n this.#control = control;\r\n\r\n if ([\"INPUT\", \"TEXTAREA\"].includes(this.#control?.tagName ?? \"\")) {\r\n this._base.style.setProperty(\"--_form-field-cursor\", \"text\");\r\n } else {\r\n this._base.style.removeProperty(\"--_form-field-cursor\");\r\n }\r\n\r\n setCustomState(this, \"--with-select\", this.#control?.tagName === \"M3E-SELECT\");\r\n if (hasCustomState(this, \"--with-select\")) {\r\n this._base.style.setProperty(\"--_form-field-cursor\", \"pointer\");\r\n }\r\n\r\n if (this.#control) {\r\n this.#controlMutationController.observe(this.#control);\r\n this.#control.addEventListener(\"invalid\", this.#controlInvalidHandler);\r\n this.#control.form?.addEventListener(\"reset\", this.#formResetHandler);\r\n this.#control.removeAttribute(\"aria-invalid\");\r\n\r\n if (this.#hintText) {\r\n M3eAriaDescriber.describe(this.#control, this.#hintText);\r\n }\r\n\r\n this.notifyControlStateChange();\r\n\r\n const tagname = this.#control.tagName.toLowerCase();\r\n if (tagname.startsWith(\"m3e-\") && !customElements.get(tagname)) {\r\n customElements.whenDefined(tagname).then(() => this.#bindValueInterceptor());\r\n } else {\r\n this.#bindValueInterceptor();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #bindValueInterceptor(): void {\r\n if (!this.#control) return;\r\n this.#removeValueInterceptor = interceptProperty(this.#control, \"value\", {\r\n set: (value, setter) => {\r\n setter(value);\r\n this.notifyControlStateChange(true);\r\n },\r\n });\r\n }\r\n\r\n /** @private */\r\n #handleHintChange(): void {\r\n const hintText = getTextContent(this._hint, true);\r\n if (hintText === this.#hintText) return;\r\n\r\n if (this.#control && this.#hintText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#hintText);\r\n }\r\n\r\n this.#hintText = hintText;\r\n\r\n if (this.#control && this.#hintText) {\r\n M3eAriaDescriber.describe(this.#control, this.#hintText);\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleErrorChange(): void {\r\n const errorText = getTextContent(this._error, true);\r\n if (errorText === this.#errorText) return;\r\n\r\n if (this.#control && this.#errorText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#errorText);\r\n }\r\n\r\n this.#errorText = errorText;\r\n\r\n if (this.#control && this.#errorText && this._invalid) {\r\n M3eAriaDescriber.describe(this.#control, this.#errorText);\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-form-field\": M3eFormFieldElement;\r\n }\r\n}\r\n"],"names":["KNOWN_FORM_FIELD_TAGS","isFormFieldControl","value","HTMLElement","HTMLInputElement","HTMLTextAreaElement","HTMLSelectElement","includes","tagName","toLowerCase","findFormFieldControl","slot","element","assignedElements","flatten","walker","document","createTreeWalker","NodeFilter","SHOW_ELEMENT","nextNode","currentNode","M3eFormFieldElement","ReconnectedCallback","AttachInternals","LitElement","constructor","super","_M3eFormFieldElement_control","set","this","_M3eFormFieldElement_removeValueInterceptor","_M3eFormFieldElement_formResetHandler","__classPrivateFieldGet","_M3eFormFieldElement_instances","_M3eFormFieldElement_handleFormReset","call","_M3eFormFieldElement_controlInvalidHandler","_M3eFormFieldElement_handleControlInvalid","_M3eFormFieldElement_controlMutationController","MutationController","target","config","attributeFilter","callback","notifyControlStateChange","_M3eFormFieldElement_resizeController","ResizeController","_M3eFormFieldElement_handlePrefixResize","_M3eFormFieldElement_focusController","FocusController","focused","disabled","setCustomState","__classPrivateFieldSet","_M3eFormFieldElement_focused","_invalid","checkValidity","_M3eFormFieldElement_hintMutationController","childList","subtree","_M3eFormFieldElement_handleHintChange","_M3eFormFieldElement_errorMutationController","_M3eFormFieldElement_handleErrorChange","_M3eFormFieldElement_pressedController","PressedController","pressed","_pseudoLabel","_required","_validationMessage","_M3eFormFieldElement_hintText","_M3eFormFieldElement_errorText","variant","hideRequiredMarker","hideSubscript","floatLabel","HoverController","menuAnchor","_base","control","required","isReadOnlyMixin","readOnly","_M3eFormFieldElement_shouldFloatLabel_get","validationMessage","isUpdatePending","performUpdate","connectedCallback","disconnectedCallback","_M3eFormFieldElement_changeControl","reconnectedCallback","_M3eFormFieldElement_initialize","firstUpdated","_changedProperties","update","changedProperties","has","ariaInvalid","M3eAriaDescriber","describe","removeDescription","render","html","_M3eFormFieldElement_handleContainerClick","nothing","_M3eFormFieldElement_handlePrefixSlotChange","_M3eFormFieldElement_handleSlotChange","_M3eFormFieldElement_handleControlChange","_M3eFormFieldElement_handleLabelSlotChange","_M3eFormFieldElement_stopPropagation","_M3eFormFieldElement_handleSuffixSlotChange","undefined","shouldLabelFloat","length","observe","_hint","_error","e","stopImmediatePropagation","stopPropagation","textContent","hasAssignedNodes","_prefix","style","setProperty","clientWidth","onContainerClick","focus","setTimeout","unobserve","removeEventListener","form","removeProperty","hasCustomState","addEventListener","removeAttribute","tagname","startsWith","customElements","get","whenDefined","then","_M3eFormFieldElement_bindValueInterceptor","interceptProperty","setter","hintText","getTextContent","errorText","registerStyleSheet","css","DesignToken","motion","duration","extraLong1","density","calc","styles","typescale","standard","body","large","fontSize","fontWeight","lineHeight","tracking","small","unsafeCSS","short4","color","onSurfaceVariant","scrollbar","thinWidth","short2","shape","corner","extraSmall","extraSmallTop","onSurface","outline","primary","surfaceContainerHighest","error","__decorate","query","prototype","state","property","reflect","attribute","type","Boolean","customElement"],"mappings":";;;;;;;;;;;;;GA6CA,MAAMA,EAAwB,CAAC,qBAAsB,cAO/C,SAAUC,EAAmBC,GACjC,OACEA,aAAiBC,cAChBD,aAAiBE,kBAChBF,aAAiBG,qBACjBH,aAAiBI,mBACjBN,EAAsBO,SAASL,EAAMM,QAAQC,eAEnD,CAOM,SAAUC,EAAqBC,GACnC,IAAK,MAAMC,KAAWD,EAAKE,iBAAiB,CAAEC,SAAS,IAAS,CAC9D,GAAIb,EAAmBW,GACrB,OAAOA,EAGT,MAAMG,EAASC,SAASC,iBAAiBL,EAASM,WAAWC,cAC7D,KAAOJ,EAAOK,YACZ,GAAInB,EAAmBc,EAAOM,aAC5B,OAAON,EAAOM,WAGpB,CAEA,OAAO,IACT;;;;;;;;0EC4BO,IAAMC,GAAN,cAAkCC,EAAoBC,EAAgBC,KAyiB3EC,WAAAA,GACEC,oBApEcC,EAAAC,IAAAC,KAAoC,MACpCC,EAAAF,IAAAC,aACSE,EAAAH,IAAAC,KAAoB,IAAMG,EAAAH,KAAII,EAAA,IAAAC,IAAiBC,KAArBN,OAC1BO,EAAAR,IA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EAAA,CAAhBG,KAAkCnK,GAAAkK,UAAA,uBAClBF,EAAA,CAAhBG,KAAkCnK,GAAAkK,UAAA,oBAClBF,EAAA,CAAhBG,KAAiCnK,GAAAkK,UAAA,mBACjBF,EAAA,CAAhBG,KAAwCnK,GAAAkK,UAAA,6BA+B5BF,EAAA,CAA5BI,EAAS,CAAEC,SAAS,KAA+CrK,GAAAkK,UAAA,eAAA,GAMWF,EAAA,CAA9EI,EAAS,CAAEE,UAAW,uBAAwBC,KAAMC,QAASH,SAAS,KAAmCrK,GAAAkK,UAAA,0BAAA,GAMhDF,EAAA,CAAzDI,EAAS,CAAEE,UAAW,iBAAkBD,SAAS,KAAkDrK,GAAAkK,UAAA,qBAAA,GAM7CF,EAAA,CAAtDI,EAAS,CAAEE,UAAW,cAAeD,SAAS,KAA4CrK,GAAAkK,UAAA,kBAAA,GAtlBhFlK,GAAmBgK,EAAA,CAD/BS,EAAc,mBACFzK"}
1
+ {"version":3,"file":"form-field.min.js","sources":["../../src/form-field/FormFieldControl.ts","../../src/form-field/FormFieldElement.ts"],"sourcesContent":["/**\r\n * Adapted from Angular Material Form Field Control\r\n * Source: https://github.com/angular/components/blob/main/src/material/form-field/form-field-control.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\n/** An interface which allows a control to work inside of a `M3eFormField`. */\r\nexport interface FormFieldControl extends HTMLElement {\r\n /** A value indicating whether the control is disabled. */\r\n disabled: boolean;\r\n\r\n /** The value of the control. */\r\n value?: unknown;\r\n\r\n /** A value indicating whether the control is required. */\r\n required?: boolean;\r\n\r\n /** A value indicated whether the content of the control is read-only. */\r\n readonly?: boolean;\r\n\r\n /** A value indicating whether the form field's label should try to float. */\r\n readonly shouldLabelFloat?: boolean;\r\n\r\n /** The error message that would be displayed if the user submits the form, or an empty string if no error message. */\r\n readonly validationMessage?: string;\r\n\r\n /** The `HTMLFormElement` associated with this element. */\r\n readonly form?: HTMLFormElement | null;\r\n\r\n /**\r\n * Handles the click event on the control's container.\r\n * @param {MouseEvent} event The `MouseEvent`.\r\n */\r\n onContainerClick?: (event: MouseEvent) => void;\r\n\r\n /**\r\n * Returns `true` if the element has no validity problems; otherwise,\r\n * returns `false`, fires an invalid event.\r\n */\r\n checkValidity?: () => boolean;\r\n}\r\n\r\nconst KNOWN_FORM_FIELD_TAGS = [\"m3e-input-chip-set\", \"m3e-select\"];\r\n\r\n/**\r\n * Determines whether a value is a `FormFieldControl`.\r\n * @param {unknown} value The value to test.\r\n * @returns {value is FormFieldControl} A value indicating whether `value` is a `FormFieldControl`.\r\n */\r\nexport function isFormFieldControl(value: unknown): value is FormFieldControl {\r\n return (\r\n value instanceof HTMLElement &&\r\n (value instanceof HTMLInputElement ||\r\n value instanceof HTMLTextAreaElement ||\r\n value instanceof HTMLSelectElement ||\r\n KNOWN_FORM_FIELD_TAGS.includes(value.tagName.toLowerCase()))\r\n );\r\n}\r\n\r\n/**\r\n * Locates the first `FormFieldControl` in a given slot.\r\n * @param {HTMLSlotElement} slot The slot in which to locate a `FormFieldControl`.\r\n * @returns {FormFieldControl | null} The `FormFieldControl` located in `slot`.\r\n */\r\nexport function findFormFieldControl(slot: HTMLSlotElement): FormFieldControl | null {\r\n for (const element of slot.assignedElements({ flatten: true })) {\r\n if (isFormFieldControl(element)) {\r\n return element;\r\n }\r\n\r\n const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT);\r\n while (walker.nextNode()) {\r\n if (isFormFieldControl(walker.currentNode)) {\r\n return walker.currentNode;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","/**\r\n * Adapted from Angular Material Form Field\r\n * Source: https://github.com/angular/components/blob/main/src/material/form-field/form-field.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\nimport { css, CSSResultGroup, html, LitElement, nothing, PropertyValues, unsafeCSS } from \"lit\";\r\nimport { property, query, state } from \"lit/decorators.js\";\r\n\r\nimport {\r\n AttachInternals,\r\n customElement,\r\n DesignToken,\r\n FocusController,\r\n getTextContent,\r\n hasAssignedNodes,\r\n hasCustomState,\r\n HoverController,\r\n interceptProperty,\r\n isReadOnlyMixin,\r\n MutationController,\r\n PressedController,\r\n ReconnectedCallback,\r\n registerStyleSheet,\r\n ResizeController,\r\n setCustomState,\r\n} from \"@m3e/web/core\";\r\n\r\nimport { M3eAriaDescriber } from \"@m3e/web/core/a11y\";\r\n\r\nimport { findFormFieldControl, FormFieldControl } from \"./FormFieldControl\";\r\nimport { FormFieldVariant } from \"./FormFieldVariant\";\r\nimport { HideSubscriptType } from \"./HideSubscriptType\";\r\nimport { FloatLabelType } from \"./FloatLabelType\";\r\n\r\n/**\r\n * A container for form controls that applies Material Design styling and behavior.\r\n *\r\n * @description\r\n * The `m3e-form-field` component is a semantic, expressive container for form controls that anchors\r\n * label behavior, subscript messaging, and variant-specific layout. Designed according to Material Design 3\r\n * guidelines, it supports two visual variants—`outlined` and `filled`—each with dynamic elevation,\r\n * shape transitions, and adaptive color theming. The component responds to control state changes\r\n * (focus, hover, press, disabled, invalid) with smooth motion and semantic clarity, ensuring\r\n * visual hierarchy and emotional resonance.\r\n\r\n * The component is accessible by default, with ARIA annotations, contrast-safe color tokens,\r\n * and dynamic descriptions for hint and error messaging. It supports prefix and suffix content,\r\n * floating labels, and adaptive subscript visibility. When hosting a control with validation,\r\n * error messages are surfaced with `aria-invalid` and described for assistive technology.\r\n\r\n * Native form controls may not expose full state or messaging on their own. `m3e-form-field` bridges\r\n * these gaps by coordinating label floating, container styling, and subscript feedback.\r\n *\r\n * @example\r\n * The following example illustrates a basic usage of the `m3e-form-field`.\r\n * ```html\r\n * <m3e-form-field>\r\n * <label slot=\"label\" for=\"field\">Text field</label>\r\n * <input id=\"field\" />\r\n * </m3e-form-field>\r\n * ```\r\n * \r\n * @tag m3e-form-field\r\n *\r\n * @slot - Renders the control of the field.\r\n * @slot prefix - Renders content before the fields's control.\r\n * @slot prefix-text - Renders text before the fields's control.\r\n * @slot suffix - Renders content after the fields's control.\r\n * @slot suffix-text - Renders text after the fields's control.\r\n * @slot hint - Renders hint text in the fields's subscript, when the control is valid.\r\n * @slot error - Renders error text in the fields's subscript, when the control is invalid.\r\n *\r\n * @attr float-label - Specifies whether the label should float always or only when necessary.\r\n * @attr hide-required-marker - Whether the required marker should be hidden.\r\n * @attr hide-subscript - Whether subscript content is hidden.\r\n * @attr variant - The appearance variant of the field.\r\n *\r\n * @cssprop --m3e-form-field-font-size - Font size for the form field container text.\r\n * @cssprop --m3e-form-field-font-weight - Font weight for the form field container text.\r\n * @cssprop --m3e-form-field-line-height - Line height for the form field container text.\r\n * @cssprop --m3e-form-field-tracking - Letter spacing for the form field container text.\r\n * @cssprop --m3e-form-field-label-font-size - Font size for the floating label.\r\n * @cssprop --m3e-form-field-label-font-weight - Font weight for the floating label.\r\n * @cssprop --m3e-form-field-label-line-height - Line height for the floating label.\r\n * @cssprop --m3e-form-field-label-tracking - Letter spacing for the floating label.\r\n * @cssprop --m3e-form-field-subscript-font-size - Font size for hint and error text.\r\n * @cssprop --m3e-form-field-subscript-font-weight - Font weight for hint and error text.\r\n * @cssprop --m3e-form-field-subscript-line-height - Line height for hint and error text.\r\n * @cssprop --m3e-form-field-subscript-tracking - Letter spacing for hint and error text.\r\n * @cssprop --m3e-form-field-color - Text color for the form field container.\r\n * @cssprop --m3e-form-field-subscript-color - Color for hint and error text.\r\n * @cssprop --m3e-form-field-invalid-color - Color used when the control is invalid.\r\n * @cssprop --m3e-form-field-focused-outline-color - Outline color when focused.\r\n * @cssprop --m3e-form-field-focused-color - Label color when focused.\r\n * @cssprop --m3e-form-field-outline-color - Outline color in outlined variant.\r\n * @cssprop --m3e-form-field-container-color - Background color in filled variant.\r\n * @cssprop --m3e-form-field-hover-container-color - Hover background color in filled variant.\r\n * @cssprop --m3e-form-field-width - Width of the form field container.\r\n * @cssprop --m3e-form-field-icon-size - Size of prefix and suffix icons.\r\n * @cssprop --m3e-outlined-form-field-container-shape - Corner radius for outlined container.\r\n * @cssprop --m3e-form-field-container-shape - Corner radius for filled container.\r\n * @cssprop --m3e-form-field-hover-container-opacity - Opacity for hover background in filled variant.\r\n * @cssprop --m3e-form-field-disabled-opacity - Opacity for disabled text.\r\n * @cssprop --m3e-form-field-disabled-container-opacity - Opacity for disabled container background.\r\n */\r\n@customElement(\"m3e-form-field\")\r\nexport class M3eFormFieldElement extends ReconnectedCallback(AttachInternals(LitElement)) {\r\n static {\r\n registerStyleSheet(css`\r\n m3e-form-field input::placeholder,\r\n m3e-form-field textarea::placeholder {\r\n user-select: none;\r\n color: currentColor;\r\n transition: opacity ${DesignToken.motion.duration.extraLong1};\r\n }\r\n m3e-form-field[float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(\r\n :state(--with-label),\r\n :--with-label\r\n )\r\n input::placeholder,\r\n m3e-form-field[float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(\r\n :state(--with-label),\r\n :--with-label\r\n )\r\n textarea::placeholder {\r\n opacity: 0;\r\n transition: opacity 0s;\r\n }\r\n m3e-form-field[variant=\"outlined\"] m3e-input-chip-set {\r\n margin-block: calc(calc(3.5rem + ${DesignToken.density.calc(-3)}) / 4);\r\n }\r\n @media (prefers-reduced-motion) {\r\n m3e-form-field input::placeholder,\r\n m3e-form-field textarea::placeholder {\r\n transition: none !important;\r\n }\r\n }\r\n `);\r\n }\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: inline-flex;\r\n flex-direction: column;\r\n vertical-align: middle;\r\n font-size: var(--m3e-form-field-font-size, ${DesignToken.typescale.standard.body.large.fontSize});\r\n font-weight: var(--m3e-form-field-font-weight, ${DesignToken.typescale.standard.body.large.fontWeight});\r\n line-height: var(--m3e-form-field-line-height, ${DesignToken.typescale.standard.body.large.lineHeight});\r\n letter-spacing: var(--m3e-form-field-tracking, ${DesignToken.typescale.standard.body.large.tracking});\r\n width: var(--m3e-form-field-width, 14.5rem);\r\n color: var(--_form-field-color);\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled))) .base {\r\n cursor: var(--_form-field-cursor);\r\n }\r\n .base {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n min-height: calc(3.5rem + ${DesignToken.density.calc(-3)});\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n --_form-field-label-line-height: var(\r\n --m3e-form-field-label-line-height,\r\n ${DesignToken.typescale.standard.body.small.lineHeight}\r\n );\r\n }\r\n .content {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n min-height: var(--m3e-form-field-icon-size, 1.5rem);\r\n }\r\n .prefix,\r\n .suffix {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n user-select: none;\r\n flex: none;\r\n font-size: var(--m3e-form-field-icon-size, 1.5rem);\r\n }\r\n .prefix-text,\r\n .suffix-text {\r\n opacity: 1;\r\n transition: opacity ${DesignToken.motion.duration.extraLong1};\r\n user-select: none;\r\n flex: none;\r\n }\r\n .input {\r\n display: inline-flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n }\r\n .label {\r\n display: flex;\r\n position: absolute;\r\n pointer-events: none;\r\n user-select: none;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n font-size: var(--m3e-form-field-label-font-size, ${DesignToken.typescale.standard.body.small.fontSize});\r\n font-weight: var(--m3e-form-field-label-font-weight, ${DesignToken.typescale.standard.body.small.fontWeight});\r\n line-height: var(--m3e-form-field-label-line-height, ${DesignToken.typescale.standard.body.small.lineHeight});\r\n letter-spacing: var(--m3e-form-field-label-tracking, ${DesignToken.typescale.standard.body.small.tracking});\r\n color: var(--_form-field-label-color, inherit);\r\n transition: ${unsafeCSS(\r\n `top ${DesignToken.motion.duration.short4}, \r\n font-size ${DesignToken.motion.duration.short4}, \r\n line-height ${DesignToken.motion.duration.short4}`,\r\n )};\r\n }\r\n :host(:is(:state(--with-select), :--with-select)) .label {\r\n margin-inline-end: 1.5rem;\r\n }\r\n ::slotted([slot=\"label\"]) {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n .subscript {\r\n display: inline-flex;\r\n width: 100%;\r\n margin-top: 0.25rem;\r\n font-size: var(--m3e-form-field-subscript-font-size, ${DesignToken.typescale.standard.body.small.fontSize});\r\n font-weight: var(--m3e-form-field-subscript-font-weight, ${DesignToken.typescale.standard.body.small.fontWeight});\r\n line-height: var(--m3e-form-field-subscript-line-height, ${DesignToken.typescale.standard.body.small.lineHeight});\r\n letter-spacing: var(--m3e-form-field-subscript-tracking, ${DesignToken.typescale.standard.body.small.tracking});\r\n min-height: var(--m3e-form-field-subscript-line-height, ${DesignToken.typescale.standard.body.small.lineHeight});\r\n color: var(--m3e-form-field-subscript-color, ${DesignToken.color.onSurfaceVariant});\r\n }\r\n .error,\r\n .hint {\r\n flex: 1 1 auto;\r\n }\r\n :host([hide-subscript=\"always\"]) .subscript {\r\n display: none;\r\n }\r\n :host([hide-subscript=\"auto\"]:not(:is(:state(--invalid), :--invalid))) .subscript {\r\n opacity: 0;\r\n margin-top: 0.25rem;\r\n transform: translateY(-0.25rem);\r\n transition: ${unsafeCSS(\r\n `opacity ${DesignToken.motion.duration.short4}, \r\n transform ${DesignToken.motion.duration.short4}`,\r\n )};\r\n }\r\n :host([hide-subscript=\"auto\"]:not(:is(:state(--invalid), :--invalid)):focus-within) .subscript,\r\n :host([hide-subscript=\"auto\"]:not(:is(:state(--invalid), :--invalid)):is(:state(--pressed), :--pressed))\r\n .subscript {\r\n opacity: 1;\r\n transform: translateY(0);\r\n }\r\n :host(:is(:state(--invalid), :--invalid)) .hint {\r\n display: none;\r\n }\r\n :host(:not(:is(:state(--invalid), :--invalid))) .error {\r\n display: none;\r\n }\r\n ::slotted(input),\r\n ::slotted(textarea),\r\n ::slotted(select) {\r\n outline: unset;\r\n border: unset;\r\n background-color: transparent;\r\n box-shadow: none;\r\n font-family: inherit;\r\n font-size: inherit;\r\n line-height: inherit;\r\n letter-spacing: inherit;\r\n color: var(--_form-field-input-color, inherit);\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n padding: unset;\r\n }\r\n ::slotted(textarea) {\r\n scrollbar-width: ${DesignToken.scrollbar.thinWidth};\r\n scrollbar-color: ${DesignToken.scrollbar.color};\r\n }\r\n ::slotted(m3e-select),\r\n ::slotted(m3e-input-chip-set) {\r\n flex: 1 1 auto;\r\n min-width: 0;\r\n }\r\n :host([float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(:is(:state(--pressed), :--pressed)))\r\n .label {\r\n font-size: inherit;\r\n }\r\n\r\n :host([float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label))\r\n .prefix-text,\r\n :host([float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label))\r\n .suffix-text {\r\n opacity: 0;\r\n transition: opacity 0s;\r\n }\r\n .prefix {\r\n margin-inline-start: 1rem;\r\n }\r\n :host(:is(:state(--with-prefix), :--with-prefix)) .prefix {\r\n margin-inline-end: 1rem;\r\n margin-inline-start: 0.75rem;\r\n }\r\n .suffix {\r\n margin-inline-end: 1rem;\r\n }\r\n :host(:is(:state(--with-suffix), :--with-suffix)) .suffix {\r\n margin-inline-start: 0.25rem;\r\n margin-inline-end: 0.5rem;\r\n }\r\n :host(:is(:state(--with-suffix), :--with-suffix):is(:state(--with-select), :--with-select)) .suffix {\r\n margin-inline-start: unset;\r\n }\r\n :host(:is(:state(--with-select), :--with-select)) .suffix-text {\r\n display: none;\r\n }\r\n :host([variant=\"outlined\"]) .label {\r\n margin-top: calc(0px - var(--_form-field-label-line-height) / 2);\r\n }\r\n :host([variant=\"outlined\"]) .outline {\r\n position: absolute;\r\n display: flex;\r\n pointer-events: none;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n }\r\n :host([variant=\"outlined\"]) .pseudo-label {\r\n visibility: hidden;\r\n margin-inline-end: 0.5rem;\r\n font-size: var(--_form-field-label-font-size);\r\n line-height: var(--_form-field-label-line-height);\r\n letter-spacing: var(--_form-field-label-tracking);\r\n max-width: 100%;\r\n transition-property: max-width, margin-inline-end;\r\n transition-duration: 1ms;\r\n }\r\n :host(\r\n :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label))\r\n )\r\n .pseudo-label,\r\n :host(\r\n :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label))\r\n )\r\n .required-marker {\r\n display: none;\r\n }\r\n :host([variant=\"outlined\"]:is(:state(--required), :--required):not([hide-required-marker])) .pseudo-label {\r\n margin-inline-end: 0.25rem;\r\n }\r\n :host(\r\n [variant=\"outlined\"][float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(\r\n :is(:state(--pressed), :--pressed)\r\n )\r\n )\r\n .pseudo-label {\r\n max-width: 0;\r\n margin-inline-end: 0px;\r\n transition-delay: ${DesignToken.motion.duration.short2};\r\n }\r\n :host([variant=\"outlined\"]) .outline-start,\r\n :host([variant=\"outlined\"]) .outline-notch,\r\n :host([variant=\"outlined\"]) .outline-end {\r\n box-sizing: border-box;\r\n border-width: var(--_form-field-outline-size, 1px);\r\n border-color: var(--_form-field-outline-color);\r\n transition: border-color ${DesignToken.motion.duration.short4};\r\n }\r\n :host([variant=\"outlined\"]:not(:is(:state(--with-label), :--with-label))) .outline-notch {\r\n display: none;\r\n }\r\n :host([variant=\"outlined\"]) .outline-start {\r\n min-width: 0.75rem;\r\n border-top-style: solid;\r\n border-inline-start-style: solid;\r\n border-bottom-style: solid;\r\n border-start-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n }\r\n :host([variant=\"outlined\"]) .outline-notch {\r\n border-bottom-style: solid;\r\n }\r\n :host([variant=\"outlined\"]) .outline-end {\r\n flex-grow: 1;\r\n min-width: 1rem;\r\n border-top-style: solid;\r\n border-inline-end-style: solid;\r\n border-bottom-style: solid;\r\n border-start-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n }\r\n :host([variant=\"outlined\"]:is(:state(--with-prefix), :--with-prefix)) .outline-start {\r\n min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem);\r\n }\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled))) .base:hover .outline,\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):focus-within) .outline,\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed)) .outline {\r\n --_form-field-outline-size: 2px;\r\n }\r\n :host([variant=\"outlined\"]) .subscript {\r\n margin-inline: 1rem;\r\n width: calc(100% - 2rem);\r\n }\r\n :host([variant=\"outlined\"]) .content {\r\n min-height: calc(3.5rem + ${DesignToken.density.calc(-3)});\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n }\r\n :host(\r\n [variant=\"outlined\"][float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(\r\n :is(:state(--pressed), :--pressed)\r\n )\r\n )\r\n .label {\r\n margin-top: unset;\r\n line-height: calc(3.5rem + ${DesignToken.density.calc(-3)});\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n }\r\n :host([variant=\"filled\"]) .base {\r\n --_select-arrow-margin-top: calc(\r\n 0px - calc(1rem / max(calc(0 - calc(var(--md-sys-density-scale, 0) + var(--md-sys-density-scale, 0))), 1))\r\n );\r\n }\r\n :host([variant=\"filled\"]) .base::before {\r\n content: \"\";\r\n box-sizing: border-box;\r\n position: absolute;\r\n pointer-events: none;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n border-bottom-style: solid;\r\n border-width: 1px;\r\n border-radius: var(--m3e-form-field-container-shape, ${DesignToken.shape.corner.extraSmallTop});\r\n border-color: var(--_form-field-outline-color);\r\n background-color: var(--_form-field-container-color);\r\n }\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled))) .base:hover::before,\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):focus-within) .base::before,\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed))\r\n .base::before {\r\n border-width: 3px;\r\n }\r\n :host([variant=\"filled\"]) .base::after {\r\n content: \"\";\r\n box-sizing: border-box;\r\n position: absolute;\r\n pointer-events: none;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: var(--_form-field-hover-container-color);\r\n transition: background-color ${DesignToken.motion.duration.short4};\r\n }\r\n :host([variant=\"filled\"]) .subscript {\r\n margin-inline: 1rem;\r\n width: calc(100% - 2rem);\r\n }\r\n :host([variant=\"filled\"]) .content {\r\n padding-top: calc(1.5rem + ${DesignToken.density.calc(-3)});\r\n margin-bottom: 0.5rem;\r\n }\r\n :host([variant=\"filled\"]) .label {\r\n top: max(0px, calc(0.5rem + ${DesignToken.density.calc(-3)}));\r\n }\r\n :host(\r\n [variant=\"filled\"][float-label=\"auto\"]:not(:is(:state(--float-label), :--float-label)):not(\r\n :is(:state(--pressed), :--pressed)\r\n )\r\n )\r\n .label {\r\n top: 0px;\r\n line-height: calc(3.5rem + ${DesignToken.density.calc(-3)} - 0.0625rem);\r\n --_form-field-label-font-size: var(\r\n --m3e-form-field-label-font-size,\r\n ${DesignToken.typescale.standard.body.small.fontSize}\r\n );\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):not(:focus-within):not(:is(:state(--pressed), :--pressed)))\r\n .base:hover {\r\n --_form-field-hover-container-color: color-mix(\r\n in srgb,\r\n var(--m3e-form-field-hover-container-color, ${DesignToken.color.onSurface})\r\n var(--m3e-form-field-hover-container-opacity, 8%),\r\n transparent\r\n );\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) {\r\n color: var(--m3e-form-field-color, ${DesignToken.color.onSurface});\r\n }\r\n :host([variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)))\r\n .base {\r\n --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.outline});\r\n }\r\n :host([variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base {\r\n --_form-field-outline-color: var(--m3e-form-field-outline-color, ${DesignToken.color.onSurfaceVariant});\r\n }\r\n :host(\r\n [variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):not(\r\n :is(:state(--invalid), :--invalid)\r\n ):focus-within\r\n )\r\n .base,\r\n :host(\r\n [variant=\"outlined\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is(\r\n :state(--pressed),\r\n :--pressed\r\n )\r\n )\r\n .base,\r\n :host(\r\n [variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):not(\r\n :is(:state(--invalid), :--invalid)\r\n ):focus-within\r\n )\r\n .base,\r\n :host(\r\n [variant=\"filled\"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is(\r\n :state(--pressed),\r\n :--pressed\r\n )\r\n )\r\n .base {\r\n --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${DesignToken.color.primary});\r\n --_form-field-label-color: var(--m3e-form-field-focused-color, ${DesignToken.color.primary});\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled))) .base {\r\n --_form-field-container-color: var(\r\n --m3e-form-field-container-color,\r\n ${DesignToken.color.surfaceContainerHighest}\r\n );\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .base {\r\n --_form-field-label-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error});\r\n --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error});\r\n }\r\n :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .subscript {\r\n color: var(--m3e-form-field-invalid-color, ${DesignToken.color.error});\r\n }\r\n :host(:is(:state(--disabled), :--disabled)) {\r\n color: color-mix(\r\n in srgb,\r\n var(--m3e-form-field-disabled-color, ${DesignToken.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%),\r\n transparent\r\n );\r\n }\r\n :host(:is(:state(--disabled), :--disabled)) .base {\r\n --_form-field-container-color: color-mix(\r\n in srgb,\r\n var(--m3e-form-field-disabled-container-color, ${DesignToken.color.onSurface})\r\n var(--m3e-form-field-disabled-container-opacity, 4%),\r\n transparent\r\n );\r\n }\r\n :host(:is(:state(--no-animate), :--no-animate)) *,\r\n :host(:is(:state(--no-animate), :--no-animate)) *::before,\r\n :host(:is(:state(--no-animate), :--no-animate)) *::after {\r\n transition: none !important;\r\n }\r\n @media (forced-colors: active) {\r\n :host([variant=\"filled\"]) .base::after {\r\n transition: none;\r\n }\r\n :host {\r\n --_form-field-outline-color: CanvasText;\r\n }\r\n :host(:is(:state(--disabled), :--disabled)) {\r\n --_form-field-input-color: GrayText;\r\n --_form-field-color: GrayText;\r\n --_form-field-label-color: GrayText;\r\n --_form-field-outline-color: GrayText;\r\n }\r\n }\r\n @media (prefers-reduced-motion) {\r\n .base::before,\r\n .prefix-text,\r\n .suffix-text,\r\n .label,\r\n .subscript,\r\n .outline-start,\r\n .outline-notch,\r\n .outline-end,\r\n .pseudo-label {\r\n transition: none !important;\r\n }\r\n }\r\n `;\r\n\r\n /** @private */ #control: FormFieldControl | null = null;\r\n /** @private */ #removeValueInterceptor?: () => void;\r\n /** @private */ readonly #formResetHandler = () => this.#handleFormReset();\r\n /** @private */ readonly #controlInvalidHandler = () => this.#handleControlInvalid();\r\n\r\n /** @private */\r\n readonly #controlMutationController = new MutationController(this, {\r\n target: null,\r\n config: { attributeFilter: [\"disabled\", \"readonly\", \"required\"] },\r\n callback: () => this.notifyControlStateChange(),\r\n });\r\n\r\n /** @private */\r\n readonly #resizeController = new ResizeController(this, {\r\n target: null,\r\n callback: () => this.#handlePrefixResize(),\r\n });\r\n\r\n /** @private */\r\n readonly #focusController = new FocusController(this, {\r\n target: null,\r\n filter: (e) => this.#ignoreEvent(e),\r\n callback: (focused) => {\r\n focused = focused && !(this.#control?.disabled ?? true);\r\n setCustomState(this, \"--no-animate\", false);\r\n this.#focused = focused;\r\n if (focused) {\r\n setCustomState(this, \"--float-label\", true);\r\n } else {\r\n this._invalid = !(this.#control?.checkValidity?.() ?? true);\r\n this.notifyControlStateChange();\r\n }\r\n },\r\n });\r\n\r\n /** @private */ @query(\".base\") private readonly _base!: HTMLElement;\r\n /** @private */ @query(\".prefix\") private readonly _prefix!: HTMLElement;\r\n /** @private */ @query(\".suffix\") private readonly _suffix!: HTMLElement;\r\n /** @private */ @query(\".error\") private readonly _error!: HTMLElement;\r\n /** @private */ @query(\".hint\") private readonly _hint!: HTMLElement;\r\n\r\n /** @private */\r\n readonly #hintMutationController = new MutationController(this, {\r\n target: null,\r\n config: { childList: true, subtree: true },\r\n callback: () => this.#handleHintChange(),\r\n });\r\n\r\n /** @private */\r\n readonly #errorMutationController = new MutationController(this, {\r\n target: null,\r\n config: { childList: true, subtree: true },\r\n callback: () => this.#handleErrorChange(),\r\n });\r\n\r\n /** @private */\r\n readonly #pressedController = new PressedController(this, {\r\n target: null,\r\n filter: (e) => this.#ignoreEvent(e),\r\n callback: (pressed) => setCustomState(this, \"--pressed\", pressed && !(this.#control?.disabled ?? true)),\r\n });\r\n\r\n /** @private */ #focused = false;\r\n /** @private */ @state() private _pseudoLabel = \"\";\r\n /** @private */ @state() private _required = false;\r\n /** @private */ @state() private _invalid = false;\r\n /** @private */ @state() private _validationMessage = \"\";\r\n /** @private */ #hintText = \"\";\r\n /** @private */ #errorText = \"\";\r\n\r\n constructor() {\r\n super();\r\n\r\n new HoverController(this, { callback: () => setCustomState(this, \"--no-animate\", false) });\r\n }\r\n\r\n /** @private */\r\n get #shouldFloatLabel(): boolean {\r\n return this.#control?.shouldLabelFloat !== undefined\r\n ? this.#control.shouldLabelFloat === true\r\n : typeof this.#control?.value == \"string\" && this.#control.value.length > 0;\r\n }\r\n\r\n /** A reference to the element used to anchor dropdown menus. */\r\n get menuAnchor() {\r\n return this._base;\r\n }\r\n\r\n /** A reference to the hosted form field control. */\r\n get control() {\r\n return this.#control;\r\n }\r\n\r\n /**\r\n * The appearance variant of the field.\r\n * @default \"outlined\"\r\n */\r\n @property({ reflect: true }) variant: FormFieldVariant = \"outlined\";\r\n\r\n /**\r\n * Whether the required marker should be hidden.\r\n * @default false\r\n */\r\n @property({ attribute: \"hide-required-marker\", type: Boolean, reflect: true }) hideRequiredMarker = false;\r\n\r\n /**\r\n * Whether subscript content is hidden.\r\n * @default \"auto\"\r\n */\r\n @property({ attribute: \"hide-subscript\", reflect: true }) hideSubscript: HideSubscriptType = \"auto\";\r\n\r\n /**\r\n * Specifies whether the label should float always or only when necessary.\r\n * @default \"auto\"\r\n */\r\n @property({ attribute: \"float-label\", reflect: true }) floatLabel: FloatLabelType = \"auto\";\r\n\r\n /**\r\n * Notifies the form field that the state of the hosted `control` has changed.\r\n * @param {boolean} [checkValidity=false] Whether to check validity.\r\n */\r\n notifyControlStateChange(checkValidity: boolean = false): void {\r\n this._required = this.#control?.required === true;\r\n setCustomState(this, \"--required\", this._required);\r\n setCustomState(this, \"--disabled\", this.#control?.disabled === true);\r\n setCustomState(this, \"--readonly\", isReadOnlyMixin(this.#control) && this.#control.readOnly === true);\r\n if (this.floatLabel === \"auto\") {\r\n setCustomState(this, \"--float-label\", this.#shouldFloatLabel || this.#focused);\r\n }\r\n\r\n if (checkValidity) {\r\n this._invalid = !(this.#control?.checkValidity?.() ?? true);\r\n }\r\n\r\n setCustomState(this, \"--invalid\", this._invalid);\r\n\r\n this._validationMessage = this.#control?.validationMessage ?? \"\";\r\n if (!this.isUpdatePending) {\r\n this.performUpdate();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n // Label animations are disabled on initial paint.\r\n setCustomState(this, \"--no-animate\", true);\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.#changeControl(null);\r\n }\r\n\r\n /** @inheritdoc */\r\n override reconnectedCallback(): void {\r\n super.reconnectedCallback();\r\n this.#initialize();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues): void {\r\n super.firstUpdated(_changedProperties);\r\n this.#initialize();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"_invalid\") && this.#control) {\r\n this.#control.ariaInvalid = this._invalid ? \"true\" : null;\r\n\r\n if (this.#errorText) {\r\n if (this._invalid) {\r\n M3eAriaDescriber.describe(this.#control, this.#errorText);\r\n } else {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#errorText);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<div class=\"base\" @click=\"${this.#handleContainerClick}\">\r\n ${this.variant === \"outlined\"\r\n ? html`<div class=\"outline\" aria-hidden=\"true\">\r\n <div class=\"outline-start\"></div>\r\n <div class=\"outline-notch\">\r\n <div class=\"pseudo-label\">\r\n ${this._pseudoLabel} ${!this.hideRequiredMarker && this._required ? html`&nbsp;*` : nothing}\r\n </div>\r\n </div>\r\n <div class=\"outline-end\"></div>\r\n </div>`\r\n : nothing}\r\n <div class=\"prefix\">\r\n <slot name=\"prefix\" @slotchange=\"${this.#handlePrefixSlotChange}\"></slot>\r\n </div>\r\n <div class=\"content\">\r\n <span class=\"prefix-text\"><slot name=\"prefix-text\"></slot></span>\r\n <span class=\"input\">\r\n <slot @slotchange=\"${this.#handleSlotChange}\" @change=\"${this.#handleControlChange}\"></slot>\r\n </span>\r\n <span class=\"suffix-text\"><slot name=\"suffix-text\"></slot></span>\r\n <span class=\"label\">\r\n <slot name=\"label\" @slotchange=\"${this.#handleLabelSlotChange}\"></slot>\r\n ${!this.hideRequiredMarker && this._required\r\n ? html`<span class=\"required-marker\" aria-hidden=\"true\">&nbsp;*</span>`\r\n : nothing}\r\n </span>\r\n </div>\r\n <div class=\"suffix\">\r\n <slot name=\"suffix\" @slotchange=\"${this.#handleSuffixSlotChange}\"></slot>\r\n </div>\r\n </div>\r\n <span class=\"subscript\" aria-hidden=\"true\">\r\n <span class=\"error\"><slot name=\"error\">${this._validationMessage}</slot></span>\r\n <span class=\"hint\"><slot name=\"hint\"></slot></span>\r\n </span>`;\r\n }\r\n\r\n /** @private */\r\n #initialize(): void {\r\n this.#focusController.observe(this._base);\r\n this.#pressedController.observe(this._base);\r\n\r\n this.#hintMutationController.observe(this._hint);\r\n this.#handleHintChange();\r\n\r\n this.#errorMutationController.observe(this._error);\r\n this.#handleErrorChange();\r\n }\r\n\r\n /** @private */\r\n #handleLabelSlotChange(e: Event): void {\r\n const assignedElements = (<HTMLSlotElement>e.target).assignedElements({ flatten: true });\r\n setCustomState(this, \"--with-label\", assignedElements.length > 0);\r\n this._pseudoLabel = assignedElements[0]?.textContent ?? \"\";\r\n }\r\n\r\n /** @private */\r\n #handlePrefixSlotChange(e: Event): void {\r\n setCustomState(this, \"--with-prefix\", hasAssignedNodes(<HTMLSlotElement>e.target));\r\n this.#resizeController.observe(this._prefix);\r\n }\r\n\r\n /** @private */\r\n #handleSuffixSlotChange(e: Event): void {\r\n setCustomState(this, \"--with-suffix\", hasAssignedNodes(<HTMLSlotElement>e.target));\r\n }\r\n\r\n /** @private */\r\n #handlePrefixResize(): void {\r\n if (this.variant === \"outlined\") {\r\n this._base.style.setProperty(\"--_prefix-width\", `${this._prefix.clientWidth}px`);\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleSlotChange(e: Event): void {\r\n this.#changeControl(findFormFieldControl(<HTMLSlotElement>e.target));\r\n }\r\n\r\n /** @private */\r\n #handleContainerClick(e: MouseEvent): void {\r\n if (this.#ignoreEvent(e)) return;\r\n\r\n if (this.#control && !this.#focused && !this.#control.disabled) {\r\n if (this.#control.onContainerClick) {\r\n this.#control.onContainerClick(e);\r\n } else {\r\n this.#control.focus();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleControlInvalid(): void {\r\n this._invalid = true;\r\n this.notifyControlStateChange();\r\n }\r\n\r\n /** @private */\r\n #handleControlChange(): void {\r\n this._invalid = !(this.#control?.checkValidity?.() ?? true);\r\n this.notifyControlStateChange();\r\n }\r\n\r\n /** @private */\r\n #handleFormReset(): void {\r\n this._invalid = false;\r\n setTimeout(() => this.notifyControlStateChange());\r\n }\r\n\r\n /** @private */\r\n #ignoreEvent(e: Event): boolean {\r\n return e.composed && e.composedPath().includes(this._suffix);\r\n }\r\n\r\n /** @private */\r\n #changeControl(control: FormFieldControl | null): void {\r\n if (this.#control === control) return;\r\n if (this.#control) {\r\n if (this.#hintText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#hintText);\r\n }\r\n if (this.#errorText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#errorText);\r\n }\r\n\r\n this.#controlMutationController.unobserve(this.#control);\r\n this.#control.removeEventListener(\"invalid\", this.#controlInvalidHandler);\r\n this.#control.form?.removeEventListener(\"reset\", this.#formResetHandler);\r\n this.#removeValueInterceptor?.();\r\n this.#removeValueInterceptor = undefined;\r\n }\r\n this.#control = control;\r\n\r\n if ([\"INPUT\", \"TEXTAREA\"].includes(this.#control?.tagName ?? \"\")) {\r\n this._base.style.setProperty(\"--_form-field-cursor\", \"text\");\r\n } else {\r\n this._base.style.removeProperty(\"--_form-field-cursor\");\r\n }\r\n\r\n setCustomState(this, \"--with-select\", this.#control?.tagName === \"M3E-SELECT\");\r\n if (hasCustomState(this, \"--with-select\")) {\r\n this._base.style.setProperty(\"--_form-field-cursor\", \"pointer\");\r\n }\r\n\r\n if (this.#control) {\r\n this.#controlMutationController.observe(this.#control);\r\n this.#control.addEventListener(\"invalid\", this.#controlInvalidHandler);\r\n this.#control.form?.addEventListener(\"reset\", this.#formResetHandler);\r\n this.#control.removeAttribute(\"aria-invalid\");\r\n\r\n if (this.#hintText) {\r\n M3eAriaDescriber.describe(this.#control, this.#hintText);\r\n }\r\n\r\n this.notifyControlStateChange();\r\n\r\n const tagname = this.#control.tagName.toLowerCase();\r\n if (tagname.startsWith(\"m3e-\") && !customElements.get(tagname)) {\r\n customElements.whenDefined(tagname).then(() => this.#bindValueInterceptor());\r\n } else {\r\n this.#bindValueInterceptor();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #bindValueInterceptor(): void {\r\n if (!this.#control) return;\r\n this.#removeValueInterceptor = interceptProperty(this.#control, \"value\", {\r\n set: (value, setter) => {\r\n setter(value);\r\n this.notifyControlStateChange(true);\r\n },\r\n });\r\n }\r\n\r\n /** @private */\r\n #handleHintChange(): void {\r\n const hintText = getTextContent(this._hint, true);\r\n if (hintText === this.#hintText) return;\r\n\r\n if (this.#control && this.#hintText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#hintText);\r\n }\r\n\r\n this.#hintText = hintText;\r\n\r\n if (this.#control && this.#hintText) {\r\n M3eAriaDescriber.describe(this.#control, this.#hintText);\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleErrorChange(): void {\r\n const errorText = getTextContent(this._error, true);\r\n if (errorText === this.#errorText) return;\r\n\r\n if (this.#control && this.#errorText) {\r\n M3eAriaDescriber.removeDescription(this.#control, this.#errorText);\r\n }\r\n\r\n this.#errorText = errorText;\r\n\r\n if (this.#control && this.#errorText && this._invalid) {\r\n M3eAriaDescriber.describe(this.#control, this.#errorText);\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-form-field\": M3eFormFieldElement;\r\n }\r\n}\r\n"],"names":["KNOWN_FORM_FIELD_TAGS","isFormFieldControl","value","HTMLElement","HTMLInputElement","HTMLTextAreaElement","HTMLSelectElement","includes","tagName","toLowerCase","findFormFieldControl","slot","element","assignedElements","flatten","walker","document","createTreeWalker","NodeFilter","SHOW_ELEMENT","nextNode","currentNode","M3eFormFieldElement","ReconnectedCallback","AttachInternals","LitElement","constructor","super","_M3eFormFieldElement_control","set","this","_M3eFormFieldElement_removeValueInterceptor","_M3eFormFieldElement_formResetHandler","__classPrivateFieldGet","_M3eFormFieldElement_instances","_M3eFormFieldElement_handleFormReset","call","_M3eFormFieldElement_controlInvalidHandler","_M3eFormFieldElement_handleControlInvalid","_M3eFormFieldElement_controlMutationController","MutationController","target","config","attributeFilter","callback","notifyControlStateChange","_M3eFormFieldElement_resizeController","ResizeController","_M3eFormFieldElement_handlePrefixResize","_M3eFormFieldElement_focusController","FocusController","filter","e","_M3eFormFieldElement_ignoreEvent","focused","disabled","setCustomState","__classPrivateFieldSet","_M3eFormFieldElement_focused","_invalid","checkValidity","_M3eFormFieldElement_hintMutationController","childList","subtree","_M3eFormFieldElement_handleHintChange","_M3eFormFieldElement_errorMutationController","_M3eFormFieldElement_handleErrorChange","_M3eFormFieldElement_pressedController","PressedController","pressed","_pseudoLabel","_required","_validationMessage","_M3eFormFieldElement_hintText","_M3eFormFieldElement_errorText","variant","hideRequiredMarker","hideSubscript","floatLabel","HoverController","menuAnchor","_base","control","required","isReadOnlyMixin","readOnly","_M3eFormFieldElement_shouldFloatLabel_get","validationMessage","isUpdatePending","performUpdate","connectedCallback","disconnectedCallback","_M3eFormFieldElement_changeControl","reconnectedCallback","_M3eFormFieldElement_initialize","firstUpdated","_changedProperties","update","changedProperties","has","ariaInvalid","M3eAriaDescriber","describe","removeDescription","render","html","_M3eFormFieldElement_handleContainerClick","nothing","_M3eFormFieldElement_handlePrefixSlotChange","_M3eFormFieldElement_handleSlotChange","_M3eFormFieldElement_handleControlChange","_M3eFormFieldElement_handleLabelSlotChange","_M3eFormFieldElement_handleSuffixSlotChange","undefined","shouldLabelFloat","length","observe","_hint","_error","textContent","hasAssignedNodes","_prefix","style","setProperty","clientWidth","onContainerClick","focus","setTimeout","composed","composedPath","_suffix","unobserve","removeEventListener","form","removeProperty","hasCustomState","addEventListener","removeAttribute","tagname","startsWith","customElements","get","whenDefined","then","_M3eFormFieldElement_bindValueInterceptor","interceptProperty","setter","hintText","getTextContent","errorText","registerStyleSheet","css","DesignToken","motion","duration","extraLong1","density","calc","styles","typescale","standard","body","large","fontSize","fontWeight","lineHeight","tracking","small","unsafeCSS","short4","color","onSurfaceVariant","scrollbar","thinWidth","short2","shape","corner","extraSmall","extraSmallTop","onSurface","outline","primary","surfaceContainerHighest","error","__decorate","query","prototype","state","property","reflect","attribute","type","Boolean","customElement"],"mappings":";;;;;;;;;;;;;GA6CA,MAAMA,EAAwB,CAAC,qBAAsB,cAO/C,SAAUC,EAAmBC,GACjC,OACEA,aAAiBC,cAChBD,aAAiBE,kBAChBF,aAAiBG,qBACjBH,aAAiBI,mBACjBN,EAAsBO,SAASL,EAAMM,QAAQC,eAEnD,CAOM,SAAUC,EAAqBC,GACnC,IAAK,MAAMC,KAAWD,EAAKE,iBAAiB,CAAEC,SAAS,IAAS,CAC9D,GAAIb,EAAmBW,GACrB,OAAOA,EAGT,MAAMG,EAASC,SAASC,iBAAiBL,EAASM,WAAWC,cAC7D,KAAOJ,EAAOK,YACZ,GAAInB,EAAmBc,EAAOM,aAC5B,OAAON,EAAOM,WAGpB,CAEA,OAAO,IACT;;;;;;;;0EC4BO,IAAMC,GAAN,cAAkCC,EAAoBC,EAAgBC,KAsjB3EC,WAAAA,GACEC,oBAvEcC,EAAAC,IAAAC,KAAoC,MACpCC,EAAAF,IAAAC,aACSE,EAAAH,IAAAC,KAAoB,IA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AA,CAAlCC,EAAM,YAAkDnK,GAAAoK,UAAA,kBACvBF,EAAA,CAAjCC,EAAM,WAAgDnK,GAAAoK,UAAA,iBACtBF,EAAA,CAAhCC,EAAM,UAA8CnK,GAAAoK,UAAA,gBAwBpCF,EAAA,CAAhBG,KAAkCrK,GAAAoK,UAAA,uBAClBF,EAAA,CAAhBG,KAAkCrK,GAAAoK,UAAA,oBAClBF,EAAA,CAAhBG,KAAiCrK,GAAAoK,UAAA,mBACjBF,EAAA,CAAhBG,KAAwCrK,GAAAoK,UAAA,6BA+B5BF,EAAA,CAA5BI,EAAS,CAAEC,SAAS,KAA+CvK,GAAAoK,UAAA,eAAA,GAMWF,EAAA,CAA9EI,EAAS,CAAEE,UAAW,uBAAwBC,KAAMC,QAASH,SAAS,KAAmCvK,GAAAoK,UAAA,0BAAA,GAMhDF,EAAA,CAAzDI,EAAS,CAAEE,UAAW,iBAAkBD,SAAS,KAAkDvK,GAAAoK,UAAA,qBAAA,GAM7CF,EAAA,CAAtDI,EAAS,CAAEE,UAAW,cAAeD,SAAS,KAA4CvK,GAAAoK,UAAA,kBAAA,GAnmBhFpK,GAAmBkK,EAAA,CAD/BS,EAAc,mBACF3K"}
@@ -845,7 +845,7 @@
845
845
  },
846
846
  {
847
847
  "name": "m3e-rich-tooltip",
848
- "description": "Provides contextual details for a control, such as explaining the value or purpose of a feature.\n---\n\n\n### **Events:**\n - **beforetoggle** - Dispatched before the toggle state changes.\n- **toggle** - Dispatched after the toggle state has changed.\n\n### **Methods:**\n - **show(): _Promise<void>_** - Manually shows the tooltip.\n- **hide(restoreFocus): _void_** - Manually hides the tooltip.\n- **attach(control: _HTMLElement_): _void_** - Attaches the element to an interactive control.\n- **detach(): _void_** - Detaches the element from its current interactive control.\n\n### **Slots:**\n - _default_ - The main supporting text of the tooltip.\n- **subhead** - Optional subhead text displayed above the supporting content.\n- **actions** - Optional action elements displayed at the bottom of the tooltip.\n\n### **CSS Properties:**\n - **--m3e-rich-tooltip-padding-top** - Top padding of the tooltip container. _(default: undefined)_\n- **--m3e-rich-tooltip-padding-bottom** - Bottom padding of the tooltip container (when no actions are present). _(default: undefined)_\n- **--m3e-rich-tooltip-padding-inline** - Horizontal padding of the tooltip container. _(default: undefined)_\n- **--m3e-rich-tooltip-max-width** - Maximum width of the tooltip surface. _(default: undefined)_\n- **--m3e-rich-tooltip-shape** - Border‑radius of the tooltip container. _(default: undefined)_\n- **--m3e-rich-tooltip-container-color** - Background color of the tooltip surface. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-color** - Color of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-font-size** - Font size of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-font-weight** - Font weight of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-line-height** - Line height of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-tracking** - Letter‑spacing of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-bottom-space** - Space below the subhead before the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-color** - Color of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-font-size** - Font size of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-font-weight** - Font weight of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-line-height** - Line height of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-tracking** - Letter‑spacing of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-actions-padding-inline** - Horizontal padding applied to the actions slot area. _(default: undefined)_\n- **--m3e-rich-tooltip-actions-top-space** - Space above the actions slot. _(default: undefined)_\n- **--m3e-rich-tooltip-actions-bottom-space** - Space below the actions slot. _(default: undefined)_",
848
+ "description": "Provides contextual details for a control, such as explaining the value or purpose of a feature.\n---\n\n\n### **Events:**\n - **beforetoggle** - Dispatched before the toggle state changes.\n- **toggle** - Dispatched after the toggle state has changed.\n\n### **Methods:**\n - **hide(restoreFocus): _void_** - Manually hides the tooltip.\n- **attach(control: _HTMLElement_): _void_** - Attaches the element to an interactive control.\n- **detach(): _void_** - Detaches the element from its current interactive control.\n- **show(): _Promise<void>_** - Manually shows the tooltip.\n\n### **Slots:**\n - _default_ - The main supporting text of the tooltip.\n- **subhead** - Optional subhead text displayed above the supporting content.\n- **actions** - Optional action elements displayed at the bottom of the tooltip.\n\n### **CSS Properties:**\n - **--m3e-rich-tooltip-padding-top** - Top padding of the tooltip container. _(default: undefined)_\n- **--m3e-rich-tooltip-padding-bottom** - Bottom padding of the tooltip container (when no actions are present). _(default: undefined)_\n- **--m3e-rich-tooltip-padding-inline** - Horizontal padding of the tooltip container. _(default: undefined)_\n- **--m3e-rich-tooltip-max-width** - Maximum width of the tooltip surface. _(default: undefined)_\n- **--m3e-rich-tooltip-shape** - Border‑radius of the tooltip container. _(default: undefined)_\n- **--m3e-rich-tooltip-container-color** - Background color of the tooltip surface. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-color** - Color of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-font-size** - Font size of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-font-weight** - Font weight of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-line-height** - Line height of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-tracking** - Letter‑spacing of the subhead text. _(default: undefined)_\n- **--m3e-rich-tooltip-subhead-bottom-space** - Space below the subhead before the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-color** - Color of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-font-size** - Font size of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-font-weight** - Font weight of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-line-height** - Line height of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-supporting-text-tracking** - Letter‑spacing of the supporting text. _(default: undefined)_\n- **--m3e-rich-tooltip-actions-padding-inline** - Horizontal padding applied to the actions slot area. _(default: undefined)_\n- **--m3e-rich-tooltip-actions-top-space** - Space above the actions slot. _(default: undefined)_\n- **--m3e-rich-tooltip-actions-bottom-space** - Space below the actions slot. _(default: undefined)_",
849
849
  "attributes": [
850
850
  {
851
851
  "name": "disabled",
@@ -931,6 +931,11 @@
931
931
  "description": "End of a date range.",
932
932
  "values": [{ "name": "Date" }]
933
933
  },
934
+ {
935
+ "name": "active",
936
+ "description": "Whether the view is active.",
937
+ "values": []
938
+ },
934
939
  {
935
940
  "name": "today",
936
941
  "description": "Today's date.",
@@ -963,6 +968,11 @@
963
968
  "name": "m3e-multi-year-view",
964
969
  "description": "An internal component used to display a year selector in a calendar.\n---\n\n\n### **Events:**\n - **change**\n- **active-change**\n\n### **Methods:**\n - **focusActiveCell(): _Promise<void>_** - Asynchronously focuses the active date.",
965
970
  "attributes": [
971
+ {
972
+ "name": "active",
973
+ "description": "Whether the view is active.",
974
+ "values": []
975
+ },
966
976
  {
967
977
  "name": "today",
968
978
  "description": "Today's date.",
@@ -995,6 +1005,11 @@
995
1005
  "name": "m3e-year-view",
996
1006
  "description": "An internal component used to display a single year in a calendar.\n---\n\n\n### **Events:**\n - **change**\n- **active-change**\n\n### **Methods:**\n - **focusActiveCell(): _Promise<void>_** - Asynchronously focuses the active date.",
997
1007
  "attributes": [
1008
+ {
1009
+ "name": "active",
1010
+ "description": "Whether the view is active.",
1011
+ "values": []
1012
+ },
998
1013
  {
999
1014
  "name": "today",
1000
1015
  "description": "Today's date.",
@@ -1025,7 +1040,7 @@
1025
1040
  },
1026
1041
  {
1027
1042
  "name": "m3e-calendar",
1028
- "description": "A calendar used to select a date.\n---\n\n\n### **Events:**\n - **change** - Dispatched when the selected date changes.\n\n### **Methods:**\n - **focusActiveCell(): _Promise<void>_** - Asynchronously focuses the active date.\n- **updateTodayDate(): _void_** - Updates today's date.\n- **movePreviousPeriod(): _Promise<void>_** - Moves the calendar to the previous period.\n- **moveNextPeriod(): _Promise<void>_** - Moves the calendar to the next period.\n- **togglePeriod(): _Promise<void>_** - Toggles the current period.\n\n### **Slots:**\n - **header** - Renders the header of the calendar.\n\n### **CSS Properties:**\n - **--m3e-calendar-container-color** - Background color of the container surface. _(default: undefined)_\n- **--m3e-calendar-container-elevation** - Elevation shadow applied to the container surface. _(default: undefined)_\n- **--m3e-calendar-container-shape** - Corner radius of the container surface. _(default: undefined)_\n- **--m3e-calendar-padding** - Padding applied to the calendar header and body. _(default: undefined)_\n- **--m3e-calendar-period-button-text-color** - Text color used for the period‑navigation buttons in the header. _(default: undefined)_\n- **--m3e-calendar-weekday-font-size** - Font size of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-font-weight** - Font weight of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-line-height** - Line height of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-tracking** - Letter spacing of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-color** - Text color for weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-date-font-size** - Font size of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-date-font-weight** - Font weight of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-date-line-height** - Line height of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-date-tracking** - Letter spacing of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-item-font-size** - Font size of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-font-weight** - Font weight of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-line-height** - Line height of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-tracking** - Letter spacing of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-color** - Text color for date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-color** - Text color for selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-container-color** - Background color for selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-ripple-color** - Ripple color used when interacting with selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-hover-color** - Hover color used when interacting with selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-focus-color** - Focus color used when interacting with selected date items. _(default: undefined)_\n- **--m3e-calendar-item-current-outline-thickness** - Outline thickness used to indicate the current date. _(default: undefined)_\n- **--m3e-calendar-item-current-outline-color** - Outline color used to indicate the current date. _(default: undefined)_\n- **--m3e-calendar-item-special-color** - Text color for dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-container-color** - Background color for dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-ripple-color** - Ripple color used when interacting with dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-hover-color** - Hover color used when interacting with dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-focus-color** - Focus color used when interacting with dates marked as special. _(default: undefined)_\n- **--m3e-calendar-range-container-color** - Background color applied to the selected date range. _(default: undefined)_\n- **--m3e-calendar-range-color** - Text color for dates within a selected range. _(default: undefined)_\n- **--m3e-calendar-item-disabled-color** - Color used for disabled date items. _(default: undefined)_\n- **--m3e-calendar-item-disabled-color-opacity** - Opacity applied to the disabled item color. _(default: undefined)_\n- **--m3e-calendar-slide-animation-duration** - Duration of slide transitions between calendar views. _(default: undefined)_",
1043
+ "description": "A calendar used to select a date.\n---\n\n\n### **Events:**\n - **change** - Dispatched when the selected date changes.\n\n### **Methods:**\n - **focusActiveCell(): _Promise<void>_** - Asynchronously focuses the active date.\n- **updateTodayDate(): _void_** - Updates today's date.\n- **resetActiveView(): _void_** - Resets the active view.\n- **movePreviousPeriod(): _Promise<void>_** - Moves the calendar to the previous period.\n- **moveNextPeriod(): _Promise<void>_** - Moves the calendar to the next period.\n- **togglePeriod(): _Promise<void>_** - Toggles the current period.\n\n### **Slots:**\n - **header** - Renders the header of the calendar.\n\n### **CSS Properties:**\n - **--m3e-calendar-container-color** - Background color of the container surface. _(default: undefined)_\n- **--m3e-calendar-container-elevation** - Elevation shadow applied to the container surface. _(default: undefined)_\n- **--m3e-calendar-container-shape** - Corner radius of the container surface. _(default: undefined)_\n- **--m3e-calendar-padding** - Padding applied to the calendar header and body. _(default: undefined)_\n- **--m3e-calendar-period-button-text-color** - Text color used for the period‑navigation buttons in the header. _(default: undefined)_\n- **--m3e-calendar-weekday-font-size** - Font size of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-font-weight** - Font weight of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-line-height** - Line height of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-tracking** - Letter spacing of weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-weekday-color** - Text color for weekday labels in month view. _(default: undefined)_\n- **--m3e-calendar-date-font-size** - Font size of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-date-font-weight** - Font weight of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-date-line-height** - Line height of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-date-tracking** - Letter spacing of date cells in month view. _(default: undefined)_\n- **--m3e-calendar-item-font-size** - Font size of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-font-weight** - Font weight of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-line-height** - Line height of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-tracking** - Letter spacing of items in year and multi‑year views. _(default: undefined)_\n- **--m3e-calendar-item-color** - Text color for date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-color** - Text color for selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-container-color** - Background color for selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-ripple-color** - Ripple color used when interacting with selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-hover-color** - Hover color used when interacting with selected date items. _(default: undefined)_\n- **--m3e-calendar-item-selected-focus-color** - Focus color used when interacting with selected date items. _(default: undefined)_\n- **--m3e-calendar-item-current-outline-thickness** - Outline thickness used to indicate the current date. _(default: undefined)_\n- **--m3e-calendar-item-current-outline-color** - Outline color used to indicate the current date. _(default: undefined)_\n- **--m3e-calendar-item-special-color** - Text color for dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-container-color** - Background color for dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-ripple-color** - Ripple color used when interacting with dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-hover-color** - Hover color used when interacting with dates marked as special. _(default: undefined)_\n- **--m3e-calendar-item-special-focus-color** - Focus color used when interacting with dates marked as special. _(default: undefined)_\n- **--m3e-calendar-range-container-color** - Background color applied to the selected date range. _(default: undefined)_\n- **--m3e-calendar-range-color** - Text color for dates within a selected range. _(default: undefined)_\n- **--m3e-calendar-item-disabled-color** - Color used for disabled date items. _(default: undefined)_\n- **--m3e-calendar-item-disabled-color-opacity** - Opacity applied to the disabled item color. _(default: undefined)_\n- **--m3e-calendar-slide-animation-duration** - Duration of slide transitions between calendar views. _(default: undefined)_",
1029
1044
  "attributes": [
1030
1045
  {
1031
1046
  "name": "date",
@@ -1880,6 +1895,18 @@
1880
1895
  ],
1881
1896
  "references": []
1882
1897
  },
1898
+ {
1899
+ "name": "m3e-fab-menu",
1900
+ "description": "A menu, opened from a floating action button (FAB), used to display multiple related actions.\n---\n\n\n### **Events:**\n - **beforetoggle** - Dispatched before the toggle state changes.\n- **toggle** - Dispatched after the toggle state has changed.\n\n### **Methods:**\n - **show(trigger: _HTMLElement_): _Promise<void>_** - Opens the menu.\n- **hide(restoreFocus: _boolean_): _void_** - Hides the menu.\n- **toggle(trigger: _HTMLElement_): _Promise<void>_** - Toggles the menu.\n\n### **Slots:**\n - _default_ - Renders the contents of the menu.\n\n### **CSS Properties:**\n - **--m3e-fab-menu-spacing** - Vertical gap between menu items. _(default: undefined)_\n- **--m3e-fab-menu-max-width** - Maximum width of the menu. _(default: undefined)_\n- **--m3e-primary-fab-color** - Foreground color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-container-color** - Container color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-hover-color** - Hover background color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-focus-color** - Focus background color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-ripple-color** - Ripple color for primary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-color** - Foreground color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-container-color** - Container color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-hover-color** - Hover background color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-focus-color** - Focus background color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-ripple-color** - Ripple color for secondary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-color** - Foreground color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-container-color** - Container color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-hover-color** - Hover background color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-focus-color** - Focus background color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-ripple-color** - Ripple color for tertiary variant items. _(default: undefined)_",
1901
+ "attributes": [
1902
+ {
1903
+ "name": "variant",
1904
+ "description": "The appearance variant of the menu.",
1905
+ "values": [{ "name": "FabMenuVariant" }]
1906
+ }
1907
+ ],
1908
+ "references": []
1909
+ },
1883
1910
  {
1884
1911
  "name": "m3e-menu-item",
1885
1912
  "description": "An item of a floating action button (FAB) menu.\n---\n\n\n### **Events:**\n - **click** - Dispatched when the element is clicked.\n\n### **Slots:**\n - _default_ - Renders the label of the item.\n- **icon** - Renders an icon before the items's label.\n\n### **CSS Properties:**\n - **--m3e-fab-menu-item-height** - Height of the menu item. _(default: undefined)_\n- **--m3e-fab-menu-item-font-size** - Font size of the menu item label. _(default: undefined)_\n- **--m3e-fab-menu-item-font-weight** - Font weight of the menu item label. _(default: undefined)_\n- **--m3e-fab-menu-item-line-height** - Line height of the menu item label. _(default: undefined)_\n- **--m3e-fab-menu-item-tracking** - Letter spacing of the menu item label. _(default: undefined)_\n- **--m3e-fab-menu-item-shape** - Border radius of the menu item. _(default: undefined)_\n- **--m3e-fab-menu-item-leading-space** - Padding at the start of the menu item. _(default: undefined)_\n- **--m3e-fab-menu-item-trailing-space** - Padding at the end of the menu item. _(default: undefined)_\n- **--m3e-fab-menu-item-spacing** - Gap between icon and label. _(default: undefined)_\n- **--m3e-fab-menu-item-icon-size** - Size of the icon in the menu item. _(default: undefined)_",
@@ -1912,18 +1939,6 @@
1912
1939
  ],
1913
1940
  "references": []
1914
1941
  },
1915
- {
1916
- "name": "m3e-fab-menu",
1917
- "description": "A menu, opened from a floating action button (FAB), used to display multiple related actions.\n---\n\n\n### **Events:**\n - **beforetoggle** - Dispatched before the toggle state changes.\n- **toggle** - Dispatched after the toggle state has changed.\n\n### **Methods:**\n - **show(trigger: _HTMLElement_): _Promise<void>_** - Opens the menu.\n- **hide(restoreFocus: _boolean_): _void_** - Hides the menu.\n- **toggle(trigger: _HTMLElement_): _Promise<void>_** - Toggles the menu.\n\n### **Slots:**\n - _default_ - Renders the contents of the menu.\n\n### **CSS Properties:**\n - **--m3e-fab-menu-spacing** - Vertical gap between menu items. _(default: undefined)_\n- **--m3e-fab-menu-max-width** - Maximum width of the menu. _(default: undefined)_\n- **--m3e-primary-fab-color** - Foreground color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-container-color** - Container color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-hover-color** - Hover background color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-focus-color** - Focus background color for primary variant items. _(default: undefined)_\n- **--m3e-primary-fab-ripple-color** - Ripple color for primary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-color** - Foreground color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-container-color** - Container color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-hover-color** - Hover background color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-focus-color** - Focus background color for secondary variant items. _(default: undefined)_\n- **--m3e-secondary-fab-ripple-color** - Ripple color for secondary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-color** - Foreground color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-container-color** - Container color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-hover-color** - Hover background color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-focus-color** - Focus background color for tertiary variant items. _(default: undefined)_\n- **--m3e-tertiary-fab-ripple-color** - Ripple color for tertiary variant items. _(default: undefined)_",
1918
- "attributes": [
1919
- {
1920
- "name": "variant",
1921
- "description": "The appearance variant of the menu.",
1922
- "values": [{ "name": "FabMenuVariant" }]
1923
- }
1924
- ],
1925
- "references": []
1926
- },
1927
1942
  {
1928
1943
  "name": "m3e-fab-menu-trigger",
1929
1944
  "description": "An element, nested within a clickable element, used to open a floating action button (FAB) menu.\n---\n\n\n### **Methods:**\n - **attach(control: _HTMLElement_): _void_** - Attaches the element to an interactive control.\n- **detach(): _void_** - Detaches the element from its current interactive control.\n",
package/dist/icon.js CHANGED
@@ -227,7 +227,7 @@ let M3eIconElement = class M3eIconElement extends Role(LitElement, "img") {
227
227
  }
228
228
  /** @inheritdoc */
229
229
  render() {
230
- return IconRegistry.isIconRegistered(this.name, this.variant) ? IconRegistry.renderIcon(this.name, this.variant, this.filled) : html`<div class="icon" aria-hidden="true">${this.name}</div>`;
230
+ return IconRegistry.isIconRegistered(this.name, this.variant) ? IconRegistry.renderIcon(this.name, this.variant, this.filled) : html`<div class="icon" aria-hidden="true" translate="no">${this.name}</div>`;
231
231
  }
232
232
  };
233
233
  _M3eIconElement_iconRegistryUnobserve = new WeakMap();