@commercetools/nimbus 0.0.0-canary-20260121170141 → 0.0.0-canary-20260122140009

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/chunks/{combobox-vjauyzlS.es.js → combobox-CMm8VWO_.es.js} +334 -328
  2. package/dist/chunks/combobox-CMm8VWO_.es.js.map +1 -0
  3. package/dist/chunks/combobox-j72jsIF_.cjs.js +2 -0
  4. package/dist/chunks/combobox-j72jsIF_.cjs.js.map +1 -0
  5. package/dist/chunks/{data-table-DA4SdIgU.es.js → data-table-1TdJ0lRB.es.js} +943 -923
  6. package/dist/chunks/{data-table-DA4SdIgU.es.js.map → data-table-1TdJ0lRB.es.js.map} +1 -1
  7. package/dist/chunks/data-table-DBUyENHz.cjs.js +2 -0
  8. package/dist/chunks/{data-table-CBZLbe9h.cjs.js.map → data-table-DBUyENHz.cjs.js.map} +1 -1
  9. package/dist/chunks/tabs-B0gwV57F.cjs.js +2 -0
  10. package/dist/chunks/{tabs-iV08OTqG.cjs.js.map → tabs-B0gwV57F.cjs.js.map} +1 -1
  11. package/dist/chunks/{tabs-D0OPeQ_J.es.js → tabs-D-DgDmHo.es.js} +37 -32
  12. package/dist/chunks/{tabs-D0OPeQ_J.es.js.map → tabs-D-DgDmHo.es.js.map} +1 -1
  13. package/dist/components/combobox.cjs +1 -1
  14. package/dist/components/combobox.es.js +1 -1
  15. package/dist/components/data-table/components/data-table.body.d.ts +1 -1
  16. package/dist/components/data-table/components/data-table.header.d.ts +1 -1
  17. package/dist/components/data-table/components/data-table.table.d.ts +1 -1
  18. package/dist/components/data-table/data-table.d.ts +3 -3
  19. package/dist/components/data-table/data-table.i18n.d.ts +5 -0
  20. package/dist/components/data-table/data-table.messages.d.ts +1 -1
  21. package/dist/components/data-table/intl/de.d.ts +1 -0
  22. package/dist/components/data-table/intl/en.d.ts +1 -0
  23. package/dist/components/data-table/intl/es.d.ts +1 -0
  24. package/dist/components/data-table/intl/fr-FR.d.ts +1 -0
  25. package/dist/components/data-table/intl/pt-BR.d.ts +1 -0
  26. package/dist/components/data-table.cjs +1 -1
  27. package/dist/components/data-table.es.js +1 -1
  28. package/dist/components/tabs/components/tabs.root.d.ts +1 -1
  29. package/dist/components/tabs/tabs.d.ts +1 -1
  30. package/dist/components/tabs/tabs.types.d.ts +5 -0
  31. package/dist/components/tabs.cjs +1 -1
  32. package/dist/components/tabs.es.js +1 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.es.js +3 -3
  35. package/package.json +5 -5
  36. package/dist/chunks/combobox-B7ck7gxL.cjs.js +0 -2
  37. package/dist/chunks/combobox-B7ck7gxL.cjs.js.map +0 -1
  38. package/dist/chunks/combobox-vjauyzlS.es.js.map +0 -1
  39. package/dist/chunks/data-table-CBZLbe9h.cjs.js +0 -2
  40. package/dist/chunks/tabs-iV08OTqG.cjs.js +0 -2
@@ -1,15 +1,15 @@
1
- import { jsx as g, jsxs as ve, Fragment as He } from "react/jsx-runtime";
2
- import { useReducer as St, useRef as A, useEffect as Y, createContext as Qe, useMemo as _, useContext as Pe, useState as Z, useCallback as R, isValidElement as wt, cloneElement as $t } from "react";
1
+ import { jsx as g, jsxs as xe, Fragment as He } from "react/jsx-runtime";
2
+ import { useReducer as St, useRef as A, useEffect as Z, createContext as Qe, useMemo as ee, useContext as Pe, useState as _, useCallback as R, isValidElement as wt, cloneElement as $t } from "react";
3
3
  import { d as Kt } from "./Header-CiYtrnTw.es.js";
4
4
  import { $ as Xe, a as It, b as Bt, c as Mt, d as At } from "./ListBox-RrHJjnuq.es.js";
5
5
  import { f as Ft, g as Ot } from "./CollectionBuilder-BOe312C_.es.js";
6
6
  import { createSlotRecipeContext as Vt } from "@chakra-ui/react";
7
7
  import { Close as Lt, KeyboardArrowDown as Tt, Check as Et } from "@commercetools/nimbus-icons";
8
- import { e as fe } from "./extract-style-props-BdibuNZ7.es.js";
8
+ import { e as me } from "./extract-style-props-BdibuNZ7.es.js";
9
9
  import { P as Rt } from "./popover-CuA9VugH.es.js";
10
10
  import { I as Ue } from "./icon-button-CosIm3oY.es.js";
11
11
  import { L as Pt } from "./loading-spinner-gf62wtm3.es.js";
12
- import { $ as Me, a as Dt } from "./Input-Cmg08oRP.es.js";
12
+ import { $ as Be, a as Dt } from "./Input-Cmg08oRP.es.js";
13
13
  import { $ as De, T as Te } from "./tag-group-BE8d6xcP.es.js";
14
14
  import { useSlotRecipe as zt } from "@chakra-ui/react/styled-system";
15
15
  import { b as Nt } from "./RSPContexts-DLgb84PF.es.js";
@@ -19,7 +19,7 @@ import { a as Wt } from "./Group-BQc9LuMT.es.js";
19
19
  import { $ as Gt } from "./Label-DIseLESi.es.js";
20
20
  import { h as qt } from "./Dialog-B0BQfdQa.es.js";
21
21
  import { $ as jt } from "./Text-DOcU1ycg.es.js";
22
- import { n as xe, u as Ht } from "./normalize-messages-D5T4I93D.es.js";
22
+ import { n as he, u as Ht } from "./normalize-messages-D5T4I93D.es.js";
23
23
  import { $ as Ut } from "./useListData-CX8_NxJv.es.js";
24
24
  import { a as Je } from "./mergeProps-Dsl8k3Ig.es.js";
25
25
  import { a as Jt } from "./useListState-Dd0Mtev3.es.js";
