@adamosuiteservices/ui 1.5.6 → 1.6.7
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/colors.css +1 -1
- package/dist/combobox.cjs +2 -2
- package/dist/combobox.js +321 -276
- package/dist/components/ui/combobox/combobox.d.ts +196 -1
- package/dist/components/ui/combobox/combobox.stories.d.ts +9 -0
- package/dist/custom-layered-styles.css +1 -1
- package/dist/custom-scroll-bar.css +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/themes.css +1 -1
- package/docs/components/ui/combobox.md +319 -16
- package/package.json +1 -1
package/dist/combobox.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import * as
|
|
1
|
+
import { j as g } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import { useState as fe } from "react";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as D } from "./index-CRiPKpXj.js";
|
|
5
5
|
import { B as Ce } from "./button-2GdKenQI.js";
|
|
6
|
-
import { R as
|
|
7
|
-
import { P as
|
|
8
|
-
import { u as
|
|
9
|
-
import { c as
|
|
10
|
-
import { c as
|
|
11
|
-
import { P as
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
14
|
-
import { C as
|
|
6
|
+
import { R as je, P as Ie, O as Re, a as Ae } from "./index-DniCthJA.js";
|
|
7
|
+
import { P as V } from "./index-BMWt1NBG.js";
|
|
8
|
+
import { u as T } from "./index-Cv867SGx.js";
|
|
9
|
+
import { c as X } from "./index-DLcqcWxM.js";
|
|
10
|
+
import { c as Ne } from "./createLucideIcon-B_8CJpcQ.js";
|
|
11
|
+
import { P as $e, a as Me, b as De } from "./popover-3rIoNCXs.js";
|
|
12
|
+
import { C as Le } from "./checkbox-Dr487kAg.js";
|
|
13
|
+
import { C as Ve } from "./chevron-down-CpVS2Z7w.js";
|
|
14
|
+
import { C as Pe } from "./check-Ci0GjV-B.js";
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.546.0 - ISC
|
|
17
17
|
*
|
|
@@ -21,163 +21,163 @@ import { C as ze } from "./check-Ci0GjV-B.js";
|
|
|
21
21
|
const Fe = [
|
|
22
22
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
23
23
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
24
|
-
],
|
|
25
|
-
var pe = 1,
|
|
26
|
-
function
|
|
27
|
-
if (u ===
|
|
28
|
-
var
|
|
29
|
-
if (
|
|
30
|
-
for (var
|
|
31
|
-
return
|
|
24
|
+
], ze = Ne("search", Fe);
|
|
25
|
+
var pe = 1, Ke = 0.9, Oe = 0.8, qe = 0.17, re = 0.1, ae = 0.999, Be = 0.9999, Te = 0.99, _e = /[\\\/_+.#"@\[\(\{&]/, Ge = /[\\\/_+.#"@\[\(\{&]/g, Ue = /[\s-]/, ge = /[\s-]/g;
|
|
26
|
+
function le(e, a, r, f, o, u, m) {
|
|
27
|
+
if (u === a.length) return o === e.length ? pe : Te;
|
|
28
|
+
var s = `${o},${u}`;
|
|
29
|
+
if (m[s] !== void 0) return m[s];
|
|
30
|
+
for (var b = f.charAt(u), d = r.indexOf(b, o), x = 0, i, E, S, M; d >= 0; ) i = le(e, a, r, f, d + 1, u + 1, m), i > x && (d === o ? i *= pe : _e.test(e.charAt(d - 1)) ? (i *= Oe, S = e.slice(o, d - 1).match(Ge), S && o > 0 && (i *= Math.pow(ae, S.length))) : Ue.test(e.charAt(d - 1)) ? (i *= Ke, M = e.slice(o, d - 1).match(ge), M && o > 0 && (i *= Math.pow(ae, M.length))) : (i *= qe, o > 0 && (i *= Math.pow(ae, d - o))), e.charAt(d) !== a.charAt(u) && (i *= Be)), (i < re && r.charAt(d - 1) === f.charAt(u + 1) || f.charAt(u + 1) === f.charAt(u) && r.charAt(d - 1) !== f.charAt(u)) && (E = le(e, a, r, f, d + 1, u + 2, m), E * re > i && (i = E * re)), i > x && (x = i), d = r.indexOf(b, d + 1);
|
|
31
|
+
return m[s] = x, x;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function he(e) {
|
|
34
34
|
return e.toLowerCase().replace(ge, " ");
|
|
35
35
|
}
|
|
36
|
-
function He(e,
|
|
37
|
-
return e = r && r.length > 0 ? `${e + " " + r.join(" ")}` : e,
|
|
36
|
+
function He(e, a, r) {
|
|
37
|
+
return e = r && r.length > 0 ? `${e + " " + r.join(" ")}` : e, le(e, a, he(e), he(a), 0, 0, {});
|
|
38
38
|
}
|
|
39
|
-
var
|
|
40
|
-
let r =
|
|
39
|
+
var J = '[cmdk-group=""]', ne = '[cmdk-group-items=""]', We = '[cmdk-group-heading=""]', xe = '[cmdk-item=""]', ve = `${xe}:not([aria-disabled="true"])`, oe = "cmdk-item-select", q = "data-value", Je = (e, a, r) => He(e, a, r), be = n.createContext(void 0), Y = () => n.useContext(be), ye = n.createContext(void 0), ie = () => n.useContext(ye), ke = n.createContext(void 0), we = n.forwardRef((e, a) => {
|
|
40
|
+
let r = B(() => {
|
|
41
41
|
var t, c;
|
|
42
42
|
return { search: "", value: (c = (t = e.value) != null ? t : e.defaultValue) != null ? c : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
let t =
|
|
47
|
-
r.current.value = t,
|
|
43
|
+
}), f = B(() => /* @__PURE__ */ new Set()), o = B(() => /* @__PURE__ */ new Map()), u = B(() => /* @__PURE__ */ new Map()), m = B(() => /* @__PURE__ */ new Set()), s = Ee(e), { label: b, children: d, value: x, onValueChange: i, filter: E, shouldFilter: S, loop: M, disablePointerSelection: G = !1, vimBindings: v = !0, ...U } = e, I = T(), H = T(), $ = T(), R = n.useRef(null), k = ot();
|
|
44
|
+
z(() => {
|
|
45
|
+
if (x !== void 0) {
|
|
46
|
+
let t = x.trim();
|
|
47
|
+
r.current.value = t, C.emit();
|
|
48
48
|
}
|
|
49
|
-
}, [
|
|
50
|
-
k(6,
|
|
49
|
+
}, [x]), z(() => {
|
|
50
|
+
k(6, de);
|
|
51
51
|
}, []);
|
|
52
|
-
let
|
|
53
|
-
var l,
|
|
52
|
+
let C = n.useMemo(() => ({ subscribe: (t) => (m.current.add(t), () => m.current.delete(t)), snapshot: () => r.current, setState: (t, c, h) => {
|
|
53
|
+
var l, y, w, A;
|
|
54
54
|
if (!Object.is(r.current[t], c)) {
|
|
55
|
-
if (r.current[t] = c, t === "search")
|
|
55
|
+
if (r.current[t] = c, t === "search") F(), N(), k(1, P);
|
|
56
56
|
else if (t === "value") {
|
|
57
57
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
58
|
-
let j = document.getElementById(
|
|
59
|
-
j ? j.focus() : (l = document.getElementById(
|
|
58
|
+
let j = document.getElementById($);
|
|
59
|
+
j ? j.focus() : (l = document.getElementById(I)) == null || l.focus();
|
|
60
60
|
}
|
|
61
61
|
if (k(7, () => {
|
|
62
62
|
var j;
|
|
63
|
-
r.current.selectedItemId = (j =
|
|
64
|
-
}),
|
|
63
|
+
r.current.selectedItemId = (j = O()) == null ? void 0 : j.id, C.emit();
|
|
64
|
+
}), h || k(5, de), ((y = s.current) == null ? void 0 : y.value) !== void 0) {
|
|
65
65
|
let j = c ?? "";
|
|
66
|
-
(
|
|
66
|
+
(A = (w = s.current).onValueChange) == null || A.call(w, j);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
C.emit();
|
|
71
71
|
}
|
|
72
72
|
}, emit: () => {
|
|
73
|
-
|
|
74
|
-
} }), []),
|
|
73
|
+
m.current.forEach((t) => t());
|
|
74
|
+
} }), []), K = n.useMemo(() => ({ value: (t, c, h) => {
|
|
75
75
|
var l;
|
|
76
|
-
c !== ((l = u.current.get(t)) == null ? void 0 : l.value) && (u.current.set(t, { value: c, keywords:
|
|
77
|
-
|
|
76
|
+
c !== ((l = u.current.get(t)) == null ? void 0 : l.value) && (u.current.set(t, { value: c, keywords: h }), r.current.filtered.items.set(t, p(c, h)), k(2, () => {
|
|
77
|
+
N(), C.emit();
|
|
78
78
|
}));
|
|
79
|
-
}, item: (t, c) => (
|
|
80
|
-
|
|
79
|
+
}, item: (t, c) => (f.current.add(t), c && (o.current.has(c) ? o.current.get(c).add(t) : o.current.set(c, /* @__PURE__ */ new Set([t]))), k(3, () => {
|
|
80
|
+
F(), N(), r.current.value || P(), C.emit();
|
|
81
81
|
}), () => {
|
|
82
|
-
u.current.delete(t),
|
|
83
|
-
let
|
|
82
|
+
u.current.delete(t), f.current.delete(t), r.current.filtered.items.delete(t);
|
|
83
|
+
let h = O();
|
|
84
84
|
k(4, () => {
|
|
85
|
-
|
|
85
|
+
F(), h?.getAttribute("id") === t && P(), C.emit();
|
|
86
86
|
});
|
|
87
87
|
}), group: (t) => (o.current.has(t) || o.current.set(t, /* @__PURE__ */ new Set()), () => {
|
|
88
88
|
u.current.delete(t), o.current.delete(t);
|
|
89
|
-
}), filter: () =>
|
|
90
|
-
function
|
|
91
|
-
var
|
|
92
|
-
let
|
|
93
|
-
return t ?
|
|
89
|
+
}), filter: () => s.current.shouldFilter, label: b || e["aria-label"], getDisablePointerSelection: () => s.current.disablePointerSelection, listId: I, inputId: $, labelId: H, listInnerRef: R }), []);
|
|
90
|
+
function p(t, c) {
|
|
91
|
+
var h, l;
|
|
92
|
+
let y = (l = (h = s.current) == null ? void 0 : h.filter) != null ? l : Je;
|
|
93
|
+
return t ? y(t, r.current.search, c) : 0;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
if (!r.current.search ||
|
|
95
|
+
function N() {
|
|
96
|
+
if (!r.current.search || s.current.shouldFilter === !1) return;
|
|
97
97
|
let t = r.current.filtered.items, c = [];
|
|
98
98
|
r.current.filtered.groups.forEach((l) => {
|
|
99
|
-
let
|
|
100
|
-
|
|
101
|
-
let j = t.get(
|
|
102
|
-
|
|
103
|
-
}), c.push([l,
|
|
99
|
+
let y = o.current.get(l), w = 0;
|
|
100
|
+
y.forEach((A) => {
|
|
101
|
+
let j = t.get(A);
|
|
102
|
+
w = Math.max(j, w);
|
|
103
|
+
}), c.push([l, w]);
|
|
104
104
|
});
|
|
105
|
-
let
|
|
106
|
-
|
|
107
|
-
var
|
|
108
|
-
let j = l.getAttribute("id"),
|
|
109
|
-
return ((
|
|
105
|
+
let h = R.current;
|
|
106
|
+
W().sort((l, y) => {
|
|
107
|
+
var w, A;
|
|
108
|
+
let j = l.getAttribute("id"), Q = y.getAttribute("id");
|
|
109
|
+
return ((w = t.get(Q)) != null ? w : 0) - ((A = t.get(j)) != null ? A : 0);
|
|
110
110
|
}).forEach((l) => {
|
|
111
|
-
let
|
|
112
|
-
|
|
113
|
-
}), c.sort((l,
|
|
114
|
-
var
|
|
115
|
-
let
|
|
116
|
-
|
|
111
|
+
let y = l.closest(ne);
|
|
112
|
+
y ? y.appendChild(l.parentElement === y ? l : l.closest(`${ne} > *`)) : h.appendChild(l.parentElement === h ? l : l.closest(`${ne} > *`));
|
|
113
|
+
}), c.sort((l, y) => y[1] - l[1]).forEach((l) => {
|
|
114
|
+
var y;
|
|
115
|
+
let w = (y = R.current) == null ? void 0 : y.querySelector(`${J}[${q}="${encodeURIComponent(l[0])}"]`);
|
|
116
|
+
w?.parentElement.appendChild(w);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
let t =
|
|
121
|
-
|
|
119
|
+
function P() {
|
|
120
|
+
let t = W().find((h) => h.getAttribute("aria-disabled") !== "true"), c = t?.getAttribute(q);
|
|
121
|
+
C.setState("value", c || void 0);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
var t, c,
|
|
125
|
-
if (!r.current.search ||
|
|
126
|
-
r.current.filtered.count =
|
|
123
|
+
function F() {
|
|
124
|
+
var t, c, h, l;
|
|
125
|
+
if (!r.current.search || s.current.shouldFilter === !1) {
|
|
126
|
+
r.current.filtered.count = f.current.size;
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
r.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
130
|
-
let
|
|
131
|
-
for (let
|
|
132
|
-
let
|
|
133
|
-
r.current.filtered.items.set(
|
|
130
|
+
let y = 0;
|
|
131
|
+
for (let w of f.current) {
|
|
132
|
+
let A = (c = (t = u.current.get(w)) == null ? void 0 : t.value) != null ? c : "", j = (l = (h = u.current.get(w)) == null ? void 0 : h.keywords) != null ? l : [], Q = p(A, j);
|
|
133
|
+
r.current.filtered.items.set(w, Q), Q > 0 && y++;
|
|
134
134
|
}
|
|
135
|
-
for (let [
|
|
136
|
-
r.current.filtered.groups.add(
|
|
135
|
+
for (let [w, A] of o.current) for (let j of A) if (r.current.filtered.items.get(j) > 0) {
|
|
136
|
+
r.current.filtered.groups.add(w);
|
|
137
137
|
break;
|
|
138
138
|
}
|
|
139
|
-
r.current.filtered.count =
|
|
139
|
+
r.current.filtered.count = y;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
var t, c,
|
|
143
|
-
let l =
|
|
144
|
-
l && (((t = l.parentElement) == null ? void 0 : t.firstChild) === l && ((
|
|
141
|
+
function de() {
|
|
142
|
+
var t, c, h;
|
|
143
|
+
let l = O();
|
|
144
|
+
l && (((t = l.parentElement) == null ? void 0 : t.firstChild) === l && ((h = (c = l.closest(J)) == null ? void 0 : c.querySelector(We)) == null || h.scrollIntoView({ block: "nearest" })), l.scrollIntoView({ block: "nearest" }));
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function O() {
|
|
147
147
|
var t;
|
|
148
|
-
return (t =
|
|
148
|
+
return (t = R.current) == null ? void 0 : t.querySelector(`${xe}[aria-selected="true"]`);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function W() {
|
|
151
151
|
var t;
|
|
152
|
-
return Array.from(((t =
|
|
153
|
-
}
|
|
154
|
-
function Z(t) {
|
|
155
|
-
let c = T()[t];
|
|
156
|
-
c && E.setState("value", c.getAttribute(F));
|
|
152
|
+
return Array.from(((t = R.current) == null ? void 0 : t.querySelectorAll(ve)) || []);
|
|
157
153
|
}
|
|
158
154
|
function ee(t) {
|
|
155
|
+
let c = W()[t];
|
|
156
|
+
c && C.setState("value", c.getAttribute(q));
|
|
157
|
+
}
|
|
158
|
+
function te(t) {
|
|
159
159
|
var c;
|
|
160
|
-
let
|
|
161
|
-
(c =
|
|
160
|
+
let h = O(), l = W(), y = l.findIndex((A) => A === h), w = l[y + t];
|
|
161
|
+
(c = s.current) != null && c.loop && (w = y + t < 0 ? l[l.length - 1] : y + t === l.length ? l[0] : l[y + t]), w && C.setState("value", w.getAttribute(q));
|
|
162
162
|
}
|
|
163
163
|
function ue(t) {
|
|
164
|
-
let c =
|
|
165
|
-
for (;
|
|
166
|
-
l ?
|
|
164
|
+
let c = O(), h = c?.closest(J), l;
|
|
165
|
+
for (; h && !l; ) h = t > 0 ? nt(h, J) : lt(h, J), l = h?.querySelector(ve);
|
|
166
|
+
l ? C.setState("value", l.getAttribute(q)) : te(t);
|
|
167
167
|
}
|
|
168
|
-
let ce = () =>
|
|
169
|
-
t.preventDefault(), t.metaKey ? ce() : t.altKey ? ue(1) :
|
|
168
|
+
let ce = () => ee(W().length - 1), se = (t) => {
|
|
169
|
+
t.preventDefault(), t.metaKey ? ce() : t.altKey ? ue(1) : te(1);
|
|
170
170
|
}, me = (t) => {
|
|
171
|
-
t.preventDefault(), t.metaKey ?
|
|
171
|
+
t.preventDefault(), t.metaKey ? ee(0) : t.altKey ? ue(-1) : te(-1);
|
|
172
172
|
};
|
|
173
|
-
return
|
|
173
|
+
return n.createElement(V.div, { ref: a, tabIndex: -1, ...U, "cmdk-root": "", onKeyDown: (t) => {
|
|
174
174
|
var c;
|
|
175
|
-
(c =
|
|
176
|
-
let
|
|
177
|
-
if (!(t.defaultPrevented ||
|
|
175
|
+
(c = U.onKeyDown) == null || c.call(U, t);
|
|
176
|
+
let h = t.nativeEvent.isComposing || t.keyCode === 229;
|
|
177
|
+
if (!(t.defaultPrevented || h)) switch (t.key) {
|
|
178
178
|
case "n":
|
|
179
179
|
case "j": {
|
|
180
|
-
|
|
180
|
+
v && t.ctrlKey && se(t);
|
|
181
181
|
break;
|
|
182
182
|
}
|
|
183
183
|
case "ArrowDown": {
|
|
@@ -186,7 +186,7 @@ var _ = '[cmdk-group=""]', ne = '[cmdk-group-items=""]', We = '[cmdk-group-headi
|
|
|
186
186
|
}
|
|
187
187
|
case "p":
|
|
188
188
|
case "k": {
|
|
189
|
-
|
|
189
|
+
v && t.ctrlKey && me(t);
|
|
190
190
|
break;
|
|
191
191
|
}
|
|
192
192
|
case "ArrowUp": {
|
|
@@ -194,7 +194,7 @@ var _ = '[cmdk-group=""]', ne = '[cmdk-group-items=""]', We = '[cmdk-group-headi
|
|
|
194
194
|
break;
|
|
195
195
|
}
|
|
196
196
|
case "Home": {
|
|
197
|
-
t.preventDefault(),
|
|
197
|
+
t.preventDefault(), ee(0);
|
|
198
198
|
break;
|
|
199
199
|
}
|
|
200
200
|
case "End": {
|
|
@@ -203,167 +203,167 @@ var _ = '[cmdk-group=""]', ne = '[cmdk-group-items=""]', We = '[cmdk-group-headi
|
|
|
203
203
|
}
|
|
204
204
|
case "Enter": {
|
|
205
205
|
t.preventDefault();
|
|
206
|
-
let l =
|
|
206
|
+
let l = O();
|
|
207
207
|
if (l) {
|
|
208
|
-
let
|
|
209
|
-
l.dispatchEvent(
|
|
208
|
+
let y = new Event(oe);
|
|
209
|
+
l.dispatchEvent(y);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
} },
|
|
214
|
-
}), Xe =
|
|
215
|
-
var r,
|
|
216
|
-
let o =
|
|
217
|
-
|
|
218
|
-
if (!
|
|
219
|
-
}, [
|
|
220
|
-
let
|
|
221
|
-
|
|
213
|
+
} }, n.createElement("label", { "cmdk-label": "", htmlFor: K.inputId, id: K.labelId, style: dt }, b), Z(e, (t) => n.createElement(ye.Provider, { value: C }, n.createElement(be.Provider, { value: K }, t))));
|
|
214
|
+
}), Xe = n.forwardRef((e, a) => {
|
|
215
|
+
var r, f;
|
|
216
|
+
let o = T(), u = n.useRef(null), m = n.useContext(ke), s = Y(), b = Ee(e), d = (f = (r = b.current) == null ? void 0 : r.forceMount) != null ? f : m?.forceMount;
|
|
217
|
+
z(() => {
|
|
218
|
+
if (!d) return s.item(o, m?.id);
|
|
219
|
+
}, [d]);
|
|
220
|
+
let x = Se(o, u, [e.value, e.children, u], e.keywords), i = ie(), E = L((k) => k.value && k.value === x.current), S = L((k) => d || s.filter() === !1 ? !0 : k.search ? k.filtered.items.get(o) > 0 : !0);
|
|
221
|
+
n.useEffect(() => {
|
|
222
222
|
let k = u.current;
|
|
223
|
-
if (!(!k || e.disabled)) return k.addEventListener(
|
|
223
|
+
if (!(!k || e.disabled)) return k.addEventListener(oe, M), () => k.removeEventListener(oe, M);
|
|
224
224
|
}, [S, e.onSelect, e.disabled]);
|
|
225
|
-
function
|
|
226
|
-
var k,
|
|
227
|
-
|
|
225
|
+
function M() {
|
|
226
|
+
var k, C;
|
|
227
|
+
G(), (C = (k = b.current).onSelect) == null || C.call(k, x.current);
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
229
|
+
function G() {
|
|
230
|
+
i.setState("value", x.current, !0);
|
|
231
231
|
}
|
|
232
232
|
if (!S) return null;
|
|
233
|
-
let { disabled:
|
|
234
|
-
return
|
|
235
|
-
}), Ye =
|
|
236
|
-
let { heading: r, children:
|
|
237
|
-
|
|
238
|
-
let
|
|
239
|
-
return
|
|
240
|
-
}), Qe =
|
|
241
|
-
let { alwaysRender: r, ...
|
|
242
|
-
return !r && !u ? null :
|
|
243
|
-
}), Ze =
|
|
244
|
-
let { onValueChange: r, ...
|
|
245
|
-
return
|
|
233
|
+
let { disabled: v, value: U, onSelect: I, forceMount: H, keywords: $, ...R } = e;
|
|
234
|
+
return n.createElement(V.div, { ref: X(u, a), ...R, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!v, "aria-selected": !!E, "data-disabled": !!v, "data-selected": !!E, onPointerMove: v || s.getDisablePointerSelection() ? void 0 : G, onClick: v ? void 0 : M }, e.children);
|
|
235
|
+
}), Ye = n.forwardRef((e, a) => {
|
|
236
|
+
let { heading: r, children: f, forceMount: o, ...u } = e, m = T(), s = n.useRef(null), b = n.useRef(null), d = T(), x = Y(), i = L((S) => o || x.filter() === !1 ? !0 : S.search ? S.filtered.groups.has(m) : !0);
|
|
237
|
+
z(() => x.group(m), []), Se(m, s, [e.value, e.heading, b]);
|
|
238
|
+
let E = n.useMemo(() => ({ id: m, forceMount: o }), [o]);
|
|
239
|
+
return n.createElement(V.div, { ref: X(s, a), ...u, "cmdk-group": "", role: "presentation", hidden: i ? void 0 : !0 }, r && n.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": !0, id: d }, r), Z(e, (S) => n.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": r ? d : void 0 }, n.createElement(ke.Provider, { value: E }, S))));
|
|
240
|
+
}), Qe = n.forwardRef((e, a) => {
|
|
241
|
+
let { alwaysRender: r, ...f } = e, o = n.useRef(null), u = L((m) => !m.search);
|
|
242
|
+
return !r && !u ? null : n.createElement(V.div, { ref: X(o, a), ...f, "cmdk-separator": "", role: "separator" });
|
|
243
|
+
}), Ze = n.forwardRef((e, a) => {
|
|
244
|
+
let { onValueChange: r, ...f } = e, o = e.value != null, u = ie(), m = L((d) => d.search), s = L((d) => d.selectedItemId), b = Y();
|
|
245
|
+
return n.useEffect(() => {
|
|
246
246
|
e.value != null && u.setState("search", e.value);
|
|
247
|
-
}, [e.value]),
|
|
248
|
-
o || u.setState("search",
|
|
247
|
+
}, [e.value]), n.createElement(V.input, { ref: a, ...f, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": s, id: b.inputId, type: "text", value: o ? e.value : m, onChange: (d) => {
|
|
248
|
+
o || u.setState("search", d.target.value), r?.(d.target.value);
|
|
249
249
|
} });
|
|
250
|
-
}), et =
|
|
251
|
-
let { children: r, label:
|
|
252
|
-
return
|
|
253
|
-
if (
|
|
254
|
-
let
|
|
255
|
-
|
|
256
|
-
let S =
|
|
257
|
-
|
|
250
|
+
}), et = n.forwardRef((e, a) => {
|
|
251
|
+
let { children: r, label: f = "Suggestions", ...o } = e, u = n.useRef(null), m = n.useRef(null), s = L((d) => d.selectedItemId), b = Y();
|
|
252
|
+
return n.useEffect(() => {
|
|
253
|
+
if (m.current && u.current) {
|
|
254
|
+
let d = m.current, x = u.current, i, E = new ResizeObserver(() => {
|
|
255
|
+
i = requestAnimationFrame(() => {
|
|
256
|
+
let S = d.offsetHeight;
|
|
257
|
+
x.style.setProperty("--cmdk-list-height", S.toFixed(1) + "px");
|
|
258
258
|
});
|
|
259
259
|
});
|
|
260
|
-
return
|
|
261
|
-
cancelAnimationFrame(
|
|
260
|
+
return E.observe(d), () => {
|
|
261
|
+
cancelAnimationFrame(i), E.unobserve(d);
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
}, []),
|
|
265
|
-
}), tt =
|
|
266
|
-
let { open: r, onOpenChange:
|
|
267
|
-
return
|
|
268
|
-
}), rt =
|
|
269
|
-
let { progress: r, children:
|
|
270
|
-
return
|
|
271
|
-
}),
|
|
272
|
-
function
|
|
264
|
+
}, []), n.createElement(V.div, { ref: X(u, a), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": s, "aria-label": f, id: b.listId }, Z(e, (d) => n.createElement("div", { ref: X(m, b.listInnerRef), "cmdk-list-sizer": "" }, d)));
|
|
265
|
+
}), tt = n.forwardRef((e, a) => {
|
|
266
|
+
let { open: r, onOpenChange: f, overlayClassName: o, contentClassName: u, container: m, ...s } = e;
|
|
267
|
+
return n.createElement(je, { open: r, onOpenChange: f }, n.createElement(Ie, { container: m }, n.createElement(Re, { "cmdk-overlay": "", className: o }), n.createElement(Ae, { "aria-label": e.label, "cmdk-dialog": "", className: u }, n.createElement(we, { ref: a, ...s }))));
|
|
268
|
+
}), rt = n.forwardRef((e, a) => L((r) => r.filtered.count === 0) ? n.createElement(V.div, { ref: a, ...e, "cmdk-empty": "", role: "presentation" }) : null), at = n.forwardRef((e, a) => {
|
|
269
|
+
let { progress: r, children: f, label: o = "Loading...", ...u } = e;
|
|
270
|
+
return n.createElement(V.div, { ref: a, ...u, "cmdk-loading": "", role: "progressbar", "aria-valuenow": r, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, Z(e, (m) => n.createElement("div", { "aria-hidden": !0 }, m)));
|
|
271
|
+
}), _ = Object.assign(we, { List: et, Item: Xe, Input: Ze, Group: Ye, Separator: Qe, Dialog: tt, Empty: rt, Loading: at });
|
|
272
|
+
function nt(e, a) {
|
|
273
273
|
let r = e.nextElementSibling;
|
|
274
274
|
for (; r; ) {
|
|
275
|
-
if (r.matches(
|
|
275
|
+
if (r.matches(a)) return r;
|
|
276
276
|
r = r.nextElementSibling;
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
function lt(e,
|
|
279
|
+
function lt(e, a) {
|
|
280
280
|
let r = e.previousElementSibling;
|
|
281
281
|
for (; r; ) {
|
|
282
|
-
if (r.matches(
|
|
282
|
+
if (r.matches(a)) return r;
|
|
283
283
|
r = r.previousElementSibling;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
function Ee(e) {
|
|
287
|
-
let
|
|
288
|
-
return
|
|
289
|
-
|
|
290
|
-
}),
|
|
287
|
+
let a = n.useRef(e);
|
|
288
|
+
return z(() => {
|
|
289
|
+
a.current = e;
|
|
290
|
+
}), a;
|
|
291
291
|
}
|
|
292
|
-
var
|
|
293
|
-
function
|
|
294
|
-
let
|
|
295
|
-
return
|
|
292
|
+
var z = typeof window > "u" ? n.useEffect : n.useLayoutEffect;
|
|
293
|
+
function B(e) {
|
|
294
|
+
let a = n.useRef();
|
|
295
|
+
return a.current === void 0 && (a.current = e()), a;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
let
|
|
299
|
-
return
|
|
297
|
+
function L(e) {
|
|
298
|
+
let a = ie(), r = () => e(a.snapshot());
|
|
299
|
+
return n.useSyncExternalStore(a.subscribe, r, r);
|
|
300
300
|
}
|
|
301
|
-
function Se(e,
|
|
302
|
-
let o =
|
|
303
|
-
return
|
|
304
|
-
var
|
|
305
|
-
let
|
|
306
|
-
var
|
|
307
|
-
for (let
|
|
308
|
-
if (typeof
|
|
309
|
-
if (typeof
|
|
301
|
+
function Se(e, a, r, f = []) {
|
|
302
|
+
let o = n.useRef(), u = Y();
|
|
303
|
+
return z(() => {
|
|
304
|
+
var m;
|
|
305
|
+
let s = (() => {
|
|
306
|
+
var d;
|
|
307
|
+
for (let x of r) {
|
|
308
|
+
if (typeof x == "string") return x.trim();
|
|
309
|
+
if (typeof x == "object" && "current" in x) return x.current ? (d = x.current.textContent) == null ? void 0 : d.trim() : o.current;
|
|
310
310
|
}
|
|
311
|
-
})(),
|
|
312
|
-
u.value(e,
|
|
311
|
+
})(), b = f.map((d) => d.trim());
|
|
312
|
+
u.value(e, s, b), (m = a.current) == null || m.setAttribute(q, s), o.current = s;
|
|
313
313
|
}), o;
|
|
314
314
|
}
|
|
315
315
|
var ot = () => {
|
|
316
|
-
let [e,
|
|
317
|
-
return
|
|
318
|
-
r.current.forEach((
|
|
319
|
-
}, [e]), (
|
|
320
|
-
r.current.set(
|
|
316
|
+
let [e, a] = n.useState(), r = B(() => /* @__PURE__ */ new Map());
|
|
317
|
+
return z(() => {
|
|
318
|
+
r.current.forEach((f) => f()), r.current = /* @__PURE__ */ new Map();
|
|
319
|
+
}, [e]), (f, o) => {
|
|
320
|
+
r.current.set(f, o), a({});
|
|
321
321
|
};
|
|
322
322
|
};
|
|
323
|
-
function
|
|
324
|
-
let
|
|
325
|
-
return typeof
|
|
323
|
+
function it(e) {
|
|
324
|
+
let a = e.type;
|
|
325
|
+
return typeof a == "function" ? a(e.props) : "render" in a ? a.render(e.props) : e;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
return e &&
|
|
327
|
+
function Z({ asChild: e, children: a }, r) {
|
|
328
|
+
return e && n.isValidElement(a) ? n.cloneElement(it(a), { ref: a.ref }, r(a.props.children)) : r(a);
|
|
329
329
|
}
|
|
330
|
-
var
|
|
330
|
+
var dt = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
331
331
|
function ut({
|
|
332
332
|
className: e,
|
|
333
|
-
...
|
|
333
|
+
...a
|
|
334
334
|
}) {
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
|
|
335
|
+
return /* @__PURE__ */ g.jsx(
|
|
336
|
+
_,
|
|
337
337
|
{
|
|
338
338
|
"data-slot": "command",
|
|
339
|
-
className:
|
|
339
|
+
className: D(
|
|
340
340
|
"adm:bg-popover adm:text-popover-foreground adm:flex adm:h-full adm:w-full adm:flex-col adm:overflow-hidden adm:rounded-md",
|
|
341
341
|
e
|
|
342
342
|
),
|
|
343
|
-
...
|
|
343
|
+
...a
|
|
344
344
|
}
|
|
345
345
|
);
|
|
346
346
|
}
|
|
347
347
|
function ct({
|
|
348
348
|
className: e,
|
|
349
|
-
...
|
|
349
|
+
...a
|
|
350
350
|
}) {
|
|
351
|
-
return /* @__PURE__ */
|
|
351
|
+
return /* @__PURE__ */ g.jsxs(
|
|
352
352
|
"div",
|
|
353
353
|
{
|
|
354
354
|
"data-slot": "command-input-wrapper",
|
|
355
355
|
className: "adm:flex adm:h-9 adm:items-center adm:gap-2 adm:border-b adm:px-3",
|
|
356
356
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
|
|
357
|
+
/* @__PURE__ */ g.jsx(ze, { className: "adm:size-4 adm:shrink-0 adm:opacity-50" }),
|
|
358
|
+
/* @__PURE__ */ g.jsx(
|
|
359
|
+
_.Input,
|
|
360
360
|
{
|
|
361
361
|
"data-slot": "command-input",
|
|
362
|
-
className:
|
|
362
|
+
className: D(
|
|
363
363
|
"adm:placeholder:text-muted-foreground adm:flex adm:h-10 adm:w-full adm:rounded-md adm:bg-transparent adm:py-3 adm:text-sm adm:outline-hidden adm:disabled:cursor-not-allowed adm:disabled:opacity-50",
|
|
364
364
|
e
|
|
365
365
|
),
|
|
366
|
-
...
|
|
366
|
+
...a
|
|
367
367
|
}
|
|
368
368
|
)
|
|
369
369
|
]
|
|
@@ -372,136 +372,181 @@ function ct({
|
|
|
372
372
|
}
|
|
373
373
|
function st({
|
|
374
374
|
className: e,
|
|
375
|
-
...
|
|
375
|
+
...a
|
|
376
376
|
}) {
|
|
377
|
-
return /* @__PURE__ */
|
|
378
|
-
|
|
377
|
+
return /* @__PURE__ */ g.jsx(
|
|
378
|
+
_.List,
|
|
379
379
|
{
|
|
380
380
|
"data-slot": "command-list",
|
|
381
|
-
className:
|
|
381
|
+
className: D(
|
|
382
382
|
"adm:max-h-[300px] adm:scroll-py-1 adm:overflow-x-hidden adm:overflow-y-auto",
|
|
383
383
|
e
|
|
384
384
|
),
|
|
385
|
-
...
|
|
385
|
+
...a
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
function mt({
|
|
390
390
|
className: e,
|
|
391
|
-
...
|
|
391
|
+
...a
|
|
392
392
|
}) {
|
|
393
|
-
return /* @__PURE__ */
|
|
394
|
-
|
|
393
|
+
return /* @__PURE__ */ g.jsx(
|
|
394
|
+
_.Empty,
|
|
395
395
|
{
|
|
396
396
|
"data-slot": "command-empty",
|
|
397
|
-
className:
|
|
398
|
-
...
|
|
397
|
+
className: D("adm:py-6 adm:text-center adm:text-sm", e),
|
|
398
|
+
...a
|
|
399
399
|
}
|
|
400
400
|
);
|
|
401
401
|
}
|
|
402
402
|
function ft({
|
|
403
403
|
className: e,
|
|
404
|
-
...
|
|
404
|
+
...a
|
|
405
405
|
}) {
|
|
406
|
-
return /* @__PURE__ */
|
|
407
|
-
|
|
406
|
+
return /* @__PURE__ */ g.jsx(
|
|
407
|
+
_.Group,
|
|
408
408
|
{
|
|
409
409
|
"data-slot": "command-group",
|
|
410
|
-
className:
|
|
410
|
+
className: D(
|
|
411
411
|
"adm:text-foreground adm:overflow-hidden adm:p-1 adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:text-muted-foreground adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:px-2 adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:py-1.5 adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:text-xs adm:**:**:**:**:**:**:[&_[cmdk-group-heading]]:font-medium",
|
|
412
412
|
e
|
|
413
413
|
),
|
|
414
|
-
...
|
|
414
|
+
...a
|
|
415
415
|
}
|
|
416
416
|
);
|
|
417
417
|
}
|
|
418
418
|
function pt({
|
|
419
419
|
className: e,
|
|
420
|
-
...
|
|
420
|
+
...a
|
|
421
421
|
}) {
|
|
422
|
-
return /* @__PURE__ */
|
|
423
|
-
|
|
422
|
+
return /* @__PURE__ */ g.jsx(
|
|
423
|
+
_.Item,
|
|
424
424
|
{
|
|
425
425
|
"data-slot": "command-item",
|
|
426
|
-
className:
|
|
426
|
+
className: D(
|
|
427
427
|
"adm:data-[selected=true]:bg-accent adm:data-[selected=true]:text-accent-foreground adm:[&_svg:not([class*=text-])]:text-muted-foreground adm:relative adm:flex adm:cursor-default adm:items-center adm:gap-2 adm:rounded-sm adm:px-2 adm:py-1.5 adm:text-sm adm:outline-hidden adm:select-none adm:data-[disabled=true]:pointer-events-none adm:data-[disabled=true]:opacity-50 adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0 adm:[&_svg:not([class*=size-])]:size-4",
|
|
428
428
|
e
|
|
429
429
|
),
|
|
430
|
-
...
|
|
430
|
+
...a
|
|
431
431
|
}
|
|
432
432
|
);
|
|
433
433
|
}
|
|
434
434
|
function Rt({
|
|
435
435
|
searchable: e,
|
|
436
|
-
multiple:
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
436
|
+
multiple: a,
|
|
437
|
+
icon: r,
|
|
438
|
+
value: f,
|
|
439
|
+
onValueChange: o,
|
|
440
|
+
labels: u,
|
|
441
|
+
options: m,
|
|
442
|
+
classNames: s,
|
|
443
|
+
selectedFeedback: b = "checkbox",
|
|
444
|
+
alwaysShowPlaceholder: d = !1,
|
|
445
|
+
valuePosition: x = "right",
|
|
446
|
+
renders: i
|
|
443
447
|
}) {
|
|
444
|
-
const [
|
|
448
|
+
const [E, S] = fe(!1), [M, G] = fe(a ? [] : ""), v = f !== void 0 ? f : M, I = { ...{
|
|
445
449
|
placeholder: "Select options...",
|
|
446
450
|
searchPlaceholder: "Search options...",
|
|
447
451
|
noItemsFound: "No options found.",
|
|
448
452
|
multipleSelected: (p) => `${p} options selected`
|
|
449
|
-
}, ...
|
|
450
|
-
|
|
451
|
-
}, $ = () =>
|
|
452
|
-
if (
|
|
453
|
-
const
|
|
454
|
-
|
|
453
|
+
}, ...u }, H = (p) => {
|
|
454
|
+
o ? o(p) : G(p);
|
|
455
|
+
}, $ = () => a && Array.isArray(v) ? v.length === 0 ? null : v.length === 1 ? m.find((p) => p.value === v[0])?.label : I.multipleSelected?.(v.length) || `${v.length} options selected` : !a && typeof v == "string" && v ? m.find((p) => p.value === v)?.label : null, R = () => a && Array.isArray(v) ? v.length > 0 : typeof v == "string" && v !== "", k = (p) => a && Array.isArray(v) ? v.includes(p) : v === p, C = (p) => {
|
|
456
|
+
if (a) {
|
|
457
|
+
const N = Array.isArray(v) ? v : [], P = N.includes(p) ? N.filter((F) => F !== p) : [...N, p];
|
|
458
|
+
H(P);
|
|
455
459
|
} else
|
|
456
|
-
|
|
457
|
-
},
|
|
458
|
-
const
|
|
459
|
-
return
|
|
460
|
-
|
|
460
|
+
H(p === v ? "" : p), S(!1);
|
|
461
|
+
}, K = (p) => {
|
|
462
|
+
const N = k(p), P = m.find((F) => F.value === p);
|
|
463
|
+
return i?.selectedFeedback ? i.selectedFeedback({
|
|
464
|
+
option: P,
|
|
465
|
+
isSelected: N,
|
|
466
|
+
type: b
|
|
467
|
+
}) : b === "check" ? /* @__PURE__ */ g.jsx("span", { className: D("adm:absolute adm:right-2 adm:flex adm:size-3.5 adm:items-center adm:justify-center", s?.check), children: N && /* @__PURE__ */ g.jsx(Pe, { className: "adm:size-4" }) }) : /* @__PURE__ */ g.jsx(
|
|
468
|
+
Le,
|
|
461
469
|
{
|
|
462
|
-
checked:
|
|
463
|
-
className:
|
|
470
|
+
checked: N,
|
|
471
|
+
className: s?.checkbox
|
|
464
472
|
}
|
|
465
473
|
);
|
|
466
474
|
};
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
/* @__PURE__ */
|
|
475
|
+
return /* @__PURE__ */ g.jsxs($e, { open: E, onOpenChange: S, children: [
|
|
476
|
+
/* @__PURE__ */ g.jsx(Me, { asChild: !0, children: i?.trigger ? i.trigger({
|
|
477
|
+
open: E,
|
|
478
|
+
value: v,
|
|
479
|
+
displayText: $() ?? null,
|
|
480
|
+
placeholder: I.placeholder || "",
|
|
481
|
+
hasValue: R(),
|
|
482
|
+
icon: r
|
|
483
|
+
}) : /* @__PURE__ */ g.jsxs(
|
|
469
484
|
Ce,
|
|
470
485
|
{
|
|
471
486
|
variant: "outline",
|
|
472
487
|
role: "combobox",
|
|
473
|
-
"aria-expanded":
|
|
474
|
-
className:
|
|
488
|
+
"aria-expanded": E,
|
|
489
|
+
className: D("adm:justify-between adm:font-normal", s?.trigger),
|
|
475
490
|
children: [
|
|
476
|
-
|
|
477
|
-
|
|
491
|
+
/* @__PURE__ */ g.jsxs("span", { className: "adm:flex adm:items-center adm:gap-2", children: [
|
|
492
|
+
r && /* @__PURE__ */ g.jsx(r, { className: "adm:opacity-50" }),
|
|
493
|
+
d ? i?.placeholder ? i.placeholder({
|
|
494
|
+
text: I.placeholder || "",
|
|
495
|
+
hasValue: R()
|
|
496
|
+
}) : /* @__PURE__ */ g.jsx("span", { className: "adm:opacity-70", children: I.placeholder }) : R() ? i?.displayValue ? i.displayValue({
|
|
497
|
+
text: $() ?? null,
|
|
498
|
+
value: v
|
|
499
|
+
}) : /* @__PURE__ */ g.jsx("span", { children: $() }) : i?.placeholder ? i.placeholder({
|
|
500
|
+
text: I.placeholder || "",
|
|
501
|
+
hasValue: R()
|
|
502
|
+
}) : /* @__PURE__ */ g.jsx("span", { children: I.placeholder }),
|
|
503
|
+
d && R() && x === "left" && (i?.displayValue ? i.displayValue({
|
|
504
|
+
text: $() ?? null,
|
|
505
|
+
value: v
|
|
506
|
+
}) : /* @__PURE__ */ g.jsx("span", { children: $() }))
|
|
507
|
+
] }),
|
|
508
|
+
/* @__PURE__ */ g.jsxs("span", { className: "adm:flex adm:items-center adm:gap-2", children: [
|
|
509
|
+
d && R() && x === "right" && (i?.displayValue ? i.displayValue({
|
|
510
|
+
text: $() ?? null,
|
|
511
|
+
value: v
|
|
512
|
+
}) : /* @__PURE__ */ g.jsx("span", { children: $() })),
|
|
513
|
+
i?.triggerIcon ? i.triggerIcon({ open: E }) : /* @__PURE__ */ g.jsx(Ve, { className: "adm:size-4 adm:opacity-50" })
|
|
514
|
+
] })
|
|
478
515
|
]
|
|
479
516
|
}
|
|
480
517
|
) }),
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
e &&
|
|
518
|
+
/* @__PURE__ */ g.jsx(De, { align: "start", className: D("adm:p-0", s?.popover), children: /* @__PURE__ */ g.jsxs(ut, { className: s?.command, children: [
|
|
519
|
+
e && (i?.searchInput ? i.searchInput({
|
|
520
|
+
placeholder: I.searchPlaceholder || ""
|
|
521
|
+
}) : /* @__PURE__ */ g.jsx(
|
|
483
522
|
ct,
|
|
484
523
|
{
|
|
485
|
-
placeholder:
|
|
486
|
-
className:
|
|
524
|
+
placeholder: I.searchPlaceholder,
|
|
525
|
+
className: s?.input
|
|
487
526
|
}
|
|
488
|
-
),
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
|
|
527
|
+
)),
|
|
528
|
+
/* @__PURE__ */ g.jsxs(st, { className: s?.list, children: [
|
|
529
|
+
/* @__PURE__ */ g.jsx(mt, { className: s?.empty, children: i?.empty ? i.empty({
|
|
530
|
+
text: I.noItemsFound || ""
|
|
531
|
+
}) : I.noItemsFound }),
|
|
532
|
+
/* @__PURE__ */ g.jsx(ft, { className: s?.group, children: m.map((p) => i?.option ? /* @__PURE__ */ g.jsx("div", { children: i.option({
|
|
533
|
+
option: p,
|
|
534
|
+
isSelected: k(p.value),
|
|
535
|
+
selectedFeedback: b
|
|
536
|
+
}) }, p.value) : /* @__PURE__ */ g.jsxs(
|
|
492
537
|
pt,
|
|
493
538
|
{
|
|
494
539
|
value: p.value,
|
|
495
|
-
onSelect:
|
|
540
|
+
onSelect: C,
|
|
496
541
|
disabled: p.disabled,
|
|
497
|
-
className:
|
|
498
|
-
|
|
499
|
-
|
|
542
|
+
className: D(
|
|
543
|
+
s?.item,
|
|
544
|
+
b === "check" && "adm:pr-8"
|
|
500
545
|
),
|
|
501
546
|
children: [
|
|
502
|
-
|
|
503
|
-
p.label,
|
|
504
|
-
|
|
547
|
+
b === "checkbox" && K(p.value),
|
|
548
|
+
i?.optionLabel ? i.optionLabel({ option: p }) : p.label,
|
|
549
|
+
b === "check" && K(p.value)
|
|
505
550
|
]
|
|
506
551
|
},
|
|
507
552
|
p.value
|