@anoki/fse-marche-ui
Version:
FSE UI components library
63 lines (62 loc) • 1.62 kB
JavaScript
import { j as e } from "./index.es137.js";
import { Root as h, Indicator as m } from "./index.es170.js";
import { Row as l } from "./index.es9.js";
import d from "./index.es210.js";
import './components/ui/Checkbox/Checkbox.css';/* empty css */
import { clsx as p } from "./index.es139.js";
const C = ({
id: o,
label: t,
checked: n,
onChange: i,
classNameText: a = "fs-6 fw-bold"
}) => {
var s;
const c = () => /* @__PURE__ */ e.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__ */ e.jsx(
"path",
{
d: "M10 3L4.5 8.5L2 6",
stroke: "white",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round"
}
)
}
), r = new DOMParser().parseFromString(`${t}`, "text/html"), x = ((s = r == null ? void 0 : r.body) == null ? void 0 : s.textContent) || "";
return /* @__PURE__ */ e.jsxs(l, { alignItems: "center", gap: "x16", children: [
/* @__PURE__ */ e.jsx(
h,
{
id: o,
checked: n,
onCheckedChange: i,
className: "ui-checkbox",
"aria-label": x,
children: /* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(c, {}) })
}
),
t && /* @__PURE__ */ e.jsx(
d,
{
as: "label",
htmlFor: o,
className: p(a, "text-slate-20"),
children: t
}
)
] });
};
export {
C as Checkbox
};
//# sourceMappingURL=index.es48.js.map