impact-nova 0.1.13 → 1.1.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 (120) hide show
  1. package/dist/components/layout/dashboard-layout.d.ts +21 -6
  2. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
  3. package/dist/components/ui/accordion.js +25 -23
  4. package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +32 -21
  5. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.d.ts +3 -5
  6. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +57 -55
  7. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
  9. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  10. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
  11. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
  12. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
  13. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
  14. package/dist/components/ui/alert-dialog.js +45 -40
  15. package/dist/components/ui/alert.d.ts +21 -4
  16. package/dist/components/ui/alert.js +45 -25
  17. package/dist/components/ui/avatar.js +19 -16
  18. package/dist/components/ui/badge.js +8 -1
  19. package/dist/components/ui/breadcrumb.js +1 -0
  20. package/dist/components/ui/button-group.d.ts +1 -1
  21. package/dist/components/ui/button-group.js +27 -32
  22. package/dist/components/ui/button-variants.d.ts +1 -1
  23. package/dist/components/ui/button.d.ts +11 -0
  24. package/dist/components/ui/button.js +11 -9
  25. package/dist/components/ui/calendar.d.ts +14 -2
  26. package/dist/components/ui/calendar.js +443 -376
  27. package/dist/components/ui/card.js +7 -6
  28. package/dist/components/ui/checkbox.js +64 -48
  29. package/dist/components/ui/chips.d.ts +1 -0
  30. package/dist/components/ui/chips.js +27 -19
  31. package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
  32. package/dist/components/ui/data-table/data-table-column-list.js +58 -54
  33. package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
  34. package/dist/components/ui/data-table/data-table-sheet.js +43 -40
  35. package/dist/components/ui/data-table/data-table-view-options.js +17 -17
  36. package/dist/components/ui/data-table/data-table.js +21 -20
  37. package/dist/components/ui/date-picker/date-picker.js +93 -93
  38. package/dist/components/ui/date-picker/date-range-picker.js +142 -133
  39. package/dist/components/ui/date-picker/month-picker.js +96 -93
  40. package/dist/components/ui/date-picker/month-range-picker.js +144 -134
  41. package/dist/components/ui/date-picker/multi-date-picker.js +43 -45
  42. package/dist/components/ui/date-picker/multi-month-picker.js +37 -39
  43. package/dist/components/ui/date-picker/multi-week-picker.js +56 -46
  44. package/dist/components/ui/date-picker/week-picker.js +119 -109
  45. package/dist/components/ui/date-picker/week-range-picker.js +170 -147
  46. package/dist/components/ui/dialog.js +15 -6
  47. package/dist/components/ui/drawer.js +16 -13
  48. package/dist/components/ui/dropdown-menu.js +4 -2
  49. package/dist/components/ui/dynamic-layout.d.ts +2 -2
  50. package/dist/components/ui/dynamic-layout.js +18 -15
  51. package/dist/components/ui/empty-container.js +69 -64
  52. package/dist/components/ui/file-upload.js +113 -106
  53. package/dist/components/ui/filter-panel/filter-panel.js +49 -46
  54. package/dist/components/ui/filter-strip/filter-strip.js +41 -37
  55. package/dist/components/ui/header.js +26 -25
  56. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
  57. package/dist/components/ui/hover-card.js +6 -5
  58. package/dist/components/ui/input.d.ts +1 -1
  59. package/dist/components/ui/input.js +79 -68
  60. package/dist/components/ui/loader.d.ts +1 -0
  61. package/dist/components/ui/loader.js +23 -13
  62. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
  63. package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
  64. package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
  65. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
  66. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
  67. package/dist/components/ui/nested-list/nested-list.js +182 -189
  68. package/dist/components/ui/notification-panel/notification-item.js +19 -17
  69. package/dist/components/ui/notification-panel/notification-list.js +21 -21
  70. package/dist/components/ui/notification-panel/notification-panel.js +25 -25
  71. package/dist/components/ui/popover.js +37 -34
  72. package/dist/components/ui/progress.js +12 -10
  73. package/dist/components/ui/prompt.js +29 -27
  74. package/dist/components/ui/radio-group.js +55 -46
  75. package/dist/components/ui/select/components/Submenu.d.ts +1 -2
  76. package/dist/components/ui/select/components/Submenu.js +52 -48
  77. package/dist/components/ui/select/select.js +321 -324
  78. package/dist/components/ui/sheet.js +18 -15
  79. package/dist/components/ui/sidebar.d.ts +2 -2
  80. package/dist/components/ui/sidebar.js +3 -3
  81. package/dist/components/ui/skeleton.d.ts +2 -1
  82. package/dist/components/ui/skeleton.js +12 -11
  83. package/dist/components/ui/slider.js +39 -12
  84. package/dist/components/ui/smart-input.js +44 -39
  85. package/dist/components/ui/stepper.js +33 -29
  86. package/dist/components/ui/switch.js +6 -4
  87. package/dist/components/ui/tabs.js +50 -45
  88. package/dist/components/ui/tag-group.d.ts +2 -1
  89. package/dist/components/ui/tag-group.js +29 -25
  90. package/dist/components/ui/tag.d.ts +1 -0
  91. package/dist/components/ui/tag.js +26 -20
  92. package/dist/components/ui/textarea.js +18 -17
  93. package/dist/components/ui/toast.d.ts +1 -1
  94. package/dist/components/ui/toast.js +47 -41
  95. package/dist/components/ui/toaster.js +42 -42
  96. package/dist/components/ui/tooltip.js +18 -16
  97. package/dist/components/ui/types/date-picker.types.d.ts +33 -0
  98. package/dist/components/ui/types/empty-container.types.d.ts +5 -0
  99. package/dist/components/ui/types/nested-list.types.d.ts +1 -0
  100. package/dist/components/ui/types/select.types.d.ts +0 -1
  101. package/dist/icons/assets/bookmark.svg.js +4 -0
  102. package/dist/icons/assets/bookmark.svg2.js +5 -0
  103. package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
  104. package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
  105. package/dist/icons/assets/download.svg.js +4 -0
  106. package/dist/icons/assets/download.svg2.js +5 -0
  107. package/dist/icons/index.d.ts +20 -6
  108. package/dist/icons/index.js +398 -370
  109. package/dist/impact-nova.css +1 -1
  110. package/dist/index.d.ts +1 -0
  111. package/dist/index.js +318 -314
  112. package/dist/lib/fiscal-calendar.d.ts +62 -0
  113. package/dist/lib/fiscal-calendar.js +99 -0
  114. package/dist/lib/utils.d.ts +2 -1
  115. package/dist/lib/utils.js +29 -13
  116. package/package.json +5 -5
  117. package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
  118. package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
  119. package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
  120. package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
