@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.mjs
CHANGED
|
@@ -26520,6 +26520,7 @@ function DataExplorerViewTree({
|
|
|
26520
26520
|
onSelectNode?.(node, context);
|
|
26521
26521
|
},
|
|
26522
26522
|
onKeyDown: (event) => {
|
|
26523
|
+
if (event.target !== event.currentTarget) return;
|
|
26523
26524
|
if (!isSelectable) return;
|
|
26524
26525
|
if (event.key !== "Enter" && event.key !== " ") return;
|
|
26525
26526
|
event.preventDefault();
|
|
@@ -26646,7 +26647,7 @@ function DataExplorerViewTree({
|
|
|
26646
26647
|
"div",
|
|
26647
26648
|
{
|
|
26648
26649
|
className: cn(theme.slots.treeRoot, classNames?.root, className),
|
|
26649
|
-
role: hasAnyNodes ? "tree" : void 0,
|
|
26650
|
+
role: hasAnyNodes || resolvedGroups.some((group) => !group.hideHeader) ? "tree" : void 0,
|
|
26650
26651
|
children: resolvedGroups.map((group) => {
|
|
26651
26652
|
const groupExpanded = group.hideHeader || group.collapsible === false || resolvedExpandedGroupIds.has(group.id);
|
|
26652
26653
|
const groupNodeCount = group.nodes?.length ?? 0;
|
|
@@ -26663,6 +26664,10 @@ function DataExplorerViewTree({
|
|
|
26663
26664
|
!group.hideHeader ? /* @__PURE__ */ jsxs(
|
|
26664
26665
|
"div",
|
|
26665
26666
|
{
|
|
26667
|
+
role: "treeitem",
|
|
26668
|
+
"aria-label": typeof group.label === "string" ? group.label : void 0,
|
|
26669
|
+
"aria-selected": group.selectable ? groupSelected : void 0,
|
|
26670
|
+
"aria-expanded": groupCollapsible ? groupExpanded : void 0,
|
|
26666
26671
|
className: cn(
|
|
26667
26672
|
theme.slots.treeGroupHeader,
|
|
26668
26673
|
theme.slots.treeGroupHeaderButton,
|
|
@@ -26747,6 +26752,7 @@ function DataExplorerViewTree({
|
|
|
26747
26752
|
groupExpanded ? /* @__PURE__ */ jsx(
|
|
26748
26753
|
"div",
|
|
26749
26754
|
{
|
|
26755
|
+
role: "group",
|
|
26750
26756
|
className: cn(
|
|
26751
26757
|
theme.slots.treeGroupContent,
|
|
26752
26758
|
classNames?.groupContent,
|
|
@@ -26954,6 +26960,72 @@ function DataExplorerViewShell({
|
|
|
26954
26960
|
}
|
|
26955
26961
|
);
|
|
26956
26962
|
}
|
|
26963
|
+
|
|
26964
|
+
// src/components/navigation-sidebar/unified-appearance.ts
|
|
26965
|
+
var unifiedRow = "gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none";
|
|
26966
|
+
var unifiedIcon = "size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full";
|
|
26967
|
+
var unifiedInactive = "text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]";
|
|
26968
|
+
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)]";
|
|
26969
|
+
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)))]";
|
|
26970
|
+
function unifiedStyle(activeVariant) {
|
|
26971
|
+
const background = {
|
|
26972
|
+
muted: "hsl(var(--monkeys-color-accent,var(--accent)))",
|
|
26973
|
+
soft: "color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 10%,transparent)",
|
|
26974
|
+
solid: "hsl(var(--monkeys-color-primary,var(--primary)))",
|
|
26975
|
+
outline: "hsl(var(--monkeys-color-background,var(--background)))"
|
|
26976
|
+
}[activeVariant ?? "muted"];
|
|
26977
|
+
const foreground = activeVariant === "solid" ? "hsl(var(--monkeys-color-primary-foreground,var(--primary-foreground)))" : "hsl(var(--monkeys-color-foreground,var(--foreground)))";
|
|
26978
|
+
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)))";
|
|
26979
|
+
return {
|
|
26980
|
+
"--navigation-internal-default-selected-background": activeVariant === void 0 ? "var(--navigation-internal-theme-selected-background)" : background,
|
|
26981
|
+
"--navigation-internal-default-selected-foreground": activeVariant === void 0 ? "var(--navigation-internal-theme-selected-foreground)" : foreground,
|
|
26982
|
+
"--navigation-internal-selected-background": "var(--monkeys-component-navigation-sidebar-row-selected-background,var(--navigation-internal-default-selected-background))",
|
|
26983
|
+
"--navigation-internal-selected-foreground": "var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--navigation-internal-default-selected-foreground))",
|
|
26984
|
+
"--navigation-internal-selected-border": `var(--monkeys-component-navigation-sidebar-row-selected-border,${border})`,
|
|
26985
|
+
"--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))",
|
|
26986
|
+
"--navigation-internal-hover-foreground": "var(--monkeys-component-navigation-sidebar-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground))))"
|
|
26987
|
+
};
|
|
26988
|
+
}
|
|
26989
|
+
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)))))]";
|
|
26990
|
+
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)]";
|
|
26991
|
+
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";
|
|
26992
|
+
function unifiedTreeClassNames(height, padding, overrides = {}) {
|
|
26993
|
+
const row = cn(unifiedRow, height, padding, unifiedInactive);
|
|
26994
|
+
return {
|
|
26995
|
+
...overrides,
|
|
26996
|
+
root: cn(treeStateVariables, "space-y-0.5", overrides.root),
|
|
26997
|
+
group: cn(
|
|
26998
|
+
"space-y-0.5",
|
|
26999
|
+
// A visible group header adds a level; headerless groups contain root items.
|
|
27000
|
+
"[&>[role=treeitem]+[role=group]]:pl-[var(--monkeys-component-navigation-sidebar-tree-group-indent,1rem)]",
|
|
27001
|
+
overrides.group
|
|
27002
|
+
),
|
|
27003
|
+
groupHeaderButton: cn("h-auto", row, overrides.groupHeaderButton),
|
|
27004
|
+
nodeButton: cn(row, selectedTreeNode, overrides.nodeButton),
|
|
27005
|
+
itemSelected: cn(unifiedSelected, overrides.itemSelected),
|
|
27006
|
+
nodeIcon: cn(
|
|
27007
|
+
unifiedIcon,
|
|
27008
|
+
"group-hover/tree-node:text-inherit",
|
|
27009
|
+
overrides.nodeIcon
|
|
27010
|
+
),
|
|
27011
|
+
nodeLabel: cn("font-medium", overrides.nodeLabel),
|
|
27012
|
+
nodeDescription: cn("text-inherit", overrides.nodeDescription),
|
|
27013
|
+
nodeDisabled: cn("opacity-50", overrides.nodeDisabled),
|
|
27014
|
+
groupActions: cn(
|
|
27015
|
+
nestedControl,
|
|
27016
|
+
"order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",
|
|
27017
|
+
overrides.groupActions
|
|
27018
|
+
),
|
|
27019
|
+
nodeActions: cn(
|
|
27020
|
+
nestedControl,
|
|
27021
|
+
"order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",
|
|
27022
|
+
overrides.nodeActions
|
|
27023
|
+
),
|
|
27024
|
+
nodeToggle: cn(nestedControl, "order-1", overrides.nodeToggle),
|
|
27025
|
+
expander: cn(nestedControl, "order-1", overrides.expander),
|
|
27026
|
+
nodeDragHandle: cn(nestedControl, overrides.nodeDragHandle)
|
|
27027
|
+
};
|
|
27028
|
+
}
|
|
26957
27029
|
function CollapseIcon({ collapsed }) {
|
|
26958
27030
|
return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-4 w-4", fill: "none", children: /* @__PURE__ */ jsx(
|
|
26959
27031
|
"path",
|
|
@@ -27139,22 +27211,34 @@ function activeVariantClassName(activeVariant) {
|
|
|
27139
27211
|
return "border-primary/25 bg-primary/10 text-foreground";
|
|
27140
27212
|
}
|
|
27141
27213
|
function resolveAppearance(appearance) {
|
|
27142
|
-
|
|
27214
|
+
if (appearance?.preset !== void 0 && appearance.preset !== "unified") {
|
|
27215
|
+
throw new TypeError(
|
|
27216
|
+
`Unknown NavigationSidebar preset "${appearance.preset}". Supported preset: unified.`
|
|
27217
|
+
);
|
|
27218
|
+
}
|
|
27219
|
+
const unified = appearance?.preset === "unified";
|
|
27220
|
+
const density = appearance?.density ?? (unified ? "compact" : "default");
|
|
27143
27221
|
const surface = appearance?.surface ?? "panel";
|
|
27144
|
-
const activeVariant = appearance?.activeVariant ?? "soft";
|
|
27222
|
+
const activeVariant = appearance?.activeVariant ?? (unified ? "muted" : "soft");
|
|
27145
27223
|
return {
|
|
27224
|
+
unified,
|
|
27146
27225
|
density,
|
|
27147
27226
|
surface,
|
|
27148
27227
|
activeVariant,
|
|
27228
|
+
selected: unified ? unifiedSelected : activeVariantClassName(activeVariant),
|
|
27229
|
+
inactive: unified ? unifiedInactive : "text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground",
|
|
27149
27230
|
root: cn(
|
|
27150
27231
|
surface === "plain" && "border-transparent bg-transparent shadow-none",
|
|
27151
27232
|
surface === "panel" && "border-border/70 bg-card text-card-foreground shadow-sm",
|
|
27152
27233
|
surface === "frosted" && "border-border/55 bg-card/80 text-card-foreground shadow-sm backdrop-blur-xl",
|
|
27153
|
-
surface === "outlined" && "border-border bg-background text-foreground shadow-none"
|
|
27234
|
+
surface === "outlined" && "border-border bg-background text-foreground shadow-none",
|
|
27235
|
+
unified && "rounded-[var(--radius)] shadow-none",
|
|
27236
|
+
unified && unifiedThemeDefaults,
|
|
27237
|
+
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"
|
|
27154
27238
|
),
|
|
27155
|
-
itemHeight: density === "compact" ? "min-h-9" : density === "comfortable" ? "min-h-14" : "min-h-11",
|
|
27156
|
-
itemPadding: density === "compact" ? "px-2 py-1.5" : density === "comfortable" ? "px-3 py-3" : "px-3 py-2",
|
|
27157
|
-
searchHeight: density === "compact" ? "h-8" : density === "comfortable" ? "h-10" : "h-9"
|
|
27239
|
+
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",
|
|
27240
|
+
itemPadding: density === "compact" ? unified ? "px-2 py-2" : "px-2 py-1.5" : density === "comfortable" ? "px-3 py-3" : "px-3 py-2",
|
|
27241
|
+
searchHeight: density === "compact" ? unified ? "h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]" : "h-8" : density === "comfortable" ? "h-10" : "h-9"
|
|
27158
27242
|
};
|
|
27159
27243
|
}
|
|
27160
27244
|
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)))]";
|
|
@@ -27209,7 +27293,8 @@ function entryClassName({
|
|
|
27209
27293
|
"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",
|
|
27210
27294
|
appearance.itemHeight,
|
|
27211
27295
|
appearance.itemPadding,
|
|
27212
|
-
|
|
27296
|
+
appearance.unified && unifiedRow,
|
|
27297
|
+
embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? appearance.selected : appearance.inactive,
|
|
27213
27298
|
collapsed && !mobile && "justify-center px-0",
|
|
27214
27299
|
item.disabled && "pointer-events-none opacity-50",
|
|
27215
27300
|
classNames?.item,
|
|
@@ -27224,7 +27309,8 @@ function EntryContent({
|
|
|
27224
27309
|
collapsed,
|
|
27225
27310
|
mobile,
|
|
27226
27311
|
classNames,
|
|
27227
|
-
endIndicator
|
|
27312
|
+
endIndicator,
|
|
27313
|
+
appearance
|
|
27228
27314
|
}) {
|
|
27229
27315
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27230
27316
|
hasRenderableNode(item.icon) ? /* @__PURE__ */ jsx(
|
|
@@ -27232,6 +27318,7 @@ function EntryContent({
|
|
|
27232
27318
|
{
|
|
27233
27319
|
className: cn(
|
|
27234
27320
|
"flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",
|
|
27321
|
+
appearance.unified && unifiedIcon,
|
|
27235
27322
|
classNames?.itemIcon
|
|
27236
27323
|
),
|
|
27237
27324
|
"aria-hidden": "true",
|
|
@@ -27251,6 +27338,7 @@ function EntryContent({
|
|
|
27251
27338
|
{
|
|
27252
27339
|
className: cn(
|
|
27253
27340
|
"min-w-0 truncate font-semibold",
|
|
27341
|
+
appearance.unified && "font-medium",
|
|
27254
27342
|
classNames?.itemLabel
|
|
27255
27343
|
),
|
|
27256
27344
|
children: item.label
|
|
@@ -27261,6 +27349,7 @@ function EntryContent({
|
|
|
27261
27349
|
{
|
|
27262
27350
|
className: cn(
|
|
27263
27351
|
"mt-0.5 truncate text-xs font-normal",
|
|
27352
|
+
appearance.unified && "text-inherit",
|
|
27264
27353
|
classNames?.itemDescription
|
|
27265
27354
|
),
|
|
27266
27355
|
children: item.description
|
|
@@ -27341,6 +27430,7 @@ function EntryButton({
|
|
|
27341
27430
|
children: /* @__PURE__ */ jsx(
|
|
27342
27431
|
EntryContent,
|
|
27343
27432
|
{
|
|
27433
|
+
appearance,
|
|
27344
27434
|
item,
|
|
27345
27435
|
collapsed,
|
|
27346
27436
|
mobile,
|
|
@@ -27377,6 +27467,7 @@ function EntryPresentation({
|
|
|
27377
27467
|
children: /* @__PURE__ */ jsx(
|
|
27378
27468
|
EntryContent,
|
|
27379
27469
|
{
|
|
27470
|
+
appearance,
|
|
27380
27471
|
item,
|
|
27381
27472
|
collapsed: false,
|
|
27382
27473
|
mobile: true,
|
|
@@ -27393,7 +27484,8 @@ function routeRowClassName({
|
|
|
27393
27484
|
return cn(
|
|
27394
27485
|
"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",
|
|
27395
27486
|
appearance.itemHeight,
|
|
27396
|
-
|
|
27487
|
+
appearance.unified && unifiedRow,
|
|
27488
|
+
active ? appearance.selected : appearance.inactive
|
|
27397
27489
|
);
|
|
27398
27490
|
}
|
|
27399
27491
|
function filterCatalogItems(items, activeFilterId) {
|
|
@@ -27547,7 +27639,8 @@ function ChildEntry({
|
|
|
27547
27639
|
"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",
|
|
27548
27640
|
appearance.itemHeight,
|
|
27549
27641
|
appearance.itemPadding,
|
|
27550
|
-
|
|
27642
|
+
appearance.unified && unifiedRow,
|
|
27643
|
+
embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? appearance.selected : appearance.inactive,
|
|
27551
27644
|
child.disabled && "pointer-events-none opacity-50",
|
|
27552
27645
|
classNames?.childItem,
|
|
27553
27646
|
active && classNames?.childItemActive,
|
|
@@ -27559,7 +27652,10 @@ function ChildEntry({
|
|
|
27559
27652
|
hasRenderableNode(child.icon) ? /* @__PURE__ */ jsx(
|
|
27560
27653
|
"span",
|
|
27561
27654
|
{
|
|
27562
|
-
className:
|
|
27655
|
+
className: cn(
|
|
27656
|
+
"flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",
|
|
27657
|
+
appearance.unified && unifiedIcon
|
|
27658
|
+
),
|
|
27563
27659
|
"aria-hidden": "true",
|
|
27564
27660
|
children: child.icon
|
|
27565
27661
|
}
|
|
@@ -27708,6 +27804,7 @@ function CollapsedChildMenu({
|
|
|
27708
27804
|
children: /* @__PURE__ */ jsx(
|
|
27709
27805
|
EntryContent,
|
|
27710
27806
|
{
|
|
27807
|
+
appearance,
|
|
27711
27808
|
item,
|
|
27712
27809
|
collapsed: !mobile,
|
|
27713
27810
|
mobile,
|
|
@@ -27821,137 +27918,148 @@ function RouteContent({
|
|
|
27821
27918
|
onExpandedItemIdsChange
|
|
27822
27919
|
]
|
|
27823
27920
|
);
|
|
27824
|
-
return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(
|
|
27825
|
-
|
|
27826
|
-
|
|
27827
|
-
|
|
27828
|
-
|
|
27829
|
-
|
|
27830
|
-
|
|
27831
|
-
const compoundItemRow = collapsed && hasChildren && Boolean(onChildSelect) || !collapsed && childrenCollapsible && !disclosure || showItemActions;
|
|
27832
|
-
const childListId = `${disclosureId}-route-children-${itemIndex}`;
|
|
27833
|
-
return /* @__PURE__ */ jsxs("li", { className: "grid min-w-0 gap-1", children: [
|
|
27834
|
-
collapsed && disclosure ? /* @__PURE__ */ jsx(
|
|
27835
|
-
CollapsedChildMenu,
|
|
27836
|
-
{
|
|
27837
|
-
item,
|
|
27838
|
-
activeChildId,
|
|
27839
|
-
label: collapsedChildMenuLabel,
|
|
27840
|
-
onChildSelect,
|
|
27841
|
-
classNames,
|
|
27842
|
-
appearance,
|
|
27843
|
-
triggerVariant: "item"
|
|
27844
|
-
}
|
|
27845
|
-
) : /* @__PURE__ */ jsxs(
|
|
27846
|
-
"div",
|
|
27847
|
-
{
|
|
27848
|
-
"data-navigation-sidebar-item-row": compoundItemRow ? item.id : void 0,
|
|
27849
|
-
"data-active": compoundItemRow ? String(active) : void 0,
|
|
27850
|
-
className: compoundItemRow ? routeRowClassName({ active, appearance }) : void 0,
|
|
27851
|
-
children: [
|
|
27852
|
-
/* @__PURE__ */ jsx(
|
|
27853
|
-
EntryButton,
|
|
27854
|
-
{
|
|
27855
|
-
item,
|
|
27856
|
-
active,
|
|
27857
|
-
collapsed,
|
|
27858
|
-
embedded: compoundItemRow,
|
|
27859
|
-
itemAs: disclosure ? "button" : itemAs,
|
|
27860
|
-
appearance,
|
|
27861
|
-
classNames,
|
|
27862
|
-
onSelect: disclosure ? () => toggleItemExpanded(item) : onItemSelect ? () => onItemSelect(item) : void 0,
|
|
27863
|
-
ariaControls: !collapsed && childrenCollapsible && disclosure ? childListId : void 0,
|
|
27864
|
-
ariaExpanded: !collapsed && childrenCollapsible && disclosure ? childrenExpanded : void 0,
|
|
27865
|
-
endIndicator: !collapsed && disclosure && !showItemActions ? /* @__PURE__ */ jsx(DisclosureIcon, { expanded: childrenExpanded }) : void 0
|
|
27866
|
-
}
|
|
27867
|
-
),
|
|
27868
|
-
showItemActions ? /* @__PURE__ */ jsx(
|
|
27869
|
-
RouteActions,
|
|
27870
|
-
{
|
|
27871
|
-
itemId: item.id,
|
|
27872
|
-
actions: item.actions,
|
|
27873
|
-
kind: "item",
|
|
27874
|
-
className: classNames?.itemActions
|
|
27875
|
-
}
|
|
27876
|
-
) : null,
|
|
27877
|
-
collapsed && onChildSelect ? /* @__PURE__ */ jsx(
|
|
27878
|
-
CollapsedChildMenu,
|
|
27879
|
-
{
|
|
27880
|
-
item,
|
|
27881
|
-
activeChildId,
|
|
27882
|
-
label: collapsedChildMenuLabel,
|
|
27883
|
-
onChildSelect,
|
|
27884
|
-
classNames
|
|
27885
|
-
}
|
|
27886
|
-
) : null,
|
|
27887
|
-
!collapsed && childrenCollapsible && (!disclosure || showItemActions) ? /* @__PURE__ */ jsx(
|
|
27888
|
-
RouteChildrenToggle,
|
|
27889
|
-
{
|
|
27890
|
-
item,
|
|
27891
|
-
expanded: childrenExpanded,
|
|
27892
|
-
controls: childListId,
|
|
27893
|
-
label: disclosureLabel,
|
|
27894
|
-
onToggle: () => toggleItemExpanded(item),
|
|
27895
|
-
classNames
|
|
27896
|
-
}
|
|
27897
|
-
) : null
|
|
27898
|
-
]
|
|
27899
|
-
}
|
|
27921
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(
|
|
27922
|
+
"ul",
|
|
27923
|
+
{
|
|
27924
|
+
className: cn(
|
|
27925
|
+
"grid list-none gap-2 p-0",
|
|
27926
|
+
appearance.unified && "gap-0.5",
|
|
27927
|
+
classNames?.list
|
|
27900
27928
|
),
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
|
|
27907
|
-
|
|
27908
|
-
|
|
27909
|
-
|
|
27929
|
+
children: routeItems.map((item, itemIndex) => {
|
|
27930
|
+
const disclosure = isDisclosureRouteItem(item);
|
|
27931
|
+
const active = !disclosure && item.id === activeItemId;
|
|
27932
|
+
const hasChildren = Boolean(item.children?.length);
|
|
27933
|
+
const childrenCollapsible = collapsibleItemIds.has(item.id);
|
|
27934
|
+
const childrenExpanded = !childrenCollapsible || expandedItemIdSet.has(item.id);
|
|
27935
|
+
const showItemActions = !collapsed && hasRenderableNode(item.actions);
|
|
27936
|
+
const compoundItemRow = collapsed && hasChildren && Boolean(onChildSelect) || !collapsed && childrenCollapsible && !disclosure || showItemActions;
|
|
27937
|
+
const childListId = `${disclosureId}-route-children-${itemIndex}`;
|
|
27938
|
+
return /* @__PURE__ */ jsxs("li", { className: "grid min-w-0 gap-1", children: [
|
|
27939
|
+
collapsed && disclosure ? /* @__PURE__ */ jsx(
|
|
27940
|
+
CollapsedChildMenu,
|
|
27941
|
+
{
|
|
27942
|
+
item,
|
|
27943
|
+
activeChildId,
|
|
27944
|
+
label: collapsedChildMenuLabel,
|
|
27945
|
+
onChildSelect,
|
|
27946
|
+
classNames,
|
|
27947
|
+
appearance,
|
|
27948
|
+
triggerVariant: "item"
|
|
27949
|
+
}
|
|
27950
|
+
) : /* @__PURE__ */ jsxs(
|
|
27951
|
+
"div",
|
|
27952
|
+
{
|
|
27953
|
+
"data-navigation-sidebar-item-row": compoundItemRow ? item.id : void 0,
|
|
27954
|
+
"data-active": compoundItemRow ? String(active) : void 0,
|
|
27955
|
+
className: compoundItemRow ? routeRowClassName({ active, appearance }) : void 0,
|
|
27956
|
+
children: [
|
|
27957
|
+
/* @__PURE__ */ jsx(
|
|
27958
|
+
EntryButton,
|
|
27959
|
+
{
|
|
27960
|
+
item,
|
|
27961
|
+
active,
|
|
27962
|
+
collapsed,
|
|
27963
|
+
embedded: compoundItemRow,
|
|
27964
|
+
itemAs: disclosure ? "button" : itemAs,
|
|
27965
|
+
appearance,
|
|
27966
|
+
classNames,
|
|
27967
|
+
onSelect: disclosure ? () => toggleItemExpanded(item) : onItemSelect ? () => onItemSelect(item) : void 0,
|
|
27968
|
+
ariaControls: !collapsed && childrenCollapsible && disclosure ? childListId : void 0,
|
|
27969
|
+
ariaExpanded: !collapsed && childrenCollapsible && disclosure ? childrenExpanded : void 0,
|
|
27970
|
+
endIndicator: !collapsed && disclosure && !showItemActions ? /* @__PURE__ */ jsx(DisclosureIcon, { expanded: childrenExpanded }) : void 0
|
|
27971
|
+
}
|
|
27972
|
+
),
|
|
27973
|
+
showItemActions ? /* @__PURE__ */ jsx(
|
|
27974
|
+
RouteActions,
|
|
27975
|
+
{
|
|
27976
|
+
itemId: item.id,
|
|
27977
|
+
actions: item.actions,
|
|
27978
|
+
kind: "item",
|
|
27979
|
+
className: classNames?.itemActions
|
|
27980
|
+
}
|
|
27981
|
+
) : null,
|
|
27982
|
+
collapsed && onChildSelect ? /* @__PURE__ */ jsx(
|
|
27983
|
+
CollapsedChildMenu,
|
|
27984
|
+
{
|
|
27985
|
+
item,
|
|
27986
|
+
activeChildId,
|
|
27987
|
+
label: collapsedChildMenuLabel,
|
|
27988
|
+
onChildSelect,
|
|
27989
|
+
classNames
|
|
27990
|
+
}
|
|
27991
|
+
) : null,
|
|
27992
|
+
!collapsed && childrenCollapsible && (!disclosure || showItemActions) ? /* @__PURE__ */ jsx(
|
|
27993
|
+
RouteChildrenToggle,
|
|
27994
|
+
{
|
|
27995
|
+
item,
|
|
27996
|
+
expanded: childrenExpanded,
|
|
27997
|
+
controls: childListId,
|
|
27998
|
+
label: disclosureLabel,
|
|
27999
|
+
onToggle: () => toggleItemExpanded(item),
|
|
28000
|
+
classNames
|
|
28001
|
+
}
|
|
28002
|
+
) : null
|
|
28003
|
+
]
|
|
28004
|
+
}
|
|
27910
28005
|
),
|
|
27911
|
-
|
|
27912
|
-
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
27916
|
-
{
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
27920
|
-
|
|
27921
|
-
|
|
27922
|
-
|
|
27923
|
-
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27928
|
-
|
|
27929
|
-
|
|
27930
|
-
|
|
27931
|
-
|
|
27932
|
-
|
|
27933
|
-
|
|
27934
|
-
|
|
27935
|
-
|
|
27936
|
-
|
|
27937
|
-
|
|
27938
|
-
|
|
27939
|
-
|
|
27940
|
-
|
|
27941
|
-
|
|
27942
|
-
|
|
27943
|
-
|
|
27944
|
-
|
|
27945
|
-
|
|
27946
|
-
|
|
27947
|
-
|
|
27948
|
-
|
|
27949
|
-
|
|
27950
|
-
|
|
27951
|
-
|
|
27952
|
-
|
|
27953
|
-
|
|
27954
|
-
|
|
28006
|
+
!collapsed && hasChildren ? /* @__PURE__ */ jsx(
|
|
28007
|
+
"ul",
|
|
28008
|
+
{
|
|
28009
|
+
id: childListId,
|
|
28010
|
+
hidden: !childrenExpanded,
|
|
28011
|
+
style: childrenExpanded ? void 0 : { display: "none" },
|
|
28012
|
+
className: cn(
|
|
28013
|
+
"ml-5 grid list-none gap-0.5 border-l border-border/70 py-1 pl-3",
|
|
28014
|
+
appearance.unified && "border-border",
|
|
28015
|
+
classNames?.childList
|
|
28016
|
+
),
|
|
28017
|
+
children: item.children?.map((child) => {
|
|
28018
|
+
const hasChildActions = hasRenderableNode(child.actions);
|
|
28019
|
+
const childActive = child.id === activeChildId;
|
|
28020
|
+
const childEntry = /* @__PURE__ */ jsx(
|
|
28021
|
+
ChildEntry,
|
|
28022
|
+
{
|
|
28023
|
+
child,
|
|
28024
|
+
parent: item,
|
|
28025
|
+
active: childActive,
|
|
28026
|
+
interactive: Boolean(onChildSelect),
|
|
28027
|
+
onSelect: onChildSelect,
|
|
28028
|
+
appearance,
|
|
28029
|
+
classNames,
|
|
28030
|
+
embedded: hasChildActions
|
|
28031
|
+
}
|
|
28032
|
+
);
|
|
28033
|
+
return /* @__PURE__ */ jsx("li", { children: hasChildActions ? /* @__PURE__ */ jsxs(
|
|
28034
|
+
"div",
|
|
28035
|
+
{
|
|
28036
|
+
"data-navigation-sidebar-child-row": child.id,
|
|
28037
|
+
"data-active": String(childActive),
|
|
28038
|
+
className: routeRowClassName({
|
|
28039
|
+
active: childActive,
|
|
28040
|
+
appearance
|
|
28041
|
+
}),
|
|
28042
|
+
children: [
|
|
28043
|
+
childEntry,
|
|
28044
|
+
/* @__PURE__ */ jsx(
|
|
28045
|
+
RouteActions,
|
|
28046
|
+
{
|
|
28047
|
+
itemId: child.id,
|
|
28048
|
+
actions: child.actions,
|
|
28049
|
+
kind: "child",
|
|
28050
|
+
className: classNames?.childActions
|
|
28051
|
+
}
|
|
28052
|
+
)
|
|
28053
|
+
]
|
|
28054
|
+
}
|
|
28055
|
+
) : childEntry }, child.id);
|
|
28056
|
+
})
|
|
28057
|
+
}
|
|
28058
|
+
) : null
|
|
28059
|
+
] }, item.id);
|
|
28060
|
+
})
|
|
28061
|
+
}
|
|
28062
|
+
) });
|
|
27955
28063
|
}
|
|
27956
28064
|
function flattenCatalogItems(items, sections, activeFilterId) {
|
|
27957
28065
|
return [
|
|
@@ -28261,7 +28369,11 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28261
28369
|
DataExplorerViewTree,
|
|
28262
28370
|
{
|
|
28263
28371
|
...treeProps,
|
|
28264
|
-
classNames:
|
|
28372
|
+
classNames: appearance.unified ? unifiedTreeClassNames(
|
|
28373
|
+
appearance.itemHeight,
|
|
28374
|
+
appearance.itemPadding,
|
|
28375
|
+
treeProps.classNames
|
|
28376
|
+
) : resolveNavigationTreeClassNames(treeProps.classNames)
|
|
28265
28377
|
}
|
|
28266
28378
|
);
|
|
28267
28379
|
};
|
|
@@ -28274,6 +28386,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28274
28386
|
"aria-label": props.ariaLabel,
|
|
28275
28387
|
"data-monkeys-component": props.dataComponent ?? "navigation-sidebar",
|
|
28276
28388
|
"data-navigation-sidebar-kind": props.kind,
|
|
28389
|
+
"data-navigation-sidebar-preset": props.appearance?.preset,
|
|
28277
28390
|
"data-collapsed": resolvedCollapsed ? "true" : "false",
|
|
28278
28391
|
className: cn(
|
|
28279
28392
|
"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",
|
|
@@ -28284,6 +28397,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28284
28397
|
props.className
|
|
28285
28398
|
),
|
|
28286
28399
|
style: {
|
|
28400
|
+
...appearance.unified ? unifiedStyle(props.appearance?.activeVariant) : {},
|
|
28287
28401
|
...props.style,
|
|
28288
28402
|
width: props.widthMode === "fill" ? void 0 : resolvedCollapsed ? bounds.collapsedWidth : resolvedWidth,
|
|
28289
28403
|
transition: isResizing ? "none" : props.style?.transition
|
|
@@ -28321,6 +28435,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28321
28435
|
{
|
|
28322
28436
|
className: cn(
|
|
28323
28437
|
"flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",
|
|
28438
|
+
appearance.unified && "min-h-14 border-border px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))]",
|
|
28324
28439
|
resolvedCollapsed && "justify-center px-1",
|
|
28325
28440
|
props.classNames?.header
|
|
28326
28441
|
),
|
|
@@ -28364,6 +28479,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28364
28479
|
{
|
|
28365
28480
|
className: cn(
|
|
28366
28481
|
"px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",
|
|
28482
|
+
appearance.unified && "pb-1",
|
|
28367
28483
|
props.classNames?.search
|
|
28368
28484
|
),
|
|
28369
28485
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -28371,7 +28487,8 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28371
28487
|
{
|
|
28372
28488
|
className: cn(
|
|
28373
28489
|
"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",
|
|
28374
|
-
appearance.searchHeight
|
|
28490
|
+
appearance.searchHeight,
|
|
28491
|
+
appearance.unified && "rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"
|
|
28375
28492
|
),
|
|
28376
28493
|
children: [
|
|
28377
28494
|
/* @__PURE__ */ jsx(
|
|
@@ -28379,6 +28496,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28379
28496
|
{
|
|
28380
28497
|
className: cn(
|
|
28381
28498
|
"flex shrink-0",
|
|
28499
|
+
appearance.unified && unifiedIcon,
|
|
28382
28500
|
props.classNames?.searchIcon
|
|
28383
28501
|
),
|
|
28384
28502
|
"aria-hidden": "true",
|
|
@@ -28432,6 +28550,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28432
28550
|
{
|
|
28433
28551
|
className: cn(
|
|
28434
28552
|
"min-h-0 flex-1 overflow-y-auto px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] py-3",
|
|
28553
|
+
appearance.unified && props.search && "pt-1",
|
|
28435
28554
|
resolvedCollapsed && "px-1.5",
|
|
28436
28555
|
props.classNames?.content
|
|
28437
28556
|
),
|
|
@@ -28443,6 +28562,7 @@ function NavigationSidebarInner(props, ref) {
|
|
|
28443
28562
|
{
|
|
28444
28563
|
className: cn(
|
|
28445
28564
|
"flex shrink-0 items-center gap-2 border-t border-border/70 p-3",
|
|
28565
|
+
appearance.unified && "border-border",
|
|
28446
28566
|
resolvedCollapsed && "justify-center px-1",
|
|
28447
28567
|
props.classNames?.footer
|
|
28448
28568
|
),
|