@uipath/apollo-wind 0.9.1 → 0.10.0-pr219.61d64eb
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.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 +48 -0
- package/dist/components/custom/chat-prompt-suggestions.d.ts +18 -0
- package/dist/components/custom/chat-prompt-suggestions.js +14 -0
- package/dist/components/custom/chat-steps-view.cjs +307 -0
- package/dist/components/custom/chat-steps-view.d.ts +38 -0
- package/dist/components/custom/chat-steps-view.js +273 -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 +101 -0
- package/dist/components/custom/flow-properties-bar.d.ts +21 -0
- package/dist/components/custom/flow-properties-bar.js +67 -0
- package/dist/components/custom/flow-properties-expanded.cjs +324 -0
- package/dist/components/custom/flow-properties-expanded.d.ts +19 -0
- package/dist/components/custom/flow-properties-expanded.js +290 -0
- package/dist/components/custom/flow-properties-simple.cjs +357 -0
- package/dist/components/custom/flow-properties-simple.d.ts +62 -0
- package/dist/components/custom/flow-properties-simple.js +323 -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 +415 -0
- package/dist/components/custom/global-header.d.ts +38 -0
- package/dist/components/custom/global-header.js +381 -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/panel-delegate.cjs +280 -0
- package/dist/components/custom/panel-delegate.d.ts +34 -0
- package/dist/components/custom/panel-delegate.js +246 -0
- package/dist/components/custom/panel-flow.cjs +260 -0
- package/dist/components/custom/panel-flow.d.ts +38 -0
- package/dist/components/custom/panel-flow.js +223 -0
- package/dist/components/custom/panel-maestro.cjs +73 -0
- package/dist/components/custom/panel-maestro.d.ts +30 -0
- package/dist/components/custom/panel-maestro.js +39 -0
- package/dist/components/custom/toolbar-canvas.cjs +121 -0
- package/dist/components/custom/toolbar-canvas.d.ts +15 -0
- package/dist/components/custom/toolbar-canvas.js +87 -0
- package/dist/components/custom/toolbar-view.cjs +119 -0
- package/dist/components/custom/toolbar-view.d.ts +14 -0
- package/dist/components/custom/toolbar-view.js +85 -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/ui/button.cjs +3 -3
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/chart.cjs +218 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/chart.js +169 -0
- package/dist/components/ui/data-table.cjs +14 -2
- package/dist/components/ui/data-table.d.ts +4 -1
- package/dist/components/ui/data-table.js +15 -3
- 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 +82 -42
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.js +82 -42
- 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/tree-view.cjs +1101 -0
- package/dist/components/ui/tree-view.d.ts +95 -0
- package/dist/components/ui/tree-view.js +1067 -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 +18 -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 +125 -219
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -4
- package/dist/src/foundation/Future/themes.css +371 -0
- package/dist/styles.css +1704 -582
- package/dist/tailwind.css +4 -0
- package/dist/templates/Admin/settings-admin.d.ts +5 -0
- package/dist/templates/Admin/template-admin.d.ts +105 -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 +52 -0
- package/dist/templates/Maestro/template-maestro.d.ts +52 -0
- package/dist/templates/{vscode-example.d.ts → VisualStudio/shell.d.ts} +1 -1
- package/package.json +10 -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,280 @@
|
|
|
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
|
+
className: "flex h-10 w-full items-center gap-2 rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
50
|
+
onClick: onToggle,
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
53
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
54
|
+
children: item.icon
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
57
|
+
className: "text-sm font-semibold",
|
|
58
|
+
children: item.label
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(collapsible_cjs_namespaceObject.Collapsible, {
|
|
63
|
+
open: isOpen,
|
|
64
|
+
onOpenChange: ()=>onToggle(),
|
|
65
|
+
children: [
|
|
66
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(collapsible_cjs_namespaceObject.CollapsibleTrigger, {
|
|
67
|
+
asChild: true,
|
|
68
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
69
|
+
className: "flex h-10 w-full items-center justify-between rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
70
|
+
children: [
|
|
71
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
72
|
+
className: "flex items-center gap-2",
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
75
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
76
|
+
children: item.icon
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
79
|
+
className: "text-sm font-semibold",
|
|
80
|
+
children: item.label
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
85
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center",
|
|
86
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
87
|
+
className: (0, index_cjs_namespaceObject.cn)('h-5 w-5 transition-transform duration-200', isOpen && 'rotate-180')
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
}),
|
|
93
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(collapsible_cjs_namespaceObject.CollapsibleContent, {
|
|
94
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
95
|
+
className: "flex flex-col",
|
|
96
|
+
children: item.children?.map((child)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
97
|
+
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'),
|
|
98
|
+
onClick: ()=>onChildSelect?.(child.id),
|
|
99
|
+
children: child.label
|
|
100
|
+
}, child.id))
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function CollapsedNavItem({ item, isActive, onClick }) {
|
|
107
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tooltip_cjs_namespaceObject.Tooltip, {
|
|
108
|
+
children: [
|
|
109
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
110
|
+
asChild: true,
|
|
111
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
112
|
+
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'),
|
|
113
|
+
onClick: onClick,
|
|
114
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
115
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-9 items-center justify-center rounded-lg transition-colors', isActive && 'bg-brand-subtle'),
|
|
116
|
+
children: item.icon
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
}),
|
|
120
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipContent, {
|
|
121
|
+
side: "right",
|
|
122
|
+
children: item.label
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function DelegatePanel({ className, defaultOpen = true, open: controlledOpen, onOpenChange, navItems = [], activeNavId: controlledActiveNavId, onNavChange, selectedChildId, onChildSelect }) {
|
|
128
|
+
const [internalOpen, setInternalOpen] = external_react_namespaceObject.useState(defaultOpen);
|
|
129
|
+
const panelOpen = controlledOpen ?? internalOpen;
|
|
130
|
+
const setPanelOpen = external_react_namespaceObject.useCallback((next)=>{
|
|
131
|
+
setInternalOpen(next);
|
|
132
|
+
onOpenChange?.(next);
|
|
133
|
+
}, [
|
|
134
|
+
onOpenChange
|
|
135
|
+
]);
|
|
136
|
+
const [internalActiveNavId, setInternalActiveNavId] = external_react_namespaceObject.useState(navItems[0]?.id ?? '');
|
|
137
|
+
const activeNavId = controlledActiveNavId ?? internalActiveNavId;
|
|
138
|
+
const setActiveNavId = external_react_namespaceObject.useCallback((id)=>{
|
|
139
|
+
setInternalActiveNavId(id);
|
|
140
|
+
onNavChange?.(id);
|
|
141
|
+
}, [
|
|
142
|
+
onNavChange
|
|
143
|
+
]);
|
|
144
|
+
const [openSections, setOpenSections] = external_react_namespaceObject.useState(()=>{
|
|
145
|
+
const initial = {};
|
|
146
|
+
navItems.forEach((item)=>{
|
|
147
|
+
if (item.children && item.children.length > 0) initial[item.id] = item.defaultOpen ?? true;
|
|
148
|
+
});
|
|
149
|
+
return initial;
|
|
150
|
+
});
|
|
151
|
+
const toggleSection = (id)=>{
|
|
152
|
+
setOpenSections((prev)=>({
|
|
153
|
+
...prev,
|
|
154
|
+
[id]: !prev[id]
|
|
155
|
+
}));
|
|
156
|
+
};
|
|
157
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipProvider, {
|
|
158
|
+
delayDuration: 300,
|
|
159
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
160
|
+
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),
|
|
161
|
+
children: [
|
|
162
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
163
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
164
|
+
children: [
|
|
165
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
166
|
+
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'),
|
|
167
|
+
children: [
|
|
168
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
169
|
+
className: "flex h-[60px] w-[60px] shrink-0 items-center justify-center",
|
|
170
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(UiPathLogo, {})
|
|
171
|
+
}),
|
|
172
|
+
panelOpen && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
173
|
+
className: "flex flex-1 items-center justify-between",
|
|
174
|
+
children: [
|
|
175
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
176
|
+
className: "flex items-center gap-[18px]",
|
|
177
|
+
children: [
|
|
178
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
179
|
+
type: "button",
|
|
180
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
181
|
+
"aria-label": "New conversation",
|
|
182
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MessageCirclePlus, {
|
|
183
|
+
className: "h-5 w-5"
|
|
184
|
+
})
|
|
185
|
+
}),
|
|
186
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
187
|
+
type: "button",
|
|
188
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
189
|
+
"aria-label": "Picture in picture",
|
|
190
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PictureInPicture2, {
|
|
191
|
+
className: "h-5 w-5"
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
}),
|
|
196
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
197
|
+
type: "button",
|
|
198
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
199
|
+
onClick: ()=>setPanelOpen(false),
|
|
200
|
+
"aria-label": "Collapse panel",
|
|
201
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelRightOpen, {
|
|
202
|
+
className: "h-5 w-5"
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
})
|
|
207
|
+
]
|
|
208
|
+
}),
|
|
209
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
|
|
210
|
+
className: "flex-1",
|
|
211
|
+
children: panelOpen ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
|
|
212
|
+
className: "flex flex-col gap-1 px-3 pt-[18px]",
|
|
213
|
+
children: navItems.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ExpandedNavItem, {
|
|
214
|
+
item: item,
|
|
215
|
+
isOpen: openSections[item.id] ?? false,
|
|
216
|
+
onToggle: ()=>{
|
|
217
|
+
if (item.children?.length) toggleSection(item.id);
|
|
218
|
+
setActiveNavId(item.id);
|
|
219
|
+
},
|
|
220
|
+
selectedChildId: selectedChildId,
|
|
221
|
+
onChildSelect: onChildSelect
|
|
222
|
+
}, item.id))
|
|
223
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("nav", {
|
|
224
|
+
className: "flex flex-col items-center pt-[18px]",
|
|
225
|
+
children: [
|
|
226
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tooltip_cjs_namespaceObject.Tooltip, {
|
|
227
|
+
children: [
|
|
228
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
229
|
+
asChild: true,
|
|
230
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
231
|
+
className: "flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground",
|
|
232
|
+
onClick: ()=>setPanelOpen(true),
|
|
233
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
234
|
+
className: "flex h-9 w-9 items-center justify-center rounded-lg",
|
|
235
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelRightOpen, {
|
|
236
|
+
className: "h-5 w-5 -scale-x-100"
|
|
237
|
+
})
|
|
238
|
+
})
|
|
239
|
+
})
|
|
240
|
+
}),
|
|
241
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tooltip_cjs_namespaceObject.TooltipContent, {
|
|
242
|
+
side: "right",
|
|
243
|
+
children: "Expand panel"
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
}),
|
|
247
|
+
navItems.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CollapsedNavItem, {
|
|
248
|
+
item: item,
|
|
249
|
+
isActive: activeNavId === item.id,
|
|
250
|
+
onClick: ()=>{
|
|
251
|
+
setActiveNavId(item.id);
|
|
252
|
+
setPanelOpen(true);
|
|
253
|
+
}
|
|
254
|
+
}, item.id))
|
|
255
|
+
]
|
|
256
|
+
})
|
|
257
|
+
})
|
|
258
|
+
]
|
|
259
|
+
}),
|
|
260
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
261
|
+
className: "flex h-[60px] shrink-0 items-center justify-start px-3",
|
|
262
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(avatar_cjs_namespaceObject.Avatar, {
|
|
263
|
+
className: "h-8 w-8 bg-surface-raised",
|
|
264
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(avatar_cjs_namespaceObject.AvatarFallback, {
|
|
265
|
+
className: "bg-surface-raised text-xs text-foreground-muted",
|
|
266
|
+
children: "U"
|
|
267
|
+
})
|
|
268
|
+
})
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
})
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
exports.DelegatePanel = __webpack_exports__.DelegatePanel;
|
|
275
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
276
|
+
"DelegatePanel"
|
|
277
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
278
|
+
Object.defineProperty(exports, '__esModule', {
|
|
279
|
+
value: true
|
|
280
|
+
});
|
|
@@ -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,246 @@
|
|
|
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
|
+
className: "flex h-10 w-full items-center gap-2 rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
22
|
+
onClick: onToggle,
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ jsx("div", {
|
|
25
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
26
|
+
children: item.icon
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ jsx("span", {
|
|
29
|
+
className: "text-sm font-semibold",
|
|
30
|
+
children: item.label
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/ jsxs(Collapsible, {
|
|
35
|
+
open: isOpen,
|
|
36
|
+
onOpenChange: ()=>onToggle(),
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ jsx(CollapsibleTrigger, {
|
|
39
|
+
asChild: true,
|
|
40
|
+
children: /*#__PURE__*/ jsxs("button", {
|
|
41
|
+
className: "flex h-10 w-full items-center justify-between rounded-2xl px-1 text-foreground-muted transition-colors hover:bg-surface-hover",
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ jsxs("div", {
|
|
44
|
+
className: "flex items-center gap-2",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsx("div", {
|
|
47
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
48
|
+
children: item.icon
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ jsx("span", {
|
|
51
|
+
className: "text-sm font-semibold",
|
|
52
|
+
children: item.label
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ jsx("div", {
|
|
57
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center",
|
|
58
|
+
children: /*#__PURE__*/ jsx(ChevronDown, {
|
|
59
|
+
className: cn('h-5 w-5 transition-transform duration-200', isOpen && 'rotate-180')
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
})
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ jsx(CollapsibleContent, {
|
|
66
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
67
|
+
className: "flex flex-col",
|
|
68
|
+
children: item.children?.map((child)=>/*#__PURE__*/ jsx("button", {
|
|
69
|
+
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'),
|
|
70
|
+
onClick: ()=>onChildSelect?.(child.id),
|
|
71
|
+
children: child.label
|
|
72
|
+
}, child.id))
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function CollapsedNavItem({ item, isActive, onClick }) {
|
|
79
|
+
return /*#__PURE__*/ jsxs(Tooltip, {
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
82
|
+
asChild: true,
|
|
83
|
+
children: /*#__PURE__*/ jsx("button", {
|
|
84
|
+
className: cn('flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground', isActive && 'text-brand-foreground'),
|
|
85
|
+
onClick: onClick,
|
|
86
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
87
|
+
className: cn('flex h-9 w-9 items-center justify-center rounded-lg transition-colors', isActive && 'bg-brand-subtle'),
|
|
88
|
+
children: item.icon
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
}),
|
|
92
|
+
/*#__PURE__*/ jsx(TooltipContent, {
|
|
93
|
+
side: "right",
|
|
94
|
+
children: item.label
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function DelegatePanel({ className, defaultOpen = true, open: controlledOpen, onOpenChange, navItems = [], activeNavId: controlledActiveNavId, onNavChange, selectedChildId, onChildSelect }) {
|
|
100
|
+
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
101
|
+
const panelOpen = controlledOpen ?? internalOpen;
|
|
102
|
+
const setPanelOpen = useCallback((next)=>{
|
|
103
|
+
setInternalOpen(next);
|
|
104
|
+
onOpenChange?.(next);
|
|
105
|
+
}, [
|
|
106
|
+
onOpenChange
|
|
107
|
+
]);
|
|
108
|
+
const [internalActiveNavId, setInternalActiveNavId] = useState(navItems[0]?.id ?? '');
|
|
109
|
+
const activeNavId = controlledActiveNavId ?? internalActiveNavId;
|
|
110
|
+
const setActiveNavId = useCallback((id)=>{
|
|
111
|
+
setInternalActiveNavId(id);
|
|
112
|
+
onNavChange?.(id);
|
|
113
|
+
}, [
|
|
114
|
+
onNavChange
|
|
115
|
+
]);
|
|
116
|
+
const [openSections, setOpenSections] = useState(()=>{
|
|
117
|
+
const initial = {};
|
|
118
|
+
navItems.forEach((item)=>{
|
|
119
|
+
if (item.children && item.children.length > 0) initial[item.id] = item.defaultOpen ?? true;
|
|
120
|
+
});
|
|
121
|
+
return initial;
|
|
122
|
+
});
|
|
123
|
+
const toggleSection = (id)=>{
|
|
124
|
+
setOpenSections((prev)=>({
|
|
125
|
+
...prev,
|
|
126
|
+
[id]: !prev[id]
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
return /*#__PURE__*/ jsx(TooltipProvider, {
|
|
130
|
+
delayDuration: 300,
|
|
131
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
132
|
+
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),
|
|
133
|
+
children: [
|
|
134
|
+
/*#__PURE__*/ jsxs("div", {
|
|
135
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
136
|
+
children: [
|
|
137
|
+
/*#__PURE__*/ jsxs("div", {
|
|
138
|
+
className: cn('flex shrink-0 items-center gap-2 pt-1', panelOpen ? 'pl-1 pr-4' : 'justify-center px-0 pt-3'),
|
|
139
|
+
children: [
|
|
140
|
+
/*#__PURE__*/ jsx("div", {
|
|
141
|
+
className: "flex h-[60px] w-[60px] shrink-0 items-center justify-center",
|
|
142
|
+
children: /*#__PURE__*/ jsx(UiPathLogo, {})
|
|
143
|
+
}),
|
|
144
|
+
panelOpen && /*#__PURE__*/ jsxs("div", {
|
|
145
|
+
className: "flex flex-1 items-center justify-between",
|
|
146
|
+
children: [
|
|
147
|
+
/*#__PURE__*/ jsxs("div", {
|
|
148
|
+
className: "flex items-center gap-[18px]",
|
|
149
|
+
children: [
|
|
150
|
+
/*#__PURE__*/ jsx("button", {
|
|
151
|
+
type: "button",
|
|
152
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
153
|
+
"aria-label": "New conversation",
|
|
154
|
+
children: /*#__PURE__*/ jsx(MessageCirclePlus, {
|
|
155
|
+
className: "h-5 w-5"
|
|
156
|
+
})
|
|
157
|
+
}),
|
|
158
|
+
/*#__PURE__*/ jsx("button", {
|
|
159
|
+
type: "button",
|
|
160
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
161
|
+
"aria-label": "Picture in picture",
|
|
162
|
+
children: /*#__PURE__*/ jsx(PictureInPicture2, {
|
|
163
|
+
className: "h-5 w-5"
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
}),
|
|
168
|
+
/*#__PURE__*/ jsx("button", {
|
|
169
|
+
type: "button",
|
|
170
|
+
className: "text-foreground-muted transition-colors hover:text-foreground",
|
|
171
|
+
onClick: ()=>setPanelOpen(false),
|
|
172
|
+
"aria-label": "Collapse panel",
|
|
173
|
+
children: /*#__PURE__*/ jsx(PanelRightOpen, {
|
|
174
|
+
className: "h-5 w-5"
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
]
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
}),
|
|
181
|
+
/*#__PURE__*/ jsx(ScrollArea, {
|
|
182
|
+
className: "flex-1",
|
|
183
|
+
children: panelOpen ? /*#__PURE__*/ jsx("nav", {
|
|
184
|
+
className: "flex flex-col gap-1 px-3 pt-[18px]",
|
|
185
|
+
children: navItems.map((item)=>/*#__PURE__*/ jsx(ExpandedNavItem, {
|
|
186
|
+
item: item,
|
|
187
|
+
isOpen: openSections[item.id] ?? false,
|
|
188
|
+
onToggle: ()=>{
|
|
189
|
+
if (item.children?.length) toggleSection(item.id);
|
|
190
|
+
setActiveNavId(item.id);
|
|
191
|
+
},
|
|
192
|
+
selectedChildId: selectedChildId,
|
|
193
|
+
onChildSelect: onChildSelect
|
|
194
|
+
}, item.id))
|
|
195
|
+
}) : /*#__PURE__*/ jsxs("nav", {
|
|
196
|
+
className: "flex flex-col items-center pt-[18px]",
|
|
197
|
+
children: [
|
|
198
|
+
/*#__PURE__*/ jsxs(Tooltip, {
|
|
199
|
+
children: [
|
|
200
|
+
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
201
|
+
asChild: true,
|
|
202
|
+
children: /*#__PURE__*/ jsx("button", {
|
|
203
|
+
className: "flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground",
|
|
204
|
+
onClick: ()=>setPanelOpen(true),
|
|
205
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
206
|
+
className: "flex h-9 w-9 items-center justify-center rounded-lg",
|
|
207
|
+
children: /*#__PURE__*/ jsx(PanelRightOpen, {
|
|
208
|
+
className: "h-5 w-5 -scale-x-100"
|
|
209
|
+
})
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
}),
|
|
213
|
+
/*#__PURE__*/ jsx(TooltipContent, {
|
|
214
|
+
side: "right",
|
|
215
|
+
children: "Expand panel"
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
}),
|
|
219
|
+
navItems.map((item)=>/*#__PURE__*/ jsx(CollapsedNavItem, {
|
|
220
|
+
item: item,
|
|
221
|
+
isActive: activeNavId === item.id,
|
|
222
|
+
onClick: ()=>{
|
|
223
|
+
setActiveNavId(item.id);
|
|
224
|
+
setPanelOpen(true);
|
|
225
|
+
}
|
|
226
|
+
}, item.id))
|
|
227
|
+
]
|
|
228
|
+
})
|
|
229
|
+
})
|
|
230
|
+
]
|
|
231
|
+
}),
|
|
232
|
+
/*#__PURE__*/ jsx("div", {
|
|
233
|
+
className: "flex h-[60px] shrink-0 items-center justify-start px-3",
|
|
234
|
+
children: /*#__PURE__*/ jsx(Avatar, {
|
|
235
|
+
className: "h-8 w-8 bg-surface-raised",
|
|
236
|
+
children: /*#__PURE__*/ jsx(AvatarFallback, {
|
|
237
|
+
className: "bg-surface-raised text-xs text-foreground-muted",
|
|
238
|
+
children: "U"
|
|
239
|
+
})
|
|
240
|
+
})
|
|
241
|
+
})
|
|
242
|
+
]
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
export { DelegatePanel };
|