@zenpatient-org/healthspan-marketing-ui 0.2.61 → 0.2.62
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 r=require("react/jsx-runtime"),s=require("../Typography/Typography.cjs.js"),e=require("../../src/components/PriceDisplay/priceDisplay.module.css"),
|
|
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"),n=require("../../utils/cn/cn.cjs.js"),c=require("../../utils/periodView.cjs.js"),p=({items:l})=>{if(!l||l.length===0)return null;const i=l.length>1?"double":"single";return r.jsx("div",{className:e.root,children:l.map(a=>r.jsxs("div",{className:n.cn(e.container,i==="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.initialPrice&&r.jsxs(s.Typography,{as:"p",defaultVariant:"labelSm",className:e.initialPrice,children:["$",(a.initialPrice/100).toFixed(0)]}),r.jsxs("div",{className:e.priceColumn,children:[a.prefix?r.jsx(s.Typography,{as:"p",defaultVariant:"bodyXs",className:e.prefix,children:a.prefix}):a.label?r.jsx(s.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:e.label,children:a.label}):null,r.jsxs("div",{className:e.priceAmount,children:[r.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",className:e.currency,children:"$"}),r.jsx(s.Typography,{as:"p",defaultVariant:"headingLg",className:e.price,children:(a.price/100).toFixed(0)}),r.jsxs("div",{className:e.periodWrapper,children:[a.prefix&&a.label&&r.jsx(s.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:e.label,children:a.label}),a.period!=="none"&&r.jsxs(s.Typography,{as:"p",defaultVariant:"labelSm",className:e.period,children:["/",c.shortPeriod(a.period)]})]})]})]})]})]},a.description))})};exports.PriceDisplay=p;
|
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import
|
|
4
|
-
import { cn as
|
|
5
|
-
import { shortPeriod as
|
|
6
|
-
const f = ({ items:
|
|
7
|
-
if (!
|
|
1
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as l } from "../Typography/Typography.es.js";
|
|
3
|
+
import a from "../../components/PriceDisplay/priceDisplay.module.css";
|
|
4
|
+
import { cn as c } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import { shortPeriod as d } from "../../utils/periodView.es.js";
|
|
6
|
+
const f = ({ items: s }) => {
|
|
7
|
+
if (!s || s.length === 0)
|
|
8
8
|
return null;
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
const n = s.length > 1 ? "double" : "single";
|
|
10
|
+
return /* @__PURE__ */ r("div", { className: a.root, children: s.map((e) => /* @__PURE__ */ i(
|
|
11
11
|
"div",
|
|
12
12
|
{
|
|
13
|
-
className:
|
|
13
|
+
className: c(a.container, n === "double" ? a.double : a.single),
|
|
14
14
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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)
|
|
15
|
+
/* @__PURE__ */ r(l, { as: "p", defaultVariant: "bodySm", className: a.description, children: e.description }),
|
|
16
|
+
/* @__PURE__ */ i("div", { className: a.priceWrapper, children: [
|
|
17
|
+
e.initialPrice && /* @__PURE__ */ i(l, { as: "p", defaultVariant: "labelSm", className: a.initialPrice, children: [
|
|
18
|
+
"$",
|
|
19
|
+
(e.initialPrice / 100).toFixed(0)
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ i("div", { className: a.priceColumn, children: [
|
|
22
|
+
e.prefix ? /* @__PURE__ */ r(l, { as: "p", defaultVariant: "bodyXs", className: a.prefix, children: e.prefix }) : e.label ? /* @__PURE__ */ r(l, { as: "p", defaultVariant: "labelXs", emphasis: !0, className: a.label, children: e.label }) : null,
|
|
23
|
+
/* @__PURE__ */ i("div", { className: a.priceAmount, children: [
|
|
24
|
+
/* @__PURE__ */ r(l, { as: "p", defaultVariant: "bodySm", className: a.currency, children: "$" }),
|
|
25
|
+
/* @__PURE__ */ r(l, { as: "p", defaultVariant: "headingLg", className: a.price, children: (e.price / 100).toFixed(0) }),
|
|
26
|
+
/* @__PURE__ */ i("div", { className: a.periodWrapper, children: [
|
|
27
|
+
e.prefix && e.label && /* @__PURE__ */ r(l, { as: "p", defaultVariant: "labelXs", emphasis: !0, className: a.label, children: e.label }),
|
|
28
|
+
e.period !== "none" && /* @__PURE__ */ i(l, { as: "p", defaultVariant: "labelSm", className: a.period, children: [
|
|
29
|
+
"/",
|
|
30
|
+
d(e.period)
|
|
31
|
+
] })
|
|
32
|
+
] })
|
|
42
33
|
] })
|
|
43
34
|
] })
|
|
44
35
|
] })
|
|
45
36
|
]
|
|
46
37
|
},
|
|
47
|
-
|
|
38
|
+
e.description
|
|
48
39
|
)) });
|
|
49
40
|
};
|
|
50
41
|
export {
|
|
@@ -70,36 +70,59 @@
|
|
|
70
70
|
|
|
71
71
|
.priceWrapper {
|
|
72
72
|
display: flex;
|
|
73
|
-
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
align-items: flex-start;
|
|
76
|
-
text-align: left;
|
|
73
|
+
align-items: flex-end;
|
|
77
74
|
min-width: 90px;
|
|
78
75
|
}
|
|
79
76
|
|
|
80
|
-
.
|
|
81
|
-
|
|
77
|
+
.priceColumn {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
gap: 6px;
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
.priceAmount {
|
|
85
84
|
display: flex;
|
|
86
|
-
align-items:
|
|
87
|
-
|
|
85
|
+
align-items: stretch;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.periodWrapper {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
margin-left: 3px;
|
|
92
|
+
justify-content: flex-end;
|
|
93
|
+
align-self: stretch;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.periodWrapper:has(.label) {
|
|
97
|
+
justify-content: space-between;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.label {
|
|
101
|
+
background-color: var(--color-bg-fill-brand-indigo);
|
|
102
|
+
padding: 2.77px 5.54px;
|
|
103
|
+
font-size: 6.926px;
|
|
104
|
+
border-radius: var(--border-radius-xxs);
|
|
105
|
+
width: fit-content;
|
|
88
106
|
}
|
|
89
107
|
|
|
90
108
|
.price {
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
margin-bottom: -5px;
|
|
110
|
+
align-self: flex-start;
|
|
93
111
|
}
|
|
94
112
|
|
|
95
113
|
.currency {
|
|
96
|
-
grid-column: 2 / 3;
|
|
97
|
-
grid-row: 1 / 2;
|
|
98
114
|
align-self: flex-start;
|
|
99
115
|
}
|
|
100
116
|
|
|
101
117
|
.period {
|
|
102
|
-
|
|
103
|
-
|
|
118
|
+
color: var(--color-neutral-500);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.initialPrice {
|
|
122
|
+
color: var(--color-neutral-300);
|
|
123
|
+
text-decoration: line-through;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.prefix {
|
|
104
127
|
color: var(--color-neutral-500);
|
|
105
128
|
}
|