prometeo-design-system 4.3.3 → 4.3.5
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/PyrionLayout.es.js +660 -647
- package/dist/Scrollable.es.js +1 -1
- package/dist/Select.es.js +540 -528
- package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +4 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/Select.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
3
|
-
import Se, { memo as J, useState as Ne, useRef as ae, useMemo as te, useCallback as
|
|
4
|
-
import
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { H as
|
|
9
|
-
import { Close as
|
|
10
|
-
import
|
|
11
|
-
import { g as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
3
|
+
import Se, { memo as J, useState as Ne, useRef as ae, useMemo as te, useCallback as $, useEffect as pe, useImperativeHandle as Xe } from "react";
|
|
4
|
+
import Ye from "./Spinner.es.js";
|
|
5
|
+
import { createPortal as Ze } from "react-dom";
|
|
6
|
+
import { u as et } from "./useDragScroll-CHN9OMwn.js";
|
|
7
|
+
import { u as tt } from "./useLabelBackground-D5SzHhl_.js";
|
|
8
|
+
import { H as nt } from "./HelperComponent-ljsn0xD6.js";
|
|
9
|
+
import { Close as rt } from "./Icons/Close.es.js";
|
|
10
|
+
import lt from "./CheckBox.es.js";
|
|
11
|
+
import { g as L, h as Ue } from "./utils-X4-h3cum.js";
|
|
12
|
+
import ot from "./Input.es.js";
|
|
13
|
+
import qe from "./Skeleton.es.js";
|
|
14
14
|
import { Cancel as at } from "./Icons/Cancel.es.js";
|
|
15
|
-
import { ChevronDown as
|
|
16
|
-
import { Search as
|
|
17
|
-
const
|
|
15
|
+
import { ChevronDown as Re } from "./Icons/ChevronDown.es.js";
|
|
16
|
+
import { Search as st } from "./Icons/Search.es.js";
|
|
17
|
+
const it = {
|
|
18
18
|
default: {
|
|
19
19
|
container: "text-neutral-default-default border-neutral-default-default ",
|
|
20
20
|
icon: ""
|
|
@@ -27,49 +27,49 @@ const st = {
|
|
|
27
27
|
container: "",
|
|
28
28
|
icon: ""
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, Ve = {
|
|
31
31
|
icon: " text-neutral-default-disabled",
|
|
32
32
|
container: " border-neutral-strong-default text-neutral-default-disabled"
|
|
33
|
-
},
|
|
33
|
+
}, Je = ({ id: e, label: n, onRemove: f, className: x, disabled: h, variant: w = "default", tabIndex: p }) => /* @__PURE__ */ a.jsxs(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
tabIndex:
|
|
36
|
+
tabIndex: p,
|
|
37
37
|
className: d(
|
|
38
38
|
"inline-flex max-w-[calc(50%-0.25rem)] items-center gap-1 px-2 py-1 bg-inherit text-xs rounded-lg border h-[30px]",
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
it[w].container,
|
|
40
|
+
h && Ve.container
|
|
41
41
|
),
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ a.jsx("span", { className: "truncate w-max ", children: n }),
|
|
44
|
-
|
|
44
|
+
f && /* @__PURE__ */ a.jsx(
|
|
45
45
|
"button",
|
|
46
46
|
{
|
|
47
|
-
onMouseDown: (
|
|
48
|
-
|
|
47
|
+
onMouseDown: (O) => {
|
|
48
|
+
h || (O.stopPropagation(), O.preventDefault(), f?.(e));
|
|
49
49
|
},
|
|
50
50
|
className: d(
|
|
51
51
|
"shrink-0 p-0.5 transition-all duration-200 hover:text-neutral-default-hover cursor-pointer z-50 text-neutral-default-default hover:scale-105",
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
h && "cursor-default hover:scale-100",
|
|
53
|
+
x
|
|
54
54
|
),
|
|
55
55
|
type: "button",
|
|
56
|
-
tabIndex:
|
|
57
|
-
children: /* @__PURE__ */ a.jsx(
|
|
56
|
+
tabIndex: p,
|
|
57
|
+
children: /* @__PURE__ */ a.jsx(rt, { size: 18, className: d(h && Ve.icon) })
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
const n = [],
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
Array.isArray(
|
|
63
|
+
Je.displayName = "Chip";
|
|
64
|
+
const ut = J(Je), ct = (e) => {
|
|
65
|
+
const n = [], f = (x) => {
|
|
66
|
+
x.forEach((h) => {
|
|
67
|
+
const w = h, p = typeof w == "object" ? w?.options : [];
|
|
68
|
+
Array.isArray(p) && p.length > 0 ? f(p) : n.push(h);
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
|
-
return
|
|
72
|
-
},
|
|
71
|
+
return f(e), n;
|
|
72
|
+
}, Ke = {
|
|
73
73
|
default: {
|
|
74
74
|
container: "",
|
|
75
75
|
input: d(
|
|
@@ -106,7 +106,7 @@ const it = J(Re), ut = (e) => {
|
|
|
106
106
|
label: d("text-success", "peer-focus:text-success-light"),
|
|
107
107
|
icon: d("text-success-medium-default", "peer-focus:text-success-light")
|
|
108
108
|
}
|
|
109
|
-
},
|
|
109
|
+
}, We = {
|
|
110
110
|
input: d(
|
|
111
111
|
"border-neutral-strong-default text-neutral-default-default pointer-events-none",
|
|
112
112
|
"focus:ring-0 focus:border-primary-default-disabled ",
|
|
@@ -121,50 +121,50 @@ const it = J(Re), ut = (e) => {
|
|
|
121
121
|
"peer-focus:text-primary-default-default"
|
|
122
122
|
)
|
|
123
123
|
};
|
|
124
|
-
function
|
|
125
|
-
const [n,
|
|
124
|
+
function dt(e) {
|
|
125
|
+
const [n, f] = Ne(!1), [x, h] = Ne([]), [w, p] = Ne(""), O = ae(null), m = ae(null), T = ae(null), _ = ae(null), F = ae(
|
|
126
126
|
() => {
|
|
127
127
|
}
|
|
128
|
-
),
|
|
129
|
-
id:
|
|
130
|
-
name:
|
|
131
|
-
label:
|
|
132
|
-
height:
|
|
128
|
+
), De = ae(null), ge = ae(/* @__PURE__ */ new Set()), {
|
|
129
|
+
id: A,
|
|
130
|
+
name: j,
|
|
131
|
+
label: be,
|
|
132
|
+
height: xe,
|
|
133
133
|
options: Q,
|
|
134
134
|
controls: ne,
|
|
135
135
|
className: K,
|
|
136
|
-
placeholder:
|
|
137
|
-
optionValue:
|
|
138
|
-
optionLabel:
|
|
139
|
-
renderOption:
|
|
140
|
-
renderOptionGroupHeader:
|
|
141
|
-
renderSelection:
|
|
136
|
+
placeholder: G,
|
|
137
|
+
optionValue: H,
|
|
138
|
+
optionLabel: se,
|
|
139
|
+
renderOption: W,
|
|
140
|
+
renderOptionGroupHeader: ie,
|
|
141
|
+
renderSelection: je,
|
|
142
142
|
renderOptionContext: ze,
|
|
143
143
|
buttonClassName: He,
|
|
144
144
|
dropdownClassName: re,
|
|
145
|
-
containerClassName:
|
|
146
|
-
dropdownOptions:
|
|
145
|
+
containerClassName: B,
|
|
146
|
+
dropdownOptions: k,
|
|
147
147
|
helperComponent: X,
|
|
148
|
-
errorComponent:
|
|
149
|
-
onRemoveOption:
|
|
150
|
-
onOptionClick:
|
|
151
|
-
onClose:
|
|
152
|
-
onClear:
|
|
153
|
-
disabled:
|
|
148
|
+
errorComponent: ye,
|
|
149
|
+
onRemoveOption: ke,
|
|
150
|
+
onOptionClick: U,
|
|
151
|
+
onClose: Oe,
|
|
152
|
+
onClear: ve,
|
|
153
|
+
disabled: P = !1,
|
|
154
154
|
overflow: Ae = "wrap",
|
|
155
|
-
variant:
|
|
155
|
+
variant: Ce = "default",
|
|
156
156
|
isLoading: le = !1,
|
|
157
|
-
attachToParent:
|
|
157
|
+
attachToParent: ue = !1,
|
|
158
158
|
displayMode: Ee = "compact",
|
|
159
159
|
labelVariant: Y = "default",
|
|
160
160
|
disableOpenOnFocus: Me = !1,
|
|
161
161
|
emptyMessage: Te = "No hay opciones disponibles"
|
|
162
|
-
} = e, { ref: Le } =
|
|
162
|
+
} = e, { ref: Le } = tt(), { bind: q, ref: Pe } = et({
|
|
163
163
|
axis: "x",
|
|
164
164
|
cursor: { idle: "default", dragging: "grabbing" }
|
|
165
|
-
}),
|
|
166
|
-
() =>
|
|
167
|
-
[
|
|
165
|
+
}), ce = e.multiple ? Array.isArray(e.value) && e.value.length > 0 && e.value.every((t) => t != null && t !== "") : e.value !== void 0 && e.value !== null && e.value !== "", $e = {}, Ge = te(() => Y === "static" && G ? G : "", [Y, G]), _e = te(
|
|
166
|
+
() => k?.controledSearchValue || w,
|
|
167
|
+
[k?.controledSearchValue, w]
|
|
168
168
|
), Ie = () => {
|
|
169
169
|
const t = {
|
|
170
170
|
static: {
|
|
@@ -175,257 +175,269 @@ function ct(e) {
|
|
|
175
175
|
active: "absolute top-0 -translate-y-1/2 left-3 px-1 prometeo-fonts-body-small",
|
|
176
176
|
default: "absolute top-1/2 -translate-y-1/2 "
|
|
177
177
|
}
|
|
178
|
-
},
|
|
179
|
-
return t[Y][
|
|
180
|
-
},
|
|
178
|
+
}, s = n || ce ? "active" : "default";
|
|
179
|
+
return t[Y][s];
|
|
180
|
+
}, I = $(
|
|
181
181
|
(t) => ({
|
|
182
|
-
id:
|
|
183
|
-
value:
|
|
184
|
-
label:
|
|
182
|
+
id: L(t, H),
|
|
183
|
+
value: L(t, H),
|
|
184
|
+
label: L(t, se)
|
|
185
185
|
}),
|
|
186
|
-
[
|
|
187
|
-
),
|
|
188
|
-
() =>
|
|
189
|
-
[
|
|
190
|
-
),
|
|
186
|
+
[H, se]
|
|
187
|
+
), V = te(() => ct(Q), [Q]), we = te(
|
|
188
|
+
() => V.map(I),
|
|
189
|
+
[V, I]
|
|
190
|
+
), de = te(() => {
|
|
191
191
|
const t = [];
|
|
192
192
|
if (e.multiple)
|
|
193
|
-
e.value?.forEach((
|
|
194
|
-
const
|
|
195
|
-
(
|
|
193
|
+
e.value?.forEach((s) => {
|
|
194
|
+
const l = V?.find(
|
|
195
|
+
(c) => L(c, H) === s
|
|
196
196
|
);
|
|
197
|
-
|
|
197
|
+
l && t.push(l);
|
|
198
198
|
});
|
|
199
199
|
else {
|
|
200
|
-
const
|
|
201
|
-
(
|
|
200
|
+
const s = V?.find(
|
|
201
|
+
(l) => L(l, H) === e.value
|
|
202
202
|
);
|
|
203
|
-
|
|
203
|
+
s && t.push(s);
|
|
204
204
|
}
|
|
205
205
|
return t;
|
|
206
|
-
}, [e.value,
|
|
207
|
-
() =>
|
|
208
|
-
[
|
|
209
|
-
),
|
|
206
|
+
}, [e.value, H, V, e.multiple]), r = te(
|
|
207
|
+
() => de.map(I),
|
|
208
|
+
[de, I]
|
|
209
|
+
), o = te(
|
|
210
210
|
() => new Set(r.map((t) => t.id)),
|
|
211
211
|
[r]
|
|
212
|
-
),
|
|
212
|
+
), i = te(() => {
|
|
213
213
|
const t = [];
|
|
214
|
-
return Q.forEach((
|
|
215
|
-
const
|
|
216
|
-
if (Array.isArray(
|
|
217
|
-
const
|
|
218
|
-
id:
|
|
219
|
-
value:
|
|
220
|
-
label: typeof
|
|
214
|
+
return Q.forEach((s, l) => {
|
|
215
|
+
const c = s, v = typeof c == "object" ? c?.options : [];
|
|
216
|
+
if (Array.isArray(v) && v.length > 0) {
|
|
217
|
+
const g = c.label, y = L(s, H), ee = `__group-${String(y ?? l)}`, me = {
|
|
218
|
+
id: ee,
|
|
219
|
+
value: ee,
|
|
220
|
+
label: typeof g == "string" ? g : String(y ?? `Grupo ${l + 1}`),
|
|
221
221
|
isGroupHeader: !0,
|
|
222
|
-
groupLabelNode:
|
|
223
|
-
originalOption:
|
|
222
|
+
groupLabelNode: g,
|
|
223
|
+
originalOption: s,
|
|
224
224
|
groupData: {
|
|
225
|
-
groupOptions:
|
|
225
|
+
groupOptions: v
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
-
t.push(
|
|
229
|
-
|
|
228
|
+
t.push(me), v.forEach((he) => {
|
|
229
|
+
W ? t.push(he) : t.push(I(he));
|
|
230
230
|
});
|
|
231
231
|
} else
|
|
232
|
-
|
|
232
|
+
W ? t.push(s) : t.push(I(s));
|
|
233
233
|
}), t;
|
|
234
|
-
}, [Q,
|
|
235
|
-
(t,
|
|
234
|
+
}, [Q, H, W, I]), u = $(
|
|
235
|
+
(t, s) => {
|
|
236
236
|
if (!t || t.length === 0) return;
|
|
237
|
-
const
|
|
238
|
-
(
|
|
237
|
+
const l = t.map(
|
|
238
|
+
(C) => I(C)
|
|
239
239
|
);
|
|
240
240
|
if (!e.multiple) {
|
|
241
|
-
const
|
|
242
|
-
if (!
|
|
243
|
-
const
|
|
244
|
-
let
|
|
245
|
-
|
|
241
|
+
const C = l[0];
|
|
242
|
+
if (!C) return;
|
|
243
|
+
const N = o.has(C.id), M = s ?? "toggle";
|
|
244
|
+
let Fe;
|
|
245
|
+
M === "select" || M === "toggle" && !N ? Fe = C : Fe = void 0, e.onChange?.(Fe, j);
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
const
|
|
251
|
-
|
|
248
|
+
const c = e.value || [], v = [];
|
|
249
|
+
c.forEach((C) => {
|
|
250
|
+
const N = we.find((M) => M.value === C);
|
|
251
|
+
N && v.push(N);
|
|
252
252
|
});
|
|
253
|
-
const
|
|
254
|
-
(
|
|
255
|
-
),
|
|
256
|
-
let
|
|
257
|
-
if (!
|
|
258
|
-
|
|
253
|
+
const g = new Set(v.map((C) => C.id)), y = new Set(l.map((C) => C.id)), ee = l.every(
|
|
254
|
+
(C) => g.has(C.id)
|
|
255
|
+
), me = s ?? "toggle", he = me === "select" || me === "toggle" && !ee;
|
|
256
|
+
let z;
|
|
257
|
+
if (!he)
|
|
258
|
+
z = v.filter((C) => !y.has(C.id));
|
|
259
259
|
else {
|
|
260
|
-
const
|
|
261
|
-
|
|
260
|
+
const C = new Map(
|
|
261
|
+
v.map((N) => [N.id, N])
|
|
262
262
|
);
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}),
|
|
263
|
+
l.forEach((N) => {
|
|
264
|
+
C.set(N.id, N);
|
|
265
|
+
}), z = Array.from(C.values());
|
|
266
266
|
}
|
|
267
|
-
e.onChange?.(
|
|
267
|
+
e.onChange?.(z, j);
|
|
268
268
|
},
|
|
269
269
|
[
|
|
270
270
|
e.multiple,
|
|
271
271
|
e.value,
|
|
272
272
|
e.onChange,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
we,
|
|
274
|
+
o,
|
|
275
|
+
I,
|
|
276
|
+
j
|
|
277
277
|
]
|
|
278
|
-
),
|
|
279
|
-
|
|
278
|
+
), S = $(() => {
|
|
279
|
+
f((t) => !t);
|
|
280
280
|
}, []);
|
|
281
|
-
|
|
281
|
+
F.current = (t) => {
|
|
282
282
|
if (!e.multiple)
|
|
283
|
-
e.onChange?.(t,
|
|
283
|
+
e.onChange?.(t, j);
|
|
284
284
|
else {
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
(
|
|
285
|
+
const s = e.value || [], l = [], c = s.includes(t.value);
|
|
286
|
+
s.forEach((g) => {
|
|
287
|
+
const y = we.find(
|
|
288
|
+
(ee) => ee.value === g
|
|
289
289
|
);
|
|
290
|
-
|
|
290
|
+
y && l.push(y);
|
|
291
291
|
});
|
|
292
|
-
const
|
|
293
|
-
e.onChange?.(
|
|
292
|
+
const v = c ? l.filter((g) => g.value !== t.value) : [...l, t];
|
|
293
|
+
e.onChange?.(v, j);
|
|
294
294
|
}
|
|
295
295
|
};
|
|
296
|
-
const
|
|
297
|
-
(t,
|
|
298
|
-
|
|
296
|
+
const D = $(
|
|
297
|
+
(t, s = !1) => {
|
|
298
|
+
U?.(t, j), F.current?.(t), s && (f(!1), Oe?.());
|
|
299
299
|
},
|
|
300
|
-
[
|
|
301
|
-
),
|
|
302
|
-
if (t.preventDefault(), t.stopPropagation(), t.target.blur(),
|
|
303
|
-
const
|
|
304
|
-
|
|
300
|
+
[U, Oe, j]
|
|
301
|
+
), b = (t) => {
|
|
302
|
+
if (t.preventDefault(), t.stopPropagation(), t.target.blur(), ve?.(), e.multiple) {
|
|
303
|
+
const s = e.onChange;
|
|
304
|
+
s?.([], j);
|
|
305
305
|
} else {
|
|
306
|
-
const
|
|
307
|
-
|
|
306
|
+
const s = e.onChange;
|
|
307
|
+
s?.(void 0, j);
|
|
308
308
|
}
|
|
309
|
-
},
|
|
309
|
+
}, E = $(
|
|
310
310
|
(t) => {
|
|
311
|
-
e.multiple || e.onChange?.(void 0,
|
|
312
|
-
const
|
|
313
|
-
(
|
|
311
|
+
e.multiple || e.onChange?.(void 0, j);
|
|
312
|
+
const s = V.find(
|
|
313
|
+
(c) => L(c, H) === t
|
|
314
314
|
);
|
|
315
|
-
if (!
|
|
316
|
-
const
|
|
317
|
-
|
|
315
|
+
if (!s) return;
|
|
316
|
+
const l = I(s);
|
|
317
|
+
U?.(l, j), F.current?.(l), ke?.(s);
|
|
318
318
|
},
|
|
319
319
|
[
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
320
|
+
U,
|
|
321
|
+
ke,
|
|
322
|
+
V,
|
|
323
|
+
j,
|
|
324
324
|
e.multiple,
|
|
325
325
|
e.onChange,
|
|
326
|
-
|
|
327
|
-
|
|
326
|
+
I,
|
|
327
|
+
H
|
|
328
328
|
]
|
|
329
|
-
), Z =
|
|
329
|
+
), Z = $(
|
|
330
330
|
(t) => {
|
|
331
|
-
|
|
331
|
+
E(t);
|
|
332
332
|
},
|
|
333
|
-
[
|
|
334
|
-
);
|
|
335
|
-
|
|
333
|
+
[E]
|
|
334
|
+
), R = (t) => t.tagName === "INPUT" && !["button", "submit", "checkbox", "file", "image"].includes(t.type) || t.hasAttribute("contenteditable");
|
|
335
|
+
pe(() => {
|
|
336
336
|
if (!n) return;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
337
|
+
let t = !1, s = 0;
|
|
338
|
+
const l = (g) => {
|
|
339
|
+
const y = g.target;
|
|
340
|
+
if (console.log("close dropdown target"), g.type === "mousedown") {
|
|
341
|
+
if (O.current?.contains(y) || m.current?.contains(y)) return;
|
|
342
|
+
f(!1);
|
|
342
343
|
}
|
|
343
|
-
if (
|
|
344
|
-
if (
|
|
345
|
-
|
|
344
|
+
if (g.type === "scroll") {
|
|
345
|
+
if (console.log("close because scroll"), console.log(g, "event"), t || Date.now() - s < 500) {
|
|
346
|
+
console.log("ignoring scroll - keyboard related");
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
if (m.current?.contains(y)) return;
|
|
350
|
+
f(!1);
|
|
346
351
|
}
|
|
347
|
-
|
|
352
|
+
g.type === "resize" && (console.log("close dropdown because resize"), console.log(g, "event"), f(!1));
|
|
353
|
+
}, c = (g) => {
|
|
354
|
+
const y = g.target;
|
|
355
|
+
R(y) && (console.log("focus in keyboard"), t = !0, s = Date.now());
|
|
356
|
+
}, v = (g) => {
|
|
357
|
+
const y = g.target;
|
|
358
|
+
R(y) && (console.log("focus out keyboard"), t = !1);
|
|
348
359
|
};
|
|
349
|
-
return document.addEventListener("mousedown",
|
|
350
|
-
document.removeEventListener("mousedown",
|
|
360
|
+
return document.addEventListener("focusin", c), document.addEventListener("focusout", v), document.addEventListener("mousedown", l), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l, !0), () => {
|
|
361
|
+
document.removeEventListener("focusin", c), document.removeEventListener("focusout", v), document.removeEventListener("mousedown", l), window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l, !0);
|
|
351
362
|
};
|
|
352
|
-
}, [n]),
|
|
353
|
-
|
|
363
|
+
}, [n]), pe(() => {
|
|
364
|
+
ge.current.forEach((t) => {
|
|
354
365
|
try {
|
|
355
366
|
t(n);
|
|
356
367
|
} catch {
|
|
357
368
|
}
|
|
358
369
|
});
|
|
359
|
-
}, [n]),
|
|
370
|
+
}, [n]), Xe(
|
|
360
371
|
ne,
|
|
361
372
|
() => ({
|
|
362
373
|
open: () => {
|
|
363
|
-
|
|
374
|
+
f(!0);
|
|
364
375
|
},
|
|
365
376
|
close: () => {
|
|
366
|
-
|
|
377
|
+
f(!1);
|
|
367
378
|
},
|
|
368
|
-
toggle: () =>
|
|
369
|
-
handleOptionSelect:
|
|
370
|
-
subscribeOpenChange: (t) => (
|
|
371
|
-
|
|
379
|
+
toggle: () => f((t) => !t),
|
|
380
|
+
handleOptionSelect: D,
|
|
381
|
+
subscribeOpenChange: (t) => (ge.current.add(t), () => {
|
|
382
|
+
ge.current.delete(t);
|
|
372
383
|
}),
|
|
373
|
-
searchInputRef:
|
|
384
|
+
searchInputRef: T
|
|
374
385
|
}),
|
|
375
|
-
[n,
|
|
386
|
+
[n, D]
|
|
376
387
|
);
|
|
377
|
-
const
|
|
378
|
-
t.preventDefault(), t.stopPropagation(), t.target.matches(":focus-visible") && !Me && !n && (
|
|
379
|
-
|
|
388
|
+
const fe = (t) => {
|
|
389
|
+
t.preventDefault(), t.stopPropagation(), t.target.matches(":focus-visible") && !Me && !n && (f(!0), setTimeout(() => {
|
|
390
|
+
T.current?.focus();
|
|
380
391
|
}, 10));
|
|
381
|
-
},
|
|
382
|
-
t.key === "Tab" && n &&
|
|
383
|
-
|
|
392
|
+
}, oe = (t) => {
|
|
393
|
+
t.key === "Tab" && n && f(!1), (t.keyCode === 32 || t.key === "ArrowDown") && (f(!0), setTimeout(() => {
|
|
394
|
+
T.current?.focus();
|
|
384
395
|
}, 10));
|
|
385
396
|
};
|
|
386
397
|
return /* @__PURE__ */ a.jsxs(
|
|
387
398
|
"div",
|
|
388
399
|
{
|
|
389
400
|
className: d("relative bg-inherit select-none w-full", K),
|
|
390
|
-
ref:
|
|
401
|
+
ref: O,
|
|
391
402
|
draggable: !1,
|
|
392
403
|
style: $e,
|
|
393
404
|
children: [
|
|
394
|
-
/* @__PURE__ */ a.jsxs("div", { className: d("relative bg-inherit ",
|
|
405
|
+
/* @__PURE__ */ a.jsxs("div", { className: d("relative bg-inherit ", B), children: [
|
|
395
406
|
/* @__PURE__ */ a.jsx(
|
|
396
407
|
"label",
|
|
397
408
|
{
|
|
398
|
-
htmlFor:
|
|
409
|
+
htmlFor: `select-${A}`,
|
|
399
410
|
ref: Le,
|
|
400
411
|
className: d(
|
|
401
412
|
"left-3 pointer-events-none bg-inherit z-10 line-clamp-1 max-w-[calc(100%-2.5rem)] ",
|
|
402
413
|
Y === "default" && "transition-all duration-200 ease-in-out",
|
|
403
414
|
Ie(),
|
|
404
|
-
|
|
405
|
-
|
|
415
|
+
ce || n ? Ke[Ce].label : "text-neutral-medium-default",
|
|
416
|
+
P && We.label,
|
|
417
|
+
"mb-0.5"
|
|
406
418
|
),
|
|
407
|
-
children:
|
|
419
|
+
children: be
|
|
408
420
|
}
|
|
409
421
|
),
|
|
410
422
|
/* @__PURE__ */ a.jsxs(
|
|
411
423
|
"div",
|
|
412
424
|
{
|
|
413
|
-
id:
|
|
425
|
+
id: A,
|
|
414
426
|
tabIndex: 0,
|
|
415
427
|
role: "button",
|
|
416
|
-
ref:
|
|
417
|
-
onFocus:
|
|
418
|
-
onKeyDown:
|
|
428
|
+
ref: _,
|
|
429
|
+
onFocus: fe,
|
|
430
|
+
onKeyDown: oe,
|
|
419
431
|
onClick: (t) => {
|
|
420
|
-
t.preventDefault(), t.stopPropagation(),
|
|
432
|
+
t.preventDefault(), t.stopPropagation(), S();
|
|
421
433
|
},
|
|
422
434
|
className: d(
|
|
423
435
|
"w-full px-2 text-left border rounded-lg transition-all duration-200 ease-in-out",
|
|
424
436
|
"flex items-center justify-start bg-inherit ",
|
|
425
437
|
"focus:outline-none",
|
|
426
|
-
Ee === "chips" && e.multiple &&
|
|
427
|
-
|
|
428
|
-
|
|
438
|
+
Ee === "chips" && e.multiple && ce ? "min-h-12 py-2 " : !xe && "h-12 min-h-12",
|
|
439
|
+
Ke[Ce].input,
|
|
440
|
+
P && We.input,
|
|
429
441
|
He
|
|
430
442
|
),
|
|
431
443
|
children: [
|
|
@@ -436,55 +448,55 @@ function ct(e) {
|
|
|
436
448
|
"flex-1 overflow-x-auto overflow-y-hidden px-1 prometeo-scrollbar-none! "
|
|
437
449
|
),
|
|
438
450
|
ref: Pe,
|
|
439
|
-
onPointerUp:
|
|
440
|
-
onPointerDown:
|
|
441
|
-
onPointerMove:
|
|
442
|
-
onPointerLeave:
|
|
443
|
-
onPointerCancel:
|
|
444
|
-
onClickCapture:
|
|
445
|
-
children:
|
|
451
|
+
onPointerUp: q.onPointerUp,
|
|
452
|
+
onPointerDown: q.onPointerDown,
|
|
453
|
+
onPointerMove: q.onPointerMove,
|
|
454
|
+
onPointerLeave: q.onPointerLeave,
|
|
455
|
+
onPointerCancel: q.onPointerCancel,
|
|
456
|
+
onClickCapture: q.onClickCapture,
|
|
457
|
+
children: je ? Se.createElement(
|
|
446
458
|
J(
|
|
447
|
-
|
|
448
|
-
(t,
|
|
459
|
+
je,
|
|
460
|
+
(t, s) => t.disabled === s.disabled && t.multiple === s.multiple
|
|
449
461
|
),
|
|
450
462
|
{
|
|
451
|
-
disabled:
|
|
463
|
+
disabled: P,
|
|
452
464
|
multiple: e.multiple || !1,
|
|
453
|
-
placeholder:
|
|
454
|
-
selectedOptions:
|
|
465
|
+
placeholder: G,
|
|
466
|
+
selectedOptions: de,
|
|
455
467
|
onRemoveOption: Z
|
|
456
468
|
}
|
|
457
469
|
) : /* @__PURE__ */ a.jsx(
|
|
458
|
-
|
|
470
|
+
Qe,
|
|
459
471
|
{
|
|
460
472
|
displayMode: Ee,
|
|
461
473
|
selectedOptions: r,
|
|
462
474
|
placeholder: Ge,
|
|
463
|
-
onRemoveOption:
|
|
475
|
+
onRemoveOption: E,
|
|
464
476
|
multiple: e.multiple || !1,
|
|
465
477
|
className: d(
|
|
466
478
|
Ae === "scroll" ? "flex-nowrap" : "flex-wrap"
|
|
467
479
|
),
|
|
468
|
-
disabled:
|
|
480
|
+
disabled: P
|
|
469
481
|
}
|
|
470
482
|
)
|
|
471
483
|
}
|
|
472
484
|
),
|
|
473
485
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
474
486
|
le && /* @__PURE__ */ a.jsx(
|
|
475
|
-
|
|
487
|
+
Ye,
|
|
476
488
|
{
|
|
477
489
|
size: "small",
|
|
478
490
|
variant: "sync",
|
|
479
491
|
className: " opacity-90"
|
|
480
492
|
}
|
|
481
493
|
),
|
|
482
|
-
|
|
494
|
+
ce && ve && /* @__PURE__ */ a.jsx(
|
|
483
495
|
"button",
|
|
484
496
|
{
|
|
485
497
|
className: "z-100",
|
|
486
498
|
onClick: (t) => {
|
|
487
|
-
t.preventDefault(), t.stopPropagation(),
|
|
499
|
+
t.preventDefault(), t.stopPropagation(), b(t);
|
|
488
500
|
},
|
|
489
501
|
type: "button",
|
|
490
502
|
tabIndex: -1,
|
|
@@ -494,20 +506,20 @@ function ct(e) {
|
|
|
494
506
|
size: 20,
|
|
495
507
|
className: d(
|
|
496
508
|
" cursor-pointer transition-all",
|
|
497
|
-
|
|
509
|
+
Ke[Ce].icon
|
|
498
510
|
)
|
|
499
511
|
}
|
|
500
512
|
)
|
|
501
513
|
}
|
|
502
514
|
),
|
|
503
515
|
/* @__PURE__ */ a.jsx(
|
|
504
|
-
|
|
516
|
+
Re,
|
|
505
517
|
{
|
|
506
518
|
size: 20,
|
|
507
519
|
className: d(
|
|
508
520
|
"transition-transform text-neutral-default-default min-w-max",
|
|
509
521
|
n ? "rotate-180" : "",
|
|
510
|
-
|
|
522
|
+
P && We.icon
|
|
511
523
|
)
|
|
512
524
|
}
|
|
513
525
|
)
|
|
@@ -517,295 +529,295 @@ function ct(e) {
|
|
|
517
529
|
)
|
|
518
530
|
] }),
|
|
519
531
|
n && /* @__PURE__ */ a.jsx(
|
|
520
|
-
|
|
532
|
+
ht,
|
|
521
533
|
{
|
|
522
|
-
label:
|
|
534
|
+
label: be,
|
|
523
535
|
isOpen: n,
|
|
524
|
-
disabled:
|
|
525
|
-
optionValue:
|
|
526
|
-
optionLabel:
|
|
536
|
+
disabled: P,
|
|
537
|
+
optionValue: H,
|
|
538
|
+
optionLabel: se,
|
|
527
539
|
emptyMessage: Te,
|
|
528
540
|
labelVariant: Y,
|
|
529
|
-
renderOption:
|
|
530
|
-
renderOptionGroupHeader:
|
|
531
|
-
attachToParent:
|
|
532
|
-
filteredOptions:
|
|
541
|
+
renderOption: W,
|
|
542
|
+
renderOptionGroupHeader: ie,
|
|
543
|
+
attachToParent: ue,
|
|
544
|
+
filteredOptions: x,
|
|
533
545
|
multiple: e.multiple || !1,
|
|
534
546
|
dropdownClassName: re,
|
|
535
|
-
selectedOptionsIds:
|
|
536
|
-
setFilteredOptions:
|
|
547
|
+
selectedOptionsIds: o,
|
|
548
|
+
setFilteredOptions: h,
|
|
537
549
|
renderOptionContext: ze,
|
|
538
|
-
options:
|
|
539
|
-
selectRef:
|
|
540
|
-
dropdownRef:
|
|
541
|
-
selectButtonRef:
|
|
542
|
-
helperComponentRef:
|
|
543
|
-
onOptionClick:
|
|
544
|
-
onCloseDropdown: () =>
|
|
550
|
+
options: i,
|
|
551
|
+
selectRef: O,
|
|
552
|
+
dropdownRef: m,
|
|
553
|
+
selectButtonRef: _,
|
|
554
|
+
helperComponentRef: De,
|
|
555
|
+
onOptionClick: D,
|
|
556
|
+
onCloseDropdown: () => f(!1),
|
|
545
557
|
searchValue: _e,
|
|
546
|
-
setSearchValue:
|
|
547
|
-
searchInputRef:
|
|
548
|
-
isLoading:
|
|
549
|
-
onSearchClear:
|
|
550
|
-
hideSearchBar:
|
|
551
|
-
dropdownHeight:
|
|
552
|
-
onSearchValueChange:
|
|
553
|
-
inputSearchPlaceholder:
|
|
554
|
-
footer:
|
|
555
|
-
loadingComponent:
|
|
556
|
-
inputProps:
|
|
557
|
-
enableGroupToggle:
|
|
558
|
-
focusSearchInputOnOpen:
|
|
558
|
+
setSearchValue: p,
|
|
559
|
+
searchInputRef: T,
|
|
560
|
+
isLoading: k?.isLoading,
|
|
561
|
+
onSearchClear: k?.onSearchClear,
|
|
562
|
+
hideSearchBar: k?.hideSearchBar,
|
|
563
|
+
dropdownHeight: k?.dropdownHeight,
|
|
564
|
+
onSearchValueChange: k?.onSearchValueChange,
|
|
565
|
+
inputSearchPlaceholder: k?.inputSearchPlaceholder,
|
|
566
|
+
footer: k?.footer,
|
|
567
|
+
loadingComponent: k?.loadingComponent,
|
|
568
|
+
inputProps: k?.inputProps,
|
|
569
|
+
enableGroupToggle: k?.enableGroupToggle,
|
|
570
|
+
focusSearchInputOnOpen: k?.focusSearchInputOnOpen,
|
|
559
571
|
onGroupSelectChange: u
|
|
560
572
|
}
|
|
561
573
|
),
|
|
562
|
-
(
|
|
563
|
-
|
|
574
|
+
(ye || X) && /* @__PURE__ */ a.jsx("div", { className: "min-h-6", children: /* @__PURE__ */ a.jsx(
|
|
575
|
+
nt,
|
|
564
576
|
{
|
|
565
|
-
ref:
|
|
566
|
-
variant:
|
|
577
|
+
ref: De,
|
|
578
|
+
variant: Ce,
|
|
567
579
|
className: "absolute bottom-0 h-5 overflow-visible line-clamp-1!",
|
|
568
|
-
children:
|
|
580
|
+
children: ye || X
|
|
569
581
|
}
|
|
570
582
|
) })
|
|
571
583
|
]
|
|
572
584
|
}
|
|
573
585
|
);
|
|
574
586
|
}
|
|
575
|
-
const
|
|
576
|
-
function
|
|
587
|
+
const ft = J(dt, (e, n) => e.value === n.value && e.options === n.options && e.isLoading === n.isLoading && e.disabled === n.disabled && e.errorComponent === n.errorComponent && e.helperComponent === n.helperComponent && e.variant === n.variant && e.label === n.label && e.id === n.id && e.name === n.name && e.placeholder === n.placeholder && e.renderOptionContext === n.renderOptionContext && e.dropdownOptions?.controledSearchValue === n.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === n.dropdownOptions?.isLoading), Lt = ft;
|
|
588
|
+
function mt({
|
|
577
589
|
footer: e,
|
|
578
590
|
isOpen: n,
|
|
579
|
-
label:
|
|
580
|
-
options:
|
|
581
|
-
multiple:
|
|
582
|
-
disabled:
|
|
583
|
-
selectRef:
|
|
584
|
-
inputProps:
|
|
585
|
-
dropdownRef:
|
|
586
|
-
optionLabel:
|
|
587
|
-
optionValue:
|
|
588
|
-
searchValue:
|
|
589
|
-
labelVariant:
|
|
590
|
-
emptyMessage:
|
|
591
|
-
renderOption:
|
|
592
|
-
renderOptionContext:
|
|
593
|
-
renderOptionGroupHeader:
|
|
594
|
-
onOptionClick:
|
|
591
|
+
label: f,
|
|
592
|
+
options: x,
|
|
593
|
+
multiple: h,
|
|
594
|
+
disabled: w,
|
|
595
|
+
selectRef: p,
|
|
596
|
+
inputProps: O,
|
|
597
|
+
dropdownRef: m,
|
|
598
|
+
optionLabel: T,
|
|
599
|
+
optionValue: _,
|
|
600
|
+
searchValue: F,
|
|
601
|
+
labelVariant: De,
|
|
602
|
+
emptyMessage: ge,
|
|
603
|
+
renderOption: A,
|
|
604
|
+
renderOptionContext: j,
|
|
605
|
+
renderOptionGroupHeader: be,
|
|
606
|
+
onOptionClick: xe,
|
|
595
607
|
onSearchClear: Q,
|
|
596
608
|
searchInputRef: ne,
|
|
597
609
|
setSearchValue: K,
|
|
598
|
-
dropdownHeight:
|
|
599
|
-
attachToParent:
|
|
600
|
-
filteredOptions:
|
|
601
|
-
selectButtonRef:
|
|
602
|
-
onCloseDropdown:
|
|
603
|
-
loadingComponent:
|
|
610
|
+
dropdownHeight: G,
|
|
611
|
+
attachToParent: H,
|
|
612
|
+
filteredOptions: se,
|
|
613
|
+
selectButtonRef: W,
|
|
614
|
+
onCloseDropdown: ie,
|
|
615
|
+
loadingComponent: je,
|
|
604
616
|
dropdownClassName: ze,
|
|
605
617
|
helperComponentRef: He,
|
|
606
618
|
selectedOptionsIds: re,
|
|
607
|
-
setFilteredOptions:
|
|
608
|
-
onSearchValueChange:
|
|
619
|
+
setFilteredOptions: B,
|
|
620
|
+
onSearchValueChange: k,
|
|
609
621
|
isLoading: X = !1,
|
|
610
|
-
hideSearchBar:
|
|
611
|
-
inputSearchPlaceholder:
|
|
612
|
-
enableGroupToggle:
|
|
613
|
-
focusSearchInputOnOpen:
|
|
614
|
-
onGroupSelectChange:
|
|
622
|
+
hideSearchBar: ye = !1,
|
|
623
|
+
inputSearchPlaceholder: ke = "Buscar opciones",
|
|
624
|
+
enableGroupToggle: U = !0,
|
|
625
|
+
focusSearchInputOnOpen: Oe = !1,
|
|
626
|
+
onGroupSelectChange: ve
|
|
615
627
|
}) {
|
|
616
|
-
const
|
|
628
|
+
const P = e ? 380 : 320, Ae = De === "static" ? f !== "" ? -20 : 4 : 7, le = $(() => G ? G.endsWith("px") ? Number(G.replace("px", "")) : G.endsWith("vh") ? window.innerHeight * Number(G.replace("vh", "")) / 100 : G.endsWith("%") ? window.innerHeight * Number(G.replace("%", "")) / 100 : P : P, [G, P])(), [ue, Ee] = Ne({
|
|
617
629
|
direction: "down",
|
|
618
630
|
height: le
|
|
619
631
|
}), [Y, Me] = Ne(
|
|
620
632
|
() => /* @__PURE__ */ new Set()
|
|
621
|
-
), Te =
|
|
633
|
+
), Te = $(
|
|
622
634
|
(r) => !Y.has(r),
|
|
623
635
|
[Y]
|
|
624
|
-
), Le =
|
|
625
|
-
(r,
|
|
626
|
-
Me((
|
|
627
|
-
const u = new Set(
|
|
628
|
-
return (
|
|
636
|
+
), Le = $(
|
|
637
|
+
(r, o) => {
|
|
638
|
+
Me((i) => {
|
|
639
|
+
const u = new Set(i), S = u.has(r);
|
|
640
|
+
return (o === void 0 ? !S : !o) ? u.add(r) : u.delete(r), u;
|
|
629
641
|
});
|
|
630
642
|
},
|
|
631
643
|
[]
|
|
632
|
-
),
|
|
633
|
-
if (!
|
|
634
|
-
const
|
|
635
|
-
switch (r ||
|
|
644
|
+
), q = (r) => {
|
|
645
|
+
if (!m.current || !p.current) return;
|
|
646
|
+
const o = p.current.getBoundingClientRect();
|
|
647
|
+
switch (r || ue.direction) {
|
|
636
648
|
case "down":
|
|
637
|
-
|
|
649
|
+
m.current.style.top = `${o.top + o.height - (He?.current?.offsetHeight ? He?.current?.offsetHeight + 4 : 0)}px`;
|
|
638
650
|
break;
|
|
639
651
|
case "up":
|
|
640
|
-
|
|
652
|
+
m.current.style.top = "auto", m.current.style.bottom = `${window.innerHeight - o.top + Ae}px`;
|
|
641
653
|
break;
|
|
642
654
|
}
|
|
643
|
-
|
|
655
|
+
m.current.style.left = `${o.left}px`, m.current.style.width = `${o.width}px`;
|
|
644
656
|
}, Pe = (r) => {
|
|
645
|
-
|
|
646
|
-
},
|
|
647
|
-
if (!
|
|
648
|
-
const r =
|
|
649
|
-
let
|
|
650
|
-
return u ? (
|
|
657
|
+
m.current && (m.current.style.maxHeight = `${r}px`);
|
|
658
|
+
}, ce = () => {
|
|
659
|
+
if (!m.current || !p.current) return ue;
|
|
660
|
+
const r = p.current.getBoundingClientRect(), o = window.innerHeight - (window.innerHeight - r.top), i = window.innerHeight - r.bottom, u = i >= le, S = o >= le;
|
|
661
|
+
let D = "down", b;
|
|
662
|
+
return u ? (D = "down", b = le) : S ? (D = "up", b = le) : i > o ? (D = "down", b = i - 16) : (D = "up", b = o - 16), { direction: D, height: b };
|
|
651
663
|
}, $e = (r) => {
|
|
652
|
-
if (!(!
|
|
653
|
-
if (
|
|
654
|
-
|
|
664
|
+
if (!(!m.current || !p.current)) {
|
|
665
|
+
if (m.current.style.transition = "max-height 0.2s ease,opacity 0.2s ease", !r) {
|
|
666
|
+
m.current.style.maxHeight = "0", m.current.style.opacity = "0", m.current.style.pointerEvents = "none";
|
|
655
667
|
return;
|
|
656
668
|
}
|
|
657
|
-
if (!
|
|
658
|
-
const
|
|
659
|
-
Ee(
|
|
669
|
+
if (!H) {
|
|
670
|
+
const o = ce();
|
|
671
|
+
Ee(o), q(o.direction), Pe(o.height);
|
|
660
672
|
}
|
|
661
|
-
|
|
673
|
+
m.current.style.opacity = "1", m.current.style.pointerEvents = "auto", Oe && ne?.current && ne.current?.focus();
|
|
662
674
|
}
|
|
663
675
|
};
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
}, [re]),
|
|
676
|
+
pe(() => {
|
|
677
|
+
H || !p.current || !n || q();
|
|
678
|
+
}, [re]), pe(() => {
|
|
667
679
|
$e(n);
|
|
668
|
-
}, [n]),
|
|
669
|
-
|
|
670
|
-
}, [
|
|
671
|
-
if (X || !
|
|
672
|
-
const r = Ge(
|
|
673
|
-
|
|
674
|
-
}, [
|
|
675
|
-
const Ge = (r,
|
|
676
|
-
if (!
|
|
677
|
-
if (
|
|
678
|
-
const
|
|
679
|
-
let
|
|
680
|
-
const
|
|
681
|
-
|
|
680
|
+
}, [n]), pe(() => {
|
|
681
|
+
x && B(x);
|
|
682
|
+
}, [x]), pe(() => {
|
|
683
|
+
if (X || !F) return;
|
|
684
|
+
const r = Ge(x, F);
|
|
685
|
+
B(r);
|
|
686
|
+
}, [x]);
|
|
687
|
+
const Ge = (r, o) => {
|
|
688
|
+
if (!o) return r;
|
|
689
|
+
if (A) {
|
|
690
|
+
const b = [];
|
|
691
|
+
let E = null, Z = [];
|
|
692
|
+
const R = () => {
|
|
693
|
+
E && Z.length > 0 && b.push(E, ...Z), E = null, Z = [];
|
|
682
694
|
};
|
|
683
|
-
return r.forEach((
|
|
684
|
-
const
|
|
685
|
-
if (!!(
|
|
686
|
-
|
|
695
|
+
return r.forEach((fe) => {
|
|
696
|
+
const oe = fe;
|
|
697
|
+
if (!!(oe || {})?.isGroupHeader) {
|
|
698
|
+
R(), E = oe;
|
|
687
699
|
return;
|
|
688
700
|
}
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
),
|
|
693
|
-
|
|
694
|
-
}),
|
|
701
|
+
const s = fe, l = L(
|
|
702
|
+
s,
|
|
703
|
+
T
|
|
704
|
+
), c = Ue(String(l ?? ""), o);
|
|
705
|
+
E ? c && Z.push(s) : c && b.push(s);
|
|
706
|
+
}), R(), b;
|
|
695
707
|
}
|
|
696
|
-
const
|
|
697
|
-
let u = null,
|
|
698
|
-
const
|
|
699
|
-
u &&
|
|
708
|
+
const i = [];
|
|
709
|
+
let u = null, S = [];
|
|
710
|
+
const D = () => {
|
|
711
|
+
u && S.length > 0 && i.push(u, ...S), u = null, S = [];
|
|
700
712
|
};
|
|
701
|
-
return r.forEach((
|
|
702
|
-
if (typeof
|
|
703
|
-
if ((
|
|
704
|
-
|
|
713
|
+
return r.forEach((b) => {
|
|
714
|
+
if (typeof b != "object" || b === null) return;
|
|
715
|
+
if ((b || {})?.isGroupHeader) {
|
|
716
|
+
D(), u = b;
|
|
705
717
|
return;
|
|
706
718
|
}
|
|
707
|
-
const
|
|
708
|
-
u ?
|
|
709
|
-
}),
|
|
719
|
+
const E = Ue(b.label, o);
|
|
720
|
+
u ? E && S.push(b) : E && i.push(b);
|
|
721
|
+
}), D(), i;
|
|
710
722
|
}, _e = (r) => {
|
|
711
|
-
const
|
|
712
|
-
if (
|
|
723
|
+
const o = Ge(x, r);
|
|
724
|
+
if (B(o), k) {
|
|
713
725
|
if (r === "") {
|
|
714
726
|
Ie();
|
|
715
727
|
return;
|
|
716
728
|
}
|
|
717
|
-
|
|
729
|
+
k(r);
|
|
718
730
|
return;
|
|
719
731
|
}
|
|
720
|
-
K &&
|
|
721
|
-
}, Ie =
|
|
732
|
+
K && x && K(r);
|
|
733
|
+
}, Ie = $(() => {
|
|
722
734
|
if (Q) {
|
|
723
|
-
Q(),
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
return re.has(
|
|
735
|
+
Q(), B(
|
|
736
|
+
x.filter((r) => {
|
|
737
|
+
const o = A ? L(r, _) : r.id;
|
|
738
|
+
return re.has(o);
|
|
727
739
|
})
|
|
728
740
|
);
|
|
729
741
|
return;
|
|
730
742
|
}
|
|
731
|
-
K && (K(""),
|
|
743
|
+
K && (K(""), B(x));
|
|
732
744
|
}, [
|
|
733
|
-
|
|
745
|
+
x,
|
|
734
746
|
re,
|
|
735
|
-
|
|
747
|
+
_,
|
|
736
748
|
Q,
|
|
737
|
-
|
|
749
|
+
B,
|
|
738
750
|
K,
|
|
739
|
-
|
|
740
|
-
]),
|
|
741
|
-
r.key === "ArrowDown" ? (r.preventDefault(),
|
|
751
|
+
A
|
|
752
|
+
]), I = (r) => {
|
|
753
|
+
r.key === "ArrowDown" ? (r.preventDefault(), m.current?.querySelector(
|
|
742
754
|
"[role=listitem]"
|
|
743
755
|
)?.focus()) : (r.key === "Tab" || r.key === "Escape") && setTimeout(() => {
|
|
744
|
-
|
|
756
|
+
W.current?.focus(), ie();
|
|
745
757
|
}, 10);
|
|
746
|
-
},
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
), u =
|
|
758
|
+
}, V = (r, o) => {
|
|
759
|
+
const i = Array.from(
|
|
760
|
+
m.current?.querySelectorAll("[role=listitem]") || []
|
|
761
|
+
), u = i.indexOf(r.currentTarget);
|
|
750
762
|
if (r.key === "ArrowDown") {
|
|
751
763
|
r.preventDefault();
|
|
752
|
-
const
|
|
753
|
-
|
|
764
|
+
const S = u < i.length - 1 ? u + 1 : u;
|
|
765
|
+
i[S]?.focus();
|
|
754
766
|
} else if (r.key === "ArrowUp")
|
|
755
767
|
if (r.preventDefault(), u === 0)
|
|
756
768
|
ne && ne.current?.focus();
|
|
757
769
|
else {
|
|
758
|
-
const
|
|
759
|
-
|
|
770
|
+
const S = u - 1;
|
|
771
|
+
i[S]?.focus();
|
|
760
772
|
}
|
|
761
773
|
else if (r.key === "Enter" || r.key === " ") {
|
|
762
|
-
if (r.preventDefault(), (
|
|
763
|
-
|
|
764
|
-
|
|
774
|
+
if (r.preventDefault(), (o || {})?.isGroupHeader || w) return;
|
|
775
|
+
xe(o, !h), h || setTimeout(() => {
|
|
776
|
+
W.current?.focus(), ie();
|
|
765
777
|
}, 10);
|
|
766
778
|
} else r.key === "Escape" ? (r.preventDefault(), setTimeout(() => {
|
|
767
|
-
|
|
779
|
+
W.current?.focus(), ie();
|
|
768
780
|
}, 10)) : r.key === "Tab" && setTimeout(() => {
|
|
769
|
-
|
|
781
|
+
W.current?.focus(), ie();
|
|
770
782
|
}, 10);
|
|
771
|
-
},
|
|
772
|
-
(r,
|
|
773
|
-
J(
|
|
783
|
+
}, we = Array.from({ length: 5 }).map(
|
|
784
|
+
(r, o) => A ? Se.createElement(
|
|
785
|
+
J(A, (i, u) => i.isSelected === u.isSelected && i.option === u.option && i.disabled === u.disabled && i.multiple === u.multiple && i.renderContext === u.renderContext),
|
|
774
786
|
{
|
|
775
|
-
key: `skeleton-option-${
|
|
776
|
-
option: { id:
|
|
787
|
+
key: `skeleton-option-${o}`,
|
|
788
|
+
option: { id: o, label: "", value: "" },
|
|
777
789
|
isSelected: !1,
|
|
778
790
|
multiple: !1,
|
|
779
791
|
onSelect: () => {
|
|
780
792
|
},
|
|
781
793
|
disabled: !1,
|
|
782
794
|
isLoading: !0,
|
|
783
|
-
renderContext:
|
|
795
|
+
renderContext: j
|
|
784
796
|
}
|
|
785
797
|
) : /* @__PURE__ */ a.jsx(
|
|
786
|
-
|
|
798
|
+
Be,
|
|
787
799
|
{
|
|
788
800
|
multiple: !1,
|
|
789
801
|
isLoading: !0,
|
|
790
802
|
onSelect: () => {
|
|
791
803
|
},
|
|
792
804
|
isSelected: !1,
|
|
793
|
-
option: { id:
|
|
805
|
+
option: { id: o, label: "", value: "" }
|
|
794
806
|
},
|
|
795
807
|
`skeleton-option-${// biome-ignore lint/suspicious/noArrayIndexKey: <>
|
|
796
|
-
|
|
808
|
+
o}`
|
|
797
809
|
)
|
|
798
|
-
),
|
|
810
|
+
), de = /* @__PURE__ */ a.jsx(
|
|
799
811
|
"div",
|
|
800
812
|
{
|
|
801
813
|
tabIndex: 0,
|
|
802
|
-
ref:
|
|
814
|
+
ref: m,
|
|
803
815
|
style: { opacity: "0" },
|
|
804
816
|
className: d(
|
|
805
817
|
" z-100! w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-lg shadow-lg",
|
|
806
818
|
" overflow-hidden focus-visible:bg-neutral-default-hover ",
|
|
807
|
-
|
|
808
|
-
|
|
819
|
+
H ? "absolute z-50 " : "fixed z-100 top-0 left-0",
|
|
820
|
+
ue.direction === "up" ? "h-auto" : " h-max",
|
|
809
821
|
ze,
|
|
810
822
|
"w-full max-w-[max(100%,20vw)] min-w-[min(100%,20vw)]"
|
|
811
823
|
),
|
|
@@ -814,53 +826,53 @@ function ft({
|
|
|
814
826
|
{
|
|
815
827
|
className: d(
|
|
816
828
|
"flex flex-col",
|
|
817
|
-
|
|
829
|
+
ye ? "p-0" : "p-2 pt-0 gap-2"
|
|
818
830
|
),
|
|
819
831
|
style: {
|
|
820
832
|
height: "auto",
|
|
821
|
-
maxHeight:
|
|
833
|
+
maxHeight: ue.height
|
|
822
834
|
},
|
|
823
835
|
children: [
|
|
824
|
-
!
|
|
825
|
-
|
|
836
|
+
!ye && /* @__PURE__ */ a.jsx(
|
|
837
|
+
ot,
|
|
826
838
|
{
|
|
827
839
|
name: "",
|
|
828
840
|
label: "",
|
|
829
841
|
size: "small",
|
|
830
842
|
tabIndex: 0,
|
|
831
|
-
value:
|
|
832
|
-
disabled:
|
|
843
|
+
value: F,
|
|
844
|
+
disabled: w,
|
|
833
845
|
ref: ne,
|
|
834
846
|
labelVariant: "static",
|
|
835
|
-
icon: /* @__PURE__ */ a.jsx(
|
|
847
|
+
icon: /* @__PURE__ */ a.jsx(st, { size: 22 }),
|
|
836
848
|
isFetching: X,
|
|
837
|
-
onKeyDown:
|
|
849
|
+
onKeyDown: I,
|
|
838
850
|
onClear: Ie,
|
|
839
851
|
onChange: (r) => _e(r.target.value),
|
|
840
|
-
placeholder:
|
|
852
|
+
placeholder: ke,
|
|
841
853
|
className: " bg-neutral-medium-pressed",
|
|
842
|
-
...
|
|
854
|
+
...O
|
|
843
855
|
}
|
|
844
856
|
),
|
|
845
|
-
/* @__PURE__ */ a.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children:
|
|
857
|
+
/* @__PURE__ */ a.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: se.length === 0 ? X ? /* @__PURE__ */ a.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children: je || we }) : /* @__PURE__ */ a.jsx("p", { className: "px-3 py-2 text-neutral-medium-default max-w-full text-pretty wrap-break-word ", children: F ? `No se encontraron resultados para "${F}"` : ge }) : (() => {
|
|
846
858
|
let r = !0;
|
|
847
|
-
return
|
|
848
|
-
const
|
|
849
|
-
id:
|
|
850
|
-
label: String(
|
|
851
|
-
value:
|
|
852
|
-
},
|
|
853
|
-
u ||
|
|
854
|
-
|
|
855
|
-
|
|
859
|
+
return se.map((o) => {
|
|
860
|
+
const i = o, u = !!(i || {}).isGroupHeader, S = A && !u ? L(o, _) : i.id, D = re.has(S), b = (l) => !A || u ? l : {
|
|
861
|
+
id: S,
|
|
862
|
+
label: String(L(l, T)),
|
|
863
|
+
value: L(l, _)
|
|
864
|
+
}, E = (l) => {
|
|
865
|
+
u || xe(
|
|
866
|
+
b(o),
|
|
867
|
+
l === void 0 ? !h : l
|
|
856
868
|
);
|
|
857
|
-
}, Z = (
|
|
858
|
-
if (
|
|
869
|
+
}, Z = (l) => {
|
|
870
|
+
if (xe(l, !h), !h) {
|
|
859
871
|
if (!K) return;
|
|
860
|
-
K(""),
|
|
872
|
+
K(""), B(x);
|
|
861
873
|
}
|
|
862
|
-
},
|
|
863
|
-
const
|
|
874
|
+
}, R = (l, c) => {
|
|
875
|
+
const v = !!(c || {}).isGroupHeader;
|
|
864
876
|
return (
|
|
865
877
|
// biome-ignore lint/a11y/useSemanticElements: <>
|
|
866
878
|
/* @__PURE__ */ a.jsx(
|
|
@@ -868,107 +880,107 @@ function ft({
|
|
|
868
880
|
{
|
|
869
881
|
tabIndex: 0,
|
|
870
882
|
role: "listitem",
|
|
871
|
-
onKeyDown: (
|
|
883
|
+
onKeyDown: (g) => V(g, c),
|
|
872
884
|
className: d(
|
|
873
|
-
!
|
|
874
|
-
|
|
875
|
-
|
|
885
|
+
!v && !w && "focus-visible:bg-neutral-medium-hover outline-none hover:bg-neutral-medium-hover",
|
|
886
|
+
D && "bg-neutral-medium-selected",
|
|
887
|
+
w && "cursor-default pointer-events-none"
|
|
876
888
|
),
|
|
877
|
-
children:
|
|
889
|
+
children: l
|
|
878
890
|
},
|
|
879
|
-
|
|
891
|
+
c.id
|
|
880
892
|
)
|
|
881
893
|
);
|
|
882
894
|
};
|
|
883
895
|
if (u) {
|
|
884
|
-
const
|
|
885
|
-
r =
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
}, me = (
|
|
889
|
-
!
|
|
890
|
-
},
|
|
891
|
-
(
|
|
892
|
-
).map((
|
|
893
|
-
if (
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
(
|
|
897
|
-
),
|
|
898
|
-
group:
|
|
899
|
-
label:
|
|
900
|
-
groupOptions:
|
|
901
|
-
multiple:
|
|
902
|
-
disabled:
|
|
903
|
-
expanded:
|
|
904
|
-
toggleGroup:
|
|
896
|
+
const l = i.groupLabelNode ?? i.label, c = String(i.id), v = U === !1 ? !0 : Te(c);
|
|
897
|
+
r = v;
|
|
898
|
+
const g = i.originalOption, y = i.groupData?.groupOptions ?? [], ee = (z) => {
|
|
899
|
+
U && Le(c, z);
|
|
900
|
+
}, me = (z) => {
|
|
901
|
+
!y || y.length === 0 || ve && ve(y, z);
|
|
902
|
+
}, he = y.filter(
|
|
903
|
+
(z) => re.has(L(z, _))
|
|
904
|
+
).map((z) => String(L(z, _)));
|
|
905
|
+
if (be) {
|
|
906
|
+
const z = J(
|
|
907
|
+
be,
|
|
908
|
+
(N, M) => N.label === M.label && N.group === M.group && N.groupOptions === M.groupOptions && N.disabled === M.disabled && N.multiple === M.multiple && N.expanded === M.expanded && N.renderContext === M.renderContext
|
|
909
|
+
), C = Se.createElement(z, {
|
|
910
|
+
group: g,
|
|
911
|
+
label: l,
|
|
912
|
+
groupOptions: y,
|
|
913
|
+
multiple: h,
|
|
914
|
+
disabled: w,
|
|
915
|
+
expanded: v,
|
|
916
|
+
toggleGroup: ee,
|
|
905
917
|
selectGroup: me,
|
|
906
|
-
renderContext:
|
|
907
|
-
groupSelectedIds:
|
|
918
|
+
renderContext: j,
|
|
919
|
+
groupSelectedIds: he
|
|
908
920
|
});
|
|
909
|
-
return
|
|
921
|
+
return R(C, i);
|
|
910
922
|
}
|
|
911
|
-
return
|
|
923
|
+
return R(
|
|
912
924
|
/* @__PURE__ */ a.jsxs("div", { className: "px-3 py-2 text-neutral-medium-default font-medium text-sm w-full flex justify-between", children: [
|
|
913
|
-
/* @__PURE__ */ a.jsx("div", { children:
|
|
914
|
-
|
|
925
|
+
/* @__PURE__ */ a.jsx("div", { children: l }),
|
|
926
|
+
U && /* @__PURE__ */ a.jsx(
|
|
915
927
|
"div",
|
|
916
928
|
{
|
|
917
929
|
className: "cursor-pointer",
|
|
918
|
-
onClick: () => Le(
|
|
930
|
+
onClick: () => Le(c),
|
|
919
931
|
children: /* @__PURE__ */ a.jsx(
|
|
920
|
-
|
|
932
|
+
Re,
|
|
921
933
|
{
|
|
922
934
|
className: d(
|
|
923
935
|
"transition-transform duration-300 ease-out",
|
|
924
|
-
|
|
936
|
+
v ? "rotate-180" : "rotate-0"
|
|
925
937
|
)
|
|
926
938
|
}
|
|
927
939
|
)
|
|
928
940
|
}
|
|
929
941
|
)
|
|
930
942
|
] }),
|
|
931
|
-
|
|
943
|
+
i
|
|
932
944
|
);
|
|
933
945
|
}
|
|
934
|
-
const
|
|
946
|
+
const fe = A ? Se.createElement(
|
|
935
947
|
J(
|
|
936
|
-
|
|
937
|
-
(
|
|
948
|
+
A,
|
|
949
|
+
(l, c) => l.isSelected === c.isSelected && l.option === c.option && l.disabled === c.disabled && l.multiple === c.multiple && l.renderContext === c.renderContext
|
|
938
950
|
),
|
|
939
951
|
{
|
|
940
|
-
key:
|
|
941
|
-
option:
|
|
942
|
-
isSelected:
|
|
943
|
-
multiple:
|
|
944
|
-
onSelect:
|
|
945
|
-
disabled:
|
|
952
|
+
key: S,
|
|
953
|
+
option: o,
|
|
954
|
+
isSelected: D,
|
|
955
|
+
multiple: h,
|
|
956
|
+
onSelect: E,
|
|
957
|
+
disabled: w,
|
|
946
958
|
isLoading: X,
|
|
947
|
-
renderContext:
|
|
959
|
+
renderContext: j
|
|
948
960
|
}
|
|
949
961
|
) : /* @__PURE__ */ a.jsx(
|
|
950
|
-
|
|
962
|
+
Be,
|
|
951
963
|
{
|
|
952
|
-
disabled:
|
|
953
|
-
multiple:
|
|
964
|
+
disabled: w,
|
|
965
|
+
multiple: h,
|
|
954
966
|
isLoading: X,
|
|
955
|
-
isSelected:
|
|
967
|
+
isSelected: D,
|
|
956
968
|
onSelect: Z,
|
|
957
|
-
option:
|
|
969
|
+
option: o
|
|
958
970
|
},
|
|
959
|
-
|
|
960
|
-
),
|
|
961
|
-
|
|
962
|
-
|
|
971
|
+
S
|
|
972
|
+
), oe = R(
|
|
973
|
+
fe,
|
|
974
|
+
b(o)
|
|
963
975
|
);
|
|
964
|
-
if (!
|
|
965
|
-
return
|
|
966
|
-
const
|
|
967
|
-
return Se.cloneElement(
|
|
976
|
+
if (!U)
|
|
977
|
+
return oe;
|
|
978
|
+
const t = !r, s = oe;
|
|
979
|
+
return Se.cloneElement(s, {
|
|
968
980
|
className: d(
|
|
969
|
-
|
|
981
|
+
s.props.className,
|
|
970
982
|
"overflow-hidden transition-[max-height] duration-300 ease-out",
|
|
971
|
-
|
|
983
|
+
t ? "max-h-0" : "max-h-[999px]"
|
|
972
984
|
)
|
|
973
985
|
});
|
|
974
986
|
});
|
|
@@ -979,49 +991,49 @@ function ft({
|
|
|
979
991
|
)
|
|
980
992
|
}
|
|
981
993
|
);
|
|
982
|
-
return
|
|
994
|
+
return H ? de : Ze(de, document.body);
|
|
983
995
|
}
|
|
984
|
-
const
|
|
985
|
-
|
|
996
|
+
const ht = J(
|
|
997
|
+
mt,
|
|
986
998
|
(e, n) => e.options === n.options && e.selectedOptionsIds === n.selectedOptionsIds && e.multiple === n.multiple && e.disabled === n.disabled && e.emptyMessage === n.emptyMessage && e.renderOption === n.renderOption && e.renderOptionContext === n.renderOptionContext && e.isOpen === n.isOpen && e.attachToParent === n.attachToParent && e.optionValue === n.optionValue && e.optionLabel === n.optionLabel && e.filteredOptions === n.filteredOptions && e.isLoading === n.isLoading
|
|
987
|
-
),
|
|
999
|
+
), Be = J(
|
|
988
1000
|
({
|
|
989
1001
|
option: e,
|
|
990
1002
|
isSelected: n,
|
|
991
|
-
onSelect:
|
|
992
|
-
multiple:
|
|
993
|
-
disabled:
|
|
994
|
-
isLoading:
|
|
1003
|
+
onSelect: f,
|
|
1004
|
+
multiple: x,
|
|
1005
|
+
disabled: h,
|
|
1006
|
+
isLoading: w
|
|
995
1007
|
}) => {
|
|
996
|
-
const
|
|
997
|
-
if (
|
|
1008
|
+
const p = (e || {})?.isGroupHeader;
|
|
1009
|
+
if (w)
|
|
998
1010
|
return /* @__PURE__ */ a.jsxs(
|
|
999
1011
|
"div",
|
|
1000
1012
|
{
|
|
1001
1013
|
className: "flex gap-2 w-full px-3 py-2 cursor-wait",
|
|
1002
1014
|
children: [
|
|
1003
|
-
/* @__PURE__ */ a.jsx(
|
|
1004
|
-
/* @__PURE__ */ a.jsx(
|
|
1015
|
+
/* @__PURE__ */ a.jsx(qe, { className: "size-6 aspect-square" }),
|
|
1016
|
+
/* @__PURE__ */ a.jsx(qe, { className: "flex-1 h-6" })
|
|
1005
1017
|
]
|
|
1006
1018
|
},
|
|
1007
1019
|
e.id
|
|
1008
1020
|
);
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
},
|
|
1021
|
+
const O = (T) => {
|
|
1022
|
+
T.preventDefault(), T.stopPropagation(), !(h || p) && f?.(e);
|
|
1023
|
+
}, m = p && e.groupLabelNode ? e.groupLabelNode : e.label;
|
|
1012
1024
|
return /* @__PURE__ */ a.jsxs(
|
|
1013
1025
|
"div",
|
|
1014
1026
|
{
|
|
1015
|
-
onMouseDown:
|
|
1027
|
+
onMouseDown: O,
|
|
1016
1028
|
className: d(
|
|
1017
1029
|
"px-3 py-2 flex items-center transition-colors text-neutral-default-default ",
|
|
1018
|
-
|
|
1019
|
-
!
|
|
1020
|
-
|
|
1030
|
+
p ? "cursor-default text-neutral-medium-default" : "cursor-pointer",
|
|
1031
|
+
!p && (n ? " text-primary-default-default" : "hover:bg-neutral-medium-hover text-neutral-default-hover"),
|
|
1032
|
+
h && !p && "text-neutral-default-disabled hover:bg-neutral-default-default"
|
|
1021
1033
|
),
|
|
1022
1034
|
children: [
|
|
1023
|
-
|
|
1024
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
1035
|
+
x && !p && /* @__PURE__ */ a.jsx(lt, { checked: n, disabled: h }),
|
|
1036
|
+
/* @__PURE__ */ a.jsx("span", { children: m })
|
|
1025
1037
|
]
|
|
1026
1038
|
},
|
|
1027
1039
|
e.id
|
|
@@ -1029,33 +1041,33 @@ const mt = J(
|
|
|
1029
1041
|
},
|
|
1030
1042
|
(e, n) => e.isSelected === n.isSelected && e.disabled === n.disabled
|
|
1031
1043
|
);
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1044
|
+
Be.displayName = "DefaultOptionRenderer";
|
|
1045
|
+
const Qe = J(
|
|
1034
1046
|
({
|
|
1035
1047
|
selectedOptions: e,
|
|
1036
1048
|
placeholder: n,
|
|
1037
|
-
onRemoveOption:
|
|
1038
|
-
displayMode:
|
|
1039
|
-
multiple:
|
|
1040
|
-
className:
|
|
1041
|
-
disabled:
|
|
1042
|
-
}) => e?.length === 0 ? n ? /* @__PURE__ */ a.jsx("span", { className: "text-neutral-medium-default line-clamp-1", children: n }) : null :
|
|
1043
|
-
|
|
1049
|
+
onRemoveOption: f,
|
|
1050
|
+
displayMode: x,
|
|
1051
|
+
multiple: h,
|
|
1052
|
+
className: w,
|
|
1053
|
+
disabled: p
|
|
1054
|
+
}) => e?.length === 0 ? n ? /* @__PURE__ */ a.jsx("span", { className: "text-neutral-medium-default line-clamp-1", children: n }) : null : x === "chips" && h ? /* @__PURE__ */ a.jsx("div", { className: d("flex items-center gap-1 ", w), children: e.map((O) => /* @__PURE__ */ a.jsx(
|
|
1055
|
+
ut,
|
|
1044
1056
|
{
|
|
1045
1057
|
tabIndex: -1,
|
|
1046
|
-
id:
|
|
1047
|
-
label:
|
|
1048
|
-
onRemove:
|
|
1049
|
-
disabled:
|
|
1058
|
+
id: O.id,
|
|
1059
|
+
label: O.label,
|
|
1060
|
+
onRemove: f,
|
|
1061
|
+
disabled: p
|
|
1050
1062
|
},
|
|
1051
|
-
|
|
1063
|
+
O.id
|
|
1052
1064
|
)) }) : e?.length === 1 ? /* @__PURE__ */ a.jsx("span", { className: "line-clamp-1", children: e[0].label }) : /* @__PURE__ */ a.jsxs("span", { className: "line-clamp-1", children: [
|
|
1053
1065
|
e?.length,
|
|
1054
1066
|
" seleccionados"
|
|
1055
1067
|
] }),
|
|
1056
1068
|
(e, n) => e.selectedOptions === n.selectedOptions && e.disabled === n.disabled
|
|
1057
1069
|
);
|
|
1058
|
-
|
|
1070
|
+
Qe.displayName = "DefaultSelectionDisplay";
|
|
1059
1071
|
export {
|
|
1060
|
-
|
|
1072
|
+
Lt as default
|
|
1061
1073
|
};
|