@deepnoid/ui 0.1.68 → 0.1.69

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 (32) hide show
  1. package/.turbo/turbo-build.log +141 -141
  2. package/dist/{chunk-N5BS5LZJ.mjs → chunk-45XDSBRF.mjs} +1 -1
  3. package/dist/{chunk-63JDURFU.mjs → chunk-5GBAUDP4.mjs} +2 -9
  4. package/dist/{chunk-IHERL7SE.mjs → chunk-LA34MKK7.mjs} +1 -1
  5. package/dist/{chunk-Q6IUCVAN.mjs → chunk-LHO66CGE.mjs} +8 -8
  6. package/dist/{chunk-KOZ7WRQU.mjs → chunk-ZMYJ5OW3.mjs} +2 -2
  7. package/dist/components/breadcrumb/breadcrumb.mjs +3 -3
  8. package/dist/components/breadcrumb/index.mjs +3 -3
  9. package/dist/components/button/button.mjs +2 -2
  10. package/dist/components/button/icon-button.mjs +2 -2
  11. package/dist/components/button/index.mjs +3 -3
  12. package/dist/components/dateTimePicker/dateTimePicker.mjs +3 -3
  13. package/dist/components/dateTimePicker/index.mjs +3 -3
  14. package/dist/components/dateTimePicker/timePicker.mjs +2 -2
  15. package/dist/components/fileUpload/fileUpload.mjs +4 -4
  16. package/dist/components/fileUpload/index.mjs +4 -4
  17. package/dist/components/list/index.mjs +3 -3
  18. package/dist/components/modal/index.mjs +4 -4
  19. package/dist/components/modal/modal.mjs +4 -4
  20. package/dist/components/ripple/index.mjs +3 -3
  21. package/dist/components/table/index.js +6 -13
  22. package/dist/components/table/index.mjs +10 -10
  23. package/dist/components/table/table-body.js +2 -9
  24. package/dist/components/table/table-body.mjs +1 -1
  25. package/dist/components/table/table.js +6 -13
  26. package/dist/components/table/table.mjs +7 -7
  27. package/dist/index.js +6 -13
  28. package/dist/index.mjs +26 -26
  29. package/package.json +1 -1
  30. package/dist/{chunk-BUH3JK3B.mjs → chunk-CD6HJQKL.mjs} +3 -3
  31. package/dist/{chunk-FMZEP4LD.mjs → chunk-IFO3TSDM.mjs} +3 -3
  32. package/dist/{chunk-BGLH2JB6.mjs → chunk-NP6OELBR.mjs} +3 -3
@@ -1,16 +1,16 @@
1
1
  "use client";
2
+ import {
3
+ pagination_default
4
+ } from "./chunk-HLLRDA4A.mjs";
2
5
  import {
3
6
  table_body_default
4
- } from "./chunk-63JDURFU.mjs";
7
+ } from "./chunk-5GBAUDP4.mjs";
5
8
  import {
6
9
  table_head_default
7
10
  } from "./chunk-TKB2JL2E.mjs";
8
11
  import {
9
12
  scrollArea_default
10
13
  } from "./chunk-M37VBNB3.mjs";
11
- import {
12
- pagination_default
13
- } from "./chunk-HLLRDA4A.mjs";
14
14
  import {
15
15
  clsx
16
16
  } from "./chunk-27Y6K5NK.mjs";
