@zenpatient-org/healthspan-marketing-ui 0.1.35 → 0.1.37

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.
Files changed (44) hide show
  1. package/dist/components/Checkbox/Checkbox.cjs.js +1 -0
  2. package/dist/components/Checkbox/Checkbox.d.ts +14 -0
  3. package/dist/components/Checkbox/Checkbox.es.js +52 -0
  4. package/dist/components/Checkbox/assets/checkbox-checkmark.svg.cjs.js +1 -0
  5. package/dist/components/Checkbox/assets/checkbox-checkmark.svg.es.js +5 -0
  6. package/dist/components/Checkbox/assets/checkbox-dash.svg.cjs.js +1 -0
  7. package/dist/components/Checkbox/assets/checkbox-dash.svg.es.js +5 -0
  8. package/dist/components/Checkbox/assets/checkbox-error.svg.cjs.js +1 -0
  9. package/dist/components/Checkbox/assets/checkbox-error.svg.es.js +5 -0
  10. package/dist/components/Checkbox/checkbox.module.css.cjs.js +1 -0
  11. package/dist/components/Checkbox/checkbox.module.css.es.js +31 -0
  12. package/dist/components/Checkbox/index.d.ts +2 -0
  13. package/dist/components/ColoredDivider/ColoredDivider.cjs.js +1 -0
  14. package/dist/components/ColoredDivider/ColoredDivider.d.ts +12 -0
  15. package/dist/components/ColoredDivider/ColoredDivider.es.js +17 -0
  16. package/dist/components/ColoredDivider/coloredDivider.module.css.cjs.js +1 -0
  17. package/dist/components/ColoredDivider/coloredDivider.module.css.es.js +21 -0
  18. package/dist/components/ColoredDivider/index.d.ts +1 -0
  19. package/dist/components/Tabs/Tabs.cjs.js +1 -1
  20. package/dist/components/Tabs/Tabs.d.ts +3 -20
  21. package/dist/components/Tabs/Tabs.es.js +7 -7
  22. package/dist/components/Tabs/TabsWithFade.cjs.js +1 -1
  23. package/dist/components/Tabs/TabsWithFade.d.ts +2 -8
  24. package/dist/components/Tabs/TabsWithFade.es.js +12 -21
  25. package/dist/components/Tabs/index.d.ts +1 -1
  26. package/dist/components/Tabs/tabs.module.css.cjs.js +1 -1
  27. package/dist/components/Tabs/tabs.module.css.es.js +26 -24
  28. package/dist/components/Tabs/types.d.ts +19 -0
  29. package/dist/healthspan-marketing-ui.css +1 -1
  30. package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.cjs.js +1 -1
  31. package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.d.ts +2 -2
  32. package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.es.js +8 -8
  33. package/dist/modules/ProductsDisplay/useProductsData.d.ts +2 -2
  34. package/dist/modules/ResearchFilters/ResearchFilters.cjs.js +1 -0
  35. package/dist/modules/ResearchFilters/ResearchFilters.d.ts +6 -0
  36. package/dist/modules/ResearchFilters/ResearchFilters.es.js +27 -0
  37. package/dist/modules/ResearchFilters/index.d.ts +2 -0
  38. package/dist/modules/ResearchFilters/researchFilters.module.css.cjs.js +1 -0
  39. package/dist/modules/ResearchFilters/researchFilters.module.css.es.js +13 -0
  40. package/dist/pageComponents/Footer/Footer.cjs.js +1 -1
  41. package/dist/pageComponents/Footer/Footer.es.js +16 -16
  42. package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.cjs.js +1 -1
  43. package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.es.js +32 -31
  44. package/package.json +16 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("../../../../components/Tabs/Tabs.cjs.js");const o=require("../../../../components/Tabs/TabsWithFade.cjs.js"),l=require("../../../../components/Typography/Typography.cjs.js"),r=require("./productsDisplayTabs.module.css.cjs.js");function u({label:a,tabs:s,activeTab:t,onTabChange:i}){return e.jsxs("div",{className:r.default.header,children:[!!a&&e.jsx(l.Typography,{as:"p",defaultVariant:"labelMd",mobileVariant:"labelSm",emphasis:!0,className:r.default.label,children:a}),e.jsx(o.TabsWithFade,{activeTab:t,tabs:s,onTabChange:i})]})}exports.ProductsDisplayTabs=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("../../../../components/Tabs/Tabs.cjs.js");const l=require("../../../../components/Tabs/TabsWithFade.cjs.js"),o=require("../../../../components/Typography/Typography.cjs.js"),r=require("./productsDisplayTabs.module.css.cjs.js");function u({label:a,tabs:s,activeTab:i,onTabChange:t}){return e.jsxs("div",{className:r.default.header,children:[!!a&&e.jsx(o.Typography,{as:"p",defaultVariant:"labelMd",mobileVariant:"labelSm",emphasis:!0,className:r.default.label,children:a}),e.jsx(l.TabsWithFade,{activeTab:i,tabs:s,onTabClick:t,size:"lg"})]})}exports.ProductsDisplayTabs=u;
