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
@@ -1,36 +1,36 @@
1
- import { jsxs as T, jsx as s } from "react/jsx-runtime";
2
- import { lazy as H, useRef as P, useState as c, useCallback as b, useMemo as g, Suspense as E } from "react";
3
- import { ModuleRegistry as L, AllCommunityModule as V, ValidationModule as _ } from "ag-grid-community";
4
- import { AllEnterpriseModule as $ } from "ag-grid-enterprise";
5
- import { AgGridReact as j } from "ag-grid-react";
6
- import { customAgGridTheme as k } from "./theme.js";
7
- import { CustomHeader as U } from "./headers/custom-header.js";
8
- import { CustomHeaderGroup as z } from "./headers/custom-header-group.js";
9
- import { GridHeaderContext as W } from "./headers/context/grid-header-context.js";
10
- import { convertToAgGridFilterModel as q, getMultiFilterIndices as w, convertFromAgGridFilterModel as B } from "./headers/utils/filter-utils.js";
11
- import { ColumnSettingsMenu as J } from "./headers/column-menu/column-settings-menu.js";
12
- import { AG_GRID_VALUE_FORMATTERS as K } from "./value-formatters.js";
1
+ import { jsxs as P, jsx as m } from "react/jsx-runtime";
2
+ import { lazy as E, useRef as J, useState as d, useCallback as h, useMemo as F, Suspense as L } from "react";
3
+ import { ModuleRegistry as U, AllCommunityModule as V, ValidationModule as W } from "ag-grid-community";
4
+ import { AllEnterpriseModule as _ } from "ag-grid-enterprise";
5
+ import { AgGridReact as z } from "ag-grid-react";
6
+ import { customAgGridTheme as B } from "./theme.js";
7
+ import { CustomHeader as k } from "./headers/custom-header.js";
8
+ import { CustomHeaderGroup as q } from "./headers/custom-header-group.js";
9
+ import { GridHeaderContext as w } from "./headers/context/grid-header-context.js";
10
+ import { convertToAgGridFilterModel as K, getMultiFilterIndices as Q, convertFromAgGridFilterModel as X } from "./headers/utils/filter-utils.js";
11
+ import { ColumnSettingsMenu as Y } from "./headers/column-menu/column-settings-menu.js";
12
+ import { AG_GRID_VALUE_FORMATTERS as Z } from "./value-formatters.js";
13
13
  /* empty css */
