prometeo-design-system 2.9.6 → 2.9.7

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 (60) hide show
  1. package/dist/Button.es.js +9 -9
  2. package/dist/{CardProfile-CsytJlKZ.js → CardProfile-WHoeSibd.js} +8 -8
  3. package/dist/CardProfile.es.js +1 -1
  4. package/dist/CheckBox.es.js +4 -4
  5. package/dist/DatePicker-CbXUUnv7.js +3568 -0
  6. package/dist/DatePicker.es.js +3 -3439
  7. package/dist/DrawerDesktop.d.ts +6 -0
  8. package/dist/DrawerDesktop.es.js +211 -0
  9. package/dist/DrawerMobile.d.ts +6 -0
  10. package/dist/DrawerMobile.es.js +242 -0
  11. package/dist/DropZone.es.js +5 -5
  12. package/dist/FAButton.es.js +1 -1
  13. package/dist/{HelperComponent-g_xuKWzK.js → HelperComponent-BeNlTMqI.js} +7 -7
  14. package/dist/Icons/Icons.d.ts +1 -1
  15. package/dist/Icons.d.ts +0 -4
  16. package/dist/Icons.es.js +1119 -3
  17. package/dist/Image.es.js +29 -29
  18. package/dist/{ImageGallery-Ckxg9OIC.js → ImageGallery-WKzUevOQ.js} +34 -34
  19. package/dist/ImageGallery.es.js +1 -1
  20. package/dist/{Input-Cck37DpG.js → Input-Cf8P1QJv.js} +30 -31
  21. package/dist/Input.es.js +1 -1
  22. package/dist/InputMultiple.es.js +34 -34
  23. package/dist/Logo.es.js +1 -1
  24. package/dist/OtpInput.es.js +43 -43
  25. package/dist/RadioButton.es.js +1 -1
  26. package/dist/RecurrentDatePicker.d.ts +2 -0
  27. package/dist/RecurrentDatePicker.es.js +694 -0
  28. package/dist/RecurrentDatePickerRRule.d.ts +2 -0
  29. package/dist/RecurrentDatePickerRRule.es.js +1684 -0
  30. package/dist/{Select-BD5FTxVw.js → Select-DeKi15Iu.js} +31 -32
  31. package/dist/Select.es.js +1 -1
  32. package/dist/SelectSearch.es.js +1 -1
  33. package/dist/Spinner.es.js +172 -46
  34. package/dist/Steps.es.js +1 -1
  35. package/dist/Toast.es.js +22 -22
  36. package/dist/Tooltip.es.js +1 -1
  37. package/dist/components/Drawer/DrawerDesktop.d.ts +1 -0
  38. package/dist/components/Drawer/useDrawerDesktop.d.ts +1 -1
  39. package/dist/components/RecurrentDatePicker/PreviewCalendar.d.ts +4 -1
  40. package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +4 -4
  41. package/dist/components/RecurrentDatePicker/RecurrentDatePickerRRule.d.ts +13 -0
  42. package/dist/components/RecurrentDatePicker/recurrentDatePicker.validations.d.ts +3 -3
  43. package/dist/components/Spinner/Spinner.d.ts +6 -6
  44. package/dist/exports/DrawerDesktop.d.ts +4 -0
  45. package/dist/exports/DrawerMobile.d.ts +4 -0
  46. package/dist/exports/Icons.d.ts +1 -2
  47. package/dist/exports/RecurrentDatePicker.d.ts +5 -0
  48. package/dist/exports/RecurrentDatePickerRRule.d.ts +2 -0
  49. package/dist/exports/Spinner.d.ts +2 -1
  50. package/dist/index.d.ts +8 -3
  51. package/dist/prometeo-design-system.es.js +412 -762
  52. package/dist/styles.css +1 -0
  53. package/dist/styles.d.ts +1 -0
  54. package/package.json +19 -6
  55. package/src/styles/app.css +1 -1313
  56. package/src/styles/base.css +1331 -0
  57. package/src/styles/utilities.css +24 -36
  58. package/dist/Icons-DtFC5DJ7.js +0 -1079
  59. package/dist/components/Spinner/SpinnerV2.d.ts +0 -12
  60. package/dist/prometeo-design-system.css +0 -1
