impact-nova 1.6.1 → 1.6.2

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.
@@ -4,13 +4,12 @@ import { ChevronLeftIcon as we, ChevronRightIcon as ye } from "lucide-react";
4
4
  import { getDefaultClassNames as He, DayPicker as Be } from "react-day-picker";
5
5
  import { cn as f } from "../../lib/utils.js";
6
6
  import { Button as R } from "./button.js";
7
- import "./button-variants.js";
8
7
  import ce from "./select/select.js";
9
8
  import { FISCAL_PATTERNS as Fe, resolveWeekSelection as Te } from "../../lib/fiscal-calendar.js";
10
9
  import { getIntlLocale as Ke, getDateFnsLocale as We } from "../../i18n/getDateFnsLocale.js";
11
10
  import { useImpactNovaI18n as qe } from "../../i18n/ImpactNovaI18nContext.js";
12
11
  const ue = d.createContext(0);
13
- function st({
12
+ function at({
14
13
  className: ae,
15
14
  classNames: G,
16
15
  showOutsideDays: y = !1,
@@ -756,6 +755,6 @@ function Ge({
756
755
  );
757
756
  }
758
757
  export {
759
- st as Calendar,
758
+ at as Calendar,
760
759
  Ge as CalendarDayButton
761
760
  };
@@ -1,174 +1,180 @@
1
- import { jsx as r, jsxs as p, Fragment as K } from "react/jsx-runtime";
2
- import * as s from "react";
3
- import { User as j, Monitor as z, AlertTriangle as G, Lock as T, RotateCcw as U } from "lucide-react";
4
- import { cn as h } from "../../../lib/utils.js";
1
+ import { jsx as r, jsxs as h, Fragment as j } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { User as z, Monitor as G, AlertTriangle as U, Lock as F, RotateCcw as q } from "lucide-react";
4
+ import { cn as p } from "../../../lib/utils.js";
5
5
  import { ModuleRegistry as B, AllCommunityModule as $ } from "ag-grid-community";
6
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 m, 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";
7
+ import { DataTable as V, DataTableContent as J } from "../data-table/data-table.js";
8
+ import { AG_CELL_NO_PADDING as A } from "../ag-grid-react/cell-renderers/index.js";
9
+ import { Kbd as Q } from "./kbd.js";
10
+ import { useCommandPalette as X } from "./command-palette-context.js";
11
+ import { COMMAND_SOURCE_LABELS as m, keybindingToString as Y, keybindingFromEvent as Z, isReservedShortcut as W } from "./utils.js";
12
+ import { BadgeCellRenderer as ee } from "../ag-grid-react/cell-renderers/badge-cell-renderer.js";
13
13
  B.registerModules([$, H]);
14
- function ee(l) {
15
- const e = l.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 })
14
+ function te(l) {
15
+ const t = l.data;
16
+ return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
17
+ !t.customisable && /* @__PURE__ */ r(F, { className: "h-3 w-3 text-content-muted shrink-0" }),
18
+ /* @__PURE__ */ h("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: t.command }),
20
+ t.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-content-muted leading-tight", children: t.description })
21
21
  ] })
22
22
  ] }) : null;
23
23
  }
