@brad-frost-web/eddie-web-components 0.10.0 → 0.12.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.
- package/components/black-friday-banner/black-friday-banner.d.ts +14 -0
- package/components/black-friday-banner/black-friday-banner.d.ts.map +1 -0
- package/components/black-friday-banner/black-friday-banner.js +23 -0
- package/components/black-friday-modal/black-friday-modal.d.ts.map +1 -1
- package/components/black-friday-modal/black-friday-modal.js +102 -95
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdBlackFridayBanner extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'ed-black-friday-banner': EdBlackFridayBanner;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=black-friday-banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"black-friday-banner.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/black-friday-banner/black-friday-banner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAEtF,OAAO,sCAAsC,CAAC;AAE9C;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,SAAS;IAChD,MAAM,KAAK,MAAM,4BAEhB;IAED,MAAM;CAWP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,mBAAmB,CAAC;KAC/C;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { unsafeCSS as o, html as t } from "lit";
|
|
2
|
+
import { E as n } from "../EdElement.js";
|
|
3
|
+
import "../layout-container/layout-container.js";
|
|
4
|
+
const r = ":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-banner{width:100%;padding:1rem 0;background:var(--ed-theme-color-background-brand-knockout);color:var(--ed-theme-color-content-knockout)}::slotted(a){color:var(--ed-theme-color-content-knockout)}::slotted(a):hover,::slotted(a):focus{text-decoration:none}";
|
|
5
|
+
class a extends n {
|
|
6
|
+
static get styles() {
|
|
7
|
+
return o(r.toString());
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
const e = this.componentClassNames("ed-c-black-friday-banner", {});
|
|
11
|
+
return t`
|
|
12
|
+
<div class="${e}" role="banner">
|
|
13
|
+
<ed-layout-container>
|
|
14
|
+
<slot></slot>
|
|
15
|
+
</ed-layout-container>
|
|
16
|
+
</div>
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
customElements.get("ed-black-friday-banner") === void 0 && customElements.define("ed-black-friday-banner", a);
|
|
21
|
+
export {
|
|
22
|
+
a as EdBlackFridayBanner
|
|
23
|
+
};
|
|
@@ -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;
|
|
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;;;OAGG;IACH,oBAAoB;IAKpB;;;OAGG;IACH,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAW3C;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,KAAK,EAAE,UAAU;IAoBtC,aAAa,CAAC,CAAC,EAAE,aAAa;IAM9B;;;OAGG;IACH,SAAS;IAYT;;;;;OAKG;IACH,UAAU;IAoBV,MAAM;CAwFP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,kBAAkB,CAAC;KAC7C;CACF"}
|
|
@@ -1,77 +1,81 @@
|
|
|
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";
|
|
6
6
|
import "../grid-item/grid-item.js";
|
|
7
|
+
import "../icon/icon.js";
|
|
8
|
+
import "../layout-container/layout-container.js";
|
|
9
|
+
import "../heading/heading.js";
|
|
10
|
+
import "../text-passage/text-passage.js";
|
|
7
11
|
import { ifDefined as Q } from "lit/directives/if-defined.js";
|
|
8
|
-
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;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{min-height:10rem;max-height:20rem;overflow:hidden}.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%}@media all and (min-width:48rem){.ed-c-black-friday-modal__header-media-image{inset-block-end:10rem}}.ed-c-black-friday-modal__header-content{position:relative;width:100%}.ed-c-black-friday-modal__header-content-text{position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%);width:100%;text-align:center;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:2;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{display:block;margin-block-end:1rem;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}';
|
|
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{min-height:10rem;max-height:20rem;overflow:hidden}.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%}@media all and (min-width:48rem){.ed-c-black-friday-modal__header-media-image{inset-block-end:10rem}}.ed-c-black-friday-modal__header-content{position:relative;width:100%}.ed-c-black-friday-modal__header-content-text{position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%);width:100%;text-align:center;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:2;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{display:block;margin-block-end:1rem;text-align:center}.ed-c-black-friday-modal__card-description p{margin-block-end:1rem;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}';
|
|
9
13
|
/**
|
|
10
14
|
* @license
|
|
11
15
|
* Copyright 2017 Google LLC
|
|
12
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
17
|
*/
|
|
14
|
-
const
|
|
15
|
-
\f\r]`, w = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
16
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
17
|
-
function q(
|
|
18
|
-
if (!
|
|
19
|
-
return
|
|
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}>`, v = document, N = () => v.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(v, 129);
|
|
21
|
+
function q(s, e) {
|
|
22
|
+
if (!z(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
23
|
+
return L !== void 0 ? L.createHTML(e) : e;
|
|
20
24
|
}
|
|
21
|
-
const te = (
|
|
22
|
-
const t =
|
|
23
|
-
let
|
|
25
|
+
const te = (s, e) => {
|
|
26
|
+
const t = s.length - 1, i = [];
|
|
27
|
+
let a, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", d = w;
|
|
24
28
|
for (let g = 0; g < t; g++) {
|
|
25
|
-
const r =
|
|
26
|
-
let c, h, n = -1,
|
|
27
|
-
for (;
|
|
28
|
-
const
|
|
29
|
-
|
|
29
|
+
const r = s[g];
|
|
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]) && (a = RegExp("</" + h[2], "g")), d = b) : h[3] !== void 0 && (d = b) : d === b ? h[0] === ">" ? (d = a ?? 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, a = void 0);
|
|
32
|
+
const _ = d === b && s[g + 1].startsWith("/>") ? " " : "";
|
|
33
|
+
o += d === w ? r + Y : n >= 0 ? (i.push(c), r.slice(0, n) + W + r.slice(n) + y + _) : r + y + (n === -2 ? g : _);
|
|
30
34
|
}
|
|
31
|
-
return [q(
|
|
35
|
+
return [q(s, o + (s[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
32
36
|
};
|
|
33
37
|
class T {
|
|
34
38
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
35
|
-
let
|
|
39
|
+
let a;
|
|
36
40
|
this.parts = [];
|
|
37
|
-
let
|
|
41
|
+
let o = 0, d = 0;
|
|
38
42
|
const g = e.length - 1, r = this.parts, [c, h] = te(e, t);
|
|
39
43
|
if (this.el = T.createElement(c, i), $.currentNode = this.el.content, t === 2 || t === 3) {
|
|
40
44
|
const n = this.el.content.firstChild;
|
|
41
45
|
n.replaceWith(...n.childNodes);
|
|
42
46
|
}
|
|
43
|
-
for (; (
|
|
44
|
-
if (
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
r.push({ type: 1, index:
|
|
48
|
-
} else n.startsWith(
|
|
49
|
-
if (V.test(
|
|
50
|
-
const n =
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
for (let
|
|
54
|
-
|
|
47
|
+
for (; (a = $.nextNode()) !== null && r.length < g; ) {
|
|
48
|
+
if (a.nodeType === 1) {
|
|
49
|
+
if (a.hasAttributes()) for (const n of a.getAttributeNames()) if (n.endsWith(W)) {
|
|
50
|
+
const f = h[d++], _ = a.getAttribute(n).split(y), S = /([.?@])?(.*)/.exec(f);
|
|
51
|
+
r.push({ type: 1, index: o, name: S[2], strings: _, ctor: S[1] === "." ? ae : S[1] === "?" ? oe : S[1] === "@" ? se : E }), a.removeAttribute(n);
|
|
52
|
+
} else n.startsWith(y) && (r.push({ type: 6, index: o }), a.removeAttribute(n));
|
|
53
|
+
if (V.test(a.tagName)) {
|
|
54
|
+
const n = a.textContent.split(y), f = n.length - 1;
|
|
55
|
+
if (f > 0) {
|
|
56
|
+
a.textContent = H ? H.emptyScript : "";
|
|
57
|
+
for (let _ = 0; _ < f; _++) a.append(n[_], N()), $.nextNode(), r.push({ type: 2, index: ++o });
|
|
58
|
+
a.append(n[f], N());
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
} else if (
|
|
61
|
+
} else if (a.nodeType === 8) if (a.data === F) r.push({ type: 2, index: o });
|
|
58
62
|
else {
|
|
59
63
|
let n = -1;
|
|
60
|
-
for (; (n =
|
|
64
|
+
for (; (n = a.data.indexOf(y, n + 1)) !== -1; ) r.push({ type: 7, index: o }), n += y.length - 1;
|
|
61
65
|
}
|
|
62
|
-
|
|
66
|
+
o++;
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
static createElement(e, t) {
|
|
66
|
-
const i =
|
|
70
|
+
const i = v.createElement("template");
|
|
67
71
|
return i.innerHTML = e, i;
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
|
-
function x(
|
|
74
|
+
function x(s, e, t = s, i) {
|
|
71
75
|
if (e === k) return e;
|
|
72
|
-
let
|
|
73
|
-
const
|
|
74
|
-
return
|
|
76
|
+
let a = i !== void 0 ? t._$Co?.[i] : t._$Cl;
|
|
77
|
+
const o = C(e) ? void 0 : e._$litDirective$;
|
|
78
|
+
return a?.constructor !== o && (a?._$AO?.(!1), o === void 0 ? a = void 0 : (a = new o(s), a._$AT(s, t, i)), i !== void 0 ? (t._$Co ??= [])[i] = a : t._$Cl = a), a !== void 0 && (e = x(s, a._$AS(s, e.values), a, i)), e;
|
|
75
79
|
}
|
|
76
80
|
class ie {
|
|
77
81
|
constructor(e, t) {
|
|
@@ -84,29 +88,29 @@ class ie {
|
|
|
84
88
|
return this._$AM._$AU;
|
|
85
89
|
}
|
|
86
90
|
u(e) {
|
|
87
|
-
const { el: { content: t }, parts: i } = this._$AD,
|
|
88
|
-
$.currentNode =
|
|
89
|
-
let
|
|
91
|
+
const { el: { content: t }, parts: i } = this._$AD, a = (e?.creationScope ?? v).importNode(t, !0);
|
|
92
|
+
$.currentNode = a;
|
|
93
|
+
let o = $.nextNode(), d = 0, g = 0, r = i[0];
|
|
90
94
|
for (; r !== void 0; ) {
|
|
91
95
|
if (d === r.index) {
|
|
92
96
|
let c;
|
|
93
|
-
r.type === 2 ? c = new
|
|
97
|
+
r.type === 2 ? c = new M(o, o.nextSibling, this, e) : r.type === 1 ? c = new r.ctor(o, r.name, r.strings, this, e) : r.type === 6 && (c = new de(o, this, e)), this._$AV.push(c), r = i[++g];
|
|
94
98
|
}
|
|
95
|
-
d !== r?.index && (
|
|
99
|
+
d !== r?.index && (o = $.nextNode(), d++);
|
|
96
100
|
}
|
|
97
|
-
return $.currentNode =
|
|
101
|
+
return $.currentNode = v, a;
|
|
98
102
|
}
|
|
99
103
|
p(e) {
|
|
100
104
|
let t = 0;
|
|
101
105
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
|
-
class
|
|
108
|
+
class M {
|
|
105
109
|
get _$AU() {
|
|
106
110
|
return this._$AM?._$AU ?? this._$Cv;
|
|
107
111
|
}
|
|
108
|
-
constructor(e, t, i,
|
|
109
|
-
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, a) {
|
|
113
|
+
this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = a, this._$Cv = a?.isConnected ?? !0;
|
|
110
114
|
}
|
|
111
115
|
get parentNode() {
|
|
112
116
|
let e = this._$AA.parentNode;
|
|
@@ -129,26 +133,26 @@ class E {
|
|
|
129
133
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
130
134
|
}
|
|
131
135
|
_(e) {
|
|
132
|
-
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(v.createTextNode(e)), this._$AH = e;
|
|
133
137
|
}
|
|
134
138
|
$(e) {
|
|
135
|
-
const { values: t, _$litType$: i } = e,
|
|
136
|
-
if (this._$AH?._$AD ===
|
|
139
|
+
const { values: t, _$litType$: i } = e, a = 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 === a) this._$AH.p(t);
|
|
137
141
|
else {
|
|
138
|
-
const
|
|
139
|
-
|
|
142
|
+
const o = new ie(a, this), d = o.u(this.options);
|
|
143
|
+
o.p(t), this.T(d), this._$AH = o;
|
|
140
144
|
}
|
|
141
145
|
}
|
|
142
146
|
_$AC(e) {
|
|
143
|
-
let t =
|
|
144
|
-
return t === void 0 &&
|
|
147
|
+
let t = P.get(e.strings);
|
|
148
|
+
return t === void 0 && P.set(e.strings, t = new T(e)), t;
|
|
145
149
|
}
|
|
146
150
|
k(e) {
|
|
147
|
-
|
|
151
|
+
z(this._$AH) || (this._$AH = [], this._$AR());
|
|
148
152
|
const t = this._$AH;
|
|
149
|
-
let i,
|
|
150
|
-
for (const
|
|
151
|
-
|
|
153
|
+
let i, a = 0;
|
|
154
|
+
for (const o of e) a === t.length ? t.push(i = new M(this.O(N()), this.O(N()), this, this.options)) : i = t[a], i._$AI(o), a++;
|
|
155
|
+
a < t.length && (this._$AR(i && i._$AB.nextSibling, a), t.length = a);
|
|
152
156
|
}
|
|
153
157
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
154
158
|
for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
|
|
@@ -160,32 +164,32 @@ class E {
|
|
|
160
164
|
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
|
|
161
165
|
}
|
|
162
166
|
}
|
|
163
|
-
class
|
|
167
|
+
class E {
|
|
164
168
|
get tagName() {
|
|
165
169
|
return this.element.tagName;
|
|
166
170
|
}
|
|
167
171
|
get _$AU() {
|
|
168
172
|
return this._$AM._$AU;
|
|
169
173
|
}
|
|
170
|
-
constructor(e, t, i,
|
|
171
|
-
this.type = 1, this._$AH = l, this._$AN = void 0, this.element = e, this.name = t, this._$AM =
|
|
174
|
+
constructor(e, t, i, a, o) {
|
|
175
|
+
this.type = 1, this._$AH = l, this._$AN = void 0, this.element = e, this.name = t, this._$AM = a, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = l;
|
|
172
176
|
}
|
|
173
|
-
_$AI(e, t = this, i,
|
|
174
|
-
const
|
|
177
|
+
_$AI(e, t = this, i, a) {
|
|
178
|
+
const o = this.strings;
|
|
175
179
|
let d = !1;
|
|
176
|
-
if (
|
|
180
|
+
if (o === void 0) e = x(this, e, t, 0), d = !C(e) || e !== this._$AH && e !== k, d && (this._$AH = e);
|
|
177
181
|
else {
|
|
178
182
|
const g = e;
|
|
179
183
|
let r, c;
|
|
180
|
-
for (e =
|
|
184
|
+
for (e = o[0], r = 0; r < o.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 ?? "") + o[r + 1]), this._$AH[r] = c;
|
|
181
185
|
}
|
|
182
|
-
d && !
|
|
186
|
+
d && !a && this.j(e);
|
|
183
187
|
}
|
|
184
188
|
j(e) {
|
|
185
189
|
e === l ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
186
190
|
}
|
|
187
191
|
}
|
|
188
|
-
class
|
|
192
|
+
class ae extends E {
|
|
189
193
|
constructor() {
|
|
190
194
|
super(...arguments), this.type = 3;
|
|
191
195
|
}
|
|
@@ -193,7 +197,7 @@ class se extends M {
|
|
|
193
197
|
this.element[this.name] = e === l ? void 0 : e;
|
|
194
198
|
}
|
|
195
199
|
}
|
|
196
|
-
class
|
|
200
|
+
class oe extends E {
|
|
197
201
|
constructor() {
|
|
198
202
|
super(...arguments), this.type = 4;
|
|
199
203
|
}
|
|
@@ -201,14 +205,14 @@ class ae extends M {
|
|
|
201
205
|
this.element.toggleAttribute(this.name, !!e && e !== l);
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
|
-
class
|
|
205
|
-
constructor(e, t, i,
|
|
206
|
-
super(e, t, i,
|
|
208
|
+
class se extends E {
|
|
209
|
+
constructor(e, t, i, a, o) {
|
|
210
|
+
super(e, t, i, a, o), this.type = 5;
|
|
207
211
|
}
|
|
208
212
|
_$AI(e, t = this) {
|
|
209
213
|
if ((e = x(this, e, t, 0) ?? l) === k) return;
|
|
210
|
-
const i = this._$AH,
|
|
211
|
-
|
|
214
|
+
const i = this._$AH, a = e === l && i !== l || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== l && (i === l || a);
|
|
215
|
+
a && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
212
216
|
}
|
|
213
217
|
handleEvent(e) {
|
|
214
218
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
@@ -225,14 +229,14 @@ class de {
|
|
|
225
229
|
x(this, e);
|
|
226
230
|
}
|
|
227
231
|
}
|
|
228
|
-
const re =
|
|
229
|
-
re?.(T,
|
|
232
|
+
const re = O.litHtmlPolyfillSupport;
|
|
233
|
+
re?.(T, M), (O.litHtmlVersions ??= []).push("3.3.1");
|
|
230
234
|
/**
|
|
231
235
|
* @license
|
|
232
236
|
* Copyright 2017 Google LLC
|
|
233
237
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
234
238
|
*/
|
|
235
|
-
const ne = { CHILD: 2 }, le = (
|
|
239
|
+
const ne = { CHILD: 2 }, le = (s) => (...e) => ({ _$litDirective$: s, values: e });
|
|
236
240
|
class ce {
|
|
237
241
|
constructor(e) {
|
|
238
242
|
}
|
|
@@ -254,7 +258,7 @@ class ce {
|
|
|
254
258
|
* Copyright 2017 Google LLC
|
|
255
259
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
256
260
|
*/
|
|
257
|
-
class
|
|
261
|
+
class I extends ce {
|
|
258
262
|
constructor(e) {
|
|
259
263
|
if (super(e), this.it = l, e.type !== ne.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
260
264
|
}
|
|
@@ -268,12 +272,12 @@ class B extends ce {
|
|
|
268
272
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
269
273
|
}
|
|
270
274
|
}
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
var he = Object.defineProperty, u = (
|
|
274
|
-
for (var
|
|
275
|
-
(d = o
|
|
276
|
-
return
|
|
275
|
+
I.directiveName = "unsafeHTML", I.resultType = 1;
|
|
276
|
+
const B = le(I);
|
|
277
|
+
var he = Object.defineProperty, u = (s, e, t, i) => {
|
|
278
|
+
for (var a = void 0, o = s.length - 1, d; o >= 0; o--)
|
|
279
|
+
(d = s[o]) && (a = d(e, t, a) || a);
|
|
280
|
+
return a && he(e, t, a), a;
|
|
277
281
|
};
|
|
278
282
|
class m extends K {
|
|
279
283
|
/**
|
|
@@ -299,7 +303,7 @@ class m extends K {
|
|
|
299
303
|
</div>
|
|
300
304
|
`,
|
|
301
305
|
href: "https://courses.bradfrost.com/enroll/3584706?price_id=4519547",
|
|
302
|
-
buttonText: "buy
|
|
306
|
+
buttonText: "buy for $1000"
|
|
303
307
|
},
|
|
304
308
|
{
|
|
305
309
|
imgSrc: "/images/subatomic-atomic-bundle.png",
|
|
@@ -312,7 +316,7 @@ class m extends K {
|
|
|
312
316
|
</p>
|
|
313
317
|
`,
|
|
314
318
|
href: "https://courses.bradfrost.com/enroll/3449097?price_id=4366498",
|
|
315
|
-
buttonText: "buy
|
|
319
|
+
buttonText: "buy for $500"
|
|
316
320
|
}
|
|
317
321
|
], this.courses = [
|
|
318
322
|
{
|
|
@@ -420,7 +424,7 @@ class m extends K {
|
|
|
420
424
|
"ed-c-black-friday-modal--backdrop": this.hasBackdrop,
|
|
421
425
|
"ed-c-black-friday-modal--inactive": !this.isActive
|
|
422
426
|
});
|
|
423
|
-
return
|
|
427
|
+
return A`
|
|
424
428
|
<dialog
|
|
425
429
|
aria-labelledby="black-friday-modal-heading"
|
|
426
430
|
class="${e}"
|
|
@@ -437,7 +441,7 @@ class m extends K {
|
|
|
437
441
|
<ed-heading id="black-friday-modal-heading" tagName="h2" variant="display-lg" class="ed-u-display-block ed-u-margin-bottom-sm"
|
|
438
442
|
><span class="ed-c-black-friday-modal__header-content-title">${this.heading}</span></ed-heading
|
|
439
443
|
>
|
|
440
|
-
<div class="ed-c-black-friday-modal__header-content-description">${
|
|
444
|
+
<div class="ed-c-black-friday-modal__header-content-description">${B(this.description)}</div>
|
|
441
445
|
</ed-layout-container>
|
|
442
446
|
</div>
|
|
443
447
|
</div>
|
|
@@ -450,22 +454,22 @@ class m extends K {
|
|
|
450
454
|
<ed-layout-container>
|
|
451
455
|
<ed-grid gap="lg" class="ed-c-black-friday-modal__promos">
|
|
452
456
|
${this.promos.map(
|
|
453
|
-
(t) =>
|
|
457
|
+
(t) => A`
|
|
454
458
|
<ed-grid-item>
|
|
455
459
|
<div class="ed-c-black-friday-modal__card">
|
|
456
460
|
<div class="ed-c-black-friday-modal__card-body">
|
|
457
|
-
${t.href ?
|
|
461
|
+
${t.href ? A`
|
|
458
462
|
<a class="ed-c-black-friday-modal__card-media" href="${t.href}">
|
|
459
463
|
<img class="ed-c-black-friday-modal__card-image" src="${t.imgSrc}" alt="${t.imgAlt}" />
|
|
460
464
|
</a>
|
|
461
|
-
` :
|
|
465
|
+
` : A` <img class="ed-c-black-friday-modal__card-image" src="${t.imgSrc}" alt="${t.imgAlt}" /> `}
|
|
462
466
|
<ed-heading tagName="h4" variant="title-lg" class="ed-c-black-friday-modal__card-title">${t.heading}</ed-heading>
|
|
463
467
|
|
|
464
|
-
<ed-text-passage class="ed-
|
|
468
|
+
<ed-text-passage class="ed-c-black-friday-modal__card-description"> ${B(t.description)} </ed-text-passage>
|
|
465
469
|
</div>
|
|
466
|
-
${t.href && t.buttonText ?
|
|
470
|
+
${t.href && t.buttonText ? A`
|
|
467
471
|
<footer class="ed-c-black-friday-modal__card-footer">
|
|
468
|
-
<ed-button href="${t.href}" size="lg">${t.buttonText}</ed-button>
|
|
472
|
+
<ed-button href="${t.href}" size="lg">${B(t.buttonText)}</ed-button>
|
|
469
473
|
</footer>
|
|
470
474
|
` : ""}
|
|
471
475
|
</div>
|
|
@@ -476,7 +480,7 @@ class m extends K {
|
|
|
476
480
|
<ed-heading tagName="h3" variant="headline-default" class="ed-c-black-friday-modal__section-title">${this.secondaryHeading}</ed-heading>
|
|
477
481
|
<ed-grid variant="${this.courses.length >= 3 ? "1-3up" : this.courses.length > 2 ? "2up" : "side-by-side"}">
|
|
478
482
|
${this.courses.map(
|
|
479
|
-
(t) =>
|
|
483
|
+
(t) => A`
|
|
480
484
|
<ed-grid-item>
|
|
481
485
|
<div class="ed-c-black-friday-modal__card">
|
|
482
486
|
<div class="ed-c-black-friday-modal__card-body">
|
|
@@ -490,6 +494,9 @@ class m extends K {
|
|
|
490
494
|
`
|
|
491
495
|
)}
|
|
492
496
|
</ed-grid>
|
|
497
|
+
<div class="ed-c-black-friday-modal__cta">
|
|
498
|
+
<ed-button @click=${this.closeModal} size="lg">close this window</ed-button>
|
|
499
|
+
</div>
|
|
493
500
|
</ed-layout-container>
|
|
494
501
|
</div>
|
|
495
502
|
</dialog>
|