impact-nova 2.1.0-alpha.3 → 2.1.0-alpha.5

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 (137) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +3 -0
  2. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +6 -0
  3. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +15 -21
  4. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +1 -1
  5. package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +1 -2
  6. package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.js +12 -6
  7. package/dist/components/data/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +19 -19
  8. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +1 -1
  9. package/dist/components/data/ag-grid-react/cell-renderers/switch-display-renderer.js +15 -15
  10. package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +1 -1
  11. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +33 -33
  12. package/dist/components/data/ag-grid-react/headers/components/header-info.js +66 -62
  13. package/dist/components/data/ag-grid-react/headers/components/info-modal.js +6 -6
  14. package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +18 -18
  15. package/dist/components/data/ag-grid-react/headers/custom-header-group.js +40 -29
  16. package/dist/components/data/ag-grid-react/headers/custom-header.js +102 -98
  17. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  18. package/dist/components/data/ag-grid-react/index.js +156 -148
  19. package/dist/components/data/ag-grid-react/theme.js +3 -0
  20. package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +5 -0
  21. package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +13 -0
  22. package/dist/components/data/ag-grid-react/useGridAutoSizeStrategyOnResize.js +8 -5
  23. package/dist/components/data/data-table/data-table-column-apply.d.ts +16 -0
  24. package/dist/components/data/data-table/data-table-column-apply.js +18 -0
  25. package/dist/components/data/data-table/data-table-column-list.d.ts +13 -3
  26. package/dist/components/data/data-table/data-table-column-list.js +198 -191
  27. package/dist/components/data/data-table/data-table-constants.d.ts +3 -4
  28. package/dist/components/data/data-table/data-table-context.d.ts +3 -6
  29. package/dist/components/data/data-table/data-table-context.js +21 -10
  30. package/dist/components/data/data-table/data-table-saved-views.js +26 -26
  31. package/dist/components/data/data-table/data-table-sheet-portal-store.d.ts +13 -0
  32. package/dist/components/data/data-table/data-table-sheet-portal-store.js +36 -0
  33. package/dist/components/data/data-table/data-table-sheet.d.ts +3 -6
  34. package/dist/components/data/data-table/data-table-sheet.js +1 -1
  35. package/dist/components/data/data-table/data-table-view-menu.js +40 -40
  36. package/dist/components/data/data-table/data-table.d.ts +8 -10
  37. package/dist/components/data/data-table/data-table.js +131 -113
  38. package/dist/components/data/data-table/data-table.types.d.ts +35 -0
  39. package/dist/components/data/data-table/index.js +28 -27
  40. package/dist/components/data/data-table/indicator-legend.js +6 -6
  41. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +8 -0
  42. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +72 -0
  43. package/dist/components/data/expandable-list-item/expandable-list-item-context.d.ts +13 -0
  44. package/dist/components/data/expandable-list-item/expandable-list-item-context.js +25 -0
  45. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.d.ts +6 -0
  46. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +41 -0
  47. package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +31 -0
  48. package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +233 -0
  49. package/dist/components/data/expandable-list-item/expandable-list-item-preset.d.ts +18 -0
  50. package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +133 -0
  51. package/dist/components/data/expandable-list-item/expandable-list-item.d.ts +5 -0
  52. package/dist/components/data/{expandable-sku/expandable-sku.types.d.ts → expandable-list-item/expandable-list-item.types.d.ts} +7 -7
  53. package/dist/components/data/expandable-list-item/index.d.ts +5 -0
  54. package/dist/components/data/expandable-list-item/index.js +19 -0
  55. package/dist/components/data/nested-list/components/NestedListHeader.js +11 -11
  56. package/dist/components/data/nested-list/components/SortableItem.js +2 -2
  57. package/dist/components/data-display/avatar/avatar.types.d.ts +2 -0
  58. package/dist/components/data-display/badge/badge.types.d.ts +2 -0
  59. package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +11 -11
  60. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +7 -7
  61. package/dist/components/data-display/calendar/calendar-week-number-cell.js +31 -31
  62. package/dist/components/data-display/card/card.js +8 -8
  63. package/dist/components/data-display/chart/chart.types.d.ts +9 -0
  64. package/dist/components/data-display/skeleton/skeleton.js +6 -6
  65. package/dist/components/data-display/statistics-card/statistics-card.js +14 -14
  66. package/dist/components/feedback/alert-dialog/alert-dialog.js +19 -19
  67. package/dist/components/feedback/dialog/dialog.js +1 -1
  68. package/dist/components/feedback/drawer/drawer.js +18 -18
  69. package/dist/components/feedback/dropdown-menu/dropdown-menu.js +68 -55
  70. package/dist/components/feedback/popover/popover.js +8 -1
  71. package/dist/components/feedback/sheet/sheet.js +1 -1
  72. package/dist/components/feedback/tooltip/tooltip.js +22 -22
  73. package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
  74. package/dist/components/flows/command-palette/command-palette.js +104 -104
  75. package/dist/components/flows/command-palette/shortcut-settings.js +34 -34
  76. package/dist/components/flows/filter-strip/filter-tag-list.js +4 -4
  77. package/dist/components/flows/notification-panel/notification-list.js +17 -17
  78. package/dist/components/flows/notification-panel/notification-panel.js +4 -4
  79. package/dist/components/flows/notification-panel/notification-panel.types.d.ts +3 -0
  80. package/dist/components/flows/wizard/wizard.js +8 -8
  81. package/dist/components/forms/combobox/combobox.js +20 -20
  82. package/dist/components/forms/date-picker/date-picker.js +17 -17
  83. package/dist/components/forms/date-picker/date-range-picker.js +3 -3
  84. package/dist/components/forms/date-picker/month-picker.js +1 -1
  85. package/dist/components/forms/date-picker/month-range-picker.js +42 -42
  86. package/dist/components/forms/date-picker/week-picker.js +15 -15
  87. package/dist/components/forms/date-picker/week-range-picker.js +3 -3
  88. package/dist/components/forms/file-upload/file-upload.js +33 -33
  89. package/dist/components/forms/input/input.js +8 -8
  90. package/dist/components/forms/input/input.variants.js +3 -3
  91. package/dist/components/forms/select/components/SelectMenuPanel.d.ts +1 -2
  92. package/dist/components/forms/select/components/SelectMenuPanel.js +17 -19
  93. package/dist/components/forms/select/components/SelectTrigger.d.ts +9 -6
  94. package/dist/components/forms/select/components/SelectTrigger.js +119 -116
  95. package/dist/components/forms/select/components/Submenu.js +7 -7
  96. package/dist/components/forms/select/hooks/useSelectKeyboardHandlers.d.ts +1 -1
  97. package/dist/components/forms/select/select.js +88 -88
  98. package/dist/components/forms/select/select.variants.js +5 -5
  99. package/dist/components/layout/sidebar/sidebar.d.ts +7 -50
  100. package/dist/components/layout/sidebar/sidebar.js +12 -11
  101. package/dist/components/layout/sidebar/sidebar.types.d.ts +35 -1
  102. package/dist/components/primitives/button-group/button-group.js +32 -32
  103. package/dist/components/primitives/chips/chips.variants.js +5 -5
  104. package/dist/components/primitives/empty-container/empty-container.types.d.ts +3 -0
  105. package/dist/components/primitives/kbd/kbd.variants.js +3 -3
  106. package/dist/components/primitives/stepper/stepper.js +6 -6
  107. package/dist/components/primitives/tag/tag.variants.js +2 -2
  108. package/dist/impact-nova-components.css +97 -0
  109. package/dist/impact-nova-tokens.scss +2 -0
  110. package/dist/impact-nova.css +1 -1
  111. package/dist/index.d.ts +1 -1
  112. package/dist/index.js +446 -413
  113. package/dist/lib/compose-refs.d.ts +8 -0
  114. package/dist/lib/compose-refs.js +14 -0
  115. package/dist/lib/primitives/field.types.d.ts +8 -2
  116. package/dist/lib/virtualized/index.d.ts +3 -0
  117. package/dist/lib/virtualized/index.js +33 -16
  118. package/dist/lib/virtualized/useVirtualizedList.d.ts +2 -0
  119. package/dist/lib/virtualized/useVirtualizedList.js +115 -109
  120. package/dist/lib/virtualized/virtualized-list-context.d.ts +12 -0
  121. package/dist/lib/virtualized/virtualized-list-context.js +21 -0
  122. package/dist/lib/virtualized/virtualized-list-parts.d.ts +51 -0
  123. package/dist/lib/virtualized/virtualized-list-parts.js +175 -0
  124. package/dist/lib/virtualized/virtualized-list-utils.d.ts +5 -0
  125. package/dist/lib/virtualized/virtualized-list-utils.js +6 -0
  126. package/dist/llms/rules/installation.js +1 -1
  127. package/dist/llms/rules/migration.js +1 -1
  128. package/dist/llms/rules/real-world-patterns.js +1 -1
  129. package/dist/llms/rules/requirements.js +1 -1
  130. package/package.json +24 -15
  131. package/tailwind.config.js +1 -0
  132. package/dist/components/data/ag-grid-react/headers/components/truncated-text.d.ts +0 -15
  133. package/dist/components/data/ag-grid-react/headers/components/truncated-text.js +0 -27
  134. package/dist/components/data/expandable-sku/expandable-sku.d.ts +0 -38
  135. package/dist/components/data/expandable-sku/expandable-sku.js +0 -245
  136. package/dist/components/data/expandable-sku/index.d.ts +0 -2
  137. package/dist/components/data/expandable-sku/index.js +0 -4
