@m3e/web 2.5.11 → 2.5.12
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.
- package/dist/all.js +92 -42
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +56 -56
- package/dist/all.min.js.map +1 -1
- package/dist/autocomplete.js +23 -5
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/breadcrumb.js.map +1 -1
- package/dist/breadcrumb.min.js +1 -1
- package/dist/breadcrumb.min.js.map +1 -1
- package/dist/core.js +27 -23
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/core.min.js.map +1 -1
- package/dist/custom-elements.json +74 -42
- package/dist/fab.js +1 -1
- package/dist/fab.js.map +1 -1
- package/dist/fab.min.js +1 -1
- package/dist/fab.min.js.map +1 -1
- package/dist/form-field.js +1 -1
- package/dist/form-field.js.map +1 -1
- package/dist/form-field.min.js +2 -2
- package/dist/form-field.min.js.map +1 -1
- package/dist/option.js +12 -2
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/select.js +18 -2
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
- package/dist/src/core/shared/mixins/LinkButton.d.ts.map +1 -1
- package/dist/src/core/shared/tokens/DesignToken.d.ts +3 -0
- package/dist/src/core/shared/tokens/DesignToken.d.ts.map +1 -1
- package/dist/src/core/shared/tokens/MeasurementToken.d.ts +13 -7
- package/dist/src/core/shared/tokens/MeasurementToken.d.ts.map +1 -1
- package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
- package/dist/src/option/OptionElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
- package/dist/src/select/SelectElement.d.ts.map +1 -1
- package/dist/src/theme/ThemeElement.d.ts.map +1 -1
- package/dist/theme.js +10 -7
- package/dist/theme.js.map +1 -1
- package/dist/theme.min.js +6 -6
- package/dist/theme.min.js.map +1 -1
- package/package.json +1 -1
package/dist/select.min.js
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright (c) 2025–2026 matraic
|
|
4
4
|
* See LICENSE file in the project root for full license text.
|
|
5
5
|
*/
|
|
6
|
-
import{__classPrivateFieldGet as t,__classPrivateFieldSet as e,__decorate as i}from"tslib";import{LitElement as s,html as a,css as n}from"lit";import{query as h,property as l}from"lit/decorators.js";import{Focusable as o,Labelled as r,RequiredConstraintValidation as c,Dirty as d,Touched as f,Required as m,ConstraintValidation as p,FormAssociated as u,Disabled as v,AttachInternals as g,Role as w,MutationController as y,formValue as b,setCustomState as E,prefersReducedMotion as M,scrollIntoViewIfNeeded as k,deleteCustomState as _,addCustomState as S,forcedColorsActive as I,DesignToken as C,customElement as K}from"@m3e/web/core";import{ListKeyManager as x}from"@m3e/web/core/a11y";var A,L,W,T,$,P,D,N,O,U,q,H,R,z,B,j,F,V,X,Z,G,J,Q,Y,tt,et,it,st,at,nt,ht,lt;let ot=lt=class extends(o(r(c(d(f(m(p(u(v(g(w(s,"combobox")))))))))))){constructor(){super(),A.add(this),this._options=new Array,L.set(this,void 0),W.set(this,void 0),T.set(this,!1),$.set(this,!1),P.set(this,"m3e-select-"+lt.__nextId++),D.set(this,`${t(this,P,"f")}-list`),N.set(this,e=>t(this,A,"m",X).call(this,e)),O.set(this,e=>t(this,A,"m",Z).call(this,e)),U.set(this,e=>t(this,A,"m",G).call(this,e)),q.set(this,e=>t(this,A,"m",Y).call(this,e)),H.set(this,e=>t(this,A,"m",J).call(this,e)),R.set(this,e=>t(this,A,"m",Q).call(this,e)),z.set(this,void 0),this._listKeyManager=(new x).withWrap().withHomeAndEnd().withPageUpAndDown().withVerticalOrientation().withTypeahead().onActiveItemChange(()=>{this._listKeyManager.activeItem&&t(this,A,"m",at).call(this,this._listKeyManager.activeItem)}),this.hideSelectionIndicator=!1,this.multi=!1,this.panelClass="",new y(this,{config:{childList:!0,subtree:!0},callback:()=>t(this,A,"m",V).call(this)})}get options(){return this._options??[]}get selected(){return this.options.filter(t=>t.selected)}get value(){const t=this.selected.filter(t=>!t.disabled).map(t=>t.value);switch(t.length){case 0:return null;case 1:return t[0];default:return t}}get[(L=new WeakMap,W=new WeakMap,T=new WeakMap,$=new WeakMap,P=new WeakMap,D=new WeakMap,N=new WeakMap,O=new WeakMap,U=new WeakMap,q=new WeakMap,H=new WeakMap,R=new WeakMap,z=new WeakMap,A=new WeakSet,B=function(){return this._listKeyManager?.items??[]},j=function(){return t(this,A,"a",B).filter(t=>t.selected)},b)](){const t=this.value;if(Array.isArray(t)){const e=new FormData;for(const i of t)e.append(this.name,i);return e}return t}get shouldLabelFloat(){return this.selected.filter(t=>!t.isEmpty).length>0}onContainerClick(){e(this,$,!0,"f"),t(this,A,"m",et).call(this),this.focus({preventScroll:!0})}clear(e=!1){const i=t(this,A,"a",j),s=i.length>0;s&&(i.forEach(e=>{e.selected=!1,t(this,A,"m",nt).call(this,e)}),this.requestUpdate()),t(this,A,"m",st).call(this),s&&this.dispatchEvent(new Event("change",{bubbles:!0})),e&&this.focus()}connectedCallback(){super.connectedCallback(),this.ariaHasPopup="listbox",this.ariaExpanded="false",this.addEventListener("click",t(this,N,"f")),this.addEventListener("keydown",t(this,O,"f")),this.addEventListener("keyup",t(this,U,"f")),t(this,A,"m",V).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,N,"f")),this.removeEventListener("keydown",t(this,O,"f")),this.removeEventListener("keyup",t(this,U,"f"))}update(e){super.update(e),e.has("hideSelectionIndicator")&&t(this,A,"a",B).forEach(t=>E(t,"--hide-selection-indicator",this.hideSelectionIndicator))}firstUpdated(e){super.firstUpdated(e),this._focusRing?.attach(this),t(this,A,"a",F)&&this._focusRing&&(this._focusRing.style.display="none")}render(){return a`<m3e-focus-ring class="focus-ring"></m3e-focus-ring><div class="base"><m3e-text-overflow><slot name="value">${this.selected.filter(t=>!t.isEmpty).map((t,e)=>e>0?a`<span>, </span>${t.label}`:t.label)}</slot></m3e-text-overflow><div class="arrow-wrapper" aria-hidden="true"><slot name="arrow"><svg class="arrow" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><div class="options" aria-hidden="true"><slot></slot></div>`}};F=function(){return this.closest("m3e-form-field")},V=function(){e(this,L,this.cloneNode(!0),"f");const{added:i}=this._listKeyManager.setItems([...t(this,L,"f").querySelectorAll("m3e-option")]);i.forEach(e=>{e.id=e.id||`${t(this,P,"f")}-option-${this._listKeyManager.items.indexOf(e)}`,E(e,"--hide-selection-indicator",this.hideSelectionIndicator)}),this._options=[...this.querySelectorAll("m3e-option")],t(this,A,"a",F)?.notifyControlStateChange(),t(this,W,"f")&&(t(this,W,"f").replaceChildren(...t(this,L,"f").childNodes),0==this._options.length&&t(this,A,"m",st).call(this))},X=function(e){e.defaultPrevented||this.disabled||t(this,A,"m",et).call(this)},Z=function(i){if(!i.defaultPrevented)switch(e(this,$,!1,"f"),i.key){case" ":case"Enter":i.preventDefault(),this.multi?t(this,W,"f")||(e(this,T,!0,"f"),t(this,A,"m",et).call(this)):(t(this,W,"f")&&this._listKeyManager.activeItem&&t(this,A,"m",ht).call(this,this._listKeyManager.activeItem),t(this,W,"f")?.isOpen?M()?t(this,A,"m",st).call(this):setTimeout(()=>t(this,A,"m",st).call(this),150):t(this,A,"m",it).call(this));break;case"Escape":case"Tab":t(this,A,"m",st).call(this);break;case"Down":case"ArrowDown":this.multi&&!t(this,W,"f")?t(this,A,"m",et).call(this):(this._listKeyManager.onKeyDown(i),!t(this,W,"f")&&this._listKeyManager.activeItem&&t(this,A,"m",ht).call(this,this._listKeyManager.activeItem));break;default:this._listKeyManager.onKeyDown(i),this.multi||t(this,W,"f")||!this._listKeyManager.activeItem||t(this,A,"m",ht).call(this,this._listKeyManager.activeItem)}},G=function(i){if(!i.defaultPrevented)if(t(this,T,"f"))e(this,T,!1,"f");else switch(i.key){case" ":case"Enter":if(!this.multi)return;i.preventDefault(),t(this,W,"f")&&this._listKeyManager.activeItem&&t(this,A,"m",ht).call(this,this._listKeyManager.activeItem)}},J=function(t){if(e(this,z,void 0,"f"),2===t.button)return;t.preventDefault(),t.stopImmediatePropagation();const i=t.composedPath().find(t=>t instanceof HTMLElement&&"M3E-OPTION"===t.tagName);i&&!i.disabled&&e(this,z,i,"f")},Q=function(i){const s=t(this,z,"f");if(e(this,z,void 0,"f"),2===i.button)return;if(!s)return;const a=i.composedPath().find(t=>t instanceof HTMLElement&&"M3E-OPTION"===t.tagName);a===s&&(t(this,A,"m",ht).call(this,a),this._listKeyManager.setActiveItem(a),this.multi&&this.requestUpdate()),this.multi||(M()?t(this,A,"m",st).call(this):setTimeout(()=>t(this,A,"m",st).call(this),150))},Y=function(e){if(t(this,W,"f"))if("closed"!==e.newState){const i=t(this,A,"a",j).find(t=>!t.disabled)??this._listKeyManager.items.find(t=>!t.disabled);this._listKeyManager.setActiveItem(i),i&&k(i,t(this,W,"f"),{block:"nearest",behavior:"instant"}),this.dispatchEvent(new ToggleEvent("toggle",{oldState:e.oldState,newState:e.newState}))}else M()?t(this,A,"m",tt).call(this,e):setTimeout(()=>t(this,A,"m",tt).call(this,e),100)},tt=function(i){t(this,W,"f")&&(t(this,L,"f")?.replaceChildren(...t(this,W,"f").childNodes),t(this,W,"f").remove(),t(this,W,"f").removeEventListener("toggle",t(this,q,"f")),t(this,W,"f").removeEventListener("pointerdown",t(this,H,"f")),t(this,W,"f").removeEventListener("pointerup",t(this,R,"f")),e(this,W,void 0,"f"),this.ariaExpanded="false",this.removeAttribute("aria-controls"),this.removeAttribute("aria-owns"),this.removeAttribute("aria-activedescendant"),this.requestUpdate(),_(this,"--open"),t(this,A,"a",F)?.notifyControlStateChange(),this.dispatchEvent(new ToggleEvent("toggle",{oldState:i.oldState,newState:i.newState})))},et=function(){this.disabled||(t(this,W,"f")?t(this,A,"m",st).call(this):t(this,A,"m",it).call(this))},it=function(){if(!t(this,W,"f")&&0!=this._options.length){if(e(this,W,document.createElement("m3e-option-panel"),"f"),this.multi&&(t(this,W,"f").ariaMultiSelectable="true"),t(this,W,"f").id=t(this,D,"f"),this.panelClass)for(const e of this.panelClass.split(/\s+/).map(t=>t.trim()).filter(Boolean))t(this,W,"f").classList.add(e);t(this,W,"f").style.overflowX="hidden",t(this,W,"f").fitAnchorWidth=!0,t(this,W,"f").addEventListener("toggle",t(this,q,"f")),t(this,W,"f").addEventListener("pointerdown",t(this,H,"f")),t(this,W,"f").addEventListener("pointerup",t(this,R,"f")),t(this,L,"f")&&t(this,W,"f").replaceChildren(...t(this,L,"f").childNodes),(t(this,A,"a",F)??this).insertAdjacentElement("afterend",t(this,W,"f")),this.ariaExpanded="true",this.setAttribute("aria-controls",t(this,D,"f")),this.setAttribute("aria-owns",t(this,D,"f")),t(this,A,"a",F)?.notifyControlStateChange(),setTimeout(()=>{t(this,W,"f")?.show(this,t(this,A,"a",F)?.menuAnchor),S(this,"--open")})}},st=function(){t(this,W,"f")&&(t(this,W,"f").hide(),_(this,"--open"))},at=function(e){if(this.setAttribute("aria-activedescendant",e.id),t(this,W,"f")){k(e,t(this,W,"f"),{block:"nearest",behavior:"instant"});const i=!t(this,$,"f")&&(this.matches(":focus-visible")||I());t(this,A,"a",B).forEach(t=>{t===e&&i?(t.focusRing?.show(),t.stateLayer?.show("focused")):(t.focusRing?.hide(),t.stateLayer?.hide("focused"))})}},nt=function(t){const e=this._options[this._listKeyManager.items.indexOf(t)];e&&(e.selected=t.selected)},ht=function(e){const i=!this.multi||!e.selected;e.selected!==i&&this.dispatchEvent(new Event("beforeinput",{bubbles:!0,cancelable:!0}))&&(e.selected=i,t(this,A,"m",nt).call(this,e),this.multi||t(this,A,"a",j).filter(t=>t!==e).forEach(e=>{e.selected=!1,t(this,A,"m",nt).call(this,e)}),this.requestUpdate(),t(this,A,"a",F)?.notifyControlStateChange(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))},ot.styles=n`:host { display: inline-flex; vertical-align: middle; outline: none; position: relative; font-size: var(--m3e-form-field-font-size, ${C.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-form-field-font-weight, ${C.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-form-field-line-height, ${C.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-form-field-tracking, ${C.typescale.standard.body.large.tracking}); min-height: var(--m3e-form-field-line-height, ${C.typescale.standard.body.large.lineHeight}); border-radius: var(--m3e-select-container-shape, ${C.shape.corner.extraSmall}); } :host(:not(:disabled)) { cursor: pointer; } :host(:disabled) { color: color-mix( in srgb, var(--m3e-select-disabled-color, ${C.color.onSurface}) var(--m3e-select-disabled-color-opacity, 38%), transparent ); } .options { display: none; } .base { flex: 1 1 auto; display: inline-flex; align-items: center; overflow: hidden; } .arrow-wrapper { display: flex; align-items: center; justify-content: center; margin-top: var(--_select-arrow-margin-top); } ::slotted([slot="arrow"]), .arrow { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-select-icon-size, 1.5rem); } :host(:is(:state(--open), :--open)) .focus-ring { display: none; }`,ot.__nextId=0,i([h(".focus-ring")],ot.prototype,"_focusRing",void 0),i([l({attribute:"hide-selection-indicator",type:Boolean})],ot.prototype,"hideSelectionIndicator",void 0),i([l({type:Boolean})],ot.prototype,"multi",void 0),i([l({attribute:"panel-class"})],ot.prototype,"panelClass",void 0),ot=lt=i([K("m3e-select")],ot);export{ot as M3eSelectElement};
|
|
6
|
+
import{__classPrivateFieldGet as t,__classPrivateFieldSet as e,__decorate as i}from"tslib";import{LitElement as s,html as a,css as n}from"lit";import{query as h,property as o}from"lit/decorators.js";import{Focusable as l,Labelled as r,RequiredConstraintValidation as c,Dirty as d,Touched as f,Required as m,ConstraintValidation as p,FormAssociated as u,Disabled as g,AttachInternals as v,Role as w,MutationController as b,formValue as y,setCustomState as E,prefersReducedMotion as M,scrollIntoViewIfNeeded as k,deleteCustomState as _,addCustomState as S,forcedColorsActive as C,DesignToken as I,customElement as K}from"@m3e/web/core";import{ListKeyManager as x}from"@m3e/web/core/a11y";import{M3eOptionElement as A}from"@m3e/web/option";var L,W,$,P,T,D,O,U,N,q,H,R,z,B,j,F,V,X,Z,G,J,Q,Y,tt,et,it,st,at,nt,ht,ot,lt,rt;let ct=rt=class extends(l(r(c(d(f(m(p(u(g(v(w(s,"combobox")))))))))))){constructor(){super(),L.add(this),this._options=new Array,W.set(this,void 0),$.set(this,void 0),P.set(this,!1),T.set(this,!1),D.set(this,"m3e-select-"+rt.__nextId++),O.set(this,`${t(this,D,"f")}-list`),U.set(this,e=>t(this,L,"m",G).call(this,e)),N.set(this,e=>t(this,L,"m",J).call(this,e)),q.set(this,e=>t(this,L,"m",Q).call(this,e)),H.set(this,e=>t(this,L,"m",et).call(this,e)),R.set(this,e=>t(this,L,"m",Y).call(this,e)),z.set(this,e=>t(this,L,"m",tt).call(this,e)),B.set(this,void 0),this._listKeyManager=(new x).withWrap().withHomeAndEnd().withPageUpAndDown().withVerticalOrientation().withTypeahead().onActiveItemChange(()=>{this._listKeyManager.activeItem&&t(this,L,"m",ht).call(this,this._listKeyManager.activeItem)}),this.hideSelectionIndicator=!1,this.multi=!1,this.panelClass="",new b(this,{config:{childList:!0,subtree:!0},callback:()=>t(this,L,"m",Z).call(this)})}get options(){return this._options??[]}get selected(){return this.options.filter(t=>t.selected)}get value(){const t=this.selected.filter(t=>!t.disabled).map(t=>t.value);switch(t.length){case 0:return null;case 1:return t[0];default:return t}}get[(W=new WeakMap,$=new WeakMap,P=new WeakMap,T=new WeakMap,D=new WeakMap,O=new WeakMap,U=new WeakMap,N=new WeakMap,q=new WeakMap,H=new WeakMap,R=new WeakMap,z=new WeakMap,B=new WeakMap,L=new WeakSet,j=function(){return this._listKeyManager?.items??[]},F=function(){return t(this,L,"a",j).filter(t=>t.selected)},y)](){const t=this.value;if(Array.isArray(t)){const e=new FormData;for(const i of t)e.append(this.name,i);return e}return t}get shouldLabelFloat(){return this.selected.filter(t=>!t.isEmpty).length>0}onContainerClick(){e(this,T,!0,"f"),t(this,L,"m",st).call(this),this.focus({preventScroll:!0})}clear(e=!1){const i=t(this,L,"a",F),s=i.length>0;s&&(i.forEach(e=>{e.selected=!1,t(this,L,"m",ot).call(this,e)}),this.requestUpdate()),t(this,L,"m",nt).call(this),s&&this.dispatchEvent(new Event("change",{bubbles:!0})),e&&this.focus()}connectedCallback(){super.connectedCallback(),this.ariaHasPopup="listbox",this.ariaExpanded="false",this.addEventListener("click",t(this,U,"f")),this.addEventListener("keydown",t(this,N,"f")),this.addEventListener("keyup",t(this,q,"f")),t(this,L,"m",Z).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,U,"f")),this.removeEventListener("keydown",t(this,N,"f")),this.removeEventListener("keyup",t(this,q,"f"))}update(e){super.update(e),e.has("hideSelectionIndicator")&&t(this,L,"a",j).forEach(t=>E(t,"--hide-selection-indicator",this.hideSelectionIndicator))}firstUpdated(e){super.firstUpdated(e),this._focusRing?.attach(this),t(this,L,"a",V)&&this._focusRing&&(this._focusRing.style.display="none")}render(){return a`<m3e-focus-ring class="focus-ring"></m3e-focus-ring><div class="base"><m3e-text-overflow><slot name="value">${this.selected.filter(t=>!t.isEmpty).map((t,e)=>e>0?a`<span>, </span>${t.label}`:t.label)}</slot></m3e-text-overflow><div class="arrow-wrapper" aria-hidden="true"><slot name="arrow"><svg class="arrow" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><div class="options" aria-hidden="true" @state-change="${t(this,L,"m",X)}"><slot></slot></div>`}};V=function(){return this.closest("m3e-form-field")},X=function(e){if(!(e.target instanceof A))return;e.stopImmediatePropagation();const i=this.options.indexOf(e.target);if(-1==i)return;const s=t(this,L,"a",j)[i];s&&(s.disabled=e.target.disabled,s.selected!==e.target.selected&&(s.selected=e.target.selected,this.isUpdatePending||this.requestUpdate(),t(this,L,"a",V)?.notifyControlStateChange(!0)))},Z=function(){e(this,W,this.cloneNode(!0),"f");const{added:i}=this._listKeyManager.setItems([...t(this,W,"f").querySelectorAll("m3e-option")]);i.forEach(e=>{e.id=e.id||`${t(this,D,"f")}-option-${this._listKeyManager.items.indexOf(e)}`,E(e,"--hide-selection-indicator",this.hideSelectionIndicator)}),this._options=[...this.querySelectorAll("m3e-option")],t(this,L,"a",V)?.notifyControlStateChange(),t(this,$,"f")&&(t(this,$,"f").replaceChildren(...t(this,W,"f").childNodes),0==this._options.length&&t(this,L,"m",nt).call(this))},G=function(e){e.defaultPrevented||this.disabled||t(this,L,"m",st).call(this)},J=function(i){if(!i.defaultPrevented)switch(e(this,T,!1,"f"),i.key){case" ":case"Enter":i.preventDefault(),this.multi?t(this,$,"f")||(e(this,P,!0,"f"),t(this,L,"m",st).call(this)):(t(this,$,"f")&&this._listKeyManager.activeItem&&t(this,L,"m",lt).call(this,this._listKeyManager.activeItem),t(this,$,"f")?.isOpen?M()?t(this,L,"m",nt).call(this):setTimeout(()=>t(this,L,"m",nt).call(this),150):t(this,L,"m",at).call(this));break;case"Escape":case"Tab":t(this,L,"m",nt).call(this);break;case"Down":case"ArrowDown":this.multi&&!t(this,$,"f")?t(this,L,"m",st).call(this):(this._listKeyManager.onKeyDown(i),!t(this,$,"f")&&this._listKeyManager.activeItem&&t(this,L,"m",lt).call(this,this._listKeyManager.activeItem));break;default:this._listKeyManager.onKeyDown(i),this.multi||t(this,$,"f")||!this._listKeyManager.activeItem||t(this,L,"m",lt).call(this,this._listKeyManager.activeItem)}},Q=function(i){if(!i.defaultPrevented)if(t(this,P,"f"))e(this,P,!1,"f");else switch(i.key){case" ":case"Enter":if(!this.multi)return;i.preventDefault(),t(this,$,"f")&&this._listKeyManager.activeItem&&t(this,L,"m",lt).call(this,this._listKeyManager.activeItem)}},Y=function(t){if(e(this,B,void 0,"f"),2===t.button)return;t.preventDefault(),t.stopImmediatePropagation();const i=t.composedPath().find(t=>t instanceof HTMLElement&&"M3E-OPTION"===t.tagName);i&&!i.disabled&&e(this,B,i,"f")},tt=function(i){const s=t(this,B,"f");if(e(this,B,void 0,"f"),2===i.button)return;if(!s)return;const a=i.composedPath().find(t=>t instanceof HTMLElement&&"M3E-OPTION"===t.tagName);a===s&&(t(this,L,"m",lt).call(this,a),this._listKeyManager.setActiveItem(a),this.multi&&this.requestUpdate()),this.multi||(M()?t(this,L,"m",nt).call(this):setTimeout(()=>t(this,L,"m",nt).call(this),150))},et=function(e){if(t(this,$,"f"))if("closed"!==e.newState){const i=t(this,L,"a",F).find(t=>!t.disabled)??this._listKeyManager.items.find(t=>!t.disabled);this._listKeyManager.setActiveItem(i),i&&k(i,t(this,$,"f"),{block:"nearest",behavior:"instant"}),this.dispatchEvent(new ToggleEvent("toggle",{oldState:e.oldState,newState:e.newState}))}else M()?t(this,L,"m",it).call(this,e):setTimeout(()=>t(this,L,"m",it).call(this,e),100)},it=function(i){t(this,$,"f")&&(t(this,W,"f")?.replaceChildren(...t(this,$,"f").childNodes),t(this,$,"f").remove(),t(this,$,"f").removeEventListener("toggle",t(this,H,"f")),t(this,$,"f").removeEventListener("pointerdown",t(this,R,"f")),t(this,$,"f").removeEventListener("pointerup",t(this,z,"f")),e(this,$,void 0,"f"),this.ariaExpanded="false",this.removeAttribute("aria-controls"),this.removeAttribute("aria-owns"),this.removeAttribute("aria-activedescendant"),this.requestUpdate(),_(this,"--open"),t(this,L,"a",V)?.notifyControlStateChange(),this.dispatchEvent(new ToggleEvent("toggle",{oldState:i.oldState,newState:i.newState})))},st=function(){this.disabled||(t(this,$,"f")?t(this,L,"m",nt).call(this):t(this,L,"m",at).call(this))},at=function(){if(!t(this,$,"f")&&0!=this._options.length){if(e(this,$,document.createElement("m3e-option-panel"),"f"),this.multi&&(t(this,$,"f").ariaMultiSelectable="true"),t(this,$,"f").id=t(this,O,"f"),this.panelClass)for(const e of this.panelClass.split(/\s+/).map(t=>t.trim()).filter(Boolean))t(this,$,"f").classList.add(e);t(this,$,"f").style.overflowX="hidden",t(this,$,"f").fitAnchorWidth=!0,t(this,$,"f").addEventListener("toggle",t(this,H,"f")),t(this,$,"f").addEventListener("pointerdown",t(this,R,"f")),t(this,$,"f").addEventListener("pointerup",t(this,z,"f")),t(this,W,"f")&&t(this,$,"f").replaceChildren(...t(this,W,"f").childNodes),(t(this,L,"a",V)??this).insertAdjacentElement("afterend",t(this,$,"f")),this.ariaExpanded="true",this.setAttribute("aria-controls",t(this,O,"f")),this.setAttribute("aria-owns",t(this,O,"f")),t(this,L,"a",V)?.notifyControlStateChange(),setTimeout(()=>{t(this,$,"f")?.show(this,t(this,L,"a",V)?.menuAnchor),S(this,"--open")})}},nt=function(){t(this,$,"f")&&(t(this,$,"f").hide(),_(this,"--open"))},ht=function(e){if(this.setAttribute("aria-activedescendant",e.id),t(this,$,"f")){k(e,t(this,$,"f"),{block:"nearest",behavior:"instant"});const i=!t(this,T,"f")&&(this.matches(":focus-visible")||C());t(this,L,"a",j).forEach(t=>{t===e&&i?(t.focusRing?.show(),t.stateLayer?.show("focused")):(t.focusRing?.hide(),t.stateLayer?.hide("focused"))})}},ot=function(t){const e=this._options[this._listKeyManager.items.indexOf(t)];e&&(e.selected=t.selected)},lt=function(e){const i=!this.multi||!e.selected;e.selected!==i&&this.dispatchEvent(new Event("beforeinput",{bubbles:!0,cancelable:!0}))&&(e.selected=i,t(this,L,"m",ot).call(this,e),this.multi||t(this,L,"a",F).filter(t=>t!==e).forEach(e=>{e.selected=!1,t(this,L,"m",ot).call(this,e)}),this.requestUpdate(),t(this,L,"a",V)?.notifyControlStateChange(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))},ct.styles=n`:host { display: inline-flex; vertical-align: middle; outline: none; position: relative; font-size: var(--m3e-form-field-font-size, ${I.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-form-field-font-weight, ${I.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-form-field-line-height, ${I.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-form-field-tracking, ${I.typescale.standard.body.large.tracking}); min-height: var(--m3e-form-field-line-height, ${I.typescale.standard.body.large.lineHeight}); border-radius: var(--m3e-select-container-shape, ${I.shape.corner.extraSmall}); } :host(:not(:disabled)) { cursor: pointer; } :host(:disabled) { color: color-mix( in srgb, var(--m3e-select-disabled-color, ${I.color.onSurface}) var(--m3e-select-disabled-color-opacity, 38%), transparent ); } .options { display: none; } .base { flex: 1 1 auto; display: inline-flex; align-items: center; overflow: hidden; } .arrow-wrapper { display: flex; align-items: center; justify-content: center; margin-top: var(--_select-arrow-margin-top); } ::slotted([slot="arrow"]), .arrow { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-select-icon-size, 1.5rem); } :host(:is(:state(--open), :--open)) .focus-ring { display: none; }`,ct.__nextId=0,i([h(".focus-ring")],ct.prototype,"_focusRing",void 0),i([o({attribute:"hide-selection-indicator",type:Boolean})],ct.prototype,"hideSelectionIndicator",void 0),i([o({type:Boolean})],ct.prototype,"multi",void 0),i([o({attribute:"panel-class"})],ct.prototype,"panelClass",void 0),ct=rt=i([K("m3e-select")],ct);export{ct as M3eSelectElement};
|
|
7
7
|
//# sourceMappingURL=select.min.js.map
|
package/dist/select.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.min.js","sources":["../../src/select/SelectElement.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */\r\nimport { css, CSSResultGroup, html, LitElement, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\n\r\nimport {\r\n AttachInternals,\r\n Labelled,\r\n ConstraintValidation,\r\n Dirty,\r\n Disabled,\r\n FormAssociated,\r\n Required,\r\n RequiredConstraintValidation,\r\n Touched,\r\n DesignToken,\r\n formValue,\r\n M3eFocusRingElement,\r\n scrollIntoViewIfNeeded,\r\n Role,\r\n Focusable,\r\n prefersReducedMotion,\r\n forcedColorsActive,\r\n deleteCustomState,\r\n addCustomState,\r\n setCustomState,\r\n customElement,\r\n MutationController,\r\n} from \"@m3e/web/core\";\r\n\r\nimport { ListKeyManager } from \"@m3e/web/core/a11y\";\r\n\r\nimport type { M3eFormFieldElement, FormFieldControl } from \"@m3e/web/form-field\";\r\nimport { M3eOptionElement, M3eOptionPanelElement } from \"@m3e/web/option\";\r\n\r\n/**\r\n * A form control that allows users to select a value from a set of predefined options.\r\n *\r\n * @description\r\n * The `m3e-select` component follows Material Design 3 principles and provides a comprehensive\r\n * selection interface for capturing user input. It supports both single and multiple selection modes,\r\n * customizable validation states, and accessible keyboard navigation. The component integrates seamlessly\r\n * with form field containers and dynamically positions its option list menu to ensure optimal viewport\r\n * visibility. Selection changes are communicated through standard form events, enabling predictable integration\r\n * with form submission and reactive state management systems.\r\n *\r\n * @example\r\n * The following demonstrates a `m3e-select` component wrapped in a `m3e-form-field` with a slotted label.\r\n * The label is associated with the select via the `for` and `id` attributes, ensuring accessible form semantics.\r\n * Each `m3e-option` defines an option within the dropdown.\r\n *\r\n * ```html\r\n * <m3e-form-field>\r\n * <label slot=\"label\" for=\"select\">Choose your favorite fruit</label>\r\n * <m3e-select id=\"select\">\r\n * <m3e-option>Apples</m3e-option>\r\n * <m3e-option>Oranges</m3e-option>\r\n * <m3e-option>Bananas</m3e-option>\r\n * <m3e-option>Grapes</m3e-option>\r\n * </m3e-select>\r\n * </m3e-form-field>\r\n * ```\r\n *\r\n * @tag m3e-select\r\n *\r\n * @slot - Renders the options of the select.\r\n * @slot arrow - Renders the dropdown arrow.\r\n * @slot value - Renders the selected value(s).\r\n *\r\n * @attr disabled - Whether the element is disabled.\r\n * @attr hide-selection-indicator - Whether to hide the selection indicator for single select options.\r\n * @attr multi - Whether multiple options can be selected.\r\n * @attr name - The name that identifies the element when submitting the associated form.\r\n * @attr panel-class - Class or list of classes to be applied to the select's overlay panel.\r\n * @attr required - Whether the element is required.\r\n *\r\n * @fires beforeinput - Dispatched before the selected state changes.\r\n * @fires input - Dispatched when the selected state changes.\r\n * @fires change - Dispatched when the selected state changes.\r\n *\r\n * @cssprop --m3e-form-field-font-size - The font size of the select control.\r\n * @cssprop --m3e-form-field-font-weight - The font weight of the select control.\r\n * @cssprop --m3e-form-field-line-height - The line height of the select control.\r\n * @cssprop --m3e-form-field-tracking - The letter spacing of the select control.\r\n * @cssprop --m3e-select-container-shape - The corner radius of the select container.\r\n * @cssprop --m3e-select-disabled-color - The text color when the select is disabled.\r\n * @cssprop --m3e-select-disabled-color-opacity - The opacity level applied to the disabled text color.\r\n * @cssprop --m3e-select-icon-size - The size of the dropdown arrow icon.\r\n */\r\n@customElement(\"m3e-select\")\r\nexport class M3eSelectElement\r\n extends Focusable(\r\n Labelled(\r\n RequiredConstraintValidation(\r\n Dirty(\r\n Touched(\r\n Required(ConstraintValidation(FormAssociated(Disabled(AttachInternals(Role(LitElement, \"combobox\")))))),\r\n ),\r\n ),\r\n ),\r\n ),\r\n )\r\n implements FormFieldControl\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 vertical-align: middle;\r\n outline: none;\r\n position: relative;\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 min-height: var(--m3e-form-field-line-height, ${DesignToken.typescale.standard.body.large.lineHeight});\r\n border-radius: var(--m3e-select-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n }\r\n :host(:not(:disabled)) {\r\n cursor: pointer;\r\n }\r\n :host(:disabled) {\r\n color: color-mix(\r\n in srgb,\r\n var(--m3e-select-disabled-color, ${DesignToken.color.onSurface}) var(--m3e-select-disabled-color-opacity, 38%),\r\n transparent\r\n );\r\n }\r\n .options {\r\n display: none;\r\n }\r\n .base {\r\n flex: 1 1 auto;\r\n display: inline-flex;\r\n align-items: center;\r\n overflow: hidden;\r\n }\r\n .arrow-wrapper {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n margin-top: var(--_select-arrow-margin-top);\r\n }\r\n ::slotted([slot=\"arrow\"]),\r\n .arrow {\r\n vertical-align: middle;\r\n width: 1em;\r\n height: 1em;\r\n font-size: var(--m3e-select-icon-size, 1.5rem);\r\n }\r\n :host(:is(:state(--open), :--open)) .focus-ring {\r\n display: none;\r\n }\r\n `;\r\n\r\n /** @private */ static __nextId = 0;\r\n\r\n /** @private */ private _options = new Array<M3eOptionElement>();\r\n /** @private */ #clone?: HTMLElement;\r\n\r\n /** @private */ #menu?: M3eOptionPanelElement;\r\n /** @private */ #ignoreKeyUp = false;\r\n /** @private */ #ignoreFocusVisible = false;\r\n\r\n /** @private */ readonly #id = `m3e-select-${M3eSelectElement.__nextId++}`;\r\n /** @private */ readonly #listId = `${this.#id}-list`;\r\n\r\n /** @private */ readonly #clickHandler = (e: Event) => this.#handleClick(e);\r\n /** @private */ readonly #keyDownHandler = (e: KeyboardEvent) => this.#handleKeyDown(e);\r\n /** @private */ readonly #keyUpHandler = (e: KeyboardEvent) => this.#handleKeyUp(e);\r\n /** @private */ readonly #menuToggleHandler = (e: ToggleEvent) => this.#handleMenuToggle(e);\r\n /** @private */ readonly #menuPointerDownHandler = (e: PointerEvent) => this.#handleMenuPointerDown(e);\r\n /** @private */ readonly #menuPointerUpHandler = (e: PointerEvent) => this.#handleMenuPointerUp(e);\r\n /** @private */ #menuPressedOption?: M3eOptionElement;\r\n\r\n /** @private */ private readonly _listKeyManager = new ListKeyManager<M3eOptionElement>()\r\n .withWrap()\r\n .withHomeAndEnd()\r\n .withPageUpAndDown()\r\n .withVerticalOrientation()\r\n .withTypeahead()\r\n .onActiveItemChange(() => {\r\n if (this._listKeyManager.activeItem) {\r\n this.#activateOption(this._listKeyManager.activeItem);\r\n }\r\n });\r\n\r\n /** @private */ @query(\".focus-ring\") private readonly _focusRing?: M3eFocusRingElement;\r\n\r\n constructor() {\r\n super();\r\n\r\n new MutationController(this, {\r\n config: {\r\n childList: true,\r\n subtree: true,\r\n },\r\n callback: () => this.#handleMutation(),\r\n });\r\n }\r\n\r\n /**\r\n * Whether to hide the selection indicator for single select options.\r\n * @default false\r\n */\r\n @property({ attribute: \"hide-selection-indicator\", type: Boolean }) hideSelectionIndicator = false;\r\n\r\n /**\r\n * Whether multiple options can be selected.\r\n * @default false\r\n */\r\n @property({ type: Boolean }) multi = false;\r\n\r\n /**\r\n * Class or list of classes to be applied to the select's overlay panel.\r\n * @default \"\"\r\n */\r\n @property({ attribute: \"panel-class\" }) panelClass = \"\";\r\n\r\n get #options(): readonly M3eOptionElement[] {\r\n return this._listKeyManager?.items ?? [];\r\n }\r\n\r\n get #selected(): readonly M3eOptionElement[] {\r\n return this.#options.filter((x) => x.selected);\r\n }\r\n\r\n /** The options that can be selected. */\r\n get options(): readonly M3eOptionElement[] {\r\n return this._options ?? [];\r\n }\r\n\r\n /** The selected option(s). */\r\n get selected(): readonly M3eOptionElement[] {\r\n return this.options.filter((x) => x.selected);\r\n }\r\n\r\n /** The selected (enabled) value(s). */\r\n get value(): string | readonly string[] | null {\r\n const values = this.selected.filter((x) => !x.disabled).map((x) => x.value);\r\n switch (values.length) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return values[0];\r\n default:\r\n return values;\r\n }\r\n }\r\n\r\n /** @inheritdoc @internal */\r\n override get [formValue]() {\r\n const values = this.value;\r\n if (Array.isArray(values)) {\r\n const data = new FormData();\r\n for (const value of values) {\r\n data.append(this.name, value);\r\n }\r\n return data;\r\n }\r\n return <string | null>values;\r\n }\r\n\r\n /** @inheritdoc */\r\n get shouldLabelFloat(): boolean {\r\n return this.selected.filter((x) => !x.isEmpty).length > 0;\r\n }\r\n\r\n /** @private */\r\n get #formField(): M3eFormFieldElement | null {\r\n return this.closest(\"m3e-form-field\");\r\n }\r\n\r\n /** @inheritdoc */\r\n onContainerClick(): void {\r\n this.#ignoreFocusVisible = true;\r\n this.#toggleMenu();\r\n this.focus({ preventScroll: true });\r\n }\r\n\r\n /**\r\n * Clears the value of the element.\r\n * @param [restoreFocus=false] Whether to restore input focus.\r\n */\r\n clear(restoreFocus = false): void {\r\n const selected = this.#selected;\r\n const willChange = selected.length > 0;\r\n\r\n if (willChange) {\r\n selected.forEach((x) => {\r\n x.selected = false;\r\n this.#updateSelectionState(x);\r\n });\r\n this.requestUpdate();\r\n }\r\n\r\n this.#hideMenu();\r\n\r\n if (willChange) {\r\n this.dispatchEvent(new Event(\"change\", { bubbles: true }));\r\n }\r\n\r\n if (restoreFocus) {\r\n this.focus();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n\r\n this.ariaHasPopup = \"listbox\";\r\n this.ariaExpanded = \"false\";\r\n\r\n this.addEventListener(\"click\", this.#clickHandler);\r\n this.addEventListener(\"keydown\", this.#keyDownHandler);\r\n this.addEventListener(\"keyup\", this.#keyUpHandler);\r\n\r\n this.#handleMutation();\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n\r\n this.removeEventListener(\"click\", this.#clickHandler);\r\n this.removeEventListener(\"keydown\", this.#keyDownHandler);\r\n this.removeEventListener(\"keyup\", this.#keyUpHandler);\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues<this>): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"hideSelectionIndicator\")) {\r\n this.#options.forEach((x) => setCustomState(x, \"--hide-selection-indicator\", this.hideSelectionIndicator));\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues<this>): void {\r\n super.firstUpdated(_changedProperties);\r\n\r\n this._focusRing?.attach(this);\r\n\r\n if (this.#formField && this._focusRing) {\r\n this._focusRing.style.display = \"none\";\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html` <m3e-focus-ring class=\"focus-ring\"></m3e-focus-ring>\r\n <div class=\"base\">\r\n <m3e-text-overflow>\r\n <slot name=\"value\">\r\n ${this.selected\r\n .filter((x) => !x.isEmpty)\r\n .map((x, i) => (i > 0 ? html`<span>, </span>${x.label}` : x.label))}\r\n </slot>\r\n </m3e-text-overflow>\r\n <div class=\"arrow-wrapper\" aria-hidden=\"true\">\r\n <slot name=\"arrow\">\r\n <svg class=\"arrow\" viewBox=\"0 -960 960 960\" fill=\"currentColor\">\r\n <path d=\"M480-360 280-560h400L480-360Z\" />\r\n </svg>\r\n </slot>\r\n </div>\r\n </div>\r\n <div class=\"options\" aria-hidden=\"true\">\r\n <slot></slot>\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleMutation(): void {\r\n this.#clone = <HTMLElement>this.cloneNode(true);\r\n\r\n const { added } = this._listKeyManager.setItems([...this.#clone.querySelectorAll(\"m3e-option\")]);\r\n added.forEach((x) => {\r\n x.id = x.id || `${this.#id}-option-${this._listKeyManager.items.indexOf(x)}`;\r\n setCustomState(x, \"--hide-selection-indicator\", this.hideSelectionIndicator);\r\n });\r\n\r\n this._options = [...this.querySelectorAll(\"m3e-option\")];\r\n\r\n this.#formField?.notifyControlStateChange();\r\n if (this.#menu) {\r\n this.#menu.replaceChildren(...this.#clone.childNodes);\r\n if (this._options.length == 0) {\r\n this.#hideMenu();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleClick(e: Event): void {\r\n if (e.defaultPrevented || this.disabled) return;\r\n this.#toggleMenu();\r\n }\r\n\r\n /** @private */\r\n #handleKeyDown(e: KeyboardEvent): void {\r\n if (e.defaultPrevented) return;\r\n this.#ignoreFocusVisible = false;\r\n\r\n switch (e.key) {\r\n case \" \":\r\n case \"Enter\":\r\n e.preventDefault();\r\n if (!this.multi) {\r\n if (this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n if (this.#menu?.isOpen) {\r\n if (!prefersReducedMotion()) {\r\n setTimeout(() => this.#hideMenu(), 150);\r\n } else {\r\n this.#hideMenu();\r\n }\r\n } else {\r\n this.#showMenu();\r\n }\r\n } else if (!this.#menu) {\r\n this.#ignoreKeyUp = true;\r\n this.#toggleMenu();\r\n }\r\n\r\n break;\r\n\r\n case \"Escape\":\r\n case \"Tab\":\r\n this.#hideMenu();\r\n break;\r\n\r\n case \"Down\":\r\n case \"ArrowDown\":\r\n if (this.multi && !this.#menu) {\r\n this.#toggleMenu();\r\n } else {\r\n this._listKeyManager.onKeyDown(e);\r\n if (!this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n }\r\n break;\r\n\r\n default:\r\n this._listKeyManager.onKeyDown(e);\r\n if (!this.multi && !this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleKeyUp(e: KeyboardEvent): void {\r\n if (e.defaultPrevented) return;\r\n\r\n if (this.#ignoreKeyUp) {\r\n this.#ignoreKeyUp = false;\r\n return;\r\n }\r\n\r\n switch (e.key) {\r\n case \" \":\r\n case \"Enter\":\r\n if (!this.multi) return;\r\n e.preventDefault();\r\n if (this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleMenuPointerDown(e: PointerEvent): void {\r\n this.#menuPressedOption = undefined;\r\n\r\n if (e.button === 2) return;\r\n // Prevent click to avoid stealing focus.\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n const option = <M3eOptionElement | undefined>(\r\n e.composedPath().find((x) => x instanceof HTMLElement && x.tagName === \"M3E-OPTION\")\r\n );\r\n\r\n if (option && !option.disabled) {\r\n this.#menuPressedOption = option;\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleMenuPointerUp(e: PointerEvent): void {\r\n const pressedOption = this.#menuPressedOption;\r\n this.#menuPressedOption = undefined;\r\n\r\n if (e.button === 2) return;\r\n\r\n if (!pressedOption) return;\r\n\r\n const option = <M3eOptionElement | undefined>(\r\n e.composedPath().find((x) => x instanceof HTMLElement && x.tagName === \"M3E-OPTION\")\r\n );\r\n\r\n if (option === pressedOption) {\r\n this.#selectOption(option);\r\n this._listKeyManager.setActiveItem(option);\r\n if (this.multi) {\r\n this.requestUpdate();\r\n }\r\n }\r\n\r\n if (!this.multi) {\r\n if (!prefersReducedMotion()) {\r\n setTimeout(() => this.#hideMenu(), 150);\r\n } else {\r\n this.#hideMenu();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleMenuToggle(e: ToggleEvent): void {\r\n if (!this.#menu) return;\r\n\r\n if (e.newState !== \"closed\") {\r\n const option = this.#selected.find((x) => !x.disabled) ?? this._listKeyManager.items.find((x) => !x.disabled);\r\n this._listKeyManager.setActiveItem(option);\r\n if (option) {\r\n scrollIntoViewIfNeeded(option, this.#menu, { block: \"nearest\", behavior: \"instant\" });\r\n }\r\n this.dispatchEvent(\r\n new ToggleEvent(\"toggle\", {\r\n oldState: e.oldState,\r\n newState: e.newState,\r\n }),\r\n );\r\n } else {\r\n if (prefersReducedMotion()) {\r\n this.#destroyMenu(e);\r\n } else {\r\n // NOTE: use transitionend is preferred but doesn't fire when used here.\r\n // This is a workaround until that is fixed.\r\n setTimeout(() => this.#destroyMenu(e), 100);\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #destroyMenu(e: ToggleEvent): void {\r\n if (!this.#menu) return;\r\n\r\n this.#clone?.replaceChildren(...this.#menu.childNodes);\r\n this.#menu.remove();\r\n this.#menu.removeEventListener(\"toggle\", this.#menuToggleHandler);\r\n this.#menu.removeEventListener(\"pointerdown\", this.#menuPointerDownHandler);\r\n this.#menu.removeEventListener(\"pointerup\", this.#menuPointerUpHandler);\r\n this.#menu = undefined;\r\n\r\n this.ariaExpanded = \"false\";\r\n this.removeAttribute(\"aria-controls\");\r\n this.removeAttribute(\"aria-owns\");\r\n this.removeAttribute(\"aria-activedescendant\");\r\n this.requestUpdate();\r\n\r\n deleteCustomState(this, \"--open\");\r\n this.#formField?.notifyControlStateChange();\r\n\r\n this.dispatchEvent(\r\n new ToggleEvent(\"toggle\", {\r\n oldState: e.oldState,\r\n newState: e.newState,\r\n }),\r\n );\r\n }\r\n\r\n /** @private */\r\n #toggleMenu(): void {\r\n if (this.disabled) return;\r\n if (this.#menu) {\r\n this.#hideMenu();\r\n } else {\r\n this.#showMenu();\r\n }\r\n }\r\n\r\n /** @private */\r\n #showMenu(): void {\r\n if (this.#menu || this._options.length == 0) return;\r\n\r\n this.#menu = document.createElement(\"m3e-option-panel\");\r\n if (this.multi) {\r\n this.#menu.ariaMultiSelectable = \"true\";\r\n }\r\n\r\n this.#menu.id = this.#listId;\r\n\r\n if (this.panelClass) {\r\n for (const klass of this.panelClass\r\n .split(/\\s+/)\r\n .map((d) => d.trim())\r\n .filter(Boolean)) {\r\n this.#menu.classList.add(klass);\r\n }\r\n }\r\n\r\n this.#menu.style.overflowX = \"hidden\";\r\n this.#menu.fitAnchorWidth = true;\r\n this.#menu.addEventListener(\"toggle\", this.#menuToggleHandler);\r\n this.#menu.addEventListener(\"pointerdown\", this.#menuPointerDownHandler);\r\n this.#menu.addEventListener(\"pointerup\", this.#menuPointerUpHandler);\r\n\r\n if (this.#clone) {\r\n this.#menu.replaceChildren(...this.#clone.childNodes);\r\n }\r\n\r\n (this.#formField ?? this).insertAdjacentElement(\"afterend\", this.#menu);\r\n\r\n this.ariaExpanded = \"true\";\r\n this.setAttribute(\"aria-controls\", this.#listId);\r\n this.setAttribute(\"aria-owns\", this.#listId);\r\n this.#formField?.notifyControlStateChange();\r\n\r\n setTimeout(() => {\r\n this.#menu?.show(this, this.#formField?.menuAnchor);\r\n addCustomState(this, \"--open\");\r\n });\r\n }\r\n\r\n /** @private */\r\n #hideMenu(): void {\r\n if (!this.#menu) return;\r\n\r\n this.#menu.hide();\r\n deleteCustomState(this, \"--open\");\r\n }\r\n\r\n /** @private */\r\n #activateOption(option: M3eOptionElement): void {\r\n this.setAttribute(\"aria-activedescendant\", option.id);\r\n if (this.#menu) {\r\n scrollIntoViewIfNeeded(option, this.#menu, { block: \"nearest\", behavior: \"instant\" });\r\n\r\n const focusVisible = !this.#ignoreFocusVisible && (this.matches(\":focus-visible\") || forcedColorsActive());\r\n\r\n this.#options.forEach((x) => {\r\n const active = x === option && focusVisible;\r\n if (active) {\r\n x.focusRing?.show();\r\n x.stateLayer?.show(\"focused\");\r\n } else {\r\n x.focusRing?.hide();\r\n x.stateLayer?.hide(\"focused\");\r\n }\r\n });\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateSelectionState(clone: M3eOptionElement): void {\r\n const option = this._options[this._listKeyManager.items.indexOf(clone)];\r\n if (option) {\r\n option.selected = clone.selected;\r\n }\r\n }\r\n\r\n /** @private */\r\n #selectOption(option: M3eOptionElement): void {\r\n const selected = this.multi ? !option.selected : true;\r\n if (option.selected === selected) return;\r\n\r\n if (this.dispatchEvent(new Event(\"beforeinput\", { bubbles: true, cancelable: true }))) {\r\n option.selected = selected;\r\n this.#updateSelectionState(option);\r\n\r\n if (!this.multi) {\r\n this.#selected\r\n .filter((x) => x !== option)\r\n .forEach((x) => {\r\n x.selected = false;\r\n this.#updateSelectionState(x);\r\n });\r\n }\r\n\r\n this.requestUpdate();\r\n this.#formField?.notifyControlStateChange();\r\n\r\n this.dispatchEvent(new Event(\"input\", { bubbles: true }));\r\n this.dispatchEvent(new Event(\"change\", { bubbles: true }));\r\n }\r\n }\r\n}\r\n\r\ninterface M3eSelectElementEventMap extends HTMLElementEventMap {\r\n toggle: ToggleEvent;\r\n}\r\n\r\nexport interface M3eSelectElement {\r\n addEventListener<K extends keyof M3eSelectElementEventMap>(\r\n type: K,\r\n listener: (this: M3eSelectElement, ev: M3eSelectElementEventMap[K]) => void,\r\n options?: boolean | AddEventListenerOptions,\r\n ): void;\r\n\r\n addEventListener(\r\n type: string,\r\n listener: EventListenerOrEventListenerObject,\r\n options?: boolean | AddEventListenerOptions,\r\n ): void;\r\n\r\n removeEventListener<K extends keyof M3eSelectElementEventMap>(\r\n type: K,\r\n listener: (this: M3eSelectElement, ev: M3eSelectElementEventMap[K]) => void,\r\n options?: boolean | EventListenerOptions,\r\n ): void;\r\n\r\n removeEventListener(\r\n type: string,\r\n listener: EventListenerOrEventListenerObject,\r\n options?: boolean | EventListenerOptions,\r\n ): void;\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-select\": M3eSelectElement;\r\n }\r\n}\r\n"],"names":["M3eSelectElement","M3eSelectElement_1","Focusable","Labelled","RequiredConstraintValidation","Dirty","Touched","Required","ConstraintValidation","FormAssociated","Disabled","AttachInternals","Role","LitElement","constructor","super","this","_options","Array","_M3eSelectElement_clone","set","_M3eSelectElement_menu","_M3eSelectElement_ignoreKeyUp","_M3eSelectElement_ignoreFocusVisible","_M3eSelectElement_id","__nextId","_M3eSelectElement_listId","__classPrivateFieldGet","_M3eSelectElement_clickHandler","e","call","_M3eSelectElement_keyDownHandler","_M3eSelectElement_keyUpHandler","_M3eSelectElement_menuToggleHandler","_M3eSelectElement_menuPointerDownHandler","_M3eSelectElement_menuPointerUpHandler","_M3eSelectElement_menuPressedOption","_listKeyManager","ListKeyManager","withWrap","withHomeAndEnd","withPageUpAndDown","withVerticalOrientation","withTypeahead","onActiveItemChange","activeItem","_M3eSelectElement_instances","_M3eSelectElement_activateOption","hideSelectionIndicator","multi","panelClass","MutationController","config","childList","subtree","callback","_M3eSelectElement_handleMutation","options","selected","filter","x","value","values","disabled","map","length","WeakMap","WeakSet","_M3eSelectElement_options_get","items","_M3eSelectElement_selected_get","formValue","isArray","data","FormData","append","name","shouldLabelFloat","isEmpty","onContainerClick","__classPrivateFieldSet","_M3eSelectElement_toggleMenu","focus","preventScroll","clear","restoreFocus","willChange","forEach","_M3eSelectElement_updateSelectionState","requestUpdate","_M3eSelectElement_hideMenu","dispatchEvent","Event","bubbles","connectedCallback","ariaHasPopup","ariaExpanded","addEventListener","disconnectedCallback","removeEventListener","update","changedProperties","has","setCustomState","firstUpdated","_changedProperties","_focusRing","attach","_M3eSelectElement_formField_get","style","display","render","html","i","label","closest","cloneNode","added","setItems","querySelectorAll","id","indexOf","notifyControlStateChange","replaceChildren","childNodes","defaultPrevented","key","preventDefault","_M3eSelectElement_selectOption","isOpen","prefersReducedMotion","setTimeout","_M3eSelectElement_showMenu","onKeyDown","undefined","button","stopImmediatePropagation","option","composedPath","find","HTMLElement","tagName","pressedOption","setActiveItem","newState","scrollIntoViewIfNeeded","block","behavior","ToggleEvent","oldState","_M3eSelectElement_destroyMenu","remove","removeAttribute","deleteCustomState","document","createElement","ariaMultiSelectable","klass","split","d","trim","Boolean","classList","add","overflowX","fitAnchorWidth","insertAdjacentElement","setAttribute","show","menuAnchor","addCustomState","hide","focusVisible","matches","forcedColorsActive","focusRing","stateLayer","clone","cancelable","styles","css","DesignToken","typescale","standard","body","large","fontSize","fontWeight","lineHeight","tracking","shape","corner","extraSmall","color","onSurface","__decorate","query","prototype","property","attribute","type","customElement"],"mappings":";;;;;0vBAyFO,IAAMA,GAAgBC,GAAtB,cACGC,EACNC,EACEC,EACEC,EACEC,EACEC,EAASC,EAAqBC,EAAeC,EAASC,EAAgBC,EAAKC,EAAY,uBA6FjGC,WAAAA,GACEC,oBAjCsBC,KAAAC,SAAW,IAAIC,MACvBC,EAAAC,IAAAJ,aAEAK,EAAAD,IAAAJ,aACAM,EAAAF,IAAAJ,MAAe,GACfO,EAAAH,IAAAJ,MAAsB,GAEbQ,WAAM,cAAcvB,GAAiBwB,YACrCC,EAAAN,IAAAJ,KAAU,GAAGW,EAAAX,KAAIQ,EAAA,aAEjBI,EAAAR,IAAAJ,KA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AAA,GA/H7CrM,GAAgBC,GAAAkM,EAAA,CAD5BM,EAAc,eACFzM"}
|
|
1
|
+
{"version":3,"file":"select.min.js","sources":["../../src/select/SelectElement.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */\r\nimport { css, CSSResultGroup, html, LitElement, PropertyValues } from \"lit\";\r\nimport { property, query } from \"lit/decorators.js\";\r\n\r\nimport {\r\n AttachInternals,\r\n Labelled,\r\n ConstraintValidation,\r\n Dirty,\r\n Disabled,\r\n FormAssociated,\r\n Required,\r\n RequiredConstraintValidation,\r\n Touched,\r\n DesignToken,\r\n formValue,\r\n M3eFocusRingElement,\r\n scrollIntoViewIfNeeded,\r\n Role,\r\n Focusable,\r\n prefersReducedMotion,\r\n forcedColorsActive,\r\n deleteCustomState,\r\n addCustomState,\r\n setCustomState,\r\n customElement,\r\n MutationController,\r\n} from \"@m3e/web/core\";\r\n\r\nimport { ListKeyManager } from \"@m3e/web/core/a11y\";\r\n\r\nimport type { M3eFormFieldElement, FormFieldControl } from \"@m3e/web/form-field\";\r\nimport { M3eOptionElement, M3eOptionPanelElement } from \"@m3e/web/option\";\r\n\r\n/**\r\n * A form control that allows users to select a value from a set of predefined options.\r\n *\r\n * @description\r\n * The `m3e-select` component follows Material Design 3 principles and provides a comprehensive\r\n * selection interface for capturing user input. It supports both single and multiple selection modes,\r\n * customizable validation states, and accessible keyboard navigation. The component integrates seamlessly\r\n * with form field containers and dynamically positions its option list menu to ensure optimal viewport\r\n * visibility. Selection changes are communicated through standard form events, enabling predictable integration\r\n * with form submission and reactive state management systems.\r\n *\r\n * @example\r\n * The following demonstrates a `m3e-select` component wrapped in a `m3e-form-field` with a slotted label.\r\n * The label is associated with the select via the `for` and `id` attributes, ensuring accessible form semantics.\r\n * Each `m3e-option` defines an option within the dropdown.\r\n *\r\n * ```html\r\n * <m3e-form-field>\r\n * <label slot=\"label\" for=\"select\">Choose your favorite fruit</label>\r\n * <m3e-select id=\"select\">\r\n * <m3e-option>Apples</m3e-option>\r\n * <m3e-option>Oranges</m3e-option>\r\n * <m3e-option>Bananas</m3e-option>\r\n * <m3e-option>Grapes</m3e-option>\r\n * </m3e-select>\r\n * </m3e-form-field>\r\n * ```\r\n *\r\n * @tag m3e-select\r\n *\r\n * @slot - Renders the options of the select.\r\n * @slot arrow - Renders the dropdown arrow.\r\n * @slot value - Renders the selected value(s).\r\n *\r\n * @attr disabled - Whether the element is disabled.\r\n * @attr hide-selection-indicator - Whether to hide the selection indicator for single select options.\r\n * @attr multi - Whether multiple options can be selected.\r\n * @attr name - The name that identifies the element when submitting the associated form.\r\n * @attr panel-class - Class or list of classes to be applied to the select's overlay panel.\r\n * @attr required - Whether the element is required.\r\n *\r\n * @fires beforeinput - Dispatched before the selected state changes.\r\n * @fires input - Dispatched when the selected state changes.\r\n * @fires change - Dispatched when the selected state changes.\r\n *\r\n * @cssprop --m3e-form-field-font-size - The font size of the select control.\r\n * @cssprop --m3e-form-field-font-weight - The font weight of the select control.\r\n * @cssprop --m3e-form-field-line-height - The line height of the select control.\r\n * @cssprop --m3e-form-field-tracking - The letter spacing of the select control.\r\n * @cssprop --m3e-select-container-shape - The corner radius of the select container.\r\n * @cssprop --m3e-select-disabled-color - The text color when the select is disabled.\r\n * @cssprop --m3e-select-disabled-color-opacity - The opacity level applied to the disabled text color.\r\n * @cssprop --m3e-select-icon-size - The size of the dropdown arrow icon.\r\n */\r\n@customElement(\"m3e-select\")\r\nexport class M3eSelectElement\r\n extends Focusable(\r\n Labelled(\r\n RequiredConstraintValidation(\r\n Dirty(\r\n Touched(\r\n Required(ConstraintValidation(FormAssociated(Disabled(AttachInternals(Role(LitElement, \"combobox\")))))),\r\n ),\r\n ),\r\n ),\r\n ),\r\n )\r\n implements FormFieldControl\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 vertical-align: middle;\r\n outline: none;\r\n position: relative;\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 min-height: var(--m3e-form-field-line-height, ${DesignToken.typescale.standard.body.large.lineHeight});\r\n border-radius: var(--m3e-select-container-shape, ${DesignToken.shape.corner.extraSmall});\r\n }\r\n :host(:not(:disabled)) {\r\n cursor: pointer;\r\n }\r\n :host(:disabled) {\r\n color: color-mix(\r\n in srgb,\r\n var(--m3e-select-disabled-color, ${DesignToken.color.onSurface}) var(--m3e-select-disabled-color-opacity, 38%),\r\n transparent\r\n );\r\n }\r\n .options {\r\n display: none;\r\n }\r\n .base {\r\n flex: 1 1 auto;\r\n display: inline-flex;\r\n align-items: center;\r\n overflow: hidden;\r\n }\r\n .arrow-wrapper {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n margin-top: var(--_select-arrow-margin-top);\r\n }\r\n ::slotted([slot=\"arrow\"]),\r\n .arrow {\r\n vertical-align: middle;\r\n width: 1em;\r\n height: 1em;\r\n font-size: var(--m3e-select-icon-size, 1.5rem);\r\n }\r\n :host(:is(:state(--open), :--open)) .focus-ring {\r\n display: none;\r\n }\r\n `;\r\n\r\n /** @private */ static __nextId = 0;\r\n\r\n /** @private */ private _options = new Array<M3eOptionElement>();\r\n /** @private */ #clone?: HTMLElement;\r\n\r\n /** @private */ #menu?: M3eOptionPanelElement;\r\n /** @private */ #ignoreKeyUp = false;\r\n /** @private */ #ignoreFocusVisible = false;\r\n\r\n /** @private */ readonly #id = `m3e-select-${M3eSelectElement.__nextId++}`;\r\n /** @private */ readonly #listId = `${this.#id}-list`;\r\n\r\n /** @private */ readonly #clickHandler = (e: Event) => this.#handleClick(e);\r\n /** @private */ readonly #keyDownHandler = (e: KeyboardEvent) => this.#handleKeyDown(e);\r\n /** @private */ readonly #keyUpHandler = (e: KeyboardEvent) => this.#handleKeyUp(e);\r\n /** @private */ readonly #menuToggleHandler = (e: ToggleEvent) => this.#handleMenuToggle(e);\r\n /** @private */ readonly #menuPointerDownHandler = (e: PointerEvent) => this.#handleMenuPointerDown(e);\r\n /** @private */ readonly #menuPointerUpHandler = (e: PointerEvent) => this.#handleMenuPointerUp(e);\r\n /** @private */ #menuPressedOption?: M3eOptionElement;\r\n\r\n /** @private */ private readonly _listKeyManager = new ListKeyManager<M3eOptionElement>()\r\n .withWrap()\r\n .withHomeAndEnd()\r\n .withPageUpAndDown()\r\n .withVerticalOrientation()\r\n .withTypeahead()\r\n .onActiveItemChange(() => {\r\n if (this._listKeyManager.activeItem) {\r\n this.#activateOption(this._listKeyManager.activeItem);\r\n }\r\n });\r\n\r\n /** @private */ @query(\".focus-ring\") private readonly _focusRing?: M3eFocusRingElement;\r\n\r\n constructor() {\r\n super();\r\n\r\n new MutationController(this, {\r\n config: {\r\n childList: true,\r\n subtree: true,\r\n },\r\n callback: () => this.#handleMutation(),\r\n });\r\n }\r\n\r\n /**\r\n * Whether to hide the selection indicator for single select options.\r\n * @default false\r\n */\r\n @property({ attribute: \"hide-selection-indicator\", type: Boolean }) hideSelectionIndicator = false;\r\n\r\n /**\r\n * Whether multiple options can be selected.\r\n * @default false\r\n */\r\n @property({ type: Boolean }) multi = false;\r\n\r\n /**\r\n * Class or list of classes to be applied to the select's overlay panel.\r\n * @default \"\"\r\n */\r\n @property({ attribute: \"panel-class\" }) panelClass = \"\";\r\n\r\n get #options(): readonly M3eOptionElement[] {\r\n return this._listKeyManager?.items ?? [];\r\n }\r\n\r\n get #selected(): readonly M3eOptionElement[] {\r\n return this.#options.filter((x) => x.selected);\r\n }\r\n\r\n /** The options that can be selected. */\r\n get options(): readonly M3eOptionElement[] {\r\n return this._options ?? [];\r\n }\r\n\r\n /** The selected option(s). */\r\n get selected(): readonly M3eOptionElement[] {\r\n return this.options.filter((x) => x.selected);\r\n }\r\n\r\n /** The selected (enabled) value(s). */\r\n get value(): string | readonly string[] | null {\r\n const values = this.selected.filter((x) => !x.disabled).map((x) => x.value);\r\n switch (values.length) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return values[0];\r\n default:\r\n return values;\r\n }\r\n }\r\n\r\n /** @inheritdoc @internal */\r\n override get [formValue]() {\r\n const values = this.value;\r\n if (Array.isArray(values)) {\r\n const data = new FormData();\r\n for (const value of values) {\r\n data.append(this.name, value);\r\n }\r\n return data;\r\n }\r\n return <string | null>values;\r\n }\r\n\r\n /** @inheritdoc */\r\n get shouldLabelFloat(): boolean {\r\n return this.selected.filter((x) => !x.isEmpty).length > 0;\r\n }\r\n\r\n /** @private */\r\n get #formField(): M3eFormFieldElement | null {\r\n return this.closest(\"m3e-form-field\");\r\n }\r\n\r\n /** @inheritdoc */\r\n onContainerClick(): void {\r\n this.#ignoreFocusVisible = true;\r\n this.#toggleMenu();\r\n this.focus({ preventScroll: true });\r\n }\r\n\r\n /**\r\n * Clears the value of the element.\r\n * @param [restoreFocus=false] Whether to restore input focus.\r\n */\r\n clear(restoreFocus = false): void {\r\n const selected = this.#selected;\r\n const willChange = selected.length > 0;\r\n\r\n if (willChange) {\r\n selected.forEach((x) => {\r\n x.selected = false;\r\n this.#updateSelectionState(x);\r\n });\r\n this.requestUpdate();\r\n }\r\n\r\n this.#hideMenu();\r\n\r\n if (willChange) {\r\n this.dispatchEvent(new Event(\"change\", { bubbles: true }));\r\n }\r\n\r\n if (restoreFocus) {\r\n this.focus();\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n\r\n this.ariaHasPopup = \"listbox\";\r\n this.ariaExpanded = \"false\";\r\n\r\n this.addEventListener(\"click\", this.#clickHandler);\r\n this.addEventListener(\"keydown\", this.#keyDownHandler);\r\n this.addEventListener(\"keyup\", this.#keyUpHandler);\r\n\r\n this.#handleMutation();\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n\r\n this.removeEventListener(\"click\", this.#clickHandler);\r\n this.removeEventListener(\"keydown\", this.#keyDownHandler);\r\n this.removeEventListener(\"keyup\", this.#keyUpHandler);\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override update(changedProperties: PropertyValues<this>): void {\r\n super.update(changedProperties);\r\n\r\n if (changedProperties.has(\"hideSelectionIndicator\")) {\r\n this.#options.forEach((x) => setCustomState(x, \"--hide-selection-indicator\", this.hideSelectionIndicator));\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues<this>): void {\r\n super.firstUpdated(_changedProperties);\r\n\r\n this._focusRing?.attach(this);\r\n\r\n if (this.#formField && this._focusRing) {\r\n this._focusRing.style.display = \"none\";\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html` <m3e-focus-ring class=\"focus-ring\"></m3e-focus-ring>\r\n <div class=\"base\">\r\n <m3e-text-overflow>\r\n <slot name=\"value\">\r\n ${this.selected\r\n .filter((x) => !x.isEmpty)\r\n .map((x, i) => (i > 0 ? html`<span>, </span>${x.label}` : x.label))}\r\n </slot>\r\n </m3e-text-overflow>\r\n <div class=\"arrow-wrapper\" aria-hidden=\"true\">\r\n <slot name=\"arrow\">\r\n <svg class=\"arrow\" viewBox=\"0 -960 960 960\" fill=\"currentColor\">\r\n <path d=\"M480-360 280-560h400L480-360Z\" />\r\n </svg>\r\n </slot>\r\n </div>\r\n </div>\r\n <div class=\"options\" aria-hidden=\"true\" @state-change=\"${this.#handleOptionStateChange}\">\r\n <slot></slot>\r\n </div>`;\r\n }\r\n\r\n /** @private */\r\n #handleOptionStateChange(e: Event): void {\r\n if (!(e.target instanceof M3eOptionElement)) return;\r\n e.stopImmediatePropagation();\r\n\r\n const index = this.options.indexOf(e.target);\r\n if (index == -1) return;\r\n\r\n const clone = this.#options[index];\r\n if (!clone) return;\r\n\r\n clone.disabled = e.target.disabled;\r\n\r\n if (clone.selected === e.target.selected) return;\r\n\r\n clone.selected = e.target.selected;\r\n\r\n if (!this.isUpdatePending) {\r\n this.requestUpdate();\r\n }\r\n\r\n this.#formField?.notifyControlStateChange(true);\r\n }\r\n\r\n /** @private */\r\n #handleMutation(): void {\r\n this.#clone = <HTMLElement>this.cloneNode(true);\r\n\r\n const { added } = this._listKeyManager.setItems([...this.#clone.querySelectorAll(\"m3e-option\")]);\r\n added.forEach((x) => {\r\n x.id = x.id || `${this.#id}-option-${this._listKeyManager.items.indexOf(x)}`;\r\n setCustomState(x, \"--hide-selection-indicator\", this.hideSelectionIndicator);\r\n });\r\n\r\n this._options = [...this.querySelectorAll(\"m3e-option\")];\r\n\r\n this.#formField?.notifyControlStateChange();\r\n if (this.#menu) {\r\n this.#menu.replaceChildren(...this.#clone.childNodes);\r\n if (this._options.length == 0) {\r\n this.#hideMenu();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleClick(e: Event): void {\r\n if (e.defaultPrevented || this.disabled) return;\r\n this.#toggleMenu();\r\n }\r\n\r\n /** @private */\r\n #handleKeyDown(e: KeyboardEvent): void {\r\n if (e.defaultPrevented) return;\r\n this.#ignoreFocusVisible = false;\r\n\r\n switch (e.key) {\r\n case \" \":\r\n case \"Enter\":\r\n e.preventDefault();\r\n if (!this.multi) {\r\n if (this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n if (this.#menu?.isOpen) {\r\n if (!prefersReducedMotion()) {\r\n setTimeout(() => this.#hideMenu(), 150);\r\n } else {\r\n this.#hideMenu();\r\n }\r\n } else {\r\n this.#showMenu();\r\n }\r\n } else if (!this.#menu) {\r\n this.#ignoreKeyUp = true;\r\n this.#toggleMenu();\r\n }\r\n\r\n break;\r\n\r\n case \"Escape\":\r\n case \"Tab\":\r\n this.#hideMenu();\r\n break;\r\n\r\n case \"Down\":\r\n case \"ArrowDown\":\r\n if (this.multi && !this.#menu) {\r\n this.#toggleMenu();\r\n } else {\r\n this._listKeyManager.onKeyDown(e);\r\n if (!this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n }\r\n break;\r\n\r\n default:\r\n this._listKeyManager.onKeyDown(e);\r\n if (!this.multi && !this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleKeyUp(e: KeyboardEvent): void {\r\n if (e.defaultPrevented) return;\r\n\r\n if (this.#ignoreKeyUp) {\r\n this.#ignoreKeyUp = false;\r\n return;\r\n }\r\n\r\n switch (e.key) {\r\n case \" \":\r\n case \"Enter\":\r\n if (!this.multi) return;\r\n e.preventDefault();\r\n if (this.#menu && this._listKeyManager.activeItem) {\r\n this.#selectOption(this._listKeyManager.activeItem);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleMenuPointerDown(e: PointerEvent): void {\r\n this.#menuPressedOption = undefined;\r\n\r\n if (e.button === 2) return;\r\n // Prevent click to avoid stealing focus.\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n const option = <M3eOptionElement | undefined>(\r\n e.composedPath().find((x) => x instanceof HTMLElement && x.tagName === \"M3E-OPTION\")\r\n );\r\n\r\n if (option && !option.disabled) {\r\n this.#menuPressedOption = option;\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleMenuPointerUp(e: PointerEvent): void {\r\n const pressedOption = this.#menuPressedOption;\r\n this.#menuPressedOption = undefined;\r\n\r\n if (e.button === 2) return;\r\n\r\n if (!pressedOption) return;\r\n\r\n const option = <M3eOptionElement | undefined>(\r\n e.composedPath().find((x) => x instanceof HTMLElement && x.tagName === \"M3E-OPTION\")\r\n );\r\n\r\n if (option === pressedOption) {\r\n this.#selectOption(option);\r\n this._listKeyManager.setActiveItem(option);\r\n if (this.multi) {\r\n this.requestUpdate();\r\n }\r\n }\r\n\r\n if (!this.multi) {\r\n if (!prefersReducedMotion()) {\r\n setTimeout(() => this.#hideMenu(), 150);\r\n } else {\r\n this.#hideMenu();\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #handleMenuToggle(e: ToggleEvent): void {\r\n if (!this.#menu) return;\r\n\r\n if (e.newState !== \"closed\") {\r\n const option = this.#selected.find((x) => !x.disabled) ?? this._listKeyManager.items.find((x) => !x.disabled);\r\n this._listKeyManager.setActiveItem(option);\r\n if (option) {\r\n scrollIntoViewIfNeeded(option, this.#menu, { block: \"nearest\", behavior: \"instant\" });\r\n }\r\n this.dispatchEvent(\r\n new ToggleEvent(\"toggle\", {\r\n oldState: e.oldState,\r\n newState: e.newState,\r\n }),\r\n );\r\n } else {\r\n if (prefersReducedMotion()) {\r\n this.#destroyMenu(e);\r\n } else {\r\n // NOTE: use transitionend is preferred but doesn't fire when used here.\r\n // This is a workaround until that is fixed.\r\n setTimeout(() => this.#destroyMenu(e), 100);\r\n }\r\n }\r\n }\r\n\r\n /** @private */\r\n #destroyMenu(e: ToggleEvent): void {\r\n if (!this.#menu) return;\r\n\r\n this.#clone?.replaceChildren(...this.#menu.childNodes);\r\n this.#menu.remove();\r\n this.#menu.removeEventListener(\"toggle\", this.#menuToggleHandler);\r\n this.#menu.removeEventListener(\"pointerdown\", this.#menuPointerDownHandler);\r\n this.#menu.removeEventListener(\"pointerup\", this.#menuPointerUpHandler);\r\n this.#menu = undefined;\r\n\r\n this.ariaExpanded = \"false\";\r\n this.removeAttribute(\"aria-controls\");\r\n this.removeAttribute(\"aria-owns\");\r\n this.removeAttribute(\"aria-activedescendant\");\r\n this.requestUpdate();\r\n\r\n deleteCustomState(this, \"--open\");\r\n this.#formField?.notifyControlStateChange();\r\n\r\n this.dispatchEvent(\r\n new ToggleEvent(\"toggle\", {\r\n oldState: e.oldState,\r\n newState: e.newState,\r\n }),\r\n );\r\n }\r\n\r\n /** @private */\r\n #toggleMenu(): void {\r\n if (this.disabled) return;\r\n if (this.#menu) {\r\n this.#hideMenu();\r\n } else {\r\n this.#showMenu();\r\n }\r\n }\r\n\r\n /** @private */\r\n #showMenu(): void {\r\n if (this.#menu || this._options.length == 0) return;\r\n\r\n this.#menu = document.createElement(\"m3e-option-panel\");\r\n if (this.multi) {\r\n this.#menu.ariaMultiSelectable = \"true\";\r\n }\r\n\r\n this.#menu.id = this.#listId;\r\n\r\n if (this.panelClass) {\r\n for (const klass of this.panelClass\r\n .split(/\\s+/)\r\n .map((d) => d.trim())\r\n .filter(Boolean)) {\r\n this.#menu.classList.add(klass);\r\n }\r\n }\r\n\r\n this.#menu.style.overflowX = \"hidden\";\r\n this.#menu.fitAnchorWidth = true;\r\n this.#menu.addEventListener(\"toggle\", this.#menuToggleHandler);\r\n this.#menu.addEventListener(\"pointerdown\", this.#menuPointerDownHandler);\r\n this.#menu.addEventListener(\"pointerup\", this.#menuPointerUpHandler);\r\n\r\n if (this.#clone) {\r\n this.#menu.replaceChildren(...this.#clone.childNodes);\r\n }\r\n\r\n (this.#formField ?? this).insertAdjacentElement(\"afterend\", this.#menu);\r\n\r\n this.ariaExpanded = \"true\";\r\n this.setAttribute(\"aria-controls\", this.#listId);\r\n this.setAttribute(\"aria-owns\", this.#listId);\r\n this.#formField?.notifyControlStateChange();\r\n\r\n setTimeout(() => {\r\n this.#menu?.show(this, this.#formField?.menuAnchor);\r\n addCustomState(this, \"--open\");\r\n });\r\n }\r\n\r\n /** @private */\r\n #hideMenu(): void {\r\n if (!this.#menu) return;\r\n\r\n this.#menu.hide();\r\n deleteCustomState(this, \"--open\");\r\n }\r\n\r\n /** @private */\r\n #activateOption(option: M3eOptionElement): void {\r\n this.setAttribute(\"aria-activedescendant\", option.id);\r\n if (this.#menu) {\r\n scrollIntoViewIfNeeded(option, this.#menu, { block: \"nearest\", behavior: \"instant\" });\r\n\r\n const focusVisible = !this.#ignoreFocusVisible && (this.matches(\":focus-visible\") || forcedColorsActive());\r\n\r\n this.#options.forEach((x) => {\r\n const active = x === option && focusVisible;\r\n if (active) {\r\n x.focusRing?.show();\r\n x.stateLayer?.show(\"focused\");\r\n } else {\r\n x.focusRing?.hide();\r\n x.stateLayer?.hide(\"focused\");\r\n }\r\n });\r\n }\r\n }\r\n\r\n /** @private */\r\n #updateSelectionState(clone: M3eOptionElement): void {\r\n const option = this._options[this._listKeyManager.items.indexOf(clone)];\r\n if (option) {\r\n option.selected = clone.selected;\r\n }\r\n }\r\n\r\n /** @private */\r\n #selectOption(option: M3eOptionElement): void {\r\n const selected = this.multi ? !option.selected : true;\r\n if (option.selected === selected) return;\r\n\r\n if (this.dispatchEvent(new Event(\"beforeinput\", { bubbles: true, cancelable: true }))) {\r\n option.selected = selected;\r\n this.#updateSelectionState(option);\r\n\r\n if (!this.multi) {\r\n this.#selected\r\n .filter((x) => x !== option)\r\n .forEach((x) => {\r\n x.selected = false;\r\n this.#updateSelectionState(x);\r\n });\r\n }\r\n\r\n this.requestUpdate();\r\n this.#formField?.notifyControlStateChange();\r\n\r\n this.dispatchEvent(new Event(\"input\", { bubbles: true }));\r\n this.dispatchEvent(new Event(\"change\", { bubbles: true }));\r\n }\r\n }\r\n}\r\n\r\ninterface M3eSelectElementEventMap extends HTMLElementEventMap {\r\n toggle: ToggleEvent;\r\n}\r\n\r\nexport interface M3eSelectElement {\r\n addEventListener<K extends keyof M3eSelectElementEventMap>(\r\n type: K,\r\n listener: (this: M3eSelectElement, ev: M3eSelectElementEventMap[K]) => void,\r\n options?: boolean | AddEventListenerOptions,\r\n ): void;\r\n\r\n addEventListener(\r\n type: string,\r\n listener: EventListenerOrEventListenerObject,\r\n options?: boolean | AddEventListenerOptions,\r\n ): void;\r\n\r\n removeEventListener<K extends keyof M3eSelectElementEventMap>(\r\n type: K,\r\n listener: (this: M3eSelectElement, ev: M3eSelectElementEventMap[K]) => void,\r\n options?: boolean | EventListenerOptions,\r\n ): void;\r\n\r\n removeEventListener(\r\n type: string,\r\n listener: EventListenerOrEventListenerObject,\r\n options?: boolean | EventListenerOptions,\r\n ): void;\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-select\": M3eSelectElement;\r\n }\r\n}\r\n"],"names":["M3eSelectElement","M3eSelectElement_1","Focusable","Labelled","RequiredConstraintValidation","Dirty","Touched","Required","ConstraintValidation","FormAssociated","Disabled","AttachInternals","Role","LitElement","constructor","super","this","_options","Array","_M3eSelectElement_clone","set","_M3eSelectElement_menu","_M3eSelectElement_ignoreKeyUp","_M3eSelectElement_ignoreFocusVisible","_M3eSelectElement_id","__nextId","_M3eSelectElement_listId","__classPrivateFieldGet","_M3eSelectElement_clickHandler","e","call","_M3eSelectElement_keyDownHandler","_M3eSelectElement_keyUpHandler","_M3eSelectElement_menuToggleHandler","_M3eSelectElement_menuPointerDownHandler","_M3eSelectElement_menuPointerUpHandler","_M3eSelectElement_menuPressedOption","_listKeyManager","ListKeyManager","withWrap","withHomeAndEnd","withPageUpAndDown","withVerticalOrientation","withTypeahead","onActiveItemChange","activeItem","_M3eSelectElement_instances","_M3eSelectElement_activateOption","hideSelectionIndicator","multi","panelClass","MutationController","config","childList","subtree","callback","_M3eSelectElement_handleMutation","options","selected","filter","x","value","values","disabled","map","length","WeakMap","WeakSet","_M3eSelectElement_options_get","items","_M3eSelectElement_selected_get","formValue","isArray","data","FormData","append","name","shouldLabelFloat","isEmpty","onContainerClick","__classPrivateFieldSet","_M3eSelectElement_toggleMenu","focus","preventScroll","clear","restoreFocus","willChange","forEach","_M3eSelectElement_updateSelectionState","requestUpdate","_M3eSelectElement_hideMenu","dispatchEvent","Event","bubbles","connectedCallback","ariaHasPopup","ariaExpanded","addEventListener","disconnectedCallback","removeEventListener","update","changedProperties","has","setCustomState","firstUpdated","_changedProperties","_focusRing","attach","_M3eSelectElement_formField_get","style","display","render","html","i","label","_M3eSelectElement_handleOptionStateChange","closest","target","M3eOptionElement","stopImmediatePropagation","index","indexOf","clone","isUpdatePending","notifyControlStateChange","cloneNode","added","setItems","querySelectorAll","id","replaceChildren","childNodes","defaultPrevented","key","preventDefault","_M3eSelectElement_selectOption","isOpen","prefersReducedMotion","setTimeout","_M3eSelectElement_showMenu","onKeyDown","undefined","button","option","composedPath","find","HTMLElement","tagName","pressedOption","setActiveItem","newState","scrollIntoViewIfNeeded","block","behavior","ToggleEvent","oldState","_M3eSelectElement_destroyMenu","remove","removeAttribute","deleteCustomState","document","createElement","ariaMultiSelectable","klass","split","d","trim","Boolean","classList","add","overflowX","fitAnchorWidth","insertAdjacentElement","setAttribute","show","menuAnchor","addCustomState","hide","focusVisible","matches","forcedColorsActive","focusRing","stateLayer","cancelable","styles","css","DesignToken","typescale","standard","body","large","fontSize","fontWeight","lineHeight","tracking","shape","corner","extraSmall","color","onSurface","__decorate","query","prototype","property","attribute","type","customElement"],"mappings":";;;;;izBAyFO,IAAMA,GAAgBC,GAAtB,cACGC,EACNC,EACEC,EACEC,EACEC,EACEC,EAASC,EAAqBC,EAAeC,EAASC,EAAgBC,EAAKC,EAAY,uBA6FjGC,WAAAA,GACEC,oBAjCsBC,KAAAC,SAAW,IAAIC,MACvBC,EAAAC,IAAAJ,aAEAK,EAAAD,IAAAJ,aACAM,EAAAF,IAAAJ,MAAe,GACfO,EAAAH,IAAAJ,MAAsB,GAEbQ,WAAM,cAAcvB,GAAiBwB,YACrCC,EAAAN,IAAAJ,KAAU,GAAGW,EAAAX,KAAIQ,EAAA,aAEjBI,EAAAR,IAAAJ,KAAiBa,GAAaF,EAAAX,cAAiBc,KAAjBd,KAAkBa,IAChDE,EAAAX,IAAAJ,KAAmBa,GAAqBF,EAAAX,cAAmBc,KAAnBd,KAAoBa,IAC5DG,EAAAZ,IAAAJ,KAAiBa,GAAqBF,EAAAX,cAAiBc,KAAjBd,KAAkBa,IACxDI,EAAAb,IAAAJ,KAAsBa,GAAmBF,EAAAX,eAAsBc,KAAtBd,KAAuBa,IAChEK,EAAAd,IAAAJ,KAA2Ba,GAAoBF,EAAAX,cAA2Bc,KAA3Bd,KAA4Ba,IAC3EM,EAAAf,IAAAJ,KAAyBa,GAAoBF,EAA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;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,6CAA6C;IAC7C,CAAC,gBAAgB,CAAC,IAAI,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAID;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,CAAC,UAAU,CAAC,EAC1D,IAAI,EAAE,CAAC,EACP,YAAY,GAAE,OAAe,GAC5B,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,CAwIlC"}
|
|
@@ -369,11 +369,14 @@ export declare const DesignToken: {
|
|
|
369
369
|
readonly space50: import("lit").CSSResult;
|
|
370
370
|
readonly space75: import("lit").CSSResult;
|
|
371
371
|
readonly space100: import("lit").CSSResult;
|
|
372
|
+
readonly space125: import("lit").CSSResult;
|
|
372
373
|
readonly space150: import("lit").CSSResult;
|
|
374
|
+
readonly space175: import("lit").CSSResult;
|
|
373
375
|
readonly space200: import("lit").CSSResult;
|
|
374
376
|
readonly space250: import("lit").CSSResult;
|
|
375
377
|
readonly space300: import("lit").CSSResult;
|
|
376
378
|
readonly space400: import("lit").CSSResult;
|
|
379
|
+
readonly space450: import("lit").CSSResult;
|
|
377
380
|
readonly space500: import("lit").CSSResult;
|
|
378
381
|
readonly space600: import("lit").CSSResult;
|
|
379
382
|
readonly space700: import("lit").CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/shared/tokens/DesignToken.ts"],"names":[],"mappings":"AAUA,8CAA8C;AAC9C,eAAO,MAAM,WAAW;IACtB,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGxC,4CAA4C;;;;;;;;;IAG5C,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGxC,8CAA8C;;;;;;IAG9C,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG5C,6CAA6C;;;;;;IAG7C,0CAA0C;;;;;;IAG1C,8CAA8C
|
|
1
|
+
{"version":3,"file":"DesignToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/shared/tokens/DesignToken.ts"],"names":[],"mappings":"AAUA,8CAA8C;AAC9C,eAAO,MAAM,WAAW;IACtB,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGxC,4CAA4C;;;;;;;;;IAG5C,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGxC,8CAA8C;;;;;;IAG9C,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG5C,6CAA6C;;;;;;IAG7C,0CAA0C;;;;;;IAG1C,8CAA8C;;;;;;;;;;;;;;;;;;;;;CAEtC,CAAC"}
|
|
@@ -10,25 +10,31 @@ export declare const MeasurementToken: {
|
|
|
10
10
|
readonly space75: import("lit").CSSResult;
|
|
11
11
|
/** 8dp spacing. */
|
|
12
12
|
readonly space100: import("lit").CSSResult;
|
|
13
|
+
/** 10dp spacing. */
|
|
14
|
+
readonly space125: import("lit").CSSResult;
|
|
13
15
|
/** 12dp spacing. */
|
|
14
16
|
readonly space150: import("lit").CSSResult;
|
|
17
|
+
/** 14dp spacing. */
|
|
18
|
+
readonly space175: import("lit").CSSResult;
|
|
15
19
|
/** 16dp spacing. */
|
|
16
20
|
readonly space200: import("lit").CSSResult;
|
|
17
21
|
/** 20dp spacing. */
|
|
18
22
|
readonly space250: import("lit").CSSResult;
|
|
19
|
-
/**
|
|
23
|
+
/** 24dp spacing. */
|
|
20
24
|
readonly space300: import("lit").CSSResult;
|
|
21
|
-
/**
|
|
25
|
+
/** 32dp spacing. */
|
|
22
26
|
readonly space400: import("lit").CSSResult;
|
|
23
|
-
/**
|
|
27
|
+
/** 36dp spacing. */
|
|
28
|
+
readonly space450: import("lit").CSSResult;
|
|
29
|
+
/** 40dp spacing. */
|
|
24
30
|
readonly space500: import("lit").CSSResult;
|
|
25
|
-
/**
|
|
31
|
+
/** 48dp spacing. */
|
|
26
32
|
readonly space600: import("lit").CSSResult;
|
|
27
|
-
/**
|
|
33
|
+
/** 56dp spacing. */
|
|
28
34
|
readonly space700: import("lit").CSSResult;
|
|
29
|
-
/**
|
|
35
|
+
/** 64dp spacing. */
|
|
30
36
|
readonly space800: import("lit").CSSResult;
|
|
31
|
-
/**
|
|
37
|
+
/** 72dp spacing. */
|
|
32
38
|
readonly space900: import("lit").CSSResult;
|
|
33
39
|
};
|
|
34
40
|
//# sourceMappingURL=MeasurementToken.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeasurementToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/shared/tokens/MeasurementToken.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MeasurementToken.d.ts","sourceRoot":"","sources":["../../../../../src/core/shared/tokens/MeasurementToken.ts"],"names":[],"mappings":"AAMA,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB;IAC3B,oBAAoB;;IAGpB,mBAAmB;;IAGnB,mBAAmB;;IAGnB,mBAAmB;;IAGnB,mBAAmB;;IAGnB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;IAGpB,oBAAoB;;CAEZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldElement.d.ts","sourceRoot":"","sources":["../../../src/form-field/FormFieldElement.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAW,cAAc,EAAa,MAAM,KAAK,CAAC;AAwBhG,OAAO,EAAwB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH,qBACa,mBAAoB,SAAQ,wBAAgD;;IAiCvF,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"FormFieldElement.d.ts","sourceRoot":"","sources":["../../../src/form-field/FormFieldElement.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAW,cAAc,EAAa,MAAM,KAAK,CAAC;AAwBhG,OAAO,EAAwB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MA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I;IAKlC,kBAAkB;cACC,YAAY,CAAC,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAK/E,kBAAkB;cACC,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAmBxE,kBAAkB;IACT,MAAM,IAAI,OAAO;CA8B3B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,gBAAgB,CAAC;KAChC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionPanelElement.d.ts","sourceRoot":"","sources":["../../../src/option/OptionPanelElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,MAAM,KAAK,CAAC;AAchD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAKlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,qBAAsB,SAAQ,0BAAwC;;IAajF,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CA+FpC;;IAcF;;;OAGG;IAC0B,KAAK,EAAE,gBAAgB,CAAa;IAEjE,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAKlC,kBAAkB;cACC,MAAM,IAAI,OAAO;
|
|
1
|
+
{"version":3,"file":"OptionPanelElement.d.ts","sourceRoot":"","sources":["../../../src/option/OptionPanelElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,MAAM,KAAK,CAAC;AAchD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAKlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,qBAAsB,SAAQ,0BAAwC;;IAajF,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CA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AAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IAER,mBAAmB,CAAC,CAAC,SAAS,MAAM,wBAAwB,EAC1D,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3E,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;IAER,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;CACT;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,gBAAgB,CAAC;KAChC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeElement.d.ts","sourceRoot":"","sources":["../../../src/theme/ThemeElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAclG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBACa,eAAgB,SAAQ,UAAU;;
|
|
1
|
+
{"version":3,"file":"ThemeElement.d.ts","sourceRoot":"","sources":["../../../src/theme/ThemeElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAclG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBACa,eAAgB,SAAQ,UAAU;;IA0E7C,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAIpC;IAUF;;;OAGG;IACS,KAAK,SAAa;IAE9B;;OAEG;IACS,OAAO,EAAE,YAAY,CAAa;IAE9C;;;OAGG;IACS,MAAM,EAAE,WAAW,CAAU;IAEzC;;;OAGG;IACS,QAAQ,EAAE,aAAa,CAAc;IAEjD;;;OAGG;IACqD,WAAW,UAAS;IAE5E;;;OAGG;IACyB,OAAO,SAAK;IAExC;;OAEG;IACS,MAAM,EAAE,YAAY,CAAc;IAE9C,uCAAuC;IACvC,IAAI,MAAM,IAAI,OAAO,CAiBpB;IAED,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IA4BlC,kBAAkB;IACT,oBAAoB,IAAI,IAAI;IAarC,kBAAkB;cACC,OAAO,CAAC,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAQ1E,kBAAkB;cACC,YAAY,CAAC,kBAAkB,EAAE,cAAc,GAAG,IAAI;IAKzE,kBAAkB;cACC,MAAM,IAAI,OAAO;CAkIrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,eAAe,CAAC;KAC9B;CACF"}
|
package/dist/theme.js
CHANGED
|
@@ -7050,11 +7050,13 @@ _M3eThemeElement_getContrastLevel = function _M3eThemeElement_getContrastLevel()
|
|
|
7050
7050
|
}
|
|
7051
7051
|
return css;
|
|
7052
7052
|
};
|
|
7053
|
-
const
|
|
7054
|
-
const {
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7053
|
+
const omitKeys = (obj, ...keys) => {
|
|
7054
|
+
const rest = {
|
|
7055
|
+
...obj
|
|
7056
|
+
};
|
|
7057
|
+
for (const key of keys) {
|
|
7058
|
+
delete rest[key];
|
|
7059
|
+
}
|
|
7058
7060
|
return rest;
|
|
7059
7061
|
};
|
|
7060
7062
|
let css = "";
|
|
@@ -7075,11 +7077,12 @@ _M3eThemeElement_getContrastLevel = function _M3eThemeElement_getContrastLevel()
|
|
|
7075
7077
|
css += composeCss(DesignToken.typescale.standard.body.small);
|
|
7076
7078
|
css += composeCss(DesignToken.elevation);
|
|
7077
7079
|
css += composeCss(DesignToken.shape.corner.value);
|
|
7078
|
-
|
|
7080
|
+
// Omit nonstandard tokens.
|
|
7081
|
+
css += composeCss(omitKeys(DesignToken.shape.corner, "value", "extraLargeEnd", "extraLargeStart", "mediumTop", "mediumEnd", "mediumStart", "smallTop", "smallEnd", "smallStart", "extraSmallEnd", "extraSmallStart", "extraSmallBottom"));
|
|
7079
7082
|
css += composeCss(DesignToken.motion.duration);
|
|
7080
7083
|
css += composeCss(DesignToken.motion.easing);
|
|
7081
7084
|
css += composeCss(DesignToken.motion.spring);
|
|
7082
|
-
css += composeCss(
|
|
7085
|
+
css += composeCss(omitKeys(DesignToken.density, "calc"));
|
|
7083
7086
|
css += composeCss(DesignToken.measurement);
|
|
7084
7087
|
css += composeCss(DesignToken.state);
|
|
7085
7088
|
registerStyleSheet(unsafeCSS(`html{${css}}`));
|