@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.
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),W=require("../../node_modules/@gsap/react/src/index.cjs.js"),e=require("../../node_modules/gsap/index.cjs.js"),P=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),d=require("react"),N=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),z=require("../../components/Typography/Typography.cjs.js"),q=require("../../utils/cn/cn.cjs.js"),G=require("../../utils/debounce.cjs.js"),U=require("../CallToAction/CallToAction.cjs.js"),r=require("./allInOne.module.css.cjs.js");e.gsap.registerPlugin(P.ScrollTrigger);const Y=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],{subtitle:F,titleTop:J,scrollableLabels:M,titleBottom:X,description:D,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee}={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:Y,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"},te=({title1:I,title2:O,description:L,scrollLabels:T,images:w})=>{const[_,B]=d.useState(!1),C=932,h=d.useRef(null),l=d.useRef(null),p=d.useRef(null),u=d.useRef(null),g=d.useRef(null),o=d.useRef(null),H=d.useCallback(()=>{if(!l.current||!h.current||!p.current||!u.current||!g.current||!o.current)return;const s=h.current,n=l.current,a=p.current,c=u.current,m=g.current,b=o.current,R=m.querySelectorAll("p");if(R.length===0)return;R.forEach((f,i)=>{f.style.zIndex=String(R.length-i)});const y=n.querySelectorAll("img"),j=y.length;y.forEach((f,i)=>{f.style.zIndex=String(j-i)});const S=s.scrollHeight/j,E=.8;j>0&&y.forEach((f,i)=>{const v=i*S,k=(i+1)*S-E*S;e.gsap.fromTo([f,R[i]],{opacity:1},{opacity:0,scrollTrigger:{trigger:s,start:()=>`top+=${v} top`,end:()=>`top+=${k} top`,scrub:!0}})});const $=n.getBoundingClientRect(),A=a.getBoundingClientRect(),x=s.getBoundingClientRect();e.gsap.set(m,{y:`${$.bottom-x.top+20}px`}),window.innerWidth>C?(e.gsap.set(a,{x:`${$.left-A.width-50}px`}),e.gsap.set(c,{x:`${$.right+25}px`})):(e.gsap.set(a,{top:`${x.top-c.clientHeight-25}px`}),e.gsap.set(c,{top:`${x.top-25}px`}));const V=window.getComputedStyle(n).borderRadius;e.gsap.to(n,{scale:1,scrollTrigger:{trigger:s,start:"top top",end:"95% bottom",scrub:!0,onUpdate:f=>{if(!l.current||!o.current||!a||!c)return;const i=n.getBoundingClientRect();window.innerWidth>C?(e.gsap.set(a,{x:`${i.left-A.width-50}px`}),e.gsap.set(c,{x:`${i.right+25}px`})):(e.gsap.set(a,{y:`${i.top-x.top-25}px`}),e.gsap.set(c,{y:`${i.top-x.top-25}px`})),e.gsap.set(m,{y:`${i.bottom+20}px`});const v=o.current.getBoundingClientRect();i.bottom+60>=v.top?e.gsap.to(b,{opacity:0,duration:.3}):e.gsap.to(b,{opacity:1,duration:.3}),f.progress>=.99?(e.gsap.to(n,{borderRadius:0,duration:.3,ease:"power1.inOut"}),e.gsap.to(y,{opacity:0,duration:.3,ease:"power1.inOut"})):e.gsap.to(n,{borderRadius:V,duration:.3,ease:"power1.inOut"})}},onComplete:()=>{B(!0)}})},[l,p,u,g,o]);return W.useGSAP(()=>{if(!l.current||!h.current||!p.current||!u||!g.current||!o.current)return;const s=l.current,n=p.current,a=u.current,c=g.current,m=o.current;window.innerWidth<=C?e.gsap.set(s,{aspectRatio:`${window.innerWidth} / ${window.innerHeight}`,scale:.5}):e.gsap.set(s,{scale:.3,aspectRatio:`${window.innerWidth} / ${window.innerHeight}`}),H();const b=G.default(H,600);return window.addEventListener("resize",()=>{b()}),()=>{window.removeEventListener("resize",b),e.gsap.killTweensOf([s,c,n,a,m])}},{scope:h,dependencies:[h,l,p,u,g,H]}),t.jsx("div",{className:r.default.root,children:t.jsx("div",{ref:h,className:r.default.container,children:t.jsxs("div",{className:r.default.pillContainerWrapper,children:[t.jsxs("div",{ref:l,className:q.cn("pillContainer",r.default.pillContainer),children:[w==null?void 0:w.map((s,n)=>t.jsx("img",{src:s,alt:`Image ${n+1}`},n)),t.jsx("div",{className:r.default.callToActionContainer,children:_&&t.jsx(U.CallToAction,{subtitle:F,titleTop:J,scrollableLabels:M,titleBottom:X,description:D,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee})})]}),t.jsx("div",{ref:p,className:r.default.fixedHeader,children:t.jsx(N.HighlightedTitle,{className:r.default.title1,as:"div",defaultVariant:"displayXs",title:I})}),t.jsx("div",{ref:u,className:r.default.fixedHeader,children:t.jsx(N.HighlightedTitle,{className:r.default.title2,as:"div",defaultVariant:"displayXs",title:O})}),t.jsx("div",{ref:g,className:q.cn("scrollableLabels",r.default.scrollableLabels),children:T==null?void 0:T.map((s,n)=>t.jsx(z.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",className:r.default.scrollLabel,children:s},n))}),t.jsx("div",{ref:o,className:q.cn("description",r.default.description),children:t.jsx(N.HighlightedTitle,{as:"p",defaultVariant:"preambleMd",mobileVariant:"preambleSm",title:L,className:r.default.descriptionText})})]})})})};exports.AllInOne=te;
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
- import { ReactNode } from 'react';
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 O } from "react/jsx-runtime";
3
- import { useGSAP as G } from "../../node_modules/@gsap/react/src/index.es.js";
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 U } from "../../node_modules/gsap/ScrollTrigger.es.js";
6
- import { useState as Y, useRef as g, useCallback as _ } from "react";
7
- import { HighlightedTitle as A } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
8
- import { Typography as q } from "../../components/Typography/Typography.es.js";
9
- import { cn as I } from "../../utils/cn/cn.es.js";
10
- import F from "../../utils/debounce.es.js";
11
- import { CallToAction as J } from "../CallToAction/CallToAction.es.js";
12
- import r from "./allInOne.module.css.es.js";
13
- e.registerPlugin(U);
14
- const X = [
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
- subtitle: D,
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
- description: Z,
35
+ descriptionText: Z,
31
36
  hsaText: ee,
32
37
  buttonText: te,
33
38
  buttonLink: ie,
34
- backgroundImage: ne
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: X,
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
- }, he = ({ title1: B, title2: E, description: V, scrollLabels: R, images: C }) => {
46
- const [k, W] = Y(!1), T = 932, f = g(null), l = g(null), d = g(null), p = g(null), u = g(null), s = g(null), S = _(() => {
47
- if (!l.current || !f.current || !d.current || !p.current || !u.current || !s.current)
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 o = f.current, i = l.current, a = d.current, c = p.current, h = u.current, b = s.current, w = h.querySelectorAll("p");
50
- if (w.length === 0) return;
51
- w.forEach((m, n) => {
52
- m.style.zIndex = String(w.length - n);
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 y = i.querySelectorAll("img"), H = y.length;
55
- y.forEach((m, n) => {
56
- m.style.zIndex = String(H - n);
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 N = o.scrollHeight / H, P = 0.8;
59
- H > 0 && y.forEach((m, n) => {
60
- const v = n * N, j = (n + 1) * N - P * N;
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
- [m, w[n]],
93
+ [u, x[o]],
63
94
  { opacity: 1 },
64
95
  {
65
96
  opacity: 0,
66
97
  scrollTrigger: {
67
- trigger: o,
68
- start: () => `top+=${v} top`,
69
- end: () => `top+=${j} 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 $ = i.getBoundingClientRect(), L = a.getBoundingClientRect(), x = o.getBoundingClientRect();
76
- e.set(h, {
77
- y: `${$.bottom - x.top + 20}px`
78
- }), window.innerWidth > T ? (e.set(a, {
79
- x: `${$.left - L.width - 50}px`
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: `${$.right + 25}px`
82
- })) : (e.set(a, {
83
- top: `${x.top - c.clientHeight - 25}px`
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: `${x.top - 25}px`
116
+ top: `${y.top - 25}px`
86
117
  }));
87
- const z = window.getComputedStyle(i).borderRadius;
118
+ const B = window.getComputedStyle(i).borderRadius;
88
119
  e.to(i, {
89
120
  scale: 1,
90
121
  scrollTrigger: {
91
- trigger: o,
122
+ trigger: r,
92
123
  start: "top top",
93
124
  end: "95% bottom",
94
125
  scrub: !0,
95
- onUpdate: (m) => {
96
- if (!l.current || !s.current || !a || !c)
126
+ onUpdate: (u) => {
127
+ if (!a.current || !l.current || !s || !c)
97
128
  return;
98
- const n = i.getBoundingClientRect();
99
- window.innerWidth > T ? (e.set(a, {
100
- x: `${n.left - L.width - 50}px`
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: `${n.right + 25}px`
103
- })) : (e.set(a, {
104
- y: `${n.top - x.top - 25}px`
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: `${n.top - x.top - 25}px`
107
- })), e.set(h, {
108
- y: `${n.bottom + 20}px`
137
+ y: `${o.top - y.top - 25}px`
138
+ })), e.set(g, {
139
+ y: `${o.bottom + 20}px`
109
140
  });
110
- const v = s.current.getBoundingClientRect();
111
- n.bottom + 60 >= v.top ? e.to(b, { opacity: 0, duration: 0.3 }) : e.to(b, { opacity: 1, duration: 0.3 }), m.progress >= 0.99 ? (e.to(i, {
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(y, {
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: z,
151
+ borderRadius: B,
121
152
  duration: 0.3,
122
153
  ease: "power1.inOut"
123
154
  });
124
155
  }
125
156
  },
126
157
  onComplete: () => {
127
- W(!0);
158
+ k(!0);
128
159
  }
129
160
  });
130
- }, [l, d, p, u, s]);
131
- return G(
161
+ }, [a, p, d, m, l]);
162
+ return V(
132
163
  () => {
133
- if (!l.current || !f.current || !d.current || !p || !u.current || !s.current)
164
+ if (!a.current || !f.current || !p.current || !d || !m.current || !l.current)
134
165
  return;
135
- const o = l.current, i = d.current, a = p.current, c = u.current, h = s.current;
136
- window.innerWidth <= T ? e.set(o, {
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(o, {
170
+ }) : e.set(r, {
140
171
  scale: 0.3,
141
172
  aspectRatio: `${window.innerWidth} / ${window.innerHeight}`
142
- }), S();
143
- const b = F(S, 600);
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([o, c, i, a, h]);
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
- l,
155
- d,
185
+ a,
156
186
  p,
157
- u,
158
- S
187
+ d,
188
+ m,
189
+ w
159
190
  ]
160
191
  }
161
- ), /* @__PURE__ */ t("div", { className: r.root, children: /* @__PURE__ */ t("div", { ref: f, className: r.container, children: /* @__PURE__ */ O("div", { className: r.pillContainerWrapper, children: [
162
- /* @__PURE__ */ O("div", { ref: l, className: I("pillContainer", r.pillContainer), children: [
163
- C == null ? void 0 : C.map((o, i) => /* @__PURE__ */ t("img", { src: o, alt: `Image ${i + 1}` }, i)),
164
- /* @__PURE__ */ t("div", { className: r.callToActionContainer, children: k && /* @__PURE__ */ t(
165
- J,
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: D,
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: ne
206
+ backgroundImage: oe
176
207
  }
177
208
  ) })
178
209
  ] }),
179
- /* @__PURE__ */ t("div", { ref: d, className: r.fixedHeader, children: /* @__PURE__ */ t(
180
- A,
210
+ /* @__PURE__ */ t("div", { ref: p, className: n.fixedHeader, children: /* @__PURE__ */ t(
211
+ S,
181
212
  {
182
- className: r.title1,
213
+ className: n.title1,
183
214
  as: "div",
184
215
  defaultVariant: "displayXs",
185
- title: B
216
+ title: D
186
217
  }
187
218
  ) }),
188
- /* @__PURE__ */ t("div", { ref: p, className: r.fixedHeader, children: /* @__PURE__ */ t(
189
- A,
219
+ /* @__PURE__ */ t("div", { ref: d, className: n.fixedHeader, children: /* @__PURE__ */ t(
220
+ S,
190
221
  {
191
- className: r.title2,
222
+ className: n.title2,
192
223
  as: "div",
193
224
  defaultVariant: "displayXs",
194
- title: E
225
+ title: F
195
226
  }
196
227
  ) }),
197
- /* @__PURE__ */ t("div", { ref: u, className: I("scrollableLabels", r.scrollableLabels), children: R == null ? void 0 : R.map((o, i) => /* @__PURE__ */ t(
198
- q,
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: r.scrollLabel,
204
- children: o
234
+ className: n.scrollLabel,
235
+ children: r
205
236
  },
206
237
  i
207
238
  )) }),
208
- /* @__PURE__ */ t("div", { ref: s, className: I("description", r.description), children: /* @__PURE__ */ t(
209
- A,
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: V,
215
- className: r.descriptionText
245
+ title: J,
246
+ className: n.descriptionText
216
247
  }
217
248
  ) })
218
249
  ] }) }) });
219
250
  };
220
251
  export {
221
- he as AllInOne
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"),t=require("./callToAction.module.css.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");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;
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.63",
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
  }