@zenpatient-org/healthspan-marketing-ui 0.1.125 → 0.1.127

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../components/Typography/Typography.cjs.js"),u=require("./ScienceHeroCursor.cjs.js"),a=require("./scienceHero.module.css.cjs.js"),m=({firstLineTitle:n,optionalLineTitle:r,highlightedLineTitle:i,label:t,backgroundImage:l,badges:o,cursorLink:d})=>e.jsx(u.ScienceHeroCursor,{backgroundImage:l,cursorLink:d,children:e.jsxs("section",{className:a.default.root,"data-type":"hero",children:[e.jsx("div",{className:a.default.blurredBackground,style:{backgroundImage:`url(${l})`}}),e.jsxs("div",{className:a.default.container,children:[e.jsx("div",{className:a.default.leftColumn}),e.jsxs("div",{className:a.default.mainColumn,children:[e.jsx("div",{className:a.default.verticalBorder}),e.jsx("div",{className:a.default.circleVector}),e.jsx("a",{className:a.default.circleVectorMobile,href:d,style:{backgroundImage:`url(${l}`}}),e.jsxs("div",{className:a.default.content,children:[t&&e.jsx(s.Typography,{defaultVariant:"labelXs",emphasis:!0,className:a.default.label,children:t}),e.jsxs("div",{className:a.default.title,children:[e.jsx(s.Typography,{as:"h2",defaultVariant:"displayXl",mobileVariant:"displayXs",className:a.default.firstLineTitle,children:n}),r&&e.jsx(s.Typography,{defaultVariant:"displayXl",mobileVariant:"displayXs",className:a.default.optionalLineTitle,children:r}),i&&e.jsx(s.Typography,{defaultVariant:"displayXl",mobileVariant:"displayXs",className:a.default.highlightedLineTitle,children:i})]}),e.jsx("div",{className:a.default.badgesRow,children:o.map(c=>e.jsx(s.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:a.default.badge,children:c},c))})]}),e.jsx("div",{className:a.default.verticalBorder})]}),e.jsx("div",{className:a.default.rightColumn})]})]})});exports.ScienceHero=m;
@@ -0,0 +1,10 @@
1
+ export type ScienceHeroProps = {
2
+ firstLineTitle: string;
3
+ optionalLineTitle?: string;
4
+ highlightedLineTitle?: string;
5
+ label?: string;
6
+ backgroundImage: string;
7
+ cursorLink: string;
8
+ badges: Array<string>;
9
+ };
10
+ export declare const ScienceHero: ({ firstLineTitle, optionalLineTitle, highlightedLineTitle, label, backgroundImage, badges, cursorLink, }: ScienceHeroProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,79 @@
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { Typography as s } from "../../components/Typography/Typography.es.js";
3
+ import { ScienceHeroCursor as h } from "./ScienceHeroCursor.es.js";
4
+ import a from "./scienceHero.module.css.es.js";
5
+ const f = ({
6
+ firstLineTitle: n,
7
+ optionalLineTitle: r,
8
+ highlightedLineTitle: c,
9
+ label: t,
10
+ backgroundImage: i,
11
+ badges: o,
12
+ cursorLink: d
13
+ }) => /* @__PURE__ */ e(h, { backgroundImage: i, cursorLink: d, children: /* @__PURE__ */ l("section", { className: a.root, "data-type": "hero", children: [
14
+ /* @__PURE__ */ e("div", { className: a.blurredBackground, style: { backgroundImage: `url(${i})` } }),
15
+ /* @__PURE__ */ l("div", { className: a.container, children: [
16
+ /* @__PURE__ */ e("div", { className: a.leftColumn }),
17
+ /* @__PURE__ */ l("div", { className: a.mainColumn, children: [
18
+ /* @__PURE__ */ e("div", { className: a.verticalBorder }),
19
+ /* @__PURE__ */ e("div", { className: a.circleVector }),
20
+ /* @__PURE__ */ e(
21
+ "a",
22
+ {
23
+ className: a.circleVectorMobile,
24
+ href: d,
25
+ style: { backgroundImage: `url(${i}` }
26
+ }
27
+ ),
28
+ /* @__PURE__ */ l("div", { className: a.content, children: [
29
+ t && /* @__PURE__ */ e(s, { defaultVariant: "labelXs", emphasis: !0, className: a.label, children: t }),
30
+ /* @__PURE__ */ l("div", { className: a.title, children: [
31
+ /* @__PURE__ */ e(
32
+ s,
33
+ {
34
+ as: "h2",
35
+ defaultVariant: "displayXl",
36
+ mobileVariant: "displayXs",
37
+ className: a.firstLineTitle,
38
+ children: n
39
+ }
40
+ ),
41
+ r && /* @__PURE__ */ e(
42
+ s,
43
+ {
44
+ defaultVariant: "displayXl",
45
+ mobileVariant: "displayXs",
46
+ className: a.optionalLineTitle,
47
+ children: r
48
+ }
49
+ ),
50
+ c && /* @__PURE__ */ e(
51
+ s,
52
+ {
53
+ defaultVariant: "displayXl",
54
+ mobileVariant: "displayXs",
55
+ className: a.highlightedLineTitle,
56
+ children: c
57
+ }
58
+ )
59
+ ] }),
60
+ /* @__PURE__ */ e("div", { className: a.badgesRow, children: o.map((m) => /* @__PURE__ */ e(
61
+ s,
62
+ {
63
+ as: "p",
64
+ defaultVariant: "labelXs",
65
+ emphasis: !0,
66
+ className: a.badge,
67
+ children: m
68
+ },
69
+ m
70
+ )) })
71
+ ] }),
72
+ /* @__PURE__ */ e("div", { className: a.verticalBorder })
73
+ ] }),
74
+ /* @__PURE__ */ e("div", { className: a.rightColumn })
75
+ ] })
76
+ ] }) });
77
+ export {
78
+ f as ScienceHero
79
+ };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),t=require("react"),C=require("react-dom"),w=require("./scienceHero.module.css.cjs.js");function L({children:r,backgroundImage:p,cursorLink:v}){const[i,x]=t.useState({x:0,y:0}),[h,m]=t.useState(0),[$,c]=t.useState(!1),[b,l]=t.useState(!1),[o,g]=t.useState(null),[s,M]=t.useState(!1);t.useEffect(()=>{l(!0);const e=()=>M(window.innerWidth<=768);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),l(!1)}},[]),t.useEffect(()=>{if(s)return;const e=f=>{x({x:f.clientX,y:f.clientY})},d=()=>{m(window.scrollY)};return window.addEventListener("mousemove",e),window.addEventListener("scroll",d),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("scroll",d)}},[s]);const S=e=>{s||(g(e.currentTarget.getBoundingClientRect()),c(!0))},y=()=>{s||c(!1)},E=()=>{window.location.href=v};if(typeof window>"u")return r;if(s)return n.jsx("div",{children:r});const u=`circle(270px at ${i.x}px ${i.y}px)`,a=$&&o&&n.jsx("div",{className:w.default.cursorContainer,style:{position:"fixed",top:`${o.top}px`,left:`${o.left}px`,width:`${o.width}px`,height:`${o.height}px`,overflow:"hidden",cursor:"pointer"},children:n.jsx("div",{className:w.default.normalBackground,style:{position:"absolute",top:`${-o.top}px`,left:`${-o.left}px`,backgroundImage:`url(${p})`,clipPath:u,WebkitClipPath:u,backgroundPosition:`center ${-h}px`}})});return n.jsxs(n.Fragment,{children:[n.jsx("div",{onMouseEnter:S,onMouseLeave:y,onClick:E,style:{cursor:"pointer"},children:r}),b&&a&&C.createPortal(a,document.body)]})}exports.ScienceHeroCursor=L;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+
3
+ type ScienceHeroCursorProps = {
4
+ children: React.ReactNode;
5
+ backgroundImage: string;
6
+ cursorLink: string;
7
+ };
8
+ export declare function ScienceHeroCursor({ children, backgroundImage, cursorLink }: ScienceHeroCursorProps): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
9
+ export {};
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsx as r, jsxs as k, Fragment as P } from "react/jsx-runtime";
3
+ import { useState as o, useEffect as p } from "react";
4
+ import { createPortal as R } from "react-dom";
5
+ import w from "./scienceHero.module.css.es.js";
6
+ function z({ children: s, backgroundImage: m, cursorLink: v }) {
7
+ const [i, h] = o({ x: 0, y: 0 }), [x, M] = o(0), [b, l] = o(!1), [g, c] = o(!1), [t, $] = o(null), [n, y] = o(!1);
8
+ p(() => {
9
+ c(!0);
10
+ const e = () => y(window.innerWidth <= 768);
11
+ return e(), window.addEventListener("resize", e), () => {
12
+ window.removeEventListener("resize", e), c(!1);
13
+ };
14
+ }, []), p(() => {
15
+ if (n) return;
16
+ const e = (f) => {
17
+ h({
18
+ x: f.clientX,
19
+ y: f.clientY
20
+ });
21
+ }, a = () => {
22
+ M(window.scrollY);
23
+ };
24
+ return window.addEventListener("mousemove", e), window.addEventListener("scroll", a), () => {
25
+ window.removeEventListener("mousemove", e), window.removeEventListener("scroll", a);
26
+ };
27
+ }, [n]);
28
+ const E = (e) => {
29
+ n || ($(e.currentTarget.getBoundingClientRect()), l(!0));
30
+ }, C = () => {
31
+ n || l(!1);
32
+ }, L = () => {
33
+ window.location.href = v;
34
+ };
35
+ if (typeof window > "u") return s;
36
+ if (n)
37
+ return /* @__PURE__ */ r("div", { children: s });
38
+ const d = `circle(270px at ${i.x}px ${i.y}px)`, u = b && t && /* @__PURE__ */ r(
39
+ "div",
40
+ {
41
+ className: w.cursorContainer,
42
+ style: {
43
+ position: "fixed",
44
+ top: `${t.top}px`,
45
+ left: `${t.left}px`,
46
+ width: `${t.width}px`,
47
+ height: `${t.height}px`,
48
+ overflow: "hidden",
49
+ cursor: "pointer"
50
+ },
51
+ children: /* @__PURE__ */ r(
52
+ "div",
53
+ {
54
+ className: w.normalBackground,
55
+ style: {
56
+ position: "absolute",
57
+ top: `${-t.top}px`,
58
+ left: `${-t.left}px`,
59
+ backgroundImage: `url(${m})`,
60
+ clipPath: d,
61
+ WebkitClipPath: d,
62
+ backgroundPosition: `center ${-x}px`
63
+ }
64
+ }
65
+ )
66
+ }
67
+ );
68
+ return /* @__PURE__ */ k(P, { children: [
69
+ /* @__PURE__ */ r(
70
+ "div",
71
+ {
72
+ onMouseEnter: E,
73
+ onMouseLeave: C,
74
+ onClick: L,
75
+ style: { cursor: "pointer" },
76
+ children: s
77
+ }
78
+ ),
79
+ g && u && R(u, document.body)
80
+ ] });
81
+ }
82
+ export {
83
+ z as ScienceHeroCursor
84
+ };
@@ -0,0 +1 @@
1
+ export { ScienceHero } from './ScienceHero';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="scienceHero-module__root___1mxBF",o="scienceHero-module__blurredBackground___1nHn-",n="scienceHero-module__normalBackground___Nmff2",c="scienceHero-module__container___nARrv",l="scienceHero-module__circleVector___YRvlO",t="scienceHero-module__mainColumn___6FXPp",i="scienceHero-module__leftColumn___btXP-",_="scienceHero-module__rightColumn___NmO1h",r="scienceHero-module__verticalBorder___Yp2-F",s="scienceHero-module__content___-ns5L",d="scienceHero-module__label___uJCET",u="scienceHero-module__title___vVz4E",a="scienceHero-module__firstLineTitle___h1FKx",m="scienceHero-module__optionalLineTitle___erKDO",g="scienceHero-module__highlightedLineTitle___mmHaK",b="scienceHero-module__badgesRow___N0x9v",H="scienceHero-module__badge___oG08P",h="scienceHero-module__circleVectorMobile___QoQiY",T={root:e,blurredBackground:o,normalBackground:n,container:c,circleVector:l,mainColumn:t,leftColumn:i,rightColumn:_,verticalBorder:r,content:s,label:d,title:u,firstLineTitle:a,optionalLineTitle:m,highlightedLineTitle:g,badgesRow:b,badge:H,circleVectorMobile:h};exports.badge=H;exports.badgesRow=b;exports.blurredBackground=o;exports.circleVector=l;exports.circleVectorMobile=h;exports.container=c;exports.content=s;exports.default=T;exports.firstLineTitle=a;exports.highlightedLineTitle=g;exports.label=d;exports.leftColumn=i;exports.mainColumn=t;exports.normalBackground=n;exports.optionalLineTitle=m;exports.rightColumn=_;exports.root=e;exports.title=u;exports.verticalBorder=r;
@@ -0,0 +1,41 @@
1
+ const e = "scienceHero-module__root___1mxBF", o = "scienceHero-module__blurredBackground___1nHn-", _ = "scienceHero-module__normalBackground___Nmff2", c = "scienceHero-module__container___nARrv", n = "scienceHero-module__circleVector___YRvlO", l = "scienceHero-module__mainColumn___6FXPp", t = "scienceHero-module__leftColumn___btXP-", i = "scienceHero-module__rightColumn___NmO1h", r = "scienceHero-module__verticalBorder___Yp2-F", s = "scienceHero-module__content___-ns5L", d = "scienceHero-module__label___uJCET", m = "scienceHero-module__title___vVz4E", u = "scienceHero-module__firstLineTitle___h1FKx", a = "scienceHero-module__optionalLineTitle___erKDO", g = "scienceHero-module__highlightedLineTitle___mmHaK", H = "scienceHero-module__badgesRow___N0x9v", b = "scienceHero-module__badge___oG08P", h = "scienceHero-module__circleVectorMobile___QoQiY", B = {
2
+ root: e,
3
+ blurredBackground: o,
4
+ normalBackground: _,
5
+ container: c,
6
+ circleVector: n,
7
+ mainColumn: l,
8
+ leftColumn: t,
9
+ rightColumn: i,
10
+ verticalBorder: r,
11
+ content: s,
12
+ label: d,
13
+ title: m,
14
+ firstLineTitle: u,
15
+ optionalLineTitle: a,
16
+ highlightedLineTitle: g,
17
+ badgesRow: H,
18
+ badge: b,
19
+ circleVectorMobile: h
20
+ };
21
+ export {
22
+ b as badge,
23
+ H as badgesRow,
24
+ o as blurredBackground,
25
+ n as circleVector,
26
+ h as circleVectorMobile,
27
+ c as container,
28
+ s as content,
29
+ B as default,
30
+ u as firstLineTitle,
31
+ g as highlightedLineTitle,
32
+ d as label,
33
+ t as leftColumn,
34
+ l as mainColumn,
35
+ _ as normalBackground,
36
+ a as optionalLineTitle,
37
+ i as rightColumn,
38
+ e as root,
39
+ m as title,
40
+ r as verticalBorder
41
+ };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),o=require("../../../../components/Typography/Typography.cjs.js"),b=require("../../../../utils/cn/cn.cjs.js"),l=require("./timelineContent.module.css.cjs.js");function T(r){const t=r.slice();for(let n=t.length-1;n>0;n--){const i=Math.floor(Math.random()*(n+1));[t[n],t[i]]=[t[i],t[n]]}return t}const j=[{key:"optimal",label:"Optimal"},{key:"inRange",label:"In Range"},{key:"outOfRange",label:"Out of Range"}],x=({tabs:r})=>{const[t,n]=u.useState(0),i=u.useRef(null),{optimal:h,inRange:m,outOfRange:f}=r[t],g=u.useMemo(()=>T([...Array(h).fill("optimal"),...Array(m).fill("inRange"),...Array(f).fill("outOfRange")]),[h,m,f]),p=u.useCallback(a=>{i.current=a.touches[0].clientX},[]),y=u.useCallback(a=>{if(i.current===null)return;const d=a.changedTouches[0].clientX-i.current;Math.abs(d)>50&&n(c=>d<0&&c<r.length-1?c+1:d>0&&c>0?c-1:c),i.current=null},[r.length]);return e.jsx("div",{className:l.default.root,children:e.jsxs("div",{className:l.default.container,children:[e.jsxs("div",{className:l.default.content,onTouchStart:p,onTouchEnd:y,children:[e.jsx("div",{className:l.default.metricsContainer,children:j.map((a,s)=>e.jsxs("div",{className:l.default.metric,children:[e.jsx(o.Typography,{defaultVariant:"displayLg",mobileVariant:"displaySm",weight:"regular",children:r[t][a.key]}),e.jsxs("div",{className:l.default.metricTitle,children:[e.jsx(o.Typography,{as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:"("}),e.jsx(o.Typography,{as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:a.label}),e.jsx("div",{className:l.default.circle,"data-value":a.key}),e.jsx(o.Typography,{as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:")"})]})]},`${a.key}_${s}`))}),e.jsx("div",{className:l.default.canvas,children:g.map((a,s)=>e.jsx("div",{className:l.default.circle,"data-value":a},s))})]}),e.jsx("div",{className:l.default.tabsContainer,children:r.map((a,s)=>e.jsx("button",{className:b.cn(l.default.tab,t===s&&l.default.tabActive),onClick:()=>n(s),children:e.jsx(o.Typography,{defaultVariant:"labelMd",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:a.label})},a.label))})]})})};exports.TimelineContent=x;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),d=require("../../../../node_modules/swiper/swiper-react.cjs.js");;/* empty css */const t=require("../../../../components/Typography/Typography.cjs.js"),y=require("../../../../utils/cn/cn.cjs.js"),f=require("../../../../utils/useSwiper/useSwiper.cjs.js"),b=require("./utils.cjs.js"),a=require("./timelineContent.module.css.cjs.js"),v=[{key:"optimal",label:"Optimal"},{key:"inRange",label:"In Range"},{key:"outOfRange",label:"Out of Range"}],S=({tabs:s})=>{const{activeIndex:c,onSwiperInit:o,handleSlideTo:u,handleSlideChange:p,handleSwiperResize:m}=f.useSwiper(),h=g.useMemo(()=>s.map(l=>b.distributePoints(l.optimal,l.inRange,l.outOfRange)),[s]);return e.jsx("div",{className:a.default.root,children:e.jsxs("div",{className:a.default.container,children:[e.jsx(d.Swiper,{onSwiper:o,onResize:m,onSlideChange:p,slidesPerView:1,allowTouchMove:s.length>1,spaceBetween:0,initialSlide:0,className:a.default.swiper,children:s.map((l,n)=>e.jsx(d.SwiperSlide,{children:e.jsxs("div",{className:a.default.content,children:[e.jsx("div",{className:a.default.metricsContainer,children:v.map((i,r)=>e.jsxs("div",{className:a.default.metric,children:[e.jsx(t.Typography,{defaultVariant:"displayLg",mobileVariant:"displaySm",weight:"regular",children:l[i.key]}),e.jsxs("div",{className:a.default.metricTitle,children:[e.jsx(t.Typography,{as:"div",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:"("}),e.jsx(t.Typography,{as:"div",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:i.label}),e.jsx("div",{className:a.default.circle,"data-value":i.key}),e.jsx(t.Typography,{as:"div",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:")"})]})]},`${i.key}_${r}`))}),e.jsx("div",{className:a.default.canvas,children:h[n].map((i,r)=>e.jsx("div",{className:a.default.circle,"data-value":i},r))})]})},l.label))}),e.jsx("div",{className:a.default.tabsContainer,children:s.map((l,n)=>e.jsx("button",{className:y.cn(a.default.tab,c===n&&a.default.tabActive),onClick:()=>u(n),children:e.jsx(t.Typography,{defaultVariant:"labelMd",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:l.label})},l.label))})]})})};exports.TimelineContent=S;
@@ -1,99 +1,97 @@
1
1
  "use client";