package/dist/Image.es.js CHANGED
@@ -1,30 +1,30 @@
1
1
  import { j as n } from "./jsx-runtime-DKDX3adD.js";
2
- import { memo as x, useState as E, useRef as R, useCallback as N, useEffect as b } from "react";
3
- import M from "./Spinner.es.js";
4
- import { c as d } from "./cn-B6yFEsav.js";
5
- import S from "./Skeleton.es.js";
6
- const T = (s, e) => {
2
+ import { memo as P, useState as x, useRef as E, useCallback as w, useEffect as N } from "react";
3
+ import R from "./Spinner.es.js";
4
+ import { c as u } from "./cn-B6yFEsav.js";
5
+ import M from "./Skeleton.es.js";
6
+ const S = (s, e) => {
7
7
  if (s.src !== e.src || s.alt !== e.alt || s.width !== e.width || s.height !== e.height || s.className !== e.className || s.lazy !== e.lazy || s.showLoader !== e.showLoader || s.allowPreview !== e.allowPreview) return !1;
8
8
  const r = s.loaderProps, a = e.loaderProps;
9
9
  return !(r !== a && (!r || !a || r.loaderType !== a.loaderType || r.variant !== a.variant || r.speedMultiplier !== a.speedMultiplier || r.className !== a.className || r.size !== a.size || r.backdropClassName !== a.backdropClassName));
10
- }, D = x(
10
+ }, T = P(
11
11
  (s) => {
12
- const { src: e, alt: r, width: a, height: c, className: f, lazy: y = !0, showLoader: k = !0, loaderProps: I, allowPreview: t = !1, galleryRef: l } = s, { variant: v = "clip", speedMultiplier: j = 0.7, className: z, size: C = 48, backdropClassName: L, loaderType: u = "clasic" } = I || {}, [m, g] = E(!0), h = R(!1), p = N((i) => {
12
+ const { src: e, alt: r, width: a, height: c, className: f, lazy: b = !0, showLoader: y = !0, loaderProps: k, allowPreview: t = !1, galleryRef: l } = s, { variant: I = "clip", speedMultiplier: v = 0.7, className: j, backdropClassName: C, loaderType: d = "clasic" } = k || {}, [L, m] = x(!0), g = E(!1), h = w((i) => {
13
13
  const o = new Image();
14
14
  o.src = i, o.onload = () => {
15
- g(!1);
15
+ m(!1);
16
16
  }, o.onerror = () => {
17
- g(!1);
17
+ m(!1);
18
18
  };
19
19
  }, []);
20
- b(() => {
21
- p(e);
22
- }, [e, p]), b(() => {
23
- l?.current && !h.current && (l.current.addImage({ src: e, alt: r, width: a, height: c, className: f }), h.current = !0);
20
+ N(() => {
21
+ h(e);
22
+ }, [e, h]), N(() => {
23
+ l?.current && !g.current && (l.current.addImage({ src: e, alt: r, width: a, height: c, className: f }), g.current = !0);
24
24
  }, [l, e, r, a, c, f]);
25
- const w = N(() => {
25
+ const p = w(() => {
26
26
  if (t && l?.current) {
27
- const o = l.current.images.findIndex((P) => P.src === e);
27
+ const o = l.current.images.findIndex((z) => z.src === e);
28
28
  l.current.openLightbox(o >= 0 ? o : 0);
29
29
  }
30
30
  }, [t, l, e]);
@@ -33,7 +33,7 @@ const T = (s, e) => {
33
33
  /* @__PURE__ */ n.jsxs(
34
34
  "div",
35
35
  {
36
- className: d(
36
+ className: u(
37
37
  "relative rounded-2xl overflow-hidden select-none",
38
38
  t && l && "cursor-pointer hover:brightness-75 transition-all ease-in-out duration-300",
39
39
  f
@@ -44,11 +44,11 @@ const T = (s, e) => {
44
44
  minWidth: a,
45
45
  minHeight: c
46
46
  },
47
- onClick: w,
47
+ onClick: p,
48
48
  role: t ? "button" : void 0,
49
49
  tabIndex: t ? 0 : void 0,
50
50
  onKeyDown: t ? (i) => {
51
- (i.key === "Enter" || i.key === " ") && (i.preventDefault(), w());
51
+ (i.key === "Enter" || i.key === " ") && (i.preventDefault(), p());
52
52
  } : void 0,
53
53
  children: [
54
54
  /* @__PURE__ */ n.jsx(
@@ -57,21 +57,21 @@ const T = (s, e) => {
57
57
  draggable: !1,
58
58
  src: e,
59
59
  alt: r,
60
- className: d("object-cover", f, "w-full h-full"),
61
- loading: y ? "lazy" : "eager"
60
+ className: u("object-cover", f, "w-full h-full"),
61
+ loading: b ? "lazy" : "eager"
62
62
  }
63
63
  ),
64
- m && k && /* @__PURE__ */ n.jsx(
64
+ L && y && /* @__PURE__ */ n.jsx(
65
65
  "div",
66
66
  {
67
- className: d(
67
+ className: u(
68
68
  "absolute grid place-items-center",
69
69
  "inset-0",
70
- u === "skeleton" ? "bg-inherit" : "bg-black/30",
71
- L
70
+ d === "skeleton" ? "bg-inherit" : "bg-black/30",
71
+ C
72
72
  ),
73
- children: u === "clasic" ? /* @__PURE__ */ n.jsx(M, { variant: v, speedMultiplier: j, loading: m, className: z, size: C }) : /* @__PURE__ */ n.jsx(
74
- S,
73
+ children: d === "clasic" ? /* @__PURE__ */ n.jsx(R, { variant: I, speedMultiplier: v, className: j }) : /* @__PURE__ */ n.jsx(
74
+ M,
75
75
  {
76
76
  className: "w-full h-full z-100"
77
77
  }
@@ -83,9 +83,9 @@ const T = (s, e) => {
83
83
  )
84
84
  );
85
85
  },
86
- T
86
+ S
87
87
  );
88
- D.displayName = "Image";
88
+ T.displayName = "Image";
89
89
  export {
90
- D as default
90
+ T as default
91
91
  };
@@ -3,9 +3,9 @@ import Q, { memo as M, forwardRef as A, useRef as v, useEffect as ee, useCallbac
3
3
  import { c as X } from "./cn-B6yFEsav.js";
4
4
  import { u as ne } from "./useDragScroll-CHN9OMwn.js";
5
5
  import S from "./Button.es.js";
6
- import { a as re, b as ae, c as se } from "./Icons-DtFC5DJ7.js";
6
+ import { Close as re, CrevronLeft as se, CrevronRight as ae } from "./Icons.es.js";
7
7
  const L = M(A(({ images: n, className: c }, r) => {
8
- const { ref: d, bind: s } = ne({
8
+ const { ref: d, bind: a } = ne({
9
9
  axis: "x",
10
10
  friction: 0.9,
11
11
  minVelocity: 0.5,
@@ -20,12 +20,12 @@ const L = M(A(({ images: n, className: c }, r) => {
20
20
  {
21
21
  ref: d,
22
22
  className: X("flex gap-4 w-full overflow-x-auto py-2 relative", c),
23
- onPointerDown: s.onPointerDown,
24
- onPointerMove: s.onPointerMove,
25
- onPointerUp: s.onPointerUp,
26
- onPointerLeave: s.onPointerLeave,
27
- onPointerCancel: s.onPointerCancel,
28
- onClickCapture: s.onClickCapture,
23
+ onPointerDown: a.onPointerDown,
24
+ onPointerMove: a.onPointerMove,
25
+ onPointerUp: a.onPointerUp,
26
+ onPointerLeave: a.onPointerLeave,
27
+ onPointerCancel: a.onPointerCancel,
28
+ onClickCapture: a.onClickCapture,
29
29
  "aria-label": "Image gallery",
30
30
  children: n && n.length > 0 && n.map((l, o) => Q.cloneElement(l, {
31
31
  key: l.props.src || o,
@@ -37,7 +37,7 @@ const L = M(A(({ images: n, className: c }, r) => {
37
37
  );
38
38
  }));
39
39
  L.displayName = "GalleryPreview";
40
- const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails: d, thumbnailsClassName: s, currentIndex: l, goToNext: o, goToPrevious: a, goToIndex: N }) => {
40
+ const O = M(({ 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,
@@ -53,15 +53,15 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
53
53
  w.current && w.current.focus();
54
54
  }, []);
55
55
  const k = i((e) => {
56
- e.preventDefault(), e.stopPropagation(), e.key === "Escape" ? r() : e.key === "ArrowLeft" ? a() : e.key === "ArrowRight" && o();
57
- }, [r, a, o]), P = i((e) => {
56
+ e.preventDefault(), e.stopPropagation(), e.key === "Escape" ? r() : e.key === "ArrowLeft" ? s() : e.key === "ArrowRight" && o();
57
+ }, [r, s, o]), P = 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
62
  }, []), z = i(() => {
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() : a());
64
- }, [o, a]), C = i(() => {
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
+ }, [o, s]), C = i(() => {
65
65
  const e = h.current;
66
66
  if (!e) return;
67
67
  const { scale: g, translateX: p, translateY: I } = m.current;
@@ -72,7 +72,7 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
72
72
  const g = h.current, p = y.current;
73
73
  if (!g || !p) return;
74
74
  if (e.shiftKey) {
75
- e.deltaY < 0 ? o() : e.deltaY > 0 && a();
75
+ e.deltaY < 0 ? o() : e.deltaY > 0 && s();
76
76
  return;
77
77
  }
78
78
  const I = 2e-3, D = 1, B = 8, F = -e.deltaY * I, E = m.current.scale;
@@ -87,7 +87,7 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
87
87
  translateX: Z,
88
88
  translateY: J
89
89
  }, C();
90
- }, [o, a, C, b]);
90
+ }, [o, s, C, b]);
91
91
  return n.length === 0 ? null : /* @__PURE__ */ t.jsxs(
92
92
  "div",
93
93
  {
@@ -120,7 +120,7 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
120
120
  {
121
121
  className: "absolute left-0 lg:h-full items-center flex justify-center w-16 z-100 cursor-w-resize",
122
122
  onClick: (e) => {
123
- e.stopPropagation(), a();
123
+ e.stopPropagation(), s();
124
124
  },
125
125
  children: /* @__PURE__ */ t.jsx(
126
126
  S,
@@ -129,11 +129,11 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
129
129
  color: "secondary",
130
130
  size: "small",
131
131
  onClick: (e) => {
132
- e.stopPropagation(), a();
132
+ e.stopPropagation(), s();
133
133
  },
134
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(ae, { size: 24 })
136
+ children: /* @__PURE__ */ t.jsx(se, { size: 24 })
137
137
  }
138
138
  )
139
139
  }
@@ -156,7 +156,7 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
156
156
  },
157
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(se, { size: 24 })
159
+ children: /* @__PURE__ */ t.jsx(ae, { 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: s }) }),
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 }) }),
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
  " / ",
@@ -225,7 +225,7 @@ const le = (n, c) => {
225
225
  display: none;
226
226
  }
227
227
  ` }),
228
- n.map((s, l) => /* @__PURE__ */ t.jsx(
228
+ n.map((a, l) => /* @__PURE__ */ t.jsx(
229
229
  "button",
230
230
  {
231
231
  type: "button",
@@ -240,13 +240,13 @@ const le = (n, c) => {
240
240
  children: /* @__PURE__ */ t.jsx(
241
241
  "img",
242
242
  {
243
- src: s.src,
244
- alt: s.alt,
243
+ src: a.src,
244
+ alt: a.alt,
245
245
  className: "w-full h-full object-cover select-none"
246
246
  }
247
247
  )
248
248
  },
249
- s.src
249
+ a.src
250
250
  ))
251
251
  ]
252
252
  }
@@ -257,10 +257,10 @@ const oe = A(
257
257
  const {
258
258
  children: r,
259
259
  className: d,
260
- lightboxClassName: s,
260
+ lightboxClassName: a,
261
261
  showThumbnails: l,
262
262
  thumbnailsClassName: o
263
- } = n, [a, N] = R([]), [h, y] = R(!1), [w, m] = R(0), u = r ? Array.isArray(r) ? r : [r] : [], k = i((f) => {
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
265
  }, []), P = i((f = 0) => {
266
266
  m(f), y(!0);
@@ -274,15 +274,15 @@ const oe = A(
274
274
  closeLightbox: j,
275
275
  isOpen: h,
276
276
  addImage: k,
277
- images: a
277
+ images: s
278
278
  }),
279
- [a]
279
+ [s]
280
280
  );
281
281
  const z = i(() => {
282
- m((f) => (f + 1) % a.length);
283
- }, [a.length]), C = i(() => {
284
- m((f) => (f - 1 + a.length) % a.length);
285
- }, [a.length]), b = i((f) => {
282
+ m((f) => (f + 1) % s.length);
283
+ }, [s.length]), C = i(() => {
284
+ m((f) => (f - 1 + s.length) % s.length);
285
+ }, [s.length]), b = i((f) => {
286
286
  m(f);
287
287
  }, []);
288
288
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
@@ -297,10 +297,10 @@ const oe = A(
297
297
  h && /* @__PURE__ */ t.jsx(
298
298
  O,
299
299
  {
300
- images: a,
300
+ images: s,
301
301
  closeLightbox: j,
302
302
  showThumbnails: l,
303
- lightboxClassName: s,
303
+ lightboxClassName: a,
304
304
  thumbnailsClassName: o,
305
305
  currentIndex: w,
306
306
  goToNext: z,
@@ -1,4 +1,4 @@
1
- import { I as p } from "./ImageGallery-Ckxg9OIC.js";
1
+ import { I as p } from "./ImageGallery-WKzUevOQ.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,9 +1,9 @@
1
1
  import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
- import { g as _, h as q, a as V } from "./Icons-DtFC5DJ7.js";
2
+ import { EyeVisibility as _, EyeVisibilityOff as q, Close as V } from "./Icons.es.js";
3
3
  import { c as t } from "./cn-B6yFEsav.js";
4
4
  import { useRef as F, useLayoutEffect as ee, memo as te, forwardRef as re, useState as oe } from "react";
5
5
  import le from "./Spinner.es.js";
6
- import { H as se } from "./HelperComponent-g_xuKWzK.js";
6
+ import { H as se } from "./HelperComponent-BeNlTMqI.js";
7
7
  const ae = (o) => {
8
8
  let e = o;
9
9
  for (; e && e !== document.body; ) {
@@ -25,7 +25,7 @@ function ne() {
25
25
  ref: o
26
26
  };
27
27
  }
28
- const g = {
28
+ const b = {
29
29
  default: {
30
30
  container: "",
31
31
  input: t(
@@ -59,14 +59,14 @@ const g = {
59
59
  label: t("text-success", "peer-focus:text-success-light"),
60
60
  icon: t("text-success-light", "peer-focus:text-success-light")
61
61
  }
62
- }, S = re(
62
+ }, v = re(
63
63
  ({
64
64
  label: o,
65
65
  icon: e,
66
66
  iconPosition: l = "left",
67
- onChange: C,
67
+ onChange: N,
68
68
  value: n,
69
- name: b,
69
+ name: g,
70
70
  width: x = "100%",
71
71
  height: u,
72
72
  variant: c = "default",
@@ -78,7 +78,7 @@ const g = {
78
78
  errorComponent: h,
79
79
  helperComponent: w,
80
80
  placeholder: $,
81
- required: N = !1,
81
+ required: z = !1,
82
82
  onFocus: k,
83
83
  onBlur: I,
84
84
  onKeyDown: L,
@@ -86,8 +86,8 @@ const g = {
86
86
  className: B,
87
87
  style: P,
88
88
  readOnly: D = !1,
89
- onClear: z,
90
- ...v
89
+ onClear: C,
90
+ ...E
91
91
  }, A) => {
92
92
  const [y, M] = oe(!1), { ref: O } = ne();
93
93
  let d = H;
@@ -125,7 +125,7 @@ const g = {
125
125
  M(!y);
126
126
  }, j = {};
127
127
  x && x !== "100%" && (j.width = x), u && (j.height = u);
128
- const E = c === "error" && h, G = !E && 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;
128
+ const S = c === "error" && h, G = !S && 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;
129
129
  return /* @__PURE__ */ r.jsxs(
130
130
  "div",
131
131
  {
@@ -142,8 +142,8 @@ const g = {
142
142
  /* @__PURE__ */ r.jsx(
143
143
  "input",
144
144
  {
145
- id: b,
146
- name: b,
145
+ id: g,
146
+ name: g,
147
147
  ref: A,
148
148
  value: n,
149
149
  placeholder: W(),
@@ -153,38 +153,38 @@ const g = {
153
153
  "focus:outline-none px-3",
154
154
  a === "default" && "placeholder:text-transparent",
155
155
  a === "static" && "placeholder:text-neutral-medium-default ",
156
- g[c].input,
156
+ b[c].input,
157
157
  i[d].input,
158
158
  e && "pr-10",
159
159
  f && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
160
- g[c].container,
160
+ b[c].container,
161
161
  X()
162
162
  ),
163
163
  style: U(),
164
- onChange: C,
164
+ onChange: N,
165
165
  onFocus: k,
166
166
  onBlur: I,
167
167
  disabled: f,
168
- required: N,
168
+ required: z,
169
169
  onKeyDown: L,
170
170
  onKeyUp: R,
171
- defaultValue: v.defaultValue,
171
+ defaultValue: E.defaultValue,
172
172
  readOnly: D,
173
- ...v
173
+ ...E
174
174
  }
175
175
  ),
176
176
  /* @__PURE__ */ r.jsx(
177
177
  "label",
178
178
  {
179
179
  ref: O,
180
- htmlFor: b,
180
+ htmlFor: g,
181
181
  className: t(
182
182
  "absolute left-3 pointer-events-none px-1 z-10",
183
183
  Y,
184
184
  Q(),
185
- g[c].label,
185
+ b[c].label,
186
186
  K(),
187
- N && "after:content-['*'] after:text-error-default after:ml-1",
187
+ z && "after:content-['*'] after:text-error-default after:ml-1",
188
188
  f && "text-neutral-medium-disabled prometeo-fonts-label-large"
189
189
  ),
190
190
  children: o
@@ -198,20 +198,19 @@ const g = {
198
198
  className: t(
199
199
  `absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
200
200
  i[d].icon,
201
- g[c].icon,
201
+ b[c].icon,
202
202
  s === "password" && !p ? "cursor-pointer" : "pointer-events-none",
203
203
  l === "right" ? "right-3" : "left-3"
204
204
  ),
205
205
  onClick: s === "password" && !p ? T : void 0,
206
206
  onMouseDown: (Z) => s === "password" && !p && Z.preventDefault(),
207
- children: /* @__PURE__ */ r.jsxs("div", { children: [
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: "" })),
210
- e
207
+ children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
208
+ p && s !== "password" ? /* @__PURE__ */ r.jsx(le, { variant: "sync", size: "small", className: "size-5" }) : e,
209
+ s === "password" && (y ? /* @__PURE__ */ r.jsx(_, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(q, { size: 24, className: "" }))
211
210
  ] })
212
211
  }
213
212
  ),
214
- z && /* @__PURE__ */ r.jsx(
213
+ C && /* @__PURE__ */ r.jsx(
215
214
  "button",
216
215
  {
217
216
  type: "button",
@@ -222,18 +221,18 @@ const g = {
222
221
  f && "opacity-50 cursor-not-allowed"
223
222
  ),
224
223
  disabled: f,
225
- onClick: z,
224
+ onClick: C,
226
225
  children: /* @__PURE__ */ r.jsx(V, { size: 20, className: "" })
227
226
  }
228
227
  ),
229
- m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (E || G) && /* @__PURE__ */ r.jsx(se, { className: "absolute ", variant: c, children: h || w }) })
228
+ m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (S || G) && /* @__PURE__ */ r.jsx(se, { className: "absolute ", variant: c, children: h || w }) })
230
229
  ]
231
230
  }
232
231
  );
233
232
  }
234
233
  );
235
- S.displayName = "Input";
236
- const me = te(S);
234
+ v.displayName = "Input";
235
+ const me = te(v);
237
236
  export {
238
237
  me as I,
239
238
  ne as u
package/dist/Input.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Input-Cck37DpG.js";
1
+ import { I as f } from "./Input-Cf8P1QJv.js";
2
2
  export {
3
3
  f as default
4
4
  };