@uipath/apollo-wind 0.14.0-test → 0.15.0
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/chat-composer.cjs +4 -7
- package/dist/components/custom/chat-composer.js +4 -7
- package/dist/components/custom/flow-node-expandable.cjs +81 -0
- package/dist/components/custom/flow-node-expandable.d.ts +27 -0
- package/dist/components/custom/flow-node-expandable.js +47 -0
- package/dist/components/custom/flow-node.cjs +32 -34
- package/dist/components/custom/flow-node.d.ts +14 -9
- package/dist/components/custom/flow-node.js +33 -35
- package/dist/components/custom/hover-menu.cjs +84 -0
- package/dist/components/custom/hover-menu.d.ts +13 -0
- package/dist/components/custom/hover-menu.js +50 -0
- package/dist/components/custom/panel-delegate.cjs +5 -2
- package/dist/components/custom/panel-delegate.js +5 -2
- package/dist/components/custom/toolbar-canvas.cjs +5 -2
- package/dist/components/custom/toolbar-canvas.js +5 -2
- package/dist/components/custom/toolbar-view.cjs +5 -2
- package/dist/components/custom/toolbar-view.js +5 -2
- package/dist/components/ui/index.cjs +18 -18
- package/dist/index.cjs +10 -10
- package/dist/styles.css +212 -158
- package/dist/tailwind.css +5 -10
- package/package.json +1 -1
|
@@ -32,7 +32,6 @@ const external_react_namespaceObject = require("react");
|
|
|
32
32
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
33
|
function ChatComposer({ className, placeholder = 'I would like you to automate my', onSubmit }) {
|
|
34
34
|
const [value, setValue] = external_react_namespaceObject.useState('');
|
|
35
|
-
const [focused, setFocused] = external_react_namespaceObject.useState(false);
|
|
36
35
|
const handleSubmit = ()=>{
|
|
37
36
|
if (value.trim()) {
|
|
38
37
|
onSubmit?.(value.trim());
|
|
@@ -57,9 +56,7 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
57
56
|
rows: 3,
|
|
58
57
|
value: value,
|
|
59
58
|
onChange: (e)=>setValue(e.target.value),
|
|
60
|
-
onKeyDown: handleKeyDown
|
|
61
|
-
onFocus: ()=>setFocused(true),
|
|
62
|
-
onBlur: ()=>setFocused(false)
|
|
59
|
+
onKeyDown: handleKeyDown
|
|
63
60
|
}),
|
|
64
61
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
65
62
|
className: "flex items-center justify-between",
|
|
@@ -110,14 +107,14 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
110
107
|
onClick: handleSubmit,
|
|
111
108
|
"aria-label": "Submit message",
|
|
112
109
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CornerRightUp, {
|
|
113
|
-
className: "h-5 w-5 text-
|
|
110
|
+
className: "h-5 w-5 text-foreground-on-accent"
|
|
114
111
|
})
|
|
115
112
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
116
113
|
type: "button",
|
|
117
|
-
className:
|
|
114
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-surface-hover group-focus-within/input:bg-foreground-accent hover:bg-foreground-accent-muted",
|
|
118
115
|
"aria-label": "Voice input",
|
|
119
116
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Mic, {
|
|
120
|
-
className: "h-5 w-5 text-
|
|
117
|
+
className: "h-5 w-5 text-foreground-on-accent"
|
|
121
118
|
})
|
|
122
119
|
})
|
|
123
120
|
]
|
|
@@ -4,7 +4,6 @@ import { useState } from "react";
|
|
|
4
4
|
import { cn } from "../../lib/index.js";
|
|
5
5
|
function ChatComposer({ className, placeholder = 'I would like you to automate my', onSubmit }) {
|
|
6
6
|
const [value, setValue] = useState('');
|
|
7
|
-
const [focused, setFocused] = useState(false);
|
|
8
7
|
const handleSubmit = ()=>{
|
|
9
8
|
if (value.trim()) {
|
|
10
9
|
onSubmit?.(value.trim());
|
|
@@ -29,9 +28,7 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
29
28
|
rows: 3,
|
|
30
29
|
value: value,
|
|
31
30
|
onChange: (e)=>setValue(e.target.value),
|
|
32
|
-
onKeyDown: handleKeyDown
|
|
33
|
-
onFocus: ()=>setFocused(true),
|
|
34
|
-
onBlur: ()=>setFocused(false)
|
|
31
|
+
onKeyDown: handleKeyDown
|
|
35
32
|
}),
|
|
36
33
|
/*#__PURE__*/ jsxs("div", {
|
|
37
34
|
className: "flex items-center justify-between",
|
|
@@ -82,14 +79,14 @@ function ChatComposer({ className, placeholder = 'I would like you to automate m
|
|
|
82
79
|
onClick: handleSubmit,
|
|
83
80
|
"aria-label": "Submit message",
|
|
84
81
|
children: /*#__PURE__*/ jsx(CornerRightUp, {
|
|
85
|
-
className: "h-5 w-5 text-
|
|
82
|
+
className: "h-5 w-5 text-foreground-on-accent"
|
|
86
83
|
})
|
|
87
84
|
}) : /*#__PURE__*/ jsx("button", {
|
|
88
85
|
type: "button",
|
|
89
|
-
className:
|
|
86
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-surface-hover group-focus-within/input:bg-foreground-accent hover:bg-foreground-accent-muted",
|
|
90
87
|
"aria-label": "Voice input",
|
|
91
88
|
children: /*#__PURE__*/ jsx(Mic, {
|
|
92
|
-
className: "h-5 w-5 text-
|
|
89
|
+
className: "h-5 w-5 text-foreground-on-accent"
|
|
93
90
|
})
|
|
94
91
|
})
|
|
95
92
|
]
|
|
@@ -0,0 +1,81 @@
|
|
|
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 ("u" > 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
|
+
FlowNodeExpandable: ()=>FlowNodeExpandable
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
function FlowNodeExpandable({ className, title = 'Node title', icon, expanded = false, selected = false, forceState, onToggle }) {
|
|
34
|
+
const isSelected = selected || 'selected' === forceState || 'selected-hover' === forceState;
|
|
35
|
+
const isHover = 'hover' === forceState;
|
|
36
|
+
const isSelectedHover = 'selected-hover' === forceState;
|
|
37
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
38
|
+
className: (0, index_cjs_namespaceObject.cn)('group w-[360px] rounded-2xl bg-surface-overlay', expanded ? 'flex flex-col size-[360px] px-4 pt-2.5 pb-4 gap-[15px]' : 'p-3', !isSelected && !isHover && 'border-[1.6px] border-border', !isSelected && !forceState && 'group-hover:border-2 group-hover:border-border-hover', isHover && 'border-2 border-border-hover', isSelected && !isSelectedHover && 'border-2 border-brand', isSelectedHover && 'border-2 border-foreground-accent-muted', !forceState && isSelected && 'group-hover:border-foreground-accent-muted', className),
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
41
|
+
className: "flex items-center justify-between",
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
44
|
+
className: "flex items-center gap-2.5",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
47
|
+
className: "flex items-center justify-center rounded-xl bg-surface size-8 shrink-0",
|
|
48
|
+
children: icon ?? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Workflow, {
|
|
49
|
+
className: "h-5 w-5 text-foreground-muted"
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
53
|
+
className: "text-sm font-medium text-foreground whitespace-nowrap",
|
|
54
|
+
children: title
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
className: "flex items-center justify-center rounded text-foreground-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
61
|
+
onClick: onToggle,
|
|
62
|
+
"aria-label": expanded ? `Collapse ${title}` : `Expand ${title}`,
|
|
63
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
64
|
+
className: (0, index_cjs_namespaceObject.cn)('h-4 w-4', expanded && 'rotate-180')
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}),
|
|
69
|
+
expanded && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
70
|
+
className: "flex-1 min-h-0 rounded-lg bg-surface"
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
exports.FlowNodeExpandable = __webpack_exports__.FlowNodeExpandable;
|
|
76
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
77
|
+
"FlowNodeExpandable"
|
|
78
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
79
|
+
Object.defineProperty(exports, '__esModule', {
|
|
80
|
+
value: true
|
|
81
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface FlowNodeExpandableProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
/** Node title */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Icon rendered in the node header */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
/** Whether the node is expanded */
|
|
9
|
+
expanded?: boolean;
|
|
10
|
+
/** Whether the node is selected */
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Force a specific visual state — used for Storybook stories and snapshots.
|
|
14
|
+
* In normal use, hover is driven by CSS group-hover.
|
|
15
|
+
*/
|
|
16
|
+
forceState?: 'default' | 'hover' | 'selected' | 'selected-hover';
|
|
17
|
+
/** Callback when expand/collapse chevron is toggled */
|
|
18
|
+
onToggle?: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Expandable card-style canvas node for the Flow template.
|
|
22
|
+
*
|
|
23
|
+
* Collapsed: 360px wide, header only.
|
|
24
|
+
* Expanded: 360×360px, header + content area.
|
|
25
|
+
* Shares the same 4-state border pattern as FlowNode.
|
|
26
|
+
*/
|
|
27
|
+
export declare function FlowNodeExpandable({ className, title, icon, expanded, selected, forceState, onToggle, }: FlowNodeExpandableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ChevronDown, Workflow } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
function FlowNodeExpandable({ className, title = 'Node title', icon, expanded = false, selected = false, forceState, onToggle }) {
|
|
6
|
+
const isSelected = selected || 'selected' === forceState || 'selected-hover' === forceState;
|
|
7
|
+
const isHover = 'hover' === forceState;
|
|
8
|
+
const isSelectedHover = 'selected-hover' === forceState;
|
|
9
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
10
|
+
className: cn('group w-[360px] rounded-2xl bg-surface-overlay', expanded ? 'flex flex-col size-[360px] px-4 pt-2.5 pb-4 gap-[15px]' : 'p-3', !isSelected && !isHover && 'border-[1.6px] border-border', !isSelected && !forceState && 'group-hover:border-2 group-hover:border-border-hover', isHover && 'border-2 border-border-hover', isSelected && !isSelectedHover && 'border-2 border-brand', isSelectedHover && 'border-2 border-foreground-accent-muted', !forceState && isSelected && 'group-hover:border-foreground-accent-muted', className),
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ jsxs("div", {
|
|
13
|
+
className: "flex items-center justify-between",
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ jsxs("div", {
|
|
16
|
+
className: "flex items-center gap-2.5",
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ jsx("div", {
|
|
19
|
+
className: "flex items-center justify-center rounded-xl bg-surface size-8 shrink-0",
|
|
20
|
+
children: icon ?? /*#__PURE__*/ jsx(Workflow, {
|
|
21
|
+
className: "h-5 w-5 text-foreground-muted"
|
|
22
|
+
})
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ jsx("span", {
|
|
25
|
+
className: "text-sm font-medium text-foreground whitespace-nowrap",
|
|
26
|
+
children: title
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ jsx("button", {
|
|
31
|
+
type: "button",
|
|
32
|
+
className: "flex items-center justify-center rounded text-foreground-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
33
|
+
onClick: onToggle,
|
|
34
|
+
"aria-label": expanded ? `Collapse ${title}` : `Expand ${title}`,
|
|
35
|
+
children: /*#__PURE__*/ jsx(ChevronDown, {
|
|
36
|
+
className: cn('h-4 w-4', expanded && 'rotate-180')
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
41
|
+
expanded && /*#__PURE__*/ jsx("div", {
|
|
42
|
+
className: "flex-1 min-h-0 rounded-lg bg-surface"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { FlowNodeExpandable };
|
|
@@ -30,41 +30,39 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
require("react");
|
|
31
31
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
32
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
-
function FlowNode({ className, title = 'Node title',
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
52
|
-
className: "text-sm font-medium text-foreground",
|
|
53
|
-
children: title
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
}),
|
|
57
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
58
|
-
className: "h-4 w-4 text-foreground-muted"
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
63
|
-
className: "flex-1 rounded-lg bg-surface-raised",
|
|
64
|
-
children: children
|
|
33
|
+
function FlowNode({ className, title = 'Node title', subtitle = 'Secondary title', icon, selected = false, forceState, onClick }) {
|
|
34
|
+
const isSelected = selected || 'selected' === forceState || 'selected-hover' === forceState;
|
|
35
|
+
const isHover = 'hover' === forceState;
|
|
36
|
+
const isSelectedHover = 'selected-hover' === forceState;
|
|
37
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
className: (0, index_cjs_namespaceObject.cn)('group flex w-[107px] flex-col items-center gap-2.5 rounded-[32px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', className),
|
|
40
|
+
onClick: onClick,
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
43
|
+
className: (0, index_cjs_namespaceObject.cn)('relative flex items-center justify-center rounded-[32px] size-24 bg-surface-overlay', !isSelected && !isHover && 'border-[1.6px] border-border', !isSelected && !forceState && 'group-hover:border-2 group-hover:border-border-hover', isHover && 'border-2 border-border-hover', isSelected && !isSelectedHover && 'border-2 border-brand', isSelectedHover && 'border-2 border-foreground-accent-muted', !forceState && isSelected && 'group-hover:border-foreground-accent-muted'),
|
|
44
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
45
|
+
className: "flex items-center justify-center overflow-hidden rounded-[24px] bg-surface size-20",
|
|
46
|
+
children: icon ?? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Bot, {
|
|
47
|
+
className: "h-10 w-10 text-foreground-muted",
|
|
48
|
+
strokeWidth: 1.4
|
|
49
|
+
})
|
|
65
50
|
})
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
53
|
+
className: "flex flex-col items-center",
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
56
|
+
className: "text-center text-[14px] font-semibold leading-[18px] text-foreground",
|
|
57
|
+
children: title
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
60
|
+
className: "text-center text-[12px] leading-[18px] text-foreground-muted",
|
|
61
|
+
children: subtitle
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
]
|
|
68
66
|
});
|
|
69
67
|
}
|
|
70
68
|
exports.FlowNode = __webpack_exports__.FlowNode;
|
|
@@ -3,18 +3,23 @@ export interface FlowNodeProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
/** Node title */
|
|
5
5
|
title?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** Node subtitle */
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
/** Icon rendered inside the inner shape */
|
|
7
9
|
icon?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
/** Whether the node is selected */
|
|
10
|
+
/** Whether the node is in selected state */
|
|
11
11
|
selected?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Force a specific visual state — used for Storybook stories and snapshots.
|
|
14
|
+
* In normal use, hover is driven by CSS group-hover.
|
|
15
|
+
*/
|
|
16
|
+
forceState?: 'default' | 'hover' | 'selected' | 'selected-hover';
|
|
17
|
+
onClick?: () => void;
|
|
12
18
|
}
|
|
13
19
|
/**
|
|
14
|
-
*
|
|
20
|
+
* Icon-centric canvas node for the Flow template.
|
|
15
21
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* className.
|
|
22
|
+
* 96×96 outer ring → 80×80 inner rounded shape → 40×40 icon.
|
|
23
|
+
* Title + subtitle centered below.
|
|
19
24
|
*/
|
|
20
|
-
export declare function FlowNode({ className, title,
|
|
25
|
+
export declare function FlowNode({ className, title, subtitle, icon, selected, forceState, onClick, }: FlowNodeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +1,40 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Bot
|
|
3
|
+
import { Bot } from "lucide-react";
|
|
4
4
|
import { cn } from "../../lib/index.js";
|
|
5
|
-
function FlowNode({ className, title = 'Node title',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}),
|
|
23
|
-
/*#__PURE__*/ jsx("span", {
|
|
24
|
-
className: "text-sm font-medium text-foreground",
|
|
25
|
-
children: title
|
|
26
|
-
})
|
|
27
|
-
]
|
|
28
|
-
}),
|
|
29
|
-
/*#__PURE__*/ jsx(ChevronDown, {
|
|
30
|
-
className: "h-4 w-4 text-foreground-muted"
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
}),
|
|
34
|
-
/*#__PURE__*/ jsx("div", {
|
|
35
|
-
className: "flex-1 rounded-lg bg-surface-raised",
|
|
36
|
-
children: children
|
|
5
|
+
function FlowNode({ className, title = 'Node title', subtitle = 'Secondary title', icon, selected = false, forceState, onClick }) {
|
|
6
|
+
const isSelected = selected || 'selected' === forceState || 'selected-hover' === forceState;
|
|
7
|
+
const isHover = 'hover' === forceState;
|
|
8
|
+
const isSelectedHover = 'selected-hover' === forceState;
|
|
9
|
+
return /*#__PURE__*/ jsxs("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
className: cn('group flex w-[107px] flex-col items-center gap-2.5 rounded-[32px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', className),
|
|
12
|
+
onClick: onClick,
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ jsx("div", {
|
|
15
|
+
className: cn('relative flex items-center justify-center rounded-[32px] size-24 bg-surface-overlay', !isSelected && !isHover && 'border-[1.6px] border-border', !isSelected && !forceState && 'group-hover:border-2 group-hover:border-border-hover', isHover && 'border-2 border-border-hover', isSelected && !isSelectedHover && 'border-2 border-brand', isSelectedHover && 'border-2 border-foreground-accent-muted', !forceState && isSelected && 'group-hover:border-foreground-accent-muted'),
|
|
16
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
17
|
+
className: "flex items-center justify-center overflow-hidden rounded-[24px] bg-surface size-20",
|
|
18
|
+
children: icon ?? /*#__PURE__*/ jsx(Bot, {
|
|
19
|
+
className: "h-10 w-10 text-foreground-muted",
|
|
20
|
+
strokeWidth: 1.4
|
|
21
|
+
})
|
|
37
22
|
})
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ jsxs("div", {
|
|
25
|
+
className: "flex flex-col items-center",
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ jsx("span", {
|
|
28
|
+
className: "text-center text-[14px] font-semibold leading-[18px] text-foreground",
|
|
29
|
+
children: title
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ jsx("span", {
|
|
32
|
+
className: "text-center text-[12px] leading-[18px] text-foreground-muted",
|
|
33
|
+
children: subtitle
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
})
|
|
37
|
+
]
|
|
40
38
|
});
|
|
41
39
|
}
|
|
42
40
|
export { FlowNode };
|
|
@@ -0,0 +1,84 @@
|
|
|
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 ("u" > 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
|
+
HoverMenu: ()=>HoverMenu
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
function MenuButton({ icon: Icon, label, onClick }) {
|
|
34
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
className: "group flex h-6 w-6 items-center justify-center rounded-[4px] text-foreground-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
37
|
+
"aria-label": label,
|
|
38
|
+
onClick: onClick,
|
|
39
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
40
|
+
className: "h-4 w-4 transition-transform group-hover:scale-[1.25]",
|
|
41
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
|
|
42
|
+
className: "h-full w-full",
|
|
43
|
+
strokeWidth: 1.4
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function HoverMenu({ className, onPlay, onEdit, onDelete, onMore }) {
|
|
49
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
50
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-10 items-center gap-1 rounded-xl border border-surface-overlay bg-surface-raised px-2 py-1', className),
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MenuButton, {
|
|
53
|
+
icon: external_lucide_react_namespaceObject.Play,
|
|
54
|
+
label: "Run node",
|
|
55
|
+
onClick: onPlay
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MenuButton, {
|
|
58
|
+
icon: external_lucide_react_namespaceObject.Pencil,
|
|
59
|
+
label: "Edit node",
|
|
60
|
+
onClick: onEdit
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MenuButton, {
|
|
63
|
+
icon: external_lucide_react_namespaceObject.Trash2,
|
|
64
|
+
label: "Delete node",
|
|
65
|
+
onClick: onDelete
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
68
|
+
className: "h-5 w-px bg-border-subtle"
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MenuButton, {
|
|
71
|
+
icon: external_lucide_react_namespaceObject.EllipsisVertical,
|
|
72
|
+
label: "More options",
|
|
73
|
+
onClick: onMore
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
exports.HoverMenu = __webpack_exports__.HoverMenu;
|
|
79
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
80
|
+
"HoverMenu"
|
|
81
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
82
|
+
Object.defineProperty(exports, '__esModule', {
|
|
83
|
+
value: true
|
|
84
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface HoverMenuProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
onPlay?: () => void;
|
|
4
|
+
onEdit?: () => void;
|
|
5
|
+
onDelete?: () => void;
|
|
6
|
+
onMore?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Contextual hover menu for canvas nodes.
|
|
10
|
+
*
|
|
11
|
+
* Displays Play, Edit, Delete, and More actions in a compact floating toolbar.
|
|
12
|
+
*/
|
|
13
|
+
export declare function HoverMenu({ className, onPlay, onEdit, onDelete, onMore }: HoverMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { EllipsisVertical, Pencil, Play, Trash2 } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
function MenuButton({ icon: Icon, label, onClick }) {
|
|
6
|
+
return /*#__PURE__*/ jsx("button", {
|
|
7
|
+
type: "button",
|
|
8
|
+
className: "group flex h-6 w-6 items-center justify-center rounded-[4px] text-foreground-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
9
|
+
"aria-label": label,
|
|
10
|
+
onClick: onClick,
|
|
11
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
12
|
+
className: "h-4 w-4 transition-transform group-hover:scale-[1.25]",
|
|
13
|
+
children: /*#__PURE__*/ jsx(Icon, {
|
|
14
|
+
className: "h-full w-full",
|
|
15
|
+
strokeWidth: 1.4
|
|
16
|
+
})
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function HoverMenu({ className, onPlay, onEdit, onDelete, onMore }) {
|
|
21
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
22
|
+
className: cn('flex h-10 items-center gap-1 rounded-xl border border-surface-overlay bg-surface-raised px-2 py-1', className),
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ jsx(MenuButton, {
|
|
25
|
+
icon: Play,
|
|
26
|
+
label: "Run node",
|
|
27
|
+
onClick: onPlay
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ jsx(MenuButton, {
|
|
30
|
+
icon: Pencil,
|
|
31
|
+
label: "Edit node",
|
|
32
|
+
onClick: onEdit
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ jsx(MenuButton, {
|
|
35
|
+
icon: Trash2,
|
|
36
|
+
label: "Delete node",
|
|
37
|
+
onClick: onDelete
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ jsx("div", {
|
|
40
|
+
className: "h-5 w-px bg-border-subtle"
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ jsx(MenuButton, {
|
|
43
|
+
icon: EllipsisVertical,
|
|
44
|
+
label: "More options",
|
|
45
|
+
onClick: onMore
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export { HoverMenu };
|
|
@@ -36,7 +36,7 @@ const tooltip_cjs_namespaceObject = require("../ui/tooltip.cjs");
|
|
|
36
36
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
37
37
|
function UiPathLogo({ className }) {
|
|
38
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 overflow-
|
|
39
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-9 items-center justify-center overflow-hidden rounded-lg bg-[#0092b8] shadow-sm', className),
|
|
40
40
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
|
|
41
41
|
viewBox: "0 0 24 24",
|
|
42
42
|
fill: "none",
|
|
@@ -70,6 +70,7 @@ function ExpandedNavItem({ item, isOpen, isActive, onToggle, selectedChildId, on
|
|
|
70
70
|
type: "button",
|
|
71
71
|
className: (0, index_cjs_namespaceObject.cn)('flex h-10 w-full items-center gap-2 rounded-2xl px-1 text-foreground-hover transition-colors hover:bg-surface-hover hover:text-foreground', isActive && 'bg-surface-hover text-foreground'),
|
|
72
72
|
onClick: onToggle,
|
|
73
|
+
"aria-current": isActive ? 'page' : void 0,
|
|
73
74
|
children: [
|
|
74
75
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
75
76
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
@@ -134,8 +135,10 @@ function CollapsedNavItem({ item, isActive, onClick }) {
|
|
|
134
135
|
asChild: true,
|
|
135
136
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
136
137
|
type: "button",
|
|
137
|
-
className: "group flex h-12 w-full items-center justify-center",
|
|
138
|
+
className: "group flex h-12 w-full items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset rounded-lg",
|
|
138
139
|
onClick: onClick,
|
|
140
|
+
"aria-label": item.label,
|
|
141
|
+
"aria-pressed": isActive,
|
|
139
142
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
140
143
|
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-9 items-center justify-center rounded-lg text-foreground-muted group-hover:bg-surface-hover group-hover:text-foreground-hover', isActive && 'bg-surface-hover text-foreground-hover'),
|
|
141
144
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -8,7 +8,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/
|
|
|
8
8
|
import { cn } from "../../lib/index.js";
|
|
9
9
|
function UiPathLogo({ className }) {
|
|
10
10
|
return /*#__PURE__*/ jsx("div", {
|
|
11
|
-
className: cn('flex h-9 w-9 items-center justify-center overflow-
|
|
11
|
+
className: cn('flex h-9 w-9 items-center justify-center overflow-hidden rounded-lg bg-[#0092b8] shadow-sm', className),
|
|
12
12
|
children: /*#__PURE__*/ jsxs("svg", {
|
|
13
13
|
viewBox: "0 0 24 24",
|
|
14
14
|
fill: "none",
|
|
@@ -42,6 +42,7 @@ function ExpandedNavItem({ item, isOpen, isActive, onToggle, selectedChildId, on
|
|
|
42
42
|
type: "button",
|
|
43
43
|
className: cn('flex h-10 w-full items-center gap-2 rounded-2xl px-1 text-foreground-hover transition-colors hover:bg-surface-hover hover:text-foreground', isActive && 'bg-surface-hover text-foreground'),
|
|
44
44
|
onClick: onToggle,
|
|
45
|
+
"aria-current": isActive ? 'page' : void 0,
|
|
45
46
|
children: [
|
|
46
47
|
/*#__PURE__*/ jsx("div", {
|
|
47
48
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
@@ -106,8 +107,10 @@ function CollapsedNavItem({ item, isActive, onClick }) {
|
|
|
106
107
|
asChild: true,
|
|
107
108
|
children: /*#__PURE__*/ jsx("button", {
|
|
108
109
|
type: "button",
|
|
109
|
-
className: "group flex h-12 w-full items-center justify-center",
|
|
110
|
+
className: "group flex h-12 w-full items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset rounded-lg",
|
|
110
111
|
onClick: onClick,
|
|
112
|
+
"aria-label": item.label,
|
|
113
|
+
"aria-pressed": isActive,
|
|
111
114
|
children: /*#__PURE__*/ jsx("div", {
|
|
112
115
|
className: cn('flex h-9 w-9 items-center justify-center rounded-lg text-foreground-muted group-hover:bg-surface-hover group-hover:text-foreground-hover', isActive && 'bg-surface-hover text-foreground-hover'),
|
|
113
116
|
children: /*#__PURE__*/ jsx("div", {
|