@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 +40 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
col.fixed === "right" &&
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
col.fixed
|
|
19459
|
-
|
|
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;
|