@@ -63,17 +63,17 @@ var Table = forwardRef((originalProps, ref) => {
63
63
  [checkedRows]
64
64
  );
65
65
  const handleAllRowCheck = (checked) => {
66
- const updated = checked ? new Set(rows.map((_, i) => i)) : /* @__PURE__ */ new Set();
66
+ const updated = checked ? new Set(rows.map((row) => row.id)) : /* @__PURE__ */ new Set();
67
67
  setCheckedRows(updated);
68
68
  };
69
- const handleRowCheck = (index, checked) => {
69
+ const handleRowCheck = (id, checked) => {
70
70
  setCheckedRows((prev) => {
71
71
  const updated = new Set(prev);
72
- checked ? updated.add(index) : updated.delete(index);
72
+ checked ? updated.add(id) : updated.delete(id);
73
73
  return updated;
74
74
  });
75
75
  };
76
- const getCheckedRowData = (checked) => Array.from(checked).map((index) => rows[index]).filter((row) => row !== void 0);
76
+ const getCheckedRowData = (checked) => rows.filter((row) => checked.has(row.id));
77
77
  const slots = useMemo(() => tableStyle(variantProps), [variantProps]);
78
78
  return /* @__PURE__ */ jsxs("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
79
79
  /* @__PURE__ */ jsx(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ jsxs("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-MNGULMJI.mjs";
5
5
  import {
6
6
  button_default
7
- } from "./chunk-BUH3JK3B.mjs";
7
+ } from "./chunk-CD6HJQKL.mjs";
8
8
  import {
9
9
  icon_button_default
10
- } from "./chunk-FMZEP4LD.mjs";
10
+ } from "./chunk-IFO3TSDM.mjs";
11
11
 
12
12
  // src/components/fileUpload/fileUpload.tsx
13
13
  import { useRef, useState, useEffect } from "react";
@@ -4,11 +4,11 @@ import {
4
4
  } from "../../chunk-337VFHYV.mjs";
5
5
  import "../../chunk-MY5U63QO.mjs";
6
6
  import "../../chunk-EKWUOA5B.mjs";
7
- import "../../chunk-BUH3JK3B.mjs";
8
- import "../../chunk-FMZEP4LD.mjs";
7
+ import "../../chunk-CD6HJQKL.mjs";
8
+ import "../../chunk-IFO3TSDM.mjs";
9
9
  import "../../chunk-6WSACUIB.mjs";
10
- import "../../chunk-6PNKRBUT.mjs";
11
10
  import "../../chunk-LXHUO6VM.mjs";
11
+ import "../../chunk-6PNKRBUT.mjs";
12
12
  import "../../chunk-ZYIIXWVY.mjs";
13
13
  import "../../chunk-UTWY7OBW.mjs";
14
14
  import "../../chunk-TVTIX7MO.mjs";
@@ -5,11 +5,11 @@ import {
5
5
  } from "../../chunk-337VFHYV.mjs";
6
6
  import "../../chunk-MY5U63QO.mjs";
7
7
  import "../../chunk-EKWUOA5B.mjs";
8
- import "../../chunk-BUH3JK3B.mjs";
9
- import "../../chunk-FMZEP4LD.mjs";
8
+ import "../../chunk-CD6HJQKL.mjs";
9
+ import "../../chunk-IFO3TSDM.mjs";
10
10
  import "../../chunk-6WSACUIB.mjs";
11
- import "../../chunk-6PNKRBUT.mjs";
12
11
  import "../../chunk-LXHUO6VM.mjs";
12
+ import "../../chunk-6PNKRBUT.mjs";
13
13
  import "../../chunk-ZYIIXWVY.mjs";
14
14
  import "../../chunk-UTWY7OBW.mjs";
15
15
  import "../../chunk-TVTIX7MO.mjs";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  button_default
4
- } from "../../chunk-BUH3JK3B.mjs";
4
+ } from "../../chunk-CD6HJQKL.mjs";
5
5
  import "../../chunk-6WSACUIB.mjs";
6
- import "../../chunk-6PNKRBUT.mjs";
7
6
  import "../../chunk-LXHUO6VM.mjs";
7
+ import "../../chunk-6PNKRBUT.mjs";
8
8
  import "../../chunk-ZYIIXWVY.mjs";
9
9
  import "../../chunk-UTWY7OBW.mjs";
10
10
  import "../../chunk-YZ7HQHTL.mjs";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  icon_button_default
4
- } from "../../chunk-FMZEP4LD.mjs";
4
+ } from "../../chunk-IFO3TSDM.mjs";
5
5
  import "../../chunk-6WSACUIB.mjs";
6
- import "../../chunk-6PNKRBUT.mjs";
7
6
  import "../../chunk-LXHUO6VM.mjs";
