@zenpatient-org/healthspan-marketing-ui 0.1.88 → 0.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/ExpandingDetails/ExpandingDetails.cjs.js +1 -1
- package/dist/modules/ExpandingDetails/ExpandingDetails.es.js +13 -4
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.cjs.js +1 -1
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.es.js +38 -36
- package/dist/modules/ExpandingDetails/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"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
|
|
1
|
+
"use client";"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,v,b;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(((v=e.nextElementSibling)==null?void 0:v.querySelector('[data-scroll-id="protocol"]'))||null,{scale:1},"<").to(((b=e.nextElementSibling)==null?void 0:b.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,{className:r.default.description,as:"div",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=$;
|
|
@@ -41,7 +41,7 @@ const O = ({ colorScheme: u, label: f, title: w, sections: T }) => {
|
|
|
41
41
|
});
|
|
42
42
|
const S = window.innerWidth < 768 ? 1.2 : 2, q = window.innerWidth < 768 ? 1.2 : 2;
|
|
43
43
|
n.forEach((e, H) => {
|
|
44
|
-
var
|
|
44
|
+
var N, x, b, P, E;
|
|
45
45
|
const g = e == null ? void 0 : e.querySelector('[data-scroll-id="heading"]'), d = e == null ? void 0 : e.querySelector('[data-scroll-id="content"]');
|
|
46
46
|
!g || !d || (p.to(e, { height: g.offsetHeight + d.offsetHeight }).to(
|
|
47
47
|
e == null ? void 0 : e.querySelector('[data-scroll-id="section-title"]'),
|
|
@@ -56,11 +56,11 @@ const O = ({ colorScheme: u, label: f, title: w, sections: T }) => {
|
|
|
56
56
|
{ height: g.offsetHeight + d.offsetHeight },
|
|
57
57
|
"<"
|
|
58
58
|
).to(
|
|
59
|
-
((
|
|
59
|
+
((N = e.nextElementSibling) == null ? void 0 : N.querySelector('[data-scroll-id="section-title"]')) || null,
|
|
60
60
|
{ scale: S, yPercent: 100 },
|
|
61
61
|
"<"
|
|
62
62
|
).to(
|
|
63
|
-
((
|
|
63
|
+
((x = e.nextElementSibling) == null ? void 0 : x.querySelector('[data-scroll-id="section-index"]')) || null,
|
|
64
64
|
{ scale: q, yPercent: 100 },
|
|
65
65
|
"<"
|
|
66
66
|
).to(
|
|
@@ -135,7 +135,16 @@ const O = ({ colorScheme: u, label: f, title: w, sections: T }) => {
|
|
|
135
135
|
/* @__PURE__ */ c("div", { "data-scroll-id": "content", className: l.content, children: [
|
|
136
136
|
/* @__PURE__ */ c("div", { "data-scroll-id": "protocol", className: l.protocolWrapper, children: [
|
|
137
137
|
a.subtitle && /* @__PURE__ */ t(h, { as: "h4", defaultVariant: "headingLg", mobileVariant: "headingXs", children: a.subtitle }),
|
|
138
|
-
/* @__PURE__ */ t(
|
|
138
|
+
/* @__PURE__ */ t(
|
|
139
|
+
h,
|
|
140
|
+
{
|
|
141
|
+
className: l.description,
|
|
142
|
+
as: "div",
|
|
143
|
+
defaultVariant: "bodyMd",
|
|
144
|
+
mobileVariant: "bodySm",
|
|
145
|
+
children: a.description
|
|
146
|
+
}
|
|
147
|
+
)
|
|
139
148
|
] }),
|
|
140
149
|
/* @__PURE__ */ t("div", { "data-scroll-id": "image-circle", className: l.imageCircle, children: /* @__PURE__ */ t("img", { src: a.image, alt: a.title }) })
|
|
141
150
|
] }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="expandingDetails-module__root___5WLQh",t="expandingDetails-module__dark___BhUf9",o="expandingDetails-module__expandingDetailsWrapper___sqLS5",n="expandingDetails-module__header___Rp1BD",r="expandingDetails-module__title___5WsER",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="expandingDetails-module__root___5WLQh",t="expandingDetails-module__dark___BhUf9",o="expandingDetails-module__expandingDetailsWrapper___sqLS5",n="expandingDetails-module__header___Rp1BD",i="expandingDetails-module__description___U28ia",r="expandingDetails-module__title___5WsER",_="expandingDetails-module__label___w2Sjs",a="expandingDetails-module__sections___xpvak",s="expandingDetails-module__section___zgXvg",l="expandingDetails-module__leftBorder___lZI-L",d="expandingDetails-module__rightBorder___xfwvL",p="expandingDetails-module__topLeftCorner___sT8-Q",c="expandingDetails-module__topRightCorner___q9HbO",g="expandingDetails-module__bottomLeftCorner___E3e0F",x="expandingDetails-module__bottomRightCorner___VQJBu",m="expandingDetails-module__heading___htlX-",u="expandingDetails-module__sectionTitleWrapper___WxS9B",D="expandingDetails-module__sectionIndexWrapper___l-3VD",h="expandingDetails-module__content___1uGIY",C="expandingDetails-module__protocolWrapper___nq7ij",W="expandingDetails-module__imageCircle___HZJB-",f="expandingDetails-module__sectionIndex___spgOf",b={root:e,dark:t,expandingDetailsWrapper:o,header:n,description:i,title:r,label:_,sections:a,section:s,leftBorder:l,rightBorder:d,topLeftCorner:p,topRightCorner:c,bottomLeftCorner:g,bottomRightCorner:x,heading:m,sectionTitleWrapper:u,sectionIndexWrapper:D,content:h,protocolWrapper:C,imageCircle:W,sectionIndex:f};exports.bottomLeftCorner=g;exports.bottomRightCorner=x;exports.content=h;exports.dark=t;exports.default=b;exports.description=i;exports.expandingDetailsWrapper=o;exports.header=n;exports.heading=m;exports.imageCircle=W;exports.label=_;exports.leftBorder=l;exports.protocolWrapper=C;exports.rightBorder=d;exports.root=e;exports.section=s;exports.sectionIndex=f;exports.sectionIndexWrapper=D;exports.sectionTitleWrapper=u;exports.sections=a;exports.title=r;exports.topLeftCorner=p;exports.topRightCorner=c;
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
const e = "expandingDetails-module__root___5WLQh", t = "expandingDetails-module__dark___BhUf9", n = "expandingDetails-module__expandingDetailsWrapper___sqLS5", o = "expandingDetails-module__header___Rp1BD", _ = "expandingDetails-
|
|
1
|
+
const e = "expandingDetails-module__root___5WLQh", t = "expandingDetails-module__dark___BhUf9", n = "expandingDetails-module__expandingDetailsWrapper___sqLS5", o = "expandingDetails-module__header___Rp1BD", _ = "expandingDetails-module__description___U28ia", i = "expandingDetails-module__title___5WsER", r = "expandingDetails-module__label___w2Sjs", a = "expandingDetails-module__sections___xpvak", s = "expandingDetails-module__section___zgXvg", l = "expandingDetails-module__leftBorder___lZI-L", d = "expandingDetails-module__rightBorder___xfwvL", p = "expandingDetails-module__topLeftCorner___sT8-Q", c = "expandingDetails-module__topRightCorner___q9HbO", g = "expandingDetails-module__bottomLeftCorner___E3e0F", x = "expandingDetails-module__bottomRightCorner___VQJBu", m = "expandingDetails-module__heading___htlX-", D = "expandingDetails-module__sectionTitleWrapper___WxS9B", u = "expandingDetails-module__sectionIndexWrapper___l-3VD", h = "expandingDetails-module__content___1uGIY", C = "expandingDetails-module__protocolWrapper___nq7ij", W = "expandingDetails-module__imageCircle___HZJB-", f = "expandingDetails-module__sectionIndex___spgOf", B = {
|
|
2
2
|
root: e,
|
|
3
3
|
dark: t,
|
|
4
4
|
expandingDetailsWrapper: n,
|
|
5
5
|
header: o,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
description: _,
|
|
7
|
+
title: i,
|
|
8
|
+
label: r,
|
|
9
|
+
sections: a,
|
|
10
|
+
section: s,
|
|
11
|
+
leftBorder: l,
|
|
12
|
+
rightBorder: d,
|
|
13
|
+
topLeftCorner: p,
|
|
14
|
+
topRightCorner: c,
|
|
15
|
+
bottomLeftCorner: g,
|
|
16
|
+
bottomRightCorner: x,
|
|
17
|
+
heading: m,
|
|
18
|
+
sectionTitleWrapper: D,
|
|
19
|
+
sectionIndexWrapper: u,
|
|
20
|
+
content: h,
|
|
21
|
+
protocolWrapper: C,
|
|
22
|
+
imageCircle: W,
|
|
23
|
+
sectionIndex: f
|
|
23
24
|
};
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
g as bottomLeftCorner,
|
|
27
|
+
x as bottomRightCorner,
|
|
28
|
+
h as content,
|
|
28
29
|
t as dark,
|
|
29
|
-
|
|
30
|
+
B as default,
|
|
31
|
+
_ as description,
|
|
30
32
|
n as expandingDetailsWrapper,
|
|
31
33
|
o as header,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
m as heading,
|
|
35
|
+
W as imageCircle,
|
|
36
|
+
r as label,
|
|
37
|
+
l as leftBorder,
|
|
38
|
+
C as protocolWrapper,
|
|
39
|
+
d as rightBorder,
|
|
38
40
|
e as root,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
s as section,
|
|
42
|
+
f as sectionIndex,
|
|
43
|
+
u as sectionIndexWrapper,
|
|
44
|
+
D as sectionTitleWrapper,
|
|
45
|
+
a as sections,
|
|
46
|
+
i as title,
|
|
47
|
+
p as topLeftCorner,
|
|
48
|
+
c as topRightCorner
|
|
47
49
|
};
|