impact-nova 1.5.13 → 1.5.15

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 (39) hide show
  1. package/dist/components/ui/badge.d.ts +1 -1
  2. package/dist/components/ui/badge.js +12 -11
  3. package/dist/components/ui/breadcrumb.js +25 -20
  4. package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
  5. package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
  6. package/dist/components/ui/command-palette/command-palette.d.ts +5 -2
  7. package/dist/components/ui/command-palette/command-palette.js +271 -264
  8. package/dist/components/ui/command-palette/index.d.ts +1 -1
  9. package/dist/components/ui/command-palette/index.js +42 -41
  10. package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
  11. package/dist/components/ui/command-palette/shortcut-settings.js +112 -107
  12. package/dist/components/ui/command-palette/utils.d.ts +6 -1
  13. package/dist/components/ui/command-palette/utils.js +81 -74
  14. package/dist/components/ui/data-table/data-table.js +51 -40
  15. package/dist/components/ui/dialog.js +2 -5
  16. package/dist/components/ui/empty-container.js +72 -65
  17. package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
  18. package/dist/components/ui/filter-panel/filter-panel.js +154 -76
  19. package/dist/components/ui/filter-strip/filter-summary.js +30 -32
  20. package/dist/components/ui/header.d.ts +7 -3
  21. package/dist/components/ui/header.js +46 -44
  22. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +1 -1
  23. package/dist/components/ui/select/select.js +84 -88
  24. package/dist/components/ui/sidebar.js +341 -305
  25. package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
  26. package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
  27. package/dist/i18n/defaultMessages.d.ts +1 -0
  28. package/dist/i18n/defaultMessages.js +1 -0
  29. package/dist/i18n/locales/de.js +1 -0
  30. package/dist/i18n/locales/es.js +1 -0
  31. package/dist/i18n/locales/hi.js +1 -0
  32. package/dist/i18n/locales/kn.js +1 -0
  33. package/dist/icons/assets/clock.svg.js +5 -0
  34. package/dist/icons/index.d.ts +1 -0
  35. package/dist/icons/index.js +159 -157
  36. package/dist/impact-nova.css +1 -1
  37. package/dist/index.js +106 -105
  38. package/package.json +1 -1
  39. package/tailwind.config.js +14 -1
@@ -4,38 +4,38 @@ import * as J from "@radix-ui/react-popover";
4
4
  import { useVirtualizer as rt } from "@tanstack/react-virtual";
5
5
  import ot from "./components/LabelWithSequence.js";
6
6
  import ct from "./components/Submenu.js";
7
- import { LoadingSpinner as ut, Cross as dt, ChevronRight as Pe, Search as ft, Info as ie } from "../../../icons/index.js";
8
- import { Checkbox as Oe } from "../checkbox.js";
7
+ import { LoadingSpinner as ut, Cross as dt, ChevronRight as Oe, Search as ft, Info as ie } from "../../../icons/index.js";
8
+ import { Checkbox as Ce } from "../checkbox.js";
9
9
  import { Button as mt } from "../button.js";
10
- import { cn as O } from "../../../lib/utils.js";
11
- import { isInvertedSelection as k, isOptionArray as y, isSelected as pt, getSequence as ht, getLeafOptions as xt } from "./utils/select.js";
10
+ import { cn as C } from "../../../lib/utils.js";
11
+ import { isInvertedSelection as k, isOptionArray as w, isSelected as pt, getSequence as ht, getLeafOptions as xt } from "./utils/select.js";
12
12
  import { useFlattenOptions as bt } from "./hooks/useFlattenOptions.js";
13
13
  import { useSelectionModel as gt } from "./hooks/useSelectionModel.js";
14
14
  import { useVisibleStats as vt } from "./hooks/useVisibleStats.js";
15
15
  import { useImpactNovaI18n as St } from "../../../i18n/ImpactNovaI18nContext.js";
