@bioturing/components 0.45.0 → 0.46.0

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