UNPKG

@anoki/fse-ui

Version:

FSE UI components library

65 lines (64 loc) 1.97 kB
import { j as s } from "./index.es237.js"; import './components/ui/CardSelectDoctor/CardSelectDoctor.css';/* empty css */ import { useRef as d } from "react"; import { Checkbox as p, CheckboxIndicator as u } from "./index.es338.js"; import { useClickOutside as j } from "./index.es339.js"; import { Col as w } from "./index.es61.js"; import { CheckIcon as b } from "./index.es174.js"; const z = ({ id: c, title: r, titleTag: t = "h1", description: m, className: x, setSelectedCard: o = () => { }, description2: l, keepSelectionOnNavigation: f = !1, disabled: e = !1, isActive: a = !1 }) => { const i = d(null); j( i, a, () => o(void 0), () => o(void 0), f ); const h = `${x} ${a ? "ui-is-active" : "ui-card-search"} shadow br-x4 px-x24 py-x16 base-row bg-white gap-x16 ${e ? "ui-card-disabled" : "cursor-pointer"}`, n = () => { e || o(c); }; return /* @__PURE__ */ s.jsxs( "div", { ref: i, className: h, onClick: n, "aria-disabled": e, children: [ /* @__PURE__ */ s.jsx( p, { id: c, checked: a, disabled: e, className: "ui-checkbox-filter", title: `Seleziona ${r}`, "aria-label": `Seleziona ${r}`, children: /* @__PURE__ */ s.jsx(u, { children: /* @__PURE__ */ s.jsx(b, { width: 14, height: 14, color: "white" }) }) } ), /* @__PURE__ */ s.jsxs(w, { children: [ /* @__PURE__ */ s.jsx(t, { className: "flex-1 pb-x8 fs-5 md-fs-4 text-slate-20 fw-semibold", children: r }), /* @__PURE__ */ s.jsx("p", { className: "fs-7 md-fs-custom fw-regular text-slate-28", children: m }), l && /* @__PURE__ */ s.jsx("p", { className: "fs-7 md-fs-custom fw-regular text-slate-28 pt-x16", children: l }) ] }) ] } ); }; export { z as CardSelectDoctor }; //# sourceMappingURL=index.es54.js.map