@companix/uikit 0.0.66 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@ export interface CheckboxProps {
5
5
  label?: React.ReactNode;
6
6
  disabled?: boolean;
7
7
  required?: boolean;
8
+ className?: string;
8
9
  }
9
- declare const Checkbox: ({ checked, required, disabled, onCheckedChange, size, label }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const Checkbox: (props: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export { Checkbox };
@@ -1,35 +1,36 @@
1
- import { jsxs as x, jsx as o } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-checkbox";
3
- import { Icon as h } from "./bundle.es33.js";
4
- import { faCheck as l } from "@companix/icons-solid";
5
- import { useId as n } from "react";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import b from "classnames";
3
+ import * as s from "@radix-ui/react-checkbox";
4
+ import { Icon as x } from "./bundle.es33.js";
5
+ import { faCheck as k } from "@companix/icons-solid";
6
+ import { useId as f } from "react";
6
7
  import { attr as c } from "@companix/utils-browser";
7
- const u = ({ checked: e, required: m, disabled: r, onCheckedChange: s, size: d, label: a }) => {
8
- const i = n();
9
- return /* @__PURE__ */ x(
8
+ const j = (d) => {
9
+ const { checked: a, className: m, required: t, disabled: o, onCheckedChange: l, size: h, label: r } = d, i = f();
10
+ return /* @__PURE__ */ n(
10
11
  "div",
11
12
  {
12
- className: "checkbox",
13
- "data-size": d ?? "md",
14
- "data-required": c(m && !e),
15
- "data-disabled": c(r),
13
+ className: b("checkbox", m),
14
+ "data-size": h ?? "md",
15
+ "data-required": c(t && !a),
16
+ "data-disabled": c(o),
16
17
  children: [
17
- /* @__PURE__ */ o(
18
- t.Root,
18
+ /* @__PURE__ */ e(
19
+ s.Root,
19
20
  {
20
21
  className: "checkbox-box",
21
- checked: e,
22
- onCheckedChange: s,
23
- disabled: r,
22
+ checked: a,
23
+ onCheckedChange: l,
24
+ disabled: o,
24
25
  id: i,
25
- children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l, size: "xxxs" }) })
26
+ children: /* @__PURE__ */ e(s.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ e(x, { icon: k, size: "xxxs" }) })
26
27
  }
27
28
  ),
28
- a && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: a })
29
+ r && /* @__PURE__ */ e("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(o), children: r })
29
30
  ]
30
31
  }
31
32
  );
32
33
  };
33
34
  export {
34
- u as Checkbox
35
+ j as Checkbox
35
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companix/uikit",
3
- "version": "0.0.66",
3
+ "version": "0.0.67",
4
4
  "main": "./dist/bundle.es.js",
5
5
  "module": "./dist/bundle.es.js",
6
6
  "types": "./dist/index.d.ts",