@@ -0,0 +1,3 @@
1
+ export type AgGridTooltipOverflowMode = "line-clamp" | "ellipsis";
2
+ /** Matches AG Grid `_isElementOverflowingCallback` (horizontal or vertical). */
3
+ export declare function isAgGridTextOverflowing(element: HTMLElement, mode?: AgGridTooltipOverflowMode): boolean;
@@ -0,0 +1,6 @@
1
+ function l(i, r = "line-clamp") {
2
+ return r === "ellipsis" ? i.clientWidth < i.scrollWidth : i.clientHeight < i.scrollHeight || i.clientWidth < i.scrollWidth;
3
+ }
4
+ export {
5
+ l as isAgGridTextOverflowing
6
+ };
@@ -107,40 +107,34 @@ export interface InfoContent {
107
107
  sections: UISection[];
108
108
  }
109
109
  /**
110
- * Props for the AgGridWrapper component
110
+ * Props for `AgGridWrapper` — low-level AG Grid Enterprise surface.
111
+ *
112
+ * Forwards [`AgGridReact`](https://www.ag-grid.com/react-data-grid/grid-options/) props except `theme`
113
+ * (Impact Nova theme is applied internally). Application feature code should use
114
+ * `DataTable` / `DataTableContent` from `impact-nova/data-table` instead.
111
115
  */
