prometeo-design-system 2.6.8 → 2.7.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 (44) hide show
  1. package/dist/{Button-DsbEyjth.js → Button-CvBWH1HX.js} +8 -8
  2. package/dist/Button.es.js +1 -1
  3. package/dist/ButtonV2.es.js +12 -12
  4. package/dist/CheckboxFormik.es.js +10 -10
  5. package/dist/DatePicker.es.js +2 -2
  6. package/dist/DrawerDesktop.es.js +1 -1
  7. package/dist/DropZone.es.js +5 -5
  8. package/dist/FAButton.es.js +1 -1
  9. package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-DKzJg3un.js} +1 -1
  10. package/dist/ImageGallery.es.js +1 -1
  11. package/dist/Input-C22kKz7U.js +255 -0
  12. package/dist/Input.es.js +1 -1
  13. package/dist/InputFormikV2.es.js +1 -1
  14. package/dist/Pagination.es.js +8 -8
  15. package/dist/ProfilePictureUpload.es.js +3 -3
  16. package/dist/ProgressBar.es.js +63 -35
  17. package/dist/Select-C2-CCMwC.js +1100 -0
  18. package/dist/Select.es.js +1 -1
  19. package/dist/SelectFormik.es.js +1 -1
  20. package/dist/SelectFormikLegacy.es.js +14 -14
  21. package/dist/SelectSearch.es.js +66 -63
  22. package/dist/TabLinks.es.js +8 -8
  23. package/dist/TextArea.es.js +28 -26
  24. package/dist/Toast.es.js +1 -1
  25. package/dist/components/Input/Input.d.ts +3 -5
  26. package/dist/components/ProgressBar/ProgressBar.d.ts +13 -3
  27. package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +29 -3
  28. package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +2 -1
  29. package/dist/components/RecurrentDatePicker/MonthlyFrequencySettings.d.ts +9 -3
  30. package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +28 -1
  31. package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +1 -0
  32. package/dist/components/RecurrentDatePicker/WeeklyFrequencySetting.d.ts +2 -1
  33. package/dist/components/RecurrentDatePicker/YearlyFrequencySettings.d.ts +13 -2
  34. package/dist/components/RecurrentDatePicker/recurrentDatePicker.validations.d.ts +69 -0
  35. package/dist/components/Select/Select.d.ts +22 -4
  36. package/dist/components/TextArea/TextArea.d.ts +2 -1
  37. package/dist/exports/ProgressBar.d.ts +1 -1
  38. package/dist/index.d.ts +2 -1
  39. package/dist/preview/SelectPreview/SelectGroupedOptionsPreview.d.ts +2 -0
  40. package/dist/prometeo-design-system.css +1 -1
  41. package/dist/prometeo-design-system.es.js +4 -4
  42. package/package.json +1 -1
  43. package/dist/Input-R52CsX56.js +0 -280
  44. package/dist/Select-CMjYSSZB.js +0 -812
@@ -2,14 +2,14 @@ import { j as f } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as g } from "./cn-B6yFEsav.js";
3
3
  import { clsx as B } from "clsx";
4
4
  import { useAnimationControls as E, motion as j } from "framer-motion";
