@m3e/nav-bar 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/dist/index.js CHANGED
@@ -21,33 +21,30 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
21
21
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
22
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
23
  PERFORMANCE OF THIS SOFTWARE.
24
- ***************************************************************************** */
25
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
26
-
27
-
28
- function __decorate(decorators, target, key, desc) {
29
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33
- }
34
-
35
- function __classPrivateFieldGet(receiver, state, kind, f) {
36
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
37
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
38
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
39
- }
40
-
41
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
42
- if (kind === "m") throw new TypeError("Private method is not writable");
43
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
44
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
45
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
46
- }
47
-
48
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
49
- var e = new Error(message);
50
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
24
+ ***************************************************************************** */
25
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
26
+
27
+ function __decorate(decorators, target, key, desc) {
28
+ var c = arguments.length,
29
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
30
+ d;
31
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33
+ }
34
+ function __classPrivateFieldGet(receiver, state, kind, f) {
35
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
36
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
37
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
38
+ }
39
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
40
+ if (kind === "m") throw new TypeError("Private method is not writable");
41
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
42
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
43
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
44
+ }
45
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
46
+ var e = new Error(message);
47
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
51
48
  };
52
49
 
53
50
  /**
@@ -55,45 +52,408 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
55
52
  * Copyright 2017 Google LLC
56
53
  * SPDX-License-Identifier: BSD-3-Clause
57
54
  */
58
- const t$1=t=>(e,o)=>{ void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);};
55
+ const t$1 = t => (e, o) => {
56
+ void 0 !== o ? o.addInitializer(() => {
57
+ customElements.define(t, e);
58
+ }) : customElements.define(t, e);
59
+ };
59
60
 
60
61
  /**
61
62
  * @license
62
63
  * Copyright 2019 Google LLC
63
64
  * SPDX-License-Identifier: BSD-3-Clause
64
65
  */
65
- const t=globalThis,e$3=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$2=new WeakMap;let n$2 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$2.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2.set(s,t));}return t}toString(){return this.cssText}};const r$3=t=>new n$2("string"==typeof t?t:t+"",void 0,s),S=(s,o)=>{if(e$3)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t;
66
+ const t = globalThis,
67
+ e$3 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
68
+ s = Symbol(),
69
+ o$2 = new WeakMap();
70
+ let n$2 = class n {
71
+ constructor(t, e, o) {
72
+ if (this._$cssResult$ = true, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
73
+ this.cssText = t, this.t = e;
74
+ }
75
+ get styleSheet() {
76
+ let t = this.o;
77
+ const s = this.t;
78
+ if (e$3 && void 0 === t) {
79
+ const e = void 0 !== s && 1 === s.length;
80
+ e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
81
+ }
82
+ return t;
83
+ }
84
+ toString() {
85
+ return this.cssText;
86
+ }
87
+ };
88
+ const r$3 = t => new n$2("string" == typeof t ? t : t + "", void 0, s),
89
+ S = (s, o) => {
90
+ if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
91
+ const o = document.createElement("style"),
92
+ n = t.litNonce;
93
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
94
+ }
95
+ },
96
+ c$1 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
97
+ let e = "";
98
+ for (const s of t.cssRules) e += s.cssText;
99
+ return r$3(e);
100
+ })(t) : t;
66
101
 
