@altimateai/ui-components 0.0.28 → 0.0.29
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/CoachForm.js +3977 -3959
- package/dist/Form.js +804 -744
- package/dist/assets/icons/index.d.ts +2 -0
- package/dist/assets/icons/index.js +17 -16
- package/dist/chatbotV2/index.d.ts +5 -2
- package/dist/index.d.ts +2 -2
- package/dist/index2.js +18 -17
- package/dist/shadcn/index.d.ts +18 -1
- package/dist/shadcn/index.js +76 -74
- package/dist/storybook/AutosizeTextarea.stories.tsx +52 -0
- package/dist/{types-CPlzEfL7.d.ts → types-Dr98SsnM.d.ts} +2 -0
- package/package.json +1 -1
package/dist/shadcn/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { u as Pi, C as Ei, b as Ti, c as ki, d as Ri, e as _i, f as Oi, S as ji, g as Ai, h as Hn, i as Ii, j as Wi, k as zi, G as Li, L as Fi, I as $i, l as Hi, R as Yi, m as Bi, n as Vi, o as Gi, p as Ki, q as qi, r as Ui, s as Xi, P as Zi, t as Qi } from "../Form.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a7 as $p, aa as Hp, a8 as Yp, a9 as Bp, A as Vp, ae as Gp, af as Kp, ao as qp, ap as Up, aj as Xp, an as Zp, al as Qp, ak as Jp, ah as eg, ag as tg, am as ng, ai as ag, ad as rg, K as og, B as sg, a3 as ig, a5 as lg, a4 as cg, M as dg, U as ug, Q as fg, Z as mg, T as hg, W as pg, _ as gg, a2 as bg, V as vg, X as wg, Y as yg, $ as xg, a0 as Sg, a1 as Mg, O as Cg, aB as Ng, aD as Dg, aE as Pg, aF as Eg, F as Tg, aC as kg, a as Rg, N as _g, aq as Og, au as jg, ar as Ag, aw as Ig, av as Wg, az as zg, ay as Lg, ax as Fg, at as $g, as as Hg, y as Yg, H as Bg, D as Vg, z as Gg, w as Kg, v as qg, E as Ug, x as Xg, a6 as Zg, ab as Qg, ac as Jg, J as eb, aA as tb } from "../Form.js";
|
|
3
3
|
import { c as N, M as En, Q as Re, a2 as Ka, a3 as qa, Z as zt, a4 as Ua, a1 as Xa, a as He, P as J, v as Se, K as Ut, l as Yn, u as he, a9 as Ji, V as Za, b as ut, o as Qe, d as L, aa as el, E as tl, y as nl, j as Bn, ab as al, a5 as rl, ac as ol, ad as sl, ae as il, S as ft, n as Xt, z as Zt, G as $t, s as Qa, I as Ja, f as ll, e as cl, m as er, A as dl, r as ul, t as fl, w as ml, B as hl, U as pl, X as gl } from "../Stack.js";
|
|
4
|
-
import { ai as
|
|
4
|
+
import { ai as ab, ah as rb, _ as ob, Y as sb, a6 as ib, H as lb, ak as cb, J as db, ap as ub, an as fb, am as mb, a8 as hb, a7 as pb, ao as gb, al as bb, N as vb, aj as wb, af as yb, ag as xb, $ as Sb, a0 as Mb } from "../Stack.js";
|
|
5
5
|
import { j as c, p as tr, a as Qt, d as nr, q as bl, C as ar, b as rr, r as vl, M as or, S as wl, s as yl, t as xl, F as Sl } from "../index2.js";
|
|
6
6
|
import * as h from "react";
|
|
7
7
|
import E, { createContext as Ml, useContext as Cl, useCallback as se, useRef as ot, useLayoutEffect as Nl, useState as Me, useEffect as Et, useMemo as Nt, forwardRef as Jt } from "react";
|
|
8
|
-
import { S as
|
|
8
|
+
import { S as Nb } from "../Switch.js";
|
|
9
9
|
import * as Dl from "react-dom";
|
|
10
10
|
import '../index2.css';const vn = {}, xt = {};
|
|
11
11
|
function Dt(e, t) {
|
|
@@ -8003,10 +8003,11 @@ export {
|
|
|
8003
8003
|
ng as AlertDialogTitle,
|
|
8004
8004
|
ag as AlertDialogTrigger,
|
|
8005
8005
|
rg as AlertTitle,
|
|
8006
|
+
og as AutosizeTextarea,
|
|
8006
8007
|
_u as Avatar,
|
|
8007
8008
|
ju as AvatarFallback,
|
|
8008
8009
|
Ou as AvatarImage,
|
|
8009
|
-
|
|
8010
|
+
sg as Badge,
|
|
8010
8011
|
Zf as Breadcrumb,
|
|
8011
8012
|
am as BreadcrumbEllipsis,
|
|
8012
8013
|
Jf as BreadcrumbItem,
|
|
@@ -8019,59 +8020,59 @@ export {
|
|
|
8019
8020
|
Pu as CalendarDayButton,
|
|
8020
8021
|
pl as Card,
|
|
8021
8022
|
gl as CardContent,
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8023
|
+
ab as CardDescription,
|
|
8024
|
+
rb as CardFooter,
|
|
8025
|
+
ob as CardHeader,
|
|
8026
|
+
sb as CardTitle,
|
|
8027
|
+
ib as Checkbox,
|
|
8027
8028
|
wp as Combobox,
|
|
8028
8029
|
Ei as Command,
|
|
8029
|
-
|
|
8030
|
+
ig as CommandDialog,
|
|
8030
8031
|
Ri as CommandEmpty,
|
|
8031
8032
|
_i as CommandGroup,
|
|
8032
8033
|
Ti as CommandInput,
|
|
8033
8034
|
Oi as CommandItem,
|
|
8034
8035
|
ki as CommandList,
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8036
|
+
lg as CommandSeparator,
|
|
8037
|
+
cg as CommandShortcut,
|
|
8038
|
+
lb as Dialog,
|
|
8039
|
+
cb as DialogClose,
|
|
8040
|
+
db as DialogContent,
|
|
8041
|
+
ub as DialogDescription,
|
|
8042
|
+
fb as DialogFooter,
|
|
8043
|
+
mb as DialogHeader,
|
|
8044
|
+
hb as DialogOverlay,
|
|
8045
|
+
pb as DialogPortal,
|
|
8046
|
+
gb as DialogTitle,
|
|
8047
|
+
bb as DialogTrigger,
|
|
8047
8048
|
zp as DragAndDropFileUpload,
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8049
|
+
dg as DropdownMenu,
|
|
8050
|
+
ug as DropdownMenuCheckboxItem,
|
|
8051
|
+
fg as DropdownMenuContent,
|
|
8052
|
+
mg as DropdownMenuGroup,
|
|
8053
|
+
hg as DropdownMenuItem,
|
|
8054
|
+
pg as DropdownMenuLabel,
|
|
8055
|
+
gg as DropdownMenuPortal,
|
|
8056
|
+
bg as DropdownMenuRadioGroup,
|
|
8057
|
+
vg as DropdownMenuRadioItem,
|
|
8058
|
+
wg as DropdownMenuSeparator,
|
|
8059
|
+
yg as DropdownMenuShortcut,
|
|
8060
|
+
xg as DropdownMenuSub,
|
|
8061
|
+
Sg as DropdownMenuSubContent,
|
|
8062
|
+
Mg as DropdownMenuSubTrigger,
|
|
8063
|
+
Cg as DropdownMenuTrigger,
|
|
8064
|
+
Ng as Form,
|
|
8065
|
+
Dg as FormControl,
|
|
8066
|
+
Pg as FormDescription,
|
|
8067
|
+
Eg as FormField,
|
|
8068
|
+
Tg as FormItem,
|
|
8069
|
+
kg as FormLabel,
|
|
8070
|
+
Rg as FormMessage,
|
|
8070
8071
|
Ip as HoverCard,
|
|
8071
8072
|
cp as HoverCardContent,
|
|
8072
8073
|
Wp as HoverCardTrigger,
|
|
8073
8074
|
rl as Input,
|
|
8074
|
-
|
|
8075
|
+
vb as Label,
|
|
8075
8076
|
Km as Menubar,
|
|
8076
8077
|
Jm as MenubarCheckboxItem,
|
|
8077
8078
|
Zm as MenubarContent,
|
|
@@ -8088,7 +8089,7 @@ export {
|
|
|
8088
8089
|
Xm as MenubarSubContent,
|
|
8089
8090
|
Um as MenubarSubTrigger,
|
|
8090
8091
|
qm as MenubarTrigger,
|
|
8091
|
-
|
|
8092
|
+
_g as NativeSelect,
|
|
8092
8093
|
kr as PREDEFINED_RANGES,
|
|
8093
8094
|
rh as Pagination,
|
|
8094
8095
|
oh as PaginationContent,
|
|
@@ -8098,38 +8099,38 @@ export {
|
|
|
8098
8099
|
lh as PaginationNext,
|
|
8099
8100
|
ih as PaginationPrevious,
|
|
8100
8101
|
Ka as Popover,
|
|
8101
|
-
|
|
8102
|
+
wb as PopoverClose,
|
|
8102
8103
|
Ua as PopoverContent,
|
|
8103
8104
|
qa as PopoverTrigger,
|
|
8104
8105
|
df as Progress,
|
|
8105
|
-
|
|
8106
|
-
|
|
8106
|
+
yb as RadioGroup,
|
|
8107
|
+
xb as RadioGroupItem,
|
|
8107
8108
|
_p as ResizableHandle,
|
|
8108
8109
|
Rp as ResizablePanel,
|
|
8109
8110
|
kp as ResizablePanelGroup,
|
|
8110
8111
|
Jh as ScrollArea,
|
|
8111
8112
|
$n as ScrollBar,
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8113
|
+
Og as Select,
|
|
8114
|
+
jg as SelectContent,
|
|
8115
|
+
Ag as SelectGroup,
|
|
8116
|
+
Ig as SelectItem,
|
|
8117
|
+
Wg as SelectLabel,
|
|
8118
|
+
zg as SelectScrollDownButton,
|
|
8119
|
+
Lg as SelectScrollUpButton,
|
|
8120
|
+
Fg as SelectSeparator,
|
|
8121
|
+
$g as SelectTrigger,
|
|
8122
|
+
Hg as SelectValue,
|
|
8122
8123
|
vo as Separator,
|
|
8123
8124
|
ji as Sheet,
|
|
8124
|
-
|
|
8125
|
+
Yg as SheetClose,
|
|
8125
8126
|
Ai as SheetContent,
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8127
|
+
Bg as SheetDescription,
|
|
8128
|
+
Vg as SheetFooter,
|
|
8129
|
+
Gg as SheetHeader,
|
|
8130
|
+
Kg as SheetOverlay,
|
|
8131
|
+
qg as SheetPortal,
|
|
8132
|
+
Ug as SheetTitle,
|
|
8133
|
+
Xg as SheetTrigger,
|
|
8133
8134
|
Sf as Sidebar,
|
|
8134
8135
|
kf as SidebarContent,
|
|
8135
8136
|
Ef as SidebarFooter,
|
|
@@ -8155,13 +8156,13 @@ export {
|
|
|
8155
8156
|
Mf as SidebarTrigger,
|
|
8156
8157
|
Ia as Skeleton,
|
|
8157
8158
|
Sm as Slider,
|
|
8158
|
-
|
|
8159
|
+
Nb as Switch,
|
|
8159
8160
|
hp as TZDateRange,
|
|
8160
8161
|
xp as Tabs,
|
|
8161
8162
|
Xf as TabsContent,
|
|
8162
8163
|
qf as TabsList,
|
|
8163
8164
|
Uf as TabsTrigger,
|
|
8164
|
-
|
|
8165
|
+
Sb as Textarea,
|
|
8165
8166
|
so as Toast,
|
|
8166
8167
|
tf as ToastAction,
|
|
8167
8168
|
io as ToastClose,
|
|
@@ -8170,17 +8171,18 @@ export {
|
|
|
8170
8171
|
lo as ToastTitle,
|
|
8171
8172
|
oo as ToastViewport,
|
|
8172
8173
|
bp as Toaster,
|
|
8173
|
-
|
|
8174
|
+
Mb as Tooltip,
|
|
8174
8175
|
il as TooltipContent,
|
|
8175
8176
|
ol as TooltipCore,
|
|
8176
8177
|
al as TooltipProvider,
|
|
8177
8178
|
sl as TooltipTrigger,
|
|
8178
8179
|
Xa as Typography,
|
|
8179
|
-
|
|
8180
|
+
Zg as badgeVariants,
|
|
8180
8181
|
En as buttonVariants,
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8182
|
+
Qg as reducer,
|
|
8183
|
+
Jg as toast,
|
|
8184
|
+
eb as useAutosizeTextArea,
|
|
8185
|
+
tb as useFormField,
|
|
8184
8186
|
an as useSidebar,
|
|
8185
8187
|
Pi as useToast
|
|
8186
8188
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
2
|
+
import { AutosizeTextarea } from "./AutosizeTextarea";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Shadcn/Components/AutosizeTextarea",
|
|
7
|
+
component: AutosizeTextarea,
|
|
8
|
+
argTypes: {
|
|
9
|
+
disabled: {
|
|
10
|
+
control: "boolean",
|
|
11
|
+
},
|
|
12
|
+
placeholder: {
|
|
13
|
+
control: "text",
|
|
14
|
+
},
|
|
15
|
+
minHeight: {
|
|
16
|
+
control: "number",
|
|
17
|
+
},
|
|
18
|
+
maxHeight: {
|
|
19
|
+
control: "number",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
} as Meta;
|
|
23
|
+
|
|
24
|
+
const Template: StoryFn = args => {
|
|
25
|
+
const [value, setValue] = useState(args.value || "");
|
|
26
|
+
|
|
27
|
+
return <AutosizeTextarea {...args} value={value} onChange={e => setValue(e.target.value)} />;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Default = Template.bind({});
|
|
31
|
+
Default.args = {
|
|
32
|
+
placeholder: "Type your message here. The textarea will grow as you type.",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const WithMinHeight = Template.bind({});
|
|
36
|
+
WithMinHeight.args = {
|
|
37
|
+
placeholder: "This textarea has a custom minimum height",
|
|
38
|
+
minHeight: 100,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const WithMaxHeight = Template.bind({});
|
|
42
|
+
WithMaxHeight.args = {
|
|
43
|
+
placeholder: "This textarea will stop growing at 200px height",
|
|
44
|
+
maxHeight: 200,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const WithMinAndMaxHeight = Template.bind({});
|
|
48
|
+
WithMinAndMaxHeight.args = {
|
|
49
|
+
placeholder: "Min height: 80px, Max height: 150px",
|
|
50
|
+
minHeight: 80,
|
|
51
|
+
maxHeight: 150,
|
|
52
|
+
};
|
|
@@ -68,6 +68,7 @@ interface ChatbotProviderProps extends ChatbotProps {
|
|
|
68
68
|
requestParams?: RequestInit;
|
|
69
69
|
components?: {
|
|
70
70
|
feedback?: ReactNode;
|
|
71
|
+
questionFormButtons?: (userPrompt: string, onAccept: (improvedPrompt: string) => void) => ReactNode;
|
|
71
72
|
};
|
|
72
73
|
contextOptions?: ContextOption[];
|
|
73
74
|
isMarkdownResponse?: boolean;
|
|
@@ -144,6 +145,7 @@ interface ChatState {
|
|
|
144
145
|
}[];
|
|
145
146
|
components?: {
|
|
146
147
|
feedback?: ReactNode;
|
|
148
|
+
questionFormButtons?: (userPrompt: string, onAccept: (improvedPrompt: string) => void) => ReactNode;
|
|
147
149
|
};
|
|
148
150
|
}
|
|
149
151
|
interface TodoItem {
|