7
+ import "../../chunk-6PNKRBUT.mjs";
8
8
  import "../../chunk-ZYIIXWVY.mjs";
9
9
  import "../../chunk-UTWY7OBW.mjs";
10
10
  import "../../chunk-YZ7HQHTL.mjs";
@@ -5,13 +5,13 @@ import {
5
5
  } from "../../chunk-EKWUOA5B.mjs";
6
6
  import {
7
7
  button_default
8
- } from "../../chunk-BUH3JK3B.mjs";
8
+ } from "../../chunk-CD6HJQKL.mjs";
9
9
  import {
10
10
  icon_button_default
11
- } from "../../chunk-FMZEP4LD.mjs";
11
+ } from "../../chunk-IFO3TSDM.mjs";
12
12
  import "../../chunk-6WSACUIB.mjs";
13
- import "../../chunk-6PNKRBUT.mjs";
14
13
  import "../../chunk-LXHUO6VM.mjs";
14
+ import "../../chunk-6PNKRBUT.mjs";
15
15
  import "../../chunk-ZYIIXWVY.mjs";
16
16
  import "../../chunk-UTWY7OBW.mjs";
17
17
  import {
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  dateTimePickerStyle,
4
4
  dateTimePicker_default
5
- } from "../../chunk-IHERL7SE.mjs";
6
- import "../../chunk-BGLH2JB6.mjs";
5
+ } from "../../chunk-LA34MKK7.mjs";
6
+ import "../../chunk-NP6OELBR.mjs";
7
7
  import "../../chunk-7MVEAQ7Z.mjs";
8
- import "../../chunk-B6XJNGQL.mjs";
9
8
  import "../../chunk-LIP5CNY3.mjs";
9
+ import "../../chunk-B6XJNGQL.mjs";
10
10
  import "../../chunk-FWJ2ZKH6.mjs";
11
11
  import "../../chunk-CFB4JWDA.mjs";
12
12
  import "../../chunk-P732YGHO.mjs";
@@ -2,11 +2,11 @@
2
2
  import "../../chunk-75HLCORR.mjs";
3
3
  import {
4
4
  dateTimePicker_default
5
- } from "../../chunk-IHERL7SE.mjs";
6
- import "../../chunk-BGLH2JB6.mjs";
5
+ } from "../../chunk-LA34MKK7.mjs";
6
+ import "../../chunk-NP6OELBR.mjs";
7
7
  import "../../chunk-7MVEAQ7Z.mjs";
8
- import "../../chunk-B6XJNGQL.mjs";
9
8
  import "../../chunk-LIP5CNY3.mjs";
9
+ import "../../chunk-B6XJNGQL.mjs";
10
10
  import "../../chunk-FWJ2ZKH6.mjs";
11
11
  import "../../chunk-CFB4JWDA.mjs";
12
12
  import "../../chunk-P732YGHO.mjs";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  timePicker_default
4
- } from "../../chunk-BGLH2JB6.mjs";
4
+ } from "../../chunk-NP6OELBR.mjs";
5
5
  import "../../chunk-7MVEAQ7Z.mjs";
6
- import "../../chunk-B6XJNGQL.mjs";
7
6
  import "../../chunk-LIP5CNY3.mjs";
7
+ import "../../chunk-B6XJNGQL.mjs";
8
8
  import "../../chunk-4IKNOB5Y.mjs";
9
9
  import "../../chunk-ZYIIXWVY.mjs";
10
10
  import "../../chunk-UTWY7OBW.mjs";
@@ -3,16 +3,16 @@ import {
3
3
  FileUpload,
4
4
  fileUploadStyle,
5
5
  fileUpload_default
6
- } from "../../chunk-KOZ7WRQU.mjs";
6
+ } from "../../chunk-ZMYJ5OW3.mjs";
7
7
  import "../../chunk-2GCSFWHD.mjs";
8
8
  import "../../chunk-MNGULMJI.mjs";
9
9
  import "../../chunk-MY5U63QO.mjs";
10
10
  import "../../chunk-EKWUOA5B.mjs";
