@zenpatient-org/healthspan-marketing-ui 0.1.102 → 0.1.105
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/StudyGridCard/StudyGridCard.cjs.js +1 -1
- package/dist/components/StudyGridCard/StudyGridCard.es.js +34 -20
- package/dist/components/StudyGridCard/studyGridCard.module.css.cjs.js +1 -1
- package/dist/components/StudyGridCard/studyGridCard.module.css.es.js +28 -24
- 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.d.ts +2 -1
- package/dist/components/Typography/Typography.es.js +23 -21
- 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 -141
- 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 +21 -3
- 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/styles/typography.module.css.cjs.js +1 -1
- package/dist/styles/typography.module.css.es.js +82 -76
- package/dist/utils/formatDate.cjs.js +1 -1
- package/dist/utils/formatDate.d.ts +7 -1
- package/dist/utils/formatDate.es.js +4 -3
- package/package.json +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../../../components/Typography/Typography.cjs.js"),s=require("../../../../utils/cn/cn.cjs.js"),y=require("./components/Newsletter/Newsletter.cjs.js"),a=require("./mailchimpModal.module.css.cjs.js"),f=({title:r,description:c,buttonText:d,image:n,layout:i="plain-column",colorScheme:t="light",onCloseCallback:o,onClickCallback:u,cancelButtonText:p="no, thanks",tags:m})=>{const h=g=>{g.stopPropagation()};return e.jsxs("div",{className:s.cn(a.default.contentWrapper,a.default[t]),"data-image-position":i,onClick:h,children:[e.jsxs("div",{className:s.cn(a.default.content,a.default[t]),children:[e.jsxs("div",{className:a.default.text,children:[e.jsx(l.Typography,{defaultVariant:"headingLg",children:r}),e.jsx(l.Typography,{defaultVariant:"bodySm",children:c})]}),e.jsx(y.Newsletter,{buttonText:d,cancelButtonText:p,colorScheme:t,onCloseCallback:o,onClickCallback:u,tags:m})]}),n&&i!=="plain-column"&&e.jsx("div",{className:a.default.imageWrapper,children:e.jsx("div",{style:{backgroundImage:`url(${n})`},className:a.default.image})})]})};exports.MailchimpModal=f;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TMailchimpModal } from '../../types';
|
|
2
|
+
|
|
3
|
+
export declare const MailchimpModal: ({ title, description, buttonText, image, layout, colorScheme, onCloseCallback, onClickCallback, cancelButtonText, tags, }: Omit<TMailchimpModal, "id" | "type">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as t, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { Typography as l } from "../../../../components/Typography/Typography.es.js";
|
|
4
|
+
import { cn as o } from "../../../../utils/cn/cn.es.js";
|
|
5
|
+
import { Newsletter as N } from "./components/Newsletter/Newsletter.es.js";
|
|
6
|
+
import a from "./mailchimpModal.module.css.es.js";
|
|
7
|
+
const b = ({
|
|
8
|
+
title: s,
|
|
9
|
+
description: m,
|
|
10
|
+
buttonText: c,
|
|
11
|
+
image: e,
|
|
12
|
+
layout: r = "plain-column",
|
|
13
|
+
colorScheme: n = "light",
|
|
14
|
+
onCloseCallback: d,
|
|
15
|
+
onClickCallback: p,
|
|
16
|
+
cancelButtonText: h = "no, thanks",
|
|
17
|
+
tags: g
|
|
18
|
+
}) => {
|
|
19
|
+
const f = (u) => {
|
|
20
|
+
u.stopPropagation();
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ t(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: o(a.contentWrapper, a[n]),
|
|
26
|
+
"data-image-position": r,
|
|
27
|
+
onClick: f,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ t("div", { className: o(a.content, a[n]), children: [
|
|
30
|
+
/* @__PURE__ */ t("div", { className: a.text, children: [
|
|
31
|
+
/* @__PURE__ */ i(l, { defaultVariant: "headingLg", children: s }),
|
|
32
|
+
/* @__PURE__ */ i(l, { defaultVariant: "bodySm", children: m })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ i(
|
|
35
|
+
N,
|
|
36
|
+
{
|
|
37
|
+
buttonText: c,
|
|
38
|
+
cancelButtonText: h,
|
|
39
|
+
colorScheme: n,
|
|
40
|
+
onCloseCallback: d,
|
|
41
|
+
onClickCallback: p,
|
|
42
|
+
tags: g
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] }),
|
|
46
|
+
e && r !== "plain-column" && /* @__PURE__ */ i("div", { className: a.imageWrapper, children: /* @__PURE__ */ i("div", { style: { backgroundImage: `url(${e})` }, className: a.image }) })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
b as MailchimpModal
|
|
53
|
+
};
|
package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),_=require("../../../../../../components/TextInput/TextInput.cjs.js"),I=require("../../../../../../node_modules/react-mailchimp-subscribe/es/index.cjs.js"),B=require("../../../../../../utils/isValidEmail.cjs.js"),v=require("../../../../../../components/Button/Button.cjs.js"),x=require("./newsletter.module.css.cjs.js"),M=e=>`//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&id=2483a4d606&f_id=0050e6e6f0&tags=${e}`,N=({status:e,message:o,subscribe:c,buttonText:l,colorScheme:d,onCloseCallback:r,cancelButtonText:m,onClickCallback:a})=>{const[i,f]=u.useState(""),[p,s]=u.useState(!1),[y,n]=u.useState(""),[j,g]=u.useState(!1),q=h=>{f(h.target.value),p&&(s(!1),n("")),g(h.target.value.length>0)},E=()=>{if(!i){s(!0),n("Please enter your email address");return}if(!B.isValidEmail(i)){s(!0),n("Please enter a valid email address");return}s(!1),n(""),c({EMAIL:i}),a==null||a()};u.useEffect(()=>{e==="success"&&(f(""),s(!1),n(""),g(!1),r==null||r()),e==="error"&&typeof o=="string"&&(s(!0),n("Subscription failed. Please try again."))},[e,o]);const S=d==="light"?"primary":"primary-invert",T=d==="light"?"primary":"primary-invert";return t.jsxs("div",{className:x.default.interface,children:[t.jsx(_.TextInput,{placeholder:"Email",variant:S,value:i,handleChange:q,error:p,errorText:y,active:j}),t.jsxs("div",{className:x.default.buttonContainer,children:[t.jsx(v.Button,{size:"md",variant:T,onClick:E,children:e==="sending"?"submitting…":l}),t.jsx(v.Button,{size:"md",variant:"ghost",onClick:r,children:m})]})]})},P=({buttonText:e,colorScheme:o,onCloseCallback:c,cancelButtonText:l,tags:d,onClickCallback:r})=>t.jsx(I.default,{url:M(d),render:({subscribe:m,status:a,message:i})=>t.jsx(N,{status:a,message:i,subscribe:m,buttonText:e,colorScheme:o,onCloseCallback:c,onClickCallback:r,cancelButtonText:l})});exports.Newsletter=P;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const Newsletter: ({ buttonText, colorScheme, onCloseCallback, cancelButtonText, tags, onClickCallback, }: {
|
|
2
|
+
buttonText: string;
|
|
3
|
+
colorScheme: "light" | "dark";
|
|
4
|
+
onCloseCallback?: () => void;
|
|
5
|
+
cancelButtonText: string;
|
|
6
|
+
tags: string;
|
|
7
|
+
onClickCallback?: () => void;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n, jsxs as v } from "react/jsx-runtime";
|
|
3
|
+
import { useState as u, useEffect as T } from "react";
|
|
4
|
+
import { TextInput as V } from "../../../../../../components/TextInput/TextInput.es.js";
|
|
5
|
+
import j from "../../../../../../node_modules/react-mailchimp-subscribe/es/index.es.js";
|
|
6
|
+
import { isValidEmail as z } from "../../../../../../utils/isValidEmail.es.js";
|
|
7
|
+
import { Button as y } from "../../../../../../components/Button/Button.es.js";
|
|
8
|
+
import E from "./newsletter.module.css.es.js";
|
|
9
|
+
const A = (e) => `//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&id=2483a4d606&f_id=0050e6e6f0&tags=${e}`, b = ({
|
|
10
|
+
status: e,
|
|
11
|
+
message: m,
|
|
12
|
+
subscribe: f,
|
|
13
|
+
buttonText: d,
|
|
14
|
+
colorScheme: o,
|
|
15
|
+
onCloseCallback: r,
|
|
16
|
+
cancelButtonText: p,
|
|
17
|
+
onClickCallback: a
|
|
18
|
+
}) => {
|
|
19
|
+
const [t, c] = u(""), [l, i] = u(!1), [x, s] = u(""), [M, h] = u(!1), I = (g) => {
|
|
20
|
+
c(g.target.value), l && (i(!1), s("")), h(g.target.value.length > 0);
|
|
21
|
+
}, N = () => {
|
|
22
|
+
if (!t) {
|
|
23
|
+
i(!0), s("Please enter your email address");
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (!z(t)) {
|
|
27
|
+
i(!0), s("Please enter a valid email address");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
i(!1), s(""), f({
|
|
31
|
+
EMAIL: t
|
|
32
|
+
}), a == null || a();
|
|
33
|
+
};
|
|
34
|
+
T(() => {
|
|
35
|
+
e === "success" && (c(""), i(!1), s(""), h(!1), r == null || r()), e === "error" && typeof m == "string" && (i(!0), s("Subscription failed. Please try again."));
|
|
36
|
+
}, [e, m]);
|
|
37
|
+
const P = o === "light" ? "primary" : "primary-invert", S = o === "light" ? "primary" : "primary-invert";
|
|
38
|
+
return /* @__PURE__ */ v("div", { className: E.interface, children: [
|
|
39
|
+
/* @__PURE__ */ n(
|
|
40
|
+
V,
|
|
41
|
+
{
|
|
42
|
+
placeholder: "Email",
|
|
43
|
+
variant: P,
|
|
44
|
+
value: t,
|
|
45
|
+
handleChange: I,
|
|
46
|
+
error: l,
|
|
47
|
+
errorText: x,
|
|
48
|
+
active: M
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ v("div", { className: E.buttonContainer, children: [
|
|
52
|
+
/* @__PURE__ */ n(y, { size: "md", variant: S, onClick: N, children: e === "sending" ? "submitting…" : d }),
|
|
53
|
+
/* @__PURE__ */ n(y, { size: "md", variant: "ghost", onClick: r, children: p })
|
|
54
|
+
] })
|
|
55
|
+
] });
|
|
56
|
+
}, q = ({
|
|
57
|
+
buttonText: e,
|
|
58
|
+
colorScheme: m,
|
|
59
|
+
onCloseCallback: f,
|
|
60
|
+
cancelButtonText: d,
|
|
61
|
+
tags: o,
|
|
62
|
+
onClickCallback: r
|
|
63
|
+
}) => /* @__PURE__ */ n(
|
|
64
|
+
j,
|
|
65
|
+
{
|
|
66
|
+
url: A(o),
|
|
67
|
+
render: ({
|
|
68
|
+
subscribe: p,
|
|
69
|
+
status: a,
|
|
70
|
+
message: t
|
|
71
|
+
}) => /* @__PURE__ */ n(
|
|
72
|
+
b,
|
|
73
|
+
{
|
|
74
|
+
status: a,
|
|
75
|
+
message: t,
|
|
76
|
+
subscribe: p,
|
|
77
|
+
buttonText: e,
|
|
78
|
+
colorScheme: m,
|
|
79
|
+
onCloseCallback: f,
|
|
80
|
+
onClickCallback: r,
|
|
81
|
+
cancelButtonText: d
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
export {
|
|
87
|
+
q as Newsletter
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Newsletter } from './Newsletter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="newsletter-module__buttonContainer___Jn0WJ",t={interface:"newsletter-module__interface___dgwMa",buttonContainer:e};exports.buttonContainer=e;exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Newsletter } from './Newsletter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MailchimpModal } from './MailchimpModal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="mailchimpModal-module__overlay___peQPr",t="mailchimpModal-module__contentWrapper___HpcOd",a="mailchimpModal-module__light___-lF5m",o="mailchimpModal-module__dark___7FKcx",_="mailchimpModal-module__content___xscO6",l="mailchimpModal-module__imageWrapper___lBCUP",m="mailchimpModal-module__text___t5kPi",i="mailchimpModal-module__image___2R979",c={overlay:e,contentWrapper:t,light:a,dark:o,content:_,imageWrapper:l,text:m,image:i};exports.content=_;exports.contentWrapper=t;exports.dark=o;exports.default=c;exports.image=i;exports.imageWrapper=l;exports.light=a;exports.overlay=e;exports.text=m;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const _ = "mailchimpModal-module__overlay___peQPr", a = "mailchimpModal-module__contentWrapper___HpcOd", e = "mailchimpModal-module__light___-lF5m", o = "mailchimpModal-module__dark___7FKcx", l = "mailchimpModal-module__content___xscO6", t = "mailchimpModal-module__imageWrapper___lBCUP", m = "mailchimpModal-module__text___t5kPi", c = "mailchimpModal-module__image___2R979", i = {
|
|
2
|
+
overlay: _,
|
|
3
|
+
contentWrapper: a,
|
|
4
|
+
light: e,
|
|
5
|
+
dark: o,
|
|
6
|
+
content: l,
|
|
7
|
+
imageWrapper: t,
|
|
8
|
+
text: m,
|
|
9
|
+
image: c
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
l as content,
|
|
13
|
+
a as contentWrapper,
|
|
14
|
+
o as dark,
|
|
15
|
+
i as default,
|
|
16
|
+
c as image,
|
|
17
|
+
t as imageWrapper,
|
|
18
|
+
e as light,
|
|
19
|
+
_ as overlay,
|
|
20
|
+
m as text
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MailchimpModal } from './MailchimpModal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="hsModal-module__overlay___kdLCe",l={overlay:e};exports.default=l;exports.overlay=e;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type TimerTrigger = {
|
|
2
|
+
type: 'timer';
|
|
3
|
+
delay: number;
|
|
4
|
+
};
|
|
5
|
+
type THSModal = {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
buttonText: string;
|
|
10
|
+
trigger?: TimerTrigger;
|
|
11
|
+
layout?: 'plain-column' | 'header-image' | 'side-image';
|
|
12
|
+
cancelButtonText?: string;
|
|
13
|
+
colorScheme?: 'light' | 'dark';
|
|
14
|
+
image?: string;
|
|
15
|
+
onCloseCallback?: () => void;
|
|
16
|
+
onClickCallback?: () => void;
|
|
17
|
+
initiallyOpen?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type TMailchimpModal = THSModal & {
|
|
20
|
+
type: 'mailchimp';
|
|
21
|
+
tags: string;
|
|
22
|
+
};
|
|
23
|
+
export type { THSModal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),m=7,i=24*60*60*1e3,w=o=>{try{const n=localStorage.getItem(`popup_${o}_lastShown`);if(!n)return!0;const e=parseInt(n,10);return(new Date().getTime()-e)/i>=m}catch(n){return console.warn("Error checking popup cooldown:",n),!0}},E=({id:o,initiallyOpen:n=!1,trigger:e,onCloseCallback:r,onClickCallback:u})=>{const[c,S]=t.useState(n),a=t.useCallback(()=>{w(o)&&S(!0)},[o]),d=t.useCallback(()=>{S(!1),r==null||r()},[r]),y=t.useCallback(()=>{u==null||u()},[u]);t.useEffect(()=>{if((e==null?void 0:e.type)==="timer"&&!c){const s=setTimeout(()=>{a()},e.delay*1e3);return()=>clearTimeout(s)}},[e,c,a]),t.useEffect(()=>{if(!c)return;const s=new Date().getTime();localStorage.setItem(`popup_${o}_lastShown`,s.toString());const h=window.getComputedStyle(document.body).overflow;document.body.style.overflow="hidden";const p=l=>{l.key==="Escape"&&d()};return document.addEventListener("keydown",p),()=>{document.body.style.overflow=h,document.removeEventListener("keydown",p)}},[c,d,o]);const f=t.useCallback(s=>{s.target===s.currentTarget&&d()},[d]);return{isOpen:c,openModal:a,closeModal:d,handleClick:y,handleOverlayClick:f}};exports.shouldShowPopup=w;exports.useHSModal=E;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const shouldShowPopup: (id: string) => boolean;
|
|
2
|
+
export declare const getDaysUntilNextShow: (id: string) => number;
|
|
3
|
+
type UseHSModalProps = {
|
|
4
|
+
id: string;
|
|
5
|
+
initiallyOpen?: boolean;
|
|
6
|
+
trigger?: {
|
|
7
|
+
type: 'timer';
|
|
8
|
+
delay: number;
|
|
9
|
+
};
|
|
10
|
+
onCloseCallback?: () => void;
|
|
11
|
+
onClickCallback?: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const useHSModal: ({ id, initiallyOpen, trigger, onCloseCallback, onClickCallback, }: UseHSModalProps) => {
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
openModal: () => void;
|
|
16
|
+
closeModal: () => void;
|
|
17
|
+
handleClick: () => void;
|
|
18
|
+
handleOverlayClick: (e: React.MouseEvent) => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -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 strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _="typography-module__displayXl___dx4Dh",l="typography-module__displayLg___3BQI2",e="typography-module__displayMd___-bNBw",o="typography-module__displaySm___BswNI",
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _="typography-module__displayXl___dx4Dh",l="typography-module__displayLg___3BQI2",e="typography-module__displayMd___-bNBw",o="typography-module__displaySm___BswNI",i="typography-module__displayXs___jcmVJ",m="typography-module__headingXl___nAQFD",d="typography-module__headingLg___Idt-Z",a="typography-module__headingMd___c-Q0B",b="typography-module__headingSm___Q6zoR",y="typography-module__headingXs___fwDFl",p="typography-module__headingXxs___ghw1N",g="typography-module__preambleLg___wcfye",n="typography-module__preambleMd___CbYgI",s="typography-module__preambleSm___yKGjq",t="typography-module__bodyXl___m92AP",h="typography-module__bodyLg___Fz-Fo",r="typography-module__bodyMd___aH0Ph",X="typography-module__bodySm___4-7TJ",u="typography-module__bodyXs___uTpSs",c="typography-module__linkLg___xVngm",M="typography-module__linkMd___82MQD",L="typography-module__linkSm___LZ94B",S="typography-module__linkXs___-6Kd5",k="typography-module__labelXl___jmHEl",A="typography-module__labelLg___31xPj",w="typography-module__labelMd___e3ni6",x="typography-module__labelSm___AsYEH",f="typography-module__labelXs___zgCHL",I="typography-module__labelEmphasis___nbkyG",z="typography-module__weightRegular___F3ND2",E="typography-module__weightMedium___XpDfI",R="typography-module__leftAlign___HQNZL",P="typography-module__centerAlign___gcsnY",Z="typography-module__rightAlign___bumxE",D="typography-module__mobile__displayXl___8eyMz",F="typography-module__mobile__displayLg___OxrWl",H="typography-module__mobile__displayMd___ZTVhR",J="typography-module__mobile__displaySm___P5do8",Q="typography-module__mobile__displayXs___3nZMf",V="typography-module__mobile__headingXl___fuylU",j="typography-module__mobile__headingLg___poZZo",q="typography-module__mobile__headingMd___UA7hK",B="typography-module__mobile__headingSm___9StAl",N="typography-module__mobile__headingXs___zRqq3",K="typography-module__mobile__headingXxs___I6k7k",T="typography-module__mobile__preambleLg___bItII",W="typography-module__mobile__preambleMd___OsCic",v="typography-module__mobile__preambleSm___VVrnq",C="typography-module__mobile__bodyXl___WKi87",G="typography-module__mobile__bodyLg___JR512",O="typography-module__mobile__bodyMd___h5hFh",U="typography-module__mobile__bodySm___J3fX2",Y="typography-module__mobile__bodyXs___rbvEo",$="typography-module__mobile__linkLg___JWgXg",__="typography-module__mobile__linkMd___Humhz",l_="typography-module__mobile__linkSm___pJwma",e_="typography-module__mobile__linkXs___o01Lz",o_="typography-module__mobile__labelXl___q4W0-",i_="typography-module__mobile__labelLg___1wguG",m_="typography-module__mobile__labelMd___PInk-",d_="typography-module__mobile__labelSm___yPUV0",a_="typography-module__mobile__labelXs___80zt0",b_={displayXl:_,displayLg:l,displayMd:e,displaySm:o,displayXs:i,headingXl:m,headingLg:d,headingMd:a,headingSm:b,headingXs:y,headingXxs:p,preambleLg:g,preambleMd:n,preambleSm:s,bodyXl:t,bodyLg:h,bodyMd:r,bodySm:X,bodyXs:u,linkLg:c,linkMd:M,linkSm:L,linkXs:S,labelXl:k,labelLg:A,labelMd:w,labelSm:x,labelXs:f,labelEmphasis:I,weightRegular:z,weightMedium:E,leftAlign:R,centerAlign:P,rightAlign:Z,mobile__displayXl:D,mobile__displayLg:F,mobile__displayMd:H,mobile__displaySm:J,mobile__displayXs:Q,mobile__headingXl:V,mobile__headingLg:j,mobile__headingMd:q,mobile__headingSm:B,mobile__headingXs:N,mobile__headingXxs:K,mobile__preambleLg:T,mobile__preambleMd:W,mobile__preambleSm:v,mobile__bodyXl:C,mobile__bodyLg:G,mobile__bodyMd:O,mobile__bodySm:U,mobile__bodyXs:Y,mobile__linkLg:$,mobile__linkMd:__,mobile__linkSm:l_,mobile__linkXs:e_,mobile__labelXl:o_,mobile__labelLg:i_,mobile__labelMd:m_,mobile__labelSm:d_,mobile__labelXs:a_};exports.bodyLg=h;exports.bodyMd=r;exports.bodySm=X;exports.bodyXl=t;exports.bodyXs=u;exports.centerAlign=P;exports.default=b_;exports.displayLg=l;exports.displayMd=e;exports.displaySm=o;exports.displayXl=_;exports.displayXs=i;exports.headingLg=d;exports.headingMd=a;exports.headingSm=b;exports.headingXl=m;exports.headingXs=y;exports.headingXxs=p;exports.labelEmphasis=I;exports.labelLg=A;exports.labelMd=w;exports.labelSm=x;exports.labelXl=k;exports.labelXs=f;exports.leftAlign=R;exports.linkLg=c;exports.linkMd=M;exports.linkSm=L;exports.linkXs=S;exports.mobile__bodyLg=G;exports.mobile__bodyMd=O;exports.mobile__bodySm=U;exports.mobile__bodyXl=C;exports.mobile__bodyXs=Y;exports.mobile__displayLg=F;exports.mobile__displayMd=H;exports.mobile__displaySm=J;exports.mobile__displayXl=D;exports.mobile__displayXs=Q;exports.mobile__headingLg=j;exports.mobile__headingMd=q;exports.mobile__headingSm=B;exports.mobile__headingXl=V;exports.mobile__headingXs=N;exports.mobile__headingXxs=K;exports.mobile__labelLg=i_;exports.mobile__labelMd=m_;exports.mobile__labelSm=d_;exports.mobile__labelXl=o_;exports.mobile__labelXs=a_;exports.mobile__linkLg=$;exports.mobile__linkMd=__;exports.mobile__linkSm=l_;exports.mobile__linkXs=e_;exports.mobile__preambleLg=T;exports.mobile__preambleMd=W;exports.mobile__preambleSm=v;exports.preambleLg=g;exports.preambleMd=n;exports.preambleSm=s;exports.rightAlign=Z;exports.weightMedium=E;exports.weightRegular=z;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _ = "typography-module__displayXl___dx4Dh", l = "typography-module__displayLg___3BQI2", o = "typography-module__displayMd___-bNBw", e = "typography-module__displaySm___BswNI", m = "typography-module__displayXs___jcmVJ", d = "typography-module__headingXl___nAQFD", i = "typography-module__headingLg___Idt-Z",
|
|
1
|
+
const _ = "typography-module__displayXl___dx4Dh", l = "typography-module__displayLg___3BQI2", o = "typography-module__displayMd___-bNBw", e = "typography-module__displaySm___BswNI", m = "typography-module__displayXs___jcmVJ", d = "typography-module__headingXl___nAQFD", i = "typography-module__headingLg___Idt-Z", y = "typography-module__headingMd___c-Q0B", a = "typography-module__headingSm___Q6zoR", p = "typography-module__headingXs___fwDFl", b = "typography-module__headingXxs___ghw1N", g = "typography-module__preambleLg___wcfye", t = "typography-module__preambleMd___CbYgI", n = "typography-module__preambleSm___yKGjq", s = "typography-module__bodyXl___m92AP", h = "typography-module__bodyLg___Fz-Fo", r = "typography-module__bodyMd___aH0Ph", u = "typography-module__bodySm___4-7TJ", c = "typography-module__bodyXs___uTpSs", X = "typography-module__linkLg___xVngm", M = "typography-module__linkMd___82MQD", L = "typography-module__linkSm___LZ94B", S = "typography-module__linkXs___-6Kd5", k = "typography-module__labelXl___jmHEl", A = "typography-module__labelLg___31xPj", w = "typography-module__labelMd___e3ni6", x = "typography-module__labelSm___AsYEH", f = "typography-module__labelXs___zgCHL", I = "typography-module__labelEmphasis___nbkyG", z = "typography-module__weightRegular___F3ND2", E = "typography-module__weightMedium___XpDfI", R = "typography-module__leftAlign___HQNZL", Z = "typography-module__centerAlign___gcsnY", D = "typography-module__rightAlign___bumxE", F = "typography-module__mobile__displayXl___8eyMz", H = "typography-module__mobile__displayLg___OxrWl", J = "typography-module__mobile__displayMd___ZTVhR", P = "typography-module__mobile__displaySm___P5do8", Q = "typography-module__mobile__displayXs___3nZMf", V = "typography-module__mobile__headingXl___fuylU", q = "typography-module__mobile__headingLg___poZZo", B = "typography-module__mobile__headingMd___UA7hK", N = "typography-module__mobile__headingSm___9StAl", j = "typography-module__mobile__headingXs___zRqq3", K = "typography-module__mobile__headingXxs___I6k7k", W = "typography-module__mobile__preambleLg___bItII", C = "typography-module__mobile__preambleMd___OsCic", G = "typography-module__mobile__preambleSm___VVrnq", T = "typography-module__mobile__bodyXl___WKi87", U = "typography-module__mobile__bodyLg___JR512", Y = "typography-module__mobile__bodyMd___h5hFh", O = "typography-module__mobile__bodySm___J3fX2", v = "typography-module__mobile__bodyXs___rbvEo", $ = "typography-module__mobile__linkLg___JWgXg", __ = "typography-module__mobile__linkMd___Humhz", l_ = "typography-module__mobile__linkSm___pJwma", o_ = "typography-module__mobile__linkXs___o01Lz", e_ = "typography-module__mobile__labelXl___q4W0-", m_ = "typography-module__mobile__labelLg___1wguG", d_ = "typography-module__mobile__labelMd___PInk-", i_ = "typography-module__mobile__labelSm___yPUV0", y_ = "typography-module__mobile__labelXs___80zt0", a_ = {
|
|
2
2
|
displayXl: _,
|
|
3
3
|
displayLg: l,
|
|
4
4
|
displayMd: o,
|
|
@@ -6,14 +6,14 @@ const _ = "typography-module__displayXl___dx4Dh", l = "typography-module__displa
|
|
|
6
6
|
displayXs: m,
|
|
7
7
|
headingXl: d,
|
|
8
8
|
headingLg: i,
|
|
9
|
-
headingMd:
|
|
10
|
-
headingSm:
|
|
9
|
+
headingMd: y,
|
|
10
|
+
headingSm: a,
|
|
11
11
|
headingXs: p,
|
|
12
12
|
headingXxs: b,
|
|
13
13
|
preambleLg: g,
|
|
14
|
-
preambleMd:
|
|
15
|
-
preambleSm:
|
|
16
|
-
bodyXl:
|
|
14
|
+
preambleMd: t,
|
|
15
|
+
preambleSm: n,
|
|
16
|
+
bodyXl: s,
|
|
17
17
|
bodyLg: h,
|
|
18
18
|
bodyMd: r,
|
|
19
19
|
bodySm: u,
|
|
@@ -23,101 +23,107 @@ const _ = "typography-module__displayXl___dx4Dh", l = "typography-module__displa
|
|
|
23
23
|
linkSm: L,
|
|
24
24
|
linkXs: S,
|
|
25
25
|
labelXl: k,
|
|
26
|
-
labelLg:
|
|
27
|
-
labelMd:
|
|
28
|
-
labelSm:
|
|
29
|
-
labelXs:
|
|
30
|
-
labelEmphasis:
|
|
31
|
-
weightRegular:
|
|
32
|
-
weightMedium:
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
labelLg: A,
|
|
27
|
+
labelMd: w,
|
|
28
|
+
labelSm: x,
|
|
29
|
+
labelXs: f,
|
|
30
|
+
labelEmphasis: I,
|
|
31
|
+
weightRegular: z,
|
|
32
|
+
weightMedium: E,
|
|
33
|
+
leftAlign: R,
|
|
34
|
+
centerAlign: Z,
|
|
35
|
+
rightAlign: D,
|
|
36
|
+
mobile__displayXl: F,
|
|
37
|
+
mobile__displayLg: H,
|
|
35
38
|
mobile__displayMd: J,
|
|
36
39
|
mobile__displaySm: P,
|
|
37
|
-
mobile__displayXs:
|
|
38
|
-
mobile__headingXl:
|
|
40
|
+
mobile__displayXs: Q,
|
|
41
|
+
mobile__headingXl: V,
|
|
39
42
|
mobile__headingLg: q,
|
|
40
|
-
mobile__headingMd:
|
|
41
|
-
mobile__headingSm:
|
|
42
|
-
mobile__headingXs:
|
|
43
|
-
mobile__headingXxs:
|
|
44
|
-
mobile__preambleLg:
|
|
45
|
-
mobile__preambleMd:
|
|
46
|
-
mobile__preambleSm:
|
|
47
|
-
mobile__bodyXl:
|
|
48
|
-
mobile__bodyLg:
|
|
49
|
-
mobile__bodyMd:
|
|
50
|
-
mobile__bodySm:
|
|
51
|
-
mobile__bodyXs:
|
|
52
|
-
mobile__linkLg:
|
|
53
|
-
mobile__linkMd:
|
|
54
|
-
mobile__linkSm:
|
|
55
|
-
mobile__linkXs:
|
|
56
|
-
mobile__labelXl:
|
|
57
|
-
mobile__labelLg:
|
|
58
|
-
mobile__labelMd:
|
|
59
|
-
mobile__labelSm:
|
|
60
|
-
mobile__labelXs:
|
|
43
|
+
mobile__headingMd: B,
|
|
44
|
+
mobile__headingSm: N,
|
|
45
|
+
mobile__headingXs: j,
|
|
46
|
+
mobile__headingXxs: K,
|
|
47
|
+
mobile__preambleLg: W,
|
|
48
|
+
mobile__preambleMd: C,
|
|
49
|
+
mobile__preambleSm: G,
|
|
50
|
+
mobile__bodyXl: T,
|
|
51
|
+
mobile__bodyLg: U,
|
|
52
|
+
mobile__bodyMd: Y,
|
|
53
|
+
mobile__bodySm: O,
|
|
54
|
+
mobile__bodyXs: v,
|
|
55
|
+
mobile__linkLg: $,
|
|
56
|
+
mobile__linkMd: __,
|
|
57
|
+
mobile__linkSm: l_,
|
|
58
|
+
mobile__linkXs: o_,
|
|
59
|
+
mobile__labelXl: e_,
|
|
60
|
+
mobile__labelLg: m_,
|
|
61
|
+
mobile__labelMd: d_,
|
|
62
|
+
mobile__labelSm: i_,
|
|
63
|
+
mobile__labelXs: y_
|
|
61
64
|
};
|
|
62
65
|
export {
|
|
63
66
|
h as bodyLg,
|
|
64
67
|
r as bodyMd,
|
|
65
68
|
u as bodySm,
|
|
66
|
-
|
|
69
|
+
s as bodyXl,
|
|
67
70
|
c as bodyXs,
|
|
68
|
-
|
|
71
|
+
Z as centerAlign,
|
|
72
|
+
a_ as default,
|
|
69
73
|
l as displayLg,
|
|
70
74
|
o as displayMd,
|
|
71
75
|
e as displaySm,
|
|
72
76
|
_ as displayXl,
|
|
73
77
|
m as displayXs,
|
|
74
78
|
i as headingLg,
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
y as headingMd,
|
|
80
|
+
a as headingSm,
|
|
77
81
|
d as headingXl,
|
|
78
82
|
p as headingXs,
|
|
79
83
|
b as headingXxs,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
I as labelEmphasis,
|
|
85
|
+
A as labelLg,
|
|
86
|
+
w as labelMd,
|
|
87
|
+
x as labelSm,
|
|
84
88
|
k as labelXl,
|
|
85
|
-
|
|
89
|
+
f as labelXs,
|
|
90
|
+
R as leftAlign,
|
|
86
91
|
X as linkLg,
|
|
87
92
|
M as linkMd,
|
|
88
93
|
L as linkSm,
|
|
89
94
|
S as linkXs,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
U as mobile__bodyLg,
|
|
96
|
+
Y as mobile__bodyMd,
|
|
97
|
+
O as mobile__bodySm,
|
|
98
|
+
T as mobile__bodyXl,
|
|
99
|
+
v as mobile__bodyXs,
|
|
100
|
+
H as mobile__displayLg,
|
|
96
101
|
J as mobile__displayMd,
|
|
97
102
|
P as mobile__displaySm,
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
F as mobile__displayXl,
|
|
104
|
+
Q as mobile__displayXs,
|
|
100
105
|
q as mobile__headingLg,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
106
|
+
B as mobile__headingMd,
|
|
107
|
+
N as mobile__headingSm,
|
|
108
|
+
V as mobile__headingXl,
|
|
109
|
+
j as mobile__headingXs,
|
|
110
|
+
K as mobile__headingXxs,
|
|
111
|
+
m_ as mobile__labelLg,
|
|
112
|
+
d_ as mobile__labelMd,
|
|
113
|
+
i_ as mobile__labelSm,
|
|
114
|
+
e_ as mobile__labelXl,
|
|
115
|
+
y_ as mobile__labelXs,
|
|
116
|
+
$ as mobile__linkLg,
|
|
117
|
+
__ as mobile__linkMd,
|
|
118
|
+
l_ as mobile__linkSm,
|
|
119
|
+
o_ as mobile__linkXs,
|
|
120
|
+
W as mobile__preambleLg,
|
|
121
|
+
C as mobile__preambleMd,
|
|
122
|
+
G as mobile__preambleSm,
|
|
118
123
|
g as preambleLg,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
D as
|
|
122
|
-
|
|
124
|
+
t as preambleMd,
|
|
125
|
+
n as preambleSm,
|
|
126
|
+
D as rightAlign,
|
|
127
|
+
E as weightMedium,
|
|
128
|
+
z as weightRegular
|
|
123
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(t,e){return new Date(t).toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric",...e}).replace(/\//g," / ")}exports.formatDate=a;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type FormatDateOptions = {
|
|
2
|
+
month?: '2-digit' | 'long' | 'short' | 'narrow';
|
|
3
|
+
day?: '2-digit' | 'numeric';
|
|
4
|
+
year?: 'numeric' | '2-digit';
|
|
5
|
+
};
|
|
6
|
+
export declare function formatDate(date: number, optionsOverride?: FormatDateOptions): string;
|
|
7
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
function
|
|
1
|
+
function o(t, e) {
|
|
2
2
|
return new Date(t).toLocaleDateString("en-US", {
|
|
3
3
|
month: "2-digit",
|
|
4
4
|
day: "2-digit",
|
|
5
|
-
year: "numeric"
|
|
5
|
+
year: "numeric",
|
|
6
|
+
...e
|
|
6
7
|
}).replace(/\//g, " / ");
|
|
7
8
|
}
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
o as formatDate
|
|
10
11
|
};
|