@m3e/card 1.0.6 → 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
@@ -19,26 +19,24 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
19
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
20
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
21
  PERFORMANCE OF THIS SOFTWARE.
22
- ***************************************************************************** */
23
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
-
25
-
26
- function __decorate(decorators, target, key, desc) {
27
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
- 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;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- }
32
-
33
- function __classPrivateFieldGet(receiver, state, kind, f) {
34
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
35
- 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");
36
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
37
- }
38
-
39
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
40
- var e = new Error(message);
41
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
22
+ ***************************************************************************** */
23
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
+
25
+ function __decorate(decorators, target, key, desc) {
26
+ var c = arguments.length,
27
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
28
+ d;
29
+ 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;
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ }
32
+ function __classPrivateFieldGet(receiver, state, kind, f) {
33
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
34
+ 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");
35
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
36
+ }
37
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
38
+ var e = new Error(message);
39
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
42
40
  };
43
41
 
44
42
  /**
@@ -46,47 +44,403 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
46
44
  * Copyright 2017 Google LLC
47
45
  * SPDX-License-Identifier: BSD-3-Clause
48
46
  */
49
- const t$1=t=>(e,o)=>{ void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);};
47
+ const t$1 = t => (e, o) => {
48
+ void 0 !== o ? o.addInitializer(() => {
49
+ customElements.define(t, e);
50
+ }) : customElements.define(t, e);
51
+ };
50
52
 
51
53
  /**
52
54
  * @license
53
55
  * Copyright 2019 Google LLC
54
56
  * SPDX-License-Identifier: BSD-3-Clause
55
57
  */
56
- 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;
58
+ const t = globalThis,
59
+ e$3 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
60
+ s = Symbol(),
61
+ o$2 = new WeakMap();
62
+ let n$2 = class n {
63
+ constructor(t, e, o) {
64
+ if (this._$cssResult$ = true, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
65
+ this.cssText = t, this.t = e;
66
+ }
67
+ get styleSheet() {
68
+ let t = this.o;
69
+ const s = this.t;
70
+ if (e$3 && void 0 === t) {
71
+ const e = void 0 !== s && 1 === s.length;
72
+ e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
73
+ }
74
+ return t;
75
+ }
76
+ toString() {
77
+ return this.cssText;
78
+ }
79
+ };
80
+ const r$2 = t => new n$2("string" == typeof t ? t : t + "", void 0, s),
81
+ S = (s, o) => {
82
+ if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
83
+ const o = document.createElement("style"),
84
+ n = t.litNonce;
85
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
86
+ }
87
+ },
88
+ c$1 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
89
+ let e = "";
90
+ for (const s of t.cssRules) e += s.cssText;
91
+ return r$2(e);
92
+ })(t) : t;
57
93
 
58
94
  /**
59
95
  * @license
60
96
  * Copyright 2017 Google LLC
61
97
  * SPDX-License-Identifier: BSD-3-Clause
62
- */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");
98
+ */
99
+ const {
100
+ is: i,
101
+ defineProperty: e$2,
102
+ getOwnPropertyDescriptor: h,
103
+ getOwnPropertyNames: r$1,
104
+ getOwnPropertySymbols: o$1,
105
+ getPrototypeOf: n$1
106
+ } = Object,
107
+ a = globalThis,
108
+ c = a.trustedTypes,
109
+ l = c ? c.emptyScript : "",
110
+ p = a.reactiveElementPolyfillSupport,
111
+ d = (t, s) => t,
112
+ u = {
113
+ toAttribute(t, s) {
114
+ switch (s) {
115
+ case Boolean:
116
+ t = t ? l : null;
117
+ break;
118
+ case Object:
119
+ case Array:
120
+ t = null == t ? t : JSON.stringify(t);
121
+ }
122
+ return t;
123
+ },
124
+ fromAttribute(t, s) {
125
+ let i = t;
126
+ switch (s) {
127
+ case Boolean:
128
+ i = null !== t;
129
+ break;
130
+ case Number:
131
+ i = null === t ? null : Number(t);
132
+ break;
133
+ case Object:
134
+ case Array:
135
+ try {
136
+ i = JSON.parse(t);
137
+ } catch (t) {
138
+ i = null;
139
+ }
140
+ }
141
+ return i;
142
+ }
143
+ },
144
+ f = (t, s) => !i(t, s),
145
+ b = {
146
+ attribute: true,
147
+ type: String,
148
+ converter: u,
149
+ reflect: false,
150
+ useDefault: false,
151
+ hasChanged: f
152
+ };
153
+ Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
154
+ class y extends HTMLElement {
155
+ static addInitializer(t) {
156
+ this._$Ei(), (this.l ??= []).push(t);
157
+ }
158
+ static get observedAttributes() {
159
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
160
+ }
161
+ static createProperty(t, s = b) {
162
+ 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) {
163
+ const i = Symbol(),
164
+ h = this.getPropertyDescriptor(t, i, s);
165
+ void 0 !== h && e$2(this.prototype, t, h);
166
+ }
167
+ }
168
+ static getPropertyDescriptor(t, s, i) {
169
+ const {
170
+ get: e,
171
+ set: r
172
+ } = h(this.prototype, t) ?? {
173
+ get() {
174
+ return this[s];
175
+ },
176
+ set(t) {
177
+ this[s] = t;
178
+ }
179
+ };
180
+ return {
181
+ get: e,
182
+ set(s) {
183
+ const h = e?.call(this);
184
+ r?.call(this, s), this.requestUpdate(t, h, i);
185
+ },
186
+ configurable: true,
187
+ enumerable: true
188
+ };
189
+ }
190
+ static getPropertyOptions(t) {
191
+ return this.elementProperties.get(t) ?? b;
192
+ }
193
+ static _$Ei() {
194
+ if (this.hasOwnProperty(d("elementProperties"))) return;
195
+ const t = n$1(this);
196
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
197
+ }
198
+ static finalize() {
199
+ if (this.hasOwnProperty(d("finalized"))) return;
200
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
201
+ const t = this.properties,
202
+ s = [...r$1(t), ...o$1(t)];
203
+ for (const i of s) this.createProperty(i, t[i]);
204
+ }
205
+ const t = this[Symbol.metadata];
206
+ if (null !== t) {
207
+ const s = litPropertyMetadata.get(t);
208
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
209
+ }
210
+ this._$Eh = new Map();
211
+ for (const [t, s] of this.elementProperties) {
212
+ const i = this._$Eu(t, s);
213
+ void 0 !== i && this._$Eh.set(i, t);
214
+ }
215
+ this.elementStyles = this.finalizeStyles(this.styles);
216
+ }
217
+ static finalizeStyles(s) {
218
+ const i = [];
219
+ if (Array.isArray(s)) {
220
+ const e = new Set(s.flat(1 / 0).reverse());
221
+ for (const s of e) i.unshift(c$1(s));
222
+ } else void 0 !== s && i.push(c$1(s));
223
+ return i;
224
+ }
225
+ static _$Eu(t, s) {
226
+ const i = s.attribute;
227
+ return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
228
+ }
229
+ constructor() {
230
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
231
+ }
232
+ _$Ev() {
233
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
234
+ }
235
+ addController(t) {
236
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
237
+ }
238
+ removeController(t) {
239
+ this._$EO?.delete(t);
240
+ }
241
+ _$E_() {
242
+ const t = new Map(),
243
+ s = this.constructor.elementProperties;
244
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
245
+ t.size > 0 && (this._$Ep = t);
246
+ }
247
+ createRenderRoot() {
248
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
249
+ return S(t, this.constructor.elementStyles), t;
250
+ }
251
+ connectedCallback() {
252
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
253
+ }
254
+ enableUpdating(t) {}
255
+ disconnectedCallback() {
256
+ this._$EO?.forEach(t => t.hostDisconnected?.());
257
+ }
258
+ attributeChangedCallback(t, s, i) {
259
+ this._$AK(t, i);
260
+ }
261
+ _$ET(t, s) {
262
+ const i = this.constructor.elementProperties.get(t),
263
+ e = this.constructor._$Eu(t, i);
264
+ if (void 0 !== e && true === i.reflect) {
265
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
266
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
267
+ }
268
+ }
269
+ _$AK(t, s) {
270
+ const i = this.constructor,
271
+ e = i._$Eh.get(t);
272
+ if (void 0 !== e && this._$Em !== e) {
273
+ const t = i.getPropertyOptions(e),
274
+ h = "function" == typeof t.converter ? {
275
+ fromAttribute: t.converter
276
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u;
277
+ this._$Em = e;
278
+ const r = h.fromAttribute(s, t.type);
279
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
280
+ }
281
+ }
282
+ requestUpdate(t, s, i) {
283
+ if (void 0 !== t) {
284
+ const e = this.constructor,
285
+ h = this[t];
286
+ 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;
287
+ this.C(t, s, i);
288
+ }
289
+ false === this.isUpdatePending && (this._$ES = this._$EP());
290
+ }
291
+ C(t, s, {
292
+ useDefault: i,
293
+ reflect: e,
294
+ wrapped: h
295
+ }, r) {
296
+ 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));
297
+ }
298
+ async _$EP() {
299
+ this.isUpdatePending = true;
300
+ try {
301
+ await this._$ES;
302
+ } catch (t) {
303
+ Promise.reject(t);
304
+ }
305
+ const t = this.scheduleUpdate();
306
+ return null != t && (await t), !this.isUpdatePending;
307
+ }
308
+ scheduleUpdate() {
309
+ return this.performUpdate();
310
+ }
311
+ performUpdate() {
312
+ if (!this.isUpdatePending) return;
313
+ if (!this.hasUpdated) {
314
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
315
+ for (const [t, s] of this._$Ep) this[t] = s;
316
+ this._$Ep = void 0;
317
+ }
318
+ const t = this.constructor.elementProperties;
319
+ if (t.size > 0) for (const [s, i] of t) {
320
+ const {
321
+ wrapped: t
322
+ } = i,
323
+ e = this[s];
324
+ true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
325
+ }
326
+ }
327
+ let t = false;
328
+ const s = this._$AL;
329
+ try {
330
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
331
+ } catch (s) {
332
+ throw t = false, this._$EM(), s;
333
+ }
334
+ t && this._$AE(s);
335
+ }
336
+ willUpdate(t) {}
337
+ _$AE(t) {
338
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
339
+ }
340
+ _$EM() {
341
+ this._$AL = new Map(), this.isUpdatePending = false;
342
+ }
343
+ get updateComplete() {
344
+ return this.getUpdateComplete();
345
+ }
346
+ getUpdateComplete() {
347
+ return this._$ES;
348
+ }
349
+ shouldUpdate(t) {
350
+ return true;
351
+ }
352
+ update(t) {
353
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
354
+ }
355
+ updated(t) {}
356
+ firstUpdated(t) {}
357
+ }
358
+ y.elementStyles = [], y.shadowRootOptions = {
359
+ mode: "open"
360
+ }, y[d("elementProperties")] = new Map(), y[d("finalized")] = new Map(), p?.({
361
+ ReactiveElement: y
362
+ }), (a.reactiveElementVersions ??= []).push("2.1.1");
63
363
 
