@m3e/fab-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/dist/index.js CHANGED
@@ -22,33 +22,30 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
22
22
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
23
23
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
24
24
  PERFORMANCE OF THIS SOFTWARE.
25
- ***************************************************************************** */
26
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
27
-
28
-
29
- function __decorate(decorators, target, key, desc) {
30
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
31
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32
- 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;
33
- return c > 3 && r && Object.defineProperty(target, key, r), r;
34
- }
35
-
36
- function __classPrivateFieldGet(receiver, state, kind, f) {
37
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
38
- 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");
39
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
40
- }
41
-
42
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
43
- if (kind === "m") throw new TypeError("Private method is not writable");
44
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
45
- 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");
46
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
47
- }
48
-
49
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
- var e = new Error(message);
51
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
25
+ ***************************************************************************** */
26
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
27
+
28
+ function __decorate(decorators, target, key, desc) {
29
+ var c = arguments.length,
30
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
31
+ d;
32
+ 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;
33
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
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
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
41
+ if (kind === "m") throw new TypeError("Private method is not writable");
42
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
43
+ 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");
44
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
45
+ }
46
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
47
+ var e = new Error(message);
48
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
49
  };
53
50
 
54
51
  /**
@@ -56,39 +53,395 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
56
53
  * Copyright 2017 Google LLC
57
54
  * SPDX-License-Identifier: BSD-3-Clause
58
55
  */
59
- const t$1=t=>(e,o)=>{ void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);};
56
+ const t$1 = t => (e, o) => {
57
+ void 0 !== o ? o.addInitializer(() => {
58
+ customElements.define(t, e);
59
+ }) : customElements.define(t, e);
60
+ };
60
61
 
61
62
  /**
62
63
  * @license
63
64
  * Copyright 2019 Google LLC
64
65
  * SPDX-License-Identifier: BSD-3-Clause
65
66
  */
66
- 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$2=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$2(e)})(t):t;
67
+ const t = globalThis,
68
+ e$3 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
69
+ s = Symbol(),
70
+ o$2 = new WeakMap();
71
+ let n$2 = class n {
72
+ constructor(t, e, o) {
73
+ if (this._$cssResult$ = true, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
74
+ this.cssText = t, this.t = e;
75
+ }
76
+ get styleSheet() {
77
+ let t = this.o;
78
+ const s = this.t;
79
+ if (e$3 && void 0 === t) {
80
+ const e = void 0 !== s && 1 === s.length;
81
+ e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
82
+ }
83
+ return t;
84
+ }
85
+ toString() {
86
+ return this.cssText;
87
+ }
88
+ };
89
+ const r$2 = t => new n$2("string" == typeof t ? t : t + "", void 0, s),
90
+ S = (s, o) => {
91
+ if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
92
+ const o = document.createElement("style"),
93
+ n = t.litNonce;
94
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
95
+ }
96
+ },
97
+ c$1 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
98
+ let e = "";
99
+ for (const s of t.cssRules) e += s.cssText;
100
+ return r$2(e);
101
+ })(t) : t;
67
102
 
68
103
  /**
69
104
  * @license
70
105
  * Copyright 2017 Google LLC
71
106
  * SPDX-License-Identifier: BSD-3-Clause
72
- */const{is:i,defineProperty:e$2,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$1,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$1(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");
107
+ */
108
+ const {
109
+ is: i,
110
+ defineProperty: e$2,
111
+ getOwnPropertyDescriptor: h,
112
+ getOwnPropertyNames: r$1,
113
+ getOwnPropertySymbols: o$1,
114
+ getPrototypeOf: n$1
115
+ } = Object,
116
+ a = globalThis,
117
+ c = a.trustedTypes,
118
+ l = c ? c.emptyScript : "",
119
+ p = a.reactiveElementPolyfillSupport,
120
+ d = (t, s) => t,
121
+ u = {
122
+ toAttribute(t, s) {
123
+ switch (s) {
124
+ case Boolean:
125
+ t = t ? l : null;
126
+ break;
127
+ case Object:
128
+ case Array:
129
+ t = null == t ? t : JSON.stringify(t);
130
+ }
131
+ return t;
132
+ },
133
+ fromAttribute(t, s) {
134
+ let i = t;
135
+ switch (s) {
136
+ case Boolean:
137
+ i = null !== t;
138
+ break;
139
+ case Number:
140
+ i = null === t ? null : Number(t);
141
+ break;
142
+ case Object:
143
+ case Array:
144
+ try {
145
+ i = JSON.parse(t);
146
+ } catch (t) {
147
+ i = null;
148
+ }
149
+ }
150
+ return i;
151
+ }
152
+ },
153
+ f = (t, s) => !i(t, s),
154
+ b = {
155
+ attribute: true,
156
+ type: String,
157
+ converter: u,
158
+ reflect: false,
159
+ useDefault: false,
160
+ hasChanged: f
161
+ };
162
+ Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
163
+ class y extends HTMLElement {
164
+ static addInitializer(t) {
165
+ this._$Ei(), (this.l ??= []).push(t);
166
+ }
167
+ static get observedAttributes() {
168
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
169
+ }
170
+ static createProperty(t, s = b) {
171
+ 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) {
172
+ const i = Symbol(),
173
+ h = this.getPropertyDescriptor(t, i, s);
174
+ void 0 !== h && e$2(this.prototype, t, h);
175
+ }
176
+ }
177
+ static getPropertyDescriptor(t, s, i) {
178
+ const {
179
+ get: e,
180
+ set: r
181
+ } = h(this.prototype, t) ?? {
182
+ get() {
183
+ return this[s];
184
+ },
185
+ set(t) {
186
+ this[s] = t;
187
+ }
188
+ };
189
+ return {
190
+ get: e,
191
+ set(s) {
192
+ const h = e?.call(this);
193
+ r?.call(this, s), this.requestUpdate(t, h, i);
194
+ },
195
+ configurable: true,
196
+ enumerable: true
197
+ };
198
+ }
199
+ static getPropertyOptions(t) {
200
+ return this.elementProperties.get(t) ?? b;
201
+ }
202
+ static _$Ei() {
203
+ if (this.hasOwnProperty(d("elementProperties"))) return;
204
+ const t = n$1(this);
205
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
206
+ }
207
+ static finalize() {
208
+ if (this.hasOwnProperty(d("finalized"))) return;
209
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
210
+ const t = this.properties,
211
+ s = [...r$1(t), ...o$1(t)];
212
+ for (const i of s) this.createProperty(i, t[i]);
213
+ }
214
+ const t = this[Symbol.metadata];
215
+ if (null !== t) {
216
+ const s = litPropertyMetadata.get(t);
217
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
218
+ }
219
+ this._$Eh = new Map();
220
+ for (const [t, s] of this.elementProperties) {
221
+ const i = this._$Eu(t, s);
222
+ void 0 !== i && this._$Eh.set(i, t);
223
+ }
224
+ this.elementStyles = this.finalizeStyles(this.styles);
225
+ }
226
+ static finalizeStyles(s) {
227
+ const i = [];
228
+ if (Array.isArray(s)) {
229
+ const e = new Set(s.flat(1 / 0).reverse());
230
+ for (const s of e) i.unshift(c$1(s));
231
+ } else void 0 !== s && i.push(c$1(s));
232
+ return i;
233
+ }
234
+ static _$Eu(t, s) {
235
+ const i = s.attribute;
236
+ return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
237
+ }
238
+ constructor() {
239
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
240
+ }
241
+ _$Ev() {
242
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
243
+ }
244
+ addController(t) {
245
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
246
+ }
247
+ removeController(t) {
248
+ this._$EO?.delete(t);
249
+ }
250
+ _$E_() {
251
+ const t = new Map(),
252
+ s = this.constructor.elementProperties;
253
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
254
+ t.size > 0 && (this._$Ep = t);
255
+ }
256
+ createRenderRoot() {
257
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
258
+ return S(t, this.constructor.elementStyles), t;
259
+ }
260
+ connectedCallback() {
261
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
262
+ }
263
+ enableUpdating(t) {}
264
+ disconnectedCallback() {
265
+ this._$EO?.forEach(t => t.hostDisconnected?.());
266
+ }
267
+ attributeChangedCallback(t, s, i) {
268
+ this._$AK(t, i);
269
+ }
270
+ _$ET(t, s) {
271
+ const i = this.constructor.elementProperties.get(t),
272
+ e = this.constructor._$Eu(t, i);
273
+ if (void 0 !== e && true === i.reflect) {
274
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
275
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
276
+ }
277
+ }
278
+ _$AK(t, s) {
279
+ const i = this.constructor,
280
+ e = i._$Eh.get(t);
281
+ if (void 0 !== e && this._$Em !== e) {
282
+ const t = i.getPropertyOptions(e),
283
+ h = "function" == typeof t.converter ? {
284
+ fromAttribute: t.converter
285
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u;
286
+ this._$Em = e;
287
+ const r = h.fromAttribute(s, t.type);
288
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
289
+ }
290
+ }
291
+ requestUpdate(t, s, i) {
292
+ if (void 0 !== t) {
293
+ const e = this.constructor,
294
+ h = this[t];
295
+ 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;
296
+ this.C(t, s, i);
297
+ }
298
+ false === this.isUpdatePending && (this._$ES = this._$EP());
299
+ }
300
+ C(t, s, {
301
+ useDefault: i,
302
+ reflect: e,
303
+ wrapped: h
304
+ }, r) {
305
+ 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));
306
+ }
307
+ async _$EP() {
308
+ this.isUpdatePending = true;
309
+ try {
310
+ await this._$ES;
311
+ } catch (t) {
312
+ Promise.reject(t);
313
+ }
314
+ const t = this.scheduleUpdate();
315
+ return null != t && (await t), !this.isUpdatePending;
316
+ }
317
+ scheduleUpdate() {
318
+ return this.performUpdate();
319
+ }
320
+ performUpdate() {
321
+ if (!this.isUpdatePending) return;
322
+ if (!this.hasUpdated) {
323
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
324
+ for (const [t, s] of this._$Ep) this[t] = s;
325
+ this._$Ep = void 0;
326
+ }
327
+ const t = this.constructor.elementProperties;
328
+ if (t.size > 0) for (const [s, i] of t) {
329
+ const {
330
+ wrapped: t
331
+ } = i,
332
+ e = this[s];
333
+ true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
334
+ }
335
+ }
336
+ let t = false;
337
+ const s = this._$AL;
338
+ try {
339
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
340
+ } catch (s) {
341
+ throw t = false, this._$EM(), s;
342
+ }
343
+ t && this._$AE(s);
344
+ }
345
+ willUpdate(t) {}
346
+ _$AE(t) {
347
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
348
+ }
349
+ _$EM() {
350
+ this._$AL = new Map(), this.isUpdatePending = false;
351
+ }
352
+ get updateComplete() {
353
+ return this.getUpdateComplete();
354
+ }
355
+ getUpdateComplete() {
356
+ return this._$ES;
357
+ }
358
+ shouldUpdate(t) {
359
+ return true;
360
+ }
361
+ update(t) {
362
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
363
+ }
364
+ updated(t) {}
365
+ firstUpdated(t) {}
366
+ }
367
+ y.elementStyles = [], y.shadowRootOptions = {
368
+ mode: "open"
369
+ }, y[d("elementProperties")] = new Map(), y[d("finalized")] = new Map(), p?.({
370
+ ReactiveElement: y
371
+ }), (a.reactiveElementVersions ??= []).push("2.1.1");
73
372
 