16
- const wt = (ae) => {
16
+ const yt = (ae) => {
17
17
  const {
18
- options: I,
18
+ options: T,
19
19
  value: K,
20
- defaultValue: Ce,
20
+ defaultValue: Pe,
21
21
  onChange: u,
22
22
  isMulti: f,
23
- isDisabled: C,
23
+ isDisabled: P,
24
24
  isLoading: A,
25
25
  isClearable: ke = !0,
26
26
  isSearchable: F = !0,
27
27
  placeholder: Ae,
28
28
  // menuPortalTarget is kept for API compatibility but no longer used (Radix handles portalling)
29
- menuPortalTarget: yt,
29
+ menuPortalTarget: wt,
30
30
  autoFocus: De,
31
31
  closeMenuOnSelect: $e = !f,
32
- defaultMenuIsOpen: Ie = !1,
32
+ defaultMenuIsOpen: Te = !1,
33
33
  scrollToSelectedOnOpen: re = !1,
34
34
  maxSelectableOptions: p,
35
35
  showSequence: oe,
36
- selectionOrder: Te,
36
+ selectionOrder: Ge,
37
37
  label: ce,
38
- isRequired: Ge,
38
+ isRequired: Ie,
39
39
  error: ue,
40
40
  helperText: de,
41
41
  id: V,
@@ -68,7 +68,7 @@ const wt = (ae) => {
68
68
  onClearAll: Se,
69
69
  onFocus: Ue,
70
70
  onBlur: Ye
71
- } = ae, { t: H } = St(), Je = Ae ?? H("select.placeholder"), [S, we] = q(Ie), [T, B] = q(""), [ye, X] = q(void 0), [d, g] = q(Ce || (f ? [] : null)), [Ke, Z] = q(null), Qe = E(null), ee = E(null), Xe = E(null), j = E(null), te = E(null);
71
+ } = ae, { t: H } = St(), Je = Ae ?? H("select.placeholder"), [S, ye] = q(Te), [G, B] = q(""), [we, X] = q(void 0), [d, g] = q(Pe || (f ? [] : null)), [Ke, Z] = q(null), Qe = E(null), ee = E(null), Xe = E(null), j = E(null), te = E(null);
72
72
  R(() => {
73
73
  K !== void 0 && g(K);
74
74
  }, [K]), R(() => {
@@ -79,7 +79,7 @@ const wt = (ae) => {
79
79
  e && clearTimeout(e);
80
80
  };
81
81
  }, [S, F, L]);
82
- const { flatOptions: x, isProcessing: P, totalOptionsCount: Ve, workerSelectAll: Ze } = bt(I, T, {
82
+ const { flatOptions: x, isProcessing: O, totalOptionsCount: Ve, workerSelectAll: Ze } = bt(T, G, {
83
83
  ignoreCase: Le,
84
84
  ignoreAccents: He,
85
85
  matchFrom: je,
@@ -88,11 +88,11 @@ const wt = (ae) => {
88
88
  filterOption: Be,
89
89
  enableSubMenus: v,
90
90
  enableGroups: N
91
- }), w = gt(d, f ?? !1), { stats: G, getGroupStats: le } = vt(
91
+ }), y = gt(d, f ?? !1), { stats: I, getGroupStats: le } = vt(
92
92
  x,
93
93
  Ve,
94
- T,
95
- w,
94
+ G,
95
+ y,
96
96
  d,
97
97
  f ?? !1
98
98
  ), D = rt({
@@ -110,8 +110,8 @@ const wt = (ae) => {
110
110
  });
111
111
  return () => cancelAnimationFrame(e);
112
112
  }, [S, D]), R(() => {
113
- if (S && re && !P && x.length > 0) {
114
- const e = x.findIndex((t) => f ? w.mode === "exclude" ? !w.set.has(t.value) : w.set.has(t.value) : d?.value === t.value);
113
+ if (S && re && !O && x.length > 0) {
114
+ const e = x.findIndex((t) => f ? y.mode === "exclude" ? !y.set.has(t.value) : y.set.has(t.value) : d?.value === t.value);
115
115
  if (e !== -1) {
116
116
  const t = setTimeout(() => {
117
117
  D.scrollToIndex(e, { align: "center" });
@@ -119,12 +119,12 @@ const wt = (ae) => {
119
119
  return () => clearTimeout(t);
120
120
  }
121
121
  }
122
- }, [S, re, P, x.length, f, w.mode, w.set, d, D]);
122
+ }, [S, re, O, x.length, f, y.mode, y.set, d, D]);
123
123
  const M = E(null);
124
124
  R(() => {
125
125
  if (!j.current || !Q) return;
126
126
  const e = () => {
127
- if (A || P) return;
127
+ if (A || O) return;
128
128
  const { scrollTop: n, scrollHeight: r, clientHeight: s } = j.current;
129
129
  if (r - n - s <= 10) {
130
130
  if (M.current) return;
@@ -133,7 +133,7 @@ const wt = (ae) => {
133
133
  }, 500);
134
134
  }
135
135
  }, t = j.current;
136
- return t.addEventListener("scroll", e), !A && !P && e(), () => {
136
+ return t.addEventListener("scroll", e), !A && !O && e(), () => {
137
137
  t.removeEventListener("scroll", e), M.current && (clearTimeout(M.current), M.current = null);
138
138
  };
139
139
  }, [
@@ -141,18 +141,18 @@ const wt = (ae) => {
141
141
  x.length,
142
142
  S,
143
143
  A,
144
- P
144
+ O
145
145
  ]);
146
146
  const et = (e) => {
147
- if (!C)
148
- if (we(e), e)
147
+ if (!P)
148
+ if (ye(e), e)
149
149
  Fe?.();
150
150
  else {
151
- const t = d, n = f && y(d) ? d.map((r) => r.value) : void 0;
151
+ const t = d, n = f && w(d) ? d.map((r) => r.value) : void 0;
152
152
  xe?.(t, n), B(""), Z(null);
153
153
  }
154
154
  }, Ne = (e) => {
155
- if (!(C || b || e.isDisabled || ("children" in e || "options" in e) && e.isParentSelectable === !1))
155
+ if (!(P || b || e.isDisabled || ("children" in e || "options" in e) && e.isParentSelectable === !1))
156
156
  if (f) {
157
157
  const n = d || [];
158
158
  if ("children" in e || "options" in e) {
@@ -179,7 +179,7 @@ const wt = (ae) => {
179
179
  action: "select-option",
180
180
  option: e
181
181
  });
182
- } else if (y(n)) {
182
+ } else if (w(n)) {
183
183
  const l = n, i = s.every(
184
184
  (o) => l.some((m) => m.value === o.value)
185
185
  );
@@ -207,8 +207,8 @@ const wt = (ae) => {
207
207
  action: s ? "select-option" : "deselect-option",
208
208
  option: e
209
209
  });
210
- } else if (y(n)) {
211
- const r = n, s = f ? w.mode === "exclude" ? !w.set.has(e.value) : w.set.has(e.value) : d?.value === e.value;
210
+ } else if (w(n)) {
211
+ const r = n, s = f ? y.mode === "exclude" ? !y.set.has(e.value) : y.set.has(e.value) : d?.value === e.value;
212
212
  let l = [];
213
213
  if (s)
214
214
  l = r.filter((i) => i.value !== e.value);
@@ -226,10 +226,10 @@ const wt = (ae) => {
226
226
  g(e), u && u(e, {
227
227
  action: "select-option",
228
228
  option: e
229
- }), $e && (we(!1), xe?.(e, void 0), B(""));
229
+ }), $e && (ye(!1), xe?.(e, void 0), B(""));
230
230
  }, tt = async () => {
231
- if (!(!f || C || b)) {
232
- if (I.length > 3e3) {
231
+ if (!(!f || P || b)) {
232
+ if (T.length > 3e3) {
233
233
  try {
234
234
  const e = await Ze(
235
235
  d,
@@ -241,7 +241,7 @@ const wt = (ae) => {
241
241
  }
242
242
  return;
243
243
  }
244
- if (T) {
244
+ if (G) {
245
245
  let e = !1;
246
246
  for (const n of x)
247
247
  if (!n.isGroup && !n.isSubmenuParent && !n.isDisabled) {
@@ -252,7 +252,7 @@ const wt = (ae) => {
252
252
  return;
253
253
  const t = d || [];
254
254
  if (k(t)) {
255
- const n = t.excludedValues, { totalVisible: r, selectedVisible: s } = G, l = r > 0 && r === s;
255
+ const n = t.excludedValues, { totalVisible: r, selectedVisible: s } = I, l = r > 0 && r === s;
256
256
  let i = [...n];
257
257
  if (l)
258
258
  for (const o of x)
@@ -268,8 +268,8 @@ const wt = (ae) => {
268
268
  excludedValues: i
269
269
  };
270
270
  g(c), u && u(c, { action: "select-option" });
271
- } else if (y(t)) {
272
- const n = t, { totalVisible: r, selectedVisible: s } = G, l = r > 0 && r === s;
271
+ } else if (w(t)) {
272
+ const n = t, { totalVisible: r, selectedVisible: s } = I, l = r > 0 && r === s;
273
273
  let i = [...n];
274
274
  if (l) {
275
275
  const c = /* @__PURE__ */ new Set();
@@ -286,13 +286,13 @@ const wt = (ae) => {
286
286
  g(i), u && u(i, { action: "select-option" });
287
287
  }
288
288
  } else if (p) {
289
- const e = d, { totalVisible: t } = G, n = y(e) ? e.length : 0, r = Math.min(t, p);
290
- if (y(e) && n >= r && n > 0) {
289
+ const e = d, { totalVisible: t } = I, n = w(e) ? e.length : 0, r = Math.min(t, p);
290
+ if (w(e) && n >= r && n > 0) {
291
291
  const s = e.filter((l) => l.isDisabled);
292
292
  g(s), u && u(s, {
293
293
  action: "select-option"
294
294
  });
295
- } else if (y(e)) {
295
+ } else if (w(e)) {
296
296
  const s = e.filter(
297
297
  (i) => i.isDisabled
298
298
  );
@@ -308,7 +308,7 @@ const wt = (ae) => {
308
308
  const e = d, t = k(e) && e.excludedValues.length === 0;
309
309
  if (ae.enableInvertedSelection)
310
310
  if (t) {
311
- const n = y(e) ? e.filter((r) => r.isDisabled) : [];
311
+ const n = w(e) ? e.filter((r) => r.isDisabled) : [];
312
312
  g(n), u && u(n, {
313
313
  action: "select-option"
314
314
  });
@@ -316,20 +316,20 @@ const wt = (ae) => {
316
316
  const r = {
317
317
  isAllSelected: !0,
318
318
  excludedValues: x.filter(
319
- (s) => s.isDisabled && (y(e) ? !e.some((l) => l.value === s.value) : !0)
319
+ (s) => s.isDisabled && (w(e) ? !e.some((l) => l.value === s.value) : !0)
320
320
  ).map((s) => s.value)
321
321
  };
322
322
  g(r), u && u(r, { action: "select-option" });
323
323
  }
324
324
  else {
325
- const { totalVisible: n, selectedVisible: r } = G;
325
+ const { totalVisible: n, selectedVisible: r } = I;
326
326
  if (n > 0 && n === r) {
327
- const s = y(e) ? e.filter((l) => l.isDisabled) : [];
327
+ const s = w(e) ? e.filter((l) => l.isDisabled) : [];
328
328
  g(s), u && u(s, {
329
329
  action: "select-option"
330
330
  });
331
331
  } else {
332
- const s = y(e) ? e.filter((l) => l.isDisabled) : [];
332
+ const s = w(e) ? e.filter((l) => l.isDisabled) : [];
333
333
  for (const l of x)
334
334
  !l.isGroup && !l.isSubmenuParent && !l.isDisabled && s.push(l);
335
335
  g(s), u && u(s, {
@@ -355,10 +355,10 @@ const wt = (ae) => {
355
355
  continue;
356
356
  }
357
357
  const i = l;
358
- i.isDisabled && (w.mode === "exclude" ? !w.set.has(i.value) : w.set.has(i.value)) && t.push(i);
358
+ i.isDisabled && (y.mode === "exclude" ? !y.set.has(i.value) : y.set.has(i.value)) && t.push(i);
359
359
  }
360
360
  };
361
- n(I);
361
+ n(T);
362
362
  const r = t;
363
363
  g(r), u && u(r, { action: "clear" }), Se?.();
364
364
  } else {
@@ -387,7 +387,7 @@ const wt = (ae) => {
387
387
  }
388
388
  }
389
389
  };
390
- if (s(I), r?.isDisabled)
390
+ if (s(T), r?.isDisabled)
391
391
  return;
392
392
  }
393
393
  const n = null;
@@ -397,13 +397,13 @@ const wt = (ae) => {
397
397
  e,
398
398
  oe ?? !1,
399
399
  f ?? !1,
400
- Te,
400
+ Ge,
401
401
  d
402
402
  ), W = (e) => pe ? pe(e) : e.label, st = () => {
403
403
  if (f) {
404
404
  const e = d || [];
405
405
  let t = 0;
406
- return k(e) ? t = Ve - e.excludedValues.length : y(e) && (t = e.length), t === 0 ? null : t === 1 && y(e) ? /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: W(e[0]) }) : /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: H("select.selectedCount", { count: t }) });
406
+ return k(e) ? t = Ve - e.excludedValues.length : w(e) && (t = e.length), t === 0 ? null : t === 1 && w(e) ? /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: W(e[0]) }) : /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: H("select.selectedCount", { count: t }) });
407
407
  } else {
408
408
  const e = d;
409
409
  return e ? /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: W(e) }) : null;
@@ -412,28 +412,28 @@ const wt = (ae) => {
412
412
  return /* @__PURE__ */ h(
413
413
  "div",
414
414
  {
415
- className: O(
415
+ className: C(
416
416
  "flex gap-[6px]",
417
417
  be === "left" ? "w-fit flex-row items-center" : "w-full flex-col",
418
418
  ze
419
419
  ),
420
420
  onFocus: Ue,
421
421
  onBlur: Ye,
422
- tabIndex: C ? -1 : 0,
422
+ tabIndex: P ? -1 : 0,
423
423
  "data-testid": `select-${V || "default"}`,
424
424
  "data-component": "select",
425
425
  children: [
426
426
  ce && /* @__PURE__ */ h(
427
427
  "label",
428
428
  {
429
- className: O(
429
+ className: C(
430
430
  "text-[12px] font-medium text-[#60697d] leading-[18px]",
431
431
  be === "left" ? "shrink-0" : ""
432
432
  ),
433
433
  children: [
434
434
  ce,
435
435
  " ",
436
- Ge && /* @__PURE__ */ a("span", { className: "text-[red]", children: "*" })
436
+ Ie && /* @__PURE__ */ a("span", { className: "text-[red]", children: "*" })
437
437
  ]
438
438
  }
439
439
  ),
@@ -442,18 +442,18 @@ const wt = (ae) => {
442
442
  "div",
443
443
  {
444
444
  ref: Qe,
445
- className: O(
445
+ className: C(
446
446
  "relative h-[32px] w-full cursor-pointer rounded-[8px] border border-solid px-3 py-1 text-left shadow-sm focus:outline-none sm:text-sm transition-all flex items-center overflow-hidden",
447
447
  ue ? "border-[#e15554] focus:ring-[#e15554]" : "border-[#c3c8d4] hover:border-gray-400 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500",
448
- C ? "bg-[#f2f4fb] cursor-not-allowed opacity-75" : "",
448
+ P ? "bg-[#f2f4fb] cursor-not-allowed opacity-75" : "",
449
449
  b ? "cursor-default bg-[#f2f4fb]" : "",
450
450
  S ? "ring-1 ring-indigo-500 border-indigo-500" : "",
451
- !C && !b && "bg-white",
451
+ !P && !b && "bg-white",
452
452
  Me
453
453
  ),
454
454
  id: V,
455
455
  "data-component": "select-trigger",
456
- "data-disabled": C || void 0,
456
+ "data-disabled": P || void 0,
457
457
  "data-state": S ? "open" : "closed",
458
458
  children: /* @__PURE__ */ h("div", { className: "flex items-center justify-between w-full min-w-0 max-w-full", children: [
459
459
  ge && /* @__PURE__ */ a("div", { className: "flex items-center text-gray-500 shrink-0", children: ge }),
@@ -478,7 +478,7 @@ const wt = (ae) => {
478
478
  ref: Xe,
479
479
  type: "text",
480
480
  className: "flex-1 min-w-[50px] border-none p-0 focus:ring-0 text-sm outline-none h-full",
481
- value: T,
481
+ value: G,
482
482
  onChange: (e) => B(e.target.value),
483
483
  onClick: (e) => e.stopPropagation(),
484
484
  autoFocus: De,
@@ -488,10 +488,10 @@ const wt = (ae) => {
488
488
  ]
489
489
  }
490
490
  ),
491
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !S && (A || P) ? /* @__PURE__ */ a(ut, { size: "14px" }) : /* @__PURE__ */ h(at, { children: [
491
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !S && (A || O) ? /* @__PURE__ */ a(ut, { size: "14px" }) : /* @__PURE__ */ h(at, { children: [
492
492
  ke && !b && (f && (k(
493
493
  d
494
- ) && d.isAllSelected || y(d) && d.length > 0) || !f && d) && /* @__PURE__ */ a(
494
+ ) && d.isAllSelected || w(d) && d.length > 0) || !f && d) && /* @__PURE__ */ a(
495
495
  "div",
496
496
  {
497
497
  role: "button",
@@ -501,10 +501,10 @@ const wt = (ae) => {
501
501
  }
502
502
  ),
503
503
  /* @__PURE__ */ a(
504
- Pe,
504
+ Oe,
505
505
  {
506
506
  size: "16px",
507
- className: O(
507
+ className: C(
508
508
  "transition-transform duration-200",
509
509
  S ? "-rotate-90" : "rotate-90"
510
510
  )
@@ -524,16 +524,13 @@ const wt = (ae) => {
524
524
  avoidCollisions: !0,
525
525
  collisionPadding: 8,
526
526
  onOpenAutoFocus: (e) => e.preventDefault(),
527
- onInteractOutside: () => {
528
- },
529
527
  onWheel: (e) => e.stopPropagation(),
530
- onPointerDown: (e) => e.stopPropagation(),
531
528
  style: {
532
529
  width: We || "var(--radix-popover-trigger-width)",
533
530
  maxHeight: "var(--radix-popover-content-available-height)",
534
- minHeight: ye ? `${ye}px` : void 0
531
+ minHeight: we ? `${we}px` : void 0
535
532
  },
536
- className: O(
533
+ className: C(
537
534
  "z-50 overflow-hidden rounded-[12px] text-base shadow-[0px_1px_6px_0px_rgba(26,39,124,0.14)] focus:outline-none sm:text-sm flex flex-col border-none pointer-events-auto",
538
535
  b ? "bg-[#f5f5f5]" : "bg-white"
539
536
  ),
@@ -543,7 +540,7 @@ const wt = (ae) => {
543
540
  /* @__PURE__ */ h(
544
541
  "div",
545
542
  {
546
- className: O(
543
+ className: C(
547
544
  "flex flex-col z-10 sticky top-0 px-[6px] pt-[8px]",
548
545
  b ? "bg-[#f5f5f5]" : "bg-white",
549
546
  !_ && (F && L === "menu" && !b || f && fe && !b && x.length > 0) ? "border-b border-solid border-gray-100" : ""
@@ -563,10 +560,10 @@ const wt = (ae) => {
563
560
  type: "text",
564
561
  className: "block w-full pl-[34px] pr-4 h-[35px] border-none border-b border-primary text-sm outline-none focus:ring-0",
565
562
  placeholder: H("select.searchHere"),
566
- value: T,
563
+ value: G,
567
564
  onChange: (e) => {
568
565
  const t = e.target.value;
569
- T === "" && t !== "" ? ee.current && X(ee.current.offsetHeight) : t === "" && X(void 0), B(t), Re?.(t);
566
+ G === "" && t !== "" ? ee.current && X(ee.current.offsetHeight) : t === "" && X(void 0), B(t), Re?.(t);
570
567
  },
571
568
  onClick: (e) => e.stopPropagation(),
572
569
  "data-testid": `select-search-input-${V || "default"}`
@@ -575,7 +572,7 @@ const wt = (ae) => {
575
572
  ] })
576
573
  }
577
574
  ),
578
- !A && !P && !_ && f && fe && !b && x.length > 0 && /* @__PURE__ */ a(
575
+ !A && !O && !_ && f && fe && !b && x.length > 0 && /* @__PURE__ */ a(
579
576
  "div",
580
577
  {
581
578
  className: "pb-1",
@@ -588,15 +585,15 @@ const wt = (ae) => {
588
585
  "data-testid": `select-select-all-button-${V || "default"}`,
589
586
  children: /* @__PURE__ */ h("div", { className: "flex items-center flex-1", children: [
590
587
  /* @__PURE__ */ a("div", { className: "pointer-events-none flex", children: /* @__PURE__ */ a(
591
- Oe,
588
+ Ce,
592
589
  {
593
590
  checked: (() => {
594
- const { totalVisible: e, selectedVisible: t } = G;
591
+ const { totalVisible: e, selectedVisible: t } = I;
595
592
  if (e === 0) return !1;
596
593
  const n = p ? Math.min(e, p) : e;
597
594
  return t > 0 && t < n ? "indeterminate" : t >= n;
598
595
  })(),
599
- disabled: C || b,
596
+ disabled: P || b,
600
597
  onChange: () => {
601
598
  },
602
599
  "data-testid": `select-select-all-checkbox-${V || "default"}`
@@ -608,7 +605,7 @@ const wt = (ae) => {
608
605
  className: "text-sm font-medium text-gray-700",
609
606
  "data-testid": `select-select-all-label-${V || "default"}`,
610
607
  children: (() => {
611
- const { totalVisible: e, selectedVisible: t } = G, n = p ? Math.min(e, p) : e, r = e > 0 && t >= n;
608
+ const { totalVisible: e, selectedVisible: t } = I, n = p ? Math.min(e, p) : e, r = e > 0 && t >= n;
612
609
  return H(r ? "select.unselectAll" : "select.selectAll");
613
610
  })()
614
611
  }
@@ -631,7 +628,6 @@ const wt = (ae) => {
631
628
  overscrollBehavior: "contain"
632
629
  },
633
630
  onWheel: (e) => e.stopPropagation(),
634
- onPointerDown: (e) => e.stopPropagation(),
635
631
  children: _ ? /* @__PURE__ */ h("div", { className: "flex flex-col items-center justify-center py-8 px-4 text-center", children: [
636
632
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-500 font-medium mb-3", children: "Something went wrong" }),
637
633
  ve && /* @__PURE__ */ a(
@@ -643,7 +639,7 @@ const wt = (ae) => {
643
639
  children: "Refetch"
644
640
  }
645
641
  )
646
- ] }) : x.length === 0 && !A && !P ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : A || P ? /* @__PURE__ */ a("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ h(
642
+ ] }) : x.length === 0 && !A && !O ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : A || O ? /* @__PURE__ */ a("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ h(
647
643
  "div",
648
644
  {
649
645
  className: "flex items-center gap-2 px-3 py-2 animate-pulse",
@@ -662,7 +658,7 @@ const wt = (ae) => {
662
658
  position: "relative"
663
659
  },
664
660
  children: D.getVirtualItems().map((e) => {
665
- const t = x[e.index], n = f ? w.mode === "exclude" ? !w.set.has(t.value) : w.set.has(t.value) : d?.value === t.value, r = d || [], s = f && p ? k(r) ? !1 : y(r) && r.length >= p : !1, l = t.isDisabled || s && !n && !(N && t.isGroup) && !(v && t.isSubmenuParent), i = N && t.isGroup || v && t.isSubmenuParent ? le(t.original) : void 0, c = i?.selected || 0, o = i?.total || 0, m = c > 0 && c < o, U = t.isParentSelectable !== !1, ne = V || "default", Y = String(t.value || ""), se = W(
661
+ const t = x[e.index], n = f ? y.mode === "exclude" ? !y.set.has(t.value) : y.set.has(t.value) : d?.value === t.value, r = d || [], s = f && p ? k(r) ? !1 : w(r) && r.length >= p : !1, l = t.isDisabled || s && !n && !(N && t.isGroup) && !(v && t.isSubmenuParent), i = N && t.isGroup || v && t.isSubmenuParent ? le(t.original) : void 0, c = i?.selected || 0, o = i?.total || 0, m = c > 0 && c < o, U = t.isParentSelectable !== !1, ne = V || "default", Y = String(t.value || ""), se = W(
666
662
  t
667
663
  ), it = typeof se == "string" ? se : Y;
668
664
  return /* @__PURE__ */ h(
@@ -680,7 +676,7 @@ const wt = (ae) => {
680
676
  /* @__PURE__ */ a(
681
677
  "div",
682
678
  {
683
- className: O(
679
+ className: C(
684
680
  "cursor-default select-none py-[6px] px-3 flex items-center justify-between transition-colors rounded-md",
685
681
  l ? "opacity-50 cursor-not-allowed bg-[#f5f5f5]" : b ? "cursor-default" : "hover:bg-gray-100 cursor-pointer",
686
682
  n && !l && !(N && t.isGroup) && !(v && t.isSubmenuParent) ? "bg-[#edf0ff] text-[#1f2b4d]" : "text-[#1f2b4d]"
@@ -714,7 +710,7 @@ const wt = (ae) => {
714
710
  t
715
711
  ) : /* @__PURE__ */ h("div", { className: "flex items-center flex-1 overflow-hidden", children: [
716
712
  f && (N && t.isGroup || v && t.isSubmenuParent ? U : !0) && /* @__PURE__ */ a(
717
- Oe,
713
+ Ce,
718
714
  {
719
715
  checked: m ? "indeterminate" : n,
720
716
  disabled: l || b,
@@ -734,7 +730,7 @@ const wt = (ae) => {
734
730
  /* @__PURE__ */ a(
735
731
  "span",
736
732
  {
737
- className: O(
733
+ className: C(
738
734
  "block truncate",
739
735
  N && t.isGroup ? "text-xs font-semibold text-gray-400 uppercase tracking-wider" : n && !(v && t.isSubmenuParent) ? "font-medium" : "font-normal",
740
736
  !(N && t.isGroup) && "text-[14px]"
@@ -748,7 +744,7 @@ const wt = (ae) => {
748
744
  (N && t.isGroup || v && t.isSubmenuParent) && c > 0 && /* @__PURE__ */ a("span", { className: "inline-flex items-center justify-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-indigo-100 text-indigo-800", children: c })
749
745
  ] }),
750
746
  v && t.isSubmenuParent && /* @__PURE__ */ a(
751
- Pe,
747
+ Oe,
752
748
  {
753
749
  size: "12px",
754
750
  className: "text-gray-400"
@@ -782,14 +778,14 @@ const wt = (ae) => {
782
778
  )
783
779
  }
784
780
  ),
785
- (me || p || I.length > 5e3) && /* @__PURE__ */ a("div", { className: "px-3 py-[10px] border-t border-solid border-gray-100 z-10 sticky bottom-0 bg-white", children: p ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
781
+ (me || p || T.length > 5e3) && /* @__PURE__ */ a("div", { className: "px-3 py-[10px] border-t border-solid border-gray-100 z-10 sticky bottom-0 bg-white", children: p ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
786
782
  /* @__PURE__ */ a(ie, { size: "12px", className: "text-gray-400" }),
787
783
  /* @__PURE__ */ h("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: [
788
784
  "Maximum ",
789
785
  p,
790
786
  " selections"
791
787
  ] })
792
- ] }) : I.length > 5e3 ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
788
+ ] }) : T.length > 5e3 ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
793
789
  /* @__PURE__ */ a(ie, { size: "12px", className: "text-gray-400" }),
794
790
  /* @__PURE__ */ a("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: "Large dataset detected. Operations might be slower." })
795
791
  ] }) : me })
@@ -800,7 +796,7 @@ const wt = (ae) => {
800
796
  de && /* @__PURE__ */ h(
801
797
  "p",
802
798
  {
803
- className: O(
799
+ className: C(
804
800
  "text-[12px] mt-1 flex items-center gap-1",
805
801
  ue ? "text-[#e15554]" : "text-gray-500"
806
802
  ),
@@ -814,7 +810,7 @@ const wt = (ae) => {
814
810
  }
815
811
  );
816
812
  };
817
- wt.displayName = "Select";
813
+ yt.displayName = "Select";
818
814
  export {
819
- wt as default
815
+ yt as default
820
816
  };