@krosoft/react 0.0.121 → 0.0.123

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.
@@ -1,6 +1,6 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { u as se } from "./useDataTable-CxcA5S-s.js";
3
- import { ax as $, aL as B, az as L, aB as ie, _ as P, cr as ne, cs as de, ay as le } from "./toggle-group-wIgXZYDq.js";
3
+ import { ax as I, aL as $, az as B, aB as ne, _ as L, cr as ie, cs as de, ay as le } from "./toggle-group-wIgXZYDq.js";
4
4
  import "./alert-B34E_4uH.js";
5
5
  import { B as w } from "./tooltip-YhBPXbcJ.js";
6
6
  import "./select-DlQvLtI3.js";
@@ -41,14 +41,14 @@ const ue = [
41
41
  const xe = [
42
42
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
43
43
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
44
- ], ye = j("arrow-up", xe);
44
+ ], fe = j("arrow-up", xe);
45
45
  /**
46
46
  * @license lucide-react v1.17.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
50
  */
51
- const fe = [
51
+ const ye = [
52
52
  [
53
53
  "path",
54
54
  {
@@ -57,21 +57,21 @@ const fe = [
57
57
  }
58
58
  ],
59
59
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
60
- ], ve = j("settings", fe), V = [5, 10, 30, 50, 100], be = V[1];
61
- function Ne({ actions: l, row: s }) {
62
- return /* @__PURE__ */ r($, { children: [
63
- /* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ e(oe, { className: "size-3.5" }) }) }),
60
+ ], ve = j("settings", ye), P = [5, 10, 30, 50, 100], be = P[1];
61
+ function Ne({ actions: d, row: s }) {
62
+ return /* @__PURE__ */ r(I, { children: [
63
+ /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ e(oe, { className: "size-3.5" }) }) }),
64
64
  /* @__PURE__ */ e(
65
- L,
65
+ B,
66
66
  {
67
67
  align: "end",
68
68
  onClick: (t) => {
69
69
  t.stopPropagation();
70
70
  },
71
- children: l.map((t, a) => {
71
+ children: d.map((t, a) => {
72
72
  const c = t.icon;
73
73
  return /* @__PURE__ */ r(
74
- ie,
74
+ ne,
75
75
  {
76
76
  onClick: () => {
77
77
  t.onClick(s);
@@ -90,69 +90,69 @@ function Ne({ actions: l, row: s }) {
90
90
  ] });
91
91
  }
92
92
  function ke({
93
- isLoading: l,
93
+ isLoading: d,
94
94
  colSpanCount: s,
95
95
  noDataMessage: t,
96
96
  paginatedData: a,
97
97
  getRowId: c,
98
- onRowClick: i,
98
+ onRowClick: n,
99
99
  hasBulkActions: p,
100
- selectedRows: y,
101
- toggleRowSelection: h,
100
+ selectedRows: f,
101
+ toggleRowSelection: m,
102
102
  visibleColumnsArray: o,
103
103
  columnWidths: b,
104
104
  hasActions: C,
105
- actions: f,
105
+ actions: y,
106
106
  columns: z,
107
107
  bordered: N = !1
108
108
  }) {
109
- const S = (m, g) => {
110
- const n = z.find((v) => v.key === g);
111
- if ((n == null ? void 0 : n.renderCell) !== void 0)
112
- return n.renderCell(m);
113
- const x = m[g];
109
+ const D = (h, g) => {
110
+ const i = z.find((v) => v.key === g);
111
+ if ((i == null ? void 0 : i.renderCell) !== void 0)
112
+ return i.renderCell(h);
113
+ const x = h[g];
114
114
  return /* @__PURE__ */ e("span", { className: "text-sm truncate", children: x != null ? String(x) : "-" });
115
115
  };
116
- return l ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: s, className: "py-8 text-center", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center gap-2 text-muted-foreground", children: [
116
+ return d ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: s, className: "py-8 text-center", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center gap-2 text-muted-foreground", children: [
117
117
  /* @__PURE__ */ e(ce, { className: "h-6 w-6 animate-spin text-primary" }),
118
118
  /* @__PURE__ */ e("span", { className: "text-sm", children: "Chargement..." })
119
- ] }) }) }) }) : a.length === 0 ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: s, className: "py-8 text-center text-sm text-muted-foreground", children: t }) }) }) : /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: a.map((m) => {
120
- const g = c(m);
119
+ ] }) }) }) }) : a.length === 0 ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: s, className: "py-8 text-center text-sm text-muted-foreground", children: t }) }) }) : /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: a.map((h) => {
120
+ const g = c(h);
121
121
  return /* @__PURE__ */ r(
122
122
  "tr",
123
123
  {
124
- className: `group hover:bg-muted/50 dark:hover:bg-gray-900/50 transition-colors ${i !== void 0 ? "cursor-pointer" : ""}`,
125
- onClick: () => i == null ? void 0 : i(m),
124
+ className: `group hover:bg-muted/50 dark:hover:bg-gray-900/50 transition-colors ${n !== void 0 ? "cursor-pointer" : ""}`,
125
+ onClick: () => n == null ? void 0 : n(h),
126
126
  children: [
127
127
  p ? /* @__PURE__ */ e(
128
128
  "td",
129
129
  {
130
130
  className: "p-1 text-center align-middle",
131
131
  style: { width: "32px", minWidth: "32px", maxWidth: "32px" },
132
- onClick: (n) => {
133
- n.stopPropagation();
132
+ onClick: (i) => {
133
+ i.stopPropagation();
134
134
  },
135
135
  children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
136
- P,
136
+ L,
137
137
  {
138
- checked: y.includes(g),
138
+ checked: f.includes(g),
139
139
  onCheckedChange: () => {
140
- h(g);
140
+ m(g);
141
141
  }
142
142
  }
143
143
  ) })
144
144
  }
145
145
  ) : null,
146
- o.map((n, x) => {
146
+ o.map((i, x) => {
147
147
  const v = x === o.length - 1;
148
148
  return /* @__PURE__ */ e(
149
149
  "td",
150
150
  {
151
151
  className: `px-2 py-2 relative ${N && !v ? "border-r border-gray-100 dark:border-gray-800" : ""}`,
152
- style: { width: b[n.key] },
153
- children: /* @__PURE__ */ e("div", { className: "w-full h-full", children: S(m, n.key) })
152
+ style: { width: b[i.key] },
153
+ children: /* @__PURE__ */ e("div", { className: "w-full h-full", children: D(h, i.key) })
154
154
  },
155
- n.key
155
+ i.key
156
156
  );
157
157
  }),
158
158
  C ? /* @__PURE__ */ e(
@@ -160,10 +160,10 @@ function ke({
160
160
  {
161
161
  className: "p-1 text-center align-middle",
162
162
  style: { width: "32px", minWidth: "32px", maxWidth: "32px" },
163
- onClick: (n) => {
164
- n.stopPropagation();
163
+ onClick: (i) => {
164
+ i.stopPropagation();
165
165
  },
166
- children: f !== void 0 && f.length > 0 ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(Ne, { actions: f, row: m }) }) : null
166
+ children: y !== void 0 && y.length > 0 ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(Ne, { actions: y, row: h }) }) : null
167
167
  }
168
168
  ) : null
169
169
  ]
@@ -172,28 +172,28 @@ function ke({
172
172
  );
173
173
  }) });
