prometeo-design-system 1.8.5 → 1.8.6

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/Switch.es.js +22 -23
  2. package/package.json +1 -1
package/dist/Switch.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import { j as e } from "./jsx-runtime-ByW6EXIE.js";
2
- import { c as o } from "./cn-B6yFEsav.js";
1
+ import { j as n } from "./jsx-runtime-ByW6EXIE.js";
2
+ import { c as r } from "./cn-B6yFEsav.js";
3
3
  import { useRef as p } from "react";
4
4
  import { motion as u } from "framer-motion";
5
- const k = ({ name: l, value: r, onChange: c, disabled: t = !1 }) => {
5
+ const x = ({ name: l, value: o, onChange: c, disabled: e = !1 }) => {
6
6
  const a = p(null), d = () => {
7
- if (!a.current || t) return;
7
+ if (!a.current || e) return;
8
8
  const m = !a.current.checked;
9
9
  c(l, m);
10
10
  }, i = {
@@ -45,50 +45,49 @@ const k = ({ name: l, value: r, onChange: c, disabled: t = !1 }) => {
45
45
  off: {
46
46
  width: 16
47
47
  }
48
- }, n = r ? "on" : "off", s = t ? "disabled" : "default";
49
- return /* @__PURE__ */ e.jsxs("div", { children: [
50
- /* @__PURE__ */ e.jsx("input", { type: "checkbox", hidden: !0, ref: a, checked: r, disabled: t }),
51
- /* @__PURE__ */ e.jsx(
48
+ }, t = o ? "on" : "off", s = e ? "disabled" : "default";
49
+ return /* @__PURE__ */ n.jsxs("div", { children: [
50
+ /* @__PURE__ */ n.jsx("input", { type: "checkbox", hidden: !0, ref: a, checked: o, disabled: e }),
51
+ /* @__PURE__ */ n.jsx(
52
52
  "div",
53
53
  {
54
- className: o(
54
+ className: r(
55
55
  "w-14 h-8 rounded-full relative px-2",
56
- i[n][s].container
56
+ i[t][s].container
57
57
  ),
58
- children: /* @__PURE__ */ e.jsx(
58
+ children: /* @__PURE__ */ n.jsx(
59
59
  u.span,
60
60
  {
61
61
  onClick: d,
62
- animate: f[n],
63
- whileHover: t ? {} : {
64
- background: n === "off" ? "rgba(29, 27, 32, 0.08)" : "rgba(101, 85, 143, 0.12)"
62
+ animate: f[t],
63
+ whileHover: e ? {} : {
64
+ background: t === "off" ? "rgba(29, 27, 32, 0.08)" : "rgba(101, 85, 143, 0.12)"
65
65
  },
66
- className: o(
66
+ className: r(
67
67
  "absolute top-1/2 -translate-y-1/2 grid place-items-center ",
68
68
  "size-10 aspect-square rounded-full absolute top-1/2 -translate-y-1/2",
69
69
  "cursor-pointer"
70
70
  ),
71
- children: /* @__PURE__ */ e.jsx(
71
+ children: /* @__PURE__ */ n.jsx(
72
72
  u.span,
73
73
  {
74
- animate: h[n],
75
- whileTap: t ? {} : {
74
+ animate: h[t],
75
+ whileTap: e ? {} : {
76
76
  width: 28,
77
77
  height: 28
78
78
  },
79
- className: o(
79
+ className: r(
80
80
  "size-4 aspect-square rounded-full z-10",
81
- i[n][s].dot
81
+ i[t][s].dot
82
82
  )
83
83
  }
84
84
  )
85
85
  }
86
86
  )
87
87
  }
88
- ),
89
- /* @__PURE__ */ e.jsx("p", { children: r ? "on" : "off" })
88
+ )
90
89
  ] });
91
90
  };
92
91
  export {
93
- k as Switch
92
+ x as Switch
94
93
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prometeo-design-system",
3
3
  "private": false,
4
- "version": "1.8.5",
4
+ "version": "1.8.6",
5
5
  "type": "module",
6
6
  "description": "design kit system",
7
7
  "main": "dist/prometeo-design-system.umd.js",