prometeo-design-system 1.9.8 → 2.0.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.
@@ -1,9 +1,9 @@
1
1
  import { j as e } from "./jsx-runtime-ByW6EXIE.js";
2
2
  import { c as i } from "./cn-B6yFEsav.js";
3
- import w, { useCallback as z } from "react";
4
- import { useDropzone as R } from "react-dropzone";
3
+ import R, { useCallback as w } from "react";
4
+ import { useDropzone as z } from "react-dropzone";
5
5
  import { Icons as u } from "./Icons.es.js";
6
- const E = w.forwardRef(
6
+ const E = R.forwardRef(
7
7
  ({
8
8
  onFilesAccepted: d,
9
9
  onFilesRejected: m,
@@ -17,7 +17,7 @@ const E = w.forwardRef(
17
17
  maxFiles: j = 1,
18
18
  ...N
19
19
  }, b) => {
20
- const y = z((s, o) => {
20
+ const y = w((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 = w.forwardRef(
25
25
  isDragActive: a,
26
26
  isDragReject: t,
27
27
  fileRejections: n
28
- } = R({
28
+ } = z({
29
29
  onDrop: y,
30
30
  accept: g,
31
31
  maxFiles: j,
package/dist/Input.es.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { j as t } from "./jsx-runtime-ByW6EXIE.js";
2
- import { Icons as O } from "./Icons.es.js";
2
+ import { Icons as J } from "./Icons.es.js";
3
3
  import { c as e } from "./cn-B6yFEsav.js";
4
- import { memo as ue, useState as N, useRef as ce, useCallback as fe, useEffect as $, useLayoutEffect as ie } from "react";
5
- import { useDebounce as de } from "use-debounce";
6
- import pe from "./Spinner.es.js";
7
- const j = {
4
+ import { memo as ie, useState as v, useRef as K, useCallback as pe, useEffect as L, useLayoutEffect as xe } from "react";
5
+ import { useDebounce as me } from "use-debounce";
6
+ import ge from "./Spinner.es.js";
7
+ const C = {
8
8
  default: {
9
9
  container: "",
10
10
  input: e(
@@ -53,36 +53,38 @@ const j = {
53
53
  "peer-focus:text-success-light"
54
54
  )
55
55
  }
56
- }, xe = ({
57
- label: C,
56
+ }, he = ({
57
+ label: S,
58
58
  icon: a,
59
- iconPosition: m = "left",
60
- onChange: S,
61
- value: n = "",
62
- debounceMs: u = 0,
63
- name: E,
64
- width: g = "100%",
65
- height: s,
66
- variant: c = "default",
67
- labelVariant: o = "default",
68
- size: T = "medium",
69
- disabled: k = !1,
59
+ iconPosition: g = "left",
60
+ onChange: E,
61
+ value: u = "",
62
+ debounceMs: c = 0,
63
+ name: k,
64
+ width: h = "100%",
65
+ height: o,
66
+ variant: f = "default",
67
+ labelVariant: l = "default",
68
+ size: Q = "medium",
69
+ disabled: z = !1,
70
70
  type: r = "text",
71
- isFetching: f,
72
- errorComponent: H,
73
- helperComponent: L,
74
- placeholder: G,
75
- required: P = !1,
76
- onFocus: J,
77
- onBlur: K,
78
- onEmptied: D,
79
- onKeyDown: Q,
80
- onKeyUp: U
71
+ isFetching: d,
72
+ errorComponent: P,
73
+ helperComponent: R,
74
+ placeholder: U,
75
+ required: D = !1,
76
+ onFocus: W,
77
+ onBlur: X,
78
+ onEmptied: V,
79
+ onKeyDown: Y,
80
+ onKeyUp: Z,
81
+ className: _,
82
+ isActive: i
81
83
  }) => {
82
- const [h, R] = N(n), [v] = de(h, u), [W, V] = N(!1), [z, X] = N(!1), b = ce(null);
83
- let i = T;
84
- s && (i = "customHeight");
85
- const d = {
84
+ const [b, F] = v(u), [I] = me(b, c), [q, O] = v(i || !1), [B, A] = v(!1), w = K(null), $ = K(null);
85
+ let p = Q;
86
+ o && (p = "customHeight");
87
+ const x = {
86
88
  small: {
87
89
  container: "text-sm",
88
90
  input: "h-10 px-3 text-sm",
@@ -107,38 +109,40 @@ const j = {
107
109
  label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
108
110
  icon: "w-6 h-6 right-3"
109
111
  }
110
- }, A = fe(S, [S]);
111
- $(() => {
112
- u > 0 && v !== n && A(v);
113
- }, [v, u, A, n]), $(() => {
114
- R(n);
115
- }, [n]);
116
- const Y = () => {
117
- V(!0), J?.();
118
- }, Z = () => {
119
- V(!1), K?.();
120
- }, _ = (p) => {
121
- const x = p.target.value, B = p.target.name, l = h;
122
- R(x), l.length > 0 && x.length === 0 && D?.(), (!u || u === 0) && S(x, B);
123
- }, q = () => {
124
- X(!z);
125
- }, I = {};
126
- g && g !== "100%" && (I.width = g), s && (I.height = s);
127
- const M = h.length > 0, F = c === "error" && H, ee = !F && L, te = r === "password", re = () => o === "static" || W || M ? "-top-2 left-2 scale-90" : a ? `top-1/2 -translate-y-1/2 ${m === "left" ? "ml-6" : "mr-6"} scale-100 ` : "top-1/2 -translate-y-1/2 scale-100", se = () => o === "static" ? s ? "text-sm" : "text-xs" : s ? d.customHeight.label : d[i].label, oe = () => s ? { height: s } : {}, le = () => o === "default" ? C : G || C || "", ae = () => te ? a ? m === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? m === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", ne = o === "default" && "transition-all duration-200 ease-in-out";
128
- return ie(() => {
129
- if (b.current) {
130
- const x = ((B) => {
131
- let l = B;
132
- for (; l && l !== document.body; ) {
133
- const y = window.getComputedStyle(l).backgroundColor;
134
- if (y && y !== "transparent" && y !== "rgba(0, 0, 0, 0)")
135
- return y;
136
- l = l.parentElement;
112
+ }, T = pe(E, [E]);
113
+ L(() => {
114
+ c > 0 && I !== u && T(I);
115
+ }, [I, c, T, u]), L(() => {
116
+ F(u);
117
+ }, [u]), L(() => {
118
+ i && $.current?.focus();
119
+ }, [i]);
120
+ const M = (s) => {
121
+ O(!0), W?.(s);
122
+ }, ee = (s) => {
123
+ i === void 0 && (O(!1), X?.(s));
124
+ }, te = (s) => {
125
+ const m = s.target.value, H = s.target.name, n = b;
126
+ F(m), n.length > 0 && m.length === 0 && V?.(), (!c || c === 0) && E(m, H);
127
+ }, re = () => {
128
+ A(!B);
129
+ }, N = {};
130
+ h && h !== "100%" && (N.width = h), o && (N.height = o);
131
+ const se = b.length > 0, G = f === "error" && P, oe = !G && R, le = r === "password", ne = () => l === "static" || i || q || se ? "-top-2 left-2 scale-90" : a ? `top-1/2 -translate-y-1/2 ${g === "left" ? "ml-6" : "mr-6"} scale-100 ` : "top-1/2 -translate-y-1/2 scale-100", ae = () => l === "static" ? o ? "text-sm" : "text-xs" : o ? x.customHeight.label : x[p].label, ue = () => o ? { height: o } : {}, ce = () => l === "default" ? S : U || S || "", fe = () => le ? a ? g === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? g === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", de = l === "default" && "transition-all duration-200 ease-in-out";
132
+ return xe(() => {
133
+ if (w.current) {
134
+ const m = ((H) => {
135
+ let n = H;
136
+ for (; n && n !== document.body; ) {
137
+ const j = window.getComputedStyle(n).backgroundColor;
138
+ if (j && j !== "transparent" && j !== "rgba(0, 0, 0, 0)")
139
+ return j;
140
+ n = n.parentElement;
137
141
  }
138
- const w = window.getComputedStyle(document.body).backgroundColor;
139
- return w && w !== "transparent" && w !== "rgba(0, 0, 0, 0)" ? w : "rgb(255, 255, 255)";
140
- })(b.current.parentElement);
141
- b.current.style.backgroundColor = x;
142
+ const y = window.getComputedStyle(document.body).backgroundColor;
143
+ return y && y !== "transparent" && y !== "rgba(0, 0, 0, 0)" ? y : "rgb(255, 255, 255)";
144
+ })(w.current.parentElement);
145
+ w.current.style.backgroundColor = m;
142
146
  }
143
147
  }, []), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
144
148
  /* @__PURE__ */ t.jsxs(
@@ -146,83 +150,85 @@ const j = {
146
150
  {
147
151
  className: e(
148
152
  "relative",
149
- d[i].container,
150
- !g && "w-full",
153
+ x[p].container,
154
+ !h && "w-full",
151
155
  "bg-inherit",
152
- o === "static" && "mt-2"
156
+ l === "static" && "mt-2",
157
+ _
153
158
  ),
154
- style: I,
159
+ style: N,
155
160
  children: [
156
161
  /* @__PURE__ */ t.jsx(
157
162
  "input",
158
163
  {
159
- id: E,
160
- name: E,
161
- type: r === "password" && z ? "text" : r,
162
- value: h,
163
- placeholder: le(),
164
+ id: k,
165
+ name: k,
166
+ ref: $,
167
+ value: b,
168
+ placeholder: ce(),
169
+ type: r === "password" && B ? "text" : r,
164
170
  className: e(
165
171
  "peer w-full border-1 rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
166
172
  "focus:outline-none px-3",
167
- o === "default" && "placeholder:text-transparent",
168
- o === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
169
- d[i].input,
170
- j[c].input,
173
+ l === "default" && "placeholder:text-transparent",
174
+ l === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
175
+ x[p].input,
176
+ C[f].input,
171
177
  a && "pr-10",
172
- k && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
173
- j[c].container,
174
- ae()
178
+ z && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
179
+ C[f].container,
180
+ fe()
175
181
  ),
176
- style: oe(),
177
- onChange: _,
178
- onFocus: Y,
179
- onBlur: Z,
180
- disabled: k,
181
- required: P,
182
- onEmptied: D,
183
- onKeyDown: Q,
184
- onKeyUp: U
182
+ style: ue(),
183
+ onChange: te,
184
+ onFocus: M,
185
+ onBlur: ee,
186
+ disabled: z,
187
+ required: D,
188
+ onEmptied: V,
189
+ onKeyDown: Y,
190
+ onKeyUp: Z
185
191
  }
186
192
  ),
187
193
  /* @__PURE__ */ t.jsx(
188
194
  "label",
189
195
  {
190
- ref: b,
191
- htmlFor: E,
196
+ ref: w,
197
+ htmlFor: k,
192
198
  className: e(
193
199
  "absolute left-3 pointer-events-none px-1 z-10",
194
- ne,
195
- se(),
196
- j[c].label,
197
- re(),
198
- P && "after:content-['*'] after:text-error-default after:ml-1",
199
- k && "text-neutral-medium-disabled prometeo-fonts-label-large"
200
+ de,
201
+ ae(),
202
+ C[f].label,
203
+ ne(),
204
+ D && "after:content-['*'] after:text-error-default after:ml-1",
205
+ z && "text-neutral-medium-disabled prometeo-fonts-label-large"
200
206
  ),
201
- children: C
207
+ children: S
202
208
  }
203
209
  ),
204
- (a || r === "password" || f) && /* @__PURE__ */ t.jsx(
210
+ (a || r === "password" || d) && /* @__PURE__ */ t.jsx(
205
211
  "div",
206
212
  {
207
213
  className: e(
208
214
  "absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10",
209
- d[i].icon,
210
- j[c].icon,
211
- r === "password" && !f ? "cursor-pointer" : "pointer-events-none",
212
- m === "right" ? "right-3" : "left-3"
215
+ x[p].icon,
216
+ C[f].icon,
217
+ r === "password" && !d ? "cursor-pointer" : "pointer-events-none",
218
+ g === "right" ? "right-3" : "left-3"
213
219
  ),
214
- onClick: r === "password" && !f ? q : void 0,
215
- onMouseDown: (p) => r === "password" && !f && p.preventDefault(),
216
- children: /* @__PURE__ */ t.jsx("div", { children: f && r !== "password" ? /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(pe, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : r === "password" ? z ? /* @__PURE__ */ t.jsx(O.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ t.jsx(O.EyeVisibilityOff, { size: 24, className: "" }) : a })
220
+ onClick: r === "password" && !d ? re : void 0,
221
+ onMouseDown: (s) => r === "password" && !d && s.preventDefault(),
222
+ children: /* @__PURE__ */ t.jsx("div", { children: d && r !== "password" ? /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(ge, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : r === "password" ? B ? /* @__PURE__ */ t.jsx(J.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ t.jsx(J.EyeVisibilityOff, { size: 24, className: "" }) : a })
217
223
  }
218
224
  )
219
225
  ]
220
226
  }
221
227
  ),
222
- ee && L,
223
- F && H
228
+ oe && R,
229
+ G && P
224
230
  ] });
225
- }, Ce = ue(xe);
231
+ }, ke = ie(he);
226
232
  export {
227
- Ce as default
233
+ ke as default
228
234
  };
@@ -1,73 +1,76 @@
1
1
  import { j as r } from "./jsx-runtime-ByW6EXIE.js";
2
- import { Icons as E } from "./Icons.es.js";
2
+ import { Icons as C } from "./Icons.es.js";
3
3
  import { c as d } from "./cn-B6yFEsav.js";
4
- import M, { useRef as D, useState as p, useCallback as W, useEffect as X } from "react";
5
- const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator: b = ",", variant: y = "default", placeholder: K, itemClassName: P, itemIcon: V, helperText: w, errorText: j, disabled: a, ...U }) => {
6
- const o = D(null), I = D(null), [u, n] = p(""), [F, i] = p(0), [$, c] = p(!0), [N, z] = p(!1), [m, x] = p(!1), [k, v] = p(null), h = (e) => {
7
- if (!e) return;
4
+ import S, { useRef as M, useState as x, useCallback as T, useEffect as ee } from "react";
5
+ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator: w = ",", variant: y = "default", placeholder: U, itemClassName: $, itemIcon: F, helperText: j, errorText: N, disabled: a, onClick: z, className: B, readonly: h, onValueDelete: O, ...q }) => {
6
+ const o = M(null), E = M(null), [u, n] = x(""), [P, i] = x(0), [A, c] = x(!0), [v, R] = x(!1), [m, p] = x(!1), [k, I] = x(null), g = (e) => {
7
+ if (h || !e) return;
8
8
  const t = e.selectionStart ?? u.length;
9
9
  i(t);
10
- }, B = (e) => {
11
- if (e.target.value[e.target.value.length - 1] === b && u.length > 0) {
10
+ }, G = (e) => {
11
+ if (h) return;
12
+ if (e.target.value[e.target.value.length - 1] === w && u.length > 0) {
12
13
  const s = u.trim();
13
14
  if (m) {
14
- s.length > 0 ? (n(s), g()) : (x(!1), n(""), c(!0), i(0));
15
+ s.length > 0 ? (n(s), b()) : (p(!1), n(""), c(!0), i(0));
15
16
  return;
16
17
  }
17
18
  if (s.length === 0 || l.includes(s)) {
18
- n(""), c(!0), h(e.target);
19
+ n(""), c(!0), g(e.target);
19
20
  return;
20
21
  }
21
22
  f([...l, s]), n(""), c(!0);
22
23
  } else {
23
- if (e.target.value === b) return;
24
+ if (e.target.value === w) return;
24
25
  n(e.target.value), c(!1);
25
26
  }
26
- h(e.target);
27
- }, g = W(() => {
27
+ g(e.target);
28
+ }, b = T(() => {
28
29
  const e = u.trim();
29
30
  if (e.length === 0) {
30
- x(!1), n(""), c(!0), i(0), v(null);
31
- return;
32
- }
33
- x(!1), k !== null && f(H(l.map((t, s) => s === k ? e : t))), n(""), c(!0), i(0), v(null);
34
- }, [k, u, f, l]), O = (e) => {
35
- if (e.key === "Backspace" && u.length === 0) {
36
- if ($) {
37
- const t = l[l.length - 1];
38
- t && (f(l.filter((s) => s !== t)), n(t), i(t.length));
39
- } else
40
- c(!0);
31
+ p(!1), n(""), c(!0), i(0), I(null);
41
32
  return;
42
33
  }
43
- if (e.key === "Enter") {
44
- const t = u.trim();
45
- if (m) {
46
- t.length > 0 ? (n(t), g()) : (x(!1), n(""), c(!0), i(0));
34
+ p(!1), k !== null && f(W(l.map((t, s) => s === k ? e : t))), n(""), c(!0), i(0), I(null);
35
+ }, [k, u, f, l]), H = (e) => {
36
+ if (!h) {
37
+ if (e.key === "Backspace" && u.length === 0) {
38
+ if (A) {
39
+ const t = l[l.length - 1];
40
+ t && (f(l.filter((s) => s !== t)), n(t), i(t.length));
41
+ } else
42
+ c(!0);
47
43
  return;
48
44
  }
49
- t.length > 0 && !l.includes(t) && t !== b && (f([...l, t]), n(""), c(!0), i(0));
45
+ if (e.key === "Enter") {
46
+ const t = u.trim();
47
+ if (m) {
48
+ t.length > 0 ? (n(t), b()) : (p(!1), n(""), c(!0), i(0));
49
+ return;
50
+ }
51
+ t.length > 0 && !l.includes(t) && t !== w && (f([...l, t]), n(""), c(!0), i(0));
52
+ }
53
+ e.key === "Escape" && m && (p(!1), n(""), c(!0), i(0), I(null)), g(e.currentTarget);
50
54
  }
51
- e.key === "Escape" && m && (x(!1), n(""), c(!0), i(0), v(null)), h(e.currentTarget);
52
- }, q = (e) => {
55
+ }, J = (e) => {
53
56
  const t = l.filter((s) => s !== e);
54
- f(t);
55
- }, A = (e) => {
56
- G(e), x(!0), n(e), i(e.length), v(l.length - 1), o.current?.focus();
57
- }, G = (e) => {
57
+ f(t), O?.(e);
58
+ }, L = (e) => {
59
+ h || (Q(e), p(!0), n(e), i(e.length), I(l.length - 1), o.current?.focus());
60
+ }, Q = (e) => {
58
61
  const t = l.filter((s) => s !== e);
59
62
  f([...t, e]);
60
- }, H = (e) => e.filter((t, s, Q) => Q.indexOf(t) === s);
61
- X(() => {
63
+ }, W = (e) => e.filter((t, s, Z) => Z.indexOf(t) === s);
64
+ ee(() => {
62
65
  o.current && (o.current.onfocus = () => {
63
- z(!0);
66
+ R(!0);
64
67
  }, o.current.onblur = () => {
65
- z(!1), m && g();
66
- }), I.current && (I.current.onblur = () => {
67
- m && g();
68
+ R(!1), m && b();
69
+ }), E.current && (E.current.onblur = () => {
70
+ m && b();
68
71
  });
69
- }, [m, g]);
70
- const J = {
72
+ }, [m, b]);
73
+ const X = {
71
74
  isFocused: {
72
75
  error: "border-error-default-focused ring-error-default-focused",
73
76
  success: "border-success-default-focused ring-success-default-focused",
@@ -86,7 +89,7 @@ const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator:
86
89
  warning: "border-warning-default-disabled",
87
90
  default: "border-neutral-default-disabled"
88
91
  }
89
- }, L = {
92
+ }, Y = {
90
93
  default: {
91
94
  default: "text-neutral-default-default",
92
95
  isFocused: "text-neutral-default-focused",
@@ -107,26 +110,27 @@ const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator:
107
110
  isFocused: "text-warning-default-focused",
108
111
  disabled: "text-warning-default-disabled"
109
112
  }
110
- }, _ = a ? "disabled" : N ? "isFocused" : "default";
113
+ }, _ = a ? "disabled" : v ? "isFocused" : "default";
111
114
  return /* @__PURE__ */ r.jsxs("div", { className: d(
112
- "relative w-full"
115
+ "relative w-full",
116
+ B
113
117
  ), children: [
114
118
  /* @__PURE__ */ r.jsx("p", { className: d(
115
119
  "mb-1 px-3",
116
120
  "prometeo-fonts-label-large",
117
- L?.[y || "default"]?.[_]
118
- ), children: R }),
121
+ Y?.[y || "default"]?.[_]
122
+ ), children: D }),
119
123
  /* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
120
124
  /* @__PURE__ */ r.jsx(
121
125
  "input",
122
126
  {
123
127
  ref: o,
124
128
  value: u,
125
- onKeyUp: O,
126
- onChange: B,
127
- onClick: (e) => h(e.currentTarget),
128
- onSelect: (e) => h(e.currentTarget),
129
- name: S,
129
+ onKeyUp: H,
130
+ onChange: G,
131
+ onClick: (e) => g(e.currentTarget),
132
+ onSelect: (e) => g(e.currentTarget),
133
+ name: K,
130
134
  disabled: a,
131
135
  className: d(
132
136
  "absolute inset-0 w-full h-full",
@@ -139,36 +143,36 @@ const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator:
139
143
  autoCapitalize: "off",
140
144
  spellCheck: "false",
141
145
  inputMode: "text",
142
- ...U
146
+ ...q
143
147
  }
144
148
  ),
145
149
  /* @__PURE__ */ r.jsxs(
146
150
  "div",
147
151
  {
148
- ref: I,
152
+ ref: E,
149
153
  className: d(
150
154
  "border-1 border-neutral-default-default rounded-md p-3",
151
155
  "flex flex-wrap gap-1 min-h-[58px]",
152
156
  "transition-all duration-300 ease-in-out",
153
157
  "cursor-text",
154
- J[_][y],
155
- N ? "ring-[1px]" : "",
158
+ X[_][y],
159
+ v ? "ring-[1px]" : "",
156
160
  // 'hover:border-primary-default-hover',
157
161
  a && "hover:border-neutral-default-disabled"
158
162
  ),
159
163
  onMouseDown: (e) => {
160
- e.preventDefault(), o.current?.focus();
164
+ e.stopPropagation(), z?.(e), o.current?.focus();
161
165
  const t = u.length;
162
166
  o.current && (o.current.selectionStart = t, o.current.selectionEnd = t), i(t);
163
167
  },
164
- onClick: () => {
165
- o.current?.focus();
168
+ onClick: (e) => {
169
+ e.stopPropagation(), o.current?.focus(), z?.(e);
166
170
  },
167
171
  children: [
168
- C && /* @__PURE__ */ r.jsx("div", { className: d(
172
+ V && /* @__PURE__ */ r.jsx("div", { className: d(
169
173
  "flex items-center text-neutral-default-default",
170
174
  a && "text-neutral-default-disabled"
171
- ), children: C }),
175
+ ), children: V }),
172
176
  l.map((e, t) => /* @__PURE__ */ r.jsxs(
173
177
  "div",
174
178
  {
@@ -178,11 +182,11 @@ const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator:
178
182
  "prometeo-fonts-label-medium z-20",
179
183
  t === l.length - 1 && m ? "opacity-0 hidden overflow-hidden" : "",
180
184
  a && "border-neutral-default-disabled text-neutral-default-disabled",
181
- P
185
+ $
182
186
  ),
183
187
  children: [
184
- V && /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: M.createElement(
185
- V,
188
+ F && /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: S.createElement(
189
+ F,
186
190
  {
187
191
  size: 16,
188
192
  className: d(
@@ -194,7 +198,9 @@ const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator:
194
198
  /* @__PURE__ */ r.jsx(
195
199
  "span",
196
200
  {
197
- onClick: () => !a && A(e),
201
+ onClick: (s) => {
202
+ s.stopPropagation(), !a && L(e);
203
+ },
198
204
  className: d(
199
205
  "cursor-pointer hover:text-neutral-default-hover",
200
206
  a && "cursor-default hover:text-neutral-default-disabled"
@@ -205,13 +211,15 @@ const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator:
205
211
  /* @__PURE__ */ r.jsx(
206
212
  "div",
207
213
  {
208
- onClick: () => !a && q(e),
214
+ onClick: (s) => {
215
+ s.stopPropagation(), !a && J(e);
216
+ },
209
217
  className: d(
210
- "cursor-pointer hover:scale-105 transition-all duration-200",
218
+ "cursor-pointer hover:scale-105 transition-all duration-200 ",
211
219
  a && " cursor-default hover:scale-100 "
212
220
  ),
213
221
  children: /* @__PURE__ */ r.jsx(
214
- E.Close,
222
+ C.Close,
215
223
  {
216
224
  size: 16,
217
225
  className: d(
@@ -226,29 +234,29 @@ const Y = ({ label: R, name: S, onChange: f, value: l, icon: C, valueSeparator:
226
234
  },
227
235
  e
228
236
  )),
229
- N && /* @__PURE__ */ r.jsxs("div", { className: "flex items-center min-w-[2px]", children: [
230
- /* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap break-words", children: u.slice(0, F) }),
237
+ v && !h && /* @__PURE__ */ r.jsxs("div", { className: "flex items-center min-w-[2px]", children: [
238
+ /* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap break-words", children: u.slice(0, P) }),
231
239
  /* @__PURE__ */ r.jsx("span", { className: "animate-[cursor-intermitent_1s_ease-in-out_infinite] bg-neutral-default-pressed w-[2px] h-5 inline-block align-middle mx-[1px] z-20" }),
232
- /* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap break-words", children: u.slice(F) })
240
+ /* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap break-words", children: u.slice(P) })
233
241
  ] }),
234
- l.length === 0 && !N && /* @__PURE__ */ r.jsx("span", { className: d(
242
+ l.length === 0 && !v && /* @__PURE__ */ r.jsx("span", { className: d(
235
243
  "text-neutral-medium-default self-center",
236
244
  a && "text-neutral-default-disabled"
237
- ), children: K || `Escribe los valores separados por ${b}` })
245
+ ), children: U || `Escribe los valores separados por ${w}` })
238
246
  ]
239
247
  }
240
248
  )
241
249
  ] }),
242
- w && y !== "error" && !a && (typeof w == "string" ? /* @__PURE__ */ r.jsxs("div", { className: "prometeo-fonts-body-small text-neutral-medium-default ml-3 mt-1 flex items-center gap-1", children: [
243
- /* @__PURE__ */ r.jsx(E.Info, { size: 16, className: "text-neutral-medium-default" }),
244
- w
245
- ] }) : /* @__PURE__ */ r.jsx("div", { className: "ml-3", children: w })),
246
- j && typeof j == "string" && !a ? /* @__PURE__ */ r.jsxs("div", { className: "prometeo-fonts-body-small text-error-default-default ml-3 mt-1 flex items-center gap-1", children: [
247
- /* @__PURE__ */ r.jsx(E.Error, { size: 16, className: "text-error-default-default" }),
250
+ j && y !== "error" && !a && (typeof j == "string" ? /* @__PURE__ */ r.jsxs("div", { className: "prometeo-fonts-body-small text-neutral-medium-default ml-3 mt-1 flex items-center gap-1", children: [
251
+ /* @__PURE__ */ r.jsx(C.Info, { size: 16, className: "text-neutral-medium-default" }),
248
252
  j
249
- ] }) : j
253
+ ] }) : /* @__PURE__ */ r.jsx("div", { className: "ml-3", children: j })),
254
+ N && typeof N == "string" && !a ? /* @__PURE__ */ r.jsxs("div", { className: "prometeo-fonts-body-small text-error-default-default ml-3 mt-1 flex items-center gap-1", children: [
255
+ /* @__PURE__ */ r.jsx(C.Error, { size: 16, className: "text-error-default-default" }),
256
+ N
257
+ ] }) : N
250
258
  ] });
251
- }, re = M.memo(Y);
259
+ }, ne = S.memo(te);
252
260
  export {
253
- re as InputMultiple
261
+ ne as InputMultiple
254
262
  };