@underverse-ui/underverse 1.0.109 → 1.0.110

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.109",
3
+ "version": "1.0.110",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 230,
6
6
  "exports": [
package/dist/index.cjs CHANGED
@@ -7364,6 +7364,20 @@ var getOptionDisabled = (option) => {
7364
7364
  var findOptionByValue = (options, value) => {
7365
7365
  return options.find((opt) => getOptionValue(opt) === value);
7366
7366
  };
7367
+ var comboboxScrollClassName = [
7368
+ "scrollbar-thin",
7369
+ "[scrollbar-width:thin]",
7370
+ "[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_28%,transparent)_transparent]",
7371
+ "[&::-webkit-scrollbar]:w-2",
7372
+ "[&::-webkit-scrollbar-track]:bg-transparent",
7373
+ "[&::-webkit-scrollbar-thumb]:rounded-full",
7374
+ "[&::-webkit-scrollbar-thumb]:border-2",
7375
+ "[&::-webkit-scrollbar-thumb]:border-solid",
7376
+ "[&::-webkit-scrollbar-thumb]:border-transparent",
7377
+ "[&::-webkit-scrollbar-thumb]:bg-clip-padding",
7378
+ "[&::-webkit-scrollbar-thumb]:bg-muted-foreground/25",
7379
+ "[&::-webkit-scrollbar-thumb:hover]:bg-muted-foreground/45"
7380
+ ].join(" ");
7367
7381
  var Combobox = ({
7368
7382
  id,
7369
7383
  options,
@@ -7392,7 +7406,7 @@ var Combobox = ({
7392
7406
  selectedOption: selectedOptionProp,
7393
7407
  error,
7394
7408
  helperText,
7395
- useOverlayScrollbar = false,
7409
+ useOverlayScrollbar = true,
7396
7410
  virtualized = false,
7397
7411
  estimatedItemHeight = 44,
7398
7412
  overscan = 8,
@@ -7411,7 +7425,7 @@ var Combobox = ({
7411
7425
  useShadCNAnimations();
7412
7426
  const inputRef = React24.useRef(null);
7413
7427
  const optionsViewportRef = React24.useRef(null);
7414
- useOverlayScrollbarTarget(optionsViewportRef, { enabled: useOverlayScrollbar });
7428
+ useOverlayScrollbarTarget(optionsViewportRef, { enabled: useOverlayScrollbar && !virtualized });
7415
7429
  const autoId = (0, import_react15.useId)();
7416
7430
  const resolvedId = id ? String(id) : `combobox-${autoId}`;
7417
7431
  const labelId = label ? `${resolvedId}-label` : void 0;
@@ -7678,7 +7692,7 @@ var Combobox = ({
7678
7692
  id: `${resolvedId}-listbox`,
7679
7693
  role: "listbox",
7680
7694
  "aria-labelledby": labelId,
7681
- className: "overflow-y-auto overscroll-contain",
7695
+ className: cn("overflow-y-auto overscroll-contain", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
7682
7696
  style: { maxHeight },
7683
7697
  children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn(size === "sm" ? "p-1" : size === "lg" ? "p-2" : "p-1.5"), children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
7684
7698
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-10 h-10 rounded-full border-2 border-primary/20 border-t-primary animate-spin" }) }),
@@ -15684,6 +15698,20 @@ var import_react20 = require("react");
15684
15698
  var import_react_virtual2 = require("@tanstack/react-virtual");
15685
15699
  var import_lucide_react24 = require("lucide-react");
15686
15700
  var import_jsx_runtime45 = require("react/jsx-runtime");
15701
+ var comboboxScrollClassName2 = [
15702
+ "scrollbar-thin",
15703
+ "[scrollbar-width:thin]",
15704
+ "[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_28%,transparent)_transparent]",
15705
+ "[&::-webkit-scrollbar]:w-2",
15706
+ "[&::-webkit-scrollbar-track]:bg-transparent",
15707
+ "[&::-webkit-scrollbar-thumb]:rounded-full",
15708
+ "[&::-webkit-scrollbar-thumb]:border-2",
15709
+ "[&::-webkit-scrollbar-thumb]:border-solid",
15710
+ "[&::-webkit-scrollbar-thumb]:border-transparent",
15711
+ "[&::-webkit-scrollbar-thumb]:bg-clip-padding",
15712
+ "[&::-webkit-scrollbar-thumb]:bg-muted-foreground/25",
15713
+ "[&::-webkit-scrollbar-thumb:hover]:bg-muted-foreground/45"
15714
+ ].join(" ");
15687
15715
  var MultiCombobox = ({
15688
15716
  id,
15689
15717
  options,
@@ -15716,7 +15744,7 @@ var MultiCombobox = ({
15716
15744
  error,
15717
15745
  helperText,
15718
15746
  maxTagsVisible = 3,
15719
- useOverlayScrollbar = false,
15747
+ useOverlayScrollbar = true,
15720
15748
  virtualized = false,
15721
15749
  estimatedItemHeight = 44,
15722
15750
  overscan = 8,
@@ -15735,7 +15763,7 @@ var MultiCombobox = ({
15735
15763
  const inputRef = React39.useRef(null);
15736
15764
  const listRef = React39.useRef([]);
15737
15765
  const optionsListRef = React39.useRef(null);
15738
- useOverlayScrollbarTarget(optionsListRef, { enabled: useOverlayScrollbar });
15766
+ useOverlayScrollbarTarget(optionsListRef, { enabled: useOverlayScrollbar && !virtualized });
15739
15767
  const triggerRef = React39.useRef(null);
15740
15768
  useShadCNAnimations();
15741
15769
  const normalizedOptions = React39.useMemo(
@@ -16038,7 +16066,11 @@ var MultiCombobox = ({
16038
16066
  "aria-multiselectable": "true",
16039
16067
  ref: optionsListRef,
16040
16068
  style: { maxHeight },
16041
- className: cn("overflow-y-auto p-1.5", size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"),
16069
+ className: cn(
16070
+ "overflow-y-auto p-1.5",
16071
+ (!useOverlayScrollbar || virtualized) && comboboxScrollClassName2,
16072
+ size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"
16073
+ ),
16042
16074
  children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
16043
16075
  /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative", children: [
16044
16076
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react24.Loader2, { className: "h-8 w-8 animate-spin text-primary" }),