@zenpatient-org/healthspan-marketing-ui 0.1.146 → 0.1.150
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 +63 -59
- package/dist/modules/ScienceHero/components/ScienceClientCursor.cjs.js +1 -1
- package/dist/modules/ScienceHero/components/ScienceClientCursor.es.js +54 -51
- package/dist/modules/ScrollingText/ScrollingText.cjs.js +1 -0
- package/dist/modules/ScrollingText/ScrollingText.d.ts +7 -0
- package/dist/modules/{InfiniteScrollModule/InfiniteScrollModule.es.js → ScrollingText/ScrollingText.es.js} +2 -2
- package/dist/modules/ScrollingText/index.d.ts +2 -0
- package/dist/modules/ScrollingText/scrollingText.module.css.cjs.js +1 -0
- package/dist/modules/ScrollingText/scrollingText.module.css.es.js +11 -0
- package/package.json +5 -5
- package/dist/modules/InfiniteScrollModule/InfiniteScrollModule.cjs.js +0 -1
- package/dist/modules/InfiniteScrollModule/InfiniteScrollModule.d.ts +0 -7
- package/dist/modules/InfiniteScrollModule/index.d.ts +0 -2
- package/dist/modules/InfiniteScrollModule/infiniteScrolle.module.css.cjs.js +0 -1
- package/dist/modules/InfiniteScrollModule/infiniteScrolle.module.css.es.js +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),W=require("../../node_modules/@gsap/react/src/index.cjs.js"),s=require("../../node_modules/gsap/index.cjs.js"),z=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),$=require("react"),B=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),h=require("../../components/Typography/Typography.cjs.js"),L=require("../../utils/debounce.cjs.js"),t=require("./expandingDetails.module.css.cjs.js");s.gsap.registerPlugin(z.ScrollTrigger);const X=({colorScheme:y,label:m,title:D,sections:w})=>{const o=$.useRef(null),i=$.useRef({});return W.useGSAP(()=>{if(!o.current)return;const d=()=>{var q;i.current.timeline&&i.current.timeline.kill(),i.current.matchMedia&&i.current.matchMedia.kill();const f=s.gsap.utils.toArray('[data-scroll-id="section"]'),r=(q=o.current)==null?void 0:q.querySelector('[data-scroll-id="sections"]');if(!r)return;const p=s.gsap.matchMedia();i.current.matchMedia=p;const g=s.gsap.timeline({scrollTrigger:{trigger:o.current,start:"top top",end:()=>`+=${f.length*500}`,scrub:1,markers:!1,pin:!0}});i.current.timeline=g;const S=r==null?void 0:r.querySelector('[data-scroll-id="heading"]');if(!S)return;const x=1366;f.forEach((e,b)=>{p.add({isMobile:`(max-width: ${x}px)`,isDesktop:`(min-width: ${x+1}px)`},R=>{var P,j,v,H,N,E,T,M,k,V;const c=e==null?void 0:e.querySelector('[data-scroll-id="heading"]'),a=e==null?void 0:e.querySelector('[data-scroll-id="content"]');if(!c||!a)return;const n=R.conditions,A=n==null?void 0:n.isMobile,_=n==null?void 0:n.isDesktop;s.gsap.set(r==null?void 0:r.querySelectorAll('[data-scroll-id="section"]'),{height:S.offsetHeight||0}),s.gsap.set(r==null?void 0:r.querySelectorAll('[data-scroll-id="protocol"]'),{scale:.5,yPercent:0}),s.gsap.set(r==null?void 0:r.querySelectorAll('[data-scroll-id="image-circle"]'),{scale:.5,yPercent:5}),_&&(g.to(e,{height:c.offsetHeight+a.offsetHeight}).to(e==null?void 0:e.querySelector('[data-scroll-id="section-title"]'),{scale:2,yPercent:50},"<").to(e==null?void 0:e.querySelector('[data-scroll-id="section-index"]'),{scale:2,yPercent:50},"<").to(a,{height:a.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},"<"),b<f.length-1&&g.to(e,{height:c.offsetHeight,delay:.5}).to(e.nextElementSibling,{height:c.offsetHeight+a.offsetHeight},"<").to(((P=e.nextElementSibling)==null?void 0:P.querySelector('[data-scroll-id="section-title"]'))||null,{scale:2,yPercent:100},"<").to(((j=e.nextElementSibling)==null?void 0:j.querySelector('[data-scroll-id="section-index"]'))||null,{scale:2,yPercent:100},"<").to(((v=e.nextElementSibling)==null?void 0:v.querySelector('[data-scroll-id="content"]'))||null,{height:a.offsetHeight,yPercent:0},"<").to(((H=e.nextElementSibling)==null?void 0:H.querySelector('[data-scroll-id="protocol"]'))||null,{scale:1},"<").to(((N=e.nextElementSibling)==null?void 0:N.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(a,{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&&(g.to(e,{height:c.offsetHeight+a.offsetHeight}).to(a,{height:a.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},"<"),b<f.length-1&&g.to(e,{height:c.offsetHeight,delay:.5}).to(e.nextElementSibling,{height:c.offsetHeight+a.offsetHeight},"<").to(((E=e.nextElementSibling)==null?void 0:E.querySelector('[data-scroll-id="section-title"]'))||null,{scale:1,yPercent:100},"<").to(((T=e.nextElementSibling)==null?void 0:T.querySelector('[data-scroll-id="section-index"]'))||null,{scale:1,yPercent:100},"<").to(((M=e.nextElementSibling)==null?void 0:M.querySelector('[data-scroll-id="content"]'))||null,{height:a.offsetHeight,yPercent:0},"<").to(((k=e.nextElementSibling)==null?void 0:k.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(a,{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},"<"))})})};d();const u=L.default(()=>{d()},200);return window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u),i.current.timeline&&i.current.timeline.kill(),i.current.matchMedia&&i.current.matchMedia.kill()}},{scope:o,dependencies:[o]}),l.jsx("div",{ref:o,className:`${t.default.root} ${t.default[y]}`,children:l.jsxs("div",{className:t.default.expandingDetailsWrapper,children:[l.jsxs("header",{"data-scroll-id":"header",className:t.default.header,children:[m&&l.jsx(h.Typography,{as:"div",defaultVariant:"labelSm",emphasis:!0,className:t.default.label,children:m}),l.jsx(B.HighlightedTitle,{as:"div",defaultVariant:"displayMd",mobileVariant:"headingXl",colorScheme:y,className:t.default.title,title:D})]}),l.jsx("div",{"data-scroll-id":"sections",className:t.default.sections,children:w.map((d,u)=>l.jsxs("div",{id:`section-${u+1}`,"data-scroll-id":"section",className:t.default.section,children:[l.jsxs("div",{"data-scroll-id":"heading",className:t.default.heading,children:[l.jsx("div",{"data-scroll-id":"section-title",className:t.default.sectionTitleWrapper,children:l.jsx(h.Typography,{as:"h3",defaultVariant:"headingSm",className:t.default.sectionTitle,children:d.title})}),l.jsx("div",{"data-scroll-id":"section-index",className:t.default.sectionIndexWrapper,children:l.jsxs(h.Typography,{as:"p",defaultVariant:"headingSm",className:t.default.sectionIndex,children:["(",String(u+1).padStart(2,"0"),")"]})})]}),l.jsxs("div",{"data-scroll-id":"content",className:t.default.content,children:[l.jsxs("div",{"data-scroll-id":"protocol",className:t.default.protocolWrapper,children:[d.subtitle&&l.jsx(h.Typography,{as:"h4",defaultVariant:"headingLg",mobileVariant:"headingXs",children:d.subtitle}),l.jsx(h.Typography,{className:t.default.description,as:"div",defaultVariant:"bodyMd",mobileVariant:"bodyXs",children:d.description})]}),l.jsx("div",{"data-scroll-id":"image-circle",className:t.default.imageCircle,children:l.jsx("img",{src:d.image,alt:d.title})})]}),l.jsx("div",{className:t.default.leftBorder}),l.jsx("div",{className:t.default.rightBorder})]},d.title))})]})})};exports.ExpandingDetails=X;
|
|
@@ -1,56 +1,60 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
3
3
|
import { useGSAP as L } from "../../node_modules/@gsap/react/src/index.es.js";
|
|
4
|
-
import { gsap as
|
|
5
|
-
import { ScrollTrigger as
|
|
6
|
-
import { useRef as
|
|
7
|
-
import { HighlightedTitle as
|
|
8
|
-
import { Typography as
|
|
9
|
-
import
|
|
4
|
+
import { gsap as s } from "../../node_modules/gsap/index.es.js";
|
|
5
|
+
import { ScrollTrigger as X } from "../../node_modules/gsap/ScrollTrigger.es.js";
|
|
6
|
+
import { useRef as A } from "react";
|
|
7
|
+
import { HighlightedTitle as j } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
8
|
+
import { Typography as u } from "../../components/Typography/Typography.es.js";
|
|
9
|
+
import I from "../../utils/debounce.es.js";
|
|
10
10
|
import l from "./expandingDetails.module.css.es.js";
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
11
|
+
s.registerPlugin(X);
|
|
12
|
+
const _ = ({ colorScheme: y, label: p, title: D, sections: W }) => {
|
|
13
|
+
const n = A(null), i = A({});
|
|
14
14
|
return L(
|
|
15
15
|
() => {
|
|
16
|
-
if (!
|
|
16
|
+
if (!n.current) return;
|
|
17
17
|
const d = () => {
|
|
18
|
-
var
|
|
19
|
-
i.
|
|
20
|
-
const
|
|
18
|
+
var x;
|
|
19
|
+
i.current.timeline && i.current.timeline.kill(), i.current.matchMedia && i.current.matchMedia.kill();
|
|
20
|
+
const f = s.utils.toArray('[data-scroll-id="section"]'), r = (x = n.current) == null ? void 0 : x.querySelector('[data-scroll-id="sections"]');
|
|
21
21
|
if (!r) return;
|
|
22
|
-
const
|
|
22
|
+
const S = s.matchMedia();
|
|
23
|
+
i.current.matchMedia = S;
|
|
24
|
+
const g = s.timeline({
|
|
23
25
|
scrollTrigger: {
|
|
24
|
-
trigger:
|
|
26
|
+
trigger: n.current,
|
|
25
27
|
start: "top top",
|
|
26
|
-
end: () => `+=${
|
|
28
|
+
end: () => `+=${f.length * 500}`,
|
|
27
29
|
scrub: 1,
|
|
28
30
|
markers: !1,
|
|
29
31
|
pin: !0
|
|
30
32
|
}
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const q =
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
});
|
|
34
|
+
i.current.timeline = g;
|
|
35
|
+
const q = r == null ? void 0 : r.querySelector('[data-scroll-id="heading"]');
|
|
36
|
+
if (!q) return;
|
|
37
|
+
const b = 1366;
|
|
38
|
+
f.forEach((e, P) => {
|
|
39
|
+
S.add(
|
|
36
40
|
{
|
|
37
|
-
isMobile: `(max-width: ${
|
|
38
|
-
isDesktop: `(min-width: ${
|
|
41
|
+
isMobile: `(max-width: ${b}px)`,
|
|
42
|
+
isDesktop: `(min-width: ${b + 1}px)`
|
|
39
43
|
},
|
|
40
|
-
(
|
|
41
|
-
var
|
|
44
|
+
(R) => {
|
|
45
|
+
var v, N, E, H, M, k, V, T, w, $;
|
|
42
46
|
const c = e == null ? void 0 : e.querySelector('[data-scroll-id="heading"]'), t = e == null ? void 0 : e.querySelector('[data-scroll-id="content"]');
|
|
43
47
|
if (!c || !t) return;
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
height:
|
|
47
|
-
}),
|
|
48
|
+
const h = R.conditions, z = h == null ? void 0 : h.isMobile, B = h == null ? void 0 : h.isDesktop;
|
|
49
|
+
s.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="section"]'), {
|
|
50
|
+
height: q.offsetHeight || 0
|
|
51
|
+
}), s.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="protocol"]'), {
|
|
48
52
|
scale: 0.5,
|
|
49
53
|
yPercent: 0
|
|
50
|
-
}),
|
|
54
|
+
}), s.set(r == null ? void 0 : r.querySelectorAll('[data-scroll-id="image-circle"]'), {
|
|
51
55
|
scale: 0.5,
|
|
52
56
|
yPercent: 5
|
|
53
|
-
}), B && (
|
|
57
|
+
}), B && (g.to(e, { height: c.offsetHeight + t.offsetHeight }).to(
|
|
54
58
|
e == null ? void 0 : e.querySelector('[data-scroll-id="section-title"]'),
|
|
55
59
|
{ scale: 2, yPercent: 50 },
|
|
56
60
|
"<"
|
|
@@ -62,18 +66,18 @@ const Z = ({ colorScheme: f, label: p, title: M, sections: $ }) => {
|
|
|
62
66
|
e == null ? void 0 : e.querySelector('[data-scroll-id="image-circle"]'),
|
|
63
67
|
{ scale: 1, yPercent: 5 },
|
|
64
68
|
"<"
|
|
65
|
-
),
|
|
69
|
+
), P < f.length - 1 && g.to(e, { height: c.offsetHeight, delay: 0.5 }).to(
|
|
66
70
|
e.nextElementSibling,
|
|
67
71
|
{ height: c.offsetHeight + t.offsetHeight },
|
|
68
72
|
"<"
|
|
69
73
|
).to(
|
|
70
|
-
((
|
|
74
|
+
((v = e.nextElementSibling) == null ? void 0 : v.querySelector(
|
|
71
75
|
'[data-scroll-id="section-title"]'
|
|
72
76
|
)) || null,
|
|
73
77
|
{ scale: 2, yPercent: 100 },
|
|
74
78
|
"<"
|
|
75
79
|
).to(
|
|
76
|
-
((
|
|
80
|
+
((N = e.nextElementSibling) == null ? void 0 : N.querySelector(
|
|
77
81
|
'[data-scroll-id="section-index"]'
|
|
78
82
|
)) || null,
|
|
79
83
|
{ scale: 2, yPercent: 100 },
|
|
@@ -83,11 +87,11 @@ const Z = ({ colorScheme: f, label: p, title: M, sections: $ }) => {
|
|
|
83
87
|
{ height: t.offsetHeight, yPercent: 0 },
|
|
84
88
|
"<"
|
|
85
89
|
).to(
|
|
86
|
-
((
|
|
90
|
+
((H = e.nextElementSibling) == null ? void 0 : H.querySelector('[data-scroll-id="protocol"]')) || null,
|
|
87
91
|
{ scale: 1 },
|
|
88
92
|
"<"
|
|
89
93
|
).to(
|
|
90
|
-
((
|
|
94
|
+
((M = e.nextElementSibling) == null ? void 0 : M.querySelector(
|
|
91
95
|
'[data-scroll-id="image-circle"]'
|
|
92
96
|
)) || null,
|
|
93
97
|
{ scale: 1, yPercent: 5 },
|
|
@@ -108,11 +112,11 @@ const Z = ({ colorScheme: f, label: p, title: M, sections: $ }) => {
|
|
|
108
112
|
e == null ? void 0 : e.querySelector('[data-scroll-id="image-circle"]'),
|
|
109
113
|
{ scale: 0, yPercent: 200 },
|
|
110
114
|
"<"
|
|
111
|
-
)), z && (
|
|
115
|
+
)), z && (g.to(e, { height: c.offsetHeight + t.offsetHeight }).to(t, { height: t.offsetHeight }, "<").to(e == null ? void 0 : e.querySelector('[data-scroll-id="protocol"]'), { scale: 1 }, "<").to(
|
|
112
116
|
e == null ? void 0 : e.querySelector('[data-scroll-id="image-circle"]'),
|
|
113
117
|
{ scale: 1, yPercent: 5 },
|
|
114
118
|
"<"
|
|
115
|
-
),
|
|
119
|
+
), P < f.length - 1 && g.to(e, { height: c.offsetHeight, delay: 0.5 }).to(
|
|
116
120
|
e.nextElementSibling,
|
|
117
121
|
{ height: c.offsetHeight + t.offsetHeight },
|
|
118
122
|
"<"
|
|
@@ -123,13 +127,13 @@ const Z = ({ colorScheme: f, label: p, title: M, sections: $ }) => {
|
|
|
123
127
|
{ scale: 1, yPercent: 100 },
|
|
124
128
|
"<"
|
|
125
129
|
).to(
|
|
126
|
-
((
|
|
130
|
+
((V = e.nextElementSibling) == null ? void 0 : V.querySelector(
|
|
127
131
|
'[data-scroll-id="section-index"]'
|
|
128
132
|
)) || null,
|
|
129
133
|
{ scale: 1, yPercent: 100 },
|
|
130
134
|
"<"
|
|
131
135
|
).to(
|
|
132
|
-
((
|
|
136
|
+
((T = e.nextElementSibling) == null ? void 0 : T.querySelector('[data-scroll-id="content"]')) || null,
|
|
133
137
|
{ height: t.offsetHeight, yPercent: 0 },
|
|
134
138
|
"<"
|
|
135
139
|
).to(
|
|
@@ -137,7 +141,7 @@ const Z = ({ colorScheme: f, label: p, title: M, sections: $ }) => {
|
|
|
137
141
|
{ scale: 1 },
|
|
138
142
|
"<"
|
|
139
143
|
).to(
|
|
140
|
-
((
|
|
144
|
+
(($ = e.nextElementSibling) == null ? void 0 : $.querySelector(
|
|
141
145
|
'[data-scroll-id="image-circle"]'
|
|
142
146
|
)) || null,
|
|
143
147
|
{ scale: 1, yPercent: 5 },
|
|
@@ -164,52 +168,52 @@ const Z = ({ colorScheme: f, label: p, title: M, sections: $ }) => {
|
|
|
164
168
|
});
|
|
165
169
|
};
|
|
166
170
|
d();
|
|
167
|
-
const
|
|
171
|
+
const m = I(() => {
|
|
168
172
|
d();
|
|
169
173
|
}, 200);
|
|
170
|
-
return window.addEventListener("resize",
|
|
171
|
-
window.removeEventListener("resize",
|
|
174
|
+
return window.addEventListener("resize", m), () => {
|
|
175
|
+
window.removeEventListener("resize", m), i.current.timeline && i.current.timeline.kill(), i.current.matchMedia && i.current.matchMedia.kill();
|
|
172
176
|
};
|
|
173
177
|
},
|
|
174
178
|
{
|
|
175
|
-
scope:
|
|
176
|
-
dependencies: [
|
|
179
|
+
scope: n,
|
|
180
|
+
dependencies: [n]
|
|
177
181
|
}
|
|
178
|
-
), /* @__PURE__ */ a("div", { ref:
|
|
182
|
+
), /* @__PURE__ */ a("div", { ref: n, className: `${l.root} ${l[y]}`, children: /* @__PURE__ */ o("div", { className: l.expandingDetailsWrapper, children: [
|
|
179
183
|
/* @__PURE__ */ o("header", { "data-scroll-id": "header", className: l.header, children: [
|
|
180
|
-
p && /* @__PURE__ */ a(
|
|
184
|
+
p && /* @__PURE__ */ a(u, { as: "div", defaultVariant: "labelSm", emphasis: !0, className: l.label, children: p }),
|
|
181
185
|
/* @__PURE__ */ a(
|
|
182
|
-
|
|
186
|
+
j,
|
|
183
187
|
{
|
|
184
188
|
as: "div",
|
|
185
189
|
defaultVariant: "displayMd",
|
|
186
190
|
mobileVariant: "headingXl",
|
|
187
|
-
colorScheme:
|
|
191
|
+
colorScheme: y,
|
|
188
192
|
className: l.title,
|
|
189
|
-
title:
|
|
193
|
+
title: D
|
|
190
194
|
}
|
|
191
195
|
)
|
|
192
196
|
] }),
|
|
193
|
-
/* @__PURE__ */ a("div", { "data-scroll-id": "sections", className: l.sections, children:
|
|
197
|
+
/* @__PURE__ */ a("div", { "data-scroll-id": "sections", className: l.sections, children: W.map((d, m) => /* @__PURE__ */ o(
|
|
194
198
|
"div",
|
|
195
199
|
{
|
|
196
|
-
id: `section-${
|
|
200
|
+
id: `section-${m + 1}`,
|
|
197
201
|
"data-scroll-id": "section",
|
|
198
202
|
className: l.section,
|
|
199
203
|
children: [
|
|
200
204
|
/* @__PURE__ */ o("div", { "data-scroll-id": "heading", className: l.heading, children: [
|
|
201
|
-
/* @__PURE__ */ a("div", { "data-scroll-id": "section-title", className: l.sectionTitleWrapper, children: /* @__PURE__ */ a(
|
|
202
|
-
/* @__PURE__ */ a("div", { "data-scroll-id": "section-index", className: l.sectionIndexWrapper, children: /* @__PURE__ */ o(
|
|
205
|
+
/* @__PURE__ */ a("div", { "data-scroll-id": "section-title", className: l.sectionTitleWrapper, children: /* @__PURE__ */ a(u, { as: "h3", defaultVariant: "headingSm", className: l.sectionTitle, children: d.title }) }),
|
|
206
|
+
/* @__PURE__ */ a("div", { "data-scroll-id": "section-index", className: l.sectionIndexWrapper, children: /* @__PURE__ */ o(u, { as: "p", defaultVariant: "headingSm", className: l.sectionIndex, children: [
|
|
203
207
|
"(",
|
|
204
|
-
String(
|
|
208
|
+
String(m + 1).padStart(2, "0"),
|
|
205
209
|
")"
|
|
206
210
|
] }) })
|
|
207
211
|
] }),
|
|
208
212
|
/* @__PURE__ */ o("div", { "data-scroll-id": "content", className: l.content, children: [
|
|
209
213
|
/* @__PURE__ */ o("div", { "data-scroll-id": "protocol", className: l.protocolWrapper, children: [
|
|
210
|
-
d.subtitle && /* @__PURE__ */ a(
|
|
214
|
+
d.subtitle && /* @__PURE__ */ a(u, { as: "h4", defaultVariant: "headingLg", mobileVariant: "headingXs", children: d.subtitle }),
|
|
211
215
|
/* @__PURE__ */ a(
|
|
212
|
-
|
|
216
|
+
u,
|
|
213
217
|
{
|
|
214
218
|
className: l.description,
|
|
215
219
|
as: "div",
|
|
@@ -230,5 +234,5 @@ const Z = ({ colorScheme: f, label: p, title: M, sections: $ }) => {
|
|
|
230
234
|
] }) });
|
|
231
235
|
};
|
|
232
236
|
export {
|
|
233
|
-
|
|
237
|
+
_ as ExpandingDetails
|
|
234
238
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),E=require("react-dom"),w=require("../scienceHero.module.css.cjs.js");function M({children:u,backgroundImage:h,cursorLink:m}){const[l,x]=o.useState({x:0,y:0}),[c,a]=o.useState(!1),[g,d]=o.useState(!1),[e,f]=o.useState(null),[r,$]=o.useState(!1);o.useEffect(()=>{d(!0);const t=()=>$(window.innerWidth<=768);return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),d(!1)}},[]),o.useEffect(()=>{if(r)return;const t=s=>{x({x:s.clientX,y:s.clientY})},i=()=>{if(c&&e){const s=document.querySelector('[data-type="hero"]');s&&f(s.getBoundingClientRect())}};return window.addEventListener("mousemove",t),window.addEventListener("scroll",i,{passive:!0}),window.addEventListener("resize",i,{passive:!0}),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[r,c,e]);const b=t=>{r||(f(t.currentTarget.getBoundingClientRect()),a(!0))},y=()=>{r||a(!1)},C=()=>{window.location.href=m};if(r)return n.jsx(n.Fragment,{children:u});const p=`circle(270px at ${l.x}px ${l.y}px)`,v=c&&e&&n.jsx("div",{className:w.default.cursorContainer,style:{position:"fixed",top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`,overflow:"hidden",cursor:"pointer"},children:n.jsx("div",{className:w.default.normalBackground,style:{position:"absolute",top:`${-e.top}px`,left:`${-e.left}px`,backgroundImage:`url(${h})`,clipPath:p,WebkitClipPath:p,backgroundPosition:"center"}})});return n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-type":"hero",onMouseEnter:b,onMouseLeave:y,onClick:C,style:{cursor:"pointer"},children:u}),g&&v&&E.createPortal(v,document.body)]})}exports.ScienceClientCursor=M;
|
|
@@ -1,84 +1,87 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
const [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
window.removeEventListener("resize",
|
|
2
|
+
import { jsx as i, Fragment as v, jsxs as $ } from "react/jsx-runtime";
|
|
3
|
+
import { useState as r, useEffect as w } from "react";
|
|
4
|
+
import { createPortal as k } from "react-dom";
|
|
5
|
+
import h from "../scienceHero.module.css.es.js";
|
|
6
|
+
function S({ children: l, backgroundImage: x, cursorLink: g }) {
|
|
7
|
+
const [d, y] = r({ x: 0, y: 0 }), [c, a] = r(!1), [E, u] = r(!1), [e, p] = r(null), [o, M] = r(!1);
|
|
8
|
+
w(() => {
|
|
9
|
+
u(!0);
|
|
10
|
+
const t = () => M(window.innerWidth <= 768);
|
|
11
|
+
return t(), window.addEventListener("resize", t), () => {
|
|
12
|
+
window.removeEventListener("resize", t), u(!1);
|
|
13
13
|
};
|
|
14
|
-
}, []),
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
x:
|
|
19
|
-
y:
|
|
14
|
+
}, []), w(() => {
|
|
15
|
+
if (o) return;
|
|
16
|
+
const t = (n) => {
|
|
17
|
+
y({
|
|
18
|
+
x: n.clientX,
|
|
19
|
+
y: n.clientY
|
|
20
20
|
});
|
|
21
|
-
},
|
|
22
|
-
|
|
21
|
+
}, s = () => {
|
|
22
|
+
if (c && e) {
|
|
23
|
+
const n = document.querySelector('[data-type="hero"]');
|
|
24
|
+
n && p(n.getBoundingClientRect());
|
|
25
|
+
}
|
|
23
26
|
};
|
|
24
|
-
return window.addEventListener("mousemove",
|
|
25
|
-
window.removeEventListener("mousemove",
|
|
27
|
+
return window.addEventListener("mousemove", t), window.addEventListener("scroll", s, { passive: !0 }), window.addEventListener("resize", s, { passive: !0 }), () => {
|
|
28
|
+
window.removeEventListener("mousemove", t), window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
|
|
26
29
|
};
|
|
27
|
-
}, [
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
+
}, [o, c, e]);
|
|
31
|
+
const b = (t) => {
|
|
32
|
+
o || (p(t.currentTarget.getBoundingClientRect()), a(!0));
|
|
33
|
+
}, C = () => {
|
|
34
|
+
o || a(!1);
|
|
30
35
|
}, L = () => {
|
|
31
|
-
|
|
32
|
-
}, k = () => {
|
|
33
|
-
window.location.href = v;
|
|
36
|
+
window.location.href = g;
|
|
34
37
|
};
|
|
35
|
-
if (
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
const
|
|
38
|
+
if (o)
|
|
39
|
+
return /* @__PURE__ */ i(v, { children: l });
|
|
40
|
+
const f = `circle(270px at ${d.x}px ${d.y}px)`, m = c && e && /* @__PURE__ */ i(
|
|
38
41
|
"div",
|
|
39
42
|
{
|
|
40
|
-
className:
|
|
43
|
+
className: h.cursorContainer,
|
|
41
44
|
style: {
|
|
42
45
|
position: "fixed",
|
|
43
|
-
top: `${
|
|
44
|
-
left: `${
|
|
45
|
-
width: `${
|
|
46
|
-
height: `${
|
|
46
|
+
top: `${e.top}px`,
|
|
47
|
+
left: `${e.left}px`,
|
|
48
|
+
width: `${e.width}px`,
|
|
49
|
+
height: `${e.height}px`,
|
|
47
50
|
overflow: "hidden",
|
|
48
51
|
cursor: "pointer"
|
|
49
52
|
},
|
|
50
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ i(
|
|
51
54
|
"div",
|
|
52
55
|
{
|
|
53
|
-
className:
|
|
56
|
+
className: h.normalBackground,
|
|
54
57
|
style: {
|
|
55
58
|
position: "absolute",
|
|
56
|
-
top: `${-
|
|
57
|
-
left: `${-
|
|
58
|
-
backgroundImage: `url(${
|
|
59
|
-
clipPath:
|
|
60
|
-
WebkitClipPath:
|
|
61
|
-
backgroundPosition:
|
|
59
|
+
top: `${-e.top}px`,
|
|
60
|
+
left: `${-e.left}px`,
|
|
61
|
+
backgroundImage: `url(${x})`,
|
|
62
|
+
clipPath: f,
|
|
63
|
+
WebkitClipPath: f,
|
|
64
|
+
backgroundPosition: "center"
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
)
|
|
65
68
|
}
|
|
66
69
|
);
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ $(v, { children: [
|
|
71
|
+
/* @__PURE__ */ i(
|
|
69
72
|
"div",
|
|
70
73
|
{
|
|
71
74
|
"data-type": "hero",
|
|
72
|
-
onMouseEnter:
|
|
73
|
-
onMouseLeave:
|
|
74
|
-
onClick:
|
|
75
|
+
onMouseEnter: b,
|
|
76
|
+
onMouseLeave: C,
|
|
77
|
+
onClick: L,
|
|
75
78
|
style: { cursor: "pointer" },
|
|
76
|
-
children:
|
|
79
|
+
children: l
|
|
77
80
|
}
|
|
78
81
|
),
|
|
79
|
-
|
|
82
|
+
E && m && k(m, document.body)
|
|
80
83
|
] });
|
|
81
84
|
}
|
|
82
85
|
export {
|
|
83
|
-
|
|
86
|
+
S as ScienceClientCursor
|
|
84
87
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../components/Typography/Typography.cjs.js"),o=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js"),t=require("./scrollingText.module.css.cjs.js"),i=({label:r,url:l})=>e.jsx("a",{href:l,className:t.default.label,children:e.jsx(n.Typography,{defaultVariant:"labelMd",emphasis:!0,mobileVariant:"labelSm",weight:"regular",children:r})}),a=({labels:r})=>e.jsx("section",{className:t.default.root,children:r.length>0&&e.jsx("div",{className:t.default.footer,children:e.jsx(o.InfiniteScroll,{items:r,renderItem:i})})});exports.ScrollingText=a;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Typography as o } from "../../components/Typography/Typography.es.js";
|
|
3
3
|
import { InfiniteScroll as i } from "../../components/InfiniteScroll/InfiniteScroll.es.js";
|
|
4
|
-
import t from "./
|
|
4
|
+
import t from "./scrollingText.module.css.es.js";
|
|
5
5
|
const a = ({ label: r, url: l }) => /* @__PURE__ */ e("a", { href: l, className: t.label, children: /* @__PURE__ */ e(o, { defaultVariant: "labelMd", emphasis: !0, mobileVariant: "labelSm", weight: "regular", children: r }) }), d = ({ labels: r }) => /* @__PURE__ */ e("section", { className: t.root, children: r.length > 0 && /* @__PURE__ */ e("div", { className: t.footer, children: /* @__PURE__ */ e(i, { items: r, renderItem: a }) }) });
|
|
6
6
|
export {
|
|
7
|
-
d as
|
|
7
|
+
d as ScrollingText
|
|
8
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="scrollingText-module__root___Ss51X",e="scrollingText-module__footer___jSdGU",l="scrollingText-module__label___a-lF4",t={root:o,footer:e,label:l};exports.default=t;exports.footer=e;exports.label=l;exports.root=o;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenpatient-org/healthspan-marketing-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.150",
|
|
4
4
|
"description": "Design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -556,10 +556,10 @@
|
|
|
556
556
|
"import": "./dist/modules/ScienceHero/ScienceHero.es.js",
|
|
557
557
|
"require": "./dist/modules/ScienceHero/ScienceHero.cjs.js"
|
|
558
558
|
},
|
|
559
|
-
"./
|
|
560
|
-
"types": "./dist/modules/
|
|
561
|
-
"import": "./dist/modules/
|
|
562
|
-
"require": "./dist/modules/
|
|
559
|
+
"./ScrollingText": {
|
|
560
|
+
"types": "./dist/modules/ScrollingText/ScrollingText.d.ts",
|
|
561
|
+
"import": "./dist/modules/ScrollingText/ScrollingText.es.js",
|
|
562
|
+
"require": "./dist/modules/ScrollingText/ScrollingText.cjs.js"
|
|
563
563
|
},
|
|
564
564
|
"./Bubbles": {
|
|
565
565
|
"types": "./dist/pageComponents/Bubbles/Bubbles.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../components/Typography/Typography.cjs.js"),i=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js"),l=require("./infiniteScrolle.module.css.cjs.js"),o=({label:r,url:n})=>e.jsx("a",{href:n,className:l.default.label,children:e.jsx(t.Typography,{defaultVariant:"labelMd",emphasis:!0,mobileVariant:"labelSm",weight:"regular",children:r})}),a=({labels:r})=>e.jsx("section",{className:l.default.root,children:r.length>0&&e.jsx("div",{className:l.default.footer,children:e.jsx(i.InfiniteScroll,{items:r,renderItem:o})})});exports.InfiniteScrollModule=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="infiniteScrolle-module__root___CZywa",e="infiniteScrolle-module__footer___3AoPY",l="infiniteScrolle-module__label___NrIGo",t={root:o,footer:e,label:l};exports.default=t;exports.footer=e;exports.label=l;exports.root=o;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const o = "infiniteScrolle-module__root___CZywa", e = "infiniteScrolle-module__footer___3AoPY", l = "infiniteScrolle-module__label___NrIGo", t = {
|
|
2
|
-
root: o,
|
|
3
|
-
footer: e,
|
|
4
|
-
label: l
|
|
5
|
-
};
|
|
6
|
-
export {
|
|
7
|
-
t as default,
|
|
8
|
-
e as footer,
|
|
9
|
-
l as label,
|
|
10
|
-
o as root
|
|
11
|
-
};
|