@anoki/fse-ui
Version:
FSE UI components library
89 lines (88 loc) • 3.14 kB
JavaScript
import { j as e } from "./index.es244.js";
import './components/ui/DelegateCard/DelegateCard.css';/* empty css */
import { useRef as g } from "react";
import { Root as b, Indicator as N } from "./index.es306.js";
import { Row as r } from "./index.es9.js";
import { CheckIcon as C } from "./index.es213.js";
import { Col as s } from "./index.es10.js";
const U = ({
id: i,
isSelected: a,
title: d,
subtitle: x,
region: c,
relation: t,
isMe: l = !1,
showRegion: o = !1,
setSelectedCard: m = () => {
},
className: f,
labelRelation: h = "Relazione con il delegante",
labelRegion: p = "Regione di assistenza",
labelRecord: j = "IL TUO FASCICOLO"
}) => {
const w = g(null), u = (n) => n.charAt(0).toUpperCase() + n.slice(1);
return /* @__PURE__ */ e.jsxs(
r,
{
br: "x4",
p: "x24",
gap: "x16",
bg: "white",
text: "slate-20",
ref: w,
className: `${f} ${a ? "ui-is-active" : ""} ui-card-delegate shadow cursor-pointer`,
onClick: () => {
m(i);
},
style: { width: "100%" },
children: [
/* @__PURE__ */ e.jsx("div", { className: "mt-x4", children: /* @__PURE__ */ e.jsx(
b,
{
id: i,
checked: a,
className: "ui-checkbox-filter",
children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(C, { width: 14, height: 14, color: "white" }) })
}
) }),
/* @__PURE__ */ e.jsx(
r,
{
alignItems: "flex-start",
style: { width: "100%" },
justifyContent: "space-between",
children: /* @__PURE__ */ e.jsxs(s, { style: { flex: 1 }, justifyContent: "center", className: "w-full", children: [
/* @__PURE__ */ e.jsxs(
s,
{
gap: "x4",
pb: (l || !l && !t) && !o ? void 0 : "x16",
children: [
/* @__PURE__ */ e.jsx("h3", { className: "flex-1 text-decoration-none fs-4 md-fs-3 fw-semibold", children: d }),
/* @__PURE__ */ e.jsx("p", { className: "fs-6 fw-normal text-slate-28", children: x })
]
}
),
/* @__PURE__ */ e.jsxs(s, { gap: "x24", className: "delegate-row-responsive", children: [
!l && t && /* @__PURE__ */ e.jsxs(s, { gap: "x4", children: [
/* @__PURE__ */ e.jsx("div", { className: "fw-bold", children: h }),
/* @__PURE__ */ e.jsx("p", { children: t })
] }),
o && c && /* @__PURE__ */ e.jsxs(s, { pr: "x104", gap: "x4", children: [
/* @__PURE__ */ e.jsx("div", { className: "fw-bold", children: p }),
/* @__PURE__ */ e.jsx("p", { children: u(c) })
] })
] }),
l && /* @__PURE__ */ e.jsx(r, { className: "ui-fascicolo-label fs-7 fw-semibold", children: j })
] })
}
)
]
}
);
};
export {
U as DelegateCard
};
//# sourceMappingURL=index.es108.js.map