impact-nova 1.3.0 → 1.5.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.
Files changed (117) hide show
  1. package/README.md +49 -0
  2. package/dist/components/layout/dashboard-layout.d.ts +15 -1
  3. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
  4. package/dist/components/ui/accordion.js +38 -34
  5. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
  6. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
  7. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
  11. package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
  12. package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
  13. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
  14. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
  15. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
  16. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  18. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  19. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  20. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  21. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  23. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  24. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  25. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  26. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  29. package/dist/components/ui/alert.js +62 -58
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +354 -354
  32. package/dist/components/ui/chart/chart.js +63 -62
  33. package/dist/components/ui/chips.js +42 -38
  34. package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
  35. package/dist/components/ui/command-palette/command-palette-context.js +110 -0
  36. package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
  37. package/dist/components/ui/command-palette/command-palette.js +402 -0
  38. package/dist/components/ui/command-palette/index.d.ts +23 -0
  39. package/dist/components/ui/command-palette/index.js +44 -0
  40. package/dist/components/ui/command-palette/kbd.d.ts +28 -0
  41. package/dist/components/ui/command-palette/kbd.js +52 -0
  42. package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
  43. package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
  44. package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
  45. package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
  46. package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
  47. package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
  48. package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
  49. package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
  50. package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
  51. package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
  52. package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
  53. package/dist/components/ui/command-palette/use-shortcut.js +49 -0
  54. package/dist/components/ui/command-palette/utils.d.ts +119 -0
  55. package/dist/components/ui/command-palette/utils.js +248 -0
  56. package/dist/components/ui/data-table/data-table-column-list.js +87 -86
  57. package/dist/components/ui/data-table/data-table-format-options.js +45 -44
  58. package/dist/components/ui/data-table/data-table-view-options.js +39 -38
  59. package/dist/components/ui/date-picker/date-picker.js +89 -87
  60. package/dist/components/ui/date-picker/date-range-picker.js +140 -138
  61. package/dist/components/ui/date-picker/month-picker.js +82 -81
  62. package/dist/components/ui/date-picker/month-range-picker.js +108 -105
  63. package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
  64. package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
  65. package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
  66. package/dist/components/ui/date-picker/week-picker.js +117 -115
  67. package/dist/components/ui/date-picker/week-range-picker.js +166 -164
  68. package/dist/components/ui/dialog.js +78 -73
  69. package/dist/components/ui/drawer.js +71 -66
  70. package/dist/components/ui/file-upload.js +131 -127
  71. package/dist/components/ui/filter-panel/filter-panel.js +98 -94
  72. package/dist/components/ui/filter-strip/filter-strip.js +95 -91
  73. package/dist/components/ui/filter-strip/filter-summary.js +91 -90
  74. package/dist/components/ui/header.js +57 -53
  75. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
  76. package/dist/components/ui/loader.js +17 -16
  77. package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
  78. package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
  79. package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
  80. package/dist/components/ui/nested-list/nested-list.js +184 -182
  81. package/dist/components/ui/notification-panel/notification-panel.js +60 -53
  82. package/dist/components/ui/popover.js +45 -40
  83. package/dist/components/ui/prompt.js +90 -86
  84. package/dist/components/ui/select/select.js +206 -209
  85. package/dist/components/ui/sheet.d.ts +1 -0
  86. package/dist/components/ui/sheet.js +50 -48
  87. package/dist/components/ui/sidebar.js +273 -267
  88. package/dist/components/ui/stepper.js +75 -63
  89. package/dist/components/ui/tag.js +48 -44
  90. package/dist/components/ui/toast.js +46 -41
  91. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  92. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  93. package/dist/i18n/defaultMessages.d.ts +231 -0
  94. package/dist/i18n/defaultMessages.js +206 -0
  95. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  96. package/dist/i18n/getDateFnsLocale.js +21 -0
  97. package/dist/i18n/index.d.ts +5 -0
  98. package/dist/i18n/locales/de.d.ts +2 -0
  99. package/dist/i18n/locales/de.js +206 -0
  100. package/dist/i18n/locales/es.d.ts +2 -0
  101. package/dist/i18n/locales/es.js +206 -0
  102. package/dist/i18n/locales/hi.d.ts +2 -0
  103. package/dist/i18n/locales/hi.js +206 -0
  104. package/dist/i18n/locales/index.d.ts +4 -0
  105. package/dist/i18n/locales/kn.d.ts +2 -0
  106. package/dist/i18n/locales/kn.js +206 -0
  107. package/dist/icons/assets/boxAdd.svg.js +5 -0
  108. package/dist/icons/assets/boxed.svg.js +5 -0
  109. package/dist/icons/assets/trolley.svg.js +5 -0
  110. package/dist/icons/assets/unlocked.svg.js +5 -0
  111. package/dist/icons/index.d.ts +4 -0
  112. package/dist/icons/index.js +179 -171
  113. package/dist/impact-nova.css +1 -1
  114. package/dist/index.d.ts +4 -0
  115. package/dist/index.js +232 -172
  116. package/package.json +36 -4
  117. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,88 +1,89 @@
