@zenpatient-org/healthspan-marketing-ui 0.1.54 → 0.1.56

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 e=require("react/jsx-runtime"),u=require("../../components/Button/Button.cjs.js"),m=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),o=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js"),a=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/StudyGridCard/StudyGridCard.cjs.js"),t=require("./curiosity.module.css.cjs.js"),f=require("../../utils/cn/cn.cjs.js"),h=({title:c,description:r,studies:s,indexed:i})=>e.jsx("div",{className:t.default.root,children:e.jsxs("div",{className:f.cn(t.default.contentContainer,{[t.default.notIndexed]:!i}),children:[e.jsxs("div",{className:t.default.containerHeader,children:[e.jsx(m.HighlightedTitle,{title:c,className:t.default.title,defaultVariant:"displayXl",mobileVariant:"displayXs"}),e.jsxs("div",{className:t.default.contentTextContainer,children:[r&&e.jsx(a.Typography,{defaultVariant:"bodyLg",mobileVariant:"bodySm",className:t.default.contentText,children:r}),e.jsx("div",{className:t.default.buttonContainer,children:e.jsx(u.Button,{as:"a",href:"/",variant:"muted",size:"lg",children:"View all studies"})})]})]}),i&&e.jsxs("div",{className:t.default.dividerContainer,children:[e.jsx(a.Typography,{defaultVariant:"labelMd",children:i.number}),e.jsx("div",{className:t.default.divider}),e.jsx(a.Typography,{defaultVariant:"labelMd",emphasis:!0,children:i.label})]}),e.jsxs("div",{className:t.default.containerBottom,children:[e.jsx(o.InfiniteScroll,{items:s,speed:50,contentClassName:t.default.infiniteScrollContent,itemClassName:t.default.infiniteScrollItem,rootClassName:t.default.infiniteScrollRoot,renderItem:(l,n)=>e.jsx(d.StudyGridCard,{...l,compressed:!0},n)}),e.jsx(o.InfiniteScroll,{items:s,speed:50,direction:"right",contentClassName:t.default.infiniteScrollContent,itemClassName:t.default.infiniteScrollItemTwo,rootClassName:t.default.infiniteScrollRoot,renderItem:(l,n)=>e.jsx(d.StudyGridCard,{...l,compressed:!0},n)})]})]})});exports.Curiosity=h;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../components/Button/Button.cjs.js"),m=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),o=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js"),a=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/StudyGridCard/StudyGridCard.cjs.js"),t=require("./curiosity.module.css.cjs.js"),f=require("../../utils/cn/cn.cjs.js"),h=({title:c,description:r,studies:s,indexed:i})=>e.jsxs("div",{className:f.cn(t.default.root,{[t.default.notIndexed]:!i}),children:[e.jsxs("div",{className:t.default.contentContainer,children:[e.jsxs("div",{className:t.default.containerHeader,children:[e.jsx(m.HighlightedTitle,{title:c,className:t.default.title,defaultVariant:"displayXl",mobileVariant:"displayXs"}),e.jsxs("div",{className:t.default.contentTextContainer,children:[r&&e.jsx(a.Typography,{defaultVariant:"bodyLg",mobileVariant:"bodySm",className:t.default.contentText,children:r}),e.jsx("div",{className:t.default.buttonContainer,children:e.jsx(u.Button,{as:"a",href:"/",variant:"muted",size:"lg",children:"View all studies"})})]})]}),i&&e.jsxs("div",{className:t.default.dividerContainer,children:[e.jsx(a.Typography,{defaultVariant:"labelMd",children:i.number}),e.jsx("div",{className:t.default.divider}),e.jsx(a.Typography,{defaultVariant:"labelMd",emphasis:!0,children:i.label})]})]}),e.jsxs("div",{className:t.default.containerBottom,children:[e.jsx(o.InfiniteScroll,{items:s,speed:50,contentClassName:t.default.infiniteScrollContent,itemClassName:t.default.infiniteScrollItem,rootClassName:t.default.infiniteScrollRoot,renderItem:(l,n)=>e.jsx(d.StudyGridCard,{...l,compressed:!0},n)}),e.jsx(o.InfiniteScroll,{items:s,speed:50,direction:"right",contentClassName:t.default.infiniteScrollContent,itemClassName:t.default.infiniteScrollItemTwo,rootClassName:t.default.infiniteScrollRoot,renderItem:(l,n)=>e.jsx(d.StudyGridCard,{...l,compressed:!0},n)})]})]});exports.Curiosity=h;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
3
3
  import { Button as f } from "../../components/Button/Button.es.js";
4
4
  import { HighlightedTitle as h } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
5
5
  import { InfiniteScroll as m } from "../../components/InfiniteScroll/InfiniteScroll.es.js";
@@ -7,27 +7,29 @@ import { Typography as l } from "../../components/Typography/Typography.es.js";
7
7
  import { StudyGridCard as d } from "../../components/StudyGridCard/StudyGridCard.es.js";
8
8
  import e from "./curiosity.module.css.es.js";
9
9
  import { cn as p } from "../../utils/cn/cn.es.js";
