@florid-kit/components 0.3.4 → 0.3.6
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/link.d.ts +17 -0
- package/components/wishlist-button.d.ts +4 -0
- package/index.js +184 -37
- package/index.mjs +429 -233
- package/package.json +3 -2
package/index.mjs
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const V = globalThis, rt = V.ShadowRoot && (V.ShadyCSS === void 0 || V.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, it = Symbol(), lt = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let mt = class {
|
|
8
8
|
constructor(t, e, s) {
|
|
9
|
-
if (this._$cssResult$ = !0, s !==
|
|
9
|
+
if (this._$cssResult$ = !0, s !== it) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = e;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let t = this.o;
|
|
14
14
|
const e = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (rt && t === void 0) {
|
|
16
16
|
const s = e !== void 0 && e.length === 1;
|
|
17
|
-
s && (t =
|
|
17
|
+
s && (t = lt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && lt.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let ft = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const _t = (i) => new mt(typeof i == "string" ? i : i + "", void 0, it), I = (i, ...t) => {
|
|
26
26
|
const e = i.length === 1 ? i[0] : t.reduce((s, r, n) => s + ((o) => {
|
|
27
27
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
28
28
|
if (typeof o == "number") return o;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(r) + i[n + 1], i[0]);
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
31
|
+
return new mt(e, i, it);
|
|
32
|
+
}, Ct = (i, t) => {
|
|
33
|
+
if (rt) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const s = document.createElement("style"), r =
|
|
35
|
+
const s = document.createElement("style"), r = V.litNonce;
|
|
36
36
|
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ht = rt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const s of t.cssRules) e += s.cssText;
|
|
41
|
-
return
|
|
41
|
+
return _t(e);
|
|
42
42
|
})(i) : i;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: kt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Mt, getPrototypeOf: Tt } = Object, _ = globalThis, ct = _.trustedTypes, It = ct ? ct.emptyScript : "", K = _.reactiveElementPolyfillSupport, z = (i, t) => i, q = { toAttribute(i, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
i = i ?
|
|
51
|
+
i = i ? It : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,23 +73,23 @@ const { is: xt, defineProperty: Ct, getOwnPropertyDescriptor: Pt, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
let
|
|
76
|
+
} }, ot = (i, t) => !Pt(i, t), dt = { attribute: !0, type: String, converter: q, reflect: !1, useDefault: !1, hasChanged: ot };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let U = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, e =
|
|
85
|
+
static createProperty(t, e = dt) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && Ot(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, s) {
|
|
92
|
-
const { get: r, set: n } =
|
|
92
|
+
const { get: r, set: n } = kt(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(o) {
|
|
95
95
|
this[e] = o;
|
|
@@ -100,17 +100,17 @@ let O = class extends HTMLElement {
|
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
103
|
-
return this.elementProperties.get(t) ??
|
|
103
|
+
return this.elementProperties.get(t) ?? dt;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
107
|
-
const t =
|
|
106
|
+
if (this.hasOwnProperty(z("elementProperties"))) return;
|
|
107
|
+
const t = Tt(this);
|
|
108
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
113
|
-
const e = this.properties, s = [...
|
|
111
|
+
if (this.hasOwnProperty(z("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(z("properties"))) {
|
|
113
|
+
const e = this.properties, s = [...Ut(e), ...Mt(e)];
|
|
114
114
|
for (const r of s) this.createProperty(r, e[r]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
@@ -129,8 +129,8 @@ let O = class extends HTMLElement {
|
|
|
129
129
|
const e = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
131
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
132
|
-
for (const r of s) e.unshift(
|
|
133
|
-
} else t !== void 0 && e.push(
|
|
132
|
+
for (const r of s) e.unshift(ht(r));
|
|
133
|
+
} else t !== void 0 && e.push(ht(t));
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, e) {
|
|
@@ -159,7 +159,7 @@ let O = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return Ct(t, this.constructor.elementStyles), t;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var t;
|
|
@@ -184,7 +184,7 @@ let O = class extends HTMLElement {
|
|
|
184
184
|
var n;
|
|
185
185
|
const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
|
|
186
186
|
if (r !== void 0 && s.reflect === !0) {
|
|
187
|
-
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter :
|
|
187
|
+
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : q).toAttribute(e, s.type);
|
|
188
188
|
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -192,7 +192,7 @@ let O = class extends HTMLElement {
|
|
|
192
192
|
var n, o;
|
|
193
193
|
const s = this.constructor, r = s._$Eh.get(t);
|
|
194
194
|
if (r !== void 0 && this._$Em !== r) {
|
|
195
|
-
const l = s.getPropertyOptions(r), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter :
|
|
195
|
+
const l = s.getPropertyOptions(r), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter : q;
|
|
196
196
|
this._$Em = r, this[r] = a.fromAttribute(e, l.type) ?? ((o = this._$Ej) == null ? void 0 : o.get(r)) ?? null, this._$Em = null;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
@@ -200,7 +200,7 @@ let O = class extends HTMLElement {
|
|
|
200
200
|
var r;
|
|
201
201
|
if (t !== void 0) {
|
|
202
202
|
const n = this.constructor, o = this[t];
|
|
203
|
-
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ??
|
|
203
|
+
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ?? ot)(o, e) || s.useDefault && s.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(t)) && !this.hasAttribute(n._$Eu(t, s)))) return;
|
|
204
204
|
this.C(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -276,76 +276,76 @@ let O = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(t) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
|
|
279
|
+
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[z("elementProperties")] = /* @__PURE__ */ new Map(), U[z("finalized")] = /* @__PURE__ */ new Map(), K == null || K({ ReactiveElement: U }), (_.reactiveElementVersions ?? (_.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
|
|
286
|
-
\f\r]`,
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
288
|
-
function
|
|
289
|
-
if (!
|
|
290
|
-
return
|
|
285
|
+
const B = globalThis, W = B.trustedTypes, ut = W ? W.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, wt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, At = "?" + m, Ht = `<${At}>`, C = document, N = () => C.createComment(""), L = (i) => i === null || typeof i != "object" && typeof i != "function", nt = Array.isArray, zt = (i) => nt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", X = `[
|
|
286
|
+
\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pt = /-->/g, ft = />/g, x = RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), gt = /'/g, bt = /"/g, xt = /^(?:script|style|textarea|title)$/i, Bt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), g = Bt(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), vt = /* @__PURE__ */ new WeakMap(), E = C.createTreeWalker(C, 129);
|
|
288
|
+
function Et(i, t) {
|
|
289
|
+
if (!nt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
|
+
return ut !== void 0 ? ut.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
292
|
+
const Nt = (i, t) => {
|
|
293
293
|
const e = i.length - 1, s = [];
|
|
294
|
-
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
294
|
+
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = H;
|
|
295
295
|
for (let l = 0; l < e; l++) {
|
|
296
296
|
const a = i[l];
|
|
297
|
-
let
|
|
298
|
-
for (;
|
|
299
|
-
const
|
|
300
|
-
n += o ===
|
|
297
|
+
let u, p, h = -1, v = 0;
|
|
298
|
+
for (; v < a.length && (o.lastIndex = v, p = o.exec(a), p !== null); ) v = o.lastIndex, o === H ? p[1] === "!--" ? o = pt : p[1] !== void 0 ? o = ft : p[2] !== void 0 ? (xt.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = x) : p[3] !== void 0 && (o = x) : o === x ? p[0] === ">" ? (o = r ?? H, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, u = p[1], o = p[3] === void 0 ? x : p[3] === '"' ? bt : gt) : o === bt || o === gt ? o = x : o === pt || o === ft ? o = H : (o = x, r = void 0);
|
|
299
|
+
const y = o === x && i[l + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
n += o === H ? a + Ht : h >= 0 ? (s.push(u), a.slice(0, h) + wt + a.slice(h) + m + y) : a + m + (h === -2 ? l : y);
|
|
301
301
|
}
|
|
302
|
-
return [
|
|
302
|
+
return [Et(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
303
303
|
};
|
|
304
|
-
class
|
|
304
|
+
class D {
|
|
305
305
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
306
306
|
let r;
|
|
307
307
|
this.parts = [];
|
|
308
308
|
let n = 0, o = 0;
|
|
309
|
-
const l = t.length - 1, a = this.parts, [
|
|
310
|
-
if (this.el =
|
|
309
|
+
const l = t.length - 1, a = this.parts, [u, p] = Nt(t, e);
|
|
310
|
+
if (this.el = D.createElement(u, s), E.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
311
|
const h = this.el.content.firstChild;
|
|
312
312
|
h.replaceWith(...h.childNodes);
|
|
313
313
|
}
|
|
314
|
-
for (; (r =
|
|
314
|
+
for (; (r = E.nextNode()) !== null && a.length < l; ) {
|
|
315
315
|
if (r.nodeType === 1) {
|
|
316
|
-
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(
|
|
317
|
-
const
|
|
318
|
-
a.push({ type: 1, index: n, name:
|
|
319
|
-
} else h.startsWith(
|
|
320
|
-
if (
|
|
321
|
-
const h = r.textContent.split(
|
|
322
|
-
if (
|
|
323
|
-
r.textContent =
|
|
324
|
-
for (let
|
|
325
|
-
r.append(h[
|
|
316
|
+
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(wt)) {
|
|
317
|
+
const v = p[o++], y = r.getAttribute(h).split(m), j = /([.?@])?(.*)/.exec(v);
|
|
318
|
+
a.push({ type: 1, index: n, name: j[2], strings: y, ctor: j[1] === "." ? Dt : j[1] === "?" ? Rt : j[1] === "@" ? jt : F }), r.removeAttribute(h);
|
|
319
|
+
} else h.startsWith(m) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
|
|
320
|
+
if (xt.test(r.tagName)) {
|
|
321
|
+
const h = r.textContent.split(m), v = h.length - 1;
|
|
322
|
+
if (v > 0) {
|
|
323
|
+
r.textContent = W ? W.emptyScript : "";
|
|
324
|
+
for (let y = 0; y < v; y++) r.append(h[y], N()), E.nextNode(), a.push({ type: 2, index: ++n });
|
|
325
|
+
r.append(h[v], N());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
328
|
+
} else if (r.nodeType === 8) if (r.data === At) a.push({ type: 2, index: n });
|
|
329
329
|
else {
|
|
330
330
|
let h = -1;
|
|
331
|
-
for (; (h = r.data.indexOf(
|
|
331
|
+
for (; (h = r.data.indexOf(m, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += m.length - 1;
|
|
332
332
|
}
|
|
333
333
|
n++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
337
|
-
const s =
|
|
337
|
+
const s = C.createElement("template");
|
|
338
338
|
return s.innerHTML = t, s;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function M(i, t, e = i, s) {
|
|
342
342
|
var o, l;
|
|
343
|
-
if (t ===
|
|
343
|
+
if (t === P) return t;
|
|
344
344
|
let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
345
|
-
const n =
|
|
346
|
-
return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t =
|
|
345
|
+
const n = L(t) ? void 0 : t._$litDirective$;
|
|
346
|
+
return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = M(i, r._$AS(i, t.values), r, s)), t;
|
|
347
347
|
}
|
|
348
|
-
class
|
|
348
|
+
class Lt {
|
|
349
349
|
constructor(t, e) {
|
|
350
350
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
351
351
|
}
|
|
@@ -356,30 +356,30 @@ class jt {
|
|
|
356
356
|
return this._$AM._$AU;
|
|
357
357
|
}
|
|
358
358
|
u(t) {
|
|
359
|
-
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ??
|
|
360
|
-
|
|
361
|
-
let n =
|
|
359
|
+
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? C).importNode(e, !0);
|
|
360
|
+
E.currentNode = r;
|
|
361
|
+
let n = E.nextNode(), o = 0, l = 0, a = s[0];
|
|
362
362
|
for (; a !== void 0; ) {
|
|
363
363
|
if (o === a.index) {
|
|
364
|
-
let
|
|
365
|
-
a.type === 2 ?
|
|
364
|
+
let u;
|
|
365
|
+
a.type === 2 ? u = new R(n, n.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (u = new Vt(n, this, t)), this._$AV.push(u), a = s[++l];
|
|
366
366
|
}
|
|
367
|
-
o !== (a == null ? void 0 : a.index) && (n =
|
|
367
|
+
o !== (a == null ? void 0 : a.index) && (n = E.nextNode(), o++);
|
|
368
368
|
}
|
|
369
|
-
return
|
|
369
|
+
return E.currentNode = C, r;
|
|
370
370
|
}
|
|
371
371
|
p(t) {
|
|
372
372
|
let e = 0;
|
|
373
373
|
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
class
|
|
376
|
+
class R {
|
|
377
377
|
get _$AU() {
|
|
378
378
|
var t;
|
|
379
379
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
380
380
|
}
|
|
381
381
|
constructor(t, e, s, r) {
|
|
382
|
-
this.type = 2, this._$AH =
|
|
382
|
+
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
|
|
383
383
|
}
|
|
384
384
|
get parentNode() {
|
|
385
385
|
let t = this._$AA.parentNode;
|
|
@@ -393,7 +393,7 @@ class z {
|
|
|
393
393
|
return this._$AB;
|
|
394
394
|
}
|
|
395
395
|
_$AI(t, e = this) {
|
|
396
|
-
t =
|
|
396
|
+
t = M(this, t, e), L(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : zt(t) ? this.k(t) : this._(t);
|
|
397
397
|
}
|
|
398
398
|
O(t) {
|
|
399
399
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -402,26 +402,26 @@ class z {
|
|
|
402
402
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
403
403
|
}
|
|
404
404
|
_(t) {
|
|
405
|
-
this._$AH !==
|
|
405
|
+
this._$AH !== d && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(C.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
408
|
var n;
|
|
409
|
-
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el =
|
|
409
|
+
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = D.createElement(Et(s.h, s.h[0]), this.options)), s);
|
|
410
410
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(e);
|
|
411
411
|
else {
|
|
412
|
-
const o = new
|
|
412
|
+
const o = new Lt(r, this), l = o.u(this.options);
|
|
413
413
|
o.p(e), this.T(l), this._$AH = o;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
_$AC(t) {
|
|
417
|
-
let e =
|
|
418
|
-
return e === void 0 &&
|
|
417
|
+
let e = vt.get(t.strings);
|
|
418
|
+
return e === void 0 && vt.set(t.strings, e = new D(t)), e;
|
|
419
419
|
}
|
|
420
420
|
k(t) {
|
|
421
|
-
|
|
421
|
+
nt(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const e = this._$AH;
|
|
423
423
|
let s, r = 0;
|
|
424
|
-
for (const n of t) r === e.length ? e.push(s = new
|
|
424
|
+
for (const n of t) r === e.length ? e.push(s = new R(this.O(N()), this.O(N()), this, this.options)) : s = e[r], s._$AI(n), r++;
|
|
425
425
|
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
426
426
|
}
|
|
427
427
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -436,7 +436,7 @@ class z {
|
|
|
436
436
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
class
|
|
439
|
+
class F {
|
|
440
440
|
get tagName() {
|
|
441
441
|
return this.element.tagName;
|
|
442
442
|
}
|
|
@@ -444,46 +444,46 @@ class W {
|
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
446
|
constructor(t, e, s, r, n) {
|
|
447
|
-
this.type = 1, this._$AH =
|
|
447
|
+
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
|
|
448
448
|
}
|
|
449
449
|
_$AI(t, e = this, s, r) {
|
|
450
450
|
const n = this.strings;
|
|
451
451
|
let o = !1;
|
|
452
|
-
if (n === void 0) t =
|
|
452
|
+
if (n === void 0) t = M(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== P, o && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
454
|
const l = t;
|
|
455
|
-
let a,
|
|
456
|
-
for (t = n[0], a = 0; a < n.length - 1; a++)
|
|
455
|
+
let a, u;
|
|
456
|
+
for (t = n[0], a = 0; a < n.length - 1; a++) u = M(this, l[s + a], e, a), u === P && (u = this._$AH[a]), o || (o = !L(u) || u !== this._$AH[a]), u === d ? t = d : t !== d && (t += (u ?? "") + n[a + 1]), this._$AH[a] = u;
|
|
457
457
|
}
|
|
458
458
|
o && !r && this.j(t);
|
|
459
459
|
}
|
|
460
460
|
j(t) {
|
|
461
|
-
t ===
|
|
461
|
+
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class Dt extends F {
|
|
465
465
|
constructor() {
|
|
466
466
|
super(...arguments), this.type = 3;
|
|
467
467
|
}
|
|
468
468
|
j(t) {
|
|
469
|
-
this.element[this.name] = t ===
|
|
469
|
+
this.element[this.name] = t === d ? void 0 : t;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class
|
|
472
|
+
class Rt extends F {
|
|
473
473
|
constructor() {
|
|
474
474
|
super(...arguments), this.type = 4;
|
|
475
475
|
}
|
|
476
476
|
j(t) {
|
|
477
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
477
|
+
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
class
|
|
480
|
+
class jt extends F {
|
|
481
481
|
constructor(t, e, s, r, n) {
|
|
482
482
|
super(t, e, s, r, n), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
|
-
if ((t =
|
|
486
|
-
const s = this._$AH, r = t ===
|
|
485
|
+
if ((t = M(this, t, e, 0) ?? d) === P) return;
|
|
486
|
+
const s = this._$AH, r = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || r);
|
|
487
487
|
r && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(t) {
|
|
@@ -491,7 +491,7 @@ class Lt extends W {
|
|
|
491
491
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
class
|
|
494
|
+
class Vt {
|
|
495
495
|
constructor(t, e, s) {
|
|
496
496
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
497
497
|
}
|
|
@@ -499,17 +499,17 @@ class It {
|
|
|
499
499
|
return this._$AM._$AU;
|
|
500
500
|
}
|
|
501
501
|
_$AI(t) {
|
|
502
|
-
|
|
502
|
+
M(this, t);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const
|
|
505
|
+
const G = B.litHtmlPolyfillSupport;
|
|
506
|
+
G == null || G(D, R), (B.litHtmlVersions ?? (B.litHtmlVersions = [])).push("3.3.0");
|
|
507
|
+
const qt = (i, t, e) => {
|
|
508
508
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
509
|
let r = s._$litPart$;
|
|
510
510
|
if (r === void 0) {
|
|
511
511
|
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
512
|
-
s._$litPart$ = r = new
|
|
512
|
+
s._$litPart$ = r = new R(t.insertBefore(N(), n), n, void 0, e ?? {});
|
|
513
513
|
}
|
|
514
514
|
return r._$AI(i), r;
|
|
515
515
|
};
|
|
@@ -518,8 +518,8 @@ const Bt = (i, t, e) => {
|
|
|
518
518
|
* Copyright 2017 Google LLC
|
|
519
519
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
520
520
|
*/
|
|
521
|
-
const
|
|
522
|
-
let
|
|
521
|
+
const S = globalThis;
|
|
522
|
+
let w = class extends U {
|
|
523
523
|
constructor() {
|
|
524
524
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
525
525
|
}
|
|
@@ -530,7 +530,7 @@ let S = class extends O {
|
|
|
530
530
|
}
|
|
531
531
|
update(t) {
|
|
532
532
|
const e = this.render();
|
|
533
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
533
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = qt(e, this.renderRoot, this.renderOptions);
|
|
534
534
|
}
|
|
535
535
|
connectedCallback() {
|
|
536
536
|
var t;
|
|
@@ -541,20 +541,20 @@ let S = class extends O {
|
|
|
541
541
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
542
542
|
}
|
|
543
543
|
render() {
|
|
544
|
-
return
|
|
544
|
+
return P;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
|
-
var
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
(
|
|
547
|
+
var yt;
|
|
548
|
+
w._$litElement$ = !0, w.finalized = !0, (yt = S.litElementHydrateSupport) == null || yt.call(S, { LitElement: w });
|
|
549
|
+
const Q = S.litElementPolyfillSupport;
|
|
550
|
+
Q == null || Q({ LitElement: w });
|
|
551
|
+
(S.litElementVersions ?? (S.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 Z = (i) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
559
|
customElements.define(i, t);
|
|
560
560
|
}) : customElements.define(i, t);
|
|
@@ -564,7 +564,7 @@ const rt = (i) => (t, e) => {
|
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const
|
|
567
|
+
const Wt = { attribute: !0, type: String, converter: q, reflect: !1, hasChanged: ot }, Ft = (i = Wt, t, e) => {
|
|
568
568
|
const { kind: s, metadata: r } = e;
|
|
569
569
|
let n = globalThis.litPropertyMetadata.get(r);
|
|
570
570
|
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), n.set(e.name, i), s === "accessor") {
|
|
@@ -585,18 +585,18 @@ const Vt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged:
|
|
|
585
585
|
}
|
|
586
586
|
throw Error("Unsupported decorator location: " + s);
|
|
587
587
|
};
|
|
588
|
-
function
|
|
589
|
-
return (t, e) => typeof e == "object" ?
|
|
588
|
+
function c(i) {
|
|
589
|
+
return (t, e) => typeof e == "object" ? Ft(i, t, e) : ((s, r, n) => {
|
|
590
590
|
const o = r.hasOwnProperty(n);
|
|
591
591
|
return r.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
|
592
592
|
})(i, t, e);
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Zt = I`
|
|
595
595
|
outline: 1px dashed var(--button-border-color);
|
|
596
596
|
outline-offset: 2px;
|
|
597
597
|
outline: dashed black;
|
|
598
598
|
`;
|
|
599
|
-
|
|
599
|
+
I`
|
|
600
600
|
:host * {
|
|
601
601
|
box-sizing: border-box;
|
|
602
602
|
}
|
|
@@ -606,12 +606,12 @@ j`
|
|
|
606
606
|
* Copyright 2023 Google LLC
|
|
607
607
|
* SPDX-License-Identifier: Apache-2.0
|
|
608
608
|
*/
|
|
609
|
-
const
|
|
610
|
-
function
|
|
609
|
+
const at = Symbol("internals"), Y = Symbol("privateInternals");
|
|
610
|
+
function Jt(i) {
|
|
611
611
|
var t;
|
|
612
612
|
class e extends i {
|
|
613
|
-
get [(t =
|
|
614
|
-
return this[
|
|
613
|
+
get [(t = at, t)]() {
|
|
614
|
+
return this[Y] || (this[Y] = this.attachInternals()), this[Y];
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
return e;
|
|
@@ -621,11 +621,11 @@ function Ft(i) {
|
|
|
621
621
|
* Copyright 2023 Google LLC
|
|
622
622
|
* SPDX-License-Identifier: Apache-2.0
|
|
623
623
|
*/
|
|
624
|
-
function
|
|
624
|
+
function Kt(i) {
|
|
625
625
|
i.addInitializer((t) => {
|
|
626
626
|
const e = t;
|
|
627
627
|
e.addEventListener("click", async (s) => {
|
|
628
|
-
const { type: r, [
|
|
628
|
+
const { type: r, [at]: n } = e, { form: o } = n;
|
|
629
629
|
if (!(!o || r === "button") && (await new Promise((l) => {
|
|
630
630
|
setTimeout(l);
|
|
631
631
|
}), !s.defaultPrevented)) {
|
|
@@ -648,12 +648,12 @@ function Zt(i) {
|
|
|
648
648
|
});
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
var
|
|
652
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
651
|
+
var Xt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, O = (i, t, e, s) => {
|
|
652
|
+
for (var r = s > 1 ? void 0 : s ? Gt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
653
653
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
654
|
-
return s && r &&
|
|
654
|
+
return s && r && Xt(t, e, r), r;
|
|
655
655
|
};
|
|
656
|
-
const
|
|
656
|
+
const Qt = Jt(w), $t = (i) => {
|
|
657
657
|
const t = `
|
|
658
658
|
--button-bg-disabled: var(--color-container-disabled);
|
|
659
659
|
--button-bg-pressed: var(--color-container-action-${i}-pressed);
|
|
@@ -668,9 +668,9 @@ const Gt = Ft(S), gt = (i) => {
|
|
|
668
668
|
--button-text-hover: var(--color-content-action-${i});
|
|
669
669
|
--button-text: var(--color-content-action-${i});
|
|
670
670
|
`;
|
|
671
|
-
return
|
|
672
|
-
},
|
|
673
|
-
let
|
|
671
|
+
return _t(t);
|
|
672
|
+
}, Yt = ["primary", "secondary"];
|
|
673
|
+
let f = class extends Qt {
|
|
674
674
|
constructor() {
|
|
675
675
|
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.disabled = !1, this.href = "", this.target = "";
|
|
676
676
|
}
|
|
@@ -684,41 +684,41 @@ let b = class extends Gt {
|
|
|
684
684
|
* The associated form element with which this element's value will submit.
|
|
685
685
|
*/
|
|
686
686
|
get form() {
|
|
687
|
-
return this[
|
|
687
|
+
return this[at].form;
|
|
688
688
|
}
|
|
689
689
|
// TODO: Add aria attributes support
|
|
690
690
|
// Adapt from: https://github.dev/material-components/material-web
|
|
691
691
|
willUpdate() {
|
|
692
692
|
const i = getComputedStyle(this).getPropertyValue("--button-variant");
|
|
693
|
-
i &&
|
|
693
|
+
i && Yt.some((t) => t === i) && (this.variant = i);
|
|
694
694
|
}
|
|
695
695
|
render() {
|
|
696
696
|
const i = this.href ? this.renderLink() : this.renderButton();
|
|
697
|
-
return
|
|
697
|
+
return g`${i}`;
|
|
698
698
|
}
|
|
699
699
|
renderLink() {
|
|
700
|
-
return
|
|
700
|
+
return g`<a href=${this.href} target=${this.target || d} class="button" ?disabled=${this.disabled}>
|
|
701
701
|
<slot />
|
|
702
702
|
</a>`;
|
|
703
703
|
}
|
|
704
704
|
renderButton() {
|
|
705
|
-
return
|
|
705
|
+
return g`<button class="button" ?disabled=${this.disabled}>
|
|
706
706
|
<slot />
|
|
707
707
|
</button>`;
|
|
708
708
|
}
|
|
709
709
|
};
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
710
|
+
Kt(f);
|
|
711
|
+
f.formAssociated = !0;
|
|
712
|
+
f.styles = I`
|
|
713
713
|
:host {
|
|
714
714
|
display: inline-flex;
|
|
715
715
|
cursor: pointer;
|
|
716
|
-
${
|
|
716
|
+
${$t("primary")};
|
|
717
717
|
--button-border: transparent;
|
|
718
718
|
}
|
|
719
719
|
|
|
720
720
|
:host([variant="secondary"]) {
|
|
721
|
-
${
|
|
721
|
+
${$t("secondary")};
|
|
722
722
|
}
|
|
723
723
|
|
|
724
724
|
:host([disabled]) {
|
|
@@ -779,41 +779,41 @@ b.styles = j`
|
|
|
779
779
|
}
|
|
780
780
|
|
|
781
781
|
.button:focus-visible {
|
|
782
|
-
${
|
|
782
|
+
${Zt};
|
|
783
783
|
}
|
|
784
784
|
`;
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
],
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
],
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
],
|
|
794
|
-
|
|
795
|
-
|
|
785
|
+
O([
|
|
786
|
+
c()
|
|
787
|
+
], f.prototype, "type", 2);
|
|
788
|
+
O([
|
|
789
|
+
c({ reflect: !0 })
|
|
790
|
+
], f.prototype, "value", 2);
|
|
791
|
+
O([
|
|
792
|
+
c({ reflect: !0 })
|
|
793
|
+
], f.prototype, "variant", 2);
|
|
794
|
+
O([
|
|
795
|
+
c({
|
|
796
796
|
converter: {
|
|
797
797
|
fromAttribute: (i) => i === "" || i === "true"
|
|
798
798
|
}
|
|
799
799
|
})
|
|
800
|
-
],
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
],
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
],
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
],
|
|
800
|
+
], f.prototype, "disabled", 2);
|
|
801
|
+
O([
|
|
802
|
+
c()
|
|
803
|
+
], f.prototype, "href", 2);
|
|
804
|
+
O([
|
|
805
|
+
c()
|
|
806
|
+
], f.prototype, "target", 2);
|
|
807
|
+
f = O([
|
|
808
|
+
Z("o-button")
|
|
809
|
+
], f);
|
|
810
810
|
/**
|
|
811
811
|
* @license
|
|
812
812
|
* Copyright 2017 Google LLC
|
|
813
813
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
814
814
|
*/
|
|
815
|
-
const
|
|
816
|
-
class
|
|
815
|
+
const te = { CHILD: 2 }, ee = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
816
|
+
class se {
|
|
817
817
|
constructor(t) {
|
|
818
818
|
}
|
|
819
819
|
get _$AU() {
|
|
@@ -834,13 +834,13 @@ class te {
|
|
|
834
834
|
* Copyright 2017 Google LLC
|
|
835
835
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
836
836
|
*/
|
|
837
|
-
class
|
|
837
|
+
class tt extends se {
|
|
838
838
|
constructor(t) {
|
|
839
|
-
if (super(t), this.it =
|
|
839
|
+
if (super(t), this.it = d, t.type !== te.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
840
840
|
}
|
|
841
841
|
render(t) {
|
|
842
|
-
if (t ===
|
|
843
|
-
if (t ===
|
|
842
|
+
if (t === d || t == null) return this._t = void 0, this.it = t;
|
|
843
|
+
if (t === P) return t;
|
|
844
844
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
845
845
|
if (t === this.it) return this._t;
|
|
846
846
|
this.it = t;
|
|
@@ -848,48 +848,58 @@ class G extends te {
|
|
|
848
848
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
|
|
851
|
+
tt.directiveName = "unsafeHTML", tt.resultType = 1;
|
|
852
852
|
/**
|
|
853
853
|
* @license
|
|
854
854
|
* Copyright 2017 Google LLC
|
|
855
855
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
856
856
|
*/
|
|
857
|
-
class
|
|
857
|
+
class et extends tt {
|
|
858
858
|
}
|
|
859
|
-
|
|
860
|
-
const
|
|
859
|
+
et.directiveName = "unsafeSVG", et.resultType = 2;
|
|
860
|
+
const st = ee(et), re = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
861
861
|
<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"/>
|
|
862
862
|
</svg>
|
|
863
|
-
`,
|
|
863
|
+
`, ie = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
864
864
|
<path d="M16 8L4 0V16L16 8Z" fill="#3F2B2E"/>
|
|
865
865
|
</svg>
|
|
866
|
-
`,
|
|
867
|
-
|
|
868
|
-
|
|
866
|
+
`, oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
867
|
+
<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"/>
|
|
868
|
+
</svg>
|
|
869
|
+
`, ne = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
870
|
+
<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"/>
|
|
871
|
+
</svg>
|
|
872
|
+
`, St = {
|
|
873
|
+
wishlist: re,
|
|
874
|
+
playerv: ie,
|
|
875
|
+
chevronRight: oe,
|
|
876
|
+
chevronLeft: ne
|
|
869
877
|
};
|
|
870
|
-
var
|
|
871
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
878
|
+
var ae = Object.defineProperty, le = Object.getOwnPropertyDescriptor, J = (i, t, e, s) => {
|
|
879
|
+
for (var r = s > 1 ? void 0 : s ? le(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
872
880
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
873
|
-
return s && r &&
|
|
881
|
+
return s && r && ae(t, e, r), r;
|
|
874
882
|
};
|
|
875
|
-
let
|
|
883
|
+
let T = class extends w {
|
|
876
884
|
constructor() {
|
|
877
|
-
super(...arguments), this.status = "empty";
|
|
885
|
+
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist";
|
|
878
886
|
}
|
|
879
887
|
render() {
|
|
880
|
-
const i =
|
|
888
|
+
const i = St.wishlist.replace(
|
|
881
889
|
"<svg",
|
|
882
890
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
883
891
|
);
|
|
884
|
-
return
|
|
892
|
+
return g`
|
|
885
893
|
<button
|
|
886
894
|
type="button"
|
|
887
|
-
aria-label="
|
|
895
|
+
aria-label="${this.label}"
|
|
896
|
+
aria-describedby="${this.ariaDescribedBy}"
|
|
888
897
|
aria-pressed="${this.status == "filled" ? "true" : "false"}"
|
|
889
898
|
class="wishlist-button"
|
|
890
899
|
@click="${this.toggleStatus}"
|
|
891
900
|
>
|
|
892
|
-
|
|
901
|
+
<span class="sr-only">${this.label}</span>
|
|
902
|
+
${st(i)}
|
|
893
903
|
</button>
|
|
894
904
|
`;
|
|
895
905
|
}
|
|
@@ -899,8 +909,14 @@ let V = class extends S {
|
|
|
899
909
|
setStatus(i) {
|
|
900
910
|
this.status = i, this.requestUpdate();
|
|
901
911
|
}
|
|
912
|
+
setAriaDescribedBy(i) {
|
|
913
|
+
this.ariaDescribedBy = i, this.requestUpdate();
|
|
914
|
+
}
|
|
915
|
+
setLabel(i) {
|
|
916
|
+
this.label = i, this.requestUpdate();
|
|
917
|
+
}
|
|
902
918
|
};
|
|
903
|
-
|
|
919
|
+
T.styles = I`
|
|
904
920
|
:host {
|
|
905
921
|
display: inline-flex;
|
|
906
922
|
justify-content: center;
|
|
@@ -912,14 +928,29 @@ V.styles = j`
|
|
|
912
928
|
display: flex;
|
|
913
929
|
justify-content: center;
|
|
914
930
|
align-items: center;
|
|
915
|
-
width:
|
|
916
|
-
height:
|
|
931
|
+
width: 40px;
|
|
932
|
+
height: 40px;
|
|
917
933
|
border: transparent;
|
|
918
934
|
border-radius: var(--radius-full);
|
|
919
935
|
background-color: var(--color-alpha-light-strong);
|
|
920
936
|
position: relative;
|
|
937
|
+
cursor: pointer;
|
|
921
938
|
}
|
|
922
939
|
|
|
940
|
+
.sr-only {
|
|
941
|
+
border: 0 !important;
|
|
942
|
+
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
943
|
+
-webkit-clip-path: inset(50%) !important;
|
|
944
|
+
clip-path: inset(50%) !important;
|
|
945
|
+
height: 0.1rem !important;
|
|
946
|
+
margin: -0.1rem !important;
|
|
947
|
+
overflow: hidden !important;
|
|
948
|
+
padding: 0 !important;
|
|
949
|
+
position: absolute !important;
|
|
950
|
+
width: 0.1rem !important;
|
|
951
|
+
white-space: nowrap !important;
|
|
952
|
+
}
|
|
953
|
+
|
|
923
954
|
.wishlist-button:hover {
|
|
924
955
|
background-color: var(--color-alpha-light-stronger);
|
|
925
956
|
}
|
|
@@ -940,18 +971,24 @@ V.styles = j`
|
|
|
940
971
|
fill: var(--color-alpha-light-strong);
|
|
941
972
|
}
|
|
942
973
|
`;
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
],
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
],
|
|
949
|
-
|
|
950
|
-
|
|
974
|
+
J([
|
|
975
|
+
c({ type: String, reflect: !0 })
|
|
976
|
+
], T.prototype, "status", 2);
|
|
977
|
+
J([
|
|
978
|
+
c({ type: String, reflect: !0 })
|
|
979
|
+
], T.prototype, "ariaDescribedBy", 2);
|
|
980
|
+
J([
|
|
981
|
+
c({ type: String, reflect: !0 })
|
|
982
|
+
], T.prototype, "label", 2);
|
|
983
|
+
T = J([
|
|
984
|
+
Z("o-wishlist-button")
|
|
985
|
+
], T);
|
|
986
|
+
var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, A = (i, t, e, s) => {
|
|
987
|
+
for (var r = s > 1 ? void 0 : s ? ce(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
951
988
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
952
|
-
return s && r &&
|
|
989
|
+
return s && r && he(t, e, r), r;
|
|
953
990
|
};
|
|
954
|
-
let
|
|
991
|
+
let b = class extends w {
|
|
955
992
|
constructor() {
|
|
956
993
|
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
|
|
957
994
|
}
|
|
@@ -959,29 +996,29 @@ let g = class extends S {
|
|
|
959
996
|
super.updated(i), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
960
997
|
}
|
|
961
998
|
render() {
|
|
962
|
-
const
|
|
999
|
+
const i = St[this.icon] ?? "", t = `icon-${this.icon}`, e = i.replace(
|
|
963
1000
|
"<svg",
|
|
964
1001
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
965
1002
|
);
|
|
966
|
-
return
|
|
967
|
-
${this.type === "span" ?
|
|
968
|
-
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status}" ?disabled="${this.disabled}">
|
|
969
|
-
${
|
|
1003
|
+
return g`
|
|
1004
|
+
${this.type === "span" ? g`
|
|
1005
|
+
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1006
|
+
${st(e)}
|
|
970
1007
|
</span>
|
|
971
|
-
` :
|
|
1008
|
+
` : g`
|
|
972
1009
|
<button
|
|
973
1010
|
type="button"
|
|
974
1011
|
aria-label="icon"
|
|
975
|
-
class="icon-button ${this.size} ${this.bgstyle} ${this.status}"
|
|
1012
|
+
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
976
1013
|
?disabled="${this.disabled}"
|
|
977
1014
|
>
|
|
978
|
-
${
|
|
1015
|
+
${st(e)}
|
|
979
1016
|
</button>
|
|
980
1017
|
`}
|
|
981
1018
|
`;
|
|
982
1019
|
}
|
|
983
1020
|
};
|
|
984
|
-
|
|
1021
|
+
b.styles = I`
|
|
985
1022
|
:host {
|
|
986
1023
|
display: inline-flex;
|
|
987
1024
|
justify-content: center;
|
|
@@ -1061,10 +1098,15 @@ g.styles = j`
|
|
|
1061
1098
|
svg {
|
|
1062
1099
|
path {
|
|
1063
1100
|
stroke: var(--color-content-action-primary);
|
|
1101
|
+
fill: var(--color-content-action-primary);
|
|
1064
1102
|
}
|
|
1065
1103
|
}
|
|
1066
1104
|
}
|
|
1067
1105
|
|
|
1106
|
+
.icon-button.none-light.icon-wishlist svg path {
|
|
1107
|
+
fill: none;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1068
1110
|
.icon-button.background-light {
|
|
1069
1111
|
background-color: var(--color-alpha-light-strong);
|
|
1070
1112
|
|
|
@@ -1134,27 +1176,181 @@ g.styles = j`
|
|
|
1134
1176
|
|
|
1135
1177
|
}
|
|
1136
1178
|
`;
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
],
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
],
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
],
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
],
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
],
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
],
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
],
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
],
|
|
1179
|
+
A([
|
|
1180
|
+
c({ type: String, reflect: !0 })
|
|
1181
|
+
], b.prototype, "bgstyle", 2);
|
|
1182
|
+
A([
|
|
1183
|
+
c({ type: String, reflect: !0 })
|
|
1184
|
+
], b.prototype, "size", 2);
|
|
1185
|
+
A([
|
|
1186
|
+
c({ type: String, reflect: !0 })
|
|
1187
|
+
], b.prototype, "status", 2);
|
|
1188
|
+
A([
|
|
1189
|
+
c({ type: String, reflect: !0 })
|
|
1190
|
+
], b.prototype, "type", 2);
|
|
1191
|
+
A([
|
|
1192
|
+
c({ type: String })
|
|
1193
|
+
], b.prototype, "strokewidth", 2);
|
|
1194
|
+
A([
|
|
1195
|
+
c({ type: String })
|
|
1196
|
+
], b.prototype, "icon", 2);
|
|
1197
|
+
A([
|
|
1198
|
+
c({ type: Boolean, reflect: !0 })
|
|
1199
|
+
], b.prototype, "disabled", 2);
|
|
1200
|
+
b = A([
|
|
1201
|
+
Z("o-icon-button")
|
|
1202
|
+
], b);
|
|
1203
|
+
var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, k = (i, t, e, s) => {
|
|
1204
|
+
for (var r = s > 1 ? void 0 : s ? ue(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
1205
|
+
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
1206
|
+
return s && r && de(t, e, r), r;
|
|
1207
|
+
};
|
|
1208
|
+
let $ = class extends w {
|
|
1209
|
+
constructor() {
|
|
1210
|
+
super(...arguments), this.href = "", this.target = "", this.status = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
|
|
1211
|
+
}
|
|
1212
|
+
render() {
|
|
1213
|
+
return g`
|
|
1214
|
+
<a href="${this.href}" target="${this.target}">
|
|
1215
|
+
${this.endIcon && this.reverseEndIcon ? g`
|
|
1216
|
+
<o-icon-button
|
|
1217
|
+
icon="chevronLeft"
|
|
1218
|
+
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
1219
|
+
size="small"
|
|
1220
|
+
aria-hidden="true"
|
|
1221
|
+
type="span"
|
|
1222
|
+
></o-icon-button>
|
|
1223
|
+
` : null}
|
|
1224
|
+
<span class="link-text"><slot></slot></span>
|
|
1225
|
+
${this.endIcon && !this.reverseEndIcon ? g`
|
|
1226
|
+
<o-icon-button
|
|
1227
|
+
icon="chevronRight"
|
|
1228
|
+
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
1229
|
+
size="small"
|
|
1230
|
+
aria-hidden="true"
|
|
1231
|
+
type="span"
|
|
1232
|
+
></o-icon-button>
|
|
1233
|
+
` : null}
|
|
1234
|
+
</a>
|
|
1235
|
+
`;
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
$.styles = I`
|
|
1239
|
+
:host([status="standard"]) a {
|
|
1240
|
+
color: var(--color-content-action-secondary);
|
|
1241
|
+
font-size: var(--font-size-200);
|
|
1242
|
+
font-weight: var(--font-weight-400);
|
|
1243
|
+
line-height: var(--line-height-240);
|
|
1244
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1245
|
+
font-family: var(--font-family-loccitane-serif);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
:host([status="discret"]) a {
|
|
1249
|
+
color: var(--color-content-action-secondary);
|
|
1250
|
+
font-size: var(--font-size-100);
|
|
1251
|
+
font-weight: var(--font-weight-400);
|
|
1252
|
+
line-height: var(--line-height-160);
|
|
1253
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1254
|
+
font-family: var(--font-family-loccitane-sans);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
:host([status="review"]) a {
|
|
1258
|
+
color: var(--color-content-action-secondary);
|
|
1259
|
+
font-size: var(--font-size-100);
|
|
1260
|
+
font-weight: var(--font-weight-500);
|
|
1261
|
+
line-height: var(--line-height-160);
|
|
1262
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1263
|
+
font-family: var(--font-family-loccitane-sans);
|
|
1264
|
+
text-transform: uppercase;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
:host([inverse]) a {
|
|
1268
|
+
color: var(--color-container-action-tertiary-default);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
:host([endIcon]) a o-icon-button {
|
|
1272
|
+
margin-left: 2px;
|
|
1273
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
:host([endIcon][reverseEndIcon]) a o-icon-button {
|
|
1277
|
+
margin-right: 2px;
|
|
1278
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
:host([endIcon]) a {
|
|
1282
|
+
&:hover {
|
|
1283
|
+
o-icon-button {
|
|
1284
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1285
|
+
:host(:not([reverseEndIcon])) & {
|
|
1286
|
+
transform: translateX(4px);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
:host([reverseEndIcon]) & {
|
|
1290
|
+
transform: translateX(-4px);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
/*Underline effect */
|
|
1297
|
+
:host a {
|
|
1298
|
+
position: relative;
|
|
1299
|
+
text-decoration: none;
|
|
1300
|
+
color: inherit;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
.link-text {
|
|
1304
|
+
position: relative;
|
|
1305
|
+
display: inline-block;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.link-text::after {
|
|
1309
|
+
content: "";
|
|
1310
|
+
position: absolute;
|
|
1311
|
+
left: 0;
|
|
1312
|
+
bottom: 0;
|
|
1313
|
+
width: 100%;
|
|
1314
|
+
height: 1px;
|
|
1315
|
+
background-color: currentColor;
|
|
1316
|
+
opacity: 0;
|
|
1317
|
+
transition: opacity 0.3s ease, height 0.3s ease;
|
|
1318
|
+
pointer-events: none;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
:host a:hover .link-text::after {
|
|
1322
|
+
opacity: 1;
|
|
1323
|
+
height: 1px;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
:host(:not([endIcon])) .link-text::after {
|
|
1327
|
+
opacity: 1;
|
|
1328
|
+
height: 1px;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
:host(:not([endIcon])) a:hover .link-text::after {
|
|
1332
|
+
opacity: 0;
|
|
1333
|
+
}
|
|
1334
|
+
/* End of underline effect */
|
|
1335
|
+
`;
|
|
1336
|
+
k([
|
|
1337
|
+
c({ type: String })
|
|
1338
|
+
], $.prototype, "href", 2);
|
|
1339
|
+
k([
|
|
1340
|
+
c({ type: String })
|
|
1341
|
+
], $.prototype, "target", 2);
|
|
1342
|
+
k([
|
|
1343
|
+
c({ type: String, reflect: !0 })
|
|
1344
|
+
], $.prototype, "status", 2);
|
|
1345
|
+
k([
|
|
1346
|
+
c({ type: Boolean, reflect: !0 })
|
|
1347
|
+
], $.prototype, "inverse", 2);
|
|
1348
|
+
k([
|
|
1349
|
+
c({ type: Boolean, reflect: !0 })
|
|
1350
|
+
], $.prototype, "endIcon", 2);
|
|
1351
|
+
k([
|
|
1352
|
+
c({ type: Boolean, reflect: !0 })
|
|
1353
|
+
], $.prototype, "reverseEndIcon", 2);
|
|
1354
|
+
$ = k([
|
|
1355
|
+
Z("o-link")
|
|
1356
|
+
], $);
|