impact-nova 1.7.44 → 1.7.51

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 (38) hide show
  1. package/dist/components/ui/ag-grid-react/index.js +1 -1
  2. package/dist/components/ui/choice-card/choice-card.d.ts +45 -0
  3. package/dist/components/ui/choice-card/choice-card.js +282 -0
  4. package/dist/components/ui/choice-card/index.d.ts +1 -0
  5. package/dist/components/ui/choice-card/index.js +12 -0
  6. package/dist/components/ui/data-table/data-table-saved-views.js +53 -53
  7. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +2 -1
  8. package/dist/components/ui/nested-list/components/NestedListContent.js +46 -46
  9. package/dist/components/ui/nested-list/components/SortableItem.d.ts +1 -0
  10. package/dist/components/ui/nested-list/components/SortableItem.js +72 -70
  11. package/dist/components/ui/nested-list/nested-list.js +166 -152
  12. package/dist/components/ui/notification-panel/notification-list.d.ts +4 -5
  13. package/dist/components/ui/notification-panel/notification-list.js +68 -31
  14. package/dist/components/ui/sheet.js +6 -6
  15. package/dist/components/ui/types/notification-panel.types.d.ts +4 -4
  16. package/dist/components/ui/wizard/index.d.ts +1 -0
  17. package/dist/components/ui/wizard/index.js +17 -0
  18. package/dist/components/ui/wizard/wizard.d.ts +53 -0
  19. package/dist/components/ui/wizard/wizard.js +312 -0
  20. package/dist/i18n/defaultMessages.d.ts +10 -0
  21. package/dist/i18n/defaultMessages.js +11 -1
  22. package/dist/i18n/locales/de.js +11 -1
  23. package/dist/i18n/locales/es.js +11 -1
  24. package/dist/i18n/locales/hi.js +11 -1
  25. package/dist/i18n/locales/kn.js +11 -1
  26. package/dist/impact-nova.css +1 -1
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +339 -336
  29. package/dist/llms/rules/real-world-patterns.js +1 -1
  30. package/package.json +11 -11
  31. package/dist/components/ui/create-item-flow/create-item-flow.d.ts +0 -46
  32. package/dist/components/ui/create-item-flow/create-item-flow.js +0 -231
  33. package/dist/components/ui/create-item-flow/index.d.ts +0 -1
  34. package/dist/components/ui/create-item-flow/index.js +0 -16
  35. package/dist/components/ui/report-card/index.d.ts +0 -1
  36. package/dist/components/ui/report-card/index.js +0 -10
  37. package/dist/components/ui/report-card/report-card.d.ts +0 -19
  38. package/dist/components/ui/report-card/report-card.js +0 -146
@@ -1,7 +1,7 @@
1
- import { jsx as L, jsxs as ce } from "react/jsx-runtime";
2
- import q, { useMemo as T, useCallback as w } from "react";
1
+ import { jsx as L, jsxs as oe } from "react/jsx-runtime";
2
+ import K, { useMemo as T, useCallback as w } from "react";
3
3
  import { SortableItem as qe } from "./components/SortableItem.js";
4
- import { SelectionMode as U } from "../types/nested-list.types.js";
4
+ import { SelectionMode as y } from "../types/nested-list.types.js";
5
5
  import { useNestedListDragDrop as Ke } from "./hooks/useNestedListDragDrop.js";
6
6
  import { useNestedListSelectAll as Qe } from "./hooks/useNestedListSelectAll.js";
7
7
  import { useNestedListState as Xe } from "./hooks/useNestedListState.js";
@@ -12,19 +12,19 @@ import { NestedListContent as Me } from "./components/NestedListContent.js";
12
12
  import { NestedListApplyDiscardButtons as Ge } from "./components/NestedListApplyDiscardButtons.js";
13
13
  import { cn as et } from "../../../lib/utils.js";
14
14
  import { useImpactNovaI18n as tt } from "../../../i18n/ImpactNovaI18nContext.js";
