@zenpatient-org/healthspan-marketing-ui 0.1.105 → 0.1.106
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/healthspan-marketing-ui.css +1 -1
- package/dist/modules/AllInOne/AllInOne.cjs.js +1 -1
- package/dist/modules/AllInOne/AllInOne.es.js +76 -77
- package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
- package/dist/modules/CallToAction/CallToAction.es.js +97 -86
- package/dist/pageComponents/Bubbles/Bubbles.cjs.js +1 -1
- package/dist/pageComponents/Bubbles/Bubbles.es.js +13 -13
- package/dist/pageComponents/CallToActionDefault/CallToActionDefault.cjs.js +1 -1
- package/dist/pageComponents/CallToActionDefault/CallToActionDefault.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { useRef as l } from "react";
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Typography as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { EIconName as
|
|
8
|
-
import { HighlightedTitle as
|
|
4
|
+
import { Button as K } from "../../components/Button/Button.es.js";
|
|
5
|
+
import { Typography as f } from "../../components/Typography/Typography.es.js";
|
|
6
|
+
import { Icon as W } from "../../components/Icon/Icon.es.js";
|
|
7
|
+
import { EIconName as B } from "../../components/Icon/constants.es.js";
|
|
8
|
+
import { HighlightedTitle as L } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
9
9
|
import { gsap as a } from "../../node_modules/gsap/index.es.js";
|
|
10
|
-
import { useGSAP as
|
|
11
|
-
import { ScrollTrigger as
|
|
12
|
-
import
|
|
10
|
+
import { useGSAP as J } from "../../node_modules/@gsap/react/src/index.es.js";
|
|
11
|
+
import { ScrollTrigger as q } from "../../node_modules/gsap/ScrollTrigger.es.js";
|
|
12
|
+
import Q from "../../utils/debounce.es.js";
|
|
13
13
|
import r from "./callToAction.module.css.es.js";
|
|
14
|
-
a.registerPlugin(
|
|
15
|
-
const
|
|
16
|
-
subtitle:
|
|
17
|
-
titleTop:
|
|
18
|
-
scrollableLabels:
|
|
19
|
-
titleBottom:
|
|
20
|
-
description:
|
|
21
|
-
hsaText:
|
|
22
|
-
buttonText:
|
|
23
|
-
buttonLink:
|
|
24
|
-
backgroundImage:
|
|
14
|
+
a.registerPlugin(q);
|
|
15
|
+
const ce = ({
|
|
16
|
+
subtitle: x,
|
|
17
|
+
titleTop: X,
|
|
18
|
+
scrollableLabels: V,
|
|
19
|
+
titleBottom: _,
|
|
20
|
+
description: z,
|
|
21
|
+
hsaText: F,
|
|
22
|
+
buttonText: O,
|
|
23
|
+
buttonLink: h,
|
|
24
|
+
backgroundImage: j
|
|
25
25
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
var
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const u = l(null), o = l(null), w = l(null), y = l(null), b = l(null), S = l(null), g = l(null), v = l(null), N = l(null);
|
|
27
|
+
return J(() => {
|
|
28
|
+
var k, M, A;
|
|
29
|
+
const m = u.current && u.current.getBoundingClientRect().top < window.innerHeight * 0.8, p = (k = w.current) == null ? void 0 : k.querySelector("p"), T = (M = S.current) == null ? void 0 : M.querySelector("p"), D = [
|
|
30
|
+
p,
|
|
31
|
+
y.current,
|
|
32
32
|
o.current,
|
|
33
|
-
h.current,
|
|
34
|
-
m,
|
|
35
33
|
b.current,
|
|
34
|
+
T,
|
|
36
35
|
g.current,
|
|
37
|
-
|
|
36
|
+
v.current,
|
|
37
|
+
N.current
|
|
38
38
|
].filter(Boolean);
|
|
39
|
-
a.set(
|
|
39
|
+
a.set(D, {
|
|
40
40
|
clipPath: "inset(0% 0% 100% 0%)",
|
|
41
41
|
yPercent: 100
|
|
42
|
-
})
|
|
42
|
+
});
|
|
43
|
+
const c = a.to(
|
|
43
44
|
[
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
p,
|
|
46
|
+
y.current,
|
|
46
47
|
o.current,
|
|
47
|
-
h.current,
|
|
48
|
-
m,
|
|
49
48
|
b.current,
|
|
49
|
+
T,
|
|
50
50
|
g.current,
|
|
51
|
-
|
|
51
|
+
v.current,
|
|
52
|
+
N.current
|
|
52
53
|
],
|
|
53
54
|
{
|
|
54
55
|
clipPath: "inset(0% 0% 0% 0%)",
|
|
@@ -60,117 +61,127 @@ const ne = ({
|
|
|
60
61
|
amount: 1,
|
|
61
62
|
from: "start"
|
|
62
63
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
start: "top 80%",
|
|
66
|
-
end: "+=500"
|
|
67
|
-
}
|
|
64
|
+
paused: !0
|
|
65
|
+
// Start paused, we'll control when it plays
|
|
68
66
|
}
|
|
69
67
|
);
|
|
70
|
-
|
|
68
|
+
q.create({
|
|
69
|
+
trigger: u.current,
|
|
70
|
+
start: "top 80%",
|
|
71
|
+
end: "+=500",
|
|
72
|
+
onEnter: () => c.play(),
|
|
73
|
+
onLeave: () => c.reverse(),
|
|
74
|
+
onEnterBack: () => c.play(),
|
|
75
|
+
onLeaveBack: () => c.reverse()
|
|
76
|
+
}), m && a.delayedCall(0.1, () => {
|
|
77
|
+
c.play();
|
|
78
|
+
});
|
|
79
|
+
const t = (A = o.current) == null ? void 0 : A.querySelector("ul");
|
|
71
80
|
if (!t) return;
|
|
72
|
-
const
|
|
73
|
-
let i = null,
|
|
74
|
-
const
|
|
75
|
-
i && i.kill(), t.innerHTML =
|
|
81
|
+
const C = t.innerHTML;
|
|
82
|
+
let i = null, E = !0;
|
|
83
|
+
const H = () => {
|
|
84
|
+
i && i.kill(), t.innerHTML = C, a.set(t, { y: 0 });
|
|
76
85
|
const n = Array.from(t.querySelectorAll("li"));
|
|
77
86
|
if (n.length <= 1) return;
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
a.set(o.current, { height:
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
t.appendChild(
|
|
84
|
-
})
|
|
87
|
+
const R = n[0].clientHeight;
|
|
88
|
+
if (!R) return;
|
|
89
|
+
a.set(o.current, { height: R, overflow: "hidden" });
|
|
90
|
+
const I = Array.from(n);
|
|
91
|
+
I.forEach((P) => {
|
|
92
|
+
t.appendChild(P.cloneNode(!0));
|
|
93
|
+
});
|
|
94
|
+
const $ = E && !m ? 2.5 : 0;
|
|
95
|
+
i = a.timeline({
|
|
85
96
|
repeat: -1,
|
|
86
|
-
delay:
|
|
97
|
+
delay: $,
|
|
87
98
|
onRepeat: () => {
|
|
88
99
|
a.set(t, { y: 0 });
|
|
89
100
|
}
|
|
90
|
-
}),
|
|
101
|
+
}), I.forEach((P, G) => {
|
|
91
102
|
i && i.to({}, { duration: 2 }).to(t, {
|
|
92
|
-
y: `-${(
|
|
103
|
+
y: `-${(G + 1) * R}`,
|
|
93
104
|
duration: 0.5,
|
|
94
105
|
ease: "power1.inOut"
|
|
95
106
|
});
|
|
96
|
-
}),
|
|
97
|
-
},
|
|
98
|
-
return
|
|
107
|
+
}), E = !1;
|
|
108
|
+
}, d = Q(H, 200);
|
|
109
|
+
return H(), window.addEventListener("resize", d), () => {
|
|
99
110
|
var n;
|
|
100
|
-
window.removeEventListener("resize",
|
|
111
|
+
window.removeEventListener("resize", d), (n = d.kill) == null || n.call(d), i && i.kill(), t && (t.innerHTML = C, a.set(t, { y: 0 }));
|
|
101
112
|
};
|
|
102
|
-
}, [
|
|
103
|
-
/* @__PURE__ */ e("div", { className: r.backgroundImage, style: { backgroundImage: `url(${
|
|
113
|
+
}, [V]), /* @__PURE__ */ s("section", { ref: u, className: r.root, children: [
|
|
114
|
+
/* @__PURE__ */ e("div", { className: r.backgroundImage, style: { backgroundImage: `url(${j})` } }),
|
|
104
115
|
/* @__PURE__ */ s("div", { className: r.container, children: [
|
|
105
116
|
/* @__PURE__ */ e("div", { className: r.leftContent, children: /* @__PURE__ */ s("div", { className: r.content, children: [
|
|
106
|
-
/* @__PURE__ */ e("div", { ref:
|
|
107
|
-
|
|
117
|
+
/* @__PURE__ */ e("div", { ref: y, children: /* @__PURE__ */ e(
|
|
118
|
+
L,
|
|
108
119
|
{
|
|
109
120
|
defaultVariant: "displayXl",
|
|
110
121
|
mobileVariant: "displayMd",
|
|
111
122
|
as: "div",
|
|
112
123
|
className: r.title,
|
|
113
|
-
title:
|
|
124
|
+
title: X
|
|
114
125
|
}
|
|
115
126
|
) }),
|
|
116
|
-
/* @__PURE__ */ e("div", { ref: o, className: r.scrollableLabelsWrapper, children: /* @__PURE__ */ e("ul", { className: r.scrollableLabels, children:
|
|
117
|
-
/* @__PURE__ */ e("div", { ref:
|
|
118
|
-
|
|
127
|
+
/* @__PURE__ */ e("div", { ref: o, className: r.scrollableLabelsWrapper, children: /* @__PURE__ */ e("ul", { className: r.scrollableLabels, children: V.map((m, p) => /* @__PURE__ */ e("li", { className: r.scrollableLabel, children: /* @__PURE__ */ e(f, { defaultVariant: "displayXl", mobileVariant: "displayMd", as: "span", children: m }) }, p)) }) }),
|
|
128
|
+
/* @__PURE__ */ e("div", { ref: b, children: /* @__PURE__ */ e(
|
|
129
|
+
L,
|
|
119
130
|
{
|
|
120
131
|
defaultVariant: "displayXl",
|
|
121
132
|
mobileVariant: "displayMd",
|
|
122
133
|
as: "div",
|
|
123
134
|
className: r.title,
|
|
124
|
-
title:
|
|
135
|
+
title: _
|
|
125
136
|
}
|
|
126
137
|
) })
|
|
127
138
|
] }) }),
|
|
128
|
-
/* @__PURE__ */ e("div", { ref:
|
|
129
|
-
|
|
139
|
+
/* @__PURE__ */ e("div", { ref: w, className: r.subtitleWrapper, children: /* @__PURE__ */ e(
|
|
140
|
+
L,
|
|
130
141
|
{
|
|
131
142
|
defaultVariant: "labelMd",
|
|
132
143
|
mobileVariant: "labelSm",
|
|
133
144
|
as: "div",
|
|
134
145
|
className: r.subtitle,
|
|
135
|
-
title:
|
|
146
|
+
title: x
|
|
136
147
|
}
|
|
137
148
|
) }),
|
|
138
|
-
/* @__PURE__ */ e("div", { ref:
|
|
149
|
+
/* @__PURE__ */ e("div", { ref: S, className: r.arrowWrapper, children: /* @__PURE__ */ s(f, { defaultVariant: "labelXl", mobileVariant: "labelLg", className: r.arrow, as: "p", children: [
|
|
139
150
|
"(",
|
|
140
|
-
/* @__PURE__ */ e(
|
|
151
|
+
/* @__PURE__ */ e(W, { name: B.ARROW_FORWARD }),
|
|
141
152
|
")"
|
|
142
153
|
] }) }),
|
|
143
154
|
/* @__PURE__ */ e("div", { className: r.rightContent, children: /* @__PURE__ */ s("div", { className: r.descriptionWrapper, children: [
|
|
144
|
-
/* @__PURE__ */ e("div", { ref:
|
|
145
|
-
|
|
155
|
+
/* @__PURE__ */ e("div", { ref: g, children: /* @__PURE__ */ e(
|
|
156
|
+
f,
|
|
146
157
|
{
|
|
147
158
|
as: "p",
|
|
148
159
|
defaultVariant: "bodyLg",
|
|
149
160
|
mobileVariant: "bodyMd",
|
|
150
161
|
className: r.description,
|
|
151
|
-
children:
|
|
162
|
+
children: z
|
|
152
163
|
}
|
|
153
164
|
) }),
|
|
154
|
-
/* @__PURE__ */ e("div", { ref:
|
|
155
|
-
|
|
165
|
+
/* @__PURE__ */ e("div", { ref: v, className: r.buttonWrapper, children: h && /* @__PURE__ */ e(
|
|
166
|
+
K,
|
|
156
167
|
{
|
|
157
|
-
as:
|
|
158
|
-
href:
|
|
168
|
+
as: h ? "a" : "button",
|
|
169
|
+
href: h,
|
|
159
170
|
variant: "secondary",
|
|
160
171
|
size: "lg",
|
|
161
|
-
children:
|
|
172
|
+
children: O
|
|
162
173
|
}
|
|
163
174
|
) }),
|
|
164
|
-
/* @__PURE__ */ s("div", { ref:
|
|
165
|
-
/* @__PURE__ */ e(
|
|
175
|
+
/* @__PURE__ */ s("div", { ref: N, className: r.hsaEligible, children: [
|
|
176
|
+
/* @__PURE__ */ e(W, { name: B.CIRCLE_CHECK_FILL, className: r.checkIcon }),
|
|
166
177
|
/* @__PURE__ */ e(
|
|
167
|
-
|
|
178
|
+
f,
|
|
168
179
|
{
|
|
169
180
|
as: "p",
|
|
170
181
|
defaultVariant: "bodySm",
|
|
171
182
|
mobileVariant: "bodySm",
|
|
172
183
|
className: r.hsaText,
|
|
173
|
-
children:
|
|
184
|
+
children: F
|
|
174
185
|
}
|
|
175
186
|
)
|
|
176
187
|
] })
|
|
@@ -179,5 +190,5 @@ const ne = ({
|
|
|
179
190
|
] });
|
|
180
191
|
};
|
|
181
192
|
export {
|
|
182
|
-
|
|
193
|
+
ce as CallToAction
|
|
183
194
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),e=require("react"),d=require("../../utils/cn/cn.cjs.js"),r=require("./bubbles.module.css.cjs.js"),v=["xs","lg","md","md","xl","sm","sm","md","lg","md","xl","xl","xl"],w=({className:b})=>{const[n,f]=e.useState(!1),[c,m]=e.useState("forward"),[o,u]=e.useState(!1),i=e.useRef(null),a=e.useRef(0);return e.useEffect(()=>{const s=()=>{const t=window.scrollY;m(t>a.current?"forward":"reverse"),a.current=t};return window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[]),e.useEffect(()=>{const s=new window.IntersectionObserver(([t])=>{f(t.isIntersecting)},{rootMargin:"0px 0px -20% 0px",threshold:.2});return i.current&&s.observe(i.current),()=>s.disconnect()},[]),e.useEffect(()=>{n&&c==="forward"&&u(!0),n&&c==="reverse"&&u(!1)},[n,c]),l.jsx("section",{ref:i,className:d.cn(r.default.root,b),children:l.jsx("div",{className:r.default.container,children:v.map((s,t)=>l.jsx("div",{className:d.cn(r.default.bubble,o&&r.default.bubbleFinished,!o&&r.default.bubbleReverse),"data-size":s,"data-index":t},t))})})};exports.Bubbles=w;
|
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import { useState as c, useRef as u, useEffect as l } from "react";
|
|
4
4
|
import { cn as b } from "../../utils/cn/cn.es.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import s from "./bubbles.module.css.es.js";
|
|
6
|
+
const p = ["xs", "lg", "md", "md", "xl", "sm", "sm", "md", "lg", "md", "xl", "xl", "xl"], F = ({ className: f }) => {
|
|
7
7
|
const [t, v] = c(!1), [n, w] = c("forward"), [d, a] = c(!1), o = u(null), m = u(0);
|
|
8
8
|
return l(() => {
|
|
9
9
|
const e = () => {
|
|
10
|
-
const
|
|
11
|
-
w(
|
|
10
|
+
const r = window.scrollY;
|
|
11
|
+
w(r > m.current ? "forward" : "reverse"), m.current = r;
|
|
12
12
|
};
|
|
13
13
|
return window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
|
|
14
14
|
}, []), l(() => {
|
|
15
15
|
const e = new window.IntersectionObserver(
|
|
16
|
-
([
|
|
17
|
-
v(
|
|
16
|
+
([r]) => {
|
|
17
|
+
v(r.isIntersecting);
|
|
18
18
|
},
|
|
19
|
-
{ threshold: 0.
|
|
19
|
+
{ rootMargin: "0px 0px -20% 0px", threshold: 0.2 }
|
|
20
20
|
);
|
|
21
21
|
return o.current && e.observe(o.current), () => e.disconnect();
|
|
22
22
|
}, []), l(() => {
|
|
23
23
|
t && n === "forward" && a(!0), t && n === "reverse" && a(!1);
|
|
24
|
-
}, [t, n]), /* @__PURE__ */ i("section", { ref: o, className: b(
|
|
24
|
+
}, [t, n]), /* @__PURE__ */ i("section", { ref: o, className: b(s.root, f), children: /* @__PURE__ */ i("div", { className: s.container, children: p.map((e, r) => /* @__PURE__ */ i(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
27
|
className: b(
|
|
28
|
-
|
|
29
|
-
d &&
|
|
30
|
-
!d &&
|
|
28
|
+
s.bubble,
|
|
29
|
+
d && s.bubbleFinished,
|
|
30
|
+
!d && s.bubbleReverse
|
|
31
31
|
),
|
|
32
32
|
"data-size": e,
|
|
33
|
-
"data-index":
|
|
33
|
+
"data-index": r
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
r
|
|
36
36
|
)) }) });
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("../../modules/CallToAction/CallToAction.cjs.js"),o=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],i=()=>{const e={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:o,titleBottom:t.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"https://app.gethealthspan.com/#/get-started",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("../../modules/CallToAction/CallToAction.cjs.js"),o=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],i=()=>{const e={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:o,titleBottom:t.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"https://app.gethealthspan.com/#/get-started",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"};return t.jsx(l.CallToAction,{...e})};exports.CallToActionDefault=i;
|
|
@@ -21,7 +21,7 @@ const o = [
|
|
|
21
21
|
buttonText: "JOIN NOW",
|
|
22
22
|
// TODO: How to we make this not eventually break...
|
|
23
23
|
buttonLink: "https://app.gethealthspan.com/#/get-started",
|
|
24
|
-
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/
|
|
24
|
+
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"
|
|
25
25
|
} });
|
|
26
26
|
export {
|
|
27
27
|
s as CallToActionDefault
|