@zenpatient-org/healthspan-marketing-ui 0.2.79 → 0.2.80
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/FeaturesList/FeaturesList.cjs.js +1 -0
- package/dist/components/FeaturesList/FeaturesList.d.ts +6 -0
- package/dist/{modules/IndividualProductCard/components/Features/Features.es.js → components/FeaturesList/FeaturesList.es.js} +18 -18
- package/dist/{modules/IndividualProductCard/components/Features/features.module.css → components/FeaturesList/featuresList.module.css} +1 -0
- package/dist/components/FeaturesList/index.d.ts +2 -0
- package/dist/components/FeaturesList/types.d.ts +9 -0
- package/dist/components/SmartCallout/SmartCallout.cjs.js +1 -1
- package/dist/components/SmartCallout/SmartCallout.d.ts +16 -2
- package/dist/components/SmartCallout/SmartCallout.es.js +25 -5
- package/dist/components/SmartCallout/smartCallout.module.css +27 -0
- package/dist/modules/IndividualProductCard/IndividualProductCard.cjs.js +1 -1
- package/dist/modules/IndividualProductCard/IndividualProductCard.es.js +14 -14
- package/dist/modules/IndividualProductCard/types.d.ts +2 -9
- package/dist/modules/IndividualProductCardV2/IndividualProductCardV2.cjs.js +1 -1
- package/dist/modules/IndividualProductCardV2/IndividualProductCardV2.es.js +4 -4
- package/package.json +6 -1
- package/dist/modules/IndividualProductCard/components/Features/Features.cjs.js +0 -1
- package/dist/modules/IndividualProductCard/components/Features/Features.d.ts +0 -6
- package/dist/modules/IndividualProductCard/components/Features/index.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),y=require("../../utils/cn/cn.cjs.js"),t=require("../../src/components/FeaturesList/featuresList.module.css"),g=require("../TypeBadge/TypeBadge.cjs.js"),l=require("../Typography/Typography.cjs.js"),a=require("../Superscript/Superscript.cjs.js"),m=require("../IconBracket/IconBracket.cjs.js"),S=({features:p})=>{const[c,u]=o.useState([]),d=o.useCallback(s=>{u(r=>r.includes(s)?r.filter(i=>i!==s):[...r,s])},[]);return e.jsx("div",{className:t.root,children:p.map((s,r)=>{const i=s.description&&s.collapsible,b=!!s.description,n=e.jsxs("div",{className:t.labelWrapper,children:[e.jsx(g.TypeBadge,{type:s.type},r),e.jsxs(l.Typography,{className:t.label,as:"span",defaultVariant:"bodyMd",mobileVariant:"bodySm",weight:"regular",children:[s.label,s.labelSuperscript&&!isNaN(s.labelSuperscript)&&e.jsx(a.Superscript,{value:s.labelSuperscript.toString()})]})]});return e.jsxs("div",{className:t.feature,children:[i?e.jsxs("button",{className:t.header,onClick:()=>d(r),children:[n,e.jsx(m.IconBracket,{variant:c.includes(r)?"close":"plus",size:"md"})]}):n,b&&e.jsxs(l.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodyXs",className:y.cn(t.description,{[t.descriptionActive]:c.includes(r)||!i}),weight:"regular",children:[s.description,s.descriptionSuperscript&&!isNaN(s.descriptionSuperscript)&&e.jsx(a.Superscript,{value:s.descriptionSuperscript.toString()})]})]},`${s.label}-${r}`)})})};exports.FeaturesList=S;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
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 S } from "
|
|
5
|
-
import
|
|
6
|
-
import { TypeBadge as h } from "
|
|
7
|
-
import { Typography as a } from "
|
|
8
|
-
import { Superscript as p } from "
|
|
9
|
-
import { IconBracket as y } from "
|
|
4
|
+
import { cn as S } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import r from "../../components/FeaturesList/featuresList.module.css";
|
|
6
|
+
import { TypeBadge as h } from "../TypeBadge/TypeBadge.es.js";
|
|
7
|
+
import { Typography as a } from "../Typography/Typography.es.js";
|
|
8
|
+
import { Superscript as p } from "../Superscript/Superscript.es.js";
|
|
9
|
+
import { IconBracket as y } from "../IconBracket/IconBracket.es.js";
|
|
10
10
|
const w = ({ features: n }) => {
|
|
11
11
|
const [o, m] = u([]), d = g((i) => {
|
|
12
|
-
m((
|
|
12
|
+
m((s) => s.includes(i) ? s.filter((l) => l !== i) : [...s, i]);
|
|
13
13
|
}, []);
|
|
14
|
-
return /* @__PURE__ */ t("div", { className:
|
|
15
|
-
const l = i.description && i.collapsible, b = !!i.description, c = /* @__PURE__ */ e("div", { className:
|
|
16
|
-
/* @__PURE__ */ t(h, { type: i.type },
|
|
14
|
+
return /* @__PURE__ */ t("div", { className: r.root, children: n.map((i, s) => {
|
|
15
|
+
const l = i.description && i.collapsible, b = !!i.description, c = /* @__PURE__ */ e("div", { className: r.labelWrapper, children: [
|
|
16
|
+
/* @__PURE__ */ t(h, { type: i.type }, s),
|
|
17
17
|
/* @__PURE__ */ e(
|
|
18
18
|
a,
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
20
|
+
className: r.label,
|
|
21
21
|
as: "span",
|
|
22
22
|
defaultVariant: "bodyMd",
|
|
23
23
|
mobileVariant: "bodySm",
|
|
@@ -29,10 +29,10 @@ const w = ({ features: n }) => {
|
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
] });
|
|
32
|
-
return /* @__PURE__ */ e("div", { className:
|
|
33
|
-
l ? /* @__PURE__ */ e("button", { className:
|
|
32
|
+
return /* @__PURE__ */ e("div", { className: r.feature, children: [
|
|
33
|
+
l ? /* @__PURE__ */ e("button", { className: r.header, onClick: () => d(s), children: [
|
|
34
34
|
c,
|
|
35
|
-
/* @__PURE__ */ t(y, { variant: o.includes(
|
|
35
|
+
/* @__PURE__ */ t(y, { variant: o.includes(s) ? "close" : "plus", size: "md" })
|
|
36
36
|
] }) : c,
|
|
37
37
|
b && /* @__PURE__ */ e(
|
|
38
38
|
a,
|
|
@@ -40,8 +40,8 @@ const w = ({ features: n }) => {
|
|
|
40
40
|
as: "p",
|
|
41
41
|
defaultVariant: "bodySm",
|
|
42
42
|
mobileVariant: "bodyXs",
|
|
43
|
-
className: S(
|
|
44
|
-
[
|
|
43
|
+
className: S(r.description, {
|
|
44
|
+
[r.descriptionActive]: o.includes(s) || !l
|
|
45
45
|
}),
|
|
46
46
|
weight: "regular",
|
|
47
47
|
children: [
|
|
@@ -50,9 +50,9 @@ const w = ({ features: n }) => {
|
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
|
-
] }, `${i.label}-${
|
|
53
|
+
] }, `${i.label}-${s}`);
|
|
54
54
|
}) });
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
w as
|
|
57
|
+
w as FeaturesList
|
|
58
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("../../src/components/SmartCallout/smartCallout.module.css"),i=require("../Icon/Icon.cjs.js"),s=require("../Typography/Typography.cjs.js"),l={muted:"bodySm",primary:"bodySm"},d={primary:void 0,muted:"color-text-secondary"},y=e=>{const{label:c,type:r,icon:t}=e,o=r==="plain"?e.variant:void 0;return a.jsxs("div",{className:n.root,"data-type":r,"data-mode":o,"data-icon":!!t,children:[t&&a.jsx(i.Icon,{name:t,className:n.icon}),a.jsx(s.Typography,{defaultVariant:o?l[o]:"labelMd",color:o?d[o]:void 0,children:c})]})};exports.SmartCallout=y;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { EIconName } from '../Icon';
|
|
2
|
+
type SmartCalloutBase = {
|
|
2
3
|
label: string;
|
|
4
|
+
icon?: EIconName;
|
|
3
5
|
};
|
|
4
|
-
|
|
6
|
+
type SmartCalloutButton = SmartCalloutBase & {
|
|
7
|
+
type: 'button';
|
|
8
|
+
button: {
|
|
9
|
+
link: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type SmartCalloutPlain = SmartCalloutBase & {
|
|
14
|
+
type: 'plain';
|
|
15
|
+
variant?: 'muted' | 'primary';
|
|
16
|
+
};
|
|
17
|
+
type SmartCalloutProps = SmartCalloutButton | SmartCalloutPlain;
|
|
18
|
+
export declare const SmartCallout: (props: SmartCalloutProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
19
|
export {};
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import n from "../../components/SmartCallout/smartCallout.module.css";
|
|
3
|
+
import { Icon as d } from "../Icon/Icon.es.js";
|
|
4
|
+
import { Typography as c } from "../Typography/Typography.es.js";
|
|
5
|
+
const l = {
|
|
6
|
+
muted: "bodySm",
|
|
7
|
+
primary: "bodySm"
|
|
8
|
+
}, s = {
|
|
9
|
+
primary: void 0,
|
|
10
|
+
muted: "color-text-secondary"
|
|
11
|
+
}, u = (t) => {
|
|
12
|
+
const { label: m, type: r, icon: a } = t, o = r === "plain" ? t.variant : void 0;
|
|
13
|
+
return /* @__PURE__ */ e("div", { className: n.root, "data-type": r, "data-mode": o, "data-icon": !!a, children: [
|
|
14
|
+
a && /* @__PURE__ */ i(d, { name: a, className: n.icon }),
|
|
15
|
+
/* @__PURE__ */ i(
|
|
16
|
+
c,
|
|
17
|
+
{
|
|
18
|
+
defaultVariant: o ? l[o] : "labelMd",
|
|
19
|
+
color: o ? s[o] : void 0,
|
|
20
|
+
children: m
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
5
25
|
export {
|
|
6
|
-
|
|
26
|
+
u as SmartCallout
|
|
7
27
|
};
|
|
@@ -7,3 +7,30 @@
|
|
|
7
7
|
padding: 12px 16px;
|
|
8
8
|
border-radius: var(--border-radius-xs);
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
.root[data-type="button"] {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.root[data-type="plain"][data-mode="primary"],
|
|
16
|
+
.root[data-type="plain"][data-mode="muted"] {
|
|
17
|
+
border-radius: var(--border-radius-xl);
|
|
18
|
+
padding: 12px;
|
|
19
|
+
padding-right: 21px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.root[data-type="plain"][data-mode="primary"][data-icon="false"],
|
|
23
|
+
.root[data-type="plain"][data-mode="muted"][data-icon="false"] {
|
|
24
|
+
padding-left: 20px;
|
|
25
|
+
padding-right: 20px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.icon {
|
|
29
|
+
width: 18px;
|
|
30
|
+
height: 18px;
|
|
31
|
+
margin-right: 7px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.root[data-mode="muted"] .icon {
|
|
35
|
+
color: var(--color-neutral-300);
|
|
36
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../utils/cn/cn.cjs.js"),c=require("../../types/analytics/analytics.cjs.js"),a=require("../../src/modules/IndividualProductCard/individualProductCard.module.css"),k=require("../../components/PlainFeaturesGroup/PlainFeaturesGroup.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../utils/cn/cn.cjs.js"),c=require("../../types/analytics/analytics.cjs.js"),a=require("../../src/modules/IndividualProductCard/individualProductCard.module.css"),k=require("../../components/PlainFeaturesGroup/PlainFeaturesGroup.cjs.js"),F=require("../../components/ImageGallery/ImageGallery.cjs.js"),x=require("../../components/RatingPreview/RatingPreview.cjs.js"),I=require("../../components/Quote/Quote.cjs.js"),m=require("../../components/Typography/Typography.cjs.js"),C=require("../../components/Button/Button.cjs.js"),G=require("../../components/TextButton/TextButton.cjs.js"),L=require("../../components/FeaturesList/FeaturesList.cjs.js"),R=require("./components/PlanCard/PlanCard.cjs.js"),B=require("../../components/SmartCallout/SmartCallout.cjs.js"),V=({zenpatientId:b,name:o,description:y,features:N,featuresGroup:p,images:q,quote:h,label:E,rating:v,ratingText:j,plans:s,button:r,textButton:t,selectedPlanId:g,onSelectPlan:l,trackingEvent:T,trackingLocation:_,signupUrl:w})=>{const d=s&&s.length>0&&l,f=i=>{if(l==null||l(i),T){const n=s==null?void 0:s.find(A=>A.id===i);c.EAnalyticsEventType.interaction,n==null||n.price,n==null||n.duration}},P=()=>{var n;const i={event:c.EAnalyticsEvent.ctaClicked,location:_||"not_set",type:c.EAnalyticsEventType.interaction,component:"IndividualProductCard",element:"primary_button",payload:{productId:b,ctaLabel:r.label,productName:o,selectedPlanId:g||"none"}};(n=window.eventBus)==null||n.emit("analytics",i)},S=()=>{var i;(i=window.eventBus)==null||i.emit("analytics",{event:c.EAnalyticsEvent.ctaClicked,location:_||"not_set",type:c.EAnalyticsEventType.interaction,component:"IndividualProductCard",element:"secondary_button",payload:{ctaLabel:t==null?void 0:t.label,productName:o}})};return e.jsx("section",{className:a.root,children:e.jsxs("div",{className:u.cn(a.container,!d&&a.noPlans),children:[e.jsxs("div",{className:a.gallery,children:[e.jsx(F.ImageGallery,{images:q,label:E}),e.jsx("div",{className:u.cn(a.ratingContainer,a.mobileOnly),children:e.jsx(x.RatingPreview,{rating:v,text:j})}),h&&e.jsx("div",{className:a.quoteWrapper,children:e.jsx(I.Quote,{...h})})]}),e.jsxs("div",{className:a.info,children:[e.jsxs("div",{className:a.infoHeader,children:[e.jsx(m.Typography,{as:"h3",defaultVariant:"displayXs",mobileVariant:"headingLg",weight:"regular",children:o}),!!y&&e.jsx(m.Typography,{as:"p",defaultVariant:"bodySm",className:a.infoDescription,weight:"regular",children:y})]}),!d&&e.jsxs("div",{className:a.actions,children:[e.jsx(C.Button,{variant:"primary",size:"lg",...r,onClick:P,children:r.label}),t&&e.jsx(G.TextButton,{...t,onClick:S,children:t.label})]}),e.jsx(L.FeaturesList,{features:N}),p&&e.jsx(k.PlainFeaturesGroup,{...p})]}),d&&e.jsxs("div",{className:a.plansSection,children:[e.jsxs("div",{className:a.plans,children:[e.jsx(m.Typography,{as:"h4",defaultVariant:"labelSm",emphasis:!0,weight:"regular",children:"Subscribe & Save"}),s.map(i=>e.jsx(R.PlanCard,{plan:i,onSelect:f,isActive:g===i.id},i.id))]}),e.jsx("div",{className:u.cn(a.ratingContainer,a.desktopOnly),children:e.jsx(x.RatingPreview,{rating:v,text:j})}),e.jsxs("div",{className:a.actions,children:[e.jsx(C.Button,{variant:"primary",size:"lg",as:"a",href:w||"#0",...r,children:r.label}),e.jsx(B.SmartCallout,{label:"HSA/FSA Eligible",type:"plain"})]})]})]})})};exports.IndividualProductCard=V;
|
|
@@ -2,14 +2,14 @@ import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn as m } from "../../utils/cn/cn.es.js";
|
|
3
3
|
import { EAnalyticsEventType as p, EAnalyticsEvent as b } from "../../types/analytics/analytics.es.js";
|
|
4
4
|
import a from "../../modules/IndividualProductCard/individualProductCard.module.css";
|
|
5
|
-
import { PlainFeaturesGroup as
|
|
6
|
-
import { ImageGallery as
|
|
5
|
+
import { PlainFeaturesGroup as z } from "../../components/PlainFeaturesGroup/PlainFeaturesGroup.es.js";
|
|
6
|
+
import { ImageGallery as D } from "../../components/ImageGallery/ImageGallery.es.js";
|
|
7
7
|
import { RatingPreview as w } from "../../components/RatingPreview/RatingPreview.es.js";
|
|
8
|
-
import { Quote as
|
|
8
|
+
import { Quote as G } from "../../components/Quote/Quote.es.js";
|
|
9
9
|
import { Typography as h } from "../../components/Typography/Typography.es.js";
|
|
10
10
|
import { Button as k } from "../../components/Button/Button.es.js";
|
|
11
|
-
import { TextButton as
|
|
12
|
-
import {
|
|
11
|
+
import { TextButton as H } from "../../components/TextButton/TextButton.es.js";
|
|
12
|
+
import { FeaturesList as O } from "../../components/FeaturesList/FeaturesList.es.js";
|
|
13
13
|
import { PlanCard as P } from "./components/PlanCard/PlanCard.es.js";
|
|
14
14
|
import { SmartCallout as Q } from "../../components/SmartCallout/SmartCallout.es.js";
|
|
15
15
|
const ai = ({
|
|
@@ -34,10 +34,10 @@ const ai = ({
|
|
|
34
34
|
}) => {
|
|
35
35
|
const s = o && o.length > 0 && c, F = (e) => {
|
|
36
36
|
if (c == null || c(e), V) {
|
|
37
|
-
const r = o == null ? void 0 : o.find((
|
|
37
|
+
const r = o == null ? void 0 : o.find((j) => j.id === e);
|
|
38
38
|
p.interaction, r == null || r.price, r == null || r.duration;
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, L = () => {
|
|
41
41
|
var r;
|
|
42
42
|
const e = {
|
|
43
43
|
event: b.ctaClicked,
|
|
@@ -53,7 +53,7 @@ const ai = ({
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
(r = window.eventBus) == null || r.emit("analytics", e);
|
|
56
|
-
},
|
|
56
|
+
}, T = () => {
|
|
57
57
|
var e;
|
|
58
58
|
(e = window.eventBus) == null || e.emit("analytics", {
|
|
59
59
|
event: b.ctaClicked,
|
|
@@ -69,9 +69,9 @@ const ai = ({
|
|
|
69
69
|
};
|
|
70
70
|
return /* @__PURE__ */ i("section", { className: a.root, children: /* @__PURE__ */ l("div", { className: m(a.container, !s && a.noPlans), children: [
|
|
71
71
|
/* @__PURE__ */ l("div", { className: a.gallery, children: [
|
|
72
|
-
/* @__PURE__ */ i(
|
|
72
|
+
/* @__PURE__ */ i(D, { images: S, label: I }),
|
|
73
73
|
/* @__PURE__ */ i("div", { className: m(a.ratingContainer, a.mobileOnly), children: /* @__PURE__ */ i(w, { rating: u, text: g }) }),
|
|
74
|
-
f && /* @__PURE__ */ i("div", { className: a.quoteWrapper, children: /* @__PURE__ */ i(
|
|
74
|
+
f && /* @__PURE__ */ i("div", { className: a.quoteWrapper, children: /* @__PURE__ */ i(G, { ...f }) })
|
|
75
75
|
] }),
|
|
76
76
|
/* @__PURE__ */ l("div", { className: a.info, children: [
|
|
77
77
|
/* @__PURE__ */ l("div", { className: a.infoHeader, children: [
|
|
@@ -88,11 +88,11 @@ const ai = ({
|
|
|
88
88
|
)
|
|
89
89
|
] }),
|
|
90
90
|
!s && /* @__PURE__ */ l("div", { className: a.actions, children: [
|
|
91
|
-
/* @__PURE__ */ i(k, { variant: "primary", size: "lg", ...t, onClick:
|
|
92
|
-
n && /* @__PURE__ */ i(
|
|
91
|
+
/* @__PURE__ */ i(k, { variant: "primary", size: "lg", ...t, onClick: L, children: t.label }),
|
|
92
|
+
n && /* @__PURE__ */ i(H, { ...n, onClick: T, children: n.label })
|
|
93
93
|
] }),
|
|
94
94
|
/* @__PURE__ */ i(O, { features: A }),
|
|
95
|
-
y && /* @__PURE__ */ i(
|
|
95
|
+
y && /* @__PURE__ */ i(z, { ...y })
|
|
96
96
|
] }),
|
|
97
97
|
s && /* @__PURE__ */ l("div", { className: a.plansSection, children: [
|
|
98
98
|
/* @__PURE__ */ l("div", { className: a.plans, children: [
|
|
@@ -110,7 +110,7 @@ const ai = ({
|
|
|
110
110
|
/* @__PURE__ */ i("div", { className: m(a.ratingContainer, a.desktopOnly), children: /* @__PURE__ */ i(w, { rating: u, text: g }) }),
|
|
111
111
|
/* @__PURE__ */ l("div", { className: a.actions, children: [
|
|
112
112
|
/* @__PURE__ */ i(k, { variant: "primary", size: "lg", as: "a", href: _ || "#0", ...t, children: t.label }),
|
|
113
|
-
/* @__PURE__ */ i(Q, { label: "HSA/FSA Eligible" })
|
|
113
|
+
/* @__PURE__ */ i(Q, { label: "HSA/FSA Eligible", type: "plain" })
|
|
114
114
|
] })
|
|
115
115
|
] })
|
|
116
116
|
] }) });
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import type { ETypeBadge } from '../../components/TypeBadge';
|
|
2
1
|
import type { LabelColor } from '../../components/Label';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
labelSuperscript?: number;
|
|
6
|
-
type: ETypeBadge;
|
|
7
|
-
description?: string;
|
|
8
|
-
descriptionSuperscript?: number;
|
|
9
|
-
collapsible?: boolean;
|
|
10
|
-
};
|
|
2
|
+
import type { TProductFeature as TFeaturesListProductFeature } from '../../components/FeaturesList';
|
|
3
|
+
export type TProductFeature = TFeaturesListProductFeature;
|
|
11
4
|
export type TProductPlan = {
|
|
12
5
|
id: string;
|
|
13
6
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../types/analytics/analytics.cjs.js"),q=require("../../utils/cn/cn.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../types/analytics/analytics.cjs.js"),q=require("../../utils/cn/cn.cjs.js"),i=require("../../src/modules/IndividualProductCardV2/individualProductCardV2.module.css"),I=require("../../components/AdvancedGallery/AdvancedGallery.cjs.js"),D=require("../../components/ImageGallery/ImageGallery.cjs.js"),S=require("../../components/RatingPreview/RatingPreview.cjs.js"),u=require("../../components/Typography/Typography.cjs.js"),F=require("../../components/FeaturesList/FeaturesList.cjs.js"),V=require("../../components/PlainFeaturesGroup/PlainFeaturesGroup.cjs.js"),L=require("../../components/PriceDisplay/PriceDisplay.cjs.js"),k=require("../IndividualProductCard/components/PlanCard/PlanCard.cjs.js"),R=require("../../components/Button/Button.cjs.js"),B=require("../../components/Quote/Quote.cjs.js"),M=t=>{const{zenpatientId:y,signupUrl:c,name:f,description:A,label:m,images:G,advancedGallery:p,features:N,quote:v,featuresGroup:h,ratingPreview:g,view:r,button:a}=t,n=r==="plans_list"?t.plans:void 0,T=n&&n.length>0,x=r==="plans_list"?t.selectedPlanId:void 0,o=n==null?void 0:n.find(s=>s.id===x),_=o?`${(a==null?void 0:a.link)||c}?defaultDurationSelection=${o==null?void 0:o.durationAmount}`:(a==null?void 0:a.link)||c,j=r==="pricing_display"?t.priceDisplay:void 0,E={event:d.EAnalyticsEvent.ctaClicked,type:d.EAnalyticsEventType.interaction,component:"Pricing",payload:{ctaLabel:(a==null?void 0:a.text)||"GET STARTED",ctaLink:_||c,productId:y}},C=s=>{var P;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:y,planId:s,planPrice:l==null?void 0:l.price,planDuration:l==null?void 0:l.duration}};(P=window.eventBus)==null||P.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:[p&&p.items.length>0?e.jsx(I.AdvancedGallery,{items:p.items,label:m}):e.jsx(D.ImageGallery,{images:G,label:m}),e.jsx("div",{className:q.cn(i.ratingContainer,i.mobileOnly),children:e.jsx(S.RatingPreview,{...g})}),v&&e.jsx("div",{className:i.quoteWrapper,children:e.jsx(B.Quote,{...v})})]}),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:f}),e.jsx(u.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:i.description,children:A})]}),e.jsx(F.FeaturesList,{features:N}),h&&e.jsx(V.PlainFeaturesGroup,{...h}),r==="pricing_display"&&j&&e.jsx(L.PriceDisplay,{items:j}),r==="plans_list"&&T&&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(k.PlanCard,{plan:s,onSelect:C,isActive:x===s.id},s.id))]})}),e.jsx("div",{className:q.cn(i.ratingContainer,i.desktopOnly),children:e.jsx(S.RatingPreview,{...g})}),e.jsxs("div",{className:i.actions,children:[e.jsx(R.Button,{as:"a",variant:"primary",size:"lg",href:_||c,analyticsProps:E,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=M;
|
|
@@ -2,11 +2,11 @@ import { jsx as i, jsxs as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { EAnalyticsEventType as A, EAnalyticsEvent as C } from "../../types/analytics/analytics.es.js";
|
|
3
3
|
import { cn as E } from "../../utils/cn/cn.es.js";
|
|
4
4
|
import e from "../../modules/IndividualProductCardV2/individualProductCardV2.module.css";
|
|
5
|
-
import { AdvancedGallery as
|
|
6
|
-
import { ImageGallery as
|
|
5
|
+
import { AdvancedGallery as L } from "../../components/AdvancedGallery/AdvancedGallery.es.js";
|
|
6
|
+
import { ImageGallery as F } from "../../components/ImageGallery/ImageGallery.es.js";
|
|
7
7
|
import { RatingPreview as b } from "../../components/RatingPreview/RatingPreview.es.js";
|
|
8
8
|
import { Typography as m } from "../../components/Typography/Typography.es.js";
|
|
9
|
-
import {
|
|
9
|
+
import { FeaturesList as j } from "../../components/FeaturesList/FeaturesList.es.js";
|
|
10
10
|
import { PlainFeaturesGroup as q } from "../../components/PlainFeaturesGroup/PlainFeaturesGroup.es.js";
|
|
11
11
|
import { PriceDisplay as z } from "../../components/PriceDisplay/PriceDisplay.es.js";
|
|
12
12
|
import { PlanCard as B } from "../IndividualProductCard/components/PlanCard/PlanCard.es.js";
|
|
@@ -55,7 +55,7 @@ const ti = (r) => {
|
|
|
55
55
|
};
|
|
56
56
|
return /* @__PURE__ */ i("section", { className: e.root, children: /* @__PURE__ */ o("div", { className: e.mainContainer, children: [
|
|
57
57
|
/* @__PURE__ */ o("div", { className: e.leftColumn, children: [
|
|
58
|
-
p && p.items.length > 0 ? /* @__PURE__ */ i(
|
|
58
|
+
p && p.items.length > 0 ? /* @__PURE__ */ i(L, { items: p.items, label: v }) : /* @__PURE__ */ i(F, { images: k, label: v }),
|
|
59
59
|
/* @__PURE__ */ i("div", { className: E(e.ratingContainer, e.mobileOnly), children: /* @__PURE__ */ i(b, { ...f }) }),
|
|
60
60
|
u && /* @__PURE__ */ i("div", { className: e.quoteWrapper, children: /* @__PURE__ */ i(O, { ...u }) })
|
|
61
61
|
] }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenpatient-org/healthspan-marketing-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.80",
|
|
4
4
|
"description": "Design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -346,6 +346,11 @@
|
|
|
346
346
|
"import": "./dist/components/Profile/Profile.es.js",
|
|
347
347
|
"require": "./dist/components/Profile/Profile.cjs.js"
|
|
348
348
|
},
|
|
349
|
+
"./FeaturesList": {
|
|
350
|
+
"types": "./dist/components/FeaturesList/FeaturesList.d.ts",
|
|
351
|
+
"import": "./dist/components/FeaturesList/FeaturesList.es.js",
|
|
352
|
+
"require": "./dist/components/FeaturesList/FeaturesList.cjs.js"
|
|
353
|
+
},
|
|
349
354
|
"./CallbackModule": {
|
|
350
355
|
"types": "./dist/modules/Callback/Callback.d.ts",
|
|
351
356
|
"import": "./dist/modules/Callback/Callback.es.js",
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
export { Features } from './Features';
|