@uipath/apollo-wind 2.69.0 → 2.71.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/demo-composer.cjs +80 -0
- package/dist/components/custom/demo-composer.d.ts +11 -0
- package/dist/components/custom/demo-composer.js +46 -0
- package/dist/components/custom/panel-flow.cjs +2 -2
- package/dist/components/custom/panel-flow.js +2 -2
- package/dist/components/forms/field-control.cjs +3 -2
- package/dist/components/forms/field-control.js +3 -2
- package/dist/components/forms/validation-converter.cjs +14 -5
- package/dist/components/forms/validation-converter.js +14 -5
- package/dist/components/ui/chat-composer.cjs +429 -0
- package/dist/components/ui/chat-composer.d.ts +157 -0
- package/dist/components/ui/chat-composer.js +359 -0
- package/dist/components/ui/chat-hero.cjs +244 -0
- package/dist/components/ui/chat-hero.d.ts +51 -0
- package/dist/components/ui/chat-hero.js +189 -0
- package/dist/components/ui/citation.cjs +188 -0
- package/dist/components/ui/citation.d.ts +42 -0
- package/dist/components/ui/citation.js +148 -0
- package/dist/components/ui/date-picker.cjs +6 -5
- package/dist/components/ui/date-picker.js +7 -6
- package/dist/components/ui/datetime-picker.cjs +7 -10
- package/dist/components/ui/datetime-picker.js +8 -11
- package/dist/components/ui/dropzone-overlay.cjs +142 -0
- package/dist/components/ui/dropzone-overlay.d.ts +27 -0
- package/dist/components/ui/dropzone-overlay.js +105 -0
- package/dist/components/ui/file-upload.cjs +5 -29
- package/dist/components/ui/file-upload.js +2 -26
- package/dist/components/ui/file-validation.cjs +91 -0
- package/dist/components/ui/file-validation.d.ts +24 -0
- package/dist/components/ui/file-validation.js +51 -0
- package/dist/components/ui/hover-card.cjs +15 -8
- package/dist/components/ui/hover-card.d.ts +4 -1
- package/dist/components/ui/hover-card.js +16 -9
- package/dist/components/ui/index.cjs +304 -216
- package/dist/components/ui/index.d.ts +8 -0
- package/dist/components/ui/index.js +8 -0
- package/dist/components/ui/input-group.cjs +1 -1
- package/dist/components/ui/input-group.d.ts +2 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/message-actions.cjs +302 -0
- package/dist/components/ui/message-actions.d.ts +102 -0
- package/dist/components/ui/message-actions.js +241 -0
- package/dist/components/ui/message.cjs +1 -1
- package/dist/components/ui/message.d.ts +2 -0
- package/dist/components/ui/message.js +1 -1
- package/dist/components/ui/prompt-suggestions.cjs +133 -0
- package/dist/components/ui/prompt-suggestions.d.ts +52 -0
- package/dist/components/ui/prompt-suggestions.js +90 -0
- package/dist/components/ui/quick-form-field/components/field-header.cjs +9 -4
- package/dist/components/ui/quick-form-field/components/field-header.d.ts +4 -1
- package/dist/components/ui/quick-form-field/components/field-header.js +9 -4
- package/dist/components/ui/quick-form-field/components/lock-toggle-button.cjs +2 -2
- package/dist/components/ui/quick-form-field/components/lock-toggle-button.d.ts +5 -4
- package/dist/components/ui/quick-form-field/components/lock-toggle-button.js +2 -2
- package/dist/components/ui/quick-form-field/index.d.ts +1 -1
- package/dist/components/ui/quick-form-field/quick-form-field.cjs +158 -222
- package/dist/components/ui/quick-form-field/quick-form-field.d.ts +6 -4
- package/dist/components/ui/quick-form-field/quick-form-field.js +159 -223
- package/dist/components/ui/quick-form-field/types.cjs +2 -2
- package/dist/components/ui/quick-form-field/types.d.ts +39 -32
- package/dist/components/ui/quick-form-field/types.js +2 -2
- package/dist/components/ui/quick-form-field/utils.cjs +5 -59
- package/dist/components/ui/quick-form-field/utils.d.ts +2 -24
- package/dist/components/ui/quick-form-field/utils.js +3 -48
- package/dist/components/ui/sources.cjs +175 -0
- package/dist/components/ui/sources.d.ts +44 -0
- package/dist/components/ui/sources.js +132 -0
- package/dist/index.cjs +156 -7
- package/dist/index.d.ts +17 -1
- package/dist/index.js +9 -1
- package/dist/lib/date-value.cjs +46 -0
- package/dist/lib/date-value.d.ts +8 -0
- package/dist/lib/date-value.js +12 -0
- package/dist/lib/index.cjs +8 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +2 -1
- package/dist/lib/url.cjs +54 -0
- package/dist/lib/url.d.ts +8 -0
- package/dist/lib/url.js +17 -0
- package/dist/styles.css +239 -78
- package/dist/tailwind.utilities.css +15 -0
- package/package.json +1 -1
- package/dist/components/custom/chat-composer.cjs +0 -134
- package/dist/components/custom/chat-composer.d.ts +0 -14
- package/dist/components/custom/chat-composer.js +0 -100
- package/dist/components/custom/chat-first-experience.cjs +0 -87
- package/dist/components/custom/chat-first-experience.d.ts +0 -24
- package/dist/components/custom/chat-first-experience.js +0 -53
- package/dist/components/custom/chat-prompt-suggestions.cjs +0 -49
- package/dist/components/custom/chat-prompt-suggestions.d.ts +0 -18
- package/dist/components/custom/chat-prompt-suggestions.js +0 -15
|
@@ -1,134 +0,0 @@
|
|
|
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
|
-
ChatComposer: ()=>ChatComposer
|
|
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 index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
-
function ChatComposer({ className, placeholder = 'I would like you to automate my', onSubmit }) {
|
|
34
|
-
const [value, setValue] = external_react_namespaceObject.useState('');
|
|
35
|
-
const handleSubmit = ()=>{
|
|
36
|
-
if (value.trim()) {
|
|
37
|
-
onSubmit?.(value.trim());
|
|
38
|
-
setValue('');
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const handleKeyDown = (e)=>{
|
|
42
|
-
if ('Enter' === e.key && !e.shiftKey) {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
handleSubmit();
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const showEnter = value.length > 0;
|
|
48
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
49
|
-
className: (0, index_cjs_namespaceObject.cn)('w-full max-w-[800px] rounded-[32px] bg-surface-raised p-2', className),
|
|
50
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
51
|
-
className: "group/input flex flex-col gap-3 rounded-[24px] border border-border bg-surface pb-3 pl-4 pr-3 pt-4 transition-colors hover:border-border-hover focus-within:border-border-hover",
|
|
52
|
-
children: [
|
|
53
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
|
|
54
|
-
className: "w-full resize-none bg-transparent text-sm font-normal leading-5 text-foreground placeholder:text-foreground-muted group-hover/input:placeholder:text-foreground-secondary focus:placeholder:text-foreground-secondary focus:outline-none",
|
|
55
|
-
placeholder: placeholder,
|
|
56
|
-
rows: 3,
|
|
57
|
-
value: value,
|
|
58
|
-
onChange: (e)=>setValue(e.target.value),
|
|
59
|
-
onKeyDown: handleKeyDown
|
|
60
|
-
}),
|
|
61
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
62
|
-
className: "flex items-center justify-between",
|
|
63
|
-
children: [
|
|
64
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
65
|
-
className: "flex items-center gap-1",
|
|
66
|
-
children: [
|
|
67
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
68
|
-
type: "button",
|
|
69
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
70
|
-
"aria-label": "Add attachment",
|
|
71
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
|
|
72
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
73
|
-
})
|
|
74
|
-
}),
|
|
75
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
76
|
-
type: "button",
|
|
77
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
78
|
-
"aria-label": "Add workflow",
|
|
79
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Workflow, {
|
|
80
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
81
|
-
})
|
|
82
|
-
}),
|
|
83
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
84
|
-
type: "button",
|
|
85
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
86
|
-
"aria-label": "Settings",
|
|
87
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Settings2, {
|
|
88
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
89
|
-
})
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
}),
|
|
93
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
94
|
-
className: "flex items-center gap-2",
|
|
95
|
-
children: [
|
|
96
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
97
|
-
type: "button",
|
|
98
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
99
|
-
"aria-label": "Record",
|
|
100
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Circle, {
|
|
101
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
102
|
-
})
|
|
103
|
-
}),
|
|
104
|
-
showEnter ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
105
|
-
type: "button",
|
|
106
|
-
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-foreground-accent hover:bg-foreground-accent-muted",
|
|
107
|
-
onClick: handleSubmit,
|
|
108
|
-
"aria-label": "Submit message",
|
|
109
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CornerRightUp, {
|
|
110
|
-
className: "h-5 w-5 text-foreground-on-accent"
|
|
111
|
-
})
|
|
112
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
113
|
-
type: "button",
|
|
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",
|
|
115
|
-
"aria-label": "Voice input",
|
|
116
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Mic, {
|
|
117
|
-
className: "h-5 w-5 text-foreground-on-accent"
|
|
118
|
-
})
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
})
|
|
124
|
-
]
|
|
125
|
-
})
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
exports.ChatComposer = __webpack_exports__.ChatComposer;
|
|
129
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
130
|
-
"ChatComposer"
|
|
131
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
132
|
-
Object.defineProperty(exports, '__esModule', {
|
|
133
|
-
value: true
|
|
134
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface ChatComposerProps {
|
|
2
|
-
className?: string;
|
|
3
|
-
/** Placeholder text displayed when the input is empty */
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
/** Callback when the user submits a message */
|
|
6
|
-
onSubmit?: (value: string) => void;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Reusable chat composer input with action buttons.
|
|
10
|
-
*
|
|
11
|
-
* Features a text area, left-side action buttons (add, workflow),
|
|
12
|
-
* and an accent submit button. Max-width 800px.
|
|
13
|
-
*/
|
|
14
|
-
export declare function ChatComposer({ className, placeholder, onSubmit, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Circle, CornerRightUp, Mic, Plus, Settings2, Workflow } from "lucide-react";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { cn } from "../../lib/index.js";
|
|
5
|
-
function ChatComposer({ className, placeholder = 'I would like you to automate my', onSubmit }) {
|
|
6
|
-
const [value, setValue] = useState('');
|
|
7
|
-
const handleSubmit = ()=>{
|
|
8
|
-
if (value.trim()) {
|
|
9
|
-
onSubmit?.(value.trim());
|
|
10
|
-
setValue('');
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const handleKeyDown = (e)=>{
|
|
14
|
-
if ('Enter' === e.key && !e.shiftKey) {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
handleSubmit();
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const showEnter = value.length > 0;
|
|
20
|
-
return /*#__PURE__*/ jsx("div", {
|
|
21
|
-
className: cn('w-full max-w-[800px] rounded-[32px] bg-surface-raised p-2', className),
|
|
22
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
23
|
-
className: "group/input flex flex-col gap-3 rounded-[24px] border border-border bg-surface pb-3 pl-4 pr-3 pt-4 transition-colors hover:border-border-hover focus-within:border-border-hover",
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ jsx("textarea", {
|
|
26
|
-
className: "w-full resize-none bg-transparent text-sm font-normal leading-5 text-foreground placeholder:text-foreground-muted group-hover/input:placeholder:text-foreground-secondary focus:placeholder:text-foreground-secondary focus:outline-none",
|
|
27
|
-
placeholder: placeholder,
|
|
28
|
-
rows: 3,
|
|
29
|
-
value: value,
|
|
30
|
-
onChange: (e)=>setValue(e.target.value),
|
|
31
|
-
onKeyDown: handleKeyDown
|
|
32
|
-
}),
|
|
33
|
-
/*#__PURE__*/ jsxs("div", {
|
|
34
|
-
className: "flex items-center justify-between",
|
|
35
|
-
children: [
|
|
36
|
-
/*#__PURE__*/ jsxs("div", {
|
|
37
|
-
className: "flex items-center gap-1",
|
|
38
|
-
children: [
|
|
39
|
-
/*#__PURE__*/ jsx("button", {
|
|
40
|
-
type: "button",
|
|
41
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
42
|
-
"aria-label": "Add attachment",
|
|
43
|
-
children: /*#__PURE__*/ jsx(Plus, {
|
|
44
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
45
|
-
})
|
|
46
|
-
}),
|
|
47
|
-
/*#__PURE__*/ jsx("button", {
|
|
48
|
-
type: "button",
|
|
49
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
50
|
-
"aria-label": "Add workflow",
|
|
51
|
-
children: /*#__PURE__*/ jsx(Workflow, {
|
|
52
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
53
|
-
})
|
|
54
|
-
}),
|
|
55
|
-
/*#__PURE__*/ jsx("button", {
|
|
56
|
-
type: "button",
|
|
57
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
58
|
-
"aria-label": "Settings",
|
|
59
|
-
children: /*#__PURE__*/ jsx(Settings2, {
|
|
60
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
]
|
|
64
|
-
}),
|
|
65
|
-
/*#__PURE__*/ jsxs("div", {
|
|
66
|
-
className: "flex items-center gap-2",
|
|
67
|
-
children: [
|
|
68
|
-
/*#__PURE__*/ jsx("button", {
|
|
69
|
-
type: "button",
|
|
70
|
-
className: "group flex h-8 w-8 items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
71
|
-
"aria-label": "Record",
|
|
72
|
-
children: /*#__PURE__*/ jsx(Circle, {
|
|
73
|
-
className: "h-5 w-5 text-foreground-muted group-hover:text-foreground-hover"
|
|
74
|
-
})
|
|
75
|
-
}),
|
|
76
|
-
showEnter ? /*#__PURE__*/ jsx("button", {
|
|
77
|
-
type: "button",
|
|
78
|
-
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-foreground-accent hover:bg-foreground-accent-muted",
|
|
79
|
-
onClick: handleSubmit,
|
|
80
|
-
"aria-label": "Submit message",
|
|
81
|
-
children: /*#__PURE__*/ jsx(CornerRightUp, {
|
|
82
|
-
className: "h-5 w-5 text-foreground-on-accent"
|
|
83
|
-
})
|
|
84
|
-
}) : /*#__PURE__*/ jsx("button", {
|
|
85
|
-
type: "button",
|
|
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",
|
|
87
|
-
"aria-label": "Voice input",
|
|
88
|
-
children: /*#__PURE__*/ jsx(Mic, {
|
|
89
|
-
className: "h-5 w-5 text-foreground-on-accent"
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
})
|
|
96
|
-
]
|
|
97
|
-
})
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
export { ChatComposer };
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
ChatFirstExperience: ()=>ChatFirstExperience
|
|
28
|
-
});
|
|
29
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
-
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
31
|
-
const external_chat_composer_cjs_namespaceObject = require("./chat-composer.cjs");
|
|
32
|
-
const external_chat_prompt_suggestions_cjs_namespaceObject = require("./chat-prompt-suggestions.cjs");
|
|
33
|
-
function ChatFirstExperience({ className, userName = 'David', subtitle = 'What should we work on today?', composerPlaceholder = 'I would like you to automate my', suggestions = [
|
|
34
|
-
{
|
|
35
|
-
id: '1',
|
|
36
|
-
label: 'Make a list of affordable apartments in NYC'
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: '2',
|
|
40
|
-
label: 'Find the highest CD rates'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: '3',
|
|
44
|
-
label: 'Lorem ipsum dolor sit amet'
|
|
45
|
-
}
|
|
46
|
-
], onSuggestionClick, onSubmit }) {
|
|
47
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
48
|
-
className: (0, index_cjs_namespaceObject.cn)('flex flex-1 flex-col items-center justify-center', className),
|
|
49
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
50
|
-
className: "flex w-full max-w-[800px] flex-col items-center gap-[37px]",
|
|
51
|
-
children: [
|
|
52
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
53
|
-
className: "flex flex-col items-center text-center",
|
|
54
|
-
children: [
|
|
55
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("h1", {
|
|
56
|
-
className: "text-[40px] font-bold leading-9 tracking-[-0.8px] text-foreground",
|
|
57
|
-
children: [
|
|
58
|
-
"Hello ",
|
|
59
|
-
userName
|
|
60
|
-
]
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
63
|
-
className: "mt-1 text-base font-normal leading-9 text-foreground-secondary",
|
|
64
|
-
children: subtitle
|
|
65
|
-
})
|
|
66
|
-
]
|
|
67
|
-
}),
|
|
68
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_chat_composer_cjs_namespaceObject.ChatComposer, {
|
|
69
|
-
placeholder: composerPlaceholder,
|
|
70
|
-
onSubmit: onSubmit
|
|
71
|
-
}),
|
|
72
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_chat_prompt_suggestions_cjs_namespaceObject.PromptSuggestions, {
|
|
73
|
-
className: "w-full",
|
|
74
|
-
suggestions: suggestions,
|
|
75
|
-
onSelect: onSuggestionClick
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
})
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
exports.ChatFirstExperience = __webpack_exports__.ChatFirstExperience;
|
|
82
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
83
|
-
"ChatFirstExperience"
|
|
84
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
85
|
-
Object.defineProperty(exports, '__esModule', {
|
|
86
|
-
value: true
|
|
87
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type PromptSuggestion } from './chat-prompt-suggestions';
|
|
2
|
-
export interface ChatFirstExperienceProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
/** Greeting name displayed in the heading */
|
|
5
|
-
userName?: string;
|
|
6
|
-
/** Subtitle below the greeting */
|
|
7
|
-
subtitle?: string;
|
|
8
|
-
/** Placeholder text inside the composer */
|
|
9
|
-
composerPlaceholder?: string;
|
|
10
|
-
/** Prompt suggestions shown below the composer */
|
|
11
|
-
suggestions?: PromptSuggestion[];
|
|
12
|
-
/** Callback when a suggestion is clicked */
|
|
13
|
-
onSuggestionClick?: (suggestion: PromptSuggestion) => void;
|
|
14
|
-
/** Callback when the composer submit button is clicked */
|
|
15
|
-
onSubmit?: (value: string) => void;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The initial "first run" experience shown in the Canvas when
|
|
19
|
-
* a user opens the Delegate Chat page with no active conversation.
|
|
20
|
-
*
|
|
21
|
-
* Displays a greeting, a composer input, and prompt suggestions,
|
|
22
|
-
* all constrained to 800px max-width and centered in the canvas.
|
|
23
|
-
*/
|
|
24
|
-
export declare function ChatFirstExperience({ className, userName, subtitle, composerPlaceholder, suggestions, onSuggestionClick, onSubmit, }: ChatFirstExperienceProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../lib/index.js";
|
|
3
|
-
import { ChatComposer } from "./chat-composer.js";
|
|
4
|
-
import { PromptSuggestions } from "./chat-prompt-suggestions.js";
|
|
5
|
-
function ChatFirstExperience({ className, userName = 'David', subtitle = 'What should we work on today?', composerPlaceholder = 'I would like you to automate my', suggestions = [
|
|
6
|
-
{
|
|
7
|
-
id: '1',
|
|
8
|
-
label: 'Make a list of affordable apartments in NYC'
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
id: '2',
|
|
12
|
-
label: 'Find the highest CD rates'
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: '3',
|
|
16
|
-
label: 'Lorem ipsum dolor sit amet'
|
|
17
|
-
}
|
|
18
|
-
], onSuggestionClick, onSubmit }) {
|
|
19
|
-
return /*#__PURE__*/ jsx("div", {
|
|
20
|
-
className: cn('flex flex-1 flex-col items-center justify-center', className),
|
|
21
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
22
|
-
className: "flex w-full max-w-[800px] flex-col items-center gap-[37px]",
|
|
23
|
-
children: [
|
|
24
|
-
/*#__PURE__*/ jsxs("div", {
|
|
25
|
-
className: "flex flex-col items-center text-center",
|
|
26
|
-
children: [
|
|
27
|
-
/*#__PURE__*/ jsxs("h1", {
|
|
28
|
-
className: "text-[40px] font-bold leading-9 tracking-[-0.8px] text-foreground",
|
|
29
|
-
children: [
|
|
30
|
-
"Hello ",
|
|
31
|
-
userName
|
|
32
|
-
]
|
|
33
|
-
}),
|
|
34
|
-
/*#__PURE__*/ jsx("p", {
|
|
35
|
-
className: "mt-1 text-base font-normal leading-9 text-foreground-secondary",
|
|
36
|
-
children: subtitle
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
}),
|
|
40
|
-
/*#__PURE__*/ jsx(ChatComposer, {
|
|
41
|
-
placeholder: composerPlaceholder,
|
|
42
|
-
onSubmit: onSubmit
|
|
43
|
-
}),
|
|
44
|
-
/*#__PURE__*/ jsx(PromptSuggestions, {
|
|
45
|
-
className: "w-full",
|
|
46
|
-
suggestions: suggestions,
|
|
47
|
-
onSelect: onSuggestionClick
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
})
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
export { ChatFirstExperience };
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
PromptSuggestions: ()=>PromptSuggestions
|
|
28
|
-
});
|
|
29
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
-
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
31
|
-
function PromptSuggestions({ className, suggestions = [], onSelect }) {
|
|
32
|
-
if (0 === suggestions.length) return null;
|
|
33
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
34
|
-
className: (0, index_cjs_namespaceObject.cn)('flex flex-col items-start gap-2', className),
|
|
35
|
-
children: suggestions.map((suggestion)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
36
|
-
type: "button",
|
|
37
|
-
className: "flex h-10 items-center rounded-xl border border-border-subtle bg-surface-raised hover:border-border-hover px-4 py-2.5 text-sm font-normal leading-5 text-foreground-secondary transition-colors hover:bg-surface-hover hover:text-foreground",
|
|
38
|
-
onClick: ()=>onSelect?.(suggestion),
|
|
39
|
-
children: suggestion.label
|
|
40
|
-
}, suggestion.id))
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
exports.PromptSuggestions = __webpack_exports__.PromptSuggestions;
|
|
44
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
45
|
-
"PromptSuggestions"
|
|
46
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
47
|
-
Object.defineProperty(exports, '__esModule', {
|
|
48
|
-
value: true
|
|
49
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface PromptSuggestion {
|
|
2
|
-
id: string;
|
|
3
|
-
label: string;
|
|
4
|
-
}
|
|
5
|
-
export interface PromptSuggestionsProps {
|
|
6
|
-
className?: string;
|
|
7
|
-
/** List of suggestions to display */
|
|
8
|
-
suggestions?: PromptSuggestion[];
|
|
9
|
-
/** Callback when a suggestion is clicked */
|
|
10
|
-
onSelect?: (suggestion: PromptSuggestion) => void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A vertical list of clickable prompt suggestion pills.
|
|
14
|
-
*
|
|
15
|
-
* Styled per the Delegate Figma spec: zinc-800 background with
|
|
16
|
-
* zinc-700 border and zinc-50 text.
|
|
17
|
-
*/
|
|
18
|
-
export declare function PromptSuggestions({ className, suggestions, onSelect, }: PromptSuggestionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../lib/index.js";
|
|
3
|
-
function PromptSuggestions({ className, suggestions = [], onSelect }) {
|
|
4
|
-
if (0 === suggestions.length) return null;
|
|
5
|
-
return /*#__PURE__*/ jsx("div", {
|
|
6
|
-
className: cn('flex flex-col items-start gap-2', className),
|
|
7
|
-
children: suggestions.map((suggestion)=>/*#__PURE__*/ jsx("button", {
|
|
8
|
-
type: "button",
|
|
9
|
-
className: "flex h-10 items-center rounded-xl border border-border-subtle bg-surface-raised hover:border-border-hover px-4 py-2.5 text-sm font-normal leading-5 text-foreground-secondary transition-colors hover:bg-surface-hover hover:text-foreground",
|
|
10
|
-
onClick: ()=>onSelect?.(suggestion),
|
|
11
|
-
children: suggestion.label
|
|
12
|
-
}, suggestion.id))
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export { PromptSuggestions };
|