baaz-custom-components 5.2.4 → 5.2.6

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.
package/dist/index.css CHANGED
@@ -296,6 +296,9 @@
296
296
  .top-4 {
297
297
  top: calc(var(--spacing) * 4);
298
298
  }
299
+ .top-10 {
300
+ top: calc(var(--spacing) * 10);
301
+ }
299
302
  .top-12 {
300
303
  top: calc(var(--spacing) * 12);
301
304
  }
package/dist/index.js CHANGED
@@ -2453,36 +2453,20 @@ function GridHeader({
2453
2453
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react14.Ellipsis, { size: 16 })
2454
2454
  }
2455
2455
  ),
2456
- downloadMenu && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "absolute top-full right-0 mt-2 w-32 rounded-md border !bg-background shadow-lg z-50 overflow-hidden", children: [
2457
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2458
- "button",
2459
- {
2460
- onClick: () => {
2461
- onPdf == null ? void 0 : onPdf();
2462
- setDownloadMenu(false);
2463
- },
2464
- className: "flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted cursor-pointer",
2465
- children: [
2466
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react14.FileText, { size: 14 }),
2467
- " PDF"
2468
- ]
2469
- }
2470
- ),
2471
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2472
- "button",
2473
- {
2474
- onClick: () => {
2475
- onExcel == null ? void 0 : onExcel();
2476
- setDownloadMenu(false);
2477
- },
2478
- className: "flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted cursor-pointer",
2479
- children: [
2480
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react14.FileSpreadsheet, { size: 14 }),
2481
- " Excel"
2482
- ]
2483
- }
2484
- )
2485
- ] })
2456
+ downloadMenu && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "absolute top-full right-0 mt-2 w-32 rounded-md border !bg-background shadow-lg z-50 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2457
+ "button",
2458
+ {
2459
+ onClick: () => {
2460
+ onExcel == null ? void 0 : onExcel();
2461
+ setDownloadMenu(false);
2462
+ },
2463
+ className: "flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted cursor-pointer",
2464
+ children: [
2465
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react14.FileSpreadsheet, { size: 14 }),
2466
+ " Excel"
2467
+ ]
2468
+ }
2469
+ ) })
2486
2470
  ] })
2487
2471
  ] }) }),
2488
2472
  children,
