UNPKG

stone-kit

Version:
68 lines (67 loc) 1.65 kB
import { jsxs as m, jsx as s } from "react/jsx-runtime"; import { forwardRef as f } from "react"; import { NewIcon as C } from "../NewIcon/ui/NewIcon.js"; const p = "_checkbox_10c7x_1", d = "_isError_10c7x_5", $ = "_checkbox__elem_10c7x_5", B = "_checkbox_style_black_10c7x_8", g = "_isChecked_10c7x_11", y = "_isLightCheck_10c7x_29", E = "_isBlackCheck_10c7x_37", L = "_flex_10c7x_68", c = { checkbox: p, isError: d, checkbox__elem: $, checkbox_style_black: B, isChecked: g, isLightCheck: y, isBlackCheck: E, flex: L }, w = f( ({ children: _, isChecked: e = !1, isBlackCheck: h, isError: k = !1, modifierClassesStyle: l = [""], emitIsChecked: i, onClick: o, isLightCheck: x, flex: r, ...t }, n) => { const a = l.map((b) => c[b]).filter(Boolean).join(" "); return /* @__PURE__ */ m( "label", { className: ` ${c.checkbox} ${a} ${e ? c.isChecked : ""} ${h ? c.isBlackCheck : ""} ${x ? c.isLightCheck : ""} ${k ? c.isError : ""} ${r ? c.flex : ""} `, onClick: () => { o && o(); }, children: [ /* @__PURE__ */ s( "input", { type: "checkbox", ref: n, onChange: () => i(!e), ...t } ), /* @__PURE__ */ s("span", { className: c.checkbox__elem, children: e && /* @__PURE__ */ s( C, { name: "check", size: "20" } ) }), _ ] } ); } ); export { w as CheckBoxOld };