prometeo-design-system 2.7.7 → 2.7.9

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.
@@ -1,9 +1,9 @@
1
1
  import { j as a } from "./jsx-runtime-DKDX3adD.js";
2
- import { Icons as x } from "./Icons.es.js";
3
- import { memo as b, forwardRef as m, useId as k, useRef as g, useCallback as v } from "react";
4
- const s = m(
5
- ({ className: l, disabled: e, ...t }, r) => {
6
- const i = k(), o = g(null), d = `
2
+ import { Icons as m } from "./Icons.es.js";
3
+ import { memo as k, forwardRef as g, useId as v, useRef as C, useCallback as y } from "react";
4
+ const s = g(
5
+ ({ className: l, disabled: e, onChange: i, value: d, ...t }, r) => {
6
+ const u = v(), o = C(null), f = `
7
7
  after:content-[""]
8
8
  after:absolute
9
9
  after:top-1/2
@@ -25,16 +25,16 @@ const s = m(
25
25
  transition-all
26
26
  duration-200
27
27
  ease-in-out
28
- `, u = "hover:#hover-span:opacity-100", f = "bg-primary-light", h = `
28
+ `, h = "hover:#hover-span:opacity-100", p = "bg-primary-light", x = `
29
29
  bg-transparent
30
30
  border-[2px]
31
31
  aria-checked:border-none
32
32
  border-neutral-medium-default
33
33
  hover:border-neutral-medium-hover
34
- `, p = {
34
+ `, b = {
35
35
  selected: "bg-primary-default-disabled!",
36
36
  default: "border-neutral-default-disabled "
37
- }, c = v(() => {
37
+ }, c = y(() => {
38
38
  if (o.current)
39
39
  return o.current.click();
40
40
  }, []);
@@ -57,10 +57,10 @@ const s = m(
57
57
  id: "checkbox-box",
58
58
  "aria-checked": t.checked,
59
59
  className: `grid place-items-center absolute size-[18px] rounded-[2px]
60
- ${d}
61
- ${h}
62
- ${t.checked ? f : ""}
63
- ${e ? p[t.checked ? "selected" : "default"] : ""}
60
+ ${f}
61
+ ${x}
62
+ ${t.checked ? p : ""}
63
+ ${e ? b[t.checked ? "selected" : "default"] : ""}
64
64
  `,
65
65
  onClick: c,
66
66
  draggable: !1,
@@ -69,11 +69,13 @@ const s = m(
69
69
  "input",
70
70
  {
71
71
  type: "checkbox",
72
- id: i,
72
+ id: u,
73
73
  ref: (n) => {
74
74
  o.current = n, typeof r == "function" ? r(n) : r && (r.current = n);
75
75
  },
76
- className: `${l} ${u}`,
76
+ onChange: i,
77
+ value: d,
78
+ className: `${l} ${h}`,
77
79
  disabled: e,
78
80
  style: {
79
81
  position: "absolute",
@@ -90,7 +92,7 @@ const s = m(
90
92
  }
91
93
  ),
92
94
  t.checked && /* @__PURE__ */ a.jsx(
93
- x.Check,
95
+ m.Check,
94
96
  {
95
97
  size: 18,
96
98
  className: `absolute ${e ? "icon-neutral-strong-disabled" : ""} pointer-events-none icon-neutral-strong-default`
@@ -104,7 +106,7 @@ const s = m(
104
106
  }
105
107
  );
106
108
  s.displayName = "CheckBox";
107
- const N = b(s);
109
+ const I = k(s);
108
110
  export {
109
- N as default
111
+ I as default
110
112
  };
@@ -3,5 +3,9 @@ export type CheckBoxProps = {
3
3
  className?: string;
4
4
  disabled?: boolean;
5
5
  } & HTMLProps<HTMLInputElement>;
6
- declare const _default: import('react').NamedExoticComponent<Omit<CheckBoxProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
6
+ interface ICheckBox extends CheckBoxProps {
7
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
8
+ value?: string;
9
+ }
10
+ declare const _default: import('react').NamedExoticComponent<Omit<ICheckBox, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
7
11
  export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "2.7.7",
4
+ "version": "2.7.9",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",