impact-nova 2.1.0-alpha.7 → 2.1.0-alpha.9

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 (108) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +6 -0
  2. package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
  3. package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
  4. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
  5. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
  6. package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +78 -73
  7. package/dist/components/data/ag-grid-react/headers/custom-header.js +3 -1
  8. package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
  9. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  10. package/dist/components/data/ag-grid-react/index.js +109 -100
  11. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -2
  12. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +4 -3
  13. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
  14. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
  15. package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
  16. package/dist/components/data/ag-grid-react/theme.js +93 -21
  17. package/dist/components/data/data-table/column-indicator.d.ts +1 -1
  18. package/dist/components/data/data-table/column-indicator.js +15 -11
  19. package/dist/components/data/data-table/data-table-column-def-pin.d.ts +9 -4
  20. package/dist/components/data/data-table/data-table-column-def-pin.js +38 -38
  21. package/dist/components/data/data-table/data-table-saved-views.js +37 -37
  22. package/dist/components/data/data-table/data-table.js +78 -73
  23. package/dist/components/data/data-table/data-table.types.d.ts +7 -1
  24. package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
  25. package/dist/components/data/data-table/indicator-legend.js +20 -17
  26. package/dist/components/data/data-table/pin-switch.js +9 -9
  27. package/dist/components/data/data-table/use-data-table-column-list-sync.js +92 -89
  28. package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
  29. package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
  30. package/dist/components/data/nested-list/nested-list.js +107 -97
  31. package/dist/components/data-display/calendar/calendar.d.ts +1 -1
  32. package/dist/components/data-display/calendar/calendar.js +194 -189
  33. package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
  34. package/dist/components/data-display/chart/chart-palette.js +28 -0
  35. package/dist/components/data-display/chart/chart.js +121 -115
  36. package/dist/components/data-display/chart/chart.utils.js +9 -6
  37. package/dist/components/data-display/chart/index.d.ts +1 -0
  38. package/dist/components/data-display/chart/index.js +15 -9
  39. package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
  40. package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
  41. package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
  42. package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
  43. package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
  44. package/dist/components/data-display/statistics-card/statistics-card.js +127 -146
  45. package/dist/components/feedback/alert-dialog/alert-dialog.js +15 -15
  46. package/dist/components/feedback/dialog/dialog.js +3 -3
  47. package/dist/components/feedback/drawer/drawer.js +32 -32
  48. package/dist/components/feedback/sheet/sheet.js +8 -8
  49. package/dist/components/feedback/sheet/sheet.variants.js +1 -1
  50. package/dist/components/feedback/toast/toast.js +83 -92
  51. package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
  52. package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
  53. package/dist/components/flows/command-palette/command-palette.js +245 -258
  54. package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
  55. package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
  56. package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
  57. package/dist/components/flows/filter-panel/filter-panel.js +99 -104
  58. package/dist/components/flows/filter-strip/filter-summary.js +41 -41
  59. package/dist/components/flows/filter-strip/filter-tag-list.js +48 -48
  60. package/dist/components/flows/wizard/wizard.js +32 -32
  61. package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
  62. package/dist/components/forms/choice-card/choice-card.js +156 -166
  63. package/dist/components/forms/combobox/combobox.js +70 -70
  64. package/dist/components/forms/date-picker/date-picker.js +31 -30
  65. package/dist/components/forms/file-upload/file-upload.js +146 -168
  66. package/dist/components/forms/prompt/prompt.js +47 -48
  67. package/dist/components/forms/select/components/SelectAllRow.js +14 -14
  68. package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
  69. package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
  70. package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
  71. package/dist/components/forms/select/components/SelectMenuPanel.js +8 -8
  72. package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
  73. package/dist/components/forms/select/select.d.ts +5 -4
  74. package/dist/components/forms/select/select.js +123 -120
  75. package/dist/components/forms/select/select.types.d.ts +95 -204
  76. package/dist/components/forms/slider/slider.js +17 -17
  77. package/dist/components/forms/smart-input/smart-input.js +49 -49
  78. package/dist/components/forms/textarea/textarea.js +25 -25
  79. package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
  80. package/dist/components/layout/header/header.d.ts +5 -17
  81. package/dist/components/layout/header/header.js +113 -116
  82. package/dist/components/layout/header/header.types.d.ts +3 -0
  83. package/dist/components/layout/sidebar/sidebar.js +5 -5
  84. package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
  85. package/dist/components/primitives/accordion/accordion.js +38 -41
  86. package/dist/components/primitives/kbd/kbd.variants.js +1 -1
  87. package/dist/i18n/defaultMessages.d.ts +2 -0
  88. package/dist/i18n/defaultMessages.js +6 -4
  89. package/dist/i18n/locales/de.js +2 -0
  90. package/dist/i18n/locales/es.js +2 -0
  91. package/dist/i18n/locales/hi.js +2 -0
  92. package/dist/i18n/locales/kn.js +2 -0
  93. package/dist/impact-nova-base.scss +8 -5
  94. package/dist/impact-nova-components.css +2 -2
  95. package/dist/impact-nova-tokens.scss +346 -189
  96. package/dist/impact-nova.css +1 -1
  97. package/dist/index.js +505 -499
  98. package/dist/lib/resolve-design-token-color.d.ts +5 -0
  99. package/dist/lib/resolve-design-token-color.js +12 -0
  100. package/dist/llms/rules/ag-grid.js +1 -1
  101. package/dist/llms/rules/installation.js +1 -1
  102. package/dist/llms/rules/requirements.js +1 -1
  103. package/dist/tailwind.config.js +297 -0
  104. package/dist/theme/tailwind-colors.js +199 -0
  105. package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
  106. package/dist/theme/tokens/chart-series-palette.json.js +7 -0
  107. package/package.json +32 -259
  108. package/tailwind.config.js +0 -335