15
- const oe = (i, t) => {
16
- if (!t || typeof t != "string") return i;
15
+ const de = (h, t) => {
16
+ if (!t || typeof t != "string") return h;
17
17
  const c = t.toLowerCase(), o = [];
18
- return i.forEach((r) => {
19
- const l = r.label.toLowerCase().includes(c), u = r.children ? oe(r.children, t) : void 0;
20
- (l || u && u.length > 0) && o.push({
18
+ return h.forEach((r) => {
19
+ const i = r.label.toLowerCase().includes(c), l = r.children ? de(r.children, t) : void 0;
20
+ (i || l && l.length > 0) && o.push({
21
21
  ...r,
22
- children: u || r.children
22
+ children: l || r.children
23
23
  });
24
24
  }), o;
25
- }, de = (i) => i.map((t) => {
25
+ }, ie = (h) => h.map((t) => {
26
26
  if (t.children && t.children.length > 0) {
27
- const c = de(t.children), o = c.every((r) => r.checked);
27
+ const c = ie(t.children), o = c.every((r) => r.checked);
28
28
  return {
29
29
  ...t,
30
30
  checked: o,
@@ -32,167 +32,180 @@ const oe = (i, t) => {
32
32
  };
33
33
  }
34
34
  return t;
35
- }), st = (i, t) => {
35
+ }), st = (h, t) => {
36
36
  const c = /* @__PURE__ */ new Set(), o = (r) => {
37
- r.forEach((l) => {
38
- const u = t ? t(l) : l.category;
39
- u && c.add(u), l.children && o(l.children);
37
+ r.forEach((i) => {
38
+ const l = t ? t(i) : i.category;
39
+ l && c.add(l), i.children && o(i.children);
40
40
  });
41
41
  };
42
- return o(i), Array.from(c).sort();
43
- }, ie = (i, t, c) => {
44
- if (t.size === 0) return i;
42
+ return o(h), Array.from(c).sort();
43
+ }, ae = (h, t, c) => {
44
+ if (t.size === 0) return h;
45
45
  const o = [];
46
- return i.forEach((r) => {
47
- const l = c ? c(r) : r.category, u = l && t.has(l), C = r.children ? ie(r.children, t, c) : void 0;
48
- (u || C && C.length > 0) && o.push({
46
+ return h.forEach((r) => {
47
+ const i = c ? c(r) : r.category, l = i && t.has(i), m = r.children ? ae(r.children, t, c) : void 0;
48
+ (l || m && m.length > 0) && o.push({
49
49
  ...r,
50
- children: C
50
+ children: m
51
51
  });
52
52
  }), o;
53
- }, ae = (i, t, c, o = 0) => {
54
- const r = [];
55
- return i.forEach((l) => {
56
- r.push({ item: l, level: o }), !t[l.id] && l.children && l.children.length > 0 && l.id !== c && r.push(
57
- ...ae(l.children, t, c, o + 1)
58
- );
59
- }), r;
53
+ }, he = (h, t, c, o = 0, r = 0) => {
54
+ const i = [];
55
+ return h.forEach((l) => {
56
+ if (i.push({
57
+ item: l,
58
+ level: o,
59
+ indentLevel: l.category === "structure" ? 0 : r
60
+ }), !t[l.id] && l.children && l.children.length > 0 && l.id !== c) {
61
+ const U = l.category === "structure" ? 0 : r + 1;
62
+ i.push(
63
+ ...he(
64
+ l.children,
65
+ t,
66
+ c,
67
+ o + 1,
68
+ U
69
+ )
70
+ );
71
+ }
72
+ }), i;
60
73
  }, St = ({
61
- items: i,
74
+ items: h,
62
75
  onChange: t,
63
76
  onSubmit: c,
64
77
  onCancel: o,
65
78
  onItemToggle: r,
66
- onDragEnd: l,
67
- renderLabelExtras: u,
68
- renderActions: C,
69
- enableSearch: he = !0,
79
+ onDragEnd: i,
80
+ renderLabelExtras: l,
81
+ renderActions: m,
82
+ enableSearch: U = !0,
70
83
  enableDragDrop: _ = !0,
71
84
  enableSelectAll: ue = !0,
72
85
  enableGroupBy: k = !1,
73
- getCategory: I,
86
+ getCategory: C,
74
87
  searchPlaceholder: fe,
75
88
  className: pe = "",
76
89
  groupLabel: me,
77
90
  enableApplyDiscard: p = !1,
78
- enableCollapse: K = !0,
91
+ enableCollapse: Q = !0,
79
92
  enableGlobalCollapse: Ne = !0,
80
93
  submitButtonLabel: Se,
81
- cancelButtonLabel: Ce,
82
- selectionMode: v = U.CASCADE_DOWN,
83
- initialCollapsedItems: Ie,
84
- onCollapseChange: Q,
94
+ cancelButtonLabel: Ie,
95
+ selectionMode: v = y.CASCADE_DOWN,
96
+ initialCollapsedItems: Ce,
97
+ onCollapseChange: X,
85
98
  canDrag: A
86
99
  }) => {
87
- const { t: P } = tt(), ve = fe ?? P("nestedList.searchPlaceholder"), ge = Se ?? P("nestedList.apply"), Le = Ce ?? P("nestedList.reset"), {
88
- items: h,
100
+ const { t: P } = tt(), ve = fe ?? P("nestedList.searchPlaceholder"), ge = Se ?? P("nestedList.apply"), Le = Ie ?? P("nestedList.reset"), {
101
+ items: u,
89
102
  setItems: g,
90
103
  savedItems: b,
91
- setSavedItems: X,
104
+ setSavedItems: Y,
92
105
  isUserChangeRef: x,
93
106
  searchText: z,
94
107
  setSearchText: ke,
95
- collapsedItems: m,
108
+ collapsedItems: N,
96
109
  setCollapsedItems: Ee,
97
110
  isListCollapsed: B,
98
111
  setIsListCollapsed: De,
99
- activeId: N,
100
- setActiveId: y,
101
- setOverId: H,
112
+ activeId: S,
113
+ setActiveId: H,
114
+ setOverId: W,
102
115
  selectedCategories: O,
103
116
  setSelectedCategories: Te,
104
- itemsToBlink: Y,
105
- setItemsToBlink: W,
117
+ itemsToBlink: Z,
118
+ setItemsToBlink: j,
106
119
  // Normalized state helpers (for optimized operations)
107
120
  isNormalized: we,
108
121
  normalizedState: Ae,
109
122
  batchUpdateItems: Pe
110
123
  } = Xe({
111
- initialItems: i,
124
+ initialItems: h,
112
125
  enableApplyDiscard: p,
113
126
  // Enable normalized state for large datasets (can be made configurable via props)
114
- enableNormalizedState: i.length > 1e3,
115
- initialCollapsedItems: Ie
127
+ enableNormalizedState: h.length > 1e3,
128
+ initialCollapsedItems: Ce
116
129
  });
117
- q.useEffect(() => {
118
- Q?.(m);
119
- }, [m, Q]);
120
- const [R, Z] = q.useState(0), [V, be] = q.useState(0), {
130
+ K.useEffect(() => {
131
+ X?.(N);
132
+ }, [N, X]);
133
+ const [R, $] = K.useState(0), [V, be] = K.useState(0), {
121
134
  sensors: xe,
122
135
  handleDragEnd: ze,
123
- isValidDrop: $
136
+ isValidDrop: M
124
137
  } = Ke({
125
- items: h,
126
- onDragEnd: l,
127
- collapsedItems: m,
138
+ items: u,
139
+ onDragEnd: i,
140
+ collapsedItems: N,
128
141
  canDrag: A
129
142
  }), Be = T(
130
- () => k ? st(h, I) : [],
131
- [h, k, I]
132
- ), S = T(() => {
133
- let e = h;
134
- return k && O.size > 0 && (e = ie(e, O, I)), z && (e = oe(e, z)), e;
135
- }, [h, z, k, O, I]), Oe = T(
136
- () => ae(S, m, N),
137
- [S, m, N]
143
+ () => k ? st(u, C) : [],
144
+ [u, k, C]
145
+ ), I = T(() => {
146
+ let e = u;
147
+ return k && O.size > 0 && (e = ae(e, O, C)), z && (e = de(e, z)), e;
148
+ }, [u, z, k, O, C]), Oe = T(
149
+ () => he(I, N, S),
150
+ [I, N, S]
138
151
  ), { allChecked: E, someChecked: Re } = T(() => {
139
152
  let e = !0, s = !1;
140
153
  const n = (f) => {
141
- for (const d of f)
142
- if (d.children && d.children.length > 0 ? n(d.children) : d.checked ? s = !0 : e = !1, s && !e) return;
154
+ for (const a of f)
155
+ if (a.children && a.children.length > 0 ? n(a.children) : a.checked ? s = !0 : e = !1, s && !e) return;
143
156
  };
144
- return n(S), { allChecked: e && s, someChecked: s };
145
- }, [S]), Ve = Re && !E, j = (e, s) => {
157
+ return n(I), { allChecked: e && s, someChecked: s };
158
+ }, [I]), Ve = Re && !E, F = (e, s) => {
146
159
  for (const n of e) {
147
160
  if (n.id === s) return n;
148
161
  if (n.children) {
149
- const f = j(n.children, s);
162
+ const f = F(n.children, s);
150
163
  if (f) return f;
151
164
  }
152
165
  }
153
166
  return null;
154
- }, Ue = w(
167
+ }, ye = w(
155
168
  (e, s) => {
156
- if (v === U.INDEPENDENT)
169
+ if (v === y.INDEPENDENT)
157
170
  return e;
158
- const n = (d, a) => d.id === a ? !0 : d.children ? d.children.some(
159
- (D) => n(D, a)
160
- ) : !1, f = (d) => d.map((a) => {
161
- if (a.id === s)
162
- return a;
163
- if (a.children && n(a, s)) {
164
- const D = f(a.children);
165
- let F;
166
- return v === U.CASCADE_UP_DOWN ? F = D.some((J) => J.checked) : F = D.every((J) => J.checked), {
167
- ...a,
168
- checked: F,
171
+ const n = (a, d) => a.id === d ? !0 : a.children ? a.children.some(
172
+ (D) => n(D, d)
173
+ ) : !1, f = (a) => a.map((d) => {
174
+ if (d.id === s)
175
+ return d;
176
+ if (d.children && n(d, s)) {
177
+ const D = f(d.children);
178
+ let J;
179
+ return v === y.CASCADE_UP_DOWN ? J = D.some((q) => q.checked) : J = D.every((q) => q.checked), {
180
+ ...d,
181
+ checked: J,
169
182
  children: D
170
183
  };
171
184
  }
172
- return a;
185
+ return d;
173
186
  });
174
187
  return f(e);
175
188
  },
176
189
  [v]
177
- ), M = (e) => {
190
+ ), G = (e) => {
178
191
  const s = [];
179
192
  return e.forEach((n) => {
180
- n.children && n.children.length > 0 && (s.push(n.id), s.push(...M(n.children)));
193
+ n.children && n.children.length > 0 && (s.push(n.id), s.push(...G(n.children)));
181
194
  }), s;
182
195
  }, {
183
- handleToggle: G,
184
- handleToggleCollapse: ee,
185
- handleCollapseAll: _e,
186
- handleToggleCategory: ye
196
+ handleToggle: ee,
197
+ handleToggleCollapse: te,
198
+ handleCollapseAll: Ue,
199
+ handleToggleCategory: _e
187
200
  } = Ye({
188
201
  setItems: g,
189
- findItemById: j,
190
- updateParentsUpward: Ue,
202
+ findItemById: F,
203
+ updateParentsUpward: ye,
191
204
  onChange: (e) => {
192
- Z((s) => s + 1), t(e);
205
+ $((s) => s + 1), t(e);
193
206
  },
194
207
  onItemToggle: r,
195
- getCategory: I,
208
+ getCategory: C,
196
209
  setCollapsedItems: Ee,
197
210
  setIsListCollapsed: De,
198
211
  setSelectedCategories: Te,
@@ -203,109 +216,110 @@ const oe = (i, t) => {
203
216
  normalizedState: Ae,
204
217
  batchUpdateItems: Pe
205
218
  }), {
206
- collectVisibleItemIds: te,
207
- findItemsNotSelected: se,
208
- collectVisibleItemsForCallback: re,
209
- updateVisibleItems: ne
219
+ collectVisibleItemIds: se,
220
+ findItemsNotSelected: re,
221
+ collectVisibleItemsForCallback: ne,
222
+ updateVisibleItems: le
210
223
  } = Qe({
211
- findItemById: j,
212
- getCategory: I
224
+ findItemById: F,
225
+ getCategory: C
213
226
  }), He = w(() => {
214
227
  x.current = !0, g((e) => {
215
- const s = te(S), n = se(
216
- S,
228
+ const s = se(I), n = re(
229
+ I,
217
230
  e,
218
231
  s
219
232
  );
220
233
  if (n.size > 0) {
221
- const a = new Set(n);
222
- W(a), setTimeout(() => W(/* @__PURE__ */ new Set()), 600);
234
+ const d = new Set(n);
235
+ j(d), setTimeout(() => j(/* @__PURE__ */ new Set()), 600);
223
236
  }
224
- const f = ne(
237
+ const f = le(
225
238
  e,
226
239
  s,
227
240
  !E
228
- ), d = v === U.INDEPENDENT ? f : de(f);
229
- if (t(d), r) {
230
- const a = re(
241
+ ), a = v === y.INDEPENDENT ? f : ie(f);
242
+ if (t(a), r) {
243
+ const d = ne(
231
244
  e,
232
245
  s,
233
246
  !E
234
247
  );
235
- r(a);
248
+ r(d);
236
249
  }
237
- return d;
250
+ return a;
238
251
  });
239
252
  }, [
240
253
  E,
241
254
  t,
242
255
  r,
243
- S,
244
- te,
256
+ I,
245
257
  se,
246
258
  re,
247
259
  ne,
260
+ le,
248
261
  x,
249
262
  g,
250
- W,
263
+ j,
251
264
  v
252
265
  ]), We = w(
253
- (e, s) => {
254
- const n = N ? $(N, e.id) : !1, f = Y.has(e.id), d = A ? !A(e, s) : e.isDragDisabled ?? !1;
266
+ (e, s, n) => {
267
+ const f = S ? M(S, e.id) : !1, a = Z.has(e.id), d = A ? !A(e, s) : e.isDragDisabled ?? !1;
255
268
  return /* @__PURE__ */ L(
256
269
  qe,
257
270
  {
258
271
  item: e,
259
272
  level: s,
260
- isCollapsed: m[e.id] || !1,
261
- onToggle: G,
262
- onToggleCollapse: ee,
263
- isAnyDragging: N !== null,
264
- isValidDrop: n,
273
+ indentLevel: n,
274
+ isCollapsed: N[e.id] || !1,
275
+ onToggle: ee,
276
+ onToggleCollapse: te,
277
+ isAnyDragging: S !== null,
278
+ isValidDrop: f,
265
279
  enableDragDrop: _,
266
- enableCollapse: K,
267
- shouldBlink: f,
280
+ enableCollapse: Q,
281
+ shouldBlink: a,
268
282
  isDragDisabled: d,
269
- renderLabelExtras: u,
270
- renderActions: C
283
+ renderLabelExtras: l,
284
+ renderActions: m
271
285
  },
272
286
  e.id
273
287
  );
274
288
  },
275
289
  [
276
- m,
277
- G,
278
- ee,
279
290
  N,
280
- $,
291
+ ee,
292
+ te,
293
+ S,
294
+ M,
281
295
  _,
282
- Y,
283
- K,
296
+ Z,
297
+ Q,
284
298
  A,
285
- u,
286
- C
299
+ l,
300
+ m
287
301
  ]
288
- ), je = M(h).length > 0, le = T(() => p ? h.length > 1e3 ? R !== V : JSON.stringify(h) !== JSON.stringify(b) : !1, [p, h, b, R, V]), Fe = w(() => {
289
- p && (X(h), be(R), c?.(h));
290
- }, [p, h, c, X, R]), Je = w(() => {
291
- p && (g(b), Z(V), o?.());
302
+ ), je = G(u).length > 0, ce = T(() => p ? u.length > 1e3 ? R !== V : JSON.stringify(u) !== JSON.stringify(b) : !1, [p, u, b, R, V]), Fe = w(() => {
303
+ p && (Y(u), be(R), c?.(u));
304
+ }, [p, u, c, Y, R]), Je = w(() => {
305
+ p && (g(b), $(V), o?.());
292
306
  }, [p, b, o, g, V]);
293
- return /* @__PURE__ */ ce(
307
+ return /* @__PURE__ */ oe(
294
308
  "div",
295
309
  {
296
310
  className: et("flex flex-col", pe),
297
311
  "data-component": "nested-list",
298
- "data-has-changes": le ? "" : void 0,
312
+ "data-has-changes": ce ? "" : void 0,
299
313
  "data-list-collapsed": B ? "" : void 0,
300
314
  children: [
301
- /* @__PURE__ */ ce("div", { className: "flex-shrink-0", children: [
315
+ /* @__PURE__ */ oe("div", { className: "flex-shrink-0", children: [
302
316
  /* @__PURE__ */ L(
303
317
  Ze,
304
318
  {
305
319
  hasItemsWithChildren: je,
306
320
  isListCollapsed: B,
307
- onCollapseAll: _e,
308
- enableSearch: he,
321
+ onCollapseAll: Ue,
322
+ enableSearch: U,
309
323
  enableSelectAll: ue,
310
324
  groupLabel: me,
311
325
  allChecked: E,
@@ -327,7 +341,7 @@ const oe = (i, t) => {
327
341
  enableGroupBy: k,
328
342
  categories: Be,
329
343
  selectedCategories: O,
330
- onToggleCategory: ye
344
+ onToggleCategory: _e
331
345
  }
332
346
  )
333
347
  ] }),
@@ -339,21 +353,21 @@ const oe = (i, t) => {
339
353
  sensors: xe,
340
354
  items: Oe,
341
355
  renderItem: We,
342
- activeId: N,
356
+ activeId: S,
343
357
  onDragStart: (e) => {
344
- y(e.active.id);
358
+ H(e.active.id);
345
359
  },
346
360
  onDragOver: (e) => {
347
- H(e.over?.id);
361
+ W(e.over?.id);
348
362
  },
349
363
  onDragEnd: (e) => {
350
- y(null), H(null), x.current = !0, ze(e, (s) => {
351
- const n = s(h);
364
+ H(null), W(null), x.current = !0, ze(e, (s) => {
365
+ const n = s(u);
352
366
  g(n), t(n);
353
367
  });
354
368
  },
355
369
  onDragCancel: () => {
356
- y(null), H(null);
370
+ H(null), W(null);
357
371
  }
358
372
  }
359
373
  ) }),
@@ -361,7 +375,7 @@ const oe = (i, t) => {
361
375
  Ge,
362
376
  {
363
377
  enableApplyDiscard: p,
364
- hasChanges: le,
378
+ hasChanges: ce,
365
379
  onDiscard: Je,
366
380
  onApply: Fe,
367
381
  cancelButtonLabel: Le,
@@ -1,5 +1,4 @@
1
- import { default as React } from 'react';
2
- import { NotificationListProps, NotificationGroupProps } from '../types/notification-panel.types';
3
- export declare const NotificationEmpty: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
4
- export declare const NotificationList: ({ children, className, onLoadMore, isLoading, hasMore, loader, emptyState }: NotificationListProps) => import("react/jsx-runtime").JSX.Element;
5
- export declare const NotificationGroup: ({ label, children, className }: NotificationGroupProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { NotificationListProps, NotificationGroupProps, NotificationEmptyProps } from '../types/notification-panel.types';
2
+ export declare const NotificationEmpty: ({ title, description, className, ...props }: NotificationEmptyProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const NotificationList: ({ children, className, onLoadMore, isLoading, hasMore, loader, }: NotificationListProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const NotificationGroup: ({ label, children, className, }: NotificationGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,45 +1,82 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import p, { useRef as d, useEffect as x } from "react";
3
- import { cn as i } from "../../../lib/utils.js";
4
- import { Loader2 as h } from "lucide-react";
5
- import { MulticolorBell as v } from "../../../icons/index.js";
6
- const E = ({ className: t, ...r }) => /* @__PURE__ */ c("div", { className: i("flex flex-col gap-4 items-center justify-center h-full text-center p-8", t), ...r, children: [
7
- /* @__PURE__ */ e(v, { size: 72 }),
8
- /* @__PURE__ */ c("div", { children: [
9
- /* @__PURE__ */ e("h3", { className: "text-xl font-bold text-content", children: "Everything looks quiet for now" }),
10
- /* @__PURE__ */ e("p", { className: "text-sm text-navigation-muted", children: "We'll notify you when something new comes up" })
11
- ] })
12
- ] }), j = ({
13
- children: t,
14
- className: r,
15
- onLoadMore: l,
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { useRef as p, useEffect as u } from "react";
3
+ import { cn as a } from "../../../lib/utils.js";
4
+ import { Loader2 as d } from "lucide-react";
5
+ import { MulticolorBell as x } from "../../../icons/index.js";
6
+ import { useImpactNovaI18n as v } from "../../../i18n/ImpactNovaI18nContext.js";
7
+ const w = ({
8
+ title: r,
9
+ description: i,
10
+ className: t,
11
+ ...o
12
+ }) => {
13
+ const { t: c } = v(), s = r ?? c("notificationPanel.everythingQuiet"), n = i ?? c("notificationPanel.everythingQuietSub");
14
+ return /* @__PURE__ */ l(
15
+ "div",
16
+ {
17
+ "data-component": "notification-empty",
18
+ className: a(
19
+ "flex min-h-0 w-full flex-1 flex-col items-center justify-center gap-4 text-center",
20
+ t
21
+ ),
22
+ ...o,
23
+ children: [
24
+ /* @__PURE__ */ e(x, { size: 72, className: "shrink-0", alt: "", "aria-hidden": !0 }),
25
+ /* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center justify-center gap-1 px-8 text-center", children: [
26
+ /* @__PURE__ */ e("span", { className: "text-xl font-extrabold leading-7 text-content", children: s }),
27
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium leading-normal text-content-icon", children: n })
28
+ ] })
29
+ ]
30
+ }
31
+ );
32
+ }, j = ({
33
+ children: r,
34
+ className: i,
35
+ onLoadMore: t,
16
36
  isLoading: o,
17
- hasMore: s,
18
- loader: m,
19
- emptyState: a
37
+ hasMore: c,
38
+ loader: s
20
39
  }) => {
21
- const n = d(null);
22
- return x(() => {
40
+ const n = p(null);
41
+ return u(() => {
23
42
  const f = new IntersectionObserver(
24
- (u) => {
25
- u[0].isIntersecting && s && !o && l && l();
43
+ (m) => {
44
+ m[0].isIntersecting && c && !o && t && t();
26
45
  },
27
46
  { threshold: 0.1 }
28
47
  );
29
48
  return n.current && f.observe(n.current), () => {
30
49
  n.current && f.unobserve(n.current);
31
50
  };
32
- }, [s, o, l]), p.Children.count(t) === 0 && !o && a ? /* @__PURE__ */ e("div", { className: "h-full w-full", children: a }) : /* @__PURE__ */ c("div", { className: i("flex flex-1 flex-col overflow-y-auto min-h-0", r), children: [
33
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: t }),
51
+ }, [c, o, t]), /* @__PURE__ */ l("div", { className: a("flex flex-1 flex-col overflow-y-auto min-h-0", i), children: [
52
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: r }),
34
53
  /* @__PURE__ */ e("div", { ref: n, className: "h-4 w-full flex-shrink-0" }),
35
- o && /* @__PURE__ */ e("div", { className: "flex justify-center p-4", children: m || /* @__PURE__ */ e(h, { className: "h-6 w-6 animate-spin text-content-muted" }) })
54
+ o && /* @__PURE__ */ e("div", { className: "flex justify-center p-4", children: s || /* @__PURE__ */ e(d, { className: "h-6 w-6 animate-spin text-content-muted" }) })
36
55
  ] });
37
- }, z = ({ label: t, children: r, className: l }) => /* @__PURE__ */ c("div", { "data-component": "notification-group", className: i("flex flex-col", l), children: [
38
- /* @__PURE__ */ e("div", { "data-component": "notification-group-label", className: "sticky top-0 z-10 bg-canvas/95 backdrop-blur supports-[backdrop-filter]:bg-canvas/60 px-4 py-2 text-sm font-medium text-content-muted border-b border-stroke/50", children: t }),
39
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: r })
40
- ] });
56
+ }, I = ({
57
+ label: r,
58
+ children: i,
59
+ className: t
60
+ }) => /* @__PURE__ */ l(
61
+ "div",
62
+ {
63
+ "data-component": "notification-group",
64
+ className: a("flex flex-col", t),
65
+ children: [
66
+ /* @__PURE__ */ e(
67
+ "div",
68
+ {
69
+ "data-component": "notification-group-label",
70
+ className: "sticky top-0 z-10 bg-canvas/95 backdrop-blur supports-[backdrop-filter]:bg-canvas/60 px-4 py-2 text-sm font-medium text-content-muted border-b border-stroke/50",
71
+ children: r
72
+ }
73
+ ),
74
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 p-2", children: i })
75
+ ]
76
+ }
77
+ );
41
78
  export {
42
- E as NotificationEmpty,
43
- z as NotificationGroup,
79
+ w as NotificationEmpty,
80
+ I as NotificationGroup,
44
81
  j as NotificationList
45
82
  };