@florid-kit/components 0.7.2 → 0.7.5
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/components/dropdown-variant.d.ts +14 -10
- package/components/dropdown.d.ts +8 -6
- package/components/icon-button.d.ts +2 -0
- package/index.js +137 -106
- package/index.mjs +374 -311
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -35,7 +35,7 @@ const Ft = (o) => new Mt(typeof o == "string" ? o : o + "", void 0, wt), w = (o,
|
|
|
35
35
|
const n = document.createElement("style"), i = rt.litNonce;
|
|
36
36
|
i !== void 0 && n.setAttribute("nonce", i), n.textContent = e.cssText, o.appendChild(n);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, St = mt ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const n of t.cssRules) e += n.cssText;
|
|
41
41
|
return Ft(e);
|
|
@@ -45,7 +45,7 @@ const Ft = (o) => new Mt(typeof o == "string" ? o : o + "", void 0, wt), w = (o,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: Vt, defineProperty: Zt, getOwnPropertyDescriptor:
|
|
48
|
+
const { is: Vt, defineProperty: Zt, getOwnPropertyDescriptor: qt, getOwnPropertyNames: Wt, getOwnPropertySymbols: Kt, getPrototypeOf: Gt } = Object, B = globalThis, Et = B.trustedTypes, Xt = Et ? Et.emptyScript : "", dt = B.reactiveElementPolyfillSupport, X = (o, t) => o, st = { toAttribute(o, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
o = o ? Xt : null;
|
|
@@ -74,8 +74,8 @@ const { is: Vt, defineProperty: Zt, getOwnPropertyDescriptor: Wt, getOwnProperty
|
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
76
|
} }, xt = (o, t) => !Vt(o, t), Lt = { attribute: !0, type: String, converter: st, reflect: !1, useDefault: !1, hasChanged: xt };
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
let
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), B.litPropertyMetadata ?? (B.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let V = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
81
|
}
|
|
@@ -89,7 +89,7 @@ let R = class extends HTMLElement {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, n) {
|
|
92
|
-
const { get: i, set: s } =
|
|
92
|
+
const { get: i, set: s } = qt(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(r) {
|
|
95
95
|
this[e] = r;
|
|
@@ -110,7 +110,7 @@ let R = class extends HTMLElement {
|
|
|
110
110
|
static finalize() {
|
|
111
111
|
if (this.hasOwnProperty(X("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(X("properties"))) {
|
|
113
|
-
const e = this.properties, n = [...
|
|
113
|
+
const e = this.properties, n = [...Wt(e), ...Kt(e)];
|
|
114
114
|
for (const i of n) this.createProperty(i, e[i]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
@@ -129,8 +129,8 @@ let R = class extends HTMLElement {
|
|
|
129
129
|
const e = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
131
|
const n = new Set(t.flat(1 / 0).reverse());
|
|
132
|
-
for (const i of n) e.unshift(
|
|
133
|
-
} else t !== void 0 && e.push(
|
|
132
|
+
for (const i of n) e.unshift(St(i));
|
|
133
|
+
} else t !== void 0 && e.push(St(t));
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, e) {
|
|
@@ -192,8 +192,8 @@ let R = class extends HTMLElement {
|
|
|
192
192
|
var s, r;
|
|
193
193
|
const n = this.constructor, i = n._$Eh.get(t);
|
|
194
194
|
if (i !== void 0 && this._$Em !== i) {
|
|
195
|
-
const h = n.getPropertyOptions(i),
|
|
196
|
-
this._$Em = i, this[i] =
|
|
195
|
+
const h = n.getPropertyOptions(i), c = typeof h.converter == "function" ? { fromAttribute: h.converter } : ((s = h.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? h.converter : st;
|
|
196
|
+
this._$Em = i, this[i] = c.fromAttribute(e, h.type) ?? ((r = this._$Ej) == null ? void 0 : r.get(i)) ?? null, this._$Em = null;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
requestUpdate(t, e, n) {
|
|
@@ -231,8 +231,8 @@ let R = class extends HTMLElement {
|
|
|
231
231
|
}
|
|
232
232
|
const i = this.constructor.elementProperties;
|
|
233
233
|
if (i.size > 0) for (const [s, r] of i) {
|
|
234
|
-
const { wrapped: h } = r,
|
|
235
|
-
h !== !0 || this._$AL.has(s) ||
|
|
234
|
+
const { wrapped: h } = r, c = this[s];
|
|
235
|
+
h !== !0 || this._$AL.has(s) || c === void 0 || this.C(s, void 0, r, c);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
let t = !1;
|
|
@@ -276,28 +276,28 @@ let R = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(t) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
|
|
279
|
+
V.elementStyles = [], V.shadowRootOptions = { mode: "open" }, V[X("elementProperties")] = /* @__PURE__ */ new Map(), V[X("finalized")] = /* @__PURE__ */ new Map(), dt == null || dt({ ReactiveElement: V }), (B.reactiveElementVersions ?? (B.reactiveElementVersions = [])).push("2.1.0");
|
|
280
280
|
/**
|
|
281
281
|
* @license
|
|
282
282
|
* Copyright 2017 Google LLC
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
|
-
const J = globalThis, at = J.trustedTypes, It = at ? at.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Tt = "$lit$",
|
|
286
|
-
\f\r]`,
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, Ut = /^(?:script|style|textarea|title)$/i, Qt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }),
|
|
285
|
+
const J = globalThis, at = J.trustedTypes, It = at ? at.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Tt = "$lit$", O = `lit$${Math.random().toFixed(9).slice(2)}$`, jt = "?" + O, Jt = `<${jt}>`, j = document, Y = () => j.createComment(""), Q = (o) => o === null || typeof o != "object" && typeof o != "function", $t = Array.isArray, Yt = (o) => $t(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", pt = `[
|
|
286
|
+
\f\r]`, G = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pt = /-->/g, Ot = />/g, D = RegExp(`>|${pt}(?:([^\\s"'>=/]+)(${pt}*=${pt}*(?:[^
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, Ut = /^(?:script|style|textarea|title)$/i, Qt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), l = Qt(1), U = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), M = j.createTreeWalker(j, 129);
|
|
288
288
|
function Nt(o, t) {
|
|
289
289
|
if (!$t(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
290
|
return It !== void 0 ? It.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
292
|
const te = (o, t) => {
|
|
293
293
|
const e = o.length - 1, n = [];
|
|
294
|
-
let i, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r =
|
|
294
|
+
let i, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = G;
|
|
295
295
|
for (let h = 0; h < e; h++) {
|
|
296
|
-
const
|
|
297
|
-
let v, b, p = -1,
|
|
298
|
-
for (;
|
|
299
|
-
const
|
|
300
|
-
s += r ===
|
|
296
|
+
const c = o[h];
|
|
297
|
+
let v, b, p = -1, S = 0;
|
|
298
|
+
for (; S < c.length && (r.lastIndex = S, b = r.exec(c), b !== null); ) S = r.lastIndex, r === G ? b[1] === "!--" ? r = Pt : b[1] !== void 0 ? r = Ot : b[2] !== void 0 ? (Ut.test(b[2]) && (i = RegExp("</" + b[2], "g")), r = D) : b[3] !== void 0 && (r = D) : r === D ? b[0] === ">" ? (r = i ?? G, p = -1) : b[1] === void 0 ? p = -2 : (p = r.lastIndex - b[2].length, v = b[1], r = b[3] === void 0 ? D : b[3] === '"' ? zt : Bt) : r === zt || r === Bt ? r = D : r === Pt || r === Ot ? r = G : (r = D, i = void 0);
|
|
299
|
+
const P = r === D && o[h + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
s += r === G ? c + Jt : p >= 0 ? (n.push(v), c.slice(0, p) + Tt + c.slice(p) + O + P) : c + O + (p === -2 ? h : P);
|
|
301
301
|
}
|
|
302
302
|
return [Nt(o, s + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), n];
|
|
303
303
|
};
|
|
@@ -306,44 +306,44 @@ class tt {
|
|
|
306
306
|
let i;
|
|
307
307
|
this.parts = [];
|
|
308
308
|
let s = 0, r = 0;
|
|
309
|
-
const h = t.length - 1,
|
|
310
|
-
if (this.el = tt.createElement(v, n),
|
|
309
|
+
const h = t.length - 1, c = this.parts, [v, b] = te(t, e);
|
|
310
|
+
if (this.el = tt.createElement(v, n), M.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
311
|
const p = this.el.content.firstChild;
|
|
312
312
|
p.replaceWith(...p.childNodes);
|
|
313
313
|
}
|
|
314
|
-
for (; (i =
|
|
314
|
+
for (; (i = M.nextNode()) !== null && c.length < h; ) {
|
|
315
315
|
if (i.nodeType === 1) {
|
|
316
316
|
if (i.hasAttributes()) for (const p of i.getAttributeNames()) if (p.endsWith(Tt)) {
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
} else p.startsWith(
|
|
317
|
+
const S = b[r++], P = i.getAttribute(p).split(O), nt = /([.?@])?(.*)/.exec(S);
|
|
318
|
+
c.push({ type: 1, index: s, name: nt[2], strings: P, ctor: nt[1] === "." ? oe : nt[1] === "?" ? ie : nt[1] === "@" ? ne : lt }), i.removeAttribute(p);
|
|
319
|
+
} else p.startsWith(O) && (c.push({ type: 6, index: s }), i.removeAttribute(p));
|
|
320
320
|
if (Ut.test(i.tagName)) {
|
|
321
|
-
const p = i.textContent.split(
|
|
322
|
-
if (
|
|
321
|
+
const p = i.textContent.split(O), S = p.length - 1;
|
|
322
|
+
if (S > 0) {
|
|
323
323
|
i.textContent = at ? at.emptyScript : "";
|
|
324
|
-
for (let
|
|
325
|
-
i.append(p[
|
|
324
|
+
for (let P = 0; P < S; P++) i.append(p[P], Y()), M.nextNode(), c.push({ type: 2, index: ++s });
|
|
325
|
+
i.append(p[S], Y());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (i.nodeType === 8) if (i.data === jt)
|
|
328
|
+
} else if (i.nodeType === 8) if (i.data === jt) c.push({ type: 2, index: s });
|
|
329
329
|
else {
|
|
330
330
|
let p = -1;
|
|
331
|
-
for (; (p = i.data.indexOf(
|
|
331
|
+
for (; (p = i.data.indexOf(O, p + 1)) !== -1; ) c.push({ type: 7, index: s }), p += O.length - 1;
|
|
332
332
|
}
|
|
333
333
|
s++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
337
|
-
const n =
|
|
337
|
+
const n = j.createElement("template");
|
|
338
338
|
return n.innerHTML = t, n;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Z(o, t, e = o, n) {
|
|
342
342
|
var r, h;
|
|
343
|
-
if (t ===
|
|
343
|
+
if (t === U) return t;
|
|
344
344
|
let i = n !== void 0 ? (r = e._$Co) == null ? void 0 : r[n] : e._$Cl;
|
|
345
345
|
const s = Q(t) ? void 0 : t._$litDirective$;
|
|
346
|
-
return (i == null ? void 0 : i.constructor) !== s && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), s === void 0 ? i = void 0 : (i = new s(o), i._$AT(o, e, n)), n !== void 0 ? (e._$Co ?? (e._$Co = []))[n] = i : e._$Cl = i), i !== void 0 && (t =
|
|
346
|
+
return (i == null ? void 0 : i.constructor) !== s && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), s === void 0 ? i = void 0 : (i = new s(o), i._$AT(o, e, n)), n !== void 0 ? (e._$Co ?? (e._$Co = []))[n] = i : e._$Cl = i), i !== void 0 && (t = Z(o, i._$AS(o, t.values), i, n)), t;
|
|
347
347
|
}
|
|
348
348
|
class ee {
|
|
349
349
|
constructor(t, e) {
|
|
@@ -356,17 +356,17 @@ class ee {
|
|
|
356
356
|
return this._$AM._$AU;
|
|
357
357
|
}
|
|
358
358
|
u(t) {
|
|
359
|
-
const { el: { content: e }, parts: n } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ??
|
|
360
|
-
|
|
361
|
-
let s =
|
|
362
|
-
for (;
|
|
363
|
-
if (r ===
|
|
359
|
+
const { el: { content: e }, parts: n } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? j).importNode(e, !0);
|
|
360
|
+
M.currentNode = i;
|
|
361
|
+
let s = M.nextNode(), r = 0, h = 0, c = n[0];
|
|
362
|
+
for (; c !== void 0; ) {
|
|
363
|
+
if (r === c.index) {
|
|
364
364
|
let v;
|
|
365
|
-
|
|
365
|
+
c.type === 2 ? v = new it(s, s.nextSibling, this, t) : c.type === 1 ? v = new c.ctor(s, c.name, c.strings, this, t) : c.type === 6 && (v = new re(s, this, t)), this._$AV.push(v), c = n[++h];
|
|
366
366
|
}
|
|
367
|
-
r !== (
|
|
367
|
+
r !== (c == null ? void 0 : c.index) && (s = M.nextNode(), r++);
|
|
368
368
|
}
|
|
369
|
-
return
|
|
369
|
+
return M.currentNode = j, i;
|
|
370
370
|
}
|
|
371
371
|
p(t) {
|
|
372
372
|
let e = 0;
|
|
@@ -393,7 +393,7 @@ class it {
|
|
|
393
393
|
return this._$AB;
|
|
394
394
|
}
|
|
395
395
|
_$AI(t, e = this) {
|
|
396
|
-
t =
|
|
396
|
+
t = Z(this, t, e), Q(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Yt(t) ? this.k(t) : this._(t);
|
|
397
397
|
}
|
|
398
398
|
O(t) {
|
|
399
399
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -402,7 +402,7 @@ class it {
|
|
|
402
402
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
403
403
|
}
|
|
404
404
|
_(t) {
|
|
405
|
-
this._$AH !== d && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
405
|
+
this._$AH !== d && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(j.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
408
|
var s;
|
|
@@ -449,11 +449,11 @@ class lt {
|
|
|
449
449
|
_$AI(t, e = this, n, i) {
|
|
450
450
|
const s = this.strings;
|
|
451
451
|
let r = !1;
|
|
452
|
-
if (s === void 0) t =
|
|
452
|
+
if (s === void 0) t = Z(this, t, e, 0), r = !Q(t) || t !== this._$AH && t !== U, r && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
454
|
const h = t;
|
|
455
|
-
let
|
|
456
|
-
for (t = s[0],
|
|
455
|
+
let c, v;
|
|
456
|
+
for (t = s[0], c = 0; c < s.length - 1; c++) v = Z(this, h[n + c], e, c), v === U && (v = this._$AH[c]), r || (r = !Q(v) || v !== this._$AH[c]), v === d ? t = d : t !== d && (t += (v ?? "") + s[c + 1]), this._$AH[c] = v;
|
|
457
457
|
}
|
|
458
458
|
r && !i && this.j(t);
|
|
459
459
|
}
|
|
@@ -482,7 +482,7 @@ class ne extends lt {
|
|
|
482
482
|
super(t, e, n, i, s), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
|
-
if ((t =
|
|
485
|
+
if ((t = Z(this, t, e, 0) ?? d) === U) return;
|
|
486
486
|
const n = this._$AH, i = t === d && n !== d || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, s = t !== d && (n === d || i);
|
|
487
487
|
i && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
@@ -499,7 +499,7 @@ class re {
|
|
|
499
499
|
return this._$AM._$AU;
|
|
500
500
|
}
|
|
501
501
|
_$AI(t) {
|
|
502
|
-
|
|
502
|
+
Z(this, t);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
const ut = J.litHtmlPolyfillSupport;
|
|
@@ -518,8 +518,8 @@ const se = (o, t, e) => {
|
|
|
518
518
|
* Copyright 2017 Google LLC
|
|
519
519
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
520
520
|
*/
|
|
521
|
-
const
|
|
522
|
-
let f = class extends
|
|
521
|
+
const T = globalThis;
|
|
522
|
+
let f = class extends V {
|
|
523
523
|
constructor() {
|
|
524
524
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
525
525
|
}
|
|
@@ -541,20 +541,20 @@ let f = class extends R {
|
|
|
541
541
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
542
542
|
}
|
|
543
543
|
render() {
|
|
544
|
-
return
|
|
544
|
+
return U;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
var Ht;
|
|
548
|
-
f._$litElement$ = !0, f.finalized = !0, (Ht =
|
|
549
|
-
const vt =
|
|
548
|
+
f._$litElement$ = !0, f.finalized = !0, (Ht = T.litElementHydrateSupport) == null || Ht.call(T, { LitElement: f });
|
|
549
|
+
const vt = T.litElementPolyfillSupport;
|
|
550
550
|
vt == null || vt({ LitElement: f });
|
|
551
|
-
(
|
|
551
|
+
(T.litElementVersions ?? (T.litElementVersions = [])).push("4.2.0");
|
|
552
552
|
/**
|
|
553
553
|
* @license
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
555
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
556
|
*/
|
|
557
|
-
const
|
|
557
|
+
const _ = (o) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
559
|
customElements.define(o, t);
|
|
560
560
|
}) : customElements.define(o, t);
|
|
@@ -570,8 +570,8 @@ const ae = { attribute: !0, type: String, converter: st, reflect: !1, hasChanged
|
|
|
570
570
|
if (s === void 0 && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), n === "setter" && ((o = Object.create(o)).wrapped = !0), s.set(e.name, o), n === "accessor") {
|
|
571
571
|
const { name: r } = e;
|
|
572
572
|
return { set(h) {
|
|
573
|
-
const
|
|
574
|
-
t.set.call(this, h), this.requestUpdate(r,
|
|
573
|
+
const c = t.get.call(this);
|
|
574
|
+
t.set.call(this, h), this.requestUpdate(r, c, o);
|
|
575
575
|
}, init(h) {
|
|
576
576
|
return h !== void 0 && this.C(r, void 0, o, h), h;
|
|
577
577
|
} };
|
|
@@ -579,8 +579,8 @@ const ae = { attribute: !0, type: String, converter: st, reflect: !1, hasChanged
|
|
|
579
579
|
if (n === "setter") {
|
|
580
580
|
const { name: r } = e;
|
|
581
581
|
return function(h) {
|
|
582
|
-
const
|
|
583
|
-
t.call(this, h), this.requestUpdate(r,
|
|
582
|
+
const c = this[r];
|
|
583
|
+
t.call(this, h), this.requestUpdate(r, c, o);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
586
|
throw Error("Unsupported decorator location: " + n);
|
|
@@ -596,7 +596,7 @@ function a(o) {
|
|
|
596
596
|
* Copyright 2017 Google LLC
|
|
597
597
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
598
598
|
*/
|
|
599
|
-
function
|
|
599
|
+
function N(o) {
|
|
600
600
|
return a({ ...o, state: !0, attribute: !1 });
|
|
601
601
|
}
|
|
602
602
|
const ce = w`
|
|
@@ -715,10 +715,10 @@ const pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="h
|
|
|
715
715
|
`, Ae = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
716
716
|
<path d="M14.1218 7.43502C13.9504 7.60543 13.6735 7.60543 13.5021 7.43502L8.55961 2.49408V14.5625C8.55961 14.8041 8.36365 15 8.12192 15C7.88018 15 7.68422 14.8041 7.68422 14.5625V2.49408L2.74177 7.43502C2.57002 7.60082 2.29703 7.59845 2.1282 7.4297C1.95936 7.26094 1.95699 6.98808 2.12287 6.81642L7.81203 1.13C7.89368 1.04685 8.00535 1 8.12192 1C8.23848 1 8.35015 1.04685 8.4318 1.13L14.121 6.81642C14.2921 6.98702 14.2925 7.26395 14.1218 7.43502Z" fill="#3F2B2E"/>
|
|
717
717
|
</svg>
|
|
718
|
-
`,
|
|
718
|
+
`, Se = `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
719
719
|
<path d="M6.33317 8.00033C6.33317 3.95024 7.52708 0.666992 8.99984 0.666992C10.4726 0.666992 11.6665 3.95024 11.6665 8.00033M5.33317 15.3337H12.6665L16.3332 6.20033C14.9582 5.76699 12.2998 5.33366 8.99984 5.33366C5.69984 5.33366 3.49984 5.76699 1.6665 6.20033L5.33317 15.3337Z" stroke="#3F2B2E"/>
|
|
720
720
|
</svg>
|
|
721
|
-
`,
|
|
721
|
+
`, Ee = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
722
722
|
<path d="M7.99376 14.4486C7.46684 14.4486 6.93991 14.251 6.54472 13.8558C6.14953 13.4606 5.8202 12.9995 5.68847 12.4067H3.77837C2.98798 12.4067 2.59279 12.4067 2.32933 12.1433C2.13173 12.0116 2 11.7481 2 11.5505C2 11.2212 2.13173 10.826 2.52692 10.1673L2.92212 9.4428C3.31731 8.78415 3.51491 8.05963 3.64664 7.3351L3.84423 5.68847C3.97596 4.63462 4.43702 3.7125 5.22741 3.05385C6.01779 2.39519 7.00578 2 7.99376 2C8.98174 2 10.0356 2.39519 10.7601 3.05385C11.5505 3.7125 12.0116 4.70049 12.1433 5.68847L12.3409 7.26924C12.4067 8.05963 12.6702 8.78415 13.0654 9.37693L13.4606 10.1015C13.8558 10.7601 14.0534 11.0894 13.9875 11.4846C13.9875 11.7481 13.8558 11.9457 13.6582 12.0774C13.3947 12.3409 12.9995 12.3409 12.2092 12.3409H10.2991C10.1673 12.9337 9.83799 13.4606 9.4428 13.7899C9.04761 14.1851 8.52068 14.3827 7.99376 14.3827V14.4486ZM6.28126 12.4067C6.41299 12.8019 6.61058 13.1971 6.93991 13.4606C7.5327 13.9875 8.45482 13.9875 9.11347 13.4606C9.4428 13.1971 9.6404 12.8019 9.77213 12.4067H6.28126ZM7.99376 2.65865C7.13751 2.65865 6.28126 2.98798 5.6226 3.58077C4.96395 4.17356 4.56875 4.96395 4.43702 5.88606L4.23943 7.46684C4.1077 8.32309 3.84423 9.11347 3.44904 9.83799L3.05385 10.5625C2.72452 11.0894 2.59279 11.3529 2.59279 11.5505C2.59279 11.6164 2.59279 11.7481 2.72452 11.814C2.85625 11.8798 3.25144 11.8798 3.77837 11.8798H12.2092C12.7361 11.8798 13.1971 11.8798 13.263 11.814C13.3289 11.814 13.3947 11.6822 13.3947 11.5505C13.3947 11.4188 13.1971 11.0894 12.9337 10.5625L12.5385 9.83799C12.0774 9.11347 11.814 8.32309 11.7481 7.5327L11.5505 5.88606C11.4846 5.02981 11.0236 4.17356 10.3649 3.58077C9.70626 2.98798 8.85001 2.65865 7.99376 2.65865Z" fill="#3F2B2E"/>
|
|
723
723
|
</svg>
|
|
724
724
|
`, Le = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -730,7 +730,7 @@ const pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="h
|
|
|
730
730
|
`, Pe = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
731
731
|
<path d="M5.24611 10.4659C5.04705 10.4654 4.85616 10.3867 4.71465 10.2467L0.210718 5.74273C-0.0737595 5.44819 -0.0696911 4.98 0.219862 4.69045C0.509415 4.4009 0.977603 4.39683 1.27214 4.6813L5.18306 8.59071L10.6628 1.74024C10.9219 1.41646 11.3945 1.36403 11.7183 1.62314C12.042 1.88225 12.0945 2.35477 11.8354 2.67856L5.83012 10.1851C5.69763 10.3521 5.49956 10.4539 5.28665 10.4643L5.24611 10.4659Z" fill="#3F2B2E"/>
|
|
732
732
|
</svg>
|
|
733
|
-
`,
|
|
733
|
+
`, K = {
|
|
734
734
|
wishlist: pe,
|
|
735
735
|
playerv: ue,
|
|
736
736
|
chevronRight: ve,
|
|
@@ -746,8 +746,8 @@ const pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="h
|
|
|
746
746
|
search: $e,
|
|
747
747
|
arrowLeft: ke,
|
|
748
748
|
arrowTop: Ae,
|
|
749
|
-
cart:
|
|
750
|
-
notifyme:
|
|
749
|
+
cart: Se,
|
|
750
|
+
notifyme: Ee,
|
|
751
751
|
triangledown: Le,
|
|
752
752
|
triangleup: Ie,
|
|
753
753
|
checkstroke: Pe
|
|
@@ -785,7 +785,7 @@ class bt extends ze {
|
|
|
785
785
|
}
|
|
786
786
|
render(t) {
|
|
787
787
|
if (t === d || t == null) return this._t = void 0, this.it = t;
|
|
788
|
-
if (t ===
|
|
788
|
+
if (t === U) return t;
|
|
789
789
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
790
790
|
if (t === this.it) return this._t;
|
|
791
791
|
this.it = t;
|
|
@@ -802,7 +802,7 @@ bt.directiveName = "unsafeHTML", bt.resultType = 1;
|
|
|
802
802
|
class ft extends bt {
|
|
803
803
|
}
|
|
804
804
|
ft.directiveName = "unsafeSVG", ft.resultType = 2;
|
|
805
|
-
const
|
|
805
|
+
const z = Be(ft);
|
|
806
806
|
var De = Object.defineProperty, He = Object.getOwnPropertyDescriptor, m = (o, t, e, n) => {
|
|
807
807
|
for (var i = n > 1 ? void 0 : n ? He(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
808
808
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
@@ -834,28 +834,28 @@ let u = class extends Me {
|
|
|
834
834
|
renderIcon(o) {
|
|
835
835
|
const t = o === "start" ? this.startIconModel : this.endIconModel;
|
|
836
836
|
if (!t) return d;
|
|
837
|
-
const e =
|
|
837
|
+
const e = K[t].replace(
|
|
838
838
|
"<svg",
|
|
839
839
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
840
840
|
);
|
|
841
|
-
return
|
|
841
|
+
return l`<span class="${o === "start" ? "icon-start" : "icon-end"}">${z(e)}</span>`;
|
|
842
842
|
}
|
|
843
843
|
renderButton() {
|
|
844
844
|
const o = this.text || this.textsecond;
|
|
845
|
-
return
|
|
845
|
+
return l`
|
|
846
846
|
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick}>
|
|
847
847
|
${this.startIcon ? this.renderIcon("start") : d}
|
|
848
|
-
${o ?
|
|
849
|
-
${this.text ?
|
|
850
|
-
${this.textsecond ?
|
|
851
|
-
` :
|
|
848
|
+
${o ? l`
|
|
849
|
+
${this.text ? l`<span class="text">${this.text}</span>` : d}
|
|
850
|
+
${this.textsecond ? l`<span class="text">${this.textsecond}</span>` : d}
|
|
851
|
+
` : l`<slot></slot>`}
|
|
852
852
|
${this.endIcon ? this.renderIcon("end") : d}
|
|
853
853
|
</button>
|
|
854
854
|
`;
|
|
855
855
|
}
|
|
856
856
|
renderLink() {
|
|
857
857
|
const o = this.text || this.textsecond;
|
|
858
|
-
return
|
|
858
|
+
return l`
|
|
859
859
|
<a
|
|
860
860
|
href=${this.href}
|
|
861
861
|
target=${this.target || d}
|
|
@@ -863,10 +863,10 @@ let u = class extends Me {
|
|
|
863
863
|
?disabled=${this.disabled}
|
|
864
864
|
>
|
|
865
865
|
${this.startIcon ? this.renderIcon("start") : d}
|
|
866
|
-
${o ?
|
|
867
|
-
${this.text ?
|
|
868
|
-
${this.textsecond ?
|
|
869
|
-
` :
|
|
866
|
+
${o ? l`
|
|
867
|
+
${this.text ? l`<span>${this.text}</span>` : d}
|
|
868
|
+
${this.textsecond ? l`<span>${this.textsecond}</span>` : d}
|
|
869
|
+
` : l`<slot></slot>`}
|
|
870
870
|
${this.endIcon ? this.renderIcon("end") : d}
|
|
871
871
|
</a>
|
|
872
872
|
`;
|
|
@@ -1075,14 +1075,14 @@ m([
|
|
|
1075
1075
|
a({ type: String })
|
|
1076
1076
|
], u.prototype, "target", 2);
|
|
1077
1077
|
u = m([
|
|
1078
|
-
|
|
1078
|
+
_("o-button")
|
|
1079
1079
|
], u);
|
|
1080
1080
|
var Te = Object.defineProperty, je = Object.getOwnPropertyDescriptor, ct = (o, t, e, n) => {
|
|
1081
1081
|
for (var i = n > 1 ? void 0 : n ? je(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
1082
1082
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
1083
1083
|
return n && i && Te(t, e, i), i;
|
|
1084
1084
|
};
|
|
1085
|
-
let
|
|
1085
|
+
let q = class extends f {
|
|
1086
1086
|
constructor() {
|
|
1087
1087
|
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
|
|
1088
1088
|
this.status = this.status === "empty" ? "filled" : "empty", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
|
|
@@ -1102,14 +1102,14 @@ let Z = class extends f {
|
|
|
1102
1102
|
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), this.toggleStatus());
|
|
1103
1103
|
}
|
|
1104
1104
|
render() {
|
|
1105
|
-
const o =
|
|
1105
|
+
const o = K.wishlist.replace(
|
|
1106
1106
|
"<svg",
|
|
1107
1107
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1108
1108
|
);
|
|
1109
|
-
return
|
|
1109
|
+
return l`
|
|
1110
1110
|
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
1111
1111
|
<span class="sr-only">${this.label}</span>
|
|
1112
|
-
${
|
|
1112
|
+
${z(o)}
|
|
1113
1113
|
</button>
|
|
1114
1114
|
`;
|
|
1115
1115
|
}
|
|
@@ -1123,7 +1123,7 @@ let Z = class extends f {
|
|
|
1123
1123
|
this.label = o, this.requestUpdate();
|
|
1124
1124
|
}
|
|
1125
1125
|
};
|
|
1126
|
-
|
|
1126
|
+
q.styles = w`
|
|
1127
1127
|
:host {
|
|
1128
1128
|
display: inline-flex;
|
|
1129
1129
|
justify-content: center;
|
|
@@ -1190,52 +1190,53 @@ Z.styles = w`
|
|
|
1190
1190
|
`;
|
|
1191
1191
|
ct([
|
|
1192
1192
|
a({ type: String, reflect: !0 })
|
|
1193
|
-
],
|
|
1193
|
+
], q.prototype, "status", 2);
|
|
1194
1194
|
ct([
|
|
1195
1195
|
a({ type: String, reflect: !0 })
|
|
1196
|
-
],
|
|
1196
|
+
], q.prototype, "ariaDescribedBy", 2);
|
|
1197
1197
|
ct([
|
|
1198
1198
|
a({ type: String, reflect: !0 })
|
|
1199
|
-
],
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
],
|
|
1203
|
-
var Ue = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor,
|
|
1199
|
+
], q.prototype, "label", 2);
|
|
1200
|
+
q = ct([
|
|
1201
|
+
_("o-wishlist-button")
|
|
1202
|
+
], q);
|
|
1203
|
+
var Ue = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, k = (o, t, e, n) => {
|
|
1204
1204
|
for (var i = n > 1 ? void 0 : n ? Ne(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
1205
1205
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
1206
1206
|
return n && i && Ue(t, e, i), i;
|
|
1207
1207
|
};
|
|
1208
|
-
let
|
|
1208
|
+
let x = class extends f {
|
|
1209
1209
|
constructor() {
|
|
1210
|
-
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
|
|
1210
|
+
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1, this.showSrLabel = !1, this.srLabel = "";
|
|
1211
1211
|
}
|
|
1212
1212
|
updated(o) {
|
|
1213
1213
|
super.updated(o), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
1214
1214
|
}
|
|
1215
1215
|
render() {
|
|
1216
|
-
const o =
|
|
1216
|
+
const o = K[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace(
|
|
1217
1217
|
"<svg",
|
|
1218
1218
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1219
|
-
);
|
|
1220
|
-
return
|
|
1221
|
-
${this.type === "span" ?
|
|
1219
|
+
), n = this.showSrLabel ? l`<span class="sr-only">${this.srLabel}</span>` : null;
|
|
1220
|
+
return l`
|
|
1221
|
+
${this.type === "span" ? l`
|
|
1222
1222
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1223
|
-
${
|
|
1223
|
+
${z(e)}
|
|
1224
1224
|
</span>
|
|
1225
|
-
` :
|
|
1225
|
+
` : l`
|
|
1226
1226
|
<button
|
|
1227
1227
|
type="button"
|
|
1228
1228
|
aria-label="icon"
|
|
1229
1229
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
1230
1230
|
?disabled="${this.disabled}"
|
|
1231
1231
|
>
|
|
1232
|
-
${
|
|
1232
|
+
${z(e)}
|
|
1233
|
+
${n}
|
|
1233
1234
|
</button>
|
|
1234
1235
|
`}
|
|
1235
1236
|
`;
|
|
1236
1237
|
}
|
|
1237
1238
|
};
|
|
1238
|
-
|
|
1239
|
+
x.styles = w`
|
|
1239
1240
|
:host {
|
|
1240
1241
|
display: inline-flex;
|
|
1241
1242
|
justify-content: center;
|
|
@@ -1432,40 +1433,49 @@ C.styles = w`
|
|
|
1432
1433
|
fill: var(--color-content-disabled);
|
|
1433
1434
|
}
|
|
1434
1435
|
}
|
|
1435
|
-
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
.sr-only {
|
|
1439
|
+
display: none;
|
|
1436
1440
|
}
|
|
1437
1441
|
`;
|
|
1438
|
-
|
|
1442
|
+
k([
|
|
1439
1443
|
a({ type: String, reflect: !0 })
|
|
1440
|
-
],
|
|
1441
|
-
|
|
1444
|
+
], x.prototype, "bgstyle", 2);
|
|
1445
|
+
k([
|
|
1442
1446
|
a({ type: String, reflect: !0 })
|
|
1443
|
-
],
|
|
1444
|
-
|
|
1447
|
+
], x.prototype, "size", 2);
|
|
1448
|
+
k([
|
|
1445
1449
|
a({ type: String, reflect: !0 })
|
|
1446
|
-
],
|
|
1447
|
-
|
|
1450
|
+
], x.prototype, "status", 2);
|
|
1451
|
+
k([
|
|
1448
1452
|
a({ type: String, reflect: !0 })
|
|
1449
|
-
],
|
|
1450
|
-
|
|
1453
|
+
], x.prototype, "type", 2);
|
|
1454
|
+
k([
|
|
1451
1455
|
a({ type: String })
|
|
1452
|
-
],
|
|
1453
|
-
|
|
1456
|
+
], x.prototype, "strokewidth", 2);
|
|
1457
|
+
k([
|
|
1454
1458
|
a({ type: String })
|
|
1455
|
-
],
|
|
1456
|
-
|
|
1459
|
+
], x.prototype, "icon", 2);
|
|
1460
|
+
k([
|
|
1457
1461
|
a({ type: Boolean, reflect: !0 })
|
|
1458
|
-
],
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
],
|
|
1462
|
+
], x.prototype, "disabled", 2);
|
|
1463
|
+
k([
|
|
1464
|
+
a({ type: Boolean })
|
|
1465
|
+
], x.prototype, "showSrLabel", 2);
|
|
1466
|
+
k([
|
|
1467
|
+
a({ type: String })
|
|
1468
|
+
], x.prototype, "srLabel", 2);
|
|
1469
|
+
x = k([
|
|
1470
|
+
_("o-icon-button")
|
|
1471
|
+
], x);
|
|
1462
1472
|
/**
|
|
1463
1473
|
* @license
|
|
1464
1474
|
* Copyright 2018 Google LLC
|
|
1465
1475
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1466
1476
|
*/
|
|
1467
|
-
const
|
|
1468
|
-
var Fe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor,
|
|
1477
|
+
const H = (o) => o ?? d;
|
|
1478
|
+
var Fe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, F = (o, t, e, n) => {
|
|
1469
1479
|
for (var i = n > 1 ? void 0 : n ? Re(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
1470
1480
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
1471
1481
|
return n && i && Fe(t, e, i), i;
|
|
@@ -1479,13 +1489,13 @@ let E = class extends f {
|
|
|
1479
1489
|
}
|
|
1480
1490
|
render() {
|
|
1481
1491
|
const o = this.href || "#";
|
|
1482
|
-
return
|
|
1492
|
+
return l`
|
|
1483
1493
|
<a
|
|
1484
1494
|
href="${o}"
|
|
1485
|
-
target="${
|
|
1495
|
+
target="${H(this.target || void 0)}"
|
|
1486
1496
|
@click="${this._handleClick}"
|
|
1487
1497
|
>
|
|
1488
|
-
${this.endIcon && this.reverseEndIcon ?
|
|
1498
|
+
${this.endIcon && this.reverseEndIcon ? l`
|
|
1489
1499
|
<o-icon-button
|
|
1490
1500
|
icon="chevronLeft"
|
|
1491
1501
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1495,7 +1505,7 @@ let E = class extends f {
|
|
|
1495
1505
|
></o-icon-button>
|
|
1496
1506
|
` : null}
|
|
1497
1507
|
<span class="link-text"><slot></slot></span>
|
|
1498
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
1508
|
+
${this.endIcon && !this.reverseEndIcon ? l`
|
|
1499
1509
|
<o-icon-button
|
|
1500
1510
|
icon="chevronRight"
|
|
1501
1511
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1596,26 +1606,26 @@ E.styles = w`
|
|
|
1596
1606
|
}
|
|
1597
1607
|
/* End of underline effect */
|
|
1598
1608
|
`;
|
|
1599
|
-
|
|
1609
|
+
F([
|
|
1600
1610
|
a({ type: String })
|
|
1601
1611
|
], E.prototype, "href", 2);
|
|
1602
|
-
|
|
1612
|
+
F([
|
|
1603
1613
|
a({ type: String })
|
|
1604
1614
|
], E.prototype, "target", 2);
|
|
1605
|
-
|
|
1615
|
+
F([
|
|
1606
1616
|
a({ type: String, reflect: !0 })
|
|
1607
1617
|
], E.prototype, "template", 2);
|
|
1608
|
-
|
|
1618
|
+
F([
|
|
1609
1619
|
a({ type: Boolean, reflect: !0 })
|
|
1610
1620
|
], E.prototype, "inverse", 2);
|
|
1611
|
-
|
|
1621
|
+
F([
|
|
1612
1622
|
a({ type: Boolean, reflect: !0 })
|
|
1613
1623
|
], E.prototype, "endIcon", 2);
|
|
1614
|
-
|
|
1624
|
+
F([
|
|
1615
1625
|
a({ type: Boolean, reflect: !0 })
|
|
1616
1626
|
], E.prototype, "reverseEndIcon", 2);
|
|
1617
|
-
E =
|
|
1618
|
-
|
|
1627
|
+
E = F([
|
|
1628
|
+
_("o-link")
|
|
1619
1629
|
], E);
|
|
1620
1630
|
var Ve = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, ht = (o, t, e, n) => {
|
|
1621
1631
|
for (var i = n > 1 ? void 0 : n ? Ze(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
@@ -1637,14 +1647,14 @@ let W = class extends f {
|
|
|
1637
1647
|
}
|
|
1638
1648
|
render() {
|
|
1639
1649
|
const o = this.getStarKeys();
|
|
1640
|
-
return
|
|
1650
|
+
return l`
|
|
1641
1651
|
<div class="rating">
|
|
1642
1652
|
<div class="stars">
|
|
1643
1653
|
${o.map(
|
|
1644
|
-
(t) =>
|
|
1654
|
+
(t) => l`<span class="star">${z(K[t] ?? "")}</span>`
|
|
1645
1655
|
)}
|
|
1646
1656
|
</div>
|
|
1647
|
-
${this.reviewCount != null && this.href != null ?
|
|
1657
|
+
${this.reviewCount != null && this.href != null ? l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
1648
1658
|
</div>
|
|
1649
1659
|
`;
|
|
1650
1660
|
}
|
|
@@ -1693,12 +1703,12 @@ ht([
|
|
|
1693
1703
|
a({ type: String })
|
|
1694
1704
|
], W.prototype, "href", 2);
|
|
1695
1705
|
W = ht([
|
|
1696
|
-
|
|
1706
|
+
_("o-rating")
|
|
1697
1707
|
], W);
|
|
1698
|
-
var
|
|
1699
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
1708
|
+
var qe = Object.defineProperty, We = Object.getOwnPropertyDescriptor, y = (o, t, e, n) => {
|
|
1709
|
+
for (var i = n > 1 ? void 0 : n ? We(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
1700
1710
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
1701
|
-
return n && i &&
|
|
1711
|
+
return n && i && qe(t, e, i), i;
|
|
1702
1712
|
};
|
|
1703
1713
|
let g = class extends f {
|
|
1704
1714
|
constructor() {
|
|
@@ -1750,7 +1760,7 @@ let g = class extends f {
|
|
|
1750
1760
|
this.style.setProperty("--z-overlay", `${this.zIndex}`), this.style.setProperty("--z-panel", `${this.zIndex + 1}`);
|
|
1751
1761
|
}
|
|
1752
1762
|
render() {
|
|
1753
|
-
return
|
|
1763
|
+
return l`
|
|
1754
1764
|
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.closePanel}></div>
|
|
1755
1765
|
<div
|
|
1756
1766
|
class="panel"
|
|
@@ -1760,9 +1770,9 @@ let g = class extends f {
|
|
|
1760
1770
|
style="z-index: ${this.zIndex + 1}"
|
|
1761
1771
|
>
|
|
1762
1772
|
|
|
1763
|
-
${this.showHeader ?
|
|
1773
|
+
${this.showHeader ? l`
|
|
1764
1774
|
<div class="header">
|
|
1765
|
-
${this.showHeaderStartIcon ?
|
|
1775
|
+
${this.showHeaderStartIcon ? l`
|
|
1766
1776
|
<o-icon-button icon="arrowLeft" size="small" class="return-btn" bgstyle="background-light" @click=${this.closePanel} aria-label="${this.closeButtonLabel}"></o-icon-button>
|
|
1767
1777
|
` : null}
|
|
1768
1778
|
<span id="panel-title" class="panel-title">${this.headerTitle}</span>
|
|
@@ -1774,9 +1784,9 @@ let g = class extends f {
|
|
|
1774
1784
|
<slot></slot>
|
|
1775
1785
|
</div>
|
|
1776
1786
|
|
|
1777
|
-
${this.showFooter ?
|
|
1787
|
+
${this.showFooter ? l`
|
|
1778
1788
|
<div class="footer">
|
|
1779
|
-
${this.firstButtonVariant && this.firstButtonLabel ?
|
|
1789
|
+
${this.firstButtonVariant && this.firstButtonLabel ? l`
|
|
1780
1790
|
<o-button
|
|
1781
1791
|
variant="${this.firstButtonVariant}"
|
|
1782
1792
|
@click=${this.handleFirstClick}
|
|
@@ -1785,7 +1795,7 @@ let g = class extends f {
|
|
|
1785
1795
|
</o-button>
|
|
1786
1796
|
` : null}
|
|
1787
1797
|
|
|
1788
|
-
${this.secondaryButtonVariant && this.secondaryButtonLabel ?
|
|
1798
|
+
${this.secondaryButtonVariant && this.secondaryButtonLabel ? l`
|
|
1789
1799
|
<o-button
|
|
1790
1800
|
variant="${this.secondaryButtonVariant}"
|
|
1791
1801
|
@click=${this.handleSecondaryClick}
|
|
@@ -1986,16 +1996,16 @@ y([
|
|
|
1986
1996
|
a({ type: Boolean, reflect: !0 })
|
|
1987
1997
|
], g.prototype, "initialized", 2);
|
|
1988
1998
|
g = y([
|
|
1989
|
-
|
|
1999
|
+
_("o-side-panel")
|
|
1990
2000
|
], g);
|
|
1991
|
-
var Ke = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor,
|
|
2001
|
+
var Ke = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, R = (o, t, e, n) => {
|
|
1992
2002
|
for (var i = n > 1 ? void 0 : n ? Ge(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
1993
2003
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
1994
2004
|
return n && i && Ke(t, e, i), i;
|
|
1995
2005
|
};
|
|
1996
|
-
let
|
|
2006
|
+
let L = class extends f {
|
|
1997
2007
|
constructor() {
|
|
1998
|
-
super(...arguments), this.thumbnails = [], this.activeIndex = 0, this.disabledIndexes = [], this.maxWidth = "100%", this.focusedIndex = 0, this.playerIconTemplate =
|
|
2008
|
+
super(...arguments), this.thumbnails = [], this.activeIndex = 0, this.disabledIndexes = [], this.maxWidth = "100%", this.focusedIndex = 0, this.playerIconTemplate = l`
|
|
1999
2009
|
<o-icon-button
|
|
2000
2010
|
icon="playerv"
|
|
2001
2011
|
size="xsmall"
|
|
@@ -2029,11 +2039,11 @@ let S = class extends f {
|
|
|
2029
2039
|
this.disabledIndexes.includes(o) || (this.activeIndex = o, this.swiperInstance && typeof this.swiperInstance.slideTo == "function" && this.swiperInstance.slideTo(o), this.dispatchEvent(new CustomEvent("thumbnail-select", { detail: { index: o } })));
|
|
2030
2040
|
}
|
|
2031
2041
|
render() {
|
|
2032
|
-
return
|
|
2042
|
+
return l`
|
|
2033
2043
|
<div class="scroll-container" style="max-width: ${this.maxWidth};">
|
|
2034
2044
|
${this.thumbnails.map((o, t) => {
|
|
2035
2045
|
const e = this.disabledIndexes.includes(t), n = this.activeIndex === t, i = o.type === "video";
|
|
2036
|
-
return
|
|
2046
|
+
return l`
|
|
2037
2047
|
<div class="thumb-wrapper">
|
|
2038
2048
|
<button
|
|
2039
2049
|
class="thumb"
|
|
@@ -2046,7 +2056,7 @@ let S = class extends f {
|
|
|
2046
2056
|
>
|
|
2047
2057
|
<img src="${o.src}" />
|
|
2048
2058
|
</button>
|
|
2049
|
-
${i ?
|
|
2059
|
+
${i ? l`<div class="play-icon-wrapper">${this.playerIconTemplate}</div>` : null}
|
|
2050
2060
|
</div>
|
|
2051
2061
|
`;
|
|
2052
2062
|
})}
|
|
@@ -2054,7 +2064,7 @@ let S = class extends f {
|
|
|
2054
2064
|
`;
|
|
2055
2065
|
}
|
|
2056
2066
|
};
|
|
2057
|
-
|
|
2067
|
+
L.styles = w`
|
|
2058
2068
|
:host {
|
|
2059
2069
|
display: flex;
|
|
2060
2070
|
gap: 5px;
|
|
@@ -2158,27 +2168,27 @@ S.styles = w`
|
|
|
2158
2168
|
width: 0;
|
|
2159
2169
|
}
|
|
2160
2170
|
`;
|
|
2161
|
-
|
|
2171
|
+
R([
|
|
2162
2172
|
a({ type: Array })
|
|
2163
|
-
],
|
|
2164
|
-
|
|
2173
|
+
], L.prototype, "thumbnails", 2);
|
|
2174
|
+
R([
|
|
2165
2175
|
a({ type: Number })
|
|
2166
|
-
],
|
|
2167
|
-
|
|
2176
|
+
], L.prototype, "activeIndex", 2);
|
|
2177
|
+
R([
|
|
2168
2178
|
a({ type: Array })
|
|
2169
|
-
],
|
|
2170
|
-
|
|
2179
|
+
], L.prototype, "disabledIndexes", 2);
|
|
2180
|
+
R([
|
|
2171
2181
|
a({ type: String })
|
|
2172
|
-
],
|
|
2173
|
-
|
|
2182
|
+
], L.prototype, "maxWidth", 2);
|
|
2183
|
+
R([
|
|
2174
2184
|
a({ type: Object })
|
|
2175
|
-
],
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
],
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
],
|
|
2185
|
+
], L.prototype, "swiperInstance", 2);
|
|
2186
|
+
R([
|
|
2187
|
+
N()
|
|
2188
|
+
], L.prototype, "focusedIndex", 2);
|
|
2189
|
+
L = R([
|
|
2190
|
+
_("thumbnail-navigation")
|
|
2191
|
+
], L);
|
|
2182
2192
|
var Xe = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, Ct = (o, t, e, n) => {
|
|
2183
2193
|
for (var i = n > 1 ? void 0 : n ? Je(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
2184
2194
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
@@ -2189,7 +2199,7 @@ let et = class extends f {
|
|
|
2189
2199
|
super(...arguments), this.type = "", this.bgstyle = "background-white";
|
|
2190
2200
|
}
|
|
2191
2201
|
render() {
|
|
2192
|
-
return
|
|
2202
|
+
return l`
|
|
2193
2203
|
<span class="tag ${this.bgstyle}"><slot></slot></span>
|
|
2194
2204
|
`;
|
|
2195
2205
|
}
|
|
@@ -2257,7 +2267,7 @@ Ct([
|
|
|
2257
2267
|
a({ type: String, reflect: !0 })
|
|
2258
2268
|
], et.prototype, "bgstyle", 2);
|
|
2259
2269
|
et = Ct([
|
|
2260
|
-
|
|
2270
|
+
_("o-tag")
|
|
2261
2271
|
], et);
|
|
2262
2272
|
var Ye = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, kt = (o, t, e, n) => {
|
|
2263
2273
|
for (var i = n > 1 ? void 0 : n ? Qe(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
@@ -2269,7 +2279,7 @@ let ot = class extends f {
|
|
|
2269
2279
|
super(...arguments), this.type = "top", this.text = "";
|
|
2270
2280
|
}
|
|
2271
2281
|
render() {
|
|
2272
|
-
return
|
|
2282
|
+
return l`
|
|
2273
2283
|
<div class="tooltip">
|
|
2274
2284
|
<span class="tooltiptext">${this.text}</span>
|
|
2275
2285
|
<slot></slot>
|
|
@@ -2377,18 +2387,18 @@ kt([
|
|
|
2377
2387
|
a({ type: String, reflect: !0 })
|
|
2378
2388
|
], ot.prototype, "text", 2);
|
|
2379
2389
|
ot = kt([
|
|
2380
|
-
|
|
2390
|
+
_("o-tooltip")
|
|
2381
2391
|
], ot);
|
|
2382
|
-
var to = Object.defineProperty, eo = Object.getOwnPropertyDescriptor,
|
|
2392
|
+
var to = Object.defineProperty, eo = Object.getOwnPropertyDescriptor, I = (o, t, e, n) => {
|
|
2383
2393
|
for (var i = n > 1 ? void 0 : n ? eo(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
2384
2394
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
2385
2395
|
return n && i && to(t, e, i), i;
|
|
2386
2396
|
};
|
|
2387
|
-
let
|
|
2397
|
+
let C = class extends f {
|
|
2388
2398
|
constructor() {
|
|
2389
|
-
super(...arguments), this.options = [], this.value = "", this.name = "", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this._handleOutsideClick = (o) => {
|
|
2399
|
+
super(...arguments), this.options = [], this.value = "", this.name = "", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (o) => {
|
|
2390
2400
|
this.contains(o.target) || (this.open = !1, this.activeIndex = -1);
|
|
2391
|
-
}
|
|
2401
|
+
};
|
|
2392
2402
|
}
|
|
2393
2403
|
connectedCallback() {
|
|
2394
2404
|
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick);
|
|
@@ -2398,13 +2408,23 @@ let _ = class extends f {
|
|
|
2398
2408
|
}
|
|
2399
2409
|
toggle() {
|
|
2400
2410
|
var o;
|
|
2401
|
-
if (!this.disabled
|
|
2402
|
-
|
|
2403
|
-
|
|
2411
|
+
if (!this.disabled) {
|
|
2412
|
+
if (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((t) => t.value === this.value) : -1, this.open && this.width === "auto") {
|
|
2413
|
+
const t = (o = this.renderRoot) == null ? void 0 : o.querySelector("button");
|
|
2414
|
+
t && (this.menuWidth = `${t.getBoundingClientRect().width}px`);
|
|
2415
|
+
}
|
|
2416
|
+
this.open && this.updateComplete.then(() => {
|
|
2417
|
+
this._focusActiveOption();
|
|
2418
|
+
});
|
|
2404
2419
|
}
|
|
2405
2420
|
}
|
|
2421
|
+
_focusActiveOption() {
|
|
2422
|
+
var t;
|
|
2423
|
+
const o = (t = this.renderRoot) == null ? void 0 : t.querySelector(`#option-${this.activeIndex}`);
|
|
2424
|
+
o == null || o.focus();
|
|
2425
|
+
}
|
|
2406
2426
|
selectOption(o) {
|
|
2407
|
-
this.value = o.value, this.dispatchEvent(new CustomEvent("change", { detail: { value: this.value, url: o.url } }));
|
|
2427
|
+
this.value = o.value, this.dispatchEvent(new CustomEvent("change", { detail: { value: this.value, url: o.url } })), this.open = !1, this.activeIndex = -1;
|
|
2408
2428
|
}
|
|
2409
2429
|
handleKeydown(o) {
|
|
2410
2430
|
if (this.disabled) {
|
|
@@ -2412,15 +2432,21 @@ let _ = class extends f {
|
|
|
2412
2432
|
return;
|
|
2413
2433
|
}
|
|
2414
2434
|
if (!this.open) {
|
|
2415
|
-
(o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((t) => t.value === this.value));
|
|
2435
|
+
(o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((t) => t.value === this.value), this.updateComplete.then(() => this._focusActiveOption()));
|
|
2416
2436
|
return;
|
|
2417
2437
|
}
|
|
2418
2438
|
switch (o.key) {
|
|
2419
2439
|
case "ArrowDown":
|
|
2420
|
-
o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length;
|
|
2440
|
+
o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
|
|
2421
2441
|
break;
|
|
2422
2442
|
case "ArrowUp":
|
|
2423
|
-
o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length;
|
|
2443
|
+
o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
|
|
2444
|
+
break;
|
|
2445
|
+
case "Home":
|
|
2446
|
+
o.preventDefault(), this.activeIndex = 0, this.updateComplete.then(() => this._focusActiveOption());
|
|
2447
|
+
break;
|
|
2448
|
+
case "End":
|
|
2449
|
+
o.preventDefault(), this.activeIndex = this.options.length - 1, this.updateComplete.then(() => this._focusActiveOption());
|
|
2424
2450
|
break;
|
|
2425
2451
|
case "Enter":
|
|
2426
2452
|
o.preventDefault(), this.activeIndex >= 0 && this.selectOption(this.options[this.activeIndex]);
|
|
@@ -2434,51 +2460,64 @@ let _ = class extends f {
|
|
|
2434
2460
|
this.options.length > 0 && (this.options.some((e) => e.value === this.value) || (this.value = this.options[0].value));
|
|
2435
2461
|
}
|
|
2436
2462
|
render() {
|
|
2437
|
-
const o =
|
|
2463
|
+
const o = K.checkstroke.replace(
|
|
2438
2464
|
"<svg",
|
|
2439
2465
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
2440
2466
|
), t = this.options.find((e) => e.value === this.value);
|
|
2441
|
-
return
|
|
2467
|
+
return l`
|
|
2442
2468
|
<button
|
|
2443
|
-
|
|
2444
|
-
@keydown=${this.handleKeydown}
|
|
2469
|
+
role="combobox"
|
|
2445
2470
|
aria-haspopup="listbox"
|
|
2471
|
+
aria-controls="dropdown-listbox"
|
|
2446
2472
|
aria-expanded="${this.open}"
|
|
2473
|
+
aria-disabled="${this.disabled ? "true" : "false"}"
|
|
2474
|
+
aria-labelledby="dropdown-label"
|
|
2475
|
+
@click=${this.toggle}
|
|
2476
|
+
@keydown=${this.handleKeydown}
|
|
2447
2477
|
style=${`width: ${this.width};`}
|
|
2448
2478
|
?disabled=${this.disabled}
|
|
2449
2479
|
>
|
|
2450
|
-
|
|
2451
|
-
|
|
2480
|
+
<span id="dropdown-label" class="label">
|
|
2481
|
+
${t ? t.label : "Select an option"}
|
|
2482
|
+
</span>
|
|
2483
|
+
<span class="arrow">
|
|
2484
|
+
<o-icon-button icon='${this.open ? "triangleup" : "triangledown"}' size="small" bgstyle="none-contrast" type="span"></o-icon-button>
|
|
2485
|
+
</span>
|
|
2452
2486
|
</button>
|
|
2453
2487
|
|
|
2454
|
-
${this.open ?
|
|
2455
|
-
<ul
|
|
2488
|
+
${this.open ? l`
|
|
2489
|
+
<ul
|
|
2490
|
+
id="dropdown-listbox"
|
|
2491
|
+
role="listbox"
|
|
2492
|
+
aria-activedescendant="${this.activeIndex >= 0 ? "option-" + this.activeIndex : ""}"
|
|
2493
|
+
style=${`width: ${this.width};`}
|
|
2494
|
+
>
|
|
2456
2495
|
${this.options.map(
|
|
2457
|
-
(e, n) =>
|
|
2496
|
+
(e, n) => l`
|
|
2458
2497
|
<li
|
|
2498
|
+
id="option-${n}"
|
|
2459
2499
|
role="option"
|
|
2460
2500
|
aria-selected="${e.value === this.value}"
|
|
2501
|
+
tabindex="${n === this.activeIndex ? "0" : "-1"}"
|
|
2461
2502
|
class="${n === this.activeIndex ? "active" : ""} ${e.disabled ? "disabled" : ""}"
|
|
2462
2503
|
@click=${() => this.selectOption(e)}
|
|
2463
2504
|
>
|
|
2464
|
-
${e.url ?
|
|
2505
|
+
${e.url ? l`
|
|
2465
2506
|
<a href="${e.url}">
|
|
2466
|
-
<span>${e.label}</span>
|
|
2467
|
-
${e.value === this.value ? c`<span class="check">${B(o)}</span>` : null}
|
|
2468
|
-
</a>` : c`
|
|
2469
2507
|
<span>${e.label}</span>
|
|
2470
|
-
${e.value === this.value ?
|
|
2471
|
-
|
|
2472
|
-
|
|
2508
|
+
${e.value === this.value ? l`<span class="check">${z(o)}</span>` : null}
|
|
2509
|
+
</a>` : l`
|
|
2510
|
+
<span>${e.label}</span>
|
|
2511
|
+
${e.value === this.value ? l`<span class="check">${z(o)}</span>` : null}`}
|
|
2512
|
+
</li>`
|
|
2473
2513
|
)}
|
|
2474
|
-
</ul
|
|
2475
|
-
` : null}
|
|
2514
|
+
</ul>` : null}
|
|
2476
2515
|
|
|
2477
2516
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
2478
2517
|
`;
|
|
2479
2518
|
}
|
|
2480
2519
|
};
|
|
2481
|
-
|
|
2520
|
+
C.styles = w`
|
|
2482
2521
|
:host {
|
|
2483
2522
|
display: inline-block;
|
|
2484
2523
|
position: relative;
|
|
@@ -2618,33 +2657,33 @@ _.styles = w`
|
|
|
2618
2657
|
display: none;
|
|
2619
2658
|
}
|
|
2620
2659
|
`;
|
|
2621
|
-
|
|
2660
|
+
I([
|
|
2622
2661
|
a({ type: Array, reflect: !0 })
|
|
2623
|
-
],
|
|
2624
|
-
|
|
2662
|
+
], C.prototype, "options", 2);
|
|
2663
|
+
I([
|
|
2625
2664
|
a({ type: String, reflect: !0 })
|
|
2626
|
-
],
|
|
2627
|
-
|
|
2665
|
+
], C.prototype, "value", 2);
|
|
2666
|
+
I([
|
|
2628
2667
|
a({ type: String, reflect: !0 })
|
|
2629
|
-
],
|
|
2630
|
-
|
|
2668
|
+
], C.prototype, "name", 2);
|
|
2669
|
+
I([
|
|
2631
2670
|
a({ type: Boolean, reflect: !0 })
|
|
2632
|
-
],
|
|
2633
|
-
|
|
2671
|
+
], C.prototype, "disabled", 2);
|
|
2672
|
+
I([
|
|
2634
2673
|
a({ type: String, reflect: !0 })
|
|
2635
|
-
],
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
],
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
],
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
],
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
],
|
|
2674
|
+
], C.prototype, "width", 2);
|
|
2675
|
+
I([
|
|
2676
|
+
N()
|
|
2677
|
+
], C.prototype, "open", 2);
|
|
2678
|
+
I([
|
|
2679
|
+
N()
|
|
2680
|
+
], C.prototype, "activeIndex", 2);
|
|
2681
|
+
I([
|
|
2682
|
+
N()
|
|
2683
|
+
], C.prototype, "menuWidth", 2);
|
|
2684
|
+
C = I([
|
|
2685
|
+
_("o-dropdown")
|
|
2686
|
+
], C);
|
|
2648
2687
|
var oo = Object.getOwnPropertyDescriptor, io = (o, t, e, n) => {
|
|
2649
2688
|
for (var i = n > 1 ? void 0 : n ? oo(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
2650
2689
|
(r = o[s]) && (i = r(i) || i);
|
|
@@ -2652,7 +2691,7 @@ var oo = Object.getOwnPropertyDescriptor, io = (o, t, e, n) => {
|
|
|
2652
2691
|
};
|
|
2653
2692
|
let yt = class extends f {
|
|
2654
2693
|
render() {
|
|
2655
|
-
return
|
|
2694
|
+
return l` <span class="dots"></span> `;
|
|
2656
2695
|
}
|
|
2657
2696
|
};
|
|
2658
2697
|
yt.styles = w`
|
|
@@ -2708,18 +2747,18 @@ yt.styles = w`
|
|
|
2708
2747
|
}
|
|
2709
2748
|
`;
|
|
2710
2749
|
yt = io([
|
|
2711
|
-
|
|
2750
|
+
_("o-dots")
|
|
2712
2751
|
], yt);
|
|
2713
|
-
var no = Object.defineProperty, ro = Object.getOwnPropertyDescriptor,
|
|
2752
|
+
var no = Object.defineProperty, ro = Object.getOwnPropertyDescriptor, A = (o, t, e, n) => {
|
|
2714
2753
|
for (var i = n > 1 ? void 0 : n ? ro(t, e) : t, s = o.length - 1, r; s >= 0; s--)
|
|
2715
2754
|
(r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
|
|
2716
2755
|
return n && i && no(t, e, i), i;
|
|
2717
2756
|
};
|
|
2718
|
-
let
|
|
2757
|
+
let $ = class extends f {
|
|
2719
2758
|
constructor() {
|
|
2720
|
-
super(...arguments), this.options = [], this.value = "", this.name = "", this.additionaltext = "+X variant(s)", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this._handleOutsideClick = (o) => {
|
|
2759
|
+
super(...arguments), this.options = [], this.value = "", this.name = "", this.additionaltext = "+X variant(s)", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (o) => {
|
|
2721
2760
|
this.contains(o.target) || (this.open = !1, this.activeIndex = -1);
|
|
2722
|
-
}
|
|
2761
|
+
};
|
|
2723
2762
|
}
|
|
2724
2763
|
connectedCallback() {
|
|
2725
2764
|
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick);
|
|
@@ -2729,17 +2768,23 @@ let x = class extends f {
|
|
|
2729
2768
|
}
|
|
2730
2769
|
toggle() {
|
|
2731
2770
|
var o;
|
|
2732
|
-
if (!this.disabled
|
|
2733
|
-
|
|
2734
|
-
|
|
2771
|
+
if (!this.disabled) {
|
|
2772
|
+
if (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((t) => t.value === this.value) : -1, this.open && this.width === "auto") {
|
|
2773
|
+
const t = (o = this.renderRoot) == null ? void 0 : o.querySelector("button");
|
|
2774
|
+
t && (this.menuWidth = `${t.getBoundingClientRect().width}px`);
|
|
2775
|
+
}
|
|
2776
|
+
this.open && this.updateComplete.then(() => this._focusActiveOption());
|
|
2735
2777
|
}
|
|
2736
2778
|
}
|
|
2779
|
+
_focusActiveOption() {
|
|
2780
|
+
var t;
|
|
2781
|
+
const o = (t = this.renderRoot) == null ? void 0 : t.querySelector(`#option-${this.activeIndex}`);
|
|
2782
|
+
o == null || o.focus();
|
|
2783
|
+
}
|
|
2737
2784
|
selectOption(o) {
|
|
2738
|
-
this.value = o.value, this.dispatchEvent(
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
})
|
|
2742
|
-
);
|
|
2785
|
+
this.value = o.value, this.dispatchEvent(new CustomEvent("change", {
|
|
2786
|
+
detail: { value: this.value, url: o.url }
|
|
2787
|
+
})), this.open = !1, this.activeIndex = -1;
|
|
2743
2788
|
}
|
|
2744
2789
|
handleKeydown(o) {
|
|
2745
2790
|
if (this.disabled) {
|
|
@@ -2747,17 +2792,21 @@ let x = class extends f {
|
|
|
2747
2792
|
return;
|
|
2748
2793
|
}
|
|
2749
2794
|
if (!this.open) {
|
|
2750
|
-
(o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex(
|
|
2751
|
-
(t) => t.value === this.value
|
|
2752
|
-
));
|
|
2795
|
+
(o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((t) => t.value === this.value), this.updateComplete.then(() => this._focusActiveOption()));
|
|
2753
2796
|
return;
|
|
2754
2797
|
}
|
|
2755
2798
|
switch (o.key) {
|
|
2756
2799
|
case "ArrowDown":
|
|
2757
|
-
o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length;
|
|
2800
|
+
o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
|
|
2758
2801
|
break;
|
|
2759
2802
|
case "ArrowUp":
|
|
2760
|
-
o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length;
|
|
2803
|
+
o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
|
|
2804
|
+
break;
|
|
2805
|
+
case "Home":
|
|
2806
|
+
o.preventDefault(), this.activeIndex = 0, this.updateComplete.then(() => this._focusActiveOption());
|
|
2807
|
+
break;
|
|
2808
|
+
case "End":
|
|
2809
|
+
o.preventDefault(), this.activeIndex = this.options.length - 1, this.updateComplete.then(() => this._focusActiveOption());
|
|
2761
2810
|
break;
|
|
2762
2811
|
case "Enter":
|
|
2763
2812
|
o.preventDefault(), this.activeIndex >= 0 && this.selectOption(this.options[this.activeIndex]);
|
|
@@ -2767,27 +2816,32 @@ let x = class extends f {
|
|
|
2767
2816
|
break;
|
|
2768
2817
|
}
|
|
2769
2818
|
}
|
|
2770
|
-
updated(
|
|
2771
|
-
this.options.length > 0 && (this.options.some((
|
|
2819
|
+
updated() {
|
|
2820
|
+
this.options.length > 0 && (this.options.some((t) => t.value === this.value) || (this.value = this.options[0].value));
|
|
2772
2821
|
}
|
|
2773
2822
|
render() {
|
|
2774
|
-
const o =
|
|
2823
|
+
const o = K.checkstroke.replace(
|
|
2775
2824
|
"<svg",
|
|
2776
2825
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
2777
2826
|
), t = this.options.find((e) => e.value === this.value);
|
|
2778
|
-
return
|
|
2827
|
+
return l`
|
|
2779
2828
|
<button
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2829
|
+
role="combobox"
|
|
2830
|
+
aria-haspopup="listbox"
|
|
2831
|
+
aria-controls="dropdown-listbox"
|
|
2832
|
+
aria-expanded="${this.open}"
|
|
2833
|
+
aria-disabled="${this.disabled ? "true" : "false"}"
|
|
2834
|
+
aria-labelledby="dropdown-label"
|
|
2835
|
+
@click=${this.toggle}
|
|
2836
|
+
@keydown=${this.handleKeydown}
|
|
2837
|
+
style=${`width: ${this.width};`}
|
|
2838
|
+
?disabled=${this.disabled}
|
|
2839
|
+
class="btn-dropdown"
|
|
2787
2840
|
>
|
|
2788
|
-
|
|
2789
|
-
<
|
|
2790
|
-
|
|
2841
|
+
<img alt="${H(t == null ? void 0 : t.label)}" src="${H(t == null ? void 0 : t.imgurl)}" />
|
|
2842
|
+
<span id="dropdown-label" class="label">
|
|
2843
|
+
${t ? t.label : "Select an option"}
|
|
2844
|
+
</span>
|
|
2791
2845
|
<div class="right">
|
|
2792
2846
|
<span class="additional-text">${this.additionaltext}</span>
|
|
2793
2847
|
<span class="arrow">
|
|
@@ -2795,40 +2849,49 @@ let x = class extends f {
|
|
|
2795
2849
|
icon="${this.open ? "triangleup" : "triangledown"}"
|
|
2796
2850
|
size="small"
|
|
2797
2851
|
bgstyle="none-contrast"
|
|
2798
|
-
type="span"
|
|
2799
|
-
>
|
|
2852
|
+
type="span">
|
|
2800
2853
|
</o-icon-button>
|
|
2801
2854
|
</span>
|
|
2802
2855
|
</div>
|
|
2803
2856
|
</button>
|
|
2804
2857
|
|
|
2805
|
-
${this.open ?
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2858
|
+
${this.open ? l`
|
|
2859
|
+
<ul
|
|
2860
|
+
id="dropdown-listbox"
|
|
2861
|
+
role="listbox"
|
|
2862
|
+
aria-activedescendant="${this.activeIndex >= 0 ? "option-" + this.activeIndex : ""}"
|
|
2863
|
+
style=${`width: ${this.width};`}
|
|
2864
|
+
>
|
|
2865
|
+
${this.options.map(
|
|
2866
|
+
(e, n) => l`
|
|
2867
|
+
<li
|
|
2868
|
+
id="option-${n}"
|
|
2869
|
+
role="option"
|
|
2870
|
+
aria-selected="${e.value === this.value}"
|
|
2871
|
+
aria-disabled="${e.disabled ? "true" : "false"}"
|
|
2872
|
+
tabindex="${n === this.activeIndex ? "0" : "-1"}"
|
|
2873
|
+
class="${n === this.activeIndex ? "active" : ""} ${e.disabled ? "disabled" : ""}"
|
|
2874
|
+
@click=${() => this.selectOption(e)}
|
|
2812
2875
|
>
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2876
|
+
<a href="${H(e.url)}">
|
|
2877
|
+
<img alt="${H(e.label)}" src="${H(e.imgurl)}" />
|
|
2878
|
+
<span class="label">${e.label}</span>
|
|
2879
|
+
<div class="right">
|
|
2880
|
+
<span class="additional-text">${H(e.additionaltext)}</span>
|
|
2881
|
+
${e.value === this.value && !e.additionaltext ? l`
|
|
2882
|
+
<span class="check">${z(o)}</span>` : null}
|
|
2883
|
+
</div>
|
|
2884
|
+
</a>
|
|
2885
|
+
</li>
|
|
2886
|
+
`
|
|
2823
2887
|
)}
|
|
2824
|
-
|
|
2825
|
-
` : null}
|
|
2888
|
+
</ul>` : null}
|
|
2826
2889
|
|
|
2827
2890
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
2828
2891
|
`;
|
|
2829
2892
|
}
|
|
2830
2893
|
};
|
|
2831
|
-
|
|
2894
|
+
$.styles = w`
|
|
2832
2895
|
:host {
|
|
2833
2896
|
display: inline-block;
|
|
2834
2897
|
position: relative;
|
|
@@ -3004,33 +3067,33 @@ x.styles = w`
|
|
|
3004
3067
|
display: none;
|
|
3005
3068
|
}
|
|
3006
3069
|
`;
|
|
3007
|
-
|
|
3070
|
+
A([
|
|
3008
3071
|
a({ type: Array, reflect: !0 })
|
|
3009
|
-
],
|
|
3010
|
-
|
|
3072
|
+
], $.prototype, "options", 2);
|
|
3073
|
+
A([
|
|
3011
3074
|
a({ type: String, reflect: !0 })
|
|
3012
|
-
],
|
|
3013
|
-
|
|
3075
|
+
], $.prototype, "value", 2);
|
|
3076
|
+
A([
|
|
3014
3077
|
a({ type: String, reflect: !0 })
|
|
3015
|
-
],
|
|
3016
|
-
|
|
3078
|
+
], $.prototype, "name", 2);
|
|
3079
|
+
A([
|
|
3017
3080
|
a({ type: String, reflect: !0 })
|
|
3018
|
-
],
|
|
3019
|
-
|
|
3081
|
+
], $.prototype, "additionaltext", 2);
|
|
3082
|
+
A([
|
|
3020
3083
|
a({ type: Boolean, reflect: !0 })
|
|
3021
|
-
],
|
|
3022
|
-
|
|
3084
|
+
], $.prototype, "disabled", 2);
|
|
3085
|
+
A([
|
|
3023
3086
|
a({ type: String, reflect: !0 })
|
|
3024
|
-
],
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
],
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
],
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
],
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
],
|
|
3087
|
+
], $.prototype, "width", 2);
|
|
3088
|
+
A([
|
|
3089
|
+
N()
|
|
3090
|
+
], $.prototype, "open", 2);
|
|
3091
|
+
A([
|
|
3092
|
+
N()
|
|
3093
|
+
], $.prototype, "activeIndex", 2);
|
|
3094
|
+
A([
|
|
3095
|
+
N()
|
|
3096
|
+
], $.prototype, "menuWidth", 2);
|
|
3097
|
+
$ = A([
|
|
3098
|
+
_("o-dropdown-variant")
|
|
3099
|
+
], $);
|