prometeo-design-system 2.6.2 → 2.6.4

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,7 +1,7 @@
1
1
  import { j as q } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import m, { createContext as mn, useContext as hn, useCallback as R, useRef as Se, useLayoutEffect as yn, useState as he, useEffect as _e, useMemo as fe, memo as pn } from "react";
3
3
  import { InputMultiple as gn } from "./InputMultiple.es.js";
4
- import { I as wn } from "./Input-r2N9xkjM.js";
4
+ import { I as wn } from "./Input-BsGk4qj1.js";
5
5
  import { createPortal as bn } from "react-dom";
6
6
  import { Icons as Mt } from "./Icons.es.js";
7
7
  import { c as Be } from "./cn-B6yFEsav.js";
@@ -40,7 +40,7 @@ const C = h(
40
40
  }
41
41
  );
42
42
  C.displayName = "Dialog";
43
- const b = s(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: /* @__PURE__ */ o.jsx("div", { className: j("flex flex-col gap-4"), children: e }) }));
43
+ const b = s(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: /* @__PURE__ */ o.jsx("div", { className: j("flex flex-col gap-4 h-full"), children: e }) }));
44
44
  b.displayName = "DialogContent";
45
45
  const N = s(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("h1", { className: t, children: e }));
46
46
  N.displayName = "DialogTitle";
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "./jsx-runtime-ByW6EXIE.js";
2
- import { Icons as R } from "./Icons.es.js";
2
+ import { Icons as k } from "./Icons.es.js";
3
3
  import { c as r } from "./cn-B6yFEsav.js";
4
- import { useRef as T, useLayoutEffect as me, memo as ge, forwardRef as xe, useState as O, useCallback as be, useEffect as S } from "react";
4
+ import { useRef as T, useLayoutEffect as me, memo as ge, forwardRef as xe, useState as O, useCallback as be, useEffect as B } from "react";
5
5
  import { useDebounce as he } from "use-debounce";
6
6
  import we from "./Spinner.es.js";
7
7
  import { H as ye } from "./HelperComponent-8ErmQ_n9.js";
