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.
- package/dist/DatePicker.d.ts +4 -0
- package/dist/DatePicker.es.js +3405 -0
- package/dist/DropZone.es.js +5 -5
- package/dist/Input.es.js +115 -109
- package/dist/InputMultiple.es.js +90 -82
- package/dist/Table.es.js +6 -6
- package/dist/components/DatePicker/DatePicker.d.ts +48 -0
- package/dist/components/Input/Input.d.ts +5 -3
- package/dist/components/InputMultiple/InputMultiple.d.ts +5 -1
- package/dist/components/TabSwitch/TabSwitch.d.ts +21 -1
- package/dist/exports/DatePicker.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/pages/DatePicker.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +39 -37
- package/package.json +7 -1
- package/src/styles/intellisense.css +1 -0
package/dist/DropZone.es.js
CHANGED
|
@@ -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
|
|
4
|
-
import { useDropzone as
|
|
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 =
|
|
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 =
|
|
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
|
-
} =
|
|
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
|
|
2
|
+
import { Icons as J } from "./Icons.es.js";
|
|
3
3
|
import { c as e } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { memo as
|
|
5
|
-
import { useDebounce as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
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
|
-
},
|
|
57
|
-
label:
|
|
56
|
+
}, he = ({
|
|
57
|
+
label: S,
|
|
58
58
|
icon: a,
|
|
59
|
-
iconPosition:
|
|
60
|
-
onChange:
|
|
61
|
-
value:
|
|
62
|
-
debounceMs:
|
|
63
|
-
name:
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
66
|
-
variant:
|
|
67
|
-
labelVariant:
|
|
68
|
-
size:
|
|
69
|
-
disabled:
|
|
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:
|
|
72
|
-
errorComponent:
|
|
73
|
-
helperComponent:
|
|
74
|
-
placeholder:
|
|
75
|
-
required:
|
|
76
|
-
onFocus:
|
|
77
|
-
onBlur:
|
|
78
|
-
onEmptied:
|
|
79
|
-
onKeyDown:
|
|
80
|
-
onKeyUp:
|
|
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 [
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
const
|
|
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
|
-
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, [
|
|
114
|
-
|
|
115
|
-
}, [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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
|
|
139
|
-
return
|
|
140
|
-
})(
|
|
141
|
-
|
|
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
|
-
|
|
150
|
-
!
|
|
153
|
+
x[p].container,
|
|
154
|
+
!h && "w-full",
|
|
151
155
|
"bg-inherit",
|
|
152
|
-
|
|
156
|
+
l === "static" && "mt-2",
|
|
157
|
+
_
|
|
153
158
|
),
|
|
154
|
-
style:
|
|
159
|
+
style: N,
|
|
155
160
|
children: [
|
|
156
161
|
/* @__PURE__ */ t.jsx(
|
|
157
162
|
"input",
|
|
158
163
|
{
|
|
159
|
-
id:
|
|
160
|
-
name:
|
|
161
|
-
|
|
162
|
-
value:
|
|
163
|
-
placeholder:
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
178
|
+
z && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
179
|
+
C[f].container,
|
|
180
|
+
fe()
|
|
175
181
|
),
|
|
176
|
-
style:
|
|
177
|
-
onChange:
|
|
178
|
-
onFocus:
|
|
179
|
-
onBlur:
|
|
180
|
-
disabled:
|
|
181
|
-
required:
|
|
182
|
-
onEmptied:
|
|
183
|
-
onKeyDown:
|
|
184
|
-
onKeyUp:
|
|
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:
|
|
191
|
-
htmlFor:
|
|
196
|
+
ref: w,
|
|
197
|
+
htmlFor: k,
|
|
192
198
|
className: e(
|
|
193
199
|
"absolute left-3 pointer-events-none px-1 z-10",
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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:
|
|
207
|
+
children: S
|
|
202
208
|
}
|
|
203
209
|
),
|
|
204
|
-
(a || r === "password" ||
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
r === "password" && !
|
|
212
|
-
|
|
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" && !
|
|
215
|
-
onMouseDown: (
|
|
216
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
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
|
-
|
|
223
|
-
|
|
228
|
+
oe && R,
|
|
229
|
+
G && P
|
|
224
230
|
] });
|
|
225
|
-
},
|
|
231
|
+
}, ke = ie(he);
|
|
226
232
|
export {
|
|
227
|
-
|
|
233
|
+
ke as default
|
|
228
234
|
};
|
package/dist/InputMultiple.es.js
CHANGED
|
@@ -1,73 +1,76 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
-
import { Icons as
|
|
2
|
+
import { Icons as C } from "./Icons.es.js";
|
|
3
3
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const o =
|
|
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
|
-
},
|
|
11
|
-
if (
|
|
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),
|
|
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),
|
|
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 ===
|
|
24
|
+
if (e.target.value === w) return;
|
|
24
25
|
n(e.target.value), c(!1);
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
},
|
|
27
|
+
g(e.target);
|
|
28
|
+
}, b = T(() => {
|
|
28
29
|
const e = u.trim();
|
|
29
30
|
if (e.length === 0) {
|
|
30
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
-
}, q = (e) => {
|
|
55
|
+
}, J = (e) => {
|
|
53
56
|
const t = l.filter((s) => s !== e);
|
|
54
|
-
f(t);
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
},
|
|
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
|
-
},
|
|
61
|
-
|
|
63
|
+
}, W = (e) => e.filter((t, s, Z) => Z.indexOf(t) === s);
|
|
64
|
+
ee(() => {
|
|
62
65
|
o.current && (o.current.onfocus = () => {
|
|
63
|
-
|
|
66
|
+
R(!0);
|
|
64
67
|
}, o.current.onblur = () => {
|
|
65
|
-
|
|
66
|
-
}),
|
|
67
|
-
m &&
|
|
68
|
+
R(!1), m && b();
|
|
69
|
+
}), E.current && (E.current.onblur = () => {
|
|
70
|
+
m && b();
|
|
68
71
|
});
|
|
69
|
-
}, [m,
|
|
70
|
-
const
|
|
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
|
-
},
|
|
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" :
|
|
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
|
-
|
|
118
|
-
), children:
|
|
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:
|
|
126
|
-
onChange:
|
|
127
|
-
onClick: (e) =>
|
|
128
|
-
onSelect: (e) =>
|
|
129
|
-
name:
|
|
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
|
-
...
|
|
146
|
+
...q
|
|
143
147
|
}
|
|
144
148
|
),
|
|
145
149
|
/* @__PURE__ */ r.jsxs(
|
|
146
150
|
"div",
|
|
147
151
|
{
|
|
148
|
-
ref:
|
|
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
|
-
|
|
155
|
-
|
|
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.
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
185
|
+
$
|
|
182
186
|
),
|
|
183
187
|
children: [
|
|
184
|
-
|
|
185
|
-
|
|
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: () =>
|
|
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: () =>
|
|
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
|
-
|
|
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
|
-
|
|
230
|
-
/* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap break-words", children: u.slice(0,
|
|
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(
|
|
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 && !
|
|
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:
|
|
245
|
+
), children: U || `Escribe los valores separados por ${w}` })
|
|
238
246
|
]
|
|
239
247
|
}
|
|
240
248
|
)
|
|
241
249
|
] }),
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */ r.jsx(
|
|
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
|
-
},
|
|
259
|
+
}, ne = S.memo(te);
|
|
252
260
|
export {
|
|
253
|
-
|
|
261
|
+
ne as InputMultiple
|
|
254
262
|
};
|