@@ -1,8 +1,8 @@
1
- import { Tab } from '../../../../components/Tabs';
1
+ import { TTab } from '../../../../components/Tabs';
2
2
 
3
3
  type Props<T extends string | number> = {
4
4
  label?: string;
5
- tabs: Tab<T>[];
5
+ tabs: TTab<T>[];
6
6
  activeTab: T;
7
7
  onTabChange: (tab: T) => void;
8
8
  };
@@ -1,14 +1,14 @@
1
- import { jsxs as t, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import "../../../../components/Tabs/Tabs.es.js";
3
- import { TabsWithFade as m } from "../../../../components/Tabs/TabsWithFade.es.js";
4
- import { Typography as l } from "../../../../components/Typography/Typography.es.js";
3
+ import { TabsWithFade as t } from "../../../../components/Tabs/TabsWithFade.es.js";
4
+ import { Typography as m } from "../../../../components/Typography/Typography.es.js";
5
5
  import e from "./productsDisplayTabs.module.css.es.js";
6
- function h({ label: a, tabs: o, activeTab: s, onTabChange: i }) {
7
- return /* @__PURE__ */ t("div", { className: e.header, children: [
8
- !!a && /* @__PURE__ */ r(l, { as: "p", defaultVariant: "labelMd", mobileVariant: "labelSm", emphasis: !0, className: e.label, children: a }),
9
- /* @__PURE__ */ r(m, { activeTab: s, tabs: o, onTabChange: i })
6
+ function f({ label: a, tabs: i, activeTab: o, onTabChange: s }) {
7
+ return /* @__PURE__ */ l("div", { className: e.header, children: [
8
+ !!a && /* @__PURE__ */ r(m, { as: "p", defaultVariant: "labelMd", mobileVariant: "labelSm", emphasis: !0, className: e.label, children: a }),
9
+ /* @__PURE__ */ r(t, { activeTab: o, tabs: i, onTabClick: s, size: "lg" })
10
10
  ] });
11
11
  }
12
12
  export {
13
- h as ProductsDisplayTabs
13
+ f as ProductsDisplayTabs
14
14
  };
@@ -1,5 +1,5 @@
1
1
  import { TProductGalleryCardView } from '../../components/ProductGalleryCard';
2
- import { Tab } from '../../components/Tabs';
2
+ import { TTab } from '../../components/Tabs';
3
3
  import { TProductsDisplayView } from './types';
4
4
 
5
5
  type UseProductsReceiveProps = {
@@ -9,7 +9,7 @@ type UseProductsReturnProps = {
9
9
  isTabbed: boolean;
10
10
  title: string;
11
11
  description: string;
12
- tabs: Tab<string>[];
12
+ tabs: TTab<string>[];
13
13
  slidesByTabs: Record<string, TProductGalleryCardView[]>;
14
14
  };
15
15
  export declare const useProductsData: ({ productDisplays }: UseProductsReceiveProps) => UseProductsReturnProps;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),o=require("../../components/Typography/Typography.cjs.js");require("../../components/Tabs/Tabs.cjs.js");const n=require("../../components/Tabs/TabsWithFade.cjs.js"),a=require("./researchFilters.module.css.cjs.js"),d=({tabs:s})=>{const[r,t]=l.useState(s[0].value),i=c=>{t(c)};return e.jsx("section",{className:a.default.root,children:e.jsxs("div",{className:a.default.container,children:[e.jsx(o.Typography,{defaultVariant:"displayMd",mobileVariant:"displayXs",children:"Research"}),e.jsx("div",{className:a.default.filters,children:e.jsx("div",{className:a.default.tabsWrapper,children:e.jsx(n.TabsWithFade,{activeTab:r,tabs:s,size:"md",activeLinePosition:"bottom",onTabClick:i})})})]})})};exports.ResearchFilters=d;
@@ -0,0 +1,6 @@
1
+ import { TTab } from '../../components/Tabs';
2
+
3
+ export type TResearchFilters = {
4
+ tabs: Array<TTab<string>>;
5
+ };
6
+ export declare const ResearchFilters: ({ tabs }: TResearchFilters) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { useState as l } from "react";
3
+ import { Typography as m } from "../../components/Typography/Typography.es.js";
4
+ import "../../components/Tabs/Tabs.es.js";
5
+ import { TabsWithFade as n } from "../../components/Tabs/TabsWithFade.es.js";
6
+ import i from "./researchFilters.module.css.es.js";
7
+ const T = ({ tabs: a }) => {
8
+ const [r, t] = l(a[0].value), s = (o) => {
9
+ t(o);
10
+ };
11
+ return /* @__PURE__ */ e("section", { className: i.root, children: /* @__PURE__ */ c("div", { className: i.container, children: [
12
+ /* @__PURE__ */ e(m, { defaultVariant: "displayMd", mobileVariant: "displayXs", children: "Research" }),
13
+ /* @__PURE__ */ e("div", { className: i.filters, children: /* @__PURE__ */ e("div", { className: i.tabsWrapper, children: /* @__PURE__ */ e(
14
+ n,
15
+ {
16
+ activeTab: r,
17
+ tabs: a,
18
+ size: "md",
19
+ activeLinePosition: "bottom",
20
+ onTabClick: s
21
+ }
22
+ ) }) })
23
+ ] }) });
24
+ };
25
+ export {
26
+ T as ResearchFilters
27
+ };
@@ -0,0 +1,2 @@
1
+ export { ResearchFilters } from './ResearchFilters';
2
+ export type { TResearchFilters } from './ResearchFilters';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="researchFilters-module__root___FpFgt",r="researchFilters-module__container___gzsc4",t="researchFilters-module__filters___DthXv",s="researchFilters-module__tabsWrapper___EIe6Q",o={root:e,container:r,filters:t,tabsWrapper:s};exports.container=r;exports.default=o;exports.filters=t;exports.root=e;exports.tabsWrapper=s;
@@ -0,0 +1,13 @@
1
+ const e = "researchFilters-module__root___FpFgt", r = "researchFilters-module__container___gzsc4", t = "researchFilters-module__filters___DthXv", s = "researchFilters-module__tabsWrapper___EIe6Q", _ = {
2
+ root: e,
3
+ container: r,
4
+ filters: t,
5
+ tabsWrapper: s
6
+ };
7
+ export {
8
+ r as container,
9
+ _ as default,
10
+ t as filters,
11
+ e as root,
12
+ s as tabsWrapper
13
+ };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("../../components/Icon/Icon.cjs.js");const a=require("../../components/Icon/constants.cjs.js"),i=require("../../components/IconButton/IconButton.cjs.js"),f=require("./components/FooterAbout/FooterAbout.cjs.js"),x=require("./components/FooterLinksBlock/FooterLinksBlock.cjs.js"),j=require("./components/NewsLetter/NewsLetter.cjs.js"),N=require("react");require("../../components/Button/Button.cjs.js");const v=require("./components/TopTreatmentsCard/TopTreatmentsCard.cjs.js"),g=require("./components/LinksColumn/LinksColumn.cjs.js"),p=require("./assets/CompanyName.svg.cjs.js"),t=require("./footer.module.css.cjs.js"),l={title:"Treatments",content:[{title:"All Treatments",href:"/all"},{title:"Personalized Protocols",href:"/personalized"},{title:"Labs",href:"/labs"},{title:"Medications",href:"/medications"},{title:"Supplements",href:"/supplements"}]},k=({socialMedia:o,products:s})=>{const[u,c]=N.useState(0),d=()=>c(n=>n===0?s.length-1:n-1),m=()=>c(n=>n===s.length-1?0:n+1),r=s[u],h=()=>{window.open(r.link,"_blank")};return e.jsx("div",{className:t.default.root,children:e.jsxs("div",{className:t.default.container,children:[e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{className:t.default.footerLeft,children:e.jsx(j.NewsLetter,{})}),e.jsxs("div",{className:t.default.footerRight,children:[e.jsxs("div",{className:t.default.columns,children:[e.jsx(g.LinksColumn,{title:l.title,links:l.content},l.title),e.jsx(v.TopTreatmentsCard,{title:"Top Treatments",image:r.image,name:r.name,price:r.price,onPrev:d,onNext:m,onLearnMore:h})]}),e.jsx("div",{className:t.default.footerLinks,children:e.jsx(x.FooterLinksBlock,{})}),e.jsxs("div",{className:t.default.about,children:[e.jsx(f.FooterAbout,{}),e.jsxs("div",{className:t.default.socials,children:[e.jsx("a",{href:o.facebook,target:"_blank",rel:"noopener noreferrer",children:e.jsx(i.IconButton,{iconName:a.EIconName.FACEBOOK,variant:"muted-invert",size:"lg"})}),e.jsx("a",{href:o.instagram,target:"_blank",rel:"noopener noreferrer",children:e.jsx(i.IconButton,{iconName:a.EIconName.INSTAGRAM,variant:"muted-invert",size:"lg"})}),e.jsx("a",{href:o.twitter,target:"_blank",rel:"noopener noreferrer",children:e.jsx(i.IconButton,{iconName:a.EIconName.X,variant:"muted-invert",size:"lg"})})]})]})]})]}),e.jsx("div",{className:t.default.img,children:e.jsx(p.default,{width:"100%",height:"100%",preserveAspectRatio:"xMidYMid meet"})})]})})};exports.Footer=k;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("../../components/Icon/Icon.cjs.js");const a=require("../../components/Icon/constants.cjs.js"),i=require("../../components/IconButton/IconButton.cjs.js"),f=require("./components/FooterAbout/FooterAbout.cjs.js"),x=require("./components/FooterLinksBlock/FooterLinksBlock.cjs.js"),j=require("./components/NewsLetter/NewsLetter.cjs.js"),N=require("react");require("../../components/Button/Button.cjs.js");const v=require("./components/TopTreatmentsCard/TopTreatmentsCard.cjs.js"),g=require("./components/LinksColumn/LinksColumn.cjs.js"),p=require("./assets/CompanyName.svg.cjs.js"),t=require("./footer.module.css.cjs.js"),l={title:"Treatments",content:[{title:"All Treatments",href:"/all"},{title:"Personalized Protocols",href:"/personalized"},{title:"Labs",href:"/labs"},{title:"Medications",href:"/medications"},{title:"Supplements",href:"/supplements"}]},k=({socialMedia:o,products:s})=>{const[d,c]=N.useState(0),u=()=>c(r=>r===0?s.length-1:r-1),m=()=>c(r=>r===s.length-1?0:r+1),n=s[d],h=()=>{window.open(n==null?void 0:n.link,"_blank")};return e.jsx("div",{className:t.default.root,children:e.jsxs("div",{className:t.default.container,children:[e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{className:t.default.footerLeft,children:e.jsx(j.NewsLetter,{})}),e.jsxs("div",{className:t.default.footerRight,children:[e.jsxs("div",{className:t.default.columns,children:[e.jsx(g.LinksColumn,{title:l.title,links:l.content},l.title),n&&e.jsx(v.TopTreatmentsCard,{title:"Top Treatments",image:n.image,name:n.name,price:n.price,onPrev:u,onNext:m,onLearnMore:h})]}),e.jsx("div",{className:t.default.footerLinks,children:e.jsx(x.FooterLinksBlock,{})}),e.jsxs("div",{className:t.default.about,children:[e.jsx(f.FooterAbout,{}),e.jsxs("div",{className:t.default.socials,children:[e.jsx("a",{href:o.facebook,target:"_blank",rel:"noopener noreferrer",children:e.jsx(i.IconButton,{iconName:a.EIconName.FACEBOOK,variant:"muted-invert",size:"lg"})}),e.jsx("a",{href:o.instagram,target:"_blank",rel:"noopener noreferrer",children:e.jsx(i.IconButton,{iconName:a.EIconName.INSTAGRAM,variant:"muted-invert",size:"lg"})}),e.jsx("a",{href:o.twitter,target:"_blank",rel:"noopener noreferrer",children:e.jsx(i.IconButton,{iconName:a.EIconName.X,variant:"muted-invert",size:"lg"})})]})]})]})]}),e.jsx("div",{className:t.default.img,children:e.jsx(p.default,{width:"100%",height:"100%",preserveAspectRatio:"xMidYMid meet"})})]})})};exports.Footer=k;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
3
3
  import "../../components/Icon/Icon.es.js";
