@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.
@@ -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 { a5 as $p, a8 as Hp, a6 as Yp, a7 as Bp, A as Vp, ac as Gp, ad as Kp, am as qp, an as Up, ah as Xp, al as Zp, aj as Qp, ai as Jp, af as eg, ae as tg, ak as ng, ag, ab as rg, B as og, a1 as sg, a3 as ig, a2 as lg, J as cg, Q as dg, M as ug, X as fg, O as mg, U as hg, Y as pg, a0 as gg, T as bg, V as vg, W as wg, Z as yg, _ as xg, $ as Sg, K as Mg, az as Cg, aB as Ng, aC as Dg, aD as Pg, F as Eg, aA as Tg, a as kg, N as Rg, ao as _g, as as Og, ap as jg, au as Ag, at as Ig, ax as Wg, aw as zg, av as Lg, ar as Fg, aq as $g, y as Hg, H as Yg, D as Bg, z as Vg, w as Gg, v as Kg, E as qg, x as Ug, a4 as Xg, a9 as Zg, aa as Qg, ay as Jg } from "../Form.js";
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 tb, ah as nb, _ as ab, Y as rb, a6 as ob, H as sb, ak as ib, J as lb, ap as cb, an as db, am as ub, a8 as fb, a7 as mb, ao as hb, al as pb, N as gb, aj as bb, af as vb, ag as wb, $ as yb, a0 as xb } from "../Stack.js";
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 Mb } from "../Switch.js";
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
- og as Badge,
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
- tb as CardDescription,
8023
- nb as CardFooter,
8024
- ab as CardHeader,
8025
- rb as CardTitle,
8026
- ob as Checkbox,
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
- sg as CommandDialog,
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
- ig as CommandSeparator,
8036
- lg as CommandShortcut,
8037
- sb as Dialog,
8038
- ib as DialogClose,
8039
- lb as DialogContent,
8040
- cb as DialogDescription,
8041
- db as DialogFooter,
8042
- ub as DialogHeader,
8043
- fb as DialogOverlay,
8044
- mb as DialogPortal,
8045
- hb as DialogTitle,
8046
- pb as DialogTrigger,
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
- cg as DropdownMenu,
8049
- dg as DropdownMenuCheckboxItem,
8050
- ug as DropdownMenuContent,
8051
- fg as DropdownMenuGroup,
8052
- mg as DropdownMenuItem,
8053
- hg as DropdownMenuLabel,
8054
- pg as DropdownMenuPortal,
8055
- gg as DropdownMenuRadioGroup,
8056
- bg as DropdownMenuRadioItem,
8057
- vg as DropdownMenuSeparator,
8058
- wg as DropdownMenuShortcut,
8059
- yg as DropdownMenuSub,
8060
- xg as DropdownMenuSubContent,
8061
- Sg as DropdownMenuSubTrigger,
8062
- Mg as DropdownMenuTrigger,
8063
- Cg as Form,
8064
- Ng as FormControl,
8065
- Dg as FormDescription,
8066
- Pg as FormField,
8067
- Eg as FormItem,
8068
- Tg as FormLabel,
8069
- kg as FormMessage,
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
- gb as Label,
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
- Rg as NativeSelect,
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
- bb as PopoverClose,
8102
+ wb as PopoverClose,
8102
8103
  Ua as PopoverContent,
8103
8104
  qa as PopoverTrigger,
8104
8105
  df as Progress,
8105
- vb as RadioGroup,
8106
- wb as RadioGroupItem,
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
- _g as Select,
8113
- Og as SelectContent,
8114
- jg as SelectGroup,
8115
- Ag as SelectItem,
8116
- Ig as SelectLabel,
8117
- Wg as SelectScrollDownButton,
8118
- zg as SelectScrollUpButton,
8119
- Lg as SelectSeparator,
8120
- Fg as SelectTrigger,
8121
- $g as SelectValue,
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
- Hg as SheetClose,
8125
+ Yg as SheetClose,
8125
8126
  Ai as SheetContent,
8126
- Yg as SheetDescription,
8127
- Bg as SheetFooter,
8128
- Vg as SheetHeader,
8129
- Gg as SheetOverlay,
8130
- Kg as SheetPortal,
8131
- qg as SheetTitle,
8132
- Ug as SheetTrigger,
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
- Mb as Switch,
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
- yb as Textarea,
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
- xb as Tooltip,
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
- Xg as badgeVariants,
8180
+ Zg as badgeVariants,
8180
8181
  En as buttonVariants,
8181
- Zg as reducer,
8182
- Qg as toast,
8183
- Jg as useFormField,
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"