@courtneyring/components-library 1.0.30 → 1.0.32
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/{AccordionItem-DuHzStoZ.js → AccordionItem-CDN4L4a7.js} +11 -11
- package/dist/ScrollTrigger-6HnikosL.js +1086 -0
- package/dist/animations/FadeIn.js +8 -7
- package/dist/assets/AccordionItem.css +1 -1
- package/dist/assets/Background.css +1 -1
- package/dist/assets/Banner.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonGroup.css +1 -0
- package/dist/assets/Container.css +1 -1
- package/dist/assets/Countdown.css +1 -1
- package/dist/assets/Fifty.css +1 -1
- package/dist/assets/FloatingWordsHero.css +1 -0
- package/dist/assets/Footer.css +1 -1
- package/dist/assets/GenericOverlay.css +1 -1
- package/dist/assets/IconDetail.css +1 -1
- package/dist/assets/ImageTextBlock.css +1 -1
- package/dist/assets/List.css +1 -1
- package/dist/assets/Map.css +1 -0
- package/dist/assets/Navbar.css +1 -1
- package/dist/assets/Note.css +1 -1
- package/dist/assets/OverlayHero.css +1 -1
- package/dist/assets/PageContainer.css +1 -1
- package/dist/assets/PinnedImage.css +1 -1
- package/dist/assets/PromoGroup.css +1 -1
- package/dist/assets/RSVPEmbed.css +1 -1
- package/dist/assets/Schedule.css +1 -1
- package/dist/assets/TextBlock.css +1 -1
- package/dist/components/Accordion/Accordion.js +21 -14
- package/dist/components/Accordion/AccordionItem.js +2 -2
- package/dist/components/Background/Background.js +24 -22
- package/dist/components/Banner/Banner.js +18 -16
- package/dist/components/BorderedBackground/BorderedBackground.js +1 -1
- package/dist/components/Button/Button.js +23 -16
- package/dist/components/ButtonGroup/ButtonGroup.js +11 -0
- package/dist/components/Container/Container.js +18 -15
- package/dist/components/Countdown/Countdown.js +35 -23
- package/dist/components/Fifty/Fifty.js +43 -34
- package/dist/components/FloatingWordsHero/FloatingWordsHero.js +60 -0
- package/dist/components/Footer/Footer.js +7 -7
- package/dist/components/GenericOverlay/GenericOverlay.js +7 -7
- package/dist/components/GridGallery/GridGallery.js +1 -1
- package/dist/components/HorizontalScrollImages/HorizontalScrollImages.js +13 -12
- package/dist/components/IconDetail/IconDetail.js +8 -8
- package/dist/components/ImageTextBlock/ImageTextBlock.js +27 -24
- package/dist/components/List/List.js +8 -8
- package/dist/components/Map/Map.js +43 -0
- package/dist/components/Map/Map.stories.js +16 -0
- package/dist/components/MenuButton/MenuButton.js +1 -1
- package/dist/components/Navbar/Navbar.js +61 -54
- package/dist/components/Note/Note.js +26 -22
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/OverlayHero/OverlayHero.js +63 -21
- package/dist/components/PageContainer/PageContainer.js +6 -6
- package/dist/components/ParallaxImageGrid/ParallaxImageGrid.js +4 -3
- package/dist/components/PinnedImage/PinnedImage.js +34 -33
- package/dist/components/PromoGroup/PromoGroup.js +100 -51
- package/dist/components/RSVPEmbed/RSVPEmbed.js +9 -8
- package/dist/components/Schedule/Schedule.js +6 -6
- package/dist/components/Spacer/Spacer.js +6 -0
- package/dist/components/TextBlock/TextBlock.js +5 -5
- package/dist/components/Timeline/Timeline.js +12 -11
- package/dist/components/Toolbar/Toolbar.js +41 -13
- package/dist/hooks/useActiveSection 4.js +27 -0
- package/dist/hooks/useFadeIn 4.js +52 -0
- package/dist/hooks/useFadeIn.js +17 -16
- package/dist/hooks/useImageReveal 4.js +55 -0
- package/dist/hooks/useImageReveal.js +55 -0
- package/dist/hooks/useNavColor 4.js +15 -0
- package/dist/hooks/useRepeatable 4.js +32 -0
- package/dist/hooks/useResize 4.js +23 -0
- package/dist/hooks/useResize.js +11 -7
- package/dist/hooks/useResponsive 4.js +15 -0
- package/dist/hooks/useReveal 4.js +38 -0
- package/dist/hooks/useReveal.js +38 -0
- package/dist/hooks/useStagger 4.js +43 -0
- package/dist/hooks/useStagger.js +43 -0
- package/dist/index 2.js +50 -0
- package/dist/{index-BIlioXmW.js → index-B2JRaoNz 4.js } +2 -1
- package/dist/index-B2JRaoNz.js +48 -0
- package/dist/index-BmTo-IS6 4.js +2018 -0
- package/dist/index-BmTo-IS6.js +2018 -0
- package/dist/index-DyQs5aC7 4.js +388 -0
- package/dist/{index-BlCqcUwj.js → index-K0WrPJ_C 4.js } +1 -1
- package/dist/index-K0WrPJ_C.js +29 -0
- package/dist/index.js +42 -46
- package/dist/index.modern-DPbS1w7M 4.js +1443 -0
- package/dist/index.modern-DPbS1w7M.js +1443 -0
- package/dist/presets/animations 4.js +24 -0
- package/dist/presets/animations.js +24 -0
- package/dist/utils/breakpoints 4.js +8 -0
- package/dist/utils/gsapSetup 4.js +8 -0
- package/dist/utils/gsapSetup.js +4 -3
- package/dist/utils/parse 4.js +12 -0
- package/dist/utils/parse.js +7 -7
- package/package.json +9 -4
- package/src/styles/_breakpoints.scss +107 -0
- package/src/styles/_colors.scss +50 -0
- package/src/styles/_fonts.scss +238 -0
- package/src/styles/_mixins.scss +114 -0
- package/src/styles/_reveal.scss +93 -0
- package/src/styles/_sizes.scss +192 -0
- package/src/styles/globals.scss +77 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/variables.module.scss +20 -0
- package/dist/Particles-CKNJUrOc.js +0 -2789
- package/dist/ScrollTrigger-DDbij8gI.js +0 -3102
- package/dist/components/ParticleBackground/ParticleBackground.js +0 -31
|
@@ -1,57 +1,106 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as c, Fragment as
|
|
3
|
-
import "react";
|
|
4
|
-
import "../../index-
|
|
2
|
+
import { jsxs as c, Fragment as u, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as N } from "react";
|
|
4
|
+
import "../../index-K0WrPJ_C.js";
|
|
5
5
|
import "../../hooks/useFadeIn.js";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import "../../
|
|
6
|
+
import z from "../Button/Button.js";
|
|
7
|
+
import { appleStagger as o } from "../../presets/animations.js";
|
|
8
|
+
import { c as m } from "../../index-B2JRaoNz.js";
|
|
9
|
+
import "../OverlayHero/OverlayHero.js";
|
|
9
10
|
import "../../index-DyQs5aC7.js";
|
|
10
|
-
import "
|
|
11
|
-
import "../
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
11
|
+
import { useStagger as f } from "../../hooks/useStagger.js";
|
|
12
|
+
import "../FloatingWordsHero/FloatingWordsHero.js";
|
|
13
|
+
import "../../index.modern-DPbS1w7M.js";
|
|
14
|
+
import '../../assets/PromoGroup.css';const y = "_group_sebz3_2", C = "_slider_sebz3_27", x = "_header_sebz3_33", v = "_promo_sebz3_76", T = "_icon_sebz3_126", $ = "_cta_sebz3_136", j = "_imageContainer_sebz3_144", F = "_image_sebz3_144", k = "_promo__header_sebz3_156", S = "_promo__body_sebz3_248", A = "_stats_sebz3_295", B = "_stat_sebz3_295", G = "_statText_sebz3_309", e = {
|
|
15
|
+
group: y,
|
|
16
|
+
slider: C,
|
|
17
|
+
header: x,
|
|
18
|
+
promo: v,
|
|
19
|
+
icon: T,
|
|
20
|
+
cta: $,
|
|
21
|
+
imageContainer: j,
|
|
22
|
+
image: F,
|
|
23
|
+
promo__header: k,
|
|
24
|
+
promo__body: S,
|
|
25
|
+
stats: A,
|
|
26
|
+
stat: B,
|
|
27
|
+
statText: G,
|
|
28
|
+
"count-4": "_count-4_sebz3_386"
|
|
29
|
+
}, Q = ({ header: d, promos: s, direction: i = "vertical", slider: g }) => {
|
|
30
|
+
const h = ["icon", "header", "body", "cta", "stats", "image"], p = f(`.${e.promo}`, o.from, {
|
|
31
|
+
...o.to,
|
|
32
|
+
stagger: o.stagger,
|
|
33
|
+
scrollTrigger: { start: o.start }
|
|
34
|
+
}), l = N(() => {
|
|
35
|
+
let t = 0;
|
|
36
|
+
for (let r of h)
|
|
37
|
+
s.some((n) => !!n[r]) && (t += 1);
|
|
38
|
+
return t;
|
|
39
|
+
}, [s]);
|
|
40
|
+
return /* @__PURE__ */ c(u, { children: [
|
|
41
|
+
/* @__PURE__ */ a("h2", { className: e.header, children: d }),
|
|
42
|
+
/* @__PURE__ */ a(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref: p,
|
|
46
|
+
className: m(
|
|
47
|
+
e.group,
|
|
48
|
+
e[`count-${s.length}`],
|
|
49
|
+
g && e.slider
|
|
50
|
+
),
|
|
51
|
+
style: {
|
|
52
|
+
"--promos": s.length,
|
|
53
|
+
"--propCount": i == "horizontal" ? l - 1 : l
|
|
49
54
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
children: s.map((t, r) => {
|
|
56
|
+
const n = t.containerCta ? "a" : "div";
|
|
57
|
+
return /* @__PURE__ */ c(
|
|
58
|
+
n,
|
|
59
|
+
{
|
|
60
|
+
onClick: t.containerCta?.onClick || null,
|
|
61
|
+
href: t.containerCta?.href || null,
|
|
62
|
+
target: t.containerCta?.target || null,
|
|
63
|
+
delay: 0.1 * r,
|
|
64
|
+
className: e.promo,
|
|
65
|
+
"data-color": t.color,
|
|
66
|
+
"data-text-align": t.textAlign,
|
|
67
|
+
"data-direction": i,
|
|
68
|
+
children: [
|
|
69
|
+
t.icon && /* @__PURE__ */ a(
|
|
70
|
+
"span",
|
|
71
|
+
{
|
|
72
|
+
className: m(
|
|
73
|
+
"material-symbols-outlined",
|
|
74
|
+
e.icon,
|
|
75
|
+
!t.icon && "hidden"
|
|
76
|
+
),
|
|
77
|
+
children: t.icon
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
t.image && /* @__PURE__ */ a("div", { className: e.imageContainer, children: /* @__PURE__ */ a(
|
|
81
|
+
"img",
|
|
82
|
+
{
|
|
83
|
+
style: { objectFit: t.imageFit },
|
|
84
|
+
className: e.image,
|
|
85
|
+
src: t.image
|
|
86
|
+
}
|
|
87
|
+
) }),
|
|
88
|
+
t.header && /* @__PURE__ */ a("h3", { className: e.promo__header, children: t.header }),
|
|
89
|
+
/* @__PURE__ */ a("p", { className: e.promo__body, children: t.body }),
|
|
90
|
+
t.cta && /* @__PURE__ */ a("div", { className: e.cta, children: /* @__PURE__ */ a(z, { ...t.cta }) }),
|
|
91
|
+
t.stats && /* @__PURE__ */ a("div", { className: e.stats, children: t.stats.map((_, b) => /* @__PURE__ */ c("div", { className: e.stat, children: [
|
|
92
|
+
/* @__PURE__ */ a("span", { className: "material-symbols-outlined", children: _.icon }),
|
|
93
|
+
/* @__PURE__ */ a("span", { className: e.statText, children: _.text })
|
|
94
|
+
] }, `stat-${b}`)) })
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
`promo-${r}`
|
|
98
|
+
);
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] });
|
|
103
|
+
};
|
|
55
104
|
export {
|
|
56
|
-
|
|
105
|
+
Q as default
|
|
57
106
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import '../../assets/RSVPEmbed.css';const
|
|
5
|
-
|
|
3
|
+
import { useRef as s, useEffect as a } from "react";
|
|
4
|
+
import '../../assets/RSVPEmbed.css';const o = "_container_g8yt4_1", i = "_wrapper_g8yt4_5", t = {
|
|
5
|
+
container: o,
|
|
6
|
+
wrapper: i
|
|
6
7
|
};
|
|
7
|
-
function f({ embedUrl:
|
|
8
|
-
const r =
|
|
9
|
-
return
|
|
8
|
+
function f({ embedUrl: c }) {
|
|
9
|
+
const r = s(null);
|
|
10
|
+
return a(() => {
|
|
10
11
|
const e = document.createElement("script");
|
|
11
|
-
return e.src =
|
|
12
|
+
return e.src = c, e.async = !0, r.current?.appendChild(e), () => {
|
|
12
13
|
r.current && (r.current.innerHTML = "");
|
|
13
14
|
};
|
|
14
|
-
}, []), /* @__PURE__ */ n("div", { ref: r, className:
|
|
15
|
+
}, []), /* @__PURE__ */ n("div", { className: t.container, children: /* @__PURE__ */ n("div", { ref: r, className: t.wrapper }) });
|
|
15
16
|
}
|
|
16
17
|
export {
|
|
17
18
|
f as default
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import { Fragment as n } from "react";
|
|
4
|
-
import '../../assets/Schedule.css';const a = "
|
|
4
|
+
import '../../assets/Schedule.css';const a = "_schedule_1hj0g_2", m = "_timeline_1hj0g_79", r = "_time_1hj0g_79", h = "_dot_1hj0g_92", o = "_diagram_1hj0g_100", _ = "_line_1hj0g_106", e = {
|
|
5
5
|
schedule: a,
|
|
6
6
|
timeline: m,
|
|
7
7
|
time: r,
|
|
8
|
-
dot:
|
|
9
|
-
diagram:
|
|
10
|
-
line:
|
|
11
|
-
},
|
|
8
|
+
dot: h,
|
|
9
|
+
diagram: o,
|
|
10
|
+
line: _
|
|
11
|
+
}, p = ({ slots: d, header: t }) => /* @__PURE__ */ s("div", { className: e.schedule, children: [
|
|
12
12
|
/* @__PURE__ */ i("h3", { children: t }),
|
|
13
13
|
/* @__PURE__ */ i("div", { className: e.timeline, children: d.map((c, l) => /* @__PURE__ */ s(n, { children: [
|
|
14
14
|
/* @__PURE__ */ i("div", { className: e.time, children: c.time }),
|
|
@@ -20,5 +20,5 @@ import '../../assets/Schedule.css';const a = "_schedule_3q4gz_2", m = "_timeline
|
|
|
20
20
|
] }, l)) })
|
|
21
21
|
] });
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
p as default
|
|
24
24
|
};
|
|
@@ -3,13 +3,13 @@ import { jsxs as l, jsx as c } from "react/jsx-runtime";
|
|
|
3
3
|
import { createElement as d } from "react";
|
|
4
4
|
import n from "../../utils/parse.js";
|
|
5
5
|
import m from "../IconDetail/IconDetail.js";
|
|
6
|
-
import '../../assets/TextBlock.css';const
|
|
7
|
-
title:
|
|
6
|
+
import '../../assets/TextBlock.css';const b = "_title_wzjzb_1", _ = "_blocks_wzjzb_47", p = "_block_wzjzb_47", k = "_blockHeader_wzjzb_58", h = "_description_wzjzb_87", e = {
|
|
7
|
+
title: b,
|
|
8
8
|
blocks: _,
|
|
9
9
|
block: p,
|
|
10
10
|
blockHeader: k,
|
|
11
|
-
description:
|
|
12
|
-
},
|
|
11
|
+
description: h
|
|
12
|
+
}, f = ({ header: t, blocks: i }) => /* @__PURE__ */ l("div", { className: e.container, children: [
|
|
13
13
|
/* @__PURE__ */ c("h2", { className: e.title, children: t }),
|
|
14
14
|
/* @__PURE__ */ c("div", { className: e.blocks, children: i.map((s, o) => (
|
|
15
15
|
// <div className={styles.block} key={`block-${idx}`}>
|
|
@@ -23,5 +23,5 @@ import '../../assets/TextBlock.css';const h = "_title_1v9uh_1", _ = "_blocks_1v9
|
|
|
23
23
|
)) })
|
|
24
24
|
] });
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
f as default
|
|
27
27
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as l, Fragment as g, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as a, useEffect as
|
|
4
|
-
import { g as o
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { useRef as a, useEffect as f } from "react";
|
|
4
|
+
import { g as o } from "../../index-BmTo-IS6.js";
|
|
5
|
+
import { S as p } from "../../ScrollTrigger-6HnikosL.js";
|
|
6
|
+
import '../../assets/Timeline.css';const h = "_spacer_1g76i_1", u = "_timelineWrapper_1g76i_6", x = "_linePin_1g76i_12", v = "_timelineLine_1g76i_22", N = "_items_1g76i_33", y = "_item_1g76i_33", P = "_text_1g76i_49", i = {
|
|
7
|
+
spacer: h,
|
|
8
|
+
timelineWrapper: u,
|
|
8
9
|
linePin: x,
|
|
9
10
|
timelineLine: v,
|
|
10
11
|
items: N,
|
|
@@ -17,9 +18,9 @@ const W = [
|
|
|
17
18
|
{ year: "2021", text: "Major milestone" },
|
|
18
19
|
{ year: "2024", text: "Where we are today" }
|
|
19
20
|
];
|
|
20
|
-
function
|
|
21
|
+
function R() {
|
|
21
22
|
const s = a(null), d = a(null), m = a(null);
|
|
22
|
-
return
|
|
23
|
+
return f(() => {
|
|
23
24
|
const e = window.innerHeight, c = o.context(() => {
|
|
24
25
|
p.create({
|
|
25
26
|
trigger: s.current,
|
|
@@ -29,9 +30,9 @@ function L() {
|
|
|
29
30
|
pin: d.current,
|
|
30
31
|
scrub: !0,
|
|
31
32
|
onUpdate: (_) => {
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
|
|
33
|
+
const r = _.progress;
|
|
34
|
+
let n;
|
|
35
|
+
r < 0.25 ? n = r / 0.25 * 0.5 * e : r < 0.75 ? n = 0.5 * e : n = 0.5 * e + (r - 0.75) / 0.25 * 0.5 * e, o.set(m.current, { height: n });
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
}, s);
|
|
@@ -49,5 +50,5 @@ function L() {
|
|
|
49
50
|
] });
|
|
50
51
|
}
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
R as default
|
|
53
54
|
};
|
|
@@ -1,24 +1,52 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as o, jsx as
|
|
3
|
-
import
|
|
4
|
-
import { useState as
|
|
5
|
-
import '../../assets/Toolbar.css';const
|
|
6
|
-
toolbar:
|
|
7
|
-
},
|
|
8
|
-
const [
|
|
9
|
-
|
|
2
|
+
import { jsxs as o, jsx as u, Fragment as f } from "react/jsx-runtime";
|
|
3
|
+
import x from "../../hooks/useResize.js";
|
|
4
|
+
import { useState as a, useEffect as d } from "react";
|
|
5
|
+
import '../../assets/Toolbar.css';const b = "_toolbar_17thg_1", k = {
|
|
6
|
+
toolbar: b
|
|
7
|
+
}, y = () => {
|
|
8
|
+
const [e, n] = a(!0), [l, c] = a(0), r = x(), h = {
|
|
9
|
+
xxl: 1600,
|
|
10
|
+
// 1600
|
|
11
|
+
xl: 1200,
|
|
12
|
+
// 1200
|
|
13
|
+
lg: 992,
|
|
14
|
+
// 992
|
|
15
|
+
md: 800,
|
|
16
|
+
// 800
|
|
17
|
+
sm: 625,
|
|
18
|
+
// 625
|
|
19
|
+
xs: 390,
|
|
20
|
+
// 390
|
|
21
|
+
xxs: 0
|
|
22
|
+
// 0
|
|
23
|
+
}, s = (t) => {
|
|
24
|
+
t.code === "KeyI" && (t.preventDefault(), t.stopPropagation(), n(!e));
|
|
10
25
|
};
|
|
11
|
-
return
|
|
26
|
+
return d(() => (window.addEventListener("keyup", s), () => window.removeEventListener("keyup", s)), [e]), d(() => {
|
|
27
|
+
const t = window.innerWidth;
|
|
28
|
+
let i = "xxs";
|
|
29
|
+
for (const [p, m] of Object.entries(h))
|
|
30
|
+
if (t >= m) {
|
|
31
|
+
i = p;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
c(i);
|
|
35
|
+
}, []), e ? /* @__PURE__ */ o("div", { className: k.toolbar, onClick: () => n(!e), children: [
|
|
12
36
|
/* @__PURE__ */ o("div", { children: [
|
|
13
37
|
"Width: ",
|
|
14
|
-
|
|
38
|
+
r.innerWidth
|
|
15
39
|
] }),
|
|
16
40
|
/* @__PURE__ */ o("div", { children: [
|
|
17
41
|
"Height: ",
|
|
18
|
-
|
|
42
|
+
r.innerHeight
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ o("div", { children: [
|
|
45
|
+
"Breakpoint: ",
|
|
46
|
+
l
|
|
19
47
|
] })
|
|
20
|
-
] }) : /* @__PURE__ */
|
|
48
|
+
] }) : /* @__PURE__ */ u(f, {});
|
|
21
49
|
};
|
|
22
50
|
export {
|
|
23
|
-
|
|
51
|
+
y as default
|
|
24
52
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useState as s, useEffect as l } from "react";
|
|
2
|
+
function a() {
|
|
3
|
+
const [o, r] = s < string | null > null;
|
|
4
|
+
return l(() => {
|
|
5
|
+
const c = Array.from(
|
|
6
|
+
document.querySelectorAll < HTMLElement > '[id^="section-"]'
|
|
7
|
+
), t = new IntersectionObserver(
|
|
8
|
+
(e) => {
|
|
9
|
+
e.forEach((n) => {
|
|
10
|
+
if (n.isIntersecting) {
|
|
11
|
+
const i = n.target.id.replace("section-", "");
|
|
12
|
+
r(i);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
root: null,
|
|
18
|
+
rootMargin: "-40% 0px -40% 0px",
|
|
19
|
+
threshold: 0
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
return c.forEach((e) => t.observe(e)), () => t.disconnect();
|
|
23
|
+
}, []), o;
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
a as useActiveSection
|
|
27
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useRef as f } from "react";
|
|
2
|
+
import { g as s } from "../index-BmTo-IS6.js";
|
|
3
|
+
import { S as g } from "../ScrollTrigger-6HnikosL.js";
|
|
4
|
+
import { u as m } from "../index-K0WrPJ_C.js";
|
|
5
|
+
s.registerPlugin(g);
|
|
6
|
+
function b({
|
|
7
|
+
direction: u = "none",
|
|
8
|
+
// 'up' | 'down' | 'left' | 'right' | 'none'
|
|
9
|
+
distance: t = 40,
|
|
10
|
+
duration: c = 0.8,
|
|
11
|
+
delay: i = 0,
|
|
12
|
+
ease: n = "power2.out",
|
|
13
|
+
start: a = "top 85%",
|
|
14
|
+
once: p = !0
|
|
15
|
+
} = {}) {
|
|
16
|
+
const r = f(null);
|
|
17
|
+
return m(
|
|
18
|
+
() => {
|
|
19
|
+
if (!r.current) return;
|
|
20
|
+
const e = { opacity: 0 }, o = {
|
|
21
|
+
opacity: 1,
|
|
22
|
+
duration: c,
|
|
23
|
+
delay: i,
|
|
24
|
+
ease: n,
|
|
25
|
+
scrollTrigger: {
|
|
26
|
+
trigger: r.current,
|
|
27
|
+
start: a,
|
|
28
|
+
once: p
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
switch (u) {
|
|
32
|
+
case "up":
|
|
33
|
+
e.y = t, o.y = 0;
|
|
34
|
+
break;
|
|
35
|
+
case "down":
|
|
36
|
+
e.y = -t, o.y = 0;
|
|
37
|
+
break;
|
|
38
|
+
case "left":
|
|
39
|
+
e.x = t, o.x = 0;
|
|
40
|
+
break;
|
|
41
|
+
case "right":
|
|
42
|
+
e.x = -t, o.x = 0;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
s.fromTo(r.current, e, o);
|
|
46
|
+
},
|
|
47
|
+
{ scope: r }
|
|
48
|
+
), r;
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
b as useFadeIn
|
|
52
|
+
};
|
package/dist/hooks/useFadeIn.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { g as s
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useRef as f } from "react";
|
|
2
|
+
import { g as s } from "../index-BmTo-IS6.js";
|
|
3
|
+
import { S as g } from "../ScrollTrigger-6HnikosL.js";
|
|
4
|
+
import { u as m } from "../index-K0WrPJ_C.js";
|
|
5
|
+
s.registerPlugin(g);
|
|
6
|
+
function b({
|
|
6
7
|
direction: u = "none",
|
|
7
8
|
// 'up' | 'down' | 'left' | 'right' | 'none'
|
|
8
9
|
distance: t = 40,
|
|
9
10
|
duration: c = 0.8,
|
|
10
|
-
delay:
|
|
11
|
-
ease:
|
|
12
|
-
start:
|
|
13
|
-
once:
|
|
11
|
+
delay: i = 0,
|
|
12
|
+
ease: n = "power2.out",
|
|
13
|
+
start: a = "top 85%",
|
|
14
|
+
once: p = !0
|
|
14
15
|
} = {}) {
|
|
15
|
-
const r =
|
|
16
|
-
return
|
|
16
|
+
const r = f(null);
|
|
17
|
+
return m(
|
|
17
18
|
() => {
|
|
18
19
|
if (!r.current) return;
|
|
19
20
|
const e = { opacity: 0 }, o = {
|
|
20
21
|
opacity: 1,
|
|
21
22
|
duration: c,
|
|
22
|
-
delay:
|
|
23
|
-
ease:
|
|
23
|
+
delay: i,
|
|
24
|
+
ease: n,
|
|
24
25
|
scrollTrigger: {
|
|
25
26
|
trigger: r.current,
|
|
26
|
-
start:
|
|
27
|
-
once:
|
|
27
|
+
start: a,
|
|
28
|
+
once: p
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
switch (u) {
|
|
@@ -47,5 +48,5 @@ function S({
|
|
|
47
48
|
), r;
|
|
48
49
|
}
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
b as useFadeIn
|
|
51
52
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useRef as d, useEffect as g } from "react";
|
|
2
|
+
import { g as r } from "../index-BmTo-IS6.js";
|
|
3
|
+
import { S as n } from "../ScrollTrigger-6HnikosL.js";
|
|
4
|
+
function T(s = {}) {
|
|
5
|
+
const t = d(null);
|
|
6
|
+
return g(() => {
|
|
7
|
+
const o = t.current;
|
|
8
|
+
if (!o) return;
|
|
9
|
+
const {
|
|
10
|
+
start: i = "top 85%",
|
|
11
|
+
once: c = !0,
|
|
12
|
+
duration: a = 2,
|
|
13
|
+
ease: l = "power2.out",
|
|
14
|
+
color: u = "#ffffff"
|
|
15
|
+
} = s, f = window.matchMedia(
|
|
16
|
+
"(prefers-reduced-motion: reduce)"
|
|
17
|
+
).matches, e = document.createElement("div");
|
|
18
|
+
e.style.cssText = `
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
background: ${u};
|
|
22
|
+
z-index: 1;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
`, o.style.position = "relative", o.appendChild(e);
|
|
25
|
+
const m = r.context(() => {
|
|
26
|
+
if (f) {
|
|
27
|
+
e.remove();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
r.fromTo(
|
|
31
|
+
e,
|
|
32
|
+
{ opacity: 1 },
|
|
33
|
+
{
|
|
34
|
+
opacity: 0,
|
|
35
|
+
duration: a,
|
|
36
|
+
ease: l,
|
|
37
|
+
scrollTrigger: {
|
|
38
|
+
trigger: o,
|
|
39
|
+
start: i,
|
|
40
|
+
toggleActions: c ? "play none none none" : "play none none reverse"
|
|
41
|
+
},
|
|
42
|
+
onComplete: () => e.remove()
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
window.addEventListener("load", () => n.refresh());
|
|
47
|
+
const p = setTimeout(() => n.refresh(), 500);
|
|
48
|
+
return () => {
|
|
49
|
+
m.revert(), e.remove(), clearTimeout(p);
|
|
50
|
+
};
|
|
51
|
+
}, []), t;
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
T as useImageReveal
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useRef as d, useEffect as g } from "react";
|
|
2
|
+
import { g as r } from "../index-BmTo-IS6.js";
|
|
3
|
+
import { S as n } from "../ScrollTrigger-6HnikosL.js";
|
|
4
|
+
function T(s = {}) {
|
|
5
|
+
const t = d(null);
|
|
6
|
+
return g(() => {
|
|
7
|
+
const o = t.current;
|
|
8
|
+
if (!o) return;
|
|
9
|
+
const {
|
|
10
|
+
start: i = "top 85%",
|
|
11
|
+
once: c = !0,
|
|
12
|
+
duration: a = 2,
|
|
13
|
+
ease: l = "power2.out",
|
|
14
|
+
color: u = "#ffffff"
|
|
15
|
+
} = s, f = window.matchMedia(
|
|
16
|
+
"(prefers-reduced-motion: reduce)"
|
|
17
|
+
).matches, e = document.createElement("div");
|
|
18
|
+
e.style.cssText = `
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
background: ${u};
|
|
22
|
+
z-index: 1;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
`, o.style.position = "relative", o.appendChild(e);
|
|
25
|
+
const m = r.context(() => {
|
|
26
|
+
if (f) {
|
|
27
|
+
e.remove();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
r.fromTo(
|
|
31
|
+
e,
|
|
32
|
+
{ opacity: 1 },
|
|
33
|
+
{
|
|
34
|
+
opacity: 0,
|
|
35
|
+
duration: a,
|
|
36
|
+
ease: l,
|
|
37
|
+
scrollTrigger: {
|
|
38
|
+
trigger: o,
|
|
39
|
+
start: i,
|
|
40
|
+
toggleActions: c ? "play none none none" : "play none none reverse"
|
|
41
|
+
},
|
|
42
|
+
onComplete: () => e.remove()
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
window.addEventListener("load", () => n.refresh());
|
|
47
|
+
const p = setTimeout(() => n.refresh(), 500);
|
|
48
|
+
return () => {
|
|
49
|
+
m.revert(), e.remove(), clearTimeout(p);
|
|
50
|
+
};
|
|
51
|
+
}, []), t;
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
T as useImageReveal
|
|
55
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState as e, useEffect as n } from "react";
|
|
2
|
+
let o = null;
|
|
3
|
+
function a(t = "color-neutral-light") {
|
|
4
|
+
const [r, l] = e(t);
|
|
5
|
+
return n(() => (o = l, () => {
|
|
6
|
+
o === l && (o = null);
|
|
7
|
+
}), []), [r, l];
|
|
8
|
+
}
|
|
9
|
+
function f(t) {
|
|
10
|
+
o && o(t);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
f as notifyNavColor,
|
|
14
|
+
a as useNavColor
|
|
15
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useState as k, useEffect as j } from "react";
|
|
2
|
+
const L = ({ componentType: o, copy: l, length: a }) => {
|
|
3
|
+
const [f, i] = k([]), b = {
|
|
4
|
+
promo: {
|
|
5
|
+
header: "Header",
|
|
6
|
+
body: "Body",
|
|
7
|
+
linkUrl: "LinkUrl",
|
|
8
|
+
linkLabel: "LinkLabel",
|
|
9
|
+
icon: "Icon"
|
|
10
|
+
},
|
|
11
|
+
textBlock: {
|
|
12
|
+
title: "Title",
|
|
13
|
+
body: "Body"
|
|
14
|
+
}
|
|
15
|
+
}, n = ({ componentType: e, copy: t, i: r }) => {
|
|
16
|
+
let u = b[`${e}`], s = {};
|
|
17
|
+
for (let [d, c] of Object.entries(u))
|
|
18
|
+
s[d] = t[`${e}${c}${r + 1}`];
|
|
19
|
+
return s;
|
|
20
|
+
};
|
|
21
|
+
return j(() => {
|
|
22
|
+
let e = [];
|
|
23
|
+
for (let t = 0; t < a; t++) {
|
|
24
|
+
let r = n({ componentType: o, copy: l, i: t });
|
|
25
|
+
e.push(r);
|
|
26
|
+
}
|
|
27
|
+
i(e);
|
|
28
|
+
}, [o, l, a]), f;
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
L as default
|
|
32
|
+
};
|