@brad-frost-web/eddie-web-components 0.14.0 → 0.16.0
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.
|
@@ -87,11 +87,13 @@ export declare class EdBlackFridaymodal extends EdElement {
|
|
|
87
87
|
/**
|
|
88
88
|
* Disconnected callback lifecycle
|
|
89
89
|
* 1) Remove window resize event listener
|
|
90
|
+
* 2) Restore body overflow when component is removed
|
|
90
91
|
*/
|
|
91
92
|
disconnectedCallback(): void;
|
|
92
93
|
/**
|
|
93
94
|
* Updated lifecycle method
|
|
94
95
|
* Focus the close button when the modal becomes active
|
|
96
|
+
* Control body overflow based on isActive state
|
|
95
97
|
*/
|
|
96
98
|
updated(changedProperties: Map<string, any>): void;
|
|
97
99
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"black-friday-modal.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/black-friday-modal/black-friday-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,wBAAwB,CAAC;AAChC,OAAO,cAAc,CAAC;AACtB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,8BAA8B,CAAC;AAKtC,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IAC/C,MAAM,KAAK,MAAM,4BAEhB;IAED;;;;;;;;;;OAUG;IAEH,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAW;IAEtD;;OAEG;IAEH,eAAe,CAAC,EAAE,MAAM,CAA8B;IAEtD;;OAEG;IAEH,WAAW,CAAC,EAAE,OAAO,CAAS;IAE9B;;OAEG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAAoC;IAEnD;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAA8B;IAE7C;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAA8B;IAE9C;;OAEG;IAEH,WAAW,CAAC,EAAE,MAAM,CAA2D;IAE/E;;OAEG;IAEH,gBAAgB,CAAC,EAAE,MAAM,CAAa;IAEtC;;OAEG;IAEH,MAAM,EAAE,gBAAgB,EAAE,CAkCxB;IAEF;;OAEG;IAEH,OAAO,EAAE,iBAAiB,EAAE,CAmB1B;IAEF;;OAEG;IAEH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;OAEG;;IAMH;;OAEG;IACH,iBAAiB;IAMjB
|
|
1
|
+
{"version":3,"file":"black-friday-modal.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/black-friday-modal/black-friday-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,wBAAwB,CAAC;AAChC,OAAO,cAAc,CAAC;AACtB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,8BAA8B,CAAC;AAKtC,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IAC/C,MAAM,KAAK,MAAM,4BAEhB;IAED;;;;;;;;;;OAUG;IAEH,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAW;IAEtD;;OAEG;IAEH,eAAe,CAAC,EAAE,MAAM,CAA8B;IAEtD;;OAEG;IAEH,WAAW,CAAC,EAAE,OAAO,CAAS;IAE9B;;OAEG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAAoC;IAEnD;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAA8B;IAE7C;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAA8B;IAE9C;;OAEG;IAEH,WAAW,CAAC,EAAE,MAAM,CAA2D;IAE/E;;OAEG;IAEH,gBAAgB,CAAC,EAAE,MAAM,CAAa;IAEtC;;OAEG;IAEH,MAAM,EAAE,gBAAgB,EAAE,CAkCxB;IAEF;;OAEG;IAEH,OAAO,EAAE,iBAAiB,EAAE,CAmB1B;IAEF;;OAEG;IAEH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;OAEG;;IAMH;;OAEG;IACH,iBAAiB;IAMjB;;;;OAIG;IACH,oBAAoB;IAOpB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAkB3C;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,KAAK,EAAE,UAAU;IAoBtC,aAAa,CAAC,CAAC,EAAE,aAAa;IAM9B;;;OAGG;IACH,SAAS;IAYT;;;;;OAKG;IACH,UAAU;IAoBV,MAAM;CA4FP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,kBAAkB,CAAC;KAC7C;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as K } from "../EdElement.js";
|
|
2
|
-
import { unsafeCSS as Z, html as
|
|
2
|
+
import { unsafeCSS as Z, html as A } from "lit";
|
|
3
3
|
import { property as p, query as J } from "lit/decorators.js";
|
|
4
4
|
import "../button/button.js";
|
|
5
5
|
import "../grid/grid.js";
|
|
@@ -9,73 +9,73 @@ import "../layout-container/layout-container.js";
|
|
|
9
9
|
import "../heading/heading.js";
|
|
10
10
|
import "../text-passage/text-passage.js";
|
|
11
11
|
import { ifDefined as Q } from "lit/directives/if-defined.js";
|
|
12
|
-
const X = ':root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-black-friday-modal{display:block;height:0;width:0;padding:0 0 4rem;overflow:hidden;position:fixed;max-width:none;max-height:none;inset-block-start:unset;inset-block-end:0;inset-inline-end:0;background:var(--ed-theme-color-background-knockout);color:var(--ed-theme-color-content-knockout);border:none;z-index:1000;transition:height var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-black-friday-modal[open]{visibility:visible;width:100%;height:100vh;box-shadow:0 -5px 10px #0006;overflow:auto}.ed-c-black-friday-modal__header{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin-block-end:4rem;box-shadow:0 10px 0 -5px var(--ed-theme-color-background-accent-1),0 20px 0 -10px var(--ed-theme-color-background-accent-2),0 30px 0 -16px var(--ed-theme-color-background-accent-4)}.ed-c-black-friday-modal__header-media{
|
|
12
|
+
const X = ':root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-black-friday-modal{display:block;height:0;width:0;padding:0 0 4rem;overflow:hidden;position:fixed;max-width:none;max-height:none;inset-block-start:unset;inset-block-end:0;inset-inline-end:0;background:var(--ed-theme-color-background-knockout);color:var(--ed-theme-color-content-knockout);border:none;z-index:1000;transition:height var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-black-friday-modal[open]{visibility:visible;width:100%;height:100vh;box-shadow:0 -5px 10px #0006;overflow:auto}.ed-c-black-friday-modal__header{display:flex;justify-content:space-between;position:relative;align-items:baseline;gap:1rem;margin-block-end:4rem;box-shadow:0 10px 0 -5px var(--ed-theme-color-background-accent-1),0 20px 0 -10px var(--ed-theme-color-background-accent-2),0 30px 0 -16px var(--ed-theme-color-background-accent-4)}.ed-c-black-friday-modal__header-media{position:absolute;overflow:hidden;height:100%;width:100%}.ed-c-black-friday-modal__header-media:after{content:"";position:absolute;inset:0;background:#0009;z-index:1}.ed-c-black-friday-modal__header-media-image{position:relative;display:block;width:100%;height:100%;object-fit:cover}.ed-c-black-friday-modal__header-content{position:relative;width:100%}.ed-c-black-friday-modal__header-content-text{position:relative;width:100%;text-align:center;padding:2rem 0;z-index:3}.ed-c-black-friday-modal__header-content-description{font-family:var(--ed-theme-typography-body-lg-font-family);font-weight:var(--ed-theme-typography-body-lg-font-weight);font-size:var(--ed-theme-typography-body-lg-font-size);line-height:var(--ed-theme-typography-body-lg-line-height);letter-spacing:var(--ed-theme-typography-body-lg-letter-spacing);text-transform:var(--ed-theme-typography-body-lg-text-transform)}.ed-c-black-friday-modal__title{margin-block-end:1rem}.ed-c-black-friday-modal__description{max-width:35rem}.ed-c-black-friday-modal__close-button{position:absolute;inset-block-start:.5rem;inset-inline-end:.5rem;appearance:none;background:none;outline:none;border:none;padding:.5rem;z-index:4;cursor:pointer;color:var(--ed-theme-color-content-knockout)}.ed-c-black-friday-modal__close-button:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-knockout);outline-offset:var(--ed-theme-offset-focus-ring, .25rem )}@media all and (min-width:60rem){.ed-c-black-friday-modal__close-button{padding:1rem}}.ed-c-black-friday-modal__close-icon{fill:currentColor;height:2rem;width:2rem}.ed-c-black-friday-modal__promos{display:block;margin-block-end:4rem}.ed-c-black-friday-modal__image{display:block;width:100%}.ed-c-black-friday-modal__section-title{display:block;margin-block-end:1rem;text-align:center}.ed-c-black-friday-modal__card{display:flex;flex-direction:column;height:100%}.ed-c-black-friday-modal__card-body{flex:1}.ed-c-black-friday-modal__card-footer{padding:.5rem 1rem 1rem;text-align:center}.ed-c-black-friday-modal__card-media{display:block;overflow:hidden;margin-block-end:1rem;border:1px solid var(--ed-theme-color-border-knockout);border-radius:.5rem}.ed-c-black-friday-modal__card-media:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-knockout);outline-offset:var(--ed-theme-offset-focus-ring, .25rem )}.ed-c-black-friday-modal__card-image{display:block;width:100%}.ed-c-black-friday-modal__card-title-anchor{display:block;text-decoration:none;color:var(--ed-theme-color-content-knockout)}.ed-c-black-friday-modal__card-title-anchor:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-knockout);outline-offset:var(--ed-theme-offset-focus-ring, .25rem )}.ed-c-black-friday-modal__card-title{display:block;margin-block-end:1rem;text-align:center}.ed-c-black-friday-modal__card-description{display:block;margin-block-end:1rem}.ed-c-black-friday-modal__card-description p{text-align:center}.ed-c-black-friday-modal__header-content-title{text-shadow:2px 0 0 var(--ed-theme-color-background-accent-2),4px 0 0 var(--ed-theme-color-background-accent-1);letter-spacing:1.5px}.ed-c-black-friday-modal__card-paragraph{text-align:center}.ed-c-black-friday-modal__card-list-container{display:flex;flex-direction:column;align-items:center}.ed-c-black-friday-modal__card-list{padding:0;margin:0}.strikethrough{font-family:var(--ed-theme-typography-button-default-font-family);font-weight:var(--ed-theme-typography-button-default-font-weight);font-size:var(--ed-theme-typography-button-default-font-size);line-height:var(--ed-theme-typography-button-default-line-height);letter-spacing:var(--ed-theme-typography-button-default-letter-spacing);text-transform:var(--ed-theme-typography-button-default-text-transform);text-decoration:line-through;color:var(--ed-theme-color-content-subtle)}.ed-c-black-friday-modal__cta{margin-block-start:2rem;text-align:center}';
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const O = globalThis, H = O.trustedTypes, L = H ? H.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, W = "$lit$",
|
|
19
|
-
\f\r]`, w = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, U = /-->/g, j = />/g,
|
|
20
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), R = /'/g, G = /"/g, V = /^(?:script|style|textarea|title)$/i,
|
|
18
|
+
const O = globalThis, H = O.trustedTypes, L = H ? H.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, W = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, F = "?" + y, Y = `<${F}>`, $ = document, N = () => $.createComment(""), C = (s) => s === null || typeof s != "object" && typeof s != "function", z = Array.isArray, ee = (s) => z(s) || typeof s?.[Symbol.iterator] == "function", D = `[
|
|
19
|
+
\f\r]`, w = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, U = /-->/g, j = />/g, b = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
|
|
20
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), R = /'/g, G = /"/g, V = /^(?:script|style|textarea|title)$/i, k = Symbol.for("lit-noChange"), l = Symbol.for("lit-nothing"), P = /* @__PURE__ */ new WeakMap(), v = $.createTreeWalker($, 129);
|
|
21
21
|
function q(s, e) {
|
|
22
22
|
if (!z(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
23
23
|
return L !== void 0 ? L.createHTML(e) : e;
|
|
24
24
|
}
|
|
25
25
|
const te = (s, e) => {
|
|
26
26
|
const t = s.length - 1, i = [];
|
|
27
|
-
let
|
|
27
|
+
let o, a = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", d = w;
|
|
28
28
|
for (let g = 0; g < t; g++) {
|
|
29
29
|
const r = s[g];
|
|
30
30
|
let c, h, n = -1, f = 0;
|
|
31
|
-
for (; f < r.length && (d.lastIndex = f, h = d.exec(r), h !== null); ) f = d.lastIndex, d === w ? h[1] === "!--" ? d = U : h[1] !== void 0 ? d = j : h[2] !== void 0 ? (V.test(h[2]) && (
|
|
32
|
-
const _ = d ===
|
|
33
|
-
|
|
31
|
+
for (; f < r.length && (d.lastIndex = f, h = d.exec(r), h !== null); ) f = d.lastIndex, d === w ? h[1] === "!--" ? d = U : h[1] !== void 0 ? d = j : h[2] !== void 0 ? (V.test(h[2]) && (o = RegExp("</" + h[2], "g")), d = b) : h[3] !== void 0 && (d = b) : d === b ? h[0] === ">" ? (d = o ?? w, n = -1) : h[1] === void 0 ? n = -2 : (n = d.lastIndex - h[2].length, c = h[1], d = h[3] === void 0 ? b : h[3] === '"' ? G : R) : d === G || d === R ? d = b : d === U || d === j ? d = w : (d = b, o = void 0);
|
|
32
|
+
const _ = d === b && s[g + 1].startsWith("/>") ? " " : "";
|
|
33
|
+
a += d === w ? r + Y : n >= 0 ? (i.push(c), r.slice(0, n) + W + r.slice(n) + y + _) : r + y + (n === -2 ? g : _);
|
|
34
34
|
}
|
|
35
|
-
return [q(s,
|
|
35
|
+
return [q(s, a + (s[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
36
36
|
};
|
|
37
37
|
class T {
|
|
38
38
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
39
|
-
let
|
|
39
|
+
let o;
|
|
40
40
|
this.parts = [];
|
|
41
|
-
let
|
|
41
|
+
let a = 0, d = 0;
|
|
42
42
|
const g = e.length - 1, r = this.parts, [c, h] = te(e, t);
|
|
43
|
-
if (this.el = T.createElement(c, i),
|
|
43
|
+
if (this.el = T.createElement(c, i), v.currentNode = this.el.content, t === 2 || t === 3) {
|
|
44
44
|
const n = this.el.content.firstChild;
|
|
45
45
|
n.replaceWith(...n.childNodes);
|
|
46
46
|
}
|
|
47
|
-
for (; (
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
const f = h[d++], _ =
|
|
51
|
-
r.push({ type: 1, index:
|
|
52
|
-
} else n.startsWith(
|
|
53
|
-
if (V.test(
|
|
54
|
-
const n =
|
|
47
|
+
for (; (o = v.nextNode()) !== null && r.length < g; ) {
|
|
48
|
+
if (o.nodeType === 1) {
|
|
49
|
+
if (o.hasAttributes()) for (const n of o.getAttributeNames()) if (n.endsWith(W)) {
|
|
50
|
+
const f = h[d++], _ = o.getAttribute(n).split(y), S = /([.?@])?(.*)/.exec(f);
|
|
51
|
+
r.push({ type: 1, index: a, name: S[2], strings: _, ctor: S[1] === "." ? oe : S[1] === "?" ? ae : S[1] === "@" ? se : E }), o.removeAttribute(n);
|
|
52
|
+
} else n.startsWith(y) && (r.push({ type: 6, index: a }), o.removeAttribute(n));
|
|
53
|
+
if (V.test(o.tagName)) {
|
|
54
|
+
const n = o.textContent.split(y), f = n.length - 1;
|
|
55
55
|
if (f > 0) {
|
|
56
|
-
|
|
57
|
-
for (let _ = 0; _ < f; _++)
|
|
58
|
-
|
|
56
|
+
o.textContent = H ? H.emptyScript : "";
|
|
57
|
+
for (let _ = 0; _ < f; _++) o.append(n[_], N()), v.nextNode(), r.push({ type: 2, index: ++a });
|
|
58
|
+
o.append(n[f], N());
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
} else if (
|
|
61
|
+
} else if (o.nodeType === 8) if (o.data === F) r.push({ type: 2, index: a });
|
|
62
62
|
else {
|
|
63
63
|
let n = -1;
|
|
64
|
-
for (; (n =
|
|
64
|
+
for (; (n = o.data.indexOf(y, n + 1)) !== -1; ) r.push({ type: 7, index: a }), n += y.length - 1;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
a++;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
static createElement(e, t) {
|
|
70
|
-
const i =
|
|
70
|
+
const i = $.createElement("template");
|
|
71
71
|
return i.innerHTML = e, i;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
function x(s, e, t = s, i) {
|
|
75
|
-
if (e ===
|
|
76
|
-
let
|
|
77
|
-
const
|
|
78
|
-
return
|
|
75
|
+
if (e === k) return e;
|
|
76
|
+
let o = i !== void 0 ? t._$Co?.[i] : t._$Cl;
|
|
77
|
+
const a = C(e) ? void 0 : e._$litDirective$;
|
|
78
|
+
return o?.constructor !== a && (o?._$AO?.(!1), a === void 0 ? o = void 0 : (o = new a(s), o._$AT(s, t, i)), i !== void 0 ? (t._$Co ??= [])[i] = o : t._$Cl = o), o !== void 0 && (e = x(s, o._$AS(s, e.values), o, i)), e;
|
|
79
79
|
}
|
|
80
80
|
class ie {
|
|
81
81
|
constructor(e, t) {
|
|
@@ -88,17 +88,17 @@ class ie {
|
|
|
88
88
|
return this._$AM._$AU;
|
|
89
89
|
}
|
|
90
90
|
u(e) {
|
|
91
|
-
const { el: { content: t }, parts: i } = this._$AD,
|
|
92
|
-
|
|
93
|
-
let
|
|
91
|
+
const { el: { content: t }, parts: i } = this._$AD, o = (e?.creationScope ?? $).importNode(t, !0);
|
|
92
|
+
v.currentNode = o;
|
|
93
|
+
let a = v.nextNode(), d = 0, g = 0, r = i[0];
|
|
94
94
|
for (; r !== void 0; ) {
|
|
95
95
|
if (d === r.index) {
|
|
96
96
|
let c;
|
|
97
|
-
r.type === 2 ? c = new M(
|
|
97
|
+
r.type === 2 ? c = new M(a, a.nextSibling, this, e) : r.type === 1 ? c = new r.ctor(a, r.name, r.strings, this, e) : r.type === 6 && (c = new de(a, this, e)), this._$AV.push(c), r = i[++g];
|
|
98
98
|
}
|
|
99
|
-
d !== r?.index && (
|
|
99
|
+
d !== r?.index && (a = v.nextNode(), d++);
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return v.currentNode = $, o;
|
|
102
102
|
}
|
|
103
103
|
p(e) {
|
|
104
104
|
let t = 0;
|
|
@@ -109,8 +109,8 @@ class M {
|
|
|
109
109
|
get _$AU() {
|
|
110
110
|
return this._$AM?._$AU ?? this._$Cv;
|
|
111
111
|
}
|
|
112
|
-
constructor(e, t, i,
|
|
113
|
-
this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options =
|
|
112
|
+
constructor(e, t, i, o) {
|
|
113
|
+
this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = o, this._$Cv = o?.isConnected ?? !0;
|
|
114
114
|
}
|
|
115
115
|
get parentNode() {
|
|
116
116
|
let e = this._$AA.parentNode;
|
|
@@ -124,7 +124,7 @@ class M {
|
|
|
124
124
|
return this._$AB;
|
|
125
125
|
}
|
|
126
126
|
_$AI(e, t = this) {
|
|
127
|
-
e = x(this, e, t), C(e) ? e === l || e == null || e === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : e !== this._$AH && e !==
|
|
127
|
+
e = x(this, e, t), C(e) ? e === l || e == null || e === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : e !== this._$AH && e !== k && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ee(e) ? this.k(e) : this._(e);
|
|
128
128
|
}
|
|
129
129
|
O(e) {
|
|
130
130
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -133,14 +133,14 @@ class M {
|
|
|
133
133
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
134
134
|
}
|
|
135
135
|
_(e) {
|
|
136
|
-
this._$AH !== l && C(this._$AH) ? this._$AA.nextSibling.data = e : this.T(
|
|
136
|
+
this._$AH !== l && C(this._$AH) ? this._$AA.nextSibling.data = e : this.T($.createTextNode(e)), this._$AH = e;
|
|
137
137
|
}
|
|
138
138
|
$(e) {
|
|
139
|
-
const { values: t, _$litType$: i } = e,
|
|
140
|
-
if (this._$AH?._$AD ===
|
|
139
|
+
const { values: t, _$litType$: i } = e, o = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = T.createElement(q(i.h, i.h[0]), this.options)), i);
|
|
140
|
+
if (this._$AH?._$AD === o) this._$AH.p(t);
|
|
141
141
|
else {
|
|
142
|
-
const
|
|
143
|
-
|
|
142
|
+
const a = new ie(o, this), d = a.u(this.options);
|
|
143
|
+
a.p(t), this.T(d), this._$AH = a;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
_$AC(e) {
|
|
@@ -150,9 +150,9 @@ class M {
|
|
|
150
150
|
k(e) {
|
|
151
151
|
z(this._$AH) || (this._$AH = [], this._$AR());
|
|
152
152
|
const t = this._$AH;
|
|
153
|
-
let i,
|
|
154
|
-
for (const
|
|
155
|
-
|
|
153
|
+
let i, o = 0;
|
|
154
|
+
for (const a of e) o === t.length ? t.push(i = new M(this.O(N()), this.O(N()), this, this.options)) : i = t[o], i._$AI(a), o++;
|
|
155
|
+
o < t.length && (this._$AR(i && i._$AB.nextSibling, o), t.length = o);
|
|
156
156
|
}
|
|
157
157
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
158
158
|
for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
|
|
@@ -171,25 +171,25 @@ class E {
|
|
|
171
171
|
get _$AU() {
|
|
172
172
|
return this._$AM._$AU;
|
|
173
173
|
}
|
|
174
|
-
constructor(e, t, i,
|
|
175
|
-
this.type = 1, this._$AH = l, this._$AN = void 0, this.element = e, this.name = t, this._$AM =
|
|
174
|
+
constructor(e, t, i, o, a) {
|
|
175
|
+
this.type = 1, this._$AH = l, this._$AN = void 0, this.element = e, this.name = t, this._$AM = o, this.options = a, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = l;
|
|
176
176
|
}
|
|
177
|
-
_$AI(e, t = this, i,
|
|
178
|
-
const
|
|
177
|
+
_$AI(e, t = this, i, o) {
|
|
178
|
+
const a = this.strings;
|
|
179
179
|
let d = !1;
|
|
180
|
-
if (
|
|
180
|
+
if (a === void 0) e = x(this, e, t, 0), d = !C(e) || e !== this._$AH && e !== k, d && (this._$AH = e);
|
|
181
181
|
else {
|
|
182
182
|
const g = e;
|
|
183
183
|
let r, c;
|
|
184
|
-
for (e =
|
|
184
|
+
for (e = a[0], r = 0; r < a.length - 1; r++) c = x(this, g[i + r], t, r), c === k && (c = this._$AH[r]), d ||= !C(c) || c !== this._$AH[r], c === l ? e = l : e !== l && (e += (c ?? "") + a[r + 1]), this._$AH[r] = c;
|
|
185
185
|
}
|
|
186
|
-
d && !
|
|
186
|
+
d && !o && this.j(e);
|
|
187
187
|
}
|
|
188
188
|
j(e) {
|
|
189
189
|
e === l ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
class
|
|
192
|
+
class oe extends E {
|
|
193
193
|
constructor() {
|
|
194
194
|
super(...arguments), this.type = 3;
|
|
195
195
|
}
|
|
@@ -197,7 +197,7 @@ class ae extends E {
|
|
|
197
197
|
this.element[this.name] = e === l ? void 0 : e;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
class
|
|
200
|
+
class ae extends E {
|
|
201
201
|
constructor() {
|
|
202
202
|
super(...arguments), this.type = 4;
|
|
203
203
|
}
|
|
@@ -206,13 +206,13 @@ class oe extends E {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
class se extends E {
|
|
209
|
-
constructor(e, t, i,
|
|
210
|
-
super(e, t, i,
|
|
209
|
+
constructor(e, t, i, o, a) {
|
|
210
|
+
super(e, t, i, o, a), this.type = 5;
|
|
211
211
|
}
|
|
212
212
|
_$AI(e, t = this) {
|
|
213
|
-
if ((e = x(this, e, t, 0) ?? l) ===
|
|
214
|
-
const i = this._$AH,
|
|
215
|
-
|
|
213
|
+
if ((e = x(this, e, t, 0) ?? l) === k) return;
|
|
214
|
+
const i = this._$AH, o = e === l && i !== l || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, a = e !== l && (i === l || o);
|
|
215
|
+
o && this.element.removeEventListener(this.name, this, i), a && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
216
216
|
}
|
|
217
217
|
handleEvent(e) {
|
|
218
218
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
@@ -264,7 +264,7 @@ class I extends ce {
|
|
|
264
264
|
}
|
|
265
265
|
render(e) {
|
|
266
266
|
if (e === l || e == null) return this._t = void 0, this.it = e;
|
|
267
|
-
if (e ===
|
|
267
|
+
if (e === k) return e;
|
|
268
268
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
269
269
|
if (e === this.it) return this._t;
|
|
270
270
|
this.it = e;
|
|
@@ -275,9 +275,9 @@ class I extends ce {
|
|
|
275
275
|
I.directiveName = "unsafeHTML", I.resultType = 1;
|
|
276
276
|
const B = le(I);
|
|
277
277
|
var he = Object.defineProperty, u = (s, e, t, i) => {
|
|
278
|
-
for (var
|
|
279
|
-
(d = s[
|
|
280
|
-
return
|
|
278
|
+
for (var o = void 0, a = s.length - 1, d; a >= 0; a--)
|
|
279
|
+
(d = s[a]) && (o = d(e, t, o) || o);
|
|
280
|
+
return o && he(e, t, o), o;
|
|
281
281
|
};
|
|
282
282
|
class m extends K {
|
|
283
283
|
/**
|
|
@@ -351,18 +351,20 @@ class m extends K {
|
|
|
351
351
|
/**
|
|
352
352
|
* Disconnected callback lifecycle
|
|
353
353
|
* 1) Remove window resize event listener
|
|
354
|
+
* 2) Restore body overflow when component is removed
|
|
354
355
|
*/
|
|
355
356
|
disconnectedCallback() {
|
|
356
|
-
document.removeEventListener("mousedown", this.handleOnClickOutside, !1), super.disconnectedCallback();
|
|
357
|
+
document.removeEventListener("mousedown", this.handleOnClickOutside, !1), document.body.style.overflow = "", super.disconnectedCallback();
|
|
357
358
|
}
|
|
358
359
|
/**
|
|
359
360
|
* Updated lifecycle method
|
|
360
361
|
* Focus the close button when the modal becomes active
|
|
362
|
+
* Control body overflow based on isActive state
|
|
361
363
|
*/
|
|
362
364
|
updated(e) {
|
|
363
|
-
super.updated(e), e.has("isActive") && this.isActive
|
|
365
|
+
super.updated(e), e.has("isActive") && (this.isActive ? (document.body.style.overflow = "hidden", setTimeout(() => {
|
|
364
366
|
this.closeButton?.focus();
|
|
365
|
-
}, 0);
|
|
367
|
+
}, 0)) : document.body.style.overflow = "");
|
|
366
368
|
}
|
|
367
369
|
/**
|
|
368
370
|
* Handle click outside the component
|
|
@@ -424,7 +426,7 @@ class m extends K {
|
|
|
424
426
|
"ed-c-black-friday-modal--backdrop": this.hasBackdrop,
|
|
425
427
|
"ed-c-black-friday-modal--inactive": !this.isActive
|
|
426
428
|
});
|
|
427
|
-
return
|
|
429
|
+
return A`
|
|
428
430
|
<dialog
|
|
429
431
|
aria-labelledby="black-friday-modal-heading"
|
|
430
432
|
class="${e}"
|
|
@@ -454,20 +456,20 @@ class m extends K {
|
|
|
454
456
|
<ed-layout-container>
|
|
455
457
|
<ed-grid gap="lg" class="ed-c-black-friday-modal__promos">
|
|
456
458
|
${this.promos.map(
|
|
457
|
-
(t) =>
|
|
459
|
+
(t) => A`
|
|
458
460
|
<ed-grid-item>
|
|
459
461
|
<div class="ed-c-black-friday-modal__card">
|
|
460
462
|
<div class="ed-c-black-friday-modal__card-body">
|
|
461
|
-
${t.href ?
|
|
463
|
+
${t.href ? A`
|
|
462
464
|
<a class="ed-c-black-friday-modal__card-media" href="${t.href}">
|
|
463
465
|
<img class="ed-c-black-friday-modal__card-image" src="${t.imgSrc}" alt="${t.imgAlt}" />
|
|
464
466
|
</a>
|
|
465
|
-
` :
|
|
467
|
+
` : A` <img class="ed-c-black-friday-modal__card-image" src="${t.imgSrc}" alt="${t.imgAlt}" /> `}
|
|
466
468
|
<ed-heading tagName="h4" variant="title-lg" class="ed-c-black-friday-modal__card-title">${t.heading}</ed-heading>
|
|
467
469
|
|
|
468
470
|
<ed-text-passage class="ed-c-black-friday-modal__card-description"> ${B(t.description)} </ed-text-passage>
|
|
469
471
|
</div>
|
|
470
|
-
${t.href && t.buttonText ?
|
|
472
|
+
${t.href && t.buttonText ? A`
|
|
471
473
|
<footer class="ed-c-black-friday-modal__card-footer">
|
|
472
474
|
<ed-button href="${t.href}" size="lg">${B(t.buttonText)}</ed-button>
|
|
473
475
|
</footer>
|
|
@@ -478,9 +480,9 @@ class m extends K {
|
|
|
478
480
|
)}
|
|
479
481
|
</ed-grid>
|
|
480
482
|
<ed-heading tagName="h3" variant="headline-default" class="ed-c-black-friday-modal__section-title">${this.secondaryHeading}</ed-heading>
|
|
481
|
-
<ed-grid variant="${this.courses.length >= 3 ? "1-3up" : this.courses.length
|
|
483
|
+
<ed-grid variant="${this.courses.length >= 3 ? "1-3up" : this.courses.length === 2 ? "2up" : ""}">
|
|
482
484
|
${this.courses.map(
|
|
483
|
-
(t) =>
|
|
485
|
+
(t) => A`
|
|
484
486
|
<ed-grid-item>
|
|
485
487
|
<div class="ed-c-black-friday-modal__card">
|
|
486
488
|
<div class="ed-c-black-friday-modal__card-body">
|