@underverse-ui/underverse 1.0.22 → 1.0.23

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.cjs CHANGED
@@ -19430,6 +19430,14 @@ function useStickyColumns(columns, visibleKeys) {
19430
19430
  }
19431
19431
  return positions;
19432
19432
  }, [leafColumns]);
19433
+ const { leftBoundaryKey, rightBoundaryKey } = import_react36.default.useMemo(() => {
19434
+ const leftFixed = leafColumns.filter((c) => c.fixed === "left");
19435
+ const rightFixed = leafColumns.filter((c) => c.fixed === "right");
19436
+ return {
19437
+ leftBoundaryKey: leftFixed.length > 0 ? leftFixed[leftFixed.length - 1].key : null,
19438
+ rightBoundaryKey: rightFixed.length > 0 ? rightFixed[0].key : null
19439
+ };
19440
+ }, [leafColumns]);
19433
19441
  const getStickyColumnStyle = import_react36.default.useCallback(
19434
19442
  (col) => {
19435
19443
  if (!col.fixed) return {};
@@ -19441,24 +19449,38 @@ function useStickyColumns(columns, visibleKeys) {
19441
19449
  },
19442
19450
  [stickyPositions]
19443
19451
  );
19444
- const getStickyHeaderClass = import_react36.default.useCallback((col) => {
19445
- if (!col.fixed) return "";
19446
- return cn(
19447
- "sticky",
19448
- col.fixed === "left" && "left-0 shadow-[2px_0_6px_-3px_rgba(0,0,0,0.08)]",
19449
- col.fixed === "right" && "right-0 shadow-[-2px_0_6px_-3px_rgba(0,0,0,0.08)]",
19450
- "z-50 bg-muted!"
19451
- );
19452
- }, []);
19453
- const getStickyCellClass = import_react36.default.useCallback((col, isStripedRow) => {
19454
- if (!col.fixed) return "";
19455
- return cn(
19456
- "sticky z-10",
19457
- col.fixed === "left" && "left-0 shadow-[2px_0_6px_-3px_rgba(0,0,0,0.08)]",
19458
- col.fixed === "right" && "right-0 shadow-[-2px_0_6px_-3px_rgba(0,0,0,0.08)]",
19459
- isStripedRow ? "bg-(--surface-1)!" : "bg-(--surface-0)!"
19460
- );
19461
- }, []);
19452
+ const getBoundaryShadowClass = import_react36.default.useCallback(
19453
+ (col) => {
19454
+ if (col.fixed === "left" && col.key === leftBoundaryKey) {
19455
+ return "border-r border-border/80 shadow-[10px_0_16px_-10px_rgba(0,0,0,0.55)]";
19456
+ }
19457
+ if (col.fixed === "right" && col.key === rightBoundaryKey) {
19458
+ return "border-l border-border/80 shadow-[-10px_0_16px_-10px_rgba(0,0,0,0.55)]";
19459
+ }
19460
+ return "";
19461
+ },
19462
+ [leftBoundaryKey, rightBoundaryKey]
19463
+ );
19464
+ const getStickyHeaderClass = import_react36.default.useCallback(
19465
+ (col) => {
19466
+ if (!col.fixed) return "";
19467
+ return cn("sticky", col.fixed === "left" && "left-0", col.fixed === "right" && "right-0", getBoundaryShadowClass(col), "z-50 !bg-muted");
19468
+ },
19469
+ [getBoundaryShadowClass]
19470
+ );
19471
+ const getStickyCellClass = import_react36.default.useCallback(
19472
+ (col, isStripedRow) => {
19473
+ if (!col.fixed) return "";
19474
+ return cn(
19475
+ "sticky z-10",
19476
+ col.fixed === "left" && "left-0",
19477
+ col.fixed === "right" && "right-0",
19478
+ getBoundaryShadowClass(col),
19479
+ isStripedRow ? "!bg-surface-1" : "!bg-surface-0"
19480
+ );
19481
+ },
19482
+ [getBoundaryShadowClass]
19483
+ );
19462
19484
  const getStickyHeaderCellStyle = import_react36.default.useCallback(
19463
19485
  (headerCell) => {
19464
19486
  const col = headerCell.column;