@uipath/apollo-wind 0.10.0 → 0.11.0-pr295.af4e744
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/custom/canvas-studio.cjs +133 -0
- package/dist/components/custom/canvas-studio.d.ts +99 -0
- package/dist/components/custom/canvas-studio.js +93 -0
- package/dist/components/custom/canvas.cjs +44 -0
- package/dist/components/custom/canvas.d.ts +14 -0
- package/dist/components/custom/canvas.js +10 -0
- package/dist/components/custom/chat-composer.cjs +105 -0
- package/dist/components/custom/chat-composer.d.ts +15 -0
- package/dist/components/custom/chat-composer.js +71 -0
- package/dist/components/custom/chat-first-experience.cjs +87 -0
- package/dist/components/custom/chat-first-experience.d.ts +24 -0
- package/dist/components/custom/chat-first-experience.js +53 -0
- package/dist/components/custom/chat-prompt-suggestions.cjs +49 -0
- package/dist/components/custom/chat-prompt-suggestions.d.ts +18 -0
- package/dist/components/custom/chat-prompt-suggestions.js +15 -0
- package/dist/components/custom/chat-steps-view.cjs +308 -0
- package/dist/components/custom/chat-steps-view.d.ts +38 -0
- package/dist/components/custom/chat-steps-view.js +274 -0
- package/dist/components/custom/flow-node.cjs +76 -0
- package/dist/components/custom/flow-node.d.ts +20 -0
- package/dist/components/custom/flow-node.js +42 -0
- package/dist/components/custom/flow-properties-bar.cjs +103 -0
- package/dist/components/custom/flow-properties-bar.d.ts +21 -0
- package/dist/components/custom/flow-properties-bar.js +69 -0
- package/dist/components/custom/flow-properties-expanded.cjs +328 -0
- package/dist/components/custom/flow-properties-expanded.d.ts +21 -0
- package/dist/components/custom/flow-properties-expanded.js +294 -0
- package/dist/components/custom/flow-properties-simple.cjs +364 -0
- package/dist/components/custom/flow-properties-simple.d.ts +62 -0
- package/dist/components/custom/flow-properties-simple.js +330 -0
- package/dist/components/custom/flow-properties.cjs +56 -0
- package/dist/components/custom/flow-properties.d.ts +28 -0
- package/dist/components/custom/flow-properties.js +22 -0
- package/dist/components/custom/global-header.cjs +422 -0
- package/dist/components/custom/global-header.d.ts +38 -0
- package/dist/components/custom/global-header.js +388 -0
- package/dist/components/custom/grid-maestro.cjs +62 -0
- package/dist/components/custom/grid-maestro.d.ts +19 -0
- package/dist/components/custom/grid-maestro.js +22 -0
- package/dist/components/custom/page-header.cjs +92 -0
- package/dist/components/custom/page-header.d.ts +43 -0
- package/dist/components/custom/page-header.js +58 -0
- package/dist/components/custom/panel-delegate.cjs +285 -0
- package/dist/components/custom/panel-delegate.d.ts +34 -0
- package/dist/components/custom/panel-delegate.js +251 -0
- package/dist/components/custom/panel-flow.cjs +262 -0
- package/dist/components/custom/panel-flow.d.ts +38 -0
- package/dist/components/custom/panel-flow.js +225 -0
- package/dist/components/custom/panel-maestro.cjs +74 -0
- package/dist/components/custom/panel-maestro.d.ts +30 -0
- package/dist/components/custom/panel-maestro.js +40 -0
- package/dist/components/custom/panel-studio.cjs +122 -0
- package/dist/components/custom/panel-studio.d.ts +48 -0
- package/dist/components/custom/panel-studio.js +85 -0
- package/dist/components/custom/toolbar-canvas.cjs +124 -0
- package/dist/components/custom/toolbar-canvas.d.ts +15 -0
- package/dist/components/custom/toolbar-canvas.js +90 -0
- package/dist/components/custom/toolbar-view.cjs +121 -0
- package/dist/components/custom/toolbar-view.d.ts +14 -0
- package/dist/components/custom/toolbar-view.js +87 -0
- package/dist/components/custom/viewport-guard.cjs +92 -0
- package/dist/components/custom/viewport-guard.d.ts +23 -0
- package/dist/components/custom/viewport-guard.js +55 -0
- package/dist/components/forms/field-renderer.cjs +3 -1
- package/dist/components/forms/field-renderer.js +3 -1
- package/dist/components/forms/form-designer.cjs +13 -2
- package/dist/components/forms/form-designer.js +13 -2
- package/dist/components/forms/rules-engine.d.ts +1 -1
- package/dist/components/ui/breadcrumb.cjs +1 -2
- package/dist/components/ui/breadcrumb.js +1 -2
- package/dist/components/ui/button-group.cjs +5 -3
- package/dist/components/ui/button-group.d.ts +2 -2
- package/dist/components/ui/button-group.js +5 -3
- package/dist/components/ui/button.cjs +3 -3
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/chart.cjs +223 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/chart.js +174 -0
- package/dist/components/ui/code-block.cjs +258 -0
- package/dist/components/ui/code-block.d.ts +48 -0
- package/dist/components/ui/code-block.js +207 -0
- package/dist/components/ui/data-table.cjs +22 -4
- package/dist/components/ui/data-table.d.ts +5 -2
- package/dist/components/ui/data-table.js +23 -5
- package/dist/components/ui/editable-cell.cjs +3 -10
- package/dist/components/ui/editable-cell.js +3 -10
- package/dist/components/ui/empty-state.cjs +17 -6
- package/dist/components/ui/empty-state.d.ts +7 -0
- package/dist/components/ui/empty-state.js +17 -6
- package/dist/components/ui/file-upload.cjs +8 -0
- package/dist/components/ui/file-upload.js +8 -0
- package/dist/components/ui/index.cjs +289 -149
- package/dist/components/ui/index.d.ts +2 -3
- package/dist/components/ui/index.js +2 -3
- package/dist/components/ui/multi-select.cjs +3 -10
- package/dist/components/ui/multi-select.js +3 -10
- package/dist/components/ui/pagination.cjs +0 -1
- package/dist/components/ui/pagination.js +0 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/tree-view.cjs +1117 -0
- package/dist/components/ui/tree-view.d.ts +95 -0
- package/dist/components/ui/tree-view.js +1083 -0
- package/dist/foundation/Future/colors.cjs +92 -0
- package/dist/foundation/Future/colors.d.ts +132 -0
- package/dist/foundation/Future/colors.js +43 -0
- package/dist/foundation/Future/radius.cjs +46 -0
- package/dist/foundation/Future/radius.d.ts +33 -0
- package/dist/foundation/Future/radius.js +12 -0
- package/dist/foundation/Future/responsive.cjs +49 -0
- package/dist/foundation/Future/responsive.d.ts +40 -0
- package/dist/foundation/Future/responsive.js +12 -0
- package/dist/foundation/Future/shadows.cjs +48 -0
- package/dist/foundation/Future/shadows.d.ts +29 -0
- package/dist/foundation/Future/shadows.js +11 -0
- package/dist/foundation/Future/spacing.cjs +71 -0
- package/dist/foundation/Future/spacing.d.ts +80 -0
- package/dist/foundation/Future/spacing.js +31 -0
- package/dist/foundation/Future/strokes.cjs +59 -0
- package/dist/foundation/Future/strokes.d.ts +49 -0
- package/dist/foundation/Future/strokes.js +19 -0
- package/dist/foundation/Future/types.cjs +18 -0
- package/dist/foundation/Future/types.d.ts +25 -0
- package/dist/foundation/Future/types.js +0 -0
- package/dist/foundation/Future/typography.cjs +79 -0
- package/dist/foundation/Future/typography.d.ts +86 -0
- package/dist/foundation/Future/typography.js +33 -0
- package/dist/index.cjs +131 -221
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -4
- package/dist/src/foundation/Future/themes.css +279 -0
- package/dist/styles.css +1941 -605
- package/dist/tailwind.css +874 -87
- package/dist/templates/Admin/settings-admin.d.ts +5 -0
- package/dist/templates/Admin/template-admin.d.ts +86 -0
- package/dist/templates/Delegate/template-delegate.d.ts +26 -0
- package/dist/templates/EmptyErrors/error-components.d.ts +3 -0
- package/dist/templates/Experiments/ideas-AnimatedGradientText.d.ts +23 -0
- package/dist/templates/Flow/template-flow.d.ts +57 -0
- package/dist/templates/Maestro/template-maestro.d.ts +52 -0
- package/dist/templates/Studio/template-studio.d.ts +102 -0
- package/dist/templates/{vscode-example.d.ts → VisualStudio/shell.d.ts} +1 -1
- package/package.json +12 -1
- package/dist/components/ui/menubar.cjs +0 -210
- package/dist/components/ui/menubar.d.ts +0 -28
- package/dist/components/ui/menubar.js +0 -131
- package/dist/components/ui/navigation-menu.cjs +0 -122
- package/dist/components/ui/navigation-menu.d.ts +0 -12
- package/dist/components/ui/navigation-menu.js +0 -64
- package/dist/examples/admin-layout-example.cjs +0 -490
- package/dist/examples/admin-layout-example.d.ts +0 -92
- package/dist/examples/admin-layout-example.js +0 -411
- package/dist/examples/app-shell-example.cjs +0 -452
- package/dist/examples/app-shell-example.d.ts +0 -52
- package/dist/examples/app-shell-example.js +0 -418
- package/dist/examples/dashboard-example.cjs +0 -590
- package/dist/examples/dashboard-example.d.ts +0 -11
- package/dist/examples/dashboard-example.js +0 -556
- package/dist/examples/data-management-example.cjs +0 -584
- package/dist/examples/data-management-example.d.ts +0 -1
- package/dist/examples/data-management-example.js +0 -550
- package/dist/examples/flow-editor-layout-example.cjs +0 -309
- package/dist/examples/flow-editor-layout-example.d.ts +0 -22
- package/dist/examples/flow-editor-layout-example.js +0 -269
- package/dist/examples/flow-start-example.cjs +0 -467
- package/dist/examples/flow-start-example.d.ts +0 -30
- package/dist/examples/flow-start-example.js +0 -433
- package/dist/examples/form-builder-example.cjs +0 -674
- package/dist/examples/form-builder-example.js +0 -640
- package/dist/examples/new-project-example.cjs +0 -550
- package/dist/examples/new-project-example.d.ts +0 -30
- package/dist/examples/new-project-example.js +0 -516
- package/dist/examples/settings-example.cjs +0 -864
- package/dist/examples/settings-example.d.ts +0 -1
- package/dist/examples/settings-example.js +0 -830
- package/dist/examples/vscode-example.cjs +0 -340
- package/dist/examples/vscode-example.d.ts +0 -80
- package/dist/examples/vscode-example.js +0 -270
- package/dist/templates/admin-layout-example.d.ts +0 -92
- package/dist/templates/app-shell-example.d.ts +0 -52
- package/dist/templates/dashboard-example.d.ts +0 -11
- package/dist/templates/data-management-example.d.ts +0 -1
- package/dist/templates/flow-editor-layout-example.d.ts +0 -22
- package/dist/templates/flow-start-example.d.ts +0 -30
- package/dist/templates/form-builder-example.d.ts +0 -1
- package/dist/templates/new-project-example.d.ts +0 -30
- package/dist/templates/settings-example.d.ts +0 -1
- /package/dist/{examples → templates/Forms}/form-builder-example.d.ts +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from "react";
|
|
3
|
+
import { cn } from "../../lib/index.js";
|
|
4
|
+
function PageHeader({ className, title, description, breadcrumb, actions, tabs, activeTab, onTabChange }) {
|
|
5
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
6
|
+
className: cn('border-b border-border-subtle px-6 py-4', className),
|
|
7
|
+
children: [
|
|
8
|
+
breadcrumb && breadcrumb.length > 0 && /*#__PURE__*/ jsx("div", {
|
|
9
|
+
className: "mb-2 flex items-center gap-1.5 text-sm text-foreground-muted",
|
|
10
|
+
children: breadcrumb.map((item, i)=>/*#__PURE__*/ jsxs(Fragment, {
|
|
11
|
+
children: [
|
|
12
|
+
i > 0 && /*#__PURE__*/ jsx("span", {
|
|
13
|
+
className: "text-foreground-subtle",
|
|
14
|
+
children: "/"
|
|
15
|
+
}),
|
|
16
|
+
i === breadcrumb.length - 1 ? /*#__PURE__*/ jsx("span", {
|
|
17
|
+
className: "text-foreground",
|
|
18
|
+
children: item
|
|
19
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
20
|
+
children: item
|
|
21
|
+
})
|
|
22
|
+
]
|
|
23
|
+
}, item))
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ jsxs("div", {
|
|
26
|
+
className: "flex items-center justify-between",
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ jsxs("div", {
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ jsx("h1", {
|
|
31
|
+
className: "text-xl font-semibold text-foreground",
|
|
32
|
+
children: title
|
|
33
|
+
}),
|
|
34
|
+
description && /*#__PURE__*/ jsx("p", {
|
|
35
|
+
className: "mt-0.5 text-sm text-foreground-muted",
|
|
36
|
+
children: description
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}),
|
|
40
|
+
actions && /*#__PURE__*/ jsx("div", {
|
|
41
|
+
className: "flex items-center gap-2",
|
|
42
|
+
children: actions
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
}),
|
|
46
|
+
tabs && /*#__PURE__*/ jsx("div", {
|
|
47
|
+
className: "mt-4 flex gap-1",
|
|
48
|
+
children: tabs.map((tab)=>/*#__PURE__*/ jsx("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
className: cn('px-4 pb-2 pt-1 text-sm font-medium transition-colors', activeTab === tab.value ? 'border-b-2 border-brand text-foreground' : 'text-foreground-muted hover:text-foreground'),
|
|
51
|
+
onClick: ()=>onTabChange?.(tab.value),
|
|
52
|
+
children: tab.label
|
|
53
|
+
}, tab.value))
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export { PageHeader };
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
DelegatePanel: ()=>DelegatePanel
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
const avatar_cjs_namespaceObject = require("../ui/avatar.cjs");
|
|
33
|
+
const collapsible_cjs_namespaceObject = require("../ui/collapsible.cjs");
|
|
34
|
+
const scroll_area_cjs_namespaceObject = require("../ui/scroll-area.cjs");
|
|
35
|
+
const tooltip_cjs_namespaceObject = require("../ui/tooltip.cjs");
|
|
36
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
37
|
+
function UiPathLogo({ className }) {
|
|
38
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
39
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-9 items-center justify-center rounded-lg bg-brand shadow-sm', className),
|
|
40
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
41
|
+
className: "text-xs font-bold text-foreground-on-accent select-none",
|
|
42
|
+
children: "Ui"
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function ExpandedNavItem({ item, isOpen, onToggle, selectedChildId, onChildSelect }) {
|
|
47
|
+
const isExpandable = Array.isArray(item.children);
|
|
48
|
+
if (!isExpandable) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
className: "flex h-10 w-full items-center gap-2 rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
51
|
+
onClick: onToggle,
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
54
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
55
|
+
children: item.icon
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
58
|
+
className: "text-sm font-semibold",
|
|
59
|
+
children: item.label
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(collapsible_cjs_namespaceObject.Collapsible, {
|
|
64
|
+
open: isOpen,
|
|
65
|
+
onOpenChange: ()=>onToggle(),
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(collapsible_cjs_namespaceObject.CollapsibleTrigger, {
|
|
68
|
+
asChild: true,
|
|
69
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
70
|
+
type: "button",
|
|
71
|
+
className: "flex h-10 w-full items-center justify-between rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
72
|
+
children: [
|
|
73
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
74
|
+
className: "flex items-center gap-2",
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
77
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
78
|
+
children: item.icon
|
|
79
|
+
}),
|
|
80
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
81
|
+
className: "text-sm font-semibold",
|
|
82
|
+
children: item.label
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
87
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center",
|
|
88
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
89
|
+
className: (0, index_cjs_namespaceObject.cn)('h-5 w-5 transition-transform duration-200', isOpen && 'rotate-180')
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(collapsible_cjs_namespaceObject.CollapsibleContent, {
|
|
96
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
97
|
+
className: "flex flex-col",
|
|
98
|
+
children: item.children?.map((child)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
99
|
+
type: "button",
|
|
100
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-10 items-center rounded-2xl pl-12 pr-3 text-sm font-medium text-foreground-muted transition-colors hover:bg-surface-hover', selectedChildId === child.id && 'bg-surface-hover text-foreground-on-accent'),
|
|
101
|
+
onClick: ()=>onChildSelect?.(child.id),
|
|
102
|
+
children: child.label
|
|
103
|
+
}, child.id))
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function CollapsedNavItem({ item, isActive, onClick }) {
|
|
110
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tooltip_cjs_namespaceObject.Tooltip, {
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
113
|
+
asChild: true,
|
|
114
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
115
|
+
type: "button",
|
|
116
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground', isActive && 'text-brand-foreground'),
|
|
117
|
+
onClick: onClick,
|
|
118
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
119
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-9 items-center justify-center rounded-lg transition-colors', isActive && 'bg-brand-subtle'),
|
|
120
|
+
children: item.icon
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
}),
|
|
124
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipContent, {
|
|
125
|
+
side: "right",
|
|
126
|
+
children: item.label
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function DelegatePanel({ className, defaultOpen = true, open: controlledOpen, onOpenChange, navItems = [], activeNavId: controlledActiveNavId, onNavChange, selectedChildId, onChildSelect }) {
|
|
132
|
+
const [internalOpen, setInternalOpen] = external_react_namespaceObject.useState(defaultOpen);
|
|
133
|
+
const panelOpen = controlledOpen ?? internalOpen;
|
|
134
|
+
const setPanelOpen = external_react_namespaceObject.useCallback((next)=>{
|
|
135
|
+
setInternalOpen(next);
|
|
136
|
+
onOpenChange?.(next);
|
|
137
|
+
}, [
|
|
138
|
+
onOpenChange
|
|
139
|
+
]);
|
|
140
|
+
const [internalActiveNavId, setInternalActiveNavId] = external_react_namespaceObject.useState(navItems[0]?.id ?? '');
|
|
141
|
+
const activeNavId = controlledActiveNavId ?? internalActiveNavId;
|
|
142
|
+
const setActiveNavId = external_react_namespaceObject.useCallback((id)=>{
|
|
143
|
+
setInternalActiveNavId(id);
|
|
144
|
+
onNavChange?.(id);
|
|
145
|
+
}, [
|
|
146
|
+
onNavChange
|
|
147
|
+
]);
|
|
148
|
+
const [openSections, setOpenSections] = external_react_namespaceObject.useState(()=>{
|
|
149
|
+
const initial = {};
|
|
150
|
+
navItems.forEach((item)=>{
|
|
151
|
+
if (item.children && item.children.length > 0) initial[item.id] = item.defaultOpen ?? true;
|
|
152
|
+
});
|
|
153
|
+
return initial;
|
|
154
|
+
});
|
|
155
|
+
const toggleSection = (id)=>{
|
|
156
|
+
setOpenSections((prev)=>({
|
|
157
|
+
...prev,
|
|
158
|
+
[id]: !prev[id]
|
|
159
|
+
}));
|
|
160
|
+
};
|
|
161
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipProvider, {
|
|
162
|
+
delayDuration: 300,
|
|
163
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
164
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col justify-between bg-surface-overlay shadow-[0px_4px_24px_0px_rgba(0,0,0,0.25)] transition-[width] duration-300 ease-in-out', panelOpen ? 'w-80' : 'w-[60px]', className),
|
|
165
|
+
children: [
|
|
166
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
167
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
168
|
+
children: [
|
|
169
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
170
|
+
className: (0, index_cjs_namespaceObject.cn)('flex shrink-0 items-center gap-2 pt-1', panelOpen ? 'pl-1 pr-4' : 'justify-center px-0 pt-3'),
|
|
171
|
+
children: [
|
|
172
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
173
|
+
className: "flex h-[60px] w-[60px] shrink-0 items-center justify-center",
|
|
174
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(UiPathLogo, {})
|
|
175
|
+
}),
|
|
176
|
+
panelOpen && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
177
|
+
className: "flex flex-1 items-center justify-between",
|
|
178
|
+
children: [
|
|
179
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
180
|
+
className: "flex items-center gap-[18px]",
|
|
181
|
+
children: [
|
|
182
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
183
|
+
type: "button",
|
|
184
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
185
|
+
"aria-label": "New conversation",
|
|
186
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MessageCirclePlus, {
|
|
187
|
+
className: "h-5 w-5"
|
|
188
|
+
})
|
|
189
|
+
}),
|
|
190
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
191
|
+
type: "button",
|
|
192
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
193
|
+
"aria-label": "Picture in picture",
|
|
194
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PictureInPicture2, {
|
|
195
|
+
className: "h-5 w-5"
|
|
196
|
+
})
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
}),
|
|
200
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
201
|
+
type: "button",
|
|
202
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
203
|
+
onClick: ()=>setPanelOpen(false),
|
|
204
|
+
"aria-label": "Collapse panel",
|
|
205
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelRightOpen, {
|
|
206
|
+
className: "h-5 w-5"
|
|
207
|
+
})
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
}),
|
|
213
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
|
|
214
|
+
className: "flex-1",
|
|
215
|
+
children: panelOpen ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
|
|
216
|
+
className: "flex flex-col gap-1 px-3 pt-[18px]",
|
|
217
|
+
children: navItems.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ExpandedNavItem, {
|
|
218
|
+
item: item,
|
|
219
|
+
isOpen: openSections[item.id] ?? false,
|
|
220
|
+
onToggle: ()=>{
|
|
221
|
+
if (item.children?.length) toggleSection(item.id);
|
|
222
|
+
setActiveNavId(item.id);
|
|
223
|
+
},
|
|
224
|
+
selectedChildId: selectedChildId,
|
|
225
|
+
onChildSelect: onChildSelect
|
|
226
|
+
}, item.id))
|
|
227
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("nav", {
|
|
228
|
+
className: "flex flex-col items-center pt-[18px]",
|
|
229
|
+
children: [
|
|
230
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tooltip_cjs_namespaceObject.Tooltip, {
|
|
231
|
+
children: [
|
|
232
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
233
|
+
asChild: true,
|
|
234
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
235
|
+
type: "button",
|
|
236
|
+
className: "flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground",
|
|
237
|
+
onClick: ()=>setPanelOpen(true),
|
|
238
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
239
|
+
className: "flex h-9 w-9 items-center justify-center rounded-lg",
|
|
240
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelRightOpen, {
|
|
241
|
+
className: "h-5 w-5 -scale-x-100"
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
})
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipContent, {
|
|
247
|
+
side: "right",
|
|
248
|
+
children: "Expand panel"
|
|
249
|
+
})
|
|
250
|
+
]
|
|
251
|
+
}),
|
|
252
|
+
navItems.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CollapsedNavItem, {
|
|
253
|
+
item: item,
|
|
254
|
+
isActive: activeNavId === item.id,
|
|
255
|
+
onClick: ()=>{
|
|
256
|
+
setActiveNavId(item.id);
|
|
257
|
+
setPanelOpen(true);
|
|
258
|
+
}
|
|
259
|
+
}, item.id))
|
|
260
|
+
]
|
|
261
|
+
})
|
|
262
|
+
})
|
|
263
|
+
]
|
|
264
|
+
}),
|
|
265
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
266
|
+
className: "flex h-[60px] shrink-0 items-center justify-start px-3",
|
|
267
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(avatar_cjs_namespaceObject.Avatar, {
|
|
268
|
+
className: "h-8 w-8 bg-surface-raised",
|
|
269
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(avatar_cjs_namespaceObject.AvatarFallback, {
|
|
270
|
+
className: "bg-surface-raised text-xs text-foreground-muted",
|
|
271
|
+
children: "U"
|
|
272
|
+
})
|
|
273
|
+
})
|
|
274
|
+
})
|
|
275
|
+
]
|
|
276
|
+
})
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
exports.DelegatePanel = __webpack_exports__.DelegatePanel;
|
|
280
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
281
|
+
"DelegatePanel"
|
|
282
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
283
|
+
Object.defineProperty(exports, '__esModule', {
|
|
284
|
+
value: true
|
|
285
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface NavItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
children?: NavChildItem[];
|
|
7
|
+
/** Whether the collapsible section starts expanded. Defaults to true. */
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface NavChildItem {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DelegatePanelProps {
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Whether the panel starts expanded */
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
/** Controlled open state (overrides internal state when provided) */
|
|
19
|
+
open?: boolean;
|
|
20
|
+
/** Callback when the panel open state changes */
|
|
21
|
+
onOpenChange?: (open: boolean) => void;
|
|
22
|
+
/** Navigation items */
|
|
23
|
+
navItems?: NavItem[];
|
|
24
|
+
/** ID of the currently active top-level nav */
|
|
25
|
+
activeNavId?: string;
|
|
26
|
+
/** Callback when a top-level nav is activated */
|
|
27
|
+
onNavChange?: (navId: string) => void;
|
|
28
|
+
/** ID of the currently selected nav child */
|
|
29
|
+
selectedChildId?: string;
|
|
30
|
+
/** Callback when a nav child is selected */
|
|
31
|
+
onChildSelect?: (childId: string) => void;
|
|
32
|
+
}
|
|
33
|
+
/** Collapsible left-hand navigation panel for Delegate templates. */
|
|
34
|
+
export declare function DelegatePanel({ className, defaultOpen, open: controlledOpen, onOpenChange, navItems, activeNavId: controlledActiveNavId, onNavChange, selectedChildId, onChildSelect, }: DelegatePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown, MessageCirclePlus, PanelRightOpen, PictureInPicture2 } from "lucide-react";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { Avatar, AvatarFallback } from "../ui/avatar.js";
|
|
5
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../ui/collapsible.js";
|
|
6
|
+
import { ScrollArea } from "../ui/scroll-area.js";
|
|
7
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip.js";
|
|
8
|
+
import { cn } from "../../lib/index.js";
|
|
9
|
+
function UiPathLogo({ className }) {
|
|
10
|
+
return /*#__PURE__*/ jsx("div", {
|
|
11
|
+
className: cn('flex h-9 w-9 items-center justify-center rounded-lg bg-brand shadow-sm', className),
|
|
12
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
13
|
+
className: "text-xs font-bold text-foreground-on-accent select-none",
|
|
14
|
+
children: "Ui"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function ExpandedNavItem({ item, isOpen, onToggle, selectedChildId, onChildSelect }) {
|
|
19
|
+
const isExpandable = Array.isArray(item.children);
|
|
20
|
+
if (!isExpandable) return /*#__PURE__*/ jsxs("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
className: "flex h-10 w-full items-center gap-2 rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
23
|
+
onClick: onToggle,
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsx("div", {
|
|
26
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
27
|
+
children: item.icon
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ jsx("span", {
|
|
30
|
+
className: "text-sm font-semibold",
|
|
31
|
+
children: item.label
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
return /*#__PURE__*/ jsxs(Collapsible, {
|
|
36
|
+
open: isOpen,
|
|
37
|
+
onOpenChange: ()=>onToggle(),
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ jsx(CollapsibleTrigger, {
|
|
40
|
+
asChild: true,
|
|
41
|
+
children: /*#__PURE__*/ jsxs("button", {
|
|
42
|
+
type: "button",
|
|
43
|
+
className: "flex h-10 w-full items-center justify-between rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ jsxs("div", {
|
|
46
|
+
className: "flex items-center gap-2",
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ jsx("div", {
|
|
49
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
50
|
+
children: item.icon
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ jsx("span", {
|
|
53
|
+
className: "text-sm font-semibold",
|
|
54
|
+
children: item.label
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ jsx("div", {
|
|
59
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center",
|
|
60
|
+
children: /*#__PURE__*/ jsx(ChevronDown, {
|
|
61
|
+
className: cn('h-5 w-5 transition-transform duration-200', isOpen && 'rotate-180')
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
})
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ jsx(CollapsibleContent, {
|
|
68
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
69
|
+
className: "flex flex-col",
|
|
70
|
+
children: item.children?.map((child)=>/*#__PURE__*/ jsx("button", {
|
|
71
|
+
type: "button",
|
|
72
|
+
className: cn('flex h-10 items-center rounded-2xl pl-12 pr-3 text-sm font-medium text-foreground-muted transition-colors hover:bg-surface-hover', selectedChildId === child.id && 'bg-surface-hover text-foreground-on-accent'),
|
|
73
|
+
onClick: ()=>onChildSelect?.(child.id),
|
|
74
|
+
children: child.label
|
|
75
|
+
}, child.id))
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function CollapsedNavItem({ item, isActive, onClick }) {
|
|
82
|
+
return /*#__PURE__*/ jsxs(Tooltip, {
|
|
83
|
+
children: [
|
|
84
|
+
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
85
|
+
asChild: true,
|
|
86
|
+
children: /*#__PURE__*/ jsx("button", {
|
|
87
|
+
type: "button",
|
|
88
|
+
className: cn('flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground', isActive && 'text-brand-foreground'),
|
|
89
|
+
onClick: onClick,
|
|
90
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
91
|
+
className: cn('flex h-9 w-9 items-center justify-center rounded-lg transition-colors', isActive && 'bg-brand-subtle'),
|
|
92
|
+
children: item.icon
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
}),
|
|
96
|
+
/*#__PURE__*/ jsx(TooltipContent, {
|
|
97
|
+
side: "right",
|
|
98
|
+
children: item.label
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function DelegatePanel({ className, defaultOpen = true, open: controlledOpen, onOpenChange, navItems = [], activeNavId: controlledActiveNavId, onNavChange, selectedChildId, onChildSelect }) {
|
|
104
|
+
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
105
|
+
const panelOpen = controlledOpen ?? internalOpen;
|
|
106
|
+
const setPanelOpen = useCallback((next)=>{
|
|
107
|
+
setInternalOpen(next);
|
|
108
|
+
onOpenChange?.(next);
|
|
109
|
+
}, [
|
|
110
|
+
onOpenChange
|
|
111
|
+
]);
|
|
112
|
+
const [internalActiveNavId, setInternalActiveNavId] = useState(navItems[0]?.id ?? '');
|
|
113
|
+
const activeNavId = controlledActiveNavId ?? internalActiveNavId;
|
|
114
|
+
const setActiveNavId = useCallback((id)=>{
|
|
115
|
+
setInternalActiveNavId(id);
|
|
116
|
+
onNavChange?.(id);
|
|
117
|
+
}, [
|
|
118
|
+
onNavChange
|
|
119
|
+
]);
|
|
120
|
+
const [openSections, setOpenSections] = useState(()=>{
|
|
121
|
+
const initial = {};
|
|
122
|
+
navItems.forEach((item)=>{
|
|
123
|
+
if (item.children && item.children.length > 0) initial[item.id] = item.defaultOpen ?? true;
|
|
124
|
+
});
|
|
125
|
+
return initial;
|
|
126
|
+
});
|
|
127
|
+
const toggleSection = (id)=>{
|
|
128
|
+
setOpenSections((prev)=>({
|
|
129
|
+
...prev,
|
|
130
|
+
[id]: !prev[id]
|
|
131
|
+
}));
|
|
132
|
+
};
|
|
133
|
+
return /*#__PURE__*/ jsx(TooltipProvider, {
|
|
134
|
+
delayDuration: 300,
|
|
135
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
136
|
+
className: cn('flex flex-col justify-between bg-surface-overlay shadow-[0px_4px_24px_0px_rgba(0,0,0,0.25)] transition-[width] duration-300 ease-in-out', panelOpen ? 'w-80' : 'w-[60px]', className),
|
|
137
|
+
children: [
|
|
138
|
+
/*#__PURE__*/ jsxs("div", {
|
|
139
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
140
|
+
children: [
|
|
141
|
+
/*#__PURE__*/ jsxs("div", {
|
|
142
|
+
className: cn('flex shrink-0 items-center gap-2 pt-1', panelOpen ? 'pl-1 pr-4' : 'justify-center px-0 pt-3'),
|
|
143
|
+
children: [
|
|
144
|
+
/*#__PURE__*/ jsx("div", {
|
|
145
|
+
className: "flex h-[60px] w-[60px] shrink-0 items-center justify-center",
|
|
146
|
+
children: /*#__PURE__*/ jsx(UiPathLogo, {})
|
|
147
|
+
}),
|
|
148
|
+
panelOpen && /*#__PURE__*/ jsxs("div", {
|
|
149
|
+
className: "flex flex-1 items-center justify-between",
|
|
150
|
+
children: [
|
|
151
|
+
/*#__PURE__*/ jsxs("div", {
|
|
152
|
+
className: "flex items-center gap-[18px]",
|
|
153
|
+
children: [
|
|
154
|
+
/*#__PURE__*/ jsx("button", {
|
|
155
|
+
type: "button",
|
|
156
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
157
|
+
"aria-label": "New conversation",
|
|
158
|
+
children: /*#__PURE__*/ jsx(MessageCirclePlus, {
|
|
159
|
+
className: "h-5 w-5"
|
|
160
|
+
})
|
|
161
|
+
}),
|
|
162
|
+
/*#__PURE__*/ jsx("button", {
|
|
163
|
+
type: "button",
|
|
164
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
165
|
+
"aria-label": "Picture in picture",
|
|
166
|
+
children: /*#__PURE__*/ jsx(PictureInPicture2, {
|
|
167
|
+
className: "h-5 w-5"
|
|
168
|
+
})
|
|
169
|
+
})
|
|
170
|
+
]
|
|
171
|
+
}),
|
|
172
|
+
/*#__PURE__*/ jsx("button", {
|
|
173
|
+
type: "button",
|
|
174
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
175
|
+
onClick: ()=>setPanelOpen(false),
|
|
176
|
+
"aria-label": "Collapse panel",
|
|
177
|
+
children: /*#__PURE__*/ jsx(PanelRightOpen, {
|
|
178
|
+
className: "h-5 w-5"
|
|
179
|
+
})
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
}),
|
|
185
|
+
/*#__PURE__*/ jsx(ScrollArea, {
|
|
186
|
+
className: "flex-1",
|
|
187
|
+
children: panelOpen ? /*#__PURE__*/ jsx("nav", {
|
|
188
|
+
className: "flex flex-col gap-1 px-3 pt-[18px]",
|
|
189
|
+
children: navItems.map((item)=>/*#__PURE__*/ jsx(ExpandedNavItem, {
|
|
190
|
+
item: item,
|
|
191
|
+
isOpen: openSections[item.id] ?? false,
|
|
192
|
+
onToggle: ()=>{
|
|
193
|
+
if (item.children?.length) toggleSection(item.id);
|
|
194
|
+
setActiveNavId(item.id);
|
|
195
|
+
},
|
|
196
|
+
selectedChildId: selectedChildId,
|
|
197
|
+
onChildSelect: onChildSelect
|
|
198
|
+
}, item.id))
|
|
199
|
+
}) : /*#__PURE__*/ jsxs("nav", {
|
|
200
|
+
className: "flex flex-col items-center pt-[18px]",
|
|
201
|
+
children: [
|
|
202
|
+
/*#__PURE__*/ jsxs(Tooltip, {
|
|
203
|
+
children: [
|
|
204
|
+
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
205
|
+
asChild: true,
|
|
206
|
+
children: /*#__PURE__*/ jsx("button", {
|
|
207
|
+
type: "button",
|
|
208
|
+
className: "flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground",
|
|
209
|
+
onClick: ()=>setPanelOpen(true),
|
|
210
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
211
|
+
className: "flex h-9 w-9 items-center justify-center rounded-lg",
|
|
212
|
+
children: /*#__PURE__*/ jsx(PanelRightOpen, {
|
|
213
|
+
className: "h-5 w-5 -scale-x-100"
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
}),
|
|
218
|
+
/*#__PURE__*/ jsx(TooltipContent, {
|
|
219
|
+
side: "right",
|
|
220
|
+
children: "Expand panel"
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
}),
|
|
224
|
+
navItems.map((item)=>/*#__PURE__*/ jsx(CollapsedNavItem, {
|
|
225
|
+
item: item,
|
|
226
|
+
isActive: activeNavId === item.id,
|
|
227
|
+
onClick: ()=>{
|
|
228
|
+
setActiveNavId(item.id);
|
|
229
|
+
setPanelOpen(true);
|
|
230
|
+
}
|
|
231
|
+
}, item.id))
|
|
232
|
+
]
|
|
233
|
+
})
|
|
234
|
+
})
|
|
235
|
+
]
|
|
236
|
+
}),
|
|
237
|
+
/*#__PURE__*/ jsx("div", {
|
|
238
|
+
className: "flex h-[60px] shrink-0 items-center justify-start px-3",
|
|
239
|
+
children: /*#__PURE__*/ jsx(Avatar, {
|
|
240
|
+
className: "h-8 w-8 bg-surface-raised",
|
|
241
|
+
children: /*#__PURE__*/ jsx(AvatarFallback, {
|
|
242
|
+
className: "bg-surface-raised text-xs text-foreground-muted",
|
|
243
|
+
children: "U"
|
|
244
|
+
})
|
|
245
|
+
})
|
|
246
|
+
})
|
|
247
|
+
]
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
export { DelegatePanel };
|