11
- import "../../chunk-BUH3JK3B.mjs";
12
- import "../../chunk-FMZEP4LD.mjs";
11
+ import "../../chunk-CD6HJQKL.mjs";
12
+ import "../../chunk-IFO3TSDM.mjs";
13
13
  import "../../chunk-6WSACUIB.mjs";
14
- import "../../chunk-6PNKRBUT.mjs";
15
14
  import "../../chunk-LXHUO6VM.mjs";
15
+ import "../../chunk-6PNKRBUT.mjs";
16
16
  import "../../chunk-ZYIIXWVY.mjs";
17
17
  import "../../chunk-UTWY7OBW.mjs";
18
18
  import "../../chunk-TVTIX7MO.mjs";
@@ -2,16 +2,16 @@
2
2
  import "../../chunk-RLXOHILK.mjs";
3
3
  import {
4
4
  fileUpload_default
5
- } from "../../chunk-KOZ7WRQU.mjs";
5
+ } from "../../chunk-ZMYJ5OW3.mjs";
6
6
  import "../../chunk-2GCSFWHD.mjs";
7
7
  import "../../chunk-MNGULMJI.mjs";
8
8
  import "../../chunk-MY5U63QO.mjs";
9
9
  import "../../chunk-EKWUOA5B.mjs";
10
- import "../../chunk-BUH3JK3B.mjs";
11
- import "../../chunk-FMZEP4LD.mjs";
10
+ import "../../chunk-CD6HJQKL.mjs";
11
+ import "../../chunk-IFO3TSDM.mjs";
12
12
  import "../../chunk-6WSACUIB.mjs";
13
- import "../../chunk-6PNKRBUT.mjs";
14
13
  import "../../chunk-LXHUO6VM.mjs";
14
+ import "../../chunk-6PNKRBUT.mjs";
15
15
  import "../../chunk-ZYIIXWVY.mjs";
16
16
  import "../../chunk-UTWY7OBW.mjs";
17
17
  import "../../chunk-TVTIX7MO.mjs";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import "../../chunk-7MVEAQ7Z.mjs";
3
- import {
4
- list_default
5
- } from "../../chunk-B6XJNGQL.mjs";
6
3
  import {
7
4
  listItem_default
8
5
  } from "../../chunk-LIP5CNY3.mjs";
6
+ import {
7
+ list_default
8
+ } from "../../chunk-B6XJNGQL.mjs";
9
9
  import "../../chunk-4IKNOB5Y.mjs";
10
10
  import "../../chunk-ZYIIXWVY.mjs";
11
11
  import "../../chunk-UTWY7OBW.mjs";
@@ -2,16 +2,16 @@
2
2
  import "../../chunk-DJOG6Z35.mjs";
3
3
  import {
4
4
  modal_default
5
- } from "../../chunk-N5BS5LZJ.mjs";
5
+ } from "../../chunk-45XDSBRF.mjs";
6
6
  import "../../chunk-SE5TU755.mjs";
7
7
  import "../../chunk-FZJ5PLRU.mjs";
8
8
  import "../../chunk-MY5U63QO.mjs";
9
9
  import "../../chunk-EKWUOA5B.mjs";
10
- import "../../chunk-BUH3JK3B.mjs";
11
- import "../../chunk-FMZEP4LD.mjs";
10
+ import "../../chunk-CD6HJQKL.mjs";
11
+ import "../../chunk-IFO3TSDM.mjs";
12
12
  import "../../chunk-6WSACUIB.mjs";
13
- import "../../chunk-6PNKRBUT.mjs";
14
13
  import "../../chunk-LXHUO6VM.mjs";
14
+ import "../../chunk-6PNKRBUT.mjs";
15
15
  import "../../chunk-ZYIIXWVY.mjs";
16
16
  import "../../chunk-UTWY7OBW.mjs";
17
17
  import "../../chunk-TVTIX7MO.mjs";
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  modal_default
4
- } from "../../chunk-N5BS5LZJ.mjs";
4
+ } from "../../chunk-45XDSBRF.mjs";
5
5
  import "../../chunk-SE5TU755.mjs";
