@florid-kit/components 0.3.18 → 0.3.19
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/aria.d.ts +1 -1
- package/components/wishlist-button.d.ts +4 -2
- package/index.js +87 -82
- package/index.mjs +226 -215
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -23,13 +23,13 @@ let At = class {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
const Pt = (o) => new At(typeof o == "string" ? o : o + "", void 0, lt), E = (o, ...t) => {
|
|
26
|
-
const e = o.length === 1 ? o[0] : t.reduce((s, n,
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
30
|
-
})(n) + o[
|
|
26
|
+
const e = o.length === 1 ? o[0] : t.reduce((s, n, r) => s + ((i) => {
|
|
27
|
+
if (i._$cssResult$ === !0) return i.cssText;
|
|
28
|
+
if (typeof i == "number") return i;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + i + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(n) + o[r + 1], o[0]);
|
|
31
31
|
return new At(e, o, lt);
|
|
32
|
-
},
|
|
32
|
+
}, kt = (o, t) => {
|
|
33
33
|
if (at) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
35
|
const s = document.createElement("style"), n = W.litNonce;
|
|
@@ -45,7 +45,7 @@ const Pt = (o) => new At(typeof o == "string" ? o : o + "", void 0, lt), E = (o,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Bt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: It, getPrototypeOf: zt } = Object, S = globalThis, gt = S.trustedTypes, Ut = gt ? gt.emptyScript : "", tt = S.reactiveElementPolyfillSupport, N = (o, t) => o, K = { toAttribute(o, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
o = o ? Ut : null;
|
|
@@ -73,7 +73,7 @@ const { is: kt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} }, ct = (o, t) => !
|
|
76
|
+
} }, ct = (o, t) => !Bt(o, t), vt = { attribute: !0, type: String, converter: K, reflect: !1, useDefault: !1, hasChanged: ct };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let M = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -89,14 +89,14 @@ let M = class extends HTMLElement {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, s) {
|
|
92
|
-
const { get: n, set:
|
|
92
|
+
const { get: n, set: r } = Ht(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
|
-
}, set(
|
|
95
|
-
this[e] =
|
|
94
|
+
}, set(i) {
|
|
95
|
+
this[e] = i;
|
|
96
96
|
} };
|
|
97
|
-
return { get: n, set(
|
|
97
|
+
return { get: n, set(i) {
|
|
98
98
|
const c = n == null ? void 0 : n.call(this);
|
|
99
|
-
|
|
99
|
+
r == null || r.call(this, i), this.requestUpdate(t, c, s);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
@@ -159,7 +159,7 @@ let M = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return kt(t, this.constructor.elementStyles), t;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var t;
|
|
@@ -181,32 +181,32 @@ let M = class extends HTMLElement {
|
|
|
181
181
|
this._$AK(t, s);
|
|
182
182
|
}
|
|
183
183
|
_$ET(t, e) {
|
|
184
|
-
var
|
|
184
|
+
var r;
|
|
185
185
|
const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
|
|
186
186
|
if (n !== void 0 && s.reflect === !0) {
|
|
187
|
-
const
|
|
188
|
-
this._$Em = t,
|
|
187
|
+
const i = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : K).toAttribute(e, s.type);
|
|
188
|
+
this._$Em = t, i == null ? this.removeAttribute(n) : this.setAttribute(n, i), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
_$AK(t, e) {
|
|
192
|
-
var
|
|
192
|
+
var r, i;
|
|
193
193
|
const s = this.constructor, n = s._$Eh.get(t);
|
|
194
194
|
if (n !== void 0 && this._$Em !== n) {
|
|
195
|
-
const c = s.getPropertyOptions(n), a = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((
|
|
196
|
-
this._$Em = n, this[n] = a.fromAttribute(e, c.type) ?? ((
|
|
195
|
+
const c = s.getPropertyOptions(n), a = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((r = c.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? c.converter : K;
|
|
196
|
+
this._$Em = n, this[n] = a.fromAttribute(e, c.type) ?? ((i = this._$Ej) == null ? void 0 : i.get(n)) ?? null, this._$Em = null;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
requestUpdate(t, e, s) {
|
|
200
200
|
var n;
|
|
201
201
|
if (t !== void 0) {
|
|
202
|
-
const
|
|
203
|
-
if (s ?? (s =
|
|
202
|
+
const r = this.constructor, i = this[t];
|
|
203
|
+
if (s ?? (s = r.getPropertyOptions(t)), !((s.hasChanged ?? ct)(i, e) || s.useDefault && s.reflect && i === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(r._$Eu(t, s)))) return;
|
|
204
204
|
this.C(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
207
207
|
}
|
|
208
|
-
C(t, e, { useDefault: s, reflect: n, wrapped:
|
|
209
|
-
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t,
|
|
208
|
+
C(t, e, { useDefault: s, reflect: n, wrapped: r }, i) {
|
|
209
|
+
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, i ?? e ?? this[t]), r !== !0 || i !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), n === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
210
210
|
}
|
|
211
211
|
async _$EP() {
|
|
212
212
|
this.isUpdatePending = !0;
|
|
@@ -226,21 +226,21 @@ let M = class extends HTMLElement {
|
|
|
226
226
|
if (!this.isUpdatePending) return;
|
|
227
227
|
if (!this.hasUpdated) {
|
|
228
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
229
|
-
for (const [
|
|
229
|
+
for (const [r, i] of this._$Ep) this[r] = i;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
232
|
const n = this.constructor.elementProperties;
|
|
233
|
-
if (n.size > 0) for (const [
|
|
234
|
-
const { wrapped: c } =
|
|
235
|
-
c !== !0 || this._$AL.has(
|
|
233
|
+
if (n.size > 0) for (const [r, i] of n) {
|
|
234
|
+
const { wrapped: c } = i, a = this[r];
|
|
235
|
+
c !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, i, a);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
let t = !1;
|
|
239
239
|
const e = this._$AL;
|
|
240
240
|
try {
|
|
241
241
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((n) => {
|
|
242
|
-
var
|
|
243
|
-
return (
|
|
242
|
+
var r;
|
|
243
|
+
return (r = n.hostUpdate) == null ? void 0 : r.call(n);
|
|
244
244
|
}), this.update(e)) : this._$EM();
|
|
245
245
|
} catch (n) {
|
|
246
246
|
throw t = !1, this._$EM(), n;
|
|
@@ -282,68 +282,68 @@ M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[N("elementProper
|
|
|
282
282
|
* Copyright 2017 Google LLC
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
|
-
const j = globalThis,
|
|
285
|
+
const j = globalThis, G = j.trustedTypes, bt = G ? G.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, St = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Et = "?" + A, Tt = `<${Et}>`, B = document, R = () => B.createComment(""), F = (o) => o === null || typeof o != "object" && typeof o != "function", ht = Array.isArray, Dt = (o) => ht(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", et = `[
|
|
286
286
|
\f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, yt = /-->/g, $t = />/g, L = RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }),
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), d = Nt(1), O = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), _t = /* @__PURE__ */ new WeakMap(), P = B.createTreeWalker(B, 129);
|
|
288
288
|
function Lt(o, t) {
|
|
289
289
|
if (!ht(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
290
|
return bt !== void 0 ? bt.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
292
|
const jt = (o, t) => {
|
|
293
293
|
const e = o.length - 1, s = [];
|
|
294
|
-
let n,
|
|
294
|
+
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = D;
|
|
295
295
|
for (let c = 0; c < e; c++) {
|
|
296
296
|
const a = o[c];
|
|
297
|
-
let f, g,
|
|
298
|
-
for (; w < a.length && (
|
|
299
|
-
const x =
|
|
300
|
-
|
|
297
|
+
let f, g, p = -1, w = 0;
|
|
298
|
+
for (; w < a.length && (i.lastIndex = w, g = i.exec(a), g !== null); ) w = i.lastIndex, i === D ? g[1] === "!--" ? i = yt : g[1] !== void 0 ? i = $t : g[2] !== void 0 ? (Ct.test(g[2]) && (n = RegExp("</" + g[2], "g")), i = L) : g[3] !== void 0 && (i = L) : i === L ? g[0] === ">" ? (i = n ?? D, p = -1) : g[1] === void 0 ? p = -2 : (p = i.lastIndex - g[2].length, f = g[1], i = g[3] === void 0 ? L : g[3] === '"' ? wt : mt) : i === wt || i === mt ? i = L : i === yt || i === $t ? i = D : (i = L, n = void 0);
|
|
299
|
+
const x = i === L && o[c + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
r += i === D ? a + Tt : p >= 0 ? (s.push(f), a.slice(0, p) + St + a.slice(p) + A + x) : a + A + (p === -2 ? c : x);
|
|
301
301
|
}
|
|
302
|
-
return [Lt(o,
|
|
302
|
+
return [Lt(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
303
303
|
};
|
|
304
304
|
class V {
|
|
305
305
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
306
306
|
let n;
|
|
307
307
|
this.parts = [];
|
|
308
|
-
let
|
|
308
|
+
let r = 0, i = 0;
|
|
309
309
|
const c = t.length - 1, a = this.parts, [f, g] = jt(t, e);
|
|
310
310
|
if (this.el = V.createElement(f, s), P.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
|
-
const
|
|
312
|
-
|
|
311
|
+
const p = this.el.content.firstChild;
|
|
312
|
+
p.replaceWith(...p.childNodes);
|
|
313
313
|
}
|
|
314
314
|
for (; (n = P.nextNode()) !== null && a.length < c; ) {
|
|
315
315
|
if (n.nodeType === 1) {
|
|
316
|
-
if (n.hasAttributes()) for (const
|
|
317
|
-
const w = g[
|
|
318
|
-
a.push({ type: 1, index:
|
|
319
|
-
} else
|
|
316
|
+
if (n.hasAttributes()) for (const p of n.getAttributeNames()) if (p.endsWith(St)) {
|
|
317
|
+
const w = g[i++], x = n.getAttribute(p).split(A), q = /([.?@])?(.*)/.exec(w);
|
|
318
|
+
a.push({ type: 1, index: r, name: q[2], strings: x, ctor: q[1] === "." ? Ft : q[1] === "?" ? Vt : q[1] === "@" ? Zt : J }), n.removeAttribute(p);
|
|
319
|
+
} else p.startsWith(A) && (a.push({ type: 6, index: r }), n.removeAttribute(p));
|
|
320
320
|
if (Ct.test(n.tagName)) {
|
|
321
|
-
const
|
|
321
|
+
const p = n.textContent.split(A), w = p.length - 1;
|
|
322
322
|
if (w > 0) {
|
|
323
|
-
n.textContent =
|
|
324
|
-
for (let x = 0; x < w; x++) n.append(
|
|
325
|
-
n.append(
|
|
323
|
+
n.textContent = G ? G.emptyScript : "";
|
|
324
|
+
for (let x = 0; x < w; x++) n.append(p[x], R()), P.nextNode(), a.push({ type: 2, index: ++r });
|
|
325
|
+
n.append(p[w], R());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (n.nodeType === 8) if (n.data === Et) a.push({ type: 2, index:
|
|
328
|
+
} else if (n.nodeType === 8) if (n.data === Et) a.push({ type: 2, index: r });
|
|
329
329
|
else {
|
|
330
|
-
let
|
|
331
|
-
for (; (
|
|
330
|
+
let p = -1;
|
|
331
|
+
for (; (p = n.data.indexOf(A, p + 1)) !== -1; ) a.push({ type: 7, index: r }), p += A.length - 1;
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
r++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
337
|
-
const s =
|
|
337
|
+
const s = B.createElement("template");
|
|
338
338
|
return s.innerHTML = t, s;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
function I(o, t, e = o, s) {
|
|
342
|
-
var
|
|
342
|
+
var i, c;
|
|
343
343
|
if (t === O) return t;
|
|
344
|
-
let n = s !== void 0 ? (
|
|
345
|
-
const
|
|
346
|
-
return (n == null ? void 0 : n.constructor) !==
|
|
344
|
+
let n = s !== void 0 ? (i = e._$Co) == null ? void 0 : i[s] : e._$Cl;
|
|
345
|
+
const r = F(t) ? void 0 : t._$litDirective$;
|
|
346
|
+
return (n == null ? void 0 : n.constructor) !== r && ((c = n == null ? void 0 : n._$AO) == null || c.call(n, !1), r === void 0 ? n = void 0 : (n = new r(o), n._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = n : e._$Cl = n), n !== void 0 && (t = I(o, n._$AS(o, t.values), n, s)), t;
|
|
347
347
|
}
|
|
348
348
|
class Rt {
|
|
349
349
|
constructor(t, e) {
|
|
@@ -356,17 +356,17 @@ class Rt {
|
|
|
356
356
|
return this._$AM._$AU;
|
|
357
357
|
}
|
|
358
358
|
u(t) {
|
|
359
|
-
const { el: { content: e }, parts: s } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ??
|
|
359
|
+
const { el: { content: e }, parts: s } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? B).importNode(e, !0);
|
|
360
360
|
P.currentNode = n;
|
|
361
|
-
let
|
|
361
|
+
let r = P.nextNode(), i = 0, c = 0, a = s[0];
|
|
362
362
|
for (; a !== void 0; ) {
|
|
363
|
-
if (
|
|
363
|
+
if (i === a.index) {
|
|
364
364
|
let f;
|
|
365
|
-
a.type === 2 ? f = new Z(
|
|
365
|
+
a.type === 2 ? f = new Z(r, r.nextSibling, this, t) : a.type === 1 ? f = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (f = new qt(r, this, t)), this._$AV.push(f), a = s[++c];
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
i !== (a == null ? void 0 : a.index) && (r = P.nextNode(), i++);
|
|
368
368
|
}
|
|
369
|
-
return P.currentNode =
|
|
369
|
+
return P.currentNode = B, n;
|
|
370
370
|
}
|
|
371
371
|
p(t) {
|
|
372
372
|
let e = 0;
|
|
@@ -402,15 +402,15 @@ class Z {
|
|
|
402
402
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
403
403
|
}
|
|
404
404
|
_(t) {
|
|
405
|
-
this._$AH !== h && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
405
|
+
this._$AH !== h && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(B.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
|
-
var
|
|
408
|
+
var r;
|
|
409
409
|
const { values: e, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = V.createElement(Lt(s.h, s.h[0]), this.options)), s);
|
|
410
|
-
if (((
|
|
410
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
411
411
|
else {
|
|
412
|
-
const
|
|
413
|
-
|
|
412
|
+
const i = new Rt(n, this), c = i.u(this.options);
|
|
413
|
+
i.p(e), this.T(c), this._$AH = i;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
_$AC(t) {
|
|
@@ -421,7 +421,7 @@ class Z {
|
|
|
421
421
|
ht(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const e = this._$AH;
|
|
423
423
|
let s, n = 0;
|
|
424
|
-
for (const
|
|
424
|
+
for (const r of t) n === e.length ? e.push(s = new Z(this.O(R()), this.O(R()), this, this.options)) : s = e[n], s._$AI(r), n++;
|
|
425
425
|
n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
|
|
426
426
|
}
|
|
427
427
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -443,19 +443,19 @@ class J {
|
|
|
443
443
|
get _$AU() {
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
|
-
constructor(t, e, s, n,
|
|
447
|
-
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options =
|
|
446
|
+
constructor(t, e, s, n, r) {
|
|
447
|
+
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = h;
|
|
448
448
|
}
|
|
449
449
|
_$AI(t, e = this, s, n) {
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
if (
|
|
450
|
+
const r = this.strings;
|
|
451
|
+
let i = !1;
|
|
452
|
+
if (r === void 0) t = I(this, t, e, 0), i = !F(t) || t !== this._$AH && t !== O, i && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
454
|
const c = t;
|
|
455
455
|
let a, f;
|
|
456
|
-
for (t =
|
|
456
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) f = I(this, c[s + a], e, a), f === O && (f = this._$AH[a]), i || (i = !F(f) || f !== this._$AH[a]), f === h ? t = h : t !== h && (t += (f ?? "") + r[a + 1]), this._$AH[a] = f;
|
|
457
457
|
}
|
|
458
|
-
|
|
458
|
+
i && !n && this.j(t);
|
|
459
459
|
}
|
|
460
460
|
j(t) {
|
|
461
461
|
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
@@ -478,13 +478,13 @@ class Vt extends J {
|
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
class Zt extends J {
|
|
481
|
-
constructor(t, e, s, n,
|
|
482
|
-
super(t, e, s, n,
|
|
481
|
+
constructor(t, e, s, n, r) {
|
|
482
|
+
super(t, e, s, n, r), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
485
|
if ((t = I(this, t, e, 0) ?? h) === O) return;
|
|
486
|
-
const s = this._$AH, n = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
|
|
487
|
-
n && this.element.removeEventListener(this.name, this, s),
|
|
486
|
+
const s = this._$AH, n = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== h && (s === h || n);
|
|
487
|
+
n && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(t) {
|
|
490
490
|
var e;
|
|
@@ -508,8 +508,8 @@ const Wt = (o, t, e) => {
|
|
|
508
508
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
509
|
let n = s._$litPart$;
|
|
510
510
|
if (n === void 0) {
|
|
511
|
-
const
|
|
512
|
-
s._$litPart$ = n = new Z(t.insertBefore(R(),
|
|
511
|
+
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
512
|
+
s._$litPart$ = n = new Z(t.insertBefore(R(), r), r, void 0, e ?? {});
|
|
513
513
|
}
|
|
514
514
|
return n._$AI(o), n;
|
|
515
515
|
};
|
|
@@ -518,7 +518,7 @@ const Wt = (o, t, e) => {
|
|
|
518
518
|
* Copyright 2017 Google LLC
|
|
519
519
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
520
520
|
*/
|
|
521
|
-
const
|
|
521
|
+
const k = globalThis;
|
|
522
522
|
let $ = class extends M {
|
|
523
523
|
constructor() {
|
|
524
524
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
@@ -545,10 +545,10 @@ let $ = class extends M {
|
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
var xt;
|
|
548
|
-
$._$litElement$ = !0, $.finalized = !0, (xt =
|
|
549
|
-
const nt =
|
|
548
|
+
$._$litElement$ = !0, $.finalized = !0, (xt = k.litElementHydrateSupport) == null || xt.call(k, { LitElement: $ });
|
|
549
|
+
const nt = k.litElementPolyfillSupport;
|
|
550
550
|
nt == null || nt({ LitElement: $ });
|
|
551
|
-
(
|
|
551
|
+
(k.litElementVersions ?? (k.litElementVersions = [])).push("4.2.0");
|
|
552
552
|
/**
|
|
553
553
|
* @license
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
@@ -564,31 +564,31 @@ const T = (o) => (t, e) => {
|
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const
|
|
567
|
+
const Kt = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ct }, Gt = (o = Kt, t, e) => {
|
|
568
568
|
const { kind: s, metadata: n } = e;
|
|
569
|
-
let
|
|
570
|
-
if (
|
|
571
|
-
const { name:
|
|
569
|
+
let r = globalThis.litPropertyMetadata.get(n);
|
|
570
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), s === "setter" && ((o = Object.create(o)).wrapped = !0), r.set(e.name, o), s === "accessor") {
|
|
571
|
+
const { name: i } = e;
|
|
572
572
|
return { set(c) {
|
|
573
573
|
const a = t.get.call(this);
|
|
574
|
-
t.set.call(this, c), this.requestUpdate(
|
|
574
|
+
t.set.call(this, c), this.requestUpdate(i, a, o);
|
|
575
575
|
}, init(c) {
|
|
576
|
-
return c !== void 0 && this.C(
|
|
576
|
+
return c !== void 0 && this.C(i, void 0, o, c), c;
|
|
577
577
|
} };
|
|
578
578
|
}
|
|
579
579
|
if (s === "setter") {
|
|
580
|
-
const { name:
|
|
580
|
+
const { name: i } = e;
|
|
581
581
|
return function(c) {
|
|
582
|
-
const a = this[
|
|
583
|
-
t.call(this, c), this.requestUpdate(
|
|
582
|
+
const a = this[i];
|
|
583
|
+
t.call(this, c), this.requestUpdate(i, a, o);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
586
|
throw Error("Unsupported decorator location: " + s);
|
|
587
587
|
};
|
|
588
588
|
function l(o) {
|
|
589
|
-
return (t, e) => typeof e == "object" ?
|
|
590
|
-
const
|
|
591
|
-
return n.constructor.createProperty(
|
|
589
|
+
return (t, e) => typeof e == "object" ? Gt(o, t, e) : ((s, n, r) => {
|
|
590
|
+
const i = n.hasOwnProperty(r);
|
|
591
|
+
return n.constructor.createProperty(r, s), i ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
592
592
|
})(o, t, e);
|
|
593
593
|
}
|
|
594
594
|
const Xt = E`
|
|
@@ -606,11 +606,11 @@ E`
|
|
|
606
606
|
* Copyright 2023 Google LLC
|
|
607
607
|
* SPDX-License-Identifier: Apache-2.0
|
|
608
608
|
*/
|
|
609
|
-
const
|
|
609
|
+
const dt = Symbol("internals"), ot = Symbol("privateInternals");
|
|
610
610
|
function Jt(o) {
|
|
611
611
|
var t;
|
|
612
612
|
class e extends o {
|
|
613
|
-
get [(t =
|
|
613
|
+
get [(t = dt, t)]() {
|
|
614
614
|
return this[ot] || (this[ot] = this.attachInternals()), this[ot];
|
|
615
615
|
}
|
|
616
616
|
}
|
|
@@ -625,15 +625,15 @@ function Qt(o) {
|
|
|
625
625
|
o.addInitializer((t) => {
|
|
626
626
|
const e = t;
|
|
627
627
|
e.addEventListener("click", async (s) => {
|
|
628
|
-
const { type: n, [
|
|
629
|
-
if (!(!
|
|
628
|
+
const { type: n, [dt]: r } = e, { form: i } = r;
|
|
629
|
+
if (!(!i || n === "button") && (await new Promise((c) => {
|
|
630
630
|
setTimeout(c);
|
|
631
631
|
}), !s.defaultPrevented)) {
|
|
632
632
|
if (n === "reset") {
|
|
633
|
-
|
|
633
|
+
i.reset();
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
|
-
|
|
636
|
+
i.addEventListener(
|
|
637
637
|
"submit",
|
|
638
638
|
(c) => {
|
|
639
639
|
Object.defineProperty(c, "submitter", {
|
|
@@ -643,7 +643,7 @@ function Qt(o) {
|
|
|
643
643
|
});
|
|
644
644
|
},
|
|
645
645
|
{ capture: !0, once: !0 }
|
|
646
|
-
),
|
|
646
|
+
), r.setFormValue(e.value), i.requestSubmit();
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
});
|
|
@@ -675,7 +675,7 @@ class ee {
|
|
|
675
675
|
* Copyright 2017 Google LLC
|
|
676
676
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
677
677
|
*/
|
|
678
|
-
class
|
|
678
|
+
class it extends ee {
|
|
679
679
|
constructor(t) {
|
|
680
680
|
if (super(t), this.it = h, t.type !== Yt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
681
681
|
}
|
|
@@ -689,16 +689,16 @@ class rt extends ee {
|
|
|
689
689
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
|
|
692
|
+
it.directiveName = "unsafeHTML", it.resultType = 1;
|
|
693
693
|
/**
|
|
694
694
|
* @license
|
|
695
695
|
* Copyright 2017 Google LLC
|
|
696
696
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
697
697
|
*/
|
|
698
|
-
class
|
|
698
|
+
class rt extends it {
|
|
699
699
|
}
|
|
700
|
-
|
|
701
|
-
const X = te(
|
|
700
|
+
rt.directiveName = "unsafeSVG", rt.resultType = 2;
|
|
701
|
+
const X = te(rt), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
702
702
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
703
703
|
</svg>
|
|
704
704
|
`, ne = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -707,10 +707,10 @@ const X = te(it), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
707
707
|
`, oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
708
708
|
<path d="M12.2266 8.16162C11.0953 9.26599 8.72489 11.8788 5.11546 16L4.63062 15.7172C5.78886 13.4007 7.17607 10.8283 8.79223 8C7.17607 5.17172 5.78886 2.59933 4.63062 0.282827L5.11546 0C8.72489 4.12121 11.0953 6.73401 12.2266 7.83838V8.16162Z" fill="#3F2B2E"/>
|
|
709
709
|
</svg>
|
|
710
|
-
`,
|
|
710
|
+
`, ie = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
711
711
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
712
712
|
</svg>
|
|
713
|
-
`,
|
|
713
|
+
`, re = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
714
714
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834ZM7.98873 10.328L10.6602 12.2353L9.64573 9.15787L12.2721 7.28568H9.02576L8 4.17317L6.97424 7.28568H3.72786L6.35427 9.15787L5.33977 12.2353L8.01127 10.328H7.98873Z" fill="#3F2B2E"/>
|
|
715
715
|
</svg>
|
|
716
716
|
`, ae = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -725,11 +725,11 @@ const X = te(it), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
725
725
|
`, he = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
726
726
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834Z" fill="#3F2B2E"/>
|
|
727
727
|
</svg>
|
|
728
|
-
`,
|
|
728
|
+
`, de = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
729
729
|
<path d="M2 2L14 14" stroke="#3F2B2E"/>
|
|
730
730
|
<path d="M14 2L2 14" stroke="#3F2B2E"/>
|
|
731
731
|
</svg>
|
|
732
|
-
`,
|
|
732
|
+
`, pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
733
733
|
<path d="M7.12506 1C10.5018 1 13.2509 3.74834 13.251 7.125C13.2511 8.59738 12.7172 10.0206 11.7491 11.1299L14.8731 14.2539C15.0433 14.4253 15.0435 14.7018 14.8731 14.873C14.7913 14.9555 14.6797 15.002 14.5635 15.002C14.4475 15.0019 14.3357 14.9554 14.254 14.873L11.1309 11.749C10.0555 12.6818 8.6564 13.251 7.12506 13.251C3.7484 13.2508 1.00006 10.5017 1.00006 7.125C1.00025 3.74846 3.74852 1.00019 7.12506 1ZM7.12506 1.875C4.22971 1.87522 1.87506 4.23058 1.87506 7.12598C1.87532 10.0212 4.22987 12.3758 7.12506 12.376C10.0204 12.376 12.3758 10.0213 12.376 7.12598C12.376 4.23044 10.0206 1.875 7.12506 1.875Z" fill="#3F2B2E"/>
|
|
734
734
|
</svg>
|
|
735
735
|
`, ue = `<?xml version="1.0" encoding="utf-8"?>
|
|
@@ -751,24 +751,24 @@ const X = te(it), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
751
751
|
</style>
|
|
752
752
|
<path class="st0" d="M27.3,20.7H12.7c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7h14.7c0.4,0,0.7,0.3,0.7,0.7S27.7,20.7,27.3,20.7z"/>
|
|
753
753
|
</svg>
|
|
754
|
-
`,
|
|
754
|
+
`, pt = {
|
|
755
755
|
wishlist: se,
|
|
756
756
|
playerv: ne,
|
|
757
757
|
chevronRight: oe,
|
|
758
|
-
chevronLeft:
|
|
758
|
+
chevronLeft: ie,
|
|
759
759
|
icoPlus: ue,
|
|
760
760
|
icoMinus: fe,
|
|
761
|
-
"star-0":
|
|
761
|
+
"star-0": re,
|
|
762
762
|
"star-25": ae,
|
|
763
763
|
"star-50": le,
|
|
764
764
|
"star-75": ce,
|
|
765
765
|
"star-100": he,
|
|
766
|
-
cross:
|
|
767
|
-
search:
|
|
766
|
+
cross: de,
|
|
767
|
+
search: pe
|
|
768
768
|
};
|
|
769
769
|
var ge = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, C = (o, t, e, s) => {
|
|
770
|
-
for (var n = s > 1 ? void 0 : s ? ve(t, e) : t,
|
|
771
|
-
(
|
|
770
|
+
for (var n = s > 1 ? void 0 : s ? ve(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
771
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
772
772
|
return s && n && ge(t, e, n), n;
|
|
773
773
|
};
|
|
774
774
|
let m = class extends $ {
|
|
@@ -779,16 +779,16 @@ let m = class extends $ {
|
|
|
779
779
|
super.updated(o), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
780
780
|
}
|
|
781
781
|
render() {
|
|
782
|
-
const o =
|
|
782
|
+
const o = pt[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace(
|
|
783
783
|
"<svg",
|
|
784
784
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
785
785
|
);
|
|
786
|
-
return
|
|
787
|
-
${this.type === "span" ?
|
|
786
|
+
return d`
|
|
787
|
+
${this.type === "span" ? d`
|
|
788
788
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
789
789
|
${X(e)}
|
|
790
790
|
</span>
|
|
791
|
-
` :
|
|
791
|
+
` : d`
|
|
792
792
|
<button
|
|
793
793
|
type="button"
|
|
794
794
|
aria-label="icon"
|
|
@@ -984,8 +984,8 @@ m = C([
|
|
|
984
984
|
T("o-icon-button")
|
|
985
985
|
], m);
|
|
986
986
|
var be = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, v = (o, t, e, s) => {
|
|
987
|
-
for (var n = s > 1 ? void 0 : s ? ye(t, e) : t,
|
|
988
|
-
(
|
|
987
|
+
for (var n = s > 1 ? void 0 : s ? ye(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
988
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
989
989
|
return s && n && be(t, e, n), n;
|
|
990
990
|
};
|
|
991
991
|
const $e = Jt($);
|
|
@@ -1000,13 +1000,13 @@ let u = class extends $e {
|
|
|
1000
1000
|
this.setAttribute("name", o);
|
|
1001
1001
|
}
|
|
1002
1002
|
get form() {
|
|
1003
|
-
return this[
|
|
1003
|
+
return this[dt].form;
|
|
1004
1004
|
}
|
|
1005
1005
|
render() {
|
|
1006
1006
|
return this.href ? this.renderLink() : this.renderButton();
|
|
1007
1007
|
}
|
|
1008
1008
|
renderIcon(o) {
|
|
1009
|
-
return this.icon ?
|
|
1009
|
+
return this.icon ? d`<o-icon-button
|
|
1010
1010
|
class=${o === "start" ? "icon-start" : "icon-end"}
|
|
1011
1011
|
icon=${this.icon}
|
|
1012
1012
|
bgstyle="${this.variant === "primary" ? "none-light" : "none-contrast"}"
|
|
@@ -1019,20 +1019,20 @@ let u = class extends $e {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
renderButton() {
|
|
1021
1021
|
const o = this.text || this.textsecond;
|
|
1022
|
-
return
|
|
1022
|
+
return d`
|
|
1023
1023
|
<button class="button" ?disabled=${this.disabled}>
|
|
1024
1024
|
${this.startIcon ? this.renderIcon("start") : h}
|
|
1025
|
-
${o ?
|
|
1026
|
-
${this.text ?
|
|
1027
|
-
${this.textsecond ?
|
|
1028
|
-
` :
|
|
1025
|
+
${o ? d`
|
|
1026
|
+
${this.text ? d`<span>${this.text}</span>` : h}
|
|
1027
|
+
${this.textsecond ? d`<span>${this.textsecond}</span>` : h}
|
|
1028
|
+
` : d`<slot></slot>`}
|
|
1029
1029
|
${this.endIcon ? this.renderIcon("end") : h}
|
|
1030
1030
|
</button>
|
|
1031
1031
|
`;
|
|
1032
1032
|
}
|
|
1033
1033
|
renderLink() {
|
|
1034
1034
|
const o = this.text || this.textsecond;
|
|
1035
|
-
return
|
|
1035
|
+
return d`
|
|
1036
1036
|
<a
|
|
1037
1037
|
href=${this.href}
|
|
1038
1038
|
target=${this.target || h}
|
|
@@ -1040,10 +1040,10 @@ let u = class extends $e {
|
|
|
1040
1040
|
?disabled=${this.disabled}
|
|
1041
1041
|
>
|
|
1042
1042
|
${this.startIcon ? this.renderIcon("start") : h}
|
|
1043
|
-
${o ?
|
|
1044
|
-
${this.text ?
|
|
1045
|
-
${this.textsecond ?
|
|
1046
|
-
` :
|
|
1043
|
+
${o ? d`
|
|
1044
|
+
${this.text ? d`<span>${this.text}</span>` : h}
|
|
1045
|
+
${this.textsecond ? d`<span>${this.textsecond}</span>` : h}
|
|
1046
|
+
` : d`<slot></slot>`}
|
|
1047
1047
|
${this.endIcon ? this.renderIcon("end") : h}
|
|
1048
1048
|
</a>
|
|
1049
1049
|
`;
|
|
@@ -1227,42 +1227,48 @@ u = v([
|
|
|
1227
1227
|
T("o-button")
|
|
1228
1228
|
], u);
|
|
1229
1229
|
var me = Object.defineProperty, we = Object.getOwnPropertyDescriptor, Q = (o, t, e, s) => {
|
|
1230
|
-
for (var n = s > 1 ? void 0 : s ? we(t, e) : t,
|
|
1231
|
-
(
|
|
1230
|
+
for (var n = s > 1 ? void 0 : s ? we(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1231
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1232
1232
|
return s && n && me(t, e, n), n;
|
|
1233
1233
|
};
|
|
1234
1234
|
let z = class extends $ {
|
|
1235
1235
|
constructor() {
|
|
1236
|
-
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist"
|
|
1236
|
+
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
|
|
1237
|
+
this.status = this.status === "empty" ? "filled" : "empty", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
|
|
1238
|
+
detail: { status: this.status },
|
|
1239
|
+
bubbles: !0,
|
|
1240
|
+
composed: !0
|
|
1241
|
+
}));
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1244
|
+
connectedCallback() {
|
|
1245
|
+
super.connectedCallback(), this.setAttribute("tabindex", "0"), this.setAttribute("role", "button"), this.setAttribute("aria-pressed", String(this.status === "filled"));
|
|
1246
|
+
}
|
|
1247
|
+
firstUpdated() {
|
|
1248
|
+
this.addEventListener("click", this.toggleStatus), this.addEventListener("keydown", this.handleKeydown);
|
|
1249
|
+
}
|
|
1250
|
+
handleKeydown(o) {
|
|
1251
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), this.toggleStatus());
|
|
1237
1252
|
}
|
|
1238
1253
|
render() {
|
|
1239
|
-
const o =
|
|
1254
|
+
const o = pt.wishlist.replace(
|
|
1240
1255
|
"<svg",
|
|
1241
1256
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1242
1257
|
);
|
|
1243
|
-
return
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
}
|
|
1255
|
-
handleClick(o) {
|
|
1256
|
-
this.toggleStatus(), this.dispatchEvent(new MouseEvent("click", {
|
|
1257
|
-
bubbles: !0,
|
|
1258
|
-
composed: !0
|
|
1259
|
-
}));
|
|
1260
|
-
}
|
|
1261
|
-
toggleStatus() {
|
|
1262
|
-
this.status = this.status == "empty" ? "filled" : "empty";
|
|
1258
|
+
return d`
|
|
1259
|
+
<button
|
|
1260
|
+
type="button"
|
|
1261
|
+
aria-describedby="${this.ariaDescribedBy}"
|
|
1262
|
+
class="wishlist-button"
|
|
1263
|
+
tabindex="-1"
|
|
1264
|
+
>
|
|
1265
|
+
<span class="sr-only">${this.label}</span>
|
|
1266
|
+
${X(o)}
|
|
1267
|
+
</button>
|
|
1268
|
+
`;
|
|
1263
1269
|
}
|
|
1264
1270
|
setStatus(o) {
|
|
1265
|
-
this.status = o, this.requestUpdate();
|
|
1271
|
+
this.status = o, this.setAttribute("aria-pressed", String(this.status === "filled")), this.requestUpdate();
|
|
1266
1272
|
}
|
|
1267
1273
|
setAriaDescribedBy(o) {
|
|
1268
1274
|
this.ariaDescribedBy = o, this.requestUpdate();
|
|
@@ -1272,47 +1278,38 @@ let z = class extends $ {
|
|
|
1272
1278
|
}
|
|
1273
1279
|
};
|
|
1274
1280
|
z.styles = E`
|
|
1275
|
-
|
|
1281
|
+
:host {
|
|
1276
1282
|
display: inline-flex;
|
|
1277
1283
|
justify-content: center;
|
|
1278
1284
|
align-items: center;
|
|
1279
|
-
|
|
1280
|
-
|
|
1285
|
+
outline: none;
|
|
1286
|
+
}
|
|
1281
1287
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
width: 40px;
|
|
1287
|
-
height: 40px;
|
|
1288
|
-
border: transparent;
|
|
1289
|
-
border-radius: var(--radius-full);
|
|
1290
|
-
background-color: var(--color-alpha-light-strong);
|
|
1291
|
-
position: relative;
|
|
1292
|
-
cursor: pointer;
|
|
1293
|
-
}
|
|
1288
|
+
:host(:focus-visible) {
|
|
1289
|
+
outline: 1px dashed var(--color-content-action-secondary);
|
|
1290
|
+
outline-offset: 1px;
|
|
1291
|
+
}
|
|
1294
1292
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
-
|
|
1299
|
-
|
|
1300
|
-
height:
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
position:
|
|
1305
|
-
|
|
1306
|
-
white-space: nowrap !important;
|
|
1293
|
+
.wishlist-button {
|
|
1294
|
+
display: flex;
|
|
1295
|
+
justify-content: center;
|
|
1296
|
+
align-items: center;
|
|
1297
|
+
width: 40px;
|
|
1298
|
+
height: 40px;
|
|
1299
|
+
border: transparent;
|
|
1300
|
+
border-radius: var(--radius-full);
|
|
1301
|
+
background-color: var(--color-alpha-light-strong);
|
|
1302
|
+
position: relative;
|
|
1303
|
+
cursor: pointer;
|
|
1307
1304
|
}
|
|
1308
1305
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1306
|
+
.wishlist-button:hover {
|
|
1307
|
+
background-color: var(--color-alpha-light-stronger);
|
|
1308
|
+
}
|
|
1312
1309
|
|
|
1313
1310
|
:host([status="filled"]) .wishlist-button {
|
|
1314
|
-
|
|
1315
|
-
|
|
1311
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1312
|
+
}
|
|
1316
1313
|
|
|
1317
1314
|
.wishlist-button:hover svg path {
|
|
1318
1315
|
fill: var(--color-content-action-secondary);
|
|
@@ -1325,7 +1322,21 @@ z.styles = E`
|
|
|
1325
1322
|
:host([status="filled"]) .wishlist-button:hover svg path {
|
|
1326
1323
|
fill: var(--color-alpha-light-strong);
|
|
1327
1324
|
}
|
|
1328
|
-
|
|
1325
|
+
|
|
1326
|
+
.sr-only {
|
|
1327
|
+
border: 0 !important;
|
|
1328
|
+
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
1329
|
+
-webkit-clip-path: inset(50%) !important;
|
|
1330
|
+
clip-path: inset(50%) !important;
|
|
1331
|
+
height: 0.1rem !important;
|
|
1332
|
+
margin: -0.1rem !important;
|
|
1333
|
+
overflow: hidden !important;
|
|
1334
|
+
padding: 0 !important;
|
|
1335
|
+
position: absolute !important;
|
|
1336
|
+
width: 0.1rem !important;
|
|
1337
|
+
white-space: nowrap !important;
|
|
1338
|
+
}
|
|
1339
|
+
`;
|
|
1329
1340
|
Q([
|
|
1330
1341
|
l({ type: String, reflect: !0 })
|
|
1331
1342
|
], z.prototype, "status", 2);
|
|
@@ -1339,8 +1350,8 @@ z = Q([
|
|
|
1339
1350
|
T("o-wishlist-button")
|
|
1340
1351
|
], z);
|
|
1341
1352
|
var _e = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, H = (o, t, e, s) => {
|
|
1342
|
-
for (var n = s > 1 ? void 0 : s ? xe(t, e) : t,
|
|
1343
|
-
(
|
|
1353
|
+
for (var n = s > 1 ? void 0 : s ? xe(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1354
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1344
1355
|
return s && n && _e(t, e, n), n;
|
|
1345
1356
|
};
|
|
1346
1357
|
let _ = class extends $ {
|
|
@@ -1348,9 +1359,9 @@ let _ = class extends $ {
|
|
|
1348
1359
|
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
|
|
1349
1360
|
}
|
|
1350
1361
|
render() {
|
|
1351
|
-
return
|
|
1362
|
+
return d`
|
|
1352
1363
|
<a href="${this.href}" target="${this.target}">
|
|
1353
|
-
${this.endIcon && this.reverseEndIcon ?
|
|
1364
|
+
${this.endIcon && this.reverseEndIcon ? d`
|
|
1354
1365
|
<o-icon-button
|
|
1355
1366
|
icon="chevronLeft"
|
|
1356
1367
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1360,7 +1371,7 @@ let _ = class extends $ {
|
|
|
1360
1371
|
></o-icon-button>
|
|
1361
1372
|
` : null}
|
|
1362
1373
|
<span class="link-text"><slot></slot></span>
|
|
1363
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
1374
|
+
${this.endIcon && !this.reverseEndIcon ? d`
|
|
1364
1375
|
<o-icon-button
|
|
1365
1376
|
icon="chevronRight"
|
|
1366
1377
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1483,8 +1494,8 @@ _ = H([
|
|
|
1483
1494
|
T("o-link")
|
|
1484
1495
|
], _);
|
|
1485
1496
|
var Ae = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, Y = (o, t, e, s) => {
|
|
1486
|
-
for (var n = s > 1 ? void 0 : s ? Se(t, e) : t,
|
|
1487
|
-
(
|
|
1497
|
+
for (var n = s > 1 ? void 0 : s ? Se(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1498
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1488
1499
|
return s && n && Ae(t, e, n), n;
|
|
1489
1500
|
};
|
|
1490
1501
|
let U = class extends $ {
|
|
@@ -1502,14 +1513,14 @@ let U = class extends $ {
|
|
|
1502
1513
|
}
|
|
1503
1514
|
render() {
|
|
1504
1515
|
const o = this.getStarKeys();
|
|
1505
|
-
return
|
|
1516
|
+
return d`
|
|
1506
1517
|
<div class="rating">
|
|
1507
1518
|
<div class="stars">
|
|
1508
1519
|
${o.map(
|
|
1509
|
-
(t) =>
|
|
1520
|
+
(t) => d`<span class="star">${X(pt[t] ?? "")}</span>`
|
|
1510
1521
|
)}
|
|
1511
1522
|
</div>
|
|
1512
|
-
${this.reviewCount != null && this.href != null ?
|
|
1523
|
+
${this.reviewCount != null && this.href != null ? d`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
1513
1524
|
</div>
|
|
1514
1525
|
`;
|
|
1515
1526
|
}
|
|
@@ -1561,8 +1572,8 @@ U = Y([
|
|
|
1561
1572
|
T("o-rating")
|
|
1562
1573
|
], U);
|
|
1563
1574
|
var Ee = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, y = (o, t, e, s) => {
|
|
1564
|
-
for (var n = s > 1 ? void 0 : s ? Ce(t, e) : t,
|
|
1565
|
-
(
|
|
1575
|
+
for (var n = s > 1 ? void 0 : s ? Ce(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1576
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1566
1577
|
return s && n && Ee(t, e, n), n;
|
|
1567
1578
|
};
|
|
1568
1579
|
let b = class extends $ {
|
|
@@ -1610,7 +1621,7 @@ let b = class extends $ {
|
|
|
1610
1621
|
typeof this.onSecondaryButtonClick == "function" && this.onSecondaryButtonClick(), this.closePanel();
|
|
1611
1622
|
}
|
|
1612
1623
|
render() {
|
|
1613
|
-
return
|
|
1624
|
+
return d`
|
|
1614
1625
|
<div class="overlay" @click=${this.closePanel}></div>
|
|
1615
1626
|
<div
|
|
1616
1627
|
class="panel"
|
|
@@ -1620,7 +1631,7 @@ let b = class extends $ {
|
|
|
1620
1631
|
>
|
|
1621
1632
|
<o-icon-button icon="cross" size="medium" class="close-btn" @click=${this.closePanel} aria-label="${this.closeButtonLabel}"></o-icon-button>
|
|
1622
1633
|
|
|
1623
|
-
${this.showHeader ?
|
|
1634
|
+
${this.showHeader ? d`
|
|
1624
1635
|
<div class="header">
|
|
1625
1636
|
<span id="panel-title" class="panel-title">${this.headerTitle}</span>
|
|
1626
1637
|
</div>
|
|
@@ -1630,9 +1641,9 @@ let b = class extends $ {
|
|
|
1630
1641
|
<slot></slot>
|
|
1631
1642
|
</div>
|
|
1632
1643
|
|
|
1633
|
-
${this.showFooter && this.firstButtonVariant && this.firstButtonLabel || this.secondaryButtonVariant && this.secondaryButtonLabel ?
|
|
1644
|
+
${this.showFooter && this.firstButtonVariant && this.firstButtonLabel || this.secondaryButtonVariant && this.secondaryButtonLabel ? d`
|
|
1634
1645
|
<div class="footer">
|
|
1635
|
-
${this.firstButtonVariant && this.firstButtonLabel ?
|
|
1646
|
+
${this.firstButtonVariant && this.firstButtonLabel ? d`
|
|
1636
1647
|
<o-button
|
|
1637
1648
|
customclass="full"
|
|
1638
1649
|
variant="${this.firstButtonVariant}"
|
|
@@ -1642,7 +1653,7 @@ let b = class extends $ {
|
|
|
1642
1653
|
</o-button>
|
|
1643
1654
|
` : null}
|
|
1644
1655
|
|
|
1645
|
-
${this.secondaryButtonVariant && this.secondaryButtonLabel ?
|
|
1656
|
+
${this.secondaryButtonVariant && this.secondaryButtonLabel ? d`
|
|
1646
1657
|
<o-button
|
|
1647
1658
|
customclass="full"
|
|
1648
1659
|
variant="${this.secondaryButtonVariant}"
|