@zenpatient-org/healthspan-marketing-ui 0.2.39 → 0.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PriceDisplay/PriceDisplay.cjs.js +1 -1
- package/dist/components/PriceDisplay/PriceDisplay.d.ts +0 -1
- package/dist/components/PriceDisplay/PriceDisplay.es.js +46 -41
- package/dist/modules/FeaturedIn/FeaturedIn.cjs.js +1 -1
- package/dist/modules/FeaturedIn/FeaturedIn.d.ts +6 -1
- package/dist/modules/FeaturedIn/FeaturedIn.es.js +48 -40
- package/dist/modules/FeaturedIn/featuredIn.module.css +40 -6
- package/dist/modules/IndividualProductCard/components/Features/Features.cjs.js +1 -1
- package/dist/modules/IndividualProductCard/components/Features/Features.es.js +31 -30
- package/dist/modules/IndividualProductCard/components/Features/features.module.css +2 -2
- package/dist/modules/IndividualProductCardV2/IndividualProductCardV2.cjs.js +1 -1
- package/dist/modules/IndividualProductCardV2/IndividualProductCardV2.d.ts +2 -2
- package/dist/modules/IndividualProductCardV2/IndividualProductCardV2.es.js +85 -55
- package/dist/modules/IndividualProductCardV2/individualProductCardV2.module.css +16 -0
- package/dist/modules/IndividualProductCardV2/types.d.ts +16 -8
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../Typography/Typography.cjs.js"),e=require("../../src/components/PriceDisplay/priceDisplay.module.css"),l=require("../../utils/cn/cn.cjs.js"),o=require("../../utils/periodView.cjs.js"),c=({items:i})=>{if(!i||i.length===0)return null;const n=i.length>1?"double":"single";return r.jsx("div",{className:e.root,children:i.map(a=>r.jsxs("div",{className:l.cn(e.container,n==="double"?e.double:e.single),children:[r.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",className:e.description,children:a.description}),r.jsxs("div",{className:e.priceWrapper,children:[!!a.prefix&&r.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",className:e.prefix,children:a.prefix}),r.jsxs("div",{className:e.priceAmount,children:[r.jsx(s.Typography,{as:"p",defaultVariant:"headingXl",mobileVariant:"headingLg",className:e.price,children:(a.price/100).toFixed(0)}),r.jsx(s.Typography,{as:"p",defaultVariant:"headingXs",mobileVariant:"headingXxs",className:e.currency,children:"$"}),a.period!=="none"&&r.jsxs(s.Typography,{as:"p",defaultVariant:"labelMd",className:e.period,children:["/",o.shortPeriod(a.period)]})]})]})]},a.description))})};exports.PriceDisplay=c;
|
|
@@ -1,47 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { Typography as i } from "../Typography/Typography.es.js";
|
|
3
|
-
import
|
|
4
|
-
import { cn as
|
|
5
|
-
import { shortPeriod as
|
|
6
|
-
const f = ({ items:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
3
|
+
import e from "../../components/PriceDisplay/priceDisplay.module.css";
|
|
4
|
+
import { cn as d } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import { shortPeriod as s } from "../../utils/periodView.es.js";
|
|
6
|
+
const f = ({ items: l }) => {
|
|
7
|
+
if (!l || l.length === 0)
|
|
8
|
+
return null;
|
|
9
|
+
const o = l.length > 1 ? "double" : "single";
|
|
10
|
+
return /* @__PURE__ */ a("div", { className: e.root, children: l.map((r) => /* @__PURE__ */ n(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: d(e.container, o === "double" ? e.double : e.single),
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ a(i, { as: "p", defaultVariant: "bodySm", className: e.description, children: r.description }),
|
|
16
|
+
/* @__PURE__ */ n("div", { className: e.priceWrapper, children: [
|
|
17
|
+
!!r.prefix && /* @__PURE__ */ a(i, { as: "p", defaultVariant: "bodySm", className: e.prefix, children: r.prefix }),
|
|
18
|
+
/* @__PURE__ */ n("div", { className: e.priceAmount, children: [
|
|
19
|
+
/* @__PURE__ */ a(
|
|
20
|
+
i,
|
|
21
|
+
{
|
|
22
|
+
as: "p",
|
|
23
|
+
defaultVariant: "headingXl",
|
|
24
|
+
mobileVariant: "headingLg",
|
|
25
|
+
className: e.price,
|
|
26
|
+
children: (r.price / 100).toFixed(0)
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ a(
|
|
30
|
+
i,
|
|
31
|
+
{
|
|
32
|
+
as: "p",
|
|
33
|
+
defaultVariant: "headingXs",
|
|
34
|
+
mobileVariant: "headingXxs",
|
|
35
|
+
className: e.currency,
|
|
36
|
+
children: "$"
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
r.period !== "none" && /* @__PURE__ */ n(i, { as: "p", defaultVariant: "labelMd", className: e.period, children: [
|
|
40
|
+
"/",
|
|
41
|
+
s(r.period)
|
|
42
|
+
] })
|
|
38
43
|
] })
|
|
39
44
|
] })
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
r.description
|
|
48
|
+
)) });
|
|
49
|
+
};
|
|
45
50
|
export {
|
|
46
51
|
f as PriceDisplay
|
|
47
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),
|
|
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
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { cn as
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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:
|
|
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(${
|
|
16
|
+
children: /* @__PURE__ */ t("div", { className: e.mediaFeaturedInImage, style: { backgroundImage: `url(${a})` } })
|
|
17
17
|
},
|
|
18
|
-
`${
|
|
18
|
+
`${o}_${s}`
|
|
19
19
|
)) });
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */ t("p",
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
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
|
-
|
|
51
|
+
p,
|
|
44
52
|
{
|
|
45
|
-
items:
|
|
53
|
+
items: o,
|
|
46
54
|
contentClassName: e.content,
|
|
47
55
|
itemClassName: e.item,
|
|
48
56
|
rootClassName: e.scrollRoot,
|
|
49
|
-
renderItem: (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
] },
|
|
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
|
-
|
|
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
|
-
.
|
|
10
|
-
|
|
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
|
-
.
|
|
14
|
-
|
|
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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("react"),y=require("../../../../utils/cn/cn.cjs.js"),t=require("../../../../src/modules/IndividualProductCard/components/Features/features.module.css"),g=require("../../../../components/TypeBadge/TypeBadge.cjs.js"),l=require("../../../../components/Typography/Typography.cjs.js"),a=require("../../../../components/Superscript/Superscript.cjs.js"),m=require("../../../../components/IconBracket/IconBracket.cjs.js"),S=({features:p})=>{const[i,u]=o.useState([]),d=o.useCallback(e=>{u(r=>r.includes(e)?r.filter(c=>c!==e):[...r,e])},[]);return s.jsx("div",{className:t.root,children:p.map((e,r)=>{const c=e.description&&e.collapsible,b=!!e.description,n=s.jsxs("div",{className:t.labelWrapper,children:[s.jsx(g.TypeBadge,{type:e.type},r),s.jsxs(l.Typography,{className:t.label,as:"span",defaultVariant:"bodyMd",mobileVariant:"bodySm",weight:"regular",children:[e.label,e.labelSuperscript&&!isNaN(e.labelSuperscript)&&s.jsx(a.Superscript,{value:e.labelSuperscript.toString()})]})]});return s.jsxs("div",{className:t.feature,children:[c?s.jsxs("button",{className:t.header,onClick:()=>d(r),children:[n,s.jsx(m.IconBracket,{variant:i.includes(r)?"close":"plus",size:"md"})]}):n,b&&s.jsxs(l.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodyXs",className:y.cn(t.description,{[t.descriptionActive]:i.includes(r)||!c}),weight:"regular",children:[e.description,e.descriptionSuperscript&&!isNaN(e.descriptionSuperscript)&&s.jsx(a.Superscript,{value:e.descriptionSuperscript.toString()})]})]},`${e.label}-${r}`)})})};exports.Features=S;
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
3
3
|
import { useState as u, useCallback as g } from "react";
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
import { TypeBadge as
|
|
4
|
+
import { cn as S } from "../../../../utils/cn/cn.es.js";
|
|
5
|
+
import s from "../../../../modules/IndividualProductCard/components/Features/features.module.css";
|
|
6
|
+
import { TypeBadge as h } from "../../../../components/TypeBadge/TypeBadge.es.js";
|
|
7
7
|
import { Typography as a } from "../../../../components/Typography/Typography.es.js";
|
|
8
|
-
import { Superscript as
|
|
8
|
+
import { Superscript as p } from "../../../../components/Superscript/Superscript.es.js";
|
|
9
9
|
import { IconBracket as y } from "../../../../components/IconBracket/IconBracket.es.js";
|
|
10
|
-
const w = ({ features:
|
|
11
|
-
const [
|
|
12
|
-
|
|
10
|
+
const w = ({ features: n }) => {
|
|
11
|
+
const [o, m] = u([]), d = g((i) => {
|
|
12
|
+
m((r) => r.includes(i) ? r.filter((l) => l !== i) : [...r, i]);
|
|
13
13
|
}, []);
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
const
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ t("div", { className: s.root, children: n.map((i, r) => {
|
|
15
|
+
const l = i.description && i.collapsible, b = !!i.description, c = /* @__PURE__ */ e("div", { className: s.labelWrapper, children: [
|
|
16
|
+
/* @__PURE__ */ t(h, { type: i.type }, r),
|
|
17
|
+
/* @__PURE__ */ e(
|
|
18
18
|
a,
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
21
|
-
as: "
|
|
22
|
-
defaultVariant:
|
|
23
|
-
mobileVariant:
|
|
20
|
+
className: s.label,
|
|
21
|
+
as: "span",
|
|
22
|
+
defaultVariant: "bodyMd",
|
|
23
|
+
mobileVariant: "bodySm",
|
|
24
24
|
weight: "regular",
|
|
25
25
|
children: [
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
i.label,
|
|
27
|
+
i.labelSuperscript && !isNaN(i.labelSuperscript) && /* @__PURE__ */ t(p, { value: i.labelSuperscript.toString() })
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
] });
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
] }) :
|
|
37
|
-
|
|
32
|
+
return /* @__PURE__ */ e("div", { className: s.feature, children: [
|
|
33
|
+
l ? /* @__PURE__ */ e("button", { className: s.header, onClick: () => d(r), children: [
|
|
34
|
+
c,
|
|
35
|
+
/* @__PURE__ */ t(y, { variant: o.includes(r) ? "close" : "plus", size: "md" })
|
|
36
|
+
] }) : c,
|
|
37
|
+
b && /* @__PURE__ */ e(
|
|
38
38
|
a,
|
|
39
39
|
{
|
|
40
40
|
as: "p",
|
|
41
|
-
defaultVariant: "
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
defaultVariant: "bodySm",
|
|
42
|
+
mobileVariant: "bodyXs",
|
|
43
|
+
className: S(s.description, {
|
|
44
|
+
[s.descriptionActive]: o.includes(r) || !l
|
|
44
45
|
}),
|
|
45
46
|
weight: "regular",
|
|
46
47
|
children: [
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
i.description,
|
|
49
|
+
i.descriptionSuperscript && !isNaN(i.descriptionSuperscript) && /* @__PURE__ */ t(p, { value: i.descriptionSuperscript.toString() })
|
|
49
50
|
]
|
|
50
51
|
}
|
|
51
52
|
)
|
|
52
|
-
] }, `${
|
|
53
|
+
] }, `${i.label}-${r}`);
|
|
53
54
|
}) });
|
|
54
55
|
};
|
|
55
56
|
export {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
align-items: center;
|
|
25
25
|
justify-content: space-between;
|
|
26
26
|
padding: 0;
|
|
27
|
-
gap:
|
|
27
|
+
gap: 8px;
|
|
28
28
|
border: none;
|
|
29
29
|
background: none;
|
|
30
30
|
box-shadow: none;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.descriptionActive {
|
|
62
|
-
margin-top:
|
|
62
|
+
margin-top: 8px;
|
|
63
63
|
line-height: var(--line-height-lg);
|
|
64
64
|
color: var(--color-text-secondary);
|
|
65
65
|
}
|
|
@@ -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"),d=require("../../types/analytics/analytics.cjs.js"),P=require("../../utils/cn/cn.cjs.js"),i=require("../../src/modules/IndividualProductCardV2/individualProductCardV2.module.css"),G=require("../../components/ImageGallery/ImageGallery.cjs.js"),_=require("../../components/RatingPreview/RatingPreview.cjs.js"),u=require("../../components/Typography/Typography.cjs.js"),I=require("../IndividualProductCard/components/Features/Features.cjs.js"),D=require("../../components/PlainFeaturesGroup/PlainFeaturesGroup.cjs.js"),V=require("../../components/PriceDisplay/PriceDisplay.cjs.js"),F=require("../IndividualProductCard/components/PlanCard/PlanCard.cjs.js"),k=require("../../components/Button/Button.cjs.js"),R=require("../../components/Quote/Quote.cjs.js"),B=t=>{const{zenpatientId:p,signupUrl:c,name:S,description:q,label:f,images:N,features:T,quote:y,featuresGroup:m,ratingPreview:v,view:r,button:a}=t,n=r==="plans_list"?t.plans:void 0,E=n&&n.length>0,h=r==="plans_list"?t.selectedPlanId:void 0,o=n==null?void 0:n.find(s=>s.id===h),g=o?`${(a==null?void 0:a.link)||c}?defaultDurationSelection=${o==null?void 0:o.durationAmount}`:(a==null?void 0:a.link)||c,x=r==="pricing_display"?t.priceDisplay:void 0,C={event:d.EAnalyticsEvent.ctaClicked,type:d.EAnalyticsEventType.interaction,component:"Pricing",payload:{ctaLabel:(a==null?void 0:a.text)||"GET STARTED",ctaLink:g||c,productId:p}},A=s=>{var j;if(r!=="plans_list"||!t.onSelectPlan)return;t.onSelectPlan(s);const l=n==null?void 0:n.find(w=>w.id===s),b={event:d.EAnalyticsEvent.userSelectedPlan,location:"IPCv2",type:d.EAnalyticsEventType.interaction,payload:{productId:p,planId:s,planPrice:l==null?void 0:l.price,planDuration:l==null?void 0:l.duration}};(j=window.eventBus)==null||j.emit("analytics",b)};return e.jsx("section",{className:i.root,children:e.jsxs("div",{className:i.mainContainer,children:[e.jsxs("div",{className:i.leftColumn,children:[e.jsx(G.ImageGallery,{images:N,label:f}),e.jsx("div",{className:P.cn(i.ratingContainer,i.mobileOnly),children:e.jsx(_.RatingPreview,{...v})}),y&&e.jsx("div",{className:i.quoteWrapper,children:e.jsx(R.Quote,{...y})})]}),e.jsxs("div",{className:i.rightColumn,children:[e.jsxs("div",{className:i.header,children:[e.jsx(u.Typography,{as:"h1",defaultVariant:"displayXs",mobileVariant:"headingLg",children:S}),e.jsx(u.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:i.description,children:q})]}),e.jsx(I.Features,{features:T}),m&&e.jsx(D.PlainFeaturesGroup,{...m}),r==="pricing_display"&&x&&e.jsx(V.PriceDisplay,{items:x}),r==="plans_list"&&E&&e.jsx("div",{className:i.plansSection,children:e.jsxs("div",{className:i.plans,children:[e.jsx(u.Typography,{as:"h4",defaultVariant:"labelSm",emphasis:!0,weight:"regular",children:"Subscribe & Save"}),n.map(s=>e.jsx(F.PlanCard,{plan:s,onSelect:A,isActive:h===s.id},s.id))]})}),e.jsx("div",{className:P.cn(i.ratingContainer,i.desktopOnly),children:e.jsx(_.RatingPreview,{...v})}),e.jsxs("div",{className:i.actions,children:[e.jsx(k.Button,{as:"a",variant:"primary",size:"lg",href:g||c,analyticsProps:C,children:(a==null?void 0:a.text)||"Get started"}),e.jsx(u.Typography,{as:"p",defaultVariant:"labelMd",className:i.hsaFsaText,children:"HSA/FSA Eligible"})]})]})]})})};exports.IndividualProductCardV2=B;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TIndividualProductCardV2View } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const IndividualProductCardV2: (
|
|
3
|
+
export declare const IndividualProductCardV2: (props: TIndividualProductCardV2View) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,79 +1,109 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { EAnalyticsEventType as
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
5
|
-
import { ImageGallery as
|
|
6
|
-
import { RatingPreview as
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { Features as
|
|
9
|
-
import { PlainFeaturesGroup as
|
|
10
|
-
import { PriceDisplay as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { jsx as i, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { EAnalyticsEventType as S, EAnalyticsEvent as N } from "../../types/analytics/analytics.es.js";
|
|
3
|
+
import { cn as C } from "../../utils/cn/cn.es.js";
|
|
4
|
+
import e from "../../modules/IndividualProductCardV2/individualProductCardV2.module.css";
|
|
5
|
+
import { ImageGallery as G } from "../../components/ImageGallery/ImageGallery.es.js";
|
|
6
|
+
import { RatingPreview as A } from "../../components/RatingPreview/RatingPreview.es.js";
|
|
7
|
+
import { Typography as m } from "../../components/Typography/Typography.es.js";
|
|
8
|
+
import { Features as F } from "../IndividualProductCard/components/Features/Features.es.js";
|
|
9
|
+
import { PlainFeaturesGroup as L } from "../../components/PlainFeaturesGroup/PlainFeaturesGroup.es.js";
|
|
10
|
+
import { PriceDisplay as j } from "../../components/PriceDisplay/PriceDisplay.es.js";
|
|
11
|
+
import { PlanCard as q } from "../IndividualProductCard/components/PlanCard/PlanCard.es.js";
|
|
12
|
+
import { Button as z } from "../../components/Button/Button.es.js";
|
|
13
|
+
import { Quote as B } from "../../components/Quote/Quote.es.js";
|
|
14
|
+
const ii = (r) => {
|
|
15
|
+
const {
|
|
16
|
+
zenpatientId: p,
|
|
17
|
+
signupUrl: c,
|
|
18
|
+
name: E,
|
|
19
|
+
description: b,
|
|
20
|
+
label: V,
|
|
21
|
+
images: k,
|
|
22
|
+
features: w,
|
|
23
|
+
quote: h,
|
|
24
|
+
featuresGroup: u,
|
|
25
|
+
ratingPreview: v,
|
|
26
|
+
view: l,
|
|
27
|
+
button: a
|
|
28
|
+
} = r, t = l === "plans_list" ? r.plans : void 0, x = t && t.length > 0, f = l === "plans_list" ? r.selectedPlanId : void 0, d = t == null ? void 0 : t.find((n) => n.id === f), y = d ? `${(a == null ? void 0 : a.link) || c}?defaultDurationSelection=${d == null ? void 0 : d.durationAmount}` : (a == null ? void 0 : a.link) || c, g = l === "pricing_display" ? r.priceDisplay : void 0, D = {
|
|
29
|
+
event: N.ctaClicked,
|
|
30
|
+
type: S.interaction,
|
|
29
31
|
component: "Pricing",
|
|
30
32
|
payload: {
|
|
31
|
-
ctaLabel: "GET STARTED",
|
|
32
|
-
ctaLink:
|
|
33
|
-
productId:
|
|
33
|
+
ctaLabel: (a == null ? void 0 : a.text) || "GET STARTED",
|
|
34
|
+
ctaLink: y || c,
|
|
35
|
+
productId: p
|
|
34
36
|
}
|
|
37
|
+
}, I = (n) => {
|
|
38
|
+
var P;
|
|
39
|
+
if (l !== "plans_list" || !r.onSelectPlan) return;
|
|
40
|
+
r.onSelectPlan(n);
|
|
41
|
+
const s = t == null ? void 0 : t.find((_) => _.id === n), T = {
|
|
42
|
+
event: N.userSelectedPlan,
|
|
43
|
+
location: "IPCv2",
|
|
44
|
+
type: S.interaction,
|
|
45
|
+
payload: {
|
|
46
|
+
productId: p,
|
|
47
|
+
planId: n,
|
|
48
|
+
planPrice: s == null ? void 0 : s.price,
|
|
49
|
+
planDuration: s == null ? void 0 : s.duration
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
(P = window.eventBus) == null || P.emit("analytics", T);
|
|
35
53
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
54
|
+
return /* @__PURE__ */ i("section", { className: e.root, children: /* @__PURE__ */ o("div", { className: e.mainContainer, children: [
|
|
55
|
+
/* @__PURE__ */ o("div", { className: e.leftColumn, children: [
|
|
56
|
+
/* @__PURE__ */ i(G, { images: k, label: V }),
|
|
57
|
+
/* @__PURE__ */ i("div", { className: C(e.ratingContainer, e.mobileOnly), children: /* @__PURE__ */ i(A, { ...v }) }),
|
|
58
|
+
h && /* @__PURE__ */ i("div", { className: e.quoteWrapper, children: /* @__PURE__ */ i(B, { ...h }) })
|
|
41
59
|
] }),
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
60
|
+
/* @__PURE__ */ o("div", { className: e.rightColumn, children: [
|
|
61
|
+
/* @__PURE__ */ o("div", { className: e.header, children: [
|
|
62
|
+
/* @__PURE__ */ i(m, { as: "h1", defaultVariant: "displayXs", mobileVariant: "headingLg", children: E }),
|
|
63
|
+
/* @__PURE__ */ i(
|
|
64
|
+
m,
|
|
47
65
|
{
|
|
48
66
|
as: "p",
|
|
49
67
|
defaultVariant: "bodyMd",
|
|
50
68
|
mobileVariant: "bodySm",
|
|
51
|
-
className:
|
|
52
|
-
children:
|
|
69
|
+
className: e.description,
|
|
70
|
+
children: b
|
|
53
71
|
}
|
|
54
72
|
)
|
|
55
73
|
] }),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
74
|
+
/* @__PURE__ */ i(F, { features: w }),
|
|
75
|
+
u && /* @__PURE__ */ i(L, { ...u }),
|
|
76
|
+
l === "pricing_display" && g && /* @__PURE__ */ i(j, { items: g }),
|
|
77
|
+
l === "plans_list" && x && /* @__PURE__ */ i("div", { className: e.plansSection, children: /* @__PURE__ */ o("div", { className: e.plans, children: [
|
|
78
|
+
/* @__PURE__ */ i(m, { as: "h4", defaultVariant: "labelSm", emphasis: !0, weight: "regular", children: "Subscribe & Save" }),
|
|
79
|
+
t.map((n) => /* @__PURE__ */ i(
|
|
80
|
+
q,
|
|
81
|
+
{
|
|
82
|
+
plan: n,
|
|
83
|
+
onSelect: I,
|
|
84
|
+
isActive: f === n.id
|
|
85
|
+
},
|
|
86
|
+
n.id
|
|
87
|
+
))
|
|
88
|
+
] }) }),
|
|
89
|
+
/* @__PURE__ */ i("div", { className: C(e.ratingContainer, e.desktopOnly), children: /* @__PURE__ */ i(A, { ...v }) }),
|
|
90
|
+
/* @__PURE__ */ o("div", { className: e.actions, children: [
|
|
91
|
+
/* @__PURE__ */ i(
|
|
92
|
+
z,
|
|
63
93
|
{
|
|
64
94
|
as: "a",
|
|
65
95
|
variant: "primary",
|
|
66
96
|
size: "lg",
|
|
67
|
-
href:
|
|
68
|
-
analyticsProps:
|
|
69
|
-
children: "Get started"
|
|
97
|
+
href: y || c,
|
|
98
|
+
analyticsProps: D,
|
|
99
|
+
children: (a == null ? void 0 : a.text) || "Get started"
|
|
70
100
|
}
|
|
71
101
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ i(m, { as: "p", defaultVariant: "labelMd", className: e.hsaFsaText, children: "HSA/FSA Eligible" })
|
|
73
103
|
] })
|
|
74
104
|
] })
|
|
75
105
|
] }) });
|
|
76
106
|
};
|
|
77
107
|
export {
|
|
78
|
-
|
|
108
|
+
ii as IndividualProductCardV2
|
|
79
109
|
};
|
|
@@ -77,6 +77,22 @@
|
|
|
77
77
|
border-radius: var(--border-radius-xs);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
.plansSection {
|
|
81
|
+
grid-area: plans;
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: 24px;
|
|
85
|
+
padding-top: 12px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.plans {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
width: 100%;
|
|
92
|
+
gap: 12px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
80
96
|
@media (width <= 1024px) {
|
|
81
97
|
.mainContainer {
|
|
82
98
|
padding: 2rem 1rem;
|
|
@@ -24,7 +24,6 @@ export type TPriceDisplayComponentView = {
|
|
|
24
24
|
price: number;
|
|
25
25
|
period: 'none' | 'month' | 'quarter' | 'year';
|
|
26
26
|
prefix?: string;
|
|
27
|
-
display: 'single' | 'double';
|
|
28
27
|
};
|
|
29
28
|
export type TInternalPlainFeatureItemView = {
|
|
30
29
|
text: string;
|
|
@@ -49,12 +48,25 @@ export type TIndividualProductCardV2Base = {
|
|
|
49
48
|
label?: string;
|
|
50
49
|
rating?: TReviewsStats;
|
|
51
50
|
quote?: TQuoteComponentView;
|
|
52
|
-
priceDisplay?: Array<TPriceDisplayComponentView>;
|
|
53
51
|
featuresGroup?: TPlainFeaturesGroupView;
|
|
54
52
|
ratingPreview?: TRatingPreviewView;
|
|
53
|
+
button: {
|
|
54
|
+
text: string;
|
|
55
|
+
link: string;
|
|
56
|
+
};
|
|
55
57
|
};
|
|
56
58
|
export type TIndividualProductCardBasicV2View = TIndividualProductCardV2Base & {
|
|
57
|
-
|
|
59
|
+
view?: 'basic';
|
|
60
|
+
};
|
|
61
|
+
export type TIndividualProductCardPricingV2View = TIndividualProductCardV2Base & {
|
|
62
|
+
view?: 'pricing_display';
|
|
63
|
+
priceDisplay?: Array<TPriceDisplayComponentView>;
|
|
64
|
+
};
|
|
65
|
+
export type TIndividualProductCardPlansV2View = TIndividualProductCardV2Base & {
|
|
66
|
+
view?: 'plans_list';
|
|
67
|
+
plans?: Array<TProductPlan>;
|
|
68
|
+
selectedPlanId?: string;
|
|
69
|
+
onSelectPlan?: (planId: TProductPlan['id']) => void;
|
|
58
70
|
};
|
|
59
71
|
export type TProductPlan = {
|
|
60
72
|
id: string;
|
|
@@ -67,8 +79,4 @@ export type TProductPlan = {
|
|
|
67
79
|
durationAmount?: number;
|
|
68
80
|
featured?: boolean;
|
|
69
81
|
};
|
|
70
|
-
export type
|
|
71
|
-
plansView?: 'pricing';
|
|
72
|
-
plans?: Array<TProductPlan>;
|
|
73
|
-
};
|
|
74
|
-
export type TIndividualProductCardV2View = TIndividualProductCardBasicV2View | TIndividualProductCardPricingV2View;
|
|
82
|
+
export type TIndividualProductCardV2View = TIndividualProductCardBasicV2View | TIndividualProductCardPricingV2View | TIndividualProductCardPlansV2View;
|