@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.
- package/api-reference.json +1 -1
- package/dist/index.cjs +38 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +38 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1588,7 +1588,7 @@ interface ComboboxProps {
|
|
|
1588
1588
|
selectedOption?: ComboboxOption;
|
|
1589
1589
|
error?: string;
|
|
1590
1590
|
helperText?: string;
|
|
1591
|
-
/** Enable OverlayScrollbars on dropdown options list. Default:
|
|
1591
|
+
/** Enable OverlayScrollbars on dropdown options list. Default: true when not virtualized */
|
|
1592
1592
|
useOverlayScrollbar?: boolean;
|
|
1593
1593
|
/** Virtualize large flat option lists. Grouped lists fall back to normal rendering. Default: false */
|
|
1594
1594
|
virtualized?: boolean;
|
|
@@ -1654,7 +1654,7 @@ interface MultiComboboxProps {
|
|
|
1654
1654
|
error?: string;
|
|
1655
1655
|
helperText?: string;
|
|
1656
1656
|
maxTagsVisible?: number;
|
|
1657
|
-
/** Enable OverlayScrollbars on dropdown options list. Default:
|
|
1657
|
+
/** Enable OverlayScrollbars on dropdown options list. Default: true when not virtualized */
|
|
1658
1658
|
useOverlayScrollbar?: boolean;
|
|
1659
1659
|
/** Virtualize large flat option lists. Grouped lists fall back to normal rendering. Default: false */
|
|
1660
1660
|
virtualized?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1588,7 +1588,7 @@ interface ComboboxProps {
|
|
|
1588
1588
|
selectedOption?: ComboboxOption;
|
|
1589
1589
|
error?: string;
|
|
1590
1590
|
helperText?: string;
|
|
1591
|
-
/** Enable OverlayScrollbars on dropdown options list. Default:
|
|
1591
|
+
/** Enable OverlayScrollbars on dropdown options list. Default: true when not virtualized */
|
|
1592
1592
|
useOverlayScrollbar?: boolean;
|
|
1593
1593
|
/** Virtualize large flat option lists. Grouped lists fall back to normal rendering. Default: false */
|
|
1594
1594
|
virtualized?: boolean;
|
|
@@ -1654,7 +1654,7 @@ interface MultiComboboxProps {
|
|
|
1654
1654
|
error?: string;
|
|
1655
1655
|
helperText?: string;
|
|
1656
1656
|
maxTagsVisible?: number;
|
|
1657
|
-
/** Enable OverlayScrollbars on dropdown options list. Default:
|
|
1657
|
+
/** Enable OverlayScrollbars on dropdown options list. Default: true when not virtualized */
|
|
1658
1658
|
useOverlayScrollbar?: boolean;
|
|
1659
1659
|
/** Virtualize large flat option lists. Grouped lists fall back to normal rendering. Default: false */
|
|
1660
1660
|
virtualized?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -7179,6 +7179,20 @@ var getOptionDisabled = (option) => {
|
|
|
7179
7179
|
var findOptionByValue = (options, value) => {
|
|
7180
7180
|
return options.find((opt) => getOptionValue(opt) === value);
|
|
7181
7181
|
};
|
|
7182
|
+
var comboboxScrollClassName = [
|
|
7183
|
+
"scrollbar-thin",
|
|
7184
|
+
"[scrollbar-width:thin]",
|
|
7185
|
+
"[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_28%,transparent)_transparent]",
|
|
7186
|
+
"[&::-webkit-scrollbar]:w-2",
|
|
7187
|
+
"[&::-webkit-scrollbar-track]:bg-transparent",
|
|
7188
|
+
"[&::-webkit-scrollbar-thumb]:rounded-full",
|
|
7189
|
+
"[&::-webkit-scrollbar-thumb]:border-2",
|
|
7190
|
+
"[&::-webkit-scrollbar-thumb]:border-solid",
|
|
7191
|
+
"[&::-webkit-scrollbar-thumb]:border-transparent",
|
|
7192
|
+
"[&::-webkit-scrollbar-thumb]:bg-clip-padding",
|
|
7193
|
+
"[&::-webkit-scrollbar-thumb]:bg-muted-foreground/25",
|
|
7194
|
+
"[&::-webkit-scrollbar-thumb:hover]:bg-muted-foreground/45"
|
|
7195
|
+
].join(" ");
|
|
7182
7196
|
var Combobox = ({
|
|
7183
7197
|
id,
|
|
7184
7198
|
options,
|
|
@@ -7207,7 +7221,7 @@ var Combobox = ({
|
|
|
7207
7221
|
selectedOption: selectedOptionProp,
|
|
7208
7222
|
error,
|
|
7209
7223
|
helperText,
|
|
7210
|
-
useOverlayScrollbar =
|
|
7224
|
+
useOverlayScrollbar = true,
|
|
7211
7225
|
virtualized = false,
|
|
7212
7226
|
estimatedItemHeight = 44,
|
|
7213
7227
|
overscan = 8,
|
|
@@ -7226,7 +7240,7 @@ var Combobox = ({
|
|
|
7226
7240
|
useShadCNAnimations();
|
|
7227
7241
|
const inputRef = React24.useRef(null);
|
|
7228
7242
|
const optionsViewportRef = React24.useRef(null);
|
|
7229
|
-
useOverlayScrollbarTarget(optionsViewportRef, { enabled: useOverlayScrollbar });
|
|
7243
|
+
useOverlayScrollbarTarget(optionsViewportRef, { enabled: useOverlayScrollbar && !virtualized });
|
|
7230
7244
|
const autoId = useId6();
|
|
7231
7245
|
const resolvedId = id ? String(id) : `combobox-${autoId}`;
|
|
7232
7246
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
@@ -7493,7 +7507,7 @@ var Combobox = ({
|
|
|
7493
7507
|
id: `${resolvedId}-listbox`,
|
|
7494
7508
|
role: "listbox",
|
|
7495
7509
|
"aria-labelledby": labelId,
|
|
7496
|
-
className: "overflow-y-auto overscroll-contain",
|
|
7510
|
+
className: cn("overflow-y-auto overscroll-contain", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
|
|
7497
7511
|
style: { maxHeight },
|
|
7498
7512
|
children: /* @__PURE__ */ jsx29("div", { className: cn(size === "sm" ? "p-1" : size === "lg" ? "p-2" : "p-1.5"), children: loading2 ? /* @__PURE__ */ jsx29("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
7499
7513
|
/* @__PURE__ */ jsx29("div", { className: "relative", children: /* @__PURE__ */ jsx29("div", { className: "w-10 h-10 rounded-full border-2 border-primary/20 border-t-primary animate-spin" }) }),
|
|
@@ -15499,6 +15513,20 @@ import { useId as useId9 } from "react";
|
|
|
15499
15513
|
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
15500
15514
|
import { ChevronDown as ChevronDown4, Search as Search5, Check as Check6, SearchX as SearchX2, Loader2 as Loader23, X as X13, Sparkles as Sparkles2 } from "lucide-react";
|
|
15501
15515
|
import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
15516
|
+
var comboboxScrollClassName2 = [
|
|
15517
|
+
"scrollbar-thin",
|
|
15518
|
+
"[scrollbar-width:thin]",
|
|
15519
|
+
"[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_28%,transparent)_transparent]",
|
|
15520
|
+
"[&::-webkit-scrollbar]:w-2",
|
|
15521
|
+
"[&::-webkit-scrollbar-track]:bg-transparent",
|
|
15522
|
+
"[&::-webkit-scrollbar-thumb]:rounded-full",
|
|
15523
|
+
"[&::-webkit-scrollbar-thumb]:border-2",
|
|
15524
|
+
"[&::-webkit-scrollbar-thumb]:border-solid",
|
|
15525
|
+
"[&::-webkit-scrollbar-thumb]:border-transparent",
|
|
15526
|
+
"[&::-webkit-scrollbar-thumb]:bg-clip-padding",
|
|
15527
|
+
"[&::-webkit-scrollbar-thumb]:bg-muted-foreground/25",
|
|
15528
|
+
"[&::-webkit-scrollbar-thumb:hover]:bg-muted-foreground/45"
|
|
15529
|
+
].join(" ");
|
|
15502
15530
|
var MultiCombobox = ({
|
|
15503
15531
|
id,
|
|
15504
15532
|
options,
|
|
@@ -15531,7 +15559,7 @@ var MultiCombobox = ({
|
|
|
15531
15559
|
error,
|
|
15532
15560
|
helperText,
|
|
15533
15561
|
maxTagsVisible = 3,
|
|
15534
|
-
useOverlayScrollbar =
|
|
15562
|
+
useOverlayScrollbar = true,
|
|
15535
15563
|
virtualized = false,
|
|
15536
15564
|
estimatedItemHeight = 44,
|
|
15537
15565
|
overscan = 8,
|
|
@@ -15550,7 +15578,7 @@ var MultiCombobox = ({
|
|
|
15550
15578
|
const inputRef = React39.useRef(null);
|
|
15551
15579
|
const listRef = React39.useRef([]);
|
|
15552
15580
|
const optionsListRef = React39.useRef(null);
|
|
15553
|
-
useOverlayScrollbarTarget(optionsListRef, { enabled: useOverlayScrollbar });
|
|
15581
|
+
useOverlayScrollbarTarget(optionsListRef, { enabled: useOverlayScrollbar && !virtualized });
|
|
15554
15582
|
const triggerRef = React39.useRef(null);
|
|
15555
15583
|
useShadCNAnimations();
|
|
15556
15584
|
const normalizedOptions = React39.useMemo(
|
|
@@ -15853,7 +15881,11 @@ var MultiCombobox = ({
|
|
|
15853
15881
|
"aria-multiselectable": "true",
|
|
15854
15882
|
ref: optionsListRef,
|
|
15855
15883
|
style: { maxHeight },
|
|
15856
|
-
className: cn(
|
|
15884
|
+
className: cn(
|
|
15885
|
+
"overflow-y-auto p-1.5",
|
|
15886
|
+
(!useOverlayScrollbar || virtualized) && comboboxScrollClassName2,
|
|
15887
|
+
size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"
|
|
15888
|
+
),
|
|
15857
15889
|
children: loading2 ? /* @__PURE__ */ jsx45("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
15858
15890
|
/* @__PURE__ */ jsxs35("div", { className: "relative", children: [
|
|
15859
15891
|
/* @__PURE__ */ jsx45(Loader23, { className: "h-8 w-8 animate-spin text-primary" }),
|