@@ -110,12 +110,12 @@ function Qt(e, t) {
110
110
  case "loadingMore":
111
111
  switch (t.type) {
112
112
  case "success":
113
- var p;
113
+ var m;
114
114
  r = e.selectedKeys === "all" || t.selectedKeys === "all" ? "all" : /* @__PURE__ */ new Set([
115
115
  ...e.selectedKeys,
116
- ...(p = t.selectedKeys) !== null && p !== void 0 ? p : []
116
+ ...(m = t.selectedKeys) !== null && m !== void 0 ? m : []
117
117
  ]);
118
- var K, T;
118
+ var K, L;
119
119
  return {
120
120
  ...e,
121
121
  state: "idle",
@@ -124,7 +124,7 @@ function Qt(e, t) {
124
124
  ...(K = t.items) !== null && K !== void 0 ? K : []
125
125
  ],
126
126
  selectedKeys: r,
127
- sortDescriptor: (T = t.sortDescriptor) !== null && T !== void 0 ? T : e.sortDescriptor,
127
+ sortDescriptor: (L = t.sortDescriptor) !== null && L !== void 0 ? L : e.sortDescriptor,
128
128
  abortController: void 0,
129
129
  cursor: t.cursor
130
130
  };
@@ -175,20 +175,20 @@ function Xt(e) {
175
175
  filterText: c
176
176
  });
177
177
  const b = async (d, w) => {
178
- let p = new AbortController();
178
+ let m = new AbortController();
179
179
  try {
180
180
  u({
181
181
  ...d,
182
- abortController: p
182
+ abortController: m
183
183
  });
184
184
  var K;
185
185
  let y = (K = d.filterText) !== null && K !== void 0 ? K : l.filterText;
186
- var T;
186
+ var L;
187
187
  let F = await w({
188
188
  items: l.items.slice(),
189
189
  selectedKeys: l.selectedKeys,
190
- sortDescriptor: (T = d.sortDescriptor) !== null && T !== void 0 ? T : l.sortDescriptor,
191
- signal: p.signal,
190
+ sortDescriptor: (L = d.sortDescriptor) !== null && L !== void 0 ? L : l.sortDescriptor,
191
+ signal: m.signal,
192
192
  cursor: d.type === "loadingMore" ? l.cursor : void 0,
193
193
  filterText: y,
194
194
  loadingState: l.state
@@ -198,8 +198,8 @@ function Xt(e) {
198
198
  u({
199
199
  type: "success",
200
200
  ...F,
201
- abortController: p
202
- }), $ && $ !== y && !p.signal.aborted && b({
201
+ abortController: m
202
+ }), $ && $ !== y && !m.signal.aborted && b({
203
203
  type: "filtering",
204
204
  filterText: $
205
205
  }, t);
@@ -207,12 +207,12 @@ function Xt(e) {
207
207
  u({
208
208
  type: "error",
209
209
  error: y,
210
- abortController: p
210
+ abortController: m
211
211
  });
212
212
  }
213
213
  };
214
214
  let h = A(!1);
215
- return Y(() => {
215
+ return Z(() => {
216
216
  h.current || (b({
217
217
  type: "loading"
218
218
  }, t), h.current = !0);
@@ -263,63 +263,63 @@ function Xt(e) {
263
263
  }
264
264
  const Yt = /* @__PURE__ */ Qe(null);
265
265
  function Zt(e, t, r, s) {
266
- var o = this, n = A(null), c = A(0), l = A(0), u = A(null), b = A([]), h = A(), d = A(), w = A(e), p = A(!0), K = A(), T = A();
266
+ var o = this, n = A(null), c = A(0), l = A(0), u = A(null), b = A([]), h = A(), d = A(), w = A(e), m = A(!0), K = A(), L = A();
267
267
  w.current = e;
268
268
  var I = typeof window < "u", y = !t && t !== 0 && I;
269
269
  if (typeof e != "function") throw new TypeError("Expected a function");
270
270
  t = +t || 0;
271
- var F = !!(r = r || {}).leading, $ = !("trailing" in r) || !!r.trailing, H = !!r.flushOnExit && $, U = "maxWait" in r, q = "debounceOnServer" in r && !!r.debounceOnServer, J = U ? Math.max(+r.maxWait || 0, t) : null, ne = _(function() {
271
+ var F = !!(r = r || {}).leading, $ = !("trailing" in r) || !!r.trailing, U = !!r.flushOnExit && $, J = "maxWait" in r, j = "debounceOnServer" in r && !!r.debounceOnServer, Q = J ? Math.max(+r.maxWait || 0, t) : null, se = ee(function() {
272
272
  var P = function(x) {
273
273
  var O = b.current, D = h.current;
274
274
  return b.current = h.current = null, c.current = x, l.current = l.current || x, d.current = w.current.apply(D, O);
275
- }, Q = function(x, O) {
275
+ }, X = function(x, O) {
276
276
  y && cancelAnimationFrame(u.current), u.current = y ? requestAnimationFrame(x) : setTimeout(x, O);
277
- }, se = function(x) {
278
- if (!p.current) return !1;
279
- var O = x - n.current;
280
- return !n.current || O >= t || O < 0 || U && x - c.current >= J;
281
277
  }, le = function(x) {
278
+ if (!m.current) return !1;
279
+ var O = x - n.current;
280
+ return !n.current || O >= t || O < 0 || J && x - c.current >= Q;
281
+ }, ie = function(x) {
282
282
  return u.current = null, $ && b.current ? P(x) : (b.current = h.current = null, d.current);
283
- }, B = function x() {
283
+ }, M = function x() {
284
284
  var O = Date.now();
285
- if (F && l.current === c.current && me(), se(O)) return le(O);
286
- if (p.current) {
287
- var D = t - (O - n.current), j = U ? Math.min(D, J - (O - c.current)) : D;
288
- Q(x, j);
285
+ if (F && l.current === c.current && pe(), le(O)) return ie(O);
286
+ if (m.current) {
287
+ var D = t - (O - n.current), H = J ? Math.min(D, Q - (O - c.current)) : D;
288
+ X(x, H);
289
289
  }
290
- }, me = function() {
291
- }, ee = function() {
292
- if (I || q) {
293
- var x, O = Date.now(), D = se(O);
294
- if (b.current = [].slice.call(arguments), h.current = o, n.current = O, H && !K.current && (K.current = function() {
295
- var j;
296
- ((j = global.document) == null ? void 0 : j.visibilityState) === "hidden" && T.current.flush();
290
+ }, pe = function() {
291
+ }, te = function() {
292
+ if (I || j) {
293
+ var x, O = Date.now(), D = le(O);
294
+ if (b.current = [].slice.call(arguments), h.current = o, n.current = O, U && !K.current && (K.current = function() {
295
+ var H;
296
+ ((H = global.document) == null ? void 0 : H.visibilityState) === "hidden" && L.current.flush();
297
297
  }, (x = global.document) == null || x.addEventListener == null || x.addEventListener("visibilitychange", K.current)), D) {
298
- if (!u.current && p.current) return c.current = n.current, Q(B, t), F ? P(n.current) : d.current;
299
- if (U) return Q(B, t), P(n.current);
298
+ if (!u.current && m.current) return c.current = n.current, X(M, t), F ? P(n.current) : d.current;
299
+ if (J) return X(M, t), P(n.current);
300
300
  }
301
- return u.current || Q(B, t), d.current;
301
+ return u.current || X(M, t), d.current;
302
302
  }
303
303
  };
304
- return ee.cancel = function() {
304
+ return te.cancel = function() {
305
305
  var x = u.current;
306
306
  x && (y ? cancelAnimationFrame(u.current) : clearTimeout(u.current)), c.current = 0, b.current = n.current = h.current = u.current = null;
307
- }, ee.isPending = function() {
307
+ }, te.isPending = function() {
308
308
  return !!u.current;
309
- }, ee.flush = function() {
310
- return u.current ? le(Date.now()) : d.current;
311
- }, ee;
312
- }, [F, U, t, J, $, H, y, I, q, s]);
313
- return T.current = ne, Y(function() {
314
- return p.current = !0, function() {
309
+ }, te.flush = function() {
310
+ return u.current ? ie(Date.now()) : d.current;
311
+ }, te;
312
+ }, [F, J, t, Q, $, U, y, I, j, s]);
313
+ return L.current = se, Z(function() {
314
+ return m.current = !0, function() {
315
315
  var P;
316
- H && T.current.flush(), K.current && ((P = global.document) == null || P.removeEventListener == null || P.removeEventListener("visibilitychange", K.current), K.current = null), p.current = !1;
316
+ U && L.current.flush(), K.current && ((P = global.document) == null || P.removeEventListener == null || P.removeEventListener("visibilitychange", K.current), K.current = null), m.current = !1;
317
317
  };
318
- }, [H]), ne;
318
+ }, [U]), se;
319
319
  }
320
- const { withProvider: _t, withContext: G } = /* @__PURE__ */ Vt({
320
+ const { withProvider: _t, withContext: q } = /* @__PURE__ */ Vt({
321
321
  key: "combobox"
322
- }), er = /* @__PURE__ */ _t("div", "root"), tr = /* @__PURE__ */ G("div", "trigger"), rr = /* @__PURE__ */ G("div", "leadingElement"), or = /* @__PURE__ */ G("div", "content"), nr = /* @__PURE__ */ G("div", "tagGroup"), sr = /* @__PURE__ */ G("div", "input"), lr = /* @__PURE__ */ G("div", "popover"), ir = /* @__PURE__ */ G("div", "listBox"), cr = /* @__PURE__ */ G("div", "section"), ar = /* @__PURE__ */ G("div", "option"), ur = /* @__PURE__ */ G("div", "optionIndicator"), dr = /* @__PURE__ */ G("div", "optionContent"), fr = {
322
+ }), er = /* @__PURE__ */ _t("div", "root"), tr = /* @__PURE__ */ q("div", "trigger"), rr = /* @__PURE__ */ q("div", "leadingElement"), or = /* @__PURE__ */ q("div", "content"), nr = /* @__PURE__ */ q("div", "tagGroup"), sr = /* @__PURE__ */ q("div", "input"), lr = /* @__PURE__ */ q("div", "popover"), ir = /* @__PURE__ */ q("div", "listBox"), cr = /* @__PURE__ */ q("div", "section"), ar = /* @__PURE__ */ q("div", "option"), ur = /* @__PURE__ */ q("div", "optionIndicator"), dr = /* @__PURE__ */ q("div", "optionContent"), fr = {
323
323
  clearSelection: "Clear selection",
324
324
  toggleOptions: "Toggle options",
325
325
  selectedValues: "Selected values",
@@ -345,11 +345,11 @@ const { withProvider: _t, withContext: G } = /* @__PURE__ */ Vt({
345
345
  selectedValues: "Valores selecionados",
346
346
  options: "Menu de opções"
347
347
  }, br = {
348
- en: /* @__PURE__ */ xe(fr),
349
- de: /* @__PURE__ */ xe(mr),
350
- es: /* @__PURE__ */ xe(pr),
351
- "fr-FR": /* @__PURE__ */ xe(gr),
352
- "pt-BR": /* @__PURE__ */ xe(yr)
348
+ en: /* @__PURE__ */ he(fr),
349
+ de: /* @__PURE__ */ he(mr),
350
+ es: /* @__PURE__ */ he(pr),
351
+ "fr-FR": /* @__PURE__ */ he(gr),
352
+ "pt-BR": /* @__PURE__ */ he(yr)
353
353
  };
354
354
  function Ze(e) {
355
355
  if (typeof e == "string" || typeof e == "number")
@@ -371,7 +371,7 @@ function xr(e) {
371
371
  name: e
372
372
  };
373
373
  }
374
- const vr = (e) => e ? e instanceof Set ? e : new Set(Array.isArray(e) ? e : [e]) : /* @__PURE__ */ new Set(), Cr = (e) => Array.from(e), Re = /* @__PURE__ */ Qe(null), Ae = () => {
374
+ const vr = (e) => e ? e instanceof Set ? e : new Set(Array.isArray(e) ? e : [e]) : /* @__PURE__ */ new Set(), Cr = (e) => Array.from(e), Re = /* @__PURE__ */ Qe(null), Me = () => {
375
375
  const e = Pe(Re);
376
376
  if (!e)
377
377
  throw new Error(
@@ -390,7 +390,7 @@ const vr = (e) => e ? e instanceof Set ? e : new Set(Array.isArray(e) ? e : [e])
390
390
  inputValue: u
391
391
  } = e;
392
392
  if (!t) return null;
393
- const b = _(() => {
393
+ const b = ee(() => {
394
394
  if (o === "single") {
395
395
  const h = Array.from(s)[0];
396
396
  return h ? n === "text" || c ? Array.from(l).find(
@@ -399,7 +399,7 @@ const vr = (e) => e ? e instanceof Set ? e : new Set(Array.isArray(e) ? e : [e])
399
399
  } else {
400
400
  const h = Array.from(s);
401
401
  return n === "text" || c ? h.map((d) => Array.from(l).find(
402
- (p) => p.key === d
402
+ (m) => m.key === d
403
403
  )?.textValue || "").filter(Boolean).join(",") : h.join(",");
404
404
  }
405
405
  }, [
@@ -436,57 +436,57 @@ function et(e) {
436
436
  isLoading: h,
437
437
  allowsEmptyMenu: d,
438
438
  renderEmptyState: w,
439
- async: p,
439
+ async: m,
440
440
  filter: K,
441
- allowsCustomOptions: T = !1,
441
+ allowsCustomOptions: L = !1,
442
442
  isDisabled: I = !1,
443
443
  isInvalid: y = !1,
444
444
  isRequired: F = !1,
445
445
  isReadOnly: $ = !1
446
- } = e, H = zt({ key: "combobox" }), [U, q] = H.splitVariantProps(e), [J, ne] = fe(q), P = A(null), Q = A(null), [se, le] = Z([]), B = Xt({
446
+ } = e, U = zt({ key: "combobox" }), [J, j] = U.splitVariantProps(e), [Q, se] = me(j), P = A(null), X = A(null), [le, ie] = _([]), M = Xt({
447
447
  getKey: o,
448
- async load({ signal: M, filterText: k }) {
449
- if (!p) return { items: [] };
450
- const v = p.minSearchLength ?? 0;
451
- if (!k || k.length < v)
448
+ async load({ signal: B, filterText: G }) {
449
+ if (!m) return { items: [] };
450
+ const oe = m.minSearchLength ?? 0;
451
+ if (!G || G.length < oe)
452
452
  return { items: [] };
453
453
  try {
454
- return { items: await p.load(k, M) };
455
- } catch (V) {
456
- if (V.name === "AbortError")
457
- throw V;
458
- const te = V;
459
- return p.onError?.(te), { items: [] };
454
+ return { items: await m.load(G, B) };
455
+ } catch (ae) {
456
+ if (ae.name === "AbortError")
457
+ throw ae;
458
+ const v = ae;
459
+ return m.onError?.(v), { items: [] };
460
460
  }
461
461
  }
462
- }), [me, ee] = Z(u), [x, O] = Z(!1), [D, j] = Z([]), Fe = p?.debounce ?? 300, Ce = Zt((M) => {
463
- O(!1), B.setFilterText(M);
464
- }, Fe), Se = R(
465
- (M) => {
466
- ee(M), O(!0), Ce(M);
462
+ }), [pe, te] = _(u), [x, O] = _(!1), [D, H] = _([]), Ae = m?.debounce ?? 300, ve = Zt((B) => {
463
+ O(!1), M.setFilterText(B);
464
+ }, Ae), Ce = R(
465
+ (B) => {
466
+ te(B), O(!0), ve(B);
467
467
  },
468
- [Ce]
469
- ), z = p ? me : u, we = p ? Se : b, X = p ? x || B.loadingState === "loading" || B.loadingState === "loadingMore" || B.loadingState === "filtering" : h, $e = p || T ? !0 : d, Ke = R(() => X ? z?.length ? `loading results for "${z}"` : "loading results" : z?.length && p?.minSearchLength && z.length >= p.minSearchLength ? `no results for "${z}"` : p?.minSearchLength ? `enter at least ${p?.minSearchLength} characters` : "type to search", [p?.minSearchLength, X, z]), Ie = R(() => X ? z?.length ? `loading results for "${z}"` : "loading results" : 'hit "enter" to create an option', [X, z]), ge = (T ? Ie : p ? Ke : void 0) ?? w, ue = _(() => {
470
- const M = p ? Array.from(B.items) : e.items, k = M ? Array.from(M) : [], v = new Set(k.map((ie) => o(ie)));
471
- let te = [...se.filter(
472
- (ie) => !v.has(o(ie))
473
- ), ...k];
474
- if (p && r === "multiple" && D.length > 0) {
475
- const ie = new Set(te.map((L) => o(L)));
476
- te = [...D.filter(
477
- (L) => !ie.has(o(L))
478
- ), ...te];
468
+ [ve]
469
+ ), N = m ? pe : u, Se = m ? Ce : b, Y = m ? x || M.loadingState === "loading" || M.loadingState === "loadingMore" || M.loadingState === "filtering" : h, we = m || L ? !0 : d, $e = R(() => Y ? N?.length ? `loading results for "${N}"` : "loading results" : N?.length && m?.minSearchLength && N.length >= m.minSearchLength ? `no results for "${N}"` : m?.minSearchLength ? `enter at least ${m?.minSearchLength} characters` : "type to search", [m?.minSearchLength, Y, N]), Ke = R(() => Y ? N?.length ? `loading results for "${N}"` : "loading results" : 'hit "enter" to create an option', [Y, N]), W = (L ? Ke : m ? $e : void 0) ?? w, re = ee(() => {
470
+ const B = m ? Array.from(M.items) : e.items, G = B ? Array.from(B) : [], oe = new Set(G.map((V) => o(V)));
471
+ let v = [...le.filter(
472
+ (V) => !oe.has(o(V))
473
+ ), ...G];
474
+ if (m && r === "multiple" && D.length > 0) {
475
+ const V = new Set(v.map((ye) => o(ye)));
476
+ v = [...D.filter(
477
+ (ye) => !V.has(o(ye))
478
+ ), ...v];
479
479
  }
480
- return te;
480
+ return v;
481
481
  }, [
482
- p,
483
- B.items,
482
+ m,
483
+ M.items,
484
484
  e.items,
485
- se,
485
+ le,
486
486
  D,
487
487
  r,
488
488
  o
489
- ]), ye = _(
489
+ ]), ce = ee(
490
490
  () => ({
491
491
  selectionMode: r,
492
492
  size: s,
@@ -494,8 +494,8 @@ function et(e) {
494
494
  getTextValue: n,
495
495
  leadingElement: l,
496
496
  triggerRef: P,
497
- inputRef: Q,
498
- isLoading: X,
497
+ inputRef: X,
498
+ isLoading: Y,
499
499
  isDisabled: I,
500
500
  isRequired: F,
501
501
  isInvalid: y,
@@ -507,28 +507,28 @@ function et(e) {
507
507
  n,
508
508
  l,
509
509
  P,
510
- Q,
510
+ X,
511
511
  I,
512
512
  F,
513
513
  y,
514
514
  $
515
515
  ]
516
- ), be = _(() => {
517
- if (ue)
518
- return Array.from(ue).map((M) => {
519
- const k = "id" in M, v = "textValue" in M;
520
- return k && v ? M : {
521
- ...M,
522
- ...k ? {} : { id: o(M) },
523
- ...v ? {} : { textValue: n(M) }
516
+ ), ge = ee(() => {
517
+ if (re)
518
+ return Array.from(re).map((B) => {
519
+ const G = "id" in B, oe = "textValue" in B;
520
+ return G && oe ? B : {
521
+ ...B,
522
+ ...G ? {} : { id: o(B) },
523
+ ...oe ? {} : { textValue: n(B) }
524
524
  };
525
525
  });
526
- }, [ue, o, n]), Oe = _(
526
+ }, [re, o, n]), Oe = ee(
527
527
  () => /* @__PURE__ */ g(
528
528
  Re.Provider,
529
529
  {
530
- value: ye,
531
- children: /* @__PURE__ */ g(Xe.Provider, { value: { items: be }, children: typeof c == "function" ? c({
530
+ value: ce,
531
+ children: /* @__PURE__ */ g(Xe.Provider, { value: { items: ge }, children: typeof c == "function" ? c({
532
532
  isOpen: !1,
533
533
  isDisabled: I,
534
534
  isInvalid: y,
@@ -542,8 +542,8 @@ function et(e) {
542
542
  I,
543
543
  y,
544
544
  F,
545
- be,
546
- ye
545
+ ge,
546
+ ce
547
547
  ]
548
548
  );
549
549
  return /* @__PURE__ */ g(
@@ -551,19 +551,19 @@ function et(e) {
551
551
  {
552
552
  values: [
553
553
  [Ee, {}],
554
- [Me, {}],
554
+ [Be, {}],
555
555
  [De, {}]
556
556
  ],
557
557
  children: /* @__PURE__ */ g(
558
558
  Re.Provider,
559
559
  {
560
- value: ye,
560
+ value: ce,
561
561
  children: /* @__PURE__ */ g(
562
562
  er,
563
563
  {
564
564
  ref: t,
565
- ...U,
566
565
  ...J,
566
+ ...Q,
567
567
  size: s,
568
568
  "data-disabled": I,
569
569
  "data-invalid": y,
@@ -571,31 +571,31 @@ function et(e) {
571
571
  "data-readonly": $,
572
572
  "data-open": e.isOpen,
573
573
  role: "group",
574
- children: /* @__PURE__ */ g(Ft, { content: Oe, children: (M) => (
574
+ children: /* @__PURE__ */ g(Ft, { content: Oe, children: (B) => (
575
575
  // Pass the built collection to ComboBoxRootInner which handles all behavior
576
576
  /* @__PURE__ */ g(
577
577
  Sr,
578
578
  {
579
- ...ne,
579
+ ...se,
580
580
  size: s,
581
581
  filter: K,
582
582
  selectionMode: r,
583
- inputValue: z,
584
- onInputChange: we,
583
+ inputValue: N,
584
+ onInputChange: Se,
585
585
  getKey: o,
586
586
  getTextValue: n,
587
- allowsEmptyMenu: $e,
588
- renderEmptyState: ge,
587
+ allowsEmptyMenu: we,
588
+ renderEmptyState: W,
589
589
  isDisabled: I,
590
590
  isRequired: F,
591
591
  isInvalid: y,
592
592
  isReadOnly: $,
593
- collection: M,
594
- allowsCustomOptions: T,
595
- asyncConfig: p,
596
- onAsyncSelectedItemsChange: p && r === "multiple" ? j : void 0,
597
- onAddCustomItem: le,
598
- onAddAsyncSelectedItem: j
593
+ collection: B,
594
+ allowsCustomOptions: L,
595
+ asyncConfig: m,
596
+ onAsyncSelectedItemsChange: m && r === "multiple" ? H : void 0,
597
+ onAddCustomItem: ie,
598
+ onAddAsyncSelectedItem: H
599
599
  }
600
600
  )
601
601
  ) })
@@ -620,107 +620,107 @@ const Sr = (e) => {
620
620
  inputValue: h = "",
621
621
  onInputChange: d,
622
622
  filter: w,
623
- placeholder: p,
623
+ placeholder: m,
624
624
  menuTrigger: K = "input",
625
- shouldCloseOnBlur: T = !0,
625
+ shouldCloseOnBlur: L = !0,
626
626
  shouldCloseOnSelect: I = !0,
627
627
  isOpen: y,
628
628
  defaultOpen: F = !1,
629
629
  onOpenChange: $,
630
- allowsEmptyMenu: H = !1,
631
- renderEmptyState: U,
632
- allowsCustomOptions: q = !1,
633
- isValidNewOption: J,
634
- getNewOptionData: ne = xr,
630
+ allowsEmptyMenu: U = !1,
631
+ renderEmptyState: J,
632
+ allowsCustomOptions: j = !1,
633
+ isValidNewOption: Q,
634
+ getNewOptionData: se = xr,
635
635
  onCreateOption: P,
636
- "aria-label": Q,
637
- "aria-labelledby": se,
638
- "aria-describedby": le,
639
- isDisabled: B = !1,
640
- isRequired: me = !1,
641
- isInvalid: ee = !1,
636
+ "aria-label": X,
637
+ "aria-labelledby": le,
638
+ "aria-describedby": ie,
639
+ isDisabled: M = !1,
640
+ isRequired: pe = !1,
641
+ isInvalid: te = !1,
642
642
  isReadOnly: x = !1,
643
643
  shouldFocusWrap: O = !0,
644
644
  autoFocus: D = !1,
645
- name: j,
646
- formValue: Fe,
647
- validationBehavior: Ce = "aria",
648
- form: Se,
649
- validate: z,
650
- isLoading: we,
651
- asyncConfig: X,
652
- onAsyncSelectedItemsChange: $e,
653
- onAddCustomItem: Ke,
654
- onAddAsyncSelectedItem: Ie
655
- } = e, pe = Je(), ge = Je(), ue = A(null), ye = A(null), be = _(
645
+ name: H,
646
+ formValue: Ae,
647
+ validationBehavior: ve = "aria",
648
+ form: Ce,
649
+ validate: N,
650
+ isLoading: Se,
651
+ asyncConfig: Y,
652
+ onAsyncSelectedItemsChange: we,
653
+ onAddCustomItem: $e,
654
+ onAddAsyncSelectedItem: Ke
655
+ } = e, { triggerRef: Fe, inputRef: W } = Me(), re = Je(), ce = Je(), ge = A(null), Oe = A(null), B = ee(
656
656
  () => vr(l),
657
657
  [l]
658
- ), Oe = !!u, [M, k] = Z(
659
- be
660
- ), v = Oe ? be : M, V = d !== void 0, te = () => {
658
+ ), G = !!u, [oe, ae] = _(
659
+ B
660
+ ), v = G ? B : oe, V = d !== void 0, ze = () => {
661
661
  if (h) return h;
662
662
  if (V || r !== "single") return "";
663
663
  const i = Array.from(v);
664
664
  if (i.length === 0) return "";
665
665
  const a = i[0];
666
666
  return o.getItem(a)?.textValue ?? "";
667
- }, [ie, re] = Z(
668
- te
669
- ), L = V ? h : ie, oe = A(L), [at, ze] = Z(F), C = y ?? at, [Ve, he] = Z(
667
+ }, [ye, ue] = _(
668
+ ze
669
+ ), E = V ? h : ye, ne = A(E), [at, Ne] = _(F), C = y ?? at, [Ve, be] = _(
670
670
  null
671
- ), E = R(
671
+ ), T = R(
672
672
  (i) => {
673
- y === void 0 && ze(i), $?.(i);
673
+ y === void 0 && Ne(i), $?.(i);
674
674
  },
675
675
  [y, $]
676
- ), ut = _(() => {
677
- if (L.trim() === "")
676
+ ), ut = ee(() => {
677
+ if (E.trim() === "")
678
678
  return o;
679
679
  if (r === "single") {
680
680
  const a = Array.from(v);
681
681
  if (a.length > 0) {
682
682
  const f = a[0];
683
- if (o.getItem(f)?.textValue === L)
683
+ if (o.getItem(f)?.textValue === E)
684
684
  return o;
685
685
  }
686
686
  }
687
687
  if (w) {
688
- const a = Array.from(o), f = Array.from(w(a, L)), S = new Set(f.map((Be) => Be.key));
689
- return o.filter?.((Be, Le) => S.has(Le.key)) ?? o;
688
+ const a = Array.from(o), f = Array.from(w(a, E)), S = new Set(f.map((Ie) => Ie.key));
689
+ return o.filter?.((Ie, Le) => S.has(Le.key)) ?? o;
690
690
  }
691
- const i = L.toLowerCase();
691
+ const i = E.toLowerCase();
692
692
  return o.filter?.((a) => a.toLowerCase().includes(i)) ?? o;
693
- }, [o, L, w, r, v]), dt = _(
693
+ }, [o, E, w, r, v]), dt = ee(
694
694
  () => r === "multiple" ? Array.from(v).map((i) => o.getItem(i)?.value).filter((i) => i !== void 0) : [],
695
695
  [r, v, o]
696
- ), [ft, mt] = Z(null), pt = R(() => {
696
+ ), [ft, mt] = _(null), pt = R(() => {
697
697
  const i = y === void 0 ? !C : !y;
698
- y === void 0 ? ze((a) => !a) : $?.(!y), i && (ce.current?.focus(), he("first"));
698
+ y === void 0 ? Ne((a) => !a) : $?.(!y), i && (W.current?.focus(), be("first"));
699
699
  }, [y, C, $]), gt = R(
700
700
  (i) => {
701
- V || re(i), d?.(i), K === "input" && i !== oe.current && E(!0), oe.current = i;
701
+ V || ue(i), d?.(i), K === "input" && i !== ne.current && T(!0), ne.current = i;
702
702
  },
703
- [V, d, K, E]
704
- ), W = R(
703
+ [V, d, K, T]
704
+ ), z = R(
705
705
  (i, a) => {
706
- let f = i === "all" ? new Set(Array.from(o).map((N) => N.key)) : i;
707
- const S = a ?? v, Be = f.size > 0 && Array.from(f).every((N) => S.has(N)) && f.size < S.size;
708
- if (r === "multiple" && f.size === 1 && !Be) {
709
- const N = Array.from(f)[0], de = S.has(N), ae = new Set(S);
710
- de ? ae.delete(N) : ae.add(N), f = ae;
706
+ let f = i === "all" ? new Set(Array.from(o).map((k) => k.key)) : i;
707
+ const S = a ?? v, Ie = f.size > 0 && Array.from(f).every((k) => S.has(k)) && f.size < S.size;
708
+ if (r === "multiple" && f.size === 1 && !Ie) {
709
+ const k = Array.from(f)[0], fe = S.has(k), de = new Set(S);
710
+ fe ? de.delete(k) : de.add(k), f = de;
711
711
  }
712
712
  const Le = Cr(f);
713
- if (u ? u(Le) : k(f), X && r === "multiple" && $e) {
714
- const N = Array.from(f).map((de) => o.getItem(de)?.value).filter((de) => de !== void 0);
715
- $e(N);
713
+ if (u ? u(Le) : ae(f), Y && r === "multiple" && we) {
714
+ const k = Array.from(f).map((fe) => o.getItem(fe)?.value).filter((fe) => fe !== void 0);
715
+ we(k);
716
716
  }
717
717
  if (r === "single") {
718
- const N = Array.from(f)[0];
719
- if (N !== null) {
720
- const ae = o.getItem(N)?.textValue ?? "";
721
- V || (re(ae), oe.current = ae), d?.(ae);
718
+ const k = Array.from(f)[0];
719
+ if (k !== null) {
720
+ const de = o.getItem(k)?.textValue ?? "";
721
+ V || (ue(de), ne.current = de), d?.(de);
722
722
  }
723
- I && E(!1);
723
+ I && T(!1);
724
724
  }
725
725
  },
726
726
  [
@@ -730,126 +730,134 @@ const Sr = (e) => {
730
730
  u,
731
731
  d,
732
732
  I,
733
- E,
733
+ T,
734
734
  V
735
735
  ]
736
- ), m = Jt({
736
+ ), p = Jt({
737
737
  selectionMode: r,
738
738
  collection: ut,
739
739
  selectedKeys: v,
740
- onSelectionChange: W,
740
+ onSelectionChange: z,
741
741
  disabledKeys: b
742
742
  }), yt = R(() => {
743
- m.selectionManager.setSelectedKeys(/* @__PURE__ */ new Set()), r === "single" && (V || (re(""), oe.current = ""), d?.(""));
744
- }, [m.selectionManager, r, V, d]), Ne = R(
743
+ z(/* @__PURE__ */ new Set()), V || (ue(""), ne.current = ""), d?.(""), T(!0), requestAnimationFrame(() => {
744
+ W.current?.focus();
745
+ });
746
+ }, [
747
+ z,
748
+ V,
749
+ d,
750
+ T,
751
+ W
752
+ ]), ke = R(
745
753
  (i) => {
746
- Ke?.((S) => [...S, i]), X && r === "multiple" && Ie?.((S) => [...S, i]);
754
+ $e?.((S) => [...S, i]), Y && r === "multiple" && Ke?.((S) => [...S, i]);
747
755
  const a = n(i), f = v;
748
756
  if (r === "single")
749
- W(/* @__PURE__ */ new Set([a]), f);
757
+ z(/* @__PURE__ */ new Set([a]), f);
750
758
  else {
751
759
  const S = new Set(f);
752
- S.add(a), W(S, f);
760
+ S.add(a), z(S, f);
753
761
  }
754
762
  },
755
763
  [
756
- Ke,
757
- X,
764
+ $e,
765
+ Y,
758
766
  r,
759
- Ie,
767
+ Ke,
760
768
  n,
761
769
  v,
762
- W
770
+ z
763
771
  ]
764
- ), ke = R(() => {
765
- if (!q) return !1;
766
- const i = L.trim();
772
+ ), We = R(() => {
773
+ if (!j) return !1;
774
+ const i = E.trim();
767
775
  if (!i || Array.from(o).some(
768
776
  (S) => S.textValue?.toLowerCase() === i.toLowerCase()
769
- ) || J && !J(i))
777
+ ) || Q && !Q(i))
770
778
  return !1;
771
- const f = ne(i);
772
- return Ne(f), r === "multiple" ? (V || (re(""), oe.current = ""), d?.("")) : (V || (re(i), oe.current = i), d?.(i)), P?.(f), !0;
779
+ const f = se(i);
780
+ return ke(f), r === "multiple" ? (V || (ue(""), ne.current = ""), d?.("")) : (V || (ue(i), ne.current = i), d?.(i)), P?.(f), !0;
773
781
  }, [
774
- q,
775
- ne,
776
- J,
777
- L,
782
+ j,
783
+ se,
784
+ Q,
785
+ E,
778
786
  o,
779
787
  r,
780
788
  d,
781
789
  P,
782
- Ne,
790
+ ke,
783
791
  V,
784
- re,
785
- oe
792
+ ue,
793
+ ne
786
794
  ]), bt = R(
787
795
  (i) => {
788
- if (B || x) return;
796
+ if (M || x) return;
789
797
  const a = v, f = new Set(a);
790
- i.forEach((S) => f.delete(S)), W(f, a), f.size === 0 && ce.current?.focus();
798
+ i.forEach((S) => f.delete(S)), z(f, a), f.size === 0 && W.current?.focus();
791
799
  },
792
- [v, W, B, x]
800
+ [v, z, M, x]
793
801
  ), ht = R(
794
802
  (i) => {
795
803
  switch (i.key) {
796
804
  case "ArrowDown":
797
805
  if (i.preventDefault(), !C)
798
- E(!0), he("first");
806
+ T(!0), be("first");
799
807
  else {
800
- const a = m.selectionManager.focusedKey, f = a ? m.collection.getKeyAfter(a) : m.collection.getFirstKey();
801
- m.selectionManager.setFocusedKey(
802
- f ?? m.collection.getFirstKey()
808
+ const a = p.selectionManager.focusedKey, f = a ? p.collection.getKeyAfter(a) : p.collection.getFirstKey();
809
+ p.selectionManager.setFocusedKey(
810
+ f ?? p.collection.getFirstKey()
803
811
  );
804
812
  }
805
813
  break;
806
814
  case "ArrowUp":
807
815
  if (i.preventDefault(), !C)
808
- E(!0), he("last");
816
+ T(!0), be("last");
809
817
  else {
810
- const a = m.selectionManager.focusedKey, f = a ? m.collection.getKeyBefore(a) : m.collection.getLastKey();
811
- m.selectionManager.setFocusedKey(
812
- f ?? m.collection.getLastKey()
818
+ const a = p.selectionManager.focusedKey, f = a ? p.collection.getKeyBefore(a) : p.collection.getLastKey();
819
+ p.selectionManager.setFocusedKey(
820
+ f ?? p.collection.getLastKey()
813
821
  );
814
822
  }
815
823
  break;
816
824
  case "Enter":
817
- if (C && m.selectionManager.focusedKey) {
825
+ if (C && p.selectionManager.focusedKey) {
818
826
  i.preventDefault();
819
- const a = m.selectionManager.focusedKey;
827
+ const a = p.selectionManager.focusedKey;
820
828
  if (r === "multiple") {
821
829
  const f = new Set(v);
822
- f.has(a) ? f.delete(a) : f.add(a), W(f);
830
+ f.has(a) ? f.delete(a) : f.add(a), z(f);
823
831
  } else
824
- W(/* @__PURE__ */ new Set([a])), m.selectionManager.setFocusedKey(null);
825
- } else C && !m.selectionManager.focusedKey && q && ke() && i.preventDefault();
832
+ z(/* @__PURE__ */ new Set([a])), p.selectionManager.setFocusedKey(null);
833
+ } else C && !p.selectionManager.focusedKey && j && We() && i.preventDefault();
826
834
  break;
827
835
  case "Escape":
828
- C && (i.preventDefault(), E(!1), m.selectionManager.setFocusedKey(null));
836
+ C && (i.preventDefault(), T(!1), p.selectionManager.setFocusedKey(null));
829
837
  break;
830
838
  case "Home":
831
839
  if (C) {
832
840
  i.preventDefault();
833
- const a = m.collection.getFirstKey();
834
- m.selectionManager.setFocusedKey(a);
841
+ const a = p.collection.getFirstKey();
842
+ p.selectionManager.setFocusedKey(a);
835
843
  }
836
844
  break;
837
845
  case "End":
838
846
  if (C) {
839
847
  i.preventDefault();
840
- const a = m.collection.getLastKey();
841
- m.selectionManager.setFocusedKey(a);
848
+ const a = p.collection.getLastKey();
849
+ p.selectionManager.setFocusedKey(a);
842
850
  }
843
851
  break;
844
852
  case "Backspace":
845
- if (L === "") {
853
+ if (E === "") {
846
854
  const a = Array.from(v);
847
855
  if (a.length > 0)
848
856
  if (i.preventDefault(), r === "single")
849
- W(/* @__PURE__ */ new Set());
857
+ z(/* @__PURE__ */ new Set());
850
858
  else {
851
859
  const f = new Set(a);
852
- f.delete(a[a.length - 1]), W(f);
860
+ f.delete(a[a.length - 1]), z(f);
853
861
  }
854
862
  }
855
863
  break;
@@ -857,82 +865,80 @@ const Sr = (e) => {
857
865
  },
858
866
  [
859
867
  C,
860
- m.selectionManager,
861
- m.collection,
862
- W,
863
- E,
864
- he,
868
+ p.selectionManager,
869
+ p.collection,
870
+ z,
871
+ T,
872
+ be,
865
873
  r,
866
- L,
874
+ E,
867
875
  v,
868
- q,
869
- ke
876
+ j,
877
+ We
870
878
  ]
871
879
  ), xt = R(() => {
872
- K === "focus" && !B && !x && E(!0), r === "single" && L && ce.current && ce.current.select();
880
+ K === "focus" && !M && !x && T(!0), r === "single" && E && W.current && W.current.select();
873
881
  }, [
874
882
  K,
875
- B,
883
+ M,
876
884
  x,
877
- E,
885
+ T,
878
886
  r,
879
- L
887
+ E
880
888
  ]), vt = R(
881
889
  (i) => {
882
- if (!T) return;
890
+ if (!L) return;
883
891
  const a = i.currentTarget;
884
892
  setTimeout(() => {
885
893
  const f = document.activeElement;
886
- a.contains(f) || E(!1);
894
+ a.contains(f) || T(!1);
887
895
  }, 150);
888
896
  },
889
- [T, E]
890
- ), We = A(null);
891
- Y(() => {
892
- D && ce.current && !B && ce.current.focus();
893
- }, [D, B]);
894
- const Ge = A(C);
895
- Y(() => {
896
- y === void 0 && Ge.current !== C && (Ge.current = C, $?.(C));
897
- }, [C, y, $]), Y(() => {
897
+ [L, T]
898
+ ), Ge = A(null);
899
+ Z(() => {
900
+ D && W.current && !M && W.current.focus();
901
+ }, [D, M]);
902
+ const qe = A(C);
903
+ Z(() => {
904
+ y === void 0 && qe.current !== C && (qe.current = C, $?.(C));
905
+ }, [C, y, $]), Z(() => {
898
906
  if (r !== "single") return;
899
- const i = Array.from(m.selectionManager.selectedKeys), a = i.length > 0 ? i[0] : null;
900
- if (a === We.current) return;
901
- We.current = a;
902
- const f = a !== null ? m.collection.getItem(a) : null;
907
+ const i = Array.from(p.selectionManager.selectedKeys), a = i.length > 0 ? i[0] : null;
908
+ if (a === Ge.current) return;
909
+ Ge.current = a;
910
+ const f = a !== null ? p.collection.getItem(a) : null;
903
911
  if (a !== null && !f)
904
912
  return;
905
913
  const S = f?.textValue ?? "";
906
- V ? d?.(S) : (re(S), oe.current = S);
914
+ V ? d?.(S) : (ue(S), ne.current = S);
907
915
  }, [
908
916
  r,
909
- m.selectionManager.selectedKeys,
910
- m.collection,
917
+ p.selectionManager.selectedKeys,
918
+ p.collection,
911
919
  V,
912
920
  d
913
- ]), Y(() => {
921
+ ]), Z(() => {
914
922
  if (C && Ve) {
915
- const i = Ve === "first" ? m.collection.getFirstKey() : m.collection.getLastKey();
916
- m.selectionManager.setFocusedKey(i ?? null), he(null);
923
+ const i = Ve === "first" ? p.collection.getFirstKey() : p.collection.getLastKey();
924
+ p.selectionManager.setFocusedKey(i ?? null), be(null);
917
925
  }
918
- }, [C, Ve, m.collection, m.selectionManager]), Y(() => {
919
- C ? m.selectionManager.setFocused(!0) : (m.selectionManager.setFocused(!1), m.selectionManager.setFocusedKey(null));
920
- }, [C, m.selectionManager]);
921
- const qe = A(!1);
922
- m.collection.size > 0 && (qe.current = !0), Y(() => {
923
- if (!C || H || we || !qe.current) return;
924
- m.collection.size > 0 || E(!1);
926
+ }, [C, Ve, p.collection, p.selectionManager]), Z(() => {
927
+ C ? p.selectionManager.setFocused(!0) : (p.selectionManager.setFocused(!1), p.selectionManager.setFocusedKey(null));
928
+ }, [C, p.selectionManager]);
929
+ const je = A(!1);
930
+ p.collection.size > 0 && (je.current = !0), Z(() => {
931
+ if (!C || U || Se || !je.current) return;
932
+ p.collection.size > 0 || T(!1);
925
933
  }, [
926
934
  C,
927
- H,
928
- we,
929
- m.collection.size,
930
- E,
931
- L
932
- ]);
933
- const { triggerRef: je, inputRef: ce } = Ae();
934
- Y(() => {
935
- const i = je.current;
935
+ U,
936
+ Se,
937
+ p.collection.size,
938
+ T,
939
+ E
940
+ ]), Z(() => {
941
+ const i = Fe.current;
936
942
  if (!i) return;
937
943
  const a = () => {
938
944
  const S = i.offsetWidth;
@@ -948,35 +954,35 @@ const Sr = (e) => {
948
954
  // InputContext: Props for ComboBox.Input component
949
955
  // Configures the input field with ARIA attributes, event handlers, and validation
950
956
  [
951
- Me,
957
+ Be,
952
958
  {
953
- ref: ce,
959
+ ref: W,
954
960
  role: "combobox",
955
961
  // ARIA role for autocomplete input
956
962
  "aria-autocomplete": "list",
957
963
  // Indicates suggestions are in a list
958
- "aria-controls": r === "multiple" ? `${ge} ${pe}` : pe,
964
+ "aria-controls": r === "multiple" ? `${ce} ${re}` : re,
959
965
  // Single-select: controls only listbox
960
966
  "aria-expanded": C,
961
967
  // Announces menu open/closed state
962
- "aria-activedescendant": m.selectionManager.focusedKey ? `${pe}-option-${m.selectionManager.focusedKey}` : void 0,
963
- "aria-describedby": r === "multiple" ? `${ge} ${le ?? ""}` : le,
964
- "aria-label": Q,
965
- "aria-labelledby": se,
966
- value: L,
968
+ "aria-activedescendant": p.selectionManager.focusedKey ? `${re}-option-${p.selectionManager.focusedKey}` : void 0,
969
+ "aria-describedby": r === "multiple" ? `${ce} ${ie ?? ""}` : ie,
970
+ "aria-label": X,
971
+ "aria-labelledby": le,
972
+ value: E,
967
973
  onChange: (i) => gt(i.target.value),
968
974
  onKeyDown: ht,
969
975
  onFocus: xt,
970
976
  onBlur: vt,
971
- disabled: B,
977
+ disabled: M,
972
978
  readOnly: x,
973
- required: me,
974
- "aria-invalid": ee,
975
- placeholder: p,
976
- name: j,
977
- form: Se,
978
- validationbehavior: Ce,
979
- validate: z
979
+ required: pe,
980
+ "aria-invalid": te,
981
+ placeholder: m,
982
+ name: H,
983
+ form: Ce,
984
+ validationbehavior: ve,
985
+ validate: N
980
986
  }
981
987
  ],
982
988
  // TagGroupContext: Props for ComboBox.TagGroup component (multi-select only)
@@ -984,7 +990,7 @@ const Sr = (e) => {
984
990
  [
985
991
  De,
986
992
  {
987
- id: ge,
993
+ id: ce,
988
994
  "aria-label": t.format("selectedValues"),
989
995
  items: dt,
990
996
  // Selected items to display as tags
@@ -1001,7 +1007,7 @@ const Sr = (e) => {
1001
1007
  toggle: {
1002
1008
  onPress: pt,
1003
1009
  "aria-label": t.format("toggleOptions"),
1004
- isDisabled: B || x,
1010
+ isDisabled: M || x,
1005
1011
  isPressed: C
1006
1012
  // Visual indicator that menu is open
1007
1013
  },
@@ -1009,7 +1015,7 @@ const Sr = (e) => {
1009
1015
  onPress: yt,
1010
1016
  "aria-label": t.format("clearSelection"),
1011
1017
  style: v.size > 0 ? void 0 : { display: "none" },
1012
- isDisabled: B || x || m.selectionManager.selectedKeys.size === 0
1018
+ isDisabled: M || x || p.selectionManager.selectedKeys.size === 0
1013
1019
  // Disabled when nothing selected
1014
1020
  }
1015
1021
  }
@@ -1024,10 +1030,10 @@ const Sr = (e) => {
1024
1030
  // No-op onOpenChange: We control state internally, prevent React Aria from managing its own state
1025
1031
  onOpenChange: () => {
1026
1032
  },
1027
- ref: ye,
1028
- triggerRef: je,
1033
+ ref: Oe,
1034
+ triggerRef: Fe,
1029
1035
  // Popover positions relative to this element
1030
- scrollRef: ue,
1036
+ scrollRef: ge,
1031
1037
  // Enables scroll-into-view for keyboard navigation
1032
1038
  isNonModal: !0,
1033
1039
  // Non-modal: doesn't trap focus, allows interaction outside
@@ -1043,7 +1049,7 @@ const Sr = (e) => {
1043
1049
  // Clear these contexts so popover content doesn't inherit combobox contexts
1044
1050
  Gt,
1045
1051
  Ee,
1046
- Me,
1052
+ Be,
1047
1053
  Wt,
1048
1054
  jt
1049
1055
  ]
@@ -1059,11 +1065,11 @@ const Sr = (e) => {
1059
1065
  {
1060
1066
  items: s,
1061
1067
  // Items to render (merged from outer component)
1062
- id: pe,
1068
+ id: re,
1063
1069
  // ID referenced by aria-controls on input
1064
- ref: ue,
1070
+ ref: ge,
1065
1071
  // Ref for scroll positioning
1066
- renderEmptyState: U,
1072
+ renderEmptyState: J,
1067
1073
  // Custom empty state renderer
1068
1074
  shouldFocusWrap: O,
1069
1075
  // Whether to wrap focus from last to first item
@@ -1071,9 +1077,9 @@ const Sr = (e) => {
1071
1077
  }
1072
1078
  ],
1073
1079
  // ListStateContext: React Aria's collection state for managing selection and focus
1074
- [It, m]
1080
+ [It, p]
1075
1081
  ];
1076
- return /* @__PURE__ */ ve(
1082
+ return /* @__PURE__ */ xe(
1077
1083
  Ye,
1078
1084
  {
1079
1085
  values: Ct,
@@ -1081,14 +1087,14 @@ const Sr = (e) => {
1081
1087
  /* @__PURE__ */ g(
1082
1088
  _e,
1083
1089
  {
1084
- name: j,
1085
- form: Se,
1090
+ name: H,
1091
+ form: Ce,
1086
1092
  selectedKeys: v,
1087
1093
  selectionMode: r,
1088
- formValue: Fe,
1089
- allowsCustomOptions: q,
1090
- collection: m.collection,
1091
- inputValue: L
1094
+ formValue: Ae,
1095
+ allowsCustomOptions: j,
1096
+ collection: p.collection,
1097
+ inputValue: E
1092
1098
  }
1093
1099
  ),
1094
1100
  c
@@ -1096,7 +1102,7 @@ const Sr = (e) => {
1096
1102
  }
1097
1103
  );
1098
1104
  }, tt = (e) => {
1099
- const [t, r] = fe(e), s = Pe(Me), { inputRef: o } = Ae();
1105
+ const [t, r] = me(e), s = Pe(Be), { inputRef: o } = Me();
1100
1106
  let n = "", c = "";
1101
1107
  s && typeof s == "object" && "value" in s && (n = s.value || "", c = s.placeholder || "");
1102
1108
  const l = Math.max(n.length || c.length || 1, 1);
@@ -1114,17 +1120,17 @@ tt.displayName = "ComboBox.Input";
1114
1120
  const wr = ({
1115
1121
  children: e
1116
1122
  }) => /* @__PURE__ */ g(rr, { children: e }), rt = (e) => {
1117
- const { selectionMode: t, size: r, getKey: s, getTextValue: o, isDisabled: n, isReadOnly: c } = Ae(), [l, u] = fe(e), b = Pe(De), h = (b && "items" in b ? b.items : void 0) ?? [];
1123
+ const { selectionMode: t, size: r, getKey: s, getTextValue: o, isDisabled: n, isReadOnly: c } = Me(), [l, u] = me(e), b = Pe(De), h = (b && "items" in b ? b.items : void 0) ?? [];
1118
1124
  return t !== "multiple" ? null : /* @__PURE__ */ g(nr, { ...l, ...u, asChild: !0, children: /* @__PURE__ */ g(Te.Root, { size: r, children: /* @__PURE__ */ g(Te.TagList, { items: h, display: "contents", children: (d) => {
1119
- const w = s(d), p = o(d);
1125
+ const w = s(d), m = o(d);
1120
1126
  return /* @__PURE__ */ g(
1121
1127
  Te.Tag,
1122
1128
  {
1123
1129
  id: w,
1124
- textValue: p,
1130
+ textValue: m,
1125
1131
  isDisabled: n || c,
1126
1132
  maxW: "100%",
1127
- children: p
1133
+ children: m
1128
1134
  }
1129
1135
  );
1130
1136
  } }) }) });
@@ -1134,12 +1140,12 @@ const ot = ({
1134
1140
  children: e,
1135
1141
  ...t
1136
1142
  }) => {
1137
- const { triggerRef: r, leadingElement: s, inputRef: o, isLoading: n, isDisabled: c } = Ae();
1138
- return /* @__PURE__ */ ve(tr, { ref: r, onClick: (u) => {
1143
+ const { triggerRef: r, leadingElement: s, inputRef: o, isLoading: n, isDisabled: c } = Me();
1144
+ return /* @__PURE__ */ xe(tr, { ref: r, onClick: (u) => {
1139
1145
  !c && u.target instanceof HTMLElement && !u.target.closest("button") && o.current?.focus();
1140
1146
  }, ...t, children: [
1141
1147
  s && /* @__PURE__ */ g(wr, { children: s }),
1142
- /* @__PURE__ */ ve(or, { children: [
1148
+ /* @__PURE__ */ xe(or, { children: [
1143
1149
  /* @__PURE__ */ g(rt, {}),
1144
1150
  /* @__PURE__ */ g(tt, {})
1145
1151
  ] }),
@@ -1173,7 +1179,7 @@ const nt = ({
1173
1179
  ref: t,
1174
1180
  ...r
1175
1181
  }) => {
1176
- const [s, o] = fe(r);
1182
+ const [s, o] = me(r);
1177
1183
  return /* @__PURE__ */ g(lr, { asChild: !0, ...s, children: /* @__PURE__ */ g(
1178
1184
  Rt,
1179
1185
  {
@@ -1191,7 +1197,7 @@ function st({
1191
1197
  ref: t,
1192
1198
  ...r
1193
1199
  }) {
1194
- const [s, o] = fe(r);
1200
+ const [s, o] = me(r);
1195
1201
  return /* @__PURE__ */ g(ir, { ...s, ref: t, asChild: !0, children: /* @__PURE__ */ g(Bt, { ...o, children: typeof e == "function" ? (c) => {
1196
1202
  const l = e(c), u = c;
1197
1203
  return wt(l) && (u.id || u.textValue) ? $t(
@@ -1210,12 +1216,12 @@ function lt({
1210
1216
  ref: t,
1211
1217
  ...r
1212
1218
  }) {
1213
- const [s, o] = fe(r);
1219
+ const [s, o] = me(r);
1214
1220
  return /* @__PURE__ */ g(ar, { ...s, asChild: !0, children: /* @__PURE__ */ g(Mt, { ref: t, ...o, children: (n) => {
1215
1221
  const c = typeof e == "function" ? e({
1216
1222
  ...n
1217
1223
  }) : e;
1218
- return n.selectionMode === "multiple" ? /* @__PURE__ */ ve(He, { children: [
1224
+ return n.selectionMode === "multiple" ? /* @__PURE__ */ xe(He, { children: [
1219
1225
  /* @__PURE__ */ g(ur, { children: /* @__PURE__ */ g("span", { "data-selected": n.isSelected, children: n.isSelected && /* @__PURE__ */ g(Et, {}) }) }),
1220
1226
  /* @__PURE__ */ g(dr, { children: c })
1221
1227
  ] }) : /* @__PURE__ */ g(He, { children: c });
@@ -1233,7 +1239,7 @@ function it({
1233
1239
  throw new Error(
1234
1240
  'ComboBox.Section: When "items" is provided, "children" must be a function'
1235
1241
  );
1236
- return /* @__PURE__ */ ve(At, { ref: s, ...o, children: [
1242
+ return /* @__PURE__ */ xe(At, { ref: s, ...o, children: [
1237
1243
  t && /* @__PURE__ */ g(cr, { asChild: !0, children: /* @__PURE__ */ g(Kt, { children: t }) }),
1238
1244
  r ? /* @__PURE__ */ g(Ot, { items: r, children: (n) => typeof e == "function" ? e(n) : null }) : e
1239
1245
  ] });
@@ -1548,4 +1554,4 @@ const oo = {
1548
1554
  export {
1549
1555
  oo as C
1550
1556
  };
1551
- //# sourceMappingURL=combobox-vjauyzlS.es.js.map
1557
+ //# sourceMappingURL=combobox-CMm8VWO_.es.js.map