67
102
  /**
68
103
  * @license
69
104
  * Copyright 2017 Google LLC
70
105
  * SPDX-License-Identifier: BSD-3-Clause
71
- */const{is:i,defineProperty:e$2,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$1,getPrototypeOf:n$1}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i(t,s),b={attribute:true,type:String,converter:u,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$2(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$2(t),...o$1(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$1(s));}else void 0!==s&&i.push(c$1(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.1");
106
+ */
107
+ const {
108
+ is: i,
109
+ defineProperty: e$2,
110
+ getOwnPropertyDescriptor: h,
111
+ getOwnPropertyNames: r$2,
112
+ getOwnPropertySymbols: o$1,
113
+ getPrototypeOf: n$1
114
+ } = Object,
115
+ a = globalThis,
116
+ c = a.trustedTypes,
117
+ l = c ? c.emptyScript : "",
118
+ p = a.reactiveElementPolyfillSupport,
119
+ d = (t, s) => t,
120
+ u = {
121
+ toAttribute(t, s) {
122
+ switch (s) {
123
+ case Boolean:
124
+ t = t ? l : null;
125
+ break;
126
+ case Object:
127
+ case Array:
128
+ t = null == t ? t : JSON.stringify(t);
129
+ }
130
+ return t;
131
+ },
132
+ fromAttribute(t, s) {
133
+ let i = t;
134
+ switch (s) {
135
+ case Boolean:
136
+ i = null !== t;
137
+ break;
138
+ case Number:
139
+ i = null === t ? null : Number(t);
140
+ break;
141
+ case Object:
142
+ case Array:
143
+ try {
144
+ i = JSON.parse(t);
145
+ } catch (t) {
146
+ i = null;
147
+ }
148
+ }
149
+ return i;
150
+ }
151
+ },
152
+ f = (t, s) => !i(t, s),
153
+ b = {
154
+ attribute: true,
155
+ type: String,
156
+ converter: u,
157
+ reflect: false,
158
+ useDefault: false,
159
+ hasChanged: f
160
+ };
161
+ Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
162
+ class y extends HTMLElement {
163
+ static addInitializer(t) {
164
+ this._$Ei(), (this.l ??= []).push(t);
165
+ }
166
+ static get observedAttributes() {
167
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
168
+ }
169
+ static createProperty(t, s = b) {
170
+ if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
171
+ const i = Symbol(),
172
+ h = this.getPropertyDescriptor(t, i, s);
173
+ void 0 !== h && e$2(this.prototype, t, h);
174
+ }
175
+ }
176
+ static getPropertyDescriptor(t, s, i) {
177
+ const {
178
+ get: e,
179
+ set: r
180
+ } = h(this.prototype, t) ?? {
181
+ get() {
182
+ return this[s];
183
+ },
184
+ set(t) {
185
+ this[s] = t;
186
+ }
187
+ };
188
+ return {
189
+ get: e,
190
+ set(s) {
191
+ const h = e?.call(this);
192
+ r?.call(this, s), this.requestUpdate(t, h, i);
193
+ },
194
+ configurable: true,
195
+ enumerable: true
196
+ };
197
+ }
198
+ static getPropertyOptions(t) {
199
+ return this.elementProperties.get(t) ?? b;
200
+ }
201
+ static _$Ei() {
202
+ if (this.hasOwnProperty(d("elementProperties"))) return;
203
+ const t = n$1(this);
204
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
205
+ }
206
+ static finalize() {
207
+ if (this.hasOwnProperty(d("finalized"))) return;
208
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
209
+ const t = this.properties,
210
+ s = [...r$2(t), ...o$1(t)];
211
+ for (const i of s) this.createProperty(i, t[i]);
212
+ }
213
+ const t = this[Symbol.metadata];
214
+ if (null !== t) {
215
+ const s = litPropertyMetadata.get(t);
216
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
217
+ }
218
+ this._$Eh = new Map();
219
+ for (const [t, s] of this.elementProperties) {
220
+ const i = this._$Eu(t, s);
221
+ void 0 !== i && this._$Eh.set(i, t);
222
+ }
223
+ this.elementStyles = this.finalizeStyles(this.styles);
224
+ }
225
+ static finalizeStyles(s) {
226
+ const i = [];
227
+ if (Array.isArray(s)) {
228
+ const e = new Set(s.flat(1 / 0).reverse());
229
+ for (const s of e) i.unshift(c$1(s));
230
+ } else void 0 !== s && i.push(c$1(s));
231
+ return i;
232
+ }
233
+ static _$Eu(t, s) {
234
+ const i = s.attribute;
235
+ return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
236
+ }
237
+ constructor() {
238
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
239
+ }
240
+ _$Ev() {
241
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
242
+ }
243
+ addController(t) {
244
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
245
+ }
246
+ removeController(t) {
247
+ this._$EO?.delete(t);
248
+ }
249
+ _$E_() {
250
+ const t = new Map(),
251
+ s = this.constructor.elementProperties;
252
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
253
+ t.size > 0 && (this._$Ep = t);
254
+ }
255
+ createRenderRoot() {
256
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
257
+ return S(t, this.constructor.elementStyles), t;
258
+ }
259
+ connectedCallback() {
260
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
261
+ }
262
+ enableUpdating(t) {}
263
+ disconnectedCallback() {
264
+ this._$EO?.forEach(t => t.hostDisconnected?.());
265
+ }
266
+ attributeChangedCallback(t, s, i) {
267
+ this._$AK(t, i);
268
+ }
269
+ _$ET(t, s) {
270
+ const i = this.constructor.elementProperties.get(t),
271
+ e = this.constructor._$Eu(t, i);
272
+ if (void 0 !== e && true === i.reflect) {
273
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
274
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
275
+ }
276
+ }
277
+ _$AK(t, s) {
278
+ const i = this.constructor,
279
+ e = i._$Eh.get(t);
280
+ if (void 0 !== e && this._$Em !== e) {
281
+ const t = i.getPropertyOptions(e),
282
+ h = "function" == typeof t.converter ? {
283
+ fromAttribute: t.converter
284
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u;
285
+ this._$Em = e;
286
+ const r = h.fromAttribute(s, t.type);
287
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
288
+ }
289
+ }
290
+ requestUpdate(t, s, i) {
291
+ if (void 0 !== t) {
292
+ const e = this.constructor,
293
+ h = this[t];
294
+ if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
295
+ this.C(t, s, i);
296
+ }
297
+ false === this.isUpdatePending && (this._$ES = this._$EP());
298
+ }
299
+ C(t, s, {
300
+ useDefault: i,
301
+ reflect: e,
302
+ wrapped: h
303
+ }, r) {
304
+ i && !(this._$Ej ??= new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), true !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), true === e && this._$Em !== t && (this._$Eq ??= new Set()).add(t));
305
+ }
306
+ async _$EP() {
307
+ this.isUpdatePending = true;
308
+ try {
309
+ await this._$ES;
310
+ } catch (t) {
311
+ Promise.reject(t);
312
+ }
313
+ const t = this.scheduleUpdate();
314
+ return null != t && (await t), !this.isUpdatePending;
315
+ }
316
+ scheduleUpdate() {
317
+ return this.performUpdate();
318
+ }
319
+ performUpdate() {
320
+ if (!this.isUpdatePending) return;
321
+ if (!this.hasUpdated) {
322
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
323
+ for (const [t, s] of this._$Ep) this[t] = s;
324
+ this._$Ep = void 0;
325
+ }
326
+ const t = this.constructor.elementProperties;
327
+ if (t.size > 0) for (const [s, i] of t) {
328
+ const {
329
+ wrapped: t
330
+ } = i,
331
+ e = this[s];
332
+ true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
333
+ }
334
+ }
335
+ let t = false;
336
+ const s = this._$AL;
337
+ try {
338
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
339
+ } catch (s) {
340
+ throw t = false, this._$EM(), s;
341
+ }
342
+ t && this._$AE(s);
343
+ }
344
+ willUpdate(t) {}
345
+ _$AE(t) {
346
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
347
+ }
348
+ _$EM() {
349
+ this._$AL = new Map(), this.isUpdatePending = false;
350
+ }
351
+ get updateComplete() {
352
+ return this.getUpdateComplete();
353
+ }
354
+ getUpdateComplete() {
355
+ return this._$ES;
356
+ }
357
+ shouldUpdate(t) {
358
+ return true;
359
+ }
360
+ update(t) {
361
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
362
+ }
363
+ updated(t) {}
364
+ firstUpdated(t) {}
365
+ }
366
+ y.elementStyles = [], y.shadowRootOptions = {
367
+ mode: "open"
368
+ }, y[d("elementProperties")] = new Map(), y[d("finalized")] = new Map(), p?.({
369
+ ReactiveElement: y
370
+ }), (a.reactiveElementVersions ??= []).push("2.1.1");
72
371
 