64
364
  /**
65
365
  * @license
66
366
  * Copyright 2017 Google LLC
67
367
  * SPDX-License-Identifier: BSD-3-Clause
68
- */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)}
368
+ */
369
+ const o = {
370
+ attribute: true,
371
+ type: String,
372
+ converter: u,
373
+ reflect: false,
374
+ hasChanged: f
375
+ },
376
+ r = (t = o, e, r) => {
377
+ const {
378
+ kind: n,
379
+ metadata: i
380
+ } = r;
381
+ let s = globalThis.litPropertyMetadata.get(i);
382
+ 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) {
383
+ const {
384
+ name: o
385
+ } = r;
386
+ return {
387
+ set(r) {
388
+ const n = e.get.call(this);
389
+ e.set.call(this, r), this.requestUpdate(o, n, t);
390
+ },
391
+ init(e) {
392
+ return void 0 !== e && this.C(o, void 0, t, e), e;
393
+ }
394
+ };
395
+ }
396
+ if ("setter" === n) {
397
+ const {
398
+ name: o
399
+ } = r;
400
+ return function (r) {
401
+ const n = this[o];
402
+ e.call(this, r), this.requestUpdate(o, n, t);
403
+ };
404
+ }
405
+ throw Error("Unsupported decorator location: " + n);
406
+ };
407
+ function n(t) {
408
+ return (e, o) => "object" == typeof o ? r(t, e, o) : ((t, e, o) => {
409
+ const r = e.hasOwnProperty(o);
410
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
411
+ })(t, e, o);
412
+ }
69
413
 
70
414
  /**
71
415
  * @license
72
416
  * Copyright 2017 Google LLC
73
417
  * SPDX-License-Identifier: BSD-3-Clause
74
418
  */
75
- const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
419
+ const e$1 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
76
420
 
77
421
  /**
78
422
  * @license
79
423
  * Copyright 2017 Google LLC
80
424
  * SPDX-License-Identifier: BSD-3-Clause
81
- */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)}})}}
425
+ */
426
+ function e(e, r) {
427
+ return (n, s, i) => {
428
+ const o = t => t.renderRoot?.querySelector(e) ?? null;
429
+ return e$1(n, s, {
430
+ get() {
431
+ return o(this);
432
+ }
433
+ });
434
+ };
435
+ }
82
436
 
83
437
  /**
84
438
  * Component design tokens for `M3eCardElement`.
85
439
  * @internal
86
440
  */
87
441
  const CardToken = {
88
- padding: unsafeCSS("var(--m3e-card-padding, 1rem)"),
89
- shape: unsafeCSS(`var(--m3e-card-shape, ${DesignToken.shape.corner.medium});`),
442
+ padding: unsafeCSS("var(--m3e-card-padding, 1rem)"),
443
+ shape: unsafeCSS(`var(--m3e-card-shape, ${DesignToken.shape.corner.medium});`)
90
444
  };
91
445
 
92
446
  /**
@@ -94,359 +448,135 @@ const CardToken = {
94
448
  * @internal
95
449
  */
