@underverse-ui/underverse 1.0.38 → 1.0.40
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 +218 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +221 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2808,7 +2808,8 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
|
2808
2808
|
var sizeClasses = {
|
|
2809
2809
|
sm: "h-8 w-8 text-sm",
|
|
2810
2810
|
md: "h-10 w-10 text-base",
|
|
2811
|
-
lg: "h-14 w-14 text-lg"
|
|
2811
|
+
lg: "h-14 w-14 text-lg",
|
|
2812
|
+
xl: "h-20 w-20 text-xl"
|
|
2812
2813
|
};
|
|
2813
2814
|
var statusColors = {
|
|
2814
2815
|
online: "bg-success",
|
|
@@ -2820,7 +2821,8 @@ var statusColors = {
|
|
|
2820
2821
|
var statusDotSizes = {
|
|
2821
2822
|
sm: "w-2 h-2 border",
|
|
2822
2823
|
md: "w-3 h-3 border-2",
|
|
2823
|
-
lg: "w-4 h-4 border-2"
|
|
2824
|
+
lg: "w-4 h-4 border-2",
|
|
2825
|
+
xl: "w-5 h-5 border-[3px]"
|
|
2824
2826
|
};
|
|
2825
2827
|
var Avatar = ({
|
|
2826
2828
|
src,
|
|
@@ -14945,9 +14947,18 @@ var defaultLabels = {
|
|
|
14945
14947
|
};
|
|
14946
14948
|
function CategoryTreeSelect(props) {
|
|
14947
14949
|
const {
|
|
14950
|
+
id,
|
|
14951
|
+
label,
|
|
14952
|
+
labelClassName,
|
|
14948
14953
|
categories,
|
|
14949
14954
|
placeholder = "Select category",
|
|
14950
14955
|
disabled,
|
|
14956
|
+
required = false,
|
|
14957
|
+
size = "md",
|
|
14958
|
+
variant = "default",
|
|
14959
|
+
allowClear = false,
|
|
14960
|
+
error,
|
|
14961
|
+
helperText,
|
|
14951
14962
|
viewOnly = false,
|
|
14952
14963
|
defaultExpanded = false,
|
|
14953
14964
|
enableSearch,
|
|
@@ -14964,6 +14975,12 @@ function CategoryTreeSelect(props) {
|
|
|
14964
14975
|
const searchInputRef = (0, import_react19.useRef)(null);
|
|
14965
14976
|
const dropdownViewportRef = (0, import_react19.useRef)(null);
|
|
14966
14977
|
useOverlayScrollbarTarget(dropdownViewportRef, { enabled: useOverlayScrollbar });
|
|
14978
|
+
const autoId = (0, import_react19.useId)();
|
|
14979
|
+
const resolvedId = id ? String(id) : `category-tree-select-${autoId}`;
|
|
14980
|
+
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
14981
|
+
const helperId = helperText && !error ? `${resolvedId}-helper` : void 0;
|
|
14982
|
+
const errorId = error ? `${resolvedId}-error` : void 0;
|
|
14983
|
+
const describedBy = errorId || helperId;
|
|
14967
14984
|
const mergedLabels = { ...defaultLabels, ...labels };
|
|
14968
14985
|
const valueArray = singleSelect ? props.value != null ? [props.value] : [] : props.value || [];
|
|
14969
14986
|
const { parentCategories, childrenMap, byId } = (0, import_react19.useMemo)(() => {
|
|
@@ -15007,8 +15024,8 @@ function CategoryTreeSelect(props) {
|
|
|
15007
15024
|
const stack = [rootId];
|
|
15008
15025
|
let guard = 0;
|
|
15009
15026
|
while (stack.length > 0 && guard++ < categories.length * 3) {
|
|
15010
|
-
const
|
|
15011
|
-
const children = childrenMap.get(
|
|
15027
|
+
const id2 = stack.pop();
|
|
15028
|
+
const children = childrenMap.get(id2) ?? [];
|
|
15012
15029
|
for (const child of children) {
|
|
15013
15030
|
if (visible.has(child.id)) continue;
|
|
15014
15031
|
visible.add(child.id);
|
|
@@ -15038,13 +15055,13 @@ function CategoryTreeSelect(props) {
|
|
|
15038
15055
|
setExpandedNodes(new Set(allParentIds));
|
|
15039
15056
|
}
|
|
15040
15057
|
}, [viewOnly, inline, defaultExpanded, categories]);
|
|
15041
|
-
const toggleExpand = (
|
|
15058
|
+
const toggleExpand = (id2) => {
|
|
15042
15059
|
if (isSearchMode) return;
|
|
15043
15060
|
const newExpanded = new Set(expandedNodes);
|
|
15044
|
-
if (newExpanded.has(
|
|
15045
|
-
newExpanded.delete(
|
|
15061
|
+
if (newExpanded.has(id2)) {
|
|
15062
|
+
newExpanded.delete(id2);
|
|
15046
15063
|
} else {
|
|
15047
|
-
newExpanded.add(
|
|
15064
|
+
newExpanded.add(id2);
|
|
15048
15065
|
}
|
|
15049
15066
|
setExpandedNodes(newExpanded);
|
|
15050
15067
|
};
|
|
@@ -15188,29 +15205,112 @@ function CategoryTreeSelect(props) {
|
|
|
15188
15205
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: isSearchMode ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.SearchX, { className: "w-6 h-6 text-muted-foreground/50" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.Layers, { className: "w-6 h-6 text-muted-foreground/50" }) }),
|
|
15189
15206
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: isSearchMode ? mergedLabels.noResultsText : mergedLabels.emptyText })
|
|
15190
15207
|
] }) : effectiveParentCategories.map((cat) => renderCategory(cat)) });
|
|
15208
|
+
const renderLabel = () => label ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15209
|
+
Label,
|
|
15210
|
+
{
|
|
15211
|
+
id: labelId,
|
|
15212
|
+
htmlFor: resolvedId,
|
|
15213
|
+
className: cn(
|
|
15214
|
+
size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
|
|
15215
|
+
disabled ? "text-muted-foreground" : "text-foreground",
|
|
15216
|
+
error && "text-destructive",
|
|
15217
|
+
labelClassName
|
|
15218
|
+
),
|
|
15219
|
+
children: [
|
|
15220
|
+
label,
|
|
15221
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ml-1 text-destructive", children: "*" })
|
|
15222
|
+
]
|
|
15223
|
+
}
|
|
15224
|
+
) }) : null;
|
|
15225
|
+
const renderAssistiveText = () => error ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { id: errorId, className: "text-sm text-destructive", children: error }) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { id: helperId, className: "text-sm text-muted-foreground", children: helperText }) : null;
|
|
15191
15226
|
if (viewOnly) {
|
|
15192
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("
|
|
15193
|
-
|
|
15194
|
-
|
|
15227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
15228
|
+
renderLabel(),
|
|
15229
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15230
|
+
"div",
|
|
15231
|
+
{
|
|
15232
|
+
id: resolvedId,
|
|
15233
|
+
"aria-labelledby": labelId,
|
|
15234
|
+
"aria-describedby": describedBy,
|
|
15235
|
+
className: cn("rounded-2xl border border-border/60 bg-card/50 backdrop-blur-sm p-3 shadow-sm", disabled && "opacity-50"),
|
|
15236
|
+
children: [
|
|
15237
|
+
renderSearch(),
|
|
15238
|
+
renderTreeContent()
|
|
15239
|
+
]
|
|
15240
|
+
}
|
|
15241
|
+
),
|
|
15242
|
+
renderAssistiveText()
|
|
15195
15243
|
] });
|
|
15196
15244
|
}
|
|
15197
15245
|
if (inline) {
|
|
15198
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
|
|
15203
|
-
|
|
15204
|
-
|
|
15205
|
-
|
|
15206
|
-
|
|
15207
|
-
|
|
15208
|
-
|
|
15209
|
-
|
|
15210
|
-
|
|
15211
|
-
|
|
15246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
15247
|
+
renderLabel(),
|
|
15248
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15249
|
+
"div",
|
|
15250
|
+
{
|
|
15251
|
+
id: resolvedId,
|
|
15252
|
+
"aria-labelledby": labelId,
|
|
15253
|
+
"aria-describedby": describedBy,
|
|
15254
|
+
className: cn("rounded-2xl border border-border/60 bg-card/50 backdrop-blur-sm p-3 shadow-sm", disabled && "opacity-50 pointer-events-none"),
|
|
15255
|
+
children: [
|
|
15256
|
+
renderSearch(),
|
|
15257
|
+
renderTreeContent()
|
|
15258
|
+
]
|
|
15259
|
+
}
|
|
15260
|
+
),
|
|
15261
|
+
renderAssistiveText()
|
|
15262
|
+
] });
|
|
15212
15263
|
}
|
|
15213
15264
|
const selectedCount = valueArray.length;
|
|
15265
|
+
const triggerSizeStyles = {
|
|
15266
|
+
sm: {
|
|
15267
|
+
button: "h-8 px-3 py-1.5 text-sm md:h-7 md:text-xs",
|
|
15268
|
+
iconWrap: "p-1",
|
|
15269
|
+
icon: "w-3.5 h-3.5 md:w-3 md:h-3",
|
|
15270
|
+
text: "text-xs md:text-[11px]",
|
|
15271
|
+
badge: "px-1.5 py-0.5 text-[10px]",
|
|
15272
|
+
actionIcon: "w-3.5 h-3.5",
|
|
15273
|
+
clearIcon: "h-3 w-3"
|
|
15274
|
+
},
|
|
15275
|
+
md: {
|
|
15276
|
+
button: "h-10 px-3 py-2.5 text-sm",
|
|
15277
|
+
iconWrap: "p-1.5",
|
|
15278
|
+
icon: "w-4 h-4",
|
|
15279
|
+
text: "text-sm",
|
|
15280
|
+
badge: "px-2 py-0.5 text-xs",
|
|
15281
|
+
actionIcon: "w-4 h-4",
|
|
15282
|
+
clearIcon: "h-3.5 w-3.5"
|
|
15283
|
+
},
|
|
15284
|
+
lg: {
|
|
15285
|
+
button: "h-12 px-4 py-3 text-base",
|
|
15286
|
+
iconWrap: "p-1.5",
|
|
15287
|
+
icon: "w-5 h-5",
|
|
15288
|
+
text: "text-base",
|
|
15289
|
+
badge: "px-2.5 py-1 text-sm",
|
|
15290
|
+
actionIcon: "w-5 h-5",
|
|
15291
|
+
clearIcon: "h-4 w-4"
|
|
15292
|
+
}
|
|
15293
|
+
};
|
|
15294
|
+
const triggerVariantStyles = {
|
|
15295
|
+
default: "border border-input bg-background shadow-sm hover:border-primary/50",
|
|
15296
|
+
outline: "border-2 border-input bg-transparent hover:border-primary",
|
|
15297
|
+
ghost: "border border-transparent bg-muted/50 hover:bg-muted",
|
|
15298
|
+
filled: "border border-transparent bg-muted/70 hover:bg-muted"
|
|
15299
|
+
};
|
|
15300
|
+
const clearSelection = () => {
|
|
15301
|
+
if (!props.onChange) return;
|
|
15302
|
+
if (singleSelect) {
|
|
15303
|
+
props.onChange(null);
|
|
15304
|
+
return;
|
|
15305
|
+
}
|
|
15306
|
+
props.onChange([]);
|
|
15307
|
+
};
|
|
15308
|
+
const handleClear = (event) => {
|
|
15309
|
+
event.preventDefault();
|
|
15310
|
+
event.stopPropagation();
|
|
15311
|
+
clearSelection();
|
|
15312
|
+
setIsOpen(false);
|
|
15313
|
+
};
|
|
15214
15314
|
let displayText;
|
|
15215
15315
|
if (singleSelect) {
|
|
15216
15316
|
displayText = selectedCount > 0 ? categories.find((c) => c.id === valueArray[0])?.name || placeholder : placeholder;
|
|
@@ -15218,69 +15318,111 @@ function CategoryTreeSelect(props) {
|
|
|
15218
15318
|
if (selectedCount === 0) {
|
|
15219
15319
|
displayText = placeholder;
|
|
15220
15320
|
} else if (selectedCount <= 3) {
|
|
15221
|
-
const selectedNames = valueArray.map((
|
|
15321
|
+
const selectedNames = valueArray.map((id2) => categories.find((c) => c.id === id2)?.name).filter(Boolean).join(", ");
|
|
15222
15322
|
displayText = selectedNames || placeholder;
|
|
15223
15323
|
} else {
|
|
15224
15324
|
displayText = mergedLabels.selectedText(selectedCount);
|
|
15225
15325
|
}
|
|
15226
15326
|
}
|
|
15227
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("
|
|
15228
|
-
|
|
15229
|
-
|
|
15230
|
-
{
|
|
15231
|
-
type: "button",
|
|
15232
|
-
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
15233
|
-
disabled,
|
|
15234
|
-
className: cn(
|
|
15235
|
-
// Modern trigger button styling
|
|
15236
|
-
"group flex w-full items-center justify-between px-3 py-2.5",
|
|
15237
|
-
"bg-background/80 backdrop-blur-sm border border-border/60",
|
|
15238
|
-
"rounded-full h-11 text-sm",
|
|
15239
|
-
"hover:bg-accent/10 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5",
|
|
15240
|
-
"transition-all duration-300 ease-out",
|
|
15241
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
15242
|
-
disabled && "opacity-50 cursor-not-allowed hover:transform-none hover:shadow-none",
|
|
15243
|
-
isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10"
|
|
15244
|
-
),
|
|
15245
|
-
children: [
|
|
15246
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
15247
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15248
|
-
"div",
|
|
15249
|
-
{
|
|
15250
|
-
className: cn(
|
|
15251
|
-
"flex items-center justify-center rounded-lg p-1.5 transition-all duration-300",
|
|
15252
|
-
isOpen ? "bg-primary/15 text-primary" : "bg-muted/50 text-muted-foreground group-hover:bg-primary/10 group-hover:text-primary"
|
|
15253
|
-
),
|
|
15254
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.FolderTree, { className: cn("w-4 h-4 transition-transform duration-300", isOpen && "scale-110") })
|
|
15255
|
-
}
|
|
15256
|
-
),
|
|
15257
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: cn("font-medium transition-colors duration-200", selectedCount === 0 ? "text-muted-foreground" : "text-foreground"), children: displayText }),
|
|
15258
|
-
selectedCount > 0 && !singleSelect && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "ml-1 px-2 py-0.5 text-xs font-bold rounded-full bg-primary/15 text-primary", children: selectedCount })
|
|
15259
|
-
] }),
|
|
15260
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.ChevronDown, { className: "w-4 h-4" }) })
|
|
15261
|
-
]
|
|
15262
|
-
}
|
|
15263
|
-
),
|
|
15264
|
-
isOpen && !disabled && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
15265
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "fixed inset-0 z-10", onClick: () => setIsOpen(false) }),
|
|
15327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
15328
|
+
renderLabel(),
|
|
15329
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "relative", children: [
|
|
15266
15330
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15267
|
-
"
|
|
15331
|
+
"button",
|
|
15268
15332
|
{
|
|
15269
|
-
|
|
15333
|
+
id: resolvedId,
|
|
15334
|
+
type: "button",
|
|
15335
|
+
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
15336
|
+
disabled,
|
|
15337
|
+
role: "combobox",
|
|
15338
|
+
"aria-haspopup": "tree",
|
|
15339
|
+
"aria-expanded": isOpen,
|
|
15340
|
+
"aria-controls": `${resolvedId}-tree`,
|
|
15341
|
+
"aria-labelledby": labelId,
|
|
15342
|
+
"aria-describedby": describedBy,
|
|
15343
|
+
"aria-invalid": !!error,
|
|
15270
15344
|
className: cn(
|
|
15271
|
-
"
|
|
15272
|
-
"
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
"
|
|
15345
|
+
"group flex w-full items-center justify-between rounded-full transition-all duration-200",
|
|
15346
|
+
"backdrop-blur-sm",
|
|
15347
|
+
triggerSizeStyles[size].button,
|
|
15348
|
+
triggerVariantStyles[variant],
|
|
15349
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
15350
|
+
disabled && "opacity-50 cursor-not-allowed hover:transform-none hover:shadow-none",
|
|
15351
|
+
isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
|
|
15352
|
+
error && "border-destructive focus-visible:ring-destructive/30"
|
|
15276
15353
|
),
|
|
15277
15354
|
children: [
|
|
15278
|
-
|
|
15279
|
-
|
|
15355
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 text-left", children: [
|
|
15356
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15357
|
+
"div",
|
|
15358
|
+
{
|
|
15359
|
+
className: cn(
|
|
15360
|
+
"shrink-0 flex items-center justify-center rounded-lg transition-all duration-300",
|
|
15361
|
+
triggerSizeStyles[size].iconWrap,
|
|
15362
|
+
isOpen ? "bg-primary/15 text-primary" : "bg-muted/50 text-muted-foreground group-hover:bg-primary/10 group-hover:text-primary"
|
|
15363
|
+
),
|
|
15364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.FolderTree, { className: cn(triggerSizeStyles[size].icon, "transition-transform duration-300", isOpen && "scale-110") })
|
|
15365
|
+
}
|
|
15366
|
+
),
|
|
15367
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15368
|
+
"span",
|
|
15369
|
+
{
|
|
15370
|
+
className: cn(
|
|
15371
|
+
"min-w-0 flex-1 truncate font-medium transition-colors duration-200",
|
|
15372
|
+
triggerSizeStyles[size].text,
|
|
15373
|
+
selectedCount === 0 ? "text-muted-foreground" : "text-foreground"
|
|
15374
|
+
),
|
|
15375
|
+
title: displayText,
|
|
15376
|
+
children: displayText
|
|
15377
|
+
}
|
|
15378
|
+
)
|
|
15379
|
+
] }),
|
|
15380
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "ml-2 flex shrink-0 items-center gap-1.5", children: [
|
|
15381
|
+
allowClear && selectedCount > 0 && !disabled && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15382
|
+
"div",
|
|
15383
|
+
{
|
|
15384
|
+
role: "button",
|
|
15385
|
+
tabIndex: 0,
|
|
15386
|
+
"aria-label": "Clear selection",
|
|
15387
|
+
onClick: handleClear,
|
|
15388
|
+
onKeyDown: (event) => (event.key === "Enter" || event.key === " ") && handleClear(event),
|
|
15389
|
+
className: cn(
|
|
15390
|
+
"opacity-0 group-hover:opacity-100 transition-all duration-200",
|
|
15391
|
+
"p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
|
|
15392
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30"
|
|
15393
|
+
),
|
|
15394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.X, { className: triggerSizeStyles[size].clearIcon })
|
|
15395
|
+
}
|
|
15396
|
+
),
|
|
15397
|
+
selectedCount > 0 && !singleSelect && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: cn("rounded-full bg-primary/15 font-bold text-primary", triggerSizeStyles[size].badge), children: selectedCount }),
|
|
15398
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.ChevronDown, { className: triggerSizeStyles[size].actionIcon }) })
|
|
15399
|
+
] })
|
|
15280
15400
|
]
|
|
15281
15401
|
}
|
|
15282
|
-
)
|
|
15283
|
-
|
|
15402
|
+
),
|
|
15403
|
+
isOpen && !disabled && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
15404
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "fixed inset-0 z-10", onClick: () => setIsOpen(false) }),
|
|
15405
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15406
|
+
"div",
|
|
15407
|
+
{
|
|
15408
|
+
ref: dropdownViewportRef,
|
|
15409
|
+
id: `${resolvedId}-tree`,
|
|
15410
|
+
className: cn(
|
|
15411
|
+
"absolute z-20 mt-2 w-full max-h-80 overflow-auto",
|
|
15412
|
+
"rounded-2xl md:rounded-3xl border border-border/40 bg-popover/95 text-popover-foreground",
|
|
15413
|
+
"shadow-2xl backdrop-blur-xl",
|
|
15414
|
+
"p-2",
|
|
15415
|
+
"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-300"
|
|
15416
|
+
),
|
|
15417
|
+
children: [
|
|
15418
|
+
renderSearch(),
|
|
15419
|
+
renderTreeContent()
|
|
15420
|
+
]
|
|
15421
|
+
}
|
|
15422
|
+
)
|
|
15423
|
+
] })
|
|
15424
|
+
] }),
|
|
15425
|
+
renderAssistiveText()
|
|
15284
15426
|
] });
|
|
15285
15427
|
}
|
|
15286
15428
|
|