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