@zenpatient-org/healthspan-marketing-ui 0.1.42 → 0.1.43

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 (47) hide show
  1. package/dist/components/Button/Button.d.ts +1 -1
  2. package/dist/components/IconButton/IconButton.d.ts +1 -1
  3. package/dist/components/Label/index.d.ts +1 -1
  4. package/dist/components/Label/types.d.ts +1 -3
  5. package/dist/components/StepsCarousel/StepsCarousel.cjs.js +1 -1
  6. package/dist/components/StepsCarousel/StepsCarousel.es.js +29 -35
  7. package/dist/components/Tag/Tag.cjs.js +1 -1
  8. package/dist/components/Tag/Tag.d.ts +2 -2
  9. package/dist/components/Tag/Tag.es.js +11 -11
  10. package/dist/healthspan-marketing-ui.css +1 -1
  11. package/dist/modules/FollowTheScience/FollowTheScience.cjs.js +1 -1
  12. package/dist/modules/FollowTheScience/FollowTheScience.d.ts +1 -0
  13. package/dist/modules/FollowTheScience/FollowTheScience.es.js +13 -14
  14. package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.cjs.js +1 -1
  15. package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.es.js +6 -6
  16. package/dist/modules/IngredientHighlight/components/Ingredient/types.d.ts +1 -1
  17. package/dist/modules/IngredientHighlight/types.d.ts +1 -1
  18. package/dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.cjs.js +1 -1
  19. package/dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.es.js +13 -13
  20. package/dist/modules/ResearchEssentialReadings/index.d.ts +2 -0
  21. package/dist/modules/ResearchFeatured/ResearchFeatured.cjs.js +1 -1
  22. package/dist/modules/ResearchFeatured/ResearchFeatured.es.js +9 -9
  23. package/dist/modules/ResearchFeatured/index.d.ts +1 -0
  24. package/dist/modules/ResearchFilters/ResearchFilters.cjs.js +1 -1
  25. package/dist/modules/ResearchFilters/ResearchFilters.d.ts +3 -1
  26. package/dist/modules/ResearchFilters/ResearchFilters.es.js +18 -24
  27. package/dist/modules/ResearchStudies/ResearchStudies.cjs.js +1 -1
  28. package/dist/modules/ResearchStudies/ResearchStudies.d.ts +8 -2
  29. package/dist/modules/ResearchStudies/ResearchStudies.es.js +10 -11
  30. package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.d.ts +1 -1
  31. package/dist/modules/ResearchStudies/components/StudyCard/index.d.ts +0 -1
  32. package/dist/modules/ResearchStudies/index.d.ts +1 -0
  33. package/dist/modules/ResearchStudies/types.d.ts +8 -3
  34. package/dist/modules/TextBlockAnimated/TextBlockAnimated.d.ts +6 -0
  35. package/dist/pageComponents/HowItWorksHero/HowItWorksHero.d.ts +1 -0
  36. package/dist/pageComponents/HowItWorksHero/assets/Container.png.cjs.js +1 -0
  37. package/dist/pageComponents/HowItWorksHero/assets/Container.png.es.js +4 -0
  38. package/dist/pageComponents/HowItWorksHero/assets/people.png.cjs.js +1 -0
  39. package/dist/pageComponents/HowItWorksHero/assets/people.png.es.js +4 -0
  40. package/dist/pageComponents/HowItWorksHero/howItWorksHero.module.css.cjs.js +1 -0
  41. package/dist/pageComponents/HowItWorksHero/howItWorksHero.module.css.es.js +17 -0
  42. package/dist/pageComponents/HowItWorksHero/index.d.ts +1 -0
  43. package/dist/pageComponents/HowItWorksHero.cjs.js +1 -0
  44. package/dist/pageComponents/HowItWorksHero.es.js +14 -0
  45. package/package.json +21 -16
  46. package/dist/modules/ResearchStudies/components/StudyCard/types.d.ts +0 -10
  47. package/dist/modules/ResearchStudies/components/index.d.ts +0 -2
@@ -11,5 +11,5 @@ interface BaseButtonProps {
11
11
  suffixIcon?: EIconName;
12
12
  }
13
13
  export type ButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & AnchorHTMLAttributes<HTMLAnchorElement>;
14
- export declare const Button: React.ForwardRefExoticComponent<BaseButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLElement>>;
14
+ export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "className"> & React.RefAttributes<HTMLElement>>;
15
15
  export {};
@@ -10,5 +10,5 @@ interface BaseButtonProps {
10
10
  as?: ElementType;
11
11
  }