74
373
  /**
75
374
  * @license
76
375
  * Copyright 2017 Google LLC
77
376
  * SPDX-License-Identifier: BSD-3-Clause
78
- */const o={attribute:true,type:String,converter:u,reflect:false,hasChanged:f},r=(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(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)}
377
+ */
378
+ const o = {
379
+ attribute: true,
380
+ type: String,
381
+ converter: u,
382
+ reflect: false,
383
+ hasChanged: f
384
+ },
385
+ r = (t = o, e, r) => {
386
+ const {
387
+ kind: n,
388
+ metadata: i
389
+ } = r;
390
+ let s = globalThis.litPropertyMetadata.get(i);
391
+ 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) {
392
+ const {
393
+ name: o
394
+ } = r;
395
+ return {
396
+ set(r) {
397
+ const n = e.get.call(this);
398
+ e.set.call(this, r), this.requestUpdate(o, n, t);
399
+ },
400
+ init(e) {
401
+ return void 0 !== e && this.C(o, void 0, t, e), e;
402
+ }
403
+ };
404
+ }
405
+ if ("setter" === n) {
406
+ const {
407
+ name: o
408
+ } = r;
409
+ return function (r) {
410
+ const n = this[o];
411
+ e.call(this, r), this.requestUpdate(o, n, t);
412
+ };
413
+ }
414
+ throw Error("Unsupported decorator location: " + n);
415
+ };
416
+ function n(t) {
417
+ return (e, o) => "object" == typeof o ? r(t, e, o) : ((t, e, o) => {
418
+ const r = e.hasOwnProperty(o);
419
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
420
+ })(t, e, o);
421
+ }
79
422
 
80
423
  /**
81
424
  * @license
82
425
  * Copyright 2017 Google LLC
83
426
  * SPDX-License-Identifier: BSD-3-Clause
84
427
  */
85
- const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
428
+ const e$1 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
86
429
 
87
430
  /**
88
431
  * @license
89
432
  * Copyright 2017 Google LLC
90
433
  * SPDX-License-Identifier: BSD-3-Clause
91
- */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)}})}}
434
+ */
435
+ function e(e, r) {
436
+ return (n, s, i) => {
437
+ const o = t => t.renderRoot?.querySelector(e) ?? null;
438
+ return e$1(n, s, {
439
+ get() {
440
+ return o(this);
441
+ }
442
+ });
443
+ };
444
+ }
92
445
 
93
446
  var _M3eFabMenuItemElement_instances, _M3eFabMenuItemElement_clickHandler, _M3eFabMenuItemElement_handleClick;
94
447
  /**
@@ -137,194 +490,50 @@ var _M3eFabMenuItemElement_instances, _M3eFabMenuItemElement_clickHandler, _M3eF
137
490
  * @cssprop --m3e-fab-menu-item-icon-size - Size of the icon in the menu item.
138
491
  */