112
116
  export interface AgGridWrapperProps<TData = unknown> extends Omit<AgGridReactProps<TData>, 'theme' | 'defaultColDef' | 'defaultColGroupDef'> {
113
- /**
114
- * Children to render inside the grid container
115
- */
117
+ /** Content rendered inside the grid container — rarely needed; use for overlays or custom chrome. */
116
118
  children?: ReactNode;
117
119
  /**
118
- * Default column definition (will be merged with wrapper defaults)
120
+ * Default settings applied to every column unless overridden in `columnDefs`.
121
+ * Common keys: `sortable`, `filter`, `resizable`, `flex`, `minWidth`.
122
+ * Merged with Impact Nova wrapper defaults (custom header, theme, formatters).
119
123
  */
120
124
  defaultColDef?: ColDef<TData>;
121
125
  /**
122
- * Default column group definition (will be merged with wrapper defaults)
126
+ * Default settings for column groups (nested header rows).
127
+ * Merged with wrapper defaults when using grouped column headers.
123
128
  */
124
129
  defaultColGroupDef?: ColGroupDef<TData>;
125
130
  /**
126
- * When true (default), DOM order matches visual order for screen readers.
127
- * Large planning grids should pass false for better column virtualization.
131
+ * When true (default), DOM order matches visual column order for screen readers.
132
+ * Set false on very large planning grids (10k+ columns) for better virtualization performance.
128
133
  */
129
134
  ensureDomOrder?: boolean;
130
135
  /**
131
- * Value formatter registry - maps formatter names to formatter functions
132
- * Allows backend to specify formatters by string name (e.g., "currency", "percentage")
133
- *
134
- * @example
135
- * ```typescript
136
- * valueFormatters={{
137
- * currency: (params) => `$${params.value.toFixed(2)}`,
138
- * percentage: (params) => `${params.value}%`,
139
- * }}
140
- *
141
- * // Backend can then send:
142
- * { field: 'price', valueFormatter: 'currency' }
143
- * ```
136
+ * Map of formatter name function. Lets backend column defs reference formatters by string key.
137
+ * Example: `{ currency: (p) => '$' + p.value }` then column def uses `valueFormatter: 'currency'`.
144
138
  */
145
139
  valueFormatters?: Record<string, (params: ValueFormatterParams) => string>;
146
140
  }