5
- import { memo as P, useCallback as w, useMemo as h } from "react";
6
- const C = (l) => typeof l == "boolean" ? `${l}` : l === 0 ? "0" : l, V = B, _ = (l, d) => (e) => {
5
+ import { memo as P, useCallback as C, useMemo as h } from "react";
6
+ const V = (l) => typeof l == "boolean" ? `${l}` : l === 0 ? "0" : l, w = B, _ = (l, d) => (e) => {
7
7
  var m;
8
- if (d?.variants == null) return V(l, e?.class, e?.className);
8
+ if (d?.variants == null) return w(l, e?.class, e?.className);
9
9
  const { variants: v, defaultVariants: t } = d, n = Object.keys(v).map((s) => {
10
10
  const u = e?.[s], i = t?.[s];
11
11
  if (u === null) return null;
12
- const o = C(u) || C(i);
12
+ const o = V(u) || V(i);
13
13
  return v[s][o];
14
14
  }), r = e && Object.entries(e).reduce((s, u) => {
15
15
  let [i, o] = u;
@@ -31,7 +31,7 @@ const C = (l) => typeof l == "boolean" ? `${l}` : l === 0 ? "0" : l, V = B, _ =
31
31
  o
32
32
  ] : s;
33
33
  }, []);
34
- return V(l, n, a, e?.class, e?.className);
34
+ return w(l, n, a, e?.class, e?.className);
35
35
  }, $ = _(
36
36
  "flex items-center justify-center cursor-pointer focus:outline-none font-semibold rounded-md transition-colors",
37
37
  {
@@ -51,7 +51,7 @@ const C = (l) => typeof l == "boolean" ? `${l}` : l === 0 ? "0" : l, V = B, _ =
51
51
  large: "h-[56px] w-[145px] w-fit px-4 py-3 text-base"
52
52
  },
53
53
  disabled: {
54
- true: "opacity-50 cursor-not-allowed",
54
+ true: "opacity-50 cursor-default",
55
55
  false: ""
56
56
  },
57
57
  loading: {
@@ -125,9 +125,9 @@ function z({
125
125
  form: x,
126
126
  ...N
127
127
  }) {
128
- const c = E(), H = w(() => {
128
+ const c = E(), H = C(() => {
129
129
  !t || a || r || !n || c.start({ rotate: 90 });
130
- }, [t, a, r, n, c]), S = w(() => {
130
+ }, [t, a, r, n, c]), S = C(() => {
131
131
  !t || a || r || !n || c.start({ rotate: 0 });
132
132
  }, [t, a, r, n, c]), k = h(() => g(
133
133
  $({
package/dist/Button.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as f } from "./Button-DsbEyjth.js";
1
+ import { B as f } from "./Button-CvBWH1HX.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -17,7 +17,7 @@ const M = {
17
17
  label: "",
18
18
  icon: ""
19
19
  }
20
- }, l = {
20
+ }, n = {
21
21
  filled: {
22
22
  primary: {
23
23
  container: ` bg-primary-default-default border-primary-default-default
@@ -50,7 +50,7 @@ const M = {
50
50
  icon: "text-neutral-weak-default group-hover:text-neutral-weak-hover group-active:text-neutral-weak-pressed"
51
51
  },
52
52
  disabled: {
53
- container: "bg-primary-medium-disabled border-transparent cursor-not-allowed!",
53
+ container: "bg-primary-medium-disabled border-transparent cursor-default!",
54
54
  label: "text-neutral-strong-disabled group-hover:text-neutral-strong-disabled group-active:text-neutral-strong-disabled",
55
55
  icon: "text-neutral-strong-disabled group-hover:text-neutral-strong-disabled group-active:text-neutral-strong-disabled"
56
56
  }
@@ -85,7 +85,7 @@ const M = {
85
85
  icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
86
86
  },
87
87
  disabled: {
88
- container: "bg-neutral-default-disabled border-neutral-default-disabled border cursor-not-allowed!",
88
+ container: "bg-neutral-default-disabled border-neutral-default-disabled border cursor-default!",
89
89
  label: "text-neutral-default-disabled group-hover:text-neutral-default-disabled group-active:text-neutral-default-disabled",
90
90
  icon: "text-neutral-default-disabled group-hover:text-neutral-default-disabled group-active:text-neutral-default-disabled"
91
91
  }
@@ -117,12 +117,12 @@ const M = {
117
117
  icon: "text-warning-medium-default group-hover:text-warning-medium-hover group-active:text-warning-medium-pressed"
118
118
  },
119
119
  disabled: {
120
- container: "bg-transparent border-neutral-default-disabled border-none cursor-not-allowed!",
120
+ container: "bg-transparent border-neutral-default-disabled border-none cursor-default! hover:bg-transparent",
121
121
  label: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused",
122
122
  icon: "text-neutral-medium-focused group-hover:text-neutral-medium-focused group-active:text-neutral-medium-focused"
123
123
  }
124
124
  }
125
- }, n = {
125
+ }, l = {
126
126
  small: {
127
127
  container: "",
128
128
  label: "prometeo-fonts-label-large",
@@ -178,18 +178,18 @@ const M = {
178
178
  }) => {
179
179
  const k = f && !o && !t ? "true" : "false", j = b && !o && !t ? "true" : "false", u = o || t ? "disabled" : p, S = V(() => i || (t ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
180
180
  !h && x,
181
- /* @__PURE__ */ e.jsx("span", { className: ` ${n[r].label} ${l[a][u].label} ${r === "small" ? "prometeo-fonts-label-xsmall" : ""}`, children: v })
181
+ /* @__PURE__ */ e.jsx("span", { className: ` ${l[r].label} ${n[a][u].label} ${r === "small" ? "prometeo-fonts-label-xsmall" : ""}`, children: v })
182
182
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: `flex items-center gap-1 ${s}`, children: [
183
183
  d && /* @__PURE__ */ e.jsx("span", { className: `
184
184
  ${c.icon}
185
- ${l[a][u].icon}
186
- ${n[r].icon}
185
+ ${n[a][u].icon}
186
+ ${l[r].icon}
187
187
  ${C[k].icon}
188
188
  `, children: d }),
189
189
  /* @__PURE__ */ e.jsx("span", { className: `
190
190
  ${c.label}
191
- ${l[a][u].label}
192
- ${n[r].label}
191
+ ${n[a][u].label}
192
+ ${l[r].label}
193
193
  `, children: m })
194
194
  ] })), [i, s, d, m, a, p, r]);
195
195
  return /* @__PURE__ */ e.jsx(
@@ -199,9 +199,9 @@ const M = {
199
199
  className: `
200
200
  group
201
201
  ${c.container}
202
- ${n[r].container}
202
+ ${l[r].container}
203
203
  ${M[r].container}
204
- ${l[a][u].container}
204
+ ${n[a][u].container}
205
205
  ${A[j].container}
206
206
  ${y}
207
207
  `,
@@ -3,8 +3,8 @@ import { Icons as x } from "./Icons.es.js";
3
3
  import { c as r } from "./cn-B6yFEsav.js";
4
4
  import { useField as h, ErrorMessage as p } from "formik";
5
5
  import { useState as b } from "react";
6
- const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: n = !1, ...t }) => {
7
- const [a, l] = h({ ...t, type: "checkbox" }), [u, i] = b(!1), s = l.touched && l.error;
6
+ const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: s = !1, ...t }) => {
7
+ const [a, l] = h({ ...t, type: "checkbox" }), [u, i] = b(!1), n = l.touched && l.error;
8
8
  return /* @__PURE__ */ e.jsxs("div", { className: r("relative w-full", m), children: [
9
9
  /* @__PURE__ */ e.jsxs(
10
10
  "label",
@@ -12,7 +12,7 @@ const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: n =
12
12
  htmlFor: o || t.name,
13
13
  className: r(
14
14
  "flex items-center gap-3 cursor-pointer transition-all duration-200 ease-in-out",
15
- n ? "cursor-not-allowed opacity-60" : "hover:opacity-80",
15
+ s ? "cursor-default opacity-60" : "hover:opacity-80",
16
16
  d
17
17
  ),
18
18
  children: [
@@ -31,7 +31,7 @@ const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: n =
31
31
  onBlur: (f) => {
32
32
  i(!1), t.onBlur?.(), a.onBlur(f);
33
33
  },
34
- disabled: n,
34
+ disabled: s,
35
35
  className: r(
36
36
  "sr-only"
37
37
  )
@@ -42,8 +42,8 @@ const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: n =
42
42
  {
43
43
  className: r(
44
44
  "w-5 h-5 rounded border-2 transition-all duration-200 ease-in-out flex items-center justify-center",
45
- a.value ? "bg-primary-default-default border-primary-default-default" : u ? "border-primary-default-default bg-transparent" : s ? "border-error-default-default bg-transparent" : "border-neutral-default-default bg-transparent hover:border-neutral-strong-default",
46
- n && "bg-neutral-medium-default border-neutral-medium-default"
45
+ a.value ? "bg-primary-default-default border-primary-default-default" : u ? "border-primary-default-default bg-transparent" : n ? "border-error-default-default bg-transparent" : "border-neutral-default-default bg-transparent hover:border-neutral-strong-default",
46
+ s && "bg-neutral-medium-default border-neutral-medium-default"
47
47
  ),
48
48
  children: a.value && /* @__PURE__ */ e.jsx(
49
49
  x.Check,
@@ -51,7 +51,7 @@ const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: n =
51
51
  size: 14,
52
52
  className: r(
53
53
  "text-white transition-all duration-200 ease-in-out",
54
- n && "text-neutral-strong-default"
54
+ s && "text-neutral-strong-default"
55
55
  )
56
56
  }
57
57
  )
@@ -64,8 +64,8 @@ const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: n =
64
64
  {
65
65
  className: r(
66
66
  "text-sm transition-colors duration-200 ease-in-out select-none",
67
- s && "text-error-default-default",
68
- n && "text-neutral-medium-default"
67
+ n && "text-error-default-default",
68
+ s && "text-neutral-medium-default"
69
69
  ),
70
70
  children: c
71
71
  }
@@ -73,7 +73,7 @@ const k = ({ label: c, className: d, containerClassName: m, id: o, disabled: n =
73
73
  ]
74
74
  }
75
75
  ),
76
- s && /* @__PURE__ */ e.jsx(
76
+ n && /* @__PURE__ */ e.jsx(
77
77
  p,
78
78
  {
79
79
  name: t.name,
@@ -1,11 +1,11 @@
1
1
  import { j as q } from "./jsx-runtime-DKDX3adD.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-R52CsX56.js";
4
+ import { I as wn } from "./Input-C22kKz7U.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";
8
- import { B as vt } from "./Button-DsbEyjth.js";
8
+ import { B as vt } from "./Button-CvBWH1HX.js";
9
9
  function Mn(e, t, n = "long") {
10
10
  return new Intl.DateTimeFormat("en-US", {
11
11
  // Enforces engine to render the time. Without the option JavaScriptCore omits it.
@@ -1,6 +1,6 @@
1
1
  import { j as l } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as h } from "./cn-B6yFEsav.js";
3
- import { c as k, B as E } from "./Button-DsbEyjth.js";
3
+ import { c as k, B as E } from "./Button-CvBWH1HX.js";
4
4
  import { createPortal as I } from "react-dom";
5
5
  import { Icons as V } from "./Icons.es.js";
6
6
  import { forwardRef as B, useRef as u, useState as N, useEffect as d, useCallback as f, useImperativeHandle as P } from "react";
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { c as i } from "./cn-B6yFEsav.js";
3
- import R, { useCallback as w } from "react";
4
- import { useDropzone as z } from "react-dropzone";
3
+ import R, { useCallback as z } from "react";
4
+ import { useDropzone as w } from "react-dropzone";
5
5
  import { Icons as u } from "./Icons.es.js";
6
6
  const E = R.forwardRef(
7
7
  ({
@@ -17,7 +17,7 @@ const E = R.forwardRef(
17
17
  maxFiles: j = 1,
18
18
  ...N
19
19
  }, b) => {
20
- const y = w((s, o) => {
20
+ const y = z((s, o) => {
21
21
  s.length > 0 && d?.(s), o.length > 0 && m?.(o);
22
22
  }, [d, m]), {
23
23
  getRootProps: D,
@@ -25,7 +25,7 @@ const E = R.forwardRef(
25
25
  isDragActive: a,
26
26
  isDragReject: t,
27
27
  fileRejections: n
28
- } = z({
28
+ } = w({
29
29
  onDrop: y,
30
30
  accept: g,
31
31
  maxFiles: j,
@@ -54,7 +54,7 @@ const E = R.forwardRef(
54
54
  "ring-2 ring-destructive/20"
55
55
  ],
56
56
  l && [
57
- "cursor-not-allowed opacity-60",
57
+ "cursor-default opacity-60",
58
58
  "border-muted-foreground/20 bg-muted/30"
59
59
  ]
60
60
  ),
@@ -30,7 +30,7 @@ const v = {
30
30
  error: "text-error-default-default hover:text-error-default-hover active:text-error-default-pressed",
31
31
  warning: "text-warning-default-default hover:text-warning-default-hover active:text-warning-default-pressed"
32
32
  }
33
- }, h = "bg-primary-default-disabled text-neutral-default-disabled hover:bg-primary-default-disabled active:bg-primary-default-disabled cursor-not-allowed", g = (e) => {
33
+ }, h = "bg-primary-default-disabled text-neutral-default-disabled hover:bg-primary-default-disabled active:bg-primary-default-disabled cursor-default", g = (e) => {
34
34
  const t = e.position || v, r = e.attachToParent || !1, o = e.color || "primary", l = e.icon || f.Add, a = e.disabled || !1, u = e.variant || "filled", d = /* @__PURE__ */ i.jsx(
35
35
  "div",
36
36
  {
@@ -2,7 +2,7 @@ import { j as t } from "./jsx-runtime-DKDX3adD.js";
2
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
4
  import { u as re } from "./useDragScroll-CHN9OMwn.js";
5
- import { B as S } from "./Button-DsbEyjth.js";
5
+ import { B as S } from "./Button-CvBWH1HX.js";
6
6
  import { Icons as M } from "./Icons.es.js";
7
7
  const O = D(L(({ images: n, className: c }, r) => {
8
8
  const { ref: d, bind: a } = re({
@@ -1,4 +1,4 @@
1
- import { I as p } from "./ImageGallery-DnoRTpCr.js";
1
+ import { I as p } from "./ImageGallery-DKzJg3un.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) => {
@@ -0,0 +1,255 @@
1
+ import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
+ import { Icons as E } from "./Icons.es.js";
3
+ import { c as t } from "./cn-B6yFEsav.js";
4
+ import { useRef as H, useLayoutEffect as oe, memo as le, forwardRef as se, useState as ne, useEffect as ae } from "react";
5
+ import ue from "./Spinner.es.js";
6
+ import { H as ce } from "./HelperComponent-U6mPwuDH.js";
7
+ import fe from "./ButtonV2.es.js";
8
+ const de = (o) => {
9
+ let e = o;
10
+ for (; e && e !== document.body; ) {
11
+ const a = window.getComputedStyle(e).backgroundColor;
12
+ if (a && a !== "transparent" && a !== "rgba(0, 0, 0, 0)")
13
+ return a;
14
+ e = e.parentElement;
15
+ }
16
+ const l = window.getComputedStyle(document.body).backgroundColor;
17
+ return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
18
+ };
19
+ function pe() {
20
+ const o = H(null);
21
+ return oe(() => {
22
+ if (!o.current || !o.current.parentElement) return;
23
+ const e = de(o.current.parentElement);
24
+ o.current.style.backgroundColor = e;
25
+ }, []), {
26
+ ref: o
27
+ };
28
+ }
29
+ const b = {
30
+ default: {
31
+ container: "",
32
+ input: t(
33
+ "border-neutral-default-default text-neutral-default-default!",
34
+ "focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
35
+ "hover:border-neutral-strong-default"
36
+ ),
37
+ label: t("text-neutral-medium-default"),
38
+ icon: t(
39
+ "text-neutral-medium-default",
40
+ "peer-focus:text-primary-default-default"
41
+ )
42
+ },
43
+ error: {
44
+ container: "",
45
+ input: t(
46
+ "border-error-default-default text-neutral-default-default",
47
+ "focus:border-error-default focus:border-2",
48
+ "focus:ring-0 focus:ring-error-default/20"
49
+ ),
50
+ label: t("text-lime-500", "peer-focus:text-error-light"),
51
+ icon: t("text-error-light", "peer-focus:text-error-light")
52
+ },
53
+ success: {
54
+ container: "",
55
+ input: t(
56
+ "border-success-default-default text-neutral-default-default",
57
+ "focus:border-success-default focus:border-2",
58
+ "focus:ring-0 focus:ring-success-default/20"
59
+ ),
60
+ label: t("text-success", "peer-focus:text-success-light"),
61
+ icon: t("text-success-light", "peer-focus:text-success-light")
62
+ }
63
+ }, k = se(
64
+ ({
65
+ label: o,
66
+ icon: e,
67
+ iconPosition: l = "left",
68
+ onChange: I,
69
+ value: a = "",
70
+ name: g,
71
+ width: m = "100%",
72
+ height: u,
73
+ variant: c = "default",
74
+ labelVariant: n = "default",
75
+ size: B = "medium",
76
+ disabled: x = !1,
77
+ type: s = "text",
78
+ isFetching: f,
79
+ errorComponent: h,
80
+ helperComponent: w,
81
+ placeholder: $,
82
+ required: R = !1,
83
+ onFocus: L,
84
+ onBlur: P,
85
+ onKeyDown: D,
86
+ onKeyUp: M,
87
+ className: O,
88
+ isActive: y,
89
+ style: T,
90
+ readOnly: G = !1,
91
+ onClear: S,
92
+ ...J
93
+ }, K) => {
94
+ const [j, Q] = ne(!1), { ref: U } = pe(), W = H(null), z = K || null || W;
95
+ let d = B;
96
+ u && (d = "customHeight");
97
+ const p = {
98
+ small: {
99
+ container: "text-sm",
100
+ input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
101
+ label: ` prometeo-fonts-label-large
102
+ peer-focus:prometeo-fonts-label-large
103
+ peer-placeholder-shown:${n === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default peer-focus:text-neutral-medium-default `,
104
+ icon: "w-4 h-4 right-3"
105
+ },
106
+ medium: {
107
+ container: "text-base",
108
+ input: "h-12 px-3 prometeo-fonts-body-large",
109
+ label: ` prometeo-fonts-label-large
110
+ peer-focus:prometeo-fonts-label-large
111
+ peer-placeholder-shown:${n === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default text-neutral-medium-default peer-focus:text-neutral-medium-default `,
112
+ icon: "w-5 h-5 right-3"
113
+ },
114
+ large: {
115
+ container: "text-lg",
116
+ input: "h-14 px-3 text-lg border-b border-t-0 border-x-0 rounded-none focus:ring-0 prometeo-fonts-body-xlarge ",
117
+ label: "peer-placeholder-shown:prometeo-fonts-body-xlarge peer-focus:prometeo-fonts-label-large peer-focus:text-neutral-medium-default prometeo-fonts-label-large ",
118
+ icon: "w-6 h-6 right-3"
119
+ },
120
+ customHeight: {
121
+ container: "text-base",
122
+ input: "text-base",
123
+ label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
124
+ icon: "w-6 h-6 right-3"
125
+ }
126
+ };
127
+ ae(() => {
128
+ y && z.current?.focus();
129
+ }, [y, z.current?.focus]);
130
+ const X = (i) => {
131
+ L?.(i);
132
+ }, Y = (i) => {
133
+ y === void 0 && P?.(i);
134
+ }, Z = () => {
135
+ Q(!j);
136
+ }, C = {};
137
+ m && m !== "100%" && (C.width = m), u && (C.height = u);
138
+ const v = c === "error" && h, _ = !v && w, q = s === "password", A = () => n === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `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"}` : "peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1", F = () => u ? p.customHeight.label : p[d].label, V = () => u ? { height: u } : {}, ee = () => n === "default" ? o : $ || o || "", te = () => q ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", re = n === "default" && "transition-all duration-200 ease-in-out", N = h || w;
139
+ return /* @__PURE__ */ r.jsxs(
140
+ "div",
141
+ {
142
+ className: t(
143
+ "relative",
144
+ p[d].container,
145
+ !m && "w-full",
146
+ "bg-inherit",
147
+ n === "static" && "mt-2",
148
+ O
149
+ ),
150
+ style: { ...T, ...C },
151
+ children: [
152
+ /* @__PURE__ */ r.jsx(
153
+ "input",
154
+ {
155
+ id: g,
156
+ name: g,
157
+ ref: z,
158
+ value: a,
159
+ placeholder: ee(),
160
+ type: s === "password" && j ? "text" : s,
161
+ className: t(
162
+ "peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
163
+ "focus:outline-none px-3",
164
+ n === "default" && "placeholder:text-transparent",
165
+ n === "static" && "placeholder:text-neutral-medium-default ",
166
+ b[c].input,
167
+ p[d].input,
168
+ e && "pr-10",
169
+ x && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
170
+ b[c].container,
171
+ te()
172
+ ),
173
+ style: V(),
174
+ onChange: I,
175
+ onFocus: X,
176
+ onBlur: Y,
177
+ disabled: x,
178
+ required: R,
179
+ onKeyDown: D,
180
+ onKeyUp: M,
181
+ readOnly: G,
182
+ ...J
183
+ }
184
+ ),
185
+ /* @__PURE__ */ r.jsx(
186
+ "label",
187
+ {
188
+ ref: U,
189
+ htmlFor: g,
190
+ className: t(
191
+ "absolute left-3 pointer-events-none px-1 z-10",
192
+ re,
193
+ F(),
194
+ b[c].label,
195
+ A(),
196
+ R && "after:content-['*'] after:text-error-default after:ml-1",
197
+ x && "text-neutral-medium-disabled prometeo-fonts-label-large"
198
+ ),
199
+ children: o
200
+ }
201
+ ),
202
+ (e || s === "password" || f) && /* @__PURE__ */ r.jsx(
203
+ "button",
204
+ {
205
+ tabIndex: -1,
206
+ type: "button",
207
+ className: t(
208
+ `absolute ${N ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
209
+ p[d].icon,
210
+ b[c].icon,
211
+ s === "password" && !f ? "cursor-pointer" : "pointer-events-none",
212
+ l === "right" ? "right-3" : "left-3"
213
+ ),
214
+ onClick: s === "password" && !f ? Z : void 0,
215
+ onMouseDown: (i) => s === "password" && !f && i.preventDefault(),
216
+ children: /* @__PURE__ */ r.jsxs("div", { children: [
217
+ f && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(ue, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
218
+ s === "password" && (j ? /* @__PURE__ */ r.jsx(E.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(E.EyeVisibilityOff, { size: 24, className: "" })),
219
+ e
220
+ ] })
221
+ }
222
+ ),
223
+ S && /* @__PURE__ */ r.jsx(
224
+ fe,
225
+ {
226
+ type: "button",
227
+ color: "secondary",
228
+ size: "small",
229
+ animate: !1,
230
+ className: t(
231
+ `absolute ${N ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
232
+ "size-6 p-4 ",
233
+ "bg-inherit",
234
+ "hover:bg-transparent! p-4 rounded-full"
235
+ ),
236
+ label: "",
237
+ disabled: x,
238
+ onClick: S,
239
+ variant: "text",
240
+ animateIcon: !1,
241
+ icon: /* @__PURE__ */ r.jsx(E.Close, { size: 20, className: "" })
242
+ }
243
+ ),
244
+ N && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (v || _) && /* @__PURE__ */ r.jsx(ce, { className: "absolute ", variant: c, children: h || w }) })
245
+ ]
246
+ }
247
+ );
248
+ }
249
+ );
250
+ k.displayName = "Input";
251
+ const je = le(k);
252
+ export {
253
+ je as I,
254
+ pe as u
255
+ };
package/dist/Input.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Input-R52CsX56.js";
1
+ import { I as f } from "./Input-C22kKz7U.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { j as o } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { FastField as u } from "formik";
3
3
  import { memo as s } from "react";
4
- import { I as i } from "./Input-R52CsX56.js";
4
+ import { I as i } from "./Input-C22kKz7U.js";
5
5
  const c = ({
6
6
  field: r,
7
7
  form: t,
@@ -5,7 +5,7 @@ function h({
5
5
  totalPages: l = 0,
6
6
  onPageChange: p
7
7
  }) {
8
- const o = (e) => {
8
+ const n = (e) => {
9
9
  e >= 1 && e <= l && e !== i && p?.(e);
10
10
  }, d = (() => {
11
11
  const e = [];
@@ -35,13 +35,13 @@ function h({
35
35
  {
36
36
  whileHover: { scale: 1.05 },
37
37
  whileTap: { scale: 0.95 },
38
- onClick: () => o(i - 1),
38
+ onClick: () => n(i - 1),
39
39
  disabled: i === 1,
40
- className: "px-4 py-2 text-primary-medium-default hover:text-primary-default-default disabled:text-gray-600 disabled:cursor-not-allowed transition-colors cursor-pointer",
40
+ className: "px-4 py-2 text-primary-medium-default hover:text-primary-default-default disabled:text-gray-600 disabled:cursor-default transition-colors cursor-pointer",
41
41
  children: "Anterior"
42
42
  }
43
43
  ),
44
- /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 select-none", children: d.map((e, n) => {
44
+ /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 select-none", children: d.map((e, o) => {
45
45
  if (e === "ellipsis")
46
46
  return /* @__PURE__ */ t.jsx(
47
47
  "span",
@@ -49,7 +49,7 @@ function h({
49
49
  className: "px-3 py-2 text-neutral-default-default",
50
50
  children: "..."
51
51
  },
52
- `ellipsis-${n}`
52
+ `ellipsis-${o}`
53
53
  );
54
54
  const s = e, r = s === i;
55
55
  return /* @__PURE__ */ t.jsxs(
@@ -57,7 +57,7 @@ function h({
57
57
  {
58
58
  whileHover: r ? {} : { scale: 1.1 },
59
59
  whileTap: r ? {} : { scale: 0.9 },
60
- onClick: () => o(s),
60
+ onClick: () => n(s),
61
61
  className: `relative px-3 py-2 min-w-[40px] text-center transition-colors ${r ? "text-primary-default-default" : "text-neutral-default-default hover:text-white cursor-pointer "}`,
62
62
  children: [
63
63
  r && /* @__PURE__ */ t.jsx(
@@ -84,9 +84,9 @@ function h({
84
84
  {
85
85
  whileHover: { scale: 1.05 },
86
86
  whileTap: { scale: 0.95 },
87
- onClick: () => o(i + 1),
87
+ onClick: () => n(i + 1),
88
88
  disabled: i === l,
89
- className: "px-4 py-2 text-primary-medium-default hover:text-primary-default-default disabled:text-gray-600 disabled:cursor-not-allowed transition-colors cursor-pointer",
89
+ className: "px-4 py-2 text-primary-medium-default hover:text-primary-default-default disabled:text-gray-600 disabled:cursor-default transition-colors cursor-pointer",
90
90
  children: "Siguiente"
91
91
  }
92
92
  )
@@ -100,7 +100,7 @@ function O({
100
100
  className: l(
101
101
  I[i],
102
102
  "rounded-full overflow-hidden flex items-center justify-center relative",
103
- o && "opacity-50 cursor-not-allowed"
103
+ o && "opacity-50 cursor-not-default"
104
104
  ),
105
105
  children: /* @__PURE__ */ n.jsx(
106
106
  M,
@@ -121,7 +121,7 @@ function O({
121
121
  "absolute bg-primary-default-default rounded-lg border-2 hover:bg-primary-default-hover cursor-pointer grid place-content-center",
122
122
  H[i],
123
123
  z[i],
124
- o && "opacity-50 cursor-not-allowed"
124
+ o && "opacity-50 cursor-not-default"
125
125
  ),
126
126
  onClick: L,
127
127
  disabled: o,
@@ -167,7 +167,7 @@ function O({
167
167
  "transition-all duration-200 ease-out",
168
168
  W[i],
169
169
  k[i],
170
- o && "opacity-50 cursor-not-allowed"
170
+ o && "opacity-50 cursor-default"
171
171
  ),
172
172
  disabled: o,
173
173
  onClick: N,