12
12
  export type ButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & AnchorHTMLAttributes<HTMLAnchorElement>;
13
- export declare const IconButton: ({ iconName, variant, size, as: Component, disabled, ...props }: Omit<ButtonProps, "children">) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const IconButton: ({ iconName, variant, size, as: Component, disabled, ...props }: Omit<ButtonProps, "children" | "className">) => import("react/jsx-runtime").JSX.Element;
14
14
  export {};
@@ -1,2 +1,2 @@
1
1
  export { Label } from './Label';
2
- export type { LabelColor, LabelProps } from './types';
2
+ export type { LabelColor, LabelProps, LabelSize } from './types';
@@ -1,9 +1,7 @@
1
- import { ReactNode } from 'react';
2
-
3
1
  export type LabelSize = 'sm' | 'lg';
4
2
  export type LabelColor = 'black' | 'grey' | 'white' | 'solar' | 'indigo' | 'orchre' | 'alpha-white';
5
3
  export type LabelProps = {
6
- children: ReactNode;
4
+ children: string;
7
5
  color: LabelColor;
8
6
  size?: LabelSize;
9
7
  className?: string;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),h=require("../../utils/cn/cn.cjs.js"),g=require("../Label/Label.cjs.js"),C=require("../ProgressButton/ProgressButton.cjs.js"),m=require("../Typography/Typography.cjs.js"),a=require("./stepsCarousel.module.css.cjs.js"),T=({steps:o,colorScheme:n})=>{const[c,b]=r.useState(0),f=r.useRef([]),i=r.useRef(null),u=r.useRef(null),j=r.useCallback(t=>{i.current=t.touches[0].clientX},[]),y=r.useCallback(t=>{u.current=t.touches[0].clientX},[]),d=r.useCallback(t=>{var s;b(t),(s=f.current[t])==null||s.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[]),k=r.useCallback(()=>{if(i.current!==null&&u.current!==null){const t=u.current-i.current,s=50;b(l=>t>s&&l>0?l-1:t<-s&&l<o.length-1?l+1:l)}i.current=null,u.current=null},[o.length]);return e.jsxs("div",{className:a.default.root,"data-scheme":n,children:[e.jsx("div",{className:a.default.stepsContainer,"data-scheme":n,onTouchStart:j,onTouchMove:y,onTouchEnd:k,children:o.map((t,s)=>{const l=c===s;return e.jsxs("button",{ref:p=>{p&&(f.current[s]=p)},className:h.cn(a.default.card,l&&a.default.cardActive),onClick:()=>d(s),type:"button",children:[e.jsx("div",{className:h.cn(a.default.imageWrapper,l&&a.default.imageWrapperActive),children:e.jsx("img",{src:t.image,alt:t.title,className:a.default.image})}),e.jsx("div",{className:a.default.stepLabel,children:l?e.jsxs(e.Fragment,{children:[e.jsxs(g.Label,{size:"lg",className:a.default.desktop,color:n==="dark"?"white":"black",children:["Step ",s+1]}),e.jsxs(g.Label,{size:"sm",className:a.default.mobile,color:n==="dark"?"white":"black",children:["Step ",s+1]})]}):e.jsxs(m.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,className:a.default.labelText,children:["Step ",s+1]})}),e.jsxs("div",{className:a.default.textContainer,children:[e.jsx(m.Typography,{as:"h3",defaultVariant:"headingXs",mobileVariant:"headingXxs",children:t.title}),t.description&&e.jsx(m.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:a.default.cardDescription,children:t.description})]})]},`step-${s}`)})}),e.jsx("div",{className:h.cn(a.default.mobile,a.default.progressButtonContainer),children:e.jsx(C.ProgressButton,{invert:n==="dark",left:{disabled:c<=0,onClick:()=>d(c-1)},right:{disabled:c>=o.length-1,onClick:()=>d(c+1)}})})]})};exports.StepsCarousel=T;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),h=require("../../utils/cn/cn.cjs.js"),g=require("../Label/Label.cjs.js"),C=require("../ProgressButton/ProgressButton.cjs.js"),m=require("../Typography/Typography.cjs.js"),a=require("./stepsCarousel.module.css.cjs.js"),T=({steps:o,colorScheme:n})=>{const[c,b]=r.useState(0),f=r.useRef([]),i=r.useRef(null),u=r.useRef(null),j=r.useCallback(t=>{i.current=t.touches[0].clientX},[]),y=r.useCallback(t=>{u.current=t.touches[0].clientX},[]),d=r.useCallback(t=>{var s;b(t),(s=f.current[t])==null||s.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[]),k=r.useCallback(()=>{if(i.current!==null&&u.current!==null){const t=u.current-i.current,s=50;b(l=>t>s&&l>0?l-1:t<-s&&l<o.length-1?l+1:l)}i.current=null,u.current=null},[o.length]);return e.jsxs("div",{className:a.default.root,"data-scheme":n,children:[e.jsx("div",{className:a.default.stepsContainer,"data-scheme":n,onTouchStart:j,onTouchMove:y,onTouchEnd:k,children:o.map((t,s)=>{const l=c===s;return e.jsxs("button",{ref:p=>{p&&(f.current[s]=p)},className:h.cn(a.default.card,l&&a.default.cardActive),onClick:()=>d(s),type:"button",children:[e.jsx("div",{className:h.cn(a.default.imageWrapper,l&&a.default.imageWrapperActive),children:e.jsx("img",{src:t.image,alt:t.title,className:a.default.image})}),e.jsx("div",{className:a.default.stepLabel,children:l?e.jsxs(e.Fragment,{children:[e.jsx(g.Label,{size:"lg",className:a.default.desktop,color:n==="dark"?"white":"black",children:`Step ${s+1}`}),e.jsx(g.Label,{size:"sm",className:a.default.mobile,color:n==="dark"?"white":"black",children:`Step ${s+1}`})]}):e.jsxs(m.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,className:a.default.labelText,children:["Step ",s+1]})}),e.jsxs("div",{className:a.default.textContainer,children:[e.jsx(m.Typography,{as:"h3",defaultVariant:"headingXs",mobileVariant:"headingXxs",children:t.title}),t.description&&e.jsx(m.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:a.default.cardDescription,children:t.description})]})]},`step-${s}`)})}),e.jsx("div",{className:h.cn(a.default.mobile,a.default.progressButtonContainer),children:e.jsx(C.ProgressButton,{invert:n==="dark",left:{disabled:c<=0,onClick:()=>d(c-1)},right:{disabled:c>=o.length-1,onClick:()=>d(c+1)}})})]})};exports.StepsCarousel=T;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as n, Fragment as X } from "react/jsx-runtime";
