@bigbinary/neeto-atoms 1.0.25 → 1.0.27

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.
@@ -9,6 +9,7 @@ import { Spinner } from './primitives/Spinner.js';
9
9
  import { c as createLucideIcon } from './createLucideIcon-C8ycilSN.js';
10
10
  import { Button } from './primitives/Button.js';
11
11
  import { Pagination, PaginationContent, PaginationItem, PaginationPrevious, PaginationEllipsis, PaginationLink, PaginationNext } from './primitives/Pagination.js';
12
+ import { B as Button$1 } from './Button-Q7MPG6ph.js';
12
13
  import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from './primitives/DropdownMenu.js';
13
14
  import { E as Ellipsis } from './ellipsis-lb8Ws6br.js';
14
15
  import { C as Check } from './check-Cpkv29p1.js';
@@ -3303,7 +3304,7 @@ const useTablePagination = ({ totalCount = 0, pageSize = DEFAULT_PAGE_SIZE, curr
3303
3304
 
3304
3305
  const SelectionCheckbox = ({ checked, onCheckedChange, ariaLabel, }) => {
3305
3306
  const { t } = useTranslation();
3306
- return (jsx("div", { className: "flex items-center justify-center", children: jsx(Checkbox, { checked: checked, onCheckedChange: onCheckedChange, "aria-label": ariaLabel ?? t("neetoatoms.dataTable.selectRow", "Select row") }) }));
3307
+ return (jsx("div", { className: "flex w-full items-center justify-center", children: jsx(Checkbox, { checked: checked, onCheckedChange: onCheckedChange, "aria-label": ariaLabel ?? t("neetoatoms.dataTable.selectRow", "Select row") }) }));
3307
3308
  };
3308
3309
 
3309
3310
  const useTableSelection = ({ enableRowSelection, selectedRowKeys, onRowSelect, data, getRowId, }) => {
@@ -3353,7 +3354,7 @@ const useTableSelection = ({ enableRowSelection, selectedRowKeys, onRowSelect, d
3353
3354
  onCheckedChange: value => row.toggleSelected(!!value),
3354
3355
  ariaLabel: "Select row",
3355
3356
  }),
3356
- size: 40,
3357
+ size: 56,
3357
3358
  enableSorting: false,
3358
3359
  enableResizing: false,
3359
3360
  };
@@ -3534,11 +3535,11 @@ const ResizeHandle = ({ header }) => {
3534
3535
  : "bg-border opacity-0 group-hover/head:opacity-100") }));
3535
3536
  };
3536
3537
 