174
174
  }
175
- function we({ selectedRows: l, setSelectedRows: s, bulkActions: t }) {
175
+ function we({ selectedRows: d, setSelectedRows: s, bulkActions: t }) {
176
176
  return /* @__PURE__ */ r("div", { className: "bg-muted/60 dark:bg-gray-900/60 border border-border px-3 py-1.5 flex items-center justify-between rounded-lg", children: [
177
177
  /* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: [
178
178
  /* @__PURE__ */ r("span", { className: "text-sm font-medium text-primary ml-1", children: [
179
- l.length,
179
+ d.length,
180
180
  " sélectionné(s)"
181
181
  ] }),
182
182
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: t.map((a, c) => {
183
- const i = a.icon;
183
+ const n = a.icon;
184
184
  return /* @__PURE__ */ r(
185
185
  w,
186
186
  {
187
187
  variant: "outline",
188
188
  size: "sm",
189
189
  onClick: () => {
190
- a.onClick(l, () => {
190
+ a.onClick(d, () => {
191
191
  s([]);
192
192
  });
193
193
  },
194
194
  className: `h-7 bg-background shadow-sm text-xs px-2.5 ${a.variant === "destructive" ? "text-destructive border-destructive/30 hover:bg-destructive/10 hover:text-destructive" : "text-foreground"}`,
195
195
  children: [
196
- i !== void 0 && /* @__PURE__ */ e("span", { className: "mr-1.5 flex items-center justify-center", children: /* @__PURE__ */ e(i, { className: "h-3.5 w-3.5" }) }),
196
+ n !== void 0 && /* @__PURE__ */ e("span", { className: "mr-1.5 flex items-center justify-center", children: /* @__PURE__ */ e(n, { className: "h-3.5 w-3.5" }) }),
197
197
  a.label
198
198
  ]
199
199
  },
@@ -216,96 +216,95 @@ function we({ selectedRows: l, setSelectedRows: s, bulkActions: t }) {
216
216
  ] });
217
217
  }
218
218
  function Ce({
219
- hasBulkActions: l,
219
+ hasBulkActions: d,
220
220
  selectedRows: s,
221
221
  totalItems: t,
222
222
  toggleSelectAll: a,
223
223
  visibleColumnsArray: c,
224
- draggableColumns: i,
224
+ draggableColumns: n,
225
225
  resizableColumns: p,
226
- columnWidths: y,
227
- sortColumn: h,
226
+ columnWidths: f,
227
+ sortColumn: m,
228
228
  sortDirection: o,
229
229
  handleSort: b,
230
230
  handleDragStart: C,
231
- handleDragOver: f,
231
+ handleDragOver: y,
232
232
  handleDrop: z,
233
233
  handleMouseDown: N,
234
- hasActions: S,
235
- settingsNode: m,
234
+ hasActions: D,
235
+ settingsNode: h,
236
236
  bordered: g = !1
237
237
  }) {
238
- let n = !1;
239
- s.length === t && t > 0 ? n = !0 : s.length > 0 && (n = "indeterminate");
240
- const x = (d) => d.sortable !== !0 ? null : h === d.key ? o === "asc" ? /* @__PURE__ */ e(ye, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(ge, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(pe, { className: "size-3.5 text-muted-foreground/50 group-hover:text-muted-foreground transition-colors" }), v = (d, M) => {
241
- const D = M !== !1, k = d.sortable === !0, T = h === d.key;
238
+ let i = !1;
239
+ s.length === t && t > 0 ? i = !0 : s.length > 0 && (i = "indeterminate");
240
+ const x = (l) => l.sortable !== !0 ? null : m === l.key ? o === "asc" ? /* @__PURE__ */ e(fe, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(ge, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(pe, { className: "size-3.5 text-muted-foreground/50 group-hover:text-muted-foreground transition-colors" }), v = (l, M) => {
241
+ const S = M !== !1, k = l.sortable === !0;
242
242
  return /* @__PURE__ */ r(
243
243
  "th",
244
244
  {
245
245
  className: [
246
246
  "px-2 py-2 text-left text-sm font-medium text-gray-900 dark:text-gray-100 relative group",
247
247
  g ? "border-r border-gray-200 dark:border-gray-800" : "",
248
- k ? "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800 select-none" : "",
249
- T ? "bg-gray-100/80 dark:bg-gray-800/80" : ""
248
+ k ? "cursor-pointer select-none" : ""
250
249
  ].filter(Boolean).join(" "),
251
- style: { width: y[d.key] },
252
- draggable: D,
250
+ style: { width: f[l.key] },
251
+ draggable: S,
253
252
  onClick: () => {
254
- b(d.key);
253
+ b(l.key);
255
254
  },
256
255
  onDragStart: (u) => {
257
- D ? C(u, d.key) : u.preventDefault();
256
+ S ? C(u, l.key) : u.preventDefault();
258
257
  },
259
258
  onDragOver: (u) => {
260
- f(u, d.key);
259
+ y(u, l.key);
261
260
  },
262
261
  onDrop: (u) => {
263
- z(u, d.key);
262
+ z(u, l.key);
264
263
  },
265
264
  children: [
266
265
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between pr-2", children: [
267
266
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
268
- D ? /* @__PURE__ */ e(he, { className: "size-4 text-gray-400 cursor-grab dark:text-gray-300 shrink-0" }) : null,
269
- /* @__PURE__ */ e("span", { className: "truncate", children: d.label })
267
+ S ? /* @__PURE__ */ e(he, { className: "size-4 text-gray-400 cursor-grab dark:text-gray-300 shrink-0" }) : null,
268
+ /* @__PURE__ */ e("span", { className: "truncate", children: l.label })
270
269
  ] }),
271
- /* @__PURE__ */ e("div", { className: "ml-1 shrink-0", children: x(d) })
270
+ /* @__PURE__ */ e("div", { className: "ml-1 shrink-0", children: x(l) })
272
271
  ] }),
273
272
  p ? /* @__PURE__ */ e(
274
273
  "div",
275
274
  {
276
275
  className: "absolute right-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-blue-500 opacity-0 group-hover:opacity-50 transition-opacity",
277
276
  onMouseDown: (u) => {
278
- N(u, d.key);
277
+ N(u, l.key);
279
278
  }
280
279
  }
281
280
  ) : null
282
281
  ]
283
282
  },
284
- d.key
283
+ l.key
285
284
  );
286
285
  };
287
286
  return /* @__PURE__ */ e("thead", { className: "bg-muted/50 dark:bg-gray-900/50 border-b border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ r("tr", { children: [
288
- l ? /* @__PURE__ */ e("th", { className: "p-1 flex-shrink-0 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(P, { checked: n, onCheckedChange: a }) }) }) : null,
289
- c.map((d) => v(d, i)),
290
- S || m !== void 0 ? /* @__PURE__ */ e("th", { className: "p-1 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: m }) : null
287
+ d ? /* @__PURE__ */ e("th", { className: "p-1 flex-shrink-0 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(L, { checked: i, onCheckedChange: a }) }) }) : null,
288
+ c.map((l) => v(l, n)),
289
+ D || h !== void 0 ? /* @__PURE__ */ e("th", { className: "p-1 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: h }) : null
291
290
  ] }) });
292
291
  }
293
292
  function ze({
294
- totalItems: l,
293
+ totalItems: d,
295
294
  startIndex: s,
296
295
  endIndex: t,
297
296
  pageSize: a,
298
297
  setPageSize: c,
299
- currentPage: i,
298
+ currentPage: n,
300
299
  setCurrentPage: p,
301
- pageSizeOptions: y,
302
- totalPages: h
300
+ pageSizeOptions: f,
301
+ totalPages: m
303
302
  }) {
304
- return /* @__PURE__ */ r("div", { className: "px-4 py-2 border-t border-border flex items-center justify-between bg-card flex-wrap gap-2", children: [
303
+ return /* @__PURE__ */ r("div", { className: "px-4 py-2 border-t border-gray-200 dark:border-gray-800 flex items-center justify-between bg-muted/50 dark:bg-gray-900/50 flex-wrap gap-2", children: [
305
304
  /* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: [
306
- l === 0 ? "0" : `${String(s + 1)} - ${String(t)}`,
305
+ d === 0 ? "0" : `${String(s + 1)} - ${String(t)}`,
307
306
  " sur ",
308
- l
307
+ d
309
308
  ] }),
310
309
  /* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: [
311
310
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
@@ -318,7 +317,7 @@ function ze({
318
317
  c(Number(o.target.value)), p(1);
319
318
  },
320
319
  className: "border border-input bg-background rounded px-2 py-1 text-sm text-foreground",
321
- children: y.map((o) => /* @__PURE__ */ e("option", { value: o, children: o }, o))
320
+ children: f.map((o) => /* @__PURE__ */ e("option", { value: o, children: o }, o))
322
321
  }
323
322
  )
324
323
  ] }),
@@ -332,15 +331,15 @@ function ze({
332
331
  onClick: () => {
333
332
  p((o) => Math.max(1, o - 1));
334
333
  },
335
- disabled: i === 1,
336
- children: /* @__PURE__ */ e(ne, { className: "size-4" })
334
+ disabled: n === 1,
335
+ children: /* @__PURE__ */ e(ie, { className: "size-4" })
337
336
  }
338
337
  ),
339
338
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
340
339
  "Page ",
341
- i,
340
+ n,
342
341
  " sur ",
343
- h
342
+ m
344
343
  ] }),
345
344
  /* @__PURE__ */ e(
346
345
  w,
@@ -349,9 +348,9 @@ function ze({
349
348
  size: "sm",
350
349
  className: "h-8 w-8 p-0",
351
350
  onClick: () => {
352
- p((o) => Math.min(h, o + 1));
351
+ p((o) => Math.min(m, o + 1));
353
352
  },
354
- disabled: i === h,
353
+ disabled: n === m,
355
354
  children: /* @__PURE__ */ e(de, { className: "size-4" })
356
355
  }
357
356
  )
@@ -359,10 +358,10 @@ function ze({
359
358
  ] })
360
359
  ] });
361
360
  }
362
- function Se({ columns: l, visibleColumns: s, toggleColumnVisibility: t }) {
363
- return /* @__PURE__ */ r($, { children: [
364
- /* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "outline", size: "sm", className: "size-7 p-0 bg-white hover:bg-gray-100 dark:bg-gray-900 shadow-sm border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ e(ve, { className: "size-3.5 text-gray-600 dark:text-gray-300" }) }) }),
365
- /* @__PURE__ */ e(L, { align: "end", className: "w-56", children: l.map((a) => /* @__PURE__ */ e(
361
+ function De({ columns: d, visibleColumns: s, toggleColumnVisibility: t }) {
362
+ return /* @__PURE__ */ r(I, { children: [
363
+ /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "outline", size: "sm", className: "size-7 p-0 bg-white hover:bg-gray-100 dark:bg-gray-900 shadow-sm border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ e(ve, { className: "size-3.5 text-gray-600 dark:text-gray-300" }) }) }),
364
+ /* @__PURE__ */ e(B, { align: "end", className: "w-56", children: d.map((a) => /* @__PURE__ */ e(
366
365
  le,
367
366
  {
368
367
  checked: s.has(a.key),
@@ -376,36 +375,36 @@ function Se({ columns: l, visibleColumns: s, toggleColumnVisibility: t }) {
376
375
  ] });
377
376
  }
378
377
  function Ve({
379
- data: l,
378
+ data: d,
380
379
  columns: s,
381
380
  getRowId: t,
382
381
  onRowClick: a,
383
382
  actions: c,
384
- bulkActions: i,
383
+ bulkActions: n,
385
384
  draggableColumns: p = !0,
386
- resizableColumns: y = !0,
387
- columnVisibility: h = !0,
385
+ resizableColumns: f = !0,
386
+ columnVisibility: m = !0,
388
387
  isLoading: o = !1,
389
388
  bordered: b = !1,
390
389
  noDataMessage: C = "Aucun résultat",
391
- defaultPageSize: f = be,
392
- pageSizeOptions: z = V,
390
+ defaultPageSize: y = be,
391
+ pageSizeOptions: z = P,
393
392
  totalRows: N,
394
- currentPage: S,
395
- pageSize: m,
393
+ currentPage: D,
394
+ pageSize: h,
396
395
  onPageChange: g,
397
- onPageSizeChange: n,
396
+ onPageSizeChange: i,
398
397
  sortColumn: x,
399
398
  sortDirection: v,
400
- onSortChange: d
399
+ onSortChange: l
401
400
  }) {
402
401
  const {
403
402
  sortColumn: M,
404
- sortDirection: D,
403
+ sortDirection: S,
405
404
  selectedRows: k,
406
- setSelectedRows: T,
407
- visibleColumns: u,
408
- columnWidths: A,
405
+ setSelectedRows: u,
406
+ visibleColumns: V,
407
+ columnWidths: T,
409
408
  safeCurrentPage: q,
410
409
  totalPages: E,
411
410
  startIndex: G,
@@ -413,7 +412,7 @@ function Ve({
413
412
  tableRef: O,
414
413
  hasActions: W,
415
414
  hasBulkActions: _,
416
- visibleColumnsArray: I,
415
+ visibleColumnsArray: A,
417
416
  colSpanCount: U,
418
417
  paginatedData: F,
419
418
  handleSort: J,
@@ -428,24 +427,24 @@ function Ve({
428
427
  setPageSize: te,
429
428
  setCurrentPage: ae
430
429
  } = se({
431
- data: l,
430
+ data: d,
432
431
  columns: s,
433
432
  getRowId: t,
434
- defaultPageSize: f,
433
+ defaultPageSize: y,
435
434
  actions: c,
436
- bulkActions: i,
437
- columnVisibility: h,
435
+ bulkActions: n,
436
+ columnVisibility: m,
438
437
  totalRows: N,
439
- currentPage: S,
440
- pageSize: m,
438
+ currentPage: D,
439
+ pageSize: h,
441
440
  onPageChange: g,
442
- onPageSizeChange: n,
441
+ onPageSizeChange: i,
443
442
  sortColumn: x,
444
443
  sortDirection: v,
445
- onSortChange: d
444
+ onSortChange: l
446
445
  });
447
446
  return /* @__PURE__ */ r("div", { className: "space-y-4", children: [
448
- k.length > 0 && i !== void 0 && i.length > 0 && /* @__PURE__ */ e(we, { selectedRows: k, setSelectedRows: T, bulkActions: i }),
447
+ k.length > 0 && n !== void 0 && n.length > 0 && /* @__PURE__ */ e(we, { selectedRows: k, setSelectedRows: u, bulkActions: n }),
449
448
  /* @__PURE__ */ r("div", { className: "w-full bg-card dark:bg-gray-950 rounded-md border border-gray-200 dark:border-gray-800 overflow-hidden", children: [
450
449
  /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r("table", { ref: O, className: "w-full", children: [
451
450
  /* @__PURE__ */ e(
@@ -453,14 +452,14 @@ function Ve({
453
452
  {
454
453
  hasBulkActions: _,
455
454
  selectedRows: k,
456
- totalItems: l.length,
455
+ totalItems: d.length,
457
456
  toggleSelectAll: ee,
458
- visibleColumnsArray: I,
457
+ visibleColumnsArray: A,
459
458
  draggableColumns: p,
460
- resizableColumns: y,
461
- columnWidths: A,
459
+ resizableColumns: f,
460
+ columnWidths: T,
462
461
  sortColumn: M,
463
- sortDirection: D,
462
+ sortDirection: S,
464
463
  handleSort: J,
465
464
  handleDragStart: X,
466
465
  handleDragOver: Y,
@@ -468,7 +467,7 @@ function Ve({
468
467
  handleMouseDown: Q,
469
468
  hasActions: W,
470
469
  bordered: b,
471
- settingsNode: h ? /* @__PURE__ */ e(Se, { columns: s, visibleColumns: u, toggleColumnVisibility: K }) : void 0
470
+ settingsNode: m ? /* @__PURE__ */ e(De, { columns: s, visibleColumns: V, toggleColumnVisibility: K }) : void 0
472
471
  }
473
472
  ),
474
473
  /* @__PURE__ */ e(
@@ -484,9 +483,9 @@ function Ve({
484
483
  hasBulkActions: _,
485
484
  selectedRows: k,
486
485
  toggleRowSelection: R,
487
- visibleColumnsArray: I,
488
- columnWidths: A,
489
- hasActions: W || h,
486
+ visibleColumnsArray: A,
487
+ columnWidths: T,
488
+ hasActions: W || m,
490
489
  actions: c,
491
490
  columns: s
492
491
  }
@@ -495,7 +494,7 @@ function Ve({
495
494
  /* @__PURE__ */ e(
496
495
  ze,
497
496
  {
498
- totalItems: N ?? l.length,
497
+ totalItems: N ?? d.length,
499
498
  startIndex: G,
500
499
  endIndex: H,
501
500
  pageSize: re,
@@ -516,5 +515,5 @@ export {
516
515
  we as b,
517
516
  Ce as c,
518
517
  ze as d,
519
- Se as e
518
+ De as e
520
519
  };
@@ -15,7 +15,7 @@ import { S as Z, a as _, T as $ } from "../../Topbar-DFu_OdSs.js";
15
15
  import { E as ea } from "../../ErrorAlert-C6BbHHRZ.js";
16
16
  import { E as oa } from "../../ErrorState-vU8d4CwD.js";
17
17
  import { L as ta } from "../../LoadingState-PhGi7HXH.js";
18
- import { D as la, T as pa, a as ma, b as ba, c as fa, d as ga, e as Da } from "../../DataTable-CrUM9eE-.js";
18
+ import { D as la, T as pa, a as ma, b as ba, c as fa, d as ga, e as Da } from "../../DataTable-CrJoeR_0.js";
19
19
  import { A as na, a as ca, b as da, c as xa } from "../../AppVerticalTabs-CdqoObXx.js";
20
20
  import { T as Sa } from "../../ThemeSelector--w3R6Ff3.js";
21
21
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/core/table/TableHeader.tsx"],"names":[],"mappings":"AAA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E,MAAM,KAAK,IAAI,CAAC;IAClE,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC7B,cAAc,EACd,YAAY,EACZ,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,eAAe,EACf,UAAU,EACV,YAAY,EACZ,QAAgB,GACjB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuFzC"}
@@ -1,4 +1,4 @@
1
- import { D as s, T as b, a as l, b as T, c as t, d as o, e as i } from "../../../DataTable-CrUM9eE-.js";
1
+ import { D as s, T as b, a as l, b as T, c as t, d as o, e as i } from "../../../DataTable-CrJoeR_0.js";
2
2
  export {
3
3
  s as DataTable,
4
4
  b as TableActions,
@@ -15,7 +15,7 @@ import { S as xs, a as As, T as Is } from "../Topbar-DFu_OdSs.js";
15
15
  import { E as hs } from "../ErrorAlert-C6BbHHRZ.js";
16
16
  import { E as vs } from "../ErrorState-vU8d4CwD.js";
17
17
  import { L as Fs } from "../LoadingState-PhGi7HXH.js";
18
- import { D as Bs, T as Gs, a as Rs, b as ks, c as Hs, d as Ns, e as ys } from "../DataTable-CrUM9eE-.js";
18
+ import { D as Bs, T as Gs, a as Rs, b as ks, c as Hs, d as Ns, e as ys } from "../DataTable-CrJoeR_0.js";
19
19
  import { A as Os, a as Vs, b as Ks, c as zs } from "../AppVerticalTabs-CdqoObXx.js";
20
20
  import { T as js } from "../ThemeSelector--w3R6Ff3.js";
21
21
  import { A as Js, a as Qs, b as Ws } from "../alert-B34E_4uH.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krosoft/react",
3
- "version": "0.0.121",
3
+ "version": "0.0.123",
4
4
  "description": "Krosoft shared React package",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -93,10 +93,10 @@
93
93
  "@krosoft/tooling-eslint-react": "^0.0.22",
94
94
  "@krosoft/tooling-prettier": "^0.0.14",
95
95
  "@krosoft/tooling-tsconfig-react": "^0.0.10",
96
- "@storybook/addon-docs": "^10.4.1",
97
- "@storybook/addon-themes": "^10.4.1",
98
- "@storybook/react": "^10.4.1",
99
- "@storybook/react-vite": "^10.4.1",
96
+ "@storybook/addon-docs": "^10.4.2",
97
+ "@storybook/addon-themes": "^10.4.2",
98
+ "@storybook/react": "^10.4.2",
99
+ "@storybook/react-vite": "^10.4.2",
100
100
  "@types/node": "^25.9.1",
101
101
  "@types/react": "^19.2.16",
102
102
  "@types/react-dom": "^19.2.3",
@@ -110,7 +110,7 @@
110
110
  "react-i18next": "^17.0.8",
111
111
  "react-resizable-panels": "^4.11.2",
112
112
  "react-router-dom": "^7.16.0",
113
- "storybook": "^10.4.1",
113
+ "storybook": "^10.4.2",
114
114
  "tailwindcss": "^3.4.19",
115
115
  "typescript": "^5.9.3",
116
116
  "vite": "^6.4.3",