2
+ import { jsxs as i, jsx as a, Fragment as X } from "react/jsx-runtime";
3
3
  import { useState as V, useRef as m, useCallback as u } from "react";
4
4
  import { cn as b } from "../../utils/cn/cn.es.js";
5
5
  import { Label as k } from "../Label/Label.es.js";
6
6
  import { ProgressButton as y } from "../ProgressButton/ProgressButton.es.js";
7
7
  import { Typography as p } from "../Typography/Typography.es.js";
8
8
  import t from "./stepsCarousel.module.css.es.js";
9
- const B = ({ steps: s, colorScheme: c }) => {
10
- const [i, f] = V(0), g = m([]), o = m(null), d = m(null), v = u((e) => {
9
+ const z = ({ steps: s, colorScheme: l }) => {
10
+ const [c, f] = V(0), g = m([]), o = m(null), d = m(null), v = u((e) => {
11
11
  o.current = e.touches[0].clientX;
12
12
  }, []), C = u((e) => {
13
13
  d.current = e.touches[0].clientX;
@@ -17,58 +17,52 @@ const B = ({ steps: s, colorScheme: c }) => {
17
17
  }, []), T = u(() => {
18
18
  if (o.current !== null && d.current !== null) {
19
19
  const e = d.current - o.current, r = 50;
20
- f((a) => e > r && a > 0 ? a - 1 : e < -r && a < s.length - 1 ? a + 1 : a);
20
+ f((n) => e > r && n > 0 ? n - 1 : e < -r && n < s.length - 1 ? n + 1 : n);
21
21
  }
22
22
  o.current = null, d.current = null;
23
23
  }, [s.length]);
24
- return /* @__PURE__ */ l("div", { className: t.root, "data-scheme": c, children: [
25
- /* @__PURE__ */ n(
24
+ return /* @__PURE__ */ i("div", { className: t.root, "data-scheme": l, children: [
25
+ /* @__PURE__ */ a(
26
26
  "div",
27
27
  {
28
28
  className: t.stepsContainer,
29
- "data-scheme": c,
29
+ "data-scheme": l,
30
30
  onTouchStart: v,
31
31
  onTouchMove: C,
32
32
  onTouchEnd: T,
33
33
  children: s.map((e, r) => {
34
- const a = i === r;
35
- return /* @__PURE__ */ l(
34
+ const n = c === r;
35
+ return /* @__PURE__ */ i(
36
36
  "button",
37
37
  {
38
38
  ref: (N) => {
39
39
  N && (g.current[r] = N);
40
40
  },
41
- className: b(t.card, a && t.cardActive),
41
+ className: b(t.card, n && t.cardActive),
42
42
  onClick: () => h(r),
43
43
  type: "button",
44
44
  children: [
45
- /* @__PURE__ */ n("div", { className: b(t.imageWrapper, a && t.imageWrapperActive), children: /* @__PURE__ */ n("img", { src: e.image, alt: e.title, className: t.image }) }),
46
- /* @__PURE__ */ n("div", { className: t.stepLabel, children: a ? /* @__PURE__ */ l(X, { children: [
47
- /* @__PURE__ */ l(
45
+ /* @__PURE__ */ a("div", { className: b(t.imageWrapper, n && t.imageWrapperActive), children: /* @__PURE__ */ a("img", { src: e.image, alt: e.title, className: t.image }) }),
46
+ /* @__PURE__ */ a("div", { className: t.stepLabel, children: n ? /* @__PURE__ */ i(X, { children: [
47
+ /* @__PURE__ */ a(
48
48
  k,
49
49
  {
50
50
  size: "lg",
51
51
  className: t.desktop,
52
- color: c === "dark" ? "white" : "black",
53
- children: [
54
- "Step ",
55
- r + 1
56
- ]
52
+ color: l === "dark" ? "white" : "black",
53
+ children: `Step ${r + 1}`
57
54
  }
58
55
  ),
59
- /* @__PURE__ */ l(
56
+ /* @__PURE__ */ a(
60
57
  k,
61
58
  {
62
59
  size: "sm",
63
60
  className: t.mobile,
64
- color: c === "dark" ? "white" : "black",
65
- children: [
66
- "Step ",
67
- r + 1
68
- ]
61
+ color: l === "dark" ? "white" : "black",
62
+ children: `Step ${r + 1}`
69
63
  }
70
64
  )
71
- ] }) : /* @__PURE__ */ l(
65
+ ] }) : /* @__PURE__ */ i(
72
66
  p,
73
67
  {
74
68
  defaultVariant: "labelSm",
@@ -81,9 +75,9 @@ const B = ({ steps: s, colorScheme: c }) => {
81
75
  ]
82
76
  }
83
77
  ) }),
84
- /* @__PURE__ */ l("div", { className: t.textContainer, children: [
85
- /* @__PURE__ */ n(p, { as: "h3", defaultVariant: "headingXs", mobileVariant: "headingXxs", children: e.title }),
86
- e.description && /* @__PURE__ */ n(
78
+ /* @__PURE__ */ i("div", { className: t.textContainer, children: [
79
+ /* @__PURE__ */ a(p, { as: "h3", defaultVariant: "headingXs", mobileVariant: "headingXxs", children: e.title }),
80
+ e.description && /* @__PURE__ */ a(
87
81
  p,
88
82
  {
89
83
  as: "p",
@@ -101,22 +95,22 @@ const B = ({ steps: s, colorScheme: c }) => {
101
95
  })
102
96
  }
103
97
  ),
104
- /* @__PURE__ */ n("div", { className: b(t.mobile, t.progressButtonContainer), children: /* @__PURE__ */ n(
98
+ /* @__PURE__ */ a("div", { className: b(t.mobile, t.progressButtonContainer), children: /* @__PURE__ */ a(
105
99
  y,
106
100
  {
107
- invert: c === "dark",
101
+ invert: l === "dark",
108
102
  left: {
109
- disabled: i <= 0,
110
- onClick: () => h(i - 1)
103
+ disabled: c <= 0,
104
+ onClick: () => h(c - 1)
111
105
  },
112
106
  right: {
113
- disabled: i >= s.length - 1,
114
- onClick: () => h(i + 1)
107
+ disabled: c >= s.length - 1,
108
+ onClick: () => h(c + 1)
115
109
  }
116
110
  }
117
111
  ) })
118
112
  ] });
119
113
  };
120
114
  export {
121
- B as StepsCarousel
115
+ z as StepsCarousel
122
116
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../styles/typography.module.css.cjs.js"),m=require("../../utils/cn/cn.cjs.js"),s=require("../Icon/Icon.cjs.js"),t=require("./tag.module.css.cjs.js"),g={md:l.default.labelMd,lg:l.default.labelLg},j=({value:r,children:o,active:d,disabled:u,size:a="md",prefixIcon:n,suffixIcon:c,onClick:i})=>e.jsx("button",{className:m.cn(t.default.tag,g[a],{[t.default.active]:d},t.default[a]),disabled:u,onClick:()=>i(r),children:e.jsxs("div",{className:t.default.content,children:[n&&e.jsx("div",{className:t.default.iconWrap,children:e.jsx(s.Icon,{name:n})}),e.jsx("p",{children:o}),c&&e.jsx("div",{className:t.default.iconWrap,children:e.jsx(s.Icon,{name:c})})]})});exports.Tag=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../styles/typography.module.css.cjs.js"),m=require("../../utils/cn/cn.cjs.js"),d=require("../Icon/Icon.cjs.js"),t=require("./tag.module.css.cjs.js"),g={md:l.default.labelMd,lg:l.default.labelLg},j=({value:n,children:u,active:o,disabled:i,size:s="md",prefixIcon:c,suffixIcon:r,onClick:a})=>e.jsx("button",{className:m.cn(t.default.tag,g[s],{[t.default.active]:o},t.default[s]),disabled:i,onClick:()=>n&&(a==null?void 0:a(n)),children:e.jsxs("div",{className:t.default.content,children:[c&&e.jsx("div",{className:t.default.iconWrap,children:e.jsx(d.Icon,{name:c})}),e.jsx("p",{children:u}),r&&e.jsx("div",{className:t.default.iconWrap,children:e.jsx(d.Icon,{name:r})})]})});exports.Tag=j;
@@ -3,14 +3,14 @@ import { EIconName } from '../Icon';
3
3
 
4
4
  type Props = {
5
5
  children: ReactNode;
6
- value: string;
6
+ value?: string;
7
7
  active?: boolean;
8
8
  size?: 'md' | 'lg';
9
9
  disabled?: boolean;
10
10
  prefixIcon?: EIconName;
11
11
  suffixIcon?: EIconName;
12
12
  iconPosition?: 'left' | 'right';
13
- onClick: (value: string) => void;
13
+ onClick?: (value: string) => void;
14
14
  };
15
15
  export declare const Tag: ({ value, children, active, disabled, size, prefixIcon, suffixIcon, onClick }: Props) => import("react/jsx-runtime").JSX.Element;
16
16
  export {};
@@ -1,21 +1,21 @@
1
- import { jsx as r, jsxs as p } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
2
  import c from "../../styles/typography.module.css.es.js";
3
3
  import { cn as g } from "../../utils/cn/cn.es.js";
4
- import { Icon as e } from "../Icon/Icon.es.js";
5
- import a from "./tag.module.css.es.js";
4
+ import { Icon as n } from "../Icon/Icon.es.js";
5
+ import m from "./tag.module.css.es.js";
6
6
  const h = {
7
7
  md: c.labelMd,
8
8
  lg: c.labelLg
9
- }, f = ({ value: l, children: n, active: i, disabled: s, size: m = "md", prefixIcon: o, suffixIcon: t, onClick: d }) => /* @__PURE__ */ r(
9
+ }, f = ({ value: t, children: d, active: l, disabled: p, size: e = "md", prefixIcon: o, suffixIcon: s, onClick: a }) => /* @__PURE__ */ r(
10
10
  "button",
11
11
  {
12
- className: g(a.tag, h[m], { [a.active]: i }, a[m]),
13
- disabled: s,
14
- onClick: () => d(l),
15
- children: /* @__PURE__ */ p("div", { className: a.content, children: [
16
- o && /* @__PURE__ */ r("div", { className: a.iconWrap, children: /* @__PURE__ */ r(e, { name: o }) }),
17
- /* @__PURE__ */ r("p", { children: n }),
18
- t && /* @__PURE__ */ r("div", { className: a.iconWrap, children: /* @__PURE__ */ r(e, { name: t }) })
12
+ className: g(m.tag, h[e], { [m.active]: l }, m[e]),
13
+ disabled: p,
14
+ onClick: () => t && (a == null ? void 0 : a(t)),
15
+ children: /* @__PURE__ */ i("div", { className: m.content, children: [
16
+ o && /* @__PURE__ */ r("div", { className: m.iconWrap, children: /* @__PURE__ */ r(n, { name: o }) }),
17
+ /* @__PURE__ */ r("p", { children: d }),
18
+ s && /* @__PURE__ */ r("div", { className: m.iconWrap, children: /* @__PURE__ */ r(n, { name: s }) })
19
19
  ] })
20
20
  }
21
21
  );