@@ -14,12 +14,17 @@ export interface RuntimeColumnDefsResult {
14
14
  runtimeColumnDefs: (ColDef | ColGroupDef)[];
15
15
  extractedRuntimeDefaults: ExtractedColumnRuntimeDefaults;
16
16
  }
17
+ export interface SuppressInitialRuntimeState {
18
+ columnPinning?: boolean;
19
+ columnVisibility?: boolean;
20
+ }
17
21
  /**
18
- * AG Grid reapplies `colDef.pinned` / `colDef.hide` on column-definition refresh.
19
- * User changes belong in runtime column state / `initialState`, not on defs.
22
+ * AG Grid reapplies stateful `colDef.pinned` / `colDef.hide` on column-definition
23
+ * refresh. Apps may pass `pinned` / `hide` (or `initialPinned` / `initialHide`);
24
+ * DataTable maps them to initial attrs on grid-facing defs and `initialState`.
20
25
  */
21
26
  export declare function extractRuntimeColumnDefs(columnDefs: (ColDef | ColGroupDef)[] | undefined): RuntimeColumnDefsResult;
22
27
  /** @deprecated Use `extractedRuntimeDefaults.columnPinning` from `extractRuntimeColumnDefs`. */
23
28
  export declare function getExtractedColumnPinning(result: RuntimeColumnDefsResult): ExtractedColumnPinning;
