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