@scrippsproduct/networks-ui-library 2.0.0 → 2.0.1-dev.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.
Files changed (34) hide show
  1. package/dist/ResultsTable.module-CRGWj4fD.mjs +14 -0
  2. package/dist/assets/ActionButton.css +1 -1
  3. package/dist/assets/AdBlock.css +1 -1
  4. package/dist/assets/BasicGridModule.css +1 -1
  5. package/dist/assets/DateNavigation.css +1 -1
  6. package/dist/assets/DrawerNavigation.css +1 -1
  7. package/dist/assets/GenericList.css +1 -1
  8. package/dist/assets/InfoPanel.css +1 -1
  9. package/dist/assets/Loading.css +1 -1
  10. package/dist/assets/LoadingV2.css +1 -1
  11. package/dist/assets/ModalContainer.css +1 -1
  12. package/dist/assets/Overlay.css +1 -1
  13. package/dist/assets/ResultsTable.css +1 -1
  14. package/dist/assets/ScheduleList.css +1 -1
  15. package/dist/assets/ShowAboutLayout.css +1 -1
  16. package/dist/components/ActionButton/ActionButton.js +69 -68
  17. package/dist/components/AdBlock/AdBlock.js +140 -137
  18. package/dist/components/BasicGridModule/BasicGridModule.js +79 -59
  19. package/dist/components/BasicGridModule/BasicGridModule.test.js +72 -62
  20. package/dist/components/DateNavigation/DateNavigation.js +45 -45
  21. package/dist/components/DrawerNavigation/DrawerNavigation.js +30 -30
  22. package/dist/components/GenericList/GenericList.js +16 -16
  23. package/dist/components/InfoPanel/InfoPanel.js +30 -35
  24. package/dist/components/Loading/Loading.js +17 -17
  25. package/dist/components/LoadingV2/LoadingV2.js +21 -21
  26. package/dist/components/ModalContainer/ModalContainer.js +25 -25
  27. package/dist/components/Overlay/Overlay.js +1 -1
  28. package/dist/components/ResultsTable/ResultsTable.js +1 -1
  29. package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
  30. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +1 -1
  31. package/dist/components/ScheduleList/ScheduleList.js +124 -123
  32. package/dist/components/ShowAboutLayout/ShowAboutLayout.js +9 -9
  33. package/package.json +1 -1
  34. package/dist/ResultsTable.module-DrBmF9XB.mjs +0 -14
@@ -1,51 +1,51 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
2
  import { p as o } from "../../index-5kXULIVv.mjs";
3
3
  import { classes as t } from "../../utils/helpers.js";
