prometeo-design-system 2.7.8 → 2.8.1

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 (43) hide show
  1. package/dist/Button.es.js +5 -5
  2. package/dist/{CardProfile-WHoeSibd.js → CardProfile-CHUivLbW.js} +28 -28
  3. package/dist/CardProfile.es.js +1 -1
  4. package/dist/CheckBox.es.js +60 -60
  5. package/dist/CheckboxFormik.es.js +2 -2
  6. package/dist/DatePicker.es.js +68 -68
  7. package/dist/DrawerDesktop.es.js +9 -9
  8. package/dist/DropZone.es.js +32 -32
  9. package/dist/FAButton.es.js +2 -2
  10. package/dist/HelperComponent-CcGxM09g.js +24 -0
  11. package/dist/Icons/Icons.d.ts +2 -2
  12. package/dist/Icons-ChYkaR8R.js +899 -0
  13. package/dist/Icons.es.js +2 -951
  14. package/dist/{ImageGallery-WKzUevOQ.js → ImageGallery-TkgHO3JL.js} +43 -43
  15. package/dist/ImageGallery.es.js +1 -1
  16. package/dist/{Input-D6as6xD-.js → Input-CsNlU1Hu.js} +67 -74
  17. package/dist/Input.es.js +1 -1
  18. package/dist/InputFormik.es.js +58 -58
  19. package/dist/InputFormikV2.es.js +1 -1
  20. package/dist/InputMultiple.es.js +51 -51
  21. package/dist/Logo.es.js +3 -3
  22. package/dist/Menu.es.js +2 -2
  23. package/dist/OtpInput.es.js +68 -68
  24. package/dist/Pagination.es.js +1 -1
  25. package/dist/RadioButton.es.js +1 -1
  26. package/dist/{Select-sdfP2TL0.js → Select-D7Cs1OlG.js} +4 -4
  27. package/dist/Select.es.js +1 -1
  28. package/dist/SelectFormik.es.js +1 -1
  29. package/dist/SelectFormikLegacy.es.js +23 -23
  30. package/dist/SelectSearch.es.js +1 -1
  31. package/dist/Steps.es.js +14 -14
  32. package/dist/TabLinks.es.js +2 -2
  33. package/dist/Table.es.js +2 -2
  34. package/dist/Toast.es.js +23 -23
  35. package/dist/Tooltip.es.js +7 -7
  36. package/dist/components/CheckBox/CheckBox.d.ts +5 -4
  37. package/dist/components/Toaster/Toaster.d.ts +3 -3
  38. package/dist/exports/Icons.d.ts +1 -1
  39. package/dist/prometeo-design-system.css +1 -1
  40. package/dist/prometeo-design-system.es.js +125 -126
  41. package/package.json +2 -5
  42. package/dist/HelperComponent-BeNlTMqI.js +0 -24
  43. package/dist/components/Spinner/SpinnerV2.d.ts +0 -12
@@ -1,11 +1,11 @@
1
1
  import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
- import Q, { memo as M, forwardRef as A, useRef as v, useEffect as ee, useCallback as i, useState as R, useImperativeHandle as te } from "react";
2
+ import ee, { memo as D, forwardRef as L, useRef as v, useEffect as te, useCallback as i, useState as R, useImperativeHandle as ne } from "react";
3
3
  import { c as X } from "./cn-B6yFEsav.js";
4
- import { u as ne } from "./useDragScroll-CHN9OMwn.js";
4
+ import { u as re } from "./useDragScroll-CHN9OMwn.js";
5
5
  import S from "./Button.es.js";
