@scrippsproduct/networks-ui-library 1.1.10-alpha.0 → 1.1.11-alpha.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/dist/ResultsTable.module-DqVv22tU.mjs +14 -0
- package/dist/assets/ActionButton.css +1 -1
- package/dist/assets/AdBlock.css +1 -1
- package/dist/assets/DateNavigation.css +1 -1
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/DrawerNavigation.css +1 -1
- package/dist/assets/InfoPanel.css +1 -1
- package/dist/assets/Loading.css +1 -1
- package/dist/assets/LoadingV2.css +1 -1
- package/dist/assets/ModalContainer.css +1 -1
- package/dist/assets/Overlay.css +1 -1
- package/dist/assets/PromotionBlock.css +1 -1
- package/dist/assets/ResultsTable.css +1 -1
- package/dist/assets/ScheduleList.css +1 -1
- package/dist/assets/ShowAboutLayout.css +1 -1
- package/dist/components/ActionButton/ActionButton.js +57 -38
- package/dist/components/AdBlock/AdBlock.js +157 -103
- package/dist/components/DateNavigation/DateNavigation.js +42 -42
- package/dist/components/DrawerNavigation/DrawerNavigation.js +28 -28
- package/dist/components/InfoPanel/InfoPanel.js +13 -13
- package/dist/components/Loading/Loading.js +8 -8
- package/dist/components/LoadingV2/LoadingV2.js +11 -11
- package/dist/components/ModalContainer/ModalContainer.js +10 -10
- package/dist/components/Overlay/Overlay.js +2 -2
- package/dist/components/PromotionBlock/PromotionBlock.js +24 -24
- package/dist/components/ResultsTable/ResultsTable.js +1 -1
- package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
- package/dist/components/ResultsTableHeader/ResultsTableHeader.js +1 -1
- package/dist/components/ScheduleList/ScheduleList.js +106 -88
- package/dist/components/ShowAboutLayout/ShowAboutLayout.js +9 -9
- package/package.json +2 -1
- package/dist/ResultsTable.module-wcNUQEKe.mjs +0 -14
|
@@ -1,137 +1,191 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import '../../assets/AdBlock.css';const
|
|
4
|
-
"ad-copy__description": "_ad-
|
|
5
|
-
"ad-copy__link": "_ad-
|
|
6
|
-
"ad-anchor": "_ad-
|
|
7
|
-
"ad-image": "_ad-
|
|
8
|
-
"ad-image__text": "_ad-
|
|
9
|
-
"ad-copy": "_ad-
|
|
10
|
-
"ad-image--animate": "_ad-image--
|
|
11
|
-
"promo-slide-in-left": "_promo-slide-in-
|
|
12
|
-
"ad-copy--animate": "_ad-copy--
|
|
13
|
-
"promo-slide-in-right": "_promo-slide-in-
|
|
14
|
-
"ad-copy__header": "_ad-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"ad-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"ad-
|
|
38
|
-
"ad-
|
|
39
|
-
"ad-image
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"ad-
|
|
45
|
-
"ad-
|
|
46
|
-
|
|
1
|
+
import { jsx as a, jsxs as l, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d, useCallback as b, useEffect as z } from "react";
|
|
3
|
+
import '../../assets/AdBlock.css';const $ = "_fade_1u14s_1", N = "_slidein_1u14s_1", T = "_slideout_1u14s_1", R = "_scale_1u14s_1", L = "_reveal_1u14s_1", w = "_hide_1u14s_1", h = {
|
|
4
|
+
"ad-copy__description": "_ad-copy__description_1u14s_244",
|
|
5
|
+
"ad-copy__link": "_ad-copy__link_1u14s_245",
|
|
6
|
+
"ad-anchor": "_ad-anchor_1u14s_267",
|
|
7
|
+
"ad-image": "_ad-image_1u14s_282",
|
|
8
|
+
"ad-image__text": "_ad-image__text_1u14s_309",
|
|
9
|
+
"ad-copy": "_ad-copy_1u14s_244",
|
|
10
|
+
"ad-image--animate": "_ad-image--animate_1u14s_320",
|
|
11
|
+
"promo-slide-in-left": "_promo-slide-in-left_1u14s_1",
|
|
12
|
+
"ad-copy--animate": "_ad-copy--animate_1u14s_327",
|
|
13
|
+
"promo-slide-in-right": "_promo-slide-in-right_1u14s_1",
|
|
14
|
+
"ad-copy__header": "_ad-copy__header_1u14s_335",
|
|
15
|
+
fade: $,
|
|
16
|
+
"fade-in": "_fade-in_1u14s_1",
|
|
17
|
+
"fade-out": "_fade-out_1u14s_1",
|
|
18
|
+
"page-fade-in": "_page-fade-in_1u14s_1",
|
|
19
|
+
"backdrop-reveal": "_backdrop-reveal_1u14s_1",
|
|
20
|
+
"slide-up": "_slide-up_1u14s_1",
|
|
21
|
+
slidein: N,
|
|
22
|
+
slideout: T,
|
|
23
|
+
scale: R,
|
|
24
|
+
reveal: L,
|
|
25
|
+
"reveal-overlay": "_reveal-overlay_1u14s_1",
|
|
26
|
+
hide: w,
|
|
27
|
+
"hide-overlay": "_hide-overlay_1u14s_1",
|
|
28
|
+
"rotate-full": "_rotate-full_1u14s_1",
|
|
29
|
+
"ui-spinner-rotate-left": "_ui-spinner-rotate-left_1u14s_1",
|
|
30
|
+
"ui-spinner-rotate-right": "_ui-spinner-rotate-right_1u14s_1",
|
|
31
|
+
"clip-path-open": "_clip-path-open_1u14s_1",
|
|
32
|
+
"clip-path-close": "_clip-path-close_1u14s_1"
|
|
33
|
+
}, M = "_fade_f8yz4_1", C = "_slidein_f8yz4_1", I = "_slideout_f8yz4_1", O = "_scale_f8yz4_1", j = "_reveal_f8yz4_1", A = "_hide_f8yz4_1", D = {
|
|
34
|
+
"ad-copy__link": "_ad-copy__link_f8yz4_253",
|
|
35
|
+
"ad-anchor": "_ad-anchor_f8yz4_272",
|
|
36
|
+
"ad-image": "_ad-image_f8yz4_297",
|
|
37
|
+
"ad-image__text": "_ad-image__text_f8yz4_314",
|
|
38
|
+
"ad-copy": "_ad-copy_f8yz4_253",
|
|
39
|
+
"ad-image--animate": "_ad-image--animate_f8yz4_333",
|
|
40
|
+
"promo-slide-in-left": "_promo-slide-in-left_f8yz4_1",
|
|
41
|
+
"ad-copy--animate": "_ad-copy--animate_f8yz4_340",
|
|
42
|
+
"promo-slide-in-right": "_promo-slide-in-right_f8yz4_1",
|
|
43
|
+
"ad-copy__header": "_ad-copy__header_f8yz4_348",
|
|
44
|
+
"ad-copy__description": "_ad-copy__description_f8yz4_360",
|
|
45
|
+
"ad-copy__link-text": "_ad-copy__link-text_f8yz4_361",
|
|
46
|
+
fade: M,
|
|
47
|
+
"fade-in": "_fade-in_f8yz4_1",
|
|
48
|
+
"fade-out": "_fade-out_f8yz4_1",
|
|
49
|
+
"page-fade-in": "_page-fade-in_f8yz4_1",
|
|
50
|
+
"backdrop-reveal": "_backdrop-reveal_f8yz4_1",
|
|
51
|
+
"slide-up": "_slide-up_f8yz4_1",
|
|
52
|
+
slidein: C,
|
|
53
|
+
slideout: I,
|
|
54
|
+
scale: O,
|
|
55
|
+
reveal: j,
|
|
56
|
+
"reveal-overlay": "_reveal-overlay_f8yz4_1",
|
|
57
|
+
hide: A,
|
|
58
|
+
"hide-overlay": "_hide-overlay_f8yz4_1",
|
|
59
|
+
"rotate-full": "_rotate-full_f8yz4_1",
|
|
60
|
+
"ui-spinner-rotate-left": "_ui-spinner-rotate-left_f8yz4_1",
|
|
61
|
+
"ui-spinner-rotate-right": "_ui-spinner-rotate-right_f8yz4_1",
|
|
62
|
+
"clip-path-open": "_clip-path-open_f8yz4_1",
|
|
63
|
+
"clip-path-close": "_clip-path-close_f8yz4_1"
|
|
64
|
+
}, E = "_fade_xxfyo_1", B = "_slidein_xxfyo_1", F = "_slideout_xxfyo_1", P = "_scale_xxfyo_1", q = "_reveal_xxfyo_1", G = "_hide_xxfyo_1", H = {
|
|
65
|
+
"ad-anchor": "_ad-anchor_xxfyo_262",
|
|
66
|
+
"ad-copy__link": "_ad-copy__link_xxfyo_273",
|
|
67
|
+
"background-container": "_background-container_xxfyo_277",
|
|
68
|
+
"ad-copy": "_ad-copy_xxfyo_273",
|
|
69
|
+
"ad-copy__header": "_ad-copy__header_xxfyo_293",
|
|
70
|
+
"ad-copy__description": "_ad-copy__description_xxfyo_303",
|
|
71
|
+
"cta-container": "_cta-container_xxfyo_314",
|
|
72
|
+
"cta-container__link": "_cta-container__link_xxfyo_325",
|
|
73
|
+
"ad-image": "_ad-image_xxfyo_344",
|
|
74
|
+
"ad-image__text": "_ad-image__text_xxfyo_363",
|
|
75
|
+
"ad-image-mobile": "_ad-image-mobile_xxfyo_373",
|
|
76
|
+
"ad-image--animate": "_ad-image--animate_xxfyo_474",
|
|
77
|
+
"promo-slide-in-right": "_promo-slide-in-right_xxfyo_1",
|
|
78
|
+
"ad-copy--animate": "_ad-copy--animate_xxfyo_481",
|
|
79
|
+
"promo-slide-in-left": "_promo-slide-in-left_xxfyo_1",
|
|
80
|
+
"ad-cta--animate": "_ad-cta--animate_xxfyo_488",
|
|
81
|
+
"ad-mobile-disclaimer--animate": "_ad-mobile-disclaimer--animate_xxfyo_502",
|
|
82
|
+
fade: E,
|
|
83
|
+
"fade-in": "_fade-in_xxfyo_1",
|
|
84
|
+
"fade-out": "_fade-out_xxfyo_1",
|
|
85
|
+
"page-fade-in": "_page-fade-in_xxfyo_1",
|
|
86
|
+
"backdrop-reveal": "_backdrop-reveal_xxfyo_1",
|
|
87
|
+
"slide-up": "_slide-up_xxfyo_1",
|
|
88
|
+
slidein: B,
|
|
89
|
+
slideout: F,
|
|
90
|
+
scale: P,
|
|
91
|
+
reveal: q,
|
|
92
|
+
"reveal-overlay": "_reveal-overlay_xxfyo_1",
|
|
93
|
+
hide: G,
|
|
94
|
+
"hide-overlay": "_hide-overlay_xxfyo_1",
|
|
95
|
+
"rotate-full": "_rotate-full_xxfyo_1",
|
|
96
|
+
"ui-spinner-rotate-left": "_ui-spinner-rotate-left_xxfyo_1",
|
|
97
|
+
"ui-spinner-rotate-right": "_ui-spinner-rotate-right_xxfyo_1",
|
|
98
|
+
"clip-path-open": "_clip-path-open_xxfyo_1",
|
|
99
|
+
"clip-path-close": "_clip-path-close_xxfyo_1"
|
|
100
|
+
}, J = {
|
|
47
101
|
"ad-anchor": "_ad-anchor_1kpgs_1",
|
|
48
102
|
"cta-container__link": "_cta-container__link_1kpgs_11"
|
|
49
103
|
};
|
|
50
|
-
function
|
|
51
|
-
const
|
|
52
|
-
["default",
|
|
53
|
-
["round2",
|
|
54
|
-
["tablotv",
|
|
55
|
-
["imageonly",
|
|
56
|
-
])).get(
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
60
|
-
if (
|
|
61
|
-
s.current.classList.add(`${
|
|
104
|
+
function U({ image: i, ad: _, theme: t = "default" }) {
|
|
105
|
+
const e = (/* @__PURE__ */ new Map([
|
|
106
|
+
["default", h],
|
|
107
|
+
["round2", D],
|
|
108
|
+
["tablotv", H],
|
|
109
|
+
["imageonly", J]
|
|
110
|
+
])).get(t) ?? h, x = _.campaign === "" ? "" : `?utm_campaign=${_.campaign}&utm_source=${_.source}&utm_medium=${_.medium}&utm_content=${_.content}`, s = d(null), o = d(null), n = d(null), f = d(null), y = d(null), p = d(null), c = `${_.href}${x}`, u = b((r, g) => {
|
|
111
|
+
r.forEach((v) => {
|
|
112
|
+
var m;
|
|
113
|
+
if (v.isIntersecting) {
|
|
114
|
+
if (t === "tablotv" && (n.current !== null && ((m = n.current) == null || m.classList.add(`${e["ad-cta--animate"]}`)), p.current !== null && p.current.classList.add(`${e["ad-mobile-disclaimer--animate"]}`)), s.current === null || o.current === null) return;
|
|
115
|
+
s.current.classList.add(`${e["ad-copy--animate"]}`), o.current.classList.add(`${e["ad-image--animate"]}`), g.unobserve(o.current);
|
|
62
116
|
}
|
|
63
117
|
});
|
|
64
|
-
}, [
|
|
65
|
-
return
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
118
|
+
}, [e, t]);
|
|
119
|
+
return z(() => {
|
|
120
|
+
if (t !== "imageonly") {
|
|
121
|
+
const r = new IntersectionObserver(u, {
|
|
68
122
|
root: null,
|
|
69
123
|
rootMargin: "0px",
|
|
70
124
|
threshold: 0.1
|
|
71
125
|
});
|
|
72
|
-
return
|
|
73
|
-
|
|
126
|
+
return r.observe(o.current), () => {
|
|
127
|
+
r.disconnect();
|
|
74
128
|
};
|
|
75
129
|
}
|
|
76
|
-
}, [
|
|
77
|
-
/* @__PURE__ */
|
|
130
|
+
}, [t, u]), // onClick - ensure tab isn't opened twice if clicking directly on the cta
|
|
131
|
+
/* @__PURE__ */ a(
|
|
78
132
|
"ad-block",
|
|
79
133
|
{
|
|
80
|
-
class: `${
|
|
81
|
-
onClick: (
|
|
82
|
-
(
|
|
134
|
+
class: `${e["ad-anchor"]}`,
|
|
135
|
+
onClick: (r) => {
|
|
136
|
+
(r.target === n.current || r.target === f.current || r.target === y.current) && r.preventDefault(), window.open(n.current, "_blank");
|
|
83
137
|
},
|
|
84
|
-
children:
|
|
138
|
+
children: t === "imageonly" ? /* @__PURE__ */ a(
|
|
85
139
|
"a",
|
|
86
140
|
{
|
|
87
|
-
className:
|
|
88
|
-
href:
|
|
89
|
-
ref:
|
|
141
|
+
className: e["cta-container__link"],
|
|
142
|
+
href: c,
|
|
143
|
+
ref: n,
|
|
90
144
|
rel: "noreferrer",
|
|
91
145
|
target: "_blank",
|
|
92
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ a("span", { className: "sr-only", children: i.text })
|
|
93
147
|
}
|
|
94
|
-
) :
|
|
95
|
-
/* @__PURE__ */ l("div", { className:
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
148
|
+
) : t === "tablotv" ? /* @__PURE__ */ l("div", { className: e["background-container"], children: [
|
|
149
|
+
/* @__PURE__ */ l("div", { className: e["ad-copy"], ref: s, children: [
|
|
150
|
+
/* @__PURE__ */ a("h4", { className: e["ad-copy__header"], children: _.header }),
|
|
151
|
+
/* @__PURE__ */ a("div", { className: e["ad-image-mobile"], ref: o, children: /* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href: c, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ a("img", { alt: i.altText, ref: y, src: i.mobile }) }) }) }),
|
|
152
|
+
/* @__PURE__ */ a("p", { className: e["ad-copy__description"], children: _.description })
|
|
99
153
|
] }),
|
|
100
|
-
/* @__PURE__ */ l("div", { className:
|
|
101
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ l("div", { className: e["cta-container"], children: [
|
|
155
|
+
/* @__PURE__ */ a(
|
|
102
156
|
"a",
|
|
103
157
|
{
|
|
104
|
-
className:
|
|
105
|
-
href:
|
|
106
|
-
ref:
|
|
158
|
+
className: e["cta-container__link"],
|
|
159
|
+
href: c,
|
|
160
|
+
ref: n,
|
|
107
161
|
rel: "noreferrer",
|
|
108
162
|
target: "_blank",
|
|
109
|
-
children:
|
|
163
|
+
children: _.linkText
|
|
110
164
|
}
|
|
111
165
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ a("span", { className: e["ad-image__text"], ref: p, children: i.text })
|
|
113
167
|
] }),
|
|
114
|
-
/* @__PURE__ */ l("div", { className:
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ l("div", { className: e["ad-image"], ref: o, children: [
|
|
169
|
+
/* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href: c, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ a("img", { alt: i.altText, ref: f, src: i.url }) }) }),
|
|
170
|
+
/* @__PURE__ */ a("span", { className: e["ad-image__text"], children: i.text })
|
|
117
171
|
] })
|
|
118
|
-
] }) : /* @__PURE__ */ l(
|
|
119
|
-
/* @__PURE__ */ l("div", { className:
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
172
|
+
] }) : /* @__PURE__ */ l(k, { children: [
|
|
173
|
+
/* @__PURE__ */ l("div", { className: e["ad-image"], ref: o, children: [
|
|
174
|
+
/* @__PURE__ */ a("span", { className: e["ad-image__text"], children: i.text }),
|
|
175
|
+
/* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href: c, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ a("img", { alt: i.altText, ref: f, src: i.url }) }) })
|
|
122
176
|
] }),
|
|
123
|
-
/* @__PURE__ */ l("div", { className:
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ l("div", { className: e["ad-copy"], ref: s, children: [
|
|
178
|
+
/* @__PURE__ */ a("h4", { className: e["ad-copy__header"], children: _.header }),
|
|
179
|
+
/* @__PURE__ */ a("p", { className: e["ad-copy__description"], children: _.description }),
|
|
180
|
+
/* @__PURE__ */ a(
|
|
127
181
|
"a",
|
|
128
182
|
{
|
|
129
|
-
className:
|
|
130
|
-
href:
|
|
131
|
-
ref:
|
|
183
|
+
className: e["ad-copy__link"],
|
|
184
|
+
href: c,
|
|
185
|
+
ref: n,
|
|
132
186
|
rel: "noreferrer",
|
|
133
187
|
target: "_blank",
|
|
134
|
-
children:
|
|
188
|
+
children: _.linkText
|
|
135
189
|
}
|
|
136
190
|
)
|
|
137
191
|
] })
|
|
@@ -140,6 +194,6 @@ function M({ image: _, ad: r, theme: i = "default" }) {
|
|
|
140
194
|
);
|
|
141
195
|
}
|
|
142
196
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
197
|
+
U as AdBlock,
|
|
198
|
+
U as default
|
|
145
199
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as g, useReducer as
|
|
2
|
+
import { useState as g, useReducer as M, useRef as m, useCallback as S, useEffect as p } from "react";
|
|
3
3
|
import { f as s } from "../../format-YhWt2D8M.mjs";
|
|
4
4
|
import { classes as o } from "../../utils/helpers.js";
|
|
5
|
-
import { u as
|
|
6
|
-
import { C as
|
|
7
|
-
import { C as
|
|
8
|
-
import '../../assets/DateNavigation.css';const
|
|
9
|
-
"date-navigation__list": "_date-
|
|
10
|
-
"date-navigation__control": "_date-
|
|
11
|
-
"date-navigation__control--previous": "_date-navigation__control--
|
|
12
|
-
"date-navigation__control--next": "_date-navigation__control--
|
|
13
|
-
"date-navigation__item": "_date-
|
|
14
|
-
"date-navigation__day": "_date-
|
|
15
|
-
"date-navigation__month-day-break": "_date-navigation__month-day-
|
|
16
|
-
"date-navigation__weekday": "_date-
|
|
17
|
-
"date-navigation__date": "_date-
|
|
5
|
+
import { u as W } from "../../useScheduleContext-D7FdzNxe.mjs";
|
|
6
|
+
import { C as w } from "../../chevron-left-D0UjbrKw.mjs";
|
|
7
|
+
import { C as A } from "../../chevron-right-0ZF3LruR.mjs";
|
|
8
|
+
import '../../assets/DateNavigation.css';const n = {
|
|
9
|
+
"date-navigation__list": "_date-navigation__list_18454_237",
|
|
10
|
+
"date-navigation__control": "_date-navigation__control_18454_282",
|
|
11
|
+
"date-navigation__control--previous": "_date-navigation__control--previous_18454_311",
|
|
12
|
+
"date-navigation__control--next": "_date-navigation__control--next_18454_316",
|
|
13
|
+
"date-navigation__item": "_date-navigation__item_18454_327",
|
|
14
|
+
"date-navigation__day": "_date-navigation__day_18454_342",
|
|
15
|
+
"date-navigation__month-day-break": "_date-navigation__month-day-break_18454_348",
|
|
16
|
+
"date-navigation__weekday": "_date-navigation__weekday_18454_352",
|
|
17
|
+
"date-navigation__date": "_date-navigation__date_18454_353"
|
|
18
18
|
};
|
|
19
|
-
function
|
|
19
|
+
function L(a, i) {
|
|
20
20
|
switch (i.type) {
|
|
21
21
|
case "NAVIGATE_TO_WEEK":
|
|
22
|
-
return i.targetWeekIndex > i.currentWeekIndex ? "advancing" : i.targetWeekIndex < i.currentWeekIndex ? "retracting" :
|
|
22
|
+
return i.targetWeekIndex > i.currentWeekIndex ? "advancing" : i.targetWeekIndex < i.currentWeekIndex ? "retracting" : a;
|
|
23
23
|
case "ANIMATION_COMPLETE":
|
|
24
24
|
return "idle";
|
|
25
25
|
default:
|
|
26
|
-
return
|
|
26
|
+
return a;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
function V() {
|
|
30
|
-
const { weeks:
|
|
31
|
-
h({ type: "NAVIGATE_TO_WEEK", currentWeekIndex: r, targetWeekIndex: t }),
|
|
32
|
-
},
|
|
30
|
+
const { weeks: a, setCurrentDate: i } = W(), [r, x] = g(0), [b, C] = g(a[0]), [l, y] = g(a[0][0]), [N, h] = M(L, "idle"), d = m(null), D = m(0), f = m(s(new Date(l.fullDateStr), "yyyy-MM-dd")), k = (t) => {
|
|
31
|
+
h({ type: "NAVIGATE_TO_WEEK", currentWeekIndex: r, targetWeekIndex: t }), x(t);
|
|
32
|
+
}, E = (t) => {
|
|
33
33
|
s(t.date, "yyyy-MM-dd") !== f.current && (f.current = s(t.date, "yyyy-MM-dd"), y(t), i(t.date));
|
|
34
|
-
}, c =
|
|
34
|
+
}, c = S(() => {
|
|
35
35
|
if (d.current === null) return;
|
|
36
36
|
const t = d.current;
|
|
37
37
|
t.addEventListener("animationstart", () => {
|
|
@@ -41,22 +41,22 @@ function V() {
|
|
|
41
41
|
return p(() => {
|
|
42
42
|
d.current !== null && (d.current.removeEventListener("animationend", c), d.current.addEventListener("animationend", c, { once: !0 }));
|
|
43
43
|
}, [c]), p(() => {
|
|
44
|
-
|
|
45
|
-
const t = r ? 0 : 1,
|
|
46
|
-
(v) => s(v.date, "yyyy-MM-dd") ===
|
|
44
|
+
C(a[r]);
|
|
45
|
+
const t = r ? 0 : 1, I = s(l.date, "yyyy-MM-dd"), u = a[t].findIndex(
|
|
46
|
+
(v) => s(v.date, "yyyy-MM-dd") === I
|
|
47
47
|
);
|
|
48
|
-
if (u !== -1 &&
|
|
49
|
-
const v =
|
|
50
|
-
|
|
48
|
+
if (u !== -1 && a[r][u]) {
|
|
49
|
+
const v = a[r][u];
|
|
50
|
+
D.current = u, y(v), i(v.date);
|
|
51
51
|
}
|
|
52
|
-
}, [r,
|
|
52
|
+
}, [r, a, i, l]), /* @__PURE__ */ _("date-navigation", { "data-state": N, children: [
|
|
53
53
|
/* @__PURE__ */ _("date-navigation-controls", { children: [
|
|
54
54
|
/* @__PURE__ */ _(
|
|
55
55
|
"button",
|
|
56
56
|
{
|
|
57
57
|
className: o([
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
n["date-navigation__control"],
|
|
59
|
+
n["date-navigation__control--previous"],
|
|
60
60
|
"date-navigation__control",
|
|
61
61
|
"date-navigation__control--previous"
|
|
62
62
|
]),
|
|
@@ -66,7 +66,7 @@ function V() {
|
|
|
66
66
|
k(0);
|
|
67
67
|
},
|
|
68
68
|
children: [
|
|
69
|
-
/* @__PURE__ */ e("i", { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e("i", { "aria-hidden": "true", children: /* @__PURE__ */ e(w, { height: 48, width: 48 }) }),
|
|
70
70
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Current Week" })
|
|
71
71
|
]
|
|
72
72
|
}
|
|
@@ -75,8 +75,8 @@ function V() {
|
|
|
75
75
|
"button",
|
|
76
76
|
{
|
|
77
77
|
className: o([
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
n["date-navigation__control"],
|
|
79
|
+
n["date-navigation__control--next"],
|
|
80
80
|
"date-navigation__control",
|
|
81
81
|
"date-navigation__control--next"
|
|
82
82
|
]),
|
|
@@ -86,7 +86,7 @@ function V() {
|
|
|
86
86
|
k(1);
|
|
87
87
|
},
|
|
88
88
|
children: [
|
|
89
|
-
/* @__PURE__ */ e("i", { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
89
|
+
/* @__PURE__ */ e("i", { "aria-hidden": "true", children: /* @__PURE__ */ e(A, { height: 48, width: 48 }) }),
|
|
90
90
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Next Week" })
|
|
91
91
|
]
|
|
92
92
|
}
|
|
@@ -96,37 +96,37 @@ function V() {
|
|
|
96
96
|
"ul",
|
|
97
97
|
{
|
|
98
98
|
"aria-label": "Date Tabs",
|
|
99
|
-
className: o([
|
|
99
|
+
className: o([n["date-navigation__list"], "date-navigation__list"]),
|
|
100
100
|
ref: d,
|
|
101
101
|
role: "tablist",
|
|
102
|
-
children:
|
|
102
|
+
children: b.map((t) => /* @__PURE__ */ e(
|
|
103
103
|
"li",
|
|
104
104
|
{
|
|
105
|
-
className: [
|
|
105
|
+
className: [n["date-navigation__item"], "date-navigation__item"].join(" "),
|
|
106
106
|
role: "presentation",
|
|
107
107
|
children: /* @__PURE__ */ _(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
"aria-controls": `${t.fullDateStr}`,
|
|
111
111
|
"aria-selected": l.fullDateStr === t.fullDateStr,
|
|
112
|
-
className: o([
|
|
112
|
+
className: o([n["date-navigation__day"], "date-navigation__day"]),
|
|
113
113
|
role: "tab",
|
|
114
114
|
type: "button",
|
|
115
115
|
onClick: () => {
|
|
116
|
-
|
|
116
|
+
E(t);
|
|
117
117
|
},
|
|
118
118
|
children: [
|
|
119
119
|
/* @__PURE__ */ e(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
|
-
className: o([
|
|
122
|
+
className: o([n["date-navigation__weekday"], "date-navigation__weekday"]),
|
|
123
123
|
children: t.dayStr
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
/* @__PURE__ */ _(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
|
-
className: o([
|
|
129
|
+
className: o([n["date-navigation__date"], "date-navigation__date"]),
|
|
130
130
|
children: [
|
|
131
131
|
t.monthStr,
|
|
132
132
|
" ",
|
|
@@ -134,7 +134,7 @@ function V() {
|
|
|
134
134
|
"br",
|
|
135
135
|
{
|
|
136
136
|
className: o([
|
|
137
|
-
|
|
137
|
+
n["date-navigation__month-day-break"],
|
|
138
138
|
"date-navigation__month-day-break"
|
|
139
139
|
])
|
|
140
140
|
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as v, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as u, useCallback as N, useEffect as x } from "react";
|
|
3
3
|
import { classes as d } from "../../utils/helpers.js";
|
|
4
4
|
import { NavList as A } from "../NavList/NavList.js";
|
|
5
5
|
import { LogoNavigation as S } from "../LogoNavigation/LogoNavigation.js";
|
|
6
6
|
import { ImageReplacementAnchor as j } from "../ImageReplacementAnchor/ImageReplacementAnchor.js";
|
|
7
7
|
import { Overlay as E } from "../Overlay/Overlay.js";
|
|
8
8
|
import '../../assets/DrawerNavigation.css';const n = {
|
|
9
|
-
"drawer-navigation__nav-bar": "_drawer-navigation__nav-
|
|
10
|
-
"with-logo": "_with-
|
|
11
|
-
"drawer-navigation__menu-toggle": "_drawer-navigation__menu-
|
|
12
|
-
"drawer-navigation__hamburger": "_drawer-
|
|
13
|
-
"drawer-navigation__primary-navigation": "_drawer-navigation__primary-
|
|
14
|
-
"drawer-navigation__separator": "_drawer-
|
|
15
|
-
"visually-hidden": "_visually-
|
|
9
|
+
"drawer-navigation__nav-bar": "_drawer-navigation__nav-bar_8yqif_237",
|
|
10
|
+
"with-logo": "_with-logo_8yqif_247",
|
|
11
|
+
"drawer-navigation__menu-toggle": "_drawer-navigation__menu-toggle_8yqif_251",
|
|
12
|
+
"drawer-navigation__hamburger": "_drawer-navigation__hamburger_8yqif_258",
|
|
13
|
+
"drawer-navigation__primary-navigation": "_drawer-navigation__primary-navigation_8yqif_290",
|
|
14
|
+
"drawer-navigation__separator": "_drawer-navigation__separator_8yqif_322",
|
|
15
|
+
"visually-hidden": "_visually-hidden_8yqif_333"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
17
|
+
function k({
|
|
18
18
|
links: g = [],
|
|
19
19
|
items: l = [],
|
|
20
|
-
classname:
|
|
21
|
-
logo:
|
|
22
|
-
clipPathStart:
|
|
20
|
+
classname: p = "",
|
|
21
|
+
logo: i = {},
|
|
22
|
+
clipPathStart: h = "circle(0% at top right)",
|
|
23
23
|
clipPathEnd: w = "circle(250% at top right)",
|
|
24
24
|
overlayAppendEl: y = document.querySelector("#root")
|
|
25
25
|
}) {
|
|
26
|
-
const [a, f] =
|
|
27
|
-
f((
|
|
28
|
-
const c = !
|
|
26
|
+
const [a, f] = u(!1), [s, m] = u(null), _ = document.querySelector("body"), t = N(() => {
|
|
27
|
+
f((q) => {
|
|
28
|
+
const c = !q;
|
|
29
29
|
if (c)
|
|
30
30
|
_.style.overflowY = "hidden";
|
|
31
31
|
else {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const r = document.querySelector("#overlay");
|
|
33
|
+
r == null || r.setAttribute("data-state", "exiting"), setTimeout(() => {
|
|
34
|
+
r == null || r.remove(), _.style.overflowY = "auto";
|
|
35
35
|
}, 400);
|
|
36
36
|
}
|
|
37
37
|
return c;
|
|
@@ -49,17 +49,17 @@ function Y({
|
|
|
49
49
|
className: d([
|
|
50
50
|
n["drawer-navigation__nav-bar"],
|
|
51
51
|
"drawer-navigation__nav-bar",
|
|
52
|
-
|
|
52
|
+
i.image && n["with-logo"],
|
|
53
53
|
`drawer-navigation__nav-bar--${a ? "expanded" : s ? "closing" : "closed"}`
|
|
54
54
|
]),
|
|
55
55
|
children: [
|
|
56
|
-
|
|
56
|
+
i.image && /* @__PURE__ */ e(
|
|
57
57
|
j,
|
|
58
58
|
{
|
|
59
|
-
baselineAdjustment:
|
|
60
|
-
height:
|
|
61
|
-
href:
|
|
62
|
-
image:
|
|
59
|
+
baselineAdjustment: i.baselineAdjustment,
|
|
60
|
+
height: i.height,
|
|
61
|
+
href: i.href,
|
|
62
|
+
image: i.image
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
65
|
/* @__PURE__ */ o(
|
|
@@ -100,7 +100,7 @@ function Y({
|
|
|
100
100
|
"data-state": a ? "opened" : s || "closed",
|
|
101
101
|
id: "drawer-navigation__primary-navigation",
|
|
102
102
|
style: {
|
|
103
|
-
"--clip-path-start":
|
|
103
|
+
"--clip-path-start": h,
|
|
104
104
|
"--clip-path-end": w
|
|
105
105
|
},
|
|
106
106
|
onAnimationEnd: b,
|
|
@@ -108,7 +108,7 @@ function Y({
|
|
|
108
108
|
g.length > 0 && /* @__PURE__ */ e(
|
|
109
109
|
A,
|
|
110
110
|
{
|
|
111
|
-
classname:
|
|
111
|
+
classname: p,
|
|
112
112
|
links: g,
|
|
113
113
|
toggleHandler: t
|
|
114
114
|
}
|
|
@@ -138,6 +138,6 @@ function Y({
|
|
|
138
138
|
] });
|
|
139
139
|
}
|
|
140
140
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
k as DrawerNavigation,
|
|
142
|
+
k as default
|
|
143
143
|
};
|