139
492
  let M3eFabMenuItemElement = class M3eFabMenuItemElement extends KeyboardClick(LinkButton(Disabled(AttachInternals(Role(LitElement, "menuitem"), true)))) {
140
- constructor() {
141
- super(...arguments);
142
- _M3eFabMenuItemElement_instances.add(this);
143
- /** @private */ _M3eFabMenuItemElement_clickHandler.set(this, (e) => __classPrivateFieldGet(this, _M3eFabMenuItemElement_instances, "m", _M3eFabMenuItemElement_handleClick).call(this, e));
144
- }
145
- /** The floating action button (FAB) menu to which this item belongs. */
146
- get menu() {
147
- return this.closest("m3e-fab-menu");
148
- }
149
- /** @inheritdoc */
150
- connectedCallback() {
151
- super.connectedCallback();
152
- this.addEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuItemElement_clickHandler, "f"));
153
- }
154
- /** @inheritdoc */
155
- disconnectedCallback() {
156
- super.disconnectedCallback();
157
- this.removeEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuItemElement_clickHandler, "f"));
158
- }
159
- /** @inheritdoc */
160
- firstUpdated(_changedProperties) {
161
- super.firstUpdated(_changedProperties);
162
- [this._elevation, this._focusRing, this._stateLayer, this._ripple].forEach((x) => x?.attach(this));
163
- }
164
- /** @inheritdoc */
165
- render() {
166
- return html `<div class="base">
167
- <m3e-elevation class="elevation" ?disabled="${this.disabled}"></m3e-elevation>
168
- <m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer>
169
- <m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring>
170
- <m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>
171
- <div class="touch" aria-hidden="true"></div>
172
- ${this[renderPseudoLink]()}
173
- <div class="wrapper">
174
- <slot class="icon" name="icon" aria-hidden="true"></slot>
175
- <div class="label"><slot></slot></div>
176
- </div>
177
- </div>`;
178
- }
493
+ constructor() {
494
+ super(...arguments);
495
+ _M3eFabMenuItemElement_instances.add(this);
496
+ /** @private */
497
+ _M3eFabMenuItemElement_clickHandler.set(this, e => __classPrivateFieldGet(this, _M3eFabMenuItemElement_instances, "m", _M3eFabMenuItemElement_handleClick).call(this, e));
498
+ }
499
+ /** The floating action button (FAB) menu to which this item belongs. */
500
+ get menu() {
501
+ return this.closest("m3e-fab-menu");
502
+ }
503
+ /** @inheritdoc */
504
+ connectedCallback() {
505
+ super.connectedCallback();
506
+ this.addEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuItemElement_clickHandler, "f"));
507
+ }
508
+ /** @inheritdoc */
509
+ disconnectedCallback() {
510
+ super.disconnectedCallback();
511
+ this.removeEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuItemElement_clickHandler, "f"));
512
+ }
513
+ /** @inheritdoc */
514
+ firstUpdated(_changedProperties) {
515
+ super.firstUpdated(_changedProperties);
516
+ [this._elevation, this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
517
+ }
518
+ /** @inheritdoc */
519
+ render() {
520
+ return html`<div class="base"><m3e-elevation class="elevation" ?disabled="${this.disabled}"></m3e-elevation><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div>${this[renderPseudoLink]()}<div class="wrapper"><slot class="icon" name="icon" aria-hidden="true"></slot><div class="label"><slot></slot></div></div></div>`;
521
+ }
179
522
  };
180
523
  _M3eFabMenuItemElement_clickHandler = new WeakMap();
181
524
  _M3eFabMenuItemElement_instances = new WeakSet();
182
525
  _M3eFabMenuItemElement_handleClick = function _M3eFabMenuItemElement_handleClick(e) {
183
- if (!e.defaultPrevented) {
184
- this.menu?.hide(true);
185
- }
526
+ if (!e.defaultPrevented) {
527
+ this.menu?.hide(true);
528
+ }
186
529
  };
187
530
  /** The styles of the element. */