@@ -2575,11 +2559,12 @@ var CheckboxCell = ({ row, api, column }) => {
2575
2559
  const selectedRows = useStore(api, "selectedRows");
2576
2560
  const isSelected = selectedRows.includes(row.id);
2577
2561
  const handleChange = (e) => {
2578
- var _a, _b;
2562
+ var _a, _b, _c, _d;
2579
2563
  e.stopPropagation();
2580
2564
  const isChecked = e.target.checked;
2565
+ (_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.markCheckboxAction) == null ? void 0 : _b.call(_a);
2581
2566
  api.exec("select-row", { id: row.id, mode: isChecked, toggle: true });
2582
- (_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.onSelectionChange) == null ? void 0 : _b.call(_a, row.id, row, isChecked);
2567
+ (_d = (_c = column == null ? void 0 : column.config) == null ? void 0 : _c.onSelectionChange) == null ? void 0 : _d.call(_c, row.id, row, isChecked);
2583
2568
  };
2584
2569
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2585
2570
  "div",
@@ -2649,6 +2634,8 @@ var HeaderCheckbox = ({ api, column }) => {
2649
2634
  const pageData = (_b = (_a2 = column == null ? void 0 : column.config) == null ? void 0 : _a2.getPageData()) != null ? _b : [];
2650
2635
  const dataArray = Array.isArray(pageData) ? pageData : [];
2651
2636
  dataArray.forEach((row) => {
2637
+ var _a3, _b2;
2638
+ (_b2 = (_a3 = column == null ? void 0 : column.config) == null ? void 0 : _a3.markCheckboxAction) == null ? void 0 : _b2.call(_a3);
2652
2639
  api.exec("select-row", { id: row.id, mode: isChecked, toggle: true });
2653
2640
  });
2654
2641
  (_d = (_c = column == null ? void 0 : column.config) == null ? void 0 : _c.onSelectAllPage) == null ? void 0 : _d.call(_c, dataArray, isChecked);
@@ -2679,13 +2666,15 @@ function buildCheckboxColumn({
2679
2666
  getPageData,
2680
2667
  onSelectionChange,
2681
2668
  onSelectAllPage,
2682
- clearToken
2669
+ clearToken,
2670
+ markCheckboxAction
2683
2671
  }) {
2684
2672
  const configRef = {
2685
2673
  getPageData,
2686
2674
  onSelectionChange,
2687
2675
  onSelectAllPage,
2688
- clearToken
2676
+ clearToken,
2677
+ markCheckboxAction
2689
2678
  };
2690
2679
  return {
2691
2680
  id: "__selection__",
@@ -2699,6 +2688,7 @@ function buildCheckboxColumn({
2699
2688
  }
2700
2689
 
2701
2690
  // src/components/custom/grid/index.tsx
2691
+ var import_lucide_react15 = require("lucide-react");
2702
2692
  var import_jsx_runtime28 = require("react/jsx-runtime");
2703
2693
  var _measureCanvas = typeof window !== "undefined" ? document.createElement("canvas") : null;
2704
2694
  function measureHeaderTextWidth(text) {
@@ -2765,6 +2755,7 @@ var Grid = (0, import_react10.forwardRef)(
2765
2755
  var _a2;
2766
2756
  const apiRef = (0, import_react10.useRef)(null);
2767
2757
  const containerRef = (0, import_react10.useRef)(null);
2758
+ const isCheckboxActionRef = (0, import_react10.useRef)(false);
2768
2759
  const dataRef = (0, import_react10.useRef)(data);
2769
2760
  (0, import_react10.useEffect)(() => {
2770
2761
  dataRef.current = data;
@@ -2804,7 +2795,10 @@ var Grid = (0, import_react10.forwardRef)(
2804
2795
  var _a3;
2805
2796
  (_a3 = onSelectAllPageRef.current) == null ? void 0 : _a3.call(onSelectAllPageRef, pageData, checked);
2806
2797
  },
2807
- clearToken: clearTokenRef.current
2798
+ clearToken: clearTokenRef.current,
2799
+ markCheckboxAction: () => {
2800
+ isCheckboxActionRef.current = true;
2801
+ }
2808
2802
  });
2809
2803
  return [checkboxCol, ...columns];
2810
2804
  }, [selectionEnabled, columns, clearTokenRef.current]);
@@ -2887,6 +2881,10 @@ var Grid = (0, import_react10.forwardRef)(
2887
2881
  resizeColumns();
2888
2882
  api.intercept("focus-cell", onFocusCell);
2889
2883
  api.on("select-row", (ev) => {
2884
+ if (isCheckboxActionRef.current) {
2885
+ isCheckboxActionRef.current = false;
2886
+ return;
2887
+ }
2890
2888
  const handler = onRowClickRef.current;
2891
2889
  if (!handler) return;
2892
2890
  const row = api.getRow(ev.id);
@@ -2937,15 +2935,21 @@ var Grid = (0, import_react10.forwardRef)(
2937
2935
  {
2938
2936
  className: "flex-1 w-full border border-border overflow-hidden",
2939
2937
  ref: containerRef,
2940
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_grid.WillowDark, { fonts, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full h-full relative", children: rest.loading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute inset-0 bg-background/60 backdrop-blur-sm flex items-center justify-center z-10", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent" }) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2941
- import_react_grid.Grid,
2942
- __spreadProps(__spreadValues({}, rest), {
2943
- data,
2944
- columns: resolvedColumns,
2945
- init,
2946
- selectedRows: selectionEnabled ? selectedIds : void 0
2947
- })
2948
- ) }) })
2938
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_grid.WillowDark, { fonts, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full h-full relative", children: rest.loading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute inset-0 bg-background/60 backdrop-blur-sm flex items-center justify-center z-10", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent" }) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
2939
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2940
+ import_react_grid.Grid,
2941
+ __spreadProps(__spreadValues({}, rest), {
2942
+ data,
2943
+ columns: resolvedColumns,
2944
+ init,
2945
+ selectedRows: selectionEnabled ? selectedIds : void 0
2946
+ })
2947
+ ),
2948
+ !(data == null ? void 0 : data.length) && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "absolute top-10 left-0 right-0 bottom-0 flex flex-col items-center justify-center pointer-events-none select-none", children: [
2949
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.Table2, { size: 26 }),
2950
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm font-medium text-muted-foreground mt-2", children: "No data found" })
2951
+ ] })
2952
+ ] }) }) })
2949
2953
  }