73
372
  /**
74
373
  * @license
75
374
  * Copyright 2017 Google LLC
76
375
  * SPDX-License-Identifier: BSD-3-Clause
77
- */const o={attribute:true,type:String,converter:u,reflect:false,hasChanged:f},r$1=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=true),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n(t){return (e,o)=>"object"==typeof o?r$1(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
376
+ */
377
+ const o = {
378
+ attribute: true,
379
+ type: String,
380
+ converter: u,
381
+ reflect: false,
382
+ hasChanged: f
383
+ },
384
+ r$1 = (t = o, e, r) => {
385
+ const {
386
+ kind: n,
387
+ metadata: i
388
+ } = r;
389
+ let s = globalThis.litPropertyMetadata.get(i);
390
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map()), "setter" === n && ((t = Object.create(t)).wrapped = true), s.set(r.name, t), "accessor" === n) {
391
+ const {
392
+ name: o
393
+ } = r;
394
+ return {
395
+ set(r) {
396
+ const n = e.get.call(this);
397
+ e.set.call(this, r), this.requestUpdate(o, n, t);
398
+ },
399
+ init(e) {
400
+ return void 0 !== e && this.C(o, void 0, t, e), e;
401
+ }
402
+ };
403
+ }
404
+ if ("setter" === n) {
405
+ const {
406
+ name: o
407
+ } = r;
408
+ return function (r) {
409
+ const n = this[o];
410
+ e.call(this, r), this.requestUpdate(o, n, t);
411
+ };
412
+ }
413
+ throw Error("Unsupported decorator location: " + n);
414
+ };
415
+ function n(t) {
416
+ return (e, o) => "object" == typeof o ? r$1(t, e, o) : ((t, e, o) => {
417
+ const r = e.hasOwnProperty(o);
418
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
419
+ })(t, e, o);
420
+ }
78
421
 
79
422
  /**
80
423
  * @license
81
424
  * Copyright 2017 Google LLC
82
425
  * SPDX-License-Identifier: BSD-3-Clause
83
- */function r(r){return n({...r,state:true,attribute:false})}
426
+ */
427
+ function r(r) {
428
+ return n({
429
+ ...r,
430
+ state: true,
431
+ attribute: false
432
+ });
433
+ }
84
434
 
85
435
  /**
86
436
  * @license
87
437
  * Copyright 2017 Google LLC
88
438
  * SPDX-License-Identifier: BSD-3-Clause
89
439
  */
90
- const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
440
+ const e$1 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
91
441
 
92
442
  /**
93
443
  * @license
94
444
  * Copyright 2017 Google LLC
95
445
  * SPDX-License-Identifier: BSD-3-Clause
96
- */function e(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;return e$1(n,s,{get(){return o(this)}})}}
446
+ */
447
+ function e(e, r) {
448
+ return (n, s, i) => {
449
+ const o = t => t.renderRoot?.querySelector(e) ?? null;
450
+ return e$1(n, s, {
451
+ get() {
452
+ return o(this);
453
+ }
454
+ });
455
+ };
456
+ }
97
457
 
98
458
  var _M3eNavBarElement_instances, _M3eNavBarElement_breakpointUnobserve, _M3eNavBarElement_handleSlotChange, _M3eNavBarElement_handleChange, _a;
99
459
  /**
@@ -128,107 +488,93 @@ var _M3eNavBarElement_instances, _M3eNavBarElement_breakpointUnobserve, _M3eNavB
128
488
  * @cssprop --m3e-nav-bar-vertical-item-width - Minimum width of vertical nav items.
129
489
  */