188
- M3eFabMenuItemElement.styles = css `
189
- :host {
190
- display: inline-block;
191
- outline: none;
192
- user-select: none;
193
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
194
- }
195
- .base {
196
- box-sizing: border-box;
197
- vertical-align: middle;
198
- display: inline-flex;
199
- align-items: center;
200
- justify-content: center;
201
- position: relative;
202
- width: 100%;
203
- transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)};
204
- height: var(--m3e-fab-menu-item-height, 3.5rem);
205
- font-size: var(--m3e-fab-menu-item-font-size, ${DesignToken.typescale.standard.label.large.fontSize});
206
- font-weight: var(--m3e-fab-menu-item-font-weight, ${DesignToken.typescale.standard.label.large.fontWeight});
207
- line-height: var(--m3e-fab-menu-item-line-height, ${DesignToken.typescale.standard.label.large.lineHeight});
208
- letter-spacing: var(--m3e-fab-menu-item-tracking, ${DesignToken.typescale.standard.label.large.tracking});
209
- border-radius: var(--m3e-fab-menu-item-shape, ${DesignToken.shape.corner.full});
210
- }
211
- :host(:not(:disabled)) .label,
212
- :host(:not(:disabled)) .icon {
213
- color: var(--_fab-menu-item-color);
214
- }
215
- :host(:not(:disabled)) .base {
216
- background-color: var(--_fab-menu-item-container-color);
217
- --m3e-state-layer-hover-color: var(--_fab-menu-background-hover-color);
218
- --m3e-state-layer-focus-color: var(--_fab-menu-background-focus-color);
219
- --m3e-ripple-color: var(--_fab-menu-ripple-color);
220
- }
221
- :host(:disabled) .base {
222
- background-color: color-mix(
223
- in srgb,
224
- var(--m3e-fab-menu-item-disabled-container-color, ${DesignToken.color.onSurface})
225
- var(--m3e-fab-menu-item-disabled-container-opacity, 10%),
226
- transparent
227
- );
228
- }
229
- :host(:disabled) .label,
230
- :host(:disabled) .icon {
231
- color: color-mix(
232
- in srgb,
233
- var(--m3e-fab-menu-item-disabled-color, ${DesignToken.color.onSurface})
234
- var(--m3e-fab-menu-item-disabled-opacity, 38%),
235
- transparent
236
- );
237
- }
238
- .touch {
239
- position: absolute;
240
- height: 3rem;
241
- left: 0;
242
- right: 0;
243
- }
244
- .wrapper {
245
- width: 100%;
246
- overflow: hidden;
247
- display: inline-flex;
248
- align-items: center;
249
- padding-inline-start: var(--m3e-fab-menu-item-leading-space, 1.5rem);
250
- padding-inline-end: var(--m3e-fab-menu-item-trailing-space, 1.5rem);
251
- column-gap: var(--m3e-fab-menu-item-spacing, 0.5rem);
252
- }
253
- .label {
254
- justify-self: center;
255
- flex: 1 1 auto;
256
- text-align: center;
257
- white-space: nowrap;
258
- overflow: hidden;
259
- text-overflow: ellipsis;
260
- transition: ${unsafeCSS(`color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)};
261
- }
262
- .icon {
263
- font-size: var(--m3e-fab-menu-item-icon-size, 1.5rem);
264
- transition: ${unsafeCSS(`color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)};
265
- }
266
- :host(:not(:disabled)) {
267
- cursor: pointer;
268
- }
269
- ::slotted([slot="icon"]) {
270
- font-size: inherit !important;
271
- flex: none;
272
- }
273
- ::slotted(svg[slot="icon"]) {
274
- width: 1em;
275
- height: 1em;
276
- }
277
- a {
278
- all: unset;
279
- display: block;
280
- position: absolute;
281
- top: 0px;
282
- left: 0px;
283
- right: 0px;
284
- bottom: 0px;
285
- z-index: 1;
286
- }
287
- @media (prefers-reduced-motion) {
288
- .base,
289
- .label,
290
- .icon {
291
- transition: none;
292
- }
293
- }
294
- @media (forced-colors: active) {
295
- .base,
296
- .label,
297
- .icon {
298
- transition: none;
299
- }
300
- :host(:not(:disabled)) .base {
301
- background-color: Menu;
302
- }
303
- :host(:not(:disabled)) .label,
304
- :host(:not(:disabled)) .icon {
305
- color: MenuText;
306
- }
307
- :host(:disabled) .label,
308
- :host(:disabled) .icon {
309
- color: GrayText;
310
- }
311
- }
312
- `;
313
- __decorate([
314
- e(".elevation")
315
- ], M3eFabMenuItemElement.prototype, "_elevation", void 0);
316
- __decorate([
317
- e(".focus-ring")
318
- ], M3eFabMenuItemElement.prototype, "_focusRing", void 0);
319
- __decorate([
320
- e(".state-layer")
321
- ], M3eFabMenuItemElement.prototype, "_stateLayer", void 0);
322
- __decorate([
323
- e(".ripple")
324
- ], M3eFabMenuItemElement.prototype, "_ripple", void 0);
325
- M3eFabMenuItemElement = __decorate([
326
- t$1("m3e-fab-menu-item")
327
- ], M3eFabMenuItemElement);
531
+ M3eFabMenuItemElement.styles = css`:host { display: inline-block; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)}; height: var(--m3e-fab-menu-item-height, 3.5rem); font-size: var(--m3e-fab-menu-item-font-size, ${DesignToken.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-fab-menu-item-font-weight, ${DesignToken.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-fab-menu-item-line-height, ${DesignToken.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-fab-menu-item-tracking, ${DesignToken.typescale.standard.label.large.tracking}); border-radius: var(--m3e-fab-menu-item-shape, ${DesignToken.shape.corner.full}); } :host(:not(:disabled)) .label, :host(:not(:disabled)) .icon { color: var(--_fab-menu-item-color); } :host(:not(:disabled)) .base { background-color: var(--_fab-menu-item-container-color); --m3e-state-layer-hover-color: var(--_fab-menu-background-hover-color); --m3e-state-layer-focus-color: var(--_fab-menu-background-focus-color); --m3e-ripple-color: var(--_fab-menu-ripple-color); } :host(:disabled) .base { background-color: color-mix( in srgb, var(--m3e-fab-menu-item-disabled-container-color, ${DesignToken.color.onSurface}) var(--m3e-fab-menu-item-disabled-container-opacity, 10%), transparent ); } :host(:disabled) .label, :host(:disabled) .icon { color: color-mix( in srgb, var(--m3e-fab-menu-item-disabled-color, ${DesignToken.color.onSurface}) var(--m3e-fab-menu-item-disabled-opacity, 38%), transparent ); } .touch { position: absolute; height: 3rem; left: 0; right: 0; } .wrapper { width: 100%; overflow: hidden; display: inline-flex; align-items: center; padding-inline-start: var(--m3e-fab-menu-item-leading-space, 1.5rem); padding-inline-end: var(--m3e-fab-menu-item-trailing-space, 1.5rem); column-gap: var(--m3e-fab-menu-item-spacing, 0.5rem); } .label { justify-self: center; flex: 1 1 auto; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: ${unsafeCSS(`color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)}; } .icon { font-size: var(--m3e-fab-menu-item-icon-size, 1.5rem); transition: ${unsafeCSS(`color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)}; } :host(:not(:disabled)) { cursor: pointer; } ::slotted([slot="icon"]) { font-size: inherit !important; flex: none; } ::slotted(svg[slot="icon"]) { width: 1em; height: 1em; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (prefers-reduced-motion) { .base, .label, .icon { transition: none; } } @media (forced-colors: active) { .base, .label, .icon { transition: none; } :host(:not(:disabled)) .base { background-color: Menu; } :host(:not(:disabled)) .label, :host(:not(:disabled)) .icon { color: MenuText; } :host(:disabled) .label, :host(:disabled) .icon { color: GrayText; } }`;
532
+ __decorate([e(".elevation")], M3eFabMenuItemElement.prototype, "_elevation", void 0);
533
+ __decorate([e(".focus-ring")], M3eFabMenuItemElement.prototype, "_focusRing", void 0);
534
+ __decorate([e(".state-layer")], M3eFabMenuItemElement.prototype, "_stateLayer", void 0);
535
+ __decorate([e(".ripple")], M3eFabMenuItemElement.prototype, "_ripple", void 0);
536
+ M3eFabMenuItemElement = __decorate([t$1("m3e-fab-menu-item")], M3eFabMenuItemElement);
328
537
 
329
538
  var _M3eFabMenuElement_instances, _M3eFabMenuElement_fabTabIndex, _M3eFabMenuElement_trigger, _M3eFabMenuElement_anchoringCleanup, _M3eFabMenuElement_listManager, _M3eFabMenuElement_keyDownHandler, _M3eFabMenuElement_documentClickHandler, _M3eFabMenuElement_scrollController, _M3eFabMenuElement_toggleHandler, _M3eFabMenuElement_handleSlotChange, _M3eFabMenuElement_handleKeyDown, _M3eFabMenuElement_handleDocumentClick, _M3eFabMenuElement_attachFab, _M3eFabMenuElement_detachFab;
330
539
  /**
@@ -378,128 +587,137 @@ var _M3eFabMenuElement_instances, _M3eFabMenuElement_fabTabIndex, _M3eFabMenuEle
378
587
  * @cssprop --m3e-tertiary-fab-ripple-color - Ripple color for tertiary variant items.
379
588
  */
380
589
  let M3eFabMenuElement = class M3eFabMenuElement extends Role(LitElement, "menu") {
381
- constructor() {
382
- super(...arguments);
383
- _M3eFabMenuElement_instances.add(this);
384
- /** @private */ _M3eFabMenuElement_fabTabIndex.set(this, void 0);
385
- /** @private */ _M3eFabMenuElement_trigger.set(this, void 0);
386
- /** @private */ _M3eFabMenuElement_anchoringCleanup.set(this, void 0);
387
- /** @private */
388
- _M3eFabMenuElement_listManager.set(this, new RovingTabIndexManager()
389
- .withWrap()
390
- .withHomeAndEnd()
391
- .withVerticalOrientation());
392
- /** @private */ _M3eFabMenuElement_keyDownHandler.set(this, (e) => __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_handleKeyDown).call(this, e));
393
- /** @private */ _M3eFabMenuElement_documentClickHandler.set(this, (e) => __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_handleDocumentClick).call(this, e));
394
- /** @private */
395
- _M3eFabMenuElement_scrollController.set(this, new ScrollController(this, { target: null, callback: () => this.hide() }));
396
- /** @private */
397
- _M3eFabMenuElement_toggleHandler.set(this, (e) => {
398
- if (e.newState === "closed") {
399
- __classPrivateFieldGet(this, _M3eFabMenuElement_anchoringCleanup, "f")?.call(this);
400
- __classPrivateFieldSet(this, _M3eFabMenuElement_anchoringCleanup, undefined, "f");
401
- }
402
- else {
403
- setTimeout(() => {
404
- __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setActiveItem(__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").items.find((x) => !x.disabled));
405
- }, 40);
406
- }
407
- });
408
- /**
409
- * The appearance variant of the menu.
410
- * @default "primary"
411
- */
412
- this.variant = "primary";
413
- }
414
- /** Whether the menu is open. */
415
- get isOpen() {
416
- return __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f") !== undefined;
417
- }
418
- /**
419
- * Opens the menu.
420
- * @param {HTMLElement} trigger The element that triggered the menu.
421
- * @returns {Promise<void>} A `Promise` that resolves when the menu is opened.
422
- */
423
- async show(trigger) {
424
- if (__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f") && __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f") !== trigger) {
425
- this.hide();
426
- }
427
- __classPrivateFieldGet(this, _M3eFabMenuElement_anchoringCleanup, "f")?.call(this);
428
- __classPrivateFieldSet(this, _M3eFabMenuElement_anchoringCleanup, await positionAnchor(this, trigger, {
429
- position: M3eDirectionality.current === "ltr" ? "top-end" : "top-start",
430
- inline: true,
431
- shift: true,
432
- flip: true,
433
- offset: 8,
434
- }, (x, y, position) => {
435
- this.classList.toggle("-right", position.includes("end"));
436
- this.classList.toggle("-left", position.includes("start"));
437
- this.style.left = `${x}px`;
438
- this.style.top = `${y}px`;
439
- }), "f");
440
- this.showPopover();
441
- __classPrivateFieldSet(this, _M3eFabMenuElement_trigger, trigger, "f");
442
- __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f").ariaExpanded = "true";
443
- __classPrivateFieldGet(this, _M3eFabMenuElement_scrollController, "f").observe(__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f"));
444
- __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_attachFab).call(this);
445
- }
446
- /**
447
- * Hides the menu.
448
- * @param {boolean} [restoreFocus=false] A value indicating whether to restore focus to the menu's trigger.
449
- */
450
- hide(restoreFocus = false) {
590
+ constructor() {
591
+ super(...arguments);
592
+ _M3eFabMenuElement_instances.add(this);
593
+ /** @private */
594
+ _M3eFabMenuElement_fabTabIndex.set(this, void 0);
595
+ /** @private */
596
+ _M3eFabMenuElement_trigger.set(this, void 0);
597
+ /** @private */
598
+ _M3eFabMenuElement_anchoringCleanup.set(this, void 0);
599
+ /** @private */
600
+ _M3eFabMenuElement_listManager.set(this, new RovingTabIndexManager().withWrap().withHomeAndEnd().withVerticalOrientation());
601
+ /** @private */
602
+ _M3eFabMenuElement_keyDownHandler.set(this, e => __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_handleKeyDown).call(this, e));
603
+ /** @private */
604
+ _M3eFabMenuElement_documentClickHandler.set(this, e => __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_handleDocumentClick).call(this, e));
605
+ /** @private */
606
+ _M3eFabMenuElement_scrollController.set(this, new ScrollController(this, {
607
+ target: null,
608
+ callback: () => this.hide()
609
+ }));
610
+ /** @private */
611
+ _M3eFabMenuElement_toggleHandler.set(this, e => {
612
+ if (e.newState === "closed") {
451
613
  __classPrivateFieldGet(this, _M3eFabMenuElement_anchoringCleanup, "f")?.call(this);
452
614
  __classPrivateFieldSet(this, _M3eFabMenuElement_anchoringCleanup, undefined, "f");
453
- if (__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")) {
454
- __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f").ariaExpanded = "false";
455
- if (restoreFocus) {
456
- __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f").focus();
457
- }
458
- __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_detachFab).call(this);
459
- __classPrivateFieldGet(this, _M3eFabMenuElement_scrollController, "f").unobserve(__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f"));
460
- __classPrivateFieldSet(this, _M3eFabMenuElement_trigger, undefined, "f");
461
- }
462
- this.hidePopover();
463
- }
615
+ } else {
616
+ setTimeout(() => {
617
+ __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setActiveItem(__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").items.find(x => !x.disabled));
618
+ }, 40);
619
+ }
620
+ });
464
621
  /**
465
- * Toggles the menu.
466
- * @param {HTMLElement} trigger The element that triggered the menu.
467
- * @returns {Promise<void>} A `Promise` that resolves when the menu is opened or closed.
622
+ * The appearance variant of the menu.
623
+ * @default "primary"
468
624
  */
469
- async toggle(trigger) {
470
- if (__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")) {
471
- this.hide();
472
- }
473
- else {
474
- await this.show(trigger);
475
- }
476
- }
477
- /** @inheritdoc */
478
- connectedCallback() {
479
- super.connectedCallback();
480
- this.tabIndex = -1;
481
- this.setAttribute("popover", "manual");
482
- this.classList.add("-no-animate");
483
- this.addEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
484
- this.addEventListener("toggle", __classPrivateFieldGet(this, _M3eFabMenuElement_toggleHandler, "f"));
485
- document.addEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuElement_documentClickHandler, "f"));
625
+ this.variant = "primary";
626
+ }
627
+ /** Whether the menu is open. */
628
+ get isOpen() {
629
+ return __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f") !== undefined;
630
+ }
631
+ /**
632
+ * Opens the menu.
633
+ * @param {HTMLElement} trigger The element that triggered the menu.
634
+ * @returns {Promise<void>} A `Promise` that resolves when the menu is opened.
635
+ */
636
+ async show(trigger) {
637
+ if (__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f") && __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f") !== trigger) {
638
+ this.hide();
486
639
  }