6
6
  import "../../chunk-FZJ5PLRU.mjs";
7
7
  import "../../chunk-MY5U63QO.mjs";
8
8
  import "../../chunk-EKWUOA5B.mjs";
9
- import "../../chunk-BUH3JK3B.mjs";
10
- import "../../chunk-FMZEP4LD.mjs";
9
+ import "../../chunk-CD6HJQKL.mjs";
10
+ import "../../chunk-IFO3TSDM.mjs";
11
11
  import "../../chunk-6WSACUIB.mjs";
12
- import "../../chunk-6PNKRBUT.mjs";
13
12
  import "../../chunk-LXHUO6VM.mjs";
13
+ import "../../chunk-6PNKRBUT.mjs";
14
14
  import "../../chunk-ZYIIXWVY.mjs";
15
15
  import "../../chunk-UTWY7OBW.mjs";
16
16
  import "../../chunk-TVTIX7MO.mjs";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import "../../chunk-6WSACUIB.mjs";
3
- import {
4
- useRipple
5
- } from "../../chunk-6PNKRBUT.mjs";
6
3
  import {
7
4
  ripple_default
8
5
  } from "../../chunk-LXHUO6VM.mjs";
6
+ import {
7
+ useRipple
8
+ } from "../../chunk-6PNKRBUT.mjs";
9
9
  import "../../chunk-AC6TWLRT.mjs";
10
10
  export {
11
11
  ripple_default as Ripple,
@@ -752,14 +752,7 @@ var TableBody = ({
752
752
  textAlign: column.align || "center"
753
753
  });
754
754
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
755
- const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
756
- checkbox_default,
757
- {
758
- size,
759
- checked: checkedRows.has(rowIndex),
760
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
761
- }
762
- ) });
755
+ const renderCheckboxCell = (rowId) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) }) });
763
756
  const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
764
757
  columns.map((_, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`)),
765
758
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
@@ -781,7 +774,7 @@ var TableBody = ({
781
774
  `${rowIndex}-${colIdx}`
782
775
  );
783
776
  }),
784
- rowCheckbox && renderCheckboxCell(rowIndex)
777
+ rowCheckbox && renderCheckboxCell(row.id)
785
778
  ] }, rowIndex);
786
779
  const renderRows = () => {
787
780
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {});
@@ -6155,17 +6148,17 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6155
6148
  [checkedRows]
6156
6149
  );
6157
6150
  const handleAllRowCheck = (checked) => {
6158
- const updated = checked ? new Set(rows.map((_, i) => i)) : /* @__PURE__ */ new Set();
6151
+ const updated = checked ? new Set(rows.map((row) => row.id)) : /* @__PURE__ */ new Set();
6159
6152
  setCheckedRows(updated);
6160
6153
  };
6161
- const handleRowCheck = (index, checked) => {
6154
+ const handleRowCheck = (id, checked) => {
6162
6155
  setCheckedRows((prev) => {
6163
6156
  const updated = new Set(prev);
6164
- checked ? updated.add(index) : updated.delete(index);
6157
+ checked ? updated.add(id) : updated.delete(id);
6165
6158
  return updated;
6166
6159
  });
6167
6160
  };
6168
- const getCheckedRowData = (checked) => Array.from(checked).map((index) => rows[index]).filter((row) => row !== void 0);
6161
+ const getCheckedRowData = (checked) => rows.filter((row) => checked.has(row.id));
6169
6162
  const slots = (0, import_react5.useMemo)(() => tableStyle(variantProps), [variantProps]);
6170
6163
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
6171
6164
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import "../../chunk-DX3KXNP6.mjs";
3
- import {
4
- definition_table_default
5
- } from "../../chunk-KCAGZUYM.mjs";
6
3
  import {
7
4
  table_default
8
- } from "../../chunk-Q6IUCVAN.mjs";
9
- import "../../chunk-63JDURFU.mjs";
10
- import "../../chunk-TKB2JL2E.mjs";
11
- import "../../chunk-DQRAFUDA.mjs";
12
- import "../../chunk-M37VBNB3.mjs";
13
- import "../../chunk-MZ76AA76.mjs";
14
- import "../../chunk-6PN3DGOE.mjs";
5
+ } from "../../chunk-LHO66CGE.mjs";
15
6
  import "../../chunk-7B7LRG5J.mjs";
16
7
  import "../../chunk-HLLRDA4A.mjs";
17
8
  import "../../chunk-F3HENRVM.mjs";
9
+ import "../../chunk-5GBAUDP4.mjs";
10
+ import "../../chunk-TKB2JL2E.mjs";
11
+ import "../../chunk-MZ76AA76.mjs";
12
+ import "../../chunk-6PN3DGOE.mjs";
13
+ import {
14
+ definition_table_default
15
+ } from "../../chunk-KCAGZUYM.mjs";
16
+ import "../../chunk-DQRAFUDA.mjs";
17
+ import "../../chunk-M37VBNB3.mjs";
18
18
  import "../../chunk-2GCSFWHD.mjs";
19
19
  import "../../chunk-MNGULMJI.mjs";
20
20
  import "../../chunk-QZ3LVYJW.mjs";
@@ -694,14 +694,7 @@ var TableBody = ({
694
694
  textAlign: column.align || "center"
695
695
  });
696
696
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
697
- const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
698
- checkbox_default,
699
- {
700
- size,
701
- checked: checkedRows.has(rowIndex),
702
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
703
- }
704
- ) });
697
+ const renderCheckboxCell = (rowId) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) }) });
705
698
  const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
706
699
  columns.map((_, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`)),