4
4
  import { EIconName as l } from "../../components/Icon/constants.es.js";
5
5
  import { IconButton as m } from "../../components/IconButton/IconButton.es.js";
6
6
  import { FooterAbout as N } from "./components/FooterAbout/FooterAbout.es.js";
7
7
  import { FooterLinksBlock as v } from "./components/FooterLinksBlock/FooterLinksBlock.es.js";
8
- import { NewsLetter as u } from "./components/NewsLetter/NewsLetter.es.js";
9
- import { useState as g } from "react";
8
+ import { NewsLetter as g } from "./components/NewsLetter/NewsLetter.es.js";
9
+ import { useState as u } from "react";
10
10
  import "../../components/Button/Button.es.js";
11
11
  import { TopTreatmentsCard as k } from "./components/TopTreatmentsCard/TopTreatmentsCard.es.js";
12
12
  import { LinksColumn as b } from "./components/LinksColumn/LinksColumn.es.js";
@@ -22,22 +22,22 @@ const s = {
22
22
  { title: "Supplements", href: "/supplements" }
23
23
  ]
24
24
  }, R = ({ socialMedia: i, products: a }) => {
25
- const [d, c] = g(0), h = () => c((n) => n === 0 ? a.length - 1 : n - 1), f = () => c((n) => n === a.length - 1 ? 0 : n + 1), o = a[d], p = () => {
26
- window.open(o.link, "_blank");
25
+ const [d, c] = u(0), h = () => c((o) => o === 0 ? a.length - 1 : o - 1), f = () => c((o) => o === a.length - 1 ? 0 : o + 1), r = a[d], p = () => {
26
+ window.open(r == null ? void 0 : r.link, "_blank");
27
27
  };
28
- return /* @__PURE__ */ e("div", { className: t.root, children: /* @__PURE__ */ r("div", { className: t.container, children: [
29
- /* @__PURE__ */ r("div", { className: t.content, children: [
30
- /* @__PURE__ */ e("div", { className: t.footerLeft, children: /* @__PURE__ */ e(u, {}) }),
31
- /* @__PURE__ */ r("div", { className: t.footerRight, children: [
32
- /* @__PURE__ */ r("div", { className: t.columns, children: [
28
+ return /* @__PURE__ */ e("div", { className: t.root, children: /* @__PURE__ */ n("div", { className: t.container, children: [
29
+ /* @__PURE__ */ n("div", { className: t.content, children: [
30
+ /* @__PURE__ */ e("div", { className: t.footerLeft, children: /* @__PURE__ */ e(g, {}) }),
31
+ /* @__PURE__ */ n("div", { className: t.footerRight, children: [
32
+ /* @__PURE__ */ n("div", { className: t.columns, children: [
33
33
  /* @__PURE__ */ e(b, { title: s.title, links: s.content }, s.title),
34
- /* @__PURE__ */ e(
34
+ r && /* @__PURE__ */ e(
35
35
  k,
36
36
  {
37
37
  title: "Top Treatments",
38
- image: o.image,
39
- name: o.name,
40
- price: o.price,
38
+ image: r.image,
39
+ name: r.name,
40
+ price: r.price,
41
41
  onPrev: h,
42
42
  onNext: f,
43
43
  onLearnMore: p
@@ -45,9 +45,9 @@ const s = {
45
45
  )
46
46
  ] }),
47
47
  /* @__PURE__ */ e("div", { className: t.footerLinks, children: /* @__PURE__ */ e(v, {}) }),
48
- /* @__PURE__ */ r("div", { className: t.about, children: [
48
+ /* @__PURE__ */ n("div", { className: t.about, children: [
49
49
  /* @__PURE__ */ e(N, {}),
50
- /* @__PURE__ */ r("div", { className: t.socials, children: [
50
+ /* @__PURE__ */ n("div", { className: t.socials, children: [
51
51
  /* @__PURE__ */ e("a", { href: i.facebook, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(m, { iconName: l.FACEBOOK, variant: "muted-invert", size: "lg" }) }),
52
52
  /* @__PURE__ */ e("a", { href: i.instagram, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(m, { iconName: l.INSTAGRAM, variant: "muted-invert", size: "lg" }) }),
53
53
  /* @__PURE__ */ e("a", { href: i.twitter, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(m, { iconName: l.X, variant: "muted-invert", size: "lg" }) })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),h=require("../../../../components/Typography/Typography.cjs.js"),v=require("../../../../components/TextInput/TextInput.cjs.js"),S=require("../../../../utils/cn/cn.cjs.js"),T=require("../../../../node_modules/react-mailchimp-subscribe/es/index.cjs.js"),j=require("../../../../utils/isValidEmail.cjs.js"),i=require("./newsLetter.module.css.cjs.js"),q="//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&amp;id=2483a4d606&amp;f_id=0050e6e6f0&tags=239347,239351",E=({status:e,message:l,subscribe:c})=>{const[n,o]=a.useState(""),[f,p]=a.useState(""),[u,s]=a.useState(!1),[g,r]=a.useState(""),[b,d]=a.useState(!1),y=m=>{o(m.target.value),u&&(s(!1),r("")),d(m.target.value.length>0)},x=()=>{if(!n){s(!0),r("Please enter your email address");return}if(!j.isValidEmail(n)){s(!0),r("Please enter a valid email address");return}s(!1),r(""),c({EMAIL:n})};return a.useEffect(()=>{e==="success"&&(p(n),o(""),s(!1),r(""),d(!1)),e==="error"&&typeof l=="string"&&(s(!0),r("Subscription failed. Please try again."))},[e,l]),t.jsxs("div",{className:S.cn(i.default.root,{[i.default.subscribed]:e==="success"}),children:[t.jsxs("div",{className:i.default.container,children:[t.jsx(h.Typography,{defaultVariant:"headingLg",mobileVariant:"headingSm",as:"h2",className:i.default.title,children:e==="success"?"Thanks for subscribing!":"Read the latest research reviews"}),t.jsx(h.Typography,{defaultVariant:"bodySm",mobileVariant:"bodyXs",as:"span",className:i.default.text,children:e==="success"?t.jsxs(t.Fragment,{children:["A confirmation email has been sent to ",t.jsx("b",{className:i.default.email,children:f}),". Please confirm your subscription."]}):"Request The Longevity Blueprint to receive our weekly newsletter containing synopses of the latest clinical research."})]}),e==="sending"&&t.jsx("div",{style:{marginTop:"1rem"},children:"Subscribing, please wait..."}),e!=="success"&&e!=="sending"&&t.jsx(v.TextInput,{placeholder:"Your email",variant:"primary-invert",value:n,handleChange:y,onButtonClick:x,showButton:!0,error:u,errorText:g,active:b})]})},w=()=>t.jsx(T.default,{url:q,render:({subscribe:e,status:l,message:c})=>t.jsx(E,{status:l,message:c,subscribe:e})});exports.NewsLetter=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),h=require("../../../../components/Typography/Typography.cjs.js"),x=require("../../../../components/TextInput/TextInput.cjs.js"),S=require("../../../../utils/cn/cn.cjs.js"),T=require("../../../../node_modules/react-mailchimp-subscribe/es/index.cjs.js"),w=require("../../../../utils/isValidEmail.cjs.js"),i=require("./newsLetter.module.css.cjs.js"),j="//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&amp;id=2483a4d606&amp;f_id=0050e6e6f0&tags=239347,239351",q=({status:e,message:l,subscribe:c})=>{const[n,o]=a.useState(""),[p,f]=a.useState(""),[u,s]=a.useState(!1),[g,r]=a.useState(""),[b,d]=a.useState(!1),y=m=>{o(m.target.value),u&&(s(!1),r("")),d(m.target.value.length>0)},v=()=>{if(!n){s(!0),r("Please enter your email address");return}if(!w.isValidEmail(n)){s(!0),r("Please enter a valid email address");return}s(!1),r(""),c({EMAIL:n})};return a.useEffect(()=>{e==="success"&&(f(n),o(""),s(!1),r(""),d(!1)),e==="error"&&typeof l=="string"&&(s(!0),r("Subscription failed. Please try again."))},[e,l]),t.jsxs("div",{className:S.cn(i.default.root,{[i.default.subscribed]:e==="success"}),children:[t.jsxs("div",{className:i.default.container,children:[t.jsx(h.Typography,{defaultVariant:"headingLg",mobileVariant:"headingSm",as:"h2",className:i.default.title,children:e==="success"?"Thanks for subscribing!":"Read the latest research reviews"}),t.jsx(h.Typography,{defaultVariant:"bodySm",mobileVariant:"bodyXs",as:"span",className:i.default.text,children:e==="success"?t.jsxs(t.Fragment,{children:["You will now begin receiving our monthly newsletter at"," ",t.jsx("b",{className:i.default.email,children:p}),". It's a great way to keep up to date on the latest developments in longevity science."]}):"Request The Longevity Blueprint to receive our weekly newsletter containing synopses of the latest clinical research."})]}),e==="sending"&&t.jsx("div",{style:{marginTop:"1rem"},children:"Subscribing, please wait..."}),e!=="success"&&e!=="sending"&&t.jsx(x.TextInput,{placeholder:"Your email",variant:"primary-invert",value:n,handleChange:y,onButtonClick:v,showButton:!0,error:u,errorText:g,active:b})]})},E=()=>t.jsx(T.default,{url:j,render:({subscribe:e,status:l,message:c})=>t.jsx(q,{status:l,message:c,subscribe:e})});exports.NewsLetter=E;
@@ -1,54 +1,55 @@
1
- import { jsx as r, jsxs as c, Fragment as S } from "react/jsx-runtime";
2
- import { useState as n, useEffect as x } from "react";
3
- import { Typography as h } from "../../../../components/Typography/Typography.es.js";
4
- import { TextInput as T } from "../../../../components/TextInput/TextInput.es.js";
5
- import { cn as w } from "../../../../utils/cn/cn.es.js";
1
+ import { jsx as r, jsxs as c, Fragment as E } from "react/jsx-runtime";
2
+ import { useState as n, useEffect as S } from "react";
3
+ import { Typography as p } from "../../../../components/Typography/Typography.es.js";
4
+ import { TextInput as x } from "../../../../components/TextInput/TextInput.es.js";
5
+ import { cn as T } from "../../../../utils/cn/cn.es.js";
6
6
  import N from "../../../../node_modules/react-mailchimp-subscribe/es/index.es.js";
7
7
  import { isValidEmail as V } from "../../../../utils/isValidEmail.es.js";
8
- import s from "./newsLetter.module.css.es.js";
9
- const C = "//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&amp;id=2483a4d606&amp;f_id=0050e6e6f0&tags=239347,239351", L = ({
8
+ import a from "./newsLetter.module.css.es.js";
9
+ const k = "//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b3582164cf116&amp;id=2483a4d606&amp;f_id=0050e6e6f0&tags=239347,239351", C = ({
10
10
  status: e,
11
11
  message: l,
12
12
  subscribe: o
13
13
  }) => {
14
- const [t, m] = n(""), [p, b] = n(""), [d, i] = n(!1), [g, a] = n(""), [v, u] = n(!1), y = (f) => {
15
- m(f.target.value), d && (i(!1), a("")), u(f.target.value.length > 0);
16
- }, E = () => {
17
- if (!t) {
18
- i(!0), a("Please enter your email address");
14
+ const [s, m] = n(""), [f, g] = n(""), [d, t] = n(!1), [b, i] = n(""), [v, u] = n(!1), y = (h) => {
15
+ m(h.target.value), d && (t(!1), i("")), u(h.target.value.length > 0);
16
+ }, w = () => {
17
+ if (!s) {
18
+ t(!0), i("Please enter your email address");
19
19
  return;
20
20
  }
21
- if (!V(t)) {
22
- i(!0), a("Please enter a valid email address");
21
+ if (!V(s)) {
22
+ t(!0), i("Please enter a valid email address");
23
23
  return;
24
24
  }
25
- i(!1), a(""), o({
26
- EMAIL: t
25
+ t(!1), i(""), o({
26
+ EMAIL: s
27
27
  });
28
28
  };
29
- return x(() => {
30
- e === "success" && (b(t), m(""), i(!1), a(""), u(!1)), e === "error" && typeof l == "string" && (i(!0), a("Subscription failed. Please try again."));
31
- }, [e, l]), /* @__PURE__ */ c("div", { className: w(s.root, { [s.subscribed]: e === "success" }), children: [
32
- /* @__PURE__ */ c("div", { className: s.container, children: [
33
- /* @__PURE__ */ r(h, { defaultVariant: "headingLg", mobileVariant: "headingSm", as: "h2", className: s.title, children: e === "success" ? "Thanks for subscribing!" : "Read the latest research reviews" }),
34
- /* @__PURE__ */ r(h, { defaultVariant: "bodySm", mobileVariant: "bodyXs", as: "span", className: s.text, children: e === "success" ? /* @__PURE__ */ c(S, { children: [
35
- "A confirmation email has been sent to ",
36
- /* @__PURE__ */ r("b", { className: s.email, children: p }),
37
- ". Please confirm your subscription."
29
+ return S(() => {
30
+ e === "success" && (g(s), m(""), t(!1), i(""), u(!1)), e === "error" && typeof l == "string" && (t(!0), i("Subscription failed. Please try again."));
31
+ }, [e, l]), /* @__PURE__ */ c("div", { className: T(a.root, { [a.subscribed]: e === "success" }), children: [
32
+ /* @__PURE__ */ c("div", { className: a.container, children: [
33
+ /* @__PURE__ */ r(p, { defaultVariant: "headingLg", mobileVariant: "headingSm", as: "h2", className: a.title, children: e === "success" ? "Thanks for subscribing!" : "Read the latest research reviews" }),
34
+ /* @__PURE__ */ r(p, { defaultVariant: "bodySm", mobileVariant: "bodyXs", as: "span", className: a.text, children: e === "success" ? /* @__PURE__ */ c(E, { children: [
35
+ "You will now begin receiving our monthly newsletter at",
36
+ " ",
37
+ /* @__PURE__ */ r("b", { className: a.email, children: f }),
38
+ ". It's a great way to keep up to date on the latest developments in longevity science."
38
39
  ] }) : "Request The Longevity Blueprint to receive our weekly newsletter containing synopses of the latest clinical research." })
39
40
  ] }),
40
41
  e === "sending" && /* @__PURE__ */ r("div", { style: { marginTop: "1rem" }, children: "Subscribing, please wait..." }),
41
42
  e !== "success" && e !== "sending" && /* @__PURE__ */ r(
42
- T,
43
+ x,
43
44
  {
44
45
  placeholder: "Your email",
45
46
  variant: "primary-invert",
46
- value: t,
47
+ value: s,
47
48
  handleChange: y,
48
- onButtonClick: E,
49
+ onButtonClick: w,
49
50
  showButton: !0,
50
51
  error: d,
51
- errorText: g,
52
+ errorText: b,
52
53
  active: v
53
54
  }
54
55
  )
@@ -56,12 +57,12 @@ const C = "//gethealthspan.us21.list-manage.com/subscribe/post?u=664ad54ec243b35
56
57
  }, R = () => /* @__PURE__ */ r(
57
58
  N,
58
59
  {
59
- url: C,
60
+ url: k,
60
61
  render: ({
61
62
  subscribe: e,
62
63
  status: l,
63
64
  message: o
64
- }) => /* @__PURE__ */ r(L, { status: l, message: o, subscribe: e })
65
+ }) => /* @__PURE__ */ r(C, { status: l, message: o, subscribe: e })
65
66
  }
66
67
  );
67
68
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -300,6 +300,16 @@
300
300
  "import": "./dist/components/AnchorLinks/AnchorLinks.es.js",
301
301
  "require": "./dist/components/AnchorLinks/AnchorLinks.cjs.js"
302
302
  },
303
+ "./Checkbox": {
304
+ "types": "./dist/components/Checkbox/Checkbox.d.ts",
305
+ "import": "./dist/components/Checkbox/Checkbox.es.js",
306
+ "require": "./dist/components/Checkbox/Checkbox.cjs.js"
307
+ },
308
+ "./ColoredDivider": {
309
+ "types": "./dist/components/ColoredDivider/ColoredDivider.d.ts",
310
+ "import": "./dist/components/ColoredDivider/ColoredDivider.es.js",
311
+ "require": "./dist/components/ColoredDivider/ColoredDivider.cjs.js"
312
+ },
303
313
  "./CallbackModule": {
304
314
  "types": "./dist/modules/Callback/Callback.d.ts",
305
315
  "import": "./dist/modules/Callback/Callback.es.js",
@@ -460,6 +470,11 @@
460
470
  "import": "./dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.es.js",
461
471
  "require": "./dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.cjs.js"
462
472
  },
473
+ "./ResearchFilters": {
474
+ "types": "./dist/modules/ResearchFilters/ResearchFilters.d.ts",
475
+ "import": "./dist/modules/ResearchFilters/ResearchFilters.es.js",
476
+ "require": "./dist/modules/ResearchFilters/ResearchFilters.cjs.js"
477
+ },
463
478
  "./Bubbles": {
464
479
  "types": "./dist/pageComponents/Bubbles/Bubbles.d.ts",
465
480
  "import": "./dist/pageComponents/Bubbles/Bubbles.es.js",