@justeattakeaway/pie-modal 0.19.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +314 -311
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { nothing as
|
|
2
|
-
import { html as _, unsafeStatic as
|
|
3
|
-
import { property as
|
|
4
|
-
import { property as
|
|
5
|
-
var
|
|
6
|
-
for (var n = o > 1 ? void 0 : o ?
|
|
1
|
+
import { nothing as y, unsafeCSS as le, LitElement as de } from "lit";
|
|
2
|
+
import { html as _, unsafeStatic as ce } from "lit/static-html.js";
|
|
3
|
+
import { property as v, query as he } from "lit/decorators.js";
|
|
4
|
+
import { property as ue } from "lit/decorators/property.js";
|
|
5
|
+
var pe = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, fe = (i, t, e, o) => {
|
|
6
|
+
for (var n = o > 1 ? void 0 : o ? ge(t, e) : t, r = i.length - 1, s; r >= 0; r--)
|
|
7
7
|
(s = i[r]) && (n = (o ? s(t, e, n) : s(n)) || n);
|
|
8
|
-
return o && n &&
|
|
8
|
+
return o && n && pe(t, e, n), n;
|
|
9
9
|
};
|
|
10
|
-
const
|
|
10
|
+
const me = (i) => {
|
|
11
11
|
class t extends i {
|
|
12
12
|
constructor() {
|
|
13
13
|
var o;
|
|
@@ -26,8 +26,8 @@ const fe = (i) => {
|
|
|
26
26
|
return this.dir === "rtl";
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
return
|
|
30
|
-
|
|
29
|
+
return fe([
|
|
30
|
+
ue({ type: String, reflect: !0 })
|
|
31
31
|
], t.prototype, "dir", 2), t;
|
|
32
32
|
}, _t = (i, t, e) => function(n, r) {
|
|
33
33
|
const s = `#${r}`;
|
|
@@ -44,7 +44,7 @@ const fe = (i) => {
|
|
|
44
44
|
), this[s] = e), this.requestUpdate(r, a);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
},
|
|
47
|
+
}, ve = (i) => function(e, o) {
|
|
48
48
|
const n = `#${o}`;
|
|
49
49
|
Object.defineProperty(e, o, {
|
|
50
50
|
get() {
|
|
@@ -56,7 +56,7 @@ const fe = (i) => {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
function
|
|
59
|
+
function be(i) {
|
|
60
60
|
if (Array.isArray(i)) {
|
|
61
61
|
for (var t = 0, e = Array(i.length); t < i.length; t++)
|
|
62
62
|
e[t] = i[t];
|
|
@@ -73,28 +73,28 @@ if (typeof window < "u") {
|
|
|
73
73
|
};
|
|
74
74
|
window.addEventListener("testPassive", null, xt), window.removeEventListener("testPassive", null, xt);
|
|
75
75
|
}
|
|
76
|
-
var Q = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1),
|
|
77
|
-
return
|
|
76
|
+
var Q = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), k = [], tt = !1, qt = -1, B = void 0, E = void 0, R = void 0, Wt = function(t) {
|
|
77
|
+
return k.some(function(e) {
|
|
78
78
|
return !!(e.options.allowTouchMove && e.options.allowTouchMove(t));
|
|
79
79
|
});
|
|
80
80
|
}, et = function(t) {
|
|
81
81
|
var e = t || window.event;
|
|
82
82
|
return Wt(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
|
|
83
|
-
},
|
|
84
|
-
if (
|
|
83
|
+
}, ye = function(t) {
|
|
84
|
+
if (R === void 0) {
|
|
85
85
|
var e = !!t && t.reserveScrollBarGap === !0, o = window.innerWidth - document.documentElement.clientWidth;
|
|
86
86
|
if (e && o > 0) {
|
|
87
87
|
var n = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
|
|
88
|
-
|
|
88
|
+
R = document.body.style.paddingRight, document.body.style.paddingRight = n + o + "px";
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
}, ye = function() {
|
|
93
|
-
H !== void 0 && (document.body.style.paddingRight = H, H = void 0), R !== void 0 && (document.body.style.overflow = R, R = void 0);
|
|
91
|
+
B === void 0 && (B = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
94
92
|
}, _e = function() {
|
|
93
|
+
R !== void 0 && (document.body.style.paddingRight = R, R = void 0), B !== void 0 && (document.body.style.overflow = B, B = void 0);
|
|
94
|
+
}, we = function() {
|
|
95
95
|
return window.requestAnimationFrame(function() {
|
|
96
|
-
if (
|
|
97
|
-
|
|
96
|
+
if (E === void 0) {
|
|
97
|
+
E = {
|
|
98
98
|
position: document.body.style.position,
|
|
99
99
|
top: document.body.style.top,
|
|
100
100
|
left: document.body.style.left
|
|
@@ -108,42 +108,42 @@ var Q = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
108
108
|
}, 300);
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
},
|
|
112
|
-
if (
|
|
111
|
+
}, $e = function() {
|
|
112
|
+
if (E !== void 0) {
|
|
113
113
|
var t = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
|
|
114
|
-
document.body.style.position =
|
|
114
|
+
document.body.style.position = E.position, document.body.style.top = E.top, document.body.style.left = E.left, window.scrollTo(e, t), E = void 0;
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, Ae = function(t) {
|
|
117
117
|
return t ? t.scrollHeight - t.scrollTop <= t.clientHeight : !1;
|
|
118
|
-
}, Ae = function(t, e) {
|
|
119
|
-
var o = t.targetTouches[0].clientY - qt;
|
|
120
|
-
return Wt(t.target) ? !1 : e && e.scrollTop === 0 && o > 0 || $e(e) && o < 0 ? et(t) : (t.stopPropagation(), !0);
|
|
121
118
|
}, Ee = function(t, e) {
|
|
119
|
+
var o = t.targetTouches[0].clientY - qt;
|
|
120
|
+
return Wt(t.target) ? !1 : e && e.scrollTop === 0 && o > 0 || Ae(e) && o < 0 ? et(t) : (t.stopPropagation(), !0);
|
|
121
|
+
}, Se = function(t, e) {
|
|
122
122
|
if (!t) {
|
|
123
123
|
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
if (!
|
|
126
|
+
if (!k.some(function(n) {
|
|
127
127
|
return n.targetElement === t;
|
|
128
128
|
})) {
|
|
129
129
|
var o = {
|
|
130
130
|
targetElement: t,
|
|
131
131
|
options: e || {}
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
k = [].concat(be(k), [o]), Q ? we() : ye(e), Q && (t.ontouchstart = function(n) {
|
|
134
134
|
n.targetTouches.length === 1 && (qt = n.targetTouches[0].clientY);
|
|
135
135
|
}, t.ontouchmove = function(n) {
|
|
136
|
-
n.targetTouches.length === 1 &&
|
|
136
|
+
n.targetTouches.length === 1 && Ee(n, t);
|
|
137
137
|
}, tt || (document.addEventListener("touchmove", et, wt ? { passive: !1 } : void 0), tt = !0));
|
|
138
138
|
}
|
|
139
|
-
},
|
|
139
|
+
}, ke = function(t) {
|
|
140
140
|
if (!t) {
|
|
141
141
|
console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
k = k.filter(function(e) {
|
|
145
145
|
return e.targetElement !== t;
|
|
146
|
-
}), Q && (t.ontouchstart = null, t.ontouchmove = null, tt &&
|
|
146
|
+
}), Q && (t.ontouchstart = null, t.ontouchmove = null, tt && k.length === 0 && (document.removeEventListener("touchmove", et, wt ? { passive: !1 } : void 0), tt = !1)), Q ? $e() : _e();
|
|
147
147
|
};
|
|
148
148
|
function w(i, t, e, o) {
|
|
149
149
|
var n = arguments.length, r = n < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, e) : o, s;
|
|
@@ -179,7 +179,7 @@ let Kt = class {
|
|
|
179
179
|
return this.cssText;
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
-
const
|
|
182
|
+
const xe = (i) => new Kt(typeof i == "string" ? i : i + "", void 0, At), Et = (i, ...t) => {
|
|
183
183
|
const e = i.length === 1 ? i[0] : t.reduce((o, n, r) => o + ((s) => {
|
|
184
184
|
if (s._$cssResult$ === !0)
|
|
185
185
|
return s.cssText;
|
|
@@ -188,7 +188,7 @@ const ke = (i) => new Kt(typeof i == "string" ? i : i + "", void 0, At), Et = (i
|
|
|
188
188
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
189
189
|
})(n) + i[r + 1], i[0]);
|
|
190
190
|
return new Kt(e, i, At);
|
|
191
|
-
},
|
|
191
|
+
}, Ce = (i, t) => {
|
|
192
192
|
$t ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
193
193
|
const o = document.createElement("style"), n = J.litNonce;
|
|
194
194
|
n !== void 0 && o.setAttribute("nonce", n), o.textContent = e.cssText, i.appendChild(o);
|
|
@@ -197,7 +197,7 @@ const ke = (i) => new Kt(typeof i == "string" ? i : i + "", void 0, At), Et = (i
|
|
|
197
197
|
let e = "";
|
|
198
198
|
for (const o of t.cssRules)
|
|
199
199
|
e += o.cssText;
|
|
200
|
-
return
|
|
200
|
+
return xe(e);
|
|
201
201
|
})(i) : i;
|
|
202
202
|
/**
|
|
203
203
|
* @license
|
|
@@ -205,10 +205,10 @@ const ke = (i) => new Kt(typeof i == "string" ? i : i + "", void 0, At), Et = (i
|
|
|
205
205
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
206
206
|
*/
|
|
207
207
|
var at;
|
|
208
|
-
const it = window, zt = it.trustedTypes,
|
|
208
|
+
const it = window, zt = it.trustedTypes, Me = zt ? zt.emptyScript : "", Ot = it.reactiveElementPolyfillSupport, vt = { toAttribute(i, t) {
|
|
209
209
|
switch (t) {
|
|
210
210
|
case Boolean:
|
|
211
|
-
i = i ?
|
|
211
|
+
i = i ? Me : null;
|
|
212
212
|
break;
|
|
213
213
|
case Object:
|
|
214
214
|
case Array:
|
|
@@ -234,9 +234,9 @@ const it = window, zt = it.trustedTypes, Ce = zt ? zt.emptyScript : "", Ot = it.
|
|
|
234
234
|
}
|
|
235
235
|
return e;
|
|
236
236
|
} }, Yt = (i, t) => t !== i && (t == t || i == i), lt = { attribute: !0, type: String, converter: vt, reflect: !1, hasChanged: Yt }, bt = "finalized";
|
|
237
|
-
let
|
|
237
|
+
let z = class extends HTMLElement {
|
|
238
238
|
constructor() {
|
|
239
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.
|
|
239
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
240
240
|
}
|
|
241
241
|
static addInitializer(t) {
|
|
242
242
|
var e;
|
|
@@ -293,7 +293,7 @@ let O = class extends HTMLElement {
|
|
|
293
293
|
const o = e.attribute;
|
|
294
294
|
return o === !1 ? void 0 : typeof o == "string" ? o : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
295
295
|
}
|
|
296
|
-
|
|
296
|
+
_$Eu() {
|
|
297
297
|
var t;
|
|
298
298
|
this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
|
|
299
299
|
}
|
|
@@ -313,7 +313,7 @@ let O = class extends HTMLElement {
|
|
|
313
313
|
createRenderRoot() {
|
|
314
314
|
var t;
|
|
315
315
|
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
316
|
-
return
|
|
316
|
+
return Ce(e, this.constructor.elementStyles), e;
|
|
317
317
|
}
|
|
318
318
|
connectedCallback() {
|
|
319
319
|
var t;
|
|
@@ -413,91 +413,94 @@ let O = class extends HTMLElement {
|
|
|
413
413
|
firstUpdated(t) {
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
|
-
|
|
416
|
+
z[bt] = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, Ot == null || Ot({ ReactiveElement: z }), ((at = it.reactiveElementVersions) !== null && at !== void 0 ? at : it.reactiveElementVersions = []).push("1.6.3");
|
|
417
417
|
/**
|
|
418
418
|
* @license
|
|
419
419
|
* Copyright 2017 Google LLC
|
|
420
420
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
421
421
|
*/
|
|
422
422
|
var dt;
|
|
423
|
-
const ot = window,
|
|
424
|
-
\f\r]`,
|
|
425
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Tt = /'/g, It = /"/g, Xt = /^(?:script|style|textarea|title)$/i,
|
|
426
|
-
|
|
427
|
-
let n, r = t === 2 ? "<svg>" : "", s = B;
|
|
428
|
-
for (let a = 0; a < e; a++) {
|
|
429
|
-
const d = i[a];
|
|
430
|
-
let y, h, u = -1, v = 0;
|
|
431
|
-
for (; v < d.length && (s.lastIndex = v, h = s.exec(d), h !== null); )
|
|
432
|
-
v = s.lastIndex, s === B ? h[1] === "!--" ? s = Dt : h[1] !== void 0 ? s = Lt : h[2] !== void 0 ? (Xt.test(h[2]) && (n = RegExp("</" + h[2], "g")), s = E) : h[3] !== void 0 && (s = E) : s === E ? h[0] === ">" ? (s = n ?? B, u = -1) : h[1] === void 0 ? u = -2 : (u = s.lastIndex - h[2].length, y = h[1], s = h[3] === void 0 ? E : h[3] === '"' ? It : Tt) : s === It || s === Tt ? s = E : s === Dt || s === Lt ? s = B : (s = E, n = void 0);
|
|
433
|
-
const A = s === E && i[a + 1].startsWith("/>") ? " " : "";
|
|
434
|
-
r += s === B ? d + Me : u >= 0 ? (o.push(y), d.slice(0, u) + yt + d.slice(u) + $ + A) : d + $ + (u === -2 ? (o.push(void 0), a) : A);
|
|
435
|
-
}
|
|
436
|
-
const l = r + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
|
423
|
+
const ot = window, P = ot.trustedTypes, Pt = P ? P.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, yt = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, Zt = "?" + $, ze = `<${Zt}>`, C = document, U = () => C.createComment(""), F = (i) => i === null || typeof i != "object" && typeof i != "function", Gt = Array.isArray, Oe = (i) => Gt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ct = `[
|
|
424
|
+
\f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Lt = />/g, A = RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
|
425
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Tt = /'/g, It = /"/g, Xt = /^(?:script|style|textarea|title)$/i, Pe = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), St = Pe(1), D = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), Nt = /* @__PURE__ */ new WeakMap(), S = C.createTreeWalker(C, 129, null, !1);
|
|
426
|
+
function Jt(i, t) {
|
|
437
427
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
438
428
|
throw Error("invalid template strings array");
|
|
439
|
-
return
|
|
429
|
+
return Pt !== void 0 ? Pt.createHTML(t) : t;
|
|
430
|
+
}
|
|
431
|
+
const De = (i, t) => {
|
|
432
|
+
const e = i.length - 1, o = [];
|
|
433
|
+
let n, r = t === 2 ? "<svg>" : "", s = N;
|
|
434
|
+
for (let l = 0; l < e; l++) {
|
|
435
|
+
const a = i[l];
|
|
436
|
+
let d, h, u = -1, p = 0;
|
|
437
|
+
for (; p < a.length && (s.lastIndex = p, h = s.exec(a), h !== null); )
|
|
438
|
+
p = s.lastIndex, s === N ? h[1] === "!--" ? s = Dt : h[1] !== void 0 ? s = Lt : h[2] !== void 0 ? (Xt.test(h[2]) && (n = RegExp("</" + h[2], "g")), s = A) : h[3] !== void 0 && (s = A) : s === A ? h[0] === ">" ? (s = n ?? N, u = -1) : h[1] === void 0 ? u = -2 : (u = s.lastIndex - h[2].length, d = h[1], s = h[3] === void 0 ? A : h[3] === '"' ? It : Tt) : s === It || s === Tt ? s = A : s === Dt || s === Lt ? s = N : (s = A, n = void 0);
|
|
439
|
+
const b = s === A && i[l + 1].startsWith("/>") ? " " : "";
|
|
440
|
+
r += s === N ? a + ze : u >= 0 ? (o.push(d), a.slice(0, u) + yt + a.slice(u) + $ + b) : a + $ + (u === -2 ? (o.push(void 0), l) : b);
|
|
441
|
+
}
|
|
442
|
+
return [Jt(i, r + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), o];
|
|
440
443
|
};
|
|
441
|
-
class
|
|
444
|
+
class j {
|
|
442
445
|
constructor({ strings: t, _$litType$: e }, o) {
|
|
443
446
|
let n;
|
|
444
447
|
this.parts = [];
|
|
445
448
|
let r = 0, s = 0;
|
|
446
|
-
const l = t.length - 1, a = this.parts, [d,
|
|
447
|
-
if (this.el =
|
|
448
|
-
const
|
|
449
|
-
|
|
449
|
+
const l = t.length - 1, a = this.parts, [d, h] = De(t, e);
|
|
450
|
+
if (this.el = j.createElement(d, o), S.currentNode = this.el.content, e === 2) {
|
|
451
|
+
const u = this.el.content, p = u.firstChild;
|
|
452
|
+
p.remove(), u.append(...p.childNodes);
|
|
450
453
|
}
|
|
451
|
-
for (; (n =
|
|
454
|
+
for (; (n = S.nextNode()) !== null && a.length < l; ) {
|
|
452
455
|
if (n.nodeType === 1) {
|
|
453
456
|
if (n.hasAttributes()) {
|
|
454
|
-
const
|
|
455
|
-
for (const
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
if (
|
|
459
|
-
const
|
|
460
|
-
a.push({ type: 1, index: r, name: G[2], strings:
|
|
457
|
+
const u = [];
|
|
458
|
+
for (const p of n.getAttributeNames())
|
|
459
|
+
if (p.endsWith(yt) || p.startsWith($)) {
|
|
460
|
+
const b = h[s++];
|
|
461
|
+
if (u.push(p), b !== void 0) {
|
|
462
|
+
const Z = n.getAttribute(b.toLowerCase() + yt).split($), G = /([.?@])?(.*)/.exec(b);
|
|
463
|
+
a.push({ type: 1, index: r, name: G[2], strings: Z, ctor: G[1] === "." ? Te : G[1] === "?" ? Ne : G[1] === "@" ? Be : st });
|
|
461
464
|
} else
|
|
462
465
|
a.push({ type: 6, index: r });
|
|
463
466
|
}
|
|
464
|
-
for (const
|
|
465
|
-
n.removeAttribute(
|
|
467
|
+
for (const p of u)
|
|
468
|
+
n.removeAttribute(p);
|
|
466
469
|
}
|
|
467
470
|
if (Xt.test(n.tagName)) {
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
470
|
-
n.textContent =
|
|
471
|
-
for (let
|
|
472
|
-
n.append(
|
|
473
|
-
n.append(
|
|
471
|
+
const u = n.textContent.split($), p = u.length - 1;
|
|
472
|
+
if (p > 0) {
|
|
473
|
+
n.textContent = P ? P.emptyScript : "";
|
|
474
|
+
for (let b = 0; b < p; b++)
|
|
475
|
+
n.append(u[b], U()), S.nextNode(), a.push({ type: 2, index: ++r });
|
|
476
|
+
n.append(u[p], U());
|
|
474
477
|
}
|
|
475
478
|
}
|
|
476
479
|
} else if (n.nodeType === 8)
|
|
477
480
|
if (n.data === Zt)
|
|
478
481
|
a.push({ type: 2, index: r });
|
|
479
482
|
else {
|
|
480
|
-
let
|
|
481
|
-
for (; (
|
|
482
|
-
a.push({ type: 7, index: r }),
|
|
483
|
+
let u = -1;
|
|
484
|
+
for (; (u = n.data.indexOf($, u + 1)) !== -1; )
|
|
485
|
+
a.push({ type: 7, index: r }), u += $.length - 1;
|
|
483
486
|
}
|
|
484
487
|
r++;
|
|
485
488
|
}
|
|
486
489
|
}
|
|
487
490
|
static createElement(t, e) {
|
|
488
|
-
const o =
|
|
491
|
+
const o = C.createElement("template");
|
|
489
492
|
return o.innerHTML = t, o;
|
|
490
493
|
}
|
|
491
494
|
}
|
|
492
|
-
function
|
|
495
|
+
function L(i, t, e = i, o) {
|
|
493
496
|
var n, r, s, l;
|
|
494
|
-
if (t ===
|
|
497
|
+
if (t === D)
|
|
495
498
|
return t;
|
|
496
499
|
let a = o !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[o] : e._$Cl;
|
|
497
|
-
const d =
|
|
498
|
-
return (a == null ? void 0 : a.constructor) !== d && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), d === void 0 ? a = void 0 : (a = new d(i), a._$AT(i, e, o)), o !== void 0 ? ((s = (l = e)._$Co) !== null && s !== void 0 ? s : l._$Co = [])[o] = a : e._$Cl = a), a !== void 0 && (t =
|
|
500
|
+
const d = F(t) ? void 0 : t._$litDirective$;
|
|
501
|
+
return (a == null ? void 0 : a.constructor) !== d && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), d === void 0 ? a = void 0 : (a = new d(i), a._$AT(i, e, o)), o !== void 0 ? ((s = (l = e)._$Co) !== null && s !== void 0 ? s : l._$Co = [])[o] = a : e._$Cl = a), a !== void 0 && (t = L(i, a._$AS(i, t.values), a, o)), t;
|
|
499
502
|
}
|
|
500
|
-
class
|
|
503
|
+
class Le {
|
|
501
504
|
constructor(t, e) {
|
|
502
505
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
503
506
|
}
|
|
@@ -509,17 +512,17 @@ class De {
|
|
|
509
512
|
}
|
|
510
513
|
u(t) {
|
|
511
514
|
var e;
|
|
512
|
-
const { el: { content: o }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e :
|
|
513
|
-
|
|
514
|
-
let s =
|
|
515
|
+
const { el: { content: o }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : C).importNode(o, !0);
|
|
516
|
+
S.currentNode = r;
|
|
517
|
+
let s = S.nextNode(), l = 0, a = 0, d = n[0];
|
|
515
518
|
for (; d !== void 0; ) {
|
|
516
519
|
if (l === d.index) {
|
|
517
|
-
let
|
|
518
|
-
d.type === 2 ?
|
|
520
|
+
let h;
|
|
521
|
+
d.type === 2 ? h = new V(s, s.nextSibling, this, t) : d.type === 1 ? h = new d.ctor(s, d.name, d.strings, this, t) : d.type === 6 && (h = new Re(s, this, t)), this._$AV.push(h), d = n[++a];
|
|
519
522
|
}
|
|
520
|
-
l !== (d == null ? void 0 : d.index) && (s =
|
|
523
|
+
l !== (d == null ? void 0 : d.index) && (s = S.nextNode(), l++);
|
|
521
524
|
}
|
|
522
|
-
return
|
|
525
|
+
return S.currentNode = C, r;
|
|
523
526
|
}
|
|
524
527
|
v(t) {
|
|
525
528
|
let e = 0;
|
|
@@ -527,10 +530,10 @@ class De {
|
|
|
527
530
|
o !== void 0 && (o.strings !== void 0 ? (o._$AI(t, o, e), e += o.strings.length - 2) : o._$AI(t[e])), e++;
|
|
528
531
|
}
|
|
529
532
|
}
|
|
530
|
-
class
|
|
533
|
+
class V {
|
|
531
534
|
constructor(t, e, o, n) {
|
|
532
535
|
var r;
|
|
533
|
-
this.type = 2, this._$AH =
|
|
536
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = o, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
|
|
534
537
|
}
|
|
535
538
|
get _$AU() {
|
|
536
539
|
var t, e;
|
|
@@ -548,7 +551,7 @@ class q {
|
|
|
548
551
|
return this._$AB;
|
|
549
552
|
}
|
|
550
553
|
_$AI(t, e = this) {
|
|
551
|
-
t =
|
|
554
|
+
t = L(this, t, e), F(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== D && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Oe(t) ? this.T(t) : this._(t);
|
|
552
555
|
}
|
|
553
556
|
k(t) {
|
|
554
557
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -557,28 +560,28 @@ class q {
|
|
|
557
560
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
558
561
|
}
|
|
559
562
|
_(t) {
|
|
560
|
-
this._$AH !==
|
|
563
|
+
this._$AH !== g && F(this._$AH) ? this._$AA.nextSibling.data = t : this.$(C.createTextNode(t)), this._$AH = t;
|
|
561
564
|
}
|
|
562
565
|
g(t) {
|
|
563
566
|
var e;
|
|
564
|
-
const { values: o, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el =
|
|
567
|
+
const { values: o, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = j.createElement(Jt(n.h, n.h[0]), this.options)), n);
|
|
565
568
|
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
|
|
566
569
|
this._$AH.v(o);
|
|
567
570
|
else {
|
|
568
|
-
const s = new
|
|
571
|
+
const s = new Le(r, this), l = s.u(this.options);
|
|
569
572
|
s.v(o), this.$(l), this._$AH = s;
|
|
570
573
|
}
|
|
571
574
|
}
|
|
572
575
|
_$AC(t) {
|
|
573
576
|
let e = Nt.get(t.strings);
|
|
574
|
-
return e === void 0 && Nt.set(t.strings, e = new
|
|
577
|
+
return e === void 0 && Nt.set(t.strings, e = new j(t)), e;
|
|
575
578
|
}
|
|
576
579
|
T(t) {
|
|
577
580
|
Gt(this._$AH) || (this._$AH = [], this._$AR());
|
|
578
581
|
const e = this._$AH;
|
|
579
582
|
let o, n = 0;
|
|
580
583
|
for (const r of t)
|
|
581
|
-
n === e.length ? e.push(o = new
|
|
584
|
+
n === e.length ? e.push(o = new V(this.k(U()), this.k(U()), this, this.options)) : o = e[n], o._$AI(r), n++;
|
|
582
585
|
n < e.length && (this._$AR(o && o._$AB.nextSibling, n), e.length = n);
|
|
583
586
|
}
|
|
584
587
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -595,7 +598,7 @@ class q {
|
|
|
595
598
|
}
|
|
596
599
|
class st {
|
|
597
600
|
constructor(t, e, o, n, r) {
|
|
598
|
-
this.type = 1, this._$AH =
|
|
601
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = g;
|
|
599
602
|
}
|
|
600
603
|
get tagName() {
|
|
601
604
|
return this.element.tagName;
|
|
@@ -607,45 +610,45 @@ class st {
|
|
|
607
610
|
const r = this.strings;
|
|
608
611
|
let s = !1;
|
|
609
612
|
if (r === void 0)
|
|
610
|
-
t =
|
|
613
|
+
t = L(this, t, e, 0), s = !F(t) || t !== this._$AH && t !== D, s && (this._$AH = t);
|
|
611
614
|
else {
|
|
612
615
|
const l = t;
|
|
613
616
|
let a, d;
|
|
614
617
|
for (t = r[0], a = 0; a < r.length - 1; a++)
|
|
615
|
-
d =
|
|
618
|
+
d = L(this, l[o + a], e, a), d === D && (d = this._$AH[a]), s || (s = !F(d) || d !== this._$AH[a]), d === g ? t = g : t !== g && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
|
|
616
619
|
}
|
|
617
620
|
s && !n && this.j(t);
|
|
618
621
|
}
|
|
619
622
|
j(t) {
|
|
620
|
-
t ===
|
|
623
|
+
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
621
624
|
}
|
|
622
625
|
}
|
|
623
|
-
class
|
|
626
|
+
class Te extends st {
|
|
624
627
|
constructor() {
|
|
625
628
|
super(...arguments), this.type = 3;
|
|
626
629
|
}
|
|
627
630
|
j(t) {
|
|
628
|
-
this.element[this.name] = t ===
|
|
631
|
+
this.element[this.name] = t === g ? void 0 : t;
|
|
629
632
|
}
|
|
630
633
|
}
|
|
631
|
-
const
|
|
632
|
-
class
|
|
634
|
+
const Ie = P ? P.emptyScript : "";
|
|
635
|
+
class Ne extends st {
|
|
633
636
|
constructor() {
|
|
634
637
|
super(...arguments), this.type = 4;
|
|
635
638
|
}
|
|
636
639
|
j(t) {
|
|
637
|
-
t && t !==
|
|
640
|
+
t && t !== g ? this.element.setAttribute(this.name, Ie) : this.element.removeAttribute(this.name);
|
|
638
641
|
}
|
|
639
642
|
}
|
|
640
|
-
class
|
|
643
|
+
class Be extends st {
|
|
641
644
|
constructor(t, e, o, n, r) {
|
|
642
645
|
super(t, e, o, n, r), this.type = 5;
|
|
643
646
|
}
|
|
644
647
|
_$AI(t, e = this) {
|
|
645
648
|
var o;
|
|
646
|
-
if ((t = (o =
|
|
649
|
+
if ((t = (o = L(this, t, e, 0)) !== null && o !== void 0 ? o : g) === D)
|
|
647
650
|
return;
|
|
648
|
-
const n = this._$AH, r = t ===
|
|
651
|
+
const n = this._$AH, r = t === g && n !== g || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, s = t !== g && (n === g || r);
|
|
649
652
|
r && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
650
653
|
}
|
|
651
654
|
handleEvent(t) {
|
|
@@ -653,7 +656,7 @@ class Ne extends st {
|
|
|
653
656
|
typeof this._$AH == "function" ? this._$AH.call((o = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && o !== void 0 ? o : this.element, t) : this._$AH.handleEvent(t);
|
|
654
657
|
}
|
|
655
658
|
}
|
|
656
|
-
class
|
|
659
|
+
class Re {
|
|
657
660
|
constructor(t, e, o) {
|
|
658
661
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = o;
|
|
659
662
|
}
|
|
@@ -661,18 +664,18 @@ class Be {
|
|
|
661
664
|
return this._$AM._$AU;
|
|
662
665
|
}
|
|
663
666
|
_$AI(t) {
|
|
664
|
-
|
|
667
|
+
L(this, t);
|
|
665
668
|
}
|
|
666
669
|
}
|
|
667
670
|
const Bt = ot.litHtmlPolyfillSupport;
|
|
668
|
-
Bt == null || Bt(
|
|
669
|
-
const
|
|
671
|
+
Bt == null || Bt(j, V), ((dt = ot.litHtmlVersions) !== null && dt !== void 0 ? dt : ot.litHtmlVersions = []).push("2.8.0");
|
|
672
|
+
const He = (i, t, e) => {
|
|
670
673
|
var o, n;
|
|
671
674
|
const r = (o = e == null ? void 0 : e.renderBefore) !== null && o !== void 0 ? o : t;
|
|
672
675
|
let s = r._$litPart$;
|
|
673
676
|
if (s === void 0) {
|
|
674
677
|
const l = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : null;
|
|
675
|
-
r._$litPart$ = s = new
|
|
678
|
+
r._$litPart$ = s = new V(t.insertBefore(U(), l), l, void 0, e ?? {});
|
|
676
679
|
}
|
|
677
680
|
return s._$AI(i), s;
|
|
678
681
|
};
|
|
@@ -682,7 +685,7 @@ const Re = (i, t, e) => {
|
|
|
682
685
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
683
686
|
*/
|
|
684
687
|
var ht, ut;
|
|
685
|
-
class
|
|
688
|
+
class x extends z {
|
|
686
689
|
constructor() {
|
|
687
690
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
688
691
|
}
|
|
@@ -693,7 +696,7 @@ class C extends O {
|
|
|
693
696
|
}
|
|
694
697
|
update(t) {
|
|
695
698
|
const e = this.render();
|
|
696
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
699
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = He(e, this.renderRoot, this.renderOptions);
|
|
697
700
|
}
|
|
698
701
|
connectedCallback() {
|
|
699
702
|
var t;
|
|
@@ -704,36 +707,36 @@ class C extends O {
|
|
|
704
707
|
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
705
708
|
}
|
|
706
709
|
render() {
|
|
707
|
-
return
|
|
710
|
+
return D;
|
|
708
711
|
}
|
|
709
712
|
}
|
|
710
|
-
|
|
713
|
+
x.finalized = !0, x._$litElement$ = !0, (ht = globalThis.litElementHydrateSupport) === null || ht === void 0 || ht.call(globalThis, { LitElement: x });
|
|
711
714
|
const Rt = globalThis.litElementPolyfillSupport;
|
|
712
|
-
Rt == null || Rt({ LitElement:
|
|
713
|
-
((ut = globalThis.litElementVersions) !== null && ut !== void 0 ? ut : globalThis.litElementVersions = []).push("3.3.
|
|
715
|
+
Rt == null || Rt({ LitElement: x });
|
|
716
|
+
((ut = globalThis.litElementVersions) !== null && ut !== void 0 ? ut : globalThis.litElementVersions = []).push("3.3.3");
|
|
714
717
|
/**
|
|
715
718
|
* @license
|
|
716
719
|
* Copyright 2017 Google LLC
|
|
717
720
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
718
721
|
*/
|
|
719
|
-
const
|
|
722
|
+
const Ue = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
|
720
723
|
e.createProperty(t.key, i);
|
|
721
724
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
722
725
|
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
723
726
|
}, finisher(e) {
|
|
724
727
|
e.createProperty(t.key, i);
|
|
725
|
-
} },
|
|
728
|
+
} }, Fe = (i, t, e) => {
|
|
726
729
|
t.constructor.createProperty(e, i);
|
|
727
730
|
};
|
|
728
|
-
function
|
|
729
|
-
return (t, e) => e !== void 0 ?
|
|
731
|
+
function I(i) {
|
|
732
|
+
return (t, e) => e !== void 0 ? Fe(i, t, e) : Ue(i, t);
|
|
730
733
|
}
|
|
731
734
|
/**
|
|
732
735
|
* @license
|
|
733
736
|
* Copyright 2017 Google LLC
|
|
734
737
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
735
738
|
*/
|
|
736
|
-
const
|
|
739
|
+
const je = ({ finisher: i, descriptor: t }) => (e, o) => {
|
|
737
740
|
var n;
|
|
738
741
|
if (o === void 0) {
|
|
739
742
|
const r = (n = e.originalKey) !== null && n !== void 0 ? n : e.key, s = t != null ? { kind: "method", placement: "prototype", key: r, descriptor: t(e.key) } : { ...e, key: r };
|
|
@@ -752,7 +755,7 @@ const Fe = ({ finisher: i, descriptor: t }) => (e, o) => {
|
|
|
752
755
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
753
756
|
*/
|
|
754
757
|
function kt(i, t) {
|
|
755
|
-
return
|
|
758
|
+
return je({ descriptor: (e) => {
|
|
756
759
|
const o = { get() {
|
|
757
760
|
var n, r;
|
|
758
761
|
return (r = (n = this.renderRoot) === null || n === void 0 ? void 0 : n.querySelector(i)) !== null && r !== void 0 ? r : null;
|
|
@@ -781,60 +784,60 @@ const nt = {
|
|
|
781
784
|
l: 28,
|
|
782
785
|
xl: 32,
|
|
783
786
|
xxl: 40
|
|
784
|
-
},
|
|
785
|
-
function
|
|
787
|
+
}, Qt = Object.keys(nt), te = "xs", ee = 8, rt = 32;
|
|
788
|
+
function Ve(i, t, e) {
|
|
786
789
|
const o = parseInt(i, 10), n = o % e === 0;
|
|
787
790
|
return o >= t && n;
|
|
788
791
|
}
|
|
789
|
-
const
|
|
790
|
-
large: (i) =>
|
|
791
|
-
regular: (i) =>
|
|
792
|
+
const ie = {
|
|
793
|
+
large: (i) => Ve(i, rt, ee),
|
|
794
|
+
regular: (i) => Qt.includes(i)
|
|
792
795
|
};
|
|
793
|
-
function
|
|
794
|
-
const t =
|
|
796
|
+
function qe(i) {
|
|
797
|
+
const t = ie.large(i);
|
|
795
798
|
return { isValid: t, size: t ? i : rt };
|
|
796
799
|
}
|
|
797
|
-
function
|
|
798
|
-
const t =
|
|
800
|
+
function We(i) {
|
|
801
|
+
const t = ie.regular(i), e = t ? nt[i] : nt[te];
|
|
799
802
|
return { isValid: t, size: e };
|
|
800
803
|
}
|
|
801
|
-
const
|
|
804
|
+
const T = (i, t, e, o) => {
|
|
802
805
|
const n = i.endsWith("Large") || i.endsWith("-large");
|
|
803
806
|
let r, s;
|
|
804
807
|
if (e) {
|
|
805
|
-
if ({ isValid: r, size: s } = n ?
|
|
806
|
-
const l = n ? `Invalid prop "size" value supplied to "${o}". The prop value should be a number equal or greater than ${rt} and multiple of ${
|
|
808
|
+
if ({ isValid: r, size: s } = n ? qe(e) : We(e), !r) {
|
|
809
|
+
const l = n ? `Invalid prop "size" value supplied to "${o}". The prop value should be a number equal or greater than ${rt} and multiple of ${ee}.` : `Invalid prop "size" value supplied to "${o}". The prop value should be one of the following values: ${Qt.join(", ")}.`;
|
|
807
810
|
console.error(l);
|
|
808
811
|
}
|
|
809
812
|
} else
|
|
810
|
-
s = n ? rt : nt[
|
|
813
|
+
s = n ? rt : nt[te];
|
|
811
814
|
return {
|
|
812
815
|
class: [i, t].filter(Boolean).join(" "),
|
|
813
816
|
width: s,
|
|
814
817
|
height: s
|
|
815
818
|
};
|
|
816
819
|
}, Ht = "icon-close";
|
|
817
|
-
class
|
|
820
|
+
class q extends x {
|
|
818
821
|
constructor() {
|
|
819
822
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--close";
|
|
820
823
|
}
|
|
821
824
|
connectedCallback() {
|
|
822
825
|
var t, e, o;
|
|
823
826
|
if (super.connectedCallback(), ((t = this._svg) === null || t === void 0 ? void 0 : t.getAttribute("width")) === null) {
|
|
824
|
-
const n =
|
|
827
|
+
const n = T("c-pieIcon c-pieIcon--close", "", null, "IconClose");
|
|
825
828
|
(e = this._svg) === null || e === void 0 || e.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
|
|
826
829
|
}
|
|
827
830
|
}
|
|
828
831
|
updated(t) {
|
|
829
832
|
var e, o;
|
|
830
833
|
let n;
|
|
831
|
-
t.has("size") && (n =
|
|
834
|
+
t.has("size") && (n = T("c-pieIcon c-pieIcon--close", "", this.size, "IconClose"), (e = this._svg) === null || e === void 0 || e.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
|
|
832
835
|
}
|
|
833
836
|
render() {
|
|
834
837
|
return St`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--close"><path d="M11.868 3.205 8 7.072 4.133 3.205l-.928.927L7.073 8l-3.868 3.867.928.928L8 8.927l3.868 3.868.927-.928L8.928 8l3.867-3.868-.927-.927Z"></path></svg>`;
|
|
835
838
|
}
|
|
836
839
|
}
|
|
837
|
-
|
|
840
|
+
q.styles = Et`
|
|
838
841
|
:host-context(pie-icon-button) svg,
|
|
839
842
|
:host-context(pie-button) svg {
|
|
840
843
|
display: block;
|
|
@@ -843,37 +846,37 @@ W.styles = Et`
|
|
|
843
846
|
}
|
|
844
847
|
`;
|
|
845
848
|
w([
|
|
846
|
-
|
|
847
|
-
],
|
|
849
|
+
I({ type: String, reflect: !0 })
|
|
850
|
+
], q.prototype, "size", void 0);
|
|
848
851
|
w([
|
|
849
|
-
|
|
850
|
-
],
|
|
852
|
+
I({ type: String, reflect: !0 })
|
|
853
|
+
], q.prototype, "class", void 0);
|
|
851
854
|
w([
|
|
852
855
|
kt("svg")
|
|
853
|
-
],
|
|
854
|
-
customElements.get(Ht) === void 0 && customElements.define(Ht,
|
|
856
|
+
], q.prototype, "_svg", void 0);
|
|
857
|
+
customElements.get(Ht) === void 0 && customElements.define(Ht, q);
|
|
855
858
|
const Ut = "icon-chevron-left";
|
|
856
|
-
class
|
|
859
|
+
class W extends x {
|
|
857
860
|
constructor() {
|
|
858
861
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronLeft";
|
|
859
862
|
}
|
|
860
863
|
connectedCallback() {
|
|
861
864
|
var t, e, o;
|
|
862
865
|
if (super.connectedCallback(), ((t = this._svg) === null || t === void 0 ? void 0 : t.getAttribute("width")) === null) {
|
|
863
|
-
const n =
|
|
866
|
+
const n = T("c-pieIcon c-pieIcon--chevronLeft", "", null, "IconChevronLeft");
|
|
864
867
|
(e = this._svg) === null || e === void 0 || e.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
|
|
865
868
|
}
|
|
866
869
|
}
|
|
867
870
|
updated(t) {
|
|
868
871
|
var e, o;
|
|
869
872
|
let n;
|
|
870
|
-
t.has("size") && (n =
|
|
873
|
+
t.has("size") && (n = T("c-pieIcon c-pieIcon--chevronLeft", "", this.size, "IconChevronLeft"), (e = this._svg) === null || e === void 0 || e.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
|
|
871
874
|
}
|
|
872
875
|
render() {
|
|
873
876
|
return St`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--chevronLeft"><path d="M10.96 2.82 5.605 8l5.399 5.197-.875.963-5.565-5.364a1.164 1.164 0 0 1 0-1.671l5.495-5.25.901.945Z"></path></svg>`;
|
|
874
877
|
}
|
|
875
878
|
}
|
|
876
|
-
|
|
879
|
+
W.styles = Et`
|
|
877
880
|
:host-context(pie-icon-button) svg,
|
|
878
881
|
:host-context(pie-button) svg {
|
|
879
882
|
display: block;
|
|
@@ -882,37 +885,37 @@ K.styles = Et`
|
|
|
882
885
|
}
|
|
883
886
|
`;
|
|
884
887
|
w([
|
|
885
|
-
|
|
886
|
-
],
|
|
888
|
+
I({ type: String, reflect: !0 })
|
|
889
|
+
], W.prototype, "size", void 0);
|
|
887
890
|
w([
|
|
888
|
-
|
|
889
|
-
],
|
|
891
|
+
I({ type: String, reflect: !0 })
|
|
892
|
+
], W.prototype, "class", void 0);
|
|
890
893
|
w([
|
|
891
894
|
kt("svg")
|
|
892
|
-
],
|
|
893
|
-
customElements.get(Ut) === void 0 && customElements.define(Ut,
|
|
895
|
+
], W.prototype, "_svg", void 0);
|
|
896
|
+
customElements.get(Ut) === void 0 && customElements.define(Ut, W);
|
|
894
897
|
const Ft = "icon-chevron-right";
|
|
895
|
-
class
|
|
898
|
+
class K extends x {
|
|
896
899
|
constructor() {
|
|
897
900
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronRight";
|
|
898
901
|
}
|
|
899
902
|
connectedCallback() {
|
|
900
903
|
var t, e, o;
|
|
901
904
|
if (super.connectedCallback(), ((t = this._svg) === null || t === void 0 ? void 0 : t.getAttribute("width")) === null) {
|
|
902
|
-
const n =
|
|
905
|
+
const n = T("c-pieIcon c-pieIcon--chevronRight", "", null, "IconChevronRight");
|
|
903
906
|
(e = this._svg) === null || e === void 0 || e.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
|
|
904
907
|
}
|
|
905
908
|
}
|
|
906
909
|
updated(t) {
|
|
907
910
|
var e, o;
|
|
908
911
|
let n;
|
|
909
|
-
t.has("size") && (n =
|
|
912
|
+
t.has("size") && (n = T("c-pieIcon c-pieIcon--chevronRight", "", this.size, "IconChevronRight"), (e = this._svg) === null || e === void 0 || e.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
|
|
910
913
|
}
|
|
911
914
|
render() {
|
|
912
915
|
return St`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--chevronRight"><path d="M5.044 13.18 10.399 8 5 2.82l.875-.962 5.539 5.346a1.164 1.164 0 0 1 0 1.636l-5.469 5.285-.901-.945Z"></path></svg>`;
|
|
913
916
|
}
|
|
914
917
|
}
|
|
915
|
-
|
|
918
|
+
K.styles = Et`
|
|
916
919
|
:host-context(pie-icon-button) svg,
|
|
917
920
|
:host-context(pie-button) svg {
|
|
918
921
|
display: block;
|
|
@@ -921,26 +924,26 @@ Y.styles = Et`
|
|
|
921
924
|
}
|
|
922
925
|
`;
|
|
923
926
|
w([
|
|
924
|
-
|
|
925
|
-
],
|
|
927
|
+
I({ type: String, reflect: !0 })
|
|
928
|
+
], K.prototype, "size", void 0);
|
|
926
929
|
w([
|
|
927
|
-
|
|
928
|
-
],
|
|
930
|
+
I({ type: String, reflect: !0 })
|
|
931
|
+
], K.prototype, "class", void 0);
|
|
929
932
|
w([
|
|
930
933
|
kt("svg")
|
|
931
|
-
],
|
|
932
|
-
customElements.get(Ft) === void 0 && customElements.define(Ft,
|
|
933
|
-
var
|
|
934
|
-
(!
|
|
934
|
+
], K.prototype, "_svg", void 0);
|
|
935
|
+
customElements.get(Ft) === void 0 && customElements.define(Ft, K);
|
|
936
|
+
var O = window.CustomEvent;
|
|
937
|
+
(!O || typeof O == "object") && (O = function(t, e) {
|
|
935
938
|
e = e || {};
|
|
936
939
|
var o = document.createEvent("CustomEvent");
|
|
937
940
|
return o.initCustomEvent(t, !!e.bubbles, !!e.cancelable, e.detail || null), o;
|
|
938
|
-
},
|
|
939
|
-
function
|
|
941
|
+
}, O.prototype = window.Event.prototype);
|
|
942
|
+
function oe(i, t) {
|
|
940
943
|
var e = "on" + t.type.toLowerCase();
|
|
941
944
|
return typeof i[e] == "function" && i[e](t), i.dispatchEvent(t);
|
|
942
945
|
}
|
|
943
|
-
function
|
|
946
|
+
function Ke(i) {
|
|
944
947
|
for (; i && i !== document.body; ) {
|
|
945
948
|
var t = window.getComputedStyle(i), e = function(o, n) {
|
|
946
949
|
return !(t[o] === void 0 || t[o] === n);
|
|
@@ -951,7 +954,7 @@ function We(i) {
|
|
|
951
954
|
}
|
|
952
955
|
return !1;
|
|
953
956
|
}
|
|
954
|
-
function
|
|
957
|
+
function H(i) {
|
|
955
958
|
for (; i; ) {
|
|
956
959
|
if (i.localName === "dialog")
|
|
957
960
|
return (
|
|
@@ -962,12 +965,12 @@ function U(i) {
|
|
|
962
965
|
}
|
|
963
966
|
return null;
|
|
964
967
|
}
|
|
965
|
-
function
|
|
968
|
+
function ne(i) {
|
|
966
969
|
for (; i && i.shadowRoot && i.shadowRoot.activeElement; )
|
|
967
970
|
i = i.shadowRoot.activeElement;
|
|
968
971
|
i && i.blur && i !== document.body && i.blur();
|
|
969
972
|
}
|
|
970
|
-
function
|
|
973
|
+
function Ye(i, t) {
|
|
971
974
|
for (var e = 0; e < i.length; ++e)
|
|
972
975
|
if (i[e] === t)
|
|
973
976
|
return !0;
|
|
@@ -976,21 +979,21 @@ function Ke(i, t) {
|
|
|
976
979
|
function gt(i) {
|
|
977
980
|
return !i || !i.hasAttribute("method") ? !1 : i.getAttribute("method").toLowerCase() === "dialog";
|
|
978
981
|
}
|
|
979
|
-
function
|
|
982
|
+
function re(i) {
|
|
980
983
|
var t = ["button", "input", "keygen", "select", "textarea"], e = t.map(function(s) {
|
|
981
984
|
return s + ":not([disabled])";
|
|
982
985
|
});
|
|
983
986
|
e.push('[tabindex]:not([disabled]):not([tabindex=""])');
|
|
984
987
|
var o = i.querySelector(e.join(", "));
|
|
985
988
|
if (!o && "attachShadow" in Element.prototype)
|
|
986
|
-
for (var n = i.querySelectorAll("*"), r = 0; r < n.length && !(n[r].tagName && n[r].shadowRoot && (o =
|
|
989
|
+
for (var n = i.querySelectorAll("*"), r = 0; r < n.length && !(n[r].tagName && n[r].shadowRoot && (o = re(n[r].shadowRoot), o)); r++)
|
|
987
990
|
;
|
|
988
991
|
return o;
|
|
989
992
|
}
|
|
990
993
|
function jt(i) {
|
|
991
994
|
return i.isConnected || document.body.contains(i);
|
|
992
995
|
}
|
|
993
|
-
function
|
|
996
|
+
function se(i) {
|
|
994
997
|
if (i.submitter)
|
|
995
998
|
return i.submitter;
|
|
996
999
|
var t = i.target;
|
|
@@ -1003,22 +1006,22 @@ function re(i) {
|
|
|
1003
1006
|
}
|
|
1004
1007
|
return !e || e.form !== t ? null : e;
|
|
1005
1008
|
}
|
|
1006
|
-
function
|
|
1009
|
+
function Ze(i) {
|
|
1007
1010
|
if (!i.defaultPrevented) {
|
|
1008
1011
|
var t = (
|
|
1009
1012
|
/** @type {!HTMLFormElement} */
|
|
1010
1013
|
i.target
|
|
1011
|
-
), e = c.imagemapUseValue, o =
|
|
1014
|
+
), e = c.imagemapUseValue, o = se(i);
|
|
1012
1015
|
e === null && o && (e = o.value);
|
|
1013
|
-
var n =
|
|
1016
|
+
var n = H(t);
|
|
1014
1017
|
if (n) {
|
|
1015
1018
|
var r = o && o.getAttribute("formmethod") || t.getAttribute("method");
|
|
1016
1019
|
r === "dialog" && (i.preventDefault(), e != null ? n.close(e) : n.close());
|
|
1017
1020
|
}
|
|
1018
1021
|
}
|
|
1019
1022
|
}
|
|
1020
|
-
function
|
|
1021
|
-
if (this.dialog_ = i, this.replacedStyleTop_ = !1, this.openAsModal_ = !1, i.hasAttribute("role") || i.setAttribute("role", "dialog"), i.show = this.show.bind(this), i.showModal = this.showModal.bind(this), i.close = this.close.bind(this), i.addEventListener("submit",
|
|
1023
|
+
function ae(i) {
|
|
1024
|
+
if (this.dialog_ = i, this.replacedStyleTop_ = !1, this.openAsModal_ = !1, i.hasAttribute("role") || i.setAttribute("role", "dialog"), i.show = this.show.bind(this), i.showModal = this.showModal.bind(this), i.close = this.close.bind(this), i.addEventListener("submit", Ze, !1), "returnValue" in i || (i.returnValue = ""), "MutationObserver" in window) {
|
|
1022
1025
|
var t = new MutationObserver(this.maybeHideModal.bind(this));
|
|
1023
1026
|
t.observe(i, { attributes: !0, attributeFilter: ["open"] });
|
|
1024
1027
|
} else {
|
|
@@ -1039,7 +1042,7 @@ function se(i) {
|
|
|
1039
1042
|
get: i.hasAttribute.bind(i, "open")
|
|
1040
1043
|
}), this.backdrop_ = document.createElement("div"), this.backdrop_.className = "backdrop", this.backdrop_.addEventListener("mouseup", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("mousedown", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("click", this.backdropMouseEvent_.bind(this));
|
|
1041
1044
|
}
|
|
1042
|
-
|
|
1045
|
+
ae.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
1043
1046
|
{
|
|
1044
1047
|
get dialog() {
|
|
1045
1048
|
return this.dialog_;
|
|
@@ -1102,7 +1105,7 @@ se.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1102
1105
|
*/
|
|
1103
1106
|
focus_: function() {
|
|
1104
1107
|
var i = this.dialog_.querySelector("[autofocus]:not([disabled])");
|
|
1105
|
-
!i && this.dialog_.tabIndex >= 0 && (i = this.dialog_), i || (i =
|
|
1108
|
+
!i && this.dialog_.tabIndex >= 0 && (i = this.dialog_), i || (i = re(this.dialog_)), ne(document.activeElement), i && i.focus();
|
|
1106
1109
|
},
|
|
1107
1110
|
/**
|
|
1108
1111
|
* Sets the zIndex for the backdrop and dialog.
|
|
@@ -1131,7 +1134,7 @@ se.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1131
1134
|
throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");
|
|
1132
1135
|
if (!c.dm.pushDialog(this))
|
|
1133
1136
|
throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");
|
|
1134
|
-
|
|
1137
|
+
Ke(this.dialog_.parentElement) && console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"), this.setOpen(!0), this.openAsModal_ = !0, c.needsCentering(this.dialog_) ? (c.reposition(this.dialog_), this.replacedStyleTop_ = !0) : this.replacedStyleTop_ = !1, this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling), this.focus_();
|
|
1135
1138
|
},
|
|
1136
1139
|
/**
|
|
1137
1140
|
* Closes this HTMLDialogElement. This is optional vs clearing the open
|
|
@@ -1143,11 +1146,11 @@ se.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1143
1146
|
if (!this.dialog_.hasAttribute("open"))
|
|
1144
1147
|
throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");
|
|
1145
1148
|
this.setOpen(!1), i !== void 0 && (this.dialog_.returnValue = i);
|
|
1146
|
-
var t = new
|
|
1149
|
+
var t = new O("close", {
|
|
1147
1150
|
bubbles: !1,
|
|
1148
1151
|
cancelable: !1
|
|
1149
1152
|
});
|
|
1150
|
-
|
|
1153
|
+
oe(this.dialog_, t);
|
|
1151
1154
|
}
|
|
1152
1155
|
};
|
|
1153
1156
|
var c = {};
|
|
@@ -1169,7 +1172,7 @@ c.isInlinePositionSetByStylesheet = function(i) {
|
|
|
1169
1172
|
s = document.querySelectorAll(r.selectorText);
|
|
1170
1173
|
} catch {
|
|
1171
1174
|
}
|
|
1172
|
-
if (!(!s || !
|
|
1175
|
+
if (!(!s || !Ye(s, i))) {
|
|
1173
1176
|
var l = r.style.getPropertyValue("top"), a = r.style.getPropertyValue("bottom");
|
|
1174
1177
|
if (l && l !== "auto" || a && a !== "auto")
|
|
1175
1178
|
return !0;
|
|
@@ -1185,7 +1188,7 @@ c.needsCentering = function(i) {
|
|
|
1185
1188
|
c.forceRegisterDialog = function(i) {
|
|
1186
1189
|
if ((window.HTMLDialogElement || i.showModal) && console.warn("This browser already supports <dialog>, the polyfill may not work correctly", i), i.localName !== "dialog")
|
|
1187
1190
|
throw new Error("Failed to register dialog: The element is not a dialog.");
|
|
1188
|
-
new
|
|
1191
|
+
new ae(
|
|
1189
1192
|
/** @type {!HTMLDialogElement} */
|
|
1190
1193
|
i
|
|
1191
1194
|
);
|
|
@@ -1228,7 +1231,7 @@ c.DialogManager.prototype.updateStacking = function() {
|
|
|
1228
1231
|
this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay);
|
|
1229
1232
|
};
|
|
1230
1233
|
c.DialogManager.prototype.containedByTopDialog_ = function(i) {
|
|
1231
|
-
for (; i =
|
|
1234
|
+
for (; i = H(i); ) {
|
|
1232
1235
|
for (var t = 0, e; e = this.pendingDialogStack[t]; ++t)
|
|
1233
1236
|
if (e.dialog === i)
|
|
1234
1237
|
return t === 0;
|
|
@@ -1238,7 +1241,7 @@ c.DialogManager.prototype.containedByTopDialog_ = function(i) {
|
|
|
1238
1241
|
};
|
|
1239
1242
|
c.DialogManager.prototype.handleFocus_ = function(i) {
|
|
1240
1243
|
var t = i.composedPath ? i.composedPath()[0] : i.target;
|
|
1241
|
-
if (!this.containedByTopDialog_(t) && document.activeElement !== document.documentElement && (i.preventDefault(), i.stopPropagation(),
|
|
1244
|
+
if (!this.containedByTopDialog_(t) && document.activeElement !== document.documentElement && (i.preventDefault(), i.stopPropagation(), ne(
|
|
1242
1245
|
/** @type {Element} */
|
|
1243
1246
|
t
|
|
1244
1247
|
), this.forwardTab_ !== void 0)) {
|
|
@@ -1249,11 +1252,11 @@ c.DialogManager.prototype.handleFocus_ = function(i) {
|
|
|
1249
1252
|
c.DialogManager.prototype.handleKey_ = function(i) {
|
|
1250
1253
|
if (this.forwardTab_ = void 0, i.keyCode === 27) {
|
|
1251
1254
|
i.preventDefault(), i.stopPropagation();
|
|
1252
|
-
var t = new
|
|
1255
|
+
var t = new O("cancel", {
|
|
1253
1256
|
bubbles: !1,
|
|
1254
1257
|
cancelable: !0
|
|
1255
1258
|
}), e = this.pendingDialogStack[0];
|
|
1256
|
-
e &&
|
|
1259
|
+
e && oe(e.dialog, t) && e.dialog.close();
|
|
1257
1260
|
} else
|
|
1258
1261
|
i.keyCode === 9 && (this.forwardTab_ = !i.shiftKey);
|
|
1259
1262
|
};
|
|
@@ -1277,16 +1280,16 @@ c.imagemapUseValue = null;
|
|
|
1277
1280
|
if (window.HTMLDialogElement === void 0) {
|
|
1278
1281
|
var Vt = document.createElement("form");
|
|
1279
1282
|
if (Vt.setAttribute("method", "dialog"), Vt.method !== "dialog") {
|
|
1280
|
-
var
|
|
1281
|
-
if (
|
|
1282
|
-
var
|
|
1283
|
-
|
|
1284
|
-
return gt(this) ? "dialog" :
|
|
1283
|
+
var M = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "method");
|
|
1284
|
+
if (M) {
|
|
1285
|
+
var Ge = M.get;
|
|
1286
|
+
M.get = function() {
|
|
1287
|
+
return gt(this) ? "dialog" : Ge.call(this);
|
|
1285
1288
|
};
|
|
1286
|
-
var
|
|
1287
|
-
|
|
1288
|
-
return typeof i == "string" && i.toLowerCase() === "dialog" ? this.setAttribute("method", i) :
|
|
1289
|
-
}, Object.defineProperty(HTMLFormElement.prototype, "method",
|
|
1289
|
+
var Xe = M.set;
|
|
1290
|
+
M.set = function(i) {
|
|
1291
|
+
return typeof i == "string" && i.toLowerCase() === "dialog" ? this.setAttribute("method", i) : Xe.call(this, i);
|
|
1292
|
+
}, Object.defineProperty(HTMLFormElement.prototype, "method", M);
|
|
1290
1293
|
}
|
|
1291
1294
|
}
|
|
1292
1295
|
document.addEventListener("click", function(i) {
|
|
@@ -1306,34 +1309,34 @@ if (window.HTMLDialogElement === void 0) {
|
|
|
1306
1309
|
return;
|
|
1307
1310
|
c.imagemapUseValue = i.offsetX + "," + i.offsetY;
|
|
1308
1311
|
}
|
|
1309
|
-
var n =
|
|
1312
|
+
var n = H(t);
|
|
1310
1313
|
n && (c.formSubmitter = t);
|
|
1311
1314
|
}
|
|
1312
1315
|
}
|
|
1313
1316
|
}, !1), document.addEventListener("submit", function(i) {
|
|
1314
|
-
var t = i.target, e =
|
|
1317
|
+
var t = i.target, e = H(t);
|
|
1315
1318
|
if (!e) {
|
|
1316
|
-
var o =
|
|
1319
|
+
var o = se(i), n = o && o.getAttribute("formmethod") || t.getAttribute("method");
|
|
1317
1320
|
n === "dialog" && i.preventDefault();
|
|
1318
1321
|
}
|
|
1319
1322
|
});
|
|
1320
|
-
var
|
|
1323
|
+
var Je = HTMLFormElement.prototype.submit, Qe = function() {
|
|
1321
1324
|
if (!gt(this))
|
|
1322
|
-
return
|
|
1323
|
-
var i =
|
|
1325
|
+
return Je.call(this);
|
|
1326
|
+
var i = H(this);
|
|
1324
1327
|
i && i.close();
|
|
1325
1328
|
};
|
|
1326
|
-
HTMLFormElement.prototype.submit =
|
|
1329
|
+
HTMLFormElement.prototype.submit = Qe;
|
|
1327
1330
|
}
|
|
1328
|
-
const
|
|
1329
|
-
`,
|
|
1330
|
-
var
|
|
1331
|
-
for (var n = o > 1 ? void 0 : o ?
|
|
1331
|
+
const ti = `dialog{position:absolute;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:white;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}*,*:before,*:after{box-sizing:border-box}@keyframes rotate360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.c-modal{--modal-size-s: 450px;--modal-size-m: 600px;--modal-size-l: 1080px;--modal-border-radius: var(--dt-radius-rounded-d);--modal-font: var(--dt-font-interactive-m-family);--modal-bg-color: var(--dt-color-container-default);--modal-elevation: var(--dt-elevation-04);text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;border-radius:var(--modal-border-radius);border:none;box-shadow:var(--modal-elevation);font-family:var(--modal-font);background-color:var(--modal-bg-color);padding:0;--modal-margin-none: var(--dt-spacing-none);--modal-margin-small: var(--dt-spacing-g);--modal-margin-large: var(--dt-spacing-j);--modal-margin-block: var(--modal-margin-small);--modal-block-size: fit-content;--modal-inline-size: 75%;--modal-max-block-size: calc(100vh - calc(var(--modal-margin-block) * 2));--modal-max-inline-size: var(--modal-size-m);block-size:var(--modal-block-size);inline-size:var(--modal-inline-size);max-block-size:var(--modal-max-block-size);max-inline-size:var(--modal-max-inline-size)}.c-modal:focus-visible{outline:none}@media (max-width: 768px){.c-modal pie-icon-button{--btn-dimension: 40px}}.c-modal[open]{display:flex;flex-direction:column}@media (min-width: 768px){.c-modal{--modal-margin-block: var(--modal-margin-large)}}.c-modal[size=small]{--modal-max-inline-size: var(--modal-size-s)}@media (min-width: 768px){.c-modal[size=small]{--modal-margin-block: var(--modal-margin-large)}}@media (max-width: 767px){.c-modal[size=medium][isfullwidthbelowmid]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%;--modal-max-inline-size: 100%}}.c-modal[size=large]{--modal-inline-size: 75%;--modal-max-inline-size: var(--modal-size-l);--modal-margin-block: var(--modal-margin-large)}@media (max-width: 767px){.c-modal[size=large]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%}}.c-modal[position=top]{margin-block-start:var(--dt-spacing-j)}@media (max-width: 767px){.c-modal[position=top][isfullwidthbelowmid]{margin-block-start:var(--dt-spacing-none)}}.c-modal::backdrop{background:rgba(0,0,0,.5)}.c-modal .c-modal-footer{--modal-button-spacing: var(--dt-spacing-d);--modal-footer-padding: var(--dt-spacing-d);display:flex;flex-flow:row-reverse;flex-wrap:wrap;gap:var(--modal-button-spacing);padding:var(--modal-footer-padding)}@media (min-width: 768px){.c-modal .c-modal-footer{--modal-footer-padding: var(--dt-spacing-e)}}@media (max-width: 767px){.c-modal[hasstackedactions] .c-modal-footer{flex-direction:column}}.c-modal .c-modal-header{padding-inline:var(--dt-spacing-d);padding-block:14px;display:grid;grid-template-areas:"back heading close" ". heading .";grid-template-columns:minmax(0,max-content) minmax(0,1fr) minmax(0,max-content);align-items:center}@media (min-width: 768px){.c-modal .c-modal-header{padding-inline:var(--dt-spacing-e);padding-block:20px}}.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-end:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-end:var(--dt-spacing-c)}}.c-modal .c-modal-heading{--modal-header-font-size: calc(var(--dt-font-heading-m-size--wide) * 1px);--modal-header-font-line-height: calc(var(--dt-font-heading-m-line-height--wide) * 1px);--modal-header-font-weight: var(--dt-font-heading-m-weight);font-size:var(--modal-header-font-size);line-height:var(--modal-header-font-line-height);font-weight:var(--modal-header-font-weight);margin:0;grid-area:heading}.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-d)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-e)}}.c-modal .c-modal-backBtn{grid-area:back}.c-modal .c-modal-closeBtn{grid-area:close}.c-modal[isfooterpinned] .c-modal-content,.c-modal .c-modal-scrollContainer{overflow-y:auto}.c-modal .c-modal-scrollContainer{--bg-scroll-start: linear-gradient(var(--dt-color-container-default) 30%, rgba(255, 255, 255, 0));--bg-scroll-end: linear-gradient(rgba(255, 255, 255, 0), var(--dt-color-container-default) 70%) 0 100%;--bg-scroll-top: radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0));--bg-scroll-bottom: radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0)) 0 100%;--bg-size-scroll-start: 100% 40px;--bg-size-scroll-end: 100% 40px;--bg-size-scroll-top: 100% 16px;--bg-size-scroll-bottom: 100% 16px;background:var(--bg-scroll-start),var(--bg-scroll-end),var(--bg-scroll-top),var(--bg-scroll-bottom);background-repeat:no-repeat;background-color:var(--dt-color-container-default);background-size:var(--bg-size-scroll-start),var(--bg-size-scroll-end),var(--bg-size-scroll-top),var(--bg-size-scroll-bottom);background-attachment:local,local,scroll,scroll}.c-modal .c-modal-content{--modal-content-font-size: calc(var(--dt-font-size-16) * 1px);--modal-content-font-weight: var(--dt-font-weight-regular);--modal-content-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--modal-content-padding: var(--dt-spacing-e);--modal-content-padding-block: var(--dt-spacing-a);--spinner-size: 48px;--spinner-border-width: 6px;--spinner-base-color-h: var(--dt-color-content-interactive-secondary-h);--spinner-base-color-s: var(--dt-color-content-interactive-secondary-s);--spinner-base-color-l: var(--dt-color-content-interactive-secondary-l);--spinner-left-color-opacity: .35;--spinner-left-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), var(--spinner-left-color-opacity));--spinner-right-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), 1);--spinner-animation-duration: 1.15s;--spinner-animation-timing-function: linear;--spinner-animation-iteration-count: infinite;position:relative;min-block-size:var(--dt-spacing-j);font-size:var(--modal-content-font-size);line-height:var(--modal-content-line-height);font-weight:var(--modal-content-font-weight);padding-inline:var(--modal-content-padding);padding-block:var(--modal-content-padding-block)}.c-modal .c-modal-content--scrollable{background:linear-gradient(to bottom,transparent,var(--dt-color-container-default) 75%) center bottom,linear-gradient(transparent,var(--dt-color-border-strong)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 12px;background-attachment:local,scroll}.c-modal .c-modal-content:before{content:"";position:absolute;left:50%;top:50%;translate:-50% -50%;height:var(--spinner-size);width:var(--spinner-size);display:block;background-color:transparent;border-radius:50%;border-color:var(--spinner-left-color) var(--spinner-right-color) var(--spinner-right-color) var(--spinner-left-color);border-width:var(--spinner-border-width);border-style:solid;will-change:transform;opacity:0}.c-modal[isLoading] .c-modal-content:before{animation:rotate360 var(--spinner-animation-duration) var(--spinner-animation-timing-function) var(--spinner-animation-iteration-count);opacity:1}.c-modal[isLoading] .c-modal-content .c-modal-contentInner{opacity:0}
|
|
1332
|
+
`, ei = ["h1", "h2", "h3", "h4", "h5", "h6"], ii = ["small", "medium", "large"], oi = ["top", "center"], ft = "pie-modal-close", X = "pie-modal-open", mt = "pie-modal-back", ni = "pie-modal-leading-action-click", ri = "pie-modal-supporting-action-click";
|
|
1333
|
+
var si = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, m = (i, t, e, o) => {
|
|
1334
|
+
for (var n = o > 1 ? void 0 : o ? ai(t, e) : t, r = i.length - 1, s; r >= 0; r--)
|
|
1332
1335
|
(s = i[r]) && (n = (o ? s(t, e, n) : s(n)) || n);
|
|
1333
|
-
return o && n &&
|
|
1336
|
+
return o && n && si(t, e, n), n;
|
|
1334
1337
|
};
|
|
1335
|
-
const
|
|
1336
|
-
class
|
|
1338
|
+
const Y = "pie-modal";
|
|
1339
|
+
class f extends me(de) {
|
|
1337
1340
|
constructor() {
|
|
1338
1341
|
super(), this.headingLevel = "h2", this.hasBackButton = !1, this.hasStackedActions = !1, this.isDismissible = !1, this.isFooterPinned = !0, this.isFullWidthBelowMid = !1, this.isLoading = !1, this.isOpen = !1, this.position = "center", this.size = "medium", this._backButtonClicked = !1, this._handleDialogCancelEvent = (t) => {
|
|
1339
1342
|
this.isDismissible || t.preventDefault();
|
|
@@ -1377,14 +1380,14 @@ class g extends fe(le) {
|
|
|
1377
1380
|
*/
|
|
1378
1381
|
_handleModalOpened() {
|
|
1379
1382
|
var t, e, o;
|
|
1380
|
-
|
|
1383
|
+
Se(this), !((t = this._dialog) != null && t.hasAttribute("open") || !((e = this._dialog) != null && e.isConnected)) && ((o = this._dialog) == null || o.showModal());
|
|
1381
1384
|
}
|
|
1382
1385
|
/**
|
|
1383
1386
|
* Closes the dialog element and re-enables page scrolling
|
|
1384
1387
|
*/
|
|
1385
1388
|
_handleModalClosed() {
|
|
1386
1389
|
var t;
|
|
1387
|
-
|
|
1390
|
+
ke(this), (t = this._dialog) == null || t.close(), this._returnFocus();
|
|
1388
1391
|
}
|
|
1389
1392
|
// Handles the value of the isOpen property on first render of the component
|
|
1390
1393
|
_handleModalOpenStateOnFirstRender(t) {
|
|
@@ -1397,7 +1400,7 @@ class g extends fe(le) {
|
|
|
1397
1400
|
}
|
|
1398
1401
|
_handleActionClick(t) {
|
|
1399
1402
|
var e, o;
|
|
1400
|
-
t === "leading" ? ((e = this._dialog) == null || e.close("leading"), this._dispatchModalCustomEvent(
|
|
1403
|
+
t === "leading" ? ((e = this._dialog) == null || e.close("leading"), this._dispatchModalCustomEvent(ni)) : t === "supporting" && ((o = this._dialog) == null || o.close("supporting"), this._dispatchModalCustomEvent(ri));
|
|
1401
1404
|
}
|
|
1402
1405
|
/**
|
|
1403
1406
|
* Return focus to the specified element, providing the selector is valid
|
|
@@ -1423,7 +1426,7 @@ class g extends fe(le) {
|
|
|
1423
1426
|
}}"
|
|
1424
1427
|
variant="ghost-secondary"
|
|
1425
1428
|
class="c-modal-closeBtn"
|
|
1426
|
-
aria-label="${((t = this.aria) == null ? void 0 : t.close) ||
|
|
1429
|
+
aria-label="${((t = this.aria) == null ? void 0 : t.close) || y}"
|
|
1427
1430
|
data-test-id="modal-close-button">
|
|
1428
1431
|
<icon-close></icon-close>
|
|
1429
1432
|
</pie-icon-button>`;
|
|
@@ -1443,7 +1446,7 @@ class g extends fe(le) {
|
|
|
1443
1446
|
}}"
|
|
1444
1447
|
variant="ghost-secondary"
|
|
1445
1448
|
class="c-modal-backBtn"
|
|
1446
|
-
aria-label="${((t = this.aria) == null ? void 0 : t.back) ||
|
|
1449
|
+
aria-label="${((t = this.aria) == null ? void 0 : t.back) || y}"
|
|
1447
1450
|
data-test-id="modal-back-button">
|
|
1448
1451
|
${this.isRTL ? _`<icon-chevron-right></icon-chevron-right>` : _`<icon-chevron-left></icon-chevron-left>`}
|
|
1449
1452
|
</pie-icon-button>
|
|
@@ -1463,14 +1466,14 @@ class g extends fe(le) {
|
|
|
1463
1466
|
return t ? _`
|
|
1464
1467
|
<pie-button
|
|
1465
1468
|
variant="${e}"
|
|
1466
|
-
aria-label="${o ||
|
|
1469
|
+
aria-label="${o || y}"
|
|
1467
1470
|
type="submit"
|
|
1468
1471
|
?isFullWidth="${this.hasStackedActions}"
|
|
1469
1472
|
@click="${() => this._handleActionClick("leading")}"
|
|
1470
1473
|
data-test-id="modal-leading-action">
|
|
1471
1474
|
${t}
|
|
1472
1475
|
</pie-button>
|
|
1473
|
-
` :
|
|
1476
|
+
` : y;
|
|
1474
1477
|
}
|
|
1475
1478
|
/**
|
|
1476
1479
|
* Render supportingAction button depending on prop availability.
|
|
@@ -1488,14 +1491,14 @@ class g extends fe(le) {
|
|
|
1488
1491
|
return t ? this.leadingAction ? _`
|
|
1489
1492
|
<pie-button
|
|
1490
1493
|
variant="${e}"
|
|
1491
|
-
aria-label="${o ||
|
|
1494
|
+
aria-label="${o || y}"
|
|
1492
1495
|
type="reset"
|
|
1493
1496
|
?isFullWidth="${this.hasStackedActions}"
|
|
1494
1497
|
@click="${() => this._handleActionClick("supporting")}"
|
|
1495
1498
|
data-test-id="modal-supporting-action">
|
|
1496
1499
|
${t}
|
|
1497
1500
|
</pie-button>
|
|
1498
|
-
` : (console.warn("Use `leadingAction` instead of `supportingAction`. `supportingAction` is being ignored."),
|
|
1501
|
+
` : (console.warn("Use `leadingAction` instead of `supportingAction`. `supportingAction` is being ignored."), y) : y;
|
|
1499
1502
|
}
|
|
1500
1503
|
/**
|
|
1501
1504
|
* Renders the modal inner content and footer of the modal.
|
|
@@ -1509,8 +1512,8 @@ class g extends fe(le) {
|
|
|
1509
1512
|
</div>
|
|
1510
1513
|
</article>
|
|
1511
1514
|
<footer class="c-modal-footer">
|
|
1512
|
-
${this.leadingAction ? this.renderLeadingAction() :
|
|
1513
|
-
${this.supportingAction ? this.renderSupportingAction() :
|
|
1515
|
+
${this.leadingAction ? this.renderLeadingAction() : y}
|
|
1516
|
+
${this.supportingAction ? this.renderSupportingAction() : y}
|
|
1514
1517
|
</footer>`;
|
|
1515
1518
|
}
|
|
1516
1519
|
render() {
|
|
@@ -1524,18 +1527,18 @@ class g extends fe(le) {
|
|
|
1524
1527
|
isFooterPinned: l,
|
|
1525
1528
|
isFullWidthBelowMid: a,
|
|
1526
1529
|
isLoading: d,
|
|
1527
|
-
leadingAction:
|
|
1528
|
-
position:
|
|
1529
|
-
size:
|
|
1530
|
-
supportingAction:
|
|
1531
|
-
} = this,
|
|
1530
|
+
leadingAction: h,
|
|
1531
|
+
position: u,
|
|
1532
|
+
size: p,
|
|
1533
|
+
supportingAction: b
|
|
1534
|
+
} = this, Z = ce(r);
|
|
1532
1535
|
return _`
|
|
1533
1536
|
<dialog
|
|
1534
1537
|
id="dialog"
|
|
1535
1538
|
class="c-modal"
|
|
1536
|
-
size="${
|
|
1537
|
-
position="${
|
|
1538
|
-
?hasActions=${
|
|
1539
|
+
size="${p}"
|
|
1540
|
+
position="${u}"
|
|
1541
|
+
?hasActions=${h || b}
|
|
1539
1542
|
?hasBackButton=${e}
|
|
1540
1543
|
?hasStackedActions=${o}
|
|
1541
1544
|
?isDismissible=${s}
|
|
@@ -1543,14 +1546,14 @@ class g extends fe(le) {
|
|
|
1543
1546
|
?isFullWidthBelowMid=${a}
|
|
1544
1547
|
?isLoading=${d}
|
|
1545
1548
|
aria-busy="${d ? "true" : "false"}"
|
|
1546
|
-
aria-label="${d && (t == null ? void 0 : t.loading) ||
|
|
1549
|
+
aria-label="${d && (t == null ? void 0 : t.loading) || y}"
|
|
1547
1550
|
data-test-id="pie-modal">
|
|
1548
1551
|
<header class="c-modal-header">
|
|
1549
|
-
${e ? this.renderBackButton() :
|
|
1550
|
-
<${
|
|
1552
|
+
${e ? this.renderBackButton() : y}
|
|
1553
|
+
<${Z} class="c-modal-heading">
|
|
1551
1554
|
${n}
|
|
1552
|
-
</${
|
|
1553
|
-
${s ? this.renderCloseButton() :
|
|
1555
|
+
</${Z}>
|
|
1556
|
+
${s ? this.renderCloseButton() : y}
|
|
1554
1557
|
</header>
|
|
1555
1558
|
${// We need to wrap the remaining content in a shared scrollable container if the footer is not pinned
|
|
1556
1559
|
l ? this.renderModalContentAndFooter() : _`
|
|
@@ -1561,68 +1564,68 @@ class g extends fe(le) {
|
|
|
1561
1564
|
</dialog>`;
|
|
1562
1565
|
}
|
|
1563
1566
|
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
],
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
],
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
_t(
|
|
1575
|
-
],
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
],
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
],
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
],
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
],
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
],
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
],
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
],
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
],
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
_t(
|
|
1603
|
-
],
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
],
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
_t(
|
|
1610
|
-
],
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
],
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
],
|
|
1617
|
-
customElements.define(
|
|
1567
|
+
f.styles = le(ti);
|
|
1568
|
+
m([
|
|
1569
|
+
v({ type: Object })
|
|
1570
|
+
], f.prototype, "aria", 2);
|
|
1571
|
+
m([
|
|
1572
|
+
v({ type: String }),
|
|
1573
|
+
ve(Y)
|
|
1574
|
+
], f.prototype, "heading", 2);
|
|
1575
|
+
m([
|
|
1576
|
+
v(),
|
|
1577
|
+
_t(Y, ei, "h2")
|
|
1578
|
+
], f.prototype, "headingLevel", 2);
|
|
1579
|
+
m([
|
|
1580
|
+
v({ type: Boolean })
|
|
1581
|
+
], f.prototype, "hasBackButton", 2);
|
|
1582
|
+
m([
|
|
1583
|
+
v({ type: Boolean })
|
|
1584
|
+
], f.prototype, "hasStackedActions", 2);
|
|
1585
|
+
m([
|
|
1586
|
+
v({ type: Boolean, reflect: !0 })
|
|
1587
|
+
], f.prototype, "isDismissible", 2);
|
|
1588
|
+
m([
|
|
1589
|
+
v({ type: Boolean })
|
|
1590
|
+
], f.prototype, "isFooterPinned", 2);
|
|
1591
|
+
m([
|
|
1592
|
+
v({ type: Boolean })
|
|
1593
|
+
], f.prototype, "isFullWidthBelowMid", 2);
|
|
1594
|
+
m([
|
|
1595
|
+
v({ type: Boolean, reflect: !0 })
|
|
1596
|
+
], f.prototype, "isLoading", 2);
|
|
1597
|
+
m([
|
|
1598
|
+
v({ type: Boolean })
|
|
1599
|
+
], f.prototype, "isOpen", 2);
|
|
1600
|
+
m([
|
|
1601
|
+
v({ type: Object })
|
|
1602
|
+
], f.prototype, "leadingAction", 2);
|
|
1603
|
+
m([
|
|
1604
|
+
v(),
|
|
1605
|
+
_t(Y, oi, "center")
|
|
1606
|
+
], f.prototype, "position", 2);
|
|
1607
|
+
m([
|
|
1608
|
+
v()
|
|
1609
|
+
], f.prototype, "returnFocusAfterCloseSelector", 2);
|
|
1610
|
+
m([
|
|
1611
|
+
v(),
|
|
1612
|
+
_t(Y, ii, "medium")
|
|
1613
|
+
], f.prototype, "size", 2);
|
|
1614
|
+
m([
|
|
1615
|
+
v({ type: Object })
|
|
1616
|
+
], f.prototype, "supportingAction", 2);
|
|
1617
|
+
m([
|
|
1618
|
+
he("dialog")
|
|
1619
|
+
], f.prototype, "_dialog", 2);
|
|
1620
|
+
customElements.define(Y, f);
|
|
1618
1621
|
export {
|
|
1619
1622
|
mt as ON_MODAL_BACK_EVENT,
|
|
1620
1623
|
ft as ON_MODAL_CLOSE_EVENT,
|
|
1621
|
-
|
|
1624
|
+
ni as ON_MODAL_LEADING_ACTION_CLICK,
|
|
1622
1625
|
X as ON_MODAL_OPEN_EVENT,
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1626
|
+
ri as ON_MODAL_SUPPORTING_ACTION_CLICK,
|
|
1627
|
+
f as PieModal,
|
|
1628
|
+
ei as headingLevels,
|
|
1629
|
+
oi as positions,
|
|
1630
|
+
ii as sizes
|
|
1628
1631
|
};
|