707
700
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
@@ -723,7 +716,7 @@ var TableBody = ({
723
716
  `${rowIndex}-${colIdx}`
724
717
  );
725
718
  }),
726
- rowCheckbox && renderCheckboxCell(rowIndex)
719
+ rowCheckbox && renderCheckboxCell(row.id)
727
720
  ] }, rowIndex);
728
721
  const renderRows = () => {
729
722
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {});
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  table_body_default
4
- } from "../../chunk-63JDURFU.mjs";
4
+ } from "../../chunk-5GBAUDP4.mjs";
5
5
  import "../../chunk-MZ76AA76.mjs";
6
6
  import "../../chunk-6PN3DGOE.mjs";
7
7
  import "../../chunk-QZ3LVYJW.mjs";
@@ -749,14 +749,7 @@ var TableBody = ({
749
749
  textAlign: column.align || "center"
750
750
  });
751
751
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
752
- const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
753
- checkbox_default,
754
- {
755
- size,
756
- checked: checkedRows.has(rowIndex),
757
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
758
- }
759
- ) });
752
+ const renderCheckboxCell = (rowId) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) }) });
760
753
  const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
761
754
  columns.map((_, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`)),
762
755
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
@@ -778,7 +771,7 @@ var TableBody = ({
778
771
  `${rowIndex}-${colIdx}`
779
772
  );
780
773
  }),
781
- rowCheckbox && renderCheckboxCell(rowIndex)
774
+ rowCheckbox && renderCheckboxCell(row.id)
782
775
  ] }, rowIndex);
783
776
  const renderRows = () => {
784
777
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {});
@@ -6152,17 +6145,17 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
6152
6145
  [checkedRows]
6153
6146
  );
6154
6147
  const handleAllRowCheck = (checked) => {
6155
- const updated = checked ? new Set(rows.map((_, i) => i)) : /* @__PURE__ */ new Set();
6148
+ const updated = checked ? new Set(rows.map((row) => row.id)) : /* @__PURE__ */ new Set();
6156
6149
  setCheckedRows(updated);
6157
6150
  };
6158
- const handleRowCheck = (index, checked) => {
6151
+ const handleRowCheck = (id, checked) => {
6159
6152
  setCheckedRows((prev) => {
6160
6153
  const updated = new Set(prev);
6161
- checked ? updated.add(index) : updated.delete(index);
6154
+ checked ? updated.add(id) : updated.delete(id);
6162
6155
  return updated;
6163
6156
  });
6164
6157
  };
6165
- const getCheckedRowData = (checked) => Array.from(checked).map((index) => rows[index]).filter((row) => row !== void 0);
6158
+ const getCheckedRowData = (checked) => rows.filter((row) => checked.has(row.id));
6166
6159
  const slots = (0, import_react5.useMemo)(() => tableStyle(variantProps), [variantProps]);
6167
6160
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
6168
6161
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  table_default
4
- } from "../../chunk-Q6IUCVAN.mjs";
5
- import "../../chunk-63JDURFU.mjs";
6
- import "../../chunk-TKB2JL2E.mjs";
7
- import "../../chunk-DQRAFUDA.mjs";
8
- import "../../chunk-M37VBNB3.mjs";
9
- import "../../chunk-MZ76AA76.mjs";
10
- import "../../chunk-6PN3DGOE.mjs";
4
+ } from "../../chunk-LHO66CGE.mjs";
11
5
  import "../../chunk-7B7LRG5J.mjs";
12
6
  import "../../chunk-HLLRDA4A.mjs";
13
7
  import "../../chunk-F3HENRVM.mjs";
8
+ import "../../chunk-5GBAUDP4.mjs";
9
+ import "../../chunk-TKB2JL2E.mjs";
10
+ import "../../chunk-MZ76AA76.mjs";
11
+ import "../../chunk-6PN3DGOE.mjs";
12
+ import "../../chunk-DQRAFUDA.mjs";
13
+ import "../../chunk-M37VBNB3.mjs";
14
14
  import "../../chunk-2GCSFWHD.mjs";
15
15
  import "../../chunk-MNGULMJI.mjs";
16
16
  import "../../chunk-QZ3LVYJW.mjs";
package/dist/index.js CHANGED
@@ -7776,14 +7776,7 @@ var TableBody = ({
7776
7776
  textAlign: column.align || "center"
7777
7777
  });
7778
7778
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
7779
- const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7780
- checkbox_default,
7781
- {
7782
- size,
7783
- checked: checkedRows.has(rowIndex),
7784
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
7785
- }
7786
- ) });
7779
+ const renderCheckboxCell = (rowId) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) }) });
7787
7780
  const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
7788
7781
  columns.map((_, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`)),
