@courtneyring/components-library 1.0.30 → 1.0.31
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-BlVXPxrh.js +40 -0
- 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/MenuButton.css +1 -1
- 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 +1 -1
- package/dist/components/Accordion/AccordionItem.js +2 -2
- package/dist/components/Background/Background.js +24 -22
- package/dist/components/Banner/Banner.js +16 -14
- package/dist/components/BorderedBackground/BorderedBackground.js +1 -1
- package/dist/components/Button/Button.js +34 -27
- package/dist/components/ButtonGroup/ButtonGroup.js +10 -0
- package/dist/components/Container/Container.js +18 -17
- package/dist/components/Countdown/Countdown.js +35 -23
- package/dist/components/Fifty/Fifty.js +41 -33
- package/dist/components/FloatingWordsHero/FloatingWordsHero.js +30 -0
- package/dist/components/Footer/Footer.js +9 -9
- package/dist/components/GenericOverlay/GenericOverlay.js +13 -13
- 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 -25
- package/dist/components/List/List.js +15 -15
- package/dist/components/Map/Map.js +41 -0
- package/dist/components/Map/Map.stories.js +16 -0
- package/dist/components/MenuButton/MenuButton.js +21 -21
- package/dist/components/Navbar/Navbar.js +50 -43
- package/dist/components/Note/Note.js +26 -22
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/OverlayHero/OverlayHero.js +5 -5
- package/dist/components/PageContainer/PageContainer.js +5 -5
- package/dist/components/ParallaxImageGrid/ParallaxImageGrid.js +4 -3
- package/dist/components/PinnedImage/PinnedImage.js +34 -33
- package/dist/components/PromoGroup/PromoGroup.js +98 -51
- package/dist/components/RSVPEmbed/RSVPEmbed.js +9 -8
- package/dist/components/Schedule/Schedule.js +10 -10
- package/dist/components/Spacer/Spacer.js +6 -0
- package/dist/components/TextBlock/TextBlock.js +18 -18
- package/dist/components/Timeline/Timeline.js +12 -11
- package/dist/components/Toolbar/Toolbar.js +43 -15
- package/dist/hooks/useActiveSection 2.js +27 -0
- package/dist/hooks/useFadeIn 2.js +52 -0
- package/dist/hooks/useFadeIn.js +17 -16
- package/dist/hooks/useNavColor 2.js +15 -0
- package/dist/hooks/useRepeatable 2.js +32 -0
- package/dist/hooks/useResize 2.js +19 -0
- package/dist/hooks/useResponsive 2.js +15 -0
- package/dist/hooks/useReveal 2.js +38 -0
- package/dist/hooks/useReveal.js +38 -0
- package/dist/hooks/useStagger 2.js +43 -0
- package/dist/hooks/useStagger.js +43 -0
- package/dist/{index-BIlioXmW.js → index-B2JRaoNz 2.js } +2 -1
- package/dist/index-B2JRaoNz.js +48 -0
- package/dist/index-BmTo-IS6.js +2018 -0
- package/dist/{index-BlCqcUwj.js → index-K0WrPJ_C.js} +1 -1
- package/dist/index.js +42 -46
- package/dist/index.modern-DPbS1w7M.js +1443 -0
- package/dist/presets/animations 3.js +19 -0
- package/dist/presets/animations.js +19 -0
- package/dist/utils/breakpoints 3.js +8 -0
- package/dist/utils/gsapSetup 3.js +8 -0
- package/dist/utils/gsapSetup.js +4 -3
- package/dist/utils/parse 3.js +12 -0
- package/dist/utils/parse.js +7 -7
- package/package.json +8 -4
- package/src/styles/_breakpoints.scss +107 -0
- package/src/styles/_colors.scss +50 -0
- package/src/styles/_fonts.scss +241 -0
- package/src/styles/_mixins.scss +114 -0
- package/src/styles/_sizes.scss +191 -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/AccordionItem-DuHzStoZ.js +0 -40
- 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,104 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as c, Fragment as
|
|
3
|
-
import "react";
|
|
4
|
-
import "../../index-
|
|
2
|
+
import { jsxs as c, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as u } from "react";
|
|
4
|
+
import "../../index-K0WrPJ_C.js";
|
|
5
5
|
import "../../hooks/useFadeIn.js";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import "../../
|
|
6
|
+
import N from "../Button/Button.js";
|
|
7
|
+
import { appleStagger as n } from "../../presets/animations.js";
|
|
8
|
+
import { c as m } from "../../index-B2JRaoNz.js";
|
|
9
9
|
import "../../index-DyQs5aC7.js";
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
import '../../assets/PromoGroup.css';const
|
|
13
|
-
group:
|
|
14
|
-
slider:
|
|
15
|
-
header:
|
|
16
|
-
promo:
|
|
17
|
-
icon:
|
|
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
|
-
|
|
10
|
+
import { useStagger as f } from "../../hooks/useStagger.js";
|
|
11
|
+
import "../../index.modern-DPbS1w7M.js";
|
|
12
|
+
import '../../assets/PromoGroup.css';const y = "_group_rwbwb_2", C = "_slider_rwbwb_27", x = "_header_rwbwb_33", v = "_promo_rwbwb_76", T = "_icon_rwbwb_126", $ = "_cta_rwbwb_136", j = "_imageContainer_rwbwb_144", F = "_image_rwbwb_144", k = "_promo__header_rwbwb_156", S = "_promo__body_rwbwb_254", z = "_stats_rwbwb_302", A = "_stat_rwbwb_302", B = "_statText_rwbwb_316", a = {
|
|
13
|
+
group: y,
|
|
14
|
+
slider: C,
|
|
15
|
+
header: x,
|
|
16
|
+
promo: v,
|
|
17
|
+
icon: T,
|
|
18
|
+
cta: $,
|
|
19
|
+
imageContainer: j,
|
|
20
|
+
image: F,
|
|
21
|
+
promo__header: k,
|
|
22
|
+
promo__body: S,
|
|
23
|
+
stats: z,
|
|
24
|
+
stat: A,
|
|
25
|
+
statText: B,
|
|
26
|
+
"count-4": "_count-4_rwbwb_394"
|
|
27
|
+
}, L = ({ header: d, promos: r, direction: i = "vertical", slider: b }) => {
|
|
28
|
+
const g = ["icon", "header", "body", "cta", "stats", "image"], h = f(`.${a.promo}`, n.from, {
|
|
29
|
+
...n.to,
|
|
30
|
+
stagger: n.stagger,
|
|
31
|
+
scrollTrigger: { start: n.start }
|
|
32
|
+
}), l = u(() => {
|
|
33
|
+
let t = 0;
|
|
34
|
+
for (let s of g)
|
|
35
|
+
r.some((o) => !!o[s]) && (t += 1);
|
|
36
|
+
return t;
|
|
37
|
+
}, [r]);
|
|
38
|
+
return /* @__PURE__ */ c(p, { children: [
|
|
39
|
+
/* @__PURE__ */ e("h2", { className: a.header, children: d }),
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
ref: h,
|
|
44
|
+
className: m(
|
|
45
|
+
a.group,
|
|
46
|
+
a[`count-${r.length}`],
|
|
47
|
+
b && a.slider
|
|
48
|
+
),
|
|
49
|
+
style: {
|
|
50
|
+
"--promos": r.length,
|
|
51
|
+
"--propCount": i == "horizontal" ? l - 1 : l
|
|
49
52
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
children: r.map((t, s) => {
|
|
54
|
+
const o = t.containerCta ? "a" : "div";
|
|
55
|
+
return /* @__PURE__ */ c(
|
|
56
|
+
o,
|
|
57
|
+
{
|
|
58
|
+
onClick: t.containerCta?.onClick || null,
|
|
59
|
+
href: t.containerCta?.href || null,
|
|
60
|
+
target: t.containerCta?.target || null,
|
|
61
|
+
delay: 0.1 * s,
|
|
62
|
+
className: a.promo,
|
|
63
|
+
"data-color": t.color,
|
|
64
|
+
"data-text-align": t.textAlign,
|
|
65
|
+
"data-direction": i,
|
|
66
|
+
children: [
|
|
67
|
+
t.icon && /* @__PURE__ */ e(
|
|
68
|
+
"span",
|
|
69
|
+
{
|
|
70
|
+
className: m(
|
|
71
|
+
"material-symbols-outlined",
|
|
72
|
+
a.icon,
|
|
73
|
+
!t.icon && "hidden"
|
|
74
|
+
),
|
|
75
|
+
children: t.icon
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
t.image && /* @__PURE__ */ e("div", { className: a.imageContainer, children: /* @__PURE__ */ e(
|
|
79
|
+
"img",
|
|
80
|
+
{
|
|
81
|
+
style: { objectFit: t.imageFit },
|
|
82
|
+
className: a.image,
|
|
83
|
+
src: t.image
|
|
84
|
+
}
|
|
85
|
+
) }),
|
|
86
|
+
t.header && /* @__PURE__ */ e("h3", { className: a.promo__header, children: t.header }),
|
|
87
|
+
/* @__PURE__ */ e("p", { className: a.promo__body, children: t.body }),
|
|
88
|
+
t.cta && /* @__PURE__ */ e("div", { className: a.cta, children: /* @__PURE__ */ e(N, { ...t.cta }) }),
|
|
89
|
+
t.stats && /* @__PURE__ */ e("div", { className: a.stats, children: t.stats.map((_, w) => /* @__PURE__ */ c("div", { className: a.stat, children: [
|
|
90
|
+
/* @__PURE__ */ e("span", { className: "material-symbols-outlined", children: _.icon }),
|
|
91
|
+
/* @__PURE__ */ e("span", { className: a.statText, children: _.text })
|
|
92
|
+
] }, `stat-${w}`)) })
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
`promo-${s}`
|
|
96
|
+
);
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] });
|
|
101
|
+
};
|
|
55
102
|
export {
|
|
56
|
-
|
|
103
|
+
L as default
|
|
57
104
|
};
|
|
@@ -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
|
-
wrapper:
|
|
3
|
+
import { useRef as s, useEffect as a } from "react";
|
|
4
|
+
import '../../assets/RSVPEmbed.css';const o = "_wrapper_1uu5y_1", i = "_container_1uu5y_10", t = {
|
|
5
|
+
wrapper: o,
|
|
6
|
+
container: 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,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as l, 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_10lfg_2", m = "_timeline_10lfg_85", r = "_time_10lfg_85", o = "_dot_10lfg_98", _ = "_diagram_10lfg_106", h = "_line_10lfg_112", e = {
|
|
5
5
|
schedule: a,
|
|
6
6
|
timeline: m,
|
|
7
7
|
time: r,
|
|
8
8
|
dot: o,
|
|
9
9
|
diagram: _,
|
|
10
10
|
line: h
|
|
11
|
-
},
|
|
12
|
-
/* @__PURE__ */ i("h3", { children:
|
|
13
|
-
/* @__PURE__ */ i("div", { className: e.timeline, children:
|
|
14
|
-
/* @__PURE__ */ i("div", { className: e.time, children:
|
|
15
|
-
/* @__PURE__ */
|
|
11
|
+
}, p = ({ slots: c, header: d }) => /* @__PURE__ */ l("div", { className: e.schedule, children: [
|
|
12
|
+
/* @__PURE__ */ i("h3", { children: d }),
|
|
13
|
+
/* @__PURE__ */ i("div", { className: e.timeline, children: c.map((s, t) => /* @__PURE__ */ l(n, { children: [
|
|
14
|
+
/* @__PURE__ */ i("div", { className: e.time, children: s.time }),
|
|
15
|
+
/* @__PURE__ */ l("div", { className: e.diagram, children: [
|
|
16
16
|
/* @__PURE__ */ i("span", { className: e.line }),
|
|
17
17
|
/* @__PURE__ */ i("div", { className: e.dot })
|
|
18
18
|
] }),
|
|
19
|
-
/* @__PURE__ */ i("div", { className: e.description, children:
|
|
20
|
-
] },
|
|
19
|
+
/* @__PURE__ */ i("div", { className: e.description, children: s.description })
|
|
20
|
+
] }, t)) })
|
|
21
21
|
] });
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
p as default
|
|
24
24
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { createElement as
|
|
4
|
-
import
|
|
2
|
+
import { jsxs as s, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { createElement as r } from "react";
|
|
4
|
+
import d from "../../utils/parse.js";
|
|
5
5
|
import m from "../IconDetail/IconDetail.js";
|
|
6
|
-
import '../../assets/TextBlock.css';const
|
|
7
|
-
title:
|
|
8
|
-
blocks:
|
|
9
|
-
block:
|
|
10
|
-
blockHeader:
|
|
11
|
-
description:
|
|
12
|
-
},
|
|
13
|
-
/* @__PURE__ */ c("h2", { className: e.title, children:
|
|
14
|
-
/* @__PURE__ */ c("div", { className: e.blocks, children:
|
|
6
|
+
import '../../assets/TextBlock.css';const _ = "_title_xfuni_1", p = "_blocks_xfuni_47", k = "_block_xfuni_47", h = "_blockHeader_xfuni_58", b = "_description_xfuni_92", e = {
|
|
7
|
+
title: _,
|
|
8
|
+
blocks: p,
|
|
9
|
+
block: k,
|
|
10
|
+
blockHeader: h,
|
|
11
|
+
description: b
|
|
12
|
+
}, v = ({ header: l, blocks: t }) => /* @__PURE__ */ s("div", { className: e.container, children: [
|
|
13
|
+
/* @__PURE__ */ c("h2", { className: e.title, children: l }),
|
|
14
|
+
/* @__PURE__ */ c("div", { className: e.blocks, children: t.map((i, o) => (
|
|
15
15
|
// <div className={styles.block} key={`block-${idx}`}>
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */ c("h3", { className: e.blockHeader, children:
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */ c("div", { className: e.description, children:
|
|
20
|
-
/* @__PURE__ */ c("div", { className: e.details, children:
|
|
16
|
+
/* @__PURE__ */ s("div", { className: e.block, children: [
|
|
17
|
+
/* @__PURE__ */ c("h3", { className: e.blockHeader, children: i.header }),
|
|
18
|
+
/* @__PURE__ */ s("div", { className: e.content, children: [
|
|
19
|
+
/* @__PURE__ */ c("div", { className: e.description, children: d(i.description) }),
|
|
20
|
+
/* @__PURE__ */ c("div", { className: e.details, children: i.details && i.details.map((a, n) => /* @__PURE__ */ r(m, { ...a, key: n })) })
|
|
21
21
|
] })
|
|
22
22
|
] }, `block-${o}`)
|
|
23
23
|
)) })
|
|
24
24
|
] });
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
v 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
|
|
3
|
-
import
|
|
4
|
-
import { useState as
|
|
5
|
-
import '../../assets/Toolbar.css';const
|
|
6
|
-
toolbar:
|
|
7
|
-
},
|
|
8
|
-
const [
|
|
9
|
-
|
|
2
|
+
import { jsxs as e, jsx as u, Fragment as f } from "react/jsx-runtime";
|
|
3
|
+
import x from "../../hooks/useResize.js";
|
|
4
|
+
import { useState as i, useEffect as a } from "react";
|
|
5
|
+
import '../../assets/Toolbar.css';const b = "_toolbar_17thg_1", v = {
|
|
6
|
+
toolbar: b
|
|
7
|
+
}, y = () => {
|
|
8
|
+
const [o, d] = i(!0), [l, c] = i(0), n = 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
|
+
}, r = (t) => {
|
|
24
|
+
t.code === "KeyI" && (t.preventDefault(), t.stopPropagation(), d(!o));
|
|
10
25
|
};
|
|
11
|
-
return
|
|
12
|
-
|
|
26
|
+
return a(() => (window.addEventListener("keyup", r), () => window.removeEventListener("keyup", r)), [o]), a(() => {
|
|
27
|
+
const t = window.innerWidth;
|
|
28
|
+
let s = "xxs";
|
|
29
|
+
for (const [p, m] of Object.entries(h))
|
|
30
|
+
if (t >= m) {
|
|
31
|
+
s = p;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
c(s);
|
|
35
|
+
}, []), o ? /* @__PURE__ */ e("div", { className: v.toolbar, children: [
|
|
36
|
+
/* @__PURE__ */ e("div", { children: [
|
|
13
37
|
"Width: ",
|
|
14
|
-
|
|
38
|
+
n.innerWidth
|
|
15
39
|
] }),
|
|
16
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ e("div", { children: [
|
|
17
41
|
"Height: ",
|
|
18
|
-
|
|
42
|
+
n.innerHeight
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ e("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,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
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useState as t, useEffect as r } from "react";
|
|
2
|
+
const o = () => {
|
|
3
|
+
const [e, i] = t({
|
|
4
|
+
innerWidth: typeof window < "u" && window.innerWidth,
|
|
5
|
+
innerHeight: typeof window < "u" && window.innerHeight
|
|
6
|
+
});
|
|
7
|
+
return r(() => {
|
|
8
|
+
const n = () => {
|
|
9
|
+
i({
|
|
10
|
+
innerWidth: window.innerWidth,
|
|
11
|
+
innerHeight: window.innerHeight
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
15
|
+
}, [e]), e;
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
o as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState as u, useEffect as f } from "react";
|
|
2
|
+
import c from "./useResize.js";
|
|
3
|
+
const a = (s) => {
|
|
4
|
+
const [e, o] = u(!1), r = c(), { innerWidth: t, innerHeight: i } = r;
|
|
5
|
+
return f(() => {
|
|
6
|
+
const n = s({
|
|
7
|
+
innerWidth: t,
|
|
8
|
+
innerHeight: i
|
|
9
|
+
});
|
|
10
|
+
n !== e && o(n);
|
|
11
|
+
}, [e, t, i, s]), e;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
a as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useRef as g, useEffect as d } from "react";
|
|
2
|
+
import { g as r } from "../index-BmTo-IS6.js";
|
|
3
|
+
import { S as s } from "../ScrollTrigger-6HnikosL.js";
|
|
4
|
+
function h(o = {}) {
|
|
5
|
+
const t = g(null);
|
|
6
|
+
return d(() => {
|
|
7
|
+
const e = t.current;
|
|
8
|
+
if (!e) return;
|
|
9
|
+
const {
|
|
10
|
+
from: c = { opacity: 0, y: 30 },
|
|
11
|
+
to: n = { opacity: 1, y: 0, duration: 0.6, ease: "power2.out" },
|
|
12
|
+
start: i = "top 85%",
|
|
13
|
+
once: f = !0,
|
|
14
|
+
delay: a = 0
|
|
15
|
+
} = o, l = window.matchMedia(
|
|
16
|
+
"(prefers-reduced-motion: reduce)"
|
|
17
|
+
).matches, u = r.context(() => {
|
|
18
|
+
if (l) {
|
|
19
|
+
r.set(e, n);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
r.fromTo(e, c, {
|
|
23
|
+
...n,
|
|
24
|
+
delay: a,
|
|
25
|
+
scrollTrigger: {
|
|
26
|
+
trigger: o.trigger ?? e,
|
|
27
|
+
start: i,
|
|
28
|
+
toggleActions: f ? "play none none none" : "play none none reverse",
|
|
29
|
+
onEnter: () => console.log("ScrollTrigger fired for:", e)
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return window.addEventListener("load", () => s.refresh()), setTimeout(() => s.refresh(), 500), () => u.revert();
|
|
34
|
+
}, []), t;
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
h as useReveal
|
|
38
|
+
};
|