24
- export declare function mergeInitialColumnPinningState(userInitialState: GridState | undefined, extractedColumnPinning: ExtractedColumnPinning): GridState | undefined;
25
- export declare function mergeInitialGridRuntimeState(userInitialState: GridState | undefined, extractedRuntimeDefaults: ExtractedColumnRuntimeDefaults): GridState | undefined;
29
+ export declare function mergeInitialColumnPinningState(userInitialState: GridState | undefined, extractedColumnPinning: ExtractedColumnPinning, suppress?: SuppressInitialRuntimeState): GridState | undefined;
30
+ export declare function mergeInitialGridRuntimeState(userInitialState: GridState | undefined, extractedRuntimeDefaults: ExtractedColumnRuntimeDefaults, suppress?: SuppressInitialRuntimeState): GridState | undefined;
@@ -1,66 +1,66 @@
1
- function d(n) {
2
- const i = n.colId ?? n.field;
3
- return typeof i == "string" && i.length > 0 ? i : void 0;
1
+ function h(i) {
2
+ const n = i.colId ?? i.field;
3
+ return typeof n == "string" && n.length > 0 ? n : void 0;
4
4
  }
5
- function s(n, i, r) {
6
- if (i === "left" || i === !0) {
7
- r.leftColIds.push(n);
5
+ function c(i, n, e) {
6
+ if (n === "left" || n === !0) {
7
+ e.leftColIds.push(i);
8
8
  return;
9
9
  }
10
- i === "right" && r.rightColIds.push(n);
10
+ n === "right" && e.rightColIds.push(i);
11
11
  }
12
- function h(n, i) {
13
- const r = d(n);
14
- if (r && (n.pinned != null && s(r, n.pinned, i.columnPinning), n.hide === !0 && i.columnVisibility.hiddenColIds.push(r)), n.pinned === void 0 && n.hide === void 0)
15
- return n;
16
- const { pinned: e, hide: t, ...o } = n;
17
- return o;
12
+ function m(i, n) {
13
+ const e = h(i), d = i.pinned ?? i.initialPinned, t = i.hide ?? i.initialHide;
14
+ if (e && (d != null && c(e, d, n.columnPinning), t === !0 && n.columnVisibility.hiddenColIds.push(e)), !(i.pinned !== void 0 || i.hide !== void 0 || i.initialPinned !== void 0 || i.initialHide !== void 0))
15
+ return i;
16
+ const { pinned: o, hide: C, initialPinned: f, initialHide: P, ...s } = i, l = { ...s };
17
+ return d !== void 0 && (l.initialPinned = d), t !== void 0 && (l.initialHide = t), l;
18
18
  }
19
- function u(n, i) {
20
- let r = !1;
21
- const e = n.map((t) => {
19
+ function u(i, n) {
20
+ let e = !1;
21
+ const d = i.map((t) => {
22
22
  if ("children" in t && t.children) {
23
- const l = u(
23
+ const o = u(
24
24
  t.children,
25
- i
25
+ n
26
26
  );
27
- return l === t.children ? t : (r = !0, {
27
+ return o === t.children ? t : (e = !0, {
28
28
  ...t,
29
- children: l
29
+ children: o
30
30
  });
31
31
  }
32
- const o = h(
32
+ const r = m(
33
33
  t,
34
- i
34
+ n
35
35
  );
36
- return o !== t && (r = !0), o;
36
+ return r !== t && (e = !0), r;
37
37
  });
38
- return r ? e : n;
38
+ return e ? d : i;
39
39
  }
40
- function c() {
40
+ function g() {
41
41
  return {
42
42
  columnPinning: { leftColIds: [], rightColIds: [] },
43
43
  columnVisibility: { hiddenColIds: [] }
44
44
  };
45
45
  }
46
- function m(n) {
47
- const i = c();
48
- return !n || n.length === 0 ? { runtimeColumnDefs: [], extractedRuntimeDefaults: i } : {
46
+ function v(i) {
47
+ const n = g();
48
+ return !i || i.length === 0 ? { runtimeColumnDefs: [], extractedRuntimeDefaults: n } : {
49
49
  runtimeColumnDefs: u(
50
- n,
51
- i
50
+ i,
51
+ n
52
52
  ),
53
- extractedRuntimeDefaults: i
53
+ extractedRuntimeDefaults: n
54
54
  };
55
55
  }
56
- function g(n, i) {
57
- const r = i.columnPinning.leftColIds.length > 0 || i.columnPinning.rightColIds.length > 0, e = i.columnVisibility.hiddenColIds.length > 0;
58
- if (!n && !r && !e)
56
+ function y(i, n, e) {
57
+ const d = !e?.columnPinning && (n.columnPinning.leftColIds.length > 0 || n.columnPinning.rightColIds.length > 0), t = !e?.columnVisibility && n.columnVisibility.hiddenColIds.length > 0;
58
+ if (!i && !d && !t)
59
59
  return;
60
- const t = { ...n };
61
- return !n?.columnPinning && r && (t.columnPinning = i.columnPinning), !n?.columnVisibility && e && (t.columnVisibility = i.columnVisibility), !t.columnPinning && !t.columnVisibility && Object.keys(t).length === 0 ? n : Object.keys(t).length > 0 ? t : void 0;
60
+ const r = { ...i };
61
+ return !i?.columnPinning && d && (r.columnPinning = n.columnPinning), !i?.columnVisibility && t && (r.columnVisibility = n.columnVisibility), !r.columnPinning && !r.columnVisibility && Object.keys(r).length === 0 ? i : Object.keys(r).length > 0 ? r : void 0;
62
62
  }
63
63
  export {
64
- m as extractRuntimeColumnDefs,
65
- g as mergeInitialGridRuntimeState
64
+ v as extractRuntimeColumnDefs,
65
+ y as mergeInitialGridRuntimeState
66
66
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, Fragment as W, jsx as t } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { ChevronRight as ge, Star as I, Search as ye, Bookmark as we, Pencil as Ne, Bin as Te } from "impact-nova-icons";
3
+ import { ChevronRight as xe, Star as I, Search as ye, Bookmark as we, Pencil as Ne, Bin as Te } from "impact-nova-icons";
4
4
  import { cn as k } from "../../../lib/utils.js";
5
5
  import { useImpactNovaI18n as ke } from "../../../i18n/use-impact-nova-i18n.js";
6
6
  import { Popover as Ve, PopoverTrigger as Ce, PopoverContent as Se } from "../../feedback/popover/popover.js";
@@ -14,7 +14,7 @@ import { Prompt as De } from "../../forms/prompt/prompt.js";
14
14
  function Me(b) {
15
15
  return b.isSystemView ? "system" : b.isDefaultView ? "default" : b.isActive ? "active" : "other";
16
16
  }
17
- const Ae = ["default", "active", "system"], Ye = ({
17
+ const Ae = ["default", "active", "system"], _e = ({
18
18
  isSaveViewEnabled: b = !0,
19
19
  views: o,
20
20
  activeViewSummary: te,
@@ -24,7 +24,7 @@ const Ae = ["default", "active", "system"], Ye = ({
24
24
  onMenuOpenChange: E,
25
25
  onSearch: V,
26
26
  isLoadingViews: L = !1,
27
- customListContent: _,
27
+ customListContent: U,
28
28
  disableApply: ie = !1,
29
29
  className: re,
30
30
  onSaveViewClick: le,
@@ -32,7 +32,7 @@ const Ae = ["default", "active", "system"], Ye = ({
32
32
  onCancel: oe,
33
33
  onEditView: de,
34
34
  onDeleteView: ce,
35
- onSetDefaultView: U
35
+ onSetDefaultView: Q
36
36
  }) => {
37
37
  const { t: a } = ke(), C = R !== void 0, [me, y] = n.useState(null), [ue, pe] = n.useState(
38
38
  ne
@@ -41,17 +41,17 @@ const Ae = ["default", "active", "system"], Ye = ({
41
41
  C || pe(e), E?.(e);
42
42
  },
43
43
  [C, E]
44
- ), [v, S] = n.useState("All"), [w, z] = n.useState(""), [Q, D] = n.useState("");
44
+ ), [v, S] = n.useState("All"), [w, z] = n.useState(""), [F, D] = n.useState("");
45
45
  n.useEffect(() => {
46
46
  const e = window.setTimeout(() => D(w), 300);
47
47
  return () => window.clearTimeout(e);
48
48
  }, [w]), n.useEffect(() => {
49
- V && V(Q);
50
- }, [Q, V]);
51
- const F = n.useMemo(
49
+ V && V(F);
50
+ }, [F, V]);
51
+ const Y = n.useMemo(
52
52
  () => o.find((e) => e.isActive),
53
53
  [o]
54
- ), d = F ?? null, Y = te ?? F?.viewName ?? a("dataTable.savedViewsNotApplicable"), [N, M] = n.useState(null), [x, $] = n.useState(null), K = n.useRef(!1);
54
+ ), d = Y ?? null, _ = te ?? Y?.viewName ?? a("dataTable.savedViewsNotApplicable"), [N, M] = n.useState(null), [g, $] = n.useState(null), K = n.useRef(!1);
55
55
  n.useEffect(() => {
56
56
  const e = u && !K.current;
57
57
  if (K.current = u, e) {
@@ -59,20 +59,20 @@ const Ae = ["default", "active", "system"], Ye = ({
59
59
  M(r?.id ?? null), S("All"), z(""), D("");
60
60
  }
61
61
  }, [u, o]);
62
- const g = n.useMemo(() => v === "All" ? o : o.filter((e) => e.viewType === v), [o, v]), f = w.trim().toLowerCase(), T = n.useCallback(
62
+ const x = n.useMemo(() => v === "All" ? o : o.filter((e) => e.viewType === v), [o, v]), f = w.trim().toLowerCase(), T = n.useCallback(
63
63
  (e, r) => r ? (e.viewName ?? "").trim().toLowerCase().includes(r) : !0,
64
64
  []
65
65
  ), A = n.useMemo(() => {
66
- let e = g;
66
+ let e = x;
67
67
  return f && (e = e.filter((r) => T(r, f))), e;
68
- }, [g, f, T]), h = n.useMemo(() => {
69
- if (g.length === 0) return [];
70
- const e = Object.groupBy(g, Me);
68
+ }, [x, f, T]), h = n.useMemo(() => {
69
+ if (x.length === 0) return [];
70
+ const e = Object.groupBy(x, Me);
71
71
  return Ae.flatMap((r) => {
72
72
  const c = e[r]?.[0];
73
73
  return c ? f && !T(c, f) ? [] : [c] : [];
74
74
  });
75
- }, [g, f, T]), P = n.useMemo(() => {
75
+ }, [x, f, T]), P = n.useMemo(() => {
76
76
  const e = new Set(h.map((r) => r.id));
77
77
  return A.filter((r) => !e.has(r.id));
78
78
  }, [A, h]), G = N === null ? null : o.find((e) => e.id === N) ?? null, fe = () => {
@@ -85,7 +85,7 @@ const Ae = ["default", "active", "system"], Ye = ({
85
85
  if (!b)
86
86
  return null;
87
87
  const ve = o.length > 0, H = (e, r, c) => {
88
- const O = N === e.id, s = me === e.id, J = r === "priority" && !!e.isActive, xe = r === "list" && !!e.isActive;
88
+ const O = N === e.id, s = me === e.id, J = r === "priority" && !!e.isActive, ge = r === "list" && !!e.isActive;
89
89
  return /* @__PURE__ */ i(
90
90
  "div",
91
91
  {
@@ -119,7 +119,7 @@ const Ae = ["default", "active", "system"], Ye = ({
119
119
  {
120
120
  className: k(
121
121
  "min-w-0 flex-1 truncate relative z-10",
122
- xe && "underline decoration-primary decoration-2 underline-offset-2"
122
+ ge && "underline decoration-primary decoration-2 underline-offset-2"
123
123
  ),
124
124
  children: e.viewName
125
125
  }
@@ -161,13 +161,13 @@ const Ae = ["default", "active", "system"], Ye = ({
161
161
  type: "button",
162
162
  variant: "ghost",
163
163
  size: "iconSm",
164
- className: "text-yellow-500 hover:text-yellow-600 disabled:opacity-50",
164
+ className: "text-warning hover:text-badge-warning-ink disabled:opacity-50",
165
165
  "aria-label": a("dataTable.savedViewsDefaultAction"),
166
166
  disabled: s,
167
167
  onClick: (l) => {
168
- l.stopPropagation(), l.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), U?.(e, { activeView: d }));
168
+ l.stopPropagation(), l.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), Q?.(e, { activeView: d }));
169
169
  },
170
- children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin motion-reduce:animate-none rounded-full border-2 border-yellow-500 border-t-transparent" }) : /* @__PURE__ */ t(I, { className: "size-3.5 fill-current text-yellow-500" })
170
+ children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin motion-reduce:animate-none rounded-full border-2 border-warning border-t-transparent" }) : /* @__PURE__ */ t(I, { className: "size-3.5 fill-current text-warning" })
171
171
  }
172
172
  ) : /* @__PURE__ */ t(
173
173
  m,
@@ -175,13 +175,13 @@ const Ae = ["default", "active", "system"], Ye = ({
175
175
  type: "button",
176
176
  variant: "ghost",
177
177
  size: "iconSm",
178
- className: "text-yellow-500 hover:text-yellow-600 disabled:opacity-50",
178
+ className: "text-warning hover:text-badge-warning-ink disabled:opacity-50",
179
179
  "aria-label": a("dataTable.savedViewsSetDefault"),
180
180
  disabled: s,
181
181
  onClick: (l) => {
182
- l.stopPropagation(), l.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), U?.(e, { activeView: d }));
182
+ l.stopPropagation(), l.preventDefault(), s || (y(e.id), setTimeout(() => y(null), 1200), Q?.(e, { activeView: d }));
183
183
  },
184
- children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin motion-reduce:animate-none rounded-full border-2 border-yellow-500 border-t-transparent" }) : /* @__PURE__ */ t(I, { className: "size-3.5 text-yellow-500" })
184
+ children: s ? /* @__PURE__ */ t("div", { className: "size-3.5 animate-spin motion-reduce:animate-none rounded-full border-2 border-warning border-t-transparent" }) : /* @__PURE__ */ t(I, { className: "size-3.5 text-warning" })
185
185
  }
186
186
  )
187
187
  ] })
@@ -201,8 +201,8 @@ const Ae = ["default", "active", "system"], Ye = ({
201
201
  ),
202
202
  children: [
203
203
  L ? /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden", children: [
204
- /* @__PURE__ */ t(B, { className: "h-6 w-24 rounded-full bg-black/10" }),
205
- /* @__PURE__ */ t(B, { className: "h-6 w-6 shrink-0 rounded-md bg-black/10" })
204
+ /* @__PURE__ */ t(B, { className: "h-6 w-24 rounded-full bg-scrim-skeleton" }),
205
+ /* @__PURE__ */ t(B, { className: "h-6 w-6 shrink-0 rounded-md bg-scrim-skeleton" })
206
206
  ] }) : ve ? /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 items-center justify-start gap-1 overflow-hidden", children: /* @__PURE__ */ i(Ve, { open: u, onOpenChange: be, children: [
207
207
  /* @__PURE__ */ t(Ce, { asChild: !0, children: /* @__PURE__ */ i(
208
208
  "button",
@@ -220,20 +220,20 @@ const Ae = ["default", "active", "system"], Ye = ({
220
220
  color: "success",
221
221
  variant: "outline",
222
222
  className: "w-fit max-w-full min-w-0 shrink font-['Manrope']",
223
- children: Y
223
+ children: _
224
224
  }
225
225
  ) }),
226
- /* @__PURE__ */ t(q, { variant: "tertiary", side: "top", children: Y })
226
+ /* @__PURE__ */ t(q, { variant: "tertiary", side: "top", children: _ })
227
227
  ] }),
228
228
  /* @__PURE__ */ t(
229
229
  "span",
230
230
  {
231
231
  className: k(
232
- "flex size-6 shrink-0 items-center justify-center rounded-md bg-white transition-transform duration-200",
232
+ "flex size-6 shrink-0 items-center justify-center rounded-md bg-canvas-elevated transition-transform duration-200",
233
233
  u && "rotate-180"
234
234
  ),
235
235
  "aria-hidden": !0,
236
- children: /* @__PURE__ */ t(ge, { className: "size-3.5 rotate-90 text-content-charcoal" })
236
+ children: /* @__PURE__ */ t(xe, { className: "size-3.5 rotate-90 text-content-charcoal" })
237
237
  }
238
238
  )
239
239
  ]
@@ -243,13 +243,13 @@ const Ae = ["default", "active", "system"], Ye = ({
243
243
  Se,
244
244
  {
245
245
  align: "start",
246
- className: "z-[50] w-[min(100vw-24px,280px)] p-0 shadow-[0_0_4px_0_rgba(0,0,0,0.12)] overflow-visible",
246
+ className: "z-[50] w-[min(100vw-24px,280px)] p-0 shadow-elevation-floating overflow-visible",
247
247
  sideOffset: 8,
248
248
  children: /* @__PURE__ */ i("div", { className: "flex flex-col py-2", children: [
249
249
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between gap-2 px-3 pb-2", children: [
250
250
  /* @__PURE__ */ t("span", { className: "text-sm font-medium text-content-charcoal font-['Manrope']", children: a("dataTable.savedViewsTitle") }),
251
251
  /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-1 text-xs font-medium text-content-tertiary font-['Manrope']", children: [
252
- /* @__PURE__ */ t(I, { className: "size-3.5 fill-current text-yellow-500" }),
252
+ /* @__PURE__ */ t(I, { className: "size-3.5 fill-current text-warning" }),
253
253
  a("dataTable.savedViewsDefault")
254
254
  ] })
255
255
  ] }),
@@ -310,7 +310,7 @@ const Ae = ["default", "active", "system"], Ye = ({
310
310
  "aria-label": a("dataTable.savedViewsSearchPlaceholder")
311
311
  }
312
312
  ) }),
313
- /* @__PURE__ */ t("div", { className: "min-h-[72px] px-1", children: _ || (L ? /* @__PURE__ */ t("div", { className: "flex max-h-[160px] flex-col gap-2 overflow-y-auto px-2 py-1", children: [1, 2, 3, 4, 5].map((e) => /* @__PURE__ */ t(B, { className: "h-9 w-full rounded-lg" }, e)) }) : A.length === 0 && h.length === 0 ? /* @__PURE__ */ t("div", { className: "flex min-h-[100px] flex-col items-center justify-center px-4 py-6 text-center", children: /* @__PURE__ */ t("span", { className: "text-sm leading-relaxed text-content-tertiary font-['Manrope']", children: a("dataTable.savedViewsEmptyList") }) }) : /* @__PURE__ */ i("div", { className: "flex max-h-[220px] flex-col gap-0 overflow-y-auto", children: [
313
+ /* @__PURE__ */ t("div", { className: "min-h-[72px] px-1", children: U || (L ? /* @__PURE__ */ t("div", { className: "flex max-h-[160px] flex-col gap-2 overflow-y-auto px-2 py-1", children: [1, 2, 3, 4, 5].map((e) => /* @__PURE__ */ t(B, { className: "h-9 w-full rounded-lg" }, e)) }) : A.length === 0 && h.length === 0 ? /* @__PURE__ */ t("div", { className: "flex min-h-[100px] flex-col items-center justify-center px-4 py-6 text-center", children: /* @__PURE__ */ t("span", { className: "text-sm leading-relaxed text-content-tertiary font-['Manrope']", children: a("dataTable.savedViewsEmptyList") }) }) : /* @__PURE__ */ i("div", { className: "flex max-h-[220px] flex-col gap-0 overflow-y-auto", children: [
314
314
  h.length > 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col px-1 pb-1 ", children: h.map(
315
315
  (e) => H(
316
316
  e,
@@ -381,22 +381,22 @@ const Ae = ["default", "active", "system"], Ye = ({
381
381
  De,
382
382
  {
383
383
  variant: "destructive",
384
- open: x !== null,
384
+ open: g !== null,
385
385
  onOpenChange: (e) => {
386
386
  e || $(null);
387
387
  },
388
388
  title: a("dataTable.savedViewsDeleteConfirmTitle"),
389
- description: x ? a("dataTable.savedViewsDeleteConfirmDescription", {
390
- viewName: x.viewName
389
+ description: g ? a("dataTable.savedViewsDeleteConfirmDescription", {
390
+ viewName: g.viewName
391
391
  }) : void 0,
392
392
  confirmLabel: a("dataTable.savedViewsDeleteConfirmButton"),
393
393
  onConfirm: () => {
394
- x && ce?.(x, { activeView: d });
394
+ g && ce?.(g, { activeView: d });
395
395
  }
396
396
  }
397
397
  )
398
398
  ] });
399
399
  };
400
400
  export {
401
- Ye as DataTableSavedViews
401
+ _e as DataTableSavedViews
402
402
  };
@@ -1,50 +1,50 @@
1
- import { jsx as n, jsxs as R } from "react/jsx-runtime";
2
- import { useState as g, useMemo as m, useCallback as D, useEffect as y, memo as v } from "react";
3
- import { AgGridWrapper as E } from "../ag-grid-react/index.js";
1
+ import { jsx as n, jsxs as E } from "react/jsx-runtime";
2
+ import { useState as g, useMemo as u, useCallback as D, useEffect as w, memo as v } from "react";
3
+ import { AgGridWrapper as O } from "../ag-grid-react/index.js";
4
4
  import { cn as H } from "../../../lib/utils.js";
5
- import { DataTableContext as O, DataTableSheetPortalStoreContext as F, useDataTable as N, useDataTableSheetPortal as A } from "./data-table-context.js";
6
- import { createDataTableSheetPortalStore as I } from "./data-table-sheet-portal-store.js";
7
- import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as z } from "./data-table-constants.js";
8
- import { extractRuntimeColumnDefs as B, mergeInitialGridRuntimeState as M } from "./data-table-column-def-pin.js";
9
- const P = {
5
+ import { DataTableContext as F, DataTableSheetPortalStoreContext as I, useDataTable as N, useDataTableSheetPortal as P } from "./data-table-context.js";
6
+ import { createDataTableSheetPortalStore as z } from "./data-table-sheet-portal-store.js";
7
+ import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as B } from "./data-table-constants.js";
8
+ import { extractRuntimeColumnDefs as M, mergeInitialGridRuntimeState as j } from "./data-table-column-def-pin.js";
9
+ const _ = {
10
10
  default: 46,
11
11
  compact: 30,
12
12
  comfort: 52
13
- }, Q = ({
14
- children: a,
13
+ }, U = ({
14
+ children: i,
15
15
  className: t
16
16
  }) => {
17
- const [r, e] = g(null), [o, d] = g("medium"), [i, S] = g("full"), [s, u] = g("default"), l = m(() => I(), []), f = D((c) => {
18
- l.registerScopedSheetDepth(c);
19
- }, [l]), p = D((c) => {
20
- e(c);
17
+ const [r, e] = g(null), [o, c] = g("medium"), [a, S] = g("full"), [s, f] = g("default"), l = u(() => z(), []), m = D((d) => {
18
+ l.registerScopedSheetDepth(d);
19
+ }, [l]), p = D((d) => {
20
+ e(d);
21
21
  }, []), x = {
22
22
  small: "12px",
23
23
  medium: "14px",
24
24
  large: "16px"
25
- }[o], b = `${P[s]}px`, T = m(
25
+ }[o], b = `${_[s]}px`, T = u(
26
26
  () => ({
27
27
  gridApi: r,
28
28
  registerApi: p,
29
- registerScopedSheetDepth: f,
29
+ registerScopedSheetDepth: m,
30
30
  fontSize: o,
31
- setFontSize: d,
32
- numericFormat: i,
31
+ setFontSize: c,
32
+ numericFormat: a,
33
33
  setNumericFormat: S,
34
34
  rowHeight: s,
35
- setRowHeight: u
35
+ setRowHeight: f
36
36
  }),
37
37
  [
38
38
  r,
39
39
  p,
40
- f,
40
+ m,
41
41
  o,
42
- i,
42
+ a,
43
43
  s
44
44
  ]
45
45
  );
46
- return /* @__PURE__ */ n(O.Provider, { value: T, children: /* @__PURE__ */ n(
47
- F.Provider,
46
+ return /* @__PURE__ */ n(F.Provider, { value: T, children: /* @__PURE__ */ n(
47
+ I.Provider,
48
48
  {
49
49
  value: l,
50
50
  children: /* @__PURE__ */ n(
@@ -59,19 +59,19 @@ const P = {
59
59
  "--ag-font-size": x,
60
60
  "--ag-row-height": b
61
61
  },
62
- children: a
62
+ children: i
63
63
  }
64
64
  )
65
65
  }
66
66
  ) });
67
- }, w = {
67
+ }, A = {
68
68
  full: "full_no",
69
69
  k: "thou",
70
70
  m: "mil",
71
71
  b: "bil",
72
72
  full_precision: "full_precision"
73
- }, j = v(function() {
74
- const { setSheetTarget: t } = A();
73
+ }, k = v(function() {
74
+ const { setSheetTarget: t } = P();
75
75
  return /* @__PURE__ */ n(
76
76
  "div",
77
77
  {
@@ -79,105 +79,110 @@ const P = {
79
79
  className: "absolute inset-0 pointer-events-none z-[39] flex overflow-x-hidden overflow-y-visible"
80
80
  }
81
81
  );
82
- }), k = v(function({
82
+ }), L = v(function({
83
83
  className: t,
84
84
  children: r
85
85
  }) {
86
- const { scopedSheetOpen: e } = A();
87
- return /* @__PURE__ */ R(
86
+ const { scopedSheetOpen: e } = P();
87
+ return /* @__PURE__ */ E(
88
88
  "div",
89
89
  {
90
90
  className: H(
91
91
  "relative flex-1 min-h-0 w-full bg-canvas-elevated rounded-b-[inherit] grid-rounded-bottom",
92
92
  t
93
93
  ),
94
- style: e ? { minHeight: z } : void 0,
94
+ style: e ? { minHeight: B } : void 0,
95
95
  children: [
96
96
  r,
97
- /* @__PURE__ */ n(j, {})
97
+ /* @__PURE__ */ n(k, {})
98
98
  ]
99
99
  }
100
100
  );
101
- }), L = v(function({
101
+ }), W = v(function({
102
102
  resolvedRowHeight: t,
103
103
  mergedContext: r,
104
104
  onGridReady: e,
105
105
  columnDefs: o,
106
- maintainColumnOrder: d = !0,
107
- ...i
106
+ maintainColumnOrder: c = !0,
107
+ ...a
108
108
  }) {
109
109
  return /* @__PURE__ */ n(
110
- E,
110
+ O,
111
111
  {
112
- ...i,
112
+ ...a,
113
113
  columnDefs: o,
114
114
  rowHeight: t,
115
115
  onGridReady: e,
116
116
  context: r,
117
- maintainColumnOrder: d
117
+ maintainColumnOrder: c
118
118
  }
119
119
  );
120
120
  });
121
- function U(a) {
121
+ function Z(i) {
122
122
  const {
123
123
  registerApi: t,
124
124
  rowHeight: r,
125
125
  gridApi: e,
126
126
  numericFormat: o
127
127
  } = N(), {
128
- className: d,
129
- onGridReady: i,
128
+ className: c,
129
+ onGridReady: a,
130
130
  rowHeight: S,
131
131
  context: s,
132
- columnDefs: u,
132
+ columnDefs: f,
133
133
  initialState: l,
134
- maintainColumnOrder: f = !0,
135
- ...p
136
- } = a, x = P[r], b = S ?? x, { runtimeColumnDefs: T, extractedRuntimeDefaults: c } = m(
137
- () => B(u ?? void 0),
138
- [u]
139
- ), _ = m(
140
- () => M(l, c),
141
- [l, c]
142
- ), C = m(
134
+ suppressInitialRuntimeState: m,
135
+ maintainColumnOrder: p = !0,
136
+ ...x
137
+ } = i, b = _[r], T = S ?? b, { runtimeColumnDefs: d, extractedRuntimeDefaults: y } = u(
138
+ () => M(f ?? void 0),
139
+ [f]
140
+ ), C = u(
141
+ () => j(
142
+ l,
143
+ y,
144
+ m
145
+ ),
146
+ [l, y, m]
147
+ ), G = u(
143
148
  () => ({
144
149
  ...s,
145
- formatType: w[o]
150
+ formatType: A[o]
146
151
  }),
147
152
  [s, o]
148
153
  );
149
- y(() => {
154
+ w(() => {
150
155
  e?.resetRowHeights();
151
- }, [r, e]), y(() => {
156
+ }, [r, e]), w(() => {
152
157
  if (e) {
153
158
  const h = e.getGridOption("context") || {};
154
159
  e.setGridOption("context", {
155
160
  ...h,
156
- formatType: w[o]
161
+ formatType: A[o]
157
162
  }), e.refreshCells({ force: !0 });
158
163
  }
159
164
  }, [o, e]);
160
- const G = D(
165
+ const R = D(
161
166
  (h) => {
162
- t(h.api), i?.(h);
167
+ t(h.api), a?.(h);
163
168
  },
164
- [t, i]
169
+ [t, a]
165
170
  );
166
- return /* @__PURE__ */ n(k, { className: d, children: /* @__PURE__ */ n(
167
- L,
171
+ return /* @__PURE__ */ n(L, { className: c, children: /* @__PURE__ */ n(
172
+ W,
168
173
  {
169
- ...p,
170
- columnDefs: T,
171
- initialState: _,
172
- maintainColumnOrder: f,
173
- resolvedRowHeight: b,
174
- mergedContext: C,
175
- onGridReady: G
174
+ ...x,
175
+ columnDefs: d,
176
+ initialState: C,
177
+ maintainColumnOrder: p,
178
+ resolvedRowHeight: T,
179
+ mergedContext: G,
180
+ onGridReady: R
176
181
  }
177
182
  ) });
178
183
  }
179
- const Z = ({
180
- children: a,
184
+ const ee = ({
185
+ children: i,
181
186
  className: t
182
187
  }) => /* @__PURE__ */ n(
183
188
  "div",
@@ -187,11 +192,11 @@ const Z = ({
187
192
  "flex items-center justify-between px-4 py-3 shrink-0 bg-canvas-elevated rounded-t-[inherit]",
188
193
  t
189
194
  ),
190
- children: a
195
+ children: i
191
196
  }
192
197
  );
193
198
  export {
194
- Q as DataTable,
195
- U as DataTableContent,
196
- Z as DataTableToolbar
199
+ U as DataTable,
200
+ Z as DataTableContent,
201
+ ee as DataTableToolbar
197
202
  };
@@ -1,4 +1,5 @@
1
1
  import { AgGridWrapperProps } from '../ag-grid-react/ag-grid.types';
2
+ import { SuppressInitialRuntimeState } from './data-table-column-def-pin';
2
3
  import type * as React from "react";
3
4
  /**
4
5
  * Root layout provider for data tables. Compose toolbar, sheet, and `DataTableContent` as children.
@@ -8,11 +9,16 @@ export type DataTableProps = {
8
9
  className?: string;
9
10
  };
10
11
  /**
11
- * AG Grid surface — forwards native `AgGridReact` props (rowData, columnDefs, rowModelType, treeData, …)
12
+ * AG Grid surface — forwards `AgGridReact` grid options (`rowData`, `columnDefs`, `rowModelType`, …)
12
13
  * with Impact Nova styling. See https://www.ag-grid.com/react-data-grid/grid-options/
13
14
  */
14
15
  export type DataTableContentProps<TData = unknown> = AgGridWrapperProps<TData> & {
15
16
  className?: string;
17
+ /**
18
+ * Skip injecting extracted column pinning/visibility into `initialState` on
19
+ * first paint — use when a saved view will apply immediately after mount.
20
+ */
21
+ suppressInitialRuntimeState?: SuppressInitialRuntimeState;
16
22
  };
17
23
  /**
18
24
  * Top bar above the grid. Optional — omit to remove the toolbar from the DOM.