14
- const Q = H(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
15
- L.registerModules([V, $, _]);
16
- function de({
17
- children: o,
14
+ const ee = E(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
15
+ U.registerModules([V, _, W]);
16
+ function ge({
17
+ children: i,
18
18
  defaultColDef: n,
19
- defaultColGroupDef: r,
20
- columnDefs: m,
21
- valueFormatters: a,
22
- onGridReady: u,
23
- ...l
19
+ defaultColGroupDef: l,
20
+ columnDefs: p,
21
+ valueFormatters: c,
22
+ onGridReady: s,
23
+ ...o
24
24
  }) {
25
- const t = P(null), [i, f] = c(null), [h, F] = c(!1), [M, p] = c(null), [y, v] = c(!1), [A, G] = c(null), [O, x] = c(null), S = b((e) => {
25
+ const t = J(null), [u, M] = d(null), [v, A] = d(!1), [G, C] = d(null), [D, b] = d(!1), [S, x] = d(null), [I, y] = d(null), O = h((e) => {
26
26
  if (!t.current) return;
27
- const d = q(e);
28
- t.current.setFilterModel(d), t.current.onFilterChanged();
29
- }, []), C = g(() => ({
27
+ const r = K(e);
28
+ t.current.setFilterModel(r), t.current.onFilterChanged();
29
+ }, []), f = F(() => ({
30
30
  openSearch: (e) => {
31
31
  if (!t.current) return;
32
- const d = t.current.getGridOption("context") || {};
33
- t.current.setGridOption("context", { ...d, activeSearchColumnId: e }), t.current.refreshHeader();
32
+ const r = t.current.getGridOption("context") || {};
33
+ t.current.setGridOption("context", { ...r, activeSearchColumnId: e }), t.current.refreshHeader();
34
34
  },
35
35
  closeSearch: () => {
36
36
  if (!t.current) return;
@@ -38,53 +38,72 @@ function de({
38
38
  t.current.setGridOption("context", { ...e, activeSearchColumnId: null }), t.current.refreshHeader();
39
39
  },
40
40
  openAdvancedFilter: (e) => {
41
- p(e || null), F(!0);
41
+ C(e || null), A(!0);
42
42
  },
43
43
  closeAdvancedFilter: () => {
44
- F(!1), p(null);
44
+ A(!1), C(null);
45
45
  },
46
46
  applyAdvancedFilter: (e) => {
47
- S(e);
47
+ O(e);
48
48
  },
49
- openMenu: (e, d) => {
50
- G(e), x(d), v(!0);
49
+ openMenu: (e, r) => {
50
+ x(e), y(r), b(!0);
51
51
  },
52
52
  closeMenu: () => {
53
- v(!1), G(null), x(null);
53
+ b(!1), x(null), y(null);
54
54
  },
55
- activeMenuColumnId: A
56
- }), [S, A]), D = b((e) => {
57
- t.current = e.api, f(e.api), e.api.setGridOption("context", { activeSearchColumnId: null }), u && u(e);
58
- }, [u]), I = g(() => ({
59
- headerComponent: U,
55
+ activeMenuColumnId: S
56
+ }), [O, S]), N = h((e) => {
57
+ t.current = e.api, M(e.api), e.api.setGridOption("context", { activeSearchColumnId: null }), s && s(e);
58
+ }, [s]), $ = F(() => ({
59
+ headerComponent: k,
60
60
  ...n,
61
61
  headerComponentParams: {
62
62
  ...n?.headerComponentParams
63
63
  }
64
- }), [n]), R = g(() => ({
65
- headerGroupComponent: z,
66
- ...r,
64
+ }), [n]), R = F(() => ({
65
+ headerGroupComponent: q,
66
+ ...l,
67
67
  headerGroupComponentParams: {
68
- ...r?.headerGroupComponentParams
68
+ ...l?.headerGroupComponentParams
69
69
  }
70
- }), [r]), N = g(() => ({
71
- ...l.components,
72
- ...K,
70
+ }), [l]), j = F(() => ({
71
+ ...o.components,
72
+ ...Z,
73
73
  // Always available
74
- ...a
74
+ ...c
75
75
  // Optional custom formatters override defaults
76
- }), [a, l.components]);
77
- return /* @__PURE__ */ T(W.Provider, { value: C, children: [
78
- /* @__PURE__ */ s(
79
- j,
76
+ }), [c, o.components]), T = h((e) => {
77
+ if (e.value !== null && e.value !== void 0 && typeof e.value == "object") {
78
+ const r = Object.entries(e.value).map(([g, a]) => a && typeof a == "object" && "value" in a ? `${g.toUpperCase()}: ${a.value}` : typeof a != "object" ? `${g}: ${a}` : `${g}: ${JSON.stringify(a)}`).filter(Boolean);
79
+ return r.length > 0 ? r.join(" ") : JSON.stringify(e.value, null, 2);
80
+ }
81
+ return e.value;
82
+ }, []), H = h((e) => {
83
+ if (typeof e.value == "string") {
84
+ const r = e.value.trim();
85
+ if (r.startsWith("{") || r.startsWith("["))
86
+ try {
87
+ return JSON.parse(r);
88
+ } catch {
89
+ return e.value;
90
+ }
91
+ }
92
+ return e.value;
93
+ }, []);
94
+ return /* @__PURE__ */ P(w.Provider, { value: f, children: [
95
+ /* @__PURE__ */ m(
96
+ z,
80
97
  {
81
- theme: k,
82
- defaultColDef: I,
83
- columnDefs: m,
98
+ theme: B,
99
+ defaultColDef: $,
100
+ columnDefs: p,
84
101
  cellSelection: !0,
85
102
  defaultColGroupDef: R,
86
- onGridReady: D,
87
- components: N,
103
+ onGridReady: N,
104
+ components: j,
105
+ processCellForClipboard: T,
106
+ processCellFromClipboard: H,
88
107
  columnTypes: {
89
108
  numericColumn: {
90
109
  cellClass: "ag-right-aligned-cell",
@@ -107,78 +126,78 @@ function de({
107
126
  filter: "agDateColumnFilter"
108
127
  }
109
128
  },
110
- ...l
129
+ ...o
111
130
  }
112
131
  ),
113
- o,
114
- /* @__PURE__ */ s(
115
- X,
132
+ i,
133
+ /* @__PURE__ */ m(
134
+ te,
116
135
  {
117
- isOpen: h,
118
- columnId: M,
119
- gridApi: i,
120
- onClose: C.closeAdvancedFilter,
121
- onApply: C.applyAdvancedFilter
136
+ isOpen: v,
137
+ columnId: G,
138
+ gridApi: u,
139
+ onClose: f.closeAdvancedFilter,
140
+ onApply: f.applyAdvancedFilter
122
141
  }
123
142
  ),
124
- /* @__PURE__ */ s(
125
- Y,
143
+ /* @__PURE__ */ m(
144
+ re,
126
145
  {
127
- isOpen: y,
128
- columnId: A,
129
- gridApi: i,
130
- anchor: O,
131
- onClose: C.closeMenu
146
+ isOpen: D,
147
+ columnId: S,
148
+ gridApi: u,
149
+ anchor: I,
150
+ onClose: f.closeMenu
132
151
  }
133
152
  )
134
153
  ] });
135
154
  }
136
- function X({
137
- isOpen: o,
155
+ function te({
156
+ isOpen: i,
138
157
  columnId: n,
139
- gridApi: r,
140
- onClose: m,
141
- onApply: a
158
+ gridApi: l,
159
+ onClose: p,
160
+ onApply: c
142
161
  }) {
143
- if (!o || !n || !r) return null;
144
- const u = r.getColumn(n);
145
- if (!u) return null;
146
- const l = u.getColDef(), t = l.headerComponentParams, i = w(l), f = i.text !== -1 || i.number !== -1 || i.date !== -1, h = i.set !== -1, M = l.filter === "agMultiColumnFilter" && (f || h) ? "multi" : l.filter === "agNumberColumnFilter" ? "number" : l.filter === "agDateColumnFilter" ? "date" : l.filter === "agSetColumnFilter" || t?.selectOptions ? "select" : "text", p = B(r.getFilterModel());
147
- return /* @__PURE__ */ s(E, { fallback: null, children: /* @__PURE__ */ s(
148
- Q,
162
+ if (!i || !n || !l) return null;
163
+ const s = l.getColumn(n);
164
+ if (!s) return null;
165
+ const o = s.getColDef(), t = o.headerComponentParams, u = Q(o), M = u.text !== -1 || u.number !== -1 || u.date !== -1, v = u.set !== -1, G = o.filter === "agMultiColumnFilter" && (M || v) ? "multi" : o.filter === "agNumberColumnFilter" ? "number" : o.filter === "agDateColumnFilter" ? "date" : o.filter === "agSetColumnFilter" || t?.selectOptions ? "select" : "text", C = X(l.getFilterModel());
166
+ return /* @__PURE__ */ m(L, { fallback: null, children: /* @__PURE__ */ m(
167
+ ee,
149
168
  {
150
- isOpen: o,
151
- onClose: m,
152
- onApply: a,
169
+ isOpen: i,
170
+ onClose: p,
171
+ onApply: c,
153
172
  columnId: n,
154
- columnLabel: l.headerName || n,
155
- columnType: M,
173
+ columnLabel: o.headerName || n,
174
+ columnType: G,
156
175
  selectOptions: t?.selectOptions,
157
176
  isMultiSelect: t?.isMultiSelect,
158
- initialModel: p,
159
- api: r
177
+ initialModel: C,
178
+ api: l
160
179
  }
161
180
  ) });
162
181
  }
163
- function Y({
164
- isOpen: o,
182
+ function re({
183
+ isOpen: i,
165
184
  columnId: n,
166
- gridApi: r,
167
- anchor: m,
168
- onClose: a
185
+ gridApi: l,
186
+ anchor: p,
187
+ onClose: c
169
188
  }) {
170
- return !o || !n || !r ? null : /* @__PURE__ */ s(
171
- J,
189
+ return !i || !n || !l ? null : /* @__PURE__ */ m(
190
+ Y,
172
191
  {
173
- isOpen: o,
192
+ isOpen: i,
174
193
  columnId: n,
175
- gridApi: r,
176
- anchor: m,
177
- onClose: a
194
+ gridApi: l,
195
+ anchor: p,
196
+ onClose: c
178
197
  }
179
198
  );
180
199
  }
181
200
  export {
182
- de as AgGridWrapper,
183
- de as default
201
+ ge as AgGridWrapper,
202
+ ge as default
184
203
  };
@@ -3,11 +3,11 @@ import * as i from "react";
3
3
  import * as e from "@radix-ui/react-alert-dialog";
4
4
  import { cn as s } from "../../lib/utils.js";
5
5
  import { buttonVariants as d } from "./button-variants.js";
6
- const w = e.Root, b = e.Trigger, m = e.Portal, r = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
6
+ const v = e.Root, w = e.Trigger, m = e.Portal, r = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
7
7
  e.Overlay,
8
8
  {
9
9
  className: s(
10
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
10
+ "fixed inset-0 z-50 bg-scrim-deep data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
11
11
  a
12
12
  ),
13
13
  ...t,
@@ -24,7 +24,7 @@ const c = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ n(m, { chi
24
24
  "aria-describedby": void 0,
25
25
  "data-component": "alert-dialog-content",
26
26
  className: s(
27
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
27
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-canvas p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
28
28
  a
29
29
  ),
30
30
  ...t
@@ -75,7 +75,7 @@ const N = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
75
75
  {
76
76
  ref: o,
77
77
  "data-component": "alert-dialog-description",
78
- className: s("text-sm text-muted-foreground", a),
78
+ className: s("text-sm text-content-muted", a),
79
79
  ...t
80
80
  }
81
81
  ));
@@ -105,7 +105,7 @@ const x = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
105
105
  ));
106
106
  x.displayName = e.Cancel.displayName;
107
107
  export {
108
- w as AlertDialog,
108
+ v as AlertDialog,
109
109
  y as AlertDialogAction,
110
110
  x as AlertDialogCancel,
111
111
  c as AlertDialogContent,
@@ -115,5 +115,5 @@ export {
115
115
  r as AlertDialogOverlay,
116
116
  m as AlertDialogPortal,
117
117
  g as AlertDialogTitle,
118
- b as AlertDialogTrigger
118
+ w as AlertDialogTrigger
119
119
  };
@@ -2,6 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const alertVariants: (props?: {
4
4
  variant?: "default" | "info" | "warning" | "error" | "success";
5
+ emphasis?: "flat" | "elevated";
5
6
  } & import('class-variance-authority/types').ClassProp) => string;
6
7
  export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
7
8
  asChild?: boolean;
@@ -20,11 +21,11 @@ export interface AlertIconProps {
20
21
  * Renders the appropriate icon for the given Alert variant.
21
22
  *
22
23
  * @example
23
- * <AlertIcon variant="success" className="h-5 w-5" />
24
- * <AlertIcon variant="error" />
24
+ * <AlertIcon variant="success" />
25
+ * <AlertIcon variant="error" className="mt-[2px]" />
25
26
  */
26
27
  declare const AlertIcon: {
27
- ({ variant, className }: AlertIconProps): import("react/jsx-runtime").JSX.Element;
28
+ ({ variant, className, }: AlertIconProps): import("react/jsx-runtime").JSX.Element;
28
29
  displayName: string;
29
30
  };
30
31
  export { Alert, AlertTitle, AlertDescription, AlertIcon, alertVariants };
@@ -1,50 +1,93 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as o, jsx as a } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { Slot as g } from "@radix-ui/react-slot";
4
- import { cva as m } from "class-variance-authority";
5
- import { cn as l } from "../../lib/utils.js";
3
+ import { Slot as m } from "@radix-ui/react-slot";
4
+ import { cva as b } from "class-variance-authority";
5
+ import { cn as s } from "../../lib/utils.js";
6
6
  import { Button as u } from "./button.js";
7
- import { X as v } from "lucide-react";
8
- import { useImpactNovaI18n as b } from "../../i18n/ImpactNovaI18nContext.js";
9
- const x = m(
10
- "relative w-full rounded-lg border px-4 py-2 text-sm flex gap-3 items-start",
7
+ import { X as x } from "lucide-react";
8
+ import { useImpactNovaI18n as g } from "../../i18n/ImpactNovaI18nContext.js";
9
+ const w = b(
10
+ "relative w-full rounded-lg px-4 py-2 text-sm flex gap-3 items-start",
11
11
  {
12
12
  variants: {
13
13
  variant: {
14
- default: "bg-background text-foreground",
15
- info: "bg-info-bg border-info-border [&>svg]:text-primary",
16
- warning: "bg-warning-alert-bg border-warning-alert-border [&>svg]:text-warning",
17
- error: "bg-error-alert-bg border-error-alert-border [&>svg]:text-destructive",
18
- success: "bg-success-alert-bg border-success-alert-border [&>svg]:text-success"
14
+ default: "bg-canvas text-content",
15
+ info: "bg-feedback-info-surface [&>svg]:text-brand",
16
+ warning: "bg-feedback-warning-surface [&>svg]:text-warning",
17
+ error: "bg-feedback-error-surface [&>svg]:text-destructive",
18
+ success: "bg-feedback-success-surface [&>svg]:text-success"
19
+ },
20
+ /** `elevated`: border + soft shadow. `flat`: no border, no shadow. */
21
+ emphasis: {
22
+ elevated: "",
23
+ flat: "border-0 shadow-none"
19
24
  }
20
25
  },
26
+ compoundVariants: [
27
+ {
28
+ variant: "default",
29
+ emphasis: "elevated",
30
+ class: "border border-stroke shadow-alert-elevated"
31
+ },
32
+ {
33
+ variant: "info",
34
+ emphasis: "elevated",
35
+ class: "border border-feedback-info-border shadow-alert-elevated"
36
+ },
37
+ {
38
+ variant: "warning",
39
+ emphasis: "elevated",
40
+ class: "border border-feedback-warning-border shadow-alert-elevated"
41
+ },
42
+ {
43
+ variant: "error",
44
+ emphasis: "elevated",
45
+ class: "border border-feedback-error-border shadow-alert-elevated"
46
+ },
47
+ {
48
+ variant: "success",
49
+ emphasis: "elevated",
50
+ class: "border border-feedback-success-border shadow-alert-elevated"
51
+ }
52
+ ],
21
53
  defaultVariants: {
22
- variant: "default"
54
+ variant: "default",
55
+ emphasis: "elevated"
23
56
  }
24
57
  }
25
- ), w = n.forwardRef(
26
- ({ className: e, variant: t, asChild: a = !1, removable: s, onClose: c, children: d, ...f }, h) => {
27
- const { t: p } = b();
58
+ ), k = n.forwardRef(
59
+ ({
60
+ className: e,
61
+ variant: r,
62
+ emphasis: t,
63
+ asChild: i = !1,
64
+ removable: d,
65
+ onClose: c,
66
+ children: f,
67
+ ...h
68
+ }, p) => {
69
+ const { t: v } = g();
28
70
  return /* @__PURE__ */ o(
29
- a ? g : "div",
71
+ i ? m : "div",
30
72
  {
31
- ref: h,
73
+ ref: p,
32
74
  role: "alert",
33
75
  "data-component": "alert",
34
- "data-variant": t ?? "default",
35
- className: l(x({ variant: t }), e),
36
- ...f,
76
+ "data-variant": r ?? "default",
77
+ "data-emphasis": t ?? "elevated",
78
+ className: s(w({ variant: r, emphasis: t }), e),
79
+ ...h,
37
80
  children: [
38
- d,
39
- s && /* @__PURE__ */ r(
81
+ f,
82
+ d && /* @__PURE__ */ a(
40
83
  u,
41
84
  {
42
85
  variant: "ghost",
43
86
  size: "icon",
44
- className: "absolute right-4 top-3 h-4 w-4 p-0 text-secondary-foreground hover:text-foreground hover:bg-transparent",
87
+ className: "absolute right-4 top-2 h-4 w-4 p-0 text-secondary-foreground hover:text-content hover:bg-transparent",
45
88
  onClick: c,
46
- "aria-label": p("aria.close"),
47
- children: /* @__PURE__ */ r(v, { className: "h-4 w-4" })
89
+ "aria-label": v("aria.close"),
90
+ children: /* @__PURE__ */ a(x, { className: "h-4 w-4" })
48
91
  }
49
92
  )
50
93
  ]
@@ -52,54 +95,129 @@ const x = m(
52
95
  );
53
96
  }
54
97
  );
55
- w.displayName = "Alert";
56
- const z = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r(
98
+ k.displayName = "Alert";
99
+ const N = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
57
100
  "h5",
58
101
  {
59
- ref: a,
102
+ ref: t,
60
103
  "data-component": "alert-title",
61
- className: l("font-semibold leading-[21px] tracking-tight text-foreground", e),
62
- ...t
104
+ className: s(
105
+ "font-semibold leading-[21px] tracking-tight text-content",
106
+ e
107
+ ),
108
+ ...r
63
109
  }
64
110
  ));
65
- z.displayName = "AlertTitle";
66
- const I = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r(
111
+ N.displayName = "AlertTitle";
112
+ const z = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
67
113
  "div",
68
114
  {
69
- ref: a,
115
+ ref: t,
70
116
  "data-component": "alert-description",
71
- className: l("text-[12px] leading-[18px] text-secondary-foreground", e),
72
- ...t
117
+ className: s(
118
+ "text-[12px] leading-[18px] text-secondary-foreground",
119
+ e
120
+ ),
121
+ ...r
73
122
  }
74
123
  ));
75
- I.displayName = "AlertDescription";
76
- const i = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
77
- /* @__PURE__ */ r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z", fill: "#4259ee" }),
78
- /* @__PURE__ */ r("path", { d: "M13 17h-2v-6h2v6zm0-8h-2V7h2v2z", fill: "white" })
79
- ] }), N = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
80
- /* @__PURE__ */ r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z", fill: "#3bb273" }),
81
- /* @__PURE__ */ r("path", { d: "M10 14.17l-3.59-3.59L5 12l5 5 9-9-1.41-1.41L10 14.17z", fill: "white" })
82
- ] }), M = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
83
- /* @__PURE__ */ r("path", { d: "M1 21h22L12 2 1 21z", fill: "#e1bc29" }),
84
- /* @__PURE__ */ r("path", { d: "M13 18h-2v-2h2v2zm0-4h-2v-4h2v4z", fill: "white" })
85
- ] }), y = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
86
- /* @__PURE__ */ r("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z", fill: "#e15554" }),
87
- /* @__PURE__ */ r("path", { d: "M17 15.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z", fill: "white" })
88
- ] }), A = {
89
- default: i,
90
- info: i,
91
- success: N,
124
+ z.displayName = "AlertDescription";
125
+ const l = ({ className: e }) => /* @__PURE__ */ o(
126
+ "svg",
127
+ {
128
+ className: s("h-[18px] w-[18px] shrink-0", e),
129
+ focusable: "false",
130
+ "aria-hidden": "true",
131
+ viewBox: "2 2 20 20",
132
+ children: [
133
+ /* @__PURE__ */ a(
134
+ "path",
135
+ {
136
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z",
137
+ fill: "#4259ee"
138
+ }
139
+ ),
140
+ /* @__PURE__ */ a("path", { d: "M13 17h-2v-6h2v6zm0-8h-2V7h2v2z", fill: "white" })
141
+ ]
142
+ }
143
+ ), I = ({ className: e }) => /* @__PURE__ */ o(
144
+ "svg",
145
+ {
146
+ className: s("h-[18px] w-[18px] shrink-0", e),
147
+ focusable: "false",
148
+ "aria-hidden": "true",
149
+ viewBox: "2 2 20 20",
150
+ children: [
151
+ /* @__PURE__ */ a(
152
+ "path",
153
+ {
154
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z",
155
+ fill: "#3bb273"
156
+ }
157
+ ),
158
+ /* @__PURE__ */ a(
159
+ "path",
160
+ {
161
+ d: "M10 14.17l-3.59-3.59L5 12l5 5 9-9-1.41-1.41L10 14.17z",
162
+ fill: "white"
163
+ }
164
+ )
165
+ ]
166
+ }
167
+ ), M = ({ className: e }) => /* @__PURE__ */ o(
168
+ "svg",
169
+ {
170
+ className: s("h-[18px] w-[18px] shrink-0", e),
171
+ focusable: "false",
172
+ "aria-hidden": "true",
173
+ viewBox: "1 2 22 19",
174
+ children: [
175
+ /* @__PURE__ */ a("path", { d: "M1 21h22L12 2 1 21z", fill: "#e1bc29" }),
176
+ /* @__PURE__ */ a("path", { d: "M13 18h-2v-2h2v2zm0-4h-2v-4h2v4z", fill: "white" })
177
+ ]
178
+ }
179
+ ), A = ({ className: e }) => /* @__PURE__ */ o(
180
+ "svg",
181
+ {
182
+ className: s("h-[18px] w-[18px] shrink-0", e),
183
+ focusable: "false",
184
+ "aria-hidden": "true",
185
+ viewBox: "2 2 20 20",
186
+ children: [
187
+ /* @__PURE__ */ a(
188
+ "path",
189
+ {
190
+ d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z",
191
+ fill: "#e15554"
192
+ }
193
+ ),
194
+ /* @__PURE__ */ a(
195
+ "path",
196
+ {
197
+ d: "M17 15.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z",
198
+ fill: "white"
199
+ }
200
+ )
201
+ ]
202
+ }
203
+ ), C = {
204
+ default: l,
205
+ info: l,
206
+ success: I,
92
207
  warning: M,
93
- error: y
94
- }, C = ({ variant: e = "info", className: t = "h-5 w-5 shrink-0 mt-[2px]" }) => {
95
- const a = A[e] || i;
96
- return /* @__PURE__ */ r(a, { className: t });
208
+ error: A
209
+ }, y = ({
210
+ variant: e = "info",
211
+ className: r = "mt-[2px]"
212
+ }) => {
213
+ const t = C[e] || l;
214
+ return /* @__PURE__ */ a(t, { className: r });
97
215
  };
98
- C.displayName = "AlertIcon";
216
+ y.displayName = "AlertIcon";
99
217
  export {
100
- w as Alert,
101
- I as AlertDescription,
102
- C as AlertIcon,
103
- z as AlertTitle,
104
- x as alertVariants
218
+ k as Alert,
219
+ z as AlertDescription,
220
+ y as AlertIcon,
221
+ N as AlertTitle,
222
+ w as alertVariants
105
223
  };