1
- import { jsx as T } from "react/jsx-runtime";
2
- import { useState as P, useRef as w, useCallback as m, useEffect as F } from "react";
3
- import { useDataTable as q } from "./data-table-context.js";
4
- import { NestedList as B } from "../nested-list/nested-list.js";
5
- import { SelectionMode as H } from "../types/nested-list.types.js";
6
- function J(d, S) {
1
+ import { jsx as w } from "react/jsx-runtime";
2
+ import { useState as j, useRef as R, useCallback as p, useEffect as A } from "react";
3
+ import { useDataTable as B } from "./data-table-context.js";
4
+ import { NestedList as H } from "../nested-list/nested-list.js";
5
+ import { SelectionMode as J } from "../types/nested-list.types.js";
6
+ import { useImpactNovaI18n as K } from "../../../i18n/ImpactNovaI18nContext.js";
7
+ function Q(d, I) {
7
8
  let f = null;
8
- return ((...D) => {
9
- f && clearTimeout(f), f = setTimeout(() => d(...D), S);
9
+ return ((...S) => {
10
+ f && clearTimeout(f), f = setTimeout(() => d(...S), I);
10
11
  });
11
12
  }
12
- const $ = ({
13
+ const le = ({
13
14
  enableApplyDiscard: d = !1,
14
- showSearch: S = !0,
15
+ showSearch: I = !0,
15
16
  showSelectAll: f = !0,
16
- showCollapse: D = !0
17
+ showCollapse: S = !0
17
18
  }) => {
18
- const { gridApi: l } = q(), [j, R] = P([]), [A, U] = P(!1), y = w(!1), V = w(/* @__PURE__ */ new Map()), p = m(() => {
19
- if (!l || y.current) return;
20
- const n = l.getColumnState(), o = new Map(n.map((t) => [t.colId, t]));
21
- V.current = o;
22
- const s = l.getColumns() || [], a = new Map(s.map((t) => [t.getColId(), t])), u = [], e = [], I = /* @__PURE__ */ new Map(), k = (t, c) => {
23
- const r = t.getGroupId();
24
- let i = I.get(r);
25
- if (i) return i;
26
- const h = t.getOriginalParent(), C = h ? k(h, c).children : c, b = t.getColGroupDef();
27
- return i = {
28
- id: r,
29
- label: b?.headerName || r,
19
+ const { gridApi: r } = B(), { t: h } = K(), [F, x] = j([]), [U, V] = j(!1), y = R(!1), W = R(/* @__PURE__ */ new Map()), g = p(() => {
20
+ if (!r || y.current) return;
21
+ const o = r.getColumnState(), n = new Map(o.map((t) => [t.colId, t]));
22
+ W.current = n;
23
+ const s = r.getColumns() || [], i = new Map(s.map((t) => [t.getColId(), t])), u = [], e = [], T = /* @__PURE__ */ new Map(), k = (t, c) => {
24
+ const l = t.getGroupId();
25
+ let a = T.get(l);
26
+ if (a) return a;
27
+ const m = t.getOriginalParent(), b = m ? k(m, c).children : c, D = t.getColGroupDef();
28
+ return a = {
29
+ id: l,
30
+ label: D?.headerName || l,
30
31
  checked: !0,
31
32
  children: [],
32
33
  category: "group"
33
- }, I.set(r, i), C.push(i), i;
34
+ }, T.set(l, a), b.push(a), a;
34
35
  };
35
- let M = 0, L = 0, v = 0, O = 0;
36
- n.forEach((t) => {
37
- const c = a.get(t.colId);
36
+ let v = 0, L = 0, M = 0, P = 0;
37
+ o.forEach((t) => {
38
+ const c = i.get(t.colId);
38
39
  if (!c) return;
39
- let r = l.getDisplayNameForColumn(c, "header");
40
- if (r === "") return;
41
- if (r == null) {
42
- const N = c.getColDef();
43
- if (N.headerName === "") return;
44
- r = N.headerName || N.field || t.colId;
40
+ let l = r.getDisplayNameForColumn(c, "header");
41
+ if (l === "") return;
42
+ if (l == null) {
43
+ const E = c.getColDef();
44
+ if (E.headerName === "") return;
45
+ l = E.headerName || E.field || t.colId;
45
46
  }
46
- if (!r || r.trim() === "")
47
+ if (!l || l.trim() === "")
47
48
  return;
48
- const i = !t.hide, h = {
49
+ const a = !t.hide, m = {
49
50
  id: t.colId,
50
- label: r,
51
- checked: i
51
+ label: l,
52
+ checked: a
52
53
  };
53
- t.pinned ? (M++, i && L++) : (v++, i && O++);
54
- const C = t.pinned ? u : e, b = c.getOriginalParent();
55
- b ? k(b, C).children.push(h) : C.push(h);
54
+ t.pinned ? (v++, a && L++) : (M++, a && P++);
55
+ const b = t.pinned ? u : e, D = c.getOriginalParent();
56
+ D ? k(D, b).children.push(m) : b.push(m);
56
57
  });
57
58
  const G = (t) => {
58
59
  let c = t.length > 0;
59
- for (const r of t)
60
- r.children && (r.checked = G(r.children)), r.checked || (c = !1);
60
+ for (const l of t)
61
+ l.children && (l.checked = G(l.children)), l.checked || (c = !1);
61
62
  return c;
62
63
  };
63
64
  G(u), G(e);
64
- const E = [];
65
- u.length > 0 && E.push({
65
+ const N = [];
66
+ u.length > 0 && N.push({
66
67
  id: "root-frozen",
67
- label: "Frozen Columns",
68
- checked: M > 0 && L === M,
68
+ label: h("dataTable.frozenColumns"),
69
+ checked: v > 0 && L === v,
69
70
  children: u,
70
71
  category: "structure",
71
72
  isDragDisabled: !0
72
- }), e.length > 0 && E.push({
73
+ }), e.length > 0 && N.push({
73
74
  id: "root-scrollable",
74
- label: "Scrollable Columns",
75
- checked: v > 0 && O === v,
75
+ label: h("dataTable.scrollableColumns"),
76
+ checked: M > 0 && P === M,
76
77
  children: e,
77
78
  category: "structure",
78
79
  isDragDisabled: !0
79
- }), R(E), U(!0);
80
- }, [l]), x = w(null);
81
- F(() => {
82
- x.current = J(p, 150);
83
- }, [p]), F(() => {
84
- if (!l) return;
85
- const n = setTimeout(() => p(), 0), o = [
80
+ }), x(N), V(!0);
81
+ }, [r, h]), z = R(null);
82
+ A(() => {
83
+ z.current = Q(g, 150);
84
+ }, [g]), A(() => {
85
+ if (!r) return;
86
+ const o = setTimeout(() => g(), 0), n = [
86
87
  "columnVisible",
87
88
  "columnPinned",
88
89
  "columnMoved",
@@ -93,15 +94,15 @@ const $ = ({
93
94
  "columnPivotModeChanged",
94
95
  "columnEverythingChanged"
95
96
  ], s = () => {
96
- x.current?.();
97
+ z.current?.();
97
98
  };
98
- return l.isDestroyed() || o.forEach((a) => l.addEventListener(a, s)), () => {
99
- clearTimeout(n), l.isDestroyed() || o.forEach((a) => l.removeEventListener(a, s));
99
+ return r.isDestroyed() || n.forEach((i) => r.addEventListener(i, s)), () => {
100
+ clearTimeout(o), r.isDestroyed() || n.forEach((i) => r.removeEventListener(i, s));
100
101
  };
101
- }, [l, p]);
102
- const z = m((n) => {
103
- const o = [], s = (a, u) => {
104
- a.forEach((e) => {
102
+ }, [r, g]);
103
+ const O = p((o) => {
104
+ const n = [], s = (i, u) => {
105
+ i.forEach((e) => {
105
106
  if (e.id === "root-frozen") {
106
107
  e.children && s(e.children, "left");
107
108
  return;
@@ -110,47 +111,47 @@ const $ = ({
110
111
  e.children && s(e.children, null);
111
112
  return;
112
113
  }
113
- e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) : l?.getColumn(e.id) && o.push({
114
+ e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) : r?.getColumn(e.id) && n.push({
114
115
  colId: e.id,
115
116
  pinned: u,
116
117
  hide: !e.checked
117
118
  });
118
119
  });
119
120
  };
120
- return s(n, null), o;
121
- }, [l]), g = m((n) => {
122
- if (!l) return;
121
+ return s(o, null), n;
122
+ }, [r]), C = p((o) => {
123
+ if (!r) return;
123
124
  y.current = !0;
124
- const o = z(n);
125
- o.length > 0 && l.applyColumnState({
126
- state: o,
125
+ const n = O(o);
126
+ n.length > 0 && r.applyColumnState({
127
+ state: n,
127
128
  applyOrder: !0
128
129
  }), setTimeout(() => {
129
130
  y.current = !1;
130
131
  }, 300);
131
- }, [l, z]), W = m((n) => {
132
- g(n);
133
- }, [g]), _ = m((n) => {
134
- d || g(n), R(n);
135
- }, [d, g]);
136
- return A ? /* @__PURE__ */ T("div", { className: "flex flex-col h-full bg-white", children: /* @__PURE__ */ T(
137
- B,
132
+ }, [r, O]), _ = p((o) => {
133
+ C(o);
134
+ }, [C]), q = p((o) => {
135
+ d || C(o), x(o);
136
+ }, [d, C]);
137
+ return U ? /* @__PURE__ */ w("div", { className: "flex flex-col h-full bg-white", children: /* @__PURE__ */ w(
138
+ H,
138
139
  {
139
- items: j,
140
- onChange: _,
141
- onSubmit: W,
140
+ items: F,
141
+ onChange: q,
142
+ onSubmit: _,
142
143
  enableApplyDiscard: d,
143
- enableSearch: S,
144
+ enableSearch: I,
144
145
  enableSelectAll: f,
145
146
  enableDragDrop: !0,
146
147
  enableCollapse: !0,
147
- enableGlobalCollapse: D,
148
- selectionMode: H.CASCADE_DOWN,
149
- searchPlaceholder: "Search columns...",
148
+ enableGlobalCollapse: S,
149
+ selectionMode: J.CASCADE_DOWN,
150
+ searchPlaceholder: h("dataTable.searchColumnsPlaceholder"),
150
151
  className: "h-full"
151
152
  }
152
- ) }) : /* @__PURE__ */ T("div", { className: "p-4 text-[13px] text-slate-400", children: "Loading columns..." });
153
+ ) }) : /* @__PURE__ */ w("div", { className: "p-4 text-[13px] text-slate-400", children: h("dataTable.loadingColumns") });
153
154
  };
154
155
  export {
155
- $ as DataTableColumnList
156
+ le as DataTableColumnList
156
157
  };
@@ -1,67 +1,68 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { useDataTable as c } from "./data-table-context.js";
4
- import { RadioGroup as s, RadioGroupItem as t } from "../radio-group.js";
5
- import { Label as a } from "../label.js";
6
- const h = () => {
7
- const {
8
- fontSize: n,
9
- setFontSize: m,
3
+ import { useDataTable as d } from "./data-table-context.js";
4
+ import { RadioGroup as m, RadioGroupItem as l } from "../radio-group.js";
5
+ import { Label as r } from "../label.js";
6
+ import { useImpactNovaI18n as x } from "../../../i18n/ImpactNovaI18nContext.js";
7
+ const b = () => {
8
+ const { t } = x(), {
9
+ fontSize: s,
10
+ setFontSize: o,
10
11
  numericFormat: i,
11
- setNumericFormat: o
12
- } = c();
13
- return /* @__PURE__ */ l("div", { className: "flex flex-col gap-6 px-1 py-1", children: [
14
- /* @__PURE__ */ l("div", { className: "space-y-1", children: [
15
- /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: "Font size" }),
16
- /* @__PURE__ */ l(
17
- s,
12
+ setNumericFormat: c
13
+ } = d();
14
+ return /* @__PURE__ */ a("div", { className: "flex flex-col gap-6 px-1 py-1", children: [
15
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
16
+ /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: t("dataTable.fontSize") }),
17
+ /* @__PURE__ */ a(
18
+ m,
18
19
  {
19
- value: n,
20
+ value: s,
20
21
  orientation: "vertical",
21
- onValueChange: (r) => m(r),
22
+ onValueChange: (n) => o(n),
22
23
  className: "flex flex-col",
23
24
  children: [
24
- /* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
25
- /* @__PURE__ */ e(t, { value: "small", id: "font-small" }),
26
- /* @__PURE__ */ e(a, { htmlFor: "font-small", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: "Small" })
25
+ /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
26
+ /* @__PURE__ */ e(l, { value: "small", id: "font-small" }),
27
+ /* @__PURE__ */ e(r, { htmlFor: "font-small", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontSmall") })
27
28
  ] }),
28
- /* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
29
- /* @__PURE__ */ e(t, { value: "medium", id: "font-medium" }),
30
- /* @__PURE__ */ e(a, { htmlFor: "font-medium", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: "Medium (default)" })
29
+ /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
30
+ /* @__PURE__ */ e(l, { value: "medium", id: "font-medium" }),
31
+ /* @__PURE__ */ e(r, { htmlFor: "font-medium", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontMediumDefault") })
31
32
  ] }),
32
- /* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
33
- /* @__PURE__ */ e(t, { value: "large", id: "font-large" }),
34
- /* @__PURE__ */ e(a, { htmlFor: "font-large", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: "Large" })
33
+ /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
34
+ /* @__PURE__ */ e(l, { value: "large", id: "font-large" }),
35
+ /* @__PURE__ */ e(r, { htmlFor: "font-large", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.fontLarge") })
35
36
  ] })
36
37
  ]
37
38
  }
38
39
  )
39
40
  ] }),
40
- /* @__PURE__ */ l("div", { className: "space-y-1", children: [
41
- /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: "Numeric Values" }),
42
- /* @__PURE__ */ l(
43
- s,
41
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
42
+ /* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-[#8C8C8C]", children: t("dataTable.numericValues") }),
43
+ /* @__PURE__ */ a(
44
+ m,
44
45
  {
45
46
  value: i,
46
47
  orientation: "vertical",
47
- onValueChange: (r) => o(r),
48
+ onValueChange: (n) => c(n),
48
49
  className: "flex flex-col",
49
50
  children: [
50
- /* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
51
- /* @__PURE__ */ e(t, { value: "full", id: "num-full" }),
52
- /* @__PURE__ */ e(a, { htmlFor: "num-full", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: "Full Number" })
51
+ /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
52
+ /* @__PURE__ */ e(l, { value: "full", id: "num-full" }),
53
+ /* @__PURE__ */ e(r, { htmlFor: "num-full", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericFull") })
53
54
  ] }),
54
- /* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
55
- /* @__PURE__ */ e(t, { value: "k", id: "num-k" }),
56
- /* @__PURE__ */ e(a, { htmlFor: "num-k", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: "In K (Thousands)" })
55
+ /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
56
+ /* @__PURE__ */ e(l, { value: "k", id: "num-k" }),
57
+ /* @__PURE__ */ e(r, { htmlFor: "num-k", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericK") })
57
58
  ] }),
58
- /* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
59
- /* @__PURE__ */ e(t, { value: "m", id: "num-m" }),
60
- /* @__PURE__ */ e(a, { htmlFor: "num-m", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: "In M (Millions)" })
59
+ /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
60
+ /* @__PURE__ */ e(l, { value: "m", id: "num-m" }),
61
+ /* @__PURE__ */ e(r, { htmlFor: "num-m", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericM") })
61
62
  ] }),
62
- /* @__PURE__ */ l("div", { className: "flex items-center space-x-2", children: [
63
- /* @__PURE__ */ e(t, { value: "b", id: "num-b" }),
64
- /* @__PURE__ */ e(a, { htmlFor: "num-b", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: "In B (Billions)" })
63
+ /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
64
+ /* @__PURE__ */ e(l, { value: "b", id: "num-b" }),
65
+ /* @__PURE__ */ e(r, { htmlFor: "num-b", className: "font-normal text-[13px] text-slate-700 cursor-pointer", children: t("dataTable.numericB") })
65
66
  ] })
66
67
  ]
67
68
  }
@@ -70,5 +71,5 @@ const h = () => {
70
71
  ] });
71
72
  };
72
73
  export {
73
- h as DataTableFormatOptions
74
+ b as DataTableFormatOptions
74
75
  };
@@ -1,86 +1,87 @@
1
- import { jsxs as t, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
2
  import "react";
3
- import { DropdownMenu as c, DropdownMenuTrigger as p, DropdownMenuContent as m, DropdownMenuItem as d, DropdownMenuSub as u, DropdownMenuSubTrigger as g, DropdownMenuSubContent as h, DropdownMenuRadioGroup as f, DropdownMenuRadioItem as a } from "../dropdown-menu.js";
4
- import { Button as x } from "../button.js";
5
- import { ThreeDots as C, Settings as D, Density as N, Stack as w, StackCompact as S, StackComfort as M } from "../../../icons/index.js";
3
+ import { DropdownMenu as p, DropdownMenuTrigger as m, DropdownMenuContent as d, DropdownMenuItem as u, DropdownMenuSub as g, DropdownMenuSubTrigger as h, DropdownMenuSubContent as f, DropdownMenuRadioGroup as x, DropdownMenuRadioItem as n } from "../dropdown-menu.js";
4
+ import { Button as D } from "../button.js";
5
+ import { ThreeDots as N, Settings as b, Density as w, Stack as C, StackCompact as T, StackComfort as S } from "../../../icons/index.js";
6
6
  import { useDataTable as v } from "./data-table-context.js";
7
- import { DataTableSheetTrigger as P } from "./data-table-sheet.js";
8
- const H = ({
9
- enableTableSettings: n = !0,
7
+ import { DataTableSheetTrigger as M } from "./data-table-sheet.js";
8
+ import { useImpactNovaI18n as P } from "../../../i18n/ImpactNovaI18nContext.js";
9
+ const B = ({
10
+ enableTableSettings: s = !0,
10
11
  enableContentDensity: r = !0,
11
- trigger: s
12
+ trigger: l
12
13
  }) => {
13
- const { rowHeight: i, setRowHeight: l } = v();
14
- return /* @__PURE__ */ t(c, { children: [
15
- /* @__PURE__ */ o(p, { asChild: !0, children: s || /* @__PURE__ */ t(x, { variant: "secondary", size: "icon", "aria-label": "More", children: [
16
- /* @__PURE__ */ o(C, { size: "sm" }),
17
- /* @__PURE__ */ o("span", { className: "sr-only", children: "Open menu" })
14
+ const { t: o } = P(), { rowHeight: i, setRowHeight: c } = v();
15
+ return /* @__PURE__ */ t(p, { children: [
16
+ /* @__PURE__ */ a(m, { asChild: !0, children: l || /* @__PURE__ */ t(D, { variant: "secondary", size: "icon", "aria-label": o("dataTable.more"), children: [
17
+ /* @__PURE__ */ a(N, { size: "sm" }),
18
+ /* @__PURE__ */ a("span", { className: "sr-only", children: o("dataTable.openMenu") })
18
19
  ] }) }),
19
- /* @__PURE__ */ t(m, { align: "end", className: "w-[240px] flex flex-col gap-[2px]", children: [
20
- n && /* @__PURE__ */ o(P, { asChild: !0, children: /* @__PURE__ */ o(
21
- d,
20
+ /* @__PURE__ */ t(d, { align: "end", className: "w-[240px] flex flex-col gap-[2px]", children: [
21
+ s && /* @__PURE__ */ a(M, { asChild: !0, children: /* @__PURE__ */ a(
22
+ u,
22
23
  {
23
24
  className: "flex cursor-pointer gap-2",
24
25
  onClick: (e) => e.stopPropagation(),
25
26
  onSelect: (e) => e.stopPropagation(),
26
27
  children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
27
- /* @__PURE__ */ o(D, { size: "sm", className: "text-slate-500" }),
28
- /* @__PURE__ */ o("span", { children: "Table Settings" })
28
+ /* @__PURE__ */ a(b, { size: "sm", className: "text-slate-500" }),
29
+ /* @__PURE__ */ a("span", { children: o("dataTable.tableSettings") })
29
30
  ] })
30
31
  }
31
32
  ) }),
32
- r && /* @__PURE__ */ t(u, { children: [
33
+ r && /* @__PURE__ */ t(g, { children: [
33
34
  /* @__PURE__ */ t(
34
- g,
35
+ h,
35
36
  {
36
37
  className: "flex items-center gap-2 cursor-pointer",
37
38
  onClick: (e) => e.stopPropagation(),
38
39
  children: [
39
- /* @__PURE__ */ o(N, { size: "sm", className: "text-slate-500" }),
40
- /* @__PURE__ */ o("span", { children: "Content density" })
40
+ /* @__PURE__ */ a(w, { size: "sm", className: "text-slate-500" }),
41
+ /* @__PURE__ */ a("span", { children: o("dataTable.contentDensity") })
41
42
  ]
42
43
  }
43
44
  ),
44
- /* @__PURE__ */ o(h, { className: "w-[190px]", children: /* @__PURE__ */ t(
45
- f,
45
+ /* @__PURE__ */ a(f, { className: "w-[190px]", children: /* @__PURE__ */ t(
46
+ x,
46
47
  {
47
48
  value: i,
48
- onValueChange: (e) => l(e),
49
+ onValueChange: (e) => c(e),
49
50
  className: "flex flex-col gap-0.5",
50
51
  children: [
51
- /* @__PURE__ */ o(
52
- a,
52
+ /* @__PURE__ */ a(
53
+ n,
53
54
  {
54
55
  value: "default",
55
56
  onClick: (e) => e.stopPropagation(),
56
57
  onSelect: (e) => e.stopPropagation(),
57
58
  children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
58
- /* @__PURE__ */ o(w, { size: "sm", className: "text-slate-500" }),
59
- "Default"
59
+ /* @__PURE__ */ a(C, { size: "sm", className: "text-slate-500" }),
60
+ o("dataTable.densityDefault")
60
61
  ] })
61
62
  }
62
63
  ),
63
- /* @__PURE__ */ o(
64
- a,
64
+ /* @__PURE__ */ a(
65
+ n,
65
66
  {
66
67
  value: "compact",
67
68
  onClick: (e) => e.stopPropagation(),
68
69
  onSelect: (e) => e.stopPropagation(),
69
70
  children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
70
- /* @__PURE__ */ o(S, { size: "sm", className: "text-slate-500" }),
71
- "Compact"
71
+ /* @__PURE__ */ a(T, { size: "sm", className: "text-slate-500" }),
72
+ o("dataTable.densityCompact")
72
73
  ] })
73
74
  }
74
75
  ),
75
- /* @__PURE__ */ o(
76
- a,
76
+ /* @__PURE__ */ a(
77
+ n,
77
78
  {
78
79
  value: "comfort",
79
80
  onClick: (e) => e.stopPropagation(),
80
81
  onSelect: (e) => e.stopPropagation(),
81
82
  children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
82
- /* @__PURE__ */ o(M, { size: "sm", className: "text-slate-500" }),
83
- "Comfort"
83
+ /* @__PURE__ */ a(S, { size: "sm", className: "text-slate-500" }),
84
+ o("dataTable.densityComfort")
84
85
  ] })
85
86
  }
86
87
  )
@@ -92,5 +93,5 @@ const H = ({
92
93
  ] });
93
94
  };
94
95
  export {
95
- H as DataTableViewOptions
96
+ B as DataTableViewOptions
96
97
  };