2950
2954
  )
2951
2955
  ] });
@@ -2954,7 +2958,7 @@ var Grid = (0, import_react10.forwardRef)(
2954
2958
  var grid_default = import_react10.default.memo(Grid);
2955
2959
 
2956
2960
  // src/components/custom/grid/sortableHeaderCell.tsx
2957
- var import_lucide_react15 = require("lucide-react");
2961
+ var import_lucide_react16 = require("lucide-react");
2958
2962
  var import_react11 = __toESM(require("react"));
2959
2963
  var import_jsx_runtime29 = require("react/jsx-runtime");
2960
2964
  var SortableHeaderCell = ({ cell, sortKey, sortOrder, onSortChange }) => {
@@ -2979,8 +2983,8 @@ var SortableHeaderCell = ({ cell, sortKey, sortOrder, onSortChange }) => {
2979
2983
  className: "cursor-pointer flex items-center gap-2 justify-between select-none",
2980
2984
  children: [
2981
2985
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: cell.text }),
2982
- !active && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.ArrowUpDown, { className: "w-4 h-4 opacity-50" }),
2983
- active && (sortOrder === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.MoveDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.MoveUp, { className: "w-4 h-4" }))
2986
+ !active && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react16.ArrowUpDown, { className: "w-4 h-4 opacity-50" }),
2987
+ active && (sortOrder === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react16.MoveDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react16.MoveUp, { className: "w-4 h-4" }))
2984
2988
  ]
2985
2989
  }
2986
2990
  );
@@ -3025,7 +3029,7 @@ function getPaginationRange(currentPage, totalPages, siblingCount = 2) {
3025
3029
  }
3026
3030
 
3027
3031
  // src/components/custom/pagination/index.tsx
3028
- var import_lucide_react16 = require("lucide-react");
3032
+ var import_lucide_react17 = require("lucide-react");
3029
3033
  var import_jsx_runtime30 = require("react/jsx-runtime");
3030
3034
  function Pagination({
3031
3035
  totalCount,
@@ -3075,7 +3079,7 @@ function Pagination({
3075
3079
  disabled: currentPage === 1,
3076
3080
  onClick: () => handlePageChange(currentPage - 1),
3077
3081
  className: "border border-border w-8 h-8 rounded-md flex items-center justify-center disabled:opacity-40 hover:bg-card-foreground transition",
3078
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.ChevronLeft, { className: "w-5 h-5 select-none" })
3082
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react17.ChevronLeft, { className: "w-5 h-5 select-none" })
3079
3083
  }
3080
3084
  ),
3081
3085
  pages.map(
@@ -3102,7 +3106,7 @@ function Pagination({
3102
3106
  disabled: currentPage === totalPages,
3103
3107
  onClick: () => handlePageChange(currentPage + 1),
3104
3108
  className: "border border-border w-8 h-8 rounded-md flex items-center justify-center disabled:opacity-40 hover:bg-card-foreground transition",
3105
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.ChevronRight, { className: "w-5 h-5 select-none" })
3109
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react17.ChevronRight, { className: "w-5 h-5 select-none" })
3106
3110
  }
3107
3111
  )
3108
3112
  ] })