24
- function te(l) {
25
- const e = l.data;
26
- if (!e) return null;
27
- const d = l.recordingCommandId === e.id;
28
- return /* @__PURE__ */ r("div", { className: h(
24
+ function re(l) {
25
+ const t = l.data;
26
+ if (!t) return null;
27
+ const u = l.recordingCommandId === t.id;
28
+ return /* @__PURE__ */ r("div", { className: p(
29
29
  "w-full h-full flex items-center ag-cell-inner-padding",
30
- e.customisable ? "in-ag-editable-cell-highlight" : ""
30
+ t.customisable ? "in-ag-editable-cell-highlight" : ""
31
31
  ), children: /* @__PURE__ */ r(
32
32
  "div",
33
33
  {
34
- className: h(
34
+ className: p(
35
35
  "flex items-center justify-between w-full h-7 rounded-[8px] px-1.5 group/row relative",
36
- e.customisable ? "bg-canvas-elevated" : "bg-transparent",
37
- d && "ring-1 ring-brand border border-brand"
36
+ t.customisable ? "bg-canvas-elevated" : "bg-transparent",
37
+ u && "ring-1 ring-brand border border-brand"
38
38
  ),
39
- children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse", children: l.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ p(K, { children: [
40
- e.keybinding ? /* @__PURE__ */ r(
39
+ children: u ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse", children: l.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ h(j, { children: [
40
+ t.keybinding ? /* @__PURE__ */ r(
41
41
  "button",
42
42
  {
43
43
  type: "button",
44
44
  onClick: (o) => {
45
- o.stopPropagation(), e.customisable && l.onStartRecording(e.id);
45
+ o.stopPropagation(), t.customisable && l.onStartRecording(t.id);
46
46
  },
47
- disabled: !e.customisable,
48
- className: h(
47
+ disabled: !t.customisable,
48
+ className: p(
49
49
  "flex items-center justify-end h-full w-full text-right",
50
- e.customisable ? "cursor-pointer" : "cursor-default opacity-70"
50
+ t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
51
51
  ),
52
- children: /* @__PURE__ */ r(J, { keybinding: e.keybinding, size: "sm" })
52
+ children: /* @__PURE__ */ r(Q, { keybinding: t.keybinding, size: "sm" })
53
53
  }
54
- ) : e.customisable ? /* @__PURE__ */ r(
54
+ ) : t.customisable ? /* @__PURE__ */ r(
55
55
  "button",
56
56
  {
57
57
  type: "button",
58
58
  onClick: (o) => {
59
- o.stopPropagation(), l.onStartRecording(e.id);
59
+ o.stopPropagation(), l.onStartRecording(t.id);
60
60
  },
61
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
62
  children: l.addShortcutLabel ?? "Add shortcut"
63
63
  }
64
64
  ) : /* @__PURE__ */ r("span", { className: "text-xs text-transparent", children: "--" }),
65
- e.hasOverride && e.customisable && !d && /* @__PURE__ */ r(
65
+ t.hasOverride && t.customisable && !u && /* @__PURE__ */ r(
66
66
  "button",
67
67
  {
68
68
  type: "button",
69
69
  onClick: (o) => {
70
- o.stopPropagation(), l.onReset(e.id);
70
+ o.stopPropagation(), l.onReset(t.id);
71
71
  },
72
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",
73
73
  title: "Reset to default",
74
- children: /* @__PURE__ */ r(U, { className: "h-3 w-3" })
74
+ children: /* @__PURE__ */ r(q, { className: "h-3 w-3" })
75
75
  }
76
76
  )
77
77
  ] })
78
78
  }
79
79
  ) });
80
80
  }
81
- function re(l) {
82
- const e = l.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;
81
+ function ne(l) {
82
+ const t = l.data;
83
+ return t ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-content-muted capitalize", children: t.scope }) }) : null;
84
84
  }
85
- function ne({
85
+ function le({
86
86
  className: l,
87
- scopes: e,
88
- sources: d,
87
+ scopes: t,
88
+ sources: u,
89
89
  renderStatus: o,
90
- recordingLabel: le,
91
- pressShortcutLabel: x,
92
- addShortcutLabel: y,
93
- conflictWarnLabel: v = "Conflicts with other shortcuts",
90
+ recordingLabel: ae,
91
+ pressShortcutLabel: y,
92
+ addShortcutLabel: v,
93
+ conflictWarnLabel: w = "Conflicts with other shortcuts",
94
94
  reservedWarnLabel: b = "This shortcut is reserved by the browser",
95
- recordingInstruction: F = "Recording: Press shortcut or Esc",
96
- ...ae
95
+ recordingInstruction: L = "Recording: Press shortcut or Esc",
96
+ ...se
97
97
  }) {
98
98
  const {
99
- getSettingsCommands: w,
100
- getEffectiveKeybinding: C,
101
- updateKeybinding: S,
102
- resetKeybinding: N,
103
- version: A
104
- } = Q(), [c, f] = s.useState(null), [u, a] = s.useState(null), L = s.useMemo(() => {
105
- let n = w();
106
- return n = n.filter((t) => {
107
- const i = t.source ?? "user";
108
- return i === "user" || i === "ag-grid";
109
- }), e && (n = n.filter((t) => e.includes(t.scope))), d && (n = n.filter((t) => t.source && d.includes(t.source))), n.map((t) => {
110
- const i = C(t.id), g = t.source ?? "user", E = m[g] ?? g ?? "User", P = E.toLowerCase() === "user";
99
+ getSettingsCommands: C,
100
+ getEffectiveKeybinding: S,
101
+ updateKeybinding: N,
102
+ resetKeybinding: R,
103
+ version: O
104
+ } = X(), [c, f] = i.useState(null), [d, a] = i.useState(null), x = i.useMemo(() => {
105
+ let n = C();
106
+ return n = n.filter((e) => {
107
+ const s = e.source ?? "user";
108
+ return s === "user" || s === "ag-grid";
109
+ }), t && (n = n.filter((e) => t.includes(e.scope))), u && (n = n.filter((e) => e.source && u.includes(e.source))), n.map((e) => {
110
+ const s = S(e.id), g = e.source ?? "user", D = m[g] ?? g ?? "User", T = D.toLowerCase() === "user";
111
111
  return {
112
- id: t.id,
113
- command: t.label,
114
- description: t.description || "",
115
- category: t.category || "General",
116
- keybinding: i,
117
- keybindingDisplay: i ? X(i) : "",
118
- scope: t.scope,
119
- source: E,
120
- sourceColor: P ? "primary" : "neutral",
121
- sourceIcon: P ? /* @__PURE__ */ r(j, { className: "h-3 w-3" }) : /* @__PURE__ */ r(z, { className: "h-3 w-3" }),
122
- customisable: t.customisable !== !1,
123
- passive: t.passive === !0,
124
- hasOverride: t.keybinding !== void 0,
125
- _def: t
112
+ id: e.id,
113
+ command: e.label,
114
+ description: e.description || "",
115
+ category: e.category || "General",
116
+ keybinding: s,
117
+ keybindingDisplay: s ? Y(s) : "",
118
+ scope: e.scope,
119
+ source: D,
120
+ sourceColor: T ? "primary" : "neutral",
121
+ sourceIcon: T ? /* @__PURE__ */ r(z, { className: "h-3 w-3" }) : /* @__PURE__ */ r(G, { className: "h-3 w-3" }),
122
+ customisable: e.customisable !== !1,
123
+ passive: e.passive === !0,
124
+ hasOverride: e.keybinding !== void 0,
125
+ _def: e
126
126
  };
127
127
  });
128
- }, [A, e, d, w, C]), R = s.useCallback((n) => {
128
+ }, [O, t, u, C, S]), k = i.useCallback((n) => {
129
129
  f(n), a(null);
130
- }, []), k = s.useCallback((n) => {
131
- N(n), a(null);
132
- }, [N]);
133
- s.useEffect(() => {
130
+ }, []), M = i.useCallback((n) => {
131
+ R(n), a(null);
132
+ }, [R]);
133
+ i.useEffect(() => {
134
134
  if (!c) return;
135
- const n = (t) => {
136
- if (t.preventDefault(), t.stopPropagation(), t.key === "Escape") {
135
+ const n = (e) => {
136
+ if (e.preventDefault(), e.stopPropagation(), e.key === "Escape") {
137
137
  f(null), a(null);
138
138
  return;
139
139
  }
140
- const i = Y(t);
141
- if (!i) return;
142
- if (Z(i)) {
140
+ const s = Z(e);
141
+ if (!s) return;
142
+ if (W(s)) {
143
143
  a({ type: "reserved", text: b }), f(null), setTimeout(() => a(null), 3e3);
144
144
  return;
145
145
  }
146
- const g = S(c, i);
146
+ const g = N(c, s);
147
147
  g.success ? (f(null), a(null)) : g.conflict ? (a({
148
148
  type: "conflict",
149
- text: v
149
+ text: w
150
150
  }), f(null), setTimeout(() => a(null), 3e3)) : g.reserved && (a({ type: "reserved", text: b }), f(null), setTimeout(() => a(null), 3e3));
151
151
  };
152
152
  return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
153
- }, [c, S, b, v]);
154
- const _ = s.useMemo(() => [
153
+ }, [c, N, b, w]);
154
+ const E = i.useMemo(() => Array.from(new Set(x.map((e) => e.category))).sort().map((e) => ({ label: e, value: e })), [x]), _ = i.useMemo(() => [
155
155
  {
156
156
  field: "command",
157
157
  headerName: "Command",
158
158
  flex: 1,
159
159
  minWidth: 200,
160
160
  filter: "agTextColumnFilter",
161
- cellRenderer: ee,
161
+ cellRenderer: te,
162
162
  filterValueGetter: (n) => {
163
- const t = n.data;
164
- return t ? `${t.command} ${t.description}` : "";
163
+ const e = n.data;
164
+ return e ? `${e.command} ${e.description}` : "";
165
165
  }
166
166
  },
167
167
  {
168
168
  field: "category",
169
169
  headerName: "Category",
170
170
  width: 140,
171
- filter: "agSetColumnFilter"
171
+ filter: "agSetColumnFilter",
172
+ headerComponentParams: {
173
+ isSearchable: !0,
174
+ advanceSearchEnabled: !0,
175
+ selectOptions: E,
176
+ isMultiSelect: !0
177
+ }
172
178
  },
173
179
  {
174
180
  field: "keybindingDisplay",
@@ -176,14 +182,14 @@ function ne({
176
182
  width: 180,
177
183
  type: "rightAligned",
178
184
  filter: "agTextColumnFilter",
179
- cellRenderer: te,
180
- cellClass: D,
185
+ cellRenderer: re,
186
+ cellClass: A,
181
187
  cellRendererParams: {
182
188
  recordingCommandId: c,
183
- onStartRecording: R,
184
- onReset: k,
185
- recordingLabel: x,
186
- addShortcutLabel: y
189
+ onStartRecording: k,
190
+ onReset: M,
191
+ recordingLabel: y,
192
+ addShortcutLabel: v
187
193
  },
188
194
  sortable: !0
189
195
  },
@@ -192,7 +198,7 @@ function ne({
192
198
  headerName: "Scope",
193
199
  width: 100,
194
200
  filter: "agSetColumnFilter",
195
- cellRenderer: re,
201
+ cellRenderer: ne,
196
202
  headerComponentParams: {
197
203
  isSearchable: !0,
198
204
  advanceSearchEnabled: !0,
@@ -210,8 +216,8 @@ function ne({
210
216
  headerName: "Source",
211
217
  width: 130,
212
218
  filter: "agSetColumnFilter",
213
- cellClass: D,
214
- cellRenderer: W,
219
+ cellClass: A,
220
+ cellRenderer: ee,
215
221
  cellRendererParams: {
216
222
  variant: "subtle",
217
223
  colorField: "sourceColor",
@@ -229,7 +235,7 @@ function ne({
229
235
  isMultiSelect: !0
230
236
  }
231
237
  }
232
- ], [c, R, k, x, y]), I = s.useMemo(() => ({
238
+ ], [c, k, M, y, v, E]), I = i.useMemo(() => ({
233
239
  filter: {
234
240
  filterModel: {
235
241
  source: {
@@ -238,7 +244,7 @@ function ne({
238
244
  }
239
245
  }
240
246
  }
241
- }), []), O = s.useMemo(() => ({
247
+ }), []), K = i.useMemo(() => ({
242
248
  sortable: !0,
243
249
  resizable: !0,
244
250
  filter: !0,
@@ -246,21 +252,21 @@ function ne({
246
252
  isSearchable: !0,
247
253
  advanceSearchEnabled: !0
248
254
  }
249
- }), []), M = u || c ? /* @__PURE__ */ p("div", { className: h(
255
+ }), []), P = d || c ? /* @__PURE__ */ h("div", { className: p(
250
256
  "px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
251
- 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
+ d?.type === "conflict" ? "bg-feedback-warning-surface text-content" : d?.type === "reserved" ? "bg-feedback-error-surface text-destructive" : c ? "bg-feedback-info-surface text-brand animate-[pulse_1.5s_ease-in-out_infinite]" : ""
252
258
  ), children: [
253
- 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,
254
- /* @__PURE__ */ r("span", { children: u ? u.text : F })
259
+ d?.type === "conflict" ? /* @__PURE__ */ r(U, { className: "h-3.5 w-3.5 shrink-0" }) : d?.type === "reserved" ? /* @__PURE__ */ r(F, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
260
+ /* @__PURE__ */ r("span", { children: d ? d.text : L })
255
261
  ] }) : null;
256
- return /* @__PURE__ */ p(V, { className: h("flex flex-col w-full h-full border-t-0", l), children: [
257
- o ? o(M) : M,
262
+ return /* @__PURE__ */ h(V, { className: p("flex flex-col w-full h-full border-t-0", l), children: [
263
+ o ? o(P) : P,
258
264
  /* @__PURE__ */ r(
259
- q,
265
+ J,
260
266
  {
261
- rowData: L,
267
+ rowData: x,
262
268
  columnDefs: _,
263
- defaultColDef: O,
269
+ defaultColDef: K,
264
270
  initialState: I,
265
271
  rowHeight: 44,
266
272
  animateRows: !1,
@@ -273,7 +279,7 @@ function ne({
273
279
  )
274
280
  ] });
275
281
  }
276
- ne.displayName = "ShortcutSettings";
282
+ le.displayName = "ShortcutSettings";
277
283
  export {
278
- ne as ShortcutSettings
284
+ le as ShortcutSettings
279
285
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",