@zenpatient-org/healthspan-marketing-ui 0.2.39 → 0.2.40

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),l=require("../../utils/cn/cn.cjs.js"),a=require("../../src/modules/FeaturedIn/featuredIn.module.css"),u=require("./components/CtaFeaturedIn.cjs.js"),s=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js");function m({media:n}){return e.jsx("div",{className:a.mediaFeaturedInBlock,children:n.filter(r=>!!r.logo).map(({logo:r,url:t},o)=>{const i=t?"a":"div";return e.jsx(i,{href:t,target:"_blank",rel:"noopener noreferrer",className:a.mediaFeaturedInImageContainer,children:e.jsx("div",{className:a.mediaFeaturedInImage,style:{backgroundImage:`url(${r})`}})},`${t}_${o}`)})})}function p({quote:n}){return e.jsx("div",{className:a.quoteFeaturedInBlock,children:e.jsxs(s.Typography,{as:"p",defaultVariant:"headingSm",mobileVariant:"headingXxs",className:a.quoteFeaturedInText,children:["“",n,"”"]})})}function I({label:n,content:r}){return e.jsxs("section",{className:a.container,children:[e.jsx("p",{className:l.cn(a.title,a.customTitle),children:"(Featured In)"}),e.jsx(s.Typography,{as:"p",defaultVariant:"displayMd",className:l.cn(a.title,a.defaultTitle),children:"(Featured In)"}),e.jsx(s.Typography,{as:"p",defaultVariant:"labelMd",mobileVariant:"labelSm",emphasis:!0,className:a.label,children:n}),e.jsx(d.InfiniteScroll,{items:r,contentClassName:a.content,itemClassName:a.item,rootClassName:a.scrollRoot,renderItem:t=>e.jsxs(c.Fragment,{children:[t.type==="media"&&e.jsx(m,{media:t.media}),t.type==="quote"&&e.jsx(p,{quote:t.quote}),t.type==="cta"&&e.jsx(u.CtaFeaturedIn,{button_label:t.button_label})]},t.type)})]})}exports.FeaturedIn=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),i=require("../../utils/cn/cn.cjs.js"),u=require("./components/CtaFeaturedIn.cjs.js"),a=require("../../src/modules/FeaturedIn/featuredIn.module.css"),l=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js");function m({media:r}){return e.jsx("div",{className:a.mediaFeaturedInBlock,children:r.filter(t=>!!t.logo).map(({logo:t,url:s},o)=>{const n=s?"a":"div";return e.jsx(n,{href:s,target:"_blank",rel:"noopener noreferrer",className:a.mediaFeaturedInImageContainer,children:e.jsx("div",{className:a.mediaFeaturedInImage,style:{backgroundImage:`url(${t})`}})},`${s}_${o}`)})})}function p({quote:r,source:t}){return e.jsxs("div",{className:a.quoteFeaturedInBlock,children:[e.jsxs(l.Typography,{as:"p",defaultVariant:"headingSm",mobileVariant:"headingXxs",className:a.quoteFeaturedInText,children:["“",r,"”"]}),t&&e.jsxs(l.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:a.quoteFeaturedInSource,children:["— ",t]})]})}function h({label:r,title:t,content:s,colorScheme:o="light"}){return e.jsxs("section",{className:i.cn(a.container,a[o]),children:[e.jsx(l.Typography,{as:"p",defaultVariant:"labelMd",mobileVariant:"labelSm",emphasis:!0,className:a.label,children:r}),t&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:i.cn(a.title,a.customTitle),children:t}),e.jsx(l.Typography,{as:"p",defaultVariant:"displayMd",className:i.cn(a.title,a.defaultTitle),children:t})]}),e.jsx(d.InfiniteScroll,{items:s,contentClassName:a.content,itemClassName:a.item,rootClassName:a.scrollRoot,renderItem:n=>e.jsxs(c.Fragment,{children:[n.type==="media"&&e.jsx(m,{media:n.media}),n.type==="quote"&&e.jsx(p,{quote:n.quote,source:n.source}),n.type==="cta"&&e.jsx(u.CtaFeaturedIn,{button_label:n.button_label})]},n.type)})]})}exports.FeaturedIn=h;
@@ -1,3 +1,5 @@
1
+ import { TColorScheme } from '../../types/common';
2
+
1
3
  type TMediaView = {
2
4
  type: 'media';
3
5
  media: Array<{
@@ -8,6 +10,7 @@ type TMediaView = {
8
10
  type TFeaturedQuoteView = {
9
11
  type: 'quote';
10
12
  quote: string;
13
+ source?: string;
11
14
  };
12
15
  type TFeaturedButtonView = {
13
16
  type: 'cta';
@@ -15,7 +18,9 @@ type TFeaturedButtonView = {
15
18
  };
16
19
  export type FeaturedInProps = {
17
20
  label: string;
21
+ title?: string;
18
22
  content: Array<TMediaView | TFeaturedQuoteView | TFeaturedButtonView>;
23
+ colorScheme?: TColorScheme;
19
24
  };
20
- export declare function FeaturedIn({ label, content }: FeaturedInProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function FeaturedIn({ label, title, content, colorScheme }: FeaturedInProps): import("react/jsx-runtime").JSX.Element;
21
26
  export {};
@@ -1,60 +1,68 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { Fragment as d } from "react";
3
- import { cn as i } from "../../utils/cn/cn.es.js";
1
+ import { jsxs as n, jsx as t, Fragment as d } from "react/jsx-runtime";
2
+ import { Fragment as c } from "react";
3
+ import { cn as m } from "../../utils/cn/cn.es.js";
4
+ import { CtaFeaturedIn as u } from "./components/CtaFeaturedIn.es.js";
4
5
  import e from "../../modules/FeaturedIn/featuredIn.module.css";
5
- import { CtaFeaturedIn as s } from "./components/CtaFeaturedIn.es.js";
6
- import { Typography as o } from "../../components/Typography/Typography.es.js";
7
- import { InfiniteScroll as c } from "../../components/InfiniteScroll/InfiniteScroll.es.js";
8
- function u({ media: r }) {
9
- return /* @__PURE__ */ t("div", { className: e.mediaFeaturedInBlock, children: r.filter((n) => !!n.logo).map(({ logo: n, url: a }, m) => /* @__PURE__ */ t(
10
- a ? "a" : "div",
6
+ import { Typography as i } from "../../components/Typography/Typography.es.js";
7
+ import { InfiniteScroll as p } from "../../components/InfiniteScroll/InfiniteScroll.es.js";
8
+ function f({ media: l }) {
9
+ return /* @__PURE__ */ t("div", { className: e.mediaFeaturedInBlock, children: l.filter((a) => !!a.logo).map(({ logo: a, url: o }, s) => /* @__PURE__ */ t(
10
+ o ? "a" : "div",
11
11
  {
12
- href: a,
12
+ href: o,
13
13
  target: "_blank",
14
14
  rel: "noopener noreferrer",
15
15
  className: e.mediaFeaturedInImageContainer,
16
- children: /* @__PURE__ */ t("div", { className: e.mediaFeaturedInImage, style: { backgroundImage: `url(${n})` } })
16
+ children: /* @__PURE__ */ t("div", { className: e.mediaFeaturedInImage, style: { backgroundImage: `url(${a})` } })
17
17
  },
18
- `${a}_${m}`
18
+ `${o}_${s}`
19
19
  )) });
20
20
  }
21
- function p({ quote: r }) {
22
- return /* @__PURE__ */ t("div", { className: e.quoteFeaturedInBlock, children: /* @__PURE__ */ l(
23
- o,
24
- {
25
- as: "p",
26
- defaultVariant: "headingSm",
27
- mobileVariant: "headingXxs",
28
- className: e.quoteFeaturedInText,
29
- children: [
30
- "“",
31
- r,
32
- "”"
33
- ]
34
- }
35
- ) });
21
+ function h({ quote: l, source: a }) {
22
+ return /* @__PURE__ */ n("div", { className: e.quoteFeaturedInBlock, children: [
23
+ /* @__PURE__ */ n(
24
+ i,
25
+ {
26
+ as: "p",
27
+ defaultVariant: "headingSm",
28
+ mobileVariant: "headingXxs",
29
+ className: e.quoteFeaturedInText,
30
+ children: [
31
+ "“",
32
+ l,
33
+ "”"
34
+ ]
35
+ }
36
+ ),
37
+ a && /* @__PURE__ */ n(i, { as: "p", defaultVariant: "labelXs", emphasis: !0, className: e.quoteFeaturedInSource, children: [
38
+ "— ",
39
+ a
40
+ ] })
41
+ ] });
36
42
  }
37
- function q({ label: r, content: n }) {
38
- return /* @__PURE__ */ l("section", { className: e.container, children: [
39
- /* @__PURE__ */ t("p", { className: i(e.title, e.customTitle), children: "(Featured In)" }),
40
- /* @__PURE__ */ t(o, { as: "p", defaultVariant: "displayMd", className: i(e.title, e.defaultTitle), children: "(Featured In)" }),
41
- /* @__PURE__ */ t(o, { as: "p", defaultVariant: "labelMd", mobileVariant: "labelSm", emphasis: !0, className: e.label, children: r }),
43
+ function V({ label: l, title: a, content: o, colorScheme: s = "light" }) {
44
+ return /* @__PURE__ */ n("section", { className: m(e.container, e[s]), children: [
45
+ /* @__PURE__ */ t(i, { as: "p", defaultVariant: "labelMd", mobileVariant: "labelSm", emphasis: !0, className: e.label, children: l }),
46
+ a && /* @__PURE__ */ n(d, { children: [
47
+ /* @__PURE__ */ t("p", { className: m(e.title, e.customTitle), children: a }),
48
+ /* @__PURE__ */ t(i, { as: "p", defaultVariant: "displayMd", className: m(e.title, e.defaultTitle), children: a })
49
+ ] }),
42
50
  /* @__PURE__ */ t(
43
- c,
51
+ p,
44
52
  {
45
- items: n,
53
+ items: o,
46
54
  contentClassName: e.content,
47
55
  itemClassName: e.item,
48
56
  rootClassName: e.scrollRoot,
49
- renderItem: (a) => /* @__PURE__ */ l(d, { children: [
50
- a.type === "media" && /* @__PURE__ */ t(u, { media: a.media }),
51
- a.type === "quote" && /* @__PURE__ */ t(p, { quote: a.quote }),
52
- a.type === "cta" && /* @__PURE__ */ t(s, { button_label: a.button_label })
53
- ] }, a.type)
57
+ renderItem: (r) => /* @__PURE__ */ n(c, { children: [
58
+ r.type === "media" && /* @__PURE__ */ t(f, { media: r.media }),
59
+ r.type === "quote" && /* @__PURE__ */ t(h, { quote: r.quote, source: r.source }),
60
+ r.type === "cta" && /* @__PURE__ */ t(u, { button_label: r.button_label })
61
+ ] }, r.type)
54
62
  }
55
63
  )
56
64
  ] });
57
65
  }
58
66
  export {
59
- q as FeaturedIn
67
+ V as FeaturedIn
60
68
  };
@@ -2,16 +2,18 @@
2
2
  width: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
+ gap: var(--spacing-24, 24px);
5
6
  padding: var(--spacing-120) 0;
6
7
  position: relative;
7
8
  }
8
9
 
9
- .label {
10
- text-align: center;
10
+ .container.dark {
11
+ background-color: var(--color-bg-fill-alpha-black-5);
12
+ color: var(--color-text-primary-inverted);
11
13
  }
12
14
 
13
- .scrollRoot {
14
- margin-top: 67px;
15
+ .label {
16
+ text-align: center;
15
17
  }
16
18
 
17
19
  .label + .scrollRoot {
@@ -25,15 +27,21 @@
25
27
  border-right: var(--border-width-sm) solid var(--color-bg-fill-alpha-black-10);
26
28
  }
27
29
 
30
+ .container.dark .item {
31
+ border-color: var(--color-bg-fill-alpha-white-20);
32
+ }
33
+
28
34
  .title {
29
- position: absolute;
30
35
  color: var(--color-text-primary);
31
36
  text-align: center;
32
37
  opacity: 0.2;
33
- margin-top: 48px;
34
38
  width: 100%;
35
39
  }
36
40
 
41
+ .container.dark .title {
42
+ color: var(--color-text-primary-inverted);
43
+ }
44
+
37
45
  .customTitle {
38
46
  font-family: var(--font-default);
39
47
  font-size: 144px;
@@ -55,6 +63,10 @@
55
63
  border-top: var(--border-width-sm) solid var(--color-bg-fill-alpha-black-10);
56
64
  }
57
65
 
66
+ .container.dark .content {
67
+ border-color: var(--color-bg-fill-alpha-white-20);
68
+ }
69
+
58
70
  .mediaFeaturedInBlock {
59
71
  display: flex;
60
72
  align-items: center;
@@ -76,6 +88,10 @@
76
88
  padding: 25px;
77
89
  }
78
90
 
91
+ .container.dark .mediaFeaturedInImageContainer {
92
+ background: var(--background-fill-alpha-white-20, rgba(255, 255, 255, 0.20))
93
+ }
94
+
79
95
  .mediaFeaturedInImage {
80
96
  height: 100%;
81
97
  width: 100%;
@@ -86,10 +102,28 @@
86
102
 
87
103
  .quoteFeaturedInBlock {
88
104
  display: flex;
105
+ flex-direction: column;
106
+ gap: var(--spacing-24, 24px);
89
107
  align-items: center;
90
108
  width: 320px;
91
109
  }
92
110
 
111
+ .quoteFeaturedInSource {
112
+ width: 100%;
113
+ text-align: center;
114
+ color: var(--color-text-secondary-disabled);
115
+ }
116
+
117
+ .container.dark .quoteFeaturedInSource {
118
+ color: var(--color-text-secondary-inverted);
119
+ }
120
+
121
+ .container.dark {
122
+ .label, .quoteFeaturedInBlock {
123
+ color: var(--color-text-primary-brand-solar);
124
+ }
125
+ }
126
+
93
127
  .quoteFeaturedInText {
94
128
  white-space: normal;
95
129
  text-align: center;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../src/modules/YourProtocol/yourProtocol.module.css"),c=require("../../types/analytics/analytics.cjs.js"),h=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),y=require("../../components/Icon/Icon.cjs.js"),l=require("../../components/Typography/Typography.cjs.js"),u=require("../../components/Button/Button.cjs.js"),g=({title:o,image:r,tags:n,button:t,colorScheme:i="light"})=>{const d={event:c.EAnalyticsEvent.ctaClicked,type:c.EAnalyticsEventType.interaction,component:"YourProtocol",element:"Callback",payload:{ctaLink:t.link}},p=i==="dark"?"secondary":"primary";return e.jsx("section",{className:a.root,"data-scheme":i,children:e.jsxs("div",{className:a.container,children:[e.jsx(h.HighlightedTitle,{title:o,className:a.title,defaultVariant:"displayMd",mobileVariant:"headingXl",colorScheme:i}),n.length>0&&e.jsx("div",{className:a.tagsList,children:n.map((s,m)=>e.jsxs("div",{className:a.tagItem,children:[s.icon&&e.jsx("div",{className:a.iconWrapper,children:e.jsx(y.Icon,{name:s.icon,className:a.icon})}),e.jsxs("div",{className:a.tagText,children:[e.jsx(l.Typography,{className:a.tagLabel,as:"p",defaultVariant:"headingXs",children:s.label}),s.description&&e.jsx(l.Typography,{className:a.tagDescription,as:"p",defaultVariant:"bodyMd",children:s.description})]})]},m))}),t&&e.jsx("div",{className:a.callbackButton,children:e.jsx(u.Button,{href:t.link,as:"a",analyticsProps:d,size:"lg",variant:p,children:t.label})}),e.jsx("img",{src:r,alt:"Your Protocol",className:a.image})]})})};exports.YourProtocol=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../utils/cn/cn.cjs.js"),s=require("../../src/modules/YourProtocol/yourProtocol.module.css"),c=require("../../types/analytics/analytics.cjs.js"),p=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),g=require("./components/ProtocolTags/ProtocolTags.cjs.js"),h=require("../../components/Callback/Callback.cjs.js"),y=({title:a,image:l,tags:d,callbackView:t})=>{var o,n,i,r;const u={event:c.EAnalyticsEvent.ctaClicked,type:c.EAnalyticsEventType.interaction,component:"YourProtocol",element:"Callback",payload:{ctaLink:(o=t==null?void 0:t.signupUrl)!=null?o:""}};return e.jsx("section",{className:s.root,children:e.jsxs("div",{className:s.container,children:[e.jsxs("div",{className:s.content,children:[e.jsx(p.HighlightedTitle,{title:a,className:s.title,defaultVariant:"displaySm",mobileVariant:"headingXl"}),e.jsx(g.ProtocolTags,{tags:d}),t&&e.jsx("div",{className:s.callback,children:e.jsx(h.Callback,{title:t.title,description:(n=t.description)!=null?n:"",price:(i=t.price)!=null?i:"",image:t.image,button:{href:(r=t.signupUrl)!=null?r:"",as:"a",analyticsProps:u},size:"sm",shape:t.shape})})]}),e.jsx("img",{src:l,alt:"Your Protocol",className:m.cn(s.image,s.desktop),width:481})]})})};exports.YourProtocol=y;
@@ -1,16 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
- import { TTagView } from './types';
3
- import { TColorScheme } from '../../types/common';
2
+ import { TCallbackView, TTagView } from './types';
4
3
 
5
4
  type Props = {
6
5
  title: ReactNode;
7
6
  tags: Array<TTagView>;
8
- button: {
9
- label: string;
10
- link: string;
11
- };
7
+ callbackView: TCallbackView | null;
12
8
  image: string;
13
- colorScheme?: TColorScheme;
14
9
  };
15
- export declare const YourProtocol: ({ title, image, tags, button, colorScheme }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const YourProtocol: ({ title, image, tags, callbackView }: Props) => import("react/jsx-runtime").JSX.Element;
16
11
  export {};
@@ -1,42 +1,53 @@
1
- import { jsx as i, jsxs as r } from "react/jsx-runtime";
2
- import a from "../../modules/YourProtocol/yourProtocol.module.css";
3
- import { EAnalyticsEventType as h, EAnalyticsEvent as y } from "../../types/analytics/analytics.es.js";
4
- import { HighlightedTitle as N } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
5
- import { Icon as f } from "../../components/Icon/Icon.es.js";
6
- import { Typography as s } from "../../components/Typography/Typography.es.js";
7
- import { Button as v } from "../../components/Button/Button.es.js";
8
- const P = ({ title: c, image: o, tags: n, button: t, colorScheme: l = "light" }) => {
9
- const m = {
10
- event: y.ctaClicked,
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import { cn as c } from "../../utils/cn/cn.es.js";
3
+ import o from "../../modules/YourProtocol/yourProtocol.module.css";
4
+ import { EAnalyticsEventType as h, EAnalyticsEvent as g } from "../../types/analytics/analytics.es.js";
5
+ import { HighlightedTitle as f } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
6
+ import { ProtocolTags as u } from "./components/ProtocolTags/ProtocolTags.es.js";
7
+ import { Callback as y } from "../../components/Callback/Callback.es.js";
8
+ const Y = ({ title: a, image: p, tags: d, callbackView: t }) => {
9
+ var e, i, s, n;
10
+ const l = {
11
+ event: g.ctaClicked,
11
12
  type: h.interaction,
12
13
  component: "YourProtocol",
13
14
  element: "Callback",
14
15
  payload: {
15
- ctaLink: t.link
16
+ ctaLink: (e = t == null ? void 0 : t.signupUrl) != null ? e : ""
16
17
  }
17
- }, d = l === "dark" ? "secondary" : "primary";
18
- return /* @__PURE__ */ i("section", { className: a.root, "data-scheme": l, children: /* @__PURE__ */ r("div", { className: a.container, children: [
19
- /* @__PURE__ */ i(
20
- N,
21
- {
22
- title: c,
23
- className: a.title,
24
- defaultVariant: "displayMd",
25
- mobileVariant: "headingXl",
26
- colorScheme: l
27
- }
28
- ),
29
- n.length > 0 && /* @__PURE__ */ i("div", { className: a.tagsList, children: n.map((e, p) => /* @__PURE__ */ r("div", { className: a.tagItem, children: [
30
- e.icon && /* @__PURE__ */ i("div", { className: a.iconWrapper, children: /* @__PURE__ */ i(f, { name: e.icon, className: a.icon }) }),
31
- /* @__PURE__ */ r("div", { className: a.tagText, children: [
32
- /* @__PURE__ */ i(s, { className: a.tagLabel, as: "p", defaultVariant: "headingXs", children: e.label }),
33
- e.description && /* @__PURE__ */ i(s, { className: a.tagDescription, as: "p", defaultVariant: "bodyMd", children: e.description })
34
- ] })
35
- ] }, p)) }),
36
- t && /* @__PURE__ */ i("div", { className: a.callbackButton, children: /* @__PURE__ */ i(v, { href: t.link, as: "a", analyticsProps: m, size: "lg", variant: d, children: t.label }) }),
37
- /* @__PURE__ */ i("img", { src: o, alt: "Your Protocol", className: a.image })
18
+ };
19
+ return /* @__PURE__ */ r("section", { className: o.root, children: /* @__PURE__ */ m("div", { className: o.container, children: [
20
+ /* @__PURE__ */ m("div", { className: o.content, children: [
21
+ /* @__PURE__ */ r(
22
+ f,
23
+ {
24
+ title: a,
25
+ className: o.title,
26
+ defaultVariant: "displaySm",
27
+ mobileVariant: "headingXl"
28
+ }
29
+ ),
30
+ /* @__PURE__ */ r(u, { tags: d }),
31
+ t && /* @__PURE__ */ r("div", { className: o.callback, children: /* @__PURE__ */ r(
32
+ y,
33
+ {
34
+ title: t.title,
35
+ description: (i = t.description) != null ? i : "",
36
+ price: (s = t.price) != null ? s : "",
37
+ image: t.image,
38
+ button: {
39
+ href: (n = t.signupUrl) != null ? n : "",
40
+ as: "a",
41
+ analyticsProps: l
42
+ },
43
+ size: "sm",
44
+ shape: t.shape
45
+ }
46
+ ) })
47
+ ] }),
48
+ /* @__PURE__ */ r("img", { src: p, alt: "Your Protocol", className: c(o.image, o.desktop), width: 481 })
38
49
  ] }) });
39
50
  };
40
51
  export {
41
- P as YourProtocol
52
+ Y as YourProtocol
42
53
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),i=require("../../../../utils/cn/cn.cjs.js"),c=require("../../../../src/modules/YourProtocol/components/ProtocolTags/protocolTags.module.css"),p=require("../../../../components/Tag/Tag.cjs.js"),t=require("../../../../components/Typography/Typography.cjs.js"),m=({tags:o})=>{var n;const[a,d]=r.useState(((n=o[0])==null?void 0:n.label)||null),l=r.useMemo(()=>{var e;return(e=o.find(u=>u.label===a))==null?void 0:e.description},[a,o]);return s.jsxs("div",{className:c.root,children:[s.jsx("div",{className:c.tags,children:o.map(e=>s.jsx(p.Tag,{value:e.label,size:"md",active:e.label===a,onClick:d,children:e.label},e.label))}),l&&s.jsxs(s.Fragment,{children:[s.jsx(t.Typography,{as:"p",defaultVariant:"bodyLg",className:i.cn(c.description,c.desktop),children:l}),s.jsx(t.Typography,{as:"p",defaultVariant:"bodyMd",className:i.cn(c.description,c.mobile),children:l})]})]})};exports.ProtocolTags=m;
@@ -0,0 +1,7 @@
1
+ import { TTagView } from '../../types';
2
+
3
+ type Props = {
4
+ tags: Array<TTagView>;
5
+ };
6
+ export declare const ProtocolTags: ({ tags }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsxs as t, jsx as o, Fragment as p } from "react/jsx-runtime";
3
+ import { useState as b, useMemo as f } from "react";
4
+ import { cn as c } from "../../../../utils/cn/cn.es.js";
5
+ import l from "../../../../modules/YourProtocol/components/ProtocolTags/protocolTags.module.css";
6
+ import { Tag as u } from "../../../../components/Tag/Tag.es.js";
7
+ import { Typography as n } from "../../../../components/Typography/Typography.es.js";
8
+ const V = ({ tags: i }) => {
9
+ var s;
10
+ const [r, m] = b(((s = i[0]) == null ? void 0 : s.label) || null), a = f(
11
+ () => {
12
+ var e;
13
+ return (e = i.find((d) => d.label === r)) == null ? void 0 : e.description;
14
+ },
15
+ [r, i]
16
+ );
17
+ return /* @__PURE__ */ t("div", { className: l.root, children: [
18
+ /* @__PURE__ */ o("div", { className: l.tags, children: i.map((e) => /* @__PURE__ */ o(
19
+ u,
20
+ {
21
+ value: e.label,
22
+ size: "md",
23
+ active: e.label === r,
24
+ onClick: m,
25
+ children: e.label
26
+ },
27
+ e.label
28
+ )) }),
29
+ a && /* @__PURE__ */ t(p, { children: [
30
+ /* @__PURE__ */ o(n, { as: "p", defaultVariant: "bodyLg", className: c(l.description, l.desktop), children: a }),
31
+ /* @__PURE__ */ o(n, { as: "p", defaultVariant: "bodyMd", className: c(l.description, l.mobile), children: a })
32
+ ] })
33
+ ] });
34
+ };
35
+ export {
36
+ V as ProtocolTags
37
+ };
@@ -0,0 +1 @@
1
+ export { ProtocolTags } from './ProtocolTags';
@@ -0,0 +1,37 @@
1
+ .root {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--spacing-32);
5
+ max-width: 100%;
6
+ }
7
+
8
+ .tags {
9
+ display: flex;
10
+ gap: var(--spacing-8);
11
+ flex-wrap: nowrap;
12
+ overflow-x: auto;
13
+ scrollbar-width: none;
14
+
15
+ &::-webkit-scrollbar {
16
+ display: none;
17
+ }
18
+ }
19
+
20
+ .mobile {
21
+ display: none;
22
+ }
23
+
24
+ @media screen and (width <= 768px) {
25
+ .root {
26
+ margin-top: var(--spacing-20);
27
+ gap: var(--spacing-16);
28
+ }
29
+
30
+ .mobile {
31
+ display: block;
32
+ }
33
+
34
+ .desktop {
35
+ display: none;
36
+ }
37
+ }
@@ -1,7 +1,16 @@
1
- import { EIconName } from '../../components/Icon/constants';
1
+ import { CallbackShape } from '../../components/Callback';
2
2
 
3
3
  export type TTagView = {
4
4
  label: string;
5
5
  description?: string;
6
- icon?: EIconName;
6
+ };
7
+ export type TCallbackView = {
8
+ title: string;
9
+ description?: string;
10
+ price: string | null;
11
+ signupUrl?: string;
12
+ image: string;
13
+ buttonLabel: string;
14
+ size: string;
15
+ shape: CallbackShape;
7
16
  };
@@ -1,168 +1,98 @@
1
1
  .root {
2
- width: 100%;
3
2
  display: flex;
4
- justify-content: center;
3
+ width: 100%;
5
4
  align-items: center;
6
- }
7
-
8
- .root[data-scheme='dark'] {
9
- background-color: var(--color-bg-base-dark);
5
+ justify-content: center;
10
6
  }
11
7
 
12
8
  .container {
13
9
  width: 100%;
14
- display: grid;
15
- grid-template-columns: 1fr auto;
16
- grid-template-rows: auto auto auto;
17
- gap: 32px;
18
- padding: 70px 120px;
10
+ min-width: 0;
19
11
  max-width: var(--content-max-width);
20
- align-items: start;
21
- }
22
-
23
- .title {
24
- grid-column: 1;
25
- grid-row: 1;
26
- }
27
-
28
- .tagsList {
29
- grid-column: 1;
30
- grid-row: 2;
31
- display: flex;
32
- flex-direction: column;
33
- }
34
-
35
- .callbackButton {
36
- grid-column: 1;
37
- grid-row: 3;
38
- }
39
-
40
- .image {
41
- grid-column: 2;
42
- grid-row: 1 / 4;
43
- width: 477px;
44
- height: 636px;
45
- object-fit: cover;
46
- border-radius: 19px;
47
- }
48
-
49
- .title,
50
- .tagsList,
51
- .callbackButton {
52
- width: 100%;
53
- max-width: 627px;
54
- }
55
-
56
- .tagItem {
57
- padding: 16px 0;
58
12
  display: flex;
59
- gap: 16px;
60
- border-bottom: 1px solid var(--border-color-light);
61
- }
62
-
63
- .root[data-scheme='dark'] .tagItem {
64
- border-bottom: 1px solid var(--border-color-alpha-white-10);
65
- }
66
-
67
- .tagItem:last-child {
68
- border-bottom: none;
13
+ justify-content: center;
14
+ align-items: flex-start;
15
+ gap: var(--spacing-96);
16
+ padding: var(--spacing-120);
17
+ box-sizing: border-box;
69
18
  }
70
19
 
71
- .tagText {
20
+ .content {
72
21
  display: flex;
22
+ width: 623px;
23
+ min-width: 0;
73
24
  flex-direction: column;
74
- align-items: flex-start;
75
- gap: 8px;
76
- }
77
-
78
- .tagLabel {
79
- color: var(--color-text-primary);
25
+ gap: var(--spacing-32);
26
+ flex: 1 0 0;
80
27
  }
81
28
 
82
- .tagDescription {
83
- color: var(--color-text-secondary);
29
+ .title {
30
+ margin: 80px 0 0;
31
+ max-width: 623px;
84
32
  }
85
33
 
86
- /* Dark mode overrides */
87
- .root[data-scheme='dark'] .tagLabel {
88
- color: var(--color-text-primary-inverted);
34
+ .image {
35
+ flex-shrink: 1;
36
+ width: 481px;
37
+ border-radius: var(--border-radius-lg);
89
38
  }
90
39
 
91
- .root[data-scheme='dark'] .tagDescription {
92
- color: var(--color-text-secondary-inverted);
40
+ .mobile {
41
+ display: none;
93
42
  }
94
43
 
95
- .iconWrapper {
96
- display: flex;
97
- width: 52px;
98
- height: 52px;
99
- padding: 12px;
100
- border-radius: 7.8px;
101
- background: var(--Gradient-01, linear-gradient(93deg, #81b1e2 8.06%, #2666a6 160.95%));
102
- }
44
+ @media screen and (width <= 1300px) {
45
+ .container {
46
+ gap: var(--spacing-64);
47
+ padding: var(--spacing-64) var(--spacing-20);
48
+ }
103
49
 
104
- .root[data-scheme='dark'] .iconWrapper {
105
- background:
106
- linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 100%),
107
- var(--Background-fill-neutral-dark, #1a1a1a);
108
- }
50
+ .content {
51
+ width: 500px;
52
+ }
109
53
 
110
- .icon {
111
- width: 28px;
112
- height: 28px;
113
- color: var(--color-white);
54
+ .image {
55
+ width: auto;
56
+ height: 440px;
57
+ }
114
58
  }
115
59
 
116
- @media (max-width: 1300px) {
60
+ @media screen and (width <= 1024px) {
117
61
  .container {
118
62
  grid-template-columns: 1fr;
119
- grid-template-rows: auto auto auto auto;
120
- padding: 64px 17px;
63
+ padding: var(--spacing-64) var(--spacing-20);
121
64
  }
122
65
 
123
- .title {
124
- grid-column: 1;
125
- grid-row: 1;
126
- max-width: 685px;
127
- }
128
-
129
- .image {
130
- grid-column: 1;
131
- grid-row: 2;
66
+ .content {
132
67
  width: 100%;
133
- height: 350px;
68
+ align-items: center;
134
69
  }
135
70
 
136
- .tagsList {
137
- grid-column: 1;
138
- grid-row: 3;
71
+ .title {
72
+ margin: 0;
73
+ text-align: center;
139
74
  }
140
75
 
141
- .tagsList,
142
- .callbackButton {
143
- max-width: unset;
76
+ .content {
77
+ gap: 16px;
144
78
  }
145
79
 
146
- .callbackButton {
147
- grid-column: 1;
148
- grid-row: 4;
80
+ .callback {
81
+ margin-top: var(--spacing-48);
149
82
  }
150
- }
151
83
 
152
- @media (max-width: 768px) {
153
- .container {
154
- gap: 20px;
84
+ .mobile {
85
+ display: block;
155
86
  }
156
87
 
157
- .tagItem {
158
- padding: 24px 0;
159
- }
160
-
161
- .image {
162
- height: 240px;
88
+ .desktop {
89
+ display: none;
163
90
  }
91
+ }
164
92
 
165
- .title {
166
- max-width: 335px;
93
+ @media screen and (width <= 768px) {
94
+ .callback {
95
+ max-width: 513px;
96
+ width: 100%;
167
97
  }
168
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.2.39",
3
+ "version": "0.2.40",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",