487
- /** @inheritdoc */
488
- disconnectedCallback() {
489
- super.disconnectedCallback();
490
- this.removeEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
491
- this.removeEventListener("toggle", __classPrivateFieldGet(this, _M3eFabMenuElement_toggleHandler, "f"));
492
- document.removeEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuElement_documentClickHandler, "f"));
640
+ __classPrivateFieldGet(this, _M3eFabMenuElement_anchoringCleanup, "f")?.call(this);
641
+ __classPrivateFieldSet(this, _M3eFabMenuElement_anchoringCleanup, await positionAnchor(this, trigger, {
642
+ position: "top-end",
643
+ inline: true,
644
+ shift: true,
645
+ flip: true,
646
+ offset: 8
647
+ }, (x, y, position) => {
648
+ this.classList.toggle("-right", position.includes("end"));
649
+ this.classList.toggle("-left", position.includes("start"));
650
+ if (M3eDirectionality.current === "rtl") {
651
+ this.style.right = `${window.innerWidth - x - this.clientWidth}px`;
652
+ this.style.left = "";
653
+ } else {
654
+ this.style.left = `${x}px`;
655
+ this.style.right = "";
656
+ }
657
+ this.style.top = `${y}px`;
658
+ }), "f");
659
+ this.showPopover();
660
+ __classPrivateFieldSet(this, _M3eFabMenuElement_trigger, trigger, "f");
661
+ __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f").ariaExpanded = "true";
662
+ __classPrivateFieldGet(this, _M3eFabMenuElement_scrollController, "f").observe(__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f"));
663
+ __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_attachFab).call(this);
664
+ }
665
+ /**
666
+ * Hides the menu.
667
+ * @param {boolean} [restoreFocus=false] A value indicating whether to restore focus to the menu's trigger.
668
+ */
669
+ hide(restoreFocus = false) {
670
+ __classPrivateFieldGet(this, _M3eFabMenuElement_anchoringCleanup, "f")?.call(this);
671
+ __classPrivateFieldSet(this, _M3eFabMenuElement_anchoringCleanup, undefined, "f");
672
+ if (__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")) {
673
+ __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f").ariaExpanded = "false";
674
+ if (restoreFocus) {
675
+ __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f").focus();
676
+ }
677
+ __classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_detachFab).call(this);
678
+ __classPrivateFieldGet(this, _M3eFabMenuElement_scrollController, "f").unobserve(__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f"));
679
+ __classPrivateFieldSet(this, _M3eFabMenuElement_trigger, undefined, "f");
493
680
  }
494
- /** @inheritdoc */
495
- firstUpdated(_changedProperties) {
496
- super.firstUpdated(_changedProperties);
497
- requestAnimationFrame(() => this.classList.remove("-no-animate"));
498
- }
499
- /** @inheritdoc */
500
- render() {
501
- return html `<div class="base"><slot @slotchange="${__classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_handleSlotChange)}"></slot></div>`;
681
+ this.hidePopover();
682
+ }
683
+ /**
684
+ * Toggles the menu.
685
+ * @param {HTMLElement} trigger The element that triggered the menu.
686
+ * @returns {Promise<void>} A `Promise` that resolves when the menu is opened or closed.
687
+ */
688
+ async toggle(trigger) {
689
+ if (__classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")) {
690
+ this.hide();
691
+ } else {
692
+ await this.show(trigger);
502
693
  }
694
+ }
695
+ /** @inheritdoc */
696
+ connectedCallback() {
697
+ super.connectedCallback();
698
+ this.tabIndex = -1;
699
+ this.setAttribute("popover", "manual");
700
+ this.classList.add("-no-animate");
701
+ this.addEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
702
+ this.addEventListener("toggle", __classPrivateFieldGet(this, _M3eFabMenuElement_toggleHandler, "f"));
703
+ document.addEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuElement_documentClickHandler, "f"));
704
+ }
705
+ /** @inheritdoc */
706
+ disconnectedCallback() {
707
+ super.disconnectedCallback();
708
+ this.removeEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
709
+ this.removeEventListener("toggle", __classPrivateFieldGet(this, _M3eFabMenuElement_toggleHandler, "f"));
710
+ document.removeEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuElement_documentClickHandler, "f"));
711
+ }
712
+ /** @inheritdoc */
713
+ firstUpdated(_changedProperties) {
714
+ super.firstUpdated(_changedProperties);
715
+ requestAnimationFrame(() => this.classList.remove("-no-animate"));
716
+ }
717
+ /** @inheritdoc */
718
+ render() {
719
+ return html`<div class="base"><slot @slotchange="${__classPrivateFieldGet(this, _M3eFabMenuElement_instances, "m", _M3eFabMenuElement_handleSlotChange)}"></slot></div>`;
720
+ }
503
721
  };
