impact-nova 1.2.4 → 1.5.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 (123) hide show
  1. package/README.md +49 -0
  2. package/dist/components/layout/dashboard-layout.d.ts +15 -1
  3. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
  4. package/dist/components/ui/accordion.js +38 -34
  5. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
  6. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
  7. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
  11. package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
  12. package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
  13. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
  14. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
  15. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +1 -1
  16. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  18. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  19. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  20. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  21. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  23. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  24. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  25. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  26. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  27. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  28. package/dist/components/ui/alert.d.ts +1 -1
  29. package/dist/components/ui/alert.js +76 -60
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +355 -354
  32. package/dist/components/ui/chart/chart.js +63 -62
  33. package/dist/components/ui/chips.js +42 -38
  34. package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
  35. package/dist/components/ui/command-palette/command-palette-context.js +110 -0
  36. package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
  37. package/dist/components/ui/command-palette/command-palette.js +402 -0
  38. package/dist/components/ui/command-palette/index.d.ts +23 -0
  39. package/dist/components/ui/command-palette/index.js +44 -0
  40. package/dist/components/ui/command-palette/kbd.d.ts +28 -0
  41. package/dist/components/ui/command-palette/kbd.js +52 -0
  42. package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
  43. package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
  44. package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
  45. package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
  46. package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
  47. package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
  48. package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
  49. package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
  50. package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
  51. package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
  52. package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
  53. package/dist/components/ui/command-palette/use-shortcut.js +49 -0
  54. package/dist/components/ui/command-palette/utils.d.ts +119 -0
  55. package/dist/components/ui/command-palette/utils.js +248 -0
  56. package/dist/components/ui/data-table/data-table-column-list.js +87 -86
  57. package/dist/components/ui/data-table/data-table-format-options.js +45 -44
  58. package/dist/components/ui/data-table/data-table-view-options.js +39 -38
  59. package/dist/components/ui/date-picker/date-picker.js +89 -87
  60. package/dist/components/ui/date-picker/date-range-picker.js +140 -138
  61. package/dist/components/ui/date-picker/month-picker.js +82 -81
  62. package/dist/components/ui/date-picker/month-range-picker.js +108 -105
  63. package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
  64. package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
  65. package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
  66. package/dist/components/ui/date-picker/week-picker.js +117 -115
  67. package/dist/components/ui/date-picker/week-range-picker.js +166 -164
  68. package/dist/components/ui/dialog.js +78 -73
  69. package/dist/components/ui/drawer.js +71 -66
  70. package/dist/components/ui/file-upload.js +131 -127
  71. package/dist/components/ui/filter-panel/filter-panel.js +98 -94
  72. package/dist/components/ui/filter-strip/filter-strip.js +95 -91
  73. package/dist/components/ui/filter-strip/filter-summary.js +91 -90
  74. package/dist/components/ui/header.js +57 -53
  75. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
  76. package/dist/components/ui/loader.js +17 -16
  77. package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
  78. package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
  79. package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
  80. package/dist/components/ui/nested-list/nested-list.js +184 -182
  81. package/dist/components/ui/notification-panel/notification-panel.js +60 -53
  82. package/dist/components/ui/popover.js +45 -40
  83. package/dist/components/ui/prompt.js +90 -85
  84. package/dist/components/ui/select/select.js +225 -229
  85. package/dist/components/ui/sheet.d.ts +1 -0
  86. package/dist/components/ui/sheet.js +50 -48
  87. package/dist/components/ui/sidebar.js +273 -267
  88. package/dist/components/ui/stepper.js +75 -63
  89. package/dist/components/ui/tabs.d.ts +11 -1
  90. package/dist/components/ui/tabs.js +79 -54
  91. package/dist/components/ui/tag.js +48 -44
  92. package/dist/components/ui/toast.js +46 -41
  93. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  94. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  95. package/dist/i18n/defaultMessages.d.ts +231 -0
  96. package/dist/i18n/defaultMessages.js +206 -0
  97. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  98. package/dist/i18n/getDateFnsLocale.js +21 -0
  99. package/dist/i18n/index.d.ts +5 -0
  100. package/dist/i18n/locales/de.d.ts +2 -0
  101. package/dist/i18n/locales/de.js +206 -0
  102. package/dist/i18n/locales/es.d.ts +2 -0
  103. package/dist/i18n/locales/es.js +206 -0
  104. package/dist/i18n/locales/hi.d.ts +2 -0
  105. package/dist/i18n/locales/hi.js +206 -0
  106. package/dist/i18n/locales/index.d.ts +4 -0
  107. package/dist/i18n/locales/kn.d.ts +2 -0
  108. package/dist/i18n/locales/kn.js +206 -0
  109. package/dist/icons/assets/boxAdd.svg.js +5 -0
  110. package/dist/icons/assets/boxed.svg.js +5 -0
  111. package/dist/icons/assets/trolley.svg.js +5 -0
  112. package/dist/icons/assets/unlocked.svg.js +5 -0
  113. package/dist/icons/assets/webp/delete-3d.webp.js +4 -0
  114. package/dist/icons/assets/webp/info-3d.webp.js +4 -0
  115. package/dist/icons/assets/webp/success-3d.webp.js +4 -0
  116. package/dist/icons/assets/webp/warning-3d.webp.js +4 -0
  117. package/dist/icons/index.d.ts +8 -0
  118. package/dist/icons/index.js +197 -181
  119. package/dist/impact-nova.css +1 -1
  120. package/dist/index.d.ts +4 -0
  121. package/dist/index.js +260 -199
  122. package/package.json +36 -4
  123. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,121 +1,116 @@
