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,3 +1,9 @@
1
+ const F = {
2
+ system: "System",
3
+ user: "User",
4
+ browser: "Browser",
5
+ "ag-grid": "Table"
6
+ };
1
7
  let f = null;
2
8
  function u() {
3
9
  return f !== null ? f : typeof navigator > "u" ? !1 : (f = /mac|ipod|iphone|ipad/i.test(navigator.platform ?? navigator.userAgent ?? ""), f);
@@ -33,21 +39,21 @@ const p = {
33
39
  tab: "Tab",
34
40
  space: "Space"
35
41
  };
36
- function h(t) {
37
- return (u() ? p : w)[t.toLowerCase()] ?? t.toUpperCase();
42
+ function h(e) {
43
+ return (u() ? p : w)[e.toLowerCase()] ?? e.toUpperCase();
38
44
  }
39
- function C(t) {
40
- const e = [];
41
- return u() ? (t.ctrl && e.push(h("ctrl")), t.alt && e.push(h("alt")), t.shift && e.push(h("shift")), t.meta && e.push(h("meta"))) : ((t.meta || t.ctrl) && e.push(h("ctrl")), t.alt && e.push(h("alt")), t.shift && e.push(h("shift"))), e.push(h(t.key)), e;
45
+ function C(e) {
46
+ const t = [];
47
+ return u() ? (e.ctrl && t.push(h("ctrl")), e.alt && t.push(h("alt")), e.shift && t.push(h("shift")), e.meta && t.push(h("meta"))) : ((e.meta || e.ctrl) && t.push(h("ctrl")), e.alt && t.push(h("alt")), e.shift && t.push(h("shift"))), t.push(h(e.key)), t;
42
48
  }
43
- function F(t) {
44
- const e = C(t);
45
- return u() ? e.join("") : e.join("+");
49
+ function K(e) {
50
+ const t = C(e);
51
+ return u() ? t.join("") : t.join("+");
46
52
  }
47
- function K(t, e) {
48
- let o = t.key.toLowerCase() === e.key.toLowerCase();
49
- if (!o && e.alt && u()) {
50
- const n = t.code, i = e.key.toLowerCase();
53
+ function O(e, t) {
54
+ let o = e.key.toLowerCase() === t.key.toLowerCase();
55
+ if (!o && t.alt && u()) {
56
+ const n = e.code, i = t.key.toLowerCase();
51
57
  n.startsWith("Key") ? o = n.slice(3).toLowerCase() === i : n.startsWith("Digit") ? o = n.slice(5) === i : o = ({
52
58
  Comma: ",",
53
59
  Period: ".",
@@ -63,31 +69,31 @@ function K(t, e) {
63
69
  }[n] ?? n.toLowerCase()) === i;
64
70
  }
65
71
  if (!o) return !1;
66
- const a = !!e.meta, r = !!e.ctrl, s = !!e.alt, c = !!e.shift;
72
+ const a = !!t.meta, r = !!t.ctrl, s = !!t.alt, c = !!t.shift;
67
73
  if (u())
68
- return t.metaKey === a && t.ctrlKey === r && t.altKey === s && t.shiftKey === c;
74
+ return e.metaKey === a && e.ctrlKey === r && e.altKey === s && e.shiftKey === c;
69
75
  const m = a || r;
70
- return t.ctrlKey === m && t.altKey === s && t.shiftKey === c && !t.metaKey;
76
+ return e.ctrlKey === m && e.altKey === s && e.shiftKey === c && !e.metaKey;
71
77
  }
72
- function k(t) {
73
- const e = { key: "" }, o = t.includes("+") ? t.split("+").map((a) => a.trim()) : S(t);
78
+ function k(e) {
79
+ const t = { key: "" }, o = e.includes("+") ? e.split("+").map((a) => a.trim()) : S(e);
74
80
  for (const a of o) {
75
81
  const r = a.toLowerCase();
76
- r === "⌘" || r === "meta" || r === "cmd" || r === "command" ? e.meta = !0 : r === "⌃" || r === "ctrl" || r === "control" ? e.ctrl = !0 : r === "⌥" || r === "alt" || r === "option" ? e.alt = !0 : r === "⇧" || r === "shift" ? e.shift = !0 : e.key = a;
82
+ r === "⌘" || r === "meta" || r === "cmd" || r === "command" ? t.meta = !0 : r === "⌃" || r === "ctrl" || r === "control" ? t.ctrl = !0 : r === "⌥" || r === "alt" || r === "option" ? t.alt = !0 : r === "⇧" || r === "shift" ? t.shift = !0 : t.key = a;
77
83
  }
78
- return e;
84
+ return t;
79
85
  }
80
- function S(t) {
81
- const e = ["⌘", "⌃", "⌥", "⇧"], o = [];
82
- let a = t;
83
- for (const r of e)
86
+ function S(e) {
87
+ const t = ["⌘", "⌃", "⌥", "⇧"], o = [];
88
+ let a = e;
89
+ for (const r of t)
84
90
  a.includes(r) && (o.push(r), a = a.replace(r, ""));
85
91
  return a.trim() && o.push(a.trim()), o;
86
92
  }
87
- function O(t, e) {
88
- return t.key.toLowerCase() === e.key.toLowerCase() && !!t.meta == !!e.meta && !!t.ctrl == !!e.ctrl && !!t.alt == !!e.alt && !!t.shift == !!e.shift;
93
+ function L(e, t) {
94
+ return e.key.toLowerCase() === t.key.toLowerCase() && !!e.meta == !!t.meta && !!e.ctrl == !!t.ctrl && !!e.alt == !!t.alt && !!e.shift == !!t.shift;
89
95
  }
90
- function L(t) {
96
+ function B(e) {
91
97
  if ((/* @__PURE__ */ new Set([
92
98
  "Control",
93
99
  "Shift",
@@ -96,10 +102,10 @@ function L(t) {
96
102
  "CapsLock",
97
103
  "NumLock",
98
104
  "ScrollLock"
99
- ])).has(t.key)) return null;
100
- let o = t.key;
101
- if (t.altKey && u()) {
102
- const a = t.code;
105
+ ])).has(e.key)) return null;
106
+ let o = e.key;
107
+ if (e.altKey && u()) {
108
+ const a = e.code;
103
109
  a.startsWith("Key") ? o = a.slice(3).toLowerCase() : a.startsWith("Digit") ? o = a.slice(5) : o = {
104
110
  Comma: ",",
105
111
  Period: ".",
@@ -116,10 +122,10 @@ function L(t) {
116
122
  }
117
123
  return {
118
124
  key: o,
119
- meta: u() ? t.metaKey : !1,
120
- ctrl: u() ? t.ctrlKey : t.ctrlKey || t.metaKey,
121
- alt: t.altKey,
122
- shift: t.shiftKey
125
+ meta: u() ? e.metaKey : !1,
126
+ ctrl: u() ? e.ctrlKey : e.ctrlKey || e.metaKey,
127
+ alt: e.altKey,
128
+ shift: e.shiftKey
123
129
  };
124
130
  }
125
131
  const b = [
@@ -197,25 +203,25 @@ const b = [
197
203
  { shortcut: "ctrl+shift+i", label: "DevTools (Windows)", category: "System" },
198
204
  { shortcut: "ctrl+shift+j", label: "DevTools Console (Windows)", category: "System" }
199
205
  ], g = new Set(
200
- b.map((t) => t.shortcut)
206
+ b.map((e) => e.shortcut)
201
207
  );
202
- function d(t) {
203
- const e = [];
204
- return (t.meta || t.ctrl) && e.push("meta"), t.alt && e.push("alt"), t.shift && e.push("shift"), e.push(t.key.toLowerCase()), e.join("+");
208
+ function d(e) {
209
+ const t = [];
210
+ return (e.meta || e.ctrl) && t.push("meta"), e.alt && t.push("alt"), e.shift && t.push("shift"), t.push(e.key.toLowerCase()), t.join("+");
205
211
  }
206
- function R(t) {
207
- const e = d(t);
208
- return g.has(e) || g.has(e.replace("meta+", "ctrl+"));
212
+ function R(e) {
213
+ const t = d(e);
214
+ return g.has(t) || g.has(t.replace("meta+", "ctrl+"));
209
215
  }
210
- function B(t) {
211
- const e = d(t);
216
+ function M(e) {
217
+ const t = d(e);
212
218
  return b.find(
213
- (o) => o.shortcut === e || o.shortcut === e.replace("meta+", "ctrl+")
219
+ (o) => o.shortcut === t || o.shortcut === t.replace("meta+", "ctrl+")
214
220
  );
215
221
  }
216
- function T(t, e) {
217
- if (!t) return { score: 0, matches: [] };
218
- const o = t.toLowerCase(), a = e.toLowerCase();
222
+ function T(e, t) {
223
+ if (!e) return { score: 0, matches: [] };
224
+ const o = e.toLowerCase(), a = t.toLowerCase();
219
225
  let r = 0;
220
226
  for (const l of o) {
221
227
  const y = a.indexOf(l, r);
@@ -225,15 +231,15 @@ function T(t, e) {
225
231
  let s = 0, c = 0, m = 0;
226
232
  const n = [];
227
233
  let i = -1;
228
- for (let l = 0; l < e.length && c < o.length; l++)
229
- a[l] === o[c] ? (s += 1, m++, m > 1 && (s += m), (l === 0 || /[\s\-_./:]/.test(e[l - 1])) && (s += 5), e[l] === t[c] && (s += 0.5), i === -1 && (i = l), c++) : (i !== -1 && (n.push([i, l - 1]), i = -1), m = 0);
230
- return i !== -1 && n.push([i, i + (c - n.reduce((l, y) => l + (y[1] - y[0] + 1), 0)) - 1]), c < o.length ? null : (a.startsWith(o) && (s += 10), s += Math.max(0, 5 - (e.length - t.length) * 0.1), { score: s, matches: n });
234
+ for (let l = 0; l < t.length && c < o.length; l++)
235
+ a[l] === o[c] ? (s += 1, m++, m > 1 && (s += m), (l === 0 || /[\s\-_./:]/.test(t[l - 1])) && (s += 5), t[l] === e[c] && (s += 0.5), i === -1 && (i = l), c++) : (i !== -1 && (n.push([i, l - 1]), i = -1), m = 0);
236
+ return i !== -1 && n.push([i, i + (c - n.reduce((l, y) => l + (y[1] - y[0] + 1), 0)) - 1]), c < o.length ? null : (a.startsWith(o) && (s += 10), s += Math.max(0, 5 - (t.length - e.length) * 0.1), { score: s, matches: n });
231
237
  }
232
- function M(t, e, o) {
233
- if (!e.trim()) return t.map((r) => ({ item: r, score: 0, matches: [] }));
238
+ function E(e, t, o) {
239
+ if (!t.trim()) return e.map((r) => ({ item: r, score: 0, matches: [] }));
234
240
  const a = [];
235
- for (const r of t) {
236
- const s = o(r), c = T(e, s);
241
+ for (const r of e) {
242
+ const s = o(r), c = T(t, s);
237
243
  c && a.push({ item: r, score: c.score, matches: c.matches });
238
244
  }
239
245
  return a.sort((r, s) => s.score - r.score), a;
@@ -244,40 +250,41 @@ const W = {
244
250
  page: 2,
245
251
  modal: 3
246
252
  };
247
- function D(t) {
248
- return W[t];
253
+ function D(e) {
254
+ return W[e];
249
255
  }
250
- function E(t) {
251
- const e = [];
252
- return t.forEach((o, a) => {
253
- e.push({ commandId: a, keybinding: o });
254
- }), JSON.stringify(e);
256
+ function x(e) {
257
+ const t = [];
258
+ return e.forEach((o, a) => {
259
+ t.push({ commandId: a, keybinding: o });
260
+ }), JSON.stringify(t);
255
261
  }
256
- function x(t) {
257
- const e = /* @__PURE__ */ new Map();
262
+ function _(e) {
263
+ const t = /* @__PURE__ */ new Map();
258
264
  try {
259
- const o = JSON.parse(t);
265
+ const o = JSON.parse(e);
260
266
  for (const a of o)
261
- e.set(a.commandId, a.keybinding);
267
+ t.set(a.commandId, a.keybinding);
262
268
  } catch {
263
269
  }
264
- return e;
270
+ return t;
265
271
  }
266
272
  export {
267
273
  b as BROWSER_SHORTCUTS,
268
- x as deserialiseOverrides,
269
- M as fuzzyFilter,
274
+ F as COMMAND_SOURCE_LABELS,
275
+ _ as deserialiseOverrides,
276
+ E as fuzzyFilter,
270
277
  T as fuzzyScore,
271
- B as getBrowserShortcutInfo,
278
+ M as getBrowserShortcutInfo,
272
279
  h as getKeySymbol,
273
280
  u as isMac,
274
281
  R as isReservedShortcut,
275
- L as keybindingFromEvent,
276
- F as keybindingToString,
282
+ B as keybindingFromEvent,
283
+ K as keybindingToString,
277
284
  C as keybindingToSymbols,
278
- O as keybindingsEqual,
279
- K as matchesKeybinding,
285
+ L as keybindingsEqual,
286
+ O as matchesKeybinding,
280
287
  k as parseKeybinding,
281
288
  D as scopePriority,
282
- E as serialiseOverrides
289
+ x as serialiseOverrides
283
290
  };
@@ -1,41 +1,41 @@
1
- import { jsx as w } from "react/jsx-runtime";
2
- import { useState as j, useRef as R, useCallback as p, useEffect as A } from "react";
1
+ import { jsx as R } from "react/jsx-runtime";
2
+ import { useState as j, useRef as w, useCallback as p, useEffect as A } from "react";
3
3
  import { useDataTable as B } from "./data-table-context.js";
4
4
  import { NestedList as H } from "../nested-list/nested-list.js";
5
5
  import { SelectionMode as J } from "../types/nested-list.types.js";
6
6
  import { useImpactNovaI18n as K } from "../../../i18n/ImpactNovaI18nContext.js";
7
7
  function Q(d, I) {
8
8
  let f = null;
9
- return ((...S) => {
10
- f && clearTimeout(f), f = setTimeout(() => d(...S), I);
9
+ return ((...v) => {
10
+ f && clearTimeout(f), f = setTimeout(() => d(...v), I);
11
11
  });
12
12
  }
13
13
  const le = ({
14
14
  enableApplyDiscard: d = !1,
15
15
  showSearch: I = !0,
16
16
  showSelectAll: f = !0,
17
- showCollapse: S = !0
17
+ showCollapse: v = !0
18
18
  }) => {
19
- const { gridApi: r } = B(), { t: h } = K(), [F, x] = j([]), [U, V] = j(!1), y = R(!1), W = R(/* @__PURE__ */ new Map()), g = p(() => {
20
- if (!r || y.current) return;
19
+ const { gridApi: r } = B(), { t: h } = K(), [F, x] = j([]), [U, V] = j(!1), S = w(!1), W = w(/* @__PURE__ */ new Map()), g = p(() => {
20
+ if (!r || S.current) return;
21
21
  const o = r.getColumnState(), n = new Map(o.map((t) => [t.colId, t]));
22
22
  W.current = n;
23
- const i = r.getColumns() || [], s = new Map(i.map((t) => [t.getColId(), t])), u = [], e = [], T = /* @__PURE__ */ new Map(), k = (t, c) => {
23
+ const s = r.getColumns() || [], i = new Map(s.map((t) => [t.getColId(), t])), u = [], e = [], y = /* @__PURE__ */ new Map(), T = (t, c) => {
24
24
  const l = t.getGroupId();
25
- let a = T.get(l);
25
+ let a = y.get(l);
26
26
  if (a) return a;
27
- const m = t.getOriginalParent(), b = m ? k(m, c).children : c, D = t.getColGroupDef();
27
+ const m = t.getOriginalParent(), b = m ? T(m, c).children : c, D = t.getColGroupDef();
28
28
  return a = {
29
29
  id: l,
30
30
  label: D?.headerName || l,
31
31
  checked: !0,
32
32
  children: [],
33
33
  category: "group"
34
- }, T.set(l, a), b.push(a), a;
34
+ }, y.set(l, a), b.push(a), a;
35
35
  };
36
- let v = 0, L = 0, G = 0, P = 0;
36
+ let k = 0, L = 0, G = 0, P = 0;
37
37
  o.forEach((t) => {
38
- const c = s.get(t.colId);
38
+ const c = i.get(t.colId);
39
39
  if (!c) return;
40
40
  let l = r.getDisplayNameForColumn(c, "header");
41
41
  if (l === "") return;
@@ -51,9 +51,9 @@ const le = ({
51
51
  label: l,
52
52
  checked: a
53
53
  };
54
- t.pinned ? (v++, a && L++) : (G++, a && P++);
54
+ t.pinned ? (k++, a && L++) : (G++, a && P++);
55
55
  const b = t.pinned ? u : e, D = c.getOriginalParent();
56
- D?.getColGroupDef().children ? k(D, b).children.push(m) : b.push(m);
56
+ D?.getColGroupDef().children ? T(D, b).children.push(m) : b.push(m);
57
57
  });
58
58
  const M = (t) => {
59
59
  let c = t.length > 0;
@@ -66,7 +66,7 @@ const le = ({
66
66
  u.length > 0 && N.push({
67
67
  id: "root-frozen",
68
68
  label: h("dataTable.frozenColumns"),
69
- checked: v > 0 && L === v,
69
+ checked: k > 0 && L === k,
70
70
  children: u,
71
71
  category: "structure",
72
72
  isDragDisabled: !0
@@ -78,7 +78,7 @@ const le = ({
78
78
  category: "structure",
79
79
  isDragDisabled: !0
80
80
  }), x(N), V(!0);
81
- }, [r, h]), z = R(null);
81
+ }, [r, h]), z = w(null);
82
82
  A(() => {
83
83
  z.current = Q(g, 150);
84
84
  }, [g]), A(() => {
@@ -93,48 +93,48 @@ const le = ({
93
93
  "columnRowGroupChanged",
94
94
  "columnPivotModeChanged",
95
95
  "columnEverythingChanged"
96
- ], i = () => {
96
+ ], s = () => {
97
97
  z.current?.();
98
98
  };
99
- return r.isDestroyed() || n.forEach((s) => r.addEventListener(s, i)), () => {
100
- clearTimeout(o), r.isDestroyed() || n.forEach((s) => r.removeEventListener(s, i));
99
+ return r.isDestroyed() || n.forEach((i) => r.addEventListener(i, s)), () => {
100
+ clearTimeout(o), r.isDestroyed() || n.forEach((i) => r.removeEventListener(i, s));
101
101
  };
102
102
  }, [r, g]);
103
103
  const O = p((o) => {
104
- const n = [], i = (s, u) => {
105
- s.forEach((e) => {
104
+ const n = [], s = (i, u) => {
105
+ i.forEach((e) => {
106
106
  if (e.id === "root-frozen") {
107
- e.children && i(e.children, "left");
107
+ e.children && s(e.children, "left");
108
108
  return;
109
109
  }
110
110
  if (e.id === "root-scrollable") {
111
- e.children && i(e.children, null);
111
+ e.children && s(e.children, null);
112
112
  return;
113
113
  }
114
- e.category === "group" || e.children && e.children.length > 0 ? e.children && i(e.children, u) : r?.getColumn(e.id) && n.push({
114
+ e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) : r?.getColumn(e.id) && n.push({
115
115
  colId: e.id,
116
116
  pinned: u,
117
117
  hide: !e.checked
118
118
  });
119
119
  });
120
120
  };
121
- return i(o, null), n;
121
+ return s(o, null), n;
122
122
  }, [r]), C = p((o) => {
123
123
  if (!r) return;
124
- y.current = !0;
124
+ S.current = !0;
125
125
  const n = O(o);
126
126
  n.length > 0 && r.applyColumnState({
127
127
  state: n,
128
128
  applyOrder: !0
129
129
  }), setTimeout(() => {
130
- y.current = !1;
130
+ S.current = !1;
131
131
  }, 300);
132
132
  }, [r, O]), _ = p((o) => {
133
133
  C(o);
134
134
  }, [C]), q = p((o) => {
135
135
  d || C(o), x(o);
136
136
  }, [d, C]);
137
- return U ? /* @__PURE__ */ w("div", { className: "flex flex-col h-full bg-white", children: /* @__PURE__ */ w(
137
+ return U ? /* @__PURE__ */ R("div", { className: "flex flex-col h-full bg-canvas-elevated", children: /* @__PURE__ */ R(
138
138
  H,
139
139
  {
140
140
  items: F,
@@ -145,12 +145,12 @@ const le = ({
145
145
  enableSelectAll: f,
146
146
  enableDragDrop: !0,
147
147
  enableCollapse: !0,
148
- enableGlobalCollapse: S,
148
+ enableGlobalCollapse: v,
149
149
  selectionMode: J.CASCADE_DOWN,
150
150
  searchPlaceholder: h("dataTable.searchColumnsPlaceholder"),
151
151
  className: "h-full"
152
152
  }
153
- ) }) : /* @__PURE__ */ w("div", { className: "p-4 text-[13px] text-slate-400", children: h("dataTable.loadingColumns") });
153
+ ) }) : /* @__PURE__ */ R("div", { className: "p-4 text-[13px] text-content-placeholder", children: h("dataTable.loadingColumns") });
154
154
  };
155
155
  export {
156
156
  le as DataTableColumnList
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Minimum height (px) for the `DataTableContent` region (grid + sheet portal host).
3
+ * The scoped settings sheet portals into `absolute inset-0` over this area; the host must be
4
+ * at least this tall or the overlay is clipped and cannot show a usable panel.
5
+ */
6
+ export declare const DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX = 400;
@@ -0,0 +1,4 @@
1
+ const _ = 400;
2
+ export {
3
+ _ as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX
4
+ };
@@ -7,6 +7,10 @@ export interface DataTableContextValue {
7
7
  registerApi: (api: GridApi) => void;
8
8
  sheetTarget: HTMLDivElement | null;
9
9
  setSheetTarget: (node: HTMLDivElement | null) => void;
10
+ /** True while at least one `DataTableSheet` in this table has `open` — expands grid host so the portaled overlay is not clipped. */
11
+ scopedSheetOpen: boolean;
12
+ /** Call `+1` when a sheet opens, `-1` when it closes or unmounts (supports multiple sheets). */
13
+ registerScopedSheetDepth: (delta: 1 | -1) => void;
10
14
  fontSize: DataTableFontSize;
11
15
  setFontSize: (size: DataTableFontSize) => void;
12
16
  numericFormat: DataTableNumericFormat;
@@ -1,68 +1,68 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { useDataTable as d } from "./data-table-context.js";
4
- import { RadioGroup as m, RadioGroupItem as l } from "../radio-group.js";
5
- import { Label as r } from "../label.js";
4
+ import { RadioGroup as o, RadioGroupItem as l } from "../radio-group.js";
5
+ import { Label as n } from "../label.js";
6
6
  import { useImpactNovaI18n as x } from "../../../i18n/ImpactNovaI18nContext.js";
7
7
  const b = () => {
8
- const { t } = x(), {
9
- fontSize: s,
10
- setFontSize: o,
11
- numericFormat: i,
12
- setNumericFormat: c
8
+ const { t: a } = x(), {
9
+ fontSize: c,
10
+ setFontSize: i,
11
+ numericFormat: m,
12
+ setNumericFormat: s
13
13
  } = d();
14
- return /* @__PURE__ */ a("div", { className: "flex flex-col gap-6 px-1 py-1", children: [
15
- /* @__PURE__ */ a("div", { className: "space-y-1", children: [
16
- /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: t("dataTable.fontSize") }),
17
- /* @__PURE__ */ a(
18
- m,
14
+ return /* @__PURE__ */ t("div", { className: "flex flex-col gap-6 px-1 py-1", children: [
15
+ /* @__PURE__ */ t("div", { className: "space-y-1", children: [
16
+ /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-content-icon", children: a("dataTable.fontSize") }),
17
+ /* @__PURE__ */ t(
18
+ o,
19
19
  {
20
- value: s,
20
+ value: c,
21
21
  orientation: "vertical",
22
- onValueChange: (n) => o(n),
22
+ onValueChange: (r) => i(r),
23
23
  className: "flex flex-col",
24
24
  children: [
25
- /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
25
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
26
26
  /* @__PURE__ */ e(l, { value: "small", id: "font-small" }),
27
- /* @__PURE__ */ e(r, { htmlFor: "font-small", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontSmall") })
27
+ /* @__PURE__ */ e(n, { htmlFor: "font-small", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.fontSmall") })
28
28
  ] }),
29
- /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
29
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
30
30
  /* @__PURE__ */ e(l, { value: "medium", id: "font-medium" }),
31
- /* @__PURE__ */ e(r, { htmlFor: "font-medium", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontMediumDefault") })
31
+ /* @__PURE__ */ e(n, { htmlFor: "font-medium", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.fontMediumDefault") })
32
32
  ] }),
33
- /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
33
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
34
34
  /* @__PURE__ */ e(l, { value: "large", id: "font-large" }),
35
- /* @__PURE__ */ e(r, { htmlFor: "font-large", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontLarge") })
35
+ /* @__PURE__ */ e(n, { htmlFor: "font-large", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.fontLarge") })
36
36
  ] })
37
37
  ]
38
38
  }
39
39
  )
40
40
  ] }),
41
- /* @__PURE__ */ a("div", { className: "space-y-1", children: [
42
- /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: t("dataTable.numericValues") }),
43
- /* @__PURE__ */ a(
44
- m,
41
+ /* @__PURE__ */ t("div", { className: "space-y-1", children: [
42
+ /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-content-icon", children: a("dataTable.numericValues") }),
43
+ /* @__PURE__ */ t(
44
+ o,
45
45
  {
46
- value: i,
46
+ value: m,
47
47
  orientation: "vertical",
48
- onValueChange: (n) => c(n),
48
+ onValueChange: (r) => s(r),
49
49
  className: "flex flex-col",
50
50
  children: [
51
- /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
51
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
52
52
  /* @__PURE__ */ e(l, { value: "full", id: "num-full" }),
53
- /* @__PURE__ */ e(r, { htmlFor: "num-full", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericFull") })
53
+ /* @__PURE__ */ e(n, { htmlFor: "num-full", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericFull") })
54
54
  ] }),
55
- /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
55
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
56
56
  /* @__PURE__ */ e(l, { value: "k", id: "num-k" }),
57
- /* @__PURE__ */ e(r, { htmlFor: "num-k", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericK") })
57
+ /* @__PURE__ */ e(n, { htmlFor: "num-k", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericK") })
58
58
  ] }),
59
- /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
59
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
60
60
  /* @__PURE__ */ e(l, { value: "m", id: "num-m" }),
61
- /* @__PURE__ */ e(r, { htmlFor: "num-m", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericM") })
61
+ /* @__PURE__ */ e(n, { htmlFor: "num-m", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericM") })
62
62
  ] }),
63
- /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
63
+ /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
64
64
  /* @__PURE__ */ e(l, { value: "b", id: "num-b" }),
65
- /* @__PURE__ */ e(r, { htmlFor: "num-b", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericB") })
65
+ /* @__PURE__ */ e(n, { htmlFor: "num-b", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericB") })
66
66
  ] })
67
67
  ]
68
68
  }
@@ -1,20 +1,20 @@
1
1
  import { default as React } from 'react';
2
- export declare const DataTableSheet: ({ children, defaultOpen, open: controlledOpen, onOpenChange }: {
2
+ export declare const DataTableSheet: ({ children, defaultOpen, open: controlledOpen, onOpenChange, }: {
3
3
  children: React.ReactNode;
4
4
  defaultOpen?: boolean;
5
5
  open?: boolean;
6
6
  onOpenChange?: (open: boolean) => void;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
8
- export declare const DataTableSheetTrigger: ({ children, asChild }: {
8
+ export declare const DataTableSheetTrigger: ({ children, asChild, }: {
9
9
  children: React.ReactNode;
10
10
  asChild?: boolean;
11
11
  }) => import("react/jsx-runtime").JSX.Element;
12
- export declare const DataTableSheetHeader: ({ title, children, className }: {
12
+ export declare const DataTableSheetHeader: ({ title, children, className, }: {
13
13
  title?: React.ReactNode;
14
14
  children?: React.ReactNode;
15
15
  className?: string;
16
16
  }) => import("react/jsx-runtime").JSX.Element;
17
- export declare const DataTableSheetContent: ({ children, className }: {
17
+ export declare const DataTableSheetContent: ({ children, className, }: {
18
18
  children: React.ReactNode;
19
19
  className?: string;
20
20
  }) => import("react/jsx-runtime").JSX.Element;