504
722
  _M3eFabMenuElement_fabTabIndex = new WeakMap();
505
723
  _M3eFabMenuElement_trigger = new WeakMap();
@@ -511,149 +729,60 @@ _M3eFabMenuElement_scrollController = new WeakMap();
511
729
  _M3eFabMenuElement_toggleHandler = new WeakMap();
512
730
  _M3eFabMenuElement_instances = new WeakSet();
513
731
  _M3eFabMenuElement_handleSlotChange = function _M3eFabMenuElement_handleSlotChange() {
514
- const { added } = __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setItems([...this.querySelectorAll("m3e-fab-menu-item")]);
515
- if (!__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").activeItem) {
516
- __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").updateActiveItem(added.find((x) => !x.disabled));
517
- }
732
+ const {
733
+ added
734
+ } = __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setItems([...this.querySelectorAll("m3e-fab-menu-item")]);
735
+ if (!__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").activeItem) {
736
+ __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").updateActiveItem(added.find(x => !x.disabled));
737
+ }
518
738
  };
519
739
  _M3eFabMenuElement_handleKeyDown = function _M3eFabMenuElement_handleKeyDown(e) {
520
- switch (e.key) {
521
- case "Tab":
522
- this.hide();
523
- break;
524
- case "Escape":
525
- if (!e.shiftKey && !e.ctrlKey) {
526
- this.hide(true);
527
- }
528
- break;
529
- default:
530
- __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").onKeyDown(e);
531
- break;
532
- }
740
+ switch (e.key) {
741
+ case "Tab":
742
+ this.hide();
743
+ break;
744
+ case "Escape":
745
+ if (!e.shiftKey && !e.ctrlKey) {
746
+ this.hide(true);
747
+ }
748
+ break;
749
+ default:
750
+ __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").onKeyDown(e);
751
+ break;
752
+ }
533
753
  };