4
- import '../../assets/GenericList.css';const n = {
5
- "generic-list": "_generic-list_ivani_247",
6
- "generic-list__item": "_generic-list__item_ivani_254"
4
+ import '../../assets/GenericList.css';const s = {
5
+ "generic-list": "_generic-list_15mbm_257",
6
+ "generic-list__item": "_generic-list__item_15mbm_264"
7
7
  };
8
- function m({
8
+ function u({
9
9
  list: c = [],
10
10
  type: _ = "unordered",
11
11
  classname: e = ""
12
12
  }) {
13
- const s = () => c.map((i, l) => /* @__PURE__ */ r(
13
+ const n = () => c.map((r, l) => /* @__PURE__ */ i(
14
14
  "li",
15
15
  {
16
16
  className: t([
17
- n["generic-list__item"],
17
+ s["generic-list__item"],
18
18
  "generic-list__item",
19
19
  `${e}__item`
20
20
  ]),
21
- children: typeof i == "string" && i !== "" ? o(i) : i
21
+ children: typeof r == "string" && r !== "" ? o(r) : r
22
22
  },
23
23
  e === "" ? `generic-list-${l}` : `${e}-${l}`
24
24
  ));
25
- return _ === "unordered" ? /* @__PURE__ */ r(
25
+ return _ === "unordered" ? /* @__PURE__ */ i(
26
26
  "ul",
27
27
  {
28
28
  className: t([
29
- n["generic-list"],
29
+ s["generic-list"],
30
30
  "generic-list",
31
31
  `${e}`
32
32
  ]),
33
- children: s()
33
+ children: n()
34
34
  }
35
- ) : /* @__PURE__ */ r(
35
+ ) : /* @__PURE__ */ i(
36
36
  "ol",
37
37
  {
38
38
  className: t([
39
- n["generic-list"],
39
+ s["generic-list"],
40
40
  "generic-list",
41
41
  "generic-list--ordered",
42
42
  `${e}`
43
43
  ]),
44
- children: s()
44
+ children: n()
45
45
  }
46
46
  );
47
47
  }
48
48
  export {
49
- m as GenericList,
50
- m as default
49
+ u as GenericList,
50
+ u as default
51
51
  };
@@ -1,66 +1,61 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
- import { useState as _, useRef as d, useEffect as m } from "react";
3
- import { classes as i } from "../../utils/helpers.js";
1
+ import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
+ import { useState as k, useRef as _, useEffect as v } from "react";
3
+ import { classes as a } from "../../utils/helpers.js";
4
4
  import { blockLayoutsMap as h } from "../../settings.js";
5
- import { C as y } from "../../chevron-left-D0UjbrKw.mjs";
6
- import '../../assets/InfoPanel.css';const l = {
7
- "info-panel": "_info-panel_1y84b_247",
8
- "info-panel__back-btn": "_info-panel__back-btn_1y84b_265"
5
+ import { C as b } from "../../chevron-left-D0UjbrKw.mjs";
6
+ import '../../assets/InfoPanel.css';const r = {
7
+ "info-panel": "_info-panel_1e189_257",
8
+ "info-panel__back-btn": "_info-panel__back-btn_1e189_276"
9
9
  };
10
- function R({
11
- layoutComponent: e = { layout: "", props: {} },
10
+ function E({
11
+ layoutComponent: i = { layout: "", props: {} },
12
12
  onBackClicked: s = () => {
13
13
  },
14
- backButtonLabel: c = "Back to List",
15
- classname: k = ""
14
+ backButtonLabel: l = "Back to List",
15
+ classname: d = ""
16
16
  }) {
17
- const [f, L] = _(null), [t, u] = _("entering"), n = d(null), p = d(null), b = (o) => {
18
- p.current = o, u("exiting"), n.current !== null && n.current.scrollTo({
17
+ const c = h.get(i.layout), [t, f] = k("entering"), n = _(null), u = _(null), p = (m) => {
18
+ u.current = m, f("exiting"), n.current !== null && n.current.scrollTo({
19
19
  top: n.current.offsetTop,
20
20
  left: 0,
21
21
  behavior: "instant"
22
22
  });
23
23
  };
24
- return m(() => {
25
- async function o() {
26
- L(h.get(e.layout));
27
- }
28
- o();
29
- }, [e.layout]), m(() => {
24
+ return v(() => {
30
25
  n.current !== null && (t === "exiting" && n.current.addEventListener("animationend", () => {
31
- s(p.current);
26
+ s(u.current);
32
27
  }, { once: !0 }), t === "entering" && n.current.addEventListener("animationend", () => {
33
- u("idle");
28
+ f("idle");
34
29
  }, { once: !0 }));
35
- }, [t, s]), /* @__PURE__ */ a("div", { className: i([l["info-panel"], `${k}`]), "data-state": t, ref: n, children: [
36
- /* @__PURE__ */ a(
30
+ }, [t, s]), /* @__PURE__ */ e("div", { className: a([r["info-panel"], `${d}`]), "data-state": t, ref: n, children: [
31
+ /* @__PURE__ */ e(
37
32
  "button",
38
33
  {
39
- className: i([l["info-panel__back-btn"], "info-panel__back-btn"]),
34
+ className: a([r["info-panel__back-btn"], "info-panel__back-btn"]),
40
35
  type: "button",
41
- onClick: b,
36
+ onClick: p,
42
37
  children: [
43
- /* @__PURE__ */ r(y, {}),
44
- c
38
+ /* @__PURE__ */ o(b, {}),
39
+ l
45
40
  ]
46
41
  }
47
42
  ),
48
- f !== null && /* @__PURE__ */ r(f, { ...e.props }),
49
- /* @__PURE__ */ a(
43
+ c !== void 0 && /* @__PURE__ */ o(c, { ...i.props }),
44
+ /* @__PURE__ */ e(
50
45
  "button",
51
46
  {
52
- className: i([l["info-panel__back-btn"], "info-panel__back-btn"]),
47
+ className: a([r["info-panel__back-btn"], "info-panel__back-btn"]),
53
48
  type: "button",
54
- onClick: b,
49
+ onClick: p,
55
50
  children: [
56
- /* @__PURE__ */ r(y, {}),
57
- c
51
+ /* @__PURE__ */ o(b, {}),
52
+ l
58
53
  ]
59
54
  }
60
55
  )
61
56
  ] });
62
57
  }
63
58
  export {
64
- R as InfoPanel,
65
- R as default
59
+ E as InfoPanel,
60
+ E as default
66
61
  };
@@ -1,25 +1,25 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { classes as t } from "../../utils/helpers.js";
3
- import '../../assets/Loading.css';const l = "_spinner_1fzep_260", r = {
4
- "spinner-wrap": "_spinner-wrap_1fzep_260",
5
- spinner: l,
6
- "loading-wrapper__message": "_loading-wrapper__message_1fzep_283"
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { classes as o } from "../../utils/helpers.js";
3
+ import '../../assets/Loading.css';const t = "_spinner_u3lm4_270", r = {
4
+ "spinner-wrap": "_spinner-wrap_u3lm4_270",
5
+ spinner: t,
6
+ "loading-wrapper__message": "_loading-wrapper__message_u3lm4_293"
7
7
  };
8
- function c({
8
+ function m({
9
9
  spinnerColor: s = "var(--theme-color-100)",
10
- spinnerSize: p = "3.125rem",
11
- spinnerTrackWidth: a = "6px",
12
- topOffset: i = "50%",
10
+ spinnerSize: a = "3.125rem",
11
+ spinnerTrackWidth: i = "6px",
12
+ topOffset: p = "50%",
13
13
  message: n = ""
14
14
  }) {
15
- return /* @__PURE__ */ o(
15
+ return /* @__PURE__ */ l(
16
16
  "loading-wrapper",
17
17
  {
18
18
  style: {
19
- "--spinner-size": p,
20
- "--spinner-track-width": a,
19
+ "--spinner-size": a,
20
+ "--spinner-track-width": i,
21
21
  "--spinner-color": s,
22
- "--spinner-top-offset": i
22
+ "--spinner-top-offset": p
23
23
  },
24
24
  children: [
25
25
  /* @__PURE__ */ e(
@@ -30,12 +30,12 @@ function c({
30
30
  children: /* @__PURE__ */ e("div", { className: r.spinner })
31
31
  }
32
32
  ),
33
- n !== "" && /* @__PURE__ */ e("div", { className: t([r["loading-wrapper__message"], "loading-wrapper__message"]), children: n })
33
+ n !== "" && /* @__PURE__ */ e("div", { className: o([r["loading-wrapper__message"], "loading-wrapper__message"]), children: n })
34
34
  ]
35
35
  }
36
36
  );
37
37
  }
38
38
  export {
39
- c as Loading,
40
- c as default
39
+ m as Loading,
40
+ m as default
41
41
  };
@@ -1,44 +1,44 @@
1
- import { jsx as s, jsxs as e } from "react/jsx-runtime";
2
- import { classes as p } from "../../utils/helpers.js";
3
- import '../../assets/LoadingV2.css';const l = "_spinner_sp1rs_257", t = "_spinner__wrapper_sp1rs_266", c = "_spinner__left_sp1rs_300", o = "_spinner__right_sp1rs_304", m = "_spinner__anim_sp1rs_308", n = {
4
- "loading-wrapper": "_loading-wrapper_sp1rs_247",
5
- spinner: l,
6
- spinner__wrapper: t,
7
- "spinner--pie": "_spinner--pie_sp1rs_284",
8
- "spinner--ring": "_spinner--ring_sp1rs_288",
9
- spinner__left: c,
10
- spinner__right: o,
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { classes as _ } from "../../utils/helpers.js";
3
+ import '../../assets/LoadingV2.css';const o = "_spinner_1aob8_267", l = "_spinner__wrapper_1aob8_276", t = "_spinner__left_1aob8_310", c = "_spinner__right_1aob8_314", m = "_spinner__anim_1aob8_318", n = {
4
+ "loading-wrapper": "_loading-wrapper_1aob8_257",
5
+ spinner: o,
6
+ spinner__wrapper: l,
7
+ "spinner--pie": "_spinner--pie_1aob8_294",
8
+ "spinner--ring": "_spinner--ring_1aob8_298",
9
+ spinner__left: t,
10
+ spinner__right: c,
11
11
  spinner__anim: m,
12
- "loading-wrapper__message": "_loading-wrapper__message_sp1rs_340"
12
+ "loading-wrapper__message": "_loading-wrapper__message_1aob8_350"
13
13
  };
14
14
  function w({
15
- width: _ = "3rem",
16
- topOffset: i = "50%",
15
+ width: i = "3rem",
16
+ topOffset: p = "50%",
17
17
  message: r = "",
18
18
  type: a = "ring"
19
19
  }) {
20
- return /* @__PURE__ */ s(
20
+ return /* @__PURE__ */ e(
21
21
  "div",
22
22
  {
23
23
  className: n["loading-wrapper"],
24
24
  style: {
25
- "--spinner-top-offset": i
25
+ "--spinner-top-offset": p
26
26
  },
27
- children: /* @__PURE__ */ e("div", { className: n.spinner, style: { "--spinner-width": _ }, children: [
28
- /* @__PURE__ */ e(
27
+ children: /* @__PURE__ */ s("div", { className: n.spinner, style: { "--spinner-width": i }, children: [
28
+ /* @__PURE__ */ s(
29
29
  "div",
30
30
  {
31
- className: p([
31
+ className: _([
32
32
  n.spinner__wrapper,
33
33
  a === "pie" ? n["spinner--pie"] : n["spinner--ring"]
34
34
  ]),
35
35
  children: [
36
- /* @__PURE__ */ s("span", { className: n.spinner__left, children: /* @__PURE__ */ s("span", { className: n.spinner__anim }) }),
37
- /* @__PURE__ */ s("span", { className: n.spinner__right, children: /* @__PURE__ */ s("span", { className: n.spinner__anim }) })
36
+ /* @__PURE__ */ e("span", { className: n.spinner__left, children: /* @__PURE__ */ e("span", { className: n.spinner__anim }) }),
37
+ /* @__PURE__ */ e("span", { className: n.spinner__right, children: /* @__PURE__ */ e("span", { className: n.spinner__anim }) })
38
38
  ]
39
39
  }
40
40
  ),
41
- r !== "" && /* @__PURE__ */ s("div", { className: p([n["loading-wrapper__message"], "loading-wrapper__message"]), children: r })
41
+ r !== "" && /* @__PURE__ */ e("div", { className: _([n["loading-wrapper__message"], "loading-wrapper__message"]), children: r })
42
42
  ] })
43
43
  }
44
44
  );
@@ -1,13 +1,13 @@
1
- import { jsx as s, jsxs as k, Fragment as B } from "react/jsx-runtime";
2
- import { useState as i, useRef as x, useEffect as v, Suspense as M, Children as w, isValidElement as F, cloneElement as K } from "react";
3
- import { r as N } from "../../index-sxnwPHiC.mjs";
1
+ import { jsx as s, jsxs as k, Fragment as M } from "react/jsx-runtime";
2
+ import { useState as i, useRef as x, useEffect as v, Suspense as w, Children as F, isValidElement as K, cloneElement as N } from "react";
3
+ import { r as j } from "../../index-sxnwPHiC.mjs";
4
4
  import { classes as D } from "../../utils/helpers.js";
5
- import { blockLayoutsMap as j } from "../../settings.js";
6
- import { X as R } from "../../x-Ck9Vk5Fo.mjs";
7
- import '../../assets/ModalContainer.css';const T = "_modal_2e78q_247", C = {
8
- modal: T,
9
- "modal__close-btn": "_modal__close-btn_2e78q_294"
10
- }, V = (l) => {
5
+ import { blockLayoutsMap as q } from "../../settings.js";
6
+ import { X as z } from "../../x-Ck9Vk5Fo.mjs";
7
+ import '../../assets/ModalContainer.css';const R = "_modal_2za1i_257", C = {
8
+ modal: R,
9
+ "modal__close-btn": "_modal__close-btn_2za1i_304"
10
+ }, T = (l) => {
11
11
  if (!document.querySelector(`#${l}`)) {
12
12
  const n = document.createElement("div");
13
13
  n.setAttribute("id", l);
@@ -29,46 +29,46 @@ function J({
29
29
  e.close(), L(!1), _("entering"), u();
30
30
  }, 750);
31
31
  }, f = (e) => {
32
- t.current !== null && [...t.current.attributes].findIndex((c) => c.name === "open") !== -1 && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), E());
33
- }, q = (e) => {
32
+ t.current !== null && [...t.current.attributes].findIndex((a) => a.name === "open") !== -1 && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), E());
33
+ }, B = (e) => {
34
34
  e.target instanceof HTMLElement && e.target.classList.contains(`${C.modal}`) && E();
35
35
  };
36
- return V(n), v(() => {
36
+ return T(n), v(() => {
37
37
  const e = document.getElementById(n);
38
38
  if (!e) return;
39
39
  e.removeEventListener(
40
40
  `scripps:${n.replace(/-/g, "")}:change`,
41
41
  (r) => {
42
42
  const o = r;
43
- g(o.detail.componentProps), o.detail.forceOpen && y((a) => !a);
43
+ g(o.detail.componentProps), o.detail.forceOpen && y((c) => !c);
44
44
  }
45
45
  );
46
- async function c() {
47
- O(j.get(l));
46
+ async function a() {
47
+ O(q.get(l));
48
48
  }
49
- return l !== "" && c(), e.addEventListener(`scripps:${n.replace(/-/g, "")}:change`, (r) => {
49
+ return l !== "" && a(), e.addEventListener(`scripps:${n.replace(/-/g, "")}:change`, (r) => {
50
50
  const o = r;
51
- g(o.detail.componentProps), o.detail.forceOpen && y((a) => !a);
51
+ g(o.detail.componentProps), o.detail.forceOpen && y((c) => !c);
52
52
  }), () => {
53
53
  e.removeEventListener(`scripps:${n.replace(/-/g, "")}:change`, (r) => {
54
54
  const o = r;
55
- g(o.detail.componentProps), o.detail.forceOpen && y((a) => !a);
55
+ g(o.detail.componentProps), o.detail.forceOpen && y((c) => !c);
56
56
  });
57
57
  };
58
58
  }, [l, n]), v(() => {
59
59
  let e = null;
60
- const c = () => {
60
+ const a = () => {
61
61
  const r = setInterval(() => {
62
62
  t.current !== null && (clearInterval(r), e = t.current);
63
63
  }, 100);
64
64
  };
65
- return t.current === null && c(), () => {
65
+ return t.current === null && a(), () => {
66
66
  e == null || e.close();
67
67
  };
68
68
  }, [d]), v(() => {
69
69
  t.current !== null && [...t.current.attributes].findIndex((e) => e.name === "open") === -1 && m !== null && (t.current.showModal(), h.current && h.current.blur());
70
- }, [m, $]), N.createPortal(
71
- /* @__PURE__ */ s(M, { children: /* @__PURE__ */ k(
70
+ }, [m, $]), j.createPortal(
71
+ /* @__PURE__ */ s(w, { children: /* @__PURE__ */ k(
72
72
  "dialog",
73
73
  {
74
74
  "aria-label": b,
@@ -77,7 +77,7 @@ function J({
77
77
  "data-state": S,
78
78
  ref: t,
79
79
  onCancel: (e) => e.preventDefault(),
80
- onClick: q,
80
+ onClick: B,
81
81
  onKeyDown: f,
82
82
  onKeyUp: f,
83
83
  children: [
@@ -89,7 +89,7 @@ function J({
89
89
  handleClosing: f
90
90
  }
91
91
  ),
92
- p !== void 0 && /* @__PURE__ */ s(B, { children: w.map(p, (e) => F(e) ? K(e, {
92
+ p !== void 0 && /* @__PURE__ */ s(M, { children: F.map(p, (e) => K(e) ? N(e, {
93
93
  ...m,
94
94
  containerClosing: P,
95
95
  handleClosing: f
@@ -104,7 +104,7 @@ function J({
104
104
  onClick: E,
105
105
  children: [
106
106
  /* @__PURE__ */ s("span", { className: "sr-only", children: "close" }),
107
- /* @__PURE__ */ s("i", { children: /* @__PURE__ */ s(R, { height: "48", width: "48" }) })
107
+ /* @__PURE__ */ s("i", { children: /* @__PURE__ */ s(z, { height: "48", width: "48" }) })
108
108
  ]
109
109
  }
110
110
  )
@@ -1,7 +1,7 @@
1
1
  import { jsx as l, Fragment as s } from "react/jsx-runtime";
2
2
  import { useEffect as a } from "react";
3
3
  import { r as i } from "../../index-sxnwPHiC.mjs";
4
- import '../../assets/Overlay.css';const v = "_overlay_9zwh9_247", d = {
4
+ import '../../assets/Overlay.css';const v = "_overlay_1rr3t_257", d = {
5
5
  overlay: v
6
6
  };
7
7
  function p({
@@ -2,7 +2,7 @@ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import { classes as m } from "../../utils/helpers.js";
3
3
  import { ResultsTableBody as f } from "../ResultsTableBody/ResultsTableBody.js";
4
4
  import { ResultsTableHeader as i } from "../ResultsTableHeader/ResultsTableHeader.js";
5
- import { s as e } from "../../ResultsTable.module-DrBmF9XB.mjs";
5
+ import { s as e } from "../../ResultsTable.module-CRGWj4fD.mjs";
6
6
  function n({
7
7
  columns: s = [],
8
8
  results: l = [],
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, Fragment as m, jsxs as _ } from "react/jsx-runtime";
2
2
  import { classes as l } from "../../utils/helpers.js";
3
- import { s as e } from "../../ResultsTable.module-DrBmF9XB.mjs";
3
+ import { s as e } from "../../ResultsTable.module-CRGWj4fD.mjs";
4
4
  function c({ results: r = [], columns: u = [], noResultsMsg: b = "No results were returned" }) {
5
5
  return r.length > 0 ? /* @__PURE__ */ t(m, { children: r.map((a, i) => /* @__PURE__ */ t(
6
6
  "div",
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { classes as u } from "../../utils/helpers.js";
3
- import { s } from "../../ResultsTable.module-DrBmF9XB.mjs";
3
+ import { s } from "../../ResultsTable.module-CRGWj4fD.mjs";
4
4
  function h({ columns: a = [] }) {
5
5
  let t = [];
6
6
  const i = a.map((e, d) => {