@zenpatient-org/healthspan-marketing-ui 0.1.63 → 0.1.65
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/components/ProgramCard/ProgramCard.cjs.js +1 -1
- package/dist/components/ProgramCard/ProgramCard.d.ts +2 -8
- package/dist/components/ProgramCard/ProgramCard.es.js +26 -36
- package/dist/components/ProgramCard/programCard.module.css.cjs.js +1 -1
- package/dist/components/ProgramCard/programCard.module.css.es.js +3 -1
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/AllInOne/AllInOne.cjs.js +1 -1
- package/dist/modules/AllInOne/AllInOne.d.ts +1 -11
- package/dist/modules/AllInOne/AllInOne.es.js +129 -98
- package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
- package/dist/modules/CallToAction/CallToAction.es.js +1 -1
- package/package.json +11 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),B=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"),p=require("react"),H=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),V=require("../../components/Typography/Typography.cjs.js"),S=require("../../utils/cn/cn.cjs.js"),P=require("../../utils/debounce.cjs.js"),W=require("../CallToAction/CallToAction.cjs.js"),a=require("./allInOne.module.css.cjs.js");e.gsap.registerPlugin(E.ScrollTrigger);const z=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],{title1:U,title2:G,description:Y,scrollLabels:$,images:A,subtitle:D,titleTop:F,scrollableLabels:J,titleBottom:M,descriptionText:X,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee}={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:z,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:"#",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.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"],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_67b550bfe1.jpg"]},te=()=>{const[L,I]=p.useState(!1),j=932,h=p.useRef(null),l=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=p.useRef(null),o=p.useRef(null),v=p.useCallback(()=>{if(!l.current||!h.current||!d.current||!u.current||!g.current||!o.current)return;const n=h.current,i=l.current,r=d.current,c=u.current,m=g.current,b=o.current,y=m.querySelectorAll("p");if(y.length===0)return;y.forEach((f,s)=>{f.style.zIndex=String(y.length-s)});const _=i.querySelectorAll("img"),R=_.length;_.forEach((f,s)=>{f.style.zIndex=String(R-s)});const T=n.scrollHeight/R,q=.8;R>0&&_.forEach((f,s)=>{const C=s*T,k=(s+1)*T-q*T;e.gsap.fromTo([f,y[s]],{opacity:1},{opacity:0,scrollTrigger:{trigger:n,start:()=>`top+=${C} top`,end:()=>`top+=${k} top`,scrub:!0}})});const w=i.getBoundingClientRect(),N=r.getBoundingClientRect(),x=n.getBoundingClientRect();e.gsap.set(m,{y:`${w.bottom-x.top+20}px`}),window.innerWidth>j?(e.gsap.set(r,{x:`${w.left-N.width-50}px`}),e.gsap.set(c,{x:`${w.right+25}px`})):(e.gsap.set(r,{top:`${x.top-c.clientHeight-25}px`}),e.gsap.set(c,{top:`${x.top-25}px`}));const O=window.getComputedStyle(i).borderRadius;e.gsap.to(i,{scale:1,scrollTrigger:{trigger:n,start:"top top",end:"95% bottom",scrub:!0,onUpdate:f=>{if(!l.current||!o.current||!r||!c)return;const s=i.getBoundingClientRect();window.innerWidth>j?(e.gsap.set(r,{x:`${s.left-N.width-50}px`}),e.gsap.set(c,{x:`${s.right+25}px`})):(e.gsap.set(r,{y:`${s.top-x.top-25}px`}),e.gsap.set(c,{y:`${s.top-x.top-25}px`})),e.gsap.set(m,{y:`${s.bottom+20}px`});const C=o.current.getBoundingClientRect();s.bottom+60>=C.top?e.gsap.to(b,{opacity:0,duration:.3}):e.gsap.to(b,{opacity:1,duration:.3}),f.progress>=.99?(e.gsap.to(i,{borderRadius:0,duration:.3,ease:"power1.inOut"}),e.gsap.to(_,{opacity:0,duration:.3,ease:"power1.inOut"})):e.gsap.to(i,{borderRadius:O,duration:.3,ease:"power1.inOut"})}},onComplete:()=>{I(!0)}})},[l,d,u,g,o]);return B.useGSAP(()=>{if(!l.current||!h.current||!d.current||!u||!g.current||!o.current)return;const n=l.current,i=d.current,r=u.current,c=g.current,m=o.current;window.innerWidth<=j?e.gsap.set(n,{aspectRatio:`${window.innerWidth} / ${window.innerHeight}`,scale:.5}):e.gsap.set(n,{scale:.3,aspectRatio:`${window.innerWidth} / ${window.innerHeight}`}),v();const b=P.default(v,600);return window.addEventListener("resize",()=>{b()}),()=>{window.removeEventListener("resize",b),e.gsap.killTweensOf([n,c,i,r,m])}},{scope:h,dependencies:[h,l,d,u,g,v]}),t.jsx("div",{className:a.default.root,children:t.jsx("div",{ref:h,className:a.default.container,children:t.jsxs("div",{className:a.default.pillContainerWrapper,children:[t.jsxs("div",{ref:l,className:S.cn("pillContainer",a.default.pillContainer),children:[A==null?void 0:A.map((n,i)=>t.jsx("img",{src:n,alt:`Image ${i+1}`},i)),t.jsx("div",{className:a.default.callToActionContainer,children:L&&t.jsx(W.CallToAction,{subtitle:D,titleTop:F,scrollableLabels:J,titleBottom:M,description:X,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee})})]}),t.jsx("div",{ref:d,className:a.default.fixedHeader,children:t.jsx(H.HighlightedTitle,{className:a.default.title1,as:"div",defaultVariant:"displayXs",title:U})}),t.jsx("div",{ref:u,className:a.default.fixedHeader,children:t.jsx(H.HighlightedTitle,{className:a.default.title2,as:"div",defaultVariant:"displayXs",title:G})}),t.jsx("div",{ref:g,className:S.cn("scrollableLabels",a.default.scrollableLabels),children:$==null?void 0:$.map((n,i)=>t.jsx(V.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",className:a.default.scrollLabel,children:n},i))}),t.jsx("div",{ref:o,className:S.cn("description",a.default.description),children:t.jsx(H.HighlightedTitle,{as:"p",defaultVariant:"preambleMd",mobileVariant:"preambleSm",title:Y,className:a.default.descriptionText})})]})})})};exports.AllInOne=te;
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type AllInOneProps = {
|
|
4
|
-
title1?: ReactNode;
|
|
5
|
-
title2?: ReactNode;
|
|
6
|
-
description?: string;
|
|
7
|
-
scrollLabels?: readonly string[];
|
|
8
|
-
images?: readonly string[];
|
|
9
|
-
};
|
|
10
|
-
export declare const AllInOne: ({ title1, title2, description, scrollLabels, images }: AllInOneProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
1
|
+
export declare const AllInOne: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as
|
|
3
|
-
import { useGSAP as
|
|
2
|
+
import { jsx as t, jsxs as A } from "react/jsx-runtime";
|
|
3
|
+
import { useGSAP as V } 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 { useState as
|
|
7
|
-
import { HighlightedTitle as
|
|
8
|
-
import { Typography as
|
|
9
|
-
import { cn as
|
|
10
|
-
import
|
|
11
|
-
import { CallToAction as
|
|
12
|
-
import
|
|
13
|
-
e.registerPlugin(
|
|
14
|
-
const
|
|
5
|
+
import { ScrollTrigger as W } from "../../node_modules/gsap/ScrollTrigger.es.js";
|
|
6
|
+
import { useState as P, useRef as h, useCallback as z } from "react";
|
|
7
|
+
import { HighlightedTitle as S } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
8
|
+
import { Typography as U } from "../../components/Typography/Typography.es.js";
|
|
9
|
+
import { cn as N } from "../../utils/cn/cn.es.js";
|
|
10
|
+
import G from "../../utils/debounce.es.js";
|
|
11
|
+
import { CallToAction as Y } from "../CallToAction/CallToAction.es.js";
|
|
12
|
+
import n from "./allInOne.module.css.es.js";
|
|
13
|
+
e.registerPlugin(W);
|
|
14
|
+
const q = [
|
|
15
15
|
"health",
|
|
16
16
|
"energy",
|
|
17
17
|
"strength",
|
|
@@ -23,148 +23,179 @@ const X = [
|
|
|
23
23
|
"fun",
|
|
24
24
|
"years"
|
|
25
25
|
], {
|
|
26
|
-
|
|
26
|
+
title1: D,
|
|
27
|
+
title2: F,
|
|
28
|
+
description: J,
|
|
29
|
+
scrollLabels: $,
|
|
30
|
+
images: L,
|
|
31
|
+
subtitle: X,
|
|
27
32
|
titleTop: M,
|
|
28
33
|
scrollableLabels: K,
|
|
29
34
|
titleBottom: Q,
|
|
30
|
-
|
|
35
|
+
descriptionText: Z,
|
|
31
36
|
hsaText: ee,
|
|
32
37
|
buttonText: te,
|
|
33
38
|
buttonLink: ie,
|
|
34
|
-
backgroundImage:
|
|
39
|
+
backgroundImage: oe
|
|
35
40
|
} = {
|
|
36
41
|
subtitle: /* @__PURE__ */ t("p", { children: "YOUR LONGEVITY JOURNEY" }),
|
|
37
42
|
titleTop: /* @__PURE__ */ t("p", { children: "Get more" }),
|
|
38
|
-
scrollableLabels:
|
|
43
|
+
scrollableLabels: q,
|
|
39
44
|
titleBottom: /* @__PURE__ */ t("p", { children: "out of life" }),
|
|
40
45
|
description: "It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",
|
|
41
46
|
hsaText: "Healthspan is HSA/FSA Eligible",
|
|
42
47
|
buttonText: "JOIN NOW",
|
|
43
48
|
buttonLink: "#",
|
|
44
|
-
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg",
|
|
50
|
+
title1: /* @__PURE__ */ t("p", { children: "Unlimited access to" }),
|
|
51
|
+
title2: /* @__PURE__ */ A("p", { children: [
|
|
52
|
+
"our ",
|
|
53
|
+
/* @__PURE__ */ t("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_67b550bfe1.jpg"
|
|
75
|
+
]
|
|
76
|
+
}, ge = () => {
|
|
77
|
+
const [j, k] = P(!1), _ = 932, f = h(null), a = h(null), p = h(null), d = h(null), m = h(null), l = h(null), w = z(() => {
|
|
78
|
+
if (!a.current || !f.current || !p.current || !d.current || !m.current || !l.current)
|
|
48
79
|
return;
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
|
|
80
|
+
const r = f.current, i = a.current, s = p.current, c = d.current, g = m.current, b = l.current, x = g.querySelectorAll("p");
|
|
81
|
+
if (x.length === 0) return;
|
|
82
|
+
x.forEach((u, o) => {
|
|
83
|
+
u.style.zIndex = String(x.length - o);
|
|
53
84
|
});
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
85
|
+
const v = i.querySelectorAll("img"), R = v.length;
|
|
86
|
+
v.forEach((u, o) => {
|
|
87
|
+
u.style.zIndex = String(R - o);
|
|
57
88
|
});
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const
|
|
89
|
+
const C = r.scrollHeight / R, O = 0.8;
|
|
90
|
+
R > 0 && v.forEach((u, o) => {
|
|
91
|
+
const H = o * C, E = (o + 1) * C - O * C;
|
|
61
92
|
e.fromTo(
|
|
62
|
-
[
|
|
93
|
+
[u, x[o]],
|
|
63
94
|
{ opacity: 1 },
|
|
64
95
|
{
|
|
65
96
|
opacity: 0,
|
|
66
97
|
scrollTrigger: {
|
|
67
|
-
trigger:
|
|
68
|
-
start: () => `top+=${
|
|
69
|
-
end: () => `top+=${
|
|
98
|
+
trigger: r,
|
|
99
|
+
start: () => `top+=${H} top`,
|
|
100
|
+
end: () => `top+=${E} top`,
|
|
70
101
|
scrub: !0
|
|
71
102
|
}
|
|
72
103
|
}
|
|
73
104
|
);
|
|
74
105
|
});
|
|
75
|
-
const
|
|
76
|
-
e.set(
|
|
77
|
-
y: `${
|
|
78
|
-
}), window.innerWidth >
|
|
79
|
-
x: `${
|
|
106
|
+
const T = i.getBoundingClientRect(), I = s.getBoundingClientRect(), y = r.getBoundingClientRect();
|
|
107
|
+
e.set(g, {
|
|
108
|
+
y: `${T.bottom - y.top + 20}px`
|
|
109
|
+
}), window.innerWidth > _ ? (e.set(s, {
|
|
110
|
+
x: `${T.left - I.width - 50}px`
|
|
80
111
|
}), e.set(c, {
|
|
81
|
-
x: `${
|
|
82
|
-
})) : (e.set(
|
|
83
|
-
top: `${
|
|
112
|
+
x: `${T.right + 25}px`
|
|
113
|
+
})) : (e.set(s, {
|
|
114
|
+
top: `${y.top - c.clientHeight - 25}px`
|
|
84
115
|
}), e.set(c, {
|
|
85
|
-
top: `${
|
|
116
|
+
top: `${y.top - 25}px`
|
|
86
117
|
}));
|
|
87
|
-
const
|
|
118
|
+
const B = window.getComputedStyle(i).borderRadius;
|
|
88
119
|
e.to(i, {
|
|
89
120
|
scale: 1,
|
|
90
121
|
scrollTrigger: {
|
|
91
|
-
trigger:
|
|
122
|
+
trigger: r,
|
|
92
123
|
start: "top top",
|
|
93
124
|
end: "95% bottom",
|
|
94
125
|
scrub: !0,
|
|
95
|
-
onUpdate: (
|
|
96
|
-
if (!
|
|
126
|
+
onUpdate: (u) => {
|
|
127
|
+
if (!a.current || !l.current || !s || !c)
|
|
97
128
|
return;
|
|
98
|
-
const
|
|
99
|
-
window.innerWidth >
|
|
100
|
-
x: `${
|
|
129
|
+
const o = i.getBoundingClientRect();
|
|
130
|
+
window.innerWidth > _ ? (e.set(s, {
|
|
131
|
+
x: `${o.left - I.width - 50}px`
|
|
101
132
|
}), e.set(c, {
|
|
102
|
-
x: `${
|
|
103
|
-
})) : (e.set(
|
|
104
|
-
y: `${
|
|
133
|
+
x: `${o.right + 25}px`
|
|
134
|
+
})) : (e.set(s, {
|
|
135
|
+
y: `${o.top - y.top - 25}px`
|
|
105
136
|
}), e.set(c, {
|
|
106
|
-
y: `${
|
|
107
|
-
})), e.set(
|
|
108
|
-
y: `${
|
|
137
|
+
y: `${o.top - y.top - 25}px`
|
|
138
|
+
})), e.set(g, {
|
|
139
|
+
y: `${o.bottom + 20}px`
|
|
109
140
|
});
|
|
110
|
-
const
|
|
111
|
-
|
|
141
|
+
const H = l.current.getBoundingClientRect();
|
|
142
|
+
o.bottom + 60 >= H.top ? e.to(b, { opacity: 0, duration: 0.3 }) : e.to(b, { opacity: 1, duration: 0.3 }), u.progress >= 0.99 ? (e.to(i, {
|
|
112
143
|
borderRadius: 0,
|
|
113
144
|
duration: 0.3,
|
|
114
145
|
ease: "power1.inOut"
|
|
115
|
-
}), e.to(
|
|
146
|
+
}), e.to(v, {
|
|
116
147
|
opacity: 0,
|
|
117
148
|
duration: 0.3,
|
|
118
149
|
ease: "power1.inOut"
|
|
119
150
|
})) : e.to(i, {
|
|
120
|
-
borderRadius:
|
|
151
|
+
borderRadius: B,
|
|
121
152
|
duration: 0.3,
|
|
122
153
|
ease: "power1.inOut"
|
|
123
154
|
});
|
|
124
155
|
}
|
|
125
156
|
},
|
|
126
157
|
onComplete: () => {
|
|
127
|
-
|
|
158
|
+
k(!0);
|
|
128
159
|
}
|
|
129
160
|
});
|
|
130
|
-
}, [
|
|
131
|
-
return
|
|
161
|
+
}, [a, p, d, m, l]);
|
|
162
|
+
return V(
|
|
132
163
|
() => {
|
|
133
|
-
if (!
|
|
164
|
+
if (!a.current || !f.current || !p.current || !d || !m.current || !l.current)
|
|
134
165
|
return;
|
|
135
|
-
const
|
|
136
|
-
window.innerWidth <=
|
|
166
|
+
const r = a.current, i = p.current, s = d.current, c = m.current, g = l.current;
|
|
167
|
+
window.innerWidth <= _ ? e.set(r, {
|
|
137
168
|
aspectRatio: `${window.innerWidth} / ${window.innerHeight}`,
|
|
138
169
|
scale: 0.5
|
|
139
|
-
}) : e.set(
|
|
170
|
+
}) : e.set(r, {
|
|
140
171
|
scale: 0.3,
|
|
141
172
|
aspectRatio: `${window.innerWidth} / ${window.innerHeight}`
|
|
142
|
-
}),
|
|
143
|
-
const b =
|
|
173
|
+
}), w();
|
|
174
|
+
const b = G(w, 600);
|
|
144
175
|
return window.addEventListener("resize", () => {
|
|
145
176
|
b();
|
|
146
177
|
}), () => {
|
|
147
|
-
window.removeEventListener("resize", b), e.killTweensOf([
|
|
178
|
+
window.removeEventListener("resize", b), e.killTweensOf([r, c, i, s, g]);
|
|
148
179
|
};
|
|
149
180
|
},
|
|
150
181
|
{
|
|
151
182
|
scope: f,
|
|
152
183
|
dependencies: [
|
|
153
184
|
f,
|
|
154
|
-
|
|
155
|
-
d,
|
|
185
|
+
a,
|
|
156
186
|
p,
|
|
157
|
-
|
|
158
|
-
|
|
187
|
+
d,
|
|
188
|
+
m,
|
|
189
|
+
w
|
|
159
190
|
]
|
|
160
191
|
}
|
|
161
|
-
), /* @__PURE__ */ t("div", { className:
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
164
|
-
/* @__PURE__ */ t("div", { className:
|
|
165
|
-
|
|
192
|
+
), /* @__PURE__ */ t("div", { className: n.root, children: /* @__PURE__ */ t("div", { ref: f, className: n.container, children: /* @__PURE__ */ A("div", { className: n.pillContainerWrapper, children: [
|
|
193
|
+
/* @__PURE__ */ A("div", { ref: a, className: N("pillContainer", n.pillContainer), children: [
|
|
194
|
+
L == null ? void 0 : L.map((r, i) => /* @__PURE__ */ t("img", { src: r, alt: `Image ${i + 1}` }, i)),
|
|
195
|
+
/* @__PURE__ */ t("div", { className: n.callToActionContainer, children: j && /* @__PURE__ */ t(
|
|
196
|
+
Y,
|
|
166
197
|
{
|
|
167
|
-
subtitle:
|
|
198
|
+
subtitle: X,
|
|
168
199
|
titleTop: M,
|
|
169
200
|
scrollableLabels: K,
|
|
170
201
|
titleBottom: Q,
|
|
@@ -172,51 +203,51 @@ const X = [
|
|
|
172
203
|
hsaText: ee,
|
|
173
204
|
buttonText: te,
|
|
174
205
|
buttonLink: ie,
|
|
175
|
-
backgroundImage:
|
|
206
|
+
backgroundImage: oe
|
|
176
207
|
}
|
|
177
208
|
) })
|
|
178
209
|
] }),
|
|
179
|
-
/* @__PURE__ */ t("div", { ref:
|
|
180
|
-
|
|
210
|
+
/* @__PURE__ */ t("div", { ref: p, className: n.fixedHeader, children: /* @__PURE__ */ t(
|
|
211
|
+
S,
|
|
181
212
|
{
|
|
182
|
-
className:
|
|
213
|
+
className: n.title1,
|
|
183
214
|
as: "div",
|
|
184
215
|
defaultVariant: "displayXs",
|
|
185
|
-
title:
|
|
216
|
+
title: D
|
|
186
217
|
}
|
|
187
218
|
) }),
|
|
188
|
-
/* @__PURE__ */ t("div", { ref:
|
|
189
|
-
|
|
219
|
+
/* @__PURE__ */ t("div", { ref: d, className: n.fixedHeader, children: /* @__PURE__ */ t(
|
|
220
|
+
S,
|
|
190
221
|
{
|
|
191
|
-
className:
|
|
222
|
+
className: n.title2,
|
|
192
223
|
as: "div",
|
|
193
224
|
defaultVariant: "displayXs",
|
|
194
|
-
title:
|
|
225
|
+
title: F
|
|
195
226
|
}
|
|
196
227
|
) }),
|
|
197
|
-
/* @__PURE__ */ t("div", { ref:
|
|
198
|
-
|
|
228
|
+
/* @__PURE__ */ t("div", { ref: m, className: N("scrollableLabels", n.scrollableLabels), children: $ == null ? void 0 : $.map((r, i) => /* @__PURE__ */ t(
|
|
229
|
+
U,
|
|
199
230
|
{
|
|
200
231
|
as: "p",
|
|
201
232
|
defaultVariant: "labelLg",
|
|
202
233
|
mobileVariant: "labelSm",
|
|
203
|
-
className:
|
|
204
|
-
children:
|
|
234
|
+
className: n.scrollLabel,
|
|
235
|
+
children: r
|
|
205
236
|
},
|
|
206
237
|
i
|
|
207
238
|
)) }),
|
|
208
|
-
/* @__PURE__ */ t("div", { ref:
|
|
209
|
-
|
|
239
|
+
/* @__PURE__ */ t("div", { ref: l, className: N("description", n.description), children: /* @__PURE__ */ t(
|
|
240
|
+
S,
|
|
210
241
|
{
|
|
211
242
|
as: "p",
|
|
212
243
|
defaultVariant: "preambleMd",
|
|
213
244
|
mobileVariant: "preambleSm",
|
|
214
|
-
title:
|
|
215
|
-
className:
|
|
245
|
+
title: J,
|
|
246
|
+
className: n.descriptionText
|
|
216
247
|
}
|
|
217
248
|
) })
|
|
218
249
|
] }) }) });
|
|
219
250
|
};
|
|
220
251
|
export {
|
|
221
|
-
|
|
252
|
+
ge as AllInOne
|
|
222
253
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),X=require("../../components/Button/Button.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),w=require("../../components/Icon/Icon.cjs.js"),M=require("../../components/Icon/constants.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),X=require("../../components/Button/Button.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),w=require("../../components/Icon/Icon.cjs.js"),M=require("../../components/Icon/constants.cjs.js"),x=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),z=require("../../node_modules/@gsap/react/src/index.cjs.js"),F=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),D=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(F.ScrollTrigger);const G=({subtitle:A,titleTop:E,scrollableLabels:j,titleBottom:P,description:C,hsaText:W,buttonText:k,buttonLink:f,backgroundImage:B})=>{const R=l.useRef(null),i=l.useRef(null),T=l.useRef(null),p=l.useRef(null),h=l.useRef(null),N=l.useRef(null),m=l.useRef(null),g=l.useRef(null),y=l.useRef(null);return z.useGSAP(()=>{var V,L,H;const o=(V=T.current)==null?void 0:V.querySelector("p"),u=(L=N.current)==null?void 0:L.querySelector("p"),$=[o,p.current,i.current,h.current,u,m.current,g.current,y.current].filter(Boolean);a.gsap.set($,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100}),a.gsap.to([o,p.current,i.current,h.current,u,m.current,g.current,y.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:1,stagger:{amount:1,from:"start"},scrollTrigger:{trigger:R.current,start:"top center",end:"+=500"}});const r=(H=i.current)==null?void 0:H.querySelector("ul");if(!r)return;const v=r.innerHTML;let s=null,q=!0;const _=()=>{s&&s.kill(),r.innerHTML=v,a.gsap.set(r,{y:0});const n=Array.from(r.querySelectorAll("li"));if(n.length<=1)return;const b=n[0].clientHeight;if(!b)return;a.gsap.set(i.current,{height:b,overflow:"hidden"});const I=Array.from(n);I.forEach(S=>{r.appendChild(S.cloneNode(!0))}),s=a.gsap.timeline({repeat:-1,delay:q?2.5:0,onRepeat:()=>{a.gsap.set(r,{y:0})}}),I.forEach((S,O)=>{s&&s.to({},{duration:2}).to(r,{y:`-${(O+1)*b}`,duration:.5,ease:"power1.inOut"})}),q=!1},c=D.default(_,200);return _(),window.addEventListener("resize",c),()=>{var n;window.removeEventListener("resize",c),(n=c.kill)==null||n.call(c),s&&s.kill(),r&&(r.innerHTML=v,a.gsap.set(r,{y:0}))}},[j]),e.jsxs("section",{ref:R,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${B})`}}),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:p,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:E})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:j.map((o,u)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(d.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:o})},u))})}),e.jsx("div",{ref:h,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(x.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:A})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(d.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:t.default.arrow,as:"p",children:["(",e.jsx(w.Icon,{name:M.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:m,children:e.jsx(d.Typography,{defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:C})}),e.jsx("div",{ref:g,className:t.default.buttonWrapper,children:f&&e.jsx(X.Button,{as:f?"a":"button",href:f,variant:"secondary",size:"lg",children:k})}),e.jsxs("div",{ref:y,className:t.default.hsaEligible,children:[e.jsx(w.Icon,{name:M.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(d.Typography,{defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:W})]})]})})]})]})};exports.CallToAction=G;
|
|
@@ -5,12 +5,12 @@ import { Button as j } from "../../components/Button/Button.es.js";
|
|
|
5
5
|
import { Typography as u } from "../../components/Typography/Typography.es.js";
|
|
6
6
|
import { Icon as A } from "../../components/Icon/Icon.es.js";
|
|
7
7
|
import { EIconName as I } from "../../components/Icon/constants.es.js";
|
|
8
|
-
import r from "./callToAction.module.css.es.js";
|
|
9
8
|
import { HighlightedTitle as v } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
10
9
|
import { gsap as a } from "../../node_modules/gsap/index.es.js";
|
|
11
10
|
import { useGSAP as $ } from "../../node_modules/@gsap/react/src/index.es.js";
|
|
12
11
|
import { ScrollTrigger as D } from "../../node_modules/gsap/ScrollTrigger.es.js";
|
|
13
12
|
import G from "../../utils/debounce.es.js";
|
|
13
|
+
import r from "./callToAction.module.css.es.js";
|
|
14
14
|
a.registerPlugin(D);
|
|
15
15
|
const ne = ({
|
|
16
16
|
subtitle: k,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenpatient-org/healthspan-marketing-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.65",
|
|
4
4
|
"description": "Design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -501,6 +501,16 @@
|
|
|
501
501
|
"import": "./dist/modules/ProgramDetails/ProgramDetails.es.js",
|
|
502
502
|
"require": "./dist/modules/ProgramDetails/ProgramDetails.cjs.js"
|
|
503
503
|
},
|
|
504
|
+
"./TextBlockAnimated": {
|
|
505
|
+
"types": "./dist/modules/TextBlockAnimated/TextBlockAnimated.d.ts",
|
|
506
|
+
"import": "./dist/modules/TextBlockAnimated/TextBlockAnimated.es.js",
|
|
507
|
+
"require": "./dist/modules/TextBlockAnimated/TextBlockAnimated.cjs.js"
|
|
508
|
+
},
|
|
509
|
+
"./CallToAction": {
|
|
510
|
+
"types": "./dist/modules/CallToAction/CallToAction.d.ts",
|
|
511
|
+
"import": "./dist/modules/CallToAction/CallToAction.es.js",
|
|
512
|
+
"require": "./dist/modules/CallToAction/CallToAction.cjs.js"
|
|
513
|
+
},
|
|
504
514
|
"./Bubbles": {
|
|
505
515
|
"types": "./dist/pageComponents/Bubbles/Bubbles.d.ts",
|
|
506
516
|
"import": "./dist/pageComponents/Bubbles/Bubbles.es.js",
|
|
@@ -566,11 +576,6 @@
|
|
|
566
576
|
"import": "./dist/pageComponents/Banner/Banner.es.js",
|
|
567
577
|
"require": "./dist/pageComponents/Banner/Banner.cjs.js"
|
|
568
578
|
},
|
|
569
|
-
"./TextBlockAnimated": {
|
|
570
|
-
"types": "./dist/modules/TextBlockAnimated/TextBlockAnimated.d.ts",
|
|
571
|
-
"import": "./dist/modules/TextBlockAnimated/TextBlockAnimated.es.js",
|
|
572
|
-
"require": "./dist/modules/TextBlockAnimated/TextBlockAnimated.cjs.js"
|
|
573
|
-
},
|
|
574
579
|
"./dist/*.css": "./dist/*.css"
|
|
575
580
|
}
|
|
576
581
|
}
|