@zenpatient-org/healthspan-marketing-ui 0.1.103 → 0.1.106
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/components/TextInput/TextInput.d.ts +1 -2
- package/dist/components/TextInput/index.d.ts +1 -0
- package/dist/components/Typography/Typography.cjs.js +1 -1
- package/dist/components/Typography/Typography.es.js +9 -9
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/AllInOne/AllInOne.cjs.js +1 -1
- package/dist/modules/AllInOne/AllInOne.es.js +193 -142
- package/dist/modules/AllInOne/allInOne.module.css.cjs.js +1 -1
- package/dist/modules/AllInOne/allInOne.module.css.es.js +14 -12
- package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
- package/dist/modules/CallToAction/CallToAction.es.js +112 -83
- package/dist/modules/HSModal/HSModal.cjs.js +1 -0
- package/dist/modules/HSModal/HSModal.d.ts +4 -0
- package/dist/modules/HSModal/HSModal.es.js +25 -0
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.cjs.js +1 -0
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.d.ts +3 -0
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.es.js +53 -0
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js +1 -0
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.d.ts +8 -0
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js +88 -0
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/index.d.ts +1 -0
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css.cjs.js +1 -0
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css.es.js +8 -0
- package/dist/modules/HSModal/components/MailchimpModal/components/index.d.ts +1 -0
- package/dist/modules/HSModal/components/MailchimpModal/index.d.ts +1 -0
- package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.cjs.js +1 -0
- package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.es.js +21 -0
- package/dist/modules/HSModal/components/index.d.ts +1 -0
- package/dist/modules/HSModal/hsModal.module.css.cjs.js +1 -0
- package/dist/modules/HSModal/hsModal.module.css.es.js +7 -0
- package/dist/modules/HSModal/index.d.ts +3 -0
- package/dist/modules/HSModal/types.d.ts +23 -0
- package/dist/modules/HSModal/useHSModal.cjs.js +1 -0
- package/dist/modules/HSModal/useHSModal.d.ts +20 -0
- package/dist/modules/HSModal/useHSModal.es.js +63 -0
- package/dist/pageComponents/Bubbles/Bubbles.cjs.js +1 -1
- package/dist/pageComponents/Bubbles/Bubbles.es.js +13 -13
- package/dist/pageComponents/CallToActionDefault/CallToActionDefault.cjs.js +1 -1
- package/dist/pageComponents/CallToActionDefault/CallToActionDefault.es.js +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useState as i, useCallback as d, useEffect as a } from "react";
|
|
2
|
+
const E = 7, _ = 24 * 60 * 60 * 1e3, v = (t) => {
|
|
3
|
+
try {
|
|
4
|
+
const o = localStorage.getItem(`popup_${t}_lastShown`);
|
|
5
|
+
if (!o)
|
|
6
|
+
return !0;
|
|
7
|
+
const e = parseInt(o, 10);
|
|
8
|
+
return ((/* @__PURE__ */ new Date()).getTime() - e) / _ >= E;
|
|
9
|
+
} catch (o) {
|
|
10
|
+
return console.warn("Error checking popup cooldown:", o), !0;
|
|
11
|
+
}
|
|
12
|
+
}, T = ({
|
|
13
|
+
id: t,
|
|
14
|
+
initiallyOpen: o = !1,
|
|
15
|
+
trigger: e,
|
|
16
|
+
onCloseCallback: s,
|
|
17
|
+
onClickCallback: r
|
|
18
|
+
}) => {
|
|
19
|
+
const [u, w] = i(o), p = d(() => {
|
|
20
|
+
v(t) && w(!0);
|
|
21
|
+
}, [t]), c = d(() => {
|
|
22
|
+
w(!1), s == null || s();
|
|
23
|
+
}, [s]), m = d(() => {
|
|
24
|
+
r == null || r();
|
|
25
|
+
}, [r]);
|
|
26
|
+
a(() => {
|
|
27
|
+
if ((e == null ? void 0 : e.type) === "timer" && !u) {
|
|
28
|
+
const n = setTimeout(() => {
|
|
29
|
+
p();
|
|
30
|
+
}, e.delay * 1e3);
|
|
31
|
+
return () => clearTimeout(n);
|
|
32
|
+
}
|
|
33
|
+
}, [e, u, p]), a(() => {
|
|
34
|
+
if (!u) return;
|
|
35
|
+
const n = (/* @__PURE__ */ new Date()).getTime();
|
|
36
|
+
localStorage.setItem(`popup_${t}_lastShown`, n.toString());
|
|
37
|
+
const f = window.getComputedStyle(document.body).overflow;
|
|
38
|
+
document.body.style.overflow = "hidden";
|
|
39
|
+
const S = (h) => {
|
|
40
|
+
h.key === "Escape" && c();
|
|
41
|
+
};
|
|
42
|
+
return document.addEventListener("keydown", S), () => {
|
|
43
|
+
document.body.style.overflow = f, document.removeEventListener("keydown", S);
|
|
44
|
+
};
|
|
45
|
+
}, [u, c, t]);
|
|
46
|
+
const y = d(
|
|
47
|
+
(n) => {
|
|
48
|
+
n.target === n.currentTarget && c();
|
|
49
|
+
},
|
|
50
|
+
[c]
|
|
51
|
+
);
|
|
52
|
+
return {
|
|
53
|
+
isOpen: u,
|
|
54
|
+
openModal: p,
|
|
55
|
+
closeModal: c,
|
|
56
|
+
handleClick: m,
|
|
57
|
+
handleOverlayClick: y
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
v as shouldShowPopup,
|
|
62
|
+
T as useHSModal
|
|
63
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),e=require("react"),d=require("../../utils/cn/cn.cjs.js"),r=require("./bubbles.module.css.cjs.js"),v=["xs","lg","md","md","xl","sm","sm","md","lg","md","xl","xl","xl"],w=({className:b})=>{const[n,f]=e.useState(!1),[c,m]=e.useState("forward"),[o,u]=e.useState(!1),i=e.useRef(null),a=e.useRef(0);return e.useEffect(()=>{const s=()=>{const t=window.scrollY;m(t>a.current?"forward":"reverse"),a.current=t};return window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[]),e.useEffect(()=>{const s=new window.IntersectionObserver(([t])=>{f(t.isIntersecting)},{rootMargin:"0px 0px -20% 0px",threshold:.2});return i.current&&s.observe(i.current),()=>s.disconnect()},[]),e.useEffect(()=>{n&&c==="forward"&&u(!0),n&&c==="reverse"&&u(!1)},[n,c]),l.jsx("section",{ref:i,className:d.cn(r.default.root,b),children:l.jsx("div",{className:r.default.container,children:v.map((s,t)=>l.jsx("div",{className:d.cn(r.default.bubble,o&&r.default.bubbleFinished,!o&&r.default.bubbleReverse),"data-size":s,"data-index":t},t))})})};exports.Bubbles=w;
|
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import { useState as c, useRef as u, useEffect as l } from "react";
|
|
4
4
|
import { cn as b } from "../../utils/cn/cn.es.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import s from "./bubbles.module.css.es.js";
|
|
6
|
+
const p = ["xs", "lg", "md", "md", "xl", "sm", "sm", "md", "lg", "md", "xl", "xl", "xl"], F = ({ className: f }) => {
|
|
7
7
|
const [t, v] = c(!1), [n, w] = c("forward"), [d, a] = c(!1), o = u(null), m = u(0);
|
|
8
8
|
return l(() => {
|
|
9
9
|
const e = () => {
|
|
10
|
-
const
|
|
11
|
-
w(
|
|
10
|
+
const r = window.scrollY;
|
|
11
|
+
w(r > m.current ? "forward" : "reverse"), m.current = r;
|
|
12
12
|
};
|
|
13
13
|
return window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
|
|
14
14
|
}, []), l(() => {
|
|
15
15
|
const e = new window.IntersectionObserver(
|
|
16
|
-
([
|
|
17
|
-
v(
|
|
16
|
+
([r]) => {
|
|
17
|
+
v(r.isIntersecting);
|
|
18
18
|
},
|
|
19
|
-
{ threshold: 0.
|
|
19
|
+
{ rootMargin: "0px 0px -20% 0px", threshold: 0.2 }
|
|
20
20
|
);
|
|
21
21
|
return o.current && e.observe(o.current), () => e.disconnect();
|
|
22
22
|
}, []), l(() => {
|
|
23
23
|
t && n === "forward" && a(!0), t && n === "reverse" && a(!1);
|
|
24
|
-
}, [t, n]), /* @__PURE__ */ i("section", { ref: o, className: b(
|
|
24
|
+
}, [t, n]), /* @__PURE__ */ i("section", { ref: o, className: b(s.root, f), children: /* @__PURE__ */ i("div", { className: s.container, children: p.map((e, r) => /* @__PURE__ */ i(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
27
|
className: b(
|
|
28
|
-
|
|
29
|
-
d &&
|
|
30
|
-
!d &&
|
|
28
|
+
s.bubble,
|
|
29
|
+
d && s.bubbleFinished,
|
|
30
|
+
!d && s.bubbleReverse
|
|
31
31
|
),
|
|
32
32
|
"data-size": e,
|
|
33
|
-
"data-index":
|
|
33
|
+
"data-index": r
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
r
|
|
36
36
|
)) }) });
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("../../modules/CallToAction/CallToAction.cjs.js"),o=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],i=()=>{const e={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:o,titleBottom:t.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"https://app.gethealthspan.com/#/get-started",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("../../modules/CallToAction/CallToAction.cjs.js"),o=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],i=()=>{const e={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:o,titleBottom:t.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"https://app.gethealthspan.com/#/get-started",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"};return t.jsx(l.CallToAction,{...e})};exports.CallToActionDefault=i;
|
|
@@ -21,7 +21,7 @@ const o = [
|
|
|
21
21
|
buttonText: "JOIN NOW",
|
|
22
22
|
// TODO: How to we make this not eventually break...
|
|
23
23
|
buttonLink: "https://app.gethealthspan.com/#/get-started",
|
|
24
|
-
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/
|
|
24
|
+
backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"
|
|
25
25
|
} });
|
|
26
26
|
export {
|
|
27
27
|
s as CallToActionDefault
|
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.106",
|
|
4
4
|
"description": "Design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -536,6 +536,11 @@
|
|
|
536
536
|
"import": "./dist/modules/ContentHighlight/ContentHighlight.es.js",
|
|
537
537
|
"require": "./dist/modules/ContentHighlight/ContentHighlight.cjs.js"
|
|
538
538
|
},
|
|
539
|
+
"./HSModal": {
|
|
540
|
+
"types": "./dist/modules/HSModal/HSModal.d.ts",
|
|
541
|
+
"import": "./dist/modules/HSModal/HSModal.es.js",
|
|
542
|
+
"require": "./dist/modules/HSModal/HSModal.cjs.js"
|
|
543
|
+
},
|
|
539
544
|
"./Bubbles": {
|
|
540
545
|
"types": "./dist/pageComponents/Bubbles/Bubbles.d.ts",
|
|
541
546
|
"import": "./dist/pageComponents/Bubbles/Bubbles.es.js",
|