7789
7782
  rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
@@ -7805,7 +7798,7 @@ var TableBody = ({
7805
7798
  `${rowIndex}-${colIdx}`
7806
7799
  );
7807
7800
  }),
7808
- rowCheckbox && renderCheckboxCell(rowIndex)
7801
+ rowCheckbox && renderCheckboxCell(row.id)
7809
7802
  ] }, rowIndex);
7810
7803
  const renderRows = () => {
7811
7804
  if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {});
@@ -8175,17 +8168,17 @@ var Table = (0, import_react15.forwardRef)((originalProps, ref) => {
8175
8168
  [checkedRows]
8176
8169
  );
8177
8170
  const handleAllRowCheck = (checked) => {
8178
- const updated = checked ? new Set(rows.map((_, i) => i)) : /* @__PURE__ */ new Set();
8171
+ const updated = checked ? new Set(rows.map((row) => row.id)) : /* @__PURE__ */ new Set();
8179
8172
  setCheckedRows(updated);
8180
8173
  };
8181
- const handleRowCheck = (index, checked) => {
8174
+ const handleRowCheck = (id, checked) => {
8182
8175
  setCheckedRows((prev) => {
8183
8176
  const updated = new Set(prev);
8184
- checked ? updated.add(index) : updated.delete(index);
8177
+ checked ? updated.add(id) : updated.delete(id);
8185
8178
  return updated;
8186
8179
  });
8187
8180
  };
8188
- const getCheckedRowData = (checked) => Array.from(checked).map((index) => rows[index]).filter((row) => row !== void 0);
8181
+ const getCheckedRowData = (checked) => rows.filter((row) => checked.has(row.id));
8189
8182
  const slots = (0, import_react15.useMemo)(() => tableStyle(variantProps), [variantProps]);
8190
8183
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
8191
8184
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [