@sia.soul/sia-react-ui 0.1.43 → 0.1.45
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/{chunk-ORLXJLLW.js → chunk-KXPNW4E6.js} +3 -3
- package/dist/{chunk-3Q3S6CDZ.js → chunk-NYJSSPIX.js} +16 -3
- package/dist/{chunk-LWVZEUGJ.js → chunk-QIXU7N4X.js} +1 -1
- package/dist/core.cjs +18 -5
- package/dist/core.js +2 -2
- package/dist/index.cjs +1712 -1515
- package/dist/index.css +12 -0
- package/dist/index.d.cts +18 -5
- package/dist/index.d.ts +18 -5
- package/dist/index.js +385 -201
- package/dist/select-date-range.cjs +16 -3
- package/dist/select-date-range.js +2 -2
- package/package.json +1 -1
|
@@ -1474,7 +1474,17 @@ function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
|
1474
1474
|
};
|
|
1475
1475
|
const scanTargets = () => {
|
|
1476
1476
|
scanFrame = 0;
|
|
1477
|
-
const
|
|
1477
|
+
const managedSelector = ".sia-table__viewport, [data-sia-native-scrollbar], .sia-scrollbar-track, .sia-floating-scrollbar-layer";
|
|
1478
|
+
const discovered = [];
|
|
1479
|
+
if (!targetRef) {
|
|
1480
|
+
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT, {
|
|
1481
|
+
acceptNode: (node) => node.matches(managedSelector) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
1482
|
+
});
|
|
1483
|
+
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
|
|
1484
|
+
if (node instanceof HTMLElement) discovered.push(node);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
const candidates = (targetRef ? [targetRef.current] : [document.scrollingElement, ...discovered]).filter((target) => target instanceof HTMLElement);
|
|
1478
1488
|
const nextTargets = /* @__PURE__ */ new Set();
|
|
1479
1489
|
candidates.forEach((target) => {
|
|
1480
1490
|
if (canScroll(target, "horizontal") || canScroll(target, "vertical")) {
|
|
@@ -1492,9 +1502,12 @@ function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
|
1492
1502
|
scanFrame = window.requestAnimationFrame(scanTargets);
|
|
1493
1503
|
};
|
|
1494
1504
|
const mutationObserver = new MutationObserver((mutations) => {
|
|
1495
|
-
if (mutations.some((mutation) =>
|
|
1505
|
+
if (mutations.some((mutation) => {
|
|
1506
|
+
const target = mutation.target instanceof Element ? mutation.target : mutation.target.parentElement;
|
|
1507
|
+
return target && !layer.contains(target) && !target.closest(".sia-table__viewport, [data-sia-native-scrollbar], .sia-scrollbar-track");
|
|
1508
|
+
})) scheduleScan();
|
|
1496
1509
|
});
|
|
1497
|
-
mutationObserver.observe(document.documentElement, { subtree: true, childList: true, attributes: true });
|
|
1510
|
+
mutationObserver.observe(document.documentElement, { subtree: true, childList: true, attributes: true, attributeFilter: ["class", "style", "hidden"] });
|
|
1498
1511
|
window.addEventListener("resize", scheduleScan);
|
|
1499
1512
|
window.addEventListener("scroll", scheduleUpdateAll, true);
|
|
1500
1513
|
scheduleScan();
|