UNPKG

welcome-ui

Version:

Customizable design system with react, typescript, tailwindcss and ariakit.

38 lines (37 loc) 1.03 kB
"use client"; import { jsx as d } from "react/jsx-runtime"; import { C as f } from "./KPUWHTQJ-CKDqSAor.js"; import { forwardRef as l } from "react"; import { useField as g } from "./Field.js"; import { c as p } from "./index-PAaZGbyz.js"; const h = "_root_1rv7m_2", u = "_indeterminate_1rv7m_85", x = { root: h, "variant-danger": "_variant-danger_1rv7m_67", "variant-warning": "_variant-warning_1rv7m_73", "variant-success": "_variant-success_1rv7m_79", indeterminate: u }, k = p(x), j = l( ({ checked: e = !1, className: n, indeterminate: o = !1, onChange: t, variant: i, ...s }, c) => { const { getInputProps: m, variant: _ } = g(), a = _ || i, v = (r) => { r.target.checked = !r.target.checked, t && t(r); }; return /* @__PURE__ */ d( f, { ...m(s), checked: e, className: k( "root", a && `variant-${a}`, o && "indeterminate", n ), onChange: v, ref: c } ); } ); export { j as Checkbox };