UNPKG

@anoki/fse-ui

Version:

FSE UI components library

58 lines (57 loc) 1.76 kB
import { j as r } from "./index.es237.js"; import { Checkbox as l, CheckboxIndicator as p } from "./index.es338.js"; import { Row as d } from "./index.es116.js"; import b from "./index.es249.js"; import './components/ui/Checkbox/Checkbox.css';/* empty css */ import { clsx as f } from "./index.es239.js"; import { CheckIcon as j } from "./index.es174.js"; import { Col as i } from "./index.es61.js"; const $ = ({ id: t, linkText: o, onPressLink: n, label: e, checked: a, onChange: m, classNameText: x = "fs-6 fw-bold" }) => { var c; const s = new DOMParser().parseFromString(`${e}`, "text/html"), h = ((c = s == null ? void 0 : s.body) == null ? void 0 : c.textContent) || ""; return /* @__PURE__ */ r.jsxs( d, { alignItems: o ? "flex-start" : "center", className: "ui-check-box-container", gap: "x16", children: [ /* @__PURE__ */ r.jsx( l, { id: t, checked: a, onCheckedChange: m, className: "ui-checkbox", "aria-label": h, children: /* @__PURE__ */ r.jsx(p, { children: /* @__PURE__ */ r.jsx(j, { width: 14, height: 14, color: "white" }) }) } ), /* @__PURE__ */ r.jsxs(i, { children: [ e && /* @__PURE__ */ r.jsx( b, { as: "label", htmlFor: t, className: f(x, "text-slate-20"), children: e } ), o && /* @__PURE__ */ r.jsx(i, { onClick: n, children: /* @__PURE__ */ r.jsx("span", { className: "ui-link-checkbox cursor-pointer", children: o }) }) ] }) ] } ); }; export { $ as Checkbox }; //# sourceMappingURL=index.es60.js.map