3537
- const BulkSelectCallout = ({ bulkSelectAllRowsProps, isAllPageRowsSelected, isBulkAllSelected, }) => {
3538
- if (!isAllPageRowsSelected)
3538
+ const BulkSelectCallout = ({ bulkSelectAllRowsProps, isAllPageRowsSelected, isBulkAllSelected, onBulkSelectAll, onClearBulkSelection, }) => {
3539
+ if (!isAllPageRowsSelected && !isBulkAllSelected)
3539
3540
  return null;
3540
- const { selectAllRowMessage, selectAllRowButtonLabel, setBulkSelectedAllRows, allRowsSelectedMessage, clearSelectionButtonLabel, } = bulkSelectAllRowsProps;
3541
- return (jsx("div", { className: "mb-2 flex items-center justify-center gap-1 rounded-lg bg-primary/10 px-4 py-1.5 text-sm text-primary", children: isBulkAllSelected ? (jsxs(Fragment, { children: [jsx("span", { children: allRowsSelectedMessage ?? selectAllRowMessage }), clearSelectionButtonLabel && (jsx(Button, { variant: "link", onClick: () => setBulkSelectedAllRows(false), children: clearSelectionButtonLabel }))] })) : (jsxs(Fragment, { children: [jsx("span", { children: selectAllRowMessage }), jsx(Button, { variant: "link", onClick: () => setBulkSelectedAllRows(true), children: selectAllRowButtonLabel })] })) }));
3541
+ const { selectAllRowMessage, selectAllRowButtonLabel, allRowsSelectedMessage, clearSelectionButtonLabel, } = bulkSelectAllRowsProps;
3542
+ return (jsx("div", { className: "mb-2 flex items-center justify-center gap-1 rounded-sm bg-primary/10 px-4 py-1.5 text-sm text-primary", children: isBulkAllSelected ? (jsxs(Fragment, { children: [jsx("span", { children: allRowsSelectedMessage ?? selectAllRowMessage }), jsx(Button, { variant: "link", onClick: onClearBulkSelection, children: clearSelectionButtonLabel ?? "Clear selection" })] })) : (jsxs(Fragment, { children: [jsx("span", { children: selectAllRowMessage }), jsx(Button, { variant: "link", onClick: onBulkSelectAll, children: selectAllRowButtonLabel })] })) }));
3542
3543
  };
3543
3544
 
3544
3545
  const DataTablePagination = ({ currentPage, pageCount, onPageChange, }) => {
@@ -3580,13 +3581,13 @@ const HeaderCellMenu = ({ column, enableAddColumn, enableColumnFreeze, isColumnP
3580
3581
  moreActions.length > 0;
3581
3582
  if (!hasAnyAction)
3582
3583
  return null;
3583
- return (jsx("div", { onClick: e => e.stopPropagation(), children: jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button, { variant: "ghost", size: "icon", className: "ml-1 size-7 shrink-0 text-muted-foreground data-[state=open]:bg-muted", "data-testid": "column-menu-button", children: jsx(Ellipsis, { className: "size-4" }) }) }), jsxs(DropdownMenuContent, { align: "start", className: "w-48", children: [isSortable && (jsxs(Fragment, { children: [jsxs(DropdownMenuItem, { "data-testid": "ascending-column-menu-button", onClick: () => onSort?.(column.id, false), children: [jsx(ArrowUp, { className: "mr-2 size-4" }), "Ascending", currentSort === "asc" && (jsx(Check, { className: "ml-auto size-4 text-primary" }))] }), jsxs(DropdownMenuItem, { "data-testid": "descending-column-menu-button", onClick: () => onSort?.(column.id, true), children: [jsx(ArrowDown, { className: "mr-2 size-4" }), "Descending", currentSort === "desc" && (jsx(Check, { className: "ml-auto size-4 text-primary" }))] })] })), enableAddColumn && (jsxs(Fragment, { children: [jsxs(DropdownMenuItem, { "data-testid": "insert-right-column-menu-button", onClick: () => onAddColumn?.(columnIndex + 1), children: [jsx(Plus, { className: "mr-2 size-4" }), "Insert column right"] }), jsxs(DropdownMenuItem, { "data-testid": "insert-left-column-menu-button", onClick: () => onAddColumn?.(columnIndex), children: [jsx(Plus, { className: "mr-2 size-4" }), "Insert column left"] })] })), isHidable && onHideColumn && (jsx(Fragment, { children: jsxs(DropdownMenuItem, { "data-testid": "hide-column-menu-button", onClick: () => onHideColumn(column.id), children: [jsx(EyeOff, { className: "mr-2 size-4" }), "Hide column"] }) })), isDeletable && onDeleteColumn && (jsxs(DropdownMenuItem, { "data-testid": "delete-column-menu-button", onClick: () => onDeleteColumn(column.id), children: [jsx(Trash2, { className: "mr-2 size-4" }), "Delete column"] })), enableColumnFreeze && onTogglePin && (jsx(Fragment, { children: jsxs(DropdownMenuItem, { "data-testid": "freeze-unfreeze-column-menu-button", onClick: () => onTogglePin(column.id), children: [jsx(Pin, { className: "mr-2 size-4" }), isColumnPinned ? "Unfreeze column" : "Freeze column"] }) })), onMoveColumn && (canMoveLeft || canMoveRight) && (jsxs(Fragment, { children: [canMoveLeft && (jsxs(DropdownMenuItem, { "data-testid": "move-column-left-menu-button", onClick: () => onMoveColumn(column.id, -1), children: [jsx(MoveLeft, { className: "mr-2 size-4" }), "Move column left"] })), canMoveRight && (jsxs(DropdownMenuItem, { "data-testid": "move-column-right-menu-button", onClick: () => onMoveColumn(column.id, 1), children: [jsx(MoveRight, { className: "mr-2 size-4" }), "Move column right"] }))] })), moreActions.length > 0 && (jsx(Fragment, { children: moreActions.map(action => {
3584
+ return (jsx("div", { onClick: e => e.stopPropagation(), children: jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "icon", icon: Ellipsis, "data-testid": "column-menu-button" }) }), jsxs(DropdownMenuContent, { align: "start", className: "w-48", children: [isSortable && (jsxs(Fragment, { children: [jsxs(DropdownMenuItem, { "data-testid": "ascending-column-menu-button", onClick: () => onSort?.(column.id, false), children: [jsx(ArrowUp, { className: "mr-2 size-4" }), "Ascending", currentSort === "asc" && (jsx(Check, { className: "ml-auto size-4 text-primary" }))] }), jsxs(DropdownMenuItem, { "data-testid": "descending-column-menu-button", onClick: () => onSort?.(column.id, true), children: [jsx(ArrowDown, { className: "mr-2 size-4" }), "Descending", currentSort === "desc" && (jsx(Check, { className: "ml-auto size-4 text-primary" }))] })] })), enableAddColumn && (jsxs(Fragment, { children: [jsxs(DropdownMenuItem, { "data-testid": "insert-right-column-menu-button", onClick: () => onAddColumn?.(columnIndex + 1), children: [jsx(Plus, { className: "mr-2 size-4" }), "Insert column right"] }), jsxs(DropdownMenuItem, { "data-testid": "insert-left-column-menu-button", onClick: () => onAddColumn?.(columnIndex), children: [jsx(Plus, { className: "mr-2 size-4" }), "Insert column left"] })] })), isHidable && onHideColumn && (jsx(Fragment, { children: jsxs(DropdownMenuItem, { "data-testid": "hide-column-menu-button", onClick: () => onHideColumn(column.id), children: [jsx(EyeOff, { className: "mr-2 size-4" }), "Hide column"] }) })), isDeletable && onDeleteColumn && (jsxs(DropdownMenuItem, { "data-testid": "delete-column-menu-button", onClick: () => onDeleteColumn(column.id), children: [jsx(Trash2, { className: "mr-2 size-4" }), "Delete column"] })), enableColumnFreeze && onTogglePin && (jsx(Fragment, { children: jsxs(DropdownMenuItem, { "data-testid": "freeze-unfreeze-column-menu-button", onClick: () => onTogglePin(column.id), children: [jsx(Pin, { className: "mr-2 size-4" }), isColumnPinned ? "Unfreeze column" : "Freeze column"] }) })), onMoveColumn && (canMoveLeft || canMoveRight) && (jsxs(Fragment, { children: [canMoveLeft && (jsxs(DropdownMenuItem, { "data-testid": "move-column-left-menu-button", onClick: () => onMoveColumn(column.id, -1), children: [jsx(MoveLeft, { className: "mr-2 size-4" }), "Move column left"] })), canMoveRight && (jsxs(DropdownMenuItem, { "data-testid": "move-column-right-menu-button", onClick: () => onMoveColumn(column.id, 1), children: [jsx(MoveRight, { className: "mr-2 size-4" }), "Move column right"] }))] })), moreActions.length > 0 && (jsx(Fragment, { children: moreActions.map(action => {
3584
3585
  const ActionIcon = action.icon;
3585
3586
  return (jsxs(DropdownMenuItem, { "data-testid": `${action.type}-column-menu-button`, onClick: () => onMoreActionClick?.(action.type, column.id), children: [ActionIcon && jsx(ActionIcon, { className: "mr-2 size-4" }), action.label] }, action.type));
3586
3587
  }) }))] })] }) }));
3587
3588
  };
3588
3589
 
3589
- const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp, onSortingChange: onSortingChangeProp, enableSorting = true, enableURLSort = true, totalCount, pageSize = DEFAULT_PAGE_SIZE, currentPage: currentPageProp, onPageChange: onPageChangeProp, enableURLPagination = true, enableRowSelection: enableRowSelectionProp, selectedRowKeys, onRowSelect, bulkSelectAllRowsProps, enableColumnResize = true, enableColumnFreeze = true, columnPinning: columnPinningProp, onColumnPinningChange: onColumnPinningChangeProp, localStorageKeyPrefix, columnVisibility: columnVisibilityProp, onColumnVisibilityChange: onColumnVisibilityChangeProp, onColumnHide: onColumnHideProp, enableColumnReorder = false, columnOrder: columnOrderProp, onColumnOrderChange: onColumnOrderChangeProp, enableAddColumn = false, onColumnAdd, onColumnDelete, onColumnUpdate, onMoreActionClick, enableHeaderMenu, loading = false, bordered = true, className, emptyMessage, onRowClick, allowRowClick = true, }) => {
3590
+ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp, onSortingChange: onSortingChangeProp, enableSorting = false, enableURLSort = true, totalCount, pageSize = DEFAULT_PAGE_SIZE, currentPage: currentPageProp, onPageChange: onPageChangeProp, enableURLPagination = true, enableRowSelection: enableRowSelectionProp, selectedRowKeys, onRowSelect, bulkSelectAllRowsProps, enableColumnResize = true, enableColumnFreeze = true, columnPinning: columnPinningProp, onColumnPinningChange: onColumnPinningChangeProp, localStorageKeyPrefix, columnVisibility: columnVisibilityProp, onColumnVisibilityChange: onColumnVisibilityChangeProp, onColumnHide: onColumnHideProp, enableColumnReorder = false, columnOrder: columnOrderProp, onColumnOrderChange: onColumnOrderChangeProp, enableAddColumn = false, onColumnAdd, onColumnDelete, onColumnUpdate, onMoreActionClick, enableHeaderMenu, loading = false, bordered = true, className, emptyMessage, onRowClick, allowRowClick = true, }) => {
3590
3591
  const getRowId = useMemo(() => getRowIdProp ??
3591
3592
  ((row) => row.id), [getRowIdProp]);
3592
3593
  const { sorting, onSortingChange } = useTableSort({
@@ -3601,13 +3602,21 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
3601
3602
  onPageChange: onPageChangeProp,
3602
3603
  enableURLPagination,
3603
3604
  });
3604
- const { rowSelection, onRowSelectionChange, selectionColumn, enableRowSelection, } = useTableSelection({
3605
+ const { rowSelection, onRowSelectionChange: originalOnRowSelectionChange, selectionColumn, enableRowSelection, } = useTableSelection({
3605
3606
  enableRowSelection: enableRowSelectionProp,
3606
3607
  selectedRowKeys,
3607
3608
  onRowSelect,
3608
3609
  data,
3609
3610
  getRowId,
3610
3611
  });
3612
+ // Wrap selection change to detect manual deselection while in bulk mode
3613
+ const onRowSelectionChange = useCallback((updaterOrValue) => {
3614
+ if (bulkSelectedRef.current && !isAutoSelectingRef.current) {
3615
+ setBulkSelectedAllRowsInternal(false);
3616
+ bulkSelectAllRowsProps?.setBulkSelectedAllRows(false);
3617
+ }
3618
+ originalOnRowSelectionChange(updaterOrValue);
3619
+ }, [originalOnRowSelectionChange, bulkSelectAllRowsProps]);
3611
3620
  const { columnPinning, onColumnPinningChange, toggleColumnPin, isColumnPinned, } = useColumnPinning({
3612
3621
  enabled: enableColumnFreeze,
3613
3622
  columnPinning: columnPinningProp,
@@ -3680,7 +3689,63 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
3680
3689
  onColumnVisibilityChange,
3681
3690
  onColumnOrderChange,
3682
3691
  });
3683
- const isBulkAllSelected = !!bulkSelectAllRowsProps && table.getIsAllPageRowsSelected();
3692
+ const [bulkSelectedAllRows, setBulkSelectedAllRowsInternal] = useState(false);
3693
+ const isAutoSelectingRef = useRef(false);
3694
+ const bulkSelectedRef = useRef(false);
3695
+ bulkSelectedRef.current = bulkSelectedAllRows;
3696
+ // Auto-select all page rows when in bulk mode (handles page navigation)
3697
+ useEffect(() => {
3698
+ if (bulkSelectedAllRows) {
3699
+ isAutoSelectingRef.current = true;
3700
+ table.toggleAllPageRowsSelected(true);
3701
+ // Reset flag after React processes the state update
3702
+ requestAnimationFrame(() => {
3703
+ isAutoSelectingRef.current = false;
3704
+ });
3705
+ }
3706
+ }, [bulkSelectedAllRows, data]);
3707
+ const isAllPageRowsSelected = table.getIsAllPageRowsSelected();
3708
+ const showSelectAllCallout = !!bulkSelectAllRowsProps &&
3709
+ isAllPageRowsSelected &&
3710
+ pageCount > 1 &&
3711
+ !bulkSelectedAllRows;
3712
+ const showAllSelectedCallout = !!bulkSelectAllRowsProps && bulkSelectedAllRows;
3713
+ const handleBulkSelectAll = () => {
3714
+ setBulkSelectedAllRowsInternal(true);
3715
+ bulkSelectAllRowsProps?.setBulkSelectedAllRows(true);
3716
+ };
3717
+ const handleClearBulkSelection = () => {
3718
+ setBulkSelectedAllRowsInternal(false);
3719
+ bulkSelectAllRowsProps?.setBulkSelectedAllRows(false);
3720
+ table.toggleAllPageRowsSelected(false);
3721
+ onRowSelect?.([], []);
3722
+ };
3723
+ const scrollContainerRef = useRef(null);
3724
+ const [scrollState, setScrollState] = useState({
3725
+ scrolledStart: false,
3726
+ scrolledEnd: false,
3727
+ });
3728
+ useEffect(() => {
3729
+ const el = scrollContainerRef.current;
3730
+ if (!el)
3731
+ return;
3732
+ const update = () => {
3733
+ const { scrollLeft, scrollWidth, clientWidth } = el;
3734
+ const maxScroll = scrollWidth - clientWidth;
3735
+ setScrollState({
3736
+ scrolledStart: scrollLeft > 0,
3737
+ scrolledEnd: scrollLeft < maxScroll - 1,
3738
+ });
3739
+ };
3740
+ update();
3741
+ el.addEventListener("scroll", update, { passive: true });
3742
+ const resizeObserver = new ResizeObserver(update);
3743
+ resizeObserver.observe(el);
3744
+ return () => {
3745
+ el.removeEventListener("scroll", update);
3746
+ resizeObserver.disconnect();
3747
+ };
3748
+ }, []);
3684
3749
  const handleSort = (columnId, desc) => {
3685
3750
  const isSameSort = sorting.length > 0 &&
3686
3751
  sorting[0].id === columnId &&
@@ -3692,8 +3757,7 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
3692
3757
  onSortingChange([{ id: columnId, desc }]);
3693
3758
  }
3694
3759
  };
3695
- return (jsxs("div", { className: cn("relative flex min-h-0 w-full flex-col", className), children: [loading && jsx(LoadingOverlay, {}), bulkSelectAllRowsProps &&
3696
- (data.length !== totalCount || isBulkAllSelected) && (jsx(BulkSelectCallout, { bulkSelectAllRowsProps: bulkSelectAllRowsProps, isAllPageRowsSelected: table.getIsAllPageRowsSelected(), isBulkAllSelected: isBulkAllSelected })), jsx("div", { className: cn("min-h-0 flex-1 overflow-auto", bordered && "rounded-lg border"), children: jsxs(Table, { children: [jsx(TableHeader, { className: "sticky top-0 z-20 bg-muted", children: table.getHeaderGroups().map(headerGroup => {
3760
+ return (jsxs("div", { className: cn("relative flex min-h-0 w-full flex-col", className), children: [loading && jsx(LoadingOverlay, {}), (showSelectAllCallout || showAllSelectedCallout) && (jsx(BulkSelectCallout, { bulkSelectAllRowsProps: bulkSelectAllRowsProps, isAllPageRowsSelected: isAllPageRowsSelected, isBulkAllSelected: bulkSelectedAllRows, onBulkSelectAll: handleBulkSelectAll, onClearBulkSelection: handleClearBulkSelection })), jsx("div", { ref: scrollContainerRef, "data-scrolled-start": scrollState.scrolledStart || undefined, "data-scrolled-end": scrollState.scrolledEnd || undefined, className: cn("group/scroll min-h-0 flex-1 overflow-auto", bordered && "rounded-lg border"), children: jsxs(Table, { children: [jsx(TableHeader, { className: "sticky top-0 z-20 bg-muted", children: table.getHeaderGroups().map(headerGroup => {
3697
3761
  const dataHeaders = headerGroup.headers.filter(h => h.column.id !== "_selection");
3698
3762
  const totalDataSize = dataHeaders.reduce((sum, h) => sum + h.getSize(), 0);
3699
3763
  return (jsx(TableRow, { className: "hover:bg-muted", children: headerGroup.headers.map((header, headerIndex) => {
@@ -3701,7 +3765,9 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
3701
3765
  const isSelectionCol = header.column.id === "_selection";
3702
3766
  const columnIndexInData = dataHeaders.findIndex(h => h.id === header.id);
3703
3767
  return (jsxs(TableHead, { className: cn("group/head relative", header.column.getCanSort() &&
3704
- "cursor-pointer select-none", isPinned && "sticky z-10 bg-muted"), style: {
3768
+ "cursor-pointer select-none", isSelectionCol && "!pe-2", isPinned && "sticky z-10 bg-muted", isPinned === "left" &&
3769
+ "after:pointer-events-none after:absolute after:inset-y-0 after:-right-2 after:w-2 after:bg-gradient-to-r after:from-black/6 after:to-transparent after:opacity-0 after:transition-opacity after:duration-200 after:content-[''] group-data-[scrolled-start]/scroll:after:opacity-100 dark:after:from-white/6", isPinned === "right" &&
3770
+ "before:pointer-events-none before:absolute before:inset-y-0 before:-left-2 before:w-2 before:bg-gradient-to-l before:from-black/6 before:to-transparent before:opacity-0 before:transition-opacity before:duration-200 before:content-[''] group-data-[scrolled-end]/scroll:before:opacity-100 dark:before:from-white/6"), style: {
3705
3771
  width: selectionColumn && isSelectionCol
3706
3772
  ? 0
3707
3773
  : selectionColumn
@@ -3726,13 +3792,15 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
3726
3792
  ? (colId, dir) => moveColumn(colId, dir)
3727
3793
  : undefined, onMoreActionClick: onMoreActionClick }))] })), enableColumnResize && jsx(ResizeHandle, { header: header })] }, header.id));
3728
3794
  }) }, headerGroup.id));
3729
- }) }), jsx(TableBody, { className: loading ? "opacity-50" : undefined, children: table.getRowModel().rows.length > 0 ? (table.getRowModel().rows.map(row => (jsx(TableRow, { "data-state": row.getIsSelected() ? "selected" : undefined, className: cn("group", allowRowClick && onRowClick && "cursor-pointer"), onClick: allowRowClick && onRowClick
3795
+ }) }), jsx(TableBody, { className: loading ? "opacity-50" : undefined, children: table.getRowModel().rows.length > 0 ? (table.getRowModel().rows.map(row => (jsx(TableRow, { "data-state": row.getIsSelected() ? "selected" : undefined, className: cn("group data-[state=selected]:bg-info", allowRowClick && onRowClick && "cursor-pointer"), onClick: allowRowClick && onRowClick
3730
3796
  ? event => onRowClick(event, row.original, row.index)
3731
3797
  : undefined, children: row.getVisibleCells().map(cell => {
3732
3798
  const isPinned = cell.column.getIsPinned();
3733
3799
  const isSelCell = cell.column.id === "_selection";
3734
- return (jsx(TableCell, { className: cn(isPinned &&
3735
- "sticky z-10 bg-background group-data-[state=selected]:bg-muted"), style: {
3800
+ return (jsx(TableCell, { className: cn(isSelCell && "!pe-2", isPinned &&
3801
+ "sticky z-10 bg-background group-data-[state=selected]:bg-info", isPinned === "left" &&
3802
+ "after:pointer-events-none after:absolute after:inset-y-0 after:-right-2 after:w-2 after:bg-gradient-to-r after:from-black/6 after:to-transparent after:opacity-0 after:transition-opacity after:duration-200 after:content-[''] group-data-[scrolled-start]/scroll:after:opacity-100 dark:after:from-white/6", isPinned === "right" &&
3803
+ "before:pointer-events-none before:absolute before:inset-y-0 before:-left-2 before:w-2 before:bg-gradient-to-l before:from-black/6 before:to-transparent before:opacity-0 before:transition-opacity before:duration-200 before:content-[''] group-data-[scrolled-end]/scroll:before:opacity-100 dark:before:from-white/6"), style: {
3736
3804
  width: selectionColumn && isSelCell
3737
3805
  ? 0
3738
3806
  : cell.column.getSize(),
@@ -3754,4 +3822,4 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
3754
3822
  };
3755
3823
 
3756
3824
  export { DataTable as D, useColumnPinning as a, useColumnVisibility as b, useTablePagination as c, useTableSelection as d, useTableSort as e, useColumnOrdering as u };
3757
- //# sourceMappingURL=DataTable-Dre7vc3w.js.map
3825
+ //# sourceMappingURL=DataTable-DbSFUmLd.js.map