@inf-monkeys-tech/monkeys-design 2.0.5 → 2.0.7
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/data-explorer/index.js +7 -1
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +7 -1
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/navigation-sidebar/index.d.mts +2 -0
- package/dist/components/navigation-sidebar/index.d.ts +2 -0
- package/dist/components/navigation-sidebar/index.js +263 -143
- package/dist/components/navigation-sidebar/index.js.map +1 -1
- package/dist/components/navigation-sidebar/index.mjs +263 -143
- package/dist/components/navigation-sidebar/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +263 -143
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +263 -143
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.js +263 -143
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +263 -143
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26555,6 +26555,7 @@ function DataExplorerViewTree({
|
|
|
26555
26555
|
onSelectNode?.(node, context);
|
|
26556
26556
|
},
|
|
26557
26557
|
onKeyDown: (event) => {
|
|
26558
|
+
if (event.target !== event.currentTarget) return;
|
|
26558
26559
|
if (!isSelectable) return;
|
|
26559
26560
|
if (event.key !== "Enter" && event.key !== " ") return;
|
|
26560
26561
|
event.preventDefault();
|
|
@@ -26681,7 +26682,7 @@ function DataExplorerViewTree({
|
|
|
26681
26682
|
"div",
|
|
26682
26683
|
{
|
|
26683
26684
|
className: cn(theme.slots.treeRoot, classNames?.root, className),
|
|
26684
|
-
role: hasAnyNodes ? "tree" : void 0,
|
|
26685
|
+
role: hasAnyNodes || resolvedGroups.some((group) => !group.hideHeader) ? "tree" : void 0,
|
|
26685
26686
|
children: resolvedGroups.map((group) => {
|
|
26686
26687
|
const groupExpanded = group.hideHeader || group.collapsible === false || resolvedExpandedGroupIds.has(group.id);
|
|
26687
26688
|
const groupNodeCount = group.nodes?.length ?? 0;
|
|
@@ -26698,6 +26699,10 @@ function DataExplorerViewTree({
|
|
|
26698
26699
|
!group.hideHeader ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26699
26700
|
"div",
|
|
26700
26701
|
{
|
|
26702
|
+
role: "treeitem",
|
|
26703
|
+
"aria-label": typeof group.label === "string" ? group.label : void 0,
|
|
26704
|
+
"aria-selected": group.selectable ? groupSelected : void 0,
|
|
26705
|
+
"aria-expanded": groupCollapsible ? groupExpanded : void 0,
|
|
26701
26706
|
className: cn(
|
|
26702
26707
|
theme.slots.treeGroupHeader,
|
|
26703
26708
|
theme.slots.treeGroupHeaderButton,
|
|
@@ -26782,6 +26787,7 @@ function DataExplorerViewTree({
|
|
|
26782
26787
|
groupExpanded ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
26783
26788
|
"div",
|
|
26784
26789
|
{
|
|
26790
|
+
role: "group",
|
|
26785
26791
|
className: cn(
|
|
26786
26792
|
theme.slots.treeGroupContent,
|
|
26787
26793
|
classNames?.groupContent,
|
|
@@ -26989,6 +26995,72 @@ function DataExplorerViewShell({
|
|
|
26989
26995
|
}
|
|
26990
26996
|
);
|
|
26991
26997
|
}
|
|
26998
|
+
|
|
26999
|
+
// src/components/navigation-sidebar/unified-appearance.ts
|
|
27000
|
+
var unifiedRow = "gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none";
|
|
27001
|
+
var unifiedIcon = "size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full";
|
|
27002
|
+
var unifiedInactive = "text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]";
|
|
27003
|
+
var unifiedSelected = "border-[var(--navigation-internal-selected-border)] bg-[var(--navigation-internal-selected-background)] text-[var(--navigation-internal-selected-foreground)] hover:border-[var(--navigation-internal-selected-border)] hover:bg-[var(--navigation-internal-selected-background)] hover:text-[var(--navigation-internal-selected-foreground)]";
|
|
27004
|
+
var unifiedThemeDefaults = "[--navigation-internal-theme-selected-background:color-mix(in_srgb,hsl(var(--monkeys-color-primary,var(--primary)))_10%,transparent)] [--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-primary,var(--primary)))] dark:[--navigation-internal-theme-selected-background:hsl(var(--monkeys-color-accent,var(--accent)))] dark:[--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-foreground,var(--foreground)))]";
|
|
27005
|
+
function unifiedStyle(activeVariant) {
|
|
27006
|
+
const background = {
|
|
27007
|
+
muted: "hsl(var(--monkeys-color-accent,var(--accent)))",
|
|
27008
|
+
soft: "color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 10%,transparent)",
|
|
27009
|
+
solid: "hsl(var(--monkeys-color-primary,var(--primary)))",
|
|
27010
|
+
outline: "hsl(var(--monkeys-color-background,var(--background)))"
|
|
27011
|
+
}[activeVariant ?? "muted"];
|
|
27012
|
+
const foreground = activeVariant === "solid" ? "hsl(var(--monkeys-color-primary-foreground,var(--primary-foreground)))" : "hsl(var(--monkeys-color-foreground,var(--foreground)))";
|
|
27013
|
+
const border = activeVariant === void 0 || activeVariant === "muted" ? "transparent" : activeVariant === "soft" ? "color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 25%,transparent)" : activeVariant === "outline" ? "color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 55%,transparent)" : "hsl(var(--monkeys-color-primary,var(--primary)))";
|
|
27014
|
+
return {
|
|
27015
|
+
"--navigation-internal-default-selected-background": activeVariant === void 0 ? "var(--navigation-internal-theme-selected-background)" : background,
|
|
27016
|
+
"--navigation-internal-default-selected-foreground": activeVariant === void 0 ? "var(--navigation-internal-theme-selected-foreground)" : foreground,
|
|
27017
|
+
"--navigation-internal-selected-background": "var(--monkeys-component-navigation-sidebar-row-selected-background,var(--navigation-internal-default-selected-background))",
|
|
27018
|
+
"--navigation-internal-selected-foreground": "var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--navigation-internal-default-selected-foreground))",
|
|
27019
|
+
"--navigation-internal-selected-border": `var(--monkeys-component-navigation-sidebar-row-selected-border,${border})`,
|
|
27020
|
+
"--navigation-internal-hover-background": "var(--monkeys-component-navigation-sidebar-row-hover-background,color-mix(in srgb,hsl(var(--monkeys-color-accent,var(--accent))) 65%,transparent))",
|
|
27021
|
+
"--navigation-internal-hover-foreground": "var(--monkeys-component-navigation-sidebar-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground))))"
|
|
27022
|
+
};
|
|
27023
|
+
}
|
|
27024
|
+
var treeStateVariables = "[--navigation-internal-selected-background:var(--monkeys-component-navigation-sidebar-row-selected-background,var(--monkeys-component-navigation-sidebar-tree-row-selected-background,var(--navigation-internal-default-selected-background)))] [--navigation-internal-selected-foreground:var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,var(--navigation-internal-default-selected-foreground)))] [--navigation-internal-hover-background:var(--monkeys-component-navigation-sidebar-row-hover-background,var(--monkeys-component-navigation-sidebar-tree-row-hover-background,color-mix(in_srgb,hsl(var(--monkeys-color-accent,var(--accent)))_65%,transparent)))] [--navigation-internal-hover-foreground:var(--monkeys-component-navigation-sidebar-row-hover-foreground,var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground)))))]";
|
|
27025
|
+
var selectedTreeNode = "aria-selected:border-[var(--navigation-internal-selected-border)] aria-selected:bg-[var(--navigation-internal-selected-background)] aria-selected:text-[var(--navigation-internal-selected-foreground)] aria-selected:hover:border-[var(--navigation-internal-selected-border)] aria-selected:hover:bg-[var(--navigation-internal-selected-background)] aria-selected:hover:text-[var(--navigation-internal-selected-foreground)]";
|
|
27026
|
+
var nestedControl = "text-inherit hover:bg-foreground/10 hover:text-inherit focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none";
|
|
27027
|
+
function unifiedTreeClassNames(height, padding, overrides = {}) {
|
|
27028
|
+
const row = cn(unifiedRow, height, padding, unifiedInactive);
|
|
27029
|
+
return {
|
|
27030
|
+
...overrides,
|
|
27031
|
+
root: cn(treeStateVariables, "space-y-0.5", overrides.root),
|
|
27032
|
+
group: cn(
|
|
27033
|
+
"space-y-0.5",
|
|
27034
|
+
// A visible group header adds a level; headerless groups contain root items.
|
|
27035
|
+
"[&>[role=treeitem]+[role=group]]:pl-[var(--monkeys-component-navigation-sidebar-tree-group-indent,1rem)]",
|
|
27036
|
+
overrides.group
|
|
27037
|
+
),
|
|
27038
|
+
groupHeaderButton: cn("h-auto", row, overrides.groupHeaderButton),
|
|
27039
|
+
nodeButton: cn(row, selectedTreeNode, overrides.nodeButton),
|
|
27040
|
+
itemSelected: cn(unifiedSelected, overrides.itemSelected),
|
|
27041
|
+
nodeIcon: cn(
|
|
27042
|
+
unifiedIcon,
|
|
27043
|
+
"group-hover/tree-node:text-inherit",
|
|
27044
|
+
overrides.nodeIcon
|
|
27045
|
+
),
|
|
27046
|
+
nodeLabel: cn("font-medium", overrides.nodeLabel),
|
|
27047
|
+
nodeDescription: cn("text-inherit", overrides.nodeDescription),
|
|
27048
|
+
nodeDisabled: cn("opacity-50", overrides.nodeDisabled),
|
|
27049
|
+
groupActions: cn(
|
|
27050
|
+
nestedControl,
|
|
27051
|
+
"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",
|
|
27052
|
+
overrides.groupActions
|
|
27053
|
+
),
|
|
27054
|
+
nodeActions: cn(
|
|
27055
|
+
nestedControl,
|
|
27056
|
+
"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",
|
|
27057
|
+
overrides.nodeActions
|
|
27058
|
+
),
|
|
27059
|
+
nodeToggle: cn(nestedControl, "order-1", overrides.nodeToggle),
|
|
27060
|
+
expander: cn(nestedControl, "order-1", overrides.expander),
|
|
27061
|
+
nodeDragHandle: cn(nestedControl, overrides.nodeDragHandle)
|
|
27062
|
+
};
|
|
27063
|
+
}
|
|
26992
27064
|
function CollapseIcon({ collapsed }) {
|
|
26993
27065
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-4 w-4", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
26994
27066
|
"path",
|
|
@@ -27174,22 +27246,34 @@ function activeVariantClassName(activeVariant) {
|
|
|
27174
27246
|
return "border-primary/25 bg-primary/10 text-foreground";
|
|
27175
27247
|
}
|
|
27176
27248
|
function resolveAppearance(appearance) {
|
|
27177
|
-
|
|
27249
|
+
if (appearance?.preset !== void 0 && appearance.preset !== "unified") {
|
|
27250
|
+
throw new TypeError(
|
|
27251
|
+
`Unknown NavigationSidebar preset "${appearance.preset}". Supported preset: unified.`
|
|
27252
|
+
);
|
|
27253
|
+
}
|
|
27254
|
+
const unified = appearance?.preset === "unified";
|
|
27255
|
+
const density = appearance?.density ?? (unified ? "compact" : "default");
|
|
27178
27256
|
const surface = appearance?.surface ?? "panel";
|
|
27179
|
-
const activeVariant = appearance?.activeVariant ?? "soft";
|
|
27257
|
+
const activeVariant = appearance?.activeVariant ?? (unified ? "muted" : "soft");
|
|
27180
27258
|
return {
|
|
27259
|
+
unified,
|
|
27181
27260
|
density,
|
|
27182
27261
|
surface,
|
|
27183
27262
|
activeVariant,
|
|
27263
|
+
selected: unified ? unifiedSelected : activeVariantClassName(activeVariant),
|
|
27264
|
+
inactive: unified ? unifiedInactive : "text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground",
|
|
27184
27265
|
root: cn(
|
|
27185
27266
|
surface === "plain" && "border-transparent bg-transparent shadow-none",
|
|
27186
27267
|
surface === "panel" && "border-border/70 bg-card text-card-foreground shadow-sm",
|
|
27187
27268
|
surface === "frosted" && "border-border/55 bg-card/80 text-card-foreground shadow-sm backdrop-blur-xl",
|
|
27188
|
-
surface === "outlined" && "border-border bg-background text-foreground shadow-none"
|
|
27269
|
+
surface === "outlined" && "border-border bg-background text-foreground shadow-none",
|
|
27270
|
+
unified && "rounded-[var(--radius)] shadow-none",
|
|
27271
|
+
unified && unifiedThemeDefaults,
|
|
27272
|
+
unified && surface === "panel" && "border-[var(--monkeys-component-navigation-sidebar-border,hsl(var(--monkeys-color-border,var(--border))))] bg-[var(--monkeys-component-navigation-sidebar-background,hsl(var(--monkeys-color-card,var(--card))))] text-foreground"
|
|
27189
27273
|
),
|
|
27190
|
-
itemHeight: density === "compact" ? "min-h-9" : density === "comfortable" ? "min-h-14" : "min-h-11",
|
|
27191
|
-
itemPadding: density === "compact" ? "px-2 py-1.5" : density === "comfortable" ? "px-3 py-3" : "px-3 py-2",
|
|
27192
|
-
searchHeight: density === "compact" ? "h-8" : density === "comfortable" ? "h-10" : "h-9"
|
|
27274
|
+
itemHeight: density === "compact" ? unified ? "min-h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]" : "min-h-9" : density === "comfortable" ? "min-h-14" : "min-h-11",
|
|
27275
|
+
itemPadding: density === "compact" ? unified ? "px-2 py-2" : "px-2 py-1.5" : density === "comfortable" ? "px-3 py-3" : "px-3 py-2",
|
|
27276
|
+
searchHeight: density === "compact" ? unified ? "h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]" : "h-8" : density === "comfortable" ? "h-10" : "h-9"
|
|
27193
27277
|
};
|
|
27194
27278
|
}
|
|
27195
27279
|
var navigationTreeRowHoverClassName = "hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-hover-background,hsl(var(--muted)))] hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--foreground)))]";
|
|
@@ -27244,7 +27328,8 @@ function entryClassName({
|
|
|
27244
27328
|
"group/navigation-item relative flex w-full min-w-0 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm outline-none transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
|
|
27245
27329
|
appearance.itemHeight,
|
|
27246
27330
|
appearance.itemPadding,
|
|
27247
|
-
|
|
27331
|
+
appearance.unified && unifiedRow,
|
|
27332
|
+
embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? appearance.selected : appearance.inactive,
|
|
27248
27333
|
collapsed && !mobile && "justify-center px-0",
|
|
27249
27334
|
item.disabled && "pointer-events-none opacity-50",
|
|
27250
27335
|
classNames?.item,
|
|
@@ -27259,7 +27344,8 @@ function EntryContent({
|
|
|
27259
27344
|
collapsed,
|
|
27260
27345
|
mobile,
|
|
27261
27346
|
classNames,
|
|
27262
|
-
endIndicator
|
|
27347
|
+
endIndicator,
|
|
27348
|
+
appearance
|
|
27263
27349
|
}) {
|
|
27264
27350
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
27265
27351
|
hasRenderableNode(item.icon) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -27267,6 +27353,7 @@ function EntryContent({
|
|
|
27267
27353
|
{
|
|
27268
27354
|
className: cn(
|
|
27269
27355
|
"flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",
|
|
27356
|
+
appearance.unified && unifiedIcon,
|
|
27270
27357
|
classNames?.itemIcon
|
|
27271
27358
|
),
|
|
27272
27359
|
"aria-hidden": "true",
|
|
@@ -27286,6 +27373,7 @@ function EntryContent({
|
|
|
27286
27373
|
{
|
|
27287
27374
|
className: cn(
|
|
27288
27375
|
"min-w-0 truncate font-semibold",
|
|
27376
|
+
appearance.unified && "font-medium",
|
|
27289
27377
|
classNames?.itemLabel
|
|
27290
27378
|
),
|
|
27291
27379
|
children: item.label
|
|
@@ -27296,6 +27384,7 @@ function EntryContent({
|
|
|
27296
27384
|
{
|
|
27297
27385
|
className: cn(
|
|
27298
27386
|
"mt-0.5 truncate text-xs font-normal",
|
|
27387
|
+
appearance.unified && "text-inherit",
|
|
27299
27388
|
classNames?.itemDescription
|
|
27300
27389
|
),
|
|
27301
27390
|
children: item.description
|
|
@@ -27376,6 +27465,7 @@ function EntryButton({
|
|
|
27376
27465
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27377
27466
|
EntryContent,
|
|
27378
27467
|
{
|
|
27468
|
+
appearance,
|
|
27379
27469
|
item,
|
|
27380
27470
|
collapsed,
|
|
27381
27471
|
mobile,
|
|
@@ -27412,6 +27502,7 @@ function EntryPresentation({
|
|
|
27412
27502
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27413
27503
|
EntryContent,
|
|
27414
27504
|
{
|
|
27505
|
+
appearance,
|
|
27415
27506
|
item,
|
|
27416
27507
|
collapsed: false,
|
|
27417
27508
|
mobile: true,
|
|
@@ -27428,7 +27519,8 @@ function routeRowClassName({
|
|
|
27428
27519
|
return cn(
|
|
27429
27520
|
"flex w-full min-w-0 items-center gap-0.5 rounded-[var(--radius)] border border-transparent pr-1 text-sm transition-[background-color,border-color,color,box-shadow] motion-reduce:transition-none",
|
|
27430
27521
|
appearance.itemHeight,
|
|
27431
|
-
|
|
27522
|
+
appearance.unified && unifiedRow,
|
|
27523
|
+
active ? appearance.selected : appearance.inactive
|
|
27432
27524
|
);
|
|
27433
27525
|
}
|
|
27434
27526
|
function filterCatalogItems(items, activeFilterId) {
|
|
@@ -27582,7 +27674,8 @@ function ChildEntry({
|
|
|
27582
27674
|
"flex w-full min-w-0 flex-1 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm font-semibold outline-none transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
|
|
27583
27675
|
appearance.itemHeight,
|
|
27584
27676
|
appearance.itemPadding,
|
|
27585
|
-
|
|
27677
|
+
appearance.unified && unifiedRow,
|
|
27678
|
+
embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? appearance.selected : appearance.inactive,
|
|
27586
27679
|
child.disabled && "pointer-events-none opacity-50",
|
|
27587
27680
|
classNames?.childItem,
|
|
27588
27681
|
active && classNames?.childItemActive,
|
|
@@ -27594,7 +27687,10 @@ function ChildEntry({
|
|
|
27594
27687
|
hasRenderableNode(child.icon) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27595
27688
|
"span",
|
|
27596
27689
|
{
|
|
27597
|
-
className:
|
|
27690
|
+
className: cn(
|
|
27691
|
+
"flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",
|
|
27692
|
+
appearance.unified && unifiedIcon
|
|
27693
|
+
),
|
|
27598
27694
|
"aria-hidden": "true",
|
|
27599
27695
|
children: child.icon
|
|
27600
27696
|
}
|
|
@@ -27743,6 +27839,7 @@ function CollapsedChildMenu({
|
|
|
27743
27839
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27744
27840
|
EntryContent,
|
|
27745
27841
|
{
|
|
27842
|
+
appearance,
|
|
27746
27843
|
item,
|
|
27747
27844
|
collapsed: !mobile,
|
|
27748
27845
|
mobile,
|
|
@@ -27856,137 +27953,148 @@ function RouteContent({
|
|
|
27856
27953
|
onExpandedItemIdsChange
|
|
27857
27954
|
]
|
|
27858
27955
|
);
|
|
27859
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27860
|
-
|
|
27861
|
-
|
|
27862
|
-
|
|
27863
|
-
|
|
27864
|
-
|
|
27865
|
-
|
|
27866
|
-
const compoundItemRow = collapsed && hasChildren && Boolean(onChildSelect) || !collapsed && childrenCollapsible && !disclosure || showItemActions;
|
|
27867
|
-
const childListId = `${disclosureId}-route-children-${itemIndex}`;
|
|
27868
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "grid min-w-0 gap-1", children: [
|
|
27869
|
-
collapsed && disclosure ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27870
|
-
CollapsedChildMenu,
|
|
27871
|
-
{
|
|
27872
|
-
item,
|
|
27873
|
-
activeChildId,
|
|
27874
|
-
label: collapsedChildMenuLabel,
|
|
27875
|
-
onChildSelect,
|
|
27876
|
-
classNames,
|
|
27877
|
-
appearance,
|
|
27878
|
-
triggerVariant: "item"
|
|
27879
|
-
}
|
|
27880
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27881
|
-
"div",
|
|
27882
|
-
{
|
|
27883
|
-
"data-navigation-sidebar-item-row": compoundItemRow ? item.id : void 0,
|
|
27884
|
-
"data-active": compoundItemRow ? String(active) : void 0,
|
|
27885
|
-
className: compoundItemRow ? routeRowClassName({ active, appearance }) : void 0,
|
|
27886
|
-
children: [
|
|
27887
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27888
|
-
EntryButton,
|
|
27889
|
-
{
|
|
27890
|
-
item,
|
|
27891
|
-
active,
|
|
27892
|
-
collapsed,
|
|
27893
|
-
embedded: compoundItemRow,
|
|
27894
|
-
itemAs: disclosure ? "button" : itemAs,
|
|
27895
|
-
appearance,
|
|
27896
|
-
classNames,
|
|
27897
|
-
onSelect: disclosure ? () => toggleItemExpanded(item) : onItemSelect ? () => onItemSelect(item) : void 0,
|
|
27898
|
-
ariaControls: !collapsed && childrenCollapsible && disclosure ? childListId : void 0,
|
|
27899
|
-
ariaExpanded: !collapsed && childrenCollapsible && disclosure ? childrenExpanded : void 0,
|
|
27900
|
-
endIndicator: !collapsed && disclosure && !showItemActions ? /* @__PURE__ */ jsxRuntime.jsx(DisclosureIcon, { expanded: childrenExpanded }) : void 0
|
|
27901
|
-
}
|
|
27902
|
-
),
|
|
27903
|
-
showItemActions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27904
|
-
RouteActions,
|
|
27905
|
-
{
|
|
27906
|
-
itemId: item.id,
|
|
27907
|
-
actions: item.actions,
|
|
27908
|
-
kind: "item",
|
|
27909
|
-
className: classNames?.itemActions
|
|
27910
|
-
}
|
|
27911
|
-
) : null,
|
|
27912
|
-
collapsed && onChildSelect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27913
|
-
CollapsedChildMenu,
|
|
27914
|
-
{
|
|
27915
|
-
item,
|
|
27916
|
-
activeChildId,
|
|
27917
|
-
label: collapsedChildMenuLabel,
|
|
27918
|
-
onChildSelect,
|
|
27919
|
-
classNames
|
|
27920
|
-
}
|
|
27921
|
-
) : null,
|
|
27922
|
-
!collapsed && childrenCollapsible && (!disclosure || showItemActions) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27923
|
-
RouteChildrenToggle,
|
|
27924
|
-
{
|
|
27925
|
-
item,
|
|
27926
|
-
expanded: childrenExpanded,
|
|
27927
|
-
controls: childListId,
|
|
27928
|
-
label: disclosureLabel,
|
|
27929
|
-
onToggle: () => toggleItemExpanded(item),
|
|
27930
|
-
classNames
|
|
27931
|
-
}
|
|
27932
|
-
) : null
|
|
27933
|
-
]
|
|
27934
|
-
}
|
|
27956
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27957
|
+
"ul",
|
|
27958
|
+
{
|
|
27959
|
+
className: cn(
|
|
27960
|
+
"grid list-none gap-2 p-0",
|
|
27961
|
+
appearance.unified && "gap-0.5",
|
|
27962
|
+
classNames?.list
|
|
27935
27963
|
),
|
|
27936
|
-
|
|
27937
|
-
|
|
27938
|
-
|
|
27939
|
-
|
|
27940
|
-
|
|
27941
|
-
|
|
27942
|
-
|
|
27943
|
-
|
|
27944
|
-
|
|
27964
|
+
children: routeItems.map((item, itemIndex) => {
|
|
27965
|
+
const disclosure = isDisclosureRouteItem(item);
|
|
27966
|
+
const active = !disclosure && item.id === activeItemId;
|
|
27967
|
+
const hasChildren = Boolean(item.children?.length);
|
|
27968
|
+
const childrenCollapsible = collapsibleItemIds.has(item.id);
|
|
27969
|
+
const childrenExpanded = !childrenCollapsible || expandedItemIdSet.has(item.id);
|
|
27970
|
+
const showItemActions = !collapsed && hasRenderableNode(item.actions);
|
|
27971
|
+
const compoundItemRow = collapsed && hasChildren && Boolean(onChildSelect) || !collapsed && childrenCollapsible && !disclosure || showItemActions;
|
|
27972
|
+
const childListId = `${disclosureId}-route-children-${itemIndex}`;
|
|
27973
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "grid min-w-0 gap-1", children: [
|
|
27974
|
+
collapsed && disclosure ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
27975
|
+
CollapsedChildMenu,
|
|
27976
|
+
{
|
|
27977
|
+
item,
|
|
27978
|
+
activeChildId,
|
|
27979
|
+
label: collapsedChildMenuLabel,
|
|
27980
|
+
onChildSelect,
|
|
27981
|
+
classNames,
|
|
27982
|
+
appearance,
|
|
27983
|
+
triggerVariant: "item"
|
|
27984
|
+
}
|
|
27985
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27986
|
+
"div",
|
|
27987
|
+
{
|
|
27988
|
+
"data-navigation-sidebar-item-row": compoundItemRow ? item.id : void 0,
|
|
27989
|
+
"data-active": compoundItemRow ? String(active) : void 0,
|
|
27990
|
+
className: compoundItemRow ? routeRowClassName({ active, appearance }) : void 0,
|
|
27991
|
+
children: [
|
|
27992
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27993
|
+
EntryButton,
|
|
27994
|
+
{
|
|
27995
|
+
item,
|
|
27996
|
+
active,
|
|
27997
|
+
collapsed,
|
|
27998
|
+
embedded: compoundItemRow,
|
|
27999
|
+
itemAs: disclosure ? "button" : itemAs,
|
|
28000
|
+
appearance,
|
|
28001
|
+
classNames,
|
|
28002
|
+
onSelect: disclosure ? () => toggleItemExpanded(item) : onItemSelect ? () => onItemSelect(item) : void 0,
|
|
28003
|
+
ariaControls: !collapsed && childrenCollapsible && disclosure ? childListId : void 0,
|
|
28004
|
+
ariaExpanded: !collapsed && childrenCollapsible && disclosure ? childrenExpanded : void 0,
|
|
28005
|
+
endIndicator: !collapsed && disclosure && !showItemActions ? /* @__PURE__ */ jsxRuntime.jsx(DisclosureIcon, { expanded: childrenExpanded }) : void 0
|
|
28006
|
+
}
|
|
28007
|
+
),
|
|
28008
|
+
showItemActions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
28009
|
+
RouteActions,
|
|
28010
|
+
{
|
|
28011
|
+
itemId: item.id,
|
|
28012
|
+
actions: item.actions,
|
|
28013
|
+
kind: "item",
|
|
28014
|
+
className: classNames?.itemActions
|
|
28015
|
+
}
|
|
28016
|
+
) : null,
|
|
28017
|
+
collapsed && onChildSelect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
28018
|
+
CollapsedChildMenu,
|
|
28019
|
+
{
|
|
28020
|
+
item,
|
|
28021
|
+
activeChildId,
|
|
28022
|
+
label: collapsedChildMenuLabel,
|
|
28023
|
+
onChildSelect,
|
|
28024
|
+
classNames
|
|
28025
|
+
}
|
|
28026
|
+
) : null,
|
|
28027
|
+
!collapsed && childrenCollapsible && (!disclosure || showItemActions) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
28028
|
+
RouteChildrenToggle,
|
|
28029
|
+
{
|
|
28030
|
+
item,
|
|
28031
|
+
expanded: childrenExpanded,
|
|
28032
|
+
controls: childListId,
|
|
28033
|
+
label: disclosureLabel,
|
|
28034
|
+
onToggle: () => toggleItemExpanded(item),
|
|
28035
|
+
classNames
|
|
28036
|
+
}
|
|
28037
|
+
) : null
|
|
28038
|
+
]
|
|
28039
|
+
}
|
|
27945
28040
|
),
|
|
27946
|
-
|
|
27947
|
-
|
|
27948
|
-
|
|
27949
|
-
|
|
27950
|
-
|
|
27951
|
-
{
|
|
27952
|
-
|
|
27953
|
-
|
|
27954
|
-
|
|
27955
|
-
|
|
27956
|
-
|
|
27957
|
-
|
|
27958
|
-
|
|
27959
|
-
|
|
27960
|
-
|
|
27961
|
-
|
|
27962
|
-
|
|
27963
|
-
|
|
27964
|
-
|
|
27965
|
-
|
|
27966
|
-
|
|
27967
|
-
|
|
27968
|
-
|
|
27969
|
-
|
|
27970
|
-
|
|
27971
|
-
|
|
27972
|
-
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27976
|
-
|
|
27977
|
-
|
|
27978
|
-
|
|
27979
|
-
|
|
27980
|
-
|
|
27981
|
-
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
27985
|
-
|
|
27986
|
-
|
|
27987
|
-
|
|
27988
|
-
|
|
27989
|
-
|
|
28041
|
+
!collapsed && hasChildren ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
28042
|
+
"ul",
|
|
28043
|
+
{
|
|
28044
|
+
id: childListId,
|
|
28045
|
+
hidden: !childrenExpanded,
|
|
28046
|
+
style: childrenExpanded ? void 0 : { display: "none" },
|
|
28047
|
+
className: cn(
|
|
28048
|
+
"ml-5 grid list-none gap-0.5 border-l border-border/70 py-1 pl-3",
|
|
28049
|
+
appearance.unified && "border-border",
|
|
28050
|
+
classNames?.childList
|
|
28051
|
+
),
|
|
28052
|
+
children: item.children?.map((child) => {
|
|
28053
|
+
const hasChildActions = hasRenderableNode(child.actions);
|
|
28054
|
+
const childActive = child.id === activeChildId;
|
|
28055
|
+
const childEntry = /* @__PURE__ */ jsxRuntime.jsx(
|
|
28056
|
+
ChildEntry,
|
|
28057
|
+
{
|
|
28058
|
+
child,
|
|
28059
|
+
parent: item,
|
|
28060
|
+
active: childActive,
|
|
28061
|
+
interactive: Boolean(onChildSelect),
|
|
28062
|
+
onSelect: onChildSelect,
|
|
28063
|
+
appearance,
|
|
28064
|
+
classNames,
|
|
28065
|
+
embedded: hasChildActions
|
|
28066
|
+
}
|
|
28067
|
+
);
|
|
28068
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: hasChildActions ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28069
|
+
"div",
|
|
28070
|
+
{
|
|
28071
|
+
"data-navigation-sidebar-child-row": child.id,
|
|
28072
|
+
"data-active": String(childActive),
|
|
28073
|
+
className: routeRowClassName({
|
|
28074
|
+
active: childActive,
|
|
28075
|
+
appearance
|
|
28076
|
+
}),
|
|
28077
|
+
children: [
|
|
28078
|
+
childEntry,
|
|
28079
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28080
|
+
RouteActions,
|
|
28081
|
+
{
|
|
28082
|
+
itemId: child.id,
|
|
28083
|
+
actions: child.actions,
|
|
28084
|
+
kind: "child",
|
|
28085
|
+
className: classNames?.childActions
|
|
28086
|
+
}
|
|
28087
|
+
)
|
|
28088
|
+
]
|
|
28089
|
+
}
|
|
28090
|
+
) : childEntry }, child.id);
|
|
28091
|
+
})
|
|
28092
|
+
}
|
|
28093
|
+
) : null
|
|
28094
|
+
] }, item.id);
|
|
28095
|
+
})
|
|
28096
|
+
}
|
|
28097
|
+
) });
|
|
27990
28098
|
}
|
|
27991
28099
|
function flattenCatalogItems(items, sections, activeFilterId) {
|
|
27992
28100
|
return [
|
|
@@ -28296,7 +28404,11 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28296
28404
|
DataExplorerViewTree,
|
|
28297
28405
|
{
|
|
28298
28406
|
...treeProps,
|
|
28299
|
-
classNames:
|
|
28407
|
+
classNames: appearance.unified ? unifiedTreeClassNames(
|
|
28408
|
+
appearance.itemHeight,
|
|
28409
|
+
appearance.itemPadding,
|
|
28410
|
+
treeProps.classNames
|
|
28411
|
+
) : resolveNavigationTreeClassNames(treeProps.classNames)
|
|
28300
28412
|
}
|
|
28301
28413
|
);
|
|
28302
28414
|
};
|
|
@@ -28309,6 +28421,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28309
28421
|
"aria-label": props.ariaLabel,
|
|
28310
28422
|
"data-monkeys-component": props.dataComponent ?? "navigation-sidebar",
|
|
28311
28423
|
"data-navigation-sidebar-kind": props.kind,
|
|
28424
|
+
"data-navigation-sidebar-preset": props.appearance?.preset,
|
|
28312
28425
|
"data-collapsed": resolvedCollapsed ? "true" : "false",
|
|
28313
28426
|
className: cn(
|
|
28314
28427
|
"relative flex h-full min-h-0 shrink-0 flex-col overflow-visible rounded-[calc(var(--radius)+0.25rem)] border transition-[width,opacity] duration-300 motion-reduce:transition-none",
|
|
@@ -28319,6 +28432,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28319
28432
|
props.className
|
|
28320
28433
|
),
|
|
28321
28434
|
style: {
|
|
28435
|
+
...appearance.unified ? unifiedStyle(props.appearance?.activeVariant) : {},
|
|
28322
28436
|
...props.style,
|
|
28323
28437
|
width: props.widthMode === "fill" ? void 0 : resolvedCollapsed ? bounds.collapsedWidth : resolvedWidth,
|
|
28324
28438
|
transition: isResizing ? "none" : props.style?.transition
|
|
@@ -28356,6 +28470,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28356
28470
|
{
|
|
28357
28471
|
className: cn(
|
|
28358
28472
|
"flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",
|
|
28473
|
+
appearance.unified && "min-h-14 border-border px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))]",
|
|
28359
28474
|
resolvedCollapsed && "justify-center px-1",
|
|
28360
28475
|
props.classNames?.header
|
|
28361
28476
|
),
|
|
@@ -28399,6 +28514,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28399
28514
|
{
|
|
28400
28515
|
className: cn(
|
|
28401
28516
|
"px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",
|
|
28517
|
+
appearance.unified && "pb-1",
|
|
28402
28518
|
props.classNames?.search
|
|
28403
28519
|
),
|
|
28404
28520
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -28406,7 +28522,8 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28406
28522
|
{
|
|
28407
28523
|
className: cn(
|
|
28408
28524
|
"flex items-center gap-2 rounded-md border border-input bg-[var(--monkeys-component-navigation-sidebar-search-background,hsl(var(--monkeys-color-control-surface)))] px-3 text-muted-foreground ring-offset-control-surface focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
28409
|
-
appearance.searchHeight
|
|
28525
|
+
appearance.searchHeight,
|
|
28526
|
+
appearance.unified && "rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"
|
|
28410
28527
|
),
|
|
28411
28528
|
children: [
|
|
28412
28529
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -28414,6 +28531,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28414
28531
|
{
|
|
28415
28532
|
className: cn(
|
|
28416
28533
|
"flex shrink-0",
|
|
28534
|
+
appearance.unified && unifiedIcon,
|
|
28417
28535
|
props.classNames?.searchIcon
|
|
28418
28536
|
),
|
|
28419
28537
|
"aria-hidden": "true",
|
|
@@ -28467,6 +28585,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28467
28585
|
{
|
|
28468
28586
|
className: cn(
|
|
28469
28587
|
"min-h-0 flex-1 overflow-y-auto px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] py-3",
|
|
28588
|
+
appearance.unified && props.search && "pt-1",
|
|
28470
28589
|
resolvedCollapsed && "px-1.5",
|
|
28471
28590
|
props.classNames?.content
|
|
28472
28591
|
),
|
|
@@ -28478,6 +28597,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28478
28597
|
{
|
|
28479
28598
|
className: cn(
|
|
28480
28599
|
"flex shrink-0 items-center gap-2 border-t border-border/70 p-3",
|
|
28600
|
+
appearance.unified && "border-border",
|
|
28481
28601
|
resolvedCollapsed && "justify-center px-1",
|
|
28482
28602
|
props.classNames?.footer
|
|
28483
28603
|
),
|