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
@@ -2,7 +2,7 @@
2
2
  * Command Palette & Keyboard Shortcuts — Public API
3
3
  */
4
4
  export type { ShortcutScope, KeyBinding, CommandDefinition, FuzzyResult, SerializedOverride, BrowserShortcutInfo, ShortcutStorageAdapter, } from './utils';
5
- export { isMac, getKeySymbol, keybindingToSymbols, keybindingToString, matchesKeybinding, parseKeybinding, keybindingsEqual, keybindingFromEvent, isReservedShortcut, getBrowserShortcutInfo, BROWSER_SHORTCUTS, fuzzyScore, fuzzyFilter, scopePriority, serialiseOverrides, deserialiseOverrides, } from './utils';
5
+ export { isMac, getKeySymbol, keybindingToSymbols, keybindingToString, matchesKeybinding, parseKeybinding, keybindingsEqual, keybindingFromEvent, isReservedShortcut, getBrowserShortcutInfo, BROWSER_SHORTCUTS, fuzzyScore, fuzzyFilter, COMMAND_SOURCE_LABELS, scopePriority, serialiseOverrides, deserialiseOverrides, } from './utils';
6
6
  export { ShortcutRegistry, LocalStorageAdapter } from './shortcut-registry';
7
7
  export type { RegistryChangeEvent, RegistryListener, ConflictInfo } from './shortcut-registry';
8
8
  export { CommandPaletteProvider, useCommandPalette, } from './command-palette-context';
@@ -1,47 +1,48 @@
1
- import { BROWSER_SHORTCUTS as o, deserialiseOverrides as r, fuzzyFilter as m, fuzzyScore as a, getBrowserShortcutInfo as i, getKeySymbol as n, isMac as d, isReservedShortcut as s, keybindingFromEvent as l, keybindingToString as S, keybindingToSymbols as p, keybindingsEqual as u, matchesKeybinding as c, parseKeybinding as y, scopePriority as P, serialiseOverrides as f } from "./utils.js";
2
- import { LocalStorageAdapter as C, ShortcutRegistry as b } from "./shortcut-registry.js";
3
- import { CommandPaletteProvider as x, useCommandPalette as v } from "./command-palette-context.js";
4
- import { useShortcut as k } from "./use-shortcut.js";
5
- import { useGlobalShortcut as E } from "./use-global-shortcut.js";
6
- import { useBrowserShortcuts as O } from "./use-browser-shortcuts.js";
7
- import { ShortcutScopeProvider as B } from "./shortcut-scope-provider.js";
8
- import { CommandPalette as I, CommandPaletteEmpty as w, CommandPaletteFooter as G, CommandPaletteGroup as L, CommandPaletteInput as q, CommandPaletteItem as A, CommandPaletteList as H, CommandPaletteSeparator as M, CommandPaletteShortcut as U } from "./command-palette.js";
9
- import { Kbd as _ } from "./kbd.js";
10
- import { ShortcutSettings as D } from "./shortcut-settings.js";
1
+ import { BROWSER_SHORTCUTS as o, COMMAND_SOURCE_LABELS as r, deserialiseOverrides as m, fuzzyFilter as a, fuzzyScore as i, getBrowserShortcutInfo as n, getKeySymbol as d, isMac as s, isReservedShortcut as S, keybindingFromEvent as l, keybindingToString as p, keybindingToSymbols as u, keybindingsEqual as c, matchesKeybinding as y, parseKeybinding as C, scopePriority as P, serialiseOverrides as f } from "./utils.js";
2
+ import { LocalStorageAdapter as b, ShortcutRegistry as h } from "./shortcut-registry.js";
3
+ import { CommandPaletteProvider as v, useCommandPalette as E } from "./command-palette-context.js";
4
+ import { useShortcut as R } from "./use-shortcut.js";
5
+ import { useGlobalShortcut as z } from "./use-global-shortcut.js";
6
+ import { useBrowserShortcuts as K } from "./use-browser-shortcuts.js";
7
+ import { ShortcutScopeProvider as T } from "./shortcut-scope-provider.js";
8
+ import { CommandPalette as F, CommandPaletteEmpty as I, CommandPaletteFooter as M, CommandPaletteGroup as _, CommandPaletteInput as w, CommandPaletteItem as G, CommandPaletteList as U, CommandPaletteSeparator as q, CommandPaletteShortcut as D } from "./command-palette.js";
9
+ import { Kbd as N } from "./kbd.js";
10
+ import { ShortcutSettings as j } from "./shortcut-settings.js";
11
11
  export {
12
12
  o as BROWSER_SHORTCUTS,
13
- I as CommandPalette,
14
- w as CommandPaletteEmpty,
15
- G as CommandPaletteFooter,
16
- L as CommandPaletteGroup,
17
- q as CommandPaletteInput,
18
- A as CommandPaletteItem,
19
- H as CommandPaletteList,
20
- x as CommandPaletteProvider,
21
- M as CommandPaletteSeparator,
22
- U as CommandPaletteShortcut,
23
- _ as Kbd,
24
- C as LocalStorageAdapter,
25
- b as ShortcutRegistry,
26
- B as ShortcutScopeProvider,
27
- D as ShortcutSettings,
28
- r as deserialiseOverrides,
29
- m as fuzzyFilter,
30
- a as fuzzyScore,
31
- i as getBrowserShortcutInfo,
32
- n as getKeySymbol,
33
- d as isMac,
34
- s as isReservedShortcut,
13
+ r as COMMAND_SOURCE_LABELS,
14
+ F as CommandPalette,
15
+ I as CommandPaletteEmpty,
16
+ M as CommandPaletteFooter,
17
+ _ as CommandPaletteGroup,
18
+ w as CommandPaletteInput,
19
+ G as CommandPaletteItem,
20
+ U as CommandPaletteList,
21
+ v as CommandPaletteProvider,
22
+ q as CommandPaletteSeparator,
23
+ D as CommandPaletteShortcut,
24
+ N as Kbd,
25
+ b as LocalStorageAdapter,
26
+ h as ShortcutRegistry,
27
+ T as ShortcutScopeProvider,
28
+ j as ShortcutSettings,
29
+ m as deserialiseOverrides,
30
+ a as fuzzyFilter,
31
+ i as fuzzyScore,
32
+ n as getBrowserShortcutInfo,
33
+ d as getKeySymbol,
34
+ s as isMac,
35
+ S as isReservedShortcut,
35
36
  l as keybindingFromEvent,
36
- S as keybindingToString,
37
- p as keybindingToSymbols,
38
- u as keybindingsEqual,
39
- c as matchesKeybinding,
40
- y as parseKeybinding,
37
+ p as keybindingToString,
38
+ u as keybindingToSymbols,
39
+ c as keybindingsEqual,
40
+ y as matchesKeybinding,
41
+ C as parseKeybinding,
41
42
  P as scopePriority,
42
43
  f as serialiseOverrides,
43
- O as useBrowserShortcuts,
44
- v as useCommandPalette,
45
- E as useGlobalShortcut,
46
- k as useShortcut
44
+ K as useBrowserShortcuts,
45
+ E as useCommandPalette,
46
+ z as useGlobalShortcut,
47
+ R as useShortcut
47
48
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { cva as l } from "class-variance-authority";
4
- import { cn as o } from "../../../lib/utils.js";
5
- import { keybindingToSymbols as b, getKeySymbol as c } from "./utils.js";
6
- const u = l(
2
+ import * as o from "react";
3
+ import { cva as c } from "class-variance-authority";
4
+ import { cn as i } from "../../../lib/utils.js";
5
+ import { keybindingToSymbols as f, getKeySymbol as u } from "./utils.js";
6
+ const b = c(
7
7
  "inline-flex items-center justify-center rounded border font-mono leading-none select-none",
8
8
  {
9
9
  variants: {
@@ -13,9 +13,9 @@ const u = l(
13
13
  lg: "min-w-[26px] h-[26px] px-2 text-xs"
14
14
  },
15
15
  variant: {
16
- default: "bg-[#f4f5f7] border-[#d1d5db] text-[#374151] shadow-[0_1px_0_0_#d1d5db]",
17
- muted: "bg-[#e5e7eb] border-[#d1d5db] text-[#6b7280]",
18
- dark: "bg-[#374151] border-[#4b5563] text-[#e5e7eb] shadow-[0_1px_0_0_#1f2937]"
16
+ default: "bg-canvas-muted border-stroke-hairline text-content-charcoal shadow-[0_1px_0_0_var(--color-border-hairline)]",
17
+ muted: "bg-stroke-hairline border-stroke-hairline text-content-muted",
18
+ dark: "bg-content text-canvas border-stroke shadow-[0_1px_0_0_hsl(0_0%_0%_/_0.25)]"
19
19
  }
20
20
  },
21
21
  defaultVariants: {
@@ -23,23 +23,23 @@ const u = l(
23
23
  variant: "default"
24
24
  }
25
25
  }
26
- ), h = d.forwardRef(
27
- ({ className: i, keys: t, keybinding: r, size: m, variant: p, ...s }, x) => {
28
- const n = d.useMemo(() => r ? b(r) : t ? t.map((e) => c(e)) : [], [t, r]);
26
+ ), h = o.forwardRef(
27
+ ({ className: s, keys: t, keybinding: r, size: l, variant: m, ...d }, p) => {
28
+ const n = o.useMemo(() => r ? f(r) : t ? t.map((e) => u(e)) : [], [t, r]);
29
29
  return n.length === 0 ? null : /* @__PURE__ */ a(
30
30
  "span",
31
31
  {
32
- ref: x,
33
- className: o("inline-flex items-center gap-0.5", i),
32
+ ref: p,
33
+ className: i("inline-flex items-center gap-0.5", s),
34
34
  "data-component": "kbd",
35
- ...s,
36
- children: n.map((e, f) => /* @__PURE__ */ a(
35
+ ...d,
36
+ children: n.map((e, x) => /* @__PURE__ */ a(
37
37
  "kbd",
38
38
  {
39
- className: o(u({ size: m, variant: p })),
39
+ className: i(b({ size: l, variant: m })),
40
40
  children: e
41
41
  },
42
- `${e}-${f}`
42
+ `${e}-${x}`
43
43
  ))
44
44
  }
45
45
  );
@@ -48,5 +48,5 @@ const u = l(
48
48
  h.displayName = "Kbd";
49
49
  export {
50
50
  h as Kbd,
51
- u as kbdVariants
51
+ b as kbdVariants
52
52
  };
@@ -1,10 +1,10 @@
1
1
  import { ShortcutScope } from './utils';
2
2
  /**
3
- * ShortcutSettings — Keyboard shortcut customisation panel built with AG Grid.
3
+ * ShortcutSettings — Keyboard shortcut customisation panel (data table UI).
4
4
  *
5
5
  * Features:
6
- * - AG Grid with search, sort, and filter on every column
7
- * - Source column with set filter (All / User / Browser / AG Grid / System)
6
+ * - Search, sort, and filter on every column
7
+ * - Source column with set filter (All / User / Browser / Table / System)
8
8
  * - Click keybinding cell → "recording mode" (press new keys)
9
9
  * - Non-customisable rows are read-only
10
10
  * - Conflict detection with inline warning
@@ -1,36 +1,30 @@
1
- import { jsx as r, jsxs as g, Fragment as U } from "react/jsx-runtime";
2
- import * as n from "react";
3
- import { User as _, Monitor as K, AlertTriangle as O, Lock as G, RotateCcw as j } from "lucide-react";
1
+ import { jsx as r, jsxs as p, Fragment as K } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { User as j, Monitor as z, AlertTriangle as G, Lock as T, RotateCcw as U } from "lucide-react";
4
4
  import { cn as h } from "../../../lib/utils.js";
5
- import { ModuleRegistry as z, AllCommunityModule as B } from "ag-grid-community";
6
- import { AllEnterpriseModule as $ } from "ag-grid-enterprise";
7
- import { DataTable as H, DataTableContent as V } from "../data-table/data-table.js";
8
- import { AG_CELL_NO_PADDING as P } from "../ag-grid-react/cell-renderers/index.js";
9
- import { Kbd as q } from "./kbd.js";
10
- import { useCommandPalette as J } from "./command-palette-context.js";
11
- import { keybindingToString as Q, keybindingFromEvent as X, isReservedShortcut as Y } from "./utils.js";
12
- import { BadgeCellRenderer as Z } from "../ag-grid-react/cell-renderers/badge-cell-renderer.js";
13
- z.registerModules([B, $]);
14
- const W = {
15
- system: "System",
16
- user: "User",
17
- "ag-grid": "AG Grid",
18
- browser: "Browser"
19
- };
20
- function ee(s) {
21
- const e = s.data;
22
- return e ? /* @__PURE__ */ g("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
23
- !e.customisable && /* @__PURE__ */ r(G, { className: "h-3 w-3 text-[#9ca3af] shrink-0" }),
24
- /* @__PURE__ */ g("div", { className: "flex flex-col min-w-0 gap-0", children: [
25
- /* @__PURE__ */ r("span", { className: "truncate font-medium text-[#374151] text-xs leading-tight", children: e.command }),
26
- e.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-[#9ca3af] leading-tight", children: e.description })
5
+ import { ModuleRegistry as B, AllCommunityModule as $ } from "ag-grid-community";
6
+ import { AllEnterpriseModule as H } from "ag-grid-enterprise";
7
+ import { DataTable as V, DataTableContent as q } from "../data-table/data-table.js";
8
+ import { AG_CELL_NO_PADDING as D } from "../ag-grid-react/cell-renderers/index.js";
9
+ import { Kbd as J } from "./kbd.js";
10
+ import { useCommandPalette as Q } from "./command-palette-context.js";
11
+ import { COMMAND_SOURCE_LABELS as a, keybindingToString as X, keybindingFromEvent as Y, isReservedShortcut as Z } from "./utils.js";
12
+ import { BadgeCellRenderer as W } from "../ag-grid-react/cell-renderers/badge-cell-renderer.js";
13
+ B.registerModules([$, H]);
14
+ function ee(n) {
15
+ const e = n.data;
16
+ return e ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
17
+ !e.customisable && /* @__PURE__ */ r(T, { className: "h-3 w-3 text-content-muted shrink-0" }),
18
+ /* @__PURE__ */ p("div", { className: "flex flex-col min-w-0 gap-0", children: [
19
+ /* @__PURE__ */ r("span", { className: "truncate font-medium text-content-charcoal text-xs leading-tight", children: e.command }),
20
+ e.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-content-muted leading-tight", children: e.description })
27
21
  ] })
28
22
  ] }) : null;
29
23
  }
30
- function te(s) {
31
- const e = s.data;
24
+ function te(n) {
25
+ const e = n.data;
32
26
  if (!e) return null;
33
- const c = s.recordingCommandId === e.id;
27
+ const d = n.recordingCommandId === e.id;
34
28
  return /* @__PURE__ */ r("div", { className: h(
35
29
  "w-full h-full flex items-center ag-cell-inner-padding",
36
30
  e.customisable ? "in-ag-editable-cell-highlight" : ""
@@ -39,122 +33,122 @@ function te(s) {
39
33
  {
40
34
  className: h(
41
35
  "flex items-center justify-between w-full h-7 rounded-[8px] px-1.5 group/row relative",
42
- e.customisable ? "bg-white" : "bg-transparent",
43
- c && "ring-1 ring-[#4259ee] border border-[#4259ee]"
36
+ e.customisable ? "bg-canvas-elevated" : "bg-transparent",
37
+ d && "ring-1 ring-brand border border-brand"
44
38
  ),
45
- children: c ? /* @__PURE__ */ r("span", { className: "text-xs text-[#4259ee] font-medium animate-pulse", children: s.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ g(U, { children: [
39
+ children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse", children: n.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ p(K, { children: [
46
40
  e.keybinding ? /* @__PURE__ */ r(
47
41
  "button",
48
42
  {
49
43
  type: "button",
50
- onClick: (a) => {
51
- a.stopPropagation(), e.customisable && s.onStartRecording(e.id);
44
+ onClick: (o) => {
45
+ o.stopPropagation(), e.customisable && n.onStartRecording(e.id);
52
46
  },
53
47
  disabled: !e.customisable,
54
48
  className: h(
55
49
  "flex items-center justify-end h-full w-full text-right",
56
50
  e.customisable ? "cursor-pointer" : "cursor-default opacity-70"
57
51
  ),
58
- children: /* @__PURE__ */ r(q, { keybinding: e.keybinding, size: "sm" })
52
+ children: /* @__PURE__ */ r(J, { keybinding: e.keybinding, size: "sm" })
59
53
  }
60
54
  ) : e.customisable ? /* @__PURE__ */ r(
61
55
  "button",
62
56
  {
63
57
  type: "button",
64
- onClick: (a) => {
65
- a.stopPropagation(), s.onStartRecording(e.id);
58
+ onClick: (o) => {
59
+ o.stopPropagation(), n.onStartRecording(e.id);
66
60
  },
67
- className: "flex items-center justify-end h-full w-full text-xs text-[#9ca3af] hover:text-[#4259ee] transition-colors cursor-pointer text-right",
68
- children: s.addShortcutLabel ?? "Add shortcut"
61
+ className: "flex items-center justify-end h-full w-full text-xs text-content-muted hover:text-brand transition-colors cursor-pointer text-right",
62
+ children: n.addShortcutLabel ?? "Add shortcut"
69
63
  }
70
64
  ) : /* @__PURE__ */ r("span", { className: "text-xs text-transparent", children: "--" }),
71
- e.hasOverride && e.customisable && !c && /* @__PURE__ */ r(
65
+ e.hasOverride && e.customisable && !d && /* @__PURE__ */ r(
72
66
  "button",
73
67
  {
74
68
  type: "button",
75
- onClick: (a) => {
76
- a.stopPropagation(), s.onReset(e.id);
69
+ onClick: (o) => {
70
+ o.stopPropagation(), n.onReset(e.id);
77
71
  },
78
- className: "absolute right-1 p-0.5 rounded bg-white hover:bg-[#f3f4f6] hover:text-[#ef4444] cursor-pointer opacity-0 group-hover/row:opacity-100 transition-opacity z-10",
72
+ className: "absolute right-1 p-0.5 rounded bg-canvas-elevated hover:bg-canvas-muted hover:text-destructive cursor-pointer opacity-0 group-hover/row:opacity-100 transition-opacity z-10",
79
73
  title: "Reset to default",
80
- children: /* @__PURE__ */ r(j, { className: "h-3 w-3" })
74
+ children: /* @__PURE__ */ r(U, { className: "h-3 w-3" })
81
75
  }
82
76
  )
83
77
  ] })
84
78
  }
85
79
  ) });
86
80
  }
87
- function re(s) {
88
- const e = s.data;
89
- return e ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-[#6b7280] capitalize", children: e.scope }) }) : null;
81
+ function re(n) {
82
+ const e = n.data;
83
+ return e ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-content-muted capitalize", children: e.scope }) }) : null;
90
84
  }
91
85
  function le({
92
- className: s,
86
+ className: n,
93
87
  scopes: e,
94
- sources: c,
95
- renderStatus: a,
96
- recordingLabel: se,
97
- pressShortcutLabel: b,
98
- addShortcutLabel: x,
99
- conflictWarnLabel: y = "Conflicts with other shortcuts",
100
- reservedWarnLabel: p = "This shortcut is reserved by the browser",
101
- recordingInstruction: A = "Recording: Press shortcut or Esc",
102
- ...ie
88
+ sources: d,
89
+ renderStatus: o,
90
+ recordingLabel: ne,
91
+ pressShortcutLabel: x,
92
+ addShortcutLabel: y,
93
+ conflictWarnLabel: v = "Conflicts with other shortcuts",
94
+ reservedWarnLabel: b = "This shortcut is reserved by the browser",
95
+ recordingInstruction: F = "Recording: Press shortcut or Esc",
96
+ ...ae
103
97
  }) {
104
98
  const {
105
99
  getSettingsCommands: w,
106
100
  getEffectiveKeybinding: C,
107
- updateKeybinding: v,
108
- resetKeybinding: S,
109
- version: D
110
- } = J(), [o, m] = n.useState(null), [u, i] = n.useState(null), T = n.useMemo(() => {
101
+ updateKeybinding: S,
102
+ resetKeybinding: N,
103
+ version: A
104
+ } = Q(), [c, f] = i.useState(null), [u, s] = i.useState(null), L = i.useMemo(() => {
111
105
  let l = w();
112
- return e && (l = l.filter((t) => e.includes(t.scope))), c && (l = l.filter((t) => t.source && c.includes(t.source))), l.map((t) => {
113
- const d = C(t.id), f = t.source ?? "user", M = W[f] ?? t.source ?? "User", E = M.toLowerCase() === "user";
106
+ return e && (l = l.filter((t) => e.includes(t.scope))), d && (l = l.filter((t) => t.source && d.includes(t.source))), l.map((t) => {
107
+ const m = C(t.id), g = t.source ?? "user", E = a[g] ?? g ?? "User", P = E.toLowerCase() === "user";
114
108
  return {
115
109
  id: t.id,
116
110
  command: t.label,
117
111
  description: t.description || "",
118
112
  category: t.category || "General",
119
- keybinding: d,
120
- keybindingDisplay: d ? Q(d) : "",
113
+ keybinding: m,
114
+ keybindingDisplay: m ? X(m) : "",
121
115
  scope: t.scope,
122
- source: M,
123
- sourceColor: E ? "primary" : "neutral",
124
- sourceIcon: E ? /* @__PURE__ */ r(_, { className: "h-3 w-3" }) : /* @__PURE__ */ r(K, { className: "h-3 w-3" }),
116
+ source: E,
117
+ sourceColor: P ? "primary" : "neutral",
118
+ sourceIcon: P ? /* @__PURE__ */ r(j, { className: "h-3 w-3" }) : /* @__PURE__ */ r(z, { className: "h-3 w-3" }),
125
119
  customisable: t.customisable !== !1,
126
120
  passive: t.passive === !0,
127
121
  hasOverride: t.keybinding !== void 0,
128
122
  _def: t
129
123
  };
130
124
  });
131
- }, [D, e, c, w, C]), N = n.useCallback((l) => {
132
- m(l), i(null);
133
- }, []), R = n.useCallback((l) => {
134
- S(l), i(null);
135
- }, [S]);
136
- n.useEffect(() => {
137
- if (!o) return;
125
+ }, [A, e, d, w, C]), R = i.useCallback((l) => {
126
+ f(l), s(null);
127
+ }, []), k = i.useCallback((l) => {
128
+ N(l), s(null);
129
+ }, [N]);
130
+ i.useEffect(() => {
131
+ if (!c) return;
138
132
  const l = (t) => {
139
133
  if (t.preventDefault(), t.stopPropagation(), t.key === "Escape") {
140
- m(null), i(null);
134
+ f(null), s(null);
141
135
  return;
142
136
  }
143
- const d = X(t);
144
- if (!d) return;
145
- if (Y(d)) {
146
- i({ type: "reserved", text: p }), m(null), setTimeout(() => i(null), 3e3);
137
+ const m = Y(t);
138
+ if (!m) return;
139
+ if (Z(m)) {
140
+ s({ type: "reserved", text: b }), f(null), setTimeout(() => s(null), 3e3);
147
141
  return;
148
142
  }
149
- const f = v(o, d);
150
- f.success ? (m(null), i(null)) : f.conflict ? (i({
143
+ const g = S(c, m);
144
+ g.success ? (f(null), s(null)) : g.conflict ? (s({
151
145
  type: "conflict",
152
- text: y
153
- }), m(null), setTimeout(() => i(null), 3e3)) : f.reserved && (i({ type: "reserved", text: p }), m(null), setTimeout(() => i(null), 3e3));
146
+ text: v
147
+ }), f(null), setTimeout(() => s(null), 3e3)) : g.reserved && (s({ type: "reserved", text: b }), f(null), setTimeout(() => s(null), 3e3));
154
148
  };
155
149
  return window.addEventListener("keydown", l, !0), () => window.removeEventListener("keydown", l, !0);
156
- }, [o, v, p, y]);
157
- const F = n.useMemo(() => [
150
+ }, [c, S, b, v]);
151
+ const _ = i.useMemo(() => [
158
152
  {
159
153
  field: "command",
160
154
  headerName: "Command",
@@ -180,13 +174,13 @@ function le({
180
174
  type: "rightAligned",
181
175
  filter: "agTextColumnFilter",
182
176
  cellRenderer: te,
183
- cellClass: P,
177
+ cellClass: D,
184
178
  cellRendererParams: {
185
- recordingCommandId: o,
186
- onStartRecording: N,
187
- onReset: R,
188
- recordingLabel: b,
189
- addShortcutLabel: x
179
+ recordingCommandId: c,
180
+ onStartRecording: R,
181
+ onReset: k,
182
+ recordingLabel: x,
183
+ addShortcutLabel: y
190
184
  },
191
185
  sortable: !0
192
186
  },
@@ -213,8 +207,8 @@ function le({
213
207
  headerName: "Source",
214
208
  width: 130,
215
209
  filter: "agSetColumnFilter",
216
- cellClass: P,
217
- cellRenderer: Z,
210
+ cellClass: D,
211
+ cellRenderer: W,
218
212
  cellRendererParams: {
219
213
  variant: "subtle",
220
214
  colorField: "sourceColor",
@@ -226,24 +220,24 @@ function le({
226
220
  isSearchable: !0,
227
221
  advanceSearchEnabled: !0,
228
222
  selectOptions: [
229
- { label: "System", value: "System" },
230
- { label: "User", value: "User" },
231
- { label: "AG Grid", value: "AG Grid" },
232
- { label: "Browser", value: "Browser" }
223
+ { label: a.system, value: a.system },
224
+ { label: a.user, value: a.user },
225
+ { label: a["ag-grid"], value: a["ag-grid"] },
226
+ { label: a.browser, value: a.browser }
233
227
  ],
234
228
  isMultiSelect: !0
235
229
  }
236
230
  }
237
- ], [o, N, R, b, x]), L = n.useMemo(() => ({
231
+ ], [c, R, k, x, y]), I = i.useMemo(() => ({
238
232
  filter: {
239
233
  filterModel: {
240
234
  source: {
241
235
  filterType: "set",
242
- values: ["User", "AG Grid"]
236
+ values: [a.user, a["ag-grid"]]
243
237
  }
244
238
  }
245
239
  }
246
- }), []), I = n.useMemo(() => ({
240
+ }), []), O = i.useMemo(() => ({
247
241
  sortable: !0,
248
242
  resizable: !0,
249
243
  filter: !0,
@@ -251,22 +245,22 @@ function le({
251
245
  isSearchable: !0,
252
246
  advanceSearchEnabled: !0
253
247
  }
254
- }), []), k = u || o ? /* @__PURE__ */ g("div", { className: h(
248
+ }), []), M = u || c ? /* @__PURE__ */ p("div", { className: h(
255
249
  "px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
256
- u?.type === "conflict" ? "bg-[#fef3c7] text-[#92400e]" : u?.type === "reserved" ? "bg-[#fee2e2] text-[#991b1b]" : o ? "bg-[#eff6ff] text-[#1e40af] animate-[pulse_1.5s_ease-in-out_infinite]" : ""
250
+ u?.type === "conflict" ? "bg-feedback-warning-surface text-content" : u?.type === "reserved" ? "bg-feedback-error-surface text-destructive" : c ? "bg-feedback-info-surface text-brand animate-[pulse_1.5s_ease-in-out_infinite]" : ""
257
251
  ), children: [
258
- u?.type === "conflict" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(G, { className: "h-3.5 w-3.5 shrink-0" }) : o ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
259
- /* @__PURE__ */ r("span", { children: u ? u.text : A })
252
+ u?.type === "conflict" ? /* @__PURE__ */ r(G, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(T, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
253
+ /* @__PURE__ */ r("span", { children: u ? u.text : F })
260
254
  ] }) : null;
261
- return /* @__PURE__ */ g(H, { className: h("flex flex-col w-full h-full border-t-0", s), children: [
262
- a ? a(k) : k,
255
+ return /* @__PURE__ */ p(V, { className: h("flex flex-col w-full h-full border-t-0", n), children: [
256
+ o ? o(M) : M,
263
257
  /* @__PURE__ */ r(
264
- V,
258
+ q,
265
259
  {
266
- rowData: T,
267
- columnDefs: F,
268
- defaultColDef: I,
269
- initialState: L,
260
+ rowData: L,
261
+ columnDefs: _,
262
+ defaultColDef: O,
263
+ initialState: I,
270
264
  rowHeight: 44,
271
265
  animateRows: !1,
272
266
  rowSelection: "single",
@@ -29,7 +29,7 @@ export interface CommandDefinition {
29
29
  /**
30
30
  * When true, the shortcut is displayed in the palette/settings but the
31
31
  * registry will NOT intercept the keyboard event. The owning component
32
- * (e.g. AG Grid) handles its own keyboard handling natively.
32
+ * (e.g. data table) handles its own keyboard handling natively.
33
33
  */
34
34
  passive?: boolean;
35
35
  /**
@@ -39,6 +39,11 @@ export interface CommandDefinition {
39
39
  */
40
40
  instance?: string;
41
41
  }
42
+ /**
43
+ * User-visible labels for `CommandDefinition.source`.
44
+ * Internal keys stay stable (`ag-grid`, etc.); only display text is generic.
45
+ */
46
+ export declare const COMMAND_SOURCE_LABELS: Record<NonNullable<CommandDefinition['source']>, string>;
42
47
  /**
43
48
  * Storage adapter for shortcut overrides and recent commands.
44
49
  * Allows consumers to provide their own persistence implementation