1
- import { jsxs as p, jsx as a, Fragment as st } from "react/jsx-runtime";
2
- import { useState as q, useRef as M, useEffect as F } from "react";
3
- import * as Y from "@radix-ui/react-popover";
4
- import { useVirtualizer as it } from "@tanstack/react-virtual";
5
- import at from "./components/LabelWithSequence.js";
6
- import rt from "./components/Submenu.js";
7
- import { LoadingSpinner as ot, Cross as ct, ChevronRight as Ve, Search as ut, Info as se } from "../../../icons/index.js";
8
- import { Checkbox as Ne } from "../checkbox.js";
9
- import { Button as dt } from "../button.js";
1
+ import { jsxs as h, jsx as a, Fragment as at } from "react/jsx-runtime";
2
+ import { useState as q, useRef as E, useEffect as R } from "react";
3
+ import * as J from "@radix-ui/react-popover";
4
+ import { useVirtualizer as rt } from "@tanstack/react-virtual";
5
+ import ot from "./components/LabelWithSequence.js";
6
+ import ct from "./components/Submenu.js";
7
+ import { LoadingSpinner as ut, Cross as dt, ChevronRight as Pe, Search as ft, Info as ae } from "../../../icons/index.js";
8
+ import { Checkbox as Oe } from "../checkbox.js";
9
+ import { Button as mt } from "../button.js";
10
10
  import { cn as O } from "../../../lib/utils.js";