534
754
  _M3eFabMenuElement_handleDocumentClick = function _M3eFabMenuElement_handleDocumentClick(e) {
535
- if (!e.composedPath().some((x) => x instanceof M3eFabMenuItemElement || x === __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f"))) {
536
- this.hide();
537
- }
755
+ if (!e.composedPath().some(x => x instanceof M3eFabMenuItemElement || x === __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f"))) {
756
+ this.hide();
757
+ }
538
758
  };
539
759
  _M3eFabMenuElement_attachFab = function _M3eFabMenuElement_attachFab() {
540
- const fab = __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")?.closest("m3e-fab");
541
- if (fab) {
542
- __classPrivateFieldSet(this, _M3eFabMenuElement_fabTabIndex, fab.tabIndex, "f");
543
- fab.addEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
544
- __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setItems([...__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").items, fab]);
545
- }
760
+ const fab = __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")?.closest("m3e-fab");
761
+ if (fab) {
762
+ __classPrivateFieldSet(this, _M3eFabMenuElement_fabTabIndex, fab.tabIndex, "f");
763
+ fab.addEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
764
+ __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setItems([...__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").items, fab]);
765
+ }
546
766
  };
547
767
  _M3eFabMenuElement_detachFab = function _M3eFabMenuElement_detachFab() {
548
- const fab = __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")?.closest("m3e-fab");
549
- if (fab) {
550
- if (__classPrivateFieldGet(this, _M3eFabMenuElement_fabTabIndex, "f") !== undefined) {
551
- fab.tabIndex = __classPrivateFieldGet(this, _M3eFabMenuElement_fabTabIndex, "f");
552
- }
553
- fab.removeEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
554
- __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setItems([...__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").items.filter((x) => x !== fab)]);
768
+ const fab = __classPrivateFieldGet(this, _M3eFabMenuElement_trigger, "f")?.closest("m3e-fab");
769
+ if (fab) {
770
+ if (__classPrivateFieldGet(this, _M3eFabMenuElement_fabTabIndex, "f") !== undefined) {
771
+ fab.tabIndex = __classPrivateFieldGet(this, _M3eFabMenuElement_fabTabIndex, "f");
555
772
  }
773
+ fab.removeEventListener("keydown", __classPrivateFieldGet(this, _M3eFabMenuElement_keyDownHandler, "f"));
774
+ __classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").setItems([...__classPrivateFieldGet(this, _M3eFabMenuElement_listManager, "f").items.filter(x => x !== fab)]);
775
+ }
556
776
  };
557
777
  /** The styles of the element. */
558
- M3eFabMenuElement.styles = css `
559
- :host {
560
- position: absolute;
561
- flex-direction: column;
562
- row-gap: var(--m3e-fab-menu-spacing, 0.25rem);
563
- padding: unset;
564
- margin: unset;
565
- border: unset;
566
- overflow: visible;
567
- max-width: var(--m3e-fab-menu-max-width, 17.5rem);
568
- opacity: 0;
569
- background-color: transparent;
570
- display: none;
571
- }
572
- :host(:not(.-no-animate)) {
573
- transition: ${unsafeCSS(`opacity ${DesignToken.motion.spring.fastEffects},
574
- transform ${DesignToken.motion.spring.fastSpatial},
575
- overlay ${DesignToken.motion.spring.fastEffects} allow-discrete,
576
- display ${DesignToken.motion.spring.fastEffects} allow-discrete`)};
577
- }
578
- .base {
579
- display: contents;
580
- }
581
- :host([variant="primary"]) .base {
582
- --_fab-menu-item-color: var(--m3e-primary-fab-color, ${DesignToken.color.onPrimaryContainer});
583
- --_fab-menu-item-container-color: var(--m3e-primary-fab-container-color, ${DesignToken.color.primaryContainer});
584
- --_fab-menu-background-hover-color: var(--m3e-primary-fab-hover-color, ${DesignToken.color.onPrimaryContainer});
585
- --_fab-menu-background-focus-color: var(--m3e-primary-fab-focus-color, ${DesignToken.color.onPrimaryContainer});
586
- --_fab-menu-ripple-color: var(--m3e-primary-fab-ripple-color, ${DesignToken.color.onPrimaryContainer});
587
- }
588
- :host([variant="secondary"]) .base {
589
- --_fab-menu-item-color: var(--m3e-secondary-fab-color, ${DesignToken.color.onSecondaryContainer});
590
- --_fab-menu-item-container-color: var(
591
- --m3e-secondary-fab-container-color,
592
- ${DesignToken.color.secondaryContainer}
593
- );
594
- --_fab-menu-background-hover-color: var(
595
- --m3e-secondary-fab-hover-color,
596
- ${DesignToken.color.onSecondaryContainer}
597
- );
598
- --_fab-menu-background-focus-color: var(
599
- --m3e-secondary-fab-focus-color,
600
- ${DesignToken.color.onSecondaryContainer}
601
- );
602
- --_fab-menu-ripple-color: var(--m3e-secondary-fab-ripple-color, ${DesignToken.color.onSecondaryContainer});
603
- }
604
- :host([variant="tertiary"]) .base {
605
- --_fab-menu-item-color: var(--m3e-tertiary-fab-color, ${DesignToken.color.onTertiaryContainer});
606
- --_fab-menu-item-container-color: var(--m3e-tertiary-fab-container-color, ${DesignToken.color.tertiaryContainer});
607
- --_fab-menu-background-hover-color: var(--m3e-tertiary-fab-hover-color, ${DesignToken.color.onTertiaryContainer});
608
- --_fab-menu-background-focus-color: var(--m3e-tertiary-fab-focus-color, ${DesignToken.color.onTertiaryContainer});
609
- --_fab-menu-ripple-color: var(--m3e-tertiary-fab-ripple-color, ${DesignToken.color.onTertiaryContainer});
610
- }
611
- :host {
612
- transform: scaleX(0.8);
613
- }
614
- :host(.-left) {
615
- align-items: flex-start;
616
- transform-origin: left;
617
- }
618
- :host(.-right) {
619
- align-items: flex-end;
620
- transform-origin: right;
621
- }
622
- :host(:popover-open) {
623
- transform: scaleX(1);
624
- display: inline-flex;
625
- opacity: 1;
626
- }
627
- :host::backdrop {
628
- background-color: transparent;
629
- }
630
- @starting-style {
631
- :host(:popover-open) {
632
- opacity: 0;
633
- }
634
- :host(:popover-open) {
635
- transform: scaleX(0.8);
636
- }
637
- }
638
- @media (prefers-reduced-motion) {
639
- :host(:not(.-no-animate)) {
640
- transition: none;
641
- }
642
- }
643
- @media (forced-colors: active) {
644
- :host {
645
- border-radius: ${DesignToken.shape.corner.medium};
646
- border: 1px solid MenuText;
647
- background-color: Menu;
648
- }
649
- }
650
- `;
651
- __decorate([
652
- n({ reflect: true })
653
- ], M3eFabMenuElement.prototype, "variant", void 0);
654
- M3eFabMenuElement = __decorate([
655
- t$1("m3e-fab-menu")
656
- ], M3eFabMenuElement);
778
+ M3eFabMenuElement.styles = css`:host { position: absolute; flex-direction: column; row-gap: var(--m3e-fab-menu-spacing, 0.25rem); padding: unset; margin: unset; border: unset; overflow: visible; max-width: var(--m3e-fab-menu-max-width, 17.5rem); opacity: 0; background-color: transparent; display: none; } :host(:not(.-no-animate)) { transition: ${unsafeCSS(`opacity ${DesignToken.motion.spring.fastEffects},
779
+ transform ${DesignToken.motion.spring.fastSpatial},
780
+ overlay ${DesignToken.motion.spring.fastEffects} allow-discrete,
781
+ display ${DesignToken.motion.spring.fastEffects} allow-discrete`)}; } .base { display: contents; } :host([variant="primary"]) .base { --_fab-menu-item-color: var(--m3e-primary-fab-color, ${DesignToken.color.onPrimaryContainer}); --_fab-menu-item-container-color: var(--m3e-primary-fab-container-color, ${DesignToken.color.primaryContainer}); --_fab-menu-background-hover-color: var(--m3e-primary-fab-hover-color, ${DesignToken.color.onPrimaryContainer}); --_fab-menu-background-focus-color: var(--m3e-primary-fab-focus-color, ${DesignToken.color.onPrimaryContainer}); --_fab-menu-ripple-color: var(--m3e-primary-fab-ripple-color, ${DesignToken.color.onPrimaryContainer}); } :host([variant="secondary"]) .base { --_fab-menu-item-color: var(--m3e-secondary-fab-color, ${DesignToken.color.onSecondaryContainer}); --_fab-menu-item-container-color: var( --m3e-secondary-fab-container-color, ${DesignToken.color.secondaryContainer} ); --_fab-menu-background-hover-color: var( --m3e-secondary-fab-hover-color, ${DesignToken.color.onSecondaryContainer} ); --_fab-menu-background-focus-color: var( --m3e-secondary-fab-focus-color, ${DesignToken.color.onSecondaryContainer} ); --_fab-menu-ripple-color: var(--m3e-secondary-fab-ripple-color, ${DesignToken.color.onSecondaryContainer}); } :host([variant="tertiary"]) .base { --_fab-menu-item-color: var(--m3e-tertiary-fab-color, ${DesignToken.color.onTertiaryContainer}); --_fab-menu-item-container-color: var(--m3e-tertiary-fab-container-color, ${DesignToken.color.tertiaryContainer}); --_fab-menu-background-hover-color: var(--m3e-tertiary-fab-hover-color, ${DesignToken.color.onTertiaryContainer}); --_fab-menu-background-focus-color: var(--m3e-tertiary-fab-focus-color, ${DesignToken.color.onTertiaryContainer}); --_fab-menu-ripple-color: var(--m3e-tertiary-fab-ripple-color, ${DesignToken.color.onTertiaryContainer}); } :host { transform: scaleX(0.8); } :host(.-left) { align-items: flex-start; transform-origin: left; } :host(.-right) { align-items: flex-end; transform-origin: right; } :host(:popover-open) { transform: scaleX(1); display: inline-flex; opacity: 1; } :host::backdrop { background-color: transparent; } @starting-style { :host(:popover-open) { opacity: 0; } :host(:popover-open) { transform: scaleX(0.8); } } @media (prefers-reduced-motion) { :host(:not(.-no-animate)) { transition: none; } } @media (forced-colors: active) { :host { border-radius: ${DesignToken.shape.corner.medium}; border: 1px solid MenuText; background-color: Menu; } }`;
782
+ __decorate([n({
783
+ reflect: true
784
+ })], M3eFabMenuElement.prototype, "variant", void 0);
785
+ M3eFabMenuElement = __decorate([t$1("m3e-fab-menu")], M3eFabMenuElement);
657
786
 
658
787
  var _M3eFabMenuTriggerElement_instances, _M3eFabMenuTriggerElement_clickHandler, _M3eFabMenuTriggerElement_handleClick;
659
788
  /**
@@ -680,73 +809,65 @@ var _M3eFabMenuTriggerElement_instances, _M3eFabMenuTriggerElement_clickHandler,
680
809
  * @tag m3e-fab-menu-trigger
681
810
  */
682
811
  let M3eFabMenuTriggerElement = class M3eFabMenuTriggerElement extends HtmlFor(LitElement) {
683
- constructor() {
684
- super(...arguments);
685
- _M3eFabMenuTriggerElement_instances.add(this);
686
- /** @private */ _M3eFabMenuTriggerElement_clickHandler.set(this, async (e) => __classPrivateFieldGet(this, _M3eFabMenuTriggerElement_instances, "m", _M3eFabMenuTriggerElement_handleClick).call(this, e));
687
- }
688
- /** The menu triggered by the element. */
689
- get menu() {
690
- return this.control instanceof M3eFabMenuElement ? this.control : null;
691
- }
692
- /** @inheritdoc */
693
- connectedCallback() {
694
- super.connectedCallback();
695
- this.parentElement?.addEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuTriggerElement_clickHandler, "f"));
696
- }
697
- /** @inheritdoc */
698
- disconnectedCallback() {
699
- super.disconnectedCallback();
700
- this.parentElement?.removeEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuTriggerElement_clickHandler, "f"));
701
- }
702
- /** @inheritdoc */
703
- attach(control) {
704
- super.attach(control);
705
- if (control instanceof M3eFabMenuElement) {
706
- if (this.parentElement) {
707
- this.parentElement.ariaHasPopup = "menu";
708
- this.parentElement.ariaExpanded = "false";
709
- if (control.id) {
710
- addAriaReferencedId(this.parentElement, "aria-controls", control.id);
711
- }
712
- }
812
+ constructor() {
813
+ super(...arguments);
814
+ _M3eFabMenuTriggerElement_instances.add(this);
815
+ /** @private */
816
+ _M3eFabMenuTriggerElement_clickHandler.set(this, async e => __classPrivateFieldGet(this, _M3eFabMenuTriggerElement_instances, "m", _M3eFabMenuTriggerElement_handleClick).call(this, e));
817
+ }
818
+ /** The menu triggered by the element. */
819
+ get menu() {
820
+ return this.control instanceof M3eFabMenuElement ? this.control : null;
821
+ }
822
+ /** @inheritdoc */
823
+ connectedCallback() {
824
+ super.connectedCallback();
825
+ this.parentElement?.addEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuTriggerElement_clickHandler, "f"));
826
+ }
827
+ /** @inheritdoc */
828
+ disconnectedCallback() {
829
+ super.disconnectedCallback();
830
+ this.parentElement?.removeEventListener("click", __classPrivateFieldGet(this, _M3eFabMenuTriggerElement_clickHandler, "f"));
831
+ }
832
+ /** @inheritdoc */
833
+ attach(control) {
834
+ super.attach(control);
835
+ if (control instanceof M3eFabMenuElement) {
836
+ if (this.parentElement) {
837
+ this.parentElement.ariaHasPopup = "menu";
838
+ this.parentElement.ariaExpanded = "false";
839
+ if (control.id) {
840
+ addAriaReferencedId(this.parentElement, "aria-controls", control.id);
713
841
  }
842
+ }
714
843
  }
715
- /** @inheritdoc */
716
- detach() {
717
- if (this.parentElement) {
718
- this.parentElement.ariaHasPopup = null;
719
- this.parentElement.ariaExpanded = null;
720
- if (this.control?.id) {
721
- removeAriaReferencedId(this.parentElement, "aria-controls", this.control.id);
722
- }
723
- }
724
- super.detach();
725
- }
726
- /** @inheritdoc */
727
- render() {
728
- return html `<slot></slot>`;
844
+ }
845
+ /** @inheritdoc */
846
+ detach() {
847
+ if (this.parentElement) {
848
+ this.parentElement.ariaHasPopup = null;
849
+ this.parentElement.ariaExpanded = null;
850
+ if (this.control?.id) {
851
+ removeAriaReferencedId(this.parentElement, "aria-controls", this.control.id);
852
+ }
729
853
  }
854
+ super.detach();
855
+ }
856
+ /** @inheritdoc */
857
+ render() {
858
+ return html`<slot></slot>`;
859
+ }
730
860
  };
731
861
  _M3eFabMenuTriggerElement_clickHandler = new WeakMap();
732
862
  _M3eFabMenuTriggerElement_instances = new WeakSet();
733
863
  _M3eFabMenuTriggerElement_handleClick = function _M3eFabMenuTriggerElement_handleClick(e) {
734
- if (!e.defaultPrevented && this.parentElement) {
735
- this.menu?.toggle(this.parentElement);
736
- }
864
+ if (!e.defaultPrevented && this.parentElement) {
865
+ this.menu?.toggle(this.parentElement);
866
+ }
737
867
  };
738
868
  /** The styles of the element. */
739
- M3eFabMenuTriggerElement.styles = css `
740
- :host {
741
- display: contents;
742
- }
743
- ::slotted(.material-icons) {
744
- font-size: inherit !important;
745
- }
746
- `;
747
- M3eFabMenuTriggerElement = __decorate([
748
- t$1("m3e-fab-menu-trigger")
749
- ], M3eFabMenuTriggerElement);
869
+ M3eFabMenuTriggerElement.styles = css`:host { display: contents; } ::slotted(.material-icons) { font-size: inherit !important; }`;
870
+ M3eFabMenuTriggerElement = __decorate([t$1("m3e-fab-menu-trigger")], M3eFabMenuTriggerElement);
750
871
 
751
872
  export { M3eFabMenuElement, M3eFabMenuItemElement, M3eFabMenuTriggerElement };
752
873
  //# sourceMappingURL=index.js.map