@zenpatient-org/healthspan-marketing-ui 0.2.38 → 0.2.39
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/modules/YourProtocol/YourProtocol.cjs.js +1 -1
- package/dist/modules/YourProtocol/YourProtocol.d.ts +8 -3
- package/dist/modules/YourProtocol/YourProtocol.es.js +33 -44
- package/dist/modules/YourProtocol/types.d.ts +2 -11
- package/dist/modules/YourProtocol/yourProtocol.module.css +124 -54
- package/package.json +1 -1
- package/dist/modules/YourProtocol/components/ProtocolTags/ProtocolTags.cjs.js +0 -1
- package/dist/modules/YourProtocol/components/ProtocolTags/ProtocolTags.d.ts +0 -7
- package/dist/modules/YourProtocol/components/ProtocolTags/ProtocolTags.es.js +0 -37
- package/dist/modules/YourProtocol/components/ProtocolTags/index.d.ts +0 -1
- package/dist/modules/YourProtocol/components/ProtocolTags/protocolTags.module.css +0 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
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,11 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TTagView } from './types';
|
|
3
|
+
import { TColorScheme } from '../../types/common';
|
|
3
4
|
|
|
4
5
|
type Props = {
|
|
5
6
|
title: ReactNode;
|
|
6
7
|
tags: Array<TTagView>;
|
|
7
|
-
|
|
8
|
+
button: {
|
|
9
|
+
label: string;
|
|
10
|
+
link: string;
|
|
11
|
+
};
|
|
8
12
|
image: string;
|
|
13
|
+
colorScheme?: TColorScheme;
|
|
9
14
|
};
|
|
10
|
-
export declare const YourProtocol: ({ title, image, tags,
|
|
15
|
+
export declare const YourProtocol: ({ title, image, tags, button, colorScheme }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
16
|
export {};
|
|
@@ -1,53 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
event: g.ctaClicked,
|
|
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,
|
|
12
11
|
type: h.interaction,
|
|
13
12
|
component: "YourProtocol",
|
|
14
13
|
element: "Callback",
|
|
15
14
|
payload: {
|
|
16
|
-
ctaLink:
|
|
15
|
+
ctaLink: t.link
|
|
17
16
|
}
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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 })
|
|
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 })
|
|
49
38
|
] }) });
|
|
50
39
|
};
|
|
51
40
|
export {
|
|
52
|
-
|
|
41
|
+
P as YourProtocol
|
|
53
42
|
};
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EIconName } from '../../components/Icon/constants';
|
|
2
2
|
|
|
3
3
|
export type TTagView = {
|
|
4
4
|
label: string;
|
|
5
5
|
description?: string;
|
|
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;
|
|
6
|
+
icon?: EIconName;
|
|
16
7
|
};
|
|
@@ -1,98 +1,168 @@
|
|
|
1
1
|
.root {
|
|
2
|
-
display: flex;
|
|
3
2
|
width: 100%;
|
|
4
|
-
|
|
3
|
+
display: flex;
|
|
5
4
|
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.root[data-scheme='dark'] {
|
|
9
|
+
background-color: var(--color-bg-base-dark);
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
.container {
|
|
9
13
|
width: 100%;
|
|
10
|
-
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: 1fr auto;
|
|
16
|
+
grid-template-rows: auto auto auto;
|
|
17
|
+
gap: 32px;
|
|
18
|
+
padding: 70px 120px;
|
|
11
19
|
max-width: var(--content-max-width);
|
|
12
|
-
|
|
13
|
-
justify-content: center;
|
|
14
|
-
align-items: flex-start;
|
|
15
|
-
gap: var(--spacing-96);
|
|
16
|
-
padding: var(--spacing-120);
|
|
17
|
-
box-sizing: border-box;
|
|
20
|
+
align-items: start;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
|
-
.
|
|
23
|
+
.title {
|
|
24
|
+
grid-column: 1;
|
|
25
|
+
grid-row: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tagsList {
|
|
29
|
+
grid-column: 1;
|
|
30
|
+
grid-row: 2;
|
|
21
31
|
display: flex;
|
|
22
|
-
width: 623px;
|
|
23
|
-
min-width: 0;
|
|
24
32
|
flex-direction: column;
|
|
25
|
-
gap: var(--spacing-32);
|
|
26
|
-
flex: 1 0 0;
|
|
27
33
|
}
|
|
28
34
|
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
.callbackButton {
|
|
36
|
+
grid-column: 1;
|
|
37
|
+
grid-row: 3;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
.image {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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;
|
|
38
54
|
}
|
|
39
55
|
|
|
40
|
-
.
|
|
41
|
-
|
|
56
|
+
.tagItem {
|
|
57
|
+
padding: 16px 0;
|
|
58
|
+
display: flex;
|
|
59
|
+
gap: 16px;
|
|
60
|
+
border-bottom: 1px solid var(--border-color-light);
|
|
42
61
|
}
|
|
43
62
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
padding: var(--spacing-64) var(--spacing-20);
|
|
48
|
-
}
|
|
63
|
+
.root[data-scheme='dark'] .tagItem {
|
|
64
|
+
border-bottom: 1px solid var(--border-color-alpha-white-10);
|
|
65
|
+
}
|
|
49
66
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
67
|
+
.tagItem:last-child {
|
|
68
|
+
border-bottom: none;
|
|
69
|
+
}
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
71
|
+
.tagText {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
gap: 8px;
|
|
58
76
|
}
|
|
59
77
|
|
|
60
|
-
|
|
78
|
+
.tagLabel {
|
|
79
|
+
color: var(--color-text-primary);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.tagDescription {
|
|
83
|
+
color: var(--color-text-secondary);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Dark mode overrides */
|
|
87
|
+
.root[data-scheme='dark'] .tagLabel {
|
|
88
|
+
color: var(--color-text-primary-inverted);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.root[data-scheme='dark'] .tagDescription {
|
|
92
|
+
color: var(--color-text-secondary-inverted);
|
|
93
|
+
}
|
|
94
|
+
|
|
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
|
+
}
|
|
103
|
+
|
|
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
|
+
}
|
|
109
|
+
|
|
110
|
+
.icon {
|
|
111
|
+
width: 28px;
|
|
112
|
+
height: 28px;
|
|
113
|
+
color: var(--color-white);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (max-width: 1300px) {
|
|
61
117
|
.container {
|
|
62
118
|
grid-template-columns: 1fr;
|
|
63
|
-
|
|
119
|
+
grid-template-rows: auto auto auto auto;
|
|
120
|
+
padding: 64px 17px;
|
|
64
121
|
}
|
|
65
122
|
|
|
66
|
-
.
|
|
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;
|
|
67
132
|
width: 100%;
|
|
68
|
-
|
|
133
|
+
height: 350px;
|
|
69
134
|
}
|
|
70
135
|
|
|
71
|
-
.
|
|
72
|
-
|
|
73
|
-
|
|
136
|
+
.tagsList {
|
|
137
|
+
grid-column: 1;
|
|
138
|
+
grid-row: 3;
|
|
74
139
|
}
|
|
75
140
|
|
|
76
|
-
.
|
|
77
|
-
|
|
141
|
+
.tagsList,
|
|
142
|
+
.callbackButton {
|
|
143
|
+
max-width: unset;
|
|
78
144
|
}
|
|
79
145
|
|
|
80
|
-
.
|
|
81
|
-
|
|
146
|
+
.callbackButton {
|
|
147
|
+
grid-column: 1;
|
|
148
|
+
grid-row: 4;
|
|
82
149
|
}
|
|
150
|
+
}
|
|
83
151
|
|
|
84
|
-
|
|
85
|
-
|
|
152
|
+
@media (max-width: 768px) {
|
|
153
|
+
.container {
|
|
154
|
+
gap: 20px;
|
|
86
155
|
}
|
|
87
156
|
|
|
88
|
-
.
|
|
89
|
-
|
|
157
|
+
.tagItem {
|
|
158
|
+
padding: 24px 0;
|
|
90
159
|
}
|
|
91
|
-
}
|
|
92
160
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
161
|
+
.image {
|
|
162
|
+
height: 240px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.title {
|
|
166
|
+
max-width: 335px;
|
|
97
167
|
}
|
|
98
168
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ProtocolTags } from './ProtocolTags';
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
}
|