@@ -3111,7 +3115,7 @@ function Pagination({
3111
3115
  var pagination_default = Pagination;
3112
3116
 
3113
3117
  // src/components/custom/toolbar/index.tsx
3114
- var import_lucide_react17 = require("lucide-react");
3118
+ var import_lucide_react18 = require("lucide-react");
3115
3119
  var import_react12 = require("react");
3116
3120
  var import_jsx_runtime31 = require("react/jsx-runtime");
3117
3121
  var SlideToolbar = ({
@@ -3166,7 +3170,7 @@ var SlideToolbar = ({
3166
3170
  open ? "opacity-0 pointer-events-none !w-0 border-r-0" : "opacity-100 pointer-events-auto"
3167
3171
  ].join(" "),
3168
3172
  children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3169
- import_lucide_react17.ChevronRight,
3173
+ import_lucide_react18.ChevronRight,
3170
3174
  {
3171
3175
  className: "text-primary-foreground chevron-bounce",
3172
3176
  size: 16
@@ -3199,7 +3203,7 @@ var SlideToolbar = ({
3199
3203
  onClick: () => setOpen(false),
3200
3204
  "aria-label": "Close toolbar",
3201
3205
  className: "flex items-center justify-center w-6 h-6 rounded-md\n text-foreground/50 hover:text-foreground hover:bg-surface-alt\n transition-all duration-150 cursor-pointer",
3202
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react17.X, { size: 13 })
3206
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react18.X, { size: 13 })
3203
3207
  }
3204
3208
  )
3205
3209
  ] }),
package/dist/index.mjs CHANGED
@@ -1951,7 +1951,7 @@ function exportExcel(rows, name) {
1951
1951
 
1952
1952
  // src/components/custom/grid/gridHeader/index.tsx
1953
1953
  import React3, { useEffect as useEffect6, useRef as useRef2, useState as useState7 } from "react";
1954
- import { FileText, FileSpreadsheet, Search, Ellipsis, X as X4 } from "lucide-react";
1954
+ import { FileSpreadsheet, Search, Ellipsis, X as X4 } from "lucide-react";
1955
1955
 
1956
1956
  // src/components/custom/grid/gridHeader/components/filters.tsx
1957
1957
  import { useEffect as useEffect5, useMemo as useMemo3, useRef, useState as useState6 } from "react";
@@ -2422,36 +2422,20 @@ function GridHeader({
2422
2422
  children: /* @__PURE__ */ jsx25(Ellipsis, { size: 16 })
2423
2423
  }
2424
2424
  ),
2425
- downloadMenu && /* @__PURE__ */ jsxs19("div", { className: "absolute top-full right-0 mt-2 w-32 rounded-md border !bg-background shadow-lg z-50 overflow-hidden", children: [
2426
- /* @__PURE__ */ jsxs19(
2427
- "button",
2428
- {
2429
- onClick: () => {
2430
- onPdf == null ? void 0 : onPdf();
2431
- setDownloadMenu(false);
2432
- },
2433
- className: "flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted cursor-pointer",
2434
- children: [
2435
- /* @__PURE__ */ jsx25(FileText, { size: 14 }),
2436
- " PDF"
2437
- ]
2438
- }
2439
- ),
2440
- /* @__PURE__ */ jsxs19(
2441
- "button",
2442
- {
2443
- onClick: () => {
2444
- onExcel == null ? void 0 : onExcel();
2445
- setDownloadMenu(false);
2446
- },
2447
- className: "flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted cursor-pointer",
2448
- children: [
2449
- /* @__PURE__ */ jsx25(FileSpreadsheet, { size: 14 }),
2450
- " Excel"
2451
- ]
2452
- }
2453
- )
2454
- ] })
2425
+ downloadMenu && /* @__PURE__ */ jsx25("div", { className: "absolute top-full right-0 mt-2 w-32 rounded-md border !bg-background shadow-lg z-50 overflow-hidden", children: /* @__PURE__ */ jsxs19(
2426
+ "button",
2427
+ {
2428
+ onClick: () => {
2429
+ onExcel == null ? void 0 : onExcel();
2430
+ setDownloadMenu(false);
2431
+ },
2432
+ className: "flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted cursor-pointer",
2433
+ children: [
2434
+ /* @__PURE__ */ jsx25(FileSpreadsheet, { size: 14 }),
2435
+ " Excel"
2436
+ ]
2437
+ }
2438
+ ) })
2455
2439
  ] })
2456
2440
  ] }) }),
2457
2441
  children,
