@anoki/fse-marche-ui
Version:
FSE UI components library
81 lines (80 loc) • 2.26 kB
JavaScript
import { j as s } from "./index.es137.js";
import './components/ui/CardSelectDoctor/CardSelectDoctor.css';/* empty css */
import { useState as p, useRef as w } from "react";
import { Root as j, Indicator as k } from "./index.es170.js";
import { useClickOutside as g } from "./index.es171.js";
import { Col as v } from "./index.es10.js";
const $ = ({
id: r,
title: l,
titleTag: n = "h3",
description: x,
className: d,
setSelectedCard: o = () => {
},
description2: i,
keepSelectionOnNavigation: f = !1,
disabled: e = !1
}) => {
const [t, c] = p(!1), a = w(null);
g(
a,
t,
() => c(!1),
() => o(""),
f
);
const h = () => /* @__PURE__ */ s.jsx(
"svg",
{
width: "14",
height: "14",
viewBox: "0 0 12 12",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
"aria-hidden": "true",
children: /* @__PURE__ */ s.jsx(
"path",
{
d: "M10 3L4.5 8.5L2 6",
stroke: "white",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round"
}
)
}
), m = `${d} ${t ? "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"}`, u = () => {
e || (c(!0), o(r));
};
return /* @__PURE__ */ s.jsxs(
"div",
{
ref: a,
className: m,
onClick: u,
"aria-disabled": e,
children: [
/* @__PURE__ */ s.jsx(
j,
{
id: r,
checked: t,
disabled: e,
className: "ui-checkbox-filter",
children: /* @__PURE__ */ s.jsx(k, { children: /* @__PURE__ */ s.jsx(h, {}) })
}
),
/* @__PURE__ */ s.jsxs(v, { children: [
/* @__PURE__ */ s.jsx(n, { className: "flex-1 pb-x8 fs-5 md-fs-4 text-slate-20 fw-semibold", children: l }),
/* @__PURE__ */ s.jsx("p", { className: "fs-7 md-fs-custom fw-regular text-slate-28", children: x }),
i && /* @__PURE__ */ s.jsx("p", { className: "fs-7 md-fs-custom fw-regular text-slate-28 pt-x16", children: i })
] })
]
}
);
};
export {
$ as CardSelectDoctor
};
//# sourceMappingURL=index.es41.js.map