UNPKG

@anoki/fse-ui

Version:

FSE UI components library

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