@soygalo/ui 0.1.0 → 0.1.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/forms/Combobox.js +58 -53
- package/dist/forms/MultiSelect.js +59 -52
- package/package.json +1 -1
package/dist/forms/Combobox.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e, foldText as t } from "../utils.js";
|
|
3
|
-
import { Check as
|
|
3
|
+
import { Check as ee, ChevronsUpDown as n, Loader2 as r, Plus as te } from "../icons/glyphs.js";
|
|
4
4
|
import "../icons.js";
|
|
5
|
-
import { CONTROL_HEIGHT as
|
|
6
|
-
import { useOverlayContainer as
|
|
7
|
-
import { Command as
|
|
8
|
-
import * as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import * as
|
|
5
|
+
import { CONTROL_HEIGHT as i, CONTROL_VALUE as a, useControlSize as o } from "./control-size.js";
|
|
6
|
+
import { useOverlayContainer as s } from "../controls/overlay-container.js";
|
|
7
|
+
import { Command as ne, CommandGroup as re, CommandInput as c, CommandItem as l, CommandList as u } from "../controls/Command.js";
|
|
8
|
+
import * as d from "react";
|
|
9
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
import * as h from "@radix-ui/react-popover";
|
|
11
11
|
//#region src/forms/Combobox.tsx
|
|
12
|
-
var
|
|
12
|
+
var g = [
|
|
13
13
|
"sm",
|
|
14
14
|
"md",
|
|
15
15
|
"lg",
|
|
16
16
|
"touch"
|
|
17
|
-
],
|
|
18
|
-
sm: e(
|
|
19
|
-
md: e(
|
|
20
|
-
lg: e(
|
|
21
|
-
touch: e(
|
|
17
|
+
], _ = {
|
|
18
|
+
sm: e(i.sm, a.sm, "px-2.5"),
|
|
19
|
+
md: e(i.md, a.md, "px-3"),
|
|
20
|
+
lg: e(i.lg, a.lg, "px-3"),
|
|
21
|
+
touch: e(i.touch, a.touch, "px-3")
|
|
22
22
|
};
|
|
23
|
-
function
|
|
24
|
-
let [V, H] =
|
|
23
|
+
function v({ options: i, value: a, onValueChange: v, placeholder: y = "Seleccionar...", searchPlaceholder: b = "Buscar...", emptyText: x = "No se encontraron resultados.", allowClear: S = !1, clearText: ie = "Sin selección", className: ae, active: C, size: w, disabled: T, hideSearch: E, isLoading: D, renderOption: O, renderSelected: k, contentClassName: A, onCreate: j, createLabel: M = (e) => `Crear ${e}`, onSearchChange: N, disableLocalFilter: P, isLoadingMore: F, loadingMoreRef: I, "data-attr": L, id: R, "aria-label": z, "aria-invalid": oe, "aria-describedby": B }) {
|
|
24
|
+
let [V, H] = d.useState(!1), [U, W] = d.useState(""), [G, K] = d.useState(), q = i.find((e) => e.value === a) ?? (G?.value === a ? G : void 0), J = U && !P ? i.filter((e) => t(e.label).includes(t(U))) : i, Y = (e) => {
|
|
25
25
|
W(e), N?.(e);
|
|
26
|
-
}, X =
|
|
27
|
-
e &&
|
|
28
|
-
}, Z = U.trim(), Q = !!j && Z.length > 0 && !D && !
|
|
29
|
-
K(
|
|
26
|
+
}, X = d.useRef(null), se = s(), [ce, le] = d.useState(null), ue = (e) => {
|
|
27
|
+
e && le(se ?? X.current?.closest("[role=\"dialog\"]") ?? null), H(e);
|
|
28
|
+
}, Z = U.trim(), Q = !!j && Z.length > 0 && !D && !i.some((e) => t(e.label) === t(Z)), $ = (e) => {
|
|
29
|
+
K(i.find((t) => t.value === e)), v(e), H(!1), U && Y("");
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ m(h.Root, {
|
|
32
32
|
open: V,
|
|
33
|
-
onOpenChange:
|
|
34
|
-
children: [/* @__PURE__ */ h
|
|
33
|
+
onOpenChange: ue,
|
|
34
|
+
children: [/* @__PURE__ */ p(h.Trigger, {
|
|
35
35
|
asChild: !0,
|
|
36
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ m("button", {
|
|
37
37
|
ref: X,
|
|
38
|
-
id:
|
|
39
|
-
"aria-label":
|
|
40
|
-
"aria-invalid":
|
|
38
|
+
id: R,
|
|
39
|
+
"aria-label": z,
|
|
40
|
+
"aria-invalid": oe,
|
|
41
41
|
"aria-describedby": B,
|
|
42
42
|
"data-attr": L,
|
|
43
43
|
type: "button",
|
|
@@ -45,64 +45,69 @@ function b({ options: o, value: s, onValueChange: b, placeholder: x = "Seleccion
|
|
|
45
45
|
"aria-expanded": V,
|
|
46
46
|
"data-active": C || void 0,
|
|
47
47
|
disabled: T,
|
|
48
|
-
className: e("flex w-full min-w-0 items-center justify-between gap-2 rounded-2xl border border-input-border bg-input font-normal shadow-sm outline-none transition duration-fast ease-standard motion-reduce:transition-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
48
|
+
className: e("flex w-full min-w-0 items-center justify-between gap-2 rounded-2xl border border-input-border bg-input font-normal shadow-sm outline-none transition duration-fast ease-standard motion-reduce:transition-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", _[o(w, "md", g)], !q && "text-muted-foreground/70", C && "border-primary bg-primary/5 font-medium text-foreground", ae),
|
|
49
|
+
children: [/* @__PURE__ */ p("span", {
|
|
50
50
|
className: "min-w-0 truncate",
|
|
51
|
-
children: q ? k?.(q) ?? q.label :
|
|
52
|
-
}), /* @__PURE__ */
|
|
51
|
+
children: q ? k?.(q) ?? q.label : y
|
|
52
|
+
}), /* @__PURE__ */ p(n, { className: "size-4 shrink-0 text-muted-foreground" })]
|
|
53
53
|
})
|
|
54
|
-
}), /* @__PURE__ */ h
|
|
55
|
-
container:
|
|
56
|
-
children: /* @__PURE__ */ h
|
|
57
|
-
"aria-label":
|
|
54
|
+
}), /* @__PURE__ */ p(h.Portal, {
|
|
55
|
+
container: ce ?? void 0,
|
|
56
|
+
children: /* @__PURE__ */ p(h.Content, {
|
|
57
|
+
"aria-label": z ?? y,
|
|
58
58
|
align: "start",
|
|
59
59
|
sideOffset: 4,
|
|
60
60
|
className: e("z-[1300] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-md outline-none", A),
|
|
61
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ m(ne, {
|
|
62
62
|
shouldFilter: !1,
|
|
63
63
|
className: "max-h-80",
|
|
64
|
-
children: [!E && /* @__PURE__ */
|
|
64
|
+
children: [!E && /* @__PURE__ */ p(c, {
|
|
65
65
|
value: U,
|
|
66
66
|
onValueChange: Y,
|
|
67
|
-
placeholder:
|
|
68
|
-
}), /* @__PURE__ */
|
|
67
|
+
placeholder: b
|
|
68
|
+
}), /* @__PURE__ */ p(u, {
|
|
69
69
|
className: "max-h-64",
|
|
70
|
-
children: D ? /* @__PURE__ */
|
|
70
|
+
children: D ? /* @__PURE__ */ m("div", {
|
|
71
71
|
className: "flex items-center justify-center gap-2 py-6 text-body-md text-muted-foreground",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
73
|
-
}) : /* @__PURE__ */
|
|
74
|
-
J.length
|
|
72
|
+
children: [/* @__PURE__ */ p(r, { className: "size-4 animate-spin" }), "Buscando..."]
|
|
73
|
+
}) : /* @__PURE__ */ m(f, { children: [
|
|
74
|
+
(J.length > 0 || Q || S && a) && /* @__PURE__ */ m(re, { children: [S && a && /* @__PURE__ */ m(l, {
|
|
75
75
|
value: "__clear__",
|
|
76
76
|
onSelect: () => $(""),
|
|
77
77
|
className: "text-muted-foreground",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
79
|
-
}), J.map((e) => /* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ p("span", { className: "size-4 shrink-0" }), ie]
|
|
79
|
+
}), J.map((e) => /* @__PURE__ */ m(l, {
|
|
80
80
|
value: e.label,
|
|
81
81
|
onSelect: () => $(e.value),
|
|
82
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ p("span", {
|
|
83
83
|
className: "flex size-4 shrink-0 items-center justify-center",
|
|
84
|
-
children:
|
|
85
|
-
}), /* @__PURE__ */
|
|
84
|
+
children: a === e.value && /* @__PURE__ */ p(ee, { className: "size-4" })
|
|
85
|
+
}), /* @__PURE__ */ p("span", {
|
|
86
86
|
className: "min-w-0 flex-1 truncate",
|
|
87
87
|
children: O?.(e) ?? e.label
|
|
88
88
|
})]
|
|
89
89
|
}, e.value))] }),
|
|
90
|
-
|
|
90
|
+
J.length === 0 && !Q && /* @__PURE__ */ p("div", {
|
|
91
|
+
role: "presentation",
|
|
92
|
+
className: "py-6 text-center text-body-md text-muted-foreground",
|
|
93
|
+
children: x
|
|
94
|
+
}),
|
|
95
|
+
I && /* @__PURE__ */ p("div", {
|
|
91
96
|
ref: I,
|
|
92
97
|
"aria-hidden": !0,
|
|
93
98
|
className: "h-px"
|
|
94
99
|
}),
|
|
95
|
-
F && /* @__PURE__ */
|
|
100
|
+
F && /* @__PURE__ */ p("div", {
|
|
96
101
|
className: "flex justify-center py-2 text-muted-foreground",
|
|
97
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ p(r, { className: "size-4 animate-spin" })
|
|
98
103
|
}),
|
|
99
|
-
Q && /* @__PURE__ */
|
|
104
|
+
Q && /* @__PURE__ */ m(l, {
|
|
100
105
|
value: `__create__${Z}`,
|
|
101
106
|
onSelect: () => {
|
|
102
107
|
j?.(Z), H(!1), Y("");
|
|
103
108
|
},
|
|
104
109
|
className: "mt-0.5 text-primary",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ p(te, { className: "size-4 shrink-0" }), /* @__PURE__ */ p("span", {
|
|
106
111
|
className: "min-w-0 flex-1 truncate",
|
|
107
112
|
children: M(Z)
|
|
108
113
|
})]
|
|
@@ -115,4 +120,4 @@ function b({ options: o, value: s, onValueChange: b, placeholder: x = "Seleccion
|
|
|
115
120
|
});
|
|
116
121
|
}
|
|
117
122
|
//#endregion
|
|
118
|
-
export {
|
|
123
|
+
export { v as Combobox };
|
|
@@ -4,121 +4,128 @@ import { Check as t, ChevronsUpDown as ee, Loader2 as n, Plus as r, X as i } fro
|
|
|
4
4
|
import "../icons.js";
|
|
5
5
|
import { useControlSize as a } from "./control-size.js";
|
|
6
6
|
import { useOverlayContainer as o } from "../controls/overlay-container.js";
|
|
7
|
-
import { Command as te, CommandEmpty as
|
|
8
|
-
import { Badge as
|
|
9
|
-
import * as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import * as
|
|
7
|
+
import { Command as te, CommandEmpty as ne, CommandGroup as s, CommandInput as c, CommandItem as l, CommandList as u } from "../controls/Command.js";
|
|
8
|
+
import { Badge as d } from "../data-display/Badge.js";
|
|
9
|
+
import * as f from "react";
|
|
10
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
11
|
+
import * as g from "@radix-ui/react-popover";
|
|
12
12
|
//#region src/forms/MultiSelect.tsx
|
|
13
|
-
function
|
|
14
|
-
let L = a(O, "md", ["sm", "md"]), [R, z] =
|
|
15
|
-
e &&
|
|
16
|
-
},
|
|
17
|
-
[...
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
}, X = (e) =>
|
|
21
|
-
|
|
22
|
-
}, le = Z.length === 1 ? Z[0].label : `${w} (${
|
|
23
|
-
return /* @__PURE__ */ g
|
|
13
|
+
function _({ options: _, value: v, onValueChange: y, selectedOptions: b, display: x = "chips", onCreate: S, createLabel: C = (e) => `Crear ${e}`, placeholder: w = "Seleccionar opciones", searchPlaceholder: re = "Buscar...", emptyText: ie = "No se encontraron resultados.", removeOptionLabel: ae = "Quitar", maxVisible: T = 2, disabled: E, className: D, size: O, active: k, invalid: A, onSearchChange: j, disableLocalFilter: M, isLoading: N, isLoadingMore: P, loadingMoreRef: F, "aria-label": I }) {
|
|
14
|
+
let L = a(O, "md", ["sm", "md"]), [R, z] = f.useState(!1), [B, V] = f.useState(""), H = f.useRef(null), U = o(), [W, G] = f.useState(null), K = (e) => {
|
|
15
|
+
e && G(U ?? H.current?.closest("[role=\"dialog\"]") ?? null), z(e);
|
|
16
|
+
}, q = f.useRef(/* @__PURE__ */ new Map()).current;
|
|
17
|
+
[...b ?? [], ..._].forEach((e) => q.set(e.value, e));
|
|
18
|
+
let oe = B.toLowerCase(), J = M ? _ : _.filter((e) => [e.label, e.description].some((e) => e?.toLowerCase().includes(oe))), Y = (e) => {
|
|
19
|
+
V(e), j?.(e);
|
|
20
|
+
}, X = (e) => y(e, e.map((e) => q.get(e)).filter(Boolean)), se = (e) => X(v.includes(e) ? v.filter((t) => t !== e) : [...v, e]), Z = v.map((e) => q.get(e)).filter(Boolean), Q = B.trim(), $ = !!S && Q.length > 0 && !N && !_.some((e) => e.label.toLowerCase() === Q.toLowerCase()), ce = () => {
|
|
21
|
+
S?.(Q), Y("");
|
|
22
|
+
}, le = Z.length === 1 ? Z[0].label : `${w} (${v.length})`;
|
|
23
|
+
return /* @__PURE__ */ h(g.Root, {
|
|
24
24
|
open: R,
|
|
25
|
-
onOpenChange:
|
|
26
|
-
children: [/* @__PURE__ */
|
|
25
|
+
onOpenChange: K,
|
|
26
|
+
children: [/* @__PURE__ */ m(g.Trigger, {
|
|
27
27
|
asChild: !0,
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
ref:
|
|
28
|
+
children: /* @__PURE__ */ h("div", {
|
|
29
|
+
ref: H,
|
|
30
30
|
role: "combobox",
|
|
31
31
|
"aria-label": I,
|
|
32
32
|
"aria-expanded": R,
|
|
33
|
+
onKeyDown: (e) => {
|
|
34
|
+
e.target === e.currentTarget && !E && [
|
|
35
|
+
"Enter",
|
|
36
|
+
" ",
|
|
37
|
+
"ArrowDown"
|
|
38
|
+
].includes(e.key) && (e.preventDefault(), K(!0));
|
|
39
|
+
},
|
|
33
40
|
"aria-disabled": E || void 0,
|
|
34
41
|
tabIndex: E ? -1 : 0,
|
|
35
42
|
"aria-invalid": A || void 0,
|
|
36
43
|
"data-active": k || void 0,
|
|
37
44
|
className: e("flex w-full min-w-0 cursor-default items-start justify-between gap-2 rounded-2xl border border-input-border bg-input px-2.5 py-1 shadow-sm outline-none transition duration-fast ease-standard motion-reduce:transition-none hover:bg-accent/40 focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-invalid:border-error aria-invalid:text-error", L === "sm" ? "min-h-control-sm text-body-xs" : "min-h-control-md text-body-md", k && "border-primary bg-primary/5 font-medium text-foreground", D),
|
|
38
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ h("span", {
|
|
39
46
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
|
|
40
|
-
children: [
|
|
47
|
+
children: [v.length === 0 ? /* @__PURE__ */ m("span", {
|
|
41
48
|
className: "min-w-0 truncate font-normal text-muted-foreground/70",
|
|
42
49
|
children: w
|
|
43
|
-
}) :
|
|
50
|
+
}) : x === "summary" ? /* @__PURE__ */ m("span", {
|
|
44
51
|
className: "min-w-0 truncate",
|
|
45
52
|
children: le
|
|
46
|
-
}) : Z.slice(0, T).map((e) => /* @__PURE__ */
|
|
53
|
+
}) : Z.slice(0, T).map((e) => /* @__PURE__ */ h(d, {
|
|
47
54
|
className: "max-w-full pr-1",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ m("span", {
|
|
49
56
|
className: "min-w-0 break-words text-left",
|
|
50
57
|
children: e.label
|
|
51
|
-
}), /* @__PURE__ */
|
|
58
|
+
}), /* @__PURE__ */ m("button", {
|
|
52
59
|
type: "button",
|
|
53
60
|
disabled: E,
|
|
54
61
|
"aria-label": `${ae} ${e.label}`,
|
|
55
62
|
onClick: (t) => {
|
|
56
|
-
t.preventDefault(), t.stopPropagation(), X(
|
|
63
|
+
t.preventDefault(), t.stopPropagation(), X(v.filter((t) => t !== e.value));
|
|
57
64
|
},
|
|
58
65
|
className: "-m-1 flex size-6 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors duration-fast hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
59
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ m(i, {
|
|
60
67
|
"aria-hidden": "true",
|
|
61
68
|
className: "size-3"
|
|
62
69
|
})
|
|
63
70
|
})]
|
|
64
|
-
}, e.value)),
|
|
65
|
-
}), /* @__PURE__ */
|
|
71
|
+
}, e.value)), x === "chips" && Z.length > T && /* @__PURE__ */ h(d, { children: ["+", Z.length - T] })]
|
|
72
|
+
}), /* @__PURE__ */ m(ee, { className: "mt-0.5 size-4 shrink-0 text-muted-foreground" })]
|
|
66
73
|
})
|
|
67
|
-
}), /* @__PURE__ */
|
|
68
|
-
container:
|
|
69
|
-
children: /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ m(g.Portal, {
|
|
75
|
+
container: W ?? void 0,
|
|
76
|
+
children: /* @__PURE__ */ m(g.Content, {
|
|
70
77
|
"aria-label": I ?? w,
|
|
71
78
|
align: "start",
|
|
72
79
|
sideOffset: 4,
|
|
73
80
|
className: "z-[1300] w-[var(--radix-popover-trigger-width)] min-w-56 overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-md",
|
|
74
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ h(te, {
|
|
75
82
|
shouldFilter: !1,
|
|
76
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ m(c, {
|
|
77
84
|
value: B,
|
|
78
85
|
onValueChange: Y,
|
|
79
86
|
placeholder: re
|
|
80
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ m(u, {
|
|
81
88
|
className: "max-h-64",
|
|
82
|
-
children: N ? /* @__PURE__ */
|
|
89
|
+
children: N ? /* @__PURE__ */ h("div", {
|
|
83
90
|
className: "flex items-center justify-center gap-2 py-6 text-body-md text-muted-foreground",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
85
|
-
}) : J.length === 0 && !$ ? /* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ m(n, { className: "size-4 animate-spin" }), "Buscando…"]
|
|
92
|
+
}) : J.length === 0 && !$ ? /* @__PURE__ */ m(ne, { children: ie }) : /* @__PURE__ */ h(p, { children: [
|
|
93
|
+
/* @__PURE__ */ m(s, { children: J.map((e) => /* @__PURE__ */ h(l, {
|
|
87
94
|
value: e.value,
|
|
88
95
|
disabled: e.disabled,
|
|
89
96
|
onSelect: () => se(e.value),
|
|
90
97
|
className: "group",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ m("span", {
|
|
92
99
|
className: "flex size-4 shrink-0 items-center justify-center",
|
|
93
|
-
children:
|
|
94
|
-
}), e.description ? /* @__PURE__ */
|
|
100
|
+
children: v.includes(e.value) && /* @__PURE__ */ m(t, {})
|
|
101
|
+
}), e.description ? /* @__PURE__ */ h("span", {
|
|
95
102
|
className: "flex min-w-0 flex-col py-1",
|
|
96
103
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ m("span", { children: e.label }),
|
|
98
105
|
" ",
|
|
99
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ m("span", {
|
|
100
107
|
className: "text-body-xs text-muted-foreground group-aria-selected:text-accent-foreground/70",
|
|
101
108
|
children: e.description
|
|
102
109
|
})
|
|
103
110
|
]
|
|
104
111
|
}) : e.label]
|
|
105
112
|
}, e.value)) }),
|
|
106
|
-
F && /* @__PURE__ */
|
|
113
|
+
F && /* @__PURE__ */ m("div", {
|
|
107
114
|
ref: F,
|
|
108
115
|
"aria-hidden": !0,
|
|
109
116
|
className: "h-px"
|
|
110
117
|
}),
|
|
111
|
-
P && /* @__PURE__ */
|
|
118
|
+
P && /* @__PURE__ */ m("div", {
|
|
112
119
|
className: "flex justify-center py-2 text-muted-foreground",
|
|
113
|
-
children: /* @__PURE__ */
|
|
120
|
+
children: /* @__PURE__ */ m(n, { className: "size-4 animate-spin" })
|
|
114
121
|
}),
|
|
115
|
-
$ && /* @__PURE__ */
|
|
122
|
+
$ && /* @__PURE__ */ h(l, {
|
|
116
123
|
value: `__create__${Q}`,
|
|
117
124
|
onSelect: ce,
|
|
118
125
|
className: "mt-0.5 text-primary",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ m(r, { className: "size-4 shrink-0" }), /* @__PURE__ */ m("span", {
|
|
120
127
|
className: "min-w-0 flex-1 truncate",
|
|
121
|
-
children:
|
|
128
|
+
children: C(Q)
|
|
122
129
|
})]
|
|
123
130
|
})
|
|
124
131
|
] })
|
|
@@ -129,4 +136,4 @@ function v({ options: v, value: y, onValueChange: b, selectedOptions: x, display
|
|
|
129
136
|
});
|
|
130
137
|
}
|
|
131
138
|
//#endregion
|
|
132
|
-
export {
|
|
139
|
+
export { _ as MultiSelect };
|