prometeo-design-system 4.9.0 → 4.9.2

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.
Files changed (2) hide show
  1. package/dist/CheckBox.es.js +25 -24
  2. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import { j as a } from "./jsx-runtime-GkKLlHH4.js";
2
- import { c as C } from "./cn-B6yFEsav.js";
3
- import { memo as y, forwardRef as j, useId as I, useRef as z, useState as N, useImperativeHandle as w } from "react";
2
+ import { c as j } from "./cn-B6yFEsav.js";
3
+ import { memo as I, forwardRef as z, useId as B, useRef as l, useState as N, useImperativeHandle as w } from "react";
4
4
  import { Check as R } from "./Icons/Check.es.js";
5
- const l = j(
6
- ({ className: c, disabled: e, onChange: o, value: d, checked: n, ...f }, u) => {
7
- const p = I(), s = z(null), i = n !== void 0, [h, m] = N(!1), t = i ? n : h;
8
- w(u, () => s.current, []);
9
- const x = (r) => {
10
- o && o(r), i || m(r.target.checked);
11
- }, b = `
5
+ const c = z(
6
+ ({ className: d, disabled: e, onChange: o, value: f, checked: n, defaultChecked: u, ...p }, h) => {
7
+ const m = B(), s = l(null), i = l(n !== void 0).current, [x, b] = N(!!u), t = i ? n : x;
8
+ w(h, () => s.current, []);
9
+ const g = (r) => {
10
+ o && o(r), i || b(r.target.checked);
11
+ }, k = `
12
12
  after:content-[""]
13
13
  after:absolute
14
14
  after:top-1/2
@@ -31,7 +31,7 @@ const l = j(
31
31
  transition-all
32
32
  duration-200
33
33
  ease-in-out
34
- `, g = "bg-primary-light", v = `
34
+ `, v = "bg-primary-light", C = `
35
35
  bg-transparent
36
36
  border-[2px]
37
37
  aria-checked:border-none
@@ -40,7 +40,7 @@ const l = j(
40
40
  transition-all
41
41
  duration-200
42
42
  ease-in-out
43
- `, k = {
43
+ `, y = {
44
44
  selected: "bg-primary-default-disabled",
45
45
  default: "border-neutral-default-disabled"
46
46
  };
@@ -59,13 +59,13 @@ const l = j(
59
59
  "div",
60
60
  {
61
61
  "aria-checked": t,
62
- className: C(
62
+ className: j(
63
63
  "grid place-items-center absolute size-[18px] rounded-[2px]",
64
- b,
65
- v,
66
- t ? g : "",
67
- e && k[t ? "selected" : "default"],
68
- c
64
+ k,
65
+ C,
66
+ t ? v : "",
67
+ e && y[t ? "selected" : "default"],
68
+ d
69
69
  ),
70
70
  draggable: !1,
71
71
  children: [
@@ -73,12 +73,13 @@ const l = j(
73
73
  "input",
74
74
  {
75
75
  type: "checkbox",
76
- id: p,
76
+ id: m,
77
77
  ref: (r) => {
78
78
  s.current = r;
79
79
  },
80
- onChange: x,
81
- value: d,
80
+ onChange: g,
81
+ value: f,
82
+ checked: !!t,
82
83
  disabled: e,
83
84
  style: {
84
85
  position: "absolute",
@@ -91,7 +92,7 @@ const l = j(
91
92
  opacity: 0,
92
93
  zIndex: 150
93
94
  },
94
- ...f
95
+ ...p
95
96
  }
96
97
  ),
97
98
  t && /* @__PURE__ */ a.jsx(
@@ -108,8 +109,8 @@ const l = j(
108
109
  );
109
110
  }
110
111
  );
111
- l.displayName = "CheckBox";
112
- const E = y(l);
112
+ c.displayName = "CheckBox";
113
+ const S = I(c);
113
114
  export {
114
- E as default
115
+ S as default
115
116
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "4.9.0",
4
+ "version": "4.9.2",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",