96
450
  const CardVariantToken = {
97
- filled: {
98
- textColor: unsafeCSS(`var(--m3e-filled-card-text-color, ${DesignToken.color.onSurface})`),
99
- containerColor: unsafeCSS(`var(--m3e-filled-card-container-color, ${DesignToken.color.surfaceContainerHighest})`),
100
- containerElevation: unsafeCSS(`var(--m3e-filled-card-container-elevation, ${DesignToken.elevation.level0})`),
101
- disabled: {
102
- textColor: unsafeCSS(`var(--m3e-filled-card-disabled-text-color, ${DesignToken.color.onSurface})`),
103
- textOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-text-opacity, 38%)`),
104
- imageOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-image-opacity, 38%)`),
105
- containerColor: unsafeCSS(`var(--m3e-filled-card-disabled-container-color, ${DesignToken.color.surfaceVariant})`),
106
- containerElevation: unsafeCSS(`var(--m3e-filled-card-disabled-container-elevation, ${DesignToken.elevation.level0})`),
107
- containerElevationColor: unsafeCSS(`var(--m3e-filled-card-disabled-container-elevation-color, ${DesignToken.color.onSurface})`),
108
- containerElevationOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-container-elevation-opacity, 38%)`),
109
- containerOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-container-opacity, 38%)`),
110
- },
111
- hover: {
112
- textColor: unsafeCSS(`var(--m3e-filled-card-hover-text-color, ${DesignToken.color.onSurface})`),
113
- stateLayerColor: unsafeCSS(`var(--m3e-filled-card-hover-state-layer-color, ${DesignToken.color.onSurface})`),
114
- stateLayerOpacity: unsafeCSS(`var(--m3e-filled-card-hover-state-layer-opacity, ${DesignToken.state.hoverStateLayerOpacity})`),
115
- containerElevation: unsafeCSS(`var(--m3e-filled-card-hover-container-elevation, ${DesignToken.elevation.level1})`),
116
- },
117
- focus: {
118
- textColor: unsafeCSS(`var(--m3e-filled-card-focus-text-color, ${DesignToken.color.onSurface})`),
119
- stateLayerColor: unsafeCSS(`var(--m3e-filled-card-focus-state-layer-color, ${DesignToken.color.onSurface})`),
120
- stateLayerOpacity: unsafeCSS(`var(--m3e-filled-card-focus-state-layer-opacity, ${DesignToken.state.focusStateLayerOpacity})`),
121
- containerElevation: unsafeCSS(`var(--m3e-filled-card-focus-container-elevation, ${DesignToken.elevation.level0})`),
122
- },
123
- pressed: {
124
- textColor: unsafeCSS(`var(--m3e-filled-card-pressed-text-color, ${DesignToken.color.onSurface})`),
125
- stateLayerColor: unsafeCSS(`var(--m3e-filled-card-pressed-state-layer-color, ${DesignToken.color.onSurface})`),
126
- stateLayerOpacity: unsafeCSS(`var(--m3e-filled-card-pressed-state-layer-opacity, ${DesignToken.state.pressedStateLayerOpacity})`),
127
- containerElevation: unsafeCSS(`var(--m3e-filled-card-pressed-container-elevation, ${DesignToken.elevation.level0})`),
128
- },
451
+ filled: {
452
+ textColor: unsafeCSS(`var(--m3e-filled-card-text-color, ${DesignToken.color.onSurface})`),
453
+ containerColor: unsafeCSS(`var(--m3e-filled-card-container-color, ${DesignToken.color.surfaceContainerHighest})`),
454
+ containerElevation: unsafeCSS(`var(--m3e-filled-card-container-elevation, ${DesignToken.elevation.level0})`),
455
+ disabled: {
456
+ textColor: unsafeCSS(`var(--m3e-filled-card-disabled-text-color, ${DesignToken.color.onSurface})`),
457
+ textOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-text-opacity, 38%)`),
458
+ imageOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-image-opacity, 38%)`),
459
+ containerColor: unsafeCSS(`var(--m3e-filled-card-disabled-container-color, ${DesignToken.color.surfaceVariant})`),
460
+ containerElevation: unsafeCSS(`var(--m3e-filled-card-disabled-container-elevation, ${DesignToken.elevation.level0})`),
461
+ containerElevationColor: unsafeCSS(`var(--m3e-filled-card-disabled-container-elevation-color, ${DesignToken.color.onSurface})`),
462
+ containerElevationOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-container-elevation-opacity, 38%)`),
463
+ containerOpacity: unsafeCSS(`var(--m3e-filled-card-disabled-container-opacity, 38%)`)
129
464
  },
130
- elevated: {
131
- textColor: unsafeCSS(`var(--m3e-elevated-card-text-color, ${DesignToken.color.onSurface})`),
132
- containerColor: unsafeCSS(`var(--m3e-elevated-card-container-color, ${DesignToken.color.surfaceContainerLow})`),
133
- containerElevation: unsafeCSS(`var(--m3e-elevated-card-container-elevation, ${DesignToken.elevation.level1})`),
134
- disabled: {
135
- textColor: unsafeCSS(`var(--m3e-elevated-card-disabled-text-color, ${DesignToken.color.onSurface})`),
136
- textOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-text-opacity, 38%)`),
137
- imageOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-image-opacity, 38%)`),
138
- containerColor: unsafeCSS(`var(--m3e-elevated-card-disabled-container-color, ${DesignToken.color.surface})`),
139
- containerElevation: unsafeCSS(`var(--m3e-elevated-card-disabled-container-elevation, ${DesignToken.elevation.level1})`),
140
- containerElevationColor: unsafeCSS(`var(--m3e-elevated-card-disabled-container-elevation-color, ${DesignToken.color.onSurface})`),
141
- containerElevationOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-container-elevation-opacity, 38%)`),
142
- containerOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-container-opacity, 38%)`),
143
- },
144
- hover: {
145
- textColor: unsafeCSS(`var(--m3e-elevated-card-hover-text-color, ${DesignToken.color.onSurface})`),
146
- stateLayerColor: unsafeCSS(`var(--m3e-elevated-card-hover-state-layer-color, ${DesignToken.color.onSurface})`),
147
- stateLayerOpacity: unsafeCSS(`var(--m3e-elevated-card-hover-state-layer-opacity, ${DesignToken.state.hoverStateLayerOpacity})`),
148
- containerElevation: unsafeCSS(`var(--m3e-elevated-card-hover-container-elevation, ${DesignToken.elevation.level2})`),
149
- },
150
- focus: {
151
- textColor: unsafeCSS(`var(--m3e-elevated-card-focus-text-color, ${DesignToken.color.onSurface})`),
152
- stateLayerColor: unsafeCSS(`var(--m3e-elevated-card-focus-state-layer-color, ${DesignToken.color.onSurface})`),
153
- stateLayerOpacity: unsafeCSS(`var(--m3e-elevated-card-focus-state-layer-opacity, ${DesignToken.state.focusStateLayerOpacity})`),
154
- containerElevation: unsafeCSS(`var(--m3e-elevated-card-focus-container-elevation, ${DesignToken.elevation.level1})`),
155
- },
156
- pressed: {
157
- textColor: unsafeCSS(`var(--m3e-elevated-card-pressed-text-color, ${DesignToken.color.onSurface})`),
158
- stateLayerColor: unsafeCSS(`var(--m3e-elevated-card-pressed-state-layer-color, ${DesignToken.color.onSurface})`),
159
- stateLayerOpacity: unsafeCSS(`var(--m3e-elevated-card-pressed-state-layer-opacity, ${DesignToken.state.pressedStateLayerOpacity})`),
160
- containerElevation: unsafeCSS(`var(--m3e-elevated-card-pressed-container-elevation, ${DesignToken.elevation.level1})`),
161
- },
465
+ hover: {
466
+ textColor: unsafeCSS(`var(--m3e-filled-card-hover-text-color, ${DesignToken.color.onSurface})`),
467
+ stateLayerColor: unsafeCSS(`var(--m3e-filled-card-hover-state-layer-color, ${DesignToken.color.onSurface})`),
468
+ stateLayerOpacity: unsafeCSS(`var(--m3e-filled-card-hover-state-layer-opacity, ${DesignToken.state.hoverStateLayerOpacity})`),
469
+ containerElevation: unsafeCSS(`var(--m3e-filled-card-hover-container-elevation, ${DesignToken.elevation.level1})`)
162
470
  },
163
- outlined: {
164
- textColor: unsafeCSS(`var(--m3e-outlined-card-text-color, ${DesignToken.color.onSurface})`),
165
- containerElevation: unsafeCSS(`var(--m3e-outlined-card-container-elevation, ${DesignToken.elevation.level0})`),
166
- outlineColor: unsafeCSS(`var(--m3e-outlined-card-outline-color, ${DesignToken.color.outlineVariant})`),
167
- outlineThickness: unsafeCSS("var(--m3e-outlined-card-outline-thickness, 1px)"),
168
- disabled: {
169
- textColor: unsafeCSS(`var(--m3e-outlined-card-disabled-text-color, ${DesignToken.color.onSurface})`),
170
- textOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-text-opacity, 38%)`),
171
- imageOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-image-opacity, 38%)`),
172
- containerElevation: unsafeCSS(`var(--m3e-outlined-card-disabled-container-elevation, ${DesignToken.elevation.level0})`),
173
- containerElevationColor: unsafeCSS(`var(--m3e-outlined-card-disabled-container-elevation-color, ${DesignToken.color.onSurface})`),
174
- containerElevationOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-container-elevation-opacity, 38%)`),
175
- outlineColor: unsafeCSS(`var(--m3e-outlined-card-disabled-outline-color, ${DesignToken.color.outline})`),
176
- outlineOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-outline-opacity, 12%)`),
177
- },
178
- hover: {
179
- textColor: unsafeCSS(`var(--m3e-outlined-card-hover-text-color, ${DesignToken.color.onSurface})`),
180
- stateLayerColor: unsafeCSS(`var(--m3e-outlined-card-hover-state-layer-color, ${DesignToken.color.onSurface})`),
181
- stateLayerOpacity: unsafeCSS(`var(--m3e-outlined-card-hover-state-layer-opacity, ${DesignToken.state.hoverStateLayerOpacity})`),
182
- containerElevation: unsafeCSS(`var(--m3e-outlined-card-hover-container-elevation, ${DesignToken.elevation.level1})`),
183
- outlineColor: unsafeCSS(`var(--m3e-outlined-card-hover-outline-color, ${DesignToken.color.outlineVariant})`),
184
- },
185
- focus: {
186
- textColor: unsafeCSS(`var(--m3e-outlined-card-focus-text-color, ${DesignToken.color.onSurface})`),
187
- stateLayerColor: unsafeCSS(`var(--m3e-outlined-card-focus-state-layer-color, ${DesignToken.color.onSurface})`),
188
- stateLayerOpacity: unsafeCSS(`var(--m3e-outlined-card-focus-state-layer-opacity, ${DesignToken.state.focusStateLayerOpacity})`),
189
- containerElevation: unsafeCSS(`var(--m3e-outlined-card-focus-container-elevation, ${DesignToken.elevation.level0})`),
190
- outlineColor: unsafeCSS(`var(--m3e-outlined-card-focus-outline-color, ${DesignToken.color.onSurface})`),
191
- },
192
- pressed: {
193
- textColor: unsafeCSS(`var(--m3e-outlined-card-pressed-text-color, ${DesignToken.color.onSurface})`),
194
- stateLayerColor: unsafeCSS(`var(--m3e-outlined-card-pressed-state-layer-color, ${DesignToken.color.onSurface})`),
195
- stateLayerOpacity: unsafeCSS(`var(--m3e-outlined-card-pressed-state-layer-opacity, ${DesignToken.state.pressedStateLayerOpacity})`),
196
- containerElevation: unsafeCSS(`var(--m3e-outlined-card-pressed-container-elevation, ${DesignToken.elevation.level0})`),
197
- outlineColor: unsafeCSS(`var(--m3e-outlined-card-pressed-outline-color, ${DesignToken.color.outlineVariant})`),
198
- },
471
+ focus: {
472
+ textColor: unsafeCSS(`var(--m3e-filled-card-focus-text-color, ${DesignToken.color.onSurface})`),
473
+ stateLayerColor: unsafeCSS(`var(--m3e-filled-card-focus-state-layer-color, ${DesignToken.color.onSurface})`),
474
+ stateLayerOpacity: unsafeCSS(`var(--m3e-filled-card-focus-state-layer-opacity, ${DesignToken.state.focusStateLayerOpacity})`),
475
+ containerElevation: unsafeCSS(`var(--m3e-filled-card-focus-container-elevation, ${DesignToken.elevation.level0})`)
199
476
  },
477
+ pressed: {
478
+ textColor: unsafeCSS(`var(--m3e-filled-card-pressed-text-color, ${DesignToken.color.onSurface})`),
479
+ stateLayerColor: unsafeCSS(`var(--m3e-filled-card-pressed-state-layer-color, ${DesignToken.color.onSurface})`),
480
+ stateLayerOpacity: unsafeCSS(`var(--m3e-filled-card-pressed-state-layer-opacity, ${DesignToken.state.pressedStateLayerOpacity})`),
481
+ containerElevation: unsafeCSS(`var(--m3e-filled-card-pressed-container-elevation, ${DesignToken.elevation.level0})`)
482
+ }
483
+ },
484
+ elevated: {
485
+ textColor: unsafeCSS(`var(--m3e-elevated-card-text-color, ${DesignToken.color.onSurface})`),
486
+ containerColor: unsafeCSS(`var(--m3e-elevated-card-container-color, ${DesignToken.color.surfaceContainerLow})`),
487
+ containerElevation: unsafeCSS(`var(--m3e-elevated-card-container-elevation, ${DesignToken.elevation.level1})`),
488
+ disabled: {
489
+ textColor: unsafeCSS(`var(--m3e-elevated-card-disabled-text-color, ${DesignToken.color.onSurface})`),
490
+ textOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-text-opacity, 38%)`),
491
+ imageOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-image-opacity, 38%)`),
492
+ containerColor: unsafeCSS(`var(--m3e-elevated-card-disabled-container-color, ${DesignToken.color.surface})`),
493
+ containerElevation: unsafeCSS(`var(--m3e-elevated-card-disabled-container-elevation, ${DesignToken.elevation.level1})`),
494
+ containerElevationColor: unsafeCSS(`var(--m3e-elevated-card-disabled-container-elevation-color, ${DesignToken.color.onSurface})`),
495
+ containerElevationOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-container-elevation-opacity, 38%)`),
496
+ containerOpacity: unsafeCSS(`var(--m3e-elevated-card-disabled-container-opacity, 38%)`)
497
+ },
498
+ hover: {
499
+ textColor: unsafeCSS(`var(--m3e-elevated-card-hover-text-color, ${DesignToken.color.onSurface})`),
500
+ stateLayerColor: unsafeCSS(`var(--m3e-elevated-card-hover-state-layer-color, ${DesignToken.color.onSurface})`),
501
+ stateLayerOpacity: unsafeCSS(`var(--m3e-elevated-card-hover-state-layer-opacity, ${DesignToken.state.hoverStateLayerOpacity})`),
502
+ containerElevation: unsafeCSS(`var(--m3e-elevated-card-hover-container-elevation, ${DesignToken.elevation.level2})`)
503
+ },
504
+ focus: {
505
+ textColor: unsafeCSS(`var(--m3e-elevated-card-focus-text-color, ${DesignToken.color.onSurface})`),
506
+ stateLayerColor: unsafeCSS(`var(--m3e-elevated-card-focus-state-layer-color, ${DesignToken.color.onSurface})`),
507
+ stateLayerOpacity: unsafeCSS(`var(--m3e-elevated-card-focus-state-layer-opacity, ${DesignToken.state.focusStateLayerOpacity})`),
508
+ containerElevation: unsafeCSS(`var(--m3e-elevated-card-focus-container-elevation, ${DesignToken.elevation.level1})`)
509
+ },
510
+ pressed: {
511
+ textColor: unsafeCSS(`var(--m3e-elevated-card-pressed-text-color, ${DesignToken.color.onSurface})`),
512
+ stateLayerColor: unsafeCSS(`var(--m3e-elevated-card-pressed-state-layer-color, ${DesignToken.color.onSurface})`),
513
+ stateLayerOpacity: unsafeCSS(`var(--m3e-elevated-card-pressed-state-layer-opacity, ${DesignToken.state.pressedStateLayerOpacity})`),
514
+ containerElevation: unsafeCSS(`var(--m3e-elevated-card-pressed-container-elevation, ${DesignToken.elevation.level1})`)
515
+ }
516
+ },
517
+ outlined: {
518
+ textColor: unsafeCSS(`var(--m3e-outlined-card-text-color, ${DesignToken.color.onSurface})`),
519
+ containerElevation: unsafeCSS(`var(--m3e-outlined-card-container-elevation, ${DesignToken.elevation.level0})`),
520
+ outlineColor: unsafeCSS(`var(--m3e-outlined-card-outline-color, ${DesignToken.color.outlineVariant})`),
521
+ outlineThickness: unsafeCSS("var(--m3e-outlined-card-outline-thickness, 1px)"),
522
+ disabled: {
523
+ textColor: unsafeCSS(`var(--m3e-outlined-card-disabled-text-color, ${DesignToken.color.onSurface})`),
524
+ textOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-text-opacity, 38%)`),
525
+ imageOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-image-opacity, 38%)`),
526
+ containerElevation: unsafeCSS(`var(--m3e-outlined-card-disabled-container-elevation, ${DesignToken.elevation.level0})`),
527
+ containerElevationColor: unsafeCSS(`var(--m3e-outlined-card-disabled-container-elevation-color, ${DesignToken.color.onSurface})`),
528
+ containerElevationOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-container-elevation-opacity, 38%)`),
529
+ outlineColor: unsafeCSS(`var(--m3e-outlined-card-disabled-outline-color, ${DesignToken.color.outline})`),
530
+ outlineOpacity: unsafeCSS(`var(--m3e-outlined-card-disabled-outline-opacity, 12%)`)
531
+ },
532
+ hover: {
533
+ textColor: unsafeCSS(`var(--m3e-outlined-card-hover-text-color, ${DesignToken.color.onSurface})`),
534
+ stateLayerColor: unsafeCSS(`var(--m3e-outlined-card-hover-state-layer-color, ${DesignToken.color.onSurface})`),
535
+ stateLayerOpacity: unsafeCSS(`var(--m3e-outlined-card-hover-state-layer-opacity, ${DesignToken.state.hoverStateLayerOpacity})`),
536
+ containerElevation: unsafeCSS(`var(--m3e-outlined-card-hover-container-elevation, ${DesignToken.elevation.level1})`),
537
+ outlineColor: unsafeCSS(`var(--m3e-outlined-card-hover-outline-color, ${DesignToken.color.outlineVariant})`)
538
+ },
539
+ focus: {
540
+ textColor: unsafeCSS(`var(--m3e-outlined-card-focus-text-color, ${DesignToken.color.onSurface})`),
541
+ stateLayerColor: unsafeCSS(`var(--m3e-outlined-card-focus-state-layer-color, ${DesignToken.color.onSurface})`),
542
+ stateLayerOpacity: unsafeCSS(`var(--m3e-outlined-card-focus-state-layer-opacity, ${DesignToken.state.focusStateLayerOpacity})`),
543
+ containerElevation: unsafeCSS(`var(--m3e-outlined-card-focus-container-elevation, ${DesignToken.elevation.level0})`),
544
+ outlineColor: unsafeCSS(`var(--m3e-outlined-card-focus-outline-color, ${DesignToken.color.onSurface})`)
545
+ },
546
+ pressed: {
547
+ textColor: unsafeCSS(`var(--m3e-outlined-card-pressed-text-color, ${DesignToken.color.onSurface})`),
548
+ stateLayerColor: unsafeCSS(`var(--m3e-outlined-card-pressed-state-layer-color, ${DesignToken.color.onSurface})`),
549
+ stateLayerOpacity: unsafeCSS(`var(--m3e-outlined-card-pressed-state-layer-opacity, ${DesignToken.state.pressedStateLayerOpacity})`),
550
+ containerElevation: unsafeCSS(`var(--m3e-outlined-card-pressed-container-elevation, ${DesignToken.elevation.level0})`),
551
+ outlineColor: unsafeCSS(`var(--m3e-outlined-card-pressed-outline-color, ${DesignToken.color.outlineVariant})`)
552
+ }
553
+ }
200
554
  };
201
555
 
202
556
  /**
203
557
  * Baseline styles for `M3eCardElement`.
204
558
  * @internal
205
559
  */
206
- const CardStyle = css `
207
- :host {
208
- outline: none;
209
- }
210
- :host(:not([inline])) {
211
- display: block;
212
- }
213
- :host(:not([inline])) .base {
214
- display: flex;
215
- }
216
- :host([inline]) {
217
- display: inline-block;
218
- vertical-align: middle;
219
- }
220
- :host([inline]) .base {
221
- display: inline-flex;
222
- }
223
- .base {
224
- width: 100%;
225
- height: 100%;
226
- position: relative;
227
- box-sizing: border-box;
228
- border-radius: ${CardToken.shape};
229
- transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard},
230
- border-color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)};
231
- }
232
- :host([actionable]) {
233
- user-select: none;
234
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
235
- }
236
- :host([actionable]:not(:disabled):not([disabled-interactive])) {
237
- cursor: pointer;
238
- }
239
- :host([actionable][disabled-interactive]) {
240
- cursor: not-allowed;
241
- }
242
- :host(:not([actionable])) .focus-ring,
243
- :host(:not([actionable])) .state-layer,
244
- :host(:not([actionable])) .ripple {
245
- display: none;
246
- }
247
- :host([variant="outlined"]) .base {
248
- border-style: solid;
249
- }
250
- ::slotted([slot="content"]) {
251
- flex: 1 1 auto;
252
- }
253
- :host([orientation="vertical"]) ::slotted([slot="content"]) {
254
- margin-inline: ${CardToken.padding};
255
- }
256
- :host([orientation="vertical"]) ::slotted([slot="content"]:first-child) {
257
- margin-block-start: ${CardToken.padding};
258
- }
259
- :host([orientation="vertical"]) ::slotted([slot="content"]:last-child) {
260
- margin-block-end: ${CardToken.padding};
261
- }
262
- :host([orientation="horizontal"]) ::slotted([slot="content"]) {
263
- margin-block: ${CardToken.padding};
264
- }
265
- :host([orientation="horizontal"]) ::slotted([slot="content"]:first-child) {
266
- margin-inline-start: ${CardToken.padding};
267
- }
268
- :host([orientation="horizontal"]) ::slotted([slot="content"]:last-child) {
269
- margin-inline-end: ${CardToken.padding};
270
- }
271
- :host([orientation="vertical"]) ::slotted([slot="header"]:not(img):not(video)) {
272
- margin-inline: ${CardToken.padding};
273
- margin-block-start: ${CardToken.padding};
274
- }
275
- :host([orientation="horizontal"]) ::slotted([slot="header"]:not(img):not(video)) {
276
- margin-inline-start: ${CardToken.padding};
277
- margin-block: ${CardToken.padding};
278
- }
279
- ::slotted(img),
280
- ::slotted(video) {
281
- inset: 0;
282
- object-fit: cover;
283
- }
284
- ::slotted(img[slot="header"]),
285
- ::slotted(video[slot="header"]) {
286
- border-radius: ${CardToken.shape};
287
- }
288
- ::slotted([slot="actions"]) {
289
- margin-inline: ${CardToken.padding};
290
- margin-block: ${CardToken.padding};
291
- }
292
- ::slotted([slot="actions"][end]) {
293
- justify-content: flex-end;
294
- }
295
- :host([orientation="vertical"]) ::slotted([slot="footer"]) {
296
- margin-inline: ${CardToken.padding};
297
- margin-block-end: ${CardToken.padding};
298
- }
299
- :host([orientation="horizontal"]) ::slotted([slot="footer"]) {
300
- margin-block: ${CardToken.padding};
301
- margin-inline-end: ${CardToken.padding};
302
- }
303
- ::slotted([slot="header"]),
304
- ::slotted([slot="actions"]),
305
- ::slotted([slot="footer"]) {
306
- flex: none;
307
- display: flex;
308
- align-items: center;
309
- }
310
- :host([orientation="vertical"]) .base,
311
- :host([orientation="horizontal"]) ::slotted([slot="header"]),
312
- :host([orientation="horizontal"]) ::slotted([slot="actions"]),
313
- :host([orientation="horizontal"]) ::slotted([slot="footer"]) {
314
- flex-direction: column;
315
- }
316
- :host([orientation="horizontal"]) .base,
317
- :host([orientation="vertical"]) ::slotted([slot="header"]),
318
- :host([orientation="vertical"]) ::slotted([slot="actions"]),
319
- :host([orientation="vertical"]) ::slotted([slot="footer"]) {
320
- flex-direction: row;
321
- }
322
- :host([orientation="horizontal"]) ::slotted(img),
323
- :host([orientation="horizontal"]) ::slotted(video) {
324
- aspect-ratio: 16 / 9;
325
- }
326
- a {
327
- all: unset;
328
- display: block;
329
- position: absolute;
330
- top: 0px;
331
- left: 0px;
332
- right: 0px;
333
- bottom: 0px;
334
- z-index: 1;
335
- }
336
- @media (forced-colors: active) {
337
- .base {
338
- transition: none;
339
- }
340
- :host([variant]) .base {
341
- border-style: solid;
342
- border-color: CanvasText;
343
- border-width: ${CardVariantToken.outlined.outlineThickness ?? unsafeCSS("unset")};
344
- }
345
- :host([actionable][variant]:disabled) .base,
346
- :host([actionable][variant][disabled-interactive]) .base {
347
- color: GrayText;
348
- border-color: GrayText;
349
- }
350
- }
351
- @media (prefers-reduced-motion) {
352
- .base {
353
- transition: none;
354
- }
355
- }
356
- `;
560
+ const CardStyle = css`:host { outline: none; } :host(:not([inline])) { display: block; } :host(:not([inline])) .base { display: flex; } :host([inline]) { display: inline-block; vertical-align: middle; } :host([inline]) .base { display: inline-flex; } .base { width: 100%; height: 100%; position: relative; box-sizing: border-box; border-radius: ${CardToken.shape}; transition: ${unsafeCSS(`background-color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard},
561
+ border-color ${DesignToken.motion.duration.short4} ${DesignToken.motion.easing.standard}`)}; } :host([actionable]) { user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host([actionable]:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([actionable][disabled-interactive]) { cursor: not-allowed; } :host(:not([actionable])) .focus-ring, :host(:not([actionable])) .state-layer, :host(:not([actionable])) .ripple { display: none; } :host([variant="outlined"]) .base { border-style: solid; } ::slotted([slot="content"]) { flex: 1 1 auto; } :host([orientation="vertical"]) ::slotted([slot="content"]) { margin-inline: ${CardToken.padding}; } :host([orientation="vertical"]) ::slotted([slot="content"]:first-child) { margin-block-start: ${CardToken.padding}; } :host([orientation="vertical"]) ::slotted([slot="content"]:last-child) { margin-block-end: ${CardToken.padding}; } :host([orientation="horizontal"]) ::slotted([slot="content"]) { margin-block: ${CardToken.padding}; } :host([orientation="horizontal"]) ::slotted([slot="content"]:first-child) { margin-inline-start: ${CardToken.padding}; } :host([orientation="horizontal"]) ::slotted([slot="content"]:last-child) { margin-inline-end: ${CardToken.padding}; } :host([orientation="vertical"]) ::slotted([slot="header"]:not(img):not(video)) { margin-inline: ${CardToken.padding}; margin-block-start: ${CardToken.padding}; } :host([orientation="horizontal"]) ::slotted([slot="header"]:not(img):not(video)) { margin-inline-start: ${CardToken.padding}; margin-block: ${CardToken.padding}; } ::slotted(img), ::slotted(video) { inset: 0; object-fit: cover; } ::slotted(img[slot="header"]), ::slotted(video[slot="header"]) { border-radius: ${CardToken.shape}; } ::slotted([slot="actions"]) { margin-inline: ${CardToken.padding}; margin-block: ${CardToken.padding}; } ::slotted([slot="actions"][end]) { justify-content: flex-end; } :host([orientation="vertical"]) ::slotted([slot="footer"]) { margin-inline: ${CardToken.padding}; margin-block-end: ${CardToken.padding}; } :host([orientation="horizontal"]) ::slotted([slot="footer"]) { margin-block: ${CardToken.padding}; margin-inline-end: ${CardToken.padding}; } ::slotted([slot="header"]), ::slotted([slot="actions"]), ::slotted([slot="footer"]) { flex: none; display: flex; align-items: center; } :host([orientation="vertical"]) .base, :host([orientation="horizontal"]) ::slotted([slot="header"]), :host([orientation="horizontal"]) ::slotted([slot="actions"]), :host([orientation="horizontal"]) ::slotted([slot="footer"]) { flex-direction: column; } :host([orientation="horizontal"]) .base, :host([orientation="vertical"]) ::slotted([slot="header"]), :host([orientation="vertical"]) ::slotted([slot="actions"]), :host([orientation="vertical"]) ::slotted([slot="footer"]) { flex-direction: row; } :host([orientation="horizontal"]) ::slotted(img), :host([orientation="horizontal"]) ::slotted(video) { aspect-ratio: 16 / 9; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (forced-colors: active) { .base { transition: none; } :host([variant]) .base { border-style: solid; border-color: CanvasText; border-width: ${CardVariantToken.outlined.outlineThickness ?? unsafeCSS("unset")}; } :host([actionable][variant]:disabled) .base, :host([actionable][variant][disabled-interactive]) .base { color: GrayText; border-color: GrayText; } } @media (prefers-reduced-motion) { .base { transition: none; } }`;
357
562
 
358
563
  /** @private */
359
564
  function cardVariantStyle(variant) {
360
- return css `
361
- :host([variant="${unsafeCSS(variant)}"]) .base {
362
- background-color: ${CardVariantToken[variant].containerColor ?? unsafeCSS("unset")};
363
- box-shadow: ${CardVariantToken[variant].containerElevation ?? unsafeCSS("unset")};
364
- border-width: ${CardVariantToken[variant].outlineThickness ?? unsafeCSS("unset")};
365
- }
366
- :host([actionable][variant="${unsafeCSS(variant)}"]) .base {
367
- --m3e-state-layer-hover-color: ${CardVariantToken[variant].hover.stateLayerColor};
368
- --m3e-state-layer-hover-opacity: ${CardVariantToken[variant].hover.stateLayerOpacity};
369
- --m3e-state-layer-focus-color: ${CardVariantToken[variant].focus.stateLayerColor};
370
- --m3e-state-layer-focus-opacity: ${CardVariantToken[variant].focus.stateLayerOpacity};
371
- --m3e-ripple-color: ${CardVariantToken[variant].pressed.stateLayerColor};
372
- --m3e-ripple-opacity: ${CardVariantToken[variant].pressed.stateLayerOpacity};
373
- --m3e-elevation-level: ${CardVariantToken[variant].containerElevation ?? unsafeCSS("unset")};
374
- --m3e-elevation-hover-level: ${CardVariantToken[variant].hover.containerElevation ?? unsafeCSS("unset")};
375
- --m3e-elevation-focus-level: ${CardVariantToken[variant].focus.containerElevation ?? unsafeCSS("unset")};
376
- --m3e-elevation-pressed-level: ${CardVariantToken[variant].pressed.containerElevation ?? unsafeCSS("unset")};
377
- }
378
- :host([variant="${unsafeCSS(variant)}"]) .base {
379
- border-color: ${CardVariantToken[variant].outlineColor ?? unsafeCSS("unset")};
380
- }
381
- :host([actionable][variant="${unsafeCSS(variant)}"]:focus .base) {
382
- border-color: ${CardVariantToken[variant].focus.outlineColor ?? unsafeCSS("unset")};
383
- }
384
- :host([actionable][variant="${unsafeCSS(variant)}"]:hover .base) {
385
- border-color: ${CardVariantToken[variant].hover.outlineColor ?? unsafeCSS("unset")};
386
- }
387
- :host([actionable][variant="${unsafeCSS(variant)}"]) .base.pressed {
388
- border-color: ${CardVariantToken[variant].pressed.outlineColor ?? unsafeCSS("unset")};
389
- }
390
- :host([variant="${unsafeCSS(variant)}"]) .base {
391
- color: ${CardVariantToken[variant].textColor ?? unsafeCSS("unset")};
392
- }
393
- :host([actionable][variant="${unsafeCSS(variant)}"]:focus) .base {
394
- color: ${CardVariantToken[variant].focus.textColor ?? unsafeCSS("unset")};
395
- }
396
- :host([actionable][variant="${unsafeCSS(variant)}"]:hover) .base {
397
- color: ${CardVariantToken[variant].hover.textColor ?? unsafeCSS("unset")};
398
- }
399
- :host([actionable][variant="${unsafeCSS(variant)}"]) .base.pressed {
400
- color: ${CardVariantToken[variant].pressed.textColor ?? unsafeCSS("unset")};
401
- }
402
- :host([actionable][variant="${unsafeCSS(variant)}"]:disabled) .base,
403
- :host([actionable][variant="${unsafeCSS(variant)}"][disabled-interactive]) .base {
404
- --m3e-elevation-level: ${CardVariantToken[variant].disabled.containerElevation ?? unsafeCSS("unset")};
405
- --m3e-elevation-color: color-mix(
406
- in srgb,
407
- ${CardVariantToken[variant].disabled.containerElevationColor}
408
- ${CardVariantToken[variant].disabled.containerElevationOpacity},
409
- transparent
410
- );
411
- color: color-mix(
412
- in srgb,
413
- ${CardVariantToken[variant].disabled.textColor} ${CardVariantToken[variant].disabled.textOpacity},
414
- transparent
415
- );
416
- background-color: ${CardVariantToken[variant].disabled.containerColor &&
417
- CardVariantToken[variant].disabled.containerOpacity
418
- ? unsafeCSS(`color-mix(
419
- in srgb,
420
- ${CardVariantToken[variant].disabled.containerColor} ${CardVariantToken[variant].disabled.containerOpacity},
421
- transparent
422
- )`)
423
- : unsafeCSS("unset")};
424
- border-color: ${CardVariantToken[variant].disabled.outlineColor &&
425
- CardVariantToken[variant].disabled.outlineOpacity
426
- ? unsafeCSS(`color-mix(
427
- in srgb,
428
- ${CardVariantToken[variant].disabled.outlineColor} ${CardVariantToken[variant].disabled.outlineOpacity},
429
- transparent
430
- )`)
431
- : unsafeCSS("unset")};
432
- }
433
- :host([actionable][variant="${unsafeCSS(variant)}"]:disabled) ::slotted(img),
434
- :host([actionable][variant="${unsafeCSS(variant)}"][disabled-interactive]) ::slotted(img),
435
- :host([actionable][variant="${unsafeCSS(variant)}"]:disabled) ::slotted(video),
436
- :host([actionable][variant="${unsafeCSS(variant)}"][disabled-interactive]) ::slotted(video) {
437
- opacity: ${CardVariantToken[variant].disabled.imageOpacity};
438
- }
439
- `;
565
+ return css`:host([variant="${unsafeCSS(variant)}"]) .base { background-color: ${CardVariantToken[variant].containerColor ?? unsafeCSS("unset")}; box-shadow: ${CardVariantToken[variant].containerElevation ?? unsafeCSS("unset")}; border-width: ${CardVariantToken[variant].outlineThickness ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]) .base { --m3e-state-layer-hover-color: ${CardVariantToken[variant].hover.stateLayerColor}; --m3e-state-layer-hover-opacity: ${CardVariantToken[variant].hover.stateLayerOpacity}; --m3e-state-layer-focus-color: ${CardVariantToken[variant].focus.stateLayerColor}; --m3e-state-layer-focus-opacity: ${CardVariantToken[variant].focus.stateLayerOpacity}; --m3e-ripple-color: ${CardVariantToken[variant].pressed.stateLayerColor}; --m3e-ripple-opacity: ${CardVariantToken[variant].pressed.stateLayerOpacity}; --m3e-elevation-level: ${CardVariantToken[variant].containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-hover-level: ${CardVariantToken[variant].hover.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-focus-level: ${CardVariantToken[variant].focus.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-pressed-level: ${CardVariantToken[variant].pressed.containerElevation ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]) .base { border-color: ${CardVariantToken[variant].outlineColor ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]:focus .base) { border-color: ${CardVariantToken[variant].focus.outlineColor ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]:hover .base) { border-color: ${CardVariantToken[variant].hover.outlineColor ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]) .base.pressed { border-color: ${CardVariantToken[variant].pressed.outlineColor ?? unsafeCSS("unset")}; } :host([variant="${unsafeCSS(variant)}"]) .base { color: ${CardVariantToken[variant].textColor ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]:focus) .base { color: ${CardVariantToken[variant].focus.textColor ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]:hover) .base { color: ${CardVariantToken[variant].hover.textColor ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]) .base.pressed { color: ${CardVariantToken[variant].pressed.textColor ?? unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]:disabled) .base, :host([actionable][variant="${unsafeCSS(variant)}"][disabled-interactive]) .base { --m3e-elevation-level: ${CardVariantToken[variant].disabled.containerElevation ?? unsafeCSS("unset")}; --m3e-elevation-color: color-mix( in srgb, ${CardVariantToken[variant].disabled.containerElevationColor} ${CardVariantToken[variant].disabled.containerElevationOpacity}, transparent ); color: color-mix( in srgb, ${CardVariantToken[variant].disabled.textColor} ${CardVariantToken[variant].disabled.textOpacity}, transparent ); background-color: ${CardVariantToken[variant].disabled.containerColor && CardVariantToken[variant].disabled.containerOpacity ? unsafeCSS(`color-mix(
566
+ in srgb,
567
+ ${CardVariantToken[variant].disabled.containerColor} ${CardVariantToken[variant].disabled.containerOpacity},
568
+ transparent
569
+ )`) : unsafeCSS("unset")}; border-color: ${CardVariantToken[variant].disabled.outlineColor && CardVariantToken[variant].disabled.outlineOpacity ? unsafeCSS(`color-mix(
570
+ in srgb,
571
+ ${CardVariantToken[variant].disabled.outlineColor} ${CardVariantToken[variant].disabled.outlineOpacity},
572
+ transparent
573
+ )`) : unsafeCSS("unset")}; } :host([actionable][variant="${unsafeCSS(variant)}"]:disabled) ::slotted(img), :host([actionable][variant="${unsafeCSS(variant)}"][disabled-interactive]) ::slotted(img), :host([actionable][variant="${unsafeCSS(variant)}"]:disabled) ::slotted(video), :host([actionable][variant="${unsafeCSS(variant)}"][disabled-interactive]) ::slotted(video) { opacity: ${CardVariantToken[variant].disabled.imageOpacity}; }`;
440
574
  }
441
575
  /**
442
576
  * Appearance variant styles for `M3eCardElement`.
443
577
  * @internal
444
578
  */
445
- const CardVariantStyle = [
446
- cardVariantStyle("filled"),
447
- cardVariantStyle("elevated"),
448
- cardVariantStyle("outlined"),
449
- ];
579
+ const CardVariantStyle = [cardVariantStyle("filled"), cardVariantStyle("elevated"), cardVariantStyle("outlined")];
450
580
 
451
581
  var _M3eCardElement_instances, _M3eCardElement_clickHandler, _M3eCardElement_handleClick;
452
582
  /**
@@ -569,133 +699,103 @@ var _M3eCardElement_instances, _M3eCardElement_clickHandler, _M3eCardElement_han
569
699
  * @cssprop --m3e-outlined-card-pressed-outline-color - Border color on press.
570
700
  */
571
701
  let M3eCardElement = class M3eCardElement extends KeyboardClick(LinkButton(FormSubmitter(Focusable(DisabledInteractive(Disabled(AttachInternals(LitElement), true)))))) {
572
- constructor() {
573
- super();
574
- _M3eCardElement_instances.add(this);
575
- /** @private */ _M3eCardElement_clickHandler.set(this, (e) => __classPrivateFieldGet(this, _M3eCardElement_instances, "m", _M3eCardElement_handleClick).call(this, e));
576
- /**
577
- * Whether to present the card inline with surrounding content.
578
- * @default false
579
- */
580
- this.inline = false;
581
- /**
582
- * Whether the card is "actionable" and will respond to use interaction.
583
- * @default false
584
- */
585
- this.actionable = false;
586
- /**
587
- * The appearance variant of the card.
588
- * @default "filled"
589
- */
590
- this.variant = "filled";
591
- /**
592
- * The orientation of the card.
593
- * @default "vertical"
594
- */
595
- this.orientation = "vertical";
596
- new PressedController(this, {
597
- isPressedKey: (key) => key === " ",
598
- callback: (pressed) => {
599
- if (this.actionable && !this.disabled && !this.disabledInteractive) {
600
- this._base?.classList.toggle("pressed", pressed);
601
- }
602
- },
603
- });
604
- }
605
- /** @inheritdoc */
606
- connectedCallback() {
607
- if (this.hasAttribute("actionable")) {
608
- // If href is specified, the LinkButton mixin changes this to "link" if role is "button".
609
- this.role = "button";
702
+ constructor() {
703
+ super();
704
+ _M3eCardElement_instances.add(this);
705
+ /** @private */
706
+ _M3eCardElement_clickHandler.set(this, e => __classPrivateFieldGet(this, _M3eCardElement_instances, "m", _M3eCardElement_handleClick).call(this, e));
707
+ /**
708
+ * Whether to present the card inline with surrounding content.
709
+ * @default false
710
+ */
711
+ this.inline = false;
712
+ /**
713
+ * Whether the card is "actionable" and will respond to use interaction.
714
+ * @default false
715
+ */
716
+ this.actionable = false;
717
+ /**
718
+ * The appearance variant of the card.
719
+ * @default "filled"
720
+ */
721
+ this.variant = "filled";
722
+ /**
723
+ * The orientation of the card.
724
+ * @default "vertical"
725
+ */
726
+ this.orientation = "vertical";
727
+ new PressedController(this, {
728
+ isPressedKey: key => key === " ",
729
+ callback: pressed => {
730
+ if (this.actionable && !this.disabled && !this.disabledInteractive) {
731
+ this._base?.classList.toggle("pressed", pressed);
610
732
  }
611
- super.connectedCallback();
612
- this.addEventListener("click", __classPrivateFieldGet(this, _M3eCardElement_clickHandler, "f"));
733
+ }
734
+ });
735
+ }
736
+ /** @inheritdoc */
737
+ connectedCallback() {
738
+ if (this.hasAttribute("actionable")) {
739
+ // If href is specified, the LinkButton mixin changes this to "link" if role is "button".
740
+ this.role = "button";
613
741
  }
614
- /** @inheritdoc */
615
- disconnectedCallback() {
616
- super.disconnectedCallback();
617
- this._base?.classList.toggle("pressed", false);
618
- this.removeEventListener("click", __classPrivateFieldGet(this, _M3eCardElement_clickHandler, "f"));
742
+ super.connectedCallback();
743
+ this.addEventListener("click", __classPrivateFieldGet(this, _M3eCardElement_clickHandler, "f"));
744
+ }
745
+ /** @inheritdoc */
746
+ disconnectedCallback() {
747
+ super.disconnectedCallback();
748
+ this._base?.classList.toggle("pressed", false);
749
+ this.removeEventListener("click", __classPrivateFieldGet(this, _M3eCardElement_clickHandler, "f"));
750
+ }
751
+ /** @inheritdoc */
752
+ render() {
753
+ return html`<div class="base"><m3e-elevation class="elevation" ?disabled="${!this.actionable || this.disabled || this.disabledInteractive}"></m3e-elevation><m3e-focus-ring class="focus-ring" ?disabled="${!this.actionable || this.disabled}"></m3e-focus-ring><m3e-state-layer class="state-layer" ?disabled="${!this.actionable || this.disabled || this.disabledInteractive}"></m3e-state-layer><m3e-ripple class="ripple" ?disabled="${!this.actionable || this.disabled || this.disabledInteractive}"></m3e-ripple>${this[renderPseudoLink]()}<slot name="header"></slot><slot name="content"><slot></slot></slot><slot name="actions"></slot><slot name="footer"></slot></div>`;
754
+ }
755
+ /** @inheritdoc */
756
+ firstUpdated(_changedProperties) {
757
+ super.firstUpdated(_changedProperties);
758
+ [this._elevation, this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
759
+ if (!this.actionable && this.hasAttribute("tabindex")) {
760
+ this.removeAttribute("tabindex");
619
761
  }
620
- /** @inheritdoc */
621
- render() {
622
- return html `<div class="base">
623
- <m3e-elevation
624
- class="elevation"
625
- ?disabled="${!this.actionable || this.disabled || this.disabledInteractive}"
626
- ></m3e-elevation>
627
- <m3e-focus-ring class="focus-ring" ?disabled="${!this.actionable || this.disabled}"></m3e-focus-ring>
628
- <m3e-state-layer
629
- class="state-layer"
630
- ?disabled="${!this.actionable || this.disabled || this.disabledInteractive}"
631
- ></m3e-state-layer>
632
- <m3e-ripple
633
- class="ripple"
634
- ?disabled="${!this.actionable || this.disabled || this.disabledInteractive}"
635
- ></m3e-ripple>
636
- ${this[renderPseudoLink]()}
637
- <slot name="header"></slot>
638
- <slot name="content"><slot></slot></slot>
639
- <slot name="actions"></slot>
640
- <slot name="footer"></slot>
641
- </div>`;
642
- }
643
- /** @inheritdoc */
644
- firstUpdated(_changedProperties) {
645
- super.firstUpdated(_changedProperties);
646
- [this._elevation, this._focusRing, this._stateLayer, this._ripple].forEach((x) => x?.attach(this));
647
- if (!this.actionable && this.hasAttribute("tabindex")) {
648
- this.removeAttribute("tabindex");
649
- }
650
- }
651
- /** @inheritdoc */
652
- update(changedProperties) {
653
- super.update(changedProperties);
654
- if (!this.actionable && this.hasAttribute("tabindex")) {
655
- this.removeAttribute("tabindex");
656
- }
762
+ }
763
+ /** @inheritdoc */
764
+ update(changedProperties) {
765
+ super.update(changedProperties);
766
+ if (!this.actionable && this.hasAttribute("tabindex")) {
767
+ this.removeAttribute("tabindex");
657
768
  }
769
+ }
658
770
  };
659
771
  _M3eCardElement_clickHandler = new WeakMap();
660
772
  _M3eCardElement_instances = new WeakSet();
661
773
  _M3eCardElement_handleClick = function _M3eCardElement_handleClick(e) {
662
- if (this.disabled || this.disabledInteractive) {
663
- e.preventDefault();
664
- e.stopImmediatePropagation();
665
- }
774
+ if (this.disabled || this.disabledInteractive) {
775
+ e.preventDefault();
776
+ e.stopImmediatePropagation();
777
+ }
666
778
  };
667
779
  /** The styles of the element. */
668
780
  M3eCardElement.styles = [CardVariantStyle, CardStyle];
669
- __decorate([
670
- e(".base")
671
- ], M3eCardElement.prototype, "_base", void 0);
672
- __decorate([
673
- e(".elevation")
674
- ], M3eCardElement.prototype, "_elevation", void 0);
675
- __decorate([
676
- e(".focus-ring")
677
- ], M3eCardElement.prototype, "_focusRing", void 0);
678
- __decorate([
679
- e(".state-layer")
680
- ], M3eCardElement.prototype, "_stateLayer", void 0);
681
- __decorate([
682
- e(".ripple")
683
- ], M3eCardElement.prototype, "_ripple", void 0);
684
- __decorate([
685
- n({ type: Boolean })
686
- ], M3eCardElement.prototype, "inline", void 0);
687
- __decorate([
688
- n({ type: Boolean })
689
- ], M3eCardElement.prototype, "actionable", void 0);
690
- __decorate([
691
- n({ reflect: true })
692
- ], M3eCardElement.prototype, "variant", void 0);
693
- __decorate([
694
- n({ reflect: true })
695
- ], M3eCardElement.prototype, "orientation", void 0);
696
- M3eCardElement = __decorate([
697
- t$1("m3e-card")
698
- ], M3eCardElement);
781
+ __decorate([e(".base")], M3eCardElement.prototype, "_base", void 0);
782
+ __decorate([e(".elevation")], M3eCardElement.prototype, "_elevation", void 0);
783
+ __decorate([e(".focus-ring")], M3eCardElement.prototype, "_focusRing", void 0);
784
+ __decorate([e(".state-layer")], M3eCardElement.prototype, "_stateLayer", void 0);
785
+ __decorate([e(".ripple")], M3eCardElement.prototype, "_ripple", void 0);
786
+ __decorate([n({
787
+ type: Boolean
788
+ })], M3eCardElement.prototype, "inline", void 0);
789
+ __decorate([n({
790
+ type: Boolean
791
+ })], M3eCardElement.prototype, "actionable", void 0);
792
+ __decorate([n({
793
+ reflect: true
794
+ })], M3eCardElement.prototype, "variant", void 0);
795
+ __decorate([n({
796
+ reflect: true
797
+ })], M3eCardElement.prototype, "orientation", void 0);
798
+ M3eCardElement = __decorate([t$1("m3e-card")], M3eCardElement);
699
799
 
700
800
  export { M3eCardElement };
701
801
  //# sourceMappingURL=index.js.map