@inf-monkeys-tech/monkeys-design 2.0.2 → 2.0.3
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/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/layout/index.d.mts +4 -1
- package/dist/components/layout/index.d.ts +4 -1
- package/dist/components/layout/index.js +217 -138
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +216 -137
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/index.js +290 -211
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +289 -210
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
6
6
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
7
7
|
import { ChevronDown, Search, Circle, Check, ChevronRight, ChevronUp, ShoppingBag, Code2, FileText, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, Blocks, Settings, TerminalSquare, FileOutput, Download, X, PanelLeft, PanelRight, Loader2, UploadCloud, RefreshCw, Bot, SquarePen, MessageSquare, Clock3, CheckCircle2, XCircle, CircleStop, AlertCircle, GitFork, PencilLine, Copy, RotateCcw, FileCode2, Files, TestTube2, Image, Video, Music2, Ellipsis, Trash2, Pencil } from 'lucide-react';
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
|
-
import * as
|
|
9
|
+
import * as DropdownMenu3 from '@radix-ui/react-dropdown-menu';
|
|
10
10
|
import * as ContextMenu from '@radix-ui/react-context-menu';
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
12
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
@@ -8768,7 +8768,7 @@ var BaseDropdownMenu = forwardRef(function BaseDropdownMenu2({
|
|
|
8768
8768
|
onOpenChange?.(nextOpen);
|
|
8769
8769
|
};
|
|
8770
8770
|
const menuContent = /* @__PURE__ */ jsxs(
|
|
8771
|
-
|
|
8771
|
+
DropdownMenu3.Content,
|
|
8772
8772
|
{
|
|
8773
8773
|
...componentAttributes,
|
|
8774
8774
|
side,
|
|
@@ -8785,7 +8785,7 @@ var BaseDropdownMenu = forwardRef(function BaseDropdownMenu2({
|
|
|
8785
8785
|
style: theme.styles.dropdownMenu,
|
|
8786
8786
|
children: [
|
|
8787
8787
|
hasRenderableNode(label) ? /* @__PURE__ */ jsx(
|
|
8788
|
-
|
|
8788
|
+
DropdownMenu3.Label,
|
|
8789
8789
|
{
|
|
8790
8790
|
...componentAttributes,
|
|
8791
8791
|
"data-monkeys-component": "dropdown-menu",
|
|
@@ -8805,7 +8805,7 @@ var BaseDropdownMenu = forwardRef(function BaseDropdownMenu2({
|
|
|
8805
8805
|
"data-slot": "item-wrapper",
|
|
8806
8806
|
children: [
|
|
8807
8807
|
item.separatorBefore ? /* @__PURE__ */ jsx(
|
|
8808
|
-
|
|
8808
|
+
DropdownMenu3.Separator,
|
|
8809
8809
|
{
|
|
8810
8810
|
...componentAttributes,
|
|
8811
8811
|
"data-monkeys-component": "dropdown-menu",
|
|
@@ -8818,7 +8818,7 @@ var BaseDropdownMenu = forwardRef(function BaseDropdownMenu2({
|
|
|
8818
8818
|
}
|
|
8819
8819
|
) : null,
|
|
8820
8820
|
/* @__PURE__ */ jsx(
|
|
8821
|
-
|
|
8821
|
+
DropdownMenu3.Item,
|
|
8822
8822
|
{
|
|
8823
8823
|
asChild: true,
|
|
8824
8824
|
disabled: itemDisabled,
|
|
@@ -8938,7 +8938,7 @@ var BaseDropdownMenu = forwardRef(function BaseDropdownMenu2({
|
|
|
8938
8938
|
className: cn(theme.slots.dropdownRoot, classNames?.root, className),
|
|
8939
8939
|
style,
|
|
8940
8940
|
children: /* @__PURE__ */ jsxs(
|
|
8941
|
-
|
|
8941
|
+
DropdownMenu3.Root,
|
|
8942
8942
|
{
|
|
8943
8943
|
open: isOpen,
|
|
8944
8944
|
onOpenChange: handleOpenChange,
|
|
@@ -8946,7 +8946,7 @@ var BaseDropdownMenu = forwardRef(function BaseDropdownMenu2({
|
|
|
8946
8946
|
modal: false,
|
|
8947
8947
|
children: [
|
|
8948
8948
|
/* @__PURE__ */ jsx(
|
|
8949
|
-
|
|
8949
|
+
DropdownMenu3.Trigger,
|
|
8950
8950
|
{
|
|
8951
8951
|
...componentAttributes,
|
|
8952
8952
|
asChild: true,
|
|
@@ -8971,7 +8971,7 @@ var BaseDropdownMenu = forwardRef(function BaseDropdownMenu2({
|
|
|
8971
8971
|
})
|
|
8972
8972
|
}
|
|
8973
8973
|
),
|
|
8974
|
-
portal && overlayPortal.shouldPortal ? /* @__PURE__ */ jsx(
|
|
8974
|
+
portal && overlayPortal.shouldPortal ? /* @__PURE__ */ jsx(DropdownMenu3.Portal, { ...overlayPortal.radixPortalProps, children: menuContent }) : menuContent
|
|
8975
8975
|
]
|
|
8976
8976
|
}
|
|
8977
8977
|
)
|
|
@@ -16253,9 +16253,9 @@ function UserAccountMenuSelector({
|
|
|
16253
16253
|
if (selector.visible === false || selector.options.length === 0) return null;
|
|
16254
16254
|
const radiusClass = radiusClassNames[menuRadius];
|
|
16255
16255
|
const currentLabel = getCurrentOptionLabel(selector);
|
|
16256
|
-
return /* @__PURE__ */ jsxs(
|
|
16256
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Sub, { children: [
|
|
16257
16257
|
/* @__PURE__ */ jsxs(
|
|
16258
|
-
|
|
16258
|
+
DropdownMenu3.SubTrigger,
|
|
16259
16259
|
{
|
|
16260
16260
|
disabled: selector.disabled,
|
|
16261
16261
|
className: cn(
|
|
@@ -16270,8 +16270,8 @@ function UserAccountMenuSelector({
|
|
|
16270
16270
|
]
|
|
16271
16271
|
}
|
|
16272
16272
|
),
|
|
16273
|
-
/* @__PURE__ */ jsx(
|
|
16274
|
-
|
|
16273
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
16274
|
+
DropdownMenu3.SubContent,
|
|
16275
16275
|
{
|
|
16276
16276
|
sideOffset: 8,
|
|
16277
16277
|
className: cn(
|
|
@@ -16280,8 +16280,8 @@ function UserAccountMenuSelector({
|
|
|
16280
16280
|
selector.contentWidthClassName,
|
|
16281
16281
|
classNames?.subContent
|
|
16282
16282
|
),
|
|
16283
|
-
children: /* @__PURE__ */ jsx(
|
|
16284
|
-
|
|
16283
|
+
children: /* @__PURE__ */ jsx(DropdownMenu3.RadioGroup, { value: selector.value, onValueChange: selector.onChange, children: selector.options.map((option) => /* @__PURE__ */ jsxs(
|
|
16284
|
+
DropdownMenu3.RadioItem,
|
|
16285
16285
|
{
|
|
16286
16286
|
value: option.value,
|
|
16287
16287
|
disabled: option.disabled,
|
|
@@ -16291,7 +16291,7 @@ function UserAccountMenuSelector({
|
|
|
16291
16291
|
classNames?.item
|
|
16292
16292
|
),
|
|
16293
16293
|
children: [
|
|
16294
|
-
/* @__PURE__ */ jsx(
|
|
16294
|
+
/* @__PURE__ */ jsx(DropdownMenu3.ItemIndicator, { className: "absolute left-2 inline-flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx(CheckIcon2, {}) }),
|
|
16295
16295
|
renderIcon(option.icon, classNames?.itemIcon),
|
|
16296
16296
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: option.label })
|
|
16297
16297
|
]
|
|
@@ -16340,8 +16340,8 @@ function UserAccountMenu({
|
|
|
16340
16340
|
}
|
|
16341
16341
|
);
|
|
16342
16342
|
const isProfileTrigger = triggerVariant === "profile";
|
|
16343
|
-
return /* @__PURE__ */ jsxs(
|
|
16344
|
-
/* @__PURE__ */ jsx(
|
|
16343
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
16344
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
16345
16345
|
BaseButton,
|
|
16346
16346
|
{
|
|
16347
16347
|
appearance,
|
|
@@ -16367,8 +16367,8 @@ function UserAccountMenu({
|
|
|
16367
16367
|
tone: "muted"
|
|
16368
16368
|
}
|
|
16369
16369
|
) }),
|
|
16370
|
-
/* @__PURE__ */ jsx(
|
|
16371
|
-
|
|
16370
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsxs(
|
|
16371
|
+
DropdownMenu3.Content,
|
|
16372
16372
|
{
|
|
16373
16373
|
align,
|
|
16374
16374
|
side,
|
|
@@ -16380,7 +16380,7 @@ function UserAccountMenu({
|
|
|
16380
16380
|
classNames?.content
|
|
16381
16381
|
),
|
|
16382
16382
|
children: [
|
|
16383
|
-
/* @__PURE__ */ jsx(
|
|
16383
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Label, { className: cn("px-2 py-1.5 font-normal", classNames?.label), children: /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
16384
16384
|
avatar,
|
|
16385
16385
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
16386
16386
|
/* @__PURE__ */ jsx("span", { className: cn("truncate text-sm font-medium leading-none", classNames?.userName), children: displayName }),
|
|
@@ -16397,7 +16397,7 @@ function UserAccountMenu({
|
|
|
16397
16397
|
] })
|
|
16398
16398
|
] }) }),
|
|
16399
16399
|
hasMenuBody ? /* @__PURE__ */ jsx(
|
|
16400
|
-
|
|
16400
|
+
DropdownMenu3.Separator,
|
|
16401
16401
|
{
|
|
16402
16402
|
className: cn("my-1 h-px bg-[hsl(var(--border))]", classNames?.separator)
|
|
16403
16403
|
}
|
|
@@ -16412,20 +16412,20 @@ function UserAccountMenu({
|
|
|
16412
16412
|
selector.id ?? `selector-${index}`
|
|
16413
16413
|
)),
|
|
16414
16414
|
visibleSelectors.length > 0 && visibleItems.length > 0 ? /* @__PURE__ */ jsx(
|
|
16415
|
-
|
|
16415
|
+
DropdownMenu3.Separator,
|
|
16416
16416
|
{
|
|
16417
16417
|
className: cn("my-1 h-px bg-[hsl(var(--border))]", classNames?.separator)
|
|
16418
16418
|
}
|
|
16419
16419
|
) : null,
|
|
16420
16420
|
visibleItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
|
|
16421
16421
|
item.separatorBefore ? /* @__PURE__ */ jsx(
|
|
16422
|
-
|
|
16422
|
+
DropdownMenu3.Separator,
|
|
16423
16423
|
{
|
|
16424
16424
|
className: cn("my-1 h-px bg-[hsl(var(--border))]", classNames?.separator)
|
|
16425
16425
|
}
|
|
16426
16426
|
) : null,
|
|
16427
16427
|
/* @__PURE__ */ jsxs(
|
|
16428
|
-
|
|
16428
|
+
DropdownMenu3.Item,
|
|
16429
16429
|
{
|
|
16430
16430
|
disabled: item.disabled,
|
|
16431
16431
|
onSelect: item.disabled ? void 0 : item.onSelect,
|
|
@@ -16549,8 +16549,8 @@ function AppHeader({
|
|
|
16549
16549
|
(!tabs || tabs.length === 0) && /* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
16550
16550
|
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-4", children: [
|
|
16551
16551
|
extra,
|
|
16552
|
-
user && /* @__PURE__ */ jsxs(
|
|
16553
|
-
/* @__PURE__ */ jsx(
|
|
16552
|
+
user && /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
16553
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { className: "flex h-8 w-8 items-center justify-center rounded-full hover:ring-2 hover:ring-[hsl(var(--ring))]/20 transition-all overflow-hidden focus-visible:outline-none", children: user.photo ? /* @__PURE__ */ jsx(
|
|
16554
16554
|
"img",
|
|
16555
16555
|
{
|
|
16556
16556
|
src: user.photo,
|
|
@@ -16558,14 +16558,14 @@ function AppHeader({
|
|
|
16558
16558
|
className: "h-8 w-8 rounded-full object-cover"
|
|
16559
16559
|
}
|
|
16560
16560
|
) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }) }) }),
|
|
16561
|
-
/* @__PURE__ */ jsx(
|
|
16562
|
-
|
|
16561
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsxs(
|
|
16562
|
+
DropdownMenu3.Content,
|
|
16563
16563
|
{
|
|
16564
16564
|
className: "z-50 w-52 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-[hsl(var(--popover-foreground))] shadow-md animate-in fade-in-0 zoom-in-95",
|
|
16565
16565
|
sideOffset: 5,
|
|
16566
16566
|
align: "end",
|
|
16567
16567
|
children: [
|
|
16568
|
-
/* @__PURE__ */ jsxs(
|
|
16568
|
+
/* @__PURE__ */ jsxs(DropdownMenu3.Label, { className: "flex items-center gap-2 px-2 py-1.5 font-normal", children: [
|
|
16569
16569
|
user.photo ? /* @__PURE__ */ jsx(
|
|
16570
16570
|
"img",
|
|
16571
16571
|
{
|
|
@@ -16579,11 +16579,11 @@ function AppHeader({
|
|
|
16579
16579
|
user.email && /* @__PURE__ */ jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))] leading-none mt-1", children: user.email })
|
|
16580
16580
|
] })
|
|
16581
16581
|
] }),
|
|
16582
|
-
/* @__PURE__ */ jsx(
|
|
16583
|
-
/* @__PURE__ */ jsxs(
|
|
16582
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Separator, { className: "h-px bg-[hsl(var(--border))] my-1" }),
|
|
16583
|
+
/* @__PURE__ */ jsxs(DropdownMenu3.Group, { children: [
|
|
16584
16584
|
userMenuItems,
|
|
16585
16585
|
/* @__PURE__ */ jsxs(
|
|
16586
|
-
|
|
16586
|
+
DropdownMenu3.Item,
|
|
16587
16587
|
{
|
|
16588
16588
|
className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-[hsl(var(--destructive))] outline-none transition-colors hover:bg-[hsl(var(--accent))]",
|
|
16589
16589
|
onSelect: () => onLogout?.(),
|
|
@@ -16860,6 +16860,7 @@ function AppLayout({
|
|
|
16860
16860
|
}
|
|
16861
16861
|
var NAVIGATION_LAYOUT_SIDEBAR_EXPANDED_WIDTH = "13.7rem";
|
|
16862
16862
|
var NAVIGATION_LAYOUT_SIDEBAR_COLLAPSED_WIDTH = "4.25rem";
|
|
16863
|
+
var NAVIGATION_LAYOUT_CONTEXTUAL_SIDEBAR_WIDTH = "15rem";
|
|
16863
16864
|
var NAVIGATION_LAYOUT_TRANSITION_TIMING = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
16864
16865
|
var NAVIGATION_LAYOUT_HEADBAR_DEFAULT_HEIGHT_PX = 72;
|
|
16865
16866
|
var NAVIGATION_LAYOUT_HEADBAR_MIN_HEIGHT_PX = 56;
|
|
@@ -16987,11 +16988,18 @@ function getHeadbarCompoundStyle(active, useTokenRadius = true) {
|
|
|
16987
16988
|
function findNavigationRootId(items, activeItemId) {
|
|
16988
16989
|
for (const item of items) {
|
|
16989
16990
|
if (item.id === activeItemId) return item.id;
|
|
16990
|
-
if (item
|
|
16991
|
-
return item.id;
|
|
16991
|
+
if (containsNavigationItem(item, activeItemId)) return item.id;
|
|
16992
16992
|
}
|
|
16993
16993
|
return activeItemId;
|
|
16994
16994
|
}
|
|
16995
|
+
function containsNavigationItem(item, itemId) {
|
|
16996
|
+
if (!itemId) return false;
|
|
16997
|
+
if (item.id === itemId) return true;
|
|
16998
|
+
return item.children?.some((child) => containsNavigationItem(child, itemId)) ?? false;
|
|
16999
|
+
}
|
|
17000
|
+
function findActiveNavigationBranch(item, activeItemId) {
|
|
17001
|
+
return item.children?.find((child) => containsNavigationItem(child, activeItemId));
|
|
17002
|
+
}
|
|
16995
17003
|
function getNavigationActionTitle(action) {
|
|
16996
17004
|
return action.title || (typeof action.label === "string" ? action.label : void 0);
|
|
16997
17005
|
}
|
|
@@ -17060,10 +17068,7 @@ function SidebarNavigationList({
|
|
|
17060
17068
|
const [expandedByRoot, setExpandedByRoot] = useState(
|
|
17061
17069
|
{}
|
|
17062
17070
|
);
|
|
17063
|
-
const canReveal = revealRequest ? items.some(
|
|
17064
|
-
(item) => item.id === revealRequest.id && !item.disabled
|
|
17065
|
-
) : false;
|
|
17066
|
-
const activeRootId = findNavigationRootId(items, activeItemId);
|
|
17071
|
+
const canReveal = revealRequest ? items.some((item) => containsNavigationItem(item, revealRequest.id) && !item.disabled) : false;
|
|
17067
17072
|
const toggleRoot = (id) => {
|
|
17068
17073
|
setExpandedByRoot((current) => ({
|
|
17069
17074
|
...current,
|
|
@@ -17072,13 +17077,10 @@ function SidebarNavigationList({
|
|
|
17072
17077
|
};
|
|
17073
17078
|
useEffect(() => {
|
|
17074
17079
|
if (!revealRequest || !canReveal) return;
|
|
17075
|
-
setExpandedByRoot((current) => ({
|
|
17076
|
-
...current,
|
|
17077
|
-
[revealRequest.id]: true
|
|
17078
|
-
}));
|
|
17080
|
+
setExpandedByRoot((current) => ({ ...current, [revealRequest.id]: true }));
|
|
17079
17081
|
const frameId = window.requestAnimationFrame(() => {
|
|
17080
17082
|
const targetElement = navRef.current?.querySelector(
|
|
17081
|
-
`[data-navigation-sidebar-
|
|
17083
|
+
`[data-navigation-sidebar-item-id="${CSS.escape(revealRequest.id)}"]`
|
|
17082
17084
|
);
|
|
17083
17085
|
if (targetElement instanceof HTMLElement) {
|
|
17084
17086
|
targetElement.scrollIntoView({
|
|
@@ -17090,6 +17092,34 @@ function SidebarNavigationList({
|
|
|
17090
17092
|
});
|
|
17091
17093
|
return () => window.cancelAnimationFrame(frameId);
|
|
17092
17094
|
}, [canReveal, revealRequest]);
|
|
17095
|
+
const renderItems = (navigationItems, depth = 0) => navigationItems.map((item) => {
|
|
17096
|
+
const isGroup = Boolean(item.children?.length);
|
|
17097
|
+
const containsActiveItem = containsNavigationItem(item, activeItemId);
|
|
17098
|
+
const isExpanded = !item.disabled && (expandedByRoot[item.id] ?? containsActiveItem);
|
|
17099
|
+
return /* @__PURE__ */ jsxs("div", { "data-navigation-sidebar-item-id": item.id, children: [
|
|
17100
|
+
/* @__PURE__ */ jsx(
|
|
17101
|
+
NavButton,
|
|
17102
|
+
{
|
|
17103
|
+
active: containsActiveItem,
|
|
17104
|
+
className: depth > 0 ? "pl-3" : void 0,
|
|
17105
|
+
disabled: item.disabled,
|
|
17106
|
+
icon: item.icon,
|
|
17107
|
+
onClick: () => isGroup ? toggleRoot(item.id) : onNavigate?.(item.id),
|
|
17108
|
+
postfix: isGroup ? /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsx(
|
|
17109
|
+
HeadbarChevronIcon,
|
|
17110
|
+
{
|
|
17111
|
+
open: false,
|
|
17112
|
+
sideways: true,
|
|
17113
|
+
className: "text-[hsl(var(--foreground))] transition-transform duration-200",
|
|
17114
|
+
style: { transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)" }
|
|
17115
|
+
}
|
|
17116
|
+
) }) : void 0,
|
|
17117
|
+
children: item.label
|
|
17118
|
+
}
|
|
17119
|
+
),
|
|
17120
|
+
isGroup && isExpanded ? /* @__PURE__ */ jsx("div", { className: "mt-1 ml-3 flex flex-col gap-1 border-l border-[hsl(var(--input))] pl-2", children: renderItems(item.children ?? [], depth + 1) }) : null
|
|
17121
|
+
] }, item.id);
|
|
17122
|
+
});
|
|
17093
17123
|
return /* @__PURE__ */ jsxs(
|
|
17094
17124
|
"div",
|
|
17095
17125
|
{
|
|
@@ -17102,64 +17132,7 @@ function SidebarNavigationList({
|
|
|
17102
17132
|
{
|
|
17103
17133
|
ref: navRef,
|
|
17104
17134
|
className: "monkeys-navigation-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]",
|
|
17105
|
-
children: items
|
|
17106
|
-
const isGroup = Boolean(item.children?.length);
|
|
17107
|
-
const isExpanded = !item.disabled && Boolean(expandedByRoot[item.id]);
|
|
17108
|
-
const isActive = activeRootId === item.id;
|
|
17109
|
-
if (isGroup) {
|
|
17110
|
-
return /* @__PURE__ */ jsxs("div", { "data-navigation-sidebar-root-id": item.id, children: [
|
|
17111
|
-
/* @__PURE__ */ jsx(
|
|
17112
|
-
NavButton,
|
|
17113
|
-
{
|
|
17114
|
-
active: isActive,
|
|
17115
|
-
disabled: item.disabled,
|
|
17116
|
-
icon: item.icon,
|
|
17117
|
-
onClick: () => toggleRoot(item.id),
|
|
17118
|
-
postfix: /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsx(
|
|
17119
|
-
"svg",
|
|
17120
|
-
{
|
|
17121
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17122
|
-
width: "16",
|
|
17123
|
-
height: "16",
|
|
17124
|
-
viewBox: "0 0 24 24",
|
|
17125
|
-
fill: "none",
|
|
17126
|
-
stroke: "currentColor",
|
|
17127
|
-
strokeWidth: "2",
|
|
17128
|
-
strokeLinecap: "round",
|
|
17129
|
-
strokeLinejoin: "round",
|
|
17130
|
-
className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
|
|
17131
|
-
style: {
|
|
17132
|
-
transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
|
|
17133
|
-
},
|
|
17134
|
-
children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
|
|
17135
|
-
}
|
|
17136
|
-
) }),
|
|
17137
|
-
children: item.label
|
|
17138
|
-
}
|
|
17139
|
-
),
|
|
17140
|
-
isExpanded ? /* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-col gap-1", children: item.children?.map((child) => /* @__PURE__ */ jsx(
|
|
17141
|
-
NavButton,
|
|
17142
|
-
{
|
|
17143
|
-
active: activeItemId === child.id,
|
|
17144
|
-
disabled: child.disabled,
|
|
17145
|
-
onClick: () => onNavigate?.(child.id),
|
|
17146
|
-
children: child.label
|
|
17147
|
-
},
|
|
17148
|
-
child.id
|
|
17149
|
-
)) }) : null
|
|
17150
|
-
] }, item.id);
|
|
17151
|
-
}
|
|
17152
|
-
return /* @__PURE__ */ jsx("div", { "data-navigation-sidebar-root-id": item.id, children: /* @__PURE__ */ jsx(
|
|
17153
|
-
NavButton,
|
|
17154
|
-
{
|
|
17155
|
-
active: isActive,
|
|
17156
|
-
disabled: item.disabled,
|
|
17157
|
-
icon: item.icon,
|
|
17158
|
-
onClick: () => onNavigate?.(item.id),
|
|
17159
|
-
children: item.label
|
|
17160
|
-
}
|
|
17161
|
-
) }, item.id);
|
|
17162
|
-
})
|
|
17135
|
+
children: renderItems(items)
|
|
17163
17136
|
}
|
|
17164
17137
|
)
|
|
17165
17138
|
]
|
|
@@ -17318,22 +17291,30 @@ function Sidebar({
|
|
|
17318
17291
|
] })
|
|
17319
17292
|
] });
|
|
17320
17293
|
}
|
|
17321
|
-
function HeadbarChevronIcon({
|
|
17294
|
+
function HeadbarChevronIcon({
|
|
17295
|
+
className,
|
|
17296
|
+
open,
|
|
17297
|
+
sideways = false,
|
|
17298
|
+
style
|
|
17299
|
+
}) {
|
|
17322
17300
|
return /* @__PURE__ */ jsx(
|
|
17323
17301
|
"svg",
|
|
17324
17302
|
{
|
|
17325
17303
|
"aria-hidden": "true",
|
|
17326
17304
|
className: cn2(
|
|
17327
|
-
"h-4 w-4 shrink-0
|
|
17328
|
-
|
|
17305
|
+
"h-4 w-4 shrink-0",
|
|
17306
|
+
!sideways && "transition-transform duration-200",
|
|
17307
|
+
!sideways && open && "rotate-180",
|
|
17308
|
+
className
|
|
17329
17309
|
),
|
|
17310
|
+
style,
|
|
17330
17311
|
viewBox: "0 0 24 24",
|
|
17331
17312
|
fill: "none",
|
|
17332
17313
|
stroke: "currentColor",
|
|
17333
17314
|
strokeWidth: "2",
|
|
17334
17315
|
strokeLinecap: "round",
|
|
17335
17316
|
strokeLinejoin: "round",
|
|
17336
|
-
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
17317
|
+
children: /* @__PURE__ */ jsx("path", { d: sideways ? "m9 18 6-6-6-6" : "m6 9 6 6 6-6" })
|
|
17337
17318
|
}
|
|
17338
17319
|
);
|
|
17339
17320
|
}
|
|
@@ -17345,6 +17326,100 @@ function getHeadbarSummaryTitle(rootLabel, childLabel) {
|
|
|
17345
17326
|
const childText = childLabel.trim();
|
|
17346
17327
|
return rootText && childText ? `${rootText} ${childText}` : void 0;
|
|
17347
17328
|
}
|
|
17329
|
+
var HEADBAR_DROPDOWN_ITEM_CLASS = "relative flex w-full min-w-0 cursor-pointer select-none items-center gap-2.5 px-3 py-2 text-sm outline-none transition-colors hover:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))] hover:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))] focus:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))] focus:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))] data-[highlighted]:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))] data-[highlighted]:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))]";
|
|
17330
|
+
var HEADBAR_DROPDOWN_CONTENT_STYLE = {
|
|
17331
|
+
width: "max-content",
|
|
17332
|
+
maxWidth: "min(20rem, var(--radix-dropdown-menu-content-available-width))",
|
|
17333
|
+
background: "var(--monkeys-component-navigation-headbar-menu-background, hsl(var(--popover)))",
|
|
17334
|
+
borderColor: "var(--monkeys-component-navigation-headbar-menu-border-color, hsl(var(--border)))",
|
|
17335
|
+
color: "var(--monkeys-component-navigation-headbar-menu-foreground, hsl(var(--popover-foreground)))",
|
|
17336
|
+
boxShadow: "var(--monkeys-component-navigation-headbar-menu-shadow, 0 10px 15px -3px rgb(0 0 0 / 0.1))"
|
|
17337
|
+
};
|
|
17338
|
+
function HeadbarDropdownItems({
|
|
17339
|
+
activeItemId,
|
|
17340
|
+
items,
|
|
17341
|
+
menuContentRadiusClass,
|
|
17342
|
+
menuItemRadiusClass,
|
|
17343
|
+
onNavigate,
|
|
17344
|
+
onNavigateComplete,
|
|
17345
|
+
useTokenRadius
|
|
17346
|
+
}) {
|
|
17347
|
+
return items.map((item) => {
|
|
17348
|
+
const label = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17349
|
+
item.icon ? /* @__PURE__ */ jsx("span", { className: "inline-flex h-4 w-4 shrink-0 items-center justify-center text-[hsl(var(--muted-foreground))]", children: item.icon }) : null,
|
|
17350
|
+
/* @__PURE__ */ jsx(
|
|
17351
|
+
"span",
|
|
17352
|
+
{
|
|
17353
|
+
className: cn2(
|
|
17354
|
+
"min-w-0 truncate",
|
|
17355
|
+
Boolean(item.children?.length) && "flex-1"
|
|
17356
|
+
),
|
|
17357
|
+
children: item.headbarLabel ?? item.label
|
|
17358
|
+
}
|
|
17359
|
+
)
|
|
17360
|
+
] });
|
|
17361
|
+
if (item.children?.length) {
|
|
17362
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Sub, { children: [
|
|
17363
|
+
/* @__PURE__ */ jsxs(
|
|
17364
|
+
DropdownMenu3.SubTrigger,
|
|
17365
|
+
{
|
|
17366
|
+
disabled: item.disabled,
|
|
17367
|
+
className: cn2(HEADBAR_DROPDOWN_ITEM_CLASS, menuItemRadiusClass),
|
|
17368
|
+
children: [
|
|
17369
|
+
label,
|
|
17370
|
+
/* @__PURE__ */ jsx(HeadbarChevronIcon, { open: false, sideways: true })
|
|
17371
|
+
]
|
|
17372
|
+
}
|
|
17373
|
+
),
|
|
17374
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
17375
|
+
DropdownMenu3.SubContent,
|
|
17376
|
+
{
|
|
17377
|
+
sideOffset: 4,
|
|
17378
|
+
alignOffset: -6,
|
|
17379
|
+
className: cn2(
|
|
17380
|
+
"z-50 border p-1.5 animate-in fade-in-0 zoom-in-95",
|
|
17381
|
+
menuContentRadiusClass
|
|
17382
|
+
),
|
|
17383
|
+
style: {
|
|
17384
|
+
...HEADBAR_DROPDOWN_CONTENT_STYLE,
|
|
17385
|
+
minWidth: "12rem"
|
|
17386
|
+
},
|
|
17387
|
+
children: /* @__PURE__ */ jsx(
|
|
17388
|
+
HeadbarDropdownItems,
|
|
17389
|
+
{
|
|
17390
|
+
activeItemId,
|
|
17391
|
+
items: item.children,
|
|
17392
|
+
menuContentRadiusClass,
|
|
17393
|
+
menuItemRadiusClass,
|
|
17394
|
+
onNavigate,
|
|
17395
|
+
onNavigateComplete,
|
|
17396
|
+
useTokenRadius
|
|
17397
|
+
}
|
|
17398
|
+
)
|
|
17399
|
+
}
|
|
17400
|
+
) })
|
|
17401
|
+
] }, item.id);
|
|
17402
|
+
}
|
|
17403
|
+
return /* @__PURE__ */ jsxs(
|
|
17404
|
+
DropdownMenu3.Item,
|
|
17405
|
+
{
|
|
17406
|
+
disabled: item.disabled,
|
|
17407
|
+
className: cn2(HEADBAR_DROPDOWN_ITEM_CLASS, menuItemRadiusClass),
|
|
17408
|
+
style: getHeadbarItemStyle(item.id === activeItemId, useTokenRadius),
|
|
17409
|
+
onSelect: () => {
|
|
17410
|
+
if (item.disabled) return;
|
|
17411
|
+
onNavigateComplete();
|
|
17412
|
+
onNavigate?.(item.id);
|
|
17413
|
+
},
|
|
17414
|
+
children: [
|
|
17415
|
+
label,
|
|
17416
|
+
item.trailing
|
|
17417
|
+
]
|
|
17418
|
+
},
|
|
17419
|
+
item.id
|
|
17420
|
+
);
|
|
17421
|
+
});
|
|
17422
|
+
}
|
|
17348
17423
|
function HeadbarNavMenuItem({
|
|
17349
17424
|
activeItemId,
|
|
17350
17425
|
compound,
|
|
@@ -17388,13 +17463,13 @@ function HeadbarNavMenuItem({
|
|
|
17388
17463
|
};
|
|
17389
17464
|
useEffect(() => clearCloseTimer, []);
|
|
17390
17465
|
return /* @__PURE__ */ jsxs(
|
|
17391
|
-
|
|
17466
|
+
DropdownMenu3.Root,
|
|
17392
17467
|
{
|
|
17393
17468
|
modal: false,
|
|
17394
17469
|
open: isOpen,
|
|
17395
17470
|
onOpenChange: (nextOpen) => setOpen(!item.disabled && nextOpen),
|
|
17396
17471
|
children: [
|
|
17397
|
-
/* @__PURE__ */ jsx(
|
|
17472
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
17398
17473
|
BaseButton,
|
|
17399
17474
|
{
|
|
17400
17475
|
appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
|
|
@@ -17440,8 +17515,8 @@ function HeadbarNavMenuItem({
|
|
|
17440
17515
|
)
|
|
17441
17516
|
}
|
|
17442
17517
|
) }),
|
|
17443
|
-
/* @__PURE__ */ jsx(
|
|
17444
|
-
|
|
17518
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
17519
|
+
DropdownMenu3.Content,
|
|
17445
17520
|
{
|
|
17446
17521
|
align: "start",
|
|
17447
17522
|
sideOffset: 5,
|
|
@@ -17453,40 +17528,22 @@ function HeadbarNavMenuItem({
|
|
|
17453
17528
|
menuContentRadiusClass
|
|
17454
17529
|
),
|
|
17455
17530
|
style: {
|
|
17456
|
-
|
|
17531
|
+
...HEADBAR_DROPDOWN_CONTENT_STYLE,
|
|
17457
17532
|
minWidth: "var(--radix-dropdown-menu-trigger-width)",
|
|
17458
|
-
maxWidth: "min(20rem, var(--radix-dropdown-menu-content-available-width))",
|
|
17459
|
-
background: "var(--monkeys-component-navigation-headbar-menu-background, hsl(var(--popover)))",
|
|
17460
|
-
borderColor: "var(--monkeys-component-navigation-headbar-menu-border-color, hsl(var(--border)))",
|
|
17461
|
-
color: "var(--monkeys-component-navigation-headbar-menu-foreground, hsl(var(--popover-foreground)))",
|
|
17462
|
-
boxShadow: "var(--monkeys-component-navigation-headbar-menu-shadow, 0 10px 15px -3px rgb(0 0 0 / 0.1))",
|
|
17463
17533
|
backdropFilter: "blur(var(--monkeys-component-navigation-headbar-menu-backdrop-blur, 0px))"
|
|
17464
17534
|
},
|
|
17465
|
-
children:
|
|
17466
|
-
|
|
17535
|
+
children: /* @__PURE__ */ jsx(
|
|
17536
|
+
HeadbarDropdownItems,
|
|
17467
17537
|
{
|
|
17468
|
-
|
|
17469
|
-
|
|
17470
|
-
|
|
17471
|
-
|
|
17472
|
-
|
|
17473
|
-
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
onSelect: () => {
|
|
17478
|
-
if (child.disabled) return;
|
|
17479
|
-
setOpen(false);
|
|
17480
|
-
onNavigate?.(child.id);
|
|
17481
|
-
},
|
|
17482
|
-
children: [
|
|
17483
|
-
child.icon ? /* @__PURE__ */ jsx("span", { className: "inline-flex h-4 w-4 shrink-0 items-center justify-center text-[hsl(var(--muted-foreground))]", children: child.icon }) : null,
|
|
17484
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: child.headbarLabel ?? child.label }),
|
|
17485
|
-
child.trailing
|
|
17486
|
-
]
|
|
17487
|
-
},
|
|
17488
|
-
child.id
|
|
17489
|
-
))
|
|
17538
|
+
activeItemId,
|
|
17539
|
+
items: item.children ?? [],
|
|
17540
|
+
menuContentRadiusClass,
|
|
17541
|
+
menuItemRadiusClass,
|
|
17542
|
+
onNavigate,
|
|
17543
|
+
onNavigateComplete: () => setOpen(false),
|
|
17544
|
+
useTokenRadius
|
|
17545
|
+
}
|
|
17546
|
+
)
|
|
17490
17547
|
}
|
|
17491
17548
|
) })
|
|
17492
17549
|
]
|
|
@@ -17512,9 +17569,7 @@ function NavigationHeadbarMenu({
|
|
|
17512
17569
|
const isActive = activeRootId === item.id || activeItemId === item.id;
|
|
17513
17570
|
const hasSecondaryAction = Boolean(item.headbarSecondaryAction);
|
|
17514
17571
|
const rootLabel = item.headbarLabel ?? item.label;
|
|
17515
|
-
const activeChild = item
|
|
17516
|
-
(child) => child.id === activeItemId
|
|
17517
|
-
);
|
|
17572
|
+
const activeChild = findActiveNavigationBranch(item, activeItemId);
|
|
17518
17573
|
const activeChildLabel = activeChild ? activeChild.headbarLabel ?? activeChild.label : void 0;
|
|
17519
17574
|
const label = activeChild ? /* @__PURE__ */ jsxs(
|
|
17520
17575
|
"span",
|
|
@@ -17720,6 +17775,9 @@ function NavigationLayout({
|
|
|
17720
17775
|
className,
|
|
17721
17776
|
collapsedSidebarAccountMenu,
|
|
17722
17777
|
collapsedSidebarWidth = NAVIGATION_LAYOUT_SIDEBAR_COLLAPSED_WIDTH,
|
|
17778
|
+
contextualSidebar = false,
|
|
17779
|
+
contextualSidebarHeader,
|
|
17780
|
+
contextualSidebarWidth = NAVIGATION_LAYOUT_CONTEXTUAL_SIDEBAR_WIDTH,
|
|
17723
17781
|
defaultMode = "headbar",
|
|
17724
17782
|
defaultSidebarCollapsed = false,
|
|
17725
17783
|
expandedSidebarWidth = NAVIGATION_LAYOUT_SIDEBAR_EXPANDED_WIDTH,
|
|
@@ -17751,6 +17809,9 @@ function NavigationLayout({
|
|
|
17751
17809
|
const sidebarCollapsed = isSidebarCollapsedControlled ? controlledSidebarCollapsed : uncontrolledSidebarCollapsed;
|
|
17752
17810
|
const isHeadbarMode = navigationMode === "headbar";
|
|
17753
17811
|
const sidebarWidth = sidebarCollapsed ? collapsedSidebarWidth : expandedSidebarWidth;
|
|
17812
|
+
const resolvedActiveRootId = activeRootId ?? findNavigationRootId(navItems, activeItemId);
|
|
17813
|
+
const activeRoot = navItems.find((item) => item.id === resolvedActiveRootId);
|
|
17814
|
+
const contextualItems = activeRoot?.children ?? [];
|
|
17754
17815
|
useEffect(() => {
|
|
17755
17816
|
if (!isModeControlled) {
|
|
17756
17817
|
setUncontrolledMode(defaultMode);
|
|
@@ -17821,7 +17882,25 @@ function NavigationLayout({
|
|
|
17821
17882
|
}
|
|
17822
17883
|
)
|
|
17823
17884
|
});
|
|
17824
|
-
const sidebar = isHeadbarMode
|
|
17885
|
+
const sidebar = isHeadbarMode && contextualSidebar && contextualItems.length ? /* @__PURE__ */ jsx(
|
|
17886
|
+
"aside",
|
|
17887
|
+
{
|
|
17888
|
+
className: "relative h-full min-h-0 shrink-0 overflow-hidden",
|
|
17889
|
+
"data-navigation-contextual-sidebar": resolvedActiveRootId,
|
|
17890
|
+
style: { width: contextualSidebarWidth },
|
|
17891
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 w-full flex-col gap-3 rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] px-4 py-4", children: [
|
|
17892
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-2 text-sm font-semibold text-[hsl(var(--foreground))]", children: contextualSidebarHeader ?? activeRoot?.label }),
|
|
17893
|
+
/* @__PURE__ */ jsx(
|
|
17894
|
+
SidebarNavigationList,
|
|
17895
|
+
{
|
|
17896
|
+
activeItemId,
|
|
17897
|
+
items: contextualItems,
|
|
17898
|
+
onNavigate
|
|
17899
|
+
}
|
|
17900
|
+
)
|
|
17901
|
+
] })
|
|
17902
|
+
}
|
|
17903
|
+
) : isHeadbarMode ? null : /* @__PURE__ */ jsx(
|
|
17825
17904
|
"div",
|
|
17826
17905
|
{
|
|
17827
17906
|
className: cn2(
|
|
@@ -17860,7 +17939,7 @@ function NavigationLayout({
|
|
|
17860
17939
|
NavigationHeadbar,
|
|
17861
17940
|
{
|
|
17862
17941
|
activeItemId,
|
|
17863
|
-
activeRootId:
|
|
17942
|
+
activeRootId: resolvedActiveRootId,
|
|
17864
17943
|
actions: allowModeSwitch ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17865
17944
|
headbarActions,
|
|
17866
17945
|
/* @__PURE__ */ jsx(
|
|
@@ -18323,45 +18402,45 @@ var InputGroupTextarea = React4.forwardRef(({ className, ...props }, ref) => /*
|
|
|
18323
18402
|
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
18324
18403
|
var menuItemClassName = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
18325
18404
|
var menuContentClassName = "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-menu-surface p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
18326
|
-
var DropdownMenu4 =
|
|
18327
|
-
var DropdownMenuTrigger =
|
|
18328
|
-
var DropdownMenuSubTrigger = React4.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
18405
|
+
var DropdownMenu4 = DropdownMenu3.Root;
|
|
18406
|
+
var DropdownMenuTrigger = DropdownMenu3.Trigger;
|
|
18407
|
+
var DropdownMenuSubTrigger = React4.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu3.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
|
|
18329
18408
|
children,
|
|
18330
18409
|
/* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true", className: "ml-auto" })
|
|
18331
18410
|
] }));
|
|
18332
18411
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
18333
18412
|
var DropdownMenuSubContent = React4.forwardRef(
|
|
18334
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18413
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu3.SubContent, { ref, className: cn(menuContentClassName, className), ...props })
|
|
18335
18414
|
);
|
|
18336
18415
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
18337
18416
|
var DropdownMenuContent = React4.forwardRef(
|
|
18338
|
-
({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18417
|
+
({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(DropdownMenu3.Content, { ref, sideOffset, className: cn(menuContentClassName, className), ...props }) })
|
|
18339
18418
|
);
|
|
18340
18419
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
18341
18420
|
var DropdownMenuItem = React4.forwardRef(
|
|
18342
|
-
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18421
|
+
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu3.Item, { ref, className: cn(menuItemClassName, inset && "pl-8", className), ...props })
|
|
18343
18422
|
);
|
|
18344
18423
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
18345
18424
|
var DropdownMenuCheckboxItem = React4.forwardRef(
|
|
18346
|
-
({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
18347
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
18425
|
+
({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu3.CheckboxItem, { ref, className: cn(menuItemClassName, "pl-8", className), checked, ...props, children: [
|
|
18426
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu3.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }),
|
|
18348
18427
|
children
|
|
18349
18428
|
] })
|
|
18350
18429
|
);
|
|
18351
18430
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
18352
18431
|
var DropdownMenuRadioItem = React4.forwardRef(
|
|
18353
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
18354
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
18432
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu3.RadioItem, { ref, className: cn(menuItemClassName, "pl-8", className), ...props, children: [
|
|
18433
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu3.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { "aria-hidden": "true", className: "h-2 w-2 fill-current" }) }) }),
|
|
18355
18434
|
children
|
|
18356
18435
|
] })
|
|
18357
18436
|
);
|
|
18358
18437
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
18359
18438
|
var DropdownMenuLabel = React4.forwardRef(
|
|
18360
|
-
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18439
|
+
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu3.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })
|
|
18361
18440
|
);
|
|
18362
18441
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
18363
18442
|
var DropdownMenuSeparator = React4.forwardRef(
|
|
18364
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18443
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu3.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
|
|
18365
18444
|
);
|
|
18366
18445
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
18367
18446
|
var SelectTrigger = React4.forwardRef(
|
|
@@ -22619,8 +22698,8 @@ function DataExplorerSelect({
|
|
|
22619
22698
|
/* @__PURE__ */ jsx("span", { children: label }),
|
|
22620
22699
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: selected?.label ?? placeholder })
|
|
22621
22700
|
] }) : selected?.label ?? label ?? placeholder;
|
|
22622
|
-
return /* @__PURE__ */ jsxs(
|
|
22623
|
-
/* @__PURE__ */ jsx(
|
|
22701
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
22702
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
22624
22703
|
"button",
|
|
22625
22704
|
{
|
|
22626
22705
|
type: "button",
|
|
@@ -22648,8 +22727,8 @@ function DataExplorerSelect({
|
|
|
22648
22727
|
]
|
|
22649
22728
|
}
|
|
22650
22729
|
) }),
|
|
22651
|
-
/* @__PURE__ */ jsx(
|
|
22652
|
-
|
|
22730
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
22731
|
+
DropdownMenu3.Content,
|
|
22653
22732
|
{
|
|
22654
22733
|
align,
|
|
22655
22734
|
sideOffset,
|
|
@@ -22657,7 +22736,7 @@ function DataExplorerSelect({
|
|
|
22657
22736
|
style: theme.styles.menuContent,
|
|
22658
22737
|
onClick: (event) => event.stopPropagation(),
|
|
22659
22738
|
children: /* @__PURE__ */ jsx(
|
|
22660
|
-
|
|
22739
|
+
DropdownMenu3.RadioGroup,
|
|
22661
22740
|
{
|
|
22662
22741
|
value,
|
|
22663
22742
|
onValueChange: (nextValue) => {
|
|
@@ -22665,7 +22744,7 @@ function DataExplorerSelect({
|
|
|
22665
22744
|
void onValueChange?.(nextValue);
|
|
22666
22745
|
},
|
|
22667
22746
|
children: options.map((option) => /* @__PURE__ */ jsxs(
|
|
22668
|
-
|
|
22747
|
+
DropdownMenu3.RadioItem,
|
|
22669
22748
|
{
|
|
22670
22749
|
value: option.value,
|
|
22671
22750
|
title: option.title,
|
|
@@ -22711,9 +22790,9 @@ function renderMenuItem(action, context, theme, className) {
|
|
|
22711
22790
|
const disabled = (resolveDataExplorerValue(action.disabled, context) ?? false) || (resolveDataExplorerValue(action.loading, context) ?? false);
|
|
22712
22791
|
const active = resolveDataExplorerValue(action.active, context) ?? false;
|
|
22713
22792
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
22714
|
-
action.separatorBefore ? /* @__PURE__ */ jsx(
|
|
22793
|
+
action.separatorBefore ? /* @__PURE__ */ jsx(DropdownMenu3.Separator, { className: theme.slots.menuSeparator }) : null,
|
|
22715
22794
|
/* @__PURE__ */ jsxs(
|
|
22716
|
-
|
|
22795
|
+
DropdownMenu3.Item,
|
|
22717
22796
|
{
|
|
22718
22797
|
title: action.title,
|
|
22719
22798
|
disabled,
|
|
@@ -22734,7 +22813,7 @@ function renderMenuItem(action, context, theme, className) {
|
|
|
22734
22813
|
]
|
|
22735
22814
|
}
|
|
22736
22815
|
),
|
|
22737
|
-
action.separatorAfter ? /* @__PURE__ */ jsx(
|
|
22816
|
+
action.separatorAfter ? /* @__PURE__ */ jsx(DropdownMenu3.Separator, { className: theme.slots.menuSeparator }) : null
|
|
22738
22817
|
] }, action.id);
|
|
22739
22818
|
}
|
|
22740
22819
|
function renderMenuAction(action, context, theme, classNames, appearance) {
|
|
@@ -22743,8 +22822,8 @@ function renderMenuAction(action, context, theme, classNames, appearance) {
|
|
|
22743
22822
|
const visibleItems = (action.items ?? []).filter(
|
|
22744
22823
|
(item) => resolveDataExplorerValue(item.visible, context) ?? true
|
|
22745
22824
|
);
|
|
22746
|
-
return /* @__PURE__ */ jsxs(
|
|
22747
|
-
/* @__PURE__ */ jsx(
|
|
22825
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
22826
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
22748
22827
|
DataExplorerButton,
|
|
22749
22828
|
{
|
|
22750
22829
|
title: action.title,
|
|
@@ -22760,8 +22839,8 @@ function renderMenuAction(action, context, theme, classNames, appearance) {
|
|
|
22760
22839
|
className: classNames?.action
|
|
22761
22840
|
}
|
|
22762
22841
|
) }),
|
|
22763
|
-
/* @__PURE__ */ jsx(
|
|
22764
|
-
|
|
22842
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsxs(
|
|
22843
|
+
DropdownMenu3.Content,
|
|
22765
22844
|
{
|
|
22766
22845
|
align: action.align ?? "end",
|
|
22767
22846
|
sideOffset: action.sideOffset ?? 6,
|
|
@@ -22770,8 +22849,8 @@ function renderMenuAction(action, context, theme, classNames, appearance) {
|
|
|
22770
22849
|
onClick: (event) => event.stopPropagation(),
|
|
22771
22850
|
children: [
|
|
22772
22851
|
action.menuLabel ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22773
|
-
/* @__PURE__ */ jsx(
|
|
22774
|
-
/* @__PURE__ */ jsx(
|
|
22852
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Label, { className: theme.slots.menuLabel, children: action.menuLabel }),
|
|
22853
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Separator, { className: theme.slots.menuSeparator })
|
|
22775
22854
|
] }) : null,
|
|
22776
22855
|
visibleItems.map(
|
|
22777
22856
|
(item) => renderMenuItem(item, context, theme, classNames?.menuItem)
|
|
@@ -23602,8 +23681,8 @@ function DataExplorerDisplayActionMenu({
|
|
|
23602
23681
|
if (visibleActions.length === 0) {
|
|
23603
23682
|
return null;
|
|
23604
23683
|
}
|
|
23605
|
-
return /* @__PURE__ */ jsx("span", { className: cn3("inline-flex", classNames?.root), children: /* @__PURE__ */ jsxs(
|
|
23606
|
-
/* @__PURE__ */ jsx(
|
|
23684
|
+
return /* @__PURE__ */ jsx("span", { className: cn3("inline-flex", classNames?.root), children: /* @__PURE__ */ jsxs(DropdownMenu3.Root, { open, onOpenChange: setOpen, children: [
|
|
23685
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
23607
23686
|
"button",
|
|
23608
23687
|
{
|
|
23609
23688
|
type: "button",
|
|
@@ -23620,8 +23699,8 @@ function DataExplorerDisplayActionMenu({
|
|
|
23620
23699
|
]
|
|
23621
23700
|
}
|
|
23622
23701
|
) }),
|
|
23623
|
-
/* @__PURE__ */ jsx(
|
|
23624
|
-
|
|
23702
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsxs(
|
|
23703
|
+
DropdownMenu3.Content,
|
|
23625
23704
|
{
|
|
23626
23705
|
align,
|
|
23627
23706
|
sideOffset,
|
|
@@ -23634,7 +23713,7 @@ function DataExplorerDisplayActionMenu({
|
|
|
23634
23713
|
children: [
|
|
23635
23714
|
label ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23636
23715
|
/* @__PURE__ */ jsx(
|
|
23637
|
-
|
|
23716
|
+
DropdownMenu3.Label,
|
|
23638
23717
|
{
|
|
23639
23718
|
className: cn3(
|
|
23640
23719
|
theme.slots.menuLabel,
|
|
@@ -23644,7 +23723,7 @@ function DataExplorerDisplayActionMenu({
|
|
|
23644
23723
|
}
|
|
23645
23724
|
),
|
|
23646
23725
|
/* @__PURE__ */ jsx(
|
|
23647
|
-
|
|
23726
|
+
DropdownMenu3.Separator,
|
|
23648
23727
|
{
|
|
23649
23728
|
className: cn3(
|
|
23650
23729
|
theme.slots.menuSeparator,
|
|
@@ -23658,7 +23737,7 @@ function DataExplorerDisplayActionMenu({
|
|
|
23658
23737
|
if (action.render) {
|
|
23659
23738
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
23660
23739
|
action.separatorBefore ? /* @__PURE__ */ jsx(
|
|
23661
|
-
|
|
23740
|
+
DropdownMenu3.Separator,
|
|
23662
23741
|
{
|
|
23663
23742
|
className: cn3(
|
|
23664
23743
|
theme.slots.menuSeparator,
|
|
@@ -23668,7 +23747,7 @@ function DataExplorerDisplayActionMenu({
|
|
|
23668
23747
|
) : null,
|
|
23669
23748
|
action.render(context),
|
|
23670
23749
|
action.separatorAfter ? /* @__PURE__ */ jsx(
|
|
23671
|
-
|
|
23750
|
+
DropdownMenu3.Separator,
|
|
23672
23751
|
{
|
|
23673
23752
|
className: cn3(
|
|
23674
23753
|
theme.slots.menuSeparator,
|
|
@@ -23680,7 +23759,7 @@ function DataExplorerDisplayActionMenu({
|
|
|
23680
23759
|
}
|
|
23681
23760
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
23682
23761
|
action.separatorBefore ? /* @__PURE__ */ jsx(
|
|
23683
|
-
|
|
23762
|
+
DropdownMenu3.Separator,
|
|
23684
23763
|
{
|
|
23685
23764
|
className: cn3(
|
|
23686
23765
|
"-mx-1 my-1 h-px bg-border",
|
|
@@ -23689,7 +23768,7 @@ function DataExplorerDisplayActionMenu({
|
|
|
23689
23768
|
}
|
|
23690
23769
|
) : null,
|
|
23691
23770
|
/* @__PURE__ */ jsxs(
|
|
23692
|
-
|
|
23771
|
+
DropdownMenu3.Item,
|
|
23693
23772
|
{
|
|
23694
23773
|
title: action.title,
|
|
23695
23774
|
disabled,
|
|
@@ -23740,7 +23819,7 @@ function DataExplorerDisplayActionMenu({
|
|
|
23740
23819
|
}
|
|
23741
23820
|
),
|
|
23742
23821
|
action.separatorAfter ? /* @__PURE__ */ jsx(
|
|
23743
|
-
|
|
23822
|
+
DropdownMenu3.Separator,
|
|
23744
23823
|
{
|
|
23745
23824
|
className: cn3(
|
|
23746
23825
|
theme.slots.menuSeparator,
|
|
@@ -26219,8 +26298,8 @@ function DataExplorerViewTree({
|
|
|
26219
26298
|
return resolveDataExplorerValue(action.visible, payload) ?? true;
|
|
26220
26299
|
});
|
|
26221
26300
|
if (visibleActions.length === 0) return null;
|
|
26222
|
-
return /* @__PURE__ */ jsxs(
|
|
26223
|
-
/* @__PURE__ */ jsx(
|
|
26301
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
26302
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
26224
26303
|
"button",
|
|
26225
26304
|
{
|
|
26226
26305
|
type: "button",
|
|
@@ -26235,8 +26314,8 @@ function DataExplorerViewTree({
|
|
|
26235
26314
|
children: /* @__PURE__ */ jsx(MoreIcon3, {})
|
|
26236
26315
|
}
|
|
26237
26316
|
) }),
|
|
26238
|
-
/* @__PURE__ */ jsx(
|
|
26239
|
-
|
|
26317
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
26318
|
+
DropdownMenu3.Content,
|
|
26240
26319
|
{
|
|
26241
26320
|
align: "end",
|
|
26242
26321
|
sideOffset: 6,
|
|
@@ -26251,9 +26330,9 @@ function DataExplorerViewTree({
|
|
|
26251
26330
|
return /* @__PURE__ */ jsx("div", { children: action.render(payload) }, action.id);
|
|
26252
26331
|
}
|
|
26253
26332
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
26254
|
-
action.separatorBefore ? /* @__PURE__ */ jsx(
|
|
26333
|
+
action.separatorBefore ? /* @__PURE__ */ jsx(DropdownMenu3.Separator, { className: theme.slots.menuSeparator }) : null,
|
|
26255
26334
|
/* @__PURE__ */ jsxs(
|
|
26256
|
-
|
|
26335
|
+
DropdownMenu3.Item,
|
|
26257
26336
|
{
|
|
26258
26337
|
title: action.title,
|
|
26259
26338
|
disabled,
|
|
@@ -26275,7 +26354,7 @@ function DataExplorerViewTree({
|
|
|
26275
26354
|
]
|
|
26276
26355
|
}
|
|
26277
26356
|
),
|
|
26278
|
-
action.separatorAfter ? /* @__PURE__ */ jsx(
|
|
26357
|
+
action.separatorAfter ? /* @__PURE__ */ jsx(DropdownMenu3.Separator, { className: theme.slots.menuSeparator }) : null
|
|
26279
26358
|
] }, action.id);
|
|
26280
26359
|
})
|
|
26281
26360
|
}
|
|
@@ -27546,8 +27625,8 @@ function CollapsedChildMenu({
|
|
|
27546
27625
|
const itemLabel = typeof item.label === "string" ? item.label : item.id;
|
|
27547
27626
|
const itemTriggerDisabled = Boolean(item.disabled) || !onChildSelect || enabledChildren.length === 0;
|
|
27548
27627
|
const domProps = item.domProps ?? {};
|
|
27549
|
-
return /* @__PURE__ */ jsxs(
|
|
27550
|
-
/* @__PURE__ */ jsx(
|
|
27628
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
27629
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: triggerVariant === "item" && appearance ? /* @__PURE__ */ jsx(
|
|
27551
27630
|
"button",
|
|
27552
27631
|
{
|
|
27553
27632
|
...domProps,
|
|
@@ -27593,8 +27672,8 @@ function CollapsedChildMenu({
|
|
|
27593
27672
|
children: triggerVariant === "disclosure" ? /* @__PURE__ */ jsx(DisclosureIcon, { expanded: false }) : /* @__PURE__ */ jsx(MoreIcon4, {})
|
|
27594
27673
|
}
|
|
27595
27674
|
) }),
|
|
27596
|
-
/* @__PURE__ */ jsx(
|
|
27597
|
-
|
|
27675
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
27676
|
+
DropdownMenu3.Content,
|
|
27598
27677
|
{
|
|
27599
27678
|
side: "right",
|
|
27600
27679
|
align: "start",
|
|
@@ -27604,7 +27683,7 @@ function CollapsedChildMenu({
|
|
|
27604
27683
|
classNames?.childMenuContent
|
|
27605
27684
|
),
|
|
27606
27685
|
children: item.children?.map((child) => /* @__PURE__ */ jsxs(
|
|
27607
|
-
|
|
27686
|
+
DropdownMenu3.Item,
|
|
27608
27687
|
{
|
|
27609
27688
|
disabled: child.disabled,
|
|
27610
27689
|
"data-navigation-sidebar-child-id": child.id,
|
|
@@ -35087,7 +35166,7 @@ function DarkModeSelector({
|
|
|
35087
35166
|
{ value: "light", label: resolvedLabels.light, Icon: SunIcon },
|
|
35088
35167
|
{ value: "dark", label: resolvedLabels.dark, Icon: MoonIcon }
|
|
35089
35168
|
];
|
|
35090
|
-
const trigger = /* @__PURE__ */ jsx(
|
|
35169
|
+
const trigger = /* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
35091
35170
|
"button",
|
|
35092
35171
|
{
|
|
35093
35172
|
...componentAttributes,
|
|
@@ -35101,7 +35180,7 @@ function DarkModeSelector({
|
|
|
35101
35180
|
]
|
|
35102
35181
|
}
|
|
35103
35182
|
) });
|
|
35104
|
-
return /* @__PURE__ */ jsxs(
|
|
35183
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
35105
35184
|
tooltip ? /* @__PURE__ */ jsx(Tooltip2.Provider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(Tooltip2.Root, { children: [
|
|
35106
35185
|
/* @__PURE__ */ jsx(Tooltip2.Trigger, { asChild: true, children: trigger }),
|
|
35107
35186
|
/* @__PURE__ */ jsx(Tooltip2.Portal, { children: /* @__PURE__ */ jsxs(
|
|
@@ -35116,14 +35195,14 @@ function DarkModeSelector({
|
|
|
35116
35195
|
}
|
|
35117
35196
|
) })
|
|
35118
35197
|
] }) }) : trigger,
|
|
35119
|
-
/* @__PURE__ */ jsx(
|
|
35120
|
-
|
|
35198
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
35199
|
+
DropdownMenu3.Content,
|
|
35121
35200
|
{
|
|
35122
35201
|
className: "z-50 min-w-[8rem] rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-[hsl(var(--popover-foreground))] shadow-md animate-in fade-in-0 zoom-in-95",
|
|
35123
35202
|
sideOffset: 5,
|
|
35124
35203
|
align: "end",
|
|
35125
35204
|
children: options.map(({ value, label, Icon: Icon2 }) => /* @__PURE__ */ jsxs(
|
|
35126
|
-
|
|
35205
|
+
DropdownMenu3.Item,
|
|
35127
35206
|
{
|
|
35128
35207
|
className: cn5(
|
|
35129
35208
|
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",
|
|
@@ -35180,9 +35259,9 @@ function DarkModeSubMenu({
|
|
|
35180
35259
|
{ value: "light", label: resolvedLabels.light, Icon: SunIcon },
|
|
35181
35260
|
{ value: "dark", label: resolvedLabels.dark, Icon: MoonIcon }
|
|
35182
35261
|
];
|
|
35183
|
-
return /* @__PURE__ */ jsxs(
|
|
35262
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Sub, { children: [
|
|
35184
35263
|
/* @__PURE__ */ jsxs(
|
|
35185
|
-
|
|
35264
|
+
DropdownMenu3.SubTrigger,
|
|
35186
35265
|
{
|
|
35187
35266
|
...componentAttributes,
|
|
35188
35267
|
className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))] data-[state=open]:bg-[hsl(var(--accent))]",
|
|
@@ -35193,13 +35272,13 @@ function DarkModeSubMenu({
|
|
|
35193
35272
|
]
|
|
35194
35273
|
}
|
|
35195
35274
|
),
|
|
35196
|
-
/* @__PURE__ */ jsx(
|
|
35197
|
-
|
|
35275
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
35276
|
+
DropdownMenu3.SubContent,
|
|
35198
35277
|
{
|
|
35199
35278
|
className: "z-50 min-w-[8rem] rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-[hsl(var(--popover-foreground))] shadow-md animate-in fade-in-0 zoom-in-95",
|
|
35200
35279
|
sideOffset: 8,
|
|
35201
35280
|
children: options.map(({ value, label: optLabel, Icon: Icon2 }) => /* @__PURE__ */ jsxs(
|
|
35202
|
-
|
|
35281
|
+
DropdownMenu3.CheckboxItem,
|
|
35203
35282
|
{
|
|
35204
35283
|
checked: mode === value,
|
|
35205
35284
|
disabled: mode === value,
|
|
@@ -35208,7 +35287,7 @@ function DarkModeSubMenu({
|
|
|
35208
35287
|
),
|
|
35209
35288
|
onCheckedChange: () => onModeChange(value),
|
|
35210
35289
|
children: [
|
|
35211
|
-
/* @__PURE__ */ jsx(
|
|
35290
|
+
/* @__PURE__ */ jsx(DropdownMenu3.ItemIndicator, { className: "absolute left-2 inline-flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }) }),
|
|
35212
35291
|
/* @__PURE__ */ jsx(Icon2, { className: "h-4 w-4" }),
|
|
35213
35292
|
optLabel
|
|
35214
35293
|
]
|
|
@@ -35238,7 +35317,7 @@ function I18nSelector({
|
|
|
35238
35317
|
}) {
|
|
35239
35318
|
const locale = useMonkeysLocale();
|
|
35240
35319
|
const componentAttributes = useMonkeysComponentAttributes();
|
|
35241
|
-
const trigger = /* @__PURE__ */ jsx(
|
|
35320
|
+
const trigger = /* @__PURE__ */ jsx(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
35242
35321
|
"button",
|
|
35243
35322
|
{
|
|
35244
35323
|
...componentAttributes,
|
|
@@ -35252,7 +35331,7 @@ function I18nSelector({
|
|
|
35252
35331
|
]
|
|
35253
35332
|
}
|
|
35254
35333
|
) });
|
|
35255
|
-
return /* @__PURE__ */ jsxs(
|
|
35334
|
+
return /* @__PURE__ */ jsxs(DropdownMenu3.Root, { children: [
|
|
35256
35335
|
tooltip ? /* @__PURE__ */ jsx(Tooltip2.Provider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(Tooltip2.Root, { children: [
|
|
35257
35336
|
/* @__PURE__ */ jsx(Tooltip2.Trigger, { asChild: true, children: trigger }),
|
|
35258
35337
|
/* @__PURE__ */ jsx(Tooltip2.Portal, { children: /* @__PURE__ */ jsxs(
|
|
@@ -35267,14 +35346,14 @@ function I18nSelector({
|
|
|
35267
35346
|
}
|
|
35268
35347
|
) })
|
|
35269
35348
|
] }) }) : trigger,
|
|
35270
|
-
/* @__PURE__ */ jsx(
|
|
35271
|
-
|
|
35349
|
+
/* @__PURE__ */ jsx(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx(
|
|
35350
|
+
DropdownMenu3.Content,
|
|
35272
35351
|
{
|
|
35273
35352
|
className: "z-50 min-w-[8rem] rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-[hsl(var(--popover-foreground))] shadow-md animate-in fade-in-0 zoom-in-95",
|
|
35274
35353
|
sideOffset: 5,
|
|
35275
35354
|
align: "end",
|
|
35276
35355
|
children: languages.map(({ code, label }) => /* @__PURE__ */ jsx(
|
|
35277
|
-
|
|
35356
|
+
DropdownMenu3.Item,
|
|
35278
35357
|
{
|
|
35279
35358
|
className: cn6(
|
|
35280
35359
|
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",
|