@altimateai/ui-components 0.0.64-beta7 → 0.0.65

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/index.d.ts CHANGED
@@ -32,8 +32,9 @@ declare const IconButton: (props: Props$7) => JSX.Element;
32
32
 
33
33
  interface Props$6 extends ButtonProps {
34
34
  loading: boolean;
35
+ loadingText?: string | null;
35
36
  }
36
- declare const LoadingButton: ({ loading, ...rest }: Props$6) => JSX.Element;
37
+ declare const LoadingButton: ({ loading, loadingText, ...rest }: Props$6) => JSX.Element;
37
38
 
38
39
  interface Props$5 {
39
40
  code: string;
package/dist/main.js CHANGED
@@ -6,7 +6,7 @@ import { j as h, A as dn, e as sr, f as ar, a as ur, d as lr, D as cr, E as dr,
6
6
  import * as te from "react";
7
7
  import Z, { createContext as _e, useReducer as fn, useCallback as we, useMemo as fe, useContext as be, useLayoutEffect as gr, useEffect as le, useRef as Se, useId as pn, useInsertionEffect as hr, Children as De, isValidElement as vr, useState as re, lazy as mr } from "react";
8
8
  import Er, { createPortal as bt } from "react-dom";
9
- import { u as yr, F as Mt, a as br, A as gn, N as Lt, B as Cr } from "./Carousel.js";
9
+ import { u as yr, F as Mt, a as br, A as gn, N as Lt, B as Cr } from "./ToggleGroup.js";
10
10
  import { S as Sr } from "./Switch.js";
11
11
  import './main.css';var Ct = /* @__PURE__ */ ((e) => (e.DBT_DOCS = "dbt-docs", e.DOCUMENTATION_EDITOR = "documentation-editor", e.SAAS = "saas", e))(Ct || {});
12
12
  const _r = () => {
@@ -34,9 +34,9 @@ import * as ResizablePrimitive from 'react-resizable-panels';
34
34
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
35
35
  import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
36
36
  import * as TagsInputPrimitive from '@diceui/tags-input';
37
+ import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
37
38
  import * as TogglePrimitive from '@radix-ui/react-toggle';
38
39
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
39
- import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
40
40
 
41
41
  declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: ComponentProps<typeof DayPicker> & {
42
42
  buttonVariant?: ComponentProps<typeof Button>["variant"];
@@ -430,6 +430,7 @@ interface NativeSelectProps extends SelectAttributes, VariantProps<typeof select
430
430
  open?: boolean;
431
431
  label?: string;
432
432
  showPlaceholder?: boolean;
433
+ buttonProps?: ButtonProps;
433
434
  }
434
435
  declare const NativeSelect: React$1.ForwardRefExoticComponent<NativeSelectProps & React$1.RefAttributes<HTMLButtonElement>>;
435
436
 
@@ -687,17 +688,6 @@ declare const TagsInputInput: React$1.ForwardRefExoticComponent<Omit<TagsInputPr
687
688
  declare const TagsInputItem: React$1.ForwardRefExoticComponent<Omit<TagsInputPrimitive.TagsInputItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
688
689
  declare const TagsInputClear: React$1.ForwardRefExoticComponent<Omit<TagsInputPrimitive.TagsInputClearProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
689
690
 
690
- declare const toggleVariants: (props?: ({
691
- variant?: "default" | "outline" | null | undefined;
692
- size?: "sm" | "lg" | "default" | null | undefined;
693
- } & class_variance_authority_types.ClassProp) | undefined) => string;
694
- declare function Toggle({ className, variant, size, ...props }: React$1.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
695
-
696
- declare function ToggleGroup({ className, variant, size, spacing, children, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
697
- spacing?: number;
698
- }): react_jsx_runtime.JSX.Element;
699
- declare function ToggleGroupItem({ className, children, variant, size, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
700
-
701
691
  type CarouselApi = UseEmblaCarouselType[1];
702
692
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
703
693
  type CarouselOptions = UseCarouselParameters[0];
@@ -714,4 +704,15 @@ declare function CarouselItem({ className, ...props }: React$1.ComponentProps<"d
714
704
  declare function CarouselPrevious({ className, variant, size, ...props }: React$1.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
715
705
  declare function CarouselNext({ className, variant, size, ...props }: React$1.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
716
706
 
707
+ declare const toggleVariants: (props?: ({
708
+ variant?: "default" | "outline" | null | undefined;
709
+ size?: "sm" | "lg" | "default" | null | undefined;
710
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
711
+ declare function Toggle({ className, variant, size, ...props }: React$1.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
712
+
713
+ declare function ToggleGroup({ className, variant, size, spacing, children, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
714
+ spacing?: number;
715
+ }): react_jsx_runtime.JSX.Element;
716
+ declare function ToggleGroupItem({ className, children, variant, size, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
717
+
717
718
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AutosizeTextAreaRef, AutosizeTextarea, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Combobox, ComboboxInner, type ComboboxOption, type ComboboxRef, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DebouncedInput, type DebouncedInputProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DragAndDropFileUpload, type DragAndDropFileUploadProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, type Option, PREDEFINED_RANGES, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Switch, TZDateRange, Tabs, TabsContent, TabsList, type TabsProps, TabsTrigger, TagsInput, TagsInputClear, TagsInputInput, TagsInputItem, TagsInputLabel, TagsInputList, Textarea, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipCore, TooltipProvider, TooltipTrigger, Typography, badgeVariants, reducer, tabsVariants, toast, toggleVariants, useAutosizeTextArea, useFormField, useSidebar, useToast };
@@ -1,5 +1,5 @@
1
- import { b as Bi, S as Hi, c as Yi, d as Zn, e as Vi, f as Gi, C as Ki, G as Ui, L as qi, I as Xi, g as Zi, R as Qi, h as Ji, i as el, j as tl, k as nl, l as al, m as rl, n as ol, P as sl, o as il } from "../Carousel.js";
2
- import { af as kg, ai as _g, ag as Og, ah as Ig, A as Ag, am as jg, an as Wg, aw as Lg, ax as zg, ar as Fg, av as $g, at as Bg, as as Hg, ap as Yg, ao as Vg, au as Gg, aq as Kg, al as Ug, O as qg, B as Xg, a_ as Zg, a$ as Qg, b0 as Jg, b2 as eb, b1 as tb, aJ as nb, aI as ab, a5 as rb, a6 as ob, a9 as sb, aa as ib, a7 as lb, ab as cb, a8 as ub, ad as db, ac as fb, D as mb, Q as hb, W as pb, U as gb, $ as bb, V as vb, Y as wb, a0 as yb, a4 as xb, X as Sb, Z as Mb, _ as Cb, a1 as Nb, a2 as Pb, a3 as Db, T as Tb, aL as Eb, aN as Rb, aO as kb, aP as _b, F as Ob, aM as Ib, a as Ab, p as jb, q as Wb, r as Lb, t as zb, s as Fb, v as $b, N as Bb, ay as Hb, aC as Yb, az as Vb, aE as Gb, aD as Kb, aH as Ub, aG as qb, aF as Xb, aB as Zb, aA as Qb, z as Jb, K as ev, H as tv, E as nv, x as av, w as rv, J as ov, y as sv, aQ as iv, aV as lv, aT as cv, aU as uv, aR as dv, aS as fv, aW as mv, aY as hv, aZ as pv, ae as gv, aj as bv, ak as vv, aX as wv, M as yv, aK as xv } from "../Carousel.js";
1
+ import { b as Bi, S as Hi, c as Yi, d as Zn, e as Vi, f as Gi, C as Ki, G as Ui, L as qi, I as Xi, g as Zi, R as Qi, h as Ji, i as el, j as tl, k as nl, l as al, m as rl, n as ol, P as sl, o as il } from "../ToggleGroup.js";
2
+ import { af as kg, ai as _g, ag as Og, ah as Ig, A as Ag, am as jg, an as Wg, aw as Lg, ax as zg, ar as Fg, av as $g, at as Bg, as as Hg, ap as Yg, ao as Vg, au as Gg, aq as Kg, al as Ug, O as qg, B as Xg, aW as Zg, aX as Qg, aY as Jg, a_ as eb, aZ as tb, aJ as nb, aI as ab, a5 as rb, a6 as ob, a9 as sb, aa as ib, a7 as lb, ab as cb, a8 as ub, ad as db, ac as fb, D as mb, Q as hb, W as pb, U as gb, $ as bb, V as vb, Y as wb, a0 as yb, a4 as xb, X as Sb, Z as Mb, _ as Cb, a1 as Nb, a2 as Pb, a3 as Db, T as Tb, aL as Eb, aN as Rb, aO as kb, aP as _b, F as Ob, aM as Ib, a as Ab, p as jb, q as Wb, r as Lb, t as zb, s as Fb, v as $b, N as Bb, ay as Hb, aC as Yb, az as Vb, aE as Gb, aD as Kb, aH as Ub, aG as qb, aF as Xb, aB as Zb, aA as Qb, z as Jb, K as ev, H as tv, E as nv, x as av, w as rv, J as ov, y as sv, aQ as iv, aV as lv, aT as cv, aU as uv, aR as dv, aS as fv, a$ as mv, b1 as hv, b2 as pv, ae as gv, aj as bv, ak as vv, b0 as wv, M as yv, aK as xv } from "../ToggleGroup.js";
3
3
  import { f as P, U as An, B as Ue, Z as ll, _ as cl, X as $t, $ as ul, a0 as dl, c as Qe, P as ne, y as Se, Q as tn, n as Qn, u as he, ab as fl, V as rr, a as It, q as dt, b as F, ac as ml, K as hl, G as pl, g as ft, ad as gl, I as bl, ae as vl, af as wl, ag as yl, a2 as mt, a3 as jn, H as Jn, e as xl, d as Sl, p as or, v as Ml, x as Cl, L as Mn, o as sr, A as Nl, t as Pl, w as Dl, z as Tl, J as El, a4 as Rl, a5 as kl } from "../Stack.js";
4
4
  import { ak as Mv, aj as Cv, a7 as Nv, a6 as Pv, a8 as Dv, M as Tv, am as Ev, N as Rv, ar as kv, ap as _v, ao as Ov, aa as Iv, a9 as Av, aq as jv, an as Wv, a1 as Lv, al as zv, ah as Fv, ai as $v, T as Bv, Y as Hv } from "../Stack.js";
5
5
  import { j as u, o as ir, C as nn, b as _l, p as Ol, d as lr, q as Il, M as cr, a as Al, S as jl, r as Wl, s as Ll, F as zl } from "../index2.js";
@@ -0,0 +1,274 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../shadcn";
3
+ import { Card, CardContent } from "../card/Card";
4
+
5
+ const meta: Meta<typeof Carousel> = {
6
+ title: "Shadcn/Components/Carousel",
7
+ component: Carousel,
8
+ };
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof Carousel>;
12
+
13
+ export const Default: Story = {
14
+ render: () => (
15
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
16
+ <div className="al-w-full al-max-w-xs">
17
+ <Carousel>
18
+ <CarouselContent>
19
+ {Array.from({ length: 5 }).map((_, index) => (
20
+ <CarouselItem key={index}>
21
+ <div className="al-p-1">
22
+ <Card>
23
+ <CardContent className="al-flex al-aspect-square al-items-center al-justify-center al-p-6">
24
+ <span className="al-text-4xl al-font-semibold">{index + 1}</span>
25
+ </CardContent>
26
+ </Card>
27
+ </div>
28
+ </CarouselItem>
29
+ ))}
30
+ </CarouselContent>
31
+ <CarouselPrevious />
32
+ <CarouselNext />
33
+ </Carousel>
34
+ </div>
35
+ </div>
36
+ ),
37
+ };
38
+
39
+ export const WithMultipleItems: Story = {
40
+ render: () => (
41
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
42
+ <div className="al-w-full al-max-w-sm">
43
+ <Carousel
44
+ opts={{
45
+ align: "start",
46
+ }}
47
+ >
48
+ <CarouselContent>
49
+ {Array.from({ length: 10 }).map((_, index) => (
50
+ <CarouselItem key={index} className="al-basis-1/3">
51
+ <div className="al-p-1">
52
+ <Card>
53
+ <CardContent className="al-flex al-aspect-square al-items-center al-justify-center al-p-6">
54
+ <span className="al-text-2xl al-font-semibold">{index + 1}</span>
55
+ </CardContent>
56
+ </Card>
57
+ </div>
58
+ </CarouselItem>
59
+ ))}
60
+ </CarouselContent>
61
+ <CarouselPrevious />
62
+ <CarouselNext />
63
+ </Carousel>
64
+ </div>
65
+ </div>
66
+ ),
67
+ };
68
+
69
+ export const WithLoop: Story = {
70
+ render: () => (
71
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
72
+ <div className="al-w-full al-max-w-xs">
73
+ <Carousel
74
+ opts={{
75
+ loop: true,
76
+ }}
77
+ >
78
+ <CarouselContent>
79
+ {Array.from({ length: 5 }).map((_, index) => (
80
+ <CarouselItem key={index}>
81
+ <div className="al-p-1">
82
+ <Card>
83
+ <CardContent className="al-flex al-aspect-square al-items-center al-justify-center al-p-6">
84
+ <span className="al-text-4xl al-font-semibold">{index + 1}</span>
85
+ </CardContent>
86
+ </Card>
87
+ </div>
88
+ </CarouselItem>
89
+ ))}
90
+ </CarouselContent>
91
+ <CarouselPrevious />
92
+ <CarouselNext />
93
+ </Carousel>
94
+ </div>
95
+ </div>
96
+ ),
97
+ };
98
+
99
+ export const Vertical: Story = {
100
+ render: () => (
101
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
102
+ <Carousel orientation="vertical" className="al-w-full al-max-w-xs">
103
+ <CarouselContent className="al-h-[200px]">
104
+ {Array.from({ length: 5 }).map((_, index) => (
105
+ <CarouselItem key={index}>
106
+ <div className="al-p-1">
107
+ <Card>
108
+ <CardContent className="al-flex al-items-center al-justify-center al-p-6">
109
+ <span className="al-text-3xl al-font-semibold">{index + 1}</span>
110
+ </CardContent>
111
+ </Card>
112
+ </div>
113
+ </CarouselItem>
114
+ ))}
115
+ </CarouselContent>
116
+ <CarouselPrevious />
117
+ <CarouselNext />
118
+ </Carousel>
119
+ </div>
120
+ ),
121
+ };
122
+
123
+ export const WithVariableWidths: Story = {
124
+ render: () => (
125
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
126
+ <div className="al-w-full al-max-w-md">
127
+ <Carousel
128
+ opts={{
129
+ align: "start",
130
+ }}
131
+ >
132
+ <CarouselContent>
133
+ {Array.from({ length: 8 }).map((_, index) => (
134
+ <CarouselItem
135
+ key={index}
136
+ className={index % 2 === 0 ? "al-basis-1/2" : "al-basis-1/3"}
137
+ >
138
+ <div className="al-p-1">
139
+ <Card>
140
+ <CardContent className="al-flex al-aspect-square al-items-center al-justify-center al-p-6">
141
+ <span className="al-text-2xl al-font-semibold">{index + 1}</span>
142
+ </CardContent>
143
+ </Card>
144
+ </div>
145
+ </CarouselItem>
146
+ ))}
147
+ </CarouselContent>
148
+ <CarouselPrevious />
149
+ <CarouselNext />
150
+ </Carousel>
151
+ </div>
152
+ </div>
153
+ ),
154
+ };
155
+
156
+ export const Images: Story = {
157
+ render: () => (
158
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
159
+ <div className="al-w-full al-max-w-lg">
160
+ <Carousel>
161
+ <CarouselContent>
162
+ {Array.from({ length: 5 }).map((_, index) => (
163
+ <CarouselItem key={index}>
164
+ <div className="al-p-1">
165
+ <Card>
166
+ <CardContent className="al-flex al-aspect-video al-items-center al-justify-center al-p-0">
167
+ <div className="al-flex al-h-full al-w-full al-items-center al-justify-center al-bg-muted">
168
+ <span className="al-text-2xl al-font-semibold al-text-muted-foreground">
169
+ Image {index + 1}
170
+ </span>
171
+ </div>
172
+ </CardContent>
173
+ </Card>
174
+ </div>
175
+ </CarouselItem>
176
+ ))}
177
+ </CarouselContent>
178
+ <CarouselPrevious />
179
+ <CarouselNext />
180
+ </Carousel>
181
+ </div>
182
+ </div>
183
+ ),
184
+ };
185
+
186
+ export const WithContent: Story = {
187
+ render: () => (
188
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
189
+ <div className="al-w-full al-max-w-md">
190
+ <Carousel>
191
+ <CarouselContent>
192
+ {[
193
+ { title: "First Slide", description: "This is the first slide content" },
194
+ { title: "Second Slide", description: "This is the second slide content" },
195
+ { title: "Third Slide", description: "This is the third slide content" },
196
+ { title: "Fourth Slide", description: "This is the fourth slide content" },
197
+ { title: "Fifth Slide", description: "This is the fifth slide content" },
198
+ ].map((slide, index) => (
199
+ <CarouselItem key={index}>
200
+ <div className="al-p-1">
201
+ <Card>
202
+ <CardContent className="al-flex al-flex-col al-items-center al-justify-center al-space-y-2 al-p-6">
203
+ <h3 className="al-text-2xl al-font-bold">{slide.title}</h3>
204
+ <p className="al-text-center al-text-muted-foreground">{slide.description}</p>
205
+ </CardContent>
206
+ </Card>
207
+ </div>
208
+ </CarouselItem>
209
+ ))}
210
+ </CarouselContent>
211
+ <CarouselPrevious />
212
+ <CarouselNext />
213
+ </Carousel>
214
+ </div>
215
+ </div>
216
+ ),
217
+ };
218
+
219
+ export const CustomButtonVariant: Story = {
220
+ render: () => (
221
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
222
+ <div className="al-w-full al-max-w-xs">
223
+ <Carousel>
224
+ <CarouselContent>
225
+ {Array.from({ length: 5 }).map((_, index) => (
226
+ <CarouselItem key={index}>
227
+ <div className="al-p-1">
228
+ <Card>
229
+ <CardContent className="al-flex al-aspect-square al-items-center al-justify-center al-p-6">
230
+ <span className="al-text-4xl al-font-semibold">{index + 1}</span>
231
+ </CardContent>
232
+ </Card>
233
+ </div>
234
+ </CarouselItem>
235
+ ))}
236
+ </CarouselContent>
237
+ <CarouselPrevious variant="default" />
238
+ <CarouselNext variant="default" />
239
+ </Carousel>
240
+ </div>
241
+ </div>
242
+ ),
243
+ };
244
+
245
+ export const AutoplayExample: Story = {
246
+ render: () => (
247
+ <div className="al-flex al-items-center al-justify-center al-w-full al-h-screen">
248
+ <div className="al-w-full al-max-w-xs">
249
+ <Carousel
250
+ opts={{
251
+ align: "start",
252
+ loop: true,
253
+ }}
254
+ >
255
+ <CarouselContent>
256
+ {Array.from({ length: 5 }).map((_, index) => (
257
+ <CarouselItem key={index}>
258
+ <div className="al-p-1">
259
+ <Card>
260
+ <CardContent className="al-flex al-aspect-square al-items-center al-justify-center al-p-6">
261
+ <span className="al-text-4xl al-font-semibold">{index + 1}</span>
262
+ </CardContent>
263
+ </Card>
264
+ </div>
265
+ </CarouselItem>
266
+ ))}
267
+ </CarouselContent>
268
+ <CarouselPrevious />
269
+ <CarouselNext />
270
+ </Carousel>
271
+ </div>
272
+ </div>
273
+ ),
274
+ };
@@ -0,0 +1,106 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { Toggle } from "../shadcn";
3
+ import { IconBold, IconItalic, IconUnderline, IconAlignLeft } from "@tabler/icons-react";
4
+
5
+ const meta: Meta<typeof Toggle> = {
6
+ title: "Shadcn/Components/Toggle",
7
+ component: Toggle,
8
+ args: {
9
+ "aria-label": "Toggle demo",
10
+ },
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof Toggle>;
15
+
16
+ export const Default: Story = {
17
+ render: () => (
18
+ <Toggle>
19
+ <IconBold className="al-size-4" />
20
+ </Toggle>
21
+ ),
22
+ };
23
+
24
+ export const WithText: Story = {
25
+ render: () => (
26
+ <Toggle>
27
+ <IconBold className="al-size-4" />
28
+ <span>Bold</span>
29
+ </Toggle>
30
+ ),
31
+ };
32
+
33
+ export const Outline: Story = {
34
+ render: () => (
35
+ <Toggle variant="outline">
36
+ <IconItalic className="al-size-4" />
37
+ </Toggle>
38
+ ),
39
+ };
40
+
41
+ export const Disabled: Story = {
42
+ render: () => (
43
+ <Toggle disabled>
44
+ <IconUnderline className="al-size-4" />
45
+ </Toggle>
46
+ ),
47
+ };
48
+
49
+ export const DisabledPressed: Story = {
50
+ render: () => (
51
+ <Toggle disabled defaultPressed>
52
+ <IconBold className="al-size-4" />
53
+ </Toggle>
54
+ ),
55
+ };
56
+
57
+ export const Small: Story = {
58
+ render: () => (
59
+ <Toggle size="sm">
60
+ <IconBold className="al-size-4" />
61
+ </Toggle>
62
+ ),
63
+ };
64
+
65
+ export const Large: Story = {
66
+ render: () => (
67
+ <Toggle size="lg">
68
+ <IconBold className="al-size-4" />
69
+ </Toggle>
70
+ ),
71
+ };
72
+
73
+ export const FormattingToolbar: Story = {
74
+ render: () => (
75
+ <div className="al-flex al-gap-2">
76
+ <Toggle aria-label="Toggle bold">
77
+ <IconBold className="al-size-4" />
78
+ </Toggle>
79
+ <Toggle aria-label="Toggle italic">
80
+ <IconItalic className="al-size-4" />
81
+ </Toggle>
82
+ <Toggle aria-label="Toggle underline">
83
+ <IconUnderline className="al-size-4" />
84
+ </Toggle>
85
+ <Toggle aria-label="Toggle align left">
86
+ <IconAlignLeft className="al-size-4" />
87
+ </Toggle>
88
+ </div>
89
+ ),
90
+ };
91
+
92
+ export const OutlineVariants: Story = {
93
+ render: () => (
94
+ <div className="al-flex al-gap-2">
95
+ <Toggle variant="outline" size="sm" aria-label="Toggle bold small">
96
+ <IconBold className="al-size-4" />
97
+ </Toggle>
98
+ <Toggle variant="outline" aria-label="Toggle bold default">
99
+ <IconBold className="al-size-4" />
100
+ </Toggle>
101
+ <Toggle variant="outline" size="lg" aria-label="Toggle bold large">
102
+ <IconBold className="al-size-4" />
103
+ </Toggle>
104
+ </div>
105
+ ),
106
+ };
@@ -0,0 +1,178 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { ToggleGroup, ToggleGroupItem } from "../shadcn";
3
+ import {
4
+ IconBold,
5
+ IconItalic,
6
+ IconUnderline,
7
+ IconAlignLeft,
8
+ IconAlignCenter,
9
+ IconAlignRight,
10
+ } from "@tabler/icons-react";
11
+
12
+ const meta: Meta<typeof ToggleGroup> = {
13
+ title: "Shadcn/Components/ToggleGroup",
14
+ component: ToggleGroup,
15
+ };
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof ToggleGroup>;
19
+
20
+ export const Default: Story = {
21
+ render: () => (
22
+ <ToggleGroup type="single">
23
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
24
+ <IconBold className="al-size-4" />
25
+ </ToggleGroupItem>
26
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
27
+ <IconItalic className="al-size-4" />
28
+ </ToggleGroupItem>
29
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
30
+ <IconUnderline className="al-size-4" />
31
+ </ToggleGroupItem>
32
+ </ToggleGroup>
33
+ ),
34
+ };
35
+
36
+ export const Multiple: Story = {
37
+ render: () => (
38
+ <ToggleGroup type="multiple">
39
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
40
+ <IconBold className="al-size-4" />
41
+ </ToggleGroupItem>
42
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
43
+ <IconItalic className="al-size-4" />
44
+ </ToggleGroupItem>
45
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
46
+ <IconUnderline className="al-size-4" />
47
+ </ToggleGroupItem>
48
+ </ToggleGroup>
49
+ ),
50
+ };
51
+
52
+ export const Outline: Story = {
53
+ render: () => (
54
+ <ToggleGroup type="single" variant="outline">
55
+ <ToggleGroupItem value="left" aria-label="Align left">
56
+ <IconAlignLeft className="al-size-4" />
57
+ </ToggleGroupItem>
58
+ <ToggleGroupItem value="center" aria-label="Align center">
59
+ <IconAlignCenter className="al-size-4" />
60
+ </ToggleGroupItem>
61
+ <ToggleGroupItem value="right" aria-label="Align right">
62
+ <IconAlignRight className="al-size-4" />
63
+ </ToggleGroupItem>
64
+ </ToggleGroup>
65
+ ),
66
+ };
67
+
68
+ export const Small: Story = {
69
+ render: () => (
70
+ <ToggleGroup type="single" size="sm">
71
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
72
+ <IconBold className="al-size-4" />
73
+ </ToggleGroupItem>
74
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
75
+ <IconItalic className="al-size-4" />
76
+ </ToggleGroupItem>
77
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
78
+ <IconUnderline className="al-size-4" />
79
+ </ToggleGroupItem>
80
+ </ToggleGroup>
81
+ ),
82
+ };
83
+
84
+ export const Large: Story = {
85
+ render: () => (
86
+ <ToggleGroup type="single" size="lg">
87
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
88
+ <IconBold className="al-size-4" />
89
+ </ToggleGroupItem>
90
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
91
+ <IconItalic className="al-size-4" />
92
+ </ToggleGroupItem>
93
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
94
+ <IconUnderline className="al-size-4" />
95
+ </ToggleGroupItem>
96
+ </ToggleGroup>
97
+ ),
98
+ };
99
+
100
+ export const WithText: Story = {
101
+ render: () => (
102
+ <ToggleGroup type="single" variant="outline">
103
+ <ToggleGroupItem value="left" aria-label="Align left">
104
+ <IconAlignLeft className="al-size-4" />
105
+ <span>Left</span>
106
+ </ToggleGroupItem>
107
+ <ToggleGroupItem value="center" aria-label="Align center">
108
+ <IconAlignCenter className="al-size-4" />
109
+ <span>Center</span>
110
+ </ToggleGroupItem>
111
+ <ToggleGroupItem value="right" aria-label="Align right">
112
+ <IconAlignRight className="al-size-4" />
113
+ <span>Right</span>
114
+ </ToggleGroupItem>
115
+ </ToggleGroup>
116
+ ),
117
+ };
118
+
119
+ export const Disabled: Story = {
120
+ render: () => (
121
+ <ToggleGroup type="single">
122
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
123
+ <IconBold className="al-size-4" />
124
+ </ToggleGroupItem>
125
+ <ToggleGroupItem value="italic" aria-label="Toggle italic" disabled>
126
+ <IconItalic className="al-size-4" />
127
+ </ToggleGroupItem>
128
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
129
+ <IconUnderline className="al-size-4" />
130
+ </ToggleGroupItem>
131
+ </ToggleGroup>
132
+ ),
133
+ };
134
+
135
+ export const DefaultValue: Story = {
136
+ render: () => (
137
+ <ToggleGroup type="single" defaultValue="italic" variant="outline">
138
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
139
+ <IconBold className="al-size-4" />
140
+ </ToggleGroupItem>
141
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
142
+ <IconItalic className="al-size-4" />
143
+ </ToggleGroupItem>
144
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
145
+ <IconUnderline className="al-size-4" />
146
+ </ToggleGroupItem>
147
+ </ToggleGroup>
148
+ ),
149
+ };
150
+
151
+ export const FormattingToolbar: Story = {
152
+ render: () => (
153
+ <div className="al-flex al-flex-col al-gap-4">
154
+ <ToggleGroup type="multiple" variant="outline">
155
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
156
+ <IconBold className="al-size-4" />
157
+ </ToggleGroupItem>
158
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
159
+ <IconItalic className="al-size-4" />
160
+ </ToggleGroupItem>
161
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
162
+ <IconUnderline className="al-size-4" />
163
+ </ToggleGroupItem>
164
+ </ToggleGroup>
165
+ <ToggleGroup type="single" variant="outline">
166
+ <ToggleGroupItem value="left" aria-label="Align left">
167
+ <IconAlignLeft className="al-size-4" />
168
+ </ToggleGroupItem>
169
+ <ToggleGroupItem value="center" aria-label="Align center">
170
+ <IconAlignCenter className="al-size-4" />
171
+ </ToggleGroupItem>
172
+ <ToggleGroupItem value="right" aria-label="Align right">
173
+ <IconAlignRight className="al-size-4" />
174
+ </ToggleGroupItem>
175
+ </ToggleGroup>
176
+ </div>
177
+ ),
178
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.64-beta7",
3
+ "version": "0.0.65",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"