@m3e/nav-menu 1.0.5 → 1.1.0
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/README.md +3 -2
- package/dist/index.js +1097 -701
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +8 -249
- package/dist/index.min.js.map +1 -1
- package/dist/src/NavMenuElement.d.ts.map +1 -1
- package/dist/src/NavMenuItemGroupElement.d.ts.map +1 -1
- package/package.json +2 -16
package/dist/index.min.js
CHANGED
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
* Copyright (c) 2025 matraic
|
|
4
4
|
* See LICENSE file in the project root for full license text.
|
|
5
5
|
*/
|
|
6
|
-
import{LitElement as
|
|
6
|
+
import{LitElement as e,html as t,unsafeCSS as s,css as i}from"lit";import{Selected as n,Disabled as o,EventAttribute as r,AttachInternals as a,Role as l,DesignToken as h,hasAssignedNodes as c,scrollIntoViewIfNeeded as d,PressedController as m,FocusController as p}from"@m3e/core";import{selectionManager as u,SelectionManager as f}from"@m3e/core/a11y";import{M3eDirectionality as v}from"@m3e/core/bidi";function g(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r}function b(e,t,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(e):i?i.value:t.get(e)}function $(e,t,s,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,s):n?n.value=s:t.set(e,s),s}"function"==typeof SuppressedError&&SuppressedError;
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const y=e=>(t,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},_=globalThis,A=_.ShadowRoot&&(void 0===_.ShadyCSS||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,w=Symbol(),E=new WeakMap;
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2019 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/let
|
|
17
|
+
*/let S=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==w)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(A&&void 0===e){const s=void 0!==t&&1===t.length;s&&(e=E.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&E.set(t,e))}return e}toString(){return this.cssText}};const C=A?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return(e=>new S("string"==typeof e?e:e+"",void 0,w))(t)})(e):e,{is:k,defineProperty:x,getOwnPropertyDescriptor:I,getOwnPropertyNames:P,getOwnPropertySymbols:M,getPrototypeOf:T}=Object,U=globalThis,O=U.trustedTypes,H=O?O.emptyScript:"",R=U.reactiveElementPolyfillSupport,L=(e,t)=>e,N={toAttribute(e,t){switch(t){case Boolean:e=e?H:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=null!==e;break;case Number:s=null===e?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch(e){s=null}}return s}},j=(e,t)=>!k(e,t),W={attribute:!0,type:String,converter:N,reflect:!1,useDefault:!1,hasChanged:j};
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/Symbol.metadata??=Symbol("metadata"),
|
|
22
|
+
*/Symbol.metadata??=Symbol("metadata"),U.litPropertyMetadata??=new WeakMap;class z extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=W){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);void 0!==i&&x(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:n}=I(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const o=i?.call(this);n?.call(this,t),this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??W}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;const e=T(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(L("properties"))){const e=this.properties,t=[...P(e),...M(e)];for(const s of t)this.createProperty(s,e[s])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,s]of t)this.elementProperties.set(e,s)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const s=this._$Eu(e,t);void 0!==s&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const e of s)t.unshift(C(e))}else void 0!==e&&t.push(C(e));return t}static _$Eu(e,t){const s=t.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(A)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const s of t){const t=document.createElement("style"),i=_.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=s.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(void 0!==i&&!0===s.reflect){const n=(void 0!==s.converter?.toAttribute?s.converter:N).toAttribute(t,s.type);this._$Em=e,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=s.getPropertyOptions(i),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:N;this._$Em=i;const o=n.fromAttribute(t,e.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(e,t,s){if(void 0!==e){const i=this.constructor,n=this[e];if(s??=i.getPropertyOptions(e),!((s.hasChanged??j)(n,t)||s.useDefault&&s.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,s))))return;this.C(e,t,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==n||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,s]of e){const{wrapped:e}=s,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,s,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}z.elementStyles=[],z.shadowRootOptions={mode:"open"},z[L("elementProperties")]=new Map,z[L("finalized")]=new Map,R?.({ReactiveElement:z}),(U.reactiveElementVersions??=[]).push("2.1.1");
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
27
|
*/
|
|
28
|
-
const D={attribute:!0,type:String,converter:
|
|
28
|
+
const D={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:j},B=(e=D,t,s)=>{const{kind:i,metadata:n}=s;let o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),"setter"===i&&((e=Object.create(e)).wrapped=!0),o.set(s.name,e),"accessor"===i){const{name:i}=s;return{set(s){const n=t.get.call(this);t.set.call(this,s),this.requestUpdate(i,n,e)},init(t){return void 0!==t&&this.C(i,void 0,e,t),t}}}if("setter"===i){const{name:i}=s;return function(s){const n=this[i];t.call(this,s),this.requestUpdate(i,n,e)}}throw Error("Unsupported decorator location: "+i)};function q(e){return(t,s)=>"object"==typeof s?B(e,t,s):((e,t,s)=>{const i=t.hasOwnProperty(s);return t.constructor.createProperty(s,e),i?Object.getOwnPropertyDescriptor(t,s):void 0})(e,t,s)}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,256 +36,15 @@ const D={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:N},z=(t=D,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function
|
|
39
|
+
function V(e,t){return(t,s,i)=>((e,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,s),s))(t,s,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}
|
|
40
40
|
/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2017 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/const V=globalThis,K=V.trustedTypes,Z=K?K.createPolicy("lit-html",{createHTML:t=>t}):void 0,F="$lit$",J=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+J,Q=`<${G}>`,X=document,Y=()=>X.createComment(""),tt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,et=Array.isArray,st="[ \t\n\f\r]",it=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,ot=/>/g,rt=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),at=/'/g,lt=/"/g,ht=/^(?:script|style|textarea|title)$/i,ct=Symbol.for("lit-noChange"),dt=Symbol.for("lit-nothing"),mt=new WeakMap,pt=X.createTreeWalker(X,129);function ut(t,e){if(!et(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Z?Z.createHTML(e):e}const ft=(t,e)=>{const s=t.length-1,i=[];let n,o=2===e?"<svg>":3===e?"<math>":"",r=it;for(let e=0;e<s;e++){const s=t[e];let a,l,h=-1,c=0;for(;c<s.length&&(r.lastIndex=c,l=r.exec(s),null!==l);)c=r.lastIndex,r===it?"!--"===l[1]?r=nt:void 0!==l[1]?r=ot:void 0!==l[2]?(ht.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=rt):void 0!==l[3]&&(r=rt):r===rt?">"===l[0]?(r=n??it,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?rt:'"'===l[3]?lt:at):r===lt||r===at?r=rt:r===nt||r===ot?r=it:(r=rt,n=void 0);const d=r===rt&&t[e+1].startsWith("/>")?" ":"";o+=r===it?s+Q:h>=0?(i.push(a),s.slice(0,h)+F+s.slice(h)+J+d):s+J+(-2===h?e:d)}return[ut(t,o+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class vt{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const r=t.length-1,a=this.parts,[l,h]=ft(t,e);if(this.el=vt.createElement(l,s),pt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=pt.nextNode())&&a.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(F)){const e=h[o++],s=i.getAttribute(t).split(J),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:r[2],strings:s,ctor:"."===r[1]?_t:"?"===r[1]?At:"@"===r[1]?wt:yt}),i.removeAttribute(t)}else t.startsWith(J)&&(a.push({type:6,index:n}),i.removeAttribute(t));if(ht.test(i.tagName)){const t=i.textContent.split(J),e=t.length-1;if(e>0){i.textContent=K?K.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],Y()),pt.nextNode(),a.push({type:2,index:++n});i.append(t[e],Y())}}}else if(8===i.nodeType)if(i.data===G)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(J,t+1));)a.push({type:7,index:n}),t+=J.length-1}n++}}static createElement(t,e){const s=X.createElement("template");return s.innerHTML=t,s}}function gt(t,e,s=t,i){if(e===ct)return e;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const o=tt(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(e=gt(t,n._$AS(t,e.values),n,i)),e}class $t{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??X).importNode(e,!0);pt.currentNode=i;let n=pt.nextNode(),o=0,r=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new bt(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new Et(n,this,t)),this._$AV.push(e),a=s[++r]}o!==a?.index&&(n=pt.nextNode(),o++)}return pt.currentNode=X,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class bt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=dt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=gt(this,t,e),tt(t)?t===dt||null==t||""===t?(this._$AH!==dt&&this._$AR(),this._$AH=dt):t!==this._$AH&&t!==ct&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>et(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==dt&&tt(this._$AH)?this._$AA.nextSibling.data=t:this.T(X.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=vt.createElement(ut(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new $t(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=mt.get(t.strings);return void 0===e&&mt.set(t.strings,e=new vt(t)),e}k(t){et(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new bt(this.O(Y()),this.O(Y()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class yt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=dt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=dt}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(void 0===n)t=gt(this,t,e,0),o=!tt(t)||t!==this._$AH&&t!==ct,o&&(this._$AH=t);else{const i=t;let r,a;for(t=n[0],r=0;r<n.length-1;r++)a=gt(this,i[s+r],e,r),a===ct&&(a=this._$AH[r]),o||=!tt(a)||a!==this._$AH[r],a===dt?t=dt:t!==dt&&(t+=(a??"")+n[r+1]),this._$AH[r]=a}o&&!i&&this.j(t)}j(t){t===dt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class _t extends yt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===dt?void 0:t}}class At extends yt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==dt)}}class wt extends yt{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=gt(this,t,e,0)??dt)===ct)return;const s=this._$AH,i=t===dt&&s!==dt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==dt&&(s===dt||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Et{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){gt(this,t)}}const St=V.litHtmlPolyfillSupport;St?.(vt,bt),(V.litHtmlVersions??=[]).push("3.3.1");var Ct,kt,xt,It,Pt,Mt,Tt,Ut,Ot,Ht,Rt,Lt;let Nt=Lt=class extends(n(o(r(a(l(t,"treeitem"),!0),"opening","opened","closing","closed")))){constructor(){super(...arguments),Ct.add(this),this._hasChildItems=!1,kt.set(this,[]),xt.set(this,null),It.set(this,new Array),Pt.set(this,null),this.open=!1}get link(){return g(this,Pt,"f")}get label(){return this._base??null}get visible(){return!g(this,It,"f").some(t=>!t.open)}get path(){return[...g(this,It,"f"),this]}get hasChildItems(){return this._hasChildItems}get parentItem(){return g(this,It,"f")[g(this,It,"f").length-1]??null}get childItems(){return g(this,kt,"f")}get level(){return g(this,It,"f").length+1}expand(t=!1){this.hasChildItems&&(this.open=!0,t&&this.childItems.forEach(t=>t.expand(!0)))}collapse(t=!1){this.hasChildItems&&(this.open=!1,t&&this.childItems.forEach(t=>t.collapse(!0)))}toggle(){this.hasChildItems&&(this.open=!this.open)}connectedCallback(){super.connectedCallback(),g(this,It,"f").length=0;for(let t=this.parentElement?.closest("m3e-nav-menu-item");t;t=t.parentElement?.closest("m3e-nav-menu-item"))g(this,It,"f").push(t);g(this,It,"f").reverse(),this.style.setProperty("--_nav-menu-item-level",`${this.level}`),$(this,xt,this.closest("m3e-nav-menu"),"f")}disconnectedCallback(){super.disconnectedCallback(),g(this,It,"f").length=0}update(t){if(super.update(t),t.has("selected")){this.ariaSelected=null,this.ariaCurrent=this.hasChildItems?null:`${this.selected}`;for(const t of this.querySelectorAll(":scope > m3e-icon[slot]"))t.toggleAttribute("filled",this.selected);g(this,It,"f").forEach(t=>t.selected=this.selected),this.selected&&!this.hasChildItems&&this.closest("m3e-nav-menu")?.[u].notifySelectionChange(this)}(t.has("open")||t.has("_hasChildItems"))&&(this.ariaExpanded=this._hasChildItems?`${this.open}`:null),(t.has("_hasChildItems")&&this.disabled||t.has("disabled"))&&g(this,kt,"f").forEach(t=>t.disabled=this.disabled)}firstUpdated(t){super.firstUpdated(t);const e=this._base;e&&[this.focusRing,this.stateLayer,this.ripple].forEach(t=>t?.attach(e))}render(){return e`<div class="base" @click="${g(this,Ct,"m",Ht)}">
|
|
45
|
-
<m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer>
|
|
46
|
-
<m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring>
|
|
47
|
-
<m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>
|
|
48
|
-
<div class="icon" aria-hidden="true">${g(this,Ct,"m",Mt).call(this)}</div>
|
|
49
|
-
<div class="label">
|
|
50
|
-
<slot name="label" @slotchange="${g(this,Ct,"m",Ut)}"></slot>
|
|
51
|
-
</div>
|
|
52
|
-
<slot name="badge"></slot>
|
|
53
|
-
<div aria-hidden="true" class="toggle">
|
|
54
|
-
<slot name="toggle-icon">
|
|
55
|
-
<svg class="toggle-icon" viewBox="0 -960 960 960" fill="currentColor">
|
|
56
|
-
<path d="M480-360 280-560h400L480-360Z" />
|
|
57
|
-
</svg>
|
|
58
|
-
</slot>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
<m3e-collapsible
|
|
62
|
-
class="group"
|
|
63
|
-
role="group"
|
|
64
|
-
aria-hidden="${(t=>t??dt)(this._hasChildItems?void 0:"true")}"
|
|
65
|
-
?open="${this._hasChildItems&&this.open}"
|
|
66
|
-
@opening="${g(this,Ct,"m",Rt)}"
|
|
67
|
-
@opened="${g(this,Ct,"m",Rt)}"
|
|
68
|
-
@closing="${g(this,Ct,"m",Rt)}"
|
|
69
|
-
@closed="${g(this,Ct,"m",Rt)}"
|
|
70
|
-
>
|
|
71
|
-
<slot @slotchange="${g(this,Ct,"m",Ot)}"></slot>
|
|
72
|
-
</m3e-collapsible>`}};var jt,Wt,Dt,zt,Bt,qt,Vt,Kt,Zt,Ft,Jt,Gt,Qt,Xt,Yt;kt=new WeakMap,xt=new WeakMap,It=new WeakMap,Pt=new WeakMap,Ct=new WeakSet,Mt=function(){const t=e`<slot name="icon" @slotchange="${g(this,Ct,"m",Tt)}"></slot>`;return this.selected&&!this.hasChildItems?e`<slot name="selected-icon" @slotchange="${g(this,Ct,"m",Tt)}">${t}</slot>`:t},Tt=function(t){this.classList.toggle("-with-icon",c(t.target))},Ut=function(t){$(this,Pt,t.target.assignedElements({flatten:!0}).find(t=>t instanceof HTMLAnchorElement)??null,"f"),g(this,Pt,"f")?.setAttribute("tabindex","-1")},Ot=function(t){$(this,kt,t.target.assignedElements({flatten:!0}).filter(t=>t instanceof Lt),"f");const e=this._hasChildItems;this._hasChildItems=g(this,kt,"f").length>0,this.classList.toggle("-has-items",this._hasChildItems),(e||this._hasChildItems)&&(this.selected=g(this,kt,"f").some(t=>t.selected))},Ht=function(){if(!this.disabled)if(g(this,xt,"f")?.[u].setActiveItem(this),this._hasChildItems)this.toggle();else{g(this,xt,"f")?.[u].select(this),g(this,It,"f").forEach(t=>t.selected=this.selected),g(this,Pt,"f")?.click();const t=this.closest("m3e-drawer-container");if(t){const e=this.closest("[slot='start']")??this.closest("[slot='end')");e&&(t.classList.contains(`-${e.slot}-push`)||t.classList.contains(`-${e.slot}-over`))&&setTimeout(()=>t.removeAttribute(e.slot),300)}}},Rt=function(t){t.stopPropagation(),this.dispatchEvent(new Event(t.type,{bubbles:!0}))},Nt.styles=i`
|
|
73
|
-
:host {
|
|
74
|
-
display: block;
|
|
75
|
-
flex: none;
|
|
76
|
-
outline: none;
|
|
77
|
-
user-select: none;
|
|
78
|
-
position: relative;
|
|
79
|
-
font-size: var(--m3e-nav-menu-item-font-size, ${h.typescale.standard.label.large.fontSize});
|
|
80
|
-
font-weight: var(--m3e-nav-menu-item-font-weight, ${h.typescale.standard.label.large.fontWeight});
|
|
81
|
-
line-height: var(--m3e-nav-menu-item-line-height, ${h.typescale.standard.label.large.lineHeight});
|
|
82
|
-
letter-spacing: var(--m3e-nav-menu-item-tracking, ${h.typescale.standard.label.large.tracking});
|
|
83
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
84
|
-
}
|
|
85
|
-
.base {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
position: relative;
|
|
89
|
-
padding-inline: var(--m3e-nav-menu-item-padding, 1.5rem);
|
|
90
|
-
height: calc(var(--m3e-nav-menu-item-height, 3.5rem) + ${h.density.calc(-3)});
|
|
91
|
-
column-gap: var(--m3e-nav-menu-item-spacing, 0.75rem);
|
|
92
|
-
transition: ${s(`color ${h.motion.duration.short4} ${h.motion.easing.standard},\n background-color ${h.motion.duration.short4} ${h.motion.easing.standard}`)};
|
|
93
|
-
}
|
|
94
|
-
.base,
|
|
95
|
-
.focus-ring {
|
|
96
|
-
border-radius: var(--m3e-nav-menu-item-shape, ${h.shape.corner.full});
|
|
97
|
-
}
|
|
98
|
-
.label {
|
|
99
|
-
flex: 1 1 auto;
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
position: relative;
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
vertical-align: middle;
|
|
105
|
-
}
|
|
106
|
-
.icon,
|
|
107
|
-
.toggle {
|
|
108
|
-
flex: none;
|
|
109
|
-
display: flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
justify-content: center;
|
|
112
|
-
position: relative;
|
|
113
|
-
vertical-align: middle;
|
|
114
|
-
}
|
|
115
|
-
::slotted([slot="badge"]) {
|
|
116
|
-
flex: none;
|
|
117
|
-
position: relative;
|
|
118
|
-
font-size: var(--m3e-nav-menu-item-badge-font-size, ${h.typescale.standard.label.large.fontSize});
|
|
119
|
-
font-weight: var(--m3e-nav-menu-item-badge-font-weight, ${h.typescale.standard.label.large.fontWeight});
|
|
120
|
-
line-height: var(--m3e-nav-menu-item-badge-line-height, ${h.typescale.standard.label.large.lineHeight});
|
|
121
|
-
letter-spacing: var(--m3e-nav-menu-item-badge-tracking, ${h.typescale.standard.label.large.tracking});
|
|
122
|
-
}
|
|
123
|
-
.toggle {
|
|
124
|
-
transition: ${s(`transform var(--m3e-collapsible-animation-duration, ${h.motion.duration.medium1})\n ${h.motion.easing.standard}`)};
|
|
125
|
-
}
|
|
126
|
-
:host(:not(.-with-icon)) .icon {
|
|
127
|
-
display: none;
|
|
128
|
-
}
|
|
129
|
-
.icon {
|
|
130
|
-
margin-inline-start: -0.5rem;
|
|
131
|
-
}
|
|
132
|
-
.toggle {
|
|
133
|
-
margin-inline-end: -0.5rem;
|
|
134
|
-
}
|
|
135
|
-
.group {
|
|
136
|
-
padding-inline-start: var(--m3e-nav-menu-item-inset, 1rem);
|
|
137
|
-
}
|
|
138
|
-
:host([open]) .toggle {
|
|
139
|
-
transform: rotate(180deg);
|
|
140
|
-
}
|
|
141
|
-
:host(:not(.-has-items)) .toggle,
|
|
142
|
-
:host(:not(.-has-items)) .group {
|
|
143
|
-
display: none;
|
|
144
|
-
}
|
|
145
|
-
::slotted([slot="selected-icon"]),
|
|
146
|
-
::slotted([slot="icon"]),
|
|
147
|
-
::slotted([slot="toggle-icon"]),
|
|
148
|
-
.toggle-icon {
|
|
149
|
-
vertical-align: middle;
|
|
150
|
-
width: 1em;
|
|
151
|
-
height: 1em;
|
|
152
|
-
font-size: var(--m3e-nav-menu-item-icon-size, 1.5rem);
|
|
153
|
-
}
|
|
154
|
-
:host(:not(:disabled)) .base {
|
|
155
|
-
cursor: pointer;
|
|
156
|
-
}
|
|
157
|
-
:host(:not(:disabled)) .base {
|
|
158
|
-
color: var(--m3e-nav-menu-item-label-color, ${h.color.onSurfaceVariant});
|
|
159
|
-
}
|
|
160
|
-
:host(:disabled) .base {
|
|
161
|
-
color: color-mix(
|
|
162
|
-
in srgb,
|
|
163
|
-
var(--m3e-nav-menu-item-disabled-color, ${h.color.onSurface})
|
|
164
|
-
var(--m3e-nav-menu-item-disabled-color-opacity, 38%),
|
|
165
|
-
transparent
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
:host([selected]:not(.-has-items):not(:disabled)) .base {
|
|
169
|
-
color: var(--m3e-nav-menu-item-selected-label-color, ${h.color.onSecondaryContainer});
|
|
170
|
-
background-color: var(--m3e-nav-menu-item-selected-container-color, ${h.color.secondaryContainer});
|
|
171
|
-
--m3e-state-layer-focus-color: var(
|
|
172
|
-
--m3e-nav-menu-item-selected-container-focus-color,
|
|
173
|
-
${h.color.onSecondaryContainer}
|
|
174
|
-
);
|
|
175
|
-
--m3e-state-layer-hover-color: var(
|
|
176
|
-
--m3e-nav-menu-item-selected-container-hover-color,
|
|
177
|
-
${h.color.onSecondaryContainer}
|
|
178
|
-
);
|
|
179
|
-
--m3e-ripple-color: var(--m3e-nav-menu-item-selected-ripple-color, ${h.color.onSecondaryContainer});
|
|
180
|
-
}
|
|
181
|
-
:host(:not([selected]):not(.-has-items):not(:disabled)) .base {
|
|
182
|
-
--m3e-state-layer-focus-color: var(
|
|
183
|
-
--m3e-nav-menu-item-unselected-container-focus-color,
|
|
184
|
-
${h.color.onSurface}
|
|
185
|
-
);
|
|
186
|
-
--m3e-state-layer-hover-color: var(
|
|
187
|
-
--m3e-nav-menu-item-unselected-container-hover-color,
|
|
188
|
-
${h.color.onSurface}
|
|
189
|
-
);
|
|
190
|
-
--m3e-ripple-color: var(--m3e-nav-menu-item-unselected-ripple-color, ${h.color.onSurface});
|
|
191
|
-
}
|
|
192
|
-
.state-layer {
|
|
193
|
-
margin-inline: auto;
|
|
194
|
-
}
|
|
195
|
-
:host([selected].-has-items:not(:disabled)) .base {
|
|
196
|
-
background-color: var(--m3e-nav-menu-item-open-container-color, ${h.color.surfaceContainerHighest});
|
|
197
|
-
--m3e-state-layer-focus-color: var(
|
|
198
|
-
--m3e-nav-menu-item-open-container-focus-color,
|
|
199
|
-
${h.color.onSurface}
|
|
200
|
-
);
|
|
201
|
-
--m3e-state-layer-hover-color: var(
|
|
202
|
-
--m3e-nav-menu-item-open-container-hover-color,
|
|
203
|
-
${h.color.onSurface}
|
|
204
|
-
);
|
|
205
|
-
--m3e-ripple-color: var(--m3e-nav-menu-item-open-ripple-color, ${h.color.onSurface});
|
|
206
|
-
}
|
|
207
|
-
::slotted(a[slot="label"]) {
|
|
208
|
-
all: unset;
|
|
209
|
-
}
|
|
210
|
-
::slotted(m3e-divider) {
|
|
211
|
-
margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem);
|
|
212
|
-
}
|
|
213
|
-
::slotted(m3e-nav-menu-item:first-of-type) {
|
|
214
|
-
margin-block-start: var(--m3e-nav-menu-item-vertical-inset, 0.25rem);
|
|
215
|
-
}
|
|
216
|
-
::slotted(m3e-nav-menu-item:last-of-type) {
|
|
217
|
-
margin-block-end: var(--m3e-nav-menu-item-vertical-inset, 0.25rem);
|
|
218
|
-
}
|
|
219
|
-
@media (prefers-reduced-motion) {
|
|
220
|
-
.base,
|
|
221
|
-
.toggle,
|
|
222
|
-
.state-layer {
|
|
223
|
-
transition: none !important;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
@media (forced-colors: active) {
|
|
227
|
-
.base,
|
|
228
|
-
.state-layer {
|
|
229
|
-
transition: none !important;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
:host(:disabled) .base {
|
|
233
|
-
color: GrayText;
|
|
234
|
-
}
|
|
235
|
-
:host(:not([selected]):not(:disabled)) .base {
|
|
236
|
-
color: ButtonText;
|
|
237
|
-
}
|
|
238
|
-
:host([selected]:not(.-has-items):not(:disabled)) .base {
|
|
239
|
-
forced-color-adjust: none;
|
|
240
|
-
color: ButtonFace;
|
|
241
|
-
background-color: ButtonText;
|
|
242
|
-
}
|
|
243
|
-
:host([selected].-has-items:not(:disabled)) .base {
|
|
244
|
-
background-color: unset;
|
|
245
|
-
color: ButtonText;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
`,v([q(".state-layer")],Nt.prototype,"stateLayer",void 0),v([q(".focus-ring")],Nt.prototype,"focusRing",void 0),v([q(".ripple")],Nt.prototype,"ripple",void 0),v([q(".base")],Nt.prototype,"_base",void 0),v([function(t){return B({...t,state:!0,attribute:!1})}
|
|
44
|
+
*/const K=globalThis,Z=K.trustedTypes,F=Z?Z.createPolicy("lit-html",{createHTML:e=>e}):void 0,J="$lit$",G=`lit$${Math.random().toFixed(9).slice(2)}$`,Q="?"+G,X=`<${Q}>`,Y=document,ee=()=>Y.createComment(""),te=e=>null===e||"object"!=typeof e&&"function"!=typeof e,se=Array.isArray,ie="[ \t\n\f\r]",ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,oe=/-->/g,re=/>/g,ae=RegExp(`>|${ie}(?:([^\\s"'>=/]+)(${ie}*=${ie}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),le=/'/g,he=/"/g,ce=/^(?:script|style|textarea|title)$/i,de=Symbol.for("lit-noChange"),me=Symbol.for("lit-nothing"),pe=new WeakMap,ue=Y.createTreeWalker(Y,129);function fe(e,t){if(!se(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==F?F.createHTML(t):t}const ve=(e,t)=>{const s=e.length-1,i=[];let n,o=2===t?"<svg>":3===t?"<math>":"",r=ne;for(let t=0;t<s;t++){const s=e[t];let a,l,h=-1,c=0;for(;c<s.length&&(r.lastIndex=c,l=r.exec(s),null!==l);)c=r.lastIndex,r===ne?"!--"===l[1]?r=oe:void 0!==l[1]?r=re:void 0!==l[2]?(ce.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=ae):void 0!==l[3]&&(r=ae):r===ae?">"===l[0]?(r=n??ne,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?ae:'"'===l[3]?he:le):r===he||r===le?r=ae:r===oe||r===re?r=ne:(r=ae,n=void 0);const d=r===ae&&e[t+1].startsWith("/>")?" ":"";o+=r===ne?s+X:h>=0?(i.push(a),s.slice(0,h)+J+s.slice(h)+G+d):s+G+(-2===h?t:d)}return[fe(e,o+(e[s]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class ge{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,o=0;const r=e.length-1,a=this.parts,[l,h]=ve(e,t);if(this.el=ge.createElement(l,s),ue.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ue.nextNode())&&a.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(J)){const t=h[o++],s=i.getAttribute(e).split(G),r=/([.?@])?(.*)/.exec(t);a.push({type:1,index:n,name:r[2],strings:s,ctor:"."===r[1]?Ae:"?"===r[1]?we:"@"===r[1]?Ee:_e}),i.removeAttribute(e)}else e.startsWith(G)&&(a.push({type:6,index:n}),i.removeAttribute(e));if(ce.test(i.tagName)){const e=i.textContent.split(G),t=e.length-1;if(t>0){i.textContent=Z?Z.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],ee()),ue.nextNode(),a.push({type:2,index:++n});i.append(e[t],ee())}}}else if(8===i.nodeType)if(i.data===Q)a.push({type:2,index:n});else{let e=-1;for(;-1!==(e=i.data.indexOf(G,e+1));)a.push({type:7,index:n}),e+=G.length-1}n++}}static createElement(e,t){const s=Y.createElement("template");return s.innerHTML=e,s}}function be(e,t,s=e,i){if(t===de)return t;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const o=te(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(e),n._$AT(e,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(t=be(e,n._$AS(e,t.values),n,i)),t}class $e{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??Y).importNode(t,!0);ue.currentNode=i;let n=ue.nextNode(),o=0,r=0,a=s[0];for(;void 0!==a;){if(o===a.index){let t;2===a.type?t=new ye(n,n.nextSibling,this,e):1===a.type?t=new a.ctor(n,a.name,a.strings,this,e):6===a.type&&(t=new Se(n,this,e)),this._$AV.push(t),a=s[++r]}o!==a?.index&&(n=ue.nextNode(),o++)}return ue.currentNode=Y,i}p(e){let t=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class ye{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=me,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=be(this,e,t),te(e)?e===me||null==e||""===e?(this._$AH!==me&&this._$AR(),this._$AH=me):e!==this._$AH&&e!==de&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>se(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==me&&te(this._$AH)?this._$AA.nextSibling.data=e:this.T(Y.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i="number"==typeof s?this._$AC(e):(void 0===s.el&&(s.el=ge.createElement(fe(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new $e(i,this),s=e.u(this.options);e.p(t),this.T(s),this._$AH=e}}_$AC(e){let t=pe.get(e.strings);return void 0===t&&pe.set(e.strings,t=new ge(e)),t}k(e){se(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new ye(this.O(ee()),this.O(ee()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class _e{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,n){this.type=1,this._$AH=me,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=me}_$AI(e,t=this,s,i){const n=this.strings;let o=!1;if(void 0===n)e=be(this,e,t,0),o=!te(e)||e!==this._$AH&&e!==de,o&&(this._$AH=e);else{const i=e;let r,a;for(e=n[0],r=0;r<n.length-1;r++)a=be(this,i[s+r],t,r),a===de&&(a=this._$AH[r]),o||=!te(a)||a!==this._$AH[r],a===me?e=me:e!==me&&(e+=(a??"")+n[r+1]),this._$AH[r]=a}o&&!i&&this.j(e)}j(e){e===me?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Ae extends _e{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===me?void 0:e}}class we extends _e{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==me)}}class Ee extends _e{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){if((e=be(this,e,t,0)??me)===de)return;const s=this._$AH,i=e===me&&s!==me||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==me&&(s===me||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Se{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){be(this,e)}}const Ce=K.litHtmlPolyfillSupport;Ce?.(ge,ye),(K.litHtmlVersions??=[]).push("3.3.1");var ke,xe,Ie,Pe,Me,Te,Ue,Oe,He,Re,Le,Ne;let je=Ne=class extends(n(o(r(a(l(e,"treeitem"),!0),"opening","opened","closing","closed")))){constructor(){super(...arguments),ke.add(this),this._hasChildItems=!1,xe.set(this,[]),Ie.set(this,null),Pe.set(this,new Array),Me.set(this,null),this.open=!1}get link(){return b(this,Me,"f")}get label(){return this._base??null}get visible(){return!b(this,Pe,"f").some(e=>!e.open)}get path(){return[...b(this,Pe,"f"),this]}get hasChildItems(){return this._hasChildItems}get parentItem(){return b(this,Pe,"f")[b(this,Pe,"f").length-1]??null}get childItems(){return b(this,xe,"f")}get level(){return b(this,Pe,"f").length+1}expand(e=!1){this.hasChildItems&&(this.open=!0,e&&this.childItems.forEach(e=>e.expand(!0)))}collapse(e=!1){this.hasChildItems&&(this.open=!1,e&&this.childItems.forEach(e=>e.collapse(!0)))}toggle(){this.hasChildItems&&(this.open=!this.open)}connectedCallback(){super.connectedCallback(),b(this,Pe,"f").length=0;for(let e=this.parentElement?.closest("m3e-nav-menu-item");e;e=e.parentElement?.closest("m3e-nav-menu-item"))b(this,Pe,"f").push(e);b(this,Pe,"f").reverse(),this.style.setProperty("--_nav-menu-item-level",`${this.level}`),$(this,Ie,this.closest("m3e-nav-menu"),"f")}disconnectedCallback(){super.disconnectedCallback(),b(this,Pe,"f").length=0}update(e){if(super.update(e),e.has("selected")){this.ariaSelected=null,this.ariaCurrent=this.hasChildItems?null:`${this.selected}`;for(const e of this.querySelectorAll(":scope > m3e-icon[slot]"))e.toggleAttribute("filled",this.selected);b(this,Pe,"f").forEach(e=>e.selected=this.selected),this.selected&&!this.hasChildItems&&this.closest("m3e-nav-menu")?.[u].notifySelectionChange(this)}(e.has("open")||e.has("_hasChildItems"))&&(this.ariaExpanded=this._hasChildItems?`${this.open}`:null),(e.has("_hasChildItems")&&this.disabled||e.has("disabled"))&&b(this,xe,"f").forEach(e=>e.disabled=this.disabled)}firstUpdated(e){super.firstUpdated(e);const t=this._base;t&&[this.focusRing,this.stateLayer,this.ripple].forEach(e=>e?.attach(t))}render(){return t`<div class="base" @click="${b(this,ke,"m",Re)}"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="icon" aria-hidden="true">${b(this,ke,"m",Te).call(this)}</div><div class="label"><slot name="label" @slotchange="${b(this,ke,"m",Oe)}"></slot></div><slot name="badge"></slot><div aria-hidden="true" class="toggle"><slot name="toggle-icon"><svg class="toggle-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><m3e-collapsible class="group" role="group" aria-hidden="${(e=>e??me)(this._hasChildItems?void 0:"true")}" ?open="${this._hasChildItems&&this.open}" @opening="${b(this,ke,"m",Le)}" @opened="${b(this,ke,"m",Le)}" @closing="${b(this,ke,"m",Le)}" @closed="${b(this,ke,"m",Le)}"><slot @slotchange="${b(this,ke,"m",He)}"></slot></m3e-collapsible>`}};var We,ze,De,Be,qe,Ve,Ke,Ze,Fe,Je,Ge,Qe,Xe,Ye,et;xe=new WeakMap,Ie=new WeakMap,Pe=new WeakMap,Me=new WeakMap,ke=new WeakSet,Te=function(){const e=t`<slot name="icon" @slotchange="${b(this,ke,"m",Ue)}"></slot>`;return this.selected&&!this.hasChildItems?t`<slot name="selected-icon" @slotchange="${b(this,ke,"m",Ue)}">${e}</slot>`:e},Ue=function(e){this.classList.toggle("-with-icon",c(e.target))},Oe=function(e){$(this,Me,e.target.assignedElements({flatten:!0}).find(e=>e instanceof HTMLAnchorElement)??null,"f"),b(this,Me,"f")?.setAttribute("tabindex","-1")},He=function(e){$(this,xe,e.target.assignedElements({flatten:!0}).filter(e=>e instanceof Ne),"f");const t=this._hasChildItems;this._hasChildItems=b(this,xe,"f").length>0,this.classList.toggle("-has-items",this._hasChildItems),(t||this._hasChildItems)&&(this.selected=b(this,xe,"f").some(e=>e.selected))},Re=function(){if(!this.disabled)if(b(this,Ie,"f")?.[u].setActiveItem(this),this._hasChildItems)this.toggle();else{b(this,Ie,"f")?.[u].select(this),b(this,Pe,"f").forEach(e=>e.selected=this.selected),b(this,Me,"f")?.click();const e=this.closest("m3e-drawer-container");if(e){const t=this.closest("[slot='start']")??this.closest("[slot='end')");t&&(e.classList.contains(`-${t.slot}-push`)||e.classList.contains(`-${t.slot}-over`))&&setTimeout(()=>e.removeAttribute(t.slot),300)}}},Le=function(e){e.stopPropagation(),this.dispatchEvent(new Event(e.type,{bubbles:!0}))},je.styles=i`:host { display: block; flex: none; outline: none; user-select: none; position: relative; font-size: var(--m3e-nav-menu-item-font-size, ${h.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-font-weight, ${h.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-line-height, ${h.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-tracking, ${h.typescale.standard.label.large.tracking}); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { display: flex; align-items: center; position: relative; padding-inline: var(--m3e-nav-menu-item-padding, 1.5rem); height: calc(var(--m3e-nav-menu-item-height, 3.5rem) + ${h.density.calc(-3)}); column-gap: var(--m3e-nav-menu-item-spacing, 0.75rem); transition: ${s(`color ${h.motion.duration.short4} ${h.motion.easing.standard},\n background-color ${h.motion.duration.short4} ${h.motion.easing.standard}`)}; } .base, .focus-ring { border-radius: var(--m3e-nav-menu-item-shape, ${h.shape.corner.full}); } .label { flex: 1 1 auto; display: flex; align-items: center; position: relative; overflow: hidden; vertical-align: middle; } .icon, .toggle { flex: none; display: flex; align-items: center; justify-content: center; position: relative; vertical-align: middle; } ::slotted([slot="badge"]) { flex: none; position: relative; font-size: var(--m3e-nav-menu-item-badge-font-size, ${h.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-badge-font-weight, ${h.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-badge-line-height, ${h.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-badge-tracking, ${h.typescale.standard.label.large.tracking}); } .toggle { transition: ${s(`transform var(--m3e-collapsible-animation-duration, ${h.motion.duration.medium1})\n ${h.motion.easing.standard}`)}; } :host(:not(.-with-icon)) .icon { display: none; } .icon { margin-inline-start: -0.5rem; } .toggle { margin-inline-end: -0.5rem; } .group { padding-inline-start: var(--m3e-nav-menu-item-inset, 1rem); } :host([open]) .toggle { transform: rotate(180deg); } :host(:not(.-has-items)) .toggle, :host(:not(.-has-items)) .group { display: none; } ::slotted([slot="selected-icon"]), ::slotted([slot="icon"]), ::slotted([slot="toggle-icon"]), .toggle-icon { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-nav-menu-item-icon-size, 1.5rem); } :host(:not(:disabled)) .base { cursor: pointer; } :host(:not(:disabled)) .base { color: var(--m3e-nav-menu-item-label-color, ${h.color.onSurfaceVariant}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-nav-menu-item-disabled-color, ${h.color.onSurface}) var(--m3e-nav-menu-item-disabled-color-opacity, 38%), transparent ); } :host([selected]:not(.-has-items):not(:disabled)) .base { color: var(--m3e-nav-menu-item-selected-label-color, ${h.color.onSecondaryContainer}); background-color: var(--m3e-nav-menu-item-selected-container-color, ${h.color.secondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-selected-container-focus-color, ${h.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-selected-container-hover-color, ${h.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-nav-menu-item-selected-ripple-color, ${h.color.onSecondaryContainer}); } :host(:not([selected]):not(.-has-items):not(:disabled)) .base { --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-unselected-container-focus-color, ${h.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-unselected-container-hover-color, ${h.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-unselected-ripple-color, ${h.color.onSurface}); } .state-layer { margin-inline: auto; } :host([selected].-has-items:not(:disabled)) .base { background-color: var(--m3e-nav-menu-item-open-container-color, ${h.color.surfaceContainerHighest}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-open-container-focus-color, ${h.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-open-container-hover-color, ${h.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-open-ripple-color, ${h.color.onSurface}); } ::slotted(a[slot="label"]) { all: unset; } ::slotted(m3e-divider) { margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem); } ::slotted(m3e-nav-menu-item:first-of-type) { margin-block-start: var(--m3e-nav-menu-item-vertical-inset, 0.25rem); } ::slotted(m3e-nav-menu-item:last-of-type) { margin-block-end: var(--m3e-nav-menu-item-vertical-inset, 0.25rem); } @media (prefers-reduced-motion) { .base, .toggle, .state-layer { transition: none !important; } } @media (forced-colors: active) { .base, .state-layer { transition: none !important; } :host(:disabled) .base { color: GrayText; } :host(:not([selected]):not(:disabled)) .base { color: ButtonText; } :host([selected]:not(.-has-items):not(:disabled)) .base { forced-color-adjust: none; color: ButtonFace; background-color: ButtonText; } :host([selected].-has-items:not(:disabled)) .base { background-color: unset; color: ButtonText; } }`,g([V(".state-layer")],je.prototype,"stateLayer",void 0),g([V(".focus-ring")],je.prototype,"focusRing",void 0),g([V(".ripple")],je.prototype,"ripple",void 0),g([V(".base")],je.prototype,"_base",void 0),g([function(e){return q({...e,state:!0,attribute:!1})}
|
|
249
45
|
/**
|
|
250
46
|
* @license
|
|
251
47
|
* Copyright 2017 Google LLC
|
|
252
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
253
|
-
*/()],
|
|
254
|
-
:host {
|
|
255
|
-
display: flex;
|
|
256
|
-
flex-direction: column;
|
|
257
|
-
outline: none;
|
|
258
|
-
overflow-y: auto;
|
|
259
|
-
overflow-x: hidden;
|
|
260
|
-
position: relative;
|
|
261
|
-
min-height: 0;
|
|
262
|
-
padding-block-start: var(--m3e-nav-menu-padding-top, 0.5rem);
|
|
263
|
-
padding-block-end: var(--m3e-nav-menu-padding-bottom, 0.5rem);
|
|
264
|
-
padding-inline-start: var(--m3e-nav-menu-padding-left, 0.75rem);
|
|
265
|
-
padding-inline-end: var(--m3e-nav-menu-padding-right, 0.75rem);
|
|
266
|
-
scrollbar-width: ${h.scrollbar.width};
|
|
267
|
-
scrollbar-color: ${h.scrollbar.color};
|
|
268
|
-
}
|
|
269
|
-
::slotted(m3e-divider) {
|
|
270
|
-
margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem);
|
|
271
|
-
flex: none;
|
|
272
|
-
}
|
|
273
|
-
`,te.__nextId=0,te=Yt=v([b("m3e-nav-menu")],te);let re=oe=class extends(l(t,"group")){constructor(){super(...arguments),ee.add(this),se.set(this,"m3e-nav-menu-item-group-label-"+oe.__nextId++),ie.set(this,void 0)}connectedCallback(){super.connectedCallback(),this.classList.toggle("-divided","M3E-DIVIDER"===this.previousElementSibling?.tagName)}disconnectedCallback(){super.disconnectedCallback(),this.classList.remove("-divided")}render(){return e`<slot name="label" @slotchange="${g(this,ee,"m",ne)}"></slot><slot></slot>`}};se=new WeakMap,ie=new WeakMap,ee=new WeakSet,ne=function(t){const e=t.target.assignedElements({flatten:!0})[0];e!==g(this,ie,"f")&&(g(this,ie,"f")?.id===g(this,se,"f")&&(g(this,ie,"f").id=""),$(this,ie,e,"f"),g(this,ie,"f")?(g(this,ie,"f").role="none",g(this,ie,"f").id=g(this,ie,"f").id||g(this,se,"f"),this.setAttribute("aria-labelledby",g(this,ie,"f").id)):this.removeAttribute("aria-labelledby"))},re.styles=i`
|
|
274
|
-
:host {
|
|
275
|
-
display: contents;
|
|
276
|
-
}
|
|
277
|
-
::slotted([slot="label"]) {
|
|
278
|
-
margin-inline-start: var(--m3e-nav-menu-item-group-label-inset, 1rem);
|
|
279
|
-
margin-block-end: var(--m3e-nav-menu-item-group-label-space, 1rem);
|
|
280
|
-
flex: none;
|
|
281
|
-
}
|
|
282
|
-
:host(.-divided) ::slotted([slot="label"]) {
|
|
283
|
-
margin-block-start: calc(
|
|
284
|
-
var(--m3e-nav-menu-item-group-label-space, 1rem) - var(--m3e-nav-menu-divider-margin, 0.25rem)
|
|
285
|
-
);
|
|
286
|
-
}
|
|
287
|
-
:host(:not(.-divided)) ::slotted([slot="label"]) {
|
|
288
|
-
margin-block-start: var(--m3e-nav-menu-item-group-label-space, 1rem);
|
|
289
|
-
}
|
|
290
|
-
`,re.__nextId=0,re=oe=v([b("m3e-nav-menu-item-group")],re);export{te as M3eNavMenuElement,Nt as M3eNavMenuItemElement,re as M3eNavMenuItemGroupElement};
|
|
49
|
+
*/()],je.prototype,"_hasChildItems",void 0),g([q({type:Boolean,reflect:!0})],je.prototype,"open",void 0),je=Ne=g([y("m3e-nav-menu-item")],je);let tt=et=class extends(l(e,"tree")){constructor(){super(),We.add(this),ze.set(this,!1),De.set(this,!1),this[Ye]=(new f).withVerticalOrientation().withHomeAndEnd().withTypeahead().withSkipPredicate(e=>e.disabled||!e.visible).disableRovingTabIndex().onActiveItemChange(()=>{this[u].activeItem&&b(this,We,"m",Ge).call(this,this[u].activeItem)}).onSelectedItemsChange(()=>{const e=this.selected;for(const t of this.items)t!==e&&b(this,We,"m",Xe).call(this,t,!1,!1);e?.label&&d(e.label,this,{block:"start",behavior:"smooth"})}),Be.set(this,e=>b(this,We,"m",Ze).call(this,e)),qe.set(this,e=>b(this,We,"m",Fe).call(this,e)),Ve.set(this,e=>b(this,We,"m",Je).call(this,e)),new m(this,{callback:e=>$(this,De,e,"f")}),new p(this,{callback:()=>{b(this,De,"f")||b(this,We,"m",Qe).call(this)}})}get selected(){return this[u].selectedItems[0]??null}get items(){return this[u].items}expand(e){(e??this[u].items).forEach(e=>e.expand())}collapse(e){(e??this[u].items).forEach(e=>e.collapse());const t=this[u].activeItem;if(t&&!t.visible)for(let e=t.parentItem;e;e=e.parentItem)if(e.visible){this[u].setActiveItem(e);break}}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),this.addEventListener("keydown",b(this,Be,"f")),this.addEventListener("keyup",b(this,qe,"f")),this.addEventListener("pointerdown",b(this,Ve,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",b(this,Be,"f")),this.removeEventListener("keyup",b(this,qe,"f")),this.removeEventListener("pointerdown",b(this,Ve,"f"))}render(){return t`<slot @slotchange="${b(this,We,"m",Ke)}"></slot>`}};var st,it,nt,ot,rt;ze=new WeakMap,De=new WeakMap,Be=new WeakMap,qe=new WeakMap,Ve=new WeakMap,We=new WeakSet,Ye=u,Ke=function(){for(const e of this.querySelectorAll("m3e-divider"))e.ariaHidden="true";const{added:e}=this[u].setItems([...this.querySelectorAll("m3e-nav-menu-item")]);for(const t of e)t.id=t.id||"m3e-nav-menu-item-"+et.__nextId++;this[u].activeItem?(this.setAttribute("aria-activedescendant",this[u].activeItem.id),b(this,We,"m",Qe).call(this)):this.removeAttribute("aria-activedescendant")},Ze=function(e){$(this,ze,!1,"f"),b(this,We,"m",Qe).call(this);const t=this[u].activeItem;if(!e.defaultPrevented&&t&&!t.disabled)switch(e.key){case"Enter":case" ":e.preventDefault()," "===e.key&&t.ripple&&!t.ripple.visible&&t.ripple.show(0,0,!0),t.hasChildItems?t.toggle():t.selected||(this[u].select(t),t.link?.click());break;case"*":e.preventDefault(),t.expand(!0);break;case"Left":case"ArrowLeft":if(e.preventDefault(),"ltr"===v.current)if(t.hasChildItems&&t.open)t.collapse();else{const e=t.parentItem;e&&(e.collapse(),this[u].setActiveItem(e))}else t.hasChildItems&&!t.open&&t.expand();break;case"Right":case"ArrowRight":if(e.preventDefault(),"rtl"===v.current)if(t.hasChildItems&&t.open)t.collapse();else{const e=t.parentItem;e&&(e.collapse(),this[u].setActiveItem(e))}else t.hasChildItems&&!t.open&&t.expand();break;default:this[u].onKeyDown(e)}},Fe=function(e){const t=this[u].activeItem;e.defaultPrevented||!t||t.disabled||" "!==e.key||t.ripple?.hide()},Je=function(e){if(!e.defaultPrevented&&!b(this,ze,"f")){$(this,ze,!0,"f");const t=e.composedPath().reverse().find(e=>e instanceof je);t&&!t.disabled&&b(this,We,"m",Xe).call(this,t,!0,!1)}},Ge=function(e){this.setAttribute("aria-activedescendant",e.id),e.label&&d(e.label,this,{block:"nearest",behavior:"smooth"}),b(this,We,"m",Qe).call(this)},Qe=function(){const e=this.matches(":focus")||this.matches(":focus-within"),t=!b(this,ze,"f")&&this.matches(":focus-visible");this[u].items.forEach(s=>{const i=s===this[u].activeItem;b(this,We,"m",Xe).call(this,s,i&&e,i&&t)})},Xe=function(e,t,s){t&&s?e.stateLayer?.show("focused"):e.stateLayer?.hide("focused"),s?e.focusRing?.show():e.focusRing?.hide()},tt.styles=i`:host { display: flex; flex-direction: column; outline: none; overflow-y: auto; overflow-x: hidden; position: relative; min-height: 0; padding-block-start: var(--m3e-nav-menu-padding-top, 0.5rem); padding-block-end: var(--m3e-nav-menu-padding-bottom, 0.5rem); padding-inline-start: var(--m3e-nav-menu-padding-left, 0.75rem); padding-inline-end: var(--m3e-nav-menu-padding-right, 0.75rem); scrollbar-width: ${h.scrollbar.width}; scrollbar-color: ${h.scrollbar.color}; } ::slotted(m3e-divider) { margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem); flex: none; }`,tt.__nextId=0,tt=et=g([y("m3e-nav-menu")],tt);let at=rt=class extends(l(e,"group")){constructor(){super(...arguments),st.add(this),it.set(this,"m3e-nav-menu-item-group-label-"+rt.__nextId++),nt.set(this,void 0)}connectedCallback(){super.connectedCallback(),this.classList.toggle("-divided","M3E-DIVIDER"===this.previousElementSibling?.tagName)}disconnectedCallback(){super.disconnectedCallback(),this.classList.remove("-divided")}render(){return t`<slot name="label" @slotchange="${b(this,st,"m",ot)}"></slot><slot></slot>`}};it=new WeakMap,nt=new WeakMap,st=new WeakSet,ot=function(e){const t=e.target.assignedElements({flatten:!0})[0];t!==b(this,nt,"f")&&(b(this,nt,"f")?.id===b(this,it,"f")&&(b(this,nt,"f").id=""),$(this,nt,t,"f"),b(this,nt,"f")?(b(this,nt,"f").id=b(this,nt,"f").id||b(this,it,"f"),this.setAttribute("aria-labelledby",b(this,nt,"f").id)):this.removeAttribute("aria-labelledby"))},at.styles=i`:host { display: contents; } ::slotted([slot="label"]) { margin-inline-start: var(--m3e-nav-menu-item-group-label-inset, 1rem); margin-block-end: var(--m3e-nav-menu-item-group-label-space, 1rem); flex: none; } :host(.-divided) ::slotted([slot="label"]) { margin-block-start: calc( var(--m3e-nav-menu-item-group-label-space, 1rem) - var(--m3e-nav-menu-divider-margin, 0.25rem) ); } :host(:not(.-divided)) ::slotted([slot="label"]) { margin-block-start: var(--m3e-nav-menu-item-group-label-space, 1rem); }`,at.__nextId=0,at=rt=g([y("m3e-nav-menu-item-group")],at);export{tt as M3eNavMenuElement,je as M3eNavMenuItemElement,at as M3eNavMenuItemGroupElement};
|
|
291
50
|
//# sourceMappingURL=index.min.js.map
|