@@ -2544,11 +2528,12 @@ var CheckboxCell = ({ row, api, column }) => {
2544
2528
  const selectedRows = useStore(api, "selectedRows");
2545
2529
  const isSelected = selectedRows.includes(row.id);
2546
2530
  const handleChange = (e) => {
2547
- var _a, _b;
2531
+ var _a, _b, _c, _d;
2548
2532
  e.stopPropagation();
2549
2533
  const isChecked = e.target.checked;
2534
+ (_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.markCheckboxAction) == null ? void 0 : _b.call(_a);
2550
2535
  api.exec("select-row", { id: row.id, mode: isChecked, toggle: true });
2551
- (_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.onSelectionChange) == null ? void 0 : _b.call(_a, row.id, row, isChecked);
2536
+ (_d = (_c = column == null ? void 0 : column.config) == null ? void 0 : _c.onSelectionChange) == null ? void 0 : _d.call(_c, row.id, row, isChecked);
2552
2537
  };
2553
2538
  return /* @__PURE__ */ jsx26(
2554
2539
  "div",
@@ -2618,6 +2603,8 @@ var HeaderCheckbox = ({ api, column }) => {
2618
2603
  const pageData = (_b = (_a2 = column == null ? void 0 : column.config) == null ? void 0 : _a2.getPageData()) != null ? _b : [];
2619
2604
  const dataArray = Array.isArray(pageData) ? pageData : [];
2620
2605
  dataArray.forEach((row) => {
2606
+ var _a3, _b2;
2607
+ (_b2 = (_a3 = column == null ? void 0 : column.config) == null ? void 0 : _a3.markCheckboxAction) == null ? void 0 : _b2.call(_a3);
2621
2608
  api.exec("select-row", { id: row.id, mode: isChecked, toggle: true });
2622
2609
  });
2623
2610
  (_d = (_c = column == null ? void 0 : column.config) == null ? void 0 : _c.onSelectAllPage) == null ? void 0 : _d.call(_c, dataArray, isChecked);
@@ -2648,13 +2635,15 @@ function buildCheckboxColumn({
2648
2635
  getPageData,
2649
2636
  onSelectionChange,
2650
2637
  onSelectAllPage,
2651
- clearToken
2638
+ clearToken,
2639
+ markCheckboxAction
2652
2640
  }) {
2653
2641
  const configRef = {
2654
2642
  getPageData,
2655
2643
  onSelectionChange,
2656
2644
  onSelectAllPage,
2657
- clearToken
2645
+ clearToken,
2646
+ markCheckboxAction
2658
2647
  };
2659
2648
  return {
2660
2649
  id: "__selection__",
@@ -2668,7 +2657,8 @@ function buildCheckboxColumn({
2668
2657
  }
2669
2658
 
2670
2659
  // src/components/custom/grid/index.tsx
2671
- import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
2660
+ import { Table2 } from "lucide-react";
2661
+ import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
2672
2662
  var _measureCanvas = typeof window !== "undefined" ? document.createElement("canvas") : null;
2673
2663
  function measureHeaderTextWidth(text) {
2674
2664
  if (!_measureCanvas) return 0;
@@ -2734,6 +2724,7 @@ var Grid = forwardRef(
2734
2724
  var _a2;
2735
2725
  const apiRef = useRef5(null);
2736
2726
  const containerRef = useRef5(null);
2727
+ const isCheckboxActionRef = useRef5(false);
2737
2728
  const dataRef = useRef5(data);
2738
2729
  useEffect9(() => {
2739
2730
  dataRef.current = data;
@@ -2773,7 +2764,10 @@ var Grid = forwardRef(
2773
2764
  var _a3;
2774
2765
  (_a3 = onSelectAllPageRef.current) == null ? void 0 : _a3.call(onSelectAllPageRef, pageData, checked);
2775
2766
  },
2776
- clearToken: clearTokenRef.current
2767
+ clearToken: clearTokenRef.current,
2768
+ markCheckboxAction: () => {
2769
+ isCheckboxActionRef.current = true;
2770
+ }
2777
2771
  });
2778
2772
  return [checkboxCol, ...columns];
2779
2773
  }, [selectionEnabled, columns, clearTokenRef.current]);
@@ -2856,6 +2850,10 @@ var Grid = forwardRef(
2856
2850
  resizeColumns();
2857
2851
  api.intercept("focus-cell", onFocusCell);
2858
2852
  api.on("select-row", (ev) => {
2853
+ if (isCheckboxActionRef.current) {
2854
+ isCheckboxActionRef.current = false;
2855
+ return;
2856
+ }
2859
2857
  const handler = onRowClickRef.current;
2860
2858
  if (!handler) return;
2861
2859
  const row = api.getRow(ev.id);
@@ -2906,15 +2904,21 @@ var Grid = forwardRef(
2906
2904
  {
2907
2905
  className: "flex-1 w-full border border-border overflow-hidden",
2908
2906
  ref: containerRef,
2909
- children: /* @__PURE__ */ jsx28(WillowDark, { fonts, children: /* @__PURE__ */ jsx28("div", { className: "w-full h-full relative", children: rest.loading ? /* @__PURE__ */ jsx28("div", { className: "absolute inset-0 bg-background/60 backdrop-blur-sm flex items-center justify-center z-10", children: /* @__PURE__ */ jsx28("div", { className: "animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent" }) }) : /* @__PURE__ */ jsx28(
2910
- SvarGrid,
2911
- __spreadProps(__spreadValues({}, rest), {
2912
- data,
2913
- columns: resolvedColumns,
2914
- init,
2915
- selectedRows: selectionEnabled ? selectedIds : void 0
2916
- })
2917
- ) }) })
2907
+ children: /* @__PURE__ */ jsx28(WillowDark, { fonts, children: /* @__PURE__ */ jsx28("div", { className: "w-full h-full relative", children: rest.loading ? /* @__PURE__ */ jsx28("div", { className: "absolute inset-0 bg-background/60 backdrop-blur-sm flex items-center justify-center z-10", children: /* @__PURE__ */ jsx28("div", { className: "animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent" }) }) : /* @__PURE__ */ jsxs20(Fragment4, { children: [
2908
+ /* @__PURE__ */ jsx28(
2909
+ SvarGrid,
2910
+ __spreadProps(__spreadValues({}, rest), {
2911
+ data,
2912
+ columns: resolvedColumns,
2913
+ init,
2914
+ selectedRows: selectionEnabled ? selectedIds : void 0
2915
+ })
2916
+ ),
2917
+ !(data == null ? void 0 : data.length) && /* @__PURE__ */ jsxs20("div", { className: "absolute top-10 left-0 right-0 bottom-0 flex flex-col items-center justify-center pointer-events-none select-none", children: [
2918
+ /* @__PURE__ */ jsx28(Table2, { size: 26 }),
2919
+ /* @__PURE__ */ jsx28("p", { className: "text-sm font-medium text-muted-foreground mt-2", children: "No data found" })
2920
+ ] })
2921
+ ] }) }) })
2918
2922
  }
2919
2923
  )
2920
2924
  ] });
@@ -3082,7 +3086,7 @@ var pagination_default = Pagination;
3082
3086
  // src/components/custom/toolbar/index.tsx
3083
3087
  import { ChevronRight as ChevronRight4, X as X5 } from "lucide-react";
3084
3088
  import { useState as useState9, useRef as useRef6, useEffect as useEffect10 } from "react";
3085
- import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
3089
+ import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
3086
3090
  var SlideToolbar = ({
3087
3091
  items,
3088
3092
  children,
@@ -3109,7 +3113,7 @@ var SlideToolbar = ({
3109
3113
  const handleItem = (item) => {
3110
3114
  onAction == null ? void 0 : onAction(item.id);
3111
3115
  };
3112
- return /* @__PURE__ */ jsxs23(Fragment4, { children: [
3116
+ return /* @__PURE__ */ jsxs23(Fragment5, { children: [
3113
3117
  /* @__PURE__ */ jsx31("style", { children: `
3114
3118
  @keyframes bounceX {
3115
3119
  0%, 100% { transform: translateX(0px); }
@@ -3172,7 +3176,7 @@ var SlideToolbar = ({
3172
3176
  }
3173
3177
  )
3174
3178
  ] }),
3175
- /* @__PURE__ */ jsx31("div", { className: "flex-1 overflow-y-auto overflow-x-hidden py-2 scrollbar-none", children: resolvedItems ? /* @__PURE__ */ jsxs23(Fragment4, { children: [
3179
+ /* @__PURE__ */ jsx31("div", { className: "flex-1 overflow-y-auto overflow-x-hidden py-2 scrollbar-none", children: resolvedItems ? /* @__PURE__ */ jsxs23(Fragment5, { children: [
3176
3180
  /* @__PURE__ */ jsx31("p", { className: "px-4 pt-1 pb-2 text-[10px] font-semibold tracking-[0.16em] uppercase text-foreground/35", children: "Actions" }),
3177
3181
  /* @__PURE__ */ jsx31("nav", { className: "flex flex-col px-2", children: resolvedItems.map((item) => /* @__PURE__ */ jsxs23(
3178
3182
  "button",