6
- import { Close as re, CrevronLeft as se, CrevronRight as ae } from "./Icons.es.js";
7
- const L = M(A(({ images: n, className: c }, r) => {
8
- const { ref: d, bind: a } = ne({
6
+ import { I as M } from "./Icons-ChYkaR8R.js";
7
+ const O = D(L(({ images: n, className: c }, r) => {
8
+ const { ref: d, bind: a } = re({
9
9
  axis: "x",
10
10
  friction: 0.9,
11
11
  minVelocity: 0.5,
@@ -27,7 +27,7 @@ const L = M(A(({ images: n, className: c }, r) => {
27
27
  onPointerCancel: a.onPointerCancel,
28
28
  onClickCapture: a.onClickCapture,
29
29
  "aria-label": "Image gallery",
30
- children: n && n.length > 0 && n.map((l, o) => Q.cloneElement(l, {
30
+ children: n && n.length > 0 && n.map((l, o) => ee.cloneElement(l, {
31
31
  key: l.props.src || o,
32
32
  ...l.props,
33
33
  galleryRef: r,
@@ -36,8 +36,8 @@ const L = M(A(({ images: n, className: c }, r) => {
36
36
  }
37
37
  );
38
38
  }));
39
- L.displayName = "GalleryPreview";
40
- const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails: d, thumbnailsClassName: a, currentIndex: l, goToNext: o, goToPrevious: s, goToIndex: N }) => {
39
+ O.displayName = "GalleryPreview";
40
+ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails: d, thumbnailsClassName: a, currentIndex: l, goToNext: o, goToPrevious: s, goToIndex: N }) => {
41
41
  const h = v(null), y = v(null), w = v(null), m = v({
42
42
  scale: 1,
43
43
  translateX: 0,
@@ -49,23 +49,23 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
49
49
  distanceX: 0,
50
50
  distanceY: 0
51
51
  });
52
- ee(() => {
52
+ te(() => {
53
53
  w.current && w.current.focus();
54
54
  }, []);
55
55
  const k = i((e) => {
56
56
  e.preventDefault(), e.stopPropagation(), e.key === "Escape" ? r() : e.key === "ArrowLeft" ? s() : e.key === "ArrowRight" && o();
57
- }, [r, s, o]), P = i((e) => {
57
+ }, [r, s, o]), I = i((e) => {
58
58
  u.current = { startX: e.touches[0].clientX, startY: e.touches[0].clientY, isDragging: !0, distanceX: 0, distanceY: 0 };
59
59
  }, []), j = i((e) => {
60
60
  const g = e.touches[0];
61
61
  u.current = { ...u.current, isDragging: !0, distanceX: g.clientX - u.current.startX, distanceY: g.clientY - u.current.startY };
62
- }, []), z = i(() => {
62
+ }, []), P = i(() => {
63
63
  u.current = { ...u.current, startX: 0, startY: 0, isDragging: !1 }, Math.abs(u.current.distanceX) > Math.abs(u.current.distanceY) && (u.current.distanceX < 0 ? o() : s());
64
64
  }, [o, s]), C = i(() => {
65
65
  const e = h.current;
66
66
  if (!e) return;
67
- const { scale: g, translateX: p, translateY: I } = m.current;
68
- e.style.transform = `scale(${g}) translate(${p}px, ${I}px)`, e.style.transformOrigin = "center center", e.style.transition = "transform 0.1s ease-out";
67
+ const { scale: g, translateX: p, translateY: z } = m.current;
68
+ e.style.transform = `scale(${g}) translate(${p}px, ${z}px)`, e.style.transformOrigin = "center center", e.style.transition = "transform 0.1s ease-out";
69
69
  }, []), b = i(() => {
70
70
  m.current = { scale: 1, translateX: 0, translateY: 0 }, h.current && (h.current.style.transform = "scale(1) translate(0px, 0px)", h.current.style.transformOrigin = "center center");
71
71
  }, []), f = i((e) => {
@@ -75,17 +75,17 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
75
75
  e.deltaY < 0 ? o() : e.deltaY > 0 && s();
76
76
  return;
77
77
  }
78
- const I = 2e-3, D = 1, B = 8, F = -e.deltaY * I, E = m.current.scale;
79
- let x = E + F;
80
- if (x = Math.max(D, Math.min(B, x)), x === D) {
78
+ const z = 2e-3, E = 1, F = 8, G = -e.deltaY * z, T = m.current.scale;
79
+ let x = T + G;
80
+ if (x = Math.max(E, Math.min(F, x)), x === E) {
81
81
  b();
82
82
  return;
83
83
  }
84
- const Y = p.getBoundingClientRect(), G = e.clientX - Y.left, W = e.clientY - Y.top, H = Y.width / 2, K = Y.height / 2, $ = G - H, q = W - K, T = x / E, U = m.current.translateX, V = m.current.translateY, Z = U - $ * (T - 1) / x, J = V - q * (T - 1) / x;
84
+ const Y = p.getBoundingClientRect(), W = e.clientX - Y.left, H = e.clientY - Y.top, K = Y.width / 2, $ = Y.height / 2, q = W - K, U = H - $, A = x / T, V = m.current.translateX, Z = m.current.translateY, J = V - q * (A - 1) / x, Q = Z - U * (A - 1) / x;
85
85
  m.current = {
86
86
  scale: x,
87
- translateX: Z,
88
- translateY: J
87
+ translateX: J,
88
+ translateY: Q
89
89
  }, C();
90
90
  }, [o, s, C, b]);
91
91
  return n.length === 0 ? null : /* @__PURE__ */ t.jsxs(
@@ -95,9 +95,9 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
95
95
  className: X("fixed inset-0 z-50 bg-black/90 flex items-center justify-center lg:px-16", c),
96
96
  onClick: r,
97
97
  onKeyDown: k,
98
- onTouchStart: P,
98
+ onTouchStart: I,
99
99
  onTouchMove: j,
100
- onTouchEnd: z,
100
+ onTouchEnd: P,
101
101
  tabIndex: 0,
102
102
  role: "dialog",
103
103
  "aria-modal": "true",
@@ -109,9 +109,9 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
109
109
  color: "secondary",
110
110
  size: "small",
111
111
  onClick: r,
112
- className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
112
+ className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
113
113
  "aria-label": "Close gallery",
114
- children: /* @__PURE__ */ t.jsx(re, { size: 24 })
114
+ children: /* @__PURE__ */ t.jsx(M.Close, { size: 24 })
115
115
  }
116
116
  ) }),
117
117
  n.length > 1 && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
@@ -131,9 +131,9 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
131
131
  onClick: (e) => {
132
132
  e.stopPropagation(), s();
133
133
  },
134
- className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
134
+ className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
135
135
  "aria-label": "Previous image",
136
- children: /* @__PURE__ */ t.jsx(se, { size: 24 })
136
+ children: /* @__PURE__ */ t.jsx(M.CrevronLeft, { size: 24 })
137
137
  }
138
138
  )
139
139
  }
@@ -154,9 +154,9 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
154
154
  onClick: (e) => {
155
155
  e.stopPropagation(), o();
156
156
  },
157
- className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
157
+ className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
158
158
  "aria-label": "Next image",
159
- children: /* @__PURE__ */ t.jsx(ae, { size: 24 })
159
+ children: /* @__PURE__ */ t.jsx(M.CrevronRight, { size: 24 })
160
160
  }
161
161
  )
162
162
  }
@@ -194,7 +194,7 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
194
194
  )
195
195
  }
196
196
  ),
197
- d && /* @__PURE__ */ t.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-100 bottom-0", children: /* @__PURE__ */ t.jsx(_, { images: n, currentIndex: l, goToIndex: N, thumbnailsClassName: a }) }),
197
+ d && /* @__PURE__ */ t.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-[100] bottom-0", children: /* @__PURE__ */ t.jsx(B, { images: n, currentIndex: l, goToIndex: N, thumbnailsClassName: a }) }),
198
198
  n.length > 1 && /* @__PURE__ */ t.jsxs("div", { className: "absolute bottom-20 left-1/2 transform -translate-x-1/2 text-neutral-default-default prometeo-fonts-label-xlarge px-4 py-2 rounded-full", children: [
199
199
  l + 1,
200
200
  " / ",
@@ -204,13 +204,13 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
204
204
  }
205
205
  );
206
206
  });
207
- O.displayName = "LightBox";
208
- const le = (n, c) => {
207
+ _.displayName = "LightBox";
208
+ const se = (n, c) => {
209
209
  if (n.currentIndex !== c.currentIndex || n.thumbnailsClassName !== c.thumbnailsClassName || n.images.length !== c.images.length) return !1;
210
210
  for (let r = 0; r < n.images.length; r++)
211
211
  if (n.images[r].src !== c.images[r].src) return !1;
212
212
  return !0;
213
- }, _ = M(({ images: n, currentIndex: c, goToIndex: r, thumbnailsClassName: d }) => /* @__PURE__ */ t.jsxs(
213
+ }, B = D(({ images: n, currentIndex: c, goToIndex: r, thumbnailsClassName: d }) => /* @__PURE__ */ t.jsxs(
214
214
  "div",
215
215
  {
216
216
  className: "flex gap-4 w-max overflow-x-auto overflow-y-visible max-w-full px-16 py-4",
@@ -250,9 +250,9 @@ const le = (n, c) => {
250
250
  ))
251
251
  ]
252
252
  }
253
- ), le);
254
- _.displayName = "Thumbnails";
255
- const oe = A(
253
+ ), se);
254
+ B.displayName = "Thumbnails";
255
+ const ae = L(
256
256
  (n, c) => {
257
257
  const {
258
258
  children: r,
@@ -262,15 +262,15 @@ const oe = A(
262
262
  thumbnailsClassName: o
263
263
  } = n, [s, N] = R([]), [h, y] = R(!1), [w, m] = R(0), u = r ? Array.isArray(r) ? r : [r] : [], k = i((f) => {
264
264
  N((e) => e.some((p) => p.src === f.src) ? e : [...e, f]);
265
- }, []), P = i((f = 0) => {
265
+ }, []), I = i((f = 0) => {
266
266
  m(f), y(!0);
267
267
  }, []), j = i(() => {
268
268
  y(!1);
269
269
  }, []);
270
- te(
270
+ ne(
271
271
  c,
272
272
  () => ({
273
- openLightbox: P,
273
+ openLightbox: I,
274
274
  closeLightbox: j,
275
275
  isOpen: h,
276
276
  addImage: k,
@@ -278,7 +278,7 @@ const oe = A(
278
278
  }),
279
279
  [s]
280
280
  );
281
- const z = i(() => {
281
+ const P = i(() => {
282
282
  m((f) => (f + 1) % s.length);
283
283
  }, [s.length]), C = i(() => {
284
284
  m((f) => (f - 1 + s.length) % s.length);
@@ -287,7 +287,7 @@ const oe = A(
287
287
  }, []);
288
288
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
289
289
  /* @__PURE__ */ t.jsx(
290
- L,
290
+ O,
291
291
  {
292
292
  images: u,
293
293
  className: d,
@@ -295,7 +295,7 @@ const oe = A(
295
295
  }
296
296
  ),
297
297
  h && /* @__PURE__ */ t.jsx(
298
- O,
298
+ _,
299
299
  {
300
300
  images: s,
301
301
  closeLightbox: j,
@@ -303,7 +303,7 @@ const oe = A(
303
303
  lightboxClassName: a,
304
304
  thumbnailsClassName: o,
305
305
  currentIndex: w,
306
- goToNext: z,
306
+ goToNext: P,
307
307
  goToPrevious: C,
308
308
  goToIndex: b
309
309
  }
@@ -311,7 +311,7 @@ const oe = A(
311
311
  ] });
312
312
  }
313
313
  );
314
- oe.displayName = "ImageGallery";
314
+ ae.displayName = "ImageGallery";
315
315
  export {
316
- oe as I
316
+ ae as I
317
317
  };
@@ -1,4 +1,4 @@
1
- import { I as p } from "./ImageGallery-WKzUevOQ.js";
1
+ import { I as p } from "./ImageGallery-TkgHO3JL.js";
2
2
  import { useRef as u, useCallback as r } from "react";
3
3
  const g = () => {
4
4
  const e = u(null), t = r((a) => {
@@ -1,11 +1,10 @@
1
1
  import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
+ import { E as _, a as q, C as V } from "./Icons-ChYkaR8R.js";
2
3
  import { c as t } from "./cn-B6yFEsav.js";
3
- import { useRef as _, useLayoutEffect as q, memo as V, forwardRef as F, useState as ee } from "react";
4
- import te from "./Spinner.es.js";
5
- import { H as re } from "./HelperComponent-BeNlTMqI.js";
6
- import oe from "./Button.es.js";
7
- import { EyeVisibility as le, EyeVisibilityOff as se, Close as ae } from "./Icons.es.js";
8
- const ne = (o) => {
4
+ import { useRef as F, useLayoutEffect as ee, memo as te, forwardRef as re, useState as oe } from "react";
5
+ import le from "./Spinner.es.js";
6
+ import { H as se } from "./HelperComponent-CcGxM09g.js";
7
+ const ae = (o) => {
9
8
  let e = o;
10
9
  for (; e && e !== document.body; ) {
11
10
  const n = window.getComputedStyle(e).backgroundColor;
@@ -16,11 +15,11 @@ const ne = (o) => {
16
15
  const l = window.getComputedStyle(document.body).backgroundColor;
17
16
  return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
18
17
  };
19
- function ue() {
20
- const o = _(null);
21
- return q(() => {
18
+ function ne() {
19
+ const o = F(null);
20
+ return ee(() => {
22
21
  if (!o.current || !o.current.parentElement) return;
23
- const e = ne(o.current.parentElement);
22
+ const e = ae(o.current.parentElement);
24
23
  o.current.style.backgroundColor = e;
25
24
  }, []), {
26
25
  ref: o
@@ -60,40 +59,40 @@ const b = {
60
59
  label: t("text-success", "peer-focus:text-success-light"),
61
60
  icon: t("text-success-light", "peer-focus:text-success-light")
62
61
  }
63
- }, S = F(
62
+ }, S = re(
64
63
  ({
65
64
  label: o,
66
65
  icon: e,
67
66
  iconPosition: l = "left",
68
- onChange: z,
67
+ onChange: C,
69
68
  value: n,
70
69
  name: g,
71
- width: m = "100%",
70
+ width: x = "100%",
72
71
  height: u,
73
72
  variant: c = "default",
74
73
  labelVariant: a = "default",
75
74
  size: H = "medium",
76
- disabled: x = !1,
75
+ disabled: f = !1,
77
76
  type: s = "text",
78
- isFetching: f,
77
+ isFetching: p,
79
78
  errorComponent: h,
80
79
  helperComponent: w,
81
- placeholder: I,
82
- required: C = !1,
83
- onFocus: $,
84
- onBlur: k,
85
- onKeyDown: B,
86
- onKeyUp: L,
87
- className: R,
80
+ placeholder: $,
81
+ required: N = !1,
82
+ onFocus: k,
83
+ onBlur: I,
84
+ onKeyDown: L,
85
+ onKeyUp: R,
86
+ className: B,
88
87
  style: P,
89
88
  readOnly: D = !1,
90
- onClear: N,
91
- ...v
89
+ onClear: z,
90
+ ...E
92
91
  }, A) => {
93
- const [y, M] = ee(!1), { ref: O } = ue();
94
- let p = H;
95
- u && (p = "customHeight");
96
- const d = {
92
+ const [y, M] = oe(!1), { ref: O } = ne();
93
+ let d = H;
94
+ u && (d = "customHeight");
95
+ const i = {
97
96
  small: {
98
97
  container: "text-sm",
99
98
  input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
@@ -125,18 +124,18 @@ const b = {
125
124
  }, T = () => {
126
125
  M(!y);
127
126
  }, j = {};
128
- m && m !== "100%" && (j.width = m), u && (j.height = u);
129
- const E = c === "error" && h, G = !E && w, J = s === "password", K = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${i ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "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 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${i ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, Q = () => u ? d.customHeight.label : d[p].label, U = () => u ? { height: u } : {}, W = () => a === "default" ? o : I || o || "", X = () => J ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Y = a === "default" && "transition-all duration-200 ease-in-out", i = h || w;
127
+ x && x !== "100%" && (j.width = x), u && (j.height = u);
128
+ const v = c === "error" && h, G = !v && w, J = s === "password", K = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "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 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, Q = () => u ? i.customHeight.label : i[d].label, U = () => u ? { height: u } : {}, W = () => a === "default" ? o : $ || o || "", X = () => J ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Y = a === "default" && "transition-all duration-200 ease-in-out", m = h || w;
130
129
  return /* @__PURE__ */ r.jsxs(
131
130
  "div",
132
131
  {
133
132
  className: t(
134
133
  "relative",
135
- d[p].container,
136
- !m && "w-full",
134
+ i[d].container,
135
+ !x && "w-full",
137
136
  "bg-inherit",
138
137
  a === "static" && "mt-2",
139
- R
138
+ B
140
139
  ),
141
140
  style: { ...P, ...j },
142
141
  children: [
@@ -155,23 +154,23 @@ const b = {
155
154
  a === "default" && "placeholder:text-transparent",
156
155
  a === "static" && "placeholder:text-neutral-medium-default ",
157
156
  b[c].input,
158
- d[p].input,
157
+ i[d].input,
159
158
  e && "pr-10",
160
- x && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
159
+ f && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
161
160
  b[c].container,
162
161
  X()
163
162
  ),
164
163
  style: U(),
165
- onChange: z,
166
- onFocus: $,
167
- onBlur: k,
168
- disabled: x,
169
- required: C,
170
- onKeyDown: B,
171
- onKeyUp: L,
172
- defaultValue: v.defaultValue,
164
+ onChange: C,
165
+ onFocus: k,
166
+ onBlur: I,
167
+ disabled: f,
168
+ required: N,
169
+ onKeyDown: L,
170
+ onKeyUp: R,
171
+ defaultValue: E.defaultValue,
173
172
  readOnly: D,
174
- ...v
173
+ ...E
175
174
  }
176
175
  ),
177
176
  /* @__PURE__ */ r.jsx(
@@ -185,56 +184,50 @@ const b = {
185
184
  Q(),
186
185
  b[c].label,
187
186
  K(),
188
- C && "after:content-['*'] after:text-error-default after:ml-1",
189
- x && "text-neutral-medium-disabled prometeo-fonts-label-large"
187
+ N && "after:content-['*'] after:text-error-default after:ml-1",
188
+ f && "text-neutral-medium-disabled prometeo-fonts-label-large"
190
189
  ),
191
190
  children: o
192
191
  }
193
192
  ),
194
- (e || s === "password" || f) && /* @__PURE__ */ r.jsx(
193
+ (e || s === "password" || p) && /* @__PURE__ */ r.jsx(
195
194
  "button",
196
195
  {
197
196
  tabIndex: -1,
198
197
  type: "button",
199
198
  className: t(
200
- `absolute ${i ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
201
- d[p].icon,
199
+ `absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
200
+ i[d].icon,
202
201
  b[c].icon,
203
- s === "password" && !f ? "cursor-pointer" : "pointer-events-none",
202
+ s === "password" && !p ? "cursor-pointer" : "pointer-events-none",
204
203
  l === "right" ? "right-3" : "left-3"
205
204
  ),
206
- onClick: s === "password" && !f ? T : void 0,
207
- onMouseDown: (Z) => s === "password" && !f && Z.preventDefault(),
205
+ onClick: s === "password" && !p ? T : void 0,
206
+ onMouseDown: (Z) => s === "password" && !p && Z.preventDefault(),
208
207
  children: /* @__PURE__ */ r.jsxs("div", { children: [
209
- f && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(te, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
210
- s === "password" && (y ? /* @__PURE__ */ r.jsx(le, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(se, { size: 24, className: "" })),
208
+ p && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(le, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
209
+ s === "password" && (y ? /* @__PURE__ */ r.jsx(_, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(q, { size: 24, className: "" })),
211
210
  e
212
211
  ] })
213
212
  }
214
213
  ),
215
- N && /* @__PURE__ */ r.jsx(
216
- oe,
214
+ z && /* @__PURE__ */ r.jsx(
215
+ "button",
217
216
  {
218
217
  type: "button",
219
- color: "secondary",
220
- size: "small",
221
- animate: !1,
222
218
  className: t(
223
- `absolute! ${i ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
224
- "size-6 p-4 ",
225
- "bg-inherit",
226
- "hover:bg-transparent! p-4 rounded-full"
219
+ `absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
220
+ "size-6 p-1 rounded-full",
221
+ "hover:bg-neutral-medium-hover transition-colors",
222
+ f && "opacity-50 cursor-not-allowed"
227
223
  ),
228
- label: "",
229
- disabled: x,
230
- onClick: N,
231
- variant: "text",
232
- animateIcon: !1,
233
- icon: /* @__PURE__ */ r.jsx(ae, { size: 20, className: "" })
224
+ disabled: f,
225
+ onClick: z,
226
+ children: /* @__PURE__ */ r.jsx(V, { size: 20, className: "" })
234
227
  }
235
228
  ),
236
- i && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (E || G) && /* @__PURE__ */ r.jsx(
237
- re,
229
+ m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (v || G) && /* @__PURE__ */ r.jsx(
230
+ se,
238
231
  {
239
232
  className: "absolute ",
240
233
  variant: c,
@@ -247,8 +240,8 @@ const b = {
247
240
  }
248
241
  );
249
242
  S.displayName = "Input";
250
- const be = V(S);
243
+ const me = te(S);
251
244
  export {
252
- be as I,
253
- ue as u
245
+ me as I,
246
+ ne as u
254
247
  };
package/dist/Input.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Input-D6as6xD-.js";
1
+ import { I as f } from "./Input-CsNlU1Hu.js";
2
2
  export {
3
3
  f as default
4
4
  };