@zenpatient-org/healthspan-marketing-ui 0.1.155 → 0.1.156
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 +130 -186
- package/dist/modules/AllInOne/allInOneData.cjs.js +1 -0
- package/dist/modules/AllInOne/allInOneData.d.ts +17 -0
- package/dist/modules/AllInOne/allInOneData.es.js +53 -0
- package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
- package/dist/modules/CallToAction/CallToAction.es.js +28 -18
- package/dist/modules/Callback/Callback.cjs.js +1 -1
- package/dist/modules/Callback/Callback.d.ts +8 -3
- package/dist/modules/Callback/Callback.es.js +23 -10
- package/dist/node_modules/gsap/CustomEase.cjs.js +8 -0
- package/dist/node_modules/gsap/CustomEase.es.js +106 -0
- package/dist/node_modules/gsap/utils/paths.cjs.js +8 -0
- package/dist/node_modules/gsap/utils/paths.es.js +86 -0
- package/package.json +1 -1
|
@@ -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 s=require("react/jsx-runtime"),F=require("../../node_modules/@gsap/react/src/index.cjs.js"),e=require("../../node_modules/gsap/index.cjs.js"),E=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),G=require("../../node_modules/gsap/CustomEase.cjs.js"),a=require("react"),k=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),U=require("../../components/Typography/Typography.cjs.js"),A=require("../../utils/cn/cn.cjs.js"),J=require("../CallToAction/CallToAction.cjs.js"),K=require("./allInOneData.cjs.js"),i=require("./allInOne.module.css.cjs.js"),Q=require("../../utils/useIsMobile.cjs.js");e.gsap.registerPlugin(E.ScrollTrigger);e.gsap.registerPlugin(G.CustomEase);const{subtitle:Y,titleTop:Z,scrollableLabels:ee,titleBottom:te,description:se,descriptionText:ie,hsaText:re,buttonText:ne,buttonLink:oe,backgroundImage:le,title1:ae,title2:ce,scrollLabels:v,images:N}=K.default,pe=()=>{const[I,M]=a.useState(!1),T=1300,W=Q.useIsMobile(T),h=a.useRef(null),p=a.useRef(null),S=a.useRef(null),f=a.useRef(null),m=a.useRef(null),b=a.useRef(null),u=a.useRef(null),H=a.useRef(!1),D=e.gsap.matchMedia(),B=a.useCallback(()=>{if(!p.current||!S.current||!h.current||!f.current||!m.current||!b.current||!u.current)return;const r=h.current,n=p.current,l=f.current,o=m.current,d=b.current,L=u.current,q=d.querySelectorAll("p");if(q.length===0)return;q.forEach((c,t)=>{c.style.zIndex=String(q.length-t)});const x=n.querySelectorAll('[data-type="image"]'),j=x.length;x.forEach((c,t)=>{c.style.zIndex=String(j-t)});const y=r.scrollHeight/j,O=.7;j>0&&x.forEach((c,t)=>{const $=t*y,R=(t+1)*y-O*y;e.gsap.fromTo([c,q[t]],{opacity:1},{opacity:0,scrollTrigger:{trigger:r,start:()=>`top+=${$} top`,end:()=>`top+=${R} top`,scrub:!0}})});const C=n.getBoundingClientRect(),P=S.current.getBoundingClientRect(),V=l.getBoundingClientRect(),z=r.getBoundingClientRect();e.gsap.set(d,{y:()=>`${C.bottom-z.top+20}px`}),D.add({isMobile:`(max-width: ${T-1}px)`,isDesktop:`(min-width: ${T}px)`},c=>{const t=c.conditions,$=t==null?void 0:t.isMobile;(t==null?void 0:t.isDesktop)&&(e.gsap.set(l,{x:()=>`${C.left-V.width-50}px`}),e.gsap.set(o,{x:()=>`${C.right+25}px`})),$&&(e.gsap.set(l,{top:`${C.top-P.top-o.clientHeight-40}px`}),e.gsap.set(o,{top:`${C.top-P.top-o.clientHeight}px`}))}),e.gsap.to(n,{scale:1,ease:"power1.in",scrollTrigger:{trigger:r,start:"top top",end:"100% bottom",scrub:!0,onUpdate:c=>{if(!p.current||!u.current||!l||!o)return;const t=n.getBoundingClientRect();D.add({isMobile:`(max-width: ${T-1}px)`,isDesktop:`(min-width: ${T}px)`},R=>{const g=R.conditions,w=g==null?void 0:g.isMobile;(g==null?void 0:g.isDesktop)&&(e.gsap.set(l,{x:()=>`${t.left-V.width-50}px`}),e.gsap.set(o,{x:()=>`${t.right+25}px`})),w&&(e.gsap.set(l,{top:()=>`${t.top-o.clientHeight-50}px`}),e.gsap.set(o,{top:()=>`${t.top-50}px`}))}),e.gsap.set(d,{y:`${t.bottom+20}px`});const $=u.current.getBoundingClientRect();if(t.bottom+60>=$.top?e.gsap.to(L,{opacity:0,duration:.3}):e.gsap.to(L,{opacity:1,duration:.3}),c.progress>=.99)e.gsap.to(n,{borderRadius:0,duration:.3,ease:"power1.inOut"}),e.gsap.to(l,{opacity:1}),e.gsap.to(o,{opacity:1}),H.current||(H.current=!0,M(!0),e.gsap.to([x,d.querySelectorAll("p")],{opacity:0,duration:.8,delay:.2,ease:"power2.out",overwrite:!0}));else if(e.gsap.to(n,{borderRadius:999,duration:.3,ease:"power1.inOut"}),e.gsap.to(l,{opacity:1}),e.gsap.to(o,{opacity:1}),H.current){H.current=!1,M(!1),e.gsap.set(n,{borderRadius:999}),e.gsap.killTweensOf([x,d.querySelectorAll("p")]);const R=d.querySelectorAll("p");x.forEach((g,w)=>{const _=w*y,X=(w+1)*y-O*y;e.gsap.fromTo([g,R[w]],{opacity:1},{opacity:0,scrollTrigger:{trigger:r,start:()=>`top+=${_} top`,end:()=>`top+=${X} top`,scrub:!0}})}),E.ScrollTrigger.refresh()}}}})},[p,f,m,b,u,I]);return F.useGSAP(()=>{if(!p.current||!h.current||!f.current||!m||!b.current||!u.current)return;const r=p.current,n=f.current,l=m.current,o=b.current,d=u.current;return W?e.gsap.set(r,{aspectRatio:`${window.innerWidth} / ${window.innerHeight}`,scale:.5}):e.gsap.set(r,{scale:.3,aspectRatio:`${window.innerWidth} / ${window.innerHeight}`}),B(),()=>{e.gsap.killTweensOf([r,o,n,l,d])}},{scope:h,dependencies:[h,p,f,m,b,B]}),s.jsx("div",{className:i.default.root,children:s.jsx("div",{ref:h,className:i.default.container,children:s.jsxs("div",{ref:S,className:i.default.pillContainerWrapper,children:[s.jsxs("div",{ref:p,className:A.cn("pillContainer",i.default.pillContainer),children:[N==null?void 0:N.map((r,n)=>s.jsx("div",{className:i.default.imageBlock,"data-type":"image",style:{backgroundImage:`url(${r})`}},n)),s.jsx("div",{className:i.default.callToActionContainer,children:I&&s.jsx(J.CallToAction,{subtitle:Y,titleTop:Z,scrollableLabels:ee,titleBottom:te,description:ie,hsaText:re,buttonText:ne,buttonLink:oe,backgroundImage:le})})]}),s.jsx("div",{ref:f,className:i.default.fixedHeader,children:s.jsx(k.HighlightedTitle,{className:i.default.title1,as:"div",defaultVariant:"displayXs",title:ae})}),s.jsx("div",{ref:m,className:i.default.fixedHeader,children:s.jsx(k.HighlightedTitle,{className:i.default.title2,as:"div",defaultVariant:"displayXs",title:ce})}),s.jsx("div",{ref:b,className:A.cn("scrollableLabels",i.default.scrollableLabels),children:v==null?void 0:v.map((r,n)=>s.jsx(U.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",className:i.default.scrollLabel,children:r},n))}),s.jsx("div",{ref:u,className:A.cn("description",i.default.description),children:s.jsx(k.HighlightedTitle,{as:"div",defaultVariant:"preambleMd",mobileVariant:"preambleSm",title:se,className:i.default.descriptionText})})]})})})};exports.AllInOne=pe;
|
|
@@ -1,175 +1,123 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useGSAP as
|
|
2
|
+
import { jsx as n, jsxs as j } from "react/jsx-runtime";
|
|
3
|
+
import { useGSAP as U } from "../../node_modules/@gsap/react/src/index.es.js";
|
|
4
4
|
import { gsap as e } from "../../node_modules/gsap/index.es.js";
|
|
5
|
-
import { ScrollTrigger as
|
|
6
|
-
import {
|
|
5
|
+
import { ScrollTrigger as z } from "../../node_modules/gsap/ScrollTrigger.es.js";
|
|
6
|
+
import { CustomEase as J } from "../../node_modules/gsap/CustomEase.es.js";
|
|
7
|
+
import { useState as K, useRef as f, useCallback as Q } from "react";
|
|
7
8
|
import { HighlightedTitle as N } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
8
|
-
import { Typography as
|
|
9
|
-
import { cn as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import { Typography as Y } from "../../components/Typography/Typography.es.js";
|
|
10
|
+
import { cn as A } from "../../utils/cn/cn.es.js";
|
|
11
|
+
import { CallToAction as Z } from "../CallToAction/CallToAction.es.js";
|
|
12
|
+
import _ from "./allInOneData.es.js";
|
|
12
13
|
import r from "./allInOne.module.css.es.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"smiles",
|
|
19
|
-
"balance",
|
|
20
|
-
"sleep",
|
|
21
|
-
"miles",
|
|
22
|
-
"love",
|
|
23
|
-
"fun",
|
|
24
|
-
"years"
|
|
25
|
-
], {
|
|
26
|
-
title1: ee,
|
|
27
|
-
title2: te,
|
|
28
|
-
description: ie,
|
|
29
|
-
scrollLabels: I,
|
|
30
|
-
images: j,
|
|
31
|
-
subtitle: oe,
|
|
14
|
+
import { useIsMobile as ee } from "../../utils/useIsMobile.es.js";
|
|
15
|
+
e.registerPlugin(z);
|
|
16
|
+
e.registerPlugin(J);
|
|
17
|
+
const {
|
|
18
|
+
subtitle: te,
|
|
32
19
|
titleTop: re,
|
|
33
|
-
scrollableLabels:
|
|
34
|
-
titleBottom:
|
|
35
|
-
|
|
20
|
+
scrollableLabels: ie,
|
|
21
|
+
titleBottom: oe,
|
|
22
|
+
description: ne,
|
|
23
|
+
descriptionText: se,
|
|
36
24
|
hsaText: le,
|
|
37
|
-
buttonText:
|
|
38
|
-
buttonLink:
|
|
39
|
-
backgroundImage:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
buttonText: "JOIN NOW",
|
|
48
|
-
buttonLink: "https://app.gethealthspan.com/#/product/signup/6896e50bc0af7d4d26738948",
|
|
49
|
-
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg",
|
|
50
|
-
title1: /* @__PURE__ */ i("p", { children: "Unlimited access to" }),
|
|
51
|
-
title2: /* @__PURE__ */ E("p", { children: [
|
|
52
|
-
"our ",
|
|
53
|
-
/* @__PURE__ */ i("b", { children: "team and tools" })
|
|
54
|
-
] }),
|
|
55
|
-
descriptionText: "Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",
|
|
56
|
-
scrollLabels: [
|
|
57
|
-
"Advanced labwork analysis",
|
|
58
|
-
"Research analysis",
|
|
59
|
-
"Dedicated physicians",
|
|
60
|
-
"Advanced biomarker profiling",
|
|
61
|
-
"Personalized health tracking",
|
|
62
|
-
"In house bioavailability testing",
|
|
63
|
-
"Advanced longevity protocols"
|
|
64
|
-
],
|
|
65
|
-
images: [
|
|
66
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_1_729dd70cbe.jpg",
|
|
67
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_2_3adf3d2087.jpg",
|
|
68
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_3_62002f2bdc.jpg",
|
|
69
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_4_e623019155.jpg",
|
|
70
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_5_bd81db569b.jpg",
|
|
71
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg",
|
|
72
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg",
|
|
73
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg",
|
|
74
|
-
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"
|
|
75
|
-
]
|
|
76
|
-
}, Te = () => {
|
|
77
|
-
const [_, B] = Y(!1), w = 1300, b = g(null), l = g(null), u = g(null), f = g(null), h = g(null), c = g(null), R = g(!1), D = e.matchMedia();
|
|
78
|
-
F(() => {
|
|
79
|
-
R.current = _;
|
|
80
|
-
}, [_]);
|
|
81
|
-
const H = J(() => {
|
|
82
|
-
if (!l.current || !b.current || !u.current || !f.current || !h.current || !c.current)
|
|
25
|
+
buttonText: ae,
|
|
26
|
+
buttonLink: ce,
|
|
27
|
+
backgroundImage: pe,
|
|
28
|
+
title1: de,
|
|
29
|
+
title2: ue,
|
|
30
|
+
scrollLabels: D,
|
|
31
|
+
images: I
|
|
32
|
+
} = _, ke = () => {
|
|
33
|
+
const [M, B] = K(!1), C = 1300, X = ee(C), h = f(null), c = f(null), S = f(null), m = f(null), g = f(null), b = f(null), p = f(null), H = f(!1), L = e.matchMedia(), V = Q(() => {
|
|
34
|
+
if (!c.current || !S.current || !h.current || !m.current || !g.current || !b.current || !p.current)
|
|
83
35
|
return;
|
|
84
|
-
const
|
|
36
|
+
const i = h.current, o = c.current, l = m.current, s = g.current, d = b.current, P = p.current, k = d.querySelectorAll("p");
|
|
85
37
|
if (k.length === 0) return;
|
|
86
|
-
k.forEach((
|
|
87
|
-
|
|
38
|
+
k.forEach((a, t) => {
|
|
39
|
+
a.style.zIndex = String(k.length - t);
|
|
88
40
|
});
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
41
|
+
const x = o.querySelectorAll('[data-type="image"]'), v = x.length;
|
|
42
|
+
x.forEach((a, t) => {
|
|
43
|
+
a.style.zIndex = String(v - t);
|
|
92
44
|
});
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
A > 0 && y.forEach((n, t) => {
|
|
97
|
-
const S = t * x, v = (t + 1) * x - V * x;
|
|
45
|
+
const y = i.scrollHeight / v, E = 0.7;
|
|
46
|
+
v > 0 && x.forEach((a, t) => {
|
|
47
|
+
const w = t * y, R = (t + 1) * y - E * y;
|
|
98
48
|
e.fromTo(
|
|
99
|
-
[
|
|
49
|
+
[a, k[t]],
|
|
100
50
|
{ opacity: 1 },
|
|
101
51
|
{
|
|
102
52
|
opacity: 0,
|
|
103
53
|
scrollTrigger: {
|
|
104
|
-
trigger:
|
|
105
|
-
start: () => `top+=${
|
|
106
|
-
end: () => `top+=${
|
|
54
|
+
trigger: i,
|
|
55
|
+
start: () => `top+=${w} top`,
|
|
56
|
+
end: () => `top+=${R} top`,
|
|
107
57
|
scrub: !0
|
|
108
58
|
}
|
|
109
59
|
}
|
|
110
60
|
);
|
|
111
61
|
});
|
|
112
|
-
const
|
|
62
|
+
const $ = o.getBoundingClientRect(), O = S.current.getBoundingClientRect(), W = l.getBoundingClientRect(), F = i.getBoundingClientRect();
|
|
113
63
|
e.set(d, {
|
|
114
|
-
y: `${
|
|
115
|
-
}),
|
|
64
|
+
y: () => `${$.bottom - F.top + 20}px`
|
|
65
|
+
}), L.add(
|
|
116
66
|
{
|
|
117
|
-
isMobile: `(max-width: ${
|
|
118
|
-
isDesktop: `(min-width: ${
|
|
67
|
+
isMobile: `(max-width: ${C - 1}px)`,
|
|
68
|
+
isDesktop: `(min-width: ${C}px)`
|
|
119
69
|
},
|
|
120
|
-
(
|
|
121
|
-
const t =
|
|
122
|
-
(t == null ? void 0 : t.isDesktop) && (e.set(
|
|
123
|
-
x: `${
|
|
124
|
-
}), e.set(
|
|
125
|
-
x: `${
|
|
126
|
-
})),
|
|
127
|
-
top: `${
|
|
128
|
-
}), e.set(
|
|
129
|
-
top: `${
|
|
70
|
+
(a) => {
|
|
71
|
+
const t = a.conditions, w = t == null ? void 0 : t.isMobile;
|
|
72
|
+
(t == null ? void 0 : t.isDesktop) && (e.set(l, {
|
|
73
|
+
x: () => `${$.left - W.width - 50}px`
|
|
74
|
+
}), e.set(s, {
|
|
75
|
+
x: () => `${$.right + 25}px`
|
|
76
|
+
})), w && (e.set(l, {
|
|
77
|
+
top: `${$.top - O.top - s.clientHeight - 40}px`
|
|
78
|
+
}), e.set(s, {
|
|
79
|
+
top: `${$.top - O.top - s.clientHeight}px`
|
|
130
80
|
}));
|
|
131
81
|
}
|
|
132
|
-
)
|
|
133
|
-
const P = window.getComputedStyle(o).borderRadius;
|
|
134
|
-
e.to(o, {
|
|
82
|
+
), e.to(o, {
|
|
135
83
|
scale: 1,
|
|
84
|
+
ease: "power1.in",
|
|
136
85
|
scrollTrigger: {
|
|
137
|
-
trigger:
|
|
86
|
+
trigger: i,
|
|
138
87
|
start: "top top",
|
|
139
88
|
end: "100% bottom",
|
|
140
89
|
scrub: !0,
|
|
141
|
-
onUpdate: (
|
|
142
|
-
if (!
|
|
90
|
+
onUpdate: (a) => {
|
|
91
|
+
if (!c.current || !p.current || !l || !s)
|
|
143
92
|
return;
|
|
144
93
|
const t = o.getBoundingClientRect();
|
|
145
|
-
|
|
94
|
+
L.add(
|
|
146
95
|
{
|
|
147
|
-
isMobile: `(max-width: ${
|
|
148
|
-
isDesktop: `(min-width: ${
|
|
96
|
+
isMobile: `(max-width: ${C - 1}px)`,
|
|
97
|
+
isDesktop: `(min-width: ${C}px)`
|
|
149
98
|
},
|
|
150
|
-
(
|
|
151
|
-
const
|
|
152
|
-
(
|
|
153
|
-
x: `${t.left -
|
|
154
|
-
}), e.set(
|
|
155
|
-
x: `${t.right + 25}px`
|
|
156
|
-
})),
|
|
157
|
-
top: `${t.top -
|
|
158
|
-
}), e.set(
|
|
159
|
-
top: `${t.top -
|
|
99
|
+
(R) => {
|
|
100
|
+
const u = R.conditions, T = u == null ? void 0 : u.isMobile;
|
|
101
|
+
(u == null ? void 0 : u.isDesktop) && (e.set(l, {
|
|
102
|
+
x: () => `${t.left - W.width - 50}px`
|
|
103
|
+
}), e.set(s, {
|
|
104
|
+
x: () => `${t.right + 25}px`
|
|
105
|
+
})), T && (e.set(l, {
|
|
106
|
+
top: () => `${t.top - s.clientHeight - 50}px`
|
|
107
|
+
}), e.set(s, {
|
|
108
|
+
top: () => `${t.top - 50}px`
|
|
160
109
|
}));
|
|
161
110
|
}
|
|
162
111
|
), e.set(d, {
|
|
163
112
|
y: `${t.bottom + 20}px`
|
|
164
113
|
});
|
|
165
|
-
const
|
|
166
|
-
if (t.bottom + 60 >=
|
|
114
|
+
const w = p.current.getBoundingClientRect();
|
|
115
|
+
if (t.bottom + 60 >= w.top ? e.to(P, { opacity: 0, duration: 0.3 }) : e.to(P, { opacity: 1, duration: 0.3 }), a.progress >= 0.99)
|
|
167
116
|
e.to(o, {
|
|
168
|
-
scale: 1,
|
|
169
117
|
borderRadius: 0,
|
|
170
118
|
duration: 0.3,
|
|
171
119
|
ease: "power1.inOut"
|
|
172
|
-
}),
|
|
120
|
+
}), e.to(l, { opacity: 1 }), e.to(s, { opacity: 1 }), H.current || (H.current = !0, B(!0), e.to([x, d.querySelectorAll("p")], {
|
|
173
121
|
opacity: 0,
|
|
174
122
|
duration: 0.8,
|
|
175
123
|
delay: 0.2,
|
|
@@ -177,137 +125,133 @@ const Z = [
|
|
|
177
125
|
overwrite: !0
|
|
178
126
|
}));
|
|
179
127
|
else if (e.to(o, {
|
|
180
|
-
borderRadius:
|
|
128
|
+
borderRadius: 999,
|
|
181
129
|
duration: 0.3,
|
|
182
130
|
ease: "power1.inOut"
|
|
183
|
-
}),
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
const
|
|
131
|
+
}), e.to(l, { opacity: 1 }), e.to(s, { opacity: 1 }), H.current) {
|
|
132
|
+
H.current = !1, B(!1), e.set(o, { borderRadius: 999 }), e.killTweensOf([x, d.querySelectorAll("p")]);
|
|
133
|
+
const R = d.querySelectorAll("p");
|
|
134
|
+
x.forEach((u, T) => {
|
|
135
|
+
const q = T * y, G = (T + 1) * y - E * y;
|
|
188
136
|
e.fromTo(
|
|
189
|
-
[
|
|
137
|
+
[u, R[T]],
|
|
190
138
|
{ opacity: 1 },
|
|
191
139
|
{
|
|
192
140
|
opacity: 0,
|
|
193
141
|
scrollTrigger: {
|
|
194
|
-
trigger:
|
|
195
|
-
start: () => `top+=${
|
|
196
|
-
end: () => `top+=${
|
|
142
|
+
trigger: i,
|
|
143
|
+
start: () => `top+=${q} top`,
|
|
144
|
+
end: () => `top+=${G} top`,
|
|
197
145
|
scrub: !0
|
|
198
146
|
}
|
|
199
147
|
}
|
|
200
148
|
);
|
|
201
|
-
}),
|
|
149
|
+
}), z.refresh();
|
|
202
150
|
}
|
|
203
151
|
}
|
|
204
152
|
}
|
|
205
153
|
});
|
|
206
154
|
}, [
|
|
207
|
-
l,
|
|
208
|
-
u,
|
|
209
|
-
f,
|
|
210
|
-
h,
|
|
211
155
|
c,
|
|
212
|
-
|
|
156
|
+
m,
|
|
157
|
+
g,
|
|
158
|
+
b,
|
|
159
|
+
p,
|
|
160
|
+
M
|
|
213
161
|
]);
|
|
214
|
-
return
|
|
162
|
+
return U(
|
|
215
163
|
() => {
|
|
216
|
-
if (!
|
|
164
|
+
if (!c.current || !h.current || !m.current || !g || !b.current || !p.current)
|
|
217
165
|
return;
|
|
218
|
-
const
|
|
219
|
-
|
|
166
|
+
const i = c.current, o = m.current, l = g.current, s = b.current, d = p.current;
|
|
167
|
+
return X ? e.set(i, {
|
|
220
168
|
aspectRatio: `${window.innerWidth} / ${window.innerHeight}`,
|
|
221
169
|
scale: 0.5
|
|
222
|
-
}) : e.set(
|
|
170
|
+
}) : e.set(i, {
|
|
223
171
|
scale: 0.3,
|
|
224
172
|
aspectRatio: `${window.innerWidth} / ${window.innerHeight}`
|
|
225
|
-
}),
|
|
226
|
-
|
|
227
|
-
return window.addEventListener("resize", () => {
|
|
228
|
-
T();
|
|
229
|
-
}), () => {
|
|
230
|
-
window.removeEventListener("resize", T), e.killTweensOf([s, a, o, p, d]);
|
|
173
|
+
}), V(), () => {
|
|
174
|
+
e.killTweensOf([i, s, o, l, d]);
|
|
231
175
|
};
|
|
232
176
|
},
|
|
233
177
|
{
|
|
234
|
-
scope:
|
|
178
|
+
scope: h,
|
|
235
179
|
dependencies: [
|
|
236
|
-
b,
|
|
237
|
-
l,
|
|
238
|
-
u,
|
|
239
|
-
f,
|
|
240
180
|
h,
|
|
241
|
-
|
|
181
|
+
c,
|
|
182
|
+
m,
|
|
183
|
+
g,
|
|
184
|
+
b,
|
|
185
|
+
V
|
|
242
186
|
]
|
|
243
187
|
}
|
|
244
|
-
), /* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
|
|
188
|
+
), /* @__PURE__ */ n("div", { className: r.root, children: /* @__PURE__ */ n("div", { ref: h, className: r.container, children: /* @__PURE__ */ j("div", { ref: S, className: r.pillContainerWrapper, children: [
|
|
189
|
+
/* @__PURE__ */ j("div", { ref: c, className: A("pillContainer", r.pillContainer), children: [
|
|
190
|
+
I == null ? void 0 : I.map((i, o) => /* @__PURE__ */ n(
|
|
247
191
|
"div",
|
|
248
192
|
{
|
|
249
193
|
className: r.imageBlock,
|
|
250
194
|
"data-type": "image",
|
|
251
|
-
style: { backgroundImage: `url(${
|
|
195
|
+
style: { backgroundImage: `url(${i})` }
|
|
252
196
|
},
|
|
253
197
|
o
|
|
254
198
|
)),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
|
|
199
|
+
/* @__PURE__ */ n("div", { className: r.callToActionContainer, children: M && /* @__PURE__ */ n(
|
|
200
|
+
Z,
|
|
257
201
|
{
|
|
258
|
-
subtitle:
|
|
202
|
+
subtitle: te,
|
|
259
203
|
titleTop: re,
|
|
260
|
-
scrollableLabels:
|
|
261
|
-
titleBottom:
|
|
262
|
-
description:
|
|
204
|
+
scrollableLabels: ie,
|
|
205
|
+
titleBottom: oe,
|
|
206
|
+
description: se,
|
|
263
207
|
hsaText: le,
|
|
264
|
-
buttonText:
|
|
265
|
-
buttonLink:
|
|
266
|
-
backgroundImage:
|
|
208
|
+
buttonText: ae,
|
|
209
|
+
buttonLink: ce,
|
|
210
|
+
backgroundImage: pe
|
|
267
211
|
}
|
|
268
212
|
) })
|
|
269
213
|
] }),
|
|
270
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ n("div", { ref: m, className: r.fixedHeader, children: /* @__PURE__ */ n(
|
|
271
215
|
N,
|
|
272
216
|
{
|
|
273
217
|
className: r.title1,
|
|
274
218
|
as: "div",
|
|
275
219
|
defaultVariant: "displayXs",
|
|
276
|
-
title:
|
|
220
|
+
title: de
|
|
277
221
|
}
|
|
278
222
|
) }),
|
|
279
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ n("div", { ref: g, className: r.fixedHeader, children: /* @__PURE__ */ n(
|
|
280
224
|
N,
|
|
281
225
|
{
|
|
282
226
|
className: r.title2,
|
|
283
227
|
as: "div",
|
|
284
228
|
defaultVariant: "displayXs",
|
|
285
|
-
title:
|
|
229
|
+
title: ue
|
|
286
230
|
}
|
|
287
231
|
) }),
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
|
|
232
|
+
/* @__PURE__ */ n("div", { ref: b, className: A("scrollableLabels", r.scrollableLabels), children: D == null ? void 0 : D.map((i, o) => /* @__PURE__ */ n(
|
|
233
|
+
Y,
|
|
290
234
|
{
|
|
291
235
|
as: "p",
|
|
292
236
|
defaultVariant: "labelLg",
|
|
293
237
|
mobileVariant: "labelSm",
|
|
294
238
|
className: r.scrollLabel,
|
|
295
|
-
children:
|
|
239
|
+
children: i
|
|
296
240
|
},
|
|
297
241
|
o
|
|
298
242
|
)) }),
|
|
299
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ n("div", { ref: p, className: A("description", r.description), children: /* @__PURE__ */ n(
|
|
300
244
|
N,
|
|
301
245
|
{
|
|
302
|
-
as: "
|
|
246
|
+
as: "div",
|
|
303
247
|
defaultVariant: "preambleMd",
|
|
304
248
|
mobileVariant: "preambleSm",
|
|
305
|
-
title:
|
|
249
|
+
title: ne,
|
|
306
250
|
className: r.descriptionText
|
|
307
251
|
}
|
|
308
252
|
) })
|
|
309
253
|
] }) }) });
|
|
310
254
|
};
|
|
311
255
|
export {
|
|
312
|
-
|
|
256
|
+
ke as AllInOne
|
|
313
257
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],i={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:e,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/#/product/signup/6896e50bc0af7d4d26738948",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg",title1:t.jsx("p",{children:"Unlimited access to"}),title2:t.jsxs("p",{children:["our ",t.jsx("b",{children:"team and tools"})]}),descriptionText:"Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",scrollLabels:["Advanced labwork analysis","Research analysis","Dedicated physicians","Advanced biomarker profiling","Personalized health tracking","In house bioavailability testing","Advanced longevity protocols","Health OS Dashboard"],images:["https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_1_729dd70cbe.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_2_3adf3d2087.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_3_62002f2bdc.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_4_e623019155.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_5_bd81db569b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"]};exports.default=i;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const allInOneData: {
|
|
2
|
+
subtitle: import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
titleTop: import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
scrollableLabels: string[];
|
|
5
|
+
titleBottom: import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
description: string;
|
|
7
|
+
hsaText: string;
|
|
8
|
+
buttonText: string;
|
|
9
|
+
buttonLink: string;
|
|
10
|
+
backgroundImage: string;
|
|
11
|
+
title1: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
title2: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
descriptionText: string;
|
|
14
|
+
scrollLabels: string[];
|
|
15
|
+
images: string[];
|
|
16
|
+
};
|
|
17
|
+
export default allInOneData;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
const i = [
|
|
3
|
+
"health",
|
|
4
|
+
"energy",
|
|
5
|
+
"strength",
|
|
6
|
+
"smiles",
|
|
7
|
+
"balance",
|
|
8
|
+
"sleep",
|
|
9
|
+
"miles",
|
|
10
|
+
"love",
|
|
11
|
+
"fun",
|
|
12
|
+
"years"
|
|
13
|
+
], p = {
|
|
14
|
+
subtitle: /* @__PURE__ */ t("p", { children: "YOUR LONGEVITY JOURNEY" }),
|
|
15
|
+
titleTop: /* @__PURE__ */ t("p", { children: "Get more" }),
|
|
16
|
+
scrollableLabels: i,
|
|
17
|
+
titleBottom: /* @__PURE__ */ t("p", { children: "out of life" }),
|
|
18
|
+
description: "It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",
|
|
19
|
+
hsaText: "Healthspan is HSA/FSA Eligible",
|
|
20
|
+
buttonText: "JOIN NOW",
|
|
21
|
+
buttonLink: "https://app.gethealthspan.com/#/product/signup/6896e50bc0af7d4d26738948",
|
|
22
|
+
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg",
|
|
23
|
+
title1: /* @__PURE__ */ t("p", { children: "Unlimited access to" }),
|
|
24
|
+
title2: /* @__PURE__ */ a("p", { children: [
|
|
25
|
+
"our ",
|
|
26
|
+
/* @__PURE__ */ t("b", { children: "team and tools" })
|
|
27
|
+
] }),
|
|
28
|
+
descriptionText: "Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",
|
|
29
|
+
scrollLabels: [
|
|
30
|
+
"Advanced labwork analysis",
|
|
31
|
+
"Research analysis",
|
|
32
|
+
"Dedicated physicians",
|
|
33
|
+
"Advanced biomarker profiling",
|
|
34
|
+
"Personalized health tracking",
|
|
35
|
+
"In house bioavailability testing",
|
|
36
|
+
"Advanced longevity protocols",
|
|
37
|
+
"Health OS Dashboard"
|
|
38
|
+
],
|
|
39
|
+
images: [
|
|
40
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_1_729dd70cbe.jpg",
|
|
41
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_2_3adf3d2087.jpg",
|
|
42
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_3_62002f2bdc.jpg",
|
|
43
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_4_e623019155.jpg",
|
|
44
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_5_bd81db569b.jpg",
|
|
45
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg",
|
|
46
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg",
|
|
47
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg",
|
|
48
|
+
"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"
|
|
49
|
+
]
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
p as default
|
|
53
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),G=require("../../components/Button/Button.cjs.js"),p=require("../../components/Typography/Typography.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),G=require("../../components/Button/Button.cjs.js"),p=require("../../components/Typography/Typography.cjs.js"),M=require("../../components/Icon/Icon.cjs.js"),A=require("../../components/Icon/constants.cjs.js"),R=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),K=require("../../node_modules/@gsap/react/src/index.cjs.js"),C=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),J=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(C.ScrollTrigger);const Q=({subtitle:k,titleTop:P,scrollableLabels:v,titleBottom:B,description:W,hsaText:$,buttonText:O,buttonLink:h,backgroundImage:X})=>{const o=l.useRef(null),i=l.useRef(null),T=l.useRef(null),g=l.useRef(null),m=l.useRef(null),N=l.useRef(null),y=l.useRef(null),b=l.useRef(null),x=l.useRef(null);return K.useGSAP(()=>{var V,w,I;const u=o.current&&o.current.getBoundingClientRect().top<window.innerHeight*.8,d=(V=T.current)==null?void 0:V.querySelector("p"),q=(w=N.current)==null?void 0:w.querySelector("p"),z=[d,g.current,i.current,m.current,q,y.current,b.current,x.current].filter(Boolean);a.gsap.set(z,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100});const f=a.gsap.to([d,g.current,i.current,m.current,q,y.current,b.current,x.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:.3,stagger:{amount:1,from:"start"},paused:!0});C.ScrollTrigger.create({trigger:o.current,start:"top 80%",end:"+=500",onEnter:()=>f.play(),onEnterBack:()=>f.play(),onLeaveBack:()=>f.reverse()}),u&&a.gsap.delayedCall(.1,()=>{f.play()});const r=(I=i.current)==null?void 0:I.querySelector("ul");if(!r)return;const _=r.innerHTML;let n=null,H=!0;const S=()=>{n&&n.kill(),r.innerHTML=_,a.gsap.set(r,{y:0});const s=Array.from(r.querySelectorAll("li"));if(s.length<=1)return;const j=s[0].clientHeight;if(!j)return;a.gsap.set(i.current,{height:()=>j,overflow:"hidden"});const L=Array.from(s);L.forEach(E=>{r.appendChild(E.cloneNode(!0))});const F=H&&!u?.3:0;n=a.gsap.timeline({repeat:-1,delay:F,onRepeat:()=>{a.gsap.set(r,{y:0})}}),L.forEach((E,D)=>{n&&n.to({},{duration:2}).to(r,{y:`-${(D+1)*j}`,duration:.5,ease:"power1.inOut"})}),H=!1},c=J.default(S,200);return S(),window.addEventListener("resize",c),()=>{var s;window.removeEventListener("resize",c),(s=c.kill)==null||s.call(c),n&&n.kill(),r&&(r.innerHTML=_,a.gsap.set(r,{y:0}))}},[v]),e.jsxs("section",{ref:o,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${X})`}}),e.jsxs("div",{className:t.default.container,children:[e.jsx("div",{className:t.default.leftContent,children:e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{ref:g,children:e.jsx(R.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:v.map((u,d)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(p.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:u})},d))})}),e.jsx("div",{ref:m,children:e.jsx(R.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:B})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(R.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:k})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(p.Typography,{defaultVariant:"labelMd",mobileVariant:"labelXs",emphasis:!0,className:t.default.arrow,as:"p",children:["(",e.jsx(M.Icon,{name:A.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:y,children:e.jsx(p.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:W})}),e.jsx("div",{ref:b,className:t.default.buttonWrapper,children:h&&e.jsx(G.Button,{as:h?"a":"button",href:h,variant:"secondary",size:"lg",children:O})}),e.jsxs("div",{ref:x,className:t.default.hsaEligible,children:[e.jsx(M.Icon,{name:A.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(p.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:$})]})]})})]})]})};exports.CallToAction=Q;
|