130
490
  let M3eNavBarElement = class M3eNavBarElement extends Role(LitElement, "navigation") {
131
- constructor() {
132
- super(...arguments);
133
- _M3eNavBarElement_instances.add(this);
134
- /** @internal */ this[_a] = new SelectionManager().disableRovingTabIndex();
135
- /** @private */ _M3eNavBarElement_breakpointUnobserve.set(this, void 0);
136
- /**
137
- * The mode in which items in the bar are presented.
138
- * @default "compact"
139
- */
140
- this.mode = "compact";
141
- }
142
- /** The items of the bar. */
143
- get items() {
144
- return this[selectionManager].items;
145
- }
146
- /** The selected item. */
147
- get selected() {
148
- return this[selectionManager].selectedItems[0] ?? null;
149
- }
150
- /** The current mode applied to the bar. */
151
- get currentMode() {
152
- return this._mode ?? (this.mode !== "compact" ? "expanded" : "compact");
153
- }
154
- set currentMode(value) {
155
- this._mode = value;
156
- }
157
- /** @inheritdoc */
158
- disconnectedCallback() {
159
- super.disconnectedCallback();
160
- this._mode = undefined;
161
- __classPrivateFieldGet(this, _M3eNavBarElement_breakpointUnobserve, "f")?.call(this);
162
- }
163
- /** @inheritdoc */
164
- update(changedProperties) {
165
- super.update(changedProperties);
166
- if (changedProperties.has("mode")) {
167
- __classPrivateFieldGet(this, _M3eNavBarElement_breakpointUnobserve, "f")?.call(this);
168
- if (this.mode === "auto") {
169
- __classPrivateFieldSet(this, _M3eNavBarElement_breakpointUnobserve, M3eBreakpointObserver.observe([Breakpoint.XSmall, Breakpoint.Small], (matches) => {
170
- this._mode = matches.get(Breakpoint.XSmall) || matches.get(Breakpoint.Small) ? "compact" : "expanded";
171
- this._updateItems();
172
- }), "f");
173
- }
174
- else {
175
- this._updateItems();
176
- }
177
- }
178
- if (changedProperties.has("_mode")) {
179
- this._updateItems();
180
- }
181
- }
182
- /** @inheritdoc */
183
- render() {
184
- return html `<slot @change="${__classPrivateFieldGet(this, _M3eNavBarElement_instances, "m", _M3eNavBarElement_handleChange)}" @slotchange="${__classPrivateFieldGet(this, _M3eNavBarElement_instances, "m", _M3eNavBarElement_handleSlotChange)}"></slot>`;
185
- }
491
+ constructor() {
492
+ super(...arguments);
493
+ _M3eNavBarElement_instances.add(this);
186
494
  /** @internal */
187
- _updateItems() {
188
- const orientation = this.currentMode === "compact" ? "vertical" : "horizontal";
189
- this._updateOrientation(orientation);
190
- this.classList.toggle("-compact", orientation === "vertical");
495
+ this[_a] = new SelectionManager().disableRovingTabIndex();
496
+ /** @private */
497
+ _M3eNavBarElement_breakpointUnobserve.set(this, void 0);
498
+ /**
499
+ * The mode in which items in the bar are presented.
500
+ * @default "compact"
501
+ */
502
+ this.mode = "compact";
503
+ }
504
+ /** The items of the bar. */
505
+ get items() {
506
+ return this[selectionManager].items;
507
+ }
508
+ /** The selected item. */
509
+ get selected() {
510
+ return this[selectionManager].selectedItems[0] ?? null;
511
+ }
512
+ /** The current mode applied to the bar. */
513
+ get currentMode() {
514
+ return this._mode ?? (this.mode !== "compact" ? "expanded" : "compact");
515
+ }
516
+ set currentMode(value) {
517
+ this._mode = value;
518
+ }
519
+ /** @inheritdoc */
520
+ disconnectedCallback() {
521
+ super.disconnectedCallback();
522
+ this._mode = undefined;
523
+ __classPrivateFieldGet(this, _M3eNavBarElement_breakpointUnobserve, "f")?.call(this);
524
+ }
525
+ /** @inheritdoc */
526
+ update(changedProperties) {
527
+ super.update(changedProperties);
528
+ if (changedProperties.has("mode")) {
529
+ __classPrivateFieldGet(this, _M3eNavBarElement_breakpointUnobserve, "f")?.call(this);
530
+ if (this.mode === "auto") {
531
+ __classPrivateFieldSet(this, _M3eNavBarElement_breakpointUnobserve, M3eBreakpointObserver.observe([Breakpoint.XSmall, Breakpoint.Small], matches => {
532
+ this._mode = matches.get(Breakpoint.XSmall) || matches.get(Breakpoint.Small) ? "compact" : "expanded";
533
+ this._updateItems();
534
+ }), "f");
535
+ } else {
536
+ this._updateItems();
537
+ }
191
538
  }
192
- /** @internal */
193
- _updateOrientation(orientation) {
194
- this[selectionManager].items.forEach((x) => (x.orientation = orientation));
539
+ if (changedProperties.has("_mode")) {
540
+ this._updateItems();
195
541
  }
542
+ }
543
+ /** @inheritdoc */
544
+ render() {
545
+ return html`<slot @change="${__classPrivateFieldGet(this, _M3eNavBarElement_instances, "m", _M3eNavBarElement_handleChange)}" @slotchange="${__classPrivateFieldGet(this, _M3eNavBarElement_instances, "m", _M3eNavBarElement_handleSlotChange)}"></slot>`;
546
+ }
547
+ /** @internal */
548
+ _updateItems() {
549
+ const orientation = this.currentMode === "compact" ? "vertical" : "horizontal";
550
+ this._updateOrientation(orientation);
551
+ this.classList.toggle("-compact", orientation === "vertical");
552
+ }
553
+ /** @internal */
554
+ _updateOrientation(orientation) {
555
+ this[selectionManager].items.forEach(x => x.orientation = orientation);
556
+ }
196
557
  };
197
558
  _M3eNavBarElement_breakpointUnobserve = new WeakMap();
198
559
  _M3eNavBarElement_instances = new WeakSet();
199
560
  _a = selectionManager;
200
561
  _M3eNavBarElement_handleSlotChange = function _M3eNavBarElement_handleSlotChange() {
201
- this[selectionManager].setItems([...this.querySelectorAll("m3e-nav-item")]);
202
- this._updateItems();
562
+ this[selectionManager].setItems([...this.querySelectorAll("m3e-nav-item")]);
563
+ this._updateItems();
203
564
  };
204
565
  _M3eNavBarElement_handleChange = function _M3eNavBarElement_handleChange(e) {
205
- e.stopPropagation();
206
- this.dispatchEvent(new Event("change", { bubbles: true }));
566
+ e.stopPropagation();
567
+ this.dispatchEvent(new Event("change", {
568
+ bubbles: true
569
+ }));
207
570
  };
208
571
  /** The styles of the element. */
209
- M3eNavBarElement.styles = css `
210
- :host {
211
- display: flex;
212
- overflow-x: auto;
213
- overflow-y: hidden;
214
- align-items: stretch;
215
- scrollbar-width: ${DesignToken.scrollbar.thinWidth};
216
- scrollbar-color: ${DesignToken.scrollbar.color};
217
- min-height: var(--m3e-nav-bar-height, 4rem);
218
- background-color: var(--m3e-nav-bar-container-color, ${DesignToken.color.surfaceContainer});
219
- justify-content: center;
220
- --_nav-item-min-width: var(--m3e-nav-bar-vertical-item-width, 7rem);
221
- }
222
- `;
223
- __decorate([
224
- r()
225
- ], M3eNavBarElement.prototype, "_mode", void 0);
226
- __decorate([
227
- n({ reflect: true })
228
- ], M3eNavBarElement.prototype, "mode", void 0);
229
- M3eNavBarElement = __decorate([
230
- t$1("m3e-nav-bar")
231
- ], M3eNavBarElement);
572
+ M3eNavBarElement.styles = css`:host { display: flex; overflow-x: auto; overflow-y: hidden; align-items: stretch; scrollbar-width: ${DesignToken.scrollbar.thinWidth}; scrollbar-color: ${DesignToken.scrollbar.color}; min-height: var(--m3e-nav-bar-height, 4rem); background-color: var(--m3e-nav-bar-container-color, ${DesignToken.color.surfaceContainer}); justify-content: center; --_nav-item-min-width: var(--m3e-nav-bar-vertical-item-width, 7rem); }`;
573
+ __decorate([r()], M3eNavBarElement.prototype, "_mode", void 0);
574
+ __decorate([n({
575
+ reflect: true
576
+ })], M3eNavBarElement.prototype, "mode", void 0);
577
+ M3eNavBarElement = __decorate([t$1("m3e-nav-bar")], M3eNavBarElement);
232
578
 
233
579
  var _M3eNavItemElement_instances, _M3eNavItemElement_clickHandler, _M3eNavItemElement_handleClick;
234
580
  /**
@@ -299,345 +645,93 @@ var _M3eNavItemElement_instances, _M3eNavItemElement_clickHandler, _M3eNavItemEl
299
645
  * @cssprop --m3e-vertical-nav-item-active-indicator-margin - Margin for the active indicator in vertical orientation.
300
646
  */
301
647
  let M3eNavItemElement = class M3eNavItemElement extends LinkButton(Selected(KeyboardClick(Focusable(DisabledInteractive(Disabled(AttachInternals(Role(LitElement, "button"), true))))))) {
302
- constructor() {
303
- super(...arguments);
304
- _M3eNavItemElement_instances.add(this);
305
- /** @private */ _M3eNavItemElement_clickHandler.set(this, (e) => __classPrivateFieldGet(this, _M3eNavItemElement_instances, "m", _M3eNavItemElement_handleClick).call(this, e));
306
- /**
307
- * The layout orientation of the item.
308
- * @default "vertical"
309
- */
310
- this.orientation = "vertical";
311
- }
312
- /** The navigation bar to which this item belongs. */
313
- get navBar() {
314
- return this.closest("m3e-nav-bar") ?? this.closest("m3e-nav-rail") ?? null;
315
- }
316
- /** @inheritdoc */
317
- connectedCallback() {
318
- super.connectedCallback();
319
- this.addEventListener("click", __classPrivateFieldGet(this, _M3eNavItemElement_clickHandler, "f"), { capture: true });
320
- }
321
- /** @inheritdoc */
322
- disconnectedCallback() {
323
- super.disconnectedCallback();
324
- this.removeEventListener("click", __classPrivateFieldGet(this, _M3eNavItemElement_clickHandler, "f"), { capture: true });
325
- }
326
- /** @inheritdoc */
327
- update(changedProperties) {
328
- super.update(changedProperties);
329
- if (changedProperties.has("selected")) {
330
- this.ariaSelected = null;
331
- this.ariaPressed = null;
332
- this.ariaCurrent = `${this.selected}`;
333
- for (const icon of this.querySelectorAll("m3e-icon")) {
334
- icon.toggleAttribute("filled", this.selected);
335
- }
336
- this.navBar?.[selectionManager].notifySelectionChange(this);
337
- }
338
- }
339
- /** @inheritdoc */
340
- updated(_changedProperties) {
341
- super.updated(_changedProperties);
342
- if (_changedProperties.has("orientation")) {
343
- this._focusRing?.attach(this);
344
- }
648
+ constructor() {
649
+ super(...arguments);
650
+ _M3eNavItemElement_instances.add(this);
651
+ /** @private */
652
+ _M3eNavItemElement_clickHandler.set(this, e => __classPrivateFieldGet(this, _M3eNavItemElement_instances, "m", _M3eNavItemElement_handleClick).call(this, e));
653
+ /**
654
+ * The layout orientation of the item.
655
+ * @default "vertical"
656
+ */
657
+ this.orientation = "vertical";
658
+ }
659
+ /** The navigation bar to which this item belongs. */
660
+ get navBar() {
661
+ return this.closest("m3e-nav-bar") ?? this.closest("m3e-nav-rail") ?? null;
662
+ }
663
+ /** @inheritdoc */
664
+ connectedCallback() {
665
+ super.connectedCallback();
666
+ this.addEventListener("click", __classPrivateFieldGet(this, _M3eNavItemElement_clickHandler, "f"), {
667
+ capture: true
668
+ });
669
+ }
670
+ /** @inheritdoc */
671
+ disconnectedCallback() {
672
+ super.disconnectedCallback();
673
+ this.removeEventListener("click", __classPrivateFieldGet(this, _M3eNavItemElement_clickHandler, "f"), {
674
+ capture: true
675
+ });
676
+ }
677
+ /** @inheritdoc */
678
+ update(changedProperties) {
679
+ super.update(changedProperties);
680
+ if (changedProperties.has("selected")) {
681
+ this.ariaSelected = null;
682
+ this.ariaPressed = null;
683
+ this.ariaCurrent = `${this.selected}`;
684
+ for (const icon of this.querySelectorAll("m3e-icon")) {
685
+ icon.toggleAttribute("filled", this.selected);
686
+ }
687
+ this.navBar?.[selectionManager].notifySelectionChange(this);
345
688
  }
346
- /** @inheritdoc */
347
- firstUpdated(_changedProperties) {
348
- super.firstUpdated(_changedProperties);
349
- [this._focusRing, this._stateLayer, this._ripple].forEach((x) => x?.attach(this));
350
- }
351
- /** @inheritdoc */
352
- render() {
353
- const disabled = this.disabled || this.disabledInteractive;
354
- return html `${this.orientation === "vertical"
355
- ? html `<m3e-focus-ring class="focus-ring" inward></m3e-focus-ring>`
356
- : nothing}
357
- <div class="outer">
358
- ${this[renderPseudoLink]()}
359
- <div class="inner">
360
- ${this.orientation === "horizontal" ? html `<m3e-focus-ring class="focus-ring"></m3e-focus-ring>` : nothing}
361
- <m3e-state-layer class="state-layer" ?disabled="${disabled}"></m3e-state-layer>
362
- <m3e-ripple class="ripple" centered ?disabled="${disabled}"></m3e-ripple>
363
- <div class="touch" aria-hidden="true"></div>
364
- <div class="base">
365
- <div class="icon-wrapper" aria-hidden="true">
366
- <div class="icon">
367
- <slot name="icon" aria-hidden="true"></slot>
368
- </div>
369
- </div>
370
- <div class="label">
371
- <slot></slot>
372
- </div>
373
- </div>
374
- </div>
375
- </div>`;
689
+ }
690
+ /** @inheritdoc */
691
+ updated(_changedProperties) {
692
+ super.updated(_changedProperties);
693
+ if (_changedProperties.has("orientation")) {
694
+ this._focusRing?.attach(this);
376
695
  }
696
+ }
697
+ /** @inheritdoc */
698
+ firstUpdated(_changedProperties) {
699
+ super.firstUpdated(_changedProperties);
700
+ [this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
701
+ }
702
+ /** @inheritdoc */
703
+ render() {
704
+ const disabled = this.disabled || this.disabledInteractive;
705
+ return html`${this.orientation === "vertical" ? html`<m3e-focus-ring class="focus-ring" inward></m3e-focus-ring>` : nothing}<div class="outer">${this[renderPseudoLink]()}<div class="inner">${this.orientation === "horizontal" ? html`<m3e-focus-ring class="focus-ring"></m3e-focus-ring>` : nothing}<m3e-state-layer class="state-layer" ?disabled="${disabled}"></m3e-state-layer><m3e-ripple class="ripple" centered ?disabled="${disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div><div class="base"><div class="icon-wrapper" aria-hidden="true"><div class="icon"><slot name="icon" aria-hidden="true"></slot></div></div><div class="label"><slot></slot></div></div></div></div>`;
706
+ }
377
707
  };
378
708
  _M3eNavItemElement_clickHandler = new WeakMap();
379
709
  _M3eNavItemElement_instances = new WeakSet();
380
710
  _M3eNavItemElement_handleClick = function _M3eNavItemElement_handleClick(e) {
381
- if (e.defaultPrevented)
382
- return;
383
- this.selected = true;
384
- if (this.dispatchEvent(new Event("input", { bubbles: true, composed: true, cancelable: true }))) {
385
- this.navBar?.[selectionManager].notifySelectionChange(this);
386
- this.dispatchEvent(new Event("change", { bubbles: true }));
387
- }
388
- else {
389
- this.selected = false;
390
- }
711
+ if (e.defaultPrevented) return;
712
+ this.selected = true;
713
+ if (this.dispatchEvent(new Event("input", {
714
+ bubbles: true,
715
+ composed: true,
716
+ cancelable: true
717
+ }))) {
718
+ this.navBar?.[selectionManager].notifySelectionChange(this);
719
+ this.dispatchEvent(new Event("change", {
720
+ bubbles: true
721
+ }));
722
+ } else {
723
+ this.selected = false;
724
+ }
391
725
  };
392
726
  /** The styles of the element. */
393
- M3eNavItemElement.styles = css `
394
- :host {
395
- display: inline-block;
396
- vertical-align: middle;
397
- position: relative;
398
- outline: none;
399
- user-select: none;
400
- flex: 1;
401
- font-size: var(--m3e-nav-item-label-text-font-size, ${DesignToken.typescale.standard.label.medium.fontSize});
402
- font-weight: var(
403
- --m3e-nav-item-label-text-font-weight,
404
- ${DesignToken.typescale.standard.label.medium.fontWeight}
405
- );
406
- line-height: var(
407
- --m3e-nav-item-label-text-line-height,
408
- ${DesignToken.typescale.standard.label.medium.lineHeight}
409
- );
410
- letter-spacing: var(--m3e-nav-item-label-text-tracking, ${DesignToken.typescale.standard.label.medium.tracking});
411
- border-radius: var(--m3e-nav-item-shape, ${DesignToken.shape.corner.full});
412
- min-width: var(--_nav-item-min-width);
413
- align-self: var(--_nav-item-align-self);
414
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
415
- }
416
- :host([orientation="horizontal"]) {
417
- max-width: fit-content;
418
- }
419
- :host(:not(:disabled):not([disabled-interactive])) {
420
- cursor: pointer;
421
- }
422
- :host([disabled-interactive]) {
423
- cursor: not-allowed;
424
- }
425
- .outer {
426
- height: 100%;
427
- }
428
- .outer,
429
- .inner {
430
- display: flex;
431
- align-items: center;
432
- justify-content: var(--_nav-item-justify-content, center);
433
- position: relative;
434
- border-radius: inherit;
435
- }
436
- .icon-wrapper {
437
- position: relative;
438
- flex: none;
439
- }
440
- .base {
441
- justify-content: unset;
442
- box-sizing: border-box;
443
- vertical-align: middle;
444
- display: inline-flex;
445
- align-items: center;
446
- justify-content: center;
447
- position: relative;
448
- width: 100%;
449
- }
450
- .icon {
451
- position: absolute;
452
- }
453
- .label {
454
- vertical-align: middle;
455
- }
456
- ::slotted([slot="icon"]),
457
- ::slotted([slot="selected-icon"]) {
458
- width: 1em;
459
- font-size: var(--m3e-nav-item-icon-size, 1.5rem) !important;
460
- }
461
- :host(:not([selected]):not(:disabled):not([disabled-interactive])) .outer {
462
- --m3e-state-layer-hover-color: var(
463
- --m3e-nav-item-inactive-hover-state-layer-color,
464
- ${DesignToken.color.onSecondaryContainer}
465
- );
466
- --m3e-state-layer-focus-color: var(
467
- --m3e-nav-item-inactive-focus-state-layer-color,
468
- ${DesignToken.color.onSecondaryContainer}
469
- );
470
- --m3e-ripple-color: var(
471
- --m3e-nav-item-inactive-pressed-state-layer-color,
472
- ${DesignToken.color.onSecondaryContainer}
473
- );
474
- }
475
- :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label {
476
- color: var(--m3e-nav-item-inactive-label-text-color, ${DesignToken.color.onSurfaceVariant});
477
- }
478
- :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon {
479
- color: var(--m3e-nav-item-inactive-icon-color, ${DesignToken.color.onSecondaryContainer});
480
- }
481
- :host([selected]:not(:disabled):not([disabled-interactive])) .outer {
482
- --m3e-state-layer-hover-color: var(
483
- --m3e-nav-item-active-hover-state-layer-color,
484
- ${DesignToken.color.onSecondaryContainer}
485
- );
486
- --m3e-state-layer-focus-color: var(
487
- --m3e-nav-item-active-focus-state-layer-color,
488
- ${DesignToken.color.onSecondaryContainer}
489
- );
490
- --m3e-ripple-color: var(
491
- --m3e-nav-item-active-pressed-state-layer-color,
492
- ${DesignToken.color.onSecondaryContainer}
493
- );
494
- }
495
- :host([selected]:not(:disabled):not([disabled-interactive])) .label {
496
- color: var(--m3e-nav-item-active-label-text-color, ${DesignToken.color.secondary});
497
- }
498
- :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer {
499
- background-color: var(--m3e-nav-item-active-container-color, ${DesignToken.color.secondaryContainer});
500
- }
501
- :host([selected]:not(:disabled):not([disabled-interactive])) .icon {
502
- color: var(--m3e-nav-item-active-icon-color, ${DesignToken.color.onSecondaryContainer});
503
- }
504
- :host([orientation="vertical"]) .outer {
505
- align-self: stretch;
506
- align-items: flex-start;
507
- }
508
- :host([orientation="vertical"]) .label {
509
- text-align: center;
510
- display: -webkit-box;
511
- -webkit-line-clamp: 2;
512
- -webkit-box-orient: vertical;
513
- overflow: hidden;
514
- line-clamp: 2;
515
- }
516
- :host([orientation="vertical"]) .base {
517
- flex-direction: column;
518
- row-gap: var(--m3e-nav-item-spacing, 0.25rem);
519
- }
520
- :host([orientation="vertical"]) .base {
521
- margin-block: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem);
522
- }
523
- :host([orientation="vertical"]) .state-layer,
524
- :host([orientation="vertical"]) .ripple {
525
- top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem);
526
- bottom: unset;
527
- }
528
- :host([orientation="vertical"]) .state-layer,
529
- :host([orientation="vertical"]) .ripple,
530
- :host([orientation="vertical"]) .icon-wrapper {
531
- width: var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem);
532
- }
533
- :host([orientation="vertical"]) .state-layer,
534
- :host([orientation="vertical"]) .ripple,
535
- :host([orientation="vertical"]) .icon-wrapper {
536
- height: var(--m3e-vertical-nav-item-active-indicator-height, 2rem);
537
- }
538
- :host([orientation="vertical"]) .icon {
539
- top: calc(
540
- calc(var(--m3e-vertical-nav-item-active-indicator-height, 2rem) / 2) - calc(
541
- var(--m3e-nav-item-icon-size, 1.5rem) / 2
542
- )
543
- );
544
- left: calc(
545
- calc(var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem) / 2) - calc(
546
- var(--m3e-nav-item-icon-size, 1.5rem) / 2
547
- )
548
- );
549
- }
550
- :host([orientation="vertical"]) .focus-ring {
551
- border-radius: var(--m3e-nav-item-focus-ring-shape, ${DesignToken.shape.corner.extraSmall});
552
- }
553
- :host([orientation="horizontal"]) .icon-wrapper {
554
- width: var(--m3e-nav-item-icon-size, 1.5rem);
555
- height: var(--m3e-nav-item-icon-size, 1.5rem);
556
- }
557
- :host([orientation="horizontal"]) .base {
558
- padding: var(--m3e-horizontal-nav-item-padding, 1rem);
559
- }
560
- :host([orientation="horizontal"]) .label {
561
- flex: 1 1 auto;
562
- }
563
- :host([orientation="horizontal"]) .base {
564
- column-gap: var(--m3e-nav-item-spacing, 0.25rem);
565
- }
566
- :host([orientation="horizontal"]) .inner {
567
- height: var(--m3e-horizontal-nav-item-active-indicator-height, 2.5rem);
568
- width: fit-content;
569
- }
570
- .state-layer,
571
- .ripple {
572
- margin-inline: auto;
573
- }
574
- :host(:disabled) .label,
575
- :host([disabled-interactive]) .label {
576
- color: color-mix(
577
- in srgb,
578
- var(--m3e-nav-item-disabled-label-text-color, ${DesignToken.color.onSurface})
579
- var(--m3e-nav-item-disabled-label-text-opacity, 38%),
580
- transparent
581
- );
582
- }
583
- :host(:disabled) .icon,
584
- :host([disabled-interactive]) .icon {
585
- color: color-mix(
586
- in srgb,
587
- var(--m3e-nav-item-disabled-icon-color, ${DesignToken.color.onSurface})
588
- var(--m3e-nav-item-disabled-icon-opacity, 38%),
589
- transparent
590
- );
591
- }
592
- a {
593
- all: unset;
594
- display: block;
595
- position: absolute;
596
- top: 0px;
597
- left: 0px;
598
- right: 0px;
599
- bottom: 0px;
600
- z-index: 1;
601
- }
602
- @media (forced-colors: active) {
603
- :host(:disabled) .label,
604
- :host([disabled-interactive]) .label,
605
- :host(:disabled) .icon,
606
- :host([disabled-interactive]) .icon {
607
- color: GrayText;
608
- }
609
- :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label,
610
- :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon {
611
- color: ButtonText;
612
- }
613
- :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer {
614
- background-color: ButtonText;
615
- }
616
- :host([orientation="vertical"][selected]:not(:disabled):not([disabled-interactive])) .label {
617
- color: ButtonText;
618
- }
619
- :host([orientation="horizontal"][selected]:not(:disabled):not([disabled-interactive])) .label,
620
- :host([selected]:not(:disabled):not([disabled-interactive])) .icon {
621
- forced-color-adjust: none;
622
- color: ButtonFace;
623
- }
624
- }
625
- `;
626
- __decorate([
627
- e(".focus-ring")
628
- ], M3eNavItemElement.prototype, "_focusRing", void 0);
629
- __decorate([
630
- e(".state-layer")
631
- ], M3eNavItemElement.prototype, "_stateLayer", void 0);
632
- __decorate([
633
- e(".ripple")
634
- ], M3eNavItemElement.prototype, "_ripple", void 0);
635
- __decorate([
636
- n({ reflect: true })
637
- ], M3eNavItemElement.prototype, "orientation", void 0);
638
- M3eNavItemElement = __decorate([
639
- t$1("m3e-nav-item")
640
- ], M3eNavItemElement);
727
+ M3eNavItemElement.styles = css`:host { display: inline-block; vertical-align: middle; position: relative; outline: none; user-select: none; flex: 1; font-size: var(--m3e-nav-item-label-text-font-size, ${DesignToken.typescale.standard.label.medium.fontSize}); font-weight: var( --m3e-nav-item-label-text-font-weight, ${DesignToken.typescale.standard.label.medium.fontWeight} ); line-height: var( --m3e-nav-item-label-text-line-height, ${DesignToken.typescale.standard.label.medium.lineHeight} ); letter-spacing: var(--m3e-nav-item-label-text-tracking, ${DesignToken.typescale.standard.label.medium.tracking}); border-radius: var(--m3e-nav-item-shape, ${DesignToken.shape.corner.full}); min-width: var(--_nav-item-min-width); align-self: var(--_nav-item-align-self); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host([orientation="horizontal"]) { max-width: fit-content; } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } .outer { height: 100%; } .outer, .inner { display: flex; align-items: center; justify-content: var(--_nav-item-justify-content, center); position: relative; border-radius: inherit; } .icon-wrapper { position: relative; flex: none; } .base { justify-content: unset; box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; } .icon { position: absolute; } .label { vertical-align: middle; } ::slotted([slot="icon"]), ::slotted([slot="selected-icon"]) { width: 1em; font-size: var(--m3e-nav-item-icon-size, 1.5rem) !important; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-inactive-hover-state-layer-color, ${DesignToken.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-inactive-focus-state-layer-color, ${DesignToken.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-inactive-pressed-state-layer-color, ${DesignToken.color.onSecondaryContainer} ); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label { color: var(--m3e-nav-item-inactive-label-text-color, ${DesignToken.color.onSurfaceVariant}); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-inactive-icon-color, ${DesignToken.color.onSecondaryContainer}); } :host([selected]:not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-active-hover-state-layer-color, ${DesignToken.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-active-focus-state-layer-color, ${DesignToken.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-active-pressed-state-layer-color, ${DesignToken.color.onSecondaryContainer} ); } :host([selected]:not(:disabled):not([disabled-interactive])) .label { color: var(--m3e-nav-item-active-label-text-color, ${DesignToken.color.secondary}); } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: var(--m3e-nav-item-active-container-color, ${DesignToken.color.secondaryContainer}); } :host([selected]:not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-active-icon-color, ${DesignToken.color.onSecondaryContainer}); } :host([orientation="vertical"]) .outer { align-self: stretch; align-items: flex-start; } :host([orientation="vertical"]) .label { text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; } :host([orientation="vertical"]) .base { flex-direction: column; row-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="vertical"]) .base { margin-block: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple { top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); bottom: unset; } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { width: var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem); } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { height: var(--m3e-vertical-nav-item-active-indicator-height, 2rem); } :host([orientation="vertical"]) .icon { top: calc( calc(var(--m3e-vertical-nav-item-active-indicator-height, 2rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); left: calc( calc(var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); } :host([orientation="vertical"]) .focus-ring { border-radius: var(--m3e-nav-item-focus-ring-shape, ${DesignToken.shape.corner.extraSmall}); } :host([orientation="horizontal"]) .icon-wrapper { width: var(--m3e-nav-item-icon-size, 1.5rem); height: var(--m3e-nav-item-icon-size, 1.5rem); } :host([orientation="horizontal"]) .base { padding: var(--m3e-horizontal-nav-item-padding, 1rem); } :host([orientation="horizontal"]) .label { flex: 1 1 auto; } :host([orientation="horizontal"]) .base { column-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="horizontal"]) .inner { height: var(--m3e-horizontal-nav-item-active-indicator-height, 2.5rem); width: fit-content; } .state-layer, .ripple { margin-inline: auto; } :host(:disabled) .label, :host([disabled-interactive]) .label { color: color-mix( in srgb, var(--m3e-nav-item-disabled-label-text-color, ${DesignToken.color.onSurface}) var(--m3e-nav-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: color-mix( in srgb, var(--m3e-nav-item-disabled-icon-color, ${DesignToken.color.onSurface}) var(--m3e-nav-item-disabled-icon-opacity, 38%), transparent ); } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (forced-colors: active) { :host(:disabled) .label, :host([disabled-interactive]) .label, :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: GrayText; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label, :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: ButtonText; } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: ButtonText; } :host([orientation="vertical"][selected]:not(:disabled):not([disabled-interactive])) .label { color: ButtonText; } :host([orientation="horizontal"][selected]:not(:disabled):not([disabled-interactive])) .label, :host([selected]:not(:disabled):not([disabled-interactive])) .icon { forced-color-adjust: none; color: ButtonFace; } }`;
728
+ __decorate([e(".focus-ring")], M3eNavItemElement.prototype, "_focusRing", void 0);
729
+ __decorate([e(".state-layer")], M3eNavItemElement.prototype, "_stateLayer", void 0);
730
+ __decorate([e(".ripple")], M3eNavItemElement.prototype, "_ripple", void 0);
731
+ __decorate([n({
732
+ reflect: true
733
+ })], M3eNavItemElement.prototype, "orientation", void 0);
734
+ M3eNavItemElement = __decorate([t$1("m3e-nav-item")], M3eNavItemElement);
641
735
 
642
736
  export { M3eNavBarElement, M3eNavItemElement };
643
737
  //# sourceMappingURL=index.js.map