@@ -1,30 +1,29 @@
1
- import { jsx as v, jsxs as ee } from "react/jsx-runtime";
2
- import te, { useMemo as A, useCallback as D } from "react";
3
- import { defaultDropAnimationSideEffects as Ue } from "@dnd-kit/core";
1
+ import { jsx as I, jsxs as te } from "react/jsx-runtime";
2
+ import se, { useMemo as D, useCallback as T } from "react";
4
3
  import { SortableItem as _e } from "./components/SortableItem.js";
5
- import { SelectionMode as V } from "../types/nested-list.types.js";
6
- import { useNestedListDragDrop as He } from "./hooks/useNestedListDragDrop.js";
7
- import { useNestedListSelectAll as We } from "./hooks/useNestedListSelectAll.js";
8
- import { useNestedListState as je } from "./hooks/useNestedListState.js";
9
- import { useNestedListHandlers as Be } from "./hooks/useNestedListHandlers.js";
10
- import { NestedListHeader as Fe } from "./components/NestedListHeader.js";
11
- import { NestedListCategoryFilters as Je } from "./components/NestedListCategoryFilters.js";
12
- import { NestedListContent as qe } from "./components/NestedListContent.js";
13
- import { NestedListApplyDiscardButtons as Ke } from "./components/NestedListApplyDiscardButtons.js";
14
- import { cn as Qe } from "../../../lib/utils.js";
15
- const se = (i, t) => {
16
- if (!t || typeof t != "string") return i;
4
+ import { SelectionMode as U } from "../types/nested-list.types.js";
5
+ import { useNestedListDragDrop as ye } from "./hooks/useNestedListDragDrop.js";
6
+ import { useNestedListSelectAll as He } from "./hooks/useNestedListSelectAll.js";
7
+ import { useNestedListState as We } from "./hooks/useNestedListState.js";
8
+ import { useNestedListHandlers as je } from "./hooks/useNestedListHandlers.js";
9
+ import { NestedListHeader as Be } from "./components/NestedListHeader.js";
10
+ import { NestedListCategoryFilters as Fe } from "./components/NestedListCategoryFilters.js";
11
+ import { NestedListContent as Je } from "./components/NestedListContent.js";
12
+ import { NestedListApplyDiscardButtons as qe } from "./components/NestedListApplyDiscardButtons.js";
13
+ import { cn as Ke } from "../../../lib/utils.js";
14
+ const re = (d, t) => {
15
+ if (!t || typeof t != "string") return d;
17
16
  const o = t.toLowerCase(), c = [];
18
- return i.forEach((s) => {
19
- const l = s.label.toLowerCase().includes(o), u = s.children ? se(s.children, t) : void 0;
20
- (l || u && u.length > 0) && c.push({
17
+ return d.forEach((s) => {
18
+ const l = s.label.toLowerCase().includes(o), f = s.children ? re(s.children, t) : void 0;
19
+ (l || f && f.length > 0) && c.push({
21
20
  ...s,
22
- children: u || s.children
21
+ children: f || s.children
23
22
  });
24
23
  }), c;
25
- }, re = (i) => i.map((t) => {
24
+ }, ne = (d) => d.map((t) => {
26
25
  if (t.children && t.children.length > 0) {
27
- const o = re(t.children), c = o.every((s) => s.checked);
26
+ const o = ne(t.children), c = o.every((s) => s.checked);
28
27
  return {
29
28
  ...t,
30
29
  checked: c,
@@ -32,141 +31,134 @@ const se = (i, t) => {
32
31
  };
33
32
  }
34
33
  return t;
35
- }), Xe = (i, t) => {
34
+ }), Qe = (d, t) => {
36
35
  const o = /* @__PURE__ */ new Set(), c = (s) => {
37
36
  s.forEach((l) => {
38
- const u = t ? t(l) : l.category;
39
- u && o.add(u), l.children && c(l.children);
37
+ const f = t ? t(l) : l.category;
38
+ f && o.add(f), l.children && c(l.children);
40
39
  });
41
40
  };
42
- return c(i), Array.from(o).sort();
43
- }, ne = (i, t, o) => {
44
- if (t.size === 0) return i;
41
+ return c(d), Array.from(o).sort();
42
+ }, le = (d, t, o) => {
43
+ if (t.size === 0) return d;
45
44
  const c = [];
46
- return i.forEach((s) => {
47
- const l = o ? o(s) : s.category, u = l && t.has(l), m = s.children ? ne(s.children, t, o) : void 0;
48
- (u || m && m.length > 0) && c.push({
45
+ return d.forEach((s) => {
46
+ const l = o ? o(s) : s.category, f = l && t.has(l), S = s.children ? le(s.children, t, o) : void 0;
47
+ (f || S && S.length > 0) && c.push({
49
48
  ...s,
50
- children: m
49
+ children: S
51
50
  });
52
51
  }), c;
53
- }, le = (i, t, o, c = 0) => {
52
+ }, oe = (d, t, o, c = 0) => {
54
53
  const s = [];
55
- return i.forEach((l) => {
54
+ return d.forEach((l) => {
56
55
  s.push({ item: l, level: c }), !t[l.id] && l.children && l.children.length > 0 && l.id !== o && s.push(
57
- ...le(l.children, t, o, c + 1)
56
+ ...oe(l.children, t, o, c + 1)
58
57
  );
59
58
  }), s;
60
- }, it = ({
61
- items: i,
59
+ }, ot = ({
60
+ items: d,
62
61
  onChange: t,
63
62
  onSubmit: o,
64
63
  onCancel: c,
65
64
  onItemToggle: s,
66
65
  onDragEnd: l,
67
- enableSearch: u = !0,
68
- enableDragDrop: m = !0,
69
- enableSelectAll: oe = !0,
66
+ enableSearch: f = !0,
67
+ enableDragDrop: S = !0,
68
+ enableSelectAll: ce = !0,
70
69
  enableGroupBy: k = !1,
71
70
  getCategory: C,
72
- searchPlaceholder: ce = "Search...",
71
+ searchPlaceholder: de = "Search...",
73
72
  className: ie = "",
74
- groupLabel: de,
73
+ groupLabel: ae,
75
74
  enableApplyDiscard: p = !1,
76
- enableCollapse: y = !0,
77
- submitButtonLabel: ae = "Apply",
78
- cancelButtonLabel: he = "Reset",
79
- selectionMode: N = V.CASCADE_DOWN
75
+ enableCollapse: F = !0,
76
+ enableGlobalCollapse: he = !0,
77
+ submitButtonLabel: ue = "Apply",
78
+ cancelButtonLabel: fe = "Reset",
79
+ selectionMode: N = U.CASCADE_DOWN
80
80
  }) => {
81
81
  const {
82
82
  items: a,
83
83
  setItems: g,
84
- savedItems: T,
84
+ savedItems: w,
85
85
  setSavedItems: J,
86
- isUserChangeRef: w,
86
+ isUserChangeRef: A,
87
87
  searchText: x,
88
- setSearchText: fe,
88
+ setSearchText: pe,
89
89
  collapsedItems: R,
90
- setCollapsedItems: ue,
91
- isListCollapsed: U,
92
- setIsListCollapsed: pe,
93
- activeId: I,
90
+ setCollapsedItems: Se,
91
+ isListCollapsed: z,
92
+ setIsListCollapsed: me,
93
+ activeId: v,
94
94
  setActiveId: _,
95
- setOverId: H,
96
- selectedCategories: z,
97
- setSelectedCategories: me,
95
+ setOverId: y,
96
+ selectedCategories: O,
97
+ setSelectedCategories: Ce,
98
98
  itemsToBlink: q,
99
- setItemsToBlink: W,
99
+ setItemsToBlink: H,
100
100
  // Normalized state helpers (for optimized operations)
101
- isNormalized: Se,
102
- normalizedState: Ce,
103
- batchUpdateItems: Ne
104
- } = je({
105
- initialItems: i,
101
+ isNormalized: Ne,
102
+ normalizedState: ge,
103
+ batchUpdateItems: ve
104
+ } = We({
105
+ initialItems: d,
106
106
  enableApplyDiscard: p,
107
107
  // Enable normalized state for large datasets (can be made configurable via props)
108
- enableNormalizedState: i.length > 1e3
109
- }), [O, K] = te.useState(0), [P, ge] = te.useState(0), {
110
- sensors: Ie,
111
- handleDragEnd: ve,
108
+ enableNormalizedState: d.length > 1e3
109
+ }), [P, K] = se.useState(0), [V, Ie] = se.useState(0), {
110
+ sensors: ke,
111
+ handleDragEnd: Ee,
112
112
  isValidDrop: Q
113
- } = He({
113
+ } = ye({
114
114
  items: a,
115
115
  onDragEnd: l
116
- }), ke = A(
117
- () => k ? Xe(a, C) : [],
116
+ }), Le = D(
117
+ () => k ? Qe(a, C) : [],
118
118
  [a, k, C]
119
- ), S = A(() => {
119
+ ), m = D(() => {
120
120
  let e = a;
121
- return k && z.size > 0 && (e = ne(e, z, C)), x && (e = se(e, x)), e;
122
- }, [a, x, k, z, C]), Ee = A(
123
- () => le(S, R, I),
124
- [S, R, I]
125
- ), { allChecked: E, someChecked: Le } = A(() => {
121
+ return k && O.size > 0 && (e = le(e, O, C)), x && (e = re(e, x)), e;
122
+ }, [a, x, k, O, C]), De = D(
123
+ () => oe(m, R, v),
124
+ [m, R, v]
125
+ ), { allChecked: E, someChecked: Te } = D(() => {
126
126
  let e = !0, r = !1;
127
- const n = (f) => {
128
- for (const h of f)
127
+ const n = (u) => {
128
+ for (const h of u)
129
129
  if (h.children && h.children.length > 0 ? n(h.children) : h.checked ? r = !0 : e = !1, r && !e) return;
130
130
  };
131
- return n(S), { allChecked: e && r, someChecked: r };
132
- }, [S]), Ae = Le && !E, j = (e, r) => {
131
+ return n(m), { allChecked: e && r, someChecked: r };
132
+ }, [m]), we = Te && !E, W = (e, r) => {
133
133
  for (const n of e) {
134
134
  if (n.id === r) return n;
135
135
  if (n.children) {
136
- const f = j(n.children, r);
137
- if (f) return f;
136
+ const u = W(n.children, r);
137
+ if (u) return u;
138
138
  }
139
139
  }
140
140
  return null;
141
- }, De = {
142
- sideEffects: Ue({
143
- styles: {
144
- active: {
145
- opacity: "0.4"
146
- }
147
- }
148
- })
149
- }, Te = D(
141
+ }, Ae = T(
150
142
  (e, r) => {
151
- if (N === V.INDEPENDENT)
143
+ if (N === U.INDEPENDENT)
152
144
  return e;
153
- const n = (h, d) => h.id === d ? !0 : h.children ? h.children.some(
154
- (L) => n(L, d)
155
- ) : !1, f = (h) => h.map((d) => {
156
- if (d.id === r)
157
- return d;
158
- if (d.children && n(d, r)) {
159
- const L = f(d.children);
160
- let B;
161
- return N === V.CASCADE_UP_DOWN ? B = L.some((F) => F.checked) : B = L.every((F) => F.checked), {
162
- ...d,
163
- checked: B,
145
+ const n = (h, i) => h.id === i ? !0 : h.children ? h.children.some(
146
+ (L) => n(L, i)
147
+ ) : !1, u = (h) => h.map((i) => {
148
+ if (i.id === r)
149
+ return i;
150
+ if (i.children && n(i, r)) {
151
+ const L = u(i.children);
152
+ let j;
153
+ return N === U.CASCADE_UP_DOWN ? j = L.some((B) => B.checked) : j = L.every((B) => B.checked), {
154
+ ...i,
155
+ checked: j,
164
156
  children: L
165
157
  };
166
158
  }
167
- return d;
159
+ return i;
168
160
  });
169
- return f(e);
161
+ return u(e);
170
162
  },
171
163
  [N]
172
164
  ), X = (e) => {
@@ -177,57 +169,57 @@ const se = (i, t) => {
177
169
  }, {
178
170
  handleToggle: Y,
179
171
  handleToggleCollapse: Z,
180
- handleCollapseAll: we,
181
- handleToggleCategory: xe
182
- } = Be({
172
+ handleCollapseAll: xe,
173
+ handleToggleCategory: Re
174
+ } = je({
183
175
  setItems: g,
184
- findItemById: j,
185
- updateParentsUpward: Te,
176
+ findItemById: W,
177
+ updateParentsUpward: Ae,
186
178
  onChange: (e) => {
187
179
  K((r) => r + 1), t(e);
188
180
  },
189
181
  onItemToggle: s,
190
182
  getCategory: C,
191
- setCollapsedItems: ue,
192
- setIsListCollapsed: pe,
193
- setSelectedCategories: me,
194
- isUserChangeRef: w,
183
+ setCollapsedItems: Se,
184
+ setIsListCollapsed: me,
185
+ setSelectedCategories: Ce,
186
+ isUserChangeRef: A,
195
187
  selectionMode: N,
196
188
  // Pass normalized state helpers for optimized operations
197
- isNormalized: Se,
198
- normalizedState: Ce,
199
- batchUpdateItems: Ne
189
+ isNormalized: Ne,
190
+ normalizedState: ge,
191
+ batchUpdateItems: ve
200
192
  }), {
201
193
  collectVisibleItemIds: $,
202
- findItemsNotSelected: M,
203
- collectVisibleItemsForCallback: b,
194
+ findItemsNotSelected: b,
195
+ collectVisibleItemsForCallback: M,
204
196
  updateVisibleItems: G
205
- } = We({
206
- findItemById: j,
197
+ } = He({
198
+ findItemById: W,
207
199
  getCategory: C
208
- }), Re = D(() => {
209
- w.current = !0, g((e) => {
210
- const r = $(S), n = M(
211
- S,
200
+ }), ze = T(() => {
201
+ A.current = !0, g((e) => {
202
+ const r = $(m), n = b(
203
+ m,
212
204
  e,
213
205
  r
214
206
  );
215
207
  if (n.size > 0) {
216
- const d = new Set(n);
217
- W(d), setTimeout(() => W(/* @__PURE__ */ new Set()), 600);
208
+ const i = new Set(n);
209
+ H(i), setTimeout(() => H(/* @__PURE__ */ new Set()), 600);
218
210
  }
219
- const f = G(
211
+ const u = G(
220
212
  e,
221
213
  r,
222
214
  !E
223
- ), h = N === V.INDEPENDENT ? f : re(f);
215
+ ), h = N === U.INDEPENDENT ? u : ne(u);
224
216
  if (t(h), s) {
225
- const d = b(
217
+ const i = M(
226
218
  e,
227
219
  r,
228
220
  !E
229
221
  );
230
- s(d);
222
+ s(i);
231
223
  }
232
224
  return h;
233
225
  });
@@ -235,19 +227,19 @@ const se = (i, t) => {
235
227
  E,
236
228
  t,
237
229
  s,
238
- S,
230
+ m,
239
231
  $,
240
- M,
241
232
  b,
233
+ M,
242
234
  G,
243
- w,
235
+ A,
244
236
  g,
245
- W,
237
+ H,
246
238
  N
247
- ]), ze = D(
239
+ ]), Oe = T(
248
240
  (e, r) => {
249
- const n = I ? Q(I, e.id) : !1, f = q.has(e.id);
250
- return /* @__PURE__ */ v(
241
+ const n = v ? Q(v, e.id) : !1, u = q.has(e.id);
242
+ return /* @__PURE__ */ I(
251
243
  _e,
252
244
  {
253
245
  item: e,
@@ -255,11 +247,11 @@ const se = (i, t) => {
255
247
  isCollapsed: R[e.id] || !1,
256
248
  onToggle: Y,
257
249
  onToggleCollapse: Z,
258
- isAnyDragging: I !== null,
250
+ isAnyDragging: v !== null,
259
251
  isValidDrop: n,
260
- enableDragDrop: m,
261
- enableCollapse: y,
262
- shouldBlink: f
252
+ enableDragDrop: S,
253
+ enableCollapse: F,
254
+ shouldBlink: u
263
255
  },
264
256
  e.id
265
257
  );
@@ -268,90 +260,91 @@ const se = (i, t) => {
268
260
  R,
269
261
  Y,
270
262
  Z,
271
- I,
263
+ v,
272
264
  Q,
273
- m,
265
+ S,
274
266
  q,
275
- y
267
+ F
276
268
  ]
277
- ), Oe = X(a).length > 0, Pe = A(() => p ? a.length > 1e3 ? O !== P : JSON.stringify(a) !== JSON.stringify(T) : !1, [p, a, T, O, P]), Ve = D(() => {
278
- p && (J(a), ge(O), o?.(a));
279
- }, [p, a, o, J, O]), ye = D(() => {
280
- p && (g(T), K(P), c?.());
281
- }, [p, T, c, g, P]);
282
- return /* @__PURE__ */ ee(
269
+ ), Pe = X(a).length > 0, ee = D(() => p ? a.length > 1e3 ? P !== V : JSON.stringify(a) !== JSON.stringify(w) : !1, [p, a, w, P, V]), Ve = T(() => {
270
+ p && (J(a), Ie(P), o?.(a));
271
+ }, [p, a, o, J, P]), Ue = T(() => {
272
+ p && (g(w), K(V), c?.());
273
+ }, [p, w, c, g, V]);
274
+ return /* @__PURE__ */ te(
283
275
  "div",
284
276
  {
285
- className: Qe("flex flex-col", ie),
286
- "data-testid": "nested-list-container",
277
+ className: Ke("flex flex-col", ie),
278
+ "data-component": "nested-list",
279
+ "data-has-changes": ee ? "" : void 0,
280
+ "data-list-collapsed": z ? "" : void 0,
287
281
  children: [
288
- /* @__PURE__ */ ee("div", { className: "flex-shrink-0", children: [
289
- /* @__PURE__ */ v(
290
- Fe,
282
+ /* @__PURE__ */ te("div", { className: "flex-shrink-0", children: [
283
+ /* @__PURE__ */ I(
284
+ Be,
291
285
  {
292
- hasItemsWithChildren: Oe,
293
- isListCollapsed: U,
294
- onCollapseAll: we,
295
- enableSearch: u,
296
- enableSelectAll: oe,
297
- groupLabel: de,
286
+ hasItemsWithChildren: Pe,
287
+ isListCollapsed: z,
288
+ onCollapseAll: xe,
289
+ enableSearch: f,
290
+ enableSelectAll: ce,
291
+ groupLabel: ae,
298
292
  allChecked: E,
299
- isIndeterminate: Ae,
300
- onSelectAll: Re,
293
+ isIndeterminate: we,
294
+ onSelectAll: ze,
301
295
  searchText: x,
302
296
  onSearchChange: (e) => {
303
- fe(e.target.value);
297
+ pe(e.target.value);
304
298
  },
305
- searchPlaceholder: ce,
306
- enableCollapse: y
299
+ searchPlaceholder: de,
300
+ enableCollapse: he
307
301
  }
308
302
  ),
309
- /* @__PURE__ */ v(
310
- Je,
303
+ /* @__PURE__ */ I(
304
+ Fe,
311
305
  {
312
- isListCollapsed: U,
306
+ isListCollapsed: z,
313
307
  enableGroupBy: k,
314
- categories: ke,
315
- selectedCategories: z,
316
- onToggleCategory: xe
308
+ categories: Le,
309
+ selectedCategories: O,
310
+ onToggleCategory: Re
317
311
  }
318
312
  )
319
313
  ] }),
320
- /* @__PURE__ */ v("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ v(
321
- qe,
314
+ /* @__PURE__ */ I("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ I(
315
+ Je,
322
316
  {
323
- isListCollapsed: U,
324
- enableDragDrop: m,
325
- sensors: Ie,
326
- items: Ee,
327
- renderItem: ze,
328
- dropAnimationConfig: De,
317
+ isListCollapsed: z,
318
+ enableDragDrop: S,
319
+ sensors: ke,
320
+ items: De,
321
+ renderItem: Oe,
329
322
  onDragStart: (e) => {
330
323
  _(e.active.id);
331
324
  },
332
325
  onDragOver: (e) => {
333
- H(e.over?.id);
326
+ y(e.over?.id);
334
327
  },
335
328
  onDragEnd: (e) => {
336
- _(null), H(null), w.current = !0, ve(e, (r) => {
329
+ _(null), y(null), A.current = !0, Ee(e, (r) => {
337
330
  const n = r(a);
338
331
  g(n), t(n);
339
332
  });
340
333
  },
341
334
  onDragCancel: () => {
342
- _(null), H(null);
335
+ _(null), y(null);
343
336
  }
344
337
  }
345
338
  ) }),
346
- /* @__PURE__ */ v(
347
- Ke,
339
+ /* @__PURE__ */ I(
340
+ qe,
348
341
  {
349
342
  enableApplyDiscard: p,
350
- hasChanges: Pe,
351
- onDiscard: ye,
343
+ hasChanges: ee,
344
+ onDiscard: Ue,
352
345
  onApply: Ve,
353
- cancelButtonLabel: he,
354
- submitButtonLabel: ae
346
+ cancelButtonLabel: fe,
347
+ submitButtonLabel: ue
355
348
  }
356
349
  )
357
350
  ]
@@ -359,5 +352,5 @@ const se = (i, t) => {
359
352
  );
360
353
  };
361
354
  export {
362
- it as NestedList
355
+ ot as NestedList
363
356
  };
@@ -3,24 +3,26 @@ import m from "react";
3
3
  import { cn as a } from "../../../lib/utils.js";
4
4
  import { Checkbox as u } from "../checkbox.js";
5
5
  const y = ({
6
- children: o,
6
+ children: e,
7
7
  className: t,
8
- read: e,
8
+ read: o,
9
9
  selected: i,
10
- onSelect: s,
10
+ onSelect: c,
11
11
  selectable: r,
12
- ...c
12
+ ...s
13
13
  }) => /* @__PURE__ */ f(
14
14
  "div",
15
15
  {
16
+ "data-component": "notification-item",
17
+ "data-read": o ? "true" : "false",
16
18
  className: a(
17
19
  "group relative flex w-full gap-2 p-3 items-start rounded-xl transition-all border-l-[3px] border-transparent",
18
20
  "bg-[#f8f9fb]",
19
- !e && "border-[#4259ee]",
21
+ !o && "border-[#4259ee]",
20
22
  i && "bg-[#eceefd]",
21
23
  t
22
24
  ),
23
- ...c,
25
+ ...s,
24
26
  children: [
25
27
  r && /* @__PURE__ */ n("div", { className: a(
26
28
  "absolute left-3 top-3 z-10 flex h-[30px] w-[30px] items-center justify-center transition-all duration-200",
@@ -29,7 +31,7 @@ const y = ({
29
31
  u,
30
32
  {
31
33
  checked: i,
32
- onCheckedChange: s,
34
+ onCheckedChange: c,
33
35
  className: "translate-y-0"
34
36
  }
35
37
  ) }),
@@ -38,14 +40,14 @@ const y = ({
38
40
  r && "[&_[data-role=notification-icon]]:transition-opacity [&_[data-role=notification-icon]]:duration-200",
39
41
  r && "group-hover:[&_[data-role=notification-icon]]:opacity-0",
40
42
  r && i && "[&_[data-role=notification-icon]]:opacity-0"
41
- ), children: o })
43
+ ), children: e })
42
44
  ]
43
45
  }
44
- ), v = ({ className: o, children: t, ...e }) => /* @__PURE__ */ n("div", { "data-role": "notification-icon", className: a("flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-full transition-opacity duration-200", o), ...e, children: t }), b = ({ className: o, children: t, ...e }) => /* @__PURE__ */ n("div", { className: a("flex flex-col flex-1 min-w-0 gap-1", o), ...e, children: t }), k = ({ className: o, children: t, ml: e, ...i }) => /* @__PURE__ */ n("h4", { className: a("text-sm font-bold text-[#0d152c] leading-snug break-words", e && "ml-2", o), ...i, children: t }), w = ({ className: o, children: t, isTime: e, ...i }) => {
45
- const [s, r] = m.useState(!1), c = typeof t == "string" ? t : "", l = !e && c.length > 150;
46
- return e ? /* @__PURE__ */ n("p", { className: a("text-xs text-[#5f6673] mt-0.5", o), ...i, children: t }) : /* @__PURE__ */ n("div", { className: a("text-sm font-medium text-[#394960] break-words leading-5", o), children: /* @__PURE__ */ f("p", { ...i, children: [
47
- l && !s ? `${c.slice(0, 150)}` : t,
48
- l && !s && /* @__PURE__ */ f(d, { children: [
46
+ ), v = ({ className: e, children: t, ...o }) => /* @__PURE__ */ n("div", { "data-role": "notification-icon", className: a("flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-full transition-opacity duration-200", e), ...o, children: t }), b = ({ className: e, children: t, ...o }) => /* @__PURE__ */ n("div", { className: a("flex flex-col flex-1 min-w-0 gap-1", e), ...o, children: t }), k = ({ className: e, children: t, ml: o, ...i }) => /* @__PURE__ */ n("h4", { className: a("text-sm font-bold text-[#0d152c] leading-snug break-words", o && "ml-2", e), ...i, children: t }), w = ({ className: e, children: t, isTime: o, ...i }) => {
47
+ const [c, r] = m.useState(!1), s = typeof t == "string" ? t : "", l = !o && s.length > 150;
48
+ return o ? /* @__PURE__ */ n("p", { className: a("text-xs text-[#5f6673] mt-0.5", e), ...i, children: t }) : /* @__PURE__ */ n("div", { className: a("text-sm font-medium text-[#394960] break-words leading-5", e), children: /* @__PURE__ */ f("p", { ...i, children: [
49
+ l && !c ? `${s.slice(0, 150)}` : t,
50
+ l && !c && /* @__PURE__ */ f(d, { children: [
49
51
  "... ",
50
52
  /* @__PURE__ */ n(
51
53
  "span",
@@ -59,7 +61,7 @@ const y = ({
59
61
  }
60
62
  )
61
63
  ] }),
62
- l && s && /* @__PURE__ */ n(
64
+ l && c && /* @__PURE__ */ n(
63
65
  "span",
64
66
  {
65
67
  role: "button",
@@ -71,10 +73,10 @@ const y = ({
71
73
  }
72
74
  )
73
75
  ] }) });
74
- }, I = ({ className: o, children: t, alwaysVisible: e = !0, ...i }) => /* @__PURE__ */ n("div", { className: a(
76
+ }, I = ({ className: e, children: t, alwaysVisible: o = !0, ...i }) => /* @__PURE__ */ n("div", { className: a(
75
77
  "flex items-center gap-1 shrink-0 ml-2 self-start transition-opacity focus-within:opacity-100",
76
- !e && "opacity-0 group-hover:opacity-100",
77
- o
78
+ !o && "opacity-0 group-hover:opacity-100",
79
+ e
78
80
  ), ...i, children: t });
79
81
  export {
80
82
  y as NotificationItem,