@anoki/fse-ui
Version:
FSE UI components library
135 lines (134 loc) • 4.26 kB
JavaScript
import { j as a } from "./index.es244.js";
import './components/ui/CardClinicalData/CardClinicalData.css';/* empty css */
import { clsx as s } from "./index.es246.js";
import { Row as c } from "./index.es9.js";
import { ArrowDown as o } from "./index.es158.js";
import { Button as j } from "./index.es28.js";
const C = ({
information: l = [],
className: n = "",
clinicalCode: m = "",
isOpen: e,
onToggle: x,
hasBorder: h = !0,
clinicalLabel: u = "",
label: t,
classNameTitle: p = "fw-semibold fs-5 md-fs-4 text-color-darker",
deleteLabel: i,
onDelete: w
}) => {
const r = l.length > 0;
return /* @__PURE__ */ a.jsxs("div", { className: "rounded shadow w-full", children: [
/* @__PURE__ */ a.jsx(
"button",
{
className: s(
e && h && "ui-has-border-bottom",
"ui-btn-accordion-clinical-data",
n
),
type: "button",
onClick: r ? x : void 0,
disabled: !r,
children: /* @__PURE__ */ a.jsxs("div", { className: "ui-header-content p-x24", children: [
/* @__PURE__ */ a.jsxs(c, { gap: "x24", alignItems: "center", className: "first-row", children: [
/* @__PURE__ */ a.jsxs("div", { className: "clinical-data-info", children: [
/* @__PURE__ */ a.jsx("h3", { className: s(p), children: m }),
/* @__PURE__ */ a.jsx("span", { className: "ui-divider" }),
/* @__PURE__ */ a.jsx("p", { className: "fs-7 md-fs-6 text-muted fw-semibold", children: u })
] }),
r && /* @__PURE__ */ a.jsx(
o,
{
color: "primary",
className: s("ui-arrow-card-clinical-data mobile-arrow", {
"ui-expanded-card-clinical-data": e
})
}
)
] }),
/* @__PURE__ */ a.jsxs(
c,
{
gap: "x16",
alignItems: "center",
className: "ui-arrow-container desktop-row",
children: [
t && /* @__PURE__ */ a.jsx(
"div",
{
className: "fs-7 fw-bold bg-secondary text-white rounded py-x4 px-x16 desktop-label",
style: { width: "max-content" },
children: t
}
),
r && /* @__PURE__ */ a.jsx(
o,
{
color: "primary",
className: s("ui-arrow-card-clinical-data desktop-arrow", {
"ui-expanded-card-clinical-data": e
})
}
)
]
}
),
t && /* @__PURE__ */ a.jsx(
"div",
{
className: "fs-7 fw-bold bg-secondary text-white rounded py-x4 px-x16 mobile-label",
style: { width: "max-content" },
children: t
}
)
] })
}
),
e && r && /* @__PURE__ */ a.jsx(
"dl",
{
className: s(
"p-x24",
l.length > 1 ? "ui-card-clinical-data" : "base-row py-x16"
),
children: l.map(({ label: d, value: f }) => /* @__PURE__ */ a.jsxs("div", { children: [
/* @__PURE__ */ a.jsxs(
"dt",
{
className: s(
"fs-custom fw-bold text-slate-28",
l.length === 1 && "me-x8 mb-0"
),
children: [
d,
":"
]
}
),
/* @__PURE__ */ a.jsx("dd", { className: "fs-custom fw-regular text-slate-28 mb-0", children: f })
] }, d))
}
),
e && i && /* @__PURE__ */ a.jsx(
c,
{
className: "justify-content-end align-items-center px-x24 w-full bg-lightblue-a03 py-x16 ",
children: /* @__PURE__ */ a.jsx(
j,
{
variant: "secondary",
size: "3",
variantBg: "bg-lightblue-a03",
onClick: w,
children: i
}
)
}
)
] });
};
export {
C as CardClinicalData
};
//# sourceMappingURL=index.es71.js.map