@zenpatient-org/healthspan-marketing-ui 0.4.21 → 0.4.22
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/labs/BiomarkerHero/BiomarkerHero.cjs.js +1 -1
- package/dist/components/labs/BiomarkerHero/BiomarkerHero.es.js +11 -11
- package/dist/components/labs/BiomarkerHero/biomarkerHero.module.css +11 -12
- package/dist/components/labs/BiomarkerHero/types.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("../../../utils/cn/cn.cjs.js"),f=require("./assets/hero-desktop-borderline.webp.cjs.js"),v=require("./assets/hero-desktop-healthy.webp.cjs.js"),S=require("./assets/hero-desktop-optimal.webp.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("../../../utils/cn/cn.cjs.js"),f=require("./assets/hero-desktop-borderline.webp.cjs.js"),v=require("./assets/hero-desktop-healthy.webp.cjs.js"),S=require("./assets/hero-desktop-optimal.webp.cjs.js"),B=require("./assets/hero-desktop-priority.webp.cjs.js"),q=require("./assets/hero-mobile-borderline.webp.cjs.js"),V=require("./assets/hero-mobile-healthy.webp.cjs.js"),O=require("./assets/hero-mobile-optimal.webp.cjs.js"),_=require("./assets/hero-mobile-priority.webp.cjs.js"),e=require("../../../src/components/labs/BiomarkerHero/biomarkerHero.module.css"),k=require("../../IconButton/IconButton.cjs.js"),I=require("../../Icon/constants.cjs.js"),r=require("../../Typography/Typography.cjs.js"),x={optimal:"Optimal",healthy:"Opportunity",borderline:"Borderline",priority:"Priority"},D={optimal:S.default,healthy:v.default,borderline:f.default,priority:B.default},H={optimal:O.default,healthy:V.default,borderline:q.default,priority:_.default},M=({name:t,category:c,value:o,unit:d,status:i,statusLabel:n,date:h,onBack:g,backLabel:j="Back",notes:l,children:m,mobile:N=!1,className:p})=>{const u=a.jsx(k.IconButton,{iconName:I.EIconName.ARROW_BACK,variant:"muted-invert",size:"sm","aria-label":j,onClick:g}),y=l&&l.sentences.length>0&&a.jsxs("div",{className:e.notes,children:[a.jsx("span",{className:e.noteLabel,children:l.label}),a.jsx("span",{"aria-hidden":!0,className:e.noteDivider}),a.jsx("div",{className:e.noteBody,children:l.sentences.map((T,b)=>a.jsx(r.Typography,{defaultVariant:"bodySm",className:e.noteText,children:T},b))})]});return N?a.jsxs("div",{className:s.cn(e.root,e.mobileRoot,p),"data-status":i,children:[a.jsx("span",{"aria-hidden":!0,className:e.bg,children:a.jsx("span",{className:e.bgBlob,style:{backgroundImage:`url(${H[i]})`}})}),a.jsxs("div",{className:e.mobileHeader,children:[u,a.jsxs("div",{className:e.mobileCopy,children:[a.jsx(r.Typography,{as:"h1",defaultVariant:"headingSm",align:"center",className:s.cn(e.gradientText,e.title),children:t}),a.jsx(r.Typography,{defaultVariant:"labelSm",align:"center",className:e.category,children:c})]})]}),y,a.jsxs("div",{className:e.mobileCard,children:[a.jsxs("div",{className:e.mobileValues,children:[a.jsxs("span",{className:e.mobileValueGroup,children:[a.jsx("span",{className:s.cn(e.gradientText,e.mobileValue),children:o}),a.jsx(r.Typography,{defaultVariant:"bodySm",className:s.cn(e.gradientText,e.unit),children:d})]}),a.jsxs("span",{className:e.mobileStatusDate,children:[a.jsx("span",{className:s.cn(e.gradientText,e.mobileStatus),children:n!=null?n:x[i]}),a.jsx(r.Typography,{defaultVariant:"labelXs",emphasis:!0,className:e.date,children:h})]})]}),a.jsx("div",{className:e.chart,children:m})]})]}):a.jsx("div",{className:s.cn(e.root,p),"data-status":i,children:a.jsxs("div",{className:e.card,style:{backgroundImage:`url(${D[i]})`},children:[a.jsxs("div",{className:e.details,children:[a.jsxs("div",{className:e.left,children:[u,a.jsxs("div",{className:e.copy,children:[a.jsx(r.Typography,{as:"h1",defaultVariant:"headingSm",className:s.cn(e.gradientText,e.title),children:t}),a.jsx(r.Typography,{defaultVariant:"labelMd",className:e.category,children:c})]})]}),a.jsxs("div",{className:e.right,children:[a.jsxs("span",{className:e.statusGroup,children:[a.jsxs("span",{className:e.valueGroup,children:[a.jsx(r.Typography,{defaultVariant:"headingSm",className:e.gradientText,children:o}),a.jsx(r.Typography,{defaultVariant:"headingSm",className:s.cn(e.gradientText,e.unit),children:d})]}),a.jsx(r.Typography,{defaultVariant:"headingSm",className:e.gradientText,children:n!=null?n:x[i]})]}),a.jsx(r.Typography,{defaultVariant:"labelXs",emphasis:!0,className:e.date,children:h})]})]}),a.jsxs("div",{className:e.chart,children:[y,m]})]})})};exports.BiomarkerHero=M;
|
|
@@ -13,7 +13,7 @@ import e from "../../../components/labs/BiomarkerHero/biomarkerHero.module.css";
|
|
|
13
13
|
import { IconButton as P } from "../../IconButton/IconButton.es.js";
|
|
14
14
|
import { EIconName as I } from "../../Icon/constants.es.js";
|
|
15
15
|
import { Typography as i } from "../../Typography/Typography.es.js";
|
|
16
|
-
const
|
|
16
|
+
const u = {
|
|
17
17
|
optimal: "Optimal",
|
|
18
18
|
healthy: "Opportunity",
|
|
19
19
|
borderline: "Borderline",
|
|
@@ -37,10 +37,10 @@ const b = {
|
|
|
37
37
|
statusLabel: t,
|
|
38
38
|
date: h,
|
|
39
39
|
onBack: y,
|
|
40
|
-
backLabel:
|
|
40
|
+
backLabel: b = "Back",
|
|
41
41
|
notes: o,
|
|
42
42
|
children: p,
|
|
43
|
-
mobile:
|
|
43
|
+
mobile: v = !1,
|
|
44
44
|
className: N
|
|
45
45
|
}) => {
|
|
46
46
|
const f = /* @__PURE__ */ a(
|
|
@@ -49,15 +49,15 @@ const b = {
|
|
|
49
49
|
iconName: I.ARROW_BACK,
|
|
50
50
|
variant: "muted-invert",
|
|
51
51
|
size: "sm",
|
|
52
|
-
"aria-label":
|
|
52
|
+
"aria-label": b,
|
|
53
53
|
onClick: y
|
|
54
54
|
}
|
|
55
|
-
), g = o && o.length > 0 && /* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */ a("span", { className: e.noteLabel, children:
|
|
55
|
+
), g = o && o.sentences.length > 0 && /* @__PURE__ */ r("div", { className: e.notes, children: [
|
|
56
|
+
/* @__PURE__ */ a("span", { className: e.noteLabel, children: o.label }),
|
|
57
57
|
/* @__PURE__ */ a("span", { "aria-hidden": !0, className: e.noteDivider }),
|
|
58
|
-
/* @__PURE__ */ a(i, { defaultVariant: "bodySm", className: e.noteText, children:
|
|
59
|
-
] }
|
|
60
|
-
return
|
|
58
|
+
/* @__PURE__ */ a("div", { className: e.noteBody, children: o.sentences.map((S, T) => /* @__PURE__ */ a(i, { defaultVariant: "bodySm", className: e.noteText, children: S }, T)) })
|
|
59
|
+
] });
|
|
60
|
+
return v ? /* @__PURE__ */ r("div", { className: l(e.root, e.mobileRoot, N), "data-status": n, children: [
|
|
61
61
|
/* @__PURE__ */ a("span", { "aria-hidden": !0, className: e.bg, children: /* @__PURE__ */ a("span", { className: e.bgBlob, style: { backgroundImage: `url(${C[n]})` } }) }),
|
|
62
62
|
/* @__PURE__ */ r("div", { className: e.mobileHeader, children: [
|
|
63
63
|
f,
|
|
@@ -83,7 +83,7 @@ const b = {
|
|
|
83
83
|
/* @__PURE__ */ a(i, { defaultVariant: "bodySm", className: l(e.gradientText, e.unit), children: c })
|
|
84
84
|
] }),
|
|
85
85
|
/* @__PURE__ */ r("span", { className: e.mobileStatusDate, children: [
|
|
86
|
-
/* @__PURE__ */ a("span", { className: l(e.gradientText, e.mobileStatus), children: t != null ? t :
|
|
86
|
+
/* @__PURE__ */ a("span", { className: l(e.gradientText, e.mobileStatus), children: t != null ? t : u[n] }),
|
|
87
87
|
/* @__PURE__ */ a(i, { defaultVariant: "labelXs", emphasis: !0, className: e.date, children: h })
|
|
88
88
|
] })
|
|
89
89
|
] }),
|
|
@@ -112,7 +112,7 @@ const b = {
|
|
|
112
112
|
/* @__PURE__ */ a(i, { defaultVariant: "headingSm", className: e.gradientText, children: s }),
|
|
113
113
|
/* @__PURE__ */ a(i, { defaultVariant: "headingSm", className: l(e.gradientText, e.unit), children: c })
|
|
114
114
|
] }),
|
|
115
|
-
/* @__PURE__ */ a(i, { defaultVariant: "headingSm", className: e.gradientText, children: t != null ? t :
|
|
115
|
+
/* @__PURE__ */ a(i, { defaultVariant: "headingSm", className: e.gradientText, children: t != null ? t : u[n] })
|
|
116
116
|
] }),
|
|
117
117
|
/* @__PURE__ */ a(i, { defaultVariant: "labelXs", emphasis: !0, className: e.date, children: h })
|
|
118
118
|
] })
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
.notes {
|
|
106
106
|
box-sizing: border-box;
|
|
107
107
|
display: flex;
|
|
108
|
-
flex-direction: column;
|
|
109
108
|
gap: var(--spacing-20);
|
|
109
|
+
align-items: center;
|
|
110
110
|
width: 100%;
|
|
111
111
|
padding: var(--spacing-20) var(--spacing-28);
|
|
112
112
|
border: 1px solid var(--border-color-alpha-white-10);
|
|
@@ -118,13 +118,6 @@
|
|
|
118
118
|
0 8px 10px 0 rgba(0, 0, 0, 0.1);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.note {
|
|
122
|
-
display: flex;
|
|
123
|
-
gap: var(--spacing-20);
|
|
124
|
-
align-items: center;
|
|
125
|
-
width: 100%;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
121
|
.noteLabel {
|
|
129
122
|
font-family: var(--font-decorative), monospace;
|
|
130
123
|
font-weight: var(--font-weight-regular);
|
|
@@ -143,9 +136,15 @@
|
|
|
143
136
|
background: var(--border-color-alpha-white-10);
|
|
144
137
|
}
|
|
145
138
|
|
|
146
|
-
.
|
|
139
|
+
.noteBody {
|
|
140
|
+
display: flex;
|
|
147
141
|
flex: 1;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
gap: var(--spacing-20);
|
|
148
144
|
min-width: 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.noteText {
|
|
149
148
|
margin: 0;
|
|
150
149
|
color: var(--color-text-primary-inverted);
|
|
151
150
|
}
|
|
@@ -258,14 +257,14 @@
|
|
|
258
257
|
.mobileRoot .notes {
|
|
259
258
|
position: relative;
|
|
260
259
|
z-index: 1;
|
|
260
|
+
flex-direction: column;
|
|
261
261
|
gap: var(--spacing-8);
|
|
262
|
+
align-items: flex-start;
|
|
262
263
|
padding: var(--spacing-16) var(--spacing-20);
|
|
263
264
|
}
|
|
264
265
|
|
|
265
|
-
.mobileRoot .
|
|
266
|
-
flex-direction: column;
|
|
266
|
+
.mobileRoot .noteBody {
|
|
267
267
|
gap: var(--spacing-8);
|
|
268
|
-
align-items: flex-start;
|
|
269
268
|
}
|
|
270
269
|
|
|
271
270
|
.mobileRoot .noteLabel {
|
|
@@ -10,12 +10,12 @@ export type BiomarkerHeroProps = {
|
|
|
10
10
|
date: string;
|
|
11
11
|
onBack?: () => void;
|
|
12
12
|
backLabel?: string;
|
|
13
|
-
notes?:
|
|
13
|
+
notes?: BiomarkerHeroNotes;
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
mobile?: boolean;
|
|
16
16
|
className?: string;
|
|
17
17
|
};
|
|
18
|
-
export type
|
|
18
|
+
export type BiomarkerHeroNotes = {
|
|
19
19
|
label: string;
|
|
20
|
-
|
|
20
|
+
sentences: string[];
|
|
21
21
|
};
|