@florid-kit/components 0.3.13 → 0.3.16
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/button.d.ts +11 -26
- package/components/side-panel.d.ts +32 -0
- package/index.js +404 -228
- package/index.mjs +970 -706
- package/package.json +1 -1
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
|
|
8
|
-
constructor(t, e,
|
|
9
|
-
if (this._$cssResult$ = !0,
|
|
6
|
+
const W = globalThis, at = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lt = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let At = class {
|
|
8
|
+
constructor(t, e, o) {
|
|
9
|
+
if (this._$cssResult$ = !0, o !== lt) 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 (
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
if (at && t === void 0) {
|
|
16
|
+
const o = e !== void 0 && e.length === 1;
|
|
17
|
+
o && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), o && ut.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,120 +22,120 @@ let xt = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
const e =
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
30
|
-
})(
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
25
|
+
const Pt = (n) => new At(typeof n == "string" ? n : n + "", void 0, lt), S = (n, ...t) => {
|
|
26
|
+
const e = n.length === 1 ? n[0] : t.reduce((o, s, i) => o + ((r) => {
|
|
27
|
+
if (r._$cssResult$ === !0) return r.cssText;
|
|
28
|
+
if (typeof r == "number") return r;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(s) + n[i + 1], n[0]);
|
|
31
|
+
return new At(e, n, lt);
|
|
32
|
+
}, Bt = (n, t) => {
|
|
33
|
+
if (at) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const o = document.createElement("style"), s = W.litNonce;
|
|
36
|
+
s !== void 0 && o.setAttribute("nonce", s), o.textContent = e.cssText, n.appendChild(o);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ft = at ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
|
-
for (const
|
|
41
|
-
return
|
|
42
|
-
})(
|
|
40
|
+
for (const o of t.cssRules) e += o.cssText;
|
|
41
|
+
return Pt(e);
|
|
42
|
+
})(n) : n;
|
|
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: kt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: It, getPrototypeOf: Ut } = Object, E = globalThis, gt = E.trustedTypes, Tt = gt ? gt.emptyScript : "", tt = E.reactiveElementPolyfillSupport, N = (n, t) => n, K = { toAttribute(n, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
n = n ? Tt : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
n = n == null ? n : JSON.stringify(n);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let e =
|
|
57
|
+
return n;
|
|
58
|
+
}, fromAttribute(n, t) {
|
|
59
|
+
let e = n;
|
|
60
60
|
switch (t) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
e =
|
|
62
|
+
e = n !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
e =
|
|
65
|
+
e = n === null ? null : Number(n);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
e = JSON.parse(
|
|
70
|
+
e = JSON.parse(n);
|
|
71
71
|
} catch {
|
|
72
72
|
e = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
let
|
|
76
|
+
} }, ct = (n, t) => !kt(n, t), vt = { attribute: !0, type: String, converter: K, reflect: !1, useDefault: !1, hasChanged: ct };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let M = 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 = vt) {
|
|
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
|
-
const
|
|
88
|
-
|
|
87
|
+
const o = Symbol(), s = this.getPropertyDescriptor(t, o, e);
|
|
88
|
+
s !== void 0 && Ot(this.prototype, t, s);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static getPropertyDescriptor(t, e,
|
|
92
|
-
const { get:
|
|
91
|
+
static getPropertyDescriptor(t, e, o) {
|
|
92
|
+
const { get: s, set: i } = Ht(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
|
-
}, set(
|
|
95
|
-
this[e] =
|
|
94
|
+
}, set(r) {
|
|
95
|
+
this[e] = r;
|
|
96
96
|
} };
|
|
97
|
-
return { get:
|
|
98
|
-
const
|
|
99
|
-
|
|
97
|
+
return { get: s, set(r) {
|
|
98
|
+
const c = s == null ? void 0 : s.call(this);
|
|
99
|
+
i == null || i.call(this, r), this.requestUpdate(t, c, o);
|
|
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) ?? vt;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
107
|
-
const t =
|
|
106
|
+
if (this.hasOwnProperty(N("elementProperties"))) return;
|
|
107
|
+
const t = Ut(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,
|
|
114
|
-
for (const
|
|
111
|
+
if (this.hasOwnProperty(N("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
|
|
113
|
+
const e = this.properties, o = [...Mt(e), ...It(e)];
|
|
114
|
+
for (const s of o) this.createProperty(s, e[s]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
117
117
|
if (t !== null) {
|
|
118
118
|
const e = litPropertyMetadata.get(t);
|
|
119
|
-
if (e !== void 0) for (const [
|
|
119
|
+
if (e !== void 0) for (const [o, s] of e) this.elementProperties.set(o, s);
|
|
120
120
|
}
|
|
121
121
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const [e,
|
|
123
|
-
const
|
|
124
|
-
|
|
122
|
+
for (const [e, o] of this.elementProperties) {
|
|
123
|
+
const s = this._$Eu(e, o);
|
|
124
|
+
s !== void 0 && this._$Eh.set(s, e);
|
|
125
125
|
}
|
|
126
126
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
127
|
}
|
|
128
128
|
static finalizeStyles(t) {
|
|
129
129
|
const e = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
133
|
-
} else t !== void 0 && e.push(
|
|
131
|
+
const o = new Set(t.flat(1 / 0).reverse());
|
|
132
|
+
for (const s of o) e.unshift(ft(s));
|
|
133
|
+
} else t !== void 0 && e.push(ft(t));
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, e) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const o = e.attribute;
|
|
138
|
+
return o === !1 ? void 0 : typeof o == "string" ? o : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
139
139
|
}
|
|
140
140
|
constructor() {
|
|
141
141
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -154,18 +154,18 @@ let k = class extends HTMLElement {
|
|
|
154
154
|
}
|
|
155
155
|
_$E_() {
|
|
156
156
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
157
|
-
for (const
|
|
157
|
+
for (const o of e.keys()) this.hasOwnProperty(o) && (t.set(o, this[o]), delete this[o]);
|
|
158
158
|
t.size > 0 && (this._$Ep = t);
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return Bt(t, this.constructor.elementStyles), t;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var t;
|
|
166
166
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
167
|
-
var
|
|
168
|
-
return (
|
|
167
|
+
var o;
|
|
168
|
+
return (o = e.hostConnected) == null ? void 0 : o.call(e);
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
enableUpdating(t) {
|
|
@@ -173,40 +173,40 @@ let k = class extends HTMLElement {
|
|
|
173
173
|
disconnectedCallback() {
|
|
174
174
|
var t;
|
|
175
175
|
(t = this._$EO) == null || t.forEach((e) => {
|
|
176
|
-
var
|
|
177
|
-
return (
|
|
176
|
+
var o;
|
|
177
|
+
return (o = e.hostDisconnected) == null ? void 0 : o.call(e);
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
attributeChangedCallback(t, e,
|
|
181
|
-
this._$AK(t,
|
|
180
|
+
attributeChangedCallback(t, e, o) {
|
|
181
|
+
this._$AK(t, o);
|
|
182
182
|
}
|
|
183
183
|
_$ET(t, e) {
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
this._$Em = t,
|
|
184
|
+
var i;
|
|
185
|
+
const o = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, o);
|
|
186
|
+
if (s !== void 0 && o.reflect === !0) {
|
|
187
|
+
const r = (((i = o.converter) == null ? void 0 : i.toAttribute) !== void 0 ? o.converter : K).toAttribute(e, o.type);
|
|
188
|
+
this._$Em = t, r == null ? this.removeAttribute(s) : this.setAttribute(s, r), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
_$AK(t, e) {
|
|
192
|
-
var
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
const
|
|
196
|
-
this._$Em =
|
|
192
|
+
var i, r;
|
|
193
|
+
const o = this.constructor, s = o._$Eh.get(t);
|
|
194
|
+
if (s !== void 0 && this._$Em !== s) {
|
|
195
|
+
const c = o.getPropertyOptions(s), a = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((i = c.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? c.converter : K;
|
|
196
|
+
this._$Em = s, this[s] = a.fromAttribute(e, c.type) ?? ((r = this._$Ej) == null ? void 0 : r.get(s)) ?? null, this._$Em = null;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
requestUpdate(t, e,
|
|
200
|
-
var
|
|
199
|
+
requestUpdate(t, e, o) {
|
|
200
|
+
var s;
|
|
201
201
|
if (t !== void 0) {
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
204
|
-
this.C(t, e,
|
|
202
|
+
const i = this.constructor, r = this[t];
|
|
203
|
+
if (o ?? (o = i.getPropertyOptions(t)), !((o.hasChanged ?? ct)(r, e) || o.useDefault && o.reflect && r === ((s = this._$Ej) == null ? void 0 : s.get(t)) && !this.hasAttribute(i._$Eu(t, o)))) return;
|
|
204
|
+
this.C(t, e, o);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
207
207
|
}
|
|
208
|
-
C(t, e, { useDefault:
|
|
209
|
-
|
|
208
|
+
C(t, e, { useDefault: o, reflect: s, wrapped: i }, r) {
|
|
209
|
+
o && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), i !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || o || (e = void 0), this._$AL.set(t, e)), s === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
210
210
|
}
|
|
211
211
|
async _$EP() {
|
|
212
212
|
this.isUpdatePending = !0;
|
|
@@ -222,28 +222,28 @@ let k = class extends HTMLElement {
|
|
|
222
222
|
return this.performUpdate();
|
|
223
223
|
}
|
|
224
224
|
performUpdate() {
|
|
225
|
-
var
|
|
225
|
+
var o;
|
|
226
226
|
if (!this.isUpdatePending) return;
|
|
227
227
|
if (!this.hasUpdated) {
|
|
228
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
229
|
-
for (const [
|
|
229
|
+
for (const [i, r] of this._$Ep) this[i] = r;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
234
|
-
const { wrapped:
|
|
235
|
-
|
|
232
|
+
const s = this.constructor.elementProperties;
|
|
233
|
+
if (s.size > 0) for (const [i, r] of s) {
|
|
234
|
+
const { wrapped: c } = r, a = this[i];
|
|
235
|
+
c !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, r, a);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
let t = !1;
|
|
239
239
|
const e = this._$AL;
|
|
240
240
|
try {
|
|
241
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (
|
|
242
|
-
var
|
|
243
|
-
return (
|
|
241
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (o = this._$EO) == null || o.forEach((s) => {
|
|
242
|
+
var i;
|
|
243
|
+
return (i = s.hostUpdate) == null ? void 0 : i.call(s);
|
|
244
244
|
}), this.update(e)) : this._$EM();
|
|
245
|
-
} catch (
|
|
246
|
-
throw t = !1, this._$EM(),
|
|
245
|
+
} catch (s) {
|
|
246
|
+
throw t = !1, this._$EM(), s;
|
|
247
247
|
}
|
|
248
248
|
t && this._$AE(e);
|
|
249
249
|
}
|
|
@@ -251,9 +251,9 @@ let k = class extends HTMLElement {
|
|
|
251
251
|
}
|
|
252
252
|
_$AE(t) {
|
|
253
253
|
var e;
|
|
254
|
-
(e = this._$EO) == null || e.forEach((
|
|
255
|
-
var
|
|
256
|
-
return (
|
|
254
|
+
(e = this._$EO) == null || e.forEach((o) => {
|
|
255
|
+
var s;
|
|
256
|
+
return (s = o.hostUpdated) == null ? void 0 : s.call(o);
|
|
257
257
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
258
258
|
}
|
|
259
259
|
_$EM() {
|
|
@@ -276,74 +276,74 @@ let k = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(t) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
|
|
279
|
+
M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[N("elementProperties")] = /* @__PURE__ */ new Map(), M[N("finalized")] = /* @__PURE__ */ new Map(), tt == null || tt({ ReactiveElement: M }), (E.reactiveElementVersions ?? (E.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 j = globalThis, X = j.trustedTypes, bt = X ? X.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Et = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, St = "?" + A, zt = `<${St}>`, k = document, R = () => k.createComment(""), F = (n) => n === null || typeof n != "object" && typeof n != "function", ht = Array.isArray, Dt = (n) => ht(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", et = `[
|
|
286
|
+
\f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, yt = /-->/g, $t = />/g, L = RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), d = Nt(1), O = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), _t = /* @__PURE__ */ new WeakMap(), P = k.createTreeWalker(k, 129);
|
|
288
|
+
function Lt(n, t) {
|
|
289
|
+
if (!ht(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
|
+
return bt !== void 0 ? bt.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
const e =
|
|
294
|
-
let
|
|
295
|
-
for (let
|
|
296
|
-
const a =
|
|
297
|
-
let
|
|
298
|
-
for (;
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
return [
|
|
292
|
+
const jt = (n, t) => {
|
|
293
|
+
const e = n.length - 1, o = [];
|
|
294
|
+
let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = D;
|
|
295
|
+
for (let c = 0; c < e; c++) {
|
|
296
|
+
const a = n[c];
|
|
297
|
+
let f, g, p = -1, w = 0;
|
|
298
|
+
for (; w < a.length && (r.lastIndex = w, g = r.exec(a), g !== null); ) w = r.lastIndex, r === D ? g[1] === "!--" ? r = yt : g[1] !== void 0 ? r = $t : g[2] !== void 0 ? (Ct.test(g[2]) && (s = RegExp("</" + g[2], "g")), r = L) : g[3] !== void 0 && (r = L) : r === L ? g[0] === ">" ? (r = s ?? D, p = -1) : g[1] === void 0 ? p = -2 : (p = r.lastIndex - g[2].length, f = g[1], r = g[3] === void 0 ? L : g[3] === '"' ? wt : mt) : r === wt || r === mt ? r = L : r === yt || r === $t ? r = D : (r = L, s = void 0);
|
|
299
|
+
const x = r === L && n[c + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
i += r === D ? a + zt : p >= 0 ? (o.push(f), a.slice(0, p) + Et + a.slice(p) + A + x) : a + A + (p === -2 ? c : x);
|
|
301
|
+
}
|
|
302
|
+
return [Lt(n, i + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), o];
|
|
303
303
|
};
|
|
304
|
-
class
|
|
305
|
-
constructor({ strings: t, _$litType$: e },
|
|
306
|
-
let
|
|
304
|
+
class V {
|
|
305
|
+
constructor({ strings: t, _$litType$: e }, o) {
|
|
306
|
+
let s;
|
|
307
307
|
this.parts = [];
|
|
308
|
-
let
|
|
309
|
-
const
|
|
310
|
-
if (this.el =
|
|
311
|
-
const
|
|
312
|
-
|
|
308
|
+
let i = 0, r = 0;
|
|
309
|
+
const c = t.length - 1, a = this.parts, [f, g] = jt(t, e);
|
|
310
|
+
if (this.el = V.createElement(f, o), P.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
|
+
const p = this.el.content.firstChild;
|
|
312
|
+
p.replaceWith(...p.childNodes);
|
|
313
313
|
}
|
|
314
|
-
for (; (
|
|
315
|
-
if (
|
|
316
|
-
if (
|
|
317
|
-
const
|
|
318
|
-
a.push({ type: 1, index:
|
|
319
|
-
} else
|
|
320
|
-
if (
|
|
321
|
-
const
|
|
322
|
-
if (
|
|
323
|
-
|
|
324
|
-
for (let
|
|
325
|
-
|
|
314
|
+
for (; (s = P.nextNode()) !== null && a.length < c; ) {
|
|
315
|
+
if (s.nodeType === 1) {
|
|
316
|
+
if (s.hasAttributes()) for (const p of s.getAttributeNames()) if (p.endsWith(Et)) {
|
|
317
|
+
const w = g[r++], x = s.getAttribute(p).split(A), q = /([.?@])?(.*)/.exec(w);
|
|
318
|
+
a.push({ type: 1, index: i, name: q[2], strings: x, ctor: q[1] === "." ? Ft : q[1] === "?" ? Vt : q[1] === "@" ? Zt : G }), s.removeAttribute(p);
|
|
319
|
+
} else p.startsWith(A) && (a.push({ type: 6, index: i }), s.removeAttribute(p));
|
|
320
|
+
if (Ct.test(s.tagName)) {
|
|
321
|
+
const p = s.textContent.split(A), w = p.length - 1;
|
|
322
|
+
if (w > 0) {
|
|
323
|
+
s.textContent = X ? X.emptyScript : "";
|
|
324
|
+
for (let x = 0; x < w; x++) s.append(p[x], R()), P.nextNode(), a.push({ type: 2, index: ++i });
|
|
325
|
+
s.append(p[w], R());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (
|
|
328
|
+
} else if (s.nodeType === 8) if (s.data === St) a.push({ type: 2, index: i });
|
|
329
329
|
else {
|
|
330
|
-
let
|
|
331
|
-
for (; (
|
|
330
|
+
let p = -1;
|
|
331
|
+
for (; (p = s.data.indexOf(A, p + 1)) !== -1; ) a.push({ type: 7, index: i }), p += A.length - 1;
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
i++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
337
|
-
const
|
|
338
|
-
return
|
|
337
|
+
const o = k.createElement("template");
|
|
338
|
+
return o.innerHTML = t, o;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
function
|
|
342
|
-
var
|
|
343
|
-
if (t ===
|
|
344
|
-
let
|
|
345
|
-
const
|
|
346
|
-
return (
|
|
341
|
+
function I(n, t, e = n, o) {
|
|
342
|
+
var r, c;
|
|
343
|
+
if (t === O) return t;
|
|
344
|
+
let s = o !== void 0 ? (r = e._$Co) == null ? void 0 : r[o] : e._$Cl;
|
|
345
|
+
const i = F(t) ? void 0 : t._$litDirective$;
|
|
346
|
+
return (s == null ? void 0 : s.constructor) !== i && ((c = s == null ? void 0 : s._$AO) == null || c.call(s, !1), i === void 0 ? s = void 0 : (s = new i(n), s._$AT(n, e, o)), o !== void 0 ? (e._$Co ?? (e._$Co = []))[o] = s : e._$Cl = s), s !== void 0 && (t = I(n, s._$AS(n, t.values), s, o)), t;
|
|
347
347
|
}
|
|
348
348
|
class Rt {
|
|
349
349
|
constructor(t, e) {
|
|
@@ -356,30 +356,30 @@ class Rt {
|
|
|
356
356
|
return this._$AM._$AU;
|
|
357
357
|
}
|
|
358
358
|
u(t) {
|
|
359
|
-
const { el: { content: e }, parts:
|
|
360
|
-
|
|
361
|
-
let
|
|
359
|
+
const { el: { content: e }, parts: o } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? k).importNode(e, !0);
|
|
360
|
+
P.currentNode = s;
|
|
361
|
+
let i = P.nextNode(), r = 0, c = 0, a = o[0];
|
|
362
362
|
for (; a !== void 0; ) {
|
|
363
|
-
if (
|
|
364
|
-
let
|
|
365
|
-
a.type === 2 ?
|
|
363
|
+
if (r === a.index) {
|
|
364
|
+
let f;
|
|
365
|
+
a.type === 2 ? f = new Z(i, i.nextSibling, this, t) : a.type === 1 ? f = new a.ctor(i, a.name, a.strings, this, t) : a.type === 6 && (f = new qt(i, this, t)), this._$AV.push(f), a = o[++c];
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
r !== (a == null ? void 0 : a.index) && (i = P.nextNode(), r++);
|
|
368
368
|
}
|
|
369
|
-
return
|
|
369
|
+
return P.currentNode = k, s;
|
|
370
370
|
}
|
|
371
371
|
p(t) {
|
|
372
372
|
let e = 0;
|
|
373
|
-
for (const
|
|
373
|
+
for (const o of this._$AV) o !== void 0 && (o.strings !== void 0 ? (o._$AI(t, o, e), e += o.strings.length - 2) : o._$AI(t[e])), e++;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
class
|
|
376
|
+
class Z {
|
|
377
377
|
get _$AU() {
|
|
378
378
|
var t;
|
|
379
379
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
380
380
|
}
|
|
381
|
-
constructor(t, e,
|
|
382
|
-
this.type = 2, this._$AH =
|
|
381
|
+
constructor(t, e, o, s) {
|
|
382
|
+
this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = o, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
|
383
383
|
}
|
|
384
384
|
get parentNode() {
|
|
385
385
|
let t = this._$AA.parentNode;
|
|
@@ -393,7 +393,7 @@ class j {
|
|
|
393
393
|
return this._$AB;
|
|
394
394
|
}
|
|
395
395
|
_$AI(t, e = this) {
|
|
396
|
-
t =
|
|
396
|
+
t = I(this, t, e), F(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Dt(t) ? this.k(t) : this._(t);
|
|
397
397
|
}
|
|
398
398
|
O(t) {
|
|
399
399
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -402,33 +402,33 @@ class j {
|
|
|
402
402
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
403
403
|
}
|
|
404
404
|
_(t) {
|
|
405
|
-
this._$AH !==
|
|
405
|
+
this._$AH !== h && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(k.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
|
-
var
|
|
409
|
-
const { values: e, _$litType$:
|
|
410
|
-
if (((
|
|
408
|
+
var i;
|
|
409
|
+
const { values: e, _$litType$: o } = t, s = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = V.createElement(Lt(o.h, o.h[0]), this.options)), o);
|
|
410
|
+
if (((i = this._$AH) == null ? void 0 : i._$AD) === s) this._$AH.p(e);
|
|
411
411
|
else {
|
|
412
|
-
const
|
|
413
|
-
|
|
412
|
+
const r = new Rt(s, this), c = r.u(this.options);
|
|
413
|
+
r.p(e), this.T(c), this._$AH = r;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
_$AC(t) {
|
|
417
|
-
let e =
|
|
418
|
-
return e === void 0 &&
|
|
417
|
+
let e = _t.get(t.strings);
|
|
418
|
+
return e === void 0 && _t.set(t.strings, e = new V(t)), e;
|
|
419
419
|
}
|
|
420
420
|
k(t) {
|
|
421
|
-
|
|
421
|
+
ht(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const e = this._$AH;
|
|
423
|
-
let
|
|
424
|
-
for (const
|
|
425
|
-
|
|
423
|
+
let o, s = 0;
|
|
424
|
+
for (const i of t) s === e.length ? e.push(o = new Z(this.O(R()), this.O(R()), this, this.options)) : o = e[s], o._$AI(i), s++;
|
|
425
|
+
s < e.length && (this._$AR(o && o._$AB.nextSibling, s), e.length = s);
|
|
426
426
|
}
|
|
427
427
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
428
|
-
var
|
|
429
|
-
for ((
|
|
430
|
-
const
|
|
431
|
-
t.remove(), t =
|
|
428
|
+
var o;
|
|
429
|
+
for ((o = this._$AP) == null ? void 0 : o.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
430
|
+
const s = t.nextSibling;
|
|
431
|
+
t.remove(), t = s;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
setConnected(t) {
|
|
@@ -436,90 +436,90 @@ class j {
|
|
|
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 G {
|
|
440
440
|
get tagName() {
|
|
441
441
|
return this.element.tagName;
|
|
442
442
|
}
|
|
443
443
|
get _$AU() {
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
|
-
constructor(t, e,
|
|
447
|
-
this.type = 1, this._$AH =
|
|
446
|
+
constructor(t, e, o, s, i) {
|
|
447
|
+
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = i, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = h;
|
|
448
448
|
}
|
|
449
|
-
_$AI(t, e = this,
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
if (
|
|
449
|
+
_$AI(t, e = this, o, s) {
|
|
450
|
+
const i = this.strings;
|
|
451
|
+
let r = !1;
|
|
452
|
+
if (i === void 0) t = I(this, t, e, 0), r = !F(t) || t !== this._$AH && t !== O, r && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
|
-
const
|
|
455
|
-
let a,
|
|
456
|
-
for (t =
|
|
454
|
+
const c = t;
|
|
455
|
+
let a, f;
|
|
456
|
+
for (t = i[0], a = 0; a < i.length - 1; a++) f = I(this, c[o + a], e, a), f === O && (f = this._$AH[a]), r || (r = !F(f) || f !== this._$AH[a]), f === h ? t = h : t !== h && (t += (f ?? "") + i[a + 1]), this._$AH[a] = f;
|
|
457
457
|
}
|
|
458
|
-
|
|
458
|
+
r && !s && this.j(t);
|
|
459
459
|
}
|
|
460
460
|
j(t) {
|
|
461
|
-
t ===
|
|
461
|
+
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class Ft extends G {
|
|
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 === h ? void 0 : t;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class Vt extends
|
|
472
|
+
class Vt extends G {
|
|
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 !== h);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
class Zt extends
|
|
481
|
-
constructor(t, e,
|
|
482
|
-
super(t, e,
|
|
480
|
+
class Zt extends G {
|
|
481
|
+
constructor(t, e, o, s, i) {
|
|
482
|
+
super(t, e, o, s, i), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
|
-
if ((t =
|
|
486
|
-
const
|
|
487
|
-
|
|
485
|
+
if ((t = I(this, t, e, 0) ?? h) === O) return;
|
|
486
|
+
const o = this._$AH, s = t === h && o !== h || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, i = t !== h && (o === h || s);
|
|
487
|
+
s && this.element.removeEventListener(this.name, this, o), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(t) {
|
|
490
490
|
var e;
|
|
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
|
|
495
|
-
constructor(t, e,
|
|
496
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
|
494
|
+
class qt {
|
|
495
|
+
constructor(t, e, o) {
|
|
496
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = o;
|
|
497
497
|
}
|
|
498
498
|
get _$AU() {
|
|
499
499
|
return this._$AM._$AU;
|
|
500
500
|
}
|
|
501
501
|
_$AI(t) {
|
|
502
|
-
|
|
502
|
+
I(this, t);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const
|
|
508
|
-
const
|
|
509
|
-
let
|
|
510
|
-
if (
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
}
|
|
514
|
-
return
|
|
505
|
+
const ot = j.litHtmlPolyfillSupport;
|
|
506
|
+
ot == null || ot(V, Z), (j.litHtmlVersions ?? (j.litHtmlVersions = [])).push("3.3.0");
|
|
507
|
+
const Wt = (n, t, e) => {
|
|
508
|
+
const o = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
|
+
let s = o._$litPart$;
|
|
510
|
+
if (s === void 0) {
|
|
511
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
512
|
+
o._$litPart$ = s = new Z(t.insertBefore(R(), i), i, void 0, e ?? {});
|
|
513
|
+
}
|
|
514
|
+
return s._$AI(n), s;
|
|
515
515
|
};
|
|
516
516
|
/**
|
|
517
517
|
* @license
|
|
518
518
|
* Copyright 2017 Google LLC
|
|
519
519
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
520
520
|
*/
|
|
521
|
-
const
|
|
522
|
-
let
|
|
521
|
+
const B = globalThis;
|
|
522
|
+
let $ = class extends M {
|
|
523
523
|
constructor() {
|
|
524
524
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
525
525
|
}
|
|
@@ -530,7 +530,7 @@ let y = class extends k {
|
|
|
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 = Wt(e, this.renderRoot, this.renderOptions);
|
|
534
534
|
}
|
|
535
535
|
connectedCallback() {
|
|
536
536
|
var t;
|
|
@@ -541,62 +541,62 @@ let y = class extends k {
|
|
|
541
541
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
542
542
|
}
|
|
543
543
|
render() {
|
|
544
|
-
return
|
|
544
|
+
return O;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
|
-
var
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
(
|
|
547
|
+
var xt;
|
|
548
|
+
$._$litElement$ = !0, $.finalized = !0, (xt = B.litElementHydrateSupport) == null || xt.call(B, { LitElement: $ });
|
|
549
|
+
const st = B.litElementPolyfillSupport;
|
|
550
|
+
st == null || st({ LitElement: $ });
|
|
551
|
+
(B.litElementVersions ?? (B.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 = (n) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
|
-
customElements.define(
|
|
560
|
-
}) : customElements.define(
|
|
559
|
+
customElements.define(n, t);
|
|
560
|
+
}) : customElements.define(n, t);
|
|
561
561
|
};
|
|
562
562
|
/**
|
|
563
563
|
* @license
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const
|
|
568
|
-
const { kind:
|
|
569
|
-
let
|
|
570
|
-
if (
|
|
571
|
-
const { name:
|
|
572
|
-
return { set(
|
|
567
|
+
const Kt = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ct }, Xt = (n = Kt, t, e) => {
|
|
568
|
+
const { kind: o, metadata: s } = e;
|
|
569
|
+
let i = globalThis.litPropertyMetadata.get(s);
|
|
570
|
+
if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), o === "setter" && ((n = Object.create(n)).wrapped = !0), i.set(e.name, n), o === "accessor") {
|
|
571
|
+
const { name: r } = e;
|
|
572
|
+
return { set(c) {
|
|
573
573
|
const a = t.get.call(this);
|
|
574
|
-
t.set.call(this,
|
|
575
|
-
}, init(
|
|
576
|
-
return
|
|
574
|
+
t.set.call(this, c), this.requestUpdate(r, a, n);
|
|
575
|
+
}, init(c) {
|
|
576
|
+
return c !== void 0 && this.C(r, void 0, n, c), c;
|
|
577
577
|
} };
|
|
578
578
|
}
|
|
579
|
-
if (
|
|
580
|
-
const { name:
|
|
581
|
-
return function(
|
|
582
|
-
const a = this[
|
|
583
|
-
t.call(this,
|
|
579
|
+
if (o === "setter") {
|
|
580
|
+
const { name: r } = e;
|
|
581
|
+
return function(c) {
|
|
582
|
+
const a = this[r];
|
|
583
|
+
t.call(this, c), this.requestUpdate(r, a, n);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
throw Error("Unsupported decorator location: " +
|
|
586
|
+
throw Error("Unsupported decorator location: " + o);
|
|
587
587
|
};
|
|
588
|
-
function
|
|
589
|
-
return (t, e) => typeof e == "object" ?
|
|
590
|
-
const
|
|
591
|
-
return
|
|
592
|
-
})(
|
|
588
|
+
function l(n) {
|
|
589
|
+
return (t, e) => typeof e == "object" ? Xt(n, t, e) : ((o, s, i) => {
|
|
590
|
+
const r = s.hasOwnProperty(i);
|
|
591
|
+
return s.constructor.createProperty(i, o), r ? Object.getOwnPropertyDescriptor(s, i) : void 0;
|
|
592
|
+
})(n, t, e);
|
|
593
593
|
}
|
|
594
|
-
const Jt =
|
|
594
|
+
const Jt = S`
|
|
595
595
|
outline: 1px dashed var(--button-border-color);
|
|
596
596
|
outline-offset: 2px;
|
|
597
597
|
outline: dashed black;
|
|
598
598
|
`;
|
|
599
|
-
|
|
599
|
+
S`
|
|
600
600
|
:host * {
|
|
601
601
|
box-sizing: border-box;
|
|
602
602
|
}
|
|
@@ -606,12 +606,12 @@ O`
|
|
|
606
606
|
* Copyright 2023 Google LLC
|
|
607
607
|
* SPDX-License-Identifier: Apache-2.0
|
|
608
608
|
*/
|
|
609
|
-
const
|
|
610
|
-
function
|
|
609
|
+
const dt = Symbol("internals"), nt = Symbol("privateInternals");
|
|
610
|
+
function Gt(n) {
|
|
611
611
|
var t;
|
|
612
|
-
class e extends
|
|
613
|
-
get [(t =
|
|
614
|
-
return this[
|
|
612
|
+
class e extends n {
|
|
613
|
+
get [(t = dt, t)]() {
|
|
614
|
+
return this[nt] || (this[nt] = this.attachInternals()), this[nt];
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
return e;
|
|
@@ -621,248 +621,47 @@ function Xt(i) {
|
|
|
621
621
|
* Copyright 2023 Google LLC
|
|
622
622
|
* SPDX-License-Identifier: Apache-2.0
|
|
623
623
|
*/
|
|
624
|
-
function
|
|
625
|
-
|
|
624
|
+
function Qt(n) {
|
|
625
|
+
n.addInitializer((t) => {
|
|
626
626
|
const e = t;
|
|
627
|
-
e.addEventListener("click", async (
|
|
628
|
-
const { type:
|
|
629
|
-
if (!(!
|
|
630
|
-
setTimeout(
|
|
631
|
-
}), !
|
|
632
|
-
if (
|
|
633
|
-
|
|
627
|
+
e.addEventListener("click", async (o) => {
|
|
628
|
+
const { type: s, [dt]: i } = e, { form: r } = i;
|
|
629
|
+
if (!(!r || s === "button") && (await new Promise((c) => {
|
|
630
|
+
setTimeout(c);
|
|
631
|
+
}), !o.defaultPrevented)) {
|
|
632
|
+
if (s === "reset") {
|
|
633
|
+
r.reset();
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
|
-
|
|
636
|
+
r.addEventListener(
|
|
637
637
|
"submit",
|
|
638
|
-
(
|
|
639
|
-
Object.defineProperty(
|
|
638
|
+
(c) => {
|
|
639
|
+
Object.defineProperty(c, "submitter", {
|
|
640
640
|
configurable: !0,
|
|
641
641
|
enumerable: !0,
|
|
642
642
|
get: () => e
|
|
643
643
|
});
|
|
644
644
|
},
|
|
645
645
|
{ capture: !0, once: !0 }
|
|
646
|
-
),
|
|
646
|
+
), i.setFormValue(e.value), r.requestSubmit();
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
var Qt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, b = (i, t, e, s) => {
|
|
652
|
-
for (var r = s > 1 ? void 0 : s ? Yt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
653
|
-
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
654
|
-
return s && r && Qt(t, e, r), r;
|
|
655
|
-
};
|
|
656
|
-
const te = Xt(y), _t = (i) => {
|
|
657
|
-
const t = `
|
|
658
|
-
--button-bg-disabled: var(--color-container-disabled);
|
|
659
|
-
--button-bg-pressed: var(--color-container-action-${i}-pressed);
|
|
660
|
-
--button-bg-hover: var(--color-container-action-${i}-hover);
|
|
661
|
-
--button-bg: var(--color-container-action-${i}-default);
|
|
662
|
-
--button-border-disabled: var(--color-border-${i});
|
|
663
|
-
--button-border-hover: var(--color-border-${i});
|
|
664
|
-
--button-border-width-disabled: var(--border-m);
|
|
665
|
-
--button-border-width: var(--border-m);
|
|
666
|
-
--button-border: var(--color-border-${i});
|
|
667
|
-
--button-text-disabled: var(--color-content-disabled);
|
|
668
|
-
--button-text-hover: var(--color-content-action-${i});
|
|
669
|
-
--button-text: var(--color-content-action-${i});
|
|
670
|
-
`;
|
|
671
|
-
return At(t);
|
|
672
|
-
}, ee = ["primary", "secondary"];
|
|
673
|
-
let f = class extends te {
|
|
674
|
-
constructor() {
|
|
675
|
-
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.customclass = "", this.text = "", this.textsecond = "", this.disabled = !1, this.href = "", this.target = "";
|
|
676
|
-
}
|
|
677
|
-
get name() {
|
|
678
|
-
return this.getAttribute("name") ?? "";
|
|
679
|
-
}
|
|
680
|
-
set name(i) {
|
|
681
|
-
this.setAttribute("name", i);
|
|
682
|
-
}
|
|
683
|
-
/**
|
|
684
|
-
* The associated form element with which this element's value will submit.
|
|
685
|
-
*/
|
|
686
|
-
get form() {
|
|
687
|
-
return this[ht].form;
|
|
688
|
-
}
|
|
689
|
-
// TODO: Add aria attributes support
|
|
690
|
-
// Adapt from: https://github.dev/material-components/material-web
|
|
691
|
-
willUpdate() {
|
|
692
|
-
const i = getComputedStyle(this).getPropertyValue("--button-variant");
|
|
693
|
-
i && ee.some((t) => t === i) && (this.variant = i);
|
|
694
|
-
}
|
|
695
|
-
updated() {
|
|
696
|
-
if (this.customclass) {
|
|
697
|
-
const i = this.customclass.split(" ").map((t) => t.trim()).filter(Boolean);
|
|
698
|
-
this.classList.add(...i);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
render() {
|
|
702
|
-
const i = this.href ? this.renderLink() : this.renderButton();
|
|
703
|
-
return u`${i}`;
|
|
704
|
-
}
|
|
705
|
-
renderLink() {
|
|
706
|
-
return u`<a href=${this.href} target=${this.target || d} class="button" ?disabled=${this.disabled}>
|
|
707
|
-
<slot />
|
|
708
|
-
</a>`;
|
|
709
|
-
}
|
|
710
|
-
renderButton() {
|
|
711
|
-
const i = this.text || this.textsecond;
|
|
712
|
-
return u`<button class="button ${i ? "multipleText" : ""}" ?disabled=${this.disabled}>
|
|
713
|
-
${i ? u`<slot>
|
|
714
|
-
${this.text ? u`<span>${this.text}</span>` : d}
|
|
715
|
-
${this.textsecond ? u`<span>${this.textsecond}</span>` : d}
|
|
716
|
-
</slot>` : u`<slot></slot>`}
|
|
717
|
-
</button>`;
|
|
718
|
-
}
|
|
719
|
-
};
|
|
720
|
-
Gt(f);
|
|
721
|
-
f.formAssociated = !0;
|
|
722
|
-
f.styles = O`
|
|
723
|
-
:host {
|
|
724
|
-
display: inline-flex;
|
|
725
|
-
cursor: pointer;
|
|
726
|
-
${_t("primary")};
|
|
727
|
-
--button-border: transparent;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
:host(.full) {
|
|
731
|
-
width: 100%;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
:host([variant="secondary"]) {
|
|
735
|
-
${_t("secondary")};
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
:host([disabled]), :host([aria-disabled="true"]), :host([aria-disabled="true"]):hover {
|
|
739
|
-
--button-bg: var(--button-bg-disabled);
|
|
740
|
-
--button-text: var(--button-text-disabled);
|
|
741
|
-
--button-border: transparent;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
:host([disabled][variant="secondary"]) {
|
|
745
|
-
--button-bg: var(--button-bg-disabled);
|
|
746
|
-
--button-text: var(--button-text-disabled);
|
|
747
|
-
--button-border: var(--button-border);
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
:host([aria-disabled="true"]) button:hover {
|
|
751
|
-
background-color: var(--button-bg-disabled);
|
|
752
|
-
color: var(--button-text-disabled);
|
|
753
|
-
border-color: transparent;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.button {
|
|
757
|
-
-webkit-appearance: none;
|
|
758
|
-
align-items: center;
|
|
759
|
-
background-color: var(--button-bg);
|
|
760
|
-
border-color: var(--button-border);
|
|
761
|
-
border-radius: var(--radius-m);
|
|
762
|
-
border-width: var(--border-m);
|
|
763
|
-
border-style: solid;
|
|
764
|
-
box-sizing: border-box;
|
|
765
|
-
color: var(--button-text);
|
|
766
|
-
cursor: inherit;
|
|
767
|
-
display: inline-flex;
|
|
768
|
-
font-family: var(--font-family-loccitane-sans);
|
|
769
|
-
font-size: var(--font-size-150);
|
|
770
|
-
font-weight: var(--font-weight-400);
|
|
771
|
-
gap: var(--spacing-s, 8px);
|
|
772
|
-
height: 100%;
|
|
773
|
-
justify-content: center;
|
|
774
|
-
line-height: var(--line-height-200);
|
|
775
|
-
min-width: 64px;
|
|
776
|
-
outline: none;
|
|
777
|
-
padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
778
|
-
text-decoration: none;
|
|
779
|
-
vertical-align: middle;
|
|
780
|
-
width: 100%;
|
|
781
|
-
|
|
782
|
-
&::-moz-focus-inner {
|
|
783
|
-
padding: 0;
|
|
784
|
-
border: 0;
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
.button.multipleText {
|
|
789
|
-
gap: 0;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
.button:disabled {
|
|
793
|
-
cursor: initial;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
.button:hover:not([disabled]) {
|
|
797
|
-
background-color: var(--button-bg-hover);
|
|
798
|
-
color: var(--button-text-hover);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
.button:active:not([disabled]) {
|
|
802
|
-
background-color: var(--button-bg-pressed);
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
.button:focus-visible {
|
|
806
|
-
${Jt};
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
.button span + span {
|
|
810
|
-
padding-left: 0.8rem;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
.button span + span::before {
|
|
814
|
-
content: "•";
|
|
815
|
-
margin: 0 0.8rem 0 0;
|
|
816
|
-
}
|
|
817
|
-
`;
|
|
818
|
-
b([
|
|
819
|
-
h()
|
|
820
|
-
], f.prototype, "type", 2);
|
|
821
|
-
b([
|
|
822
|
-
h({ reflect: !0 })
|
|
823
|
-
], f.prototype, "value", 2);
|
|
824
|
-
b([
|
|
825
|
-
h({ reflect: !0 })
|
|
826
|
-
], f.prototype, "variant", 2);
|
|
827
|
-
b([
|
|
828
|
-
h({ type: String })
|
|
829
|
-
], f.prototype, "customclass", 2);
|
|
830
|
-
b([
|
|
831
|
-
h({ type: String })
|
|
832
|
-
], f.prototype, "text", 2);
|
|
833
|
-
b([
|
|
834
|
-
h({ type: String })
|
|
835
|
-
], f.prototype, "textsecond", 2);
|
|
836
|
-
b([
|
|
837
|
-
h({
|
|
838
|
-
converter: {
|
|
839
|
-
fromAttribute: (i) => i === "" || i === "true"
|
|
840
|
-
}
|
|
841
|
-
})
|
|
842
|
-
], f.prototype, "disabled", 2);
|
|
843
|
-
b([
|
|
844
|
-
h()
|
|
845
|
-
], f.prototype, "href", 2);
|
|
846
|
-
b([
|
|
847
|
-
h()
|
|
848
|
-
], f.prototype, "target", 2);
|
|
849
|
-
f = b([
|
|
850
|
-
V("o-button")
|
|
851
|
-
], f);
|
|
852
651
|
/**
|
|
853
652
|
* @license
|
|
854
653
|
* Copyright 2017 Google LLC
|
|
855
654
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
856
655
|
*/
|
|
857
|
-
const
|
|
858
|
-
class
|
|
656
|
+
const Yt = { CHILD: 2 }, te = (n) => (...t) => ({ _$litDirective$: n, values: t });
|
|
657
|
+
class ee {
|
|
859
658
|
constructor(t) {
|
|
860
659
|
}
|
|
861
660
|
get _$AU() {
|
|
862
661
|
return this._$AM._$AU;
|
|
863
662
|
}
|
|
864
|
-
_$AT(t, e,
|
|
865
|
-
this._$Ct = t, this._$AM = e, this._$Ci =
|
|
663
|
+
_$AT(t, e, o) {
|
|
664
|
+
this._$Ct = t, this._$AM = e, this._$Ci = o;
|
|
866
665
|
}
|
|
867
666
|
_$AS(t, e) {
|
|
868
667
|
return this.update(t, e);
|
|
@@ -876,13 +675,13 @@ class ie {
|
|
|
876
675
|
* Copyright 2017 Google LLC
|
|
877
676
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
878
677
|
*/
|
|
879
|
-
class rt extends
|
|
678
|
+
class rt extends ee {
|
|
880
679
|
constructor(t) {
|
|
881
|
-
if (super(t), this.it =
|
|
680
|
+
if (super(t), this.it = h, t.type !== Yt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
882
681
|
}
|
|
883
682
|
render(t) {
|
|
884
|
-
if (t ===
|
|
885
|
-
if (t ===
|
|
683
|
+
if (t === h || t == null) return this._t = void 0, this.it = t;
|
|
684
|
+
if (t === O) return t;
|
|
886
685
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
887
686
|
if (t === this.it) return this._t;
|
|
888
687
|
this.it = t;
|
|
@@ -899,192 +698,89 @@ rt.directiveName = "unsafeHTML", rt.resultType = 1;
|
|
|
899
698
|
class it extends rt {
|
|
900
699
|
}
|
|
901
700
|
it.directiveName = "unsafeSVG", it.resultType = 2;
|
|
902
|
-
const
|
|
701
|
+
const J = te(it), oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
903
702
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
904
703
|
</svg>
|
|
905
|
-
`,
|
|
704
|
+
`, se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
906
705
|
<path d="M16 8L4 0V16L16 8Z" fill="#3F2B2E"/>
|
|
907
706
|
</svg>
|
|
908
|
-
`,
|
|
707
|
+
`, ne = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
909
708
|
<path d="M12.2266 8.16162C11.0953 9.26599 8.72489 11.8788 5.11546 16L4.63062 15.7172C5.78886 13.4007 7.17607 10.8283 8.79223 8C7.17607 5.17172 5.78886 2.59933 4.63062 0.282827L5.11546 0C8.72489 4.12121 11.0953 6.73401 12.2266 7.83838V8.16162Z" fill="#3F2B2E"/>
|
|
910
709
|
</svg>
|
|
911
|
-
`,
|
|
710
|
+
`, re = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
912
711
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
913
712
|
</svg>
|
|
914
|
-
`,
|
|
713
|
+
`, ie = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
915
714
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834ZM7.98873 10.328L10.6602 12.2353L9.64573 9.15787L12.2721 7.28568H9.02576L8 4.17317L6.97424 7.28568H3.72786L6.35427 9.15787L5.33977 12.2353L8.01127 10.328H7.98873Z" fill="#3F2B2E"/>
|
|
916
715
|
</svg>
|
|
917
|
-
`,
|
|
716
|
+
`, ae = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
918
717
|
<path d="M15 6.43789H9.63446L8 1.5L6.36554 6.43789H1L5.33977 9.5387L3.69404 14.5L7.98873 11.4343L12.2834 14.5H12.306L10.6602 9.5387L15 6.43789ZM6.36554 11.5396V7.32718H6.97424L8 4.21467L9.02576 7.32718H12.2721L9.64573 9.19937L10.6602 12.2768L8 10.3812L6.36554 11.5513V11.5396Z" fill="#3F2B2E"/>
|
|
919
718
|
</svg>
|
|
920
|
-
`,
|
|
719
|
+
`, le = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
921
720
|
<path d="M15 6.39639H9.63446L8 1.4585L6.36554 6.39639H1L5.33977 9.4972L3.69404 14.4585L7.98873 11.3928L12.2834 14.4585L10.6377 9.4972L14.9775 6.39639H15ZM10.6715 12.2353L8.05636 10.3631V4.32528L9.03704 7.27398H12.2834L9.65701 9.14616L10.6715 12.2236V12.2353Z" fill="#3F2B2E"/>
|
|
922
721
|
</svg>
|
|
923
|
-
`,
|
|
722
|
+
`, ce = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
924
723
|
<path d="M15 6.43789H9.63446L8 1.5L6.36554 6.43789H1L5.33977 9.5387L3.69404 14.5L7.98873 11.4343L9.46538 12.4874L12.2834 14.5H12.306L10.6602 9.5387L15 6.43789ZM9.46538 11.4226V7.32718H12.2721L9.64573 9.19937L10.6602 12.2768L9.46538 11.4226Z" fill="#3F2B2E"/>
|
|
925
724
|
</svg>
|
|
926
|
-
`,
|
|
725
|
+
`, he = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
927
726
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834Z" fill="#3F2B2E"/>
|
|
928
727
|
</svg>
|
|
929
|
-
`,
|
|
728
|
+
`, de = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
729
|
+
<path d="M2 2L14 14" stroke="#3F2B2E"/>
|
|
730
|
+
<path d="M14 2L2 14" stroke="#3F2B2E"/>
|
|
731
|
+
</svg>
|
|
732
|
+
`, pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
733
|
+
<path d="M7.12506 1C10.5018 1 13.2509 3.74834 13.251 7.125C13.2511 8.59738 12.7172 10.0206 11.7491 11.1299L14.8731 14.2539C15.0433 14.4253 15.0435 14.7018 14.8731 14.873C14.7913 14.9555 14.6797 15.002 14.5635 15.002C14.4475 15.0019 14.3357 14.9554 14.254 14.873L11.1309 11.749C10.0555 12.6818 8.6564 13.251 7.12506 13.251C3.7484 13.2508 1.00006 10.5017 1.00006 7.125C1.00025 3.74846 3.74852 1.00019 7.12506 1ZM7.12506 1.875C4.22971 1.87522 1.87506 4.23058 1.87506 7.12598C1.87532 10.0212 4.22987 12.3758 7.12506 12.376C10.0204 12.376 12.3758 10.0213 12.376 7.12598C12.376 4.23044 10.0206 1.875 7.12506 1.875Z" fill="#3F2B2E"/>
|
|
734
|
+
</svg>
|
|
735
|
+
`, pt = {
|
|
930
736
|
wishlist: oe,
|
|
931
|
-
playerv:
|
|
932
|
-
chevronRight:
|
|
933
|
-
chevronLeft:
|
|
934
|
-
"star-0":
|
|
935
|
-
"star-25":
|
|
936
|
-
"star-50":
|
|
937
|
-
"star-75":
|
|
938
|
-
"star-100":
|
|
737
|
+
playerv: se,
|
|
738
|
+
chevronRight: ne,
|
|
739
|
+
chevronLeft: re,
|
|
740
|
+
"star-0": ie,
|
|
741
|
+
"star-25": ae,
|
|
742
|
+
"star-50": le,
|
|
743
|
+
"star-75": ce,
|
|
744
|
+
"star-100": he,
|
|
745
|
+
cross: de,
|
|
746
|
+
search: pe
|
|
939
747
|
};
|
|
940
|
-
var
|
|
941
|
-
for (var
|
|
942
|
-
(
|
|
943
|
-
return
|
|
748
|
+
var ue = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, C = (n, t, e, o) => {
|
|
749
|
+
for (var s = o > 1 ? void 0 : o ? fe(t, e) : t, i = n.length - 1, r; i >= 0; i--)
|
|
750
|
+
(r = n[i]) && (s = (o ? r(t, e, s) : r(s)) || s);
|
|
751
|
+
return o && s && ue(t, e, s), s;
|
|
944
752
|
};
|
|
945
|
-
let
|
|
946
|
-
constructor() {
|
|
947
|
-
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist";
|
|
948
|
-
}
|
|
949
|
-
render() {
|
|
950
|
-
const i = ct.wishlist.replace(
|
|
951
|
-
"<svg",
|
|
952
|
-
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
953
|
-
);
|
|
954
|
-
return u`
|
|
955
|
-
<button
|
|
956
|
-
type="button"
|
|
957
|
-
aria-describedby="${this.ariaDescribedBy}"
|
|
958
|
-
class="wishlist-button"
|
|
959
|
-
@click="${this.handleClick}"
|
|
960
|
-
>
|
|
961
|
-
<span class="sr-only">${this.label}</span>
|
|
962
|
-
${K(i)}
|
|
963
|
-
</button>
|
|
964
|
-
`;
|
|
965
|
-
}
|
|
966
|
-
handleClick(i) {
|
|
967
|
-
this.toggleStatus(), this.dispatchEvent(new MouseEvent("click", {
|
|
968
|
-
bubbles: !0,
|
|
969
|
-
composed: !0
|
|
970
|
-
}));
|
|
971
|
-
}
|
|
972
|
-
toggleStatus() {
|
|
973
|
-
this.status = this.status == "empty" ? "filled" : "empty";
|
|
974
|
-
}
|
|
975
|
-
setStatus(i) {
|
|
976
|
-
this.status = i, this.requestUpdate();
|
|
977
|
-
}
|
|
978
|
-
setAriaDescribedBy(i) {
|
|
979
|
-
this.ariaDescribedBy = i, this.requestUpdate();
|
|
980
|
-
}
|
|
981
|
-
setLabel(i) {
|
|
982
|
-
this.label = i, this.requestUpdate();
|
|
983
|
-
}
|
|
984
|
-
};
|
|
985
|
-
U.styles = O`
|
|
986
|
-
:host {
|
|
987
|
-
display: inline-flex;
|
|
988
|
-
justify-content: center;
|
|
989
|
-
align-items: center;
|
|
990
|
-
cursor: pointer;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
.wishlist-button {
|
|
994
|
-
display: flex;
|
|
995
|
-
justify-content: center;
|
|
996
|
-
align-items: center;
|
|
997
|
-
width: 40px;
|
|
998
|
-
height: 40px;
|
|
999
|
-
border: transparent;
|
|
1000
|
-
border-radius: var(--radius-full);
|
|
1001
|
-
background-color: var(--color-alpha-light-strong);
|
|
1002
|
-
position: relative;
|
|
1003
|
-
cursor: pointer;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
.sr-only {
|
|
1007
|
-
border: 0 !important;
|
|
1008
|
-
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
1009
|
-
-webkit-clip-path: inset(50%) !important;
|
|
1010
|
-
clip-path: inset(50%) !important;
|
|
1011
|
-
height: 0.1rem !important;
|
|
1012
|
-
margin: -0.1rem !important;
|
|
1013
|
-
overflow: hidden !important;
|
|
1014
|
-
padding: 0 !important;
|
|
1015
|
-
position: absolute !important;
|
|
1016
|
-
width: 0.1rem !important;
|
|
1017
|
-
white-space: nowrap !important;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
.wishlist-button:hover {
|
|
1021
|
-
background-color: var(--color-alpha-light-stronger);
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
:host([status="filled"]) .wishlist-button {
|
|
1025
|
-
background-color: var(--color-alpha-light-strongest);
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
.wishlist-button:hover svg path {
|
|
1029
|
-
fill: var(--color-content-action-secondary);
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
:host([status="filled"]) .wishlist-button svg path {
|
|
1033
|
-
fill: var(--color-content-action-secondary);
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
:host([status="filled"]) .wishlist-button:hover svg path {
|
|
1037
|
-
fill: var(--color-alpha-light-strong);
|
|
1038
|
-
}
|
|
1039
|
-
`;
|
|
1040
|
-
X([
|
|
1041
|
-
h({ type: String, reflect: !0 })
|
|
1042
|
-
], U.prototype, "status", 2);
|
|
1043
|
-
X([
|
|
1044
|
-
h({ type: String, reflect: !0 })
|
|
1045
|
-
], U.prototype, "ariaDescribedBy", 2);
|
|
1046
|
-
X([
|
|
1047
|
-
h({ type: String, reflect: !0 })
|
|
1048
|
-
], U.prototype, "label", 2);
|
|
1049
|
-
U = X([
|
|
1050
|
-
V("o-wishlist-button")
|
|
1051
|
-
], U);
|
|
1052
|
-
var ve = Object.defineProperty, be = Object.getOwnPropertyDescriptor, A = (i, t, e, s) => {
|
|
1053
|
-
for (var r = s > 1 ? void 0 : s ? be(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
1054
|
-
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
1055
|
-
return s && r && ve(t, e, r), r;
|
|
1056
|
-
};
|
|
1057
|
-
let v = class extends y {
|
|
753
|
+
let m = class extends $ {
|
|
1058
754
|
constructor() {
|
|
1059
755
|
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
|
|
1060
756
|
}
|
|
1061
|
-
updated(
|
|
1062
|
-
super.updated(
|
|
757
|
+
updated(n) {
|
|
758
|
+
super.updated(n), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
1063
759
|
}
|
|
1064
760
|
render() {
|
|
1065
|
-
const
|
|
761
|
+
const n = pt[this.icon] ?? "", t = `icon-${this.icon}`, e = n.replace(
|
|
1066
762
|
"<svg",
|
|
1067
763
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1068
764
|
);
|
|
1069
|
-
return
|
|
1070
|
-
${this.type === "span" ?
|
|
765
|
+
return d`
|
|
766
|
+
${this.type === "span" ? d`
|
|
1071
767
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1072
|
-
${
|
|
768
|
+
${J(e)}
|
|
1073
769
|
</span>
|
|
1074
|
-
` :
|
|
770
|
+
` : d`
|
|
1075
771
|
<button
|
|
1076
772
|
type="button"
|
|
1077
773
|
aria-label="icon"
|
|
1078
774
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
1079
775
|
?disabled="${this.disabled}"
|
|
1080
776
|
>
|
|
1081
|
-
${
|
|
777
|
+
${J(e)}
|
|
1082
778
|
</button>
|
|
1083
779
|
`}
|
|
1084
780
|
`;
|
|
1085
781
|
}
|
|
1086
782
|
};
|
|
1087
|
-
|
|
783
|
+
m.styles = S`
|
|
1088
784
|
:host {
|
|
1089
785
|
display: inline-flex;
|
|
1090
786
|
justify-content: center;
|
|
@@ -1242,43 +938,390 @@ v.styles = O`
|
|
|
1242
938
|
|
|
1243
939
|
}
|
|
1244
940
|
`;
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
],
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
],
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
],
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
],
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
],
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
],
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
],
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
],
|
|
1269
|
-
var
|
|
1270
|
-
for (var
|
|
1271
|
-
(
|
|
1272
|
-
return
|
|
941
|
+
C([
|
|
942
|
+
l({ type: String, reflect: !0 })
|
|
943
|
+
], m.prototype, "bgstyle", 2);
|
|
944
|
+
C([
|
|
945
|
+
l({ type: String, reflect: !0 })
|
|
946
|
+
], m.prototype, "size", 2);
|
|
947
|
+
C([
|
|
948
|
+
l({ type: String, reflect: !0 })
|
|
949
|
+
], m.prototype, "status", 2);
|
|
950
|
+
C([
|
|
951
|
+
l({ type: String, reflect: !0 })
|
|
952
|
+
], m.prototype, "type", 2);
|
|
953
|
+
C([
|
|
954
|
+
l({ type: String })
|
|
955
|
+
], m.prototype, "strokewidth", 2);
|
|
956
|
+
C([
|
|
957
|
+
l({ type: String })
|
|
958
|
+
], m.prototype, "icon", 2);
|
|
959
|
+
C([
|
|
960
|
+
l({ type: Boolean, reflect: !0 })
|
|
961
|
+
], m.prototype, "disabled", 2);
|
|
962
|
+
m = C([
|
|
963
|
+
z("o-icon-button")
|
|
964
|
+
], m);
|
|
965
|
+
var ge = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, v = (n, t, e, o) => {
|
|
966
|
+
for (var s = o > 1 ? void 0 : o ? ve(t, e) : t, i = n.length - 1, r; i >= 0; i--)
|
|
967
|
+
(r = n[i]) && (s = (o ? r(t, e, s) : r(s)) || s);
|
|
968
|
+
return o && s && ge(t, e, s), s;
|
|
1273
969
|
};
|
|
1274
|
-
|
|
970
|
+
const be = Gt($);
|
|
971
|
+
let u = class extends be {
|
|
972
|
+
constructor() {
|
|
973
|
+
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.iconstrokewidth = "1", this.startIcon = !1, this.endIcon = !1, this.iconSize = "small", this.icon = "", this.href = "", this.target = "";
|
|
974
|
+
}
|
|
975
|
+
get name() {
|
|
976
|
+
return this.getAttribute("name") ?? "";
|
|
977
|
+
}
|
|
978
|
+
set name(n) {
|
|
979
|
+
this.setAttribute("name", n);
|
|
980
|
+
}
|
|
981
|
+
get form() {
|
|
982
|
+
return this[dt].form;
|
|
983
|
+
}
|
|
984
|
+
render() {
|
|
985
|
+
return this.href ? this.renderLink() : this.renderButton();
|
|
986
|
+
}
|
|
987
|
+
renderIcon(n) {
|
|
988
|
+
return this.icon ? d`<o-icon-button
|
|
989
|
+
class=${n === "start" ? "icon-start" : "icon-end"}
|
|
990
|
+
icon=${this.icon}
|
|
991
|
+
bgstyle="${this.variant === "primary" ? "none-light" : "none-contrast"}"
|
|
992
|
+
size="${this.iconSize}"
|
|
993
|
+
strokewidth="${this.iconstrokewidth || "1"}"
|
|
994
|
+
type="span"
|
|
995
|
+
aria-hidden="true"
|
|
996
|
+
?disabled=${this.disabled}
|
|
997
|
+
></o-icon-button>` : h;
|
|
998
|
+
}
|
|
999
|
+
renderButton() {
|
|
1000
|
+
const n = this.text || this.textsecond;
|
|
1001
|
+
return d`
|
|
1002
|
+
<button class="button" ?disabled=${this.disabled}>
|
|
1003
|
+
${this.startIcon ? this.renderIcon("start") : h}
|
|
1004
|
+
${n ? d`
|
|
1005
|
+
${this.text ? d`<span>${this.text}</span>` : h}
|
|
1006
|
+
${this.textsecond ? d`<span>${this.textsecond}</span>` : h}
|
|
1007
|
+
` : d`<slot></slot>`}
|
|
1008
|
+
${this.endIcon ? this.renderIcon("end") : h}
|
|
1009
|
+
</button>
|
|
1010
|
+
`;
|
|
1011
|
+
}
|
|
1012
|
+
renderLink() {
|
|
1013
|
+
const n = this.text || this.textsecond;
|
|
1014
|
+
return d`
|
|
1015
|
+
<a
|
|
1016
|
+
href=${this.href}
|
|
1017
|
+
target=${this.target || h}
|
|
1018
|
+
class="button"
|
|
1019
|
+
?disabled=${this.disabled}
|
|
1020
|
+
>
|
|
1021
|
+
${this.startIcon ? this.renderIcon("start") : h}
|
|
1022
|
+
${n ? d`
|
|
1023
|
+
${this.text ? d`<span>${this.text}</span>` : h}
|
|
1024
|
+
${this.textsecond ? d`<span>${this.textsecond}</span>` : h}
|
|
1025
|
+
` : d`<slot></slot>`}
|
|
1026
|
+
${this.endIcon ? this.renderIcon("end") : h}
|
|
1027
|
+
</a>
|
|
1028
|
+
`;
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
Qt(u);
|
|
1032
|
+
u.formAssociated = !0;
|
|
1033
|
+
u.styles = S`
|
|
1034
|
+
:host {
|
|
1035
|
+
--button-border: transparent;
|
|
1036
|
+
cursor: pointer;
|
|
1037
|
+
display: inline-flex;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
:host([fullwidth]) {
|
|
1041
|
+
display: block;
|
|
1042
|
+
width: 100%;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
:host([variant="primary"]) {
|
|
1046
|
+
--button-bg: var(--color-container-action-primary-default);
|
|
1047
|
+
--button-bg-hover: var(--color-container-action-primary-hover);
|
|
1048
|
+
--button-bg-pressed: var(--color-container-action-primary-pressed);
|
|
1049
|
+
--button-text: var(--color-content-action-primary);
|
|
1050
|
+
--button-text-hover: var(--color-content-action-primary);
|
|
1051
|
+
--button-border: transparent;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
:host([variant="secondary"]) {
|
|
1055
|
+
--button-bg: var(--color-container-action-secondary-default);
|
|
1056
|
+
--button-bg-hover: var(--color-container-action-secondary-hover);
|
|
1057
|
+
--button-bg-pressed: var(--color-container-action-secondary-pressed);
|
|
1058
|
+
--button-text: var(--color-content-action-secondary);
|
|
1059
|
+
--button-text-hover: var(--color-content-action-secondary);
|
|
1060
|
+
--button-border: var(--color-border-secondary);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
:host([variant="ghost"]) {
|
|
1064
|
+
--button-bg: transparent;
|
|
1065
|
+
--button-bg-hover: var(--color-alpha-dark-lightest);
|
|
1066
|
+
--button-bg-pressed: var(--color-alpha-dark-lighter);
|
|
1067
|
+
--button-text: var(--color-content-action-secondary);
|
|
1068
|
+
--button-text-hover: var(--color-content-action-secondary);
|
|
1069
|
+
--button-border-width: 0;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
:host([variant="tertiary"]) {
|
|
1073
|
+
--button-bg: var(--color-container-action-tertiary-default);
|
|
1074
|
+
--button-bg-hover: var(--color-container-action-tertiary-hover);
|
|
1075
|
+
--button-bg-pressed: var(--color-container-action-tertiary-pressed);
|
|
1076
|
+
--button-text: var(--color-content-body);
|
|
1077
|
+
--button-text-hover: var(--color-content-action-tertiary);
|
|
1078
|
+
--button-border-width: 0;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
:host([disabled]),
|
|
1082
|
+
:host([aria-disabled="true"]),
|
|
1083
|
+
:host([aria-disabled="true"]:hover) {
|
|
1084
|
+
--button-bg: var(--color-container-disabled);
|
|
1085
|
+
--button-text: var(--color-content-disabled);
|
|
1086
|
+
--button-border: transparent;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
:host([disabled][variant="secondary"]) {
|
|
1090
|
+
--button-border: var(--color-border-secondary);
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.button {
|
|
1094
|
+
display: inline-flex;
|
|
1095
|
+
align-items: center;
|
|
1096
|
+
justify-content: center;
|
|
1097
|
+
width: 100%;
|
|
1098
|
+
gap: var(--spacing-s, 8px);
|
|
1099
|
+
height: 100%;
|
|
1100
|
+
background-color: var(--button-bg);
|
|
1101
|
+
color: var(--button-text);
|
|
1102
|
+
border: var(--button-border-width, var(--border-m)) solid var(--button-border);
|
|
1103
|
+
border-radius: var(--radius-m);
|
|
1104
|
+
|
|
1105
|
+
min-width: 64px;
|
|
1106
|
+
padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
1107
|
+
cursor: inherit;
|
|
1108
|
+
box-sizing: border-box;
|
|
1109
|
+
|
|
1110
|
+
span, o-icon-button {
|
|
1111
|
+
font-family: var(--font-family-loccitane-sans);
|
|
1112
|
+
font-size: var(--font-size-150);
|
|
1113
|
+
font-weight: var(--font-weight-400);
|
|
1114
|
+
line-height: var(--line-height-200);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.button:hover:not([disabled]) {
|
|
1119
|
+
background-color: var(--button-bg-hover);
|
|
1120
|
+
color: var(--button-text-hover);
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.button:active:not([disabled]) {
|
|
1124
|
+
background-color: var(--button-bg-pressed);
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
.button:focus-visible {
|
|
1128
|
+
${Jt};
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
span + span::before {
|
|
1132
|
+
content: "•";
|
|
1133
|
+
margin-right: 8px;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.icon-start,
|
|
1137
|
+
.icon-end {
|
|
1138
|
+
display: inline-flex;
|
|
1139
|
+
align-items: center;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
:host([variant="tertiary"][fullwidth][startIcon]) .button,
|
|
1143
|
+
:host([variant="tertiary"][fullwidth][endIcon]) .button {
|
|
1144
|
+
justify-content: space-between;
|
|
1145
|
+
padding-left: 12px;
|
|
1146
|
+
padding-right: 8px;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.button span {
|
|
1150
|
+
display: inline-flex;
|
|
1151
|
+
align-items: center;
|
|
1152
|
+
margin-top: 1px;
|
|
1153
|
+
}
|
|
1154
|
+
`;
|
|
1155
|
+
v([
|
|
1156
|
+
l()
|
|
1157
|
+
], u.prototype, "type", 2);
|
|
1158
|
+
v([
|
|
1159
|
+
l({ reflect: !0 })
|
|
1160
|
+
], u.prototype, "value", 2);
|
|
1161
|
+
v([
|
|
1162
|
+
l({ reflect: !0 })
|
|
1163
|
+
], u.prototype, "variant", 2);
|
|
1164
|
+
v([
|
|
1165
|
+
l({ type: String })
|
|
1166
|
+
], u.prototype, "text", 2);
|
|
1167
|
+
v([
|
|
1168
|
+
l({ type: String })
|
|
1169
|
+
], u.prototype, "textsecond", 2);
|
|
1170
|
+
v([
|
|
1171
|
+
l({ reflect: !0, type: Boolean })
|
|
1172
|
+
], u.prototype, "fullwidth", 2);
|
|
1173
|
+
v([
|
|
1174
|
+
l({ reflect: !0, type: Boolean })
|
|
1175
|
+
], u.prototype, "disabled", 2);
|
|
1176
|
+
v([
|
|
1177
|
+
l({ type: String })
|
|
1178
|
+
], u.prototype, "iconstrokewidth", 2);
|
|
1179
|
+
v([
|
|
1180
|
+
l({ type: Boolean, reflect: !0 })
|
|
1181
|
+
], u.prototype, "startIcon", 2);
|
|
1182
|
+
v([
|
|
1183
|
+
l({ type: Boolean, reflect: !0 })
|
|
1184
|
+
], u.prototype, "endIcon", 2);
|
|
1185
|
+
v([
|
|
1186
|
+
l({ type: String, reflect: !0 })
|
|
1187
|
+
], u.prototype, "iconSize", 2);
|
|
1188
|
+
v([
|
|
1189
|
+
l({ type: String })
|
|
1190
|
+
], u.prototype, "icon", 2);
|
|
1191
|
+
v([
|
|
1192
|
+
l()
|
|
1193
|
+
], u.prototype, "href", 2);
|
|
1194
|
+
v([
|
|
1195
|
+
l()
|
|
1196
|
+
], u.prototype, "target", 2);
|
|
1197
|
+
u = v([
|
|
1198
|
+
z("o-button")
|
|
1199
|
+
], u);
|
|
1200
|
+
var ye = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, Q = (n, t, e, o) => {
|
|
1201
|
+
for (var s = o > 1 ? void 0 : o ? $e(t, e) : t, i = n.length - 1, r; i >= 0; i--)
|
|
1202
|
+
(r = n[i]) && (s = (o ? r(t, e, s) : r(s)) || s);
|
|
1203
|
+
return o && s && ye(t, e, s), s;
|
|
1204
|
+
};
|
|
1205
|
+
let U = class extends $ {
|
|
1206
|
+
constructor() {
|
|
1207
|
+
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist";
|
|
1208
|
+
}
|
|
1209
|
+
render() {
|
|
1210
|
+
const n = pt.wishlist.replace(
|
|
1211
|
+
"<svg",
|
|
1212
|
+
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1213
|
+
);
|
|
1214
|
+
return d`
|
|
1215
|
+
<button
|
|
1216
|
+
type="button"
|
|
1217
|
+
aria-describedby="${this.ariaDescribedBy}"
|
|
1218
|
+
class="wishlist-button"
|
|
1219
|
+
@click="${this.handleClick}"
|
|
1220
|
+
>
|
|
1221
|
+
<span class="sr-only">${this.label}</span>
|
|
1222
|
+
${J(n)}
|
|
1223
|
+
</button>
|
|
1224
|
+
`;
|
|
1225
|
+
}
|
|
1226
|
+
handleClick(n) {
|
|
1227
|
+
this.toggleStatus(), this.dispatchEvent(new MouseEvent("click", {
|
|
1228
|
+
bubbles: !0,
|
|
1229
|
+
composed: !0
|
|
1230
|
+
}));
|
|
1231
|
+
}
|
|
1232
|
+
toggleStatus() {
|
|
1233
|
+
this.status = this.status == "empty" ? "filled" : "empty";
|
|
1234
|
+
}
|
|
1235
|
+
setStatus(n) {
|
|
1236
|
+
this.status = n, this.requestUpdate();
|
|
1237
|
+
}
|
|
1238
|
+
setAriaDescribedBy(n) {
|
|
1239
|
+
this.ariaDescribedBy = n, this.requestUpdate();
|
|
1240
|
+
}
|
|
1241
|
+
setLabel(n) {
|
|
1242
|
+
this.label = n, this.requestUpdate();
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1245
|
+
U.styles = S`
|
|
1246
|
+
:host {
|
|
1247
|
+
display: inline-flex;
|
|
1248
|
+
justify-content: center;
|
|
1249
|
+
align-items: center;
|
|
1250
|
+
cursor: pointer;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.wishlist-button {
|
|
1254
|
+
display: flex;
|
|
1255
|
+
justify-content: center;
|
|
1256
|
+
align-items: center;
|
|
1257
|
+
width: 40px;
|
|
1258
|
+
height: 40px;
|
|
1259
|
+
border: transparent;
|
|
1260
|
+
border-radius: var(--radius-full);
|
|
1261
|
+
background-color: var(--color-alpha-light-strong);
|
|
1262
|
+
position: relative;
|
|
1263
|
+
cursor: pointer;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.sr-only {
|
|
1267
|
+
border: 0 !important;
|
|
1268
|
+
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
1269
|
+
-webkit-clip-path: inset(50%) !important;
|
|
1270
|
+
clip-path: inset(50%) !important;
|
|
1271
|
+
height: 0.1rem !important;
|
|
1272
|
+
margin: -0.1rem !important;
|
|
1273
|
+
overflow: hidden !important;
|
|
1274
|
+
padding: 0 !important;
|
|
1275
|
+
position: absolute !important;
|
|
1276
|
+
width: 0.1rem !important;
|
|
1277
|
+
white-space: nowrap !important;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
.wishlist-button:hover {
|
|
1281
|
+
background-color: var(--color-alpha-light-stronger);
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
:host([status="filled"]) .wishlist-button {
|
|
1285
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
.wishlist-button:hover svg path {
|
|
1289
|
+
fill: var(--color-content-action-secondary);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
:host([status="filled"]) .wishlist-button svg path {
|
|
1293
|
+
fill: var(--color-content-action-secondary);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
:host([status="filled"]) .wishlist-button:hover svg path {
|
|
1297
|
+
fill: var(--color-alpha-light-strong);
|
|
1298
|
+
}
|
|
1299
|
+
`;
|
|
1300
|
+
Q([
|
|
1301
|
+
l({ type: String, reflect: !0 })
|
|
1302
|
+
], U.prototype, "status", 2);
|
|
1303
|
+
Q([
|
|
1304
|
+
l({ type: String, reflect: !0 })
|
|
1305
|
+
], U.prototype, "ariaDescribedBy", 2);
|
|
1306
|
+
Q([
|
|
1307
|
+
l({ type: String, reflect: !0 })
|
|
1308
|
+
], U.prototype, "label", 2);
|
|
1309
|
+
U = Q([
|
|
1310
|
+
z("o-wishlist-button")
|
|
1311
|
+
], U);
|
|
1312
|
+
var me = Object.defineProperty, we = Object.getOwnPropertyDescriptor, H = (n, t, e, o) => {
|
|
1313
|
+
for (var s = o > 1 ? void 0 : o ? we(t, e) : t, i = n.length - 1, r; i >= 0; i--)
|
|
1314
|
+
(r = n[i]) && (s = (o ? r(t, e, s) : r(s)) || s);
|
|
1315
|
+
return o && s && me(t, e, s), s;
|
|
1316
|
+
};
|
|
1317
|
+
let _ = class extends $ {
|
|
1275
1318
|
constructor() {
|
|
1276
1319
|
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
|
|
1277
1320
|
}
|
|
1278
1321
|
render() {
|
|
1279
|
-
return
|
|
1322
|
+
return d`
|
|
1280
1323
|
<a href="${this.href}" target="${this.target}">
|
|
1281
|
-
${this.endIcon && this.reverseEndIcon ?
|
|
1324
|
+
${this.endIcon && this.reverseEndIcon ? d`
|
|
1282
1325
|
<o-icon-button
|
|
1283
1326
|
icon="chevronLeft"
|
|
1284
1327
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1288,7 +1331,7 @@ let m = class extends y {
|
|
|
1288
1331
|
></o-icon-button>
|
|
1289
1332
|
` : null}
|
|
1290
1333
|
<span class="link-text"><slot></slot></span>
|
|
1291
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
1334
|
+
${this.endIcon && !this.reverseEndIcon ? d`
|
|
1292
1335
|
<o-icon-button
|
|
1293
1336
|
icon="chevronRight"
|
|
1294
1337
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1301,7 +1344,7 @@ let m = class extends y {
|
|
|
1301
1344
|
`;
|
|
1302
1345
|
}
|
|
1303
1346
|
};
|
|
1304
|
-
|
|
1347
|
+
_.styles = S`
|
|
1305
1348
|
:host([template="standard"]) a {
|
|
1306
1349
|
color: var(--color-content-action-secondary);
|
|
1307
1350
|
font-size: var(--font-size-200);
|
|
@@ -1359,7 +1402,6 @@ m.styles = O`
|
|
|
1359
1402
|
}
|
|
1360
1403
|
}
|
|
1361
1404
|
|
|
1362
|
-
/*Underline effect */
|
|
1363
1405
|
:host a {
|
|
1364
1406
|
position: relative;
|
|
1365
1407
|
text-decoration: none;
|
|
@@ -1377,82 +1419,73 @@ m.styles = O`
|
|
|
1377
1419
|
left: 0;
|
|
1378
1420
|
bottom: 0;
|
|
1379
1421
|
width: 100%;
|
|
1422
|
+
opacity: 1;
|
|
1380
1423
|
height: 1px;
|
|
1381
1424
|
background-color: currentColor;
|
|
1382
|
-
opacity: 0;
|
|
1383
1425
|
transition: opacity 0.3s ease, height 0.3s ease;
|
|
1384
1426
|
pointer-events: none;
|
|
1385
1427
|
}
|
|
1386
1428
|
|
|
1387
1429
|
:host a:hover .link-text::after {
|
|
1388
|
-
opacity: 1;
|
|
1389
|
-
height: 1px;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
:host(:not([endIcon])) .link-text::after {
|
|
1393
|
-
opacity: 1;
|
|
1394
|
-
height: 1px;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
:host(:not([endIcon])) a:hover .link-text::after {
|
|
1398
1430
|
opacity: 0;
|
|
1431
|
+
height: 1px;
|
|
1399
1432
|
}
|
|
1400
1433
|
/* End of underline effect */
|
|
1401
1434
|
`;
|
|
1402
1435
|
H([
|
|
1403
|
-
|
|
1404
|
-
],
|
|
1436
|
+
l({ type: String })
|
|
1437
|
+
], _.prototype, "href", 2);
|
|
1405
1438
|
H([
|
|
1406
|
-
|
|
1407
|
-
],
|
|
1439
|
+
l({ type: String })
|
|
1440
|
+
], _.prototype, "target", 2);
|
|
1408
1441
|
H([
|
|
1409
|
-
|
|
1410
|
-
],
|
|
1442
|
+
l({ type: String, reflect: !0 })
|
|
1443
|
+
], _.prototype, "template", 2);
|
|
1411
1444
|
H([
|
|
1412
|
-
|
|
1413
|
-
],
|
|
1445
|
+
l({ type: Boolean, reflect: !0 })
|
|
1446
|
+
], _.prototype, "inverse", 2);
|
|
1414
1447
|
H([
|
|
1415
|
-
|
|
1416
|
-
],
|
|
1448
|
+
l({ type: Boolean, reflect: !0 })
|
|
1449
|
+
], _.prototype, "endIcon", 2);
|
|
1417
1450
|
H([
|
|
1418
|
-
|
|
1419
|
-
],
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
],
|
|
1423
|
-
var
|
|
1424
|
-
for (var
|
|
1425
|
-
(
|
|
1426
|
-
return
|
|
1451
|
+
l({ type: Boolean, reflect: !0 })
|
|
1452
|
+
], _.prototype, "reverseEndIcon", 2);
|
|
1453
|
+
_ = H([
|
|
1454
|
+
z("o-link")
|
|
1455
|
+
], _);
|
|
1456
|
+
var _e = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Y = (n, t, e, o) => {
|
|
1457
|
+
for (var s = o > 1 ? void 0 : o ? xe(t, e) : t, i = n.length - 1, r; i >= 0; i--)
|
|
1458
|
+
(r = n[i]) && (s = (o ? r(t, e, s) : r(s)) || s);
|
|
1459
|
+
return o && s && _e(t, e, s), s;
|
|
1427
1460
|
};
|
|
1428
|
-
let
|
|
1461
|
+
let T = class extends $ {
|
|
1429
1462
|
constructor() {
|
|
1430
1463
|
super(...arguments), this.rating = 0;
|
|
1431
1464
|
}
|
|
1432
1465
|
getStarKeys() {
|
|
1433
|
-
const
|
|
1466
|
+
const n = [];
|
|
1434
1467
|
for (let t = 0; t < 5; t++) {
|
|
1435
1468
|
const e = this.rating - t;
|
|
1436
|
-
let
|
|
1437
|
-
e >= 1 ?
|
|
1469
|
+
let o;
|
|
1470
|
+
e >= 1 ? o = 100 : e <= 0 ? o = 0 : o = Math.round(e * 100 / 25) * 25, n.push(`star-${o}`);
|
|
1438
1471
|
}
|
|
1439
|
-
return
|
|
1472
|
+
return n;
|
|
1440
1473
|
}
|
|
1441
1474
|
render() {
|
|
1442
|
-
const
|
|
1443
|
-
return
|
|
1475
|
+
const n = this.getStarKeys();
|
|
1476
|
+
return d`
|
|
1444
1477
|
<div class="rating">
|
|
1445
1478
|
<div class="stars">
|
|
1446
|
-
${
|
|
1447
|
-
(t) =>
|
|
1479
|
+
${n.map(
|
|
1480
|
+
(t) => d`<span class="star">${J(pt[t] ?? "")}</span>`
|
|
1448
1481
|
)}
|
|
1449
1482
|
</div>
|
|
1450
|
-
${this.reviewCount != null && this.href != null ?
|
|
1483
|
+
${this.reviewCount != null && this.href != null ? d`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
1451
1484
|
</div>
|
|
1452
1485
|
`;
|
|
1453
1486
|
}
|
|
1454
1487
|
};
|
|
1455
|
-
|
|
1488
|
+
T.styles = S`
|
|
1456
1489
|
svg {
|
|
1457
1490
|
width: 12px;
|
|
1458
1491
|
height: 12px;
|
|
@@ -1486,15 +1519,246 @@ B.styles = O`
|
|
|
1486
1519
|
cursor: pointer;
|
|
1487
1520
|
}
|
|
1488
1521
|
`;
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
],
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
],
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
],
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
],
|
|
1522
|
+
Y([
|
|
1523
|
+
l({ type: Number })
|
|
1524
|
+
], T.prototype, "rating", 2);
|
|
1525
|
+
Y([
|
|
1526
|
+
l({ type: String })
|
|
1527
|
+
], T.prototype, "reviewCount", 2);
|
|
1528
|
+
Y([
|
|
1529
|
+
l({ type: String })
|
|
1530
|
+
], T.prototype, "href", 2);
|
|
1531
|
+
T = Y([
|
|
1532
|
+
z("o-rating")
|
|
1533
|
+
], T);
|
|
1534
|
+
var Ae = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, y = (n, t, e, o) => {
|
|
1535
|
+
for (var s = o > 1 ? void 0 : o ? Ee(t, e) : t, i = n.length - 1, r; i >= 0; i--)
|
|
1536
|
+
(r = n[i]) && (s = (o ? r(t, e, s) : r(s)) || s);
|
|
1537
|
+
return o && s && Ae(t, e, s), s;
|
|
1538
|
+
};
|
|
1539
|
+
let b = class extends $ {
|
|
1540
|
+
constructor() {
|
|
1541
|
+
super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !0, this.headerTitle = "", this.closeButtonLabel = "Close the modal", this.firstButtonLabel = "First Button", this.firstButtonVariant = "primary", this.secondaryButtonLabel = "Second Button", this.secondaryButtonVariant = "primary", this.previousFocusedElement = null, this.handleKeyDown = (n) => {
|
|
1542
|
+
this.open && (n.key === "Escape" ? this.closePanel() : n.key === "Tab" && this.trapFocus(n));
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1545
|
+
connectedCallback() {
|
|
1546
|
+
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown);
|
|
1547
|
+
}
|
|
1548
|
+
disconnectedCallback() {
|
|
1549
|
+
window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
|
|
1550
|
+
}
|
|
1551
|
+
trapFocus(n) {
|
|
1552
|
+
const t = this.getFocusableElements();
|
|
1553
|
+
if (t.length === 0) return;
|
|
1554
|
+
const e = t[0], o = t[t.length - 1];
|
|
1555
|
+
n.shiftKey && document.activeElement === e ? (n.preventDefault(), o.focus()) : !n.shiftKey && document.activeElement === o && (n.preventDefault(), e.focus());
|
|
1556
|
+
}
|
|
1557
|
+
getFocusableElements() {
|
|
1558
|
+
const n = this.renderRoot.querySelector(".panel");
|
|
1559
|
+
return n ? Array.from(
|
|
1560
|
+
n.querySelectorAll(
|
|
1561
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1562
|
+
)
|
|
1563
|
+
).filter((t) => !t.hasAttribute("disabled")) : [];
|
|
1564
|
+
}
|
|
1565
|
+
openPanel() {
|
|
1566
|
+
this.previousFocusedElement = document.activeElement, this.open = !0, this.updateComplete.then(() => {
|
|
1567
|
+
const n = this.getFocusableElements()[0];
|
|
1568
|
+
n == null || n.focus();
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
closePanel() {
|
|
1572
|
+
var n;
|
|
1573
|
+
this.open = !1, (n = this.previousFocusedElement) == null || n.focus(), this.dispatchEvent(
|
|
1574
|
+
new CustomEvent("close", { bubbles: !0, composed: !0 })
|
|
1575
|
+
);
|
|
1576
|
+
}
|
|
1577
|
+
handleFirstClick() {
|
|
1578
|
+
typeof this.onFirstButtonClick == "function" && this.onFirstButtonClick(), this.closePanel();
|
|
1579
|
+
}
|
|
1580
|
+
handleSecondaryClick() {
|
|
1581
|
+
typeof this.onSecondaryButtonClick == "function" && this.onSecondaryButtonClick(), this.closePanel();
|
|
1582
|
+
}
|
|
1583
|
+
render() {
|
|
1584
|
+
return d`
|
|
1585
|
+
<div class="overlay" @click=${this.closePanel}></div>
|
|
1586
|
+
<div
|
|
1587
|
+
class="panel"
|
|
1588
|
+
role="dialog"
|
|
1589
|
+
aria-modal="true"
|
|
1590
|
+
aria-labelledby="panel-title"
|
|
1591
|
+
>
|
|
1592
|
+
<o-icon-button icon="cross" size="medium" class="close-btn" @click=${this.closePanel} aria-label="${this.closeButtonLabel}"></o-icon-button>
|
|
1593
|
+
|
|
1594
|
+
${this.showHeader ? d`
|
|
1595
|
+
<div class="header">
|
|
1596
|
+
<span id="panel-title" class="panel-title">${this.headerTitle}</span>
|
|
1597
|
+
</div>
|
|
1598
|
+
` : null}
|
|
1599
|
+
|
|
1600
|
+
<div class="content">
|
|
1601
|
+
<slot></slot>
|
|
1602
|
+
</div>
|
|
1603
|
+
|
|
1604
|
+
${this.showFooter && this.firstButtonVariant && this.firstButtonLabel || this.secondaryButtonVariant && this.secondaryButtonLabel ? d`
|
|
1605
|
+
<div class="footer">
|
|
1606
|
+
${this.firstButtonVariant && this.firstButtonLabel ? d`
|
|
1607
|
+
<o-button
|
|
1608
|
+
customclass="full"
|
|
1609
|
+
variant="${this.firstButtonVariant}"
|
|
1610
|
+
@click=${this.handleFirstClick}
|
|
1611
|
+
>
|
|
1612
|
+
${this.firstButtonLabel}
|
|
1613
|
+
</o-button>
|
|
1614
|
+
` : null}
|
|
1615
|
+
|
|
1616
|
+
${this.secondaryButtonVariant && this.secondaryButtonLabel ? d`
|
|
1617
|
+
<o-button
|
|
1618
|
+
customclass="full"
|
|
1619
|
+
variant="${this.secondaryButtonVariant}"
|
|
1620
|
+
@click=${this.handleSecondaryClick}
|
|
1621
|
+
>
|
|
1622
|
+
${this.secondaryButtonLabel}
|
|
1623
|
+
</o-button>
|
|
1624
|
+
` : null}
|
|
1625
|
+
</div>
|
|
1626
|
+
` : null}
|
|
1627
|
+
</div>
|
|
1628
|
+
`;
|
|
1629
|
+
}
|
|
1630
|
+
};
|
|
1631
|
+
b.styles = S`
|
|
1632
|
+
:host {
|
|
1633
|
+
position: fixed;
|
|
1634
|
+
top: 0;
|
|
1635
|
+
right: 0;
|
|
1636
|
+
height: 100%;
|
|
1637
|
+
width: 100%;
|
|
1638
|
+
z-index: 1000;
|
|
1639
|
+
pointer-events: none;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
.overlay {
|
|
1643
|
+
position: absolute;
|
|
1644
|
+
inset: 0;
|
|
1645
|
+
backdrop-filter: blur(4px);
|
|
1646
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
1647
|
+
opacity: 0;
|
|
1648
|
+
transition: opacity 0.3s ease;
|
|
1649
|
+
pointer-events: none;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
:host([open]) .overlay {
|
|
1653
|
+
opacity: 1;
|
|
1654
|
+
pointer-events: auto;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
.panel {
|
|
1658
|
+
position: absolute;
|
|
1659
|
+
top: 0;
|
|
1660
|
+
right: 0;
|
|
1661
|
+
min-width: 375px;
|
|
1662
|
+
width: 100%;
|
|
1663
|
+
max-width: 416px;
|
|
1664
|
+
height: 100%;
|
|
1665
|
+
background: white;
|
|
1666
|
+
box-shadow: var(--colors-alpha-dark-60);
|
|
1667
|
+
transform: translateX(100%);
|
|
1668
|
+
transition: transform 0.3s ease;
|
|
1669
|
+
display: flex;
|
|
1670
|
+
flex-direction: column;
|
|
1671
|
+
pointer-events: auto;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
:host([open]) .panel {
|
|
1675
|
+
transform: translateX(0%);
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
.header {
|
|
1679
|
+
flex: 0 0 auto;
|
|
1680
|
+
padding: 16px 0 16px 12px;
|
|
1681
|
+
border-bottom: var(--border-050) solid var(--color-border-tertiary);
|
|
1682
|
+
|
|
1683
|
+
.panel-title {
|
|
1684
|
+
font-family: var(--font-family-loccitane-serif);
|
|
1685
|
+
font-size: var(--font-size-300);
|
|
1686
|
+
font-weight: var(--font-weight-400);
|
|
1687
|
+
line-height: var(--line-height-240);
|
|
1688
|
+
font-style: italic;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
.content {
|
|
1693
|
+
flex: 1 1 auto;
|
|
1694
|
+
overflow-y: auto;
|
|
1695
|
+
padding: 16px;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
.footer {
|
|
1699
|
+
flex: 0 0 auto;
|
|
1700
|
+
padding: 16px;
|
|
1701
|
+
border-top: var(--border-050) solid var(--color-border-tertiary);
|
|
1702
|
+
display: flex;
|
|
1703
|
+
gap: 16px;
|
|
1704
|
+
justify-content: flex-start;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
.close-btn {
|
|
1708
|
+
position: absolute;
|
|
1709
|
+
top: 0.5rem;
|
|
1710
|
+
right: 0.5rem;
|
|
1711
|
+
background: none;
|
|
1712
|
+
border: none;
|
|
1713
|
+
font-size: 1.5rem;
|
|
1714
|
+
cursor: pointer;
|
|
1715
|
+
color: inherit;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
.close-btn:focus {
|
|
1719
|
+
outline: 2px solid #000;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
@media (max-width: 640px) {
|
|
1723
|
+
.panel {
|
|
1724
|
+
width: 100%;
|
|
1725
|
+
max-width: none;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
`;
|
|
1729
|
+
y([
|
|
1730
|
+
l({ type: Boolean, reflect: !0 })
|
|
1731
|
+
], b.prototype, "open", 2);
|
|
1732
|
+
y([
|
|
1733
|
+
l({ type: Boolean })
|
|
1734
|
+
], b.prototype, "showHeader", 2);
|
|
1735
|
+
y([
|
|
1736
|
+
l({ type: Boolean })
|
|
1737
|
+
], b.prototype, "showFooter", 2);
|
|
1738
|
+
y([
|
|
1739
|
+
l({ type: String })
|
|
1740
|
+
], b.prototype, "headerTitle", 2);
|
|
1741
|
+
y([
|
|
1742
|
+
l({ type: String })
|
|
1743
|
+
], b.prototype, "closeButtonLabel", 2);
|
|
1744
|
+
y([
|
|
1745
|
+
l({ type: String })
|
|
1746
|
+
], b.prototype, "firstButtonLabel", 2);
|
|
1747
|
+
y([
|
|
1748
|
+
l({ type: String })
|
|
1749
|
+
], b.prototype, "firstButtonVariant", 2);
|
|
1750
|
+
y([
|
|
1751
|
+
l({ type: Function })
|
|
1752
|
+
], b.prototype, "onFirstButtonClick", 2);
|
|
1753
|
+
y([
|
|
1754
|
+
l({ type: String })
|
|
1755
|
+
], b.prototype, "secondaryButtonLabel", 2);
|
|
1756
|
+
y([
|
|
1757
|
+
l({ type: String })
|
|
1758
|
+
], b.prototype, "secondaryButtonVariant", 2);
|
|
1759
|
+
y([
|
|
1760
|
+
l({ type: Function })
|
|
1761
|
+
], b.prototype, "onSecondaryButtonClick", 2);
|
|
1762
|
+
b = y([
|
|
1763
|
+
z("o-side-panel")
|
|
1764
|
+
], b);
|