@uipath/apollo-wind 2.70.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/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-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/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/index.cjs +252 -230
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.js +2 -0
- 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/index.cjs +40 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -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/styles.css +82 -43
- package/dist/tailwind.utilities.css +15 -0
- package/package.json +1 -1
- 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
package/dist/styles.css
CHANGED
|
@@ -926,9 +926,6 @@
|
|
|
926
926
|
.mr-auto {
|
|
927
927
|
margin-right: auto;
|
|
928
928
|
}
|
|
929
|
-
.mb-0\.5 {
|
|
930
|
-
margin-bottom: calc(var(--spacing) * 0.5);
|
|
931
|
-
}
|
|
932
929
|
.mb-1 {
|
|
933
930
|
margin-bottom: calc(var(--spacing) * 1);
|
|
934
931
|
}
|
|
@@ -1112,6 +1109,10 @@
|
|
|
1112
1109
|
width: calc(var(--spacing) * 9);
|
|
1113
1110
|
height: calc(var(--spacing) * 9);
|
|
1114
1111
|
}
|
|
1112
|
+
.size-12 {
|
|
1113
|
+
width: calc(var(--spacing) * 12);
|
|
1114
|
+
height: calc(var(--spacing) * 12);
|
|
1115
|
+
}
|
|
1115
1116
|
.size-\[18px\] {
|
|
1116
1117
|
width: 18px;
|
|
1117
1118
|
height: 18px;
|
|
@@ -1284,6 +1285,9 @@
|
|
|
1284
1285
|
.h-\[600px\] {
|
|
1285
1286
|
height: 600px;
|
|
1286
1287
|
}
|
|
1288
|
+
.h-\[640px\] {
|
|
1289
|
+
height: 640px;
|
|
1290
|
+
}
|
|
1287
1291
|
.h-\[calc\(100vh-10rem\)\] {
|
|
1288
1292
|
height: calc(100vh - 10rem);
|
|
1289
1293
|
}
|
|
@@ -1875,6 +1879,9 @@
|
|
|
1875
1879
|
.flex-auto {
|
|
1876
1880
|
flex: auto;
|
|
1877
1881
|
}
|
|
1882
|
+
.flex-none {
|
|
1883
|
+
flex: none;
|
|
1884
|
+
}
|
|
1878
1885
|
.flex-shrink {
|
|
1879
1886
|
flex-shrink: 1;
|
|
1880
1887
|
}
|
|
@@ -2093,6 +2100,9 @@
|
|
|
2093
2100
|
.animate-pulse {
|
|
2094
2101
|
animation: var(--animate-pulse);
|
|
2095
2102
|
}
|
|
2103
|
+
.animate-slide-in-from-bottom {
|
|
2104
|
+
animation: apollo-slide-in-from-bottom 300ms ease-out;
|
|
2105
|
+
}
|
|
2096
2106
|
.animate-spin {
|
|
2097
2107
|
animation: var(--animate-spin);
|
|
2098
2108
|
}
|
|
@@ -2135,6 +2145,9 @@
|
|
|
2135
2145
|
.snap-mandatory {
|
|
2136
2146
|
--tw-scroll-snap-strictness: mandatory;
|
|
2137
2147
|
}
|
|
2148
|
+
.snap-start {
|
|
2149
|
+
scroll-snap-align: start;
|
|
2150
|
+
}
|
|
2138
2151
|
.scroll-px-1 {
|
|
2139
2152
|
scroll-padding-inline: calc(var(--spacing) * 1);
|
|
2140
2153
|
}
|
|
@@ -2807,12 +2820,6 @@
|
|
|
2807
2820
|
.border-orange-300 {
|
|
2808
2821
|
border-color: var(--color-orange-300);
|
|
2809
2822
|
}
|
|
2810
|
-
.border-orange-500\/20 {
|
|
2811
|
-
border-color: color-mix(in srgb, oklch(70.5% 0.213 47.604) 20%, transparent);
|
|
2812
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2813
|
-
border-color: color-mix(in oklab, var(--color-orange-500) 20%, transparent);
|
|
2814
|
-
}
|
|
2815
|
-
}
|
|
2816
2823
|
.border-primary {
|
|
2817
2824
|
border-color: var(--primary);
|
|
2818
2825
|
}
|
|
@@ -2876,12 +2883,6 @@
|
|
|
2876
2883
|
.border-transparent {
|
|
2877
2884
|
border-color: transparent;
|
|
2878
2885
|
}
|
|
2879
|
-
.border-violet-500\/20 {
|
|
2880
|
-
border-color: color-mix(in srgb, oklch(60.6% 0.25 292.717) 20%, transparent);
|
|
2881
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2882
|
-
border-color: color-mix(in oklab, var(--color-violet-500) 20%, transparent);
|
|
2883
|
-
}
|
|
2884
|
-
}
|
|
2885
2886
|
.border-warning {
|
|
2886
2887
|
border-color: var(--warning);
|
|
2887
2888
|
}
|
|
@@ -3473,12 +3474,6 @@
|
|
|
3473
3474
|
.bg-orange-500 {
|
|
3474
3475
|
background-color: var(--color-orange-500);
|
|
3475
3476
|
}
|
|
3476
|
-
.bg-orange-500\/10 {
|
|
3477
|
-
background-color: color-mix(in srgb, oklch(70.5% 0.213 47.604) 10%, transparent);
|
|
3478
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3479
|
-
background-color: color-mix(in oklab, var(--color-orange-500) 10%, transparent);
|
|
3480
|
-
}
|
|
3481
|
-
}
|
|
3482
3477
|
.bg-orange-600 {
|
|
3483
3478
|
background-color: var(--color-orange-600);
|
|
3484
3479
|
}
|
|
@@ -3857,12 +3852,6 @@
|
|
|
3857
3852
|
.bg-violet-500 {
|
|
3858
3853
|
background-color: var(--color-violet-500);
|
|
3859
3854
|
}
|
|
3860
|
-
.bg-violet-500\/10 {
|
|
3861
|
-
background-color: color-mix(in srgb, oklch(60.6% 0.25 292.717) 10%, transparent);
|
|
3862
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3863
|
-
background-color: color-mix(in oklab, var(--color-violet-500) 10%, transparent);
|
|
3864
|
-
}
|
|
3865
|
-
}
|
|
3866
3855
|
.bg-violet-600 {
|
|
3867
3856
|
background-color: var(--color-violet-600);
|
|
3868
3857
|
}
|
|
@@ -4396,6 +4385,9 @@
|
|
|
4396
4385
|
.text-right {
|
|
4397
4386
|
text-align: right;
|
|
4398
4387
|
}
|
|
4388
|
+
.text-start {
|
|
4389
|
+
text-align: start;
|
|
4390
|
+
}
|
|
4399
4391
|
.align-middle {
|
|
4400
4392
|
vertical-align: middle;
|
|
4401
4393
|
}
|
|
@@ -4508,6 +4500,10 @@
|
|
|
4508
4500
|
--tw-leading: calc(var(--spacing) * 9);
|
|
4509
4501
|
line-height: calc(var(--spacing) * 9);
|
|
4510
4502
|
}
|
|
4503
|
+
.leading-10 {
|
|
4504
|
+
--tw-leading: calc(var(--spacing) * 10);
|
|
4505
|
+
line-height: calc(var(--spacing) * 10);
|
|
4506
|
+
}
|
|
4511
4507
|
.leading-\[18px\] {
|
|
4512
4508
|
--tw-leading: 18px;
|
|
4513
4509
|
line-height: 18px;
|
|
@@ -4612,6 +4608,9 @@
|
|
|
4612
4608
|
.break-all {
|
|
4613
4609
|
word-break: break-all;
|
|
4614
4610
|
}
|
|
4611
|
+
.whitespace-normal {
|
|
4612
|
+
white-space: normal;
|
|
4613
|
+
}
|
|
4615
4614
|
.whitespace-nowrap {
|
|
4616
4615
|
white-space: nowrap;
|
|
4617
4616
|
}
|
|
@@ -4780,9 +4779,6 @@
|
|
|
4780
4779
|
color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
|
|
4781
4780
|
}
|
|
4782
4781
|
}
|
|
4783
|
-
.text-orange-400 {
|
|
4784
|
-
color: var(--color-orange-400);
|
|
4785
|
-
}
|
|
4786
4782
|
.text-orange-500 {
|
|
4787
4783
|
color: var(--color-orange-500);
|
|
4788
4784
|
}
|
|
@@ -4843,9 +4839,6 @@
|
|
|
4843
4839
|
.text-transparent {
|
|
4844
4840
|
color: transparent;
|
|
4845
4841
|
}
|
|
4846
|
-
.text-violet-400 {
|
|
4847
|
-
color: var(--color-violet-400);
|
|
4848
|
-
}
|
|
4849
4842
|
.text-warning {
|
|
4850
4843
|
color: var(--warning);
|
|
4851
4844
|
}
|
|
@@ -6158,16 +6151,6 @@
|
|
|
6158
6151
|
}
|
|
6159
6152
|
}
|
|
6160
6153
|
}
|
|
6161
|
-
.hover\:border-primary\/40 {
|
|
6162
|
-
&:hover {
|
|
6163
|
-
@media (hover: hover) {
|
|
6164
|
-
border-color: var(--primary);
|
|
6165
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
6166
|
-
border-color: color-mix(in oklab, var(--primary) 40%, transparent);
|
|
6167
|
-
}
|
|
6168
|
-
}
|
|
6169
|
-
}
|
|
6170
|
-
}
|
|
6171
6154
|
.hover\:border-primary\/50 {
|
|
6172
6155
|
&:hover {
|
|
6173
6156
|
@media (hover: hover) {
|
|
@@ -7458,6 +7441,49 @@
|
|
|
7458
7441
|
}
|
|
7459
7442
|
}
|
|
7460
7443
|
}
|
|
7444
|
+
.\*\*\:data-\[slot\=prompt-suggestion\]\:h-10 {
|
|
7445
|
+
:is(& *) {
|
|
7446
|
+
&[data-slot="prompt-suggestion"] {
|
|
7447
|
+
height: calc(var(--spacing) * 10);
|
|
7448
|
+
}
|
|
7449
|
+
}
|
|
7450
|
+
}
|
|
7451
|
+
.\*\*\:data-\[slot\=prompt-suggestion\]\:py-2\.5 {
|
|
7452
|
+
:is(& *) {
|
|
7453
|
+
&[data-slot="prompt-suggestion"] {
|
|
7454
|
+
padding-block: calc(var(--spacing) * 2.5);
|
|
7455
|
+
}
|
|
7456
|
+
}
|
|
7457
|
+
}
|
|
7458
|
+
.\*\*\:data-\[slot\=prompt-suggestion\]\:text-foreground-secondary {
|
|
7459
|
+
:is(& *) {
|
|
7460
|
+
&[data-slot="prompt-suggestion"] {
|
|
7461
|
+
color: var(--foreground-secondary);
|
|
7462
|
+
}
|
|
7463
|
+
}
|
|
7464
|
+
}
|
|
7465
|
+
.\*\*\:data-\[slot\=prompt-suggestion\]\:hover\:border-border-hover {
|
|
7466
|
+
:is(& *) {
|
|
7467
|
+
&[data-slot="prompt-suggestion"] {
|
|
7468
|
+
&:hover {
|
|
7469
|
+
@media (hover: hover) {
|
|
7470
|
+
border-color: var(--border-hover);
|
|
7471
|
+
}
|
|
7472
|
+
}
|
|
7473
|
+
}
|
|
7474
|
+
}
|
|
7475
|
+
}
|
|
7476
|
+
.\*\*\:data-\[slot\=prompt-suggestion\]\:hover\:text-foreground {
|
|
7477
|
+
:is(& *) {
|
|
7478
|
+
&[data-slot="prompt-suggestion"] {
|
|
7479
|
+
&:hover {
|
|
7480
|
+
@media (hover: hover) {
|
|
7481
|
+
color: var(--foreground);
|
|
7482
|
+
}
|
|
7483
|
+
}
|
|
7484
|
+
}
|
|
7485
|
+
}
|
|
7486
|
+
}
|
|
7461
7487
|
.data-\[spacing\=0\]\:rounded-none {
|
|
7462
7488
|
&[data-spacing="0"] {
|
|
7463
7489
|
border-radius: 0;
|
|
@@ -12482,10 +12508,23 @@ html[dir='rtl'], [data-sonner-toaster][dir='rtl'] {
|
|
|
12482
12508
|
transform: translateX(0);
|
|
12483
12509
|
}
|
|
12484
12510
|
}
|
|
12511
|
+
@keyframes apollo-slide-in-from-bottom {
|
|
12512
|
+
from {
|
|
12513
|
+
opacity: 0;
|
|
12514
|
+
transform: translateY(1.25rem);
|
|
12515
|
+
}
|
|
12516
|
+
to {
|
|
12517
|
+
opacity: 1;
|
|
12518
|
+
transform: translateY(0);
|
|
12519
|
+
}
|
|
12520
|
+
}
|
|
12485
12521
|
@media (prefers-reduced-motion: reduce) {
|
|
12486
12522
|
.animate-slide-in-from-right, .animate-slide-in-from-left {
|
|
12487
12523
|
animation: apollo-fade-in 150ms ease-out;
|
|
12488
12524
|
}
|
|
12525
|
+
.animate-slide-in-from-bottom {
|
|
12526
|
+
animation: apollo-fade-in 300ms ease-out;
|
|
12527
|
+
}
|
|
12489
12528
|
}
|
|
12490
12529
|
@property --scroll-fade-t {
|
|
12491
12530
|
syntax: '<length-percentage>';
|
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
* element in while it travels 20px to its resting position. Intended for
|
|
70
70
|
* hierarchical panels where forward navigation enters from the right and
|
|
71
71
|
* going back enters from the left (canvas Toolbox, nested pickers).
|
|
72
|
+
* `animate-slide-in-from-bottom` is the slower rise of chat content that
|
|
73
|
+
* appears below a reply (PromptSuggestions).
|
|
72
74
|
*
|
|
73
75
|
* Two keyframes rather than one parameterized by a custom property: the
|
|
74
76
|
* offset is the only difference, and inlining it keeps `var()` out of the
|
|
@@ -85,6 +87,11 @@
|
|
|
85
87
|
to { opacity: 1; transform: translateX(0); }
|
|
86
88
|
}
|
|
87
89
|
|
|
90
|
+
@keyframes apollo-slide-in-from-bottom {
|
|
91
|
+
from { opacity: 0; transform: translateY(1.25rem); }
|
|
92
|
+
to { opacity: 1; transform: translateY(0); }
|
|
93
|
+
}
|
|
94
|
+
|
|
88
95
|
@utility animate-slide-in-from-right {
|
|
89
96
|
animation: apollo-slide-in-from-right 150ms ease-out;
|
|
90
97
|
}
|
|
@@ -93,11 +100,19 @@
|
|
|
93
100
|
animation: apollo-slide-in-from-left 150ms ease-out;
|
|
94
101
|
}
|
|
95
102
|
|
|
103
|
+
@utility animate-slide-in-from-bottom {
|
|
104
|
+
animation: apollo-slide-in-from-bottom 300ms ease-out;
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
@media (prefers-reduced-motion: reduce) {
|
|
97
108
|
.animate-slide-in-from-right,
|
|
98
109
|
.animate-slide-in-from-left {
|
|
99
110
|
animation: apollo-fade-in 150ms ease-out;
|
|
100
111
|
}
|
|
112
|
+
|
|
113
|
+
.animate-slide-in-from-bottom {
|
|
114
|
+
animation: apollo-fade-in 300ms ease-out;
|
|
115
|
+
}
|
|
101
116
|
}
|
|
102
117
|
|
|
103
118
|
/* ============================================================================
|
package/package.json
CHANGED
|
@@ -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 external_chat_prompt_suggestions_cjs_namespaceObject = require("./chat-prompt-suggestions.cjs");
|
|
31
|
-
const external_demo_composer_cjs_namespaceObject = require("./demo-composer.cjs");
|
|
32
|
-
const index_cjs_namespaceObject = require("../../lib/index.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_demo_composer_cjs_namespaceObject.DemoComposer, {
|
|
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 { PromptSuggestions } from "./chat-prompt-suggestions.js";
|
|
3
|
-
import { DemoComposer } from "./demo-composer.js";
|
|
4
|
-
import { cn } from "../../lib/index.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(DemoComposer, {
|
|
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 };
|