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