@@ -44,7 +44,7 @@ const D = (t, i) => {
44
44
  className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${a ? "bg-canvas-elevated cursor-pointer" : "bg-inherit"}`,
45
45
  children: [
46
46
  /* @__PURE__ */ n("span", { className: `truncate text-sm font-medium text-content ${f ? "text-content-empty" : ""}`, children: f ? g : u }),
47
- a && /* @__PURE__ */ n("span", { className: "h-3.5 w-3.5 shrink-0 text-content-muted", children: /* @__PURE__ */ n(y, { className: "h-3.5 w-3.5" }) })
47
+ a && /* @__PURE__ */ n("span", { className: "h-3.5 w-3.5 shrink-0 text-content-icon", children: /* @__PURE__ */ n(y, { className: "h-3.5 w-3.5" }) })
48
48
  ]
49
49
  }
50
50
  )
@@ -1,6 +1,5 @@
1
1
  import { ICellRendererParams } from 'ag-grid-community';
2
2
  /**
3
- * Lightweight default cell renderer for AgGridWrapper.
4
- * Stable module-level reference — avoids inline function allocation in defaultColDef.
3
+ * Default text cell renderer truncation + AG Grid tooltip when overflowed.
5
4
  */
6
5
  export declare const DefaultTextCellRenderer: import('react').NamedExoticComponent<ICellRendererParams<any, any, any>>;
@@ -1,9 +1,15 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { memo as r } from "react";
3
- const a = r(function(e) {
4
- const l = e.valueFormatted ?? (e.value != null ? String(e.value) : "");
5
- return /* @__PURE__ */ t("span", { className: "truncate block w-full", children: l });
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { memo as u, useRef as f, useEffect as i } from "react";
3
+ import { isAgGridTextOverflowing as s } from "../ag-grid-tooltip-overflow.js";
4
+ const x = u(function(e) {
5
+ const r = f(null), t = e.valueFormatted ?? (e.value != null ? String(e.value) : ""), { setTooltip: l } = e;
6
+ return i(() => {
7
+ t.trim() && l(t, () => {
8
+ const n = r.current;
9
+ return n ? s(n, "ellipsis") : !1;
10
+ });
11
+ }, [t, l]), /* @__PURE__ */ o("span", { ref: r, className: "truncate block w-full", children: t });
6
12
  });
7
13
  export {
8
- a as DefaultTextCellRenderer
14
+ x as DefaultTextCellRenderer
9
15
  };
@@ -1,12 +1,12 @@
1
- import { jsxs as o, jsx as x } from "react/jsx-runtime";
2
- import { forwardRef as g, useRef as h, useState as b, useImperativeHandle as v, useCallback as s } from "react";
3
- const y = g((u, d) => {
1
+ import { jsxs as o, jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as x, useRef as h, useState as b, useImperativeHandle as v, useCallback as s } from "react";
3
+ const y = x((u, d) => {
4
4
  const {
5
5
  value: a,
6
6
  rows: i = 4,
7
- maxLength: t,
7
+ maxLength: r,
8
8
  placeholder: c
9
- } = u, r = h(null), [n, f] = b(a != null ? String(a) : "");
9
+ } = u, t = h(null), [n, f] = b(a != null ? String(a) : "");
10
10
  v(d, () => ({
11
11
  getValue() {
12
12
  return n;
@@ -21,37 +21,37 @@ const y = g((u, d) => {
21
21
  return !0;
22
22
  },
23
23
  afterGuiAttached() {
24
- if (r.current) {
25
- r.current.focus();
26
- const e = r.current.value.length;
27
- r.current.setSelectionRange(e, e);
24
+ if (t.current) {
25
+ t.current.focus();
26
+ const e = t.current.value.length;
27
+ t.current.setSelectionRange(e, e);
28
28
  }
29
29
  }
30
30
  }));
31
- const m = s((e) => {
31
+ const g = s((e) => {
32
32
  const l = e.target.value;
33
- t && l.length > t || f(l);
34
- }, [t]), p = s((e) => {
33
+ r && l.length > r || f(l);
34
+ }, [r]), m = s((e) => {
35
35
  e.key !== "Escape" && e.key !== "Tab" && (e.key === "Enter" && !e.shiftKey || e.stopPropagation());
36
36
  }, []);
37
37
  return /* @__PURE__ */ o("div", { className: "p-1 bg-canvas-elevated border border-brand rounded-md shadow-lg min-w-[250px]", children: [
38
- /* @__PURE__ */ x(
38
+ /* @__PURE__ */ p(
39
39
  "textarea",
40
40
  {
41
- ref: r,
41
+ ref: t,
42
42
  value: n,
43
- onChange: m,
44
- onKeyDown: p,
43
+ onChange: g,
44
+ onKeyDown: m,
45
45
  placeholder: c,
46
46
  rows: i,
47
- maxLength: t,
47
+ maxLength: r,
48
48
  className: "w-full px-2 py-1.5 text-sm font-medium bg-canvas-elevated border border-field rounded focus:outline-none focus:border-brand resize-y"
49
49
  }
50
50
  ),
51
- t && /* @__PURE__ */ o("div", { className: "text-right text-xs text-content-muted px-1 mt-0.5", children: [
51
+ r && /* @__PURE__ */ o("div", { className: "text-right text-xs text-secondary-foreground px-1 mt-0.5", children: [
52
52
  n.length,
53
53
  "/",
54
- t
54
+ r
55
55
  ] })
56
56
  ] });
57
57
  });
@@ -18,7 +18,7 @@ const h = (u) => {
18
18
  className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${t ? "bg-canvas-elevated cursor-pointer" : "bg-inherit"}`,
19
19
  children: [
20
20
  /* @__PURE__ */ n("span", { className: `truncate text-sm font-medium text-content ${f ? "text-content-empty" : ""}`, children: f ? b : d }),
21
- t && /* @__PURE__ */ n(g, { className: "h-3.5 w-3.5 shrink-0 rotate-90 text-content-muted" })
21
+ t && /* @__PURE__ */ n(g, { className: "h-3.5 w-3.5 shrink-0 rotate-90 text-content-icon" })
22
22
  ]
23
23
  }
24
24
  )