11
- import { isInvertedSelection as k, isOptionArray as y, isSelected as ft, getSequence as mt, getLeafOptions as pt } from "./utils/select.js";
12
- import { useFlattenOptions as ht } from "./hooks/useFlattenOptions.js";
13
- import { useSelectionModel as xt } from "./hooks/useSelectionModel.js";
14
- import { useVisibleStats as bt } from "./hooks/useVisibleStats.js";
15
- const gt = (ie) => {
11
+ import { isInvertedSelection as k, isOptionArray as y, isSelected as pt, getSequence as ht, getLeafOptions as xt } from "./utils/select.js";
12
+ import { useFlattenOptions as bt } from "./hooks/useFlattenOptions.js";
13
+ import { useSelectionModel as gt } from "./hooks/useSelectionModel.js";
14
+ import { useVisibleStats as vt } from "./hooks/useVisibleStats.js";
15
+ import { useImpactNovaI18n as St } from "../../../i18n/ImpactNovaI18nContext.js";
16
+ const wt = (re) => {
16
17
  const {
17
- options: $,
18
- value: J,
19
- defaultValue: Pe,
18
+ options: I,
19
+ value: K,
20
+ defaultValue: Ce,
20
21
  onChange: u,
21
22
  isMulti: f,
22
23
  isDisabled: C,
23
24
  isLoading: A,
24
- isClearable: Oe = !0,
25
- isSearchable: E = !0,
26
- placeholder: Ce = "Select...",
25
+ isClearable: ke = !0,
26
+ isSearchable: F = !0,
27
+ placeholder: Ae,
27
28
  // menuPortalTarget is kept for API compatibility but no longer used (Radix handles portalling)
28
- menuPortalTarget: vt,
29
- autoFocus: ke,
30
- closeMenuOnSelect: Ae = !f,
31
- defaultMenuIsOpen: De = !1,
32
- scrollToSelectedOnOpen: ae = !1,
33
- maxSelectableOptions: h,
34
- showSequence: re,
29
+ menuPortalTarget: yt,
30
+ autoFocus: De,
31
+ closeMenuOnSelect: $e = !f,
32
+ defaultMenuIsOpen: Ie = !1,
33
+ scrollToSelectedOnOpen: oe = !1,
34
+ maxSelectableOptions: p,
35
+ showSequence: ce,
35
36
  selectionOrder: Te,
36
- label: oe,
37
- isRequired: $e,
38
- error: K,
39
- helperText: ce,
37
+ label: ue,
38
+ isRequired: Ge,
39
+ error: Q,
40
+ helperText: de,
40
41
  id: V,
41
- className: Ge,
42
- parentClassName: Ie,
43
- onMenuScrollToBottom: Q,
44
- name: ze,
45
- isSelectAllEnabled: ue = !0,
42
+ className: Me,
43
+ parentClassName: ze,
44
+ onMenuScrollToBottom: X,
45
+ name: Ee,
46
+ isSelectAllEnabled: fe = !0,
46
47
  isReadOnly: b = !1,
47
- searchPosition: R = "menu",
48
- footerContent: de,
49
- onInputChange: Me,
50
- getOptionLabel: fe,
51
- renderOption: me,
48
+ searchPosition: L = "menu",
49
+ footerContent: me,
50
+ onInputChange: Re,
51
+ getOptionLabel: pe,
52
+ renderOption: he,
52
53
  onMenuOpen: Fe,
53
- onMenuClose: pe,
54
- labelOrientation: he = "top",
55
- leftContent: xe,
56
- ignoreCase: Ee,
57
- ignoreAccents: Re,
58
- matchFrom: Le,
59
- stringify: je,
60
- trim: qe,
61
- filterOption: He,
54
+ onMenuClose: xe,
55
+ labelOrientation: be = "top",
56
+ leftContent: ge,
57
+ ignoreCase: Le,
58
+ ignoreAccents: He,
59
+ matchFrom: je,
60
+ stringify: qe,
61
+ trim: _e,
62
+ filterOption: Be,
62
63
  enableSubMenus: v = !1,
63
64
  enableGroups: N = !1,
64
- fetchError: H,
65
- onRefetch: be,
66
- menuWidth: _e,
67
- onClearAll: ge,
68
- onFocus: Be,
69
- onBlur: We
70
- } = ie, [S, ve] = q(De), [L, _] = q(""), [Ue, Se] = q(null), [d, g] = q(Pe || (f ? [] : null)), [Ye, X] = q(null), Je = M(null), Z = M(null), Ke = M(null), j = M(null), ee = M(null);
71
- F(() => {
72
- J !== void 0 && g(J);
73
- }, [J]), F(() => {
65
+ fetchError: _,
66
+ onRefetch: ve,
67
+ menuWidth: We,
68
+ onClearAll: Se,
69
+ onFocus: Ue,
70
+ onBlur: Ye
71
+ } = re, { t: H } = St(), Je = Ae ?? H("select.placeholder"), [S, we] = q(Ie), [T, B] = q(""), [ye, Z] = q(void 0), [d, g] = q(Ce || (f ? [] : null)), [Ke, ee] = q(null), Qe = E(null), te = E(null), Xe = E(null), j = E(null), le = E(null);
72
+ R(() => {
73
+ K !== void 0 && g(K);
74
+ }, [K]), R(() => {
74
75
  let e;
75
- return S && E && R === "menu" && ee.current && (e = setTimeout(() => {
76
- ee.current?.focus();
76
+ return S && F && L === "menu" && le.current && (e = setTimeout(() => {
77
+ le.current?.focus();
77
78
  }, 50)), () => {
78
79
  e && clearTimeout(e);
79
80
  };
80
- }, [S, E, R]), F(() => {
81
- if (S) {
82
- const e = requestAnimationFrame(() => {
83
- Z.current && Se(Z.current.offsetHeight);
84
- });
85
- return () => cancelAnimationFrame(e);
86
- } else
87
- Se(null);
88
- }, [S]);
89
- const { flatOptions: x, isProcessing: P, totalOptionsCount: we, workerSelectAll: Qe } = ht($, L, {
90
- ignoreCase: Ee,
91
- ignoreAccents: Re,
92
- matchFrom: Le,
93
- stringify: je,
94
- trim: qe,
95
- filterOption: He,
81
+ }, [S, F, L]);
82
+ const { flatOptions: x, isProcessing: P, totalOptionsCount: Ve, workerSelectAll: Ze } = bt(I, T, {
83
+ ignoreCase: Le,
84
+ ignoreAccents: He,
85
+ matchFrom: je,
86
+ stringify: qe,
87
+ trim: _e,
88
+ filterOption: Be,
96
89
  enableSubMenus: v,
97
90
  enableGroups: N
98
- }), w = xt(d, f ?? !1), { stats: G, getGroupStats: te } = bt(
91
+ }), w = gt(d, f ?? !1), { stats: G, getGroupStats: ne } = vt(
99
92
  x,
100
- we,
101
- L,
93
+ Ve,
94
+ T,
102
95
  w,
103
96
  d,
104
97
  f ?? !1
105
- ), D = it({
98
+ ), D = rt({
106
99
  count: x.length,
107
100
  getScrollElement: () => j.current,
108
- estimateSize: () => 40,
101
+ estimateSize: () => 34,
109
102
  overscan: 5
110
103
  });
111
- F(() => {
104
+ R(() => {
105
+ S || Z(void 0);
106
+ }, [S]), R(() => {
112
107
  if (!S) return;
113
108
  const e = requestAnimationFrame(() => {
114
109
  D.measure();
115
110
  });
116
111
  return () => cancelAnimationFrame(e);
117
- }, [S, D]), F(() => {
118
- if (S && ae && !P && x.length > 0) {
112
+ }, [S, D]), R(() => {
113
+ if (S && oe && !P && x.length > 0) {
119
114
  const e = x.findIndex((t) => f ? w.mode === "exclude" ? !w.set.has(t.value) : w.set.has(t.value) : d?.value === t.value);
120
115
  if (e !== -1) {
121
116
  const t = setTimeout(() => {
@@ -124,44 +119,44 @@ const gt = (ie) => {
124
119
  return () => clearTimeout(t);
125
120
  }
126
121
  }
127
- }, [S, ae, P, x.length, f, w.mode, w.set, d, D]);
128
- const I = M(null);
129
- F(() => {
130
- if (!j.current || !Q) return;
122
+ }, [S, oe, P, x.length, f, w.mode, w.set, d, D]);
123
+ const M = E(null);
124
+ R(() => {
125
+ if (!j.current || !X) return;
131
126
  const e = () => {
132
127
  if (A || P) return;
133
128
  const { scrollTop: n, scrollHeight: r, clientHeight: s } = j.current;
134
129
  if (r - n - s <= 10) {
135
- if (I.current) return;
136
- Q(), I.current = setTimeout(() => {
137
- I.current = null;
130
+ if (M.current) return;
131
+ X(), M.current = setTimeout(() => {
132
+ M.current = null;
138
133
  }, 500);
139
134
  }
140
135
  }, t = j.current;
141
136
  return t.addEventListener("scroll", e), !A && !P && e(), () => {
142
- t.removeEventListener("scroll", e), I.current && (clearTimeout(I.current), I.current = null);
137
+ t.removeEventListener("scroll", e), M.current && (clearTimeout(M.current), M.current = null);
143
138
  };
144
139
  }, [
145
- Q,
140
+ X,
146
141
  x.length,
147
142
  S,
148
143
  A,
149
144
  P
150
145
  ]);
151
- const Xe = (e) => {
146
+ const et = (e) => {
152
147
  if (!C)
153
- if (ve(e), e)
148
+ if (we(e), e)
154
149
  Fe?.();
155
150
  else {
156
151
  const t = d, n = f && y(d) ? d.map((r) => r.value) : void 0;
157
- pe?.(t, n), _(""), X(null);
152
+ xe?.(t, n), B(""), ee(null);
158
153
  }
159
- }, ye = (e) => {
154
+ }, Ne = (e) => {
160
155
  if (!(C || b || e.isDisabled || ("children" in e || "options" in e) && e.isParentSelectable === !1))
161
156
  if (f) {
162
157
  const n = d || [];
163
158
  if ("children" in e || "options" in e) {
164
- const s = pt(
159
+ const s = xt(
165
160
  e,
166
161
  v,
167
162
  N
@@ -174,7 +169,7 @@ const gt = (ie) => {
174
169
  i ? s.forEach((m) => {
175
170
  c.includes(m.value) || c.push(m.value);
176
171
  }) : c = c.filter(
177
- (m) => !s.some((W) => W.value === m)
172
+ (m) => !s.some((U) => U.value === m)
178
173
  );
179
174
  const o = {
180
175
  isAllSelected: !0,
@@ -193,7 +188,7 @@ const gt = (ie) => {
193
188
  (o) => !s.some((m) => m.value === o.value)
194
189
  ) : s.forEach((o) => {
195
190
  c.some((m) => m.value === o.value) || c.push(o);
196
- }), h && c.length > h)
191
+ }), p && c.length > p)
197
192
  return;
198
193
  g(c), u && u(c, {
199
194
  action: "select-option",
@@ -218,7 +213,7 @@ const gt = (ie) => {
218
213
  if (s)
219
214
  l = r.filter((i) => i.value !== e.value);
220
215
  else {
221
- if (h && n.length >= h)
216
+ if (p && n.length >= p)
222
217
  return;
223
218
  l = [...r, e];
224
219
  }
@@ -231,22 +226,22 @@ const gt = (ie) => {
231
226
  g(e), u && u(e, {
232
227
  action: "select-option",
233
228
  option: e
234
- }), Ae && (ve(!1), pe?.(e, void 0), _(""));
235
- }, Ze = async () => {
229
+ }), $e && (we(!1), xe?.(e, void 0), B(""));
230
+ }, tt = async () => {
236
231
  if (!(!f || C || b)) {
237
- if ($.length > 3e3) {
232
+ if (I.length > 3e3) {
238
233
  try {
239
- const e = await Qe(
234
+ const e = await Ze(
240
235
  d,
241
236
  k(d),
242
- h
237
+ p
243
238
  );
244
239
  g(e), u && u(e, { action: "select-option" });
245
240
  } catch {
246
241
  }
247
242
  return;
248
243
  }
249
- if (L) {
244
+ if (T) {
250
245
  let e = !1;
251
246
  for (const n of x)
252
247
  if (!n.isGroup && !n.isSubmenuParent && !n.isDisabled) {
@@ -286,12 +281,12 @@ const gt = (ie) => {
286
281
  for (const o of x)
287
282
  !o.isGroup && !o.isSubmenuParent && !o.isDisabled && (c.has(o.value) || (i.push(o), c.add(o.value)));
288
283
  }
289
- if (h && i.length > h)
284
+ if (p && i.length > p)
290
285
  return;
291
286
  g(i), u && u(i, { action: "select-option" });
292
287
  }
293
- } else if (h) {
294
- const e = d, { totalVisible: t } = G, n = y(e) ? e.length : 0, r = Math.min(t, h);
288
+ } else if (p) {
289
+ const e = d, { totalVisible: t } = G, n = y(e) ? e.length : 0, r = Math.min(t, p);
295
290
  if (y(e) && n >= r && n > 0) {
296
291
  const s = e.filter((l) => l.isDisabled);
297
292
  g(s), u && u(s, {
@@ -303,7 +298,7 @@ const gt = (ie) => {
303
298
  );
304
299
  let l = s.length;
305
300
  for (const i of x)
306
- if (!i.isGroup && !i.isSubmenuParent && !i.isDisabled && (s.push(i), l++, l >= h))
301
+ if (!i.isGroup && !i.isSubmenuParent && !i.isDisabled && (s.push(i), l++, l >= p))
307
302
  break;
308
303
  g(s), u && u(s, {
309
304
  action: "select-option"
@@ -311,7 +306,7 @@ const gt = (ie) => {
311
306
  }
312
307
  } else {
313
308
  const e = d, t = k(e) && e.excludedValues.length === 0;
314
- if (ie.enableInvertedSelection)
309
+ if (re.enableInvertedSelection)
315
310
  if (t) {
316
311
  const n = y(e) ? e.filter((r) => r.isDisabled) : [];
317
312
  g(n), u && u(n, {
@@ -344,7 +339,7 @@ const gt = (ie) => {
344
339
  }
345
340
  }
346
341
  }
347
- }, et = (e) => {
342
+ }, lt = (e) => {
348
343
  if (e.stopPropagation(), !b)
349
344
  if (f) {
350
345
  const t = [], n = (s) => {
@@ -363,9 +358,9 @@ const gt = (ie) => {
363
358
  i.isDisabled && (w.mode === "exclude" ? !w.set.has(i.value) : w.set.has(i.value)) && t.push(i);
364
359
  }
365
360
  };
366
- n($);
361
+ n(I);
367
362
  const r = t;
368
- g(r), u && u(r, { action: "clear" }), ge?.();
363
+ g(r), u && u(r, { action: "clear" }), Se?.();
369
364
  } else {
370
365
  const t = d;
371
366
  if (t) {
@@ -392,125 +387,121 @@ const gt = (ie) => {
392
387
  }
393
388
  }
394
389
  };
395
- if (s($), r?.isDisabled)
390
+ if (s(I), r?.isDisabled)
396
391
  return;
397
392
  }
398
393
  const n = null;
399
- g(n), u && u(n, { action: "clear" }), ge?.();
394
+ g(n), u && u(n, { action: "clear" }), Se?.();
400
395
  }
401
- }, tt = (e) => mt(
396
+ }, nt = (e) => ht(
402
397
  e,
403
- re ?? !1,
398
+ ce ?? !1,
404
399
  f ?? !1,
405
400
  Te,
406
401
  d
407
- ), B = (e) => fe ? fe(e) : e.label, lt = () => {
402
+ ), W = (e) => pe ? pe(e) : e.label, st = () => {
408
403
  if (f) {
409
404
  const e = d || [];
410
405
  let t = 0;
411
- return k(e) ? t = we - 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: B(e[0]) }) : /* @__PURE__ */ p("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: [
412
- "Selected (",
413
- t,
414
- ")"
415
- ] });
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 }) });
416
407
  } else {
417
408
  const e = d;
418
- return e ? /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: B(e) }) : null;
409
+ return e ? /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: W(e) }) : null;
419
410
  }
420
411
  };
421
- return /* @__PURE__ */ p(
412
+ return /* @__PURE__ */ h(
422
413
  "div",
423
414
  {
424
415
  className: O(
425
416
  "flex gap-[6px]",
426
- he === "left" ? "w-fit flex-row items-center" : "w-full flex-col",
427
- Ie
417
+ be === "left" ? "w-fit flex-row items-center" : "w-full flex-col",
418
+ ze
428
419
  ),
429
- onFocus: Be,
430
- onBlur: We,
420
+ onFocus: Ue,
421
+ onBlur: Ye,
431
422
  tabIndex: C ? -1 : 0,
432
423
  "data-testid": `select-${V || "default"}`,
433
424
  "data-component": "select",
434
425
  children: [
435
- oe && /* @__PURE__ */ p(
426
+ ue && /* @__PURE__ */ h(
436
427
  "label",
437
428
  {
438
429
  className: O(
439
430
  "text-[12px] font-medium text-[#60697d] leading-[18px]",
440
- he === "left" ? "shrink-0" : ""
431
+ be === "left" ? "shrink-0" : ""
441
432
  ),
442
433
  children: [
443
- oe,
434
+ ue,
444
435
  " ",
445
- $e && /* @__PURE__ */ a("span", { className: "text-[red]", children: "*" })
436
+ Ge && /* @__PURE__ */ a("span", { className: "text-[red]", children: "*" })
446
437
  ]
447
438
  }
448
439
  ),
449
- /* @__PURE__ */ p(Y.Root, { open: S, onOpenChange: Xe, children: [
450
- /* @__PURE__ */ a(Y.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
440
+ /* @__PURE__ */ h(J.Root, { open: S, onOpenChange: et, children: [
441
+ /* @__PURE__ */ a(J.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
451
442
  "div",
452
443
  {
453
- ref: Je,
444
+ ref: Qe,
454
445
  className: O(
455
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",
456
- K ? "border-[#e15554] focus:ring-[#e15554]" : "border-[#c3c8d4] hover:border-gray-400 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500",
447
+ Q ? "border-[#e15554] focus:ring-[#e15554]" : "border-[#c3c8d4] hover:border-gray-400 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500",
457
448
  C ? "bg-[#f2f4fb] cursor-not-allowed opacity-75" : "",
458
449
  b ? "cursor-default bg-[#f2f4fb]" : "",
459
450
  S ? "ring-1 ring-indigo-500 border-indigo-500" : "",
460
451
  !C && !b && "bg-white",
461
- Ge
452
+ Me
462
453
  ),
463
454
  id: V,
464
455
  "data-component": "select-trigger",
465
456
  "data-disabled": C || void 0,
466
457
  "data-state": S ? "open" : "closed",
467
- children: /* @__PURE__ */ p("div", { className: "flex items-center justify-between w-full min-w-0 max-w-full", children: [
468
- xe && /* @__PURE__ */ a("div", { className: "flex items-center text-gray-500 shrink-0", children: xe }),
469
- /* @__PURE__ */ p(
458
+ children: /* @__PURE__ */ h("div", { className: "flex items-center justify-between w-full min-w-0 max-w-full", children: [
459
+ ge && /* @__PURE__ */ a("div", { className: "flex items-center text-gray-500 shrink-0", children: ge }),
460
+ /* @__PURE__ */ h(
470
461
  "div",
471
462
  {
472
463
  className: "flex-1 flex items-center overflow-hidden min-w-0 max-w-full",
473
464
  "data-testid": `select-value-${V || "default"}`,
474
465
  children: [
475
- lt() || /* @__PURE__ */ a(
466
+ st() || /* @__PURE__ */ a(
476
467
  "span",
477
468
  {
478
469
  className: "text-[#b4bac7] font-normal text-[14px] truncate min-w-0 block",
479
470
  "data-testid": `select-placeholder-${V || "default"}`,
480
471
  "data-has-value": !1,
481
- children: Ce
472
+ children: Je
482
473
  }
483
474
  ),
484
- E && S && R === "trigger" && !b && /* @__PURE__ */ a(
475
+ F && S && L === "trigger" && !b && /* @__PURE__ */ a(
485
476
  "input",
486
477
  {
487
- ref: Ke,
478
+ ref: Xe,
488
479
  type: "text",
489
480
  className: "flex-1 min-w-[50px] border-none p-0 focus:ring-0 text-sm outline-none h-full",
490
- value: L,
491
- onChange: (e) => _(e.target.value),
481
+ value: T,
482
+ onChange: (e) => B(e.target.value),
492
483
  onClick: (e) => e.stopPropagation(),
493
- autoFocus: ke,
494
- name: ze || void 0
484
+ autoFocus: De,
485
+ name: Ee || void 0
495
486
  }
496
487
  )
497
488
  ]
498
489
  }
499
490
  ),
500
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !S && (A || P) ? /* @__PURE__ */ a(ot, { size: "14px" }) : /* @__PURE__ */ p(st, { children: [
501
- Oe && !b && (f && (k(
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: [
492
+ ke && !b && (f && (k(
502
493
  d
503
494
  ) && d.isAllSelected || y(d) && d.length > 0) || !f && d) && /* @__PURE__ */ a(
504
495
  "div",
505
496
  {
506
497
  role: "button",
507
- onClick: et,
498
+ onClick: lt,
508
499
  className: "hover:text-gray-600 p-0.5",
509
- children: /* @__PURE__ */ a(ct, { size: "11px", color: "#758490" })
500
+ children: /* @__PURE__ */ a(dt, { size: "11px", color: "#758490" })
510
501
  }
511
502
  ),
512
503
  /* @__PURE__ */ a(
513
- Ve,
504
+ Pe,
514
505
  {
515
506
  size: "16px",
516
507
  className: O(
@@ -523,10 +514,10 @@ const gt = (ie) => {
523
514
  ] })
524
515
  }
525
516
  ) }),
526
- /* @__PURE__ */ a(Y.Portal, { children: /* @__PURE__ */ p(
527
- Y.Content,
517
+ /* @__PURE__ */ a(J.Portal, { children: /* @__PURE__ */ h(
518
+ J.Content,
528
519
  {
529
- ref: Z,
520
+ ref: te,
530
521
  side: "bottom",
531
522
  sideOffset: 4,
532
523
  align: "start",
@@ -538,42 +529,44 @@ const gt = (ie) => {
538
529
  onWheel: (e) => e.stopPropagation(),
539
530
  onPointerDown: (e) => e.stopPropagation(),
540
531
  style: {
541
- width: _e || "var(--radix-popover-trigger-width)",
542
- minHeight: Ue ?? void 0
532
+ width: We || "var(--radix-popover-trigger-width)",
533
+ maxHeight: "var(--radix-popover-content-available-height)",
534
+ minHeight: ye ? `${ye}px` : void 0
543
535
  },
544
536
  className: O(
545
- "z-50 max-h-80 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",
537
+ "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",
546
538
  b ? "bg-[#f5f5f5]" : "bg-white"
547
539
  ),
548
540
  "data-testid": `select-menu-${V || "default"}`,
549
541
  "data-component": "select-menu",
550
542
  children: [
551
- /* @__PURE__ */ p(
543
+ /* @__PURE__ */ h(
552
544
  "div",
553
545
  {
554
546
  className: O(
555
547
  "flex flex-col z-10 sticky top-0 px-[6px] pt-[8px]",
556
548
  b ? "bg-[#f5f5f5]" : "bg-white",
557
- !H && (E && R === "menu" && !b || f && ue && !b && x.length > 0) ? "border-b border-solid border-gray-100" : ""
549
+ !_ && (F && L === "menu" && !b || f && fe && !b && x.length > 0) ? "border-b border-solid border-gray-100" : ""
558
550
  ),
559
551
  children: [
560
- E && R === "menu" && !b && !H && /* @__PURE__ */ a(
552
+ F && L === "menu" && !b && !_ && /* @__PURE__ */ a(
561
553
  "div",
562
554
  {
563
555
  className: "p-0",
564
556
  "data-testid": `select-search-container-${V || "default"}`,
565
- children: /* @__PURE__ */ p("div", { className: "relative", children: [
566
- /* @__PURE__ */ a("div", { className: "absolute inset-y-0 left-[12px] flex items-center pointer-events-none", children: /* @__PURE__ */ a(ut, { size: "14px", color: "#AFAFAF" }) }),
557
+ children: /* @__PURE__ */ h("div", { className: "relative", children: [
558
+ /* @__PURE__ */ a("div", { className: "absolute inset-y-0 left-[12px] flex items-center pointer-events-none", children: /* @__PURE__ */ a(ft, { size: "14px", color: "#AFAFAF" }) }),
567
559
  /* @__PURE__ */ a(
568
560
  "input",
569
561
  {
570
- ref: ee,
562
+ ref: le,
571
563
  type: "text",
572
564
  className: "block w-full pl-[34px] pr-4 h-[35px] border-none border-b border-primary text-sm outline-none focus:ring-0",
573
- placeholder: "Search here...",
574
- value: L,
565
+ placeholder: H("select.searchHere"),
566
+ value: T,
575
567
  onChange: (e) => {
576
- _(e.target.value), Me?.(e.target.value);
568
+ const t = e.target.value;
569
+ T === "" && t !== "" ? te.current && Z(te.current.offsetHeight) : t === "" && Z(void 0), B(t), Re?.(t);
577
570
  },
578
571
  onClick: (e) => e.stopPropagation(),
579
572
  "data-testid": `select-search-input-${V || "default"}`
@@ -582,7 +575,7 @@ const gt = (ie) => {
582
575
  ] })
583
576
  }
584
577
  ),
585
- !A && !P && !H && f && ue && !b && x.length > 0 && /* @__PURE__ */ a(
578
+ !A && !P && !_ && f && fe && !b && x.length > 0 && /* @__PURE__ */ a(
586
579
  "div",
587
580
  {
588
581
  className: "pb-1",
@@ -591,16 +584,16 @@ const gt = (ie) => {
591
584
  "div",
592
585
  {
593
586
  className: "flex items-center justify-between cursor-pointer rounded-md hover:bg-gray-100 transition-colors py-[6px] px-3 w-full",
594
- onClick: Ze,
587
+ onClick: tt,
595
588
  "data-testid": `select-select-all-button-${V || "default"}`,
596
- children: /* @__PURE__ */ p("div", { className: "flex items-center flex-1", children: [
589
+ children: /* @__PURE__ */ h("div", { className: "flex items-center flex-1", children: [
597
590
  /* @__PURE__ */ a("div", { className: "pointer-events-none flex", children: /* @__PURE__ */ a(
598
- Ne,
591
+ Oe,
599
592
  {
600
593
  checked: (() => {
601
594
  const { totalVisible: e, selectedVisible: t } = G;
602
595
  if (e === 0) return !1;
603
- const n = h ? Math.min(e, h) : e;
596
+ const n = p ? Math.min(e, p) : e;
604
597
  return t > 0 && t < n ? "indeterminate" : t >= n;
605
598
  })(),
606
599
  disabled: C || b,
@@ -615,8 +608,8 @@ const gt = (ie) => {
615
608
  className: "text-sm font-medium text-gray-700",
616
609
  "data-testid": `select-select-all-label-${V || "default"}`,
617
610
  children: (() => {
618
- const { totalVisible: e, selectedVisible: t } = G, n = h ? Math.min(e, h) : e;
619
- return e > 0 && t >= n ? "Unselect All" : "Select All";
611
+ const { totalVisible: e, selectedVisible: t } = G, n = p ? Math.min(e, p) : e, r = e > 0 && t >= n;
612
+ return H(r ? "select.unselectAll" : "select.selectAll");
620
613
  })()
621
614
  }
622
615
  )
@@ -633,21 +626,24 @@ const gt = (ie) => {
633
626
  {
634
627
  ref: j,
635
628
  className: "flex-1 overflow-auto py-1 px-[6px]",
636
- style: { maxHeight: "300px", overscrollBehavior: "contain" },
629
+ style: {
630
+ maxHeight: "297px",
631
+ overscrollBehavior: "contain"
632
+ },
637
633
  onWheel: (e) => e.stopPropagation(),
638
634
  onPointerDown: (e) => e.stopPropagation(),
639
- children: H ? /* @__PURE__ */ p("div", { className: "flex flex-col items-center justify-center py-8 px-4 text-center", children: [
635
+ children: _ ? /* @__PURE__ */ h("div", { className: "flex flex-col items-center justify-center py-8 px-4 text-center", children: [
640
636
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-500 font-medium mb-3", children: "Something went wrong" }),
641
- be && /* @__PURE__ */ a(
642
- dt,
637
+ ve && /* @__PURE__ */ a(
638
+ mt,
643
639
  {
644
640
  size: "sm",
645
641
  variant: "outline",
646
- onClick: () => be(),
642
+ onClick: () => ve(),
647
643
  children: "Refetch"
648
644
  }
649
645
  )
650
- ] }) : 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__ */ p(
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(
651
647
  "div",
652
648
  {
653
649
  className: "flex items-center gap-2 px-3 py-2 animate-pulse",
@@ -666,10 +662,10 @@ const gt = (ie) => {
666
662
  position: "relative"
667
663
  },
668
664
  children: D.getVirtualItems().map((e) => {
669
- 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 && h ? k(r) ? !1 : y(r) && r.length >= h : !1, l = t.isDisabled || s && !n && !(N && t.isGroup) && !(v && t.isSubmenuParent), i = N && t.isGroup || v && t.isSubmenuParent ? te(t.original) : void 0, c = i?.selected || 0, o = i?.total || 0, m = c > 0 && c < o, W = t.isParentSelectable !== !1, le = V || "default", U = String(t.value || ""), ne = B(
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 ? ne(t.original) : void 0, c = i?.selected || 0, o = i?.total || 0, m = c > 0 && c < o, U = t.isParentSelectable !== !1, se = V || "default", Y = String(t.value || ""), ie = W(
670
666
  t
671
- ), nt = typeof ne == "string" ? ne : U;
672
- return /* @__PURE__ */ p(
667
+ ), it = typeof ie == "string" ? ie : Y;
668
+ return /* @__PURE__ */ h(
673
669
  "div",
674
670
  {
675
671
  "data-index": e.index,
@@ -679,7 +675,7 @@ const gt = (ie) => {
679
675
  transform: `translateY(${e.start}px)`,
680
676
  width: "100%"
681
677
  },
682
- "data-testid": `select-option-wrapper-${le}-${U}`,
678
+ "data-testid": `select-option-wrapper-${se}-${Y}`,
683
679
  children: [
684
680
  /* @__PURE__ */ a(
685
681
  "div",
@@ -693,21 +689,21 @@ const gt = (ie) => {
693
689
  paddingLeft: `${t.depth * 16 + 12}px`
694
690
  },
695
691
  onClick: () => {
696
- l || (N && t.isGroup || v && t.isSubmenuParent) && !W || ye(t);
692
+ l || (N && t.isGroup || v && t.isSubmenuParent) && !U || Ne(t);
697
693
  },
698
- onMouseEnter: (T) => {
694
+ onMouseEnter: ($) => {
699
695
  if (v && t.isSubmenuParent) {
700
- X(t.value);
701
- const z = T.currentTarget.getBoundingClientRect();
696
+ ee(t.value);
697
+ const z = $.currentTarget.getBoundingClientRect();
702
698
  t.rect = z;
703
699
  } else
704
- X(null);
700
+ ee(null);
705
701
  },
706
- "data-testid": `select-option-${le}-${U}`,
702
+ "data-testid": `select-option-${se}-${Y}`,
707
703
  "data-state": n ? "checked" : "unchecked",
708
704
  "data-disabled": l || void 0,
709
705
  "data-component": "select-option",
710
- children: me ? me(
706
+ children: he ? he(
711
707
  {
712
708
  onClick: () => {
713
709
  },
@@ -716,9 +712,9 @@ const gt = (ie) => {
716
712
  disabled: l
717
713
  },
718
714
  t
719
- ) : /* @__PURE__ */ p("div", { className: "flex items-center flex-1 overflow-hidden", children: [
720
- f && (N && t.isGroup || v && t.isSubmenuParent ? W : !0) && /* @__PURE__ */ a(
721
- Ne,
715
+ ) : /* @__PURE__ */ h("div", { className: "flex items-center flex-1 overflow-hidden", children: [
716
+ f && (N && t.isGroup || v && t.isSubmenuParent ? U : !0) && /* @__PURE__ */ a(
717
+ Oe,
722
718
  {
723
719
  checked: m ? "indeterminate" : n,
724
720
  disabled: l || b,
@@ -726,15 +722,15 @@ const gt = (ie) => {
726
722
  }
727
723
  }
728
724
  ),
729
- re && !(N && t.isGroup) && !(v && t.isSubmenuParent) ? /* @__PURE__ */ a(
730
- at,
725
+ ce && !(N && t.isGroup) && !(v && t.isSubmenuParent) ? /* @__PURE__ */ a(
726
+ ot,
731
727
  {
732
- label: B(
728
+ label: W(
733
729
  t
734
730
  ),
735
- sequence: tt(t)
731
+ sequence: nt(t)
736
732
  }
737
- ) : /* @__PURE__ */ p("div", { className: "flex items-center gap-2 overflow-hidden w-full", children: [
733
+ ) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2 overflow-hidden w-full", children: [
738
734
  /* @__PURE__ */ a(
739
735
  "span",
740
736
  {
@@ -743,16 +739,16 @@ const gt = (ie) => {
743
739
  N && t.isGroup ? "text-xs font-semibold text-gray-400 uppercase tracking-wider" : n && !(v && t.isSubmenuParent) ? "font-medium" : "font-normal",
744
740
  !(N && t.isGroup) && "text-[14px]"
745
741
  ),
746
- "data-testid": `select-option-label-${le}-${U}`,
742
+ "data-testid": `select-option-label-${se}-${Y}`,
747
743
  "data-state": n ? "checked" : "unchecked",
748
- title: nt,
749
- children: ne
744
+ title: it,
745
+ children: ie
750
746
  }
751
747
  ),
752
748
  (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 })
753
749
  ] }),
754
750
  v && t.isSubmenuParent && /* @__PURE__ */ a(
755
- Ve,
751
+ Pe,
756
752
  {
757
753
  size: "12px",
758
754
  className: "text-gray-400"
@@ -761,19 +757,19 @@ const gt = (ie) => {
761
757
  ] })
762
758
  }
763
759
  ),
764
- v && Ye === t.value && t.isSubmenuParent && t.rect && /* @__PURE__ */ a(
765
- rt,
760
+ v && Ke === t.value && t.isSubmenuParent && t.rect && /* @__PURE__ */ a(
761
+ ct,
766
762
  {
767
763
  parentOption: t,
768
764
  isMulti: !!f,
769
765
  isReadOnly: !!b,
770
- isSelected: (T) => ft(T, d, !!f),
771
- getIndeterminateState: (T) => {
772
- const z = te(T);
766
+ isSelected: ($) => pt($, d, !!f),
767
+ getIndeterminateState: ($) => {
768
+ const z = ne($);
773
769
  return z ? z.selected > 0 && z.selected < z.total : !1;
774
770
  },
775
- getSelectedCount: (T) => te(T)?.selected || 0,
776
- handleSelect: ye,
771
+ getSelectedCount: ($) => ne($)?.selected || 0,
772
+ handleSelect: Ne,
777
773
  id: V
778
774
  }
779
775
  )
@@ -786,31 +782,31 @@ const gt = (ie) => {
786
782
  )
787
783
  }
788
784
  ),
789
- (de || h || $.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: h ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
790
- /* @__PURE__ */ a(se, { size: "12px", className: "text-gray-400" }),
791
- /* @__PURE__ */ p("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: [
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: [
786
+ /* @__PURE__ */ a(ae, { size: "12px", className: "text-gray-400" }),
787
+ /* @__PURE__ */ h("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: [
792
788
  "Maximum ",
793
- h,
789
+ p,
794
790
  " selections"
795
791
  ] })
796
- ] }) : $.length > 5e3 ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
797
- /* @__PURE__ */ a(se, { size: "12px", className: "text-gray-400" }),
792
+ ] }) : I.length > 5e3 ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
793
+ /* @__PURE__ */ a(ae, { size: "12px", className: "text-gray-400" }),
798
794
  /* @__PURE__ */ a("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: "Large dataset detected. Operations might be slower." })
799
- ] }) : de })
795
+ ] }) : me })
800
796
  ]
801
797
  }
802
798
  ) })
803
799
  ] }),
804
- ce && /* @__PURE__ */ p(
800
+ de && /* @__PURE__ */ h(
805
801
  "p",
806
802
  {
807
803
  className: O(
808
804
  "text-[12px] mt-1 flex items-center gap-1",
809
- K ? "text-[#e15554]" : "text-gray-500"
805
+ Q ? "text-[#e15554]" : "text-gray-500"
810
806
  ),
811
807
  children: [
812
- K && /* @__PURE__ */ a(se, { size: "12px" }),
813
- ce
808
+ Q && /* @__PURE__ */ a(ae, { size: "12px" }),
809
+ de
814
810
  ]
815
811
  }
816
812
  )
@@ -818,7 +814,7 @@ const gt = (ie) => {
818
814
  }
819
815
  );
820
816
  };
821
- gt.displayName = "Select";
817
+ wt.displayName = "Select";
822
818
  export {
823
- gt as default
819
+ wt as default
824
820
  };