10
- const g = ({ title: c, description: o, studies: s, indexed: r }) => /* @__PURE__ */ t("div", { className: e.root, children: /* @__PURE__ */ i("div", { className: p(e.contentContainer, { [e.notIndexed]: !r }), children: [
11
- /* @__PURE__ */ i("div", { className: e.containerHeader, children: [
12
- /* @__PURE__ */ t(
13
- h,
14
- {
15
- title: c,
16
- className: e.title,
17
- defaultVariant: "displayXl",
18
- mobileVariant: "displayXs"
19
- }
20
- ),
21
- /* @__PURE__ */ i("div", { className: e.contentTextContainer, children: [
22
- o && /* @__PURE__ */ t(l, { defaultVariant: "bodyLg", mobileVariant: "bodySm", className: e.contentText, children: o }),
23
- /* @__PURE__ */ t("div", { className: e.buttonContainer, children: /* @__PURE__ */ t(f, { as: "a", href: "/", variant: "muted", size: "lg", children: "View all studies" }) })
10
+ const g = ({ title: c, description: o, studies: s, indexed: r }) => /* @__PURE__ */ i("div", { className: p(e.root, { [e.notIndexed]: !r }), children: [
11
+ /* @__PURE__ */ i("div", { className: e.contentContainer, children: [
12
+ /* @__PURE__ */ i("div", { className: e.containerHeader, children: [
13
+ /* @__PURE__ */ t(
14
+ h,
15
+ {
16
+ title: c,
17
+ className: e.title,
18
+ defaultVariant: "displayXl",
19
+ mobileVariant: "displayXs"
20
+ }
21
+ ),
22
+ /* @__PURE__ */ i("div", { className: e.contentTextContainer, children: [
23
+ o && /* @__PURE__ */ t(l, { defaultVariant: "bodyLg", mobileVariant: "bodySm", className: e.contentText, children: o }),
24
+ /* @__PURE__ */ t("div", { className: e.buttonContainer, children: /* @__PURE__ */ t(f, { as: "a", href: "/", variant: "muted", size: "lg", children: "View all studies" }) })
25
+ ] })
26
+ ] }),
27
+ r && /* @__PURE__ */ i("div", { className: e.dividerContainer, children: [
28
+ /* @__PURE__ */ t(l, { defaultVariant: "labelMd", children: r.number }),
29
+ /* @__PURE__ */ t("div", { className: e.divider }),
30
+ /* @__PURE__ */ t(l, { defaultVariant: "labelMd", emphasis: !0, children: r.label })
24
31
  ] })
25
32
  ] }),
26
- r && /* @__PURE__ */ i("div", { className: e.dividerContainer, children: [
27
- /* @__PURE__ */ t(l, { defaultVariant: "labelMd", children: r.number }),
28
- /* @__PURE__ */ t("div", { className: e.divider }),
29
- /* @__PURE__ */ t(l, { defaultVariant: "labelMd", emphasis: !0, children: r.label })
30
- ] }),
31
33
  /* @__PURE__ */ i("div", { className: e.containerBottom, children: [
32
34
  /* @__PURE__ */ t(
33
35
  m,
@@ -53,7 +55,7 @@ const g = ({ title: c, description: o, studies: s, indexed: r }) => /* @__PURE__
53
55
  }
54
56
  )
55
57
  ] })
56
- ] }) });
58
+ ] });
57
59
  export {
58
60
  g as Curiosity
59
61
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),H=require("../../node_modules/@gsap/react/src/index.cjs.js"),d=require("../../node_modules/gsap/index.cjs.js"),u=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),w=require("react"),A=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),g=require("../../components/Typography/Typography.cjs.js"),V=require("../../utils/debounce.cjs.js"),r=require("./expandingDetails.module.css.cjs.js");d.gsap.registerPlugin(u.ScrollTrigger);const $=({colorScheme:h,label:N,title:P,sections:b})=>{const c=w.useRef(null);return H.useGSAP(()=>{if(!c.current)return;const a=()=>{var S;d.gsap.killTweensOf("*"),u.ScrollTrigger.getAll().forEach(e=>e.kill());const o=d.gsap.utils.toArray('[data-scroll-id="section"]'),t=(S=c.current)==null?void 0:S.querySelector('[data-scroll-id="sections"]');if(!t)return;const f=d.gsap.timeline({scrollTrigger:{trigger:c.current,start:"top top",end:()=>`+=${o.length*500}`,scrub:1,markers:!1,pin:!0}}),p=t==null?void 0:t.querySelector('[data-scroll-id="heading"]');if(!p)return;d.gsap.set(t==null?void 0:t.querySelectorAll('[data-scroll-id="section"]'),{height:p.offsetHeight||0}),d.gsap.set(t==null?void 0:t.querySelectorAll('[data-scroll-id="protocol"]'),{scale:.5,yPercent:0}),d.gsap.set(t==null?void 0:t.querySelectorAll('[data-scroll-id="image-circle"]'),{scale:.5,yPercent:5});const y=window.innerWidth<768?1.2:2,m=window.innerWidth<768?1.2:2;o.forEach((e,E)=>{var x,q,T,j,v;const n=e==null?void 0:e.querySelector('[data-scroll-id="heading"]'),i=e==null?void 0:e.querySelector('[data-scroll-id="content"]');!n||!i||(f.to(e,{height:n.offsetHeight+i.offsetHeight}).to(e==null?void 0:e.querySelector('[data-scroll-id="section-title"]'),{scale:y,yPercent:50},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="section-index"]'),{scale:m,yPercent:50},"<").to(i,{height:i.offsetHeight},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="protocol"]'),{scale:1},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="image-circle"]'),{scale:1,yPercent:5},"<"),E<o.length-1&&f.to(e,{height:n.offsetHeight,delay:.5}).to(e.nextElementSibling,{height:n.offsetHeight+i.offsetHeight},"<").to(((x=e.nextElementSibling)==null?void 0:x.querySelector('[data-scroll-id="section-title"]'))||null,{scale:y,yPercent:100},"<").to(((q=e.nextElementSibling)==null?void 0:q.querySelector('[data-scroll-id="section-index"]'))||null,{scale:m,yPercent:100},"<").to(((T=e.nextElementSibling)==null?void 0:T.querySelector('[data-scroll-id="content"]'))||null,{height:i.offsetHeight,yPercent:0},"<").to(((j=e.nextElementSibling)==null?void 0:j.querySelector('[data-scroll-id="protocol"]'))||null,{scale:1},"<").to(((v=e.nextElementSibling)==null?void 0:v.querySelector('[data-scroll-id="image-circle"]'))||null,{scale:1,yPercent:5},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="section-title"]'),{scale:1,yPercent:-15},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="section-index"]'),{scale:1,yPercent:-15},"<").to(i,{height:0,yPercent:0},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="protocol"]'),{scale:0,yPercent:200},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="image-circle"]'),{scale:0,yPercent:200},"<"))})};a();const s=V.default(()=>{a()},200);return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s),u.ScrollTrigger.getAll().forEach(o=>o.kill()),d.gsap.killTweensOf("*")}},{scope:c,dependencies:[c]}),l.jsx("div",{ref:c,className:`${r.default.root} ${r.default[h]}`,children:l.jsxs("div",{className:r.default.expandingDetailsWrapper,children:[l.jsxs("header",{"data-scroll-id":"header",className:r.default.header,children:[l.jsx(g.Typography,{as:"div",defaultVariant:"labelSm",emphasis:!0,className:r.default.label,children:N}),l.jsx(A.HighlightedTitle,{as:"div",defaultVariant:"displayMd",mobileVariant:"headingXl",colorScheme:h,className:r.default.title,title:P})]}),l.jsx("div",{"data-scroll-id":"sections",className:r.default.sections,children:b.map((a,s)=>l.jsxs("div",{id:`section-${s+1}`,"data-scroll-id":"section",className:r.default.section,children:[l.jsxs("div",{"data-scroll-id":"heading",className:r.default.heading,children:[l.jsx("div",{"data-scroll-id":"section-title",className:r.default.sectionTitleWrapper,children:l.jsx(g.Typography,{as:"h3",defaultVariant:"headingSm",className:r.default.sectionTitle,children:a.title})}),l.jsx("div",{"data-scroll-id":"section-index",className:r.default.sectionIndexWrapper,children:l.jsxs(g.Typography,{as:"p",defaultVariant:"headingSm",className:r.default.sectionIndex,children:["(",String(s+1).padStart(2,"0"),")"]})})]}),l.jsxs("div",{"data-scroll-id":"content",className:r.default.content,children:[l.jsx("div",{"data-scroll-id":"protocol",className:r.default.protocolWrapper,children:l.jsx(g.Typography,{as:"div",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:r.default.protocol,children:a.protocol})}),l.jsx("div",{"data-scroll-id":"image-circle",className:r.default.imageCircle,children:l.jsx("img",{src:a.image,alt:a.title})})]}),l.jsx("div",{className:r.default.leftBorder}),l.jsx("div",{className:r.default.rightBorder})]},a.title))})]})})};exports.ExpandingDetails=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),H=require("../../node_modules/@gsap/react/src/index.cjs.js"),d=require("../../node_modules/gsap/index.cjs.js"),u=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),w=require("react"),V=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),n=require("../../components/Typography/Typography.cjs.js"),A=require("../../utils/debounce.cjs.js"),r=require("./expandingDetails.module.css.cjs.js");d.gsap.registerPlugin(u.ScrollTrigger);const $=({colorScheme:h,label:f,title:N,sections:P})=>{const s=w.useRef(null);return H.useGSAP(()=>{if(!s.current)return;const a=()=>{var x;d.gsap.killTweensOf("*"),u.ScrollTrigger.getAll().forEach(e=>e.kill());const o=d.gsap.utils.toArray('[data-scroll-id="section"]'),t=(x=s.current)==null?void 0:x.querySelector('[data-scroll-id="sections"]');if(!t)return;const p=d.gsap.timeline({scrollTrigger:{trigger:s.current,start:"top top",end:()=>`+=${o.length*500}`,scrub:1,markers:!1,pin:!0}}),y=t==null?void 0:t.querySelector('[data-scroll-id="heading"]');if(!y)return;d.gsap.set(t==null?void 0:t.querySelectorAll('[data-scroll-id="section"]'),{height:y.offsetHeight||0}),d.gsap.set(t==null?void 0:t.querySelectorAll('[data-scroll-id="protocol"]'),{scale:.5,yPercent:0}),d.gsap.set(t==null?void 0:t.querySelectorAll('[data-scroll-id="image-circle"]'),{scale:.5,yPercent:5});const m=window.innerWidth<768?1.2:2,S=window.innerWidth<768?1.2:2;o.forEach((e,E)=>{var q,T,j,b,v;const g=e==null?void 0:e.querySelector('[data-scroll-id="heading"]'),i=e==null?void 0:e.querySelector('[data-scroll-id="content"]');!g||!i||(p.to(e,{height:g.offsetHeight+i.offsetHeight}).to(e==null?void 0:e.querySelector('[data-scroll-id="section-title"]'),{scale:m,yPercent:50},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="section-index"]'),{scale:S,yPercent:50},"<").to(i,{height:i.offsetHeight},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="protocol"]'),{scale:1},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="image-circle"]'),{scale:1,yPercent:5},"<"),E<o.length-1&&p.to(e,{height:g.offsetHeight,delay:.5}).to(e.nextElementSibling,{height:g.offsetHeight+i.offsetHeight},"<").to(((q=e.nextElementSibling)==null?void 0:q.querySelector('[data-scroll-id="section-title"]'))||null,{scale:m,yPercent:100},"<").to(((T=e.nextElementSibling)==null?void 0:T.querySelector('[data-scroll-id="section-index"]'))||null,{scale:S,yPercent:100},"<").to(((j=e.nextElementSibling)==null?void 0:j.querySelector('[data-scroll-id="content"]'))||null,{height:i.offsetHeight,yPercent:0},"<").to(((b=e.nextElementSibling)==null?void 0:b.querySelector('[data-scroll-id="protocol"]'))||null,{scale:1},"<").to(((v=e.nextElementSibling)==null?void 0:v.querySelector('[data-scroll-id="image-circle"]'))||null,{scale:1,yPercent:5},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="section-title"]'),{scale:1,yPercent:-15},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="section-index"]'),{scale:1,yPercent:-15},"<").to(i,{height:0,yPercent:0},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="protocol"]'),{scale:0,yPercent:200},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="image-circle"]'),{scale:0,yPercent:200},"<"))})};a();const c=A.default(()=>{a()},200);return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),u.ScrollTrigger.getAll().forEach(o=>o.kill()),d.gsap.killTweensOf("*")}},{scope:s,dependencies:[s]}),l.jsx("div",{ref:s,className:`${r.default.root} ${r.default[h]}`,children:l.jsxs("div",{className:r.default.expandingDetailsWrapper,children:[l.jsxs("header",{"data-scroll-id":"header",className:r.default.header,children:[f&&l.jsx(n.Typography,{as:"div",defaultVariant:"labelSm",emphasis:!0,className:r.default.label,children:f}),l.jsx(V.HighlightedTitle,{as:"div",defaultVariant:"displayMd",mobileVariant:"headingXl",colorScheme:h,className:r.default.title,title:N})]}),l.jsx("div",{"data-scroll-id":"sections",className:r.default.sections,children:P.map((a,c)=>l.jsxs("div",{id:`section-${c+1}`,"data-scroll-id":"section",className:r.default.section,children:[l.jsxs("div",{"data-scroll-id":"heading",className:r.default.heading,children:[l.jsx("div",{"data-scroll-id":"section-title",className:r.default.sectionTitleWrapper,children:l.jsx(n.Typography,{as:"h3",defaultVariant:"headingSm",className:r.default.sectionTitle,children:a.title})}),l.jsx("div",{"data-scroll-id":"section-index",className:r.default.sectionIndexWrapper,children:l.jsxs(n.Typography,{as:"p",defaultVariant:"headingSm",className:r.default.sectionIndex,children:["(",String(c+1).padStart(2,"0"),")"]})})]}),l.jsxs("div",{"data-scroll-id":"content",className:r.default.content,children:[l.jsxs("div",{"data-scroll-id":"protocol",className:r.default.protocolWrapper,children:[a.subtitle&&l.jsx(n.Typography,{as:"h4",defaultVariant:"headingLg",mobileVariant:"headingXs",children:a.subtitle}),l.jsx(n.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",children:a.description})]}),l.jsx("div",{"data-scroll-id":"image-circle",className:r.default.imageCircle,children:l.jsx("img",{src:a.image,alt:a.title})})]}),l.jsx("div",{className:r.default.leftBorder}),l.jsx("div",{className:r.default.rightBorder})]},a.title))})]})})};exports.ExpandingDetails=$;
@@ -1,77 +1,77 @@
1
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
- import { useGSAP as A } from "../../node_modules/@gsap/react/src/index.es.js";
3
- import { gsap as d } from "../../node_modules/gsap/index.es.js";
4
- import { ScrollTrigger as g } from "../../node_modules/gsap/ScrollTrigger.es.js";
5
- import { useRef as V } from "react";
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import { useGSAP as V } from "../../node_modules/@gsap/react/src/index.es.js";
3
+ import { gsap as i } from "../../node_modules/gsap/index.es.js";
4
+ import { ScrollTrigger as m } from "../../node_modules/gsap/ScrollTrigger.es.js";
5
+ import { useRef as A } from "react";
6
6
  import { HighlightedTitle as W } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
7
- import { Typography as m } from "../../components/Typography/Typography.es.js";
7
+ import { Typography as h } from "../../components/Typography/Typography.es.js";
8
8
  import k from "../../utils/debounce.es.js";
9
9
  import l from "./expandingDetails.module.css.es.js";
10
- d.registerPlugin(g);
11
- const O = ({ colorScheme: u, label: E, title: w, sections: T }) => {
12
- const c = V(null);
13
- return A(
10
+ i.registerPlugin(m);
11
+ const O = ({ colorScheme: u, label: f, title: w, sections: T }) => {
12
+ const o = A(null);
13
+ return V(
14
14
  () => {
15
- if (!c.current) return;
15
+ if (!o.current) return;
16
16
  const a = () => {
17
- var q;
18
- d.killTweensOf("*"), g.getAll().forEach((e) => e.kill());
19
- const n = d.utils.toArray('[data-scroll-id="section"]'), r = (q = c.current) == null ? void 0 : q.querySelector('[data-scroll-id="sections"]');
17
+ var v;
18
+ i.killTweensOf("*"), m.getAll().forEach((e) => e.kill());
19
+ const n = i.utils.toArray('[data-scroll-id="section"]'), r = (v = o.current) == null ? void 0 : v.querySelector('[data-scroll-id="sections"]');
20
20
  if (!r) return;
21
- const f = d.timeline({
21
+ const p = i.timeline({
22
22
  scrollTrigger: {
23
- trigger: c.current,
23
+ trigger: o.current,
24
24
  start: "top top",
25
25
  end: () => `+=${n.length * 500}`,
26
26
  scrub: 1,
27
27
  markers: !1,
28
28
  pin: !0
29
29
  }
30
- }), p = r == null ? void 0 : r.querySelector('[data-scroll-id="heading"]');
31
- if (!p) return;
32
- d.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="section"]'), {
33
- height: p.offsetHeight || 0
34
- }), d.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="protocol"]'), {
30
+ }), y = r == null ? void 0 : r.querySelector('[data-scroll-id="heading"]');
31
+ if (!y) return;
32
+ i.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="section"]'), {
33
+ height: y.offsetHeight || 0
34
+ }), i.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="protocol"]'), {
35
35
  scale: 0.5,
36
36
  yPercent: 0
37
- }), d.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="image-circle"]'), {
37
+ }), i.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="image-circle"]'), {
38
38
  scale: 0.5,
39
39
  yPercent: 5
40
40
  });
41
- const y = window.innerWidth < 768 ? 1.2 : 2, S = window.innerWidth < 768 ? 1.2 : 2;
41
+ const S = window.innerWidth < 768 ? 1.2 : 2, q = window.innerWidth < 768 ? 1.2 : 2;
42
42
  n.forEach((e, H) => {
43
- var v, N, x, P, b;
44
- const h = e == null ? void 0 : e.querySelector('[data-scroll-id="heading"]'), i = e == null ? void 0 : e.querySelector('[data-scroll-id="content"]');
45
- !h || !i || (f.to(e, { height: h.offsetHeight + i.offsetHeight }).to(
43
+ var x, N, b, P, E;
44
+ const g = e == null ? void 0 : e.querySelector('[data-scroll-id="heading"]'), d = e == null ? void 0 : e.querySelector('[data-scroll-id="content"]');
45
+ !g || !d || (p.to(e, { height: g.offsetHeight + d.offsetHeight }).to(
46
46
  e == null ? void 0 : e.querySelector('[data-scroll-id="section-title"]'),
47
- { scale: y, yPercent: 50 },
47
+ { scale: S, yPercent: 50 },
48
48
  "<"
49
49
  ).to(
50
50
  e == null ? void 0 : e.querySelector('[data-scroll-id="section-index"]'),
51
- { scale: S, yPercent: 50 },
51
+ { scale: q, yPercent: 50 },
52
52
  "<"
53
- ).to(i, { height: i.offsetHeight }, "<").to(e == null ? void 0 : e.querySelector('[data-scroll-id="protocol"]'), { scale: 1 }, "<").to(e == null ? void 0 : e.querySelector('[data-scroll-id="image-circle"]'), { scale: 1, yPercent: 5 }, "<"), H < n.length - 1 && f.to(e, { height: h.offsetHeight, delay: 0.5 }).to(
53
+ ).to(d, { height: d.offsetHeight }, "<").to(e == null ? void 0 : e.querySelector('[data-scroll-id="protocol"]'), { scale: 1 }, "<").to(e == null ? void 0 : e.querySelector('[data-scroll-id="image-circle"]'), { scale: 1, yPercent: 5 }, "<"), H < n.length - 1 && p.to(e, { height: g.offsetHeight, delay: 0.5 }).to(
54
54
  e.nextElementSibling,
55
- { height: h.offsetHeight + i.offsetHeight },
55
+ { height: g.offsetHeight + d.offsetHeight },
56
56
  "<"
57
57
  ).to(
58
- ((v = e.nextElementSibling) == null ? void 0 : v.querySelector('[data-scroll-id="section-title"]')) || null,
59
- { scale: y, yPercent: 100 },
58
+ ((x = e.nextElementSibling) == null ? void 0 : x.querySelector('[data-scroll-id="section-title"]')) || null,
59
+ { scale: S, yPercent: 100 },
60
60
  "<"
61
61
  ).to(
62
62
  ((N = e.nextElementSibling) == null ? void 0 : N.querySelector('[data-scroll-id="section-index"]')) || null,
63
- { scale: S, yPercent: 100 },
63
+ { scale: q, yPercent: 100 },
64
64
  "<"
65
65
  ).to(
66
- ((x = e.nextElementSibling) == null ? void 0 : x.querySelector('[data-scroll-id="content"]')) || null,
67
- { height: i.offsetHeight, yPercent: 0 },
66
+ ((b = e.nextElementSibling) == null ? void 0 : b.querySelector('[data-scroll-id="content"]')) || null,
67
+ { height: d.offsetHeight, yPercent: 0 },
68
68
  "<"
69
69
  ).to(
70
70
  ((P = e.nextElementSibling) == null ? void 0 : P.querySelector('[data-scroll-id="protocol"]')) || null,
71
71
  { scale: 1 },
72
72
  "<"
73
73
  ).to(
74
- ((b = e.nextElementSibling) == null ? void 0 : b.querySelector('[data-scroll-id="image-circle"]')) || null,
74
+ ((E = e.nextElementSibling) == null ? void 0 : E.querySelector('[data-scroll-id="image-circle"]')) || null,
75
75
  { scale: 1, yPercent: 5 },
76
76
  "<"
77
77
  ).to(
@@ -82,7 +82,7 @@ const O = ({ colorScheme: u, label: E, title: w, sections: T }) => {
82
82
  e == null ? void 0 : e.querySelector('[data-scroll-id="section-index"]'),
83
83
  { scale: 1, yPercent: -15 },
84
84
  "<"
85
- ).to(i, { height: 0, yPercent: 0 }, "<").to(e == null ? void 0 : e.querySelector('[data-scroll-id="protocol"]'), { scale: 0, yPercent: 200 }, "<").to(
85
+ ).to(d, { height: 0, yPercent: 0 }, "<").to(e == null ? void 0 : e.querySelector('[data-scroll-id="protocol"]'), { scale: 0, yPercent: 200 }, "<").to(
86
86
  e == null ? void 0 : e.querySelector('[data-scroll-id="image-circle"]'),
87
87
  { scale: 0, yPercent: 200 },
88
88
  "<"
@@ -94,16 +94,16 @@ const O = ({ colorScheme: u, label: E, title: w, sections: T }) => {
94
94
  a();
95
95
  }, 200);
96
96
  return window.addEventListener("resize", s), () => {
97
- window.removeEventListener("resize", s), g.getAll().forEach((n) => n.kill()), d.killTweensOf("*");
97
+ window.removeEventListener("resize", s), m.getAll().forEach((n) => n.kill()), i.killTweensOf("*");
98
98
  };
99
99
  },
100
100
  {
101
- scope: c,
102
- dependencies: [c]
101
+ scope: o,
102
+ dependencies: [o]
103
103
  }
104
- ), /* @__PURE__ */ t("div", { ref: c, className: `${l.root} ${l[u]}`, children: /* @__PURE__ */ o("div", { className: l.expandingDetailsWrapper, children: [
105
- /* @__PURE__ */ o("header", { "data-scroll-id": "header", className: l.header, children: [
106
- /* @__PURE__ */ t(m, { as: "div", defaultVariant: "labelSm", emphasis: !0, className: l.label, children: E }),
104
+ ), /* @__PURE__ */ t("div", { ref: o, className: `${l.root} ${l[u]}`, children: /* @__PURE__ */ c("div", { className: l.expandingDetailsWrapper, children: [
105
+ /* @__PURE__ */ c("header", { "data-scroll-id": "header", className: l.header, children: [
106
+ f && /* @__PURE__ */ t(h, { as: "div", defaultVariant: "labelSm", emphasis: !0, className: l.label, children: f }),
107
107
  /* @__PURE__ */ t(
108
108
  W,
109
109
  {
@@ -116,32 +116,26 @@ const O = ({ colorScheme: u, label: E, title: w, sections: T }) => {
116
116
  }
117
117
  )
118
118
  ] }),
119
- /* @__PURE__ */ t("div", { "data-scroll-id": "sections", className: l.sections, children: T.map((a, s) => /* @__PURE__ */ o(
119
+ /* @__PURE__ */ t("div", { "data-scroll-id": "sections", className: l.sections, children: T.map((a, s) => /* @__PURE__ */ c(
120
120
  "div",
121
121
  {
122
122
  id: `section-${s + 1}`,
123
123
  "data-scroll-id": "section",
124
124
  className: l.section,
125
125
  children: [
126
- /* @__PURE__ */ o("div", { "data-scroll-id": "heading", className: l.heading, children: [
127
- /* @__PURE__ */ t("div", { "data-scroll-id": "section-title", className: l.sectionTitleWrapper, children: /* @__PURE__ */ t(m, { as: "h3", defaultVariant: "headingSm", className: l.sectionTitle, children: a.title }) }),
128
- /* @__PURE__ */ t("div", { "data-scroll-id": "section-index", className: l.sectionIndexWrapper, children: /* @__PURE__ */ o(m, { as: "p", defaultVariant: "headingSm", className: l.sectionIndex, children: [
126
+ /* @__PURE__ */ c("div", { "data-scroll-id": "heading", className: l.heading, children: [
127
+ /* @__PURE__ */ t("div", { "data-scroll-id": "section-title", className: l.sectionTitleWrapper, children: /* @__PURE__ */ t(h, { as: "h3", defaultVariant: "headingSm", className: l.sectionTitle, children: a.title }) }),
128
+ /* @__PURE__ */ t("div", { "data-scroll-id": "section-index", className: l.sectionIndexWrapper, children: /* @__PURE__ */ c(h, { as: "p", defaultVariant: "headingSm", className: l.sectionIndex, children: [
129
129
  "(",
130
130
  String(s + 1).padStart(2, "0"),
131
131
  ")"
132
132
  ] }) })
133
133
  ] }),
134
- /* @__PURE__ */ o("div", { "data-scroll-id": "content", className: l.content, children: [
135
- /* @__PURE__ */ t("div", { "data-scroll-id": "protocol", className: l.protocolWrapper, children: /* @__PURE__ */ t(
136
- m,
137
- {
138
- as: "div",
139
- defaultVariant: "bodyMd",
140
- mobileVariant: "bodySm",
141
- className: l.protocol,
142
- children: a.protocol
143
- }
144
- ) }),
134
+ /* @__PURE__ */ c("div", { "data-scroll-id": "content", className: l.content, children: [
135
+ /* @__PURE__ */ c("div", { "data-scroll-id": "protocol", className: l.protocolWrapper, children: [
136
+ a.subtitle && /* @__PURE__ */ t(h, { as: "h4", defaultVariant: "headingLg", mobileVariant: "headingXs", children: a.subtitle }),
137
+ /* @__PURE__ */ t(h, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", children: a.description })
138
+ ] }),
145
139
  /* @__PURE__ */ t("div", { "data-scroll-id": "image-circle", className: l.imageCircle, children: /* @__PURE__ */ t("img", { src: a.image, alt: a.title }) })
146
140
  ] }),
147
141
  /* @__PURE__ */ t("div", { className: l.leftBorder }),
@@ -3,11 +3,12 @@ import { TColorScheme } from '../../types/common';
3
3
 
4
4
  export type ExpandingDetailsProps = {
5
5
  colorScheme: TColorScheme;
6
- label: string;
6
+ label?: string;
7
7
  title: ReactNode;
8
- sections: {
8
+ sections: Array<{
9
9
  title: string;
10
- protocol: React.ReactNode;
10
+ subtitle?: string;
11
+ description?: string;
11
12
  image: string;
12
- }[];
13
+ }>;
13
14
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),n=require("../../components/Typography/Typography.cjs.js"),c=require("../../utils/cn/cn.cjs.js"),a=require("./imageWithText.module.css.cjs.js"),o=({image:r,text:i,title:l,view:t,colorScheme:s})=>e.jsx("section",{className:a.default.root,"data-scheme":s,children:e.jsxs("div",{className:a.default.container,children:[e.jsx("div",{className:a.default.imageContainer,children:e.jsx("img",{src:r,alt:"background image",className:a.default.image})}),e.jsxs("div",{className:c.cn(a.default.content,{[a.default.textAlignLeft]:t==="plain",[a.default.textAlignRight]:t==="complex"}),children:[t==="complex"&&e.jsxs("div",{className:a.default.richTextContainer,children:[l&&e.jsx(d.HighlightedTitle,{colorScheme:"dark",title:l,defaultVariant:"displayXs",mobileVariant:"headingLg"}),i&&e.jsx(n.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodySm",children:i})]}),t==="plain"&&i&&e.jsx("div",{className:a.default.textContainer,children:e.jsx(n.Typography,{defaultVariant:"displayXs",mobileVariant:"headingXs",children:i})})]})]})});exports.ImageWithText=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),n=require("../../components/Typography/Typography.cjs.js"),o=require("../../utils/cn/cn.cjs.js"),e=require("./imageWithText.module.css.cjs.js"),c=({image:d,text:t,title:l,view:i,colorScheme:r})=>a.jsx("section",{className:e.default.root,"data-scheme":r,children:a.jsxs("div",{className:e.default.container,"data-view":i,children:[a.jsx("div",{className:e.default.imageContainer,children:a.jsx("img",{src:d,alt:"background image",className:e.default.image})}),a.jsxs("div",{className:o.cn(e.default.content,{[e.default.textAlignLeft]:i==="plain"||i==="plain_with_title",[e.default.textAlignRight]:i==="complex"}),"data-view":i,children:[i==="complex"&&a.jsxs("div",{className:e.default.richTextContainer,children:[l&&a.jsx(s.HighlightedTitle,{colorScheme:"dark",title:l,defaultVariant:"displayXs",mobileVariant:"headingLg"}),t&&a.jsx(n.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodySm",children:t})]}),i==="plain"&&t&&a.jsx("div",{className:e.default.textContainer,children:a.jsx(n.Typography,{defaultVariant:"displayXs",mobileVariant:"headingXs",children:t})}),i==="plain_with_title"&&a.jsxs("div",{className:e.default.plainWithTitleContainer,children:[l&&a.jsx(n.Typography,{defaultVariant:"displayMd",mobileVariant:"headingLg",children:l}),t&&a.jsx(n.Typography,{defaultVariant:"bodyMd",mobileVariant:"bodyMd",children:t})]})]})]})});exports.ImageWithText=c;
@@ -1,21 +1,22 @@
1
- import { jsx as i, jsxs as n } from "react/jsx-runtime";
2
- import { HighlightedTitle as c } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
3
- import { Typography as t } from "../../components/Typography/Typography.es.js";
4
- import { cn as s } from "../../utils/cn/cn.es.js";
1
+ import { jsx as i, jsxs as r } from "react/jsx-runtime";
2
+ import { HighlightedTitle as m } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
3
+ import { Typography as d } from "../../components/Typography/Typography.es.js";
4
+ import { cn as c } from "../../utils/cn/cn.es.js";
5
5
  import a from "./imageWithText.module.css.es.js";
6
- const x = ({ image: o, text: e, title: l, view: r, colorScheme: m }) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": m, children: /* @__PURE__ */ n("div", { className: a.container, children: [
7
- /* @__PURE__ */ i("div", { className: a.imageContainer, children: /* @__PURE__ */ i("img", { src: o, alt: "background image", className: a.image }) }),
8
- /* @__PURE__ */ n(
6
+ const b = ({ image: t, text: n, title: l, view: e, colorScheme: o }) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": o, children: /* @__PURE__ */ r("div", { className: a.container, "data-view": e, children: [
7
+ /* @__PURE__ */ i("div", { className: a.imageContainer, children: /* @__PURE__ */ i("img", { src: t, alt: "background image", className: a.image }) }),
8
+ /* @__PURE__ */ r(
9
9
  "div",
10
10
  {
11
- className: s(a.content, {
12
- [a.textAlignLeft]: r === "plain",
13
- [a.textAlignRight]: r === "complex"
11
+ className: c(a.content, {
12
+ [a.textAlignLeft]: e === "plain" || e === "plain_with_title",
13
+ [a.textAlignRight]: e === "complex"
14
14
  }),
15
+ "data-view": e,
15
16
  children: [
16
- r === "complex" && /* @__PURE__ */ n("div", { className: a.richTextContainer, children: [
17
+ e === "complex" && /* @__PURE__ */ r("div", { className: a.richTextContainer, children: [
17
18
  l && /* @__PURE__ */ i(
18
- c,
19
+ m,
19
20
  {
20
21
  colorScheme: "dark",
21
22
  title: l,
@@ -23,13 +24,17 @@ const x = ({ image: o, text: e, title: l, view: r, colorScheme: m }) => /* @__PU
23
24
  mobileVariant: "headingLg"
24
25
  }
25
26
  ),
26
- e && /* @__PURE__ */ i(t, { defaultVariant: "bodyMd", mobileVariant: "bodySm", children: e })
27
+ n && /* @__PURE__ */ i(d, { defaultVariant: "bodyMd", mobileVariant: "bodySm", children: n })
27
28
  ] }),
28
- r === "plain" && e && /* @__PURE__ */ i("div", { className: a.textContainer, children: /* @__PURE__ */ i(t, { defaultVariant: "displayXs", mobileVariant: "headingXs", children: e }) })
29
+ e === "plain" && n && /* @__PURE__ */ i("div", { className: a.textContainer, children: /* @__PURE__ */ i(d, { defaultVariant: "displayXs", mobileVariant: "headingXs", children: n }) }),
30
+ e === "plain_with_title" && /* @__PURE__ */ r("div", { className: a.plainWithTitleContainer, children: [
31
+ l && /* @__PURE__ */ i(d, { defaultVariant: "displayMd", mobileVariant: "headingLg", children: l }),
32
+ n && /* @__PURE__ */ i(d, { defaultVariant: "bodyMd", mobileVariant: "bodyMd", children: n })
33
+ ] })
29
34
  ]
30
35
  }
31
36
  )
32
37
  ] }) });
33
38
  export {
34
- x as ImageWithText
39
+ b as ImageWithText
35
40
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="imageWithText-module__root___Uq9G7",e="imageWithText-module__container___aRFfK",i="imageWithText-module__content___IKyX1",n="imageWithText-module__textAlignLeft___nxRQf",o="imageWithText-module__textAlignRight___ldGBP",_="imageWithText-module__textContainer___m5Jfs",a="imageWithText-module__richTextContainer___ochKF",g="imageWithText-module__imageContainer___bcAmi",m="imageWithText-module__image___paWe4",r={root:t,container:e,content:i,textAlignLeft:n,textAlignRight:o,textContainer:_,richTextContainer:a,imageContainer:g,image:m};exports.container=e;exports.content=i;exports.default=r;exports.image=m;exports.imageContainer=g;exports.richTextContainer=a;exports.root=t;exports.textAlignLeft=n;exports.textAlignRight=o;exports.textContainer=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="imageWithText-module__root___Uq9G7",e="imageWithText-module__container___aRFfK",i="imageWithText-module__content___IKyX1",n="imageWithText-module__textAlignLeft___nxRQf",o="imageWithText-module__textAlignRight___ldGBP",_="imageWithText-module__textContainer___m5Jfs",a="imageWithText-module__richTextContainer___ochKF",l="imageWithText-module__plainWithTitleContainer___VPVtI",r="imageWithText-module__imageContainer___bcAmi",g="imageWithText-module__image___paWe4",m={root:t,container:e,content:i,textAlignLeft:n,textAlignRight:o,textContainer:_,richTextContainer:a,plainWithTitleContainer:l,imageContainer:r,image:g};exports.container=e;exports.content=i;exports.default=m;exports.image=g;exports.imageContainer=r;exports.plainWithTitleContainer=l;exports.richTextContainer=a;exports.root=t;exports.textAlignLeft=n;exports.textAlignRight=o;exports.textContainer=_;
@@ -1,4 +1,4 @@
1
- const t = "imageWithText-module__root___Uq9G7", e = "imageWithText-module__container___aRFfK", i = "imageWithText-module__content___IKyX1", n = "imageWithText-module__textAlignLeft___nxRQf", _ = "imageWithText-module__textAlignRight___ldGBP", o = "imageWithText-module__textContainer___m5Jfs", a = "imageWithText-module__richTextContainer___ochKF", m = "imageWithText-module__imageContainer___bcAmi", g = "imageWithText-module__image___paWe4", x = {
1
+ const t = "imageWithText-module__root___Uq9G7", e = "imageWithText-module__container___aRFfK", i = "imageWithText-module__content___IKyX1", n = "imageWithText-module__textAlignLeft___nxRQf", _ = "imageWithText-module__textAlignRight___ldGBP", o = "imageWithText-module__textContainer___m5Jfs", a = "imageWithText-module__richTextContainer___ochKF", m = "imageWithText-module__plainWithTitleContainer___VPVtI", g = "imageWithText-module__imageContainer___bcAmi", l = "imageWithText-module__image___paWe4", x = {
2
2
  root: t,
3
3
  container: e,
4
4
  content: i,
@@ -6,15 +6,17 @@ const t = "imageWithText-module__root___Uq9G7", e = "imageWithText-module__conta
6
6
  textAlignRight: _,
7
7
  textContainer: o,
8
8
  richTextContainer: a,
9
- imageContainer: m,
10
- image: g
9
+ plainWithTitleContainer: m,
10
+ imageContainer: g,
11
+ image: l
11
12
  };
12
13
  export {
13
14
  e as container,
14
15
  i as content,
15
16
  x as default,
16
- g as image,
17
- m as imageContainer,
17
+ l as image,
18
+ g as imageContainer,
19
+ m as plainWithTitleContainer,
18
20
  a as richTextContainer,
19
21
  t as root,
20
22
  n as textAlignLeft,
@@ -1,10 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TColorScheme } from '../../types/common';
3
3
 
4
+ export type TImageWithTextView = 'plain' | 'complex' | 'plain_with_title';
4
5
  export type TImageWithTextProps = {
5
6
  image: string;
6
7
  title?: ReactNode;
7
8
  text?: ReactNode;
8
- view: 'plain' | 'complex';
9
+ view: TImageWithTextView;
9
10
  colorScheme: TColorScheme;
10
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.1.54",
3
+ "version": "0.1.56",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",