@@ -91,8 +91,8 @@ const x = {
91
91
  disabled: w = !1,
92
92
  type: n = "text",
93
93
  isFetching: p,
94
- errorComponent: k,
95
- helperComponent: B,
94
+ errorComponent: y,
95
+ helperComponent: j,
96
96
  placeholder: G,
97
97
  required: v = !1,
98
98
  onFocus: J,
@@ -101,13 +101,13 @@ const x = {
101
101
  onKeyDown: Q,
102
102
  onKeyUp: U,
103
103
  className: W,
104
- isActive: y,
104
+ isActive: C,
105
105
  style: X,
106
106
  readOnly: Y = !1,
107
107
  onClear: L,
108
108
  ...Z
109
109
  }, _) => {
110
- const [j, P] = O(l), [C] = he(j, d), [z, q] = O(!1), { ref: A } = ze(), M = T(null), N = _ || null || M;
110
+ const [z, P] = O(l), [N] = he(z, d), [E, q] = O(!1), { ref: A } = ze(), M = T(null), I = _ || null || M;
111
111
  let i = F;
112
112
  c && (i = "customHeight");
113
113
  const m = {
@@ -140,25 +140,25 @@ const x = {
140
140
  icon: "w-6 h-6 right-3"
141
141
  }
142
142
  }, $ = be(b, []);
143
- S(() => {
144
- d > 0 && C !== l && $(C);
145
- }, [C, d, $, l]), S(() => {
143
+ B(() => {
144
+ d > 0 && N !== l && $(N);
145
+ }, [N, d, $, l]), B(() => {
146
146
  P(l);
147
- }, [l]), S(() => {
148
- y && N.current?.focus();
149
- }, [y, N.current?.focus]);
147
+ }, [l]), B(() => {
148
+ C && I.current?.focus();
149
+ }, [C, I.current?.focus]);
150
150
  const ee = (u) => {
151
151
  J?.(u);
152
152
  }, te = (u) => {
153
- y === void 0 && K?.(u);
153
+ C === void 0 && K?.(u);
154
154
  }, re = (u) => {
155
- const I = u.target.value, pe = u.target.name, ie = j;
156
- P(I), ie.length > 0 && I.length === 0 && H?.(), (!d || d === 0) && b(I, pe);
155
+ const S = u.target.value, pe = u.target.name, ie = z;
156
+ P(S), ie.length > 0 && S.length === 0 && H?.(), (!d || d === 0) && b(S, pe);
157
157
  }, oe = () => {
158
- q(!z);
159
- }, E = {};
160
- g && g !== "100%" && (E.width = g), c && (E.height = c);
161
- const D = f === "error" && k, le = !D && B, se = n === "password", ne = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : t ? `peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${s === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : "peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1", ae = () => c ? m.customHeight.label : m[i].label, ue = () => c ? { height: c } : {}, ce = () => a === "default" ? o : G || o || "", fe = () => se ? t ? s === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : t ? s === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", de = a === "default" && "transition-all duration-200 ease-in-out";
158
+ q(!E);
159
+ }, R = {};
160
+ g && g !== "100%" && (R.width = g), c && (R.height = c);
161
+ const D = f === "error" && y, le = !D && j, se = n === "password", ne = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : t ? `peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${s === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : "peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1", ae = () => c ? m.customHeight.label : m[i].label, ue = () => c ? { height: c } : {}, ce = () => a === "default" ? o : G || o || "", fe = () => se ? t ? s === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : t ? s === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", de = a === "default" && "transition-all duration-200 ease-in-out";
162
162
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
163
163
  /* @__PURE__ */ e.jsxs(
164
164
  "div",
@@ -171,17 +171,17 @@ const x = {
171
171
  a === "static" && "mt-2",
172
172
  W
173
173
  ),
174
- style: { ...X, ...E },
174
+ style: { ...X, ...R },
175
175
  children: [
176
176
  /* @__PURE__ */ e.jsx(
177
177
  "input",
178
178
  {
179
179
  id: h,
180
180
  name: h,
181
- ref: N,
182
- value: j,
181
+ ref: I,
182
+ value: z,
183
183
  placeholder: ce(),
184
- type: n === "password" && z ? "text" : n,
184
+ type: n === "password" && E ? "text" : n,
185
185
  className: r(
186
186
  "peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
187
187
  "focus:outline-none px-3",
@@ -238,7 +238,7 @@ const x = {
238
238
  ),
239
239
  onClick: n === "password" && !p ? oe : void 0,
240
240
  onMouseDown: (u) => n === "password" && !p && u.preventDefault(),
241
- children: /* @__PURE__ */ e.jsx("div", { children: p && n !== "password" ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(we, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : n === "password" ? z ? /* @__PURE__ */ e.jsx(R.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ e.jsx(R.EyeVisibilityOff, { size: 24, className: "" }) : t })
241
+ children: /* @__PURE__ */ e.jsx("div", { children: p && n !== "password" ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(we, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : n === "password" ? E ? /* @__PURE__ */ e.jsx(k.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ e.jsx(k.EyeVisibilityOff, { size: 24, className: "" }) : t })
242
242
  }
243
243
  ),
244
244
  L && /* @__PURE__ */ e.jsx(
@@ -256,18 +256,18 @@ const x = {
256
256
  ),
257
257
  label: "",
258
258
  onClick: L,
259
- icon: /* @__PURE__ */ e.jsx(R.Close, { size: 20, className: "" })
259
+ icon: /* @__PURE__ */ e.jsx(k.Close, { size: 20, className: "" })
260
260
  }
261
261
  )
262
262
  ]
263
263
  }
264
264
  ),
265
- /* @__PURE__ */ e.jsx("div", { className: "min-h-6", children: (D || le) && /* @__PURE__ */ e.jsx(
265
+ (y || j) && /* @__PURE__ */ e.jsx("div", { className: "min-h-6", children: (D || le) && /* @__PURE__ */ e.jsx(
266
266
  ye,
267
267
  {
268
268
  className: " absolute",
269
269
  variant: f,
270
- children: k || B
270
+ children: y || j
271
271
  }
272
272
  ) })
273
273
  ] });
package/dist/Input.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Input-r2N9xkjM.js";
1
+ import { I as f } from "./Input-BsGk4qj1.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { j as o } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { FastField as u } from "formik";
3
3
  import { memo as s } from "react";
4
- import { I as i } from "./Input-r2N9xkjM.js";
4
+ import { I as i } from "./Input-BsGk4qj1.js";
5
5
  const c = ({
6
6
  field: r,
7
7
  form: t,