2
- import { jsx as a, jsxs as u } from "react/jsx-runtime";
3
- import { useState as v, useRef as N, useMemo as T, useCallback as g } from "react";
4
- import { Typography as o } from "../../../../components/Typography/Typography.es.js";
5
- import { cn as R } from "../../../../utils/cn/cn.es.js";
6
- import l from "./timelineContent.module.css.es.js";
7
- function V(i) {
8
- const n = i.slice();
9
- for (let t = n.length - 1; t > 0; t--) {
10
- const r = Math.floor(Math.random() * (t + 1));
11
- [n[t], n[r]] = [n[r], n[t]];
12
- }
13
- return n;
14
- }
15
- const X = [
16
- {
17
- key: "optimal",
18
- label: "Optimal"
19
- },
20
- {
21
- key: "inRange",
22
- label: "In Range"
23
- },
24
- {
25
- key: "outOfRange",
26
- label: "Out of Range"
27
- }
28
- ], E = ({ tabs: i }) => {
29
- const [n, t] = v(0), r = N(null), { optimal: h, inRange: d, outOfRange: f } = i[n], b = T(() => V([
30
- ...Array(h).fill("optimal"),
31
- ...Array(d).fill("inRange"),
32
- ...Array(f).fill("outOfRange")
33
- ]), [h, d, f]), p = g((e) => {
34
- r.current = e.touches[0].clientX;
35
- }, []), y = g(
36
- (e) => {
37
- if (r.current === null) return;
38
- const m = e.changedTouches[0].clientX - r.current;
39
- Math.abs(m) > 50 && t((s) => m < 0 && s < i.length - 1 ? s + 1 : m > 0 && s > 0 ? s - 1 : s), r.current = null;
40
- },
41
- [i.length]
2
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
3
+ import { useMemo as g } from "react";
4
+ import { Swiper as v, SwiperSlide as b } from "../../../../node_modules/swiper/swiper-react.es.js";
5
+ /* empty css */
6
+ import { Typography as n } from "../../../../components/Typography/Typography.es.js";
7
+ import { cn as f } from "../../../../utils/cn/cn.es.js";
8
+ import { useSwiper as S } from "../../../../utils/useSwiper/useSwiper.es.js";
9
+ import { distributePoints as w } from "./utils.es.js";
10
+ import a from "./timelineContent.module.css.es.js";
11
+ const y = [
12
+ { key: "optimal", label: "Optimal" },
13
+ { key: "inRange", label: "In Range" },
14
+ { key: "outOfRange", label: "Out of Range" }
15
+ ], X = ({ tabs: r }) => {
16
+ const { activeIndex: m, onSwiperInit: d, handleSlideTo: c, handleSlideChange: p, handleSwiperResize: h } = S(), u = g(
17
+ () => r.map((i) => w(i.optimal, i.inRange, i.outOfRange)),
18
+ [r]
42
19
  );
43
- return /* @__PURE__ */ a("div", { className: l.root, children: /* @__PURE__ */ u("div", { className: l.container, children: [
44
- /* @__PURE__ */ u("div", { className: l.content, onTouchStart: p, onTouchEnd: y, children: [
45
- /* @__PURE__ */ a("div", { className: l.metricsContainer, children: X.map((e, c) => /* @__PURE__ */ u("div", { className: l.metric, children: [
46
- /* @__PURE__ */ a(o, { defaultVariant: "displayLg", mobileVariant: "displaySm", weight: "regular", children: i[n][e.key] }),
47
- /* @__PURE__ */ u("div", { className: l.metricTitle, children: [
48
- /* @__PURE__ */ a(
49
- o,
50
- {
51
- as: "p",
52
- defaultVariant: "labelSm",
53
- mobileVariant: "labelXs",
54
- emphasis: !0,
55
- weight: "regular",
56
- children: "("
57
- }
58
- ),
59
- /* @__PURE__ */ a(
60
- o,
61
- {
62
- as: "p",
63
- defaultVariant: "labelSm",
64
- mobileVariant: "labelXs",
65
- emphasis: !0,
66
- weight: "regular",
67
- children: e.label
68
- }
69
- ),
70
- /* @__PURE__ */ a("div", { className: l.circle, "data-value": e.key }),
71
- /* @__PURE__ */ a(
72
- o,
73
- {
74
- as: "p",
75
- defaultVariant: "labelSm",
76
- mobileVariant: "labelXs",
77
- emphasis: !0,
78
- weight: "regular",
79
- children: ")"
80
- }
81
- )
82
- ] })
83
- ] }, `${e.key}_${c}`)) }),
84
- /* @__PURE__ */ a("div", { className: l.canvas, children: b.map((e, c) => /* @__PURE__ */ a("div", { className: l.circle, "data-value": e }, c)) })
85
- ] }),
86
- /* @__PURE__ */ a("div", { className: l.tabsContainer, children: i.map((e, c) => /* @__PURE__ */ a(
20
+ return /* @__PURE__ */ e("div", { className: a.root, children: /* @__PURE__ */ s("div", { className: a.container, children: [
21
+ /* @__PURE__ */ e(
22
+ v,
23
+ {
24
+ onSwiper: d,
25
+ onResize: h,
26
+ onSlideChange: p,
27
+ slidesPerView: 1,
28
+ allowTouchMove: r.length > 1,
29
+ spaceBetween: 0,
30
+ initialSlide: 0,
31
+ className: a.swiper,
32
+ children: r.map((i, t) => /* @__PURE__ */ e(b, { children: /* @__PURE__ */ s("div", { className: a.content, children: [
33
+ /* @__PURE__ */ e("div", { className: a.metricsContainer, children: y.map((l, o) => /* @__PURE__ */ s("div", { className: a.metric, children: [
34
+ /* @__PURE__ */ e(
35
+ n,
36
+ {
37
+ defaultVariant: "displayLg",
38
+ mobileVariant: "displaySm",
39
+ weight: "regular",
40
+ children: i[l.key]
41
+ }
42
+ ),
43
+ /* @__PURE__ */ s("div", { className: a.metricTitle, children: [
44
+ /* @__PURE__ */ e(
45
+ n,
46
+ {
47
+ as: "div",
48
+ defaultVariant: "labelSm",
49
+ mobileVariant: "labelXs",
50
+ emphasis: !0,
51
+ weight: "regular",
52
+ children: "("
53
+ }
54
+ ),
55
+ /* @__PURE__ */ e(
56
+ n,
57
+ {
58
+ as: "div",
59
+ defaultVariant: "labelSm",
60
+ mobileVariant: "labelXs",
61
+ emphasis: !0,
62
+ weight: "regular",
63
+ children: l.label
64
+ }
65
+ ),
66
+ /* @__PURE__ */ e("div", { className: a.circle, "data-value": l.key }),
67
+ /* @__PURE__ */ e(
68
+ n,
69
+ {
70
+ as: "div",
71
+ defaultVariant: "labelSm",
72
+ mobileVariant: "labelXs",
73
+ emphasis: !0,
74
+ weight: "regular",
75
+ children: ")"
76
+ }
77
+ )
78
+ ] })
79
+ ] }, `${l.key}_${o}`)) }),
80
+ /* @__PURE__ */ e("div", { className: a.canvas, children: u[t].map((l, o) => /* @__PURE__ */ e("div", { className: a.circle, "data-value": l }, o)) })
81
+ ] }) }, i.label))
82
+ }
83
+ ),
84
+ /* @__PURE__ */ e("div", { className: a.tabsContainer, children: r.map((i, t) => /* @__PURE__ */ e(
87
85
  "button",
88
86
  {
89
- className: R(l.tab, n === c && l.tabActive),
90
- onClick: () => t(c),
91
- children: /* @__PURE__ */ a(o, { defaultVariant: "labelMd", mobileVariant: "labelXs", emphasis: !0, weight: "regular", children: e.label })
87
+ className: f(a.tab, m === t && a.tabActive),
88
+ onClick: () => c(t),
89
+ children: /* @__PURE__ */ e(n, { defaultVariant: "labelMd", mobileVariant: "labelXs", emphasis: !0, weight: "regular", children: i.label })
92
90
  },
93
- e.label
91
+ i.label
94
92
  )) })
95
93
  ] }) });
96
94
  };
97
95
  export {
98
- E as TimelineContent
96
+ X as TimelineContent
99
97
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="timelineContent-module__root___5V2gz",e="timelineContent-module__container___DSrBq",n="timelineContent-module__content___HS3bJ",o="timelineContent-module__metricsContainer___Bl9Mq",i="timelineContent-module__metric___QgjTy",_="timelineContent-module__metricTitle___NgmIf",c="timelineContent-module__canvas___nyUmZ",r="timelineContent-module__circle___FOAjD",l="timelineContent-module__tabsContainer___drNVG",a="timelineContent-module__tab___sCTOs",m="timelineContent-module__tabActive___Oa023",s={root:t,container:e,content:n,metricsContainer:o,metric:i,metricTitle:_,canvas:c,circle:r,tabsContainer:l,tab:a,tabActive:m};exports.canvas=c;exports.circle=r;exports.container=e;exports.content=n;exports.default=s;exports.metric=i;exports.metricTitle=_;exports.metricsContainer=o;exports.root=t;exports.tab=a;exports.tabActive=m;exports.tabsContainer=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="timelineContent-module__root___5V2gz",e="timelineContent-module__container___DSrBq",n="timelineContent-module__swiper___Pm56z",i="timelineContent-module__content___HS3bJ",o="timelineContent-module__metricsContainer___Bl9Mq",_="timelineContent-module__metric___QgjTy",c="timelineContent-module__metricTitle___NgmIf",r="timelineContent-module__canvas___nyUmZ",l="timelineContent-module__circle___FOAjD",m="timelineContent-module__tabsContainer___drNVG",a="timelineContent-module__tab___sCTOs",s="timelineContent-module__tabActive___Oa023",C={root:t,container:e,swiper:n,content:i,metricsContainer:o,metric:_,metricTitle:c,canvas:r,circle:l,tabsContainer:m,tab:a,tabActive:s};exports.canvas=r;exports.circle=l;exports.container=e;exports.content=i;exports.default=C;exports.metric=_;exports.metricTitle=c;exports.metricsContainer=o;exports.root=t;exports.swiper=n;exports.tab=a;exports.tabActive=s;exports.tabsContainer=m;
@@ -1,27 +1,29 @@
1
- const t = "timelineContent-module__root___5V2gz", e = "timelineContent-module__container___DSrBq", n = "timelineContent-module__content___HS3bJ", _ = "timelineContent-module__metricsContainer___Bl9Mq", o = "timelineContent-module__metric___QgjTy", i = "timelineContent-module__metricTitle___NgmIf", c = "timelineContent-module__canvas___nyUmZ", m = "timelineContent-module__circle___FOAjD", l = "timelineContent-module__tabsContainer___drNVG", a = "timelineContent-module__tab___sCTOs", r = "timelineContent-module__tabActive___Oa023", s = {
1
+ const t = "timelineContent-module__root___5V2gz", e = "timelineContent-module__container___DSrBq", n = "timelineContent-module__swiper___Pm56z", _ = "timelineContent-module__content___HS3bJ", o = "timelineContent-module__metricsContainer___Bl9Mq", i = "timelineContent-module__metric___QgjTy", c = "timelineContent-module__metricTitle___NgmIf", m = "timelineContent-module__canvas___nyUmZ", l = "timelineContent-module__circle___FOAjD", r = "timelineContent-module__tabsContainer___drNVG", s = "timelineContent-module__tab___sCTOs", a = "timelineContent-module__tabActive___Oa023", C = {
2
2
  root: t,
3
3
  container: e,
4
- content: n,
5
- metricsContainer: _,
6
- metric: o,
7
- metricTitle: i,
8
- canvas: c,
9
- circle: m,
10
- tabsContainer: l,
11
- tab: a,
12
- tabActive: r
4
+ swiper: n,
5
+ content: _,
6
+ metricsContainer: o,
7
+ metric: i,
8
+ metricTitle: c,
9
+ canvas: m,
10
+ circle: l,
11
+ tabsContainer: r,
12
+ tab: s,
13
+ tabActive: a
13
14
  };
14
15
  export {
15
- c as canvas,
16
- m as circle,
16
+ m as canvas,
17
+ l as circle,
17
18
  e as container,
18
- n as content,
19
- s as default,
20
- o as metric,
21
- i as metricTitle,
22
- _ as metricsContainer,
19
+ _ as content,
20
+ C as default,
21
+ i as metric,
22
+ c as metricTitle,
23
+ o as metricsContainer,
23
24
  t as root,
24
- a as tab,
25
- r as tabActive,
26
- l as tabsContainer
25
+ n as swiper,
26
+ s as tab,
27
+ a as tabActive,
28
+ r as tabsContainer
27
29
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}}function r(e,t){const n=[];for(let i=0;i<e.length;i++)e[i]===t&&n.push(i);return n}function c(e,t,n,i){p(t);for(let o=0;o<i&&o<t.length;o++)e[t[o]]=n}function a(e,t,n){const i=e+t+n,o=new Array(i).fill("optimal");let u=0,f=1,l=0;for(;Math.round(u)<i&&l<n;){const s=Math.round(u);o[s]==="optimal"&&(o[s]="outOfRange",l++),u+=f,f+=.3}if(l<n){const s=r(o,"optimal");c(o,s,"outOfRange",n-l)}const d=r(o,"optimal");return c(o,d,"inRange",t),o}exports.distributePoints=a;
@@ -0,0 +1,3 @@
1
+ type PointType = 'optimal' | 'inRange' | 'outOfRange';
2
+ export declare function distributePoints(optimal: number, inRange: number, outOfRange: number): PointType[];
3
+ export {};
@@ -0,0 +1,34 @@
1
+ function d(n) {
2
+ for (let t = n.length - 1; t > 0; t--) {
3
+ const o = Math.floor(Math.random() * (t + 1));
4
+ [n[t], n[o]] = [n[o], n[t]];
5
+ }
6
+ }
7
+ function u(n, t) {
8
+ const o = [];
9
+ for (let l = 0; l < n.length; l++)
10
+ n[l] === t && o.push(l);
11
+ return o;
12
+ }
13
+ function r(n, t, o, l) {
14
+ d(t);
15
+ for (let e = 0; e < l && e < t.length; e++)
16
+ n[t[e]] = o;
17
+ }
18
+ function h(n, t, o) {
19
+ const l = n + t + o, e = new Array(l).fill("optimal");
20
+ let c = 0, s = 1, i = 0;
21
+ for (; Math.round(c) < l && i < o; ) {
22
+ const f = Math.round(c);
23
+ e[f] === "optimal" && (e[f] = "outOfRange", i++), c += s, s += 0.3;
24
+ }
25
+ if (i < o) {
26
+ const f = u(e, "optimal");
27
+ r(e, f, "outOfRange", o - i);
28
+ }
29
+ const p = u(e, "optimal");
30
+ return r(e, p, "inRange", t), e;
31
+ }
32
+ export {
33
+ h as distributePoints
34
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../components/Button/Button.cjs.js"),c=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),n=require("../../utils/cn/cn.cjs.js"),t=require("./stillHaveQuestions.module.css.cjs.js"),m=require("./assets/stillHaveQuestions.jpg.cjs.js"),h=require("./assets/joinOurTeam.jpg.cjs.js"),g=({variant:i="StillHaveQuestions"})=>{const s={StillHaveQuestions:{title:e.jsxs(e.Fragment,{children:["Still Have ",e.jsx("b",{children:"questions?"})]}),buttonText:"Contact Us",buttonLink:"/contact-us",image:m.default},JoinOurTeam:{title:e.jsxs(e.Fragment,{children:["Have a passion for ",e.jsx("b",{children:"longevity science?"})]}),buttonText:"Join Our Team",buttonLink:"https://careers.gethealthspan.com/",image:h.default}},{title:o,buttonText:a,buttonLink:l,image:r}=s[i];return e.jsx("section",{className:t.default.root,children:e.jsx("div",{className:n.cn(t.default.imageWrapper,{[t.default.joinOurTeam]:i==="JoinOurTeam"}),style:{backgroundImage:`url(${r})`},children:e.jsxs("div",{className:n.cn(t.default.contentBox,{[t.default.joinOurTeam]:i==="JoinOurTeam"}),children:[e.jsx(c.HighlightedTitle,{colorScheme:"dark",title:e.jsx(d.Typography,{as:"p",defaultVariant:"displayMd",mobileVariant:"displayXs",children:o})}),e.jsx("div",{className:t.default.actions,children:e.jsx(u.Button,{as:"a",href:l,variant:"secondary",size:"lg",children:a})})]})})})};exports.StillHaveQuestions=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../components/Button/Button.cjs.js"),c=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),n=require("../../utils/cn/cn.cjs.js"),t=require("./stillHaveQuestions.module.css.cjs.js"),m=require("./assets/stillHaveQuestions.jpg.cjs.js"),h=require("./assets/joinOurTeam.jpg.cjs.js"),g=({variant:i="StillHaveQuestions"})=>{const s={StillHaveQuestions:{title:e.jsxs(e.Fragment,{children:["Still have ",e.jsx("b",{children:"questions?"})]}),buttonText:"Contact Us",buttonLink:"/contact-us",image:m.default},JoinOurTeam:{title:e.jsxs(e.Fragment,{children:["Have a passion for ",e.jsx("b",{children:"longevity science?"})]}),buttonText:"Join Our Team",buttonLink:"https://careers.gethealthspan.com/",image:h.default}},{title:o,buttonText:a,buttonLink:l,image:r}=s[i];return e.jsx("section",{className:t.default.root,children:e.jsx("div",{className:n.cn(t.default.imageWrapper,{[t.default.joinOurTeam]:i==="JoinOurTeam"}),style:{backgroundImage:`url(${r})`},children:e.jsxs("div",{className:n.cn(t.default.contentBox,{[t.default.joinOurTeam]:i==="JoinOurTeam"}),children:[e.jsx(c.HighlightedTitle,{colorScheme:"dark",title:e.jsx(d.Typography,{as:"p",defaultVariant:"displayMd",mobileVariant:"displayXs",children:o})}),e.jsx("div",{className:t.default.actions,children:e.jsx(u.Button,{as:"a",href:l,variant:"secondary",size:"lg",children:a})})]})})})};exports.StillHaveQuestions=g;
@@ -1,21 +1,21 @@
1
1
  import { jsxs as o, jsx as t, Fragment as n } from "react/jsx-runtime";
2
2
  import { Button as u } from "../../components/Button/Button.es.js";
3
3
  import { HighlightedTitle as d } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
4
- import { Typography as p } from "../../components/Typography/Typography.es.js";
4
+ import { Typography as h } from "../../components/Typography/Typography.es.js";
5
5
  import { cn as r } from "../../utils/cn/cn.es.js";
6
6
  import e from "./stillHaveQuestions.module.css.es.js";
7
- import h from "./assets/stillHaveQuestions.jpg.es.js";
7
+ import p from "./assets/stillHaveQuestions.jpg.es.js";
8
8
  import g from "./assets/joinOurTeam.jpg.es.js";
9
- const O = ({ variant: i = "StillHaveQuestions" }) => {
9
+ const H = ({ variant: i = "StillHaveQuestions" }) => {
10
10
  const a = {
11
11
  StillHaveQuestions: {
12
12
  title: /* @__PURE__ */ o(n, { children: [
13
- "Still Have ",
13
+ "Still have ",
14
14
  /* @__PURE__ */ t("b", { children: "questions?" })
15
15
  ] }),
16
16
  buttonText: "Contact Us",
17
17
  buttonLink: "/contact-us",
18
- image: h
18
+ image: p
19
19
  },
20
20
  JoinOurTeam: {
21
21
  title: /* @__PURE__ */ o(n, { children: [
@@ -39,7 +39,7 @@ const O = ({ variant: i = "StillHaveQuestions" }) => {
39
39
  d,
40
40
  {
41
41
  colorScheme: "dark",
42
- title: /* @__PURE__ */ t(p, { as: "p", defaultVariant: "displayMd", mobileVariant: "displayXs", children: s })
42
+ title: /* @__PURE__ */ t(h, { as: "p", defaultVariant: "displayMd", mobileVariant: "displayXs", children: s })
43
43
  }
44
44
  ),
45
45
  /* @__PURE__ */ t("div", { className: e.actions, children: /* @__PURE__ */ t(u, { as: "a", href: m, variant: "secondary", size: "lg", children: l }) })
@@ -48,5 +48,5 @@ const O = ({ variant: i = "StillHaveQuestions" }) => {
48
48
  ) });
49
49
  };
50
50
  export {
51
- O as StillHaveQuestions
51
+ H as StillHaveQuestions
52
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.1.125",
3
+ "version": "0.1.127",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -551,6 +551,11 @@
551
551
  "import": "./dist/modules/HSModal/HSModal.es.js",
552
552
  "require": "./dist/modules/HSModal/HSModal.cjs.js"
553
553
  },
554
+ "./ScienceHero": {
555
+ "types": "./dist/modules/ScienceHero/ScienceHero.d.ts",
556
+ "import": "./dist/modules/ScienceHero/ScienceHero.es.js",
557
+ "require": "./dist/modules/ScienceHero/ScienceHero.cjs.js"
558
+ },
554
559
  "./Bubbles": {
555
560
  "types": "./dist/pageComponents/Bubbles/Bubbles.d.ts",
556
561
  "import": "./dist/pageComponents/Bubbles/Bubbles.es.js",