@underverse-ui/underverse 1.0.29 → 1.0.30

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 206,
6
6
  "exports": [
package/dist/index.cjs CHANGED
@@ -19018,16 +19018,14 @@ var LoadingBar = ({
19018
19018
  // ../../components/ui/OverlayScrollbarProvider.tsx
19019
19019
  var import_react33 = require("react");
19020
19020
  var import_overlayscrollbars = require("overlayscrollbars");
19021
- var SCROLLABLE_SELECTOR = [
19021
+ var EXPLICIT_SCROLLABLE_SELECTOR = [".thin-scrollbar", ".scrollbar-thin", ".custom-scrollbar", "[data-os-scrollbar]"].join(", ");
19022
+ var GENERIC_SCROLLABLE_SELECTOR = [
19022
19023
  ".overflow-auto",
19023
19024
  ".overflow-x-auto",
19024
19025
  ".overflow-y-auto",
19025
19026
  ".overflow-scroll",
19026
19027
  ".overflow-x-scroll",
19027
- ".overflow-y-scroll",
19028
- ".thin-scrollbar",
19029
- ".scrollbar-thin",
19030
- ".custom-scrollbar"
19028
+ ".overflow-y-scroll"
19031
19029
  ].join(", ");
19032
19030
  var SCROLLBAR_OPTIONS = {
19033
19031
  scrollbars: {
@@ -19054,22 +19052,27 @@ function OverlayScrollbarProvider() {
19054
19052
  if (instances.has(element)) return;
19055
19053
  instances.set(element, (0, import_overlayscrollbars.OverlayScrollbars)(element, SCROLLBAR_OPTIONS));
19056
19054
  };
19057
- const collectCandidates = (root) => {
19055
+ const collectCandidates = (root, selector) => {
19058
19056
  const candidates = [];
19059
- if (root instanceof HTMLElement && root.matches(SCROLLABLE_SELECTOR)) {
19057
+ if (root instanceof HTMLElement && root.matches(selector)) {
19060
19058
  candidates.push(root);
19061
19059
  }
19062
19060
  if ("querySelectorAll" in root) {
19063
- root.querySelectorAll(SCROLLABLE_SELECTOR).forEach((element) => {
19061
+ root.querySelectorAll(selector).forEach((element) => {
19064
19062
  candidates.push(element);
19065
19063
  });
19066
19064
  }
19067
19065
  return candidates.filter((element, index) => candidates.indexOf(element) === index);
19068
19066
  };
19069
19067
  const scan = (root) => {
19070
- const candidates = collectCandidates(root).filter((element) => !shouldSkip(element));
19071
- const leafCandidates = candidates.filter((element) => !candidates.some((other) => other !== element && element.contains(other)));
19072
- leafCandidates.forEach(initElement);
19068
+ const explicitCandidates = collectCandidates(root, EXPLICIT_SCROLLABLE_SELECTOR).filter((element) => !shouldSkip(element));
19069
+ explicitCandidates.forEach(initElement);
19070
+ const genericCandidates = collectCandidates(root, GENERIC_SCROLLABLE_SELECTOR).filter((element) => !shouldSkip(element));
19071
+ const filteredGeneric = genericCandidates.filter(
19072
+ (element) => !explicitCandidates.some((explicit) => explicit === element || explicit.contains(element) || element.contains(explicit))
19073
+ );
19074
+ const leafGeneric = filteredGeneric.filter((element) => !filteredGeneric.some((other) => other !== element && element.contains(other)));
19075
+ leafGeneric.forEach(initElement);
19073
19076
  };
19074
19077
  const cleanup = () => {
19075
19078
  instances.forEach((instance, element) => {
@@ -20059,7 +20062,8 @@ function DataTable({
20059
20062
  children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
20060
20063
  "div",
20061
20064
  {
20062
- className: "thin-scrollbar w-full",
20065
+ className: "thin-scrollbar custom-scrollbar w-full",
20066
+ "data-os-scrollbar": true,
20063
20067
  style: stickyHeader ? {
20064
20068
  maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight,
20065
20069
  overflowY: "auto",