@@ -1,35 +1,35 @@
1
- import { jsxs as b, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
2
  import { useCallback as c } from "react";
3
3
  const p = (d) => {
4
- const { value: h, node: i, column: a, leftLabel: s, rightLabel: o, disabled: e } = d, t = !!h, l = c(() => {
5
- e || !a || i.setDataValue(a.getColId(), !t);
6
- }, [e, a, i, t]), u = c(
7
- (r) => {
8
- e || (r.key === " " || r.key === "Enter") && (r.preventDefault(), l());
4
+ const { value: h, node: o, column: t, leftLabel: s, rightLabel: i, disabled: e } = d, n = !!h, r = c(() => {
5
+ e || !t || o.setDataValue(t.getColId(), !n);
6
+ }, [e, t, o, n]), u = c(
7
+ (l) => {
8
+ e || (l.key === " " || l.key === "Enter") && (l.preventDefault(), r());
9
9
  },
10
- [e, l]
10
+ [e, r]
11
11
  );
12
12
  return /* @__PURE__ */ b("div", { className: `flex items-center justify-center h-full w-full gap-2 ag-cell-inner-padding ${e ? "opacity-60 cursor-not-allowed" : !e ? "in-ag-editable-cell-highlight" : ""}`, children: [
13
- s && /* @__PURE__ */ n("span", { className: "text-xs text-content-muted", children: s }),
14
- /* @__PURE__ */ n(
13
+ s && /* @__PURE__ */ a("span", { className: "text-xs text-secondary-foreground", children: s }),
14
+ /* @__PURE__ */ a(
15
15
  "div",
16
16
  {
17
- onClick: l,
17
+ onClick: r,
18
18
  onKeyDown: u,
19
19
  role: "switch",
20
- "aria-checked": t,
20
+ "aria-checked": n,
21
21
  "aria-disabled": e,
22
22
  tabIndex: e ? -1 : 0,
23
- className: `inline-flex h-4 w-6 shrink-0 items-center rounded-full border transition-colors ${e ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${t ? "bg-brand-tint border-canvas-accordion" : "bg-canvas-elevated border-canvas-tint"}`,
24
- children: /* @__PURE__ */ n(
23
+ className: `inline-flex h-4 w-6 shrink-0 items-center rounded-full border transition-colors ${e ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${n ? "bg-brand-tint border-canvas-accordion" : "bg-canvas-elevated border-canvas-tint"}`,
24
+ children: /* @__PURE__ */ a(
25
25
  "div",
26
26
  {
27
- className: `pointer-events-none block h-[10px] w-[10px] rounded-full shadow-lg transition-transform ${t ? "translate-x-[10px] bg-brand" : "translate-x-[2px] bg-stroke-field"}`
27
+ className: `pointer-events-none block h-[10px] w-[10px] rounded-full shadow-lg transition-transform ${n ? "translate-x-[10px] bg-brand" : "translate-x-[2px] bg-stroke-field"}`
28
28
  }
29
29
  )
30
30
  }
31
31
  ),
32
- o && /* @__PURE__ */ n("span", { className: "text-xs text-content-muted", children: o })
32
+ i && /* @__PURE__ */ a("span", { className: "text-xs text-secondary-foreground", children: i })
33
33
  ] });
34
34
  };
35
35
  p.displayName = "SwitchDisplayRenderer";
@@ -132,7 +132,7 @@ const M = (k) => {
132
132
  return n.push(s), n.join(" > ");
133
133
  };
134
134
  return /* @__PURE__ */ r(I, { open: k, onOpenChange: m, children: /* @__PURE__ */ g(ee, { className: "w-[800px] max-w-[95vw] max-h-[90vh] flex flex-col p-0", hideClose: !0, children: [
135
- /* @__PURE__ */ g(te, { className: "flex flex-row items-center justify-between px-4 py-3", children: [
135
+ /* @__PURE__ */ g(te, { className: "flex flex-row items-center justify-between px-4 py-3 pe-4", children: [
136
136
  /* @__PURE__ */ r(le, { children: d("advancedFilter.title") }),
137
137
  /* @__PURE__ */ r(oe, { asChild: !0, children: /* @__PURE__ */ r(y, { variant: "ghost", size: "icon", className: "h-8 w-8 p-0 text-content-tertiary hover:text-brand-variant-hover", onClick: m, "aria-label": d("aria.close"), children: /* @__PURE__ */ r(ce, { size: 14 }) }) })
138
138
  ] }),
@@ -5,9 +5,9 @@ import { Input as f } from "../../../../forms/input/input.js";
5
5
  import { DatePicker as V } from "../../../../forms/date-picker/date-picker.js";
6
6
  import { DateRangePicker as I } from "../../../../forms/date-picker/date-range-picker.js";
7
7
  import { Select as h } from "../../../../forms/select/select.js";
8
- import { Bin as R } from "impact-nova-icons";
8
+ import { Bin as y } from "impact-nova-icons";
9
9
  import { useImpactNovaI18n as D } from "../../../../../i18n/use-impact-nova-i18n.js";
10
- import { createEmptyRule as y } from "../utils/filter-utils.js";
10
+ import { createEmptyRule as R } from "../utils/filter-utils.js";
11
11
  import { DEFAULT_DATE_DISPLAY_FORMAT as _ } from "../utils/date-utils.js";
12
12
  const T = {
13
13
  text: ["contains", "notContains", "equals", "notEqual", "startsWith", "endsWith", "empty", "notEmpty"],
@@ -29,24 +29,24 @@ const T = {
29
29
  onDeleteColumnFilter: x,
30
30
  dateDisplayFormat: b = _
31
31
  }) => {
32
- const { t: n } = D(), N = E(() => (T[l] ?? T.text).map((r) => ({ label: n(`filter.operators.${l === "date" && r === "greaterThan" ? "after" : l === "date" && r === "lessThan" ? "before" : l === "date" && r === "inRange" ? "between" : r}`), value: r })), [l, n]), w = E(
32
+ const { t: r } = D(), N = E(() => (T[l] ?? T.text).map((n) => ({ label: r(`filter.operators.${l === "date" && n === "greaterThan" ? "after" : l === "date" && n === "lessThan" ? "before" : l === "date" && n === "inRange" ? "between" : n}`), value: n })), [l, r]), w = E(
33
33
  () => [
34
- { label: n("filter.logicAll"), value: "AND" },
35
- { label: n("filter.logicAny"), value: "OR" }
34
+ { label: r("filter.logicAll"), value: "AND" },
35
+ { label: r("filter.logicAny"), value: "OR" }
36
36
  ],
37
- [n]
37
+ [r]
38
38
  ), O = () => {
39
- m([...s, y(p, l)]);
39
+ m([...s, R(p, l)]);
40
40
  }, S = (e) => {
41
41
  if (s.length > 1 || u) {
42
- const r = s.filter((t) => t.id !== e);
43
- r.length === 0 && u ? m([]) : m(r.length > 0 ? r : [y(p, l)]);
42
+ const n = s.filter((t) => t.id !== e);
43
+ n.length === 0 && u ? m([]) : m(n.length > 0 ? n : [R(p, l)]);
44
44
  }
45
- }, o = (e, r) => {
46
- m(s.map((t) => t.id === e ? { ...t, ...r } : t));
45
+ }, o = (e, n) => {
46
+ m(s.map((t) => t.id === e ? { ...t, ...n } : t));
47
47
  }, k = (e) => {
48
48
  if (e.operator === "empty" || e.operator === "notEmpty")
49
- return /* @__PURE__ */ a("span", { className: "text-content-placeholder italic text-sm", children: n("advancedFilter.noValueNeeded") });
49
+ return /* @__PURE__ */ a("span", { className: "text-content-placeholder italic text-sm", children: r("advancedFilter.noValueNeeded") });
50
50
  if (l === "date")
51
51
  return e.operator === "inRange" ? /* @__PURE__ */ a(
52
52
  I,
@@ -69,13 +69,13 @@ const T = {
69
69
  {
70
70
  value: e.value ? new Date(e.value) : void 0,
71
71
  onChange: (t) => o(e.id, { value: t?.toISOString() || "" }),
72
- placeholder: n("filter.selectDate"),
72
+ placeholder: r("filter.selectDate"),
73
73
  format: b,
74
74
  showFooter: !0
75
75
  }
76
76
  );
77
- const r = e.operator === "equals" || e.operator === "notEqual";
78
- return l === "select" || l === "multi" && r ? /* @__PURE__ */ a(
77
+ const n = e.operator === "equals" || e.operator === "notEqual";
78
+ return l === "select" || l === "multi" && n ? /* @__PURE__ */ a(
79
79
  h,
80
80
  {
81
81
  options: g || [],
@@ -87,7 +87,7 @@ const T = {
87
87
  Array.isArray(t) ? o(e.id, { value: t.map((i) => i.value) }) : o(e.id, { value: t?.value || "" });
88
88
  },
89
89
  isMulti: c !== void 0 ? c : !0,
90
- placeholder: n(c === !1 ? "filter.selectValue" : "filter.selectValues"),
90
+ placeholder: r(c === !1 ? "filter.selectValue" : "filter.selectValues"),
91
91
  className: "w-full",
92
92
  menuPortalTarget: document.body
93
93
  }
@@ -97,18 +97,18 @@ const T = {
97
97
  {
98
98
  value: e.value,
99
99
  onChange: (t) => o(e.id, { value: t.target.value }),
100
- placeholder: n("filter.from"),
100
+ placeholder: r("filter.from"),
101
101
  type: l === "number" ? "number" : "text",
102
102
  className: "flex-1"
103
103
  }
104
104
  ),
105
- /* @__PURE__ */ a("span", { className: "text-content-placeholder shrink-0", children: n("filter.to") }),
105
+ /* @__PURE__ */ a("span", { className: "text-content-placeholder shrink-0", children: r("filter.to") }),
106
106
  /* @__PURE__ */ a(
107
107
  f,
108
108
  {
109
109
  value: e.valueTo || "",
110
110
  onChange: (t) => o(e.id, { valueTo: t.target.value }),
111
- placeholder: n("filter.to"),
111
+ placeholder: r("filter.to"),
112
112
  type: l === "number" ? "number" : "text",
113
113
  className: "flex-1"
114
114
  }
@@ -118,26 +118,26 @@ const T = {
118
118
  {
119
119
  value: e.value,
120
120
  onChange: (t) => o(e.id, { value: t.target.value }),
121
- placeholder: n("filter.enterValue"),
121
+ placeholder: r("filter.enterValue"),
122
122
  type: l === "number" ? "number" : "text",
123
123
  className: "w-full"
124
124
  }
125
125
  );
126
126
  }, P = (e) => {
127
- const r = N.find((t) => t.value === e.operator);
127
+ const n = N.find((t) => t.value === e.operator);
128
128
  return /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
129
129
  /* @__PURE__ */ a("div", { className: "w-[120px] shrink-0", children: /* @__PURE__ */ a(
130
130
  h,
131
131
  {
132
132
  options: N,
133
- value: r || null,
133
+ value: n || null,
134
134
  onChange: (t) => {
135
135
  const i = t;
136
136
  if (!i) return;
137
137
  const A = i.value === "inRange" && e.value && !e.valueTo ? Array.isArray(e.value) ? e.value[0] : e.value : void 0;
138
138
  o(e.id, { operator: i.value, ...A != null && { valueTo: A } });
139
139
  },
140
- placeholder: n("filter.operator"),
140
+ placeholder: r("filter.operator"),
141
141
  className: "w-full",
142
142
  menuPortalTarget: document.body
143
143
  }
@@ -149,36 +149,36 @@ const T = {
149
149
  onClick: () => S(e.id),
150
150
  variant: "tertiary",
151
151
  size: "icon",
152
- "aria-label": n("aria.removeRule"),
152
+ "aria-label": r("aria.removeRule"),
153
153
  disabled: s.length === 1 && !u,
154
- children: /* @__PURE__ */ a(R, { size: "xs" })
154
+ children: /* @__PURE__ */ a(y, { size: "xs" })
155
155
  }
156
156
  )
157
157
  ] }, e.id);
158
158
  };
159
159
  return /* @__PURE__ */ d("div", { className: "flex flex-col gap-4", children: [
160
- /* @__PURE__ */ d("div", { className: "text-content-muted text-sm flex items-center gap-2 flex-wrap", children: [
161
- /* @__PURE__ */ a("span", { children: n("advancedFilter.match") }),
160
+ /* @__PURE__ */ d("div", { className: "text-secondary-foreground text-sm flex items-center gap-2 flex-wrap", children: [
161
+ /* @__PURE__ */ a("span", { children: r("advancedFilter.match") }),
162
162
  /* @__PURE__ */ a("div", { className: "w-[80px]", children: /* @__PURE__ */ a(
163
163
  h,
164
164
  {
165
165
  options: w,
166
166
  value: w.find((e) => e.value === C),
167
167
  onChange: (e) => {
168
- const r = e;
169
- r && F(r.value);
168
+ const n = e;
169
+ n && F(n.value);
170
170
  },
171
171
  className: "h-8",
172
172
  menuPortalTarget: document.body,
173
173
  isClearable: !1
174
174
  }
175
175
  ) }),
176
- /* @__PURE__ */ a("span", { children: n("advancedFilter.ofTheFollowingRulesForColumn") }),
176
+ /* @__PURE__ */ a("span", { children: r("advancedFilter.ofTheFollowingRulesForColumn") }),
177
177
  /* @__PURE__ */ a("span", { className: "font-semibold text-content-tertiary", children: q })
178
178
  ] }),
179
179
  /* @__PURE__ */ a("div", { className: "flex flex-col gap-3", children: s.map((e) => P(e)) }),
180
180
  /* @__PURE__ */ d("div", { className: "flex items-center justify-between mt-1", children: [
181
- /* @__PURE__ */ a(v, { onClick: O, variant: "outline", size: "sm", children: n("advancedFilter.addRule") }),
181
+ /* @__PURE__ */ a(v, { onClick: O, variant: "outline", size: "sm", children: r("advancedFilter.addRule") }),
182
182
  x && /* @__PURE__ */ d(
183
183
  v,
184
184
  {
@@ -187,8 +187,8 @@ const T = {
187
187
  onClick: x,
188
188
  className: "text-validation hover:text-destructive hover:bg-feedback-error-surface border-destructive",
189
189
  children: [
190
- /* @__PURE__ */ a(R, { size: "xs" }),
191
- n("advancedFilter.deleteColumn")
190
+ /* @__PURE__ */ a(y, { size: "xs" }),
191
+ r("advancedFilter.deleteColumn")
192
192
  ]
193
193
  }
194
194
  )
@@ -1,105 +1,109 @@
1
- import { jsx as t, jsxs as I, Fragment as g } from "react/jsx-runtime";
2
- import { useState as k } from "react";
3
- import { cn as m } from "../../../../../lib/utils.js";
4
- import { Info as b } from "impact-nova-icons";
5
- import { useImpactNovaI18n as p } from "../../../../../i18n/use-impact-nova-i18n.js";
6
- import { LazyTooltip as h } from "./lazy-tooltip.js";
7
- import { InfoModal as C } from "./info-modal.js";
1
+ import { jsx as t, jsxs as h, Fragment as I } from "react/jsx-runtime";
2
+ import { useState as g } from "react";
3
+ import { cn as f } from "../../../../../lib/utils.js";
4
+ import { Info as k } from "impact-nova-icons";
5
+ import { useImpactNovaI18n as m } from "../../../../../i18n/use-impact-nova-i18n.js";
6
+ import { LazyTooltip as p } from "./lazy-tooltip.js";
7
+ import { InfoModal as b } from "./info-modal.js";
8
8
  const u = ({
9
9
  onClick: n,
10
- className: i,
11
- label: r
10
+ className: e,
11
+ label: o
12
12
  }) => {
13
- const o = (a) => {
13
+ const i = (a) => {
14
14
  a.stopPropagation(), n?.(a);
15
15
  };
16
16
  return /* @__PURE__ */ t(
17
17
  "button",
18
18
  {
19
19
  type: "button",
20
- "aria-label": r,
21
- className: m(
22
- "cursor-pointer flex items-center justify-center shrink-0 w-6 h-6 rounded-md transition-all duration-200 text-content-tertiary hover:bg-muted active:bg-stroke-hairline",
23
- i
20
+ "aria-label": o,
21
+ className: f(
22
+ "cursor-pointer flex items-center justify-center shrink-0 w-6 h-6 rounded-md transition-all duration-200 text-content-tertiary hover:bg-canvas-muted active:bg-stroke-hairline",
23
+ e
24
24
  ),
25
- onClick: o,
26
- children: /* @__PURE__ */ t(b, { size: 16, "aria-hidden": !0 })
25
+ onClick: i,
26
+ children: /* @__PURE__ */ t(k, { size: 16, "aria-hidden": !0 })
27
27
  }
28
28
  );
29
29
  }, v = ({
30
30
  content: n,
31
- className: i,
32
- onInfoClick: r,
33
- label: o
34
- }) => /* @__PURE__ */ t(h, { content: n, children: /* @__PURE__ */ t(u, { onClick: r, className: i, label: o }) }), y = ({
31
+ className: e,
32
+ onInfoClick: o,
33
+ label: i
34
+ }) => /* @__PURE__ */ t(p, { content: n, children: /* @__PURE__ */ t(u, { onClick: o, className: e, label: i }) }), C = ({
35
35
  infoData: n,
36
- className: i,
37
- onInfoClick: r,
38
- label: o
36
+ className: e,
37
+ onInfoClick: o,
38
+ label: i
39
39
  }) => {
40
- const { t: a } = p(), [l, s] = k(!1), c = (e) => {
41
- e.stopPropagation(), s(!0);
40
+ const { t: a } = m(), [c, l] = g(!1), s = (r) => {
41
+ r.stopPropagation(), l(!0);
42
42
  };
43
- return /* @__PURE__ */ I(g, { children: [
44
- /* @__PURE__ */ t(h, { content: a("gridHeader.clickForDetails"), children: /* @__PURE__ */ t(
43
+ return /* @__PURE__ */ h(I, { children: [
44
+ /* @__PURE__ */ t(p, { content: a("gridHeader.clickForDetails"), children: /* @__PURE__ */ t(
45
45
  u,
46
46
  {
47
- label: o,
48
- onClick: (e) => {
49
- c(e), r && r(e);
47
+ label: i,
48
+ onClick: (r) => {
49
+ s(r), o && o(r);
50
50
  },
51
- className: m(
52
- "hover:bg-muted hover:shadow-sm hover:text-brand-variant-hover hover:-translate-y-0.5 active:scale-95",
53
- i
51
+ className: f(
52
+ "hover:bg-canvas-muted hover:shadow-sm hover:text-brand-variant-hover hover:-translate-y-0.5 active:scale-95",
53
+ e
54
54
  )
55
55
  }
56
56
  ) }),
57
- l && n && // Stop propagation to prevent the click from bubbling to the header group
57
+ c && n && // Stop propagation to prevent the click from bubbling to the header group
58
58
  // regardless of whether the modal is portaled or not.
59
- /* @__PURE__ */ t("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ t(
60
- C,
59
+ /* @__PURE__ */ t("div", { onClick: (r) => r.stopPropagation(), children: /* @__PURE__ */ t(
60
+ b,
61
61
  {
62
- open: l,
63
- onClose: () => s(!1),
62
+ open: c,
63
+ onClose: () => l(!1),
64
64
  data: n
65
65
  }
66
66
  ) })
67
67
  ] });
68
68
  }, M = (n) => {
69
- const { t: i } = p(), {
70
- showInfoIcon: r,
71
- displayName: o,
72
- displayMode: a = "tooltip",
73
- infoTooltip: l,
74
- infoData: s,
75
- className: c,
76
- onInfoClick: e
69
+ const {
70
+ showInfoIcon: e,
71
+ displayName: o
77
72
  } = n;
78
- if (!r || !o || o.trim() === "") return null;
79
- const d = () => {
80
- e && e(n);
81
- }, f = l ? `${o}: ${l}` : `${o} ${i("gridHeader.information")}`;
82
- return a === "modal" ? /* @__PURE__ */ t(
83
- y,
73
+ return !e || !o || o.trim() === "" ? null : /* @__PURE__ */ t(y, { ...n });
74
+ };
75
+ function y(n) {
76
+ const { t: e } = m(), {
77
+ displayName: o,
78
+ displayMode: i = "tooltip",
79
+ infoTooltip: a,
80
+ infoData: c,
81
+ className: l,
82
+ onInfoClick: s
83
+ } = n, r = () => {
84
+ s && s(n);
85
+ }, d = a ? `${o}: ${a}` : `${o} ${e("gridHeader.information")}`;
86
+ return i === "modal" ? /* @__PURE__ */ t(
87
+ C,
84
88
  {
85
- infoData: s,
86
- className: c,
87
- onInfoClick: d,
88
- label: f
89
+ infoData: c,
90
+ className: l,
91
+ onInfoClick: r,
92
+ label: d
89
93
  }
90
94
  ) : /* @__PURE__ */ t(
91
95
  v,
92
96
  {
93
- content: l || `Info about ${o}`,
94
- className: c,
95
- onInfoClick: d,
96
- label: f
97
+ content: a || `Info about ${o}`,
98
+ className: l,
99
+ onInfoClick: r,
100
+ label: d
97
101
  }
98
102
  );
99
- };
103
+ }
100
104
  export {
101
105
  M as HeaderInfo,
102
106
  u as InfoIconTrigger,
103
- y as ModalInfoTrigger,
107
+ C as ModalInfoTrigger,
104
108
  v as TooltipInfoTrigger
105
109
  };
@@ -3,15 +3,15 @@ import "react";
3
3
  import { Dialog as s, DialogContent as d, DialogHeader as p, DialogTitle as g, DialogBody as f } from "../../../../feedback/dialog/dialog.js";
4
4
  import { useImpactNovaI18n as h } from "../../../../../i18n/use-impact-nova-i18n.js";
5
5
  import { SectionRenderer as x } from "./section-renderers.js";
6
- const H = ({ open: a, onClose: l, data: o }) => {
6
+ const H = ({ open: a, onClose: l, data: r }) => {
7
7
  const { t: n } = h();
8
- if (!o) return null;
9
- const { title: m, sections: r = [] } = o;
10
- return /* @__PURE__ */ e(s, { open: a, onOpenChange: (t) => !t && l(), children: /* @__PURE__ */ i(d, { className: "max-w-2xl", children: [
8
+ if (!r) return null;
9
+ const { title: m, sections: t = [] } = r;
10
+ return /* @__PURE__ */ e(s, { open: a, onOpenChange: (o) => !o && l(), children: /* @__PURE__ */ i(d, { className: "max-w-2xl", children: [
11
11
  /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(g, { children: m || n("gridHeader.information") }) }),
12
12
  /* @__PURE__ */ i(f, { className: "space-y-6 py-8", children: [
13
- r.map((t, c) => /* @__PURE__ */ e(x, { section: t }, `${t.type}-${c}`)),
14
- r.length === 0 && /* @__PURE__ */ e("p", { className: "text-sm text-content-muted text-center py-4", children: n("gridHeader.noInformationAvailable") })
13
+ t.map((o, c) => /* @__PURE__ */ e(x, { section: o }, `${o.type}-${c}`)),
14
+ t.length === 0 && /* @__PURE__ */ e("p", { className: "text-sm text-secondary-foreground text-center py-4", children: n("gridHeader.noInformationAvailable") })
15
15
  ] })
16
16
  ] }) });
17
17
  };