@bioturing/components 0.46.0 → 0.46.2
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/components/code-block/component.js +58 -58
- package/dist/components/code-block/component.js.map +1 -1
- package/dist/components/collapse/component.js +6 -6
- package/dist/components/collapse/component.js.map +1 -1
- package/dist/components/combobox/component.d.ts.map +1 -1
- package/dist/components/combobox/component.js +228 -220
- package/dist/components/combobox/component.js.map +1 -1
- package/dist/components/combobox/style.css +1 -1
- package/dist/components/command-palette/component.d.ts.map +1 -1
- package/dist/components/command-palette/component.js +30 -24
- package/dist/components/command-palette/component.js.map +1 -1
- package/dist/components/drag-drop/droppable.d.ts.map +1 -1
- package/dist/components/drag-drop/droppable.js +72 -68
- package/dist/components/drag-drop/droppable.js.map +1 -1
- package/dist/components/drag-drop/index.d.ts.map +1 -1
- package/dist/components/drag-drop/value.d.ts.map +1 -1
- package/dist/components/drag-drop/value.js +40 -56
- package/dist/components/drag-drop/value.js.map +1 -1
- package/dist/components/select-trigger/style.css +1 -1
- package/dist/components/theme-provider/style.css +1 -1
- package/dist/components/toast/component.d.ts.map +1 -1
- package/dist/components/toast/component.js +37 -35
- package/dist/components/toast/component.js.map +1 -1
- package/dist/components/tooltip/component.d.ts +1 -1
- package/dist/components/tooltip/component.d.ts.map +1 -1
- package/dist/components/tooltip/component.js +14 -4
- package/dist/components/tooltip/component.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -1,370 +1,378 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as
|
|
3
|
-
import { Combobox as
|
|
4
|
-
import
|
|
5
|
-
import { FormItemInputContext as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { BaseMenu as
|
|
2
|
+
import { jsx as t, jsxs as C, Fragment as se } from "react/jsx-runtime";
|
|
3
|
+
import { Combobox as c } from "@base-ui/react/combobox";
|
|
4
|
+
import Te from "antd/es/config-provider/DisabledContext";
|
|
5
|
+
import { FormItemInputContext as De } from "antd/es/form/context";
|
|
6
|
+
import { forwardRef as Le, useRef as Se, useContext as ce, useCallback as x, useMemo as w, useState as Ve } from "react";
|
|
7
|
+
import { BaseMenu as O } from "../base-menu/index.js";
|
|
8
8
|
import { XIcon as Me } from "@bioturing/assets";
|
|
9
|
-
import { splitBySeparators as
|
|
9
|
+
import { splitBySeparators as le } from "./utils.js";
|
|
10
10
|
import './style.css';/* empty css */
|
|
11
|
-
import { SelectTrigger as
|
|
12
|
-
import { BaseMenuItem as
|
|
13
|
-
import { Empty as
|
|
14
|
-
import { useControlledState as
|
|
15
|
-
import { useCls as
|
|
11
|
+
import { SelectTrigger as v } from "../select-trigger/component.js";
|
|
12
|
+
import { BaseMenuItem as ie } from "../base-menu/item.js";
|
|
13
|
+
import { Empty as Fe } from "../empty/component.js";
|
|
14
|
+
import { useControlledState as ae } from "../hooks/useControlledState.js";
|
|
15
|
+
import { useCls as Oe } from "../utils/antdUtils.js";
|
|
16
16
|
import { clsx as a } from "../utils/cn.js";
|
|
17
|
-
import { reactNodeToString as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
import { reactNodeToString as E } from "../utils/reactToString.js";
|
|
18
|
+
import { ScrollArea as $e } from "../scroll-area/component.js";
|
|
19
|
+
const Be = (l) => /* @__PURE__ */ t(O.Root, { ...l }), Pe = (l) => /* @__PURE__ */ t(O.Popup, { ...l }), je = (l) => /* @__PURE__ */ t(O.Divider, { ...l }), Ke = (l) => /* @__PURE__ */ t(O.List, { ...l }), ke = ({
|
|
20
|
+
options: l = [],
|
|
21
|
+
value: de,
|
|
21
22
|
defaultValue: W,
|
|
22
|
-
onChange:
|
|
23
|
-
placeholder:
|
|
24
|
-
disabled:
|
|
25
|
-
status:
|
|
26
|
-
allowClear:
|
|
23
|
+
onChange: $,
|
|
24
|
+
placeholder: R = "Select...",
|
|
25
|
+
disabled: ue = !1,
|
|
26
|
+
status: me,
|
|
27
|
+
allowClear: Q = !1,
|
|
27
28
|
multiple: r = !1,
|
|
28
29
|
showSearch: We = !0,
|
|
29
|
-
open:
|
|
30
|
-
onOpenChange:
|
|
31
|
-
className:
|
|
32
|
-
classNames:
|
|
33
|
-
size:
|
|
34
|
-
optionRender:
|
|
35
|
-
onSearch:
|
|
36
|
-
clearIcon:
|
|
37
|
-
suffixIcon:
|
|
38
|
-
placement:
|
|
30
|
+
open: fe,
|
|
31
|
+
onOpenChange: he,
|
|
32
|
+
className: be,
|
|
33
|
+
classNames: g,
|
|
34
|
+
size: B = "middle",
|
|
35
|
+
optionRender: U,
|
|
36
|
+
onSearch: P,
|
|
37
|
+
clearIcon: X,
|
|
38
|
+
suffixIcon: G,
|
|
39
|
+
placement: T = "bottomLeft",
|
|
39
40
|
// showSelectionSummary: _showSelectionSummary = false,
|
|
40
41
|
// selectionSummaryRender,
|
|
41
|
-
showSelectAll:
|
|
42
|
-
optionLabelRender:
|
|
43
|
-
getOptionKeywords:
|
|
44
|
-
String(
|
|
45
|
-
|
|
42
|
+
showSelectAll: H = !1,
|
|
43
|
+
optionLabelRender: D,
|
|
44
|
+
getOptionKeywords: J = (h) => [
|
|
45
|
+
String(h.value),
|
|
46
|
+
E(h.label)
|
|
46
47
|
],
|
|
47
|
-
popupMatchSelectWidth:
|
|
48
|
-
addOnEnter:
|
|
48
|
+
popupMatchSelectWidth: ge = !0,
|
|
49
|
+
addOnEnter: L = !1,
|
|
49
50
|
tokenSeparators: m,
|
|
50
|
-
autoHighlight:
|
|
51
|
-
filterOption:
|
|
52
|
-
...
|
|
53
|
-
},
|
|
54
|
-
const [
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
autoHighlight: S = !0,
|
|
52
|
+
filterOption: V,
|
|
53
|
+
...pe
|
|
54
|
+
}, Ce) => {
|
|
55
|
+
const [h, Y] = ae(
|
|
56
|
+
de,
|
|
57
|
+
$,
|
|
57
58
|
W !== void 0 ? W : r ? [] : void 0
|
|
58
|
-
), [
|
|
59
|
+
), [j, y] = ae(fe, he, !1), i = Oe(), K = Se(null), { status: xe } = ce(De), ve = ce(Te), M = me || xe, A = ue || ve, f = x(
|
|
59
60
|
(e) => {
|
|
60
|
-
|
|
61
|
+
Y(e), $?.(e);
|
|
61
62
|
},
|
|
62
|
-
[
|
|
63
|
-
),
|
|
63
|
+
[Y, $]
|
|
64
|
+
), Z = x(() => {
|
|
64
65
|
if (r) {
|
|
65
|
-
const e =
|
|
66
|
-
|
|
66
|
+
const e = l.map((o) => o.value);
|
|
67
|
+
f(e);
|
|
67
68
|
}
|
|
68
|
-
}, [r,
|
|
69
|
-
r &&
|
|
70
|
-
}, [r,
|
|
71
|
-
|
|
72
|
-
}, [r,
|
|
69
|
+
}, [r, l, f]), _ = x(() => {
|
|
70
|
+
r && f([]);
|
|
71
|
+
}, [r, f]), z = x(() => {
|
|
72
|
+
f(r ? [] : void 0);
|
|
73
|
+
}, [r, f]), b = w(() => Array.isArray(h) ? h : h ? [h] : [], [h]), d = w(() => {
|
|
73
74
|
const e = /* @__PURE__ */ new Map();
|
|
74
|
-
for (const o of
|
|
75
|
+
for (const o of l)
|
|
75
76
|
e.set(o.value, o);
|
|
76
77
|
return e;
|
|
77
|
-
}, [
|
|
78
|
-
if (!
|
|
78
|
+
}, [l]), F = w(() => {
|
|
79
|
+
if (!H || !r || l.length === 0)
|
|
79
80
|
return null;
|
|
80
|
-
const e = b.filter((
|
|
81
|
+
const e = b.filter((s) => d.has(s)), o = e.length === l.length && l.length > 0, n = e.length > 0 && e.length < l.length;
|
|
81
82
|
return {
|
|
82
83
|
checked: o,
|
|
83
84
|
indeterminate: n,
|
|
84
85
|
onToggle: () => {
|
|
85
|
-
n || o ?
|
|
86
|
+
n || o ? _() : Z();
|
|
86
87
|
}
|
|
87
88
|
};
|
|
88
|
-
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
M &&
|
|
92
|
-
|
|
93
|
-
),
|
|
89
|
+
}, [H, r, l, d, b, _, Z]), we = w(() => l.map((e) => e.value), [l]), q = w(() => r ? b.length > 0 ? `${b.length} item${b.length === 1 ? "" : "s"} selected` : null : d.get(b[0])?.label || null, [r, b, d]), ee = a(
|
|
90
|
+
i("combobox-input"),
|
|
91
|
+
i(`combobox-input-${B}`),
|
|
92
|
+
M && i(`combobox-input-${M}`),
|
|
93
|
+
g?.input
|
|
94
|
+
), ye = x(
|
|
94
95
|
(e) => {
|
|
95
96
|
const o = d.get(e);
|
|
96
|
-
return
|
|
97
|
+
return E(o?.label || String(e));
|
|
97
98
|
},
|
|
98
99
|
[d]
|
|
99
|
-
), [
|
|
100
|
+
), [N, oe] = Ve(""), te = x(
|
|
100
101
|
(e) => {
|
|
101
102
|
const o = e.trim();
|
|
102
103
|
if (!o) return;
|
|
103
104
|
const n = o.toLowerCase();
|
|
104
|
-
for (const [
|
|
105
|
-
if (String(
|
|
105
|
+
for (const [s, u] of d)
|
|
106
|
+
if (String(s).toLowerCase() === n)
|
|
106
107
|
return u;
|
|
107
|
-
for (const
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
108
|
+
for (const s of d.values())
|
|
109
|
+
if (E(s.label).toLowerCase() === n)
|
|
110
|
+
return s;
|
|
110
111
|
},
|
|
111
112
|
[d]
|
|
112
|
-
),
|
|
113
|
+
), ne = x(
|
|
113
114
|
(e) => {
|
|
114
|
-
if (!
|
|
115
|
-
const o = r && m && m.length > 0 ?
|
|
116
|
-
for (const
|
|
117
|
-
const u =
|
|
115
|
+
if (!L || !e.trim()) return !1;
|
|
116
|
+
const o = r && m && m.length > 0 ? le(e, m) : [e.trim()], n = [];
|
|
117
|
+
for (const s of o) {
|
|
118
|
+
const u = te(s);
|
|
118
119
|
u && !u.disabled && n.push(u.value);
|
|
119
120
|
}
|
|
120
121
|
if (n.length === 0) return !1;
|
|
121
122
|
if (r) {
|
|
122
|
-
const
|
|
123
|
-
|
|
123
|
+
const s = Array.isArray(h) ? [...h] : [], u = [.../* @__PURE__ */ new Set([...s, ...n])];
|
|
124
|
+
f(u);
|
|
124
125
|
} else
|
|
125
|
-
|
|
126
|
+
f(n[0]), y(!1);
|
|
126
127
|
return !0;
|
|
127
128
|
},
|
|
128
129
|
[
|
|
129
|
-
|
|
130
|
+
L,
|
|
130
131
|
r,
|
|
131
132
|
m,
|
|
132
|
-
|
|
133
|
-
f,
|
|
133
|
+
te,
|
|
134
134
|
h,
|
|
135
|
+
f,
|
|
135
136
|
y
|
|
136
137
|
]
|
|
137
|
-
),
|
|
138
|
+
), Ae = w(() => !m || m.length === 0 ? !1 : m.some((e) => N.includes(e)), [N, m]), Ne = r ? S && !Ae : S, re = x(
|
|
138
139
|
(e) => (o) => {
|
|
139
|
-
if (o.key === "Enter" &&
|
|
140
|
-
if (!r &&
|
|
141
|
-
|
|
140
|
+
if (o.key === "Enter" && L && e) {
|
|
141
|
+
if (!r && S) return;
|
|
142
|
+
ne(e) && (o.preventDefault(), oe(""), P?.(""));
|
|
142
143
|
}
|
|
143
144
|
},
|
|
144
|
-
[
|
|
145
|
-
),
|
|
145
|
+
[L, S, r, ne, P]
|
|
146
|
+
), Ie = w(() => V === !1 ? null : typeof V == "function" ? (e, o) => {
|
|
146
147
|
const n = d.get(e);
|
|
147
|
-
return
|
|
148
|
+
return V(o, n);
|
|
148
149
|
} : (e, o) => {
|
|
149
150
|
if (!o) return !0;
|
|
150
151
|
const n = d.get(e);
|
|
151
152
|
if (!n) return !1;
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
153
|
+
const s = m && m.length > 0 ? le(o, m) : [o], u = J(n).map((I) => I.toLowerCase()), p = s.filter((I) => {
|
|
154
|
+
const k = I.toLowerCase();
|
|
155
|
+
return u.some((Re) => Re.includes(k));
|
|
156
|
+
}).length;
|
|
157
|
+
if (p === 0) return !1;
|
|
158
|
+
if (s.length > 1 && p > 1) {
|
|
159
|
+
const I = o.toLowerCase();
|
|
160
|
+
return u.some((k) => k.includes(I));
|
|
161
|
+
}
|
|
162
|
+
return !0;
|
|
163
|
+
}, [V, d, m, J]);
|
|
164
|
+
return /* @__PURE__ */ t("div", { ref: Ce, className: a(i("combobox"), be), ...pe, children: /* @__PURE__ */ C(
|
|
165
|
+
c.Root,
|
|
160
166
|
{
|
|
161
167
|
value: r ? b : b[0] ?? null,
|
|
162
168
|
onValueChange: (e) => {
|
|
163
|
-
|
|
169
|
+
f(
|
|
164
170
|
r ? Array.isArray(e) ? e : [] : e
|
|
165
171
|
);
|
|
166
172
|
},
|
|
167
|
-
inputValue:
|
|
173
|
+
inputValue: N,
|
|
168
174
|
onInputValueChange: (e) => {
|
|
169
|
-
|
|
175
|
+
oe(e), P?.(e);
|
|
170
176
|
},
|
|
171
|
-
open:
|
|
177
|
+
open: j,
|
|
172
178
|
onOpenChange: y,
|
|
173
179
|
multiple: r,
|
|
174
180
|
disabled: A,
|
|
175
|
-
autoHighlight:
|
|
176
|
-
items:
|
|
177
|
-
itemToStringLabel:
|
|
178
|
-
filter:
|
|
181
|
+
autoHighlight: Ne,
|
|
182
|
+
items: we,
|
|
183
|
+
itemToStringLabel: ye,
|
|
184
|
+
filter: Ie,
|
|
179
185
|
children: [
|
|
180
186
|
r ? (
|
|
181
187
|
/* Multiple Selection Layout using SelectTrigger compound components */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
|
|
188
|
+
/* @__PURE__ */ C(
|
|
189
|
+
v.Root,
|
|
184
190
|
{
|
|
185
|
-
ref:
|
|
186
|
-
size:
|
|
191
|
+
ref: K,
|
|
192
|
+
size: B,
|
|
187
193
|
disabled: A,
|
|
188
|
-
open:
|
|
194
|
+
open: j,
|
|
189
195
|
status: M,
|
|
190
|
-
placeholder:
|
|
191
|
-
displayValue:
|
|
192
|
-
allowClear:
|
|
193
|
-
suffixIcon:
|
|
194
|
-
clearIcon:
|
|
195
|
-
onClear:
|
|
196
|
+
placeholder: R,
|
|
197
|
+
displayValue: q,
|
|
198
|
+
allowClear: Q,
|
|
199
|
+
suffixIcon: G,
|
|
200
|
+
clearIcon: X,
|
|
201
|
+
onClear: z,
|
|
196
202
|
onOpenChange: y,
|
|
197
|
-
className: a(
|
|
203
|
+
className: a(g?.trigger, i("combobox-trigger-multiple")),
|
|
198
204
|
as: "div",
|
|
199
205
|
children: [
|
|
200
206
|
/* @__PURE__ */ t(
|
|
201
|
-
|
|
207
|
+
v.Content,
|
|
202
208
|
{
|
|
203
|
-
contentRender: ({ className: e, children: o, ...n }) => /* @__PURE__ */ t(
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
return /* @__PURE__ */
|
|
207
|
-
|
|
208
|
-
/* @__PURE__ */ t("span", { className: a(
|
|
209
|
+
contentRender: ({ className: e, children: o, ...n }) => /* @__PURE__ */ t(c.Chips, { className: a(i("combobox-chips"), e), ...n, children: /* @__PURE__ */ t(c.Value, { children: (s) => /* @__PURE__ */ C(se, { children: [
|
|
210
|
+
s.map((u) => {
|
|
211
|
+
const p = d.get(u);
|
|
212
|
+
return /* @__PURE__ */ C(c.Chip, { className: a(i("combobox-chip")), children: [
|
|
213
|
+
p?.icon && /* @__PURE__ */ t("span", { className: a(i("combobox-chip-icon")), children: p.icon }),
|
|
214
|
+
/* @__PURE__ */ t("span", { className: a(i("combobox-chip-text")), children: p ? D ? D(p) : p.label : u }),
|
|
209
215
|
/* @__PURE__ */ t(
|
|
210
|
-
|
|
216
|
+
c.ChipRemove,
|
|
211
217
|
{
|
|
212
|
-
className: a(
|
|
218
|
+
className: a(i("combobox-chip-remove")),
|
|
213
219
|
children: /* @__PURE__ */ t(Me, {})
|
|
214
220
|
}
|
|
215
221
|
)
|
|
216
222
|
] }, u);
|
|
217
223
|
}),
|
|
218
224
|
/* @__PURE__ */ t(
|
|
219
|
-
|
|
225
|
+
c.Input,
|
|
220
226
|
{
|
|
221
|
-
placeholder:
|
|
222
|
-
className:
|
|
227
|
+
placeholder: s.length > 0 ? "" : R,
|
|
228
|
+
className: ee,
|
|
223
229
|
disabled: A,
|
|
224
|
-
onKeyDown:
|
|
230
|
+
onKeyDown: re(N)
|
|
225
231
|
}
|
|
226
232
|
)
|
|
227
233
|
] }) }) })
|
|
228
234
|
}
|
|
229
235
|
),
|
|
230
236
|
/* @__PURE__ */ t(
|
|
231
|
-
|
|
237
|
+
v.Clear,
|
|
232
238
|
{
|
|
233
|
-
render: (e) => /* @__PURE__ */ t(
|
|
239
|
+
render: (e) => /* @__PURE__ */ t(c.Clear, { ...e })
|
|
234
240
|
}
|
|
235
241
|
),
|
|
236
242
|
/* @__PURE__ */ t(
|
|
237
|
-
|
|
243
|
+
v.Arrow,
|
|
238
244
|
{
|
|
239
|
-
render: (e, { icon: o }) => /* @__PURE__ */ t(
|
|
245
|
+
render: (e, { icon: o }) => /* @__PURE__ */ t(c.Trigger, { ...e, children: /* @__PURE__ */ t(c.Icon, { children: o }) })
|
|
240
246
|
}
|
|
241
247
|
)
|
|
242
248
|
]
|
|
243
249
|
}
|
|
244
250
|
)
|
|
245
|
-
) : /* @__PURE__ */
|
|
246
|
-
|
|
251
|
+
) : /* @__PURE__ */ C(
|
|
252
|
+
v.Root,
|
|
247
253
|
{
|
|
248
|
-
ref:
|
|
254
|
+
ref: K,
|
|
249
255
|
as: "div",
|
|
250
|
-
size:
|
|
256
|
+
size: B,
|
|
251
257
|
disabled: A,
|
|
252
|
-
open:
|
|
258
|
+
open: j,
|
|
253
259
|
status: M,
|
|
254
|
-
placeholder:
|
|
255
|
-
displayValue:
|
|
256
|
-
allowClear:
|
|
257
|
-
suffixIcon:
|
|
258
|
-
clearIcon:
|
|
259
|
-
onClear:
|
|
260
|
+
placeholder: R,
|
|
261
|
+
displayValue: q,
|
|
262
|
+
allowClear: Q,
|
|
263
|
+
suffixIcon: G,
|
|
264
|
+
clearIcon: X,
|
|
265
|
+
onClear: z,
|
|
260
266
|
onOpenChange: y,
|
|
261
|
-
className: a(
|
|
267
|
+
className: a(g?.trigger, i("combobox-trigger-single")),
|
|
262
268
|
children: [
|
|
263
269
|
/* @__PURE__ */ t(
|
|
264
|
-
|
|
270
|
+
v.Content,
|
|
265
271
|
{
|
|
266
272
|
contentRender: ({ className: e, children: o, ...n }) => /* @__PURE__ */ t(
|
|
267
|
-
|
|
273
|
+
c.Input,
|
|
268
274
|
{
|
|
269
|
-
placeholder:
|
|
270
|
-
className: a(e,
|
|
275
|
+
placeholder: R,
|
|
276
|
+
className: a(e, ee),
|
|
271
277
|
disabled: A,
|
|
272
|
-
onKeyDown:
|
|
278
|
+
onKeyDown: re(N),
|
|
273
279
|
...n
|
|
274
280
|
}
|
|
275
281
|
)
|
|
276
282
|
}
|
|
277
283
|
),
|
|
278
284
|
/* @__PURE__ */ t(
|
|
279
|
-
|
|
285
|
+
v.Clear,
|
|
280
286
|
{
|
|
281
|
-
render: (e) => /* @__PURE__ */ t(
|
|
287
|
+
render: (e) => /* @__PURE__ */ t(c.Clear, { ...e })
|
|
282
288
|
}
|
|
283
289
|
),
|
|
284
290
|
/* @__PURE__ */ t(
|
|
285
|
-
|
|
291
|
+
v.Arrow,
|
|
286
292
|
{
|
|
287
|
-
render: (e, { icon: o }) => /* @__PURE__ */ t(
|
|
293
|
+
render: (e, { icon: o }) => /* @__PURE__ */ t(c.Trigger, { ...e, children: /* @__PURE__ */ t(c.Icon, { children: o }) })
|
|
288
294
|
}
|
|
289
295
|
)
|
|
290
296
|
]
|
|
291
297
|
}
|
|
292
298
|
),
|
|
293
|
-
/* @__PURE__ */ t(
|
|
294
|
-
|
|
299
|
+
/* @__PURE__ */ t(c.Portal, { children: /* @__PURE__ */ t(
|
|
300
|
+
c.Positioner,
|
|
295
301
|
{
|
|
296
|
-
anchor:
|
|
302
|
+
anchor: K.current,
|
|
297
303
|
sideOffset: 4,
|
|
298
|
-
side:
|
|
299
|
-
align:
|
|
300
|
-
render:
|
|
301
|
-
children: /* @__PURE__ */
|
|
302
|
-
|
|
304
|
+
side: T.startsWith("top") ? "top" : "bottom",
|
|
305
|
+
align: T.endsWith("Right") ? "end" : T === "top" || T === "bottom" ? "center" : "start",
|
|
306
|
+
render: Be,
|
|
307
|
+
children: /* @__PURE__ */ t(
|
|
308
|
+
c.Popup,
|
|
303
309
|
{
|
|
304
310
|
className: a(
|
|
305
|
-
|
|
306
|
-
!
|
|
307
|
-
|
|
311
|
+
i("combobox-popup"),
|
|
312
|
+
!ge && i("combobox-popup--auto-width"),
|
|
313
|
+
g?.portal
|
|
308
314
|
),
|
|
309
|
-
render:
|
|
310
|
-
children: [
|
|
311
|
-
|
|
315
|
+
render: Pe,
|
|
316
|
+
children: /* @__PURE__ */ C("div", { className: a(i("combobox-container")), children: [
|
|
317
|
+
F && /* @__PURE__ */ C(se, { children: [
|
|
312
318
|
/* @__PURE__ */ t(
|
|
313
|
-
|
|
319
|
+
ie,
|
|
314
320
|
{
|
|
315
321
|
as: "button",
|
|
316
322
|
type: "button",
|
|
317
|
-
className: a(
|
|
318
|
-
selected:
|
|
319
|
-
onClick:
|
|
320
|
-
indeterminate:
|
|
323
|
+
className: a(i("combobox-select-all")),
|
|
324
|
+
selected: F.checked,
|
|
325
|
+
onClick: F.onToggle,
|
|
326
|
+
indeterminate: F.indeterminate,
|
|
321
327
|
showCheckbox: !0,
|
|
322
328
|
children: "Select All"
|
|
323
329
|
}
|
|
324
330
|
),
|
|
325
|
-
/* @__PURE__ */ t(
|
|
331
|
+
/* @__PURE__ */ t(c.Separator, { render: je })
|
|
326
332
|
] }),
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
333
|
+
/* @__PURE__ */ C($e, { fadeEdges: !0, children: [
|
|
334
|
+
/* @__PURE__ */ t(
|
|
335
|
+
c.List,
|
|
336
|
+
{
|
|
337
|
+
className: a(i("combobox-list"), g?.list),
|
|
338
|
+
render: Ke,
|
|
339
|
+
children: (e) => {
|
|
340
|
+
const o = d.get(e);
|
|
341
|
+
if (!o) return null;
|
|
342
|
+
const n = b.includes(e);
|
|
343
|
+
return U ? U(o, {}) : /* @__PURE__ */ t(
|
|
344
|
+
ie,
|
|
345
|
+
{
|
|
346
|
+
disabled: o.disabled,
|
|
347
|
+
selected: n,
|
|
348
|
+
showCheckbox: r,
|
|
349
|
+
icon: o.icon,
|
|
350
|
+
classNames: {
|
|
351
|
+
root: a(g?.option),
|
|
352
|
+
icon: g?.optionIcon,
|
|
353
|
+
text: g?.optionText
|
|
354
|
+
},
|
|
355
|
+
labelRender: D ? (s) => D(o, s) : void 0,
|
|
356
|
+
render: (s) => /* @__PURE__ */ t(
|
|
357
|
+
c.Item,
|
|
358
|
+
{
|
|
359
|
+
value: e,
|
|
360
|
+
disabled: o.disabled,
|
|
361
|
+
...s,
|
|
362
|
+
"data-disabled": o.disabled,
|
|
363
|
+
"data-selected": n
|
|
364
|
+
}
|
|
365
|
+
),
|
|
366
|
+
children: o.label
|
|
347
367
|
},
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
{
|
|
352
|
-
value: e,
|
|
353
|
-
disabled: o.disabled,
|
|
354
|
-
...i,
|
|
355
|
-
"data-disabled": o.disabled,
|
|
356
|
-
"data-selected": n
|
|
357
|
-
}
|
|
358
|
-
),
|
|
359
|
-
children: o.label
|
|
360
|
-
},
|
|
361
|
-
o.value
|
|
362
|
-
);
|
|
368
|
+
o.value
|
|
369
|
+
);
|
|
370
|
+
}
|
|
363
371
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
]
|
|
372
|
+
),
|
|
373
|
+
/* @__PURE__ */ t(c.Empty, { className: a(i("combobox-empty")), children: /* @__PURE__ */ t(Fe, { description: "No options found" }) })
|
|
374
|
+
] })
|
|
375
|
+
] })
|
|
368
376
|
}
|
|
369
377
|
)
|
|
370
378
|
}
|
|
@@ -372,11 +380,11 @@ const Oe = (c) => /* @__PURE__ */ t(F.Root, { ...c }), $e = (c) => /* @__PURE__
|
|
|
372
380
|
]
|
|
373
381
|
}
|
|
374
382
|
) });
|
|
375
|
-
},
|
|
383
|
+
}, Ee = Le(ke), co = Object.assign(Ee, {
|
|
376
384
|
// Add any sub components here if needed
|
|
377
385
|
});
|
|
378
386
|
export {
|
|
379
|
-
|
|
380
|
-
|
|
387
|
+
co as Combobox,
|
|
388
|
+
co as default
|
|
381
389
|
};
|
|
382
390
|
//# sourceMappingURL=component.js.map
|