@a2v2ai/uikit 0.0.36 → 0.0.38

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.
Files changed (185) hide show
  1. package/Alert/Alert.stories.tsx +121 -0
  2. package/Alert/Alert.tsx +71 -0
  3. package/AlertDialog/AlertDialog.stories.tsx +665 -0
  4. package/AlertDialog/AlertDialog.tsx +241 -0
  5. package/Avatar/Avatar.stories.tsx +128 -0
  6. package/Avatar/Avatar.tsx +71 -0
  7. package/Badge/Badge.stories.tsx +76 -0
  8. package/Badge/Badge.tsx +39 -0
  9. package/Breadcrumb/Breadcrumb.stories.tsx +231 -0
  10. package/Breadcrumb/Breadcrumb.tsx +114 -0
  11. package/Button/Button.stories.tsx +684 -0
  12. package/Button/Button.tsx +107 -0
  13. package/Calendar/Calendar.stories.tsx +291 -0
  14. package/Calendar/Calendar.tsx +246 -0
  15. package/Card/Card.stories.tsx +136 -0
  16. package/Card/Card.tsx +96 -0
  17. package/Carousel/Carousel.stories.tsx +256 -0
  18. package/Carousel/Carousel.tsx +301 -0
  19. package/ChatBubble/ChatBubble.stories.tsx +339 -0
  20. package/ChatBubble/ChatBubble.tsx +179 -0
  21. package/Checkbox/Checkbox.stories.tsx +137 -0
  22. package/Checkbox/Checkbox.tsx +53 -0
  23. package/DataTable/DataTable.stories.tsx +400 -0
  24. package/DataTable/DataTable.tsx +207 -0
  25. package/Drawer/Drawer.stories.tsx +721 -0
  26. package/Drawer/Drawer.tsx +201 -0
  27. package/DropdownMenu/DropdownMenu.stories.tsx +251 -0
  28. package/DropdownMenu/DropdownMenu.tsx +199 -0
  29. package/ErrorMessage/ErrorMessage.stories.tsx +159 -0
  30. package/ErrorMessage/ErrorMessage.tsx +55 -0
  31. package/Flex/Flex.stories.tsx +390 -0
  32. package/Flex/Flex.tsx +102 -0
  33. package/IconButton/IconButton.stories.tsx +566 -0
  34. package/IconButton/IconButton.tsx +95 -0
  35. package/Input/Input.stories.tsx +566 -0
  36. package/Input/Input.tsx +168 -0
  37. package/InputOTP/InputOTP.stories.tsx +246 -0
  38. package/InputOTP/InputOTP.tsx +127 -0
  39. package/Label/Label.stories.tsx +110 -0
  40. package/Label/Label.tsx +44 -0
  41. package/Loader/Loader.stories.tsx +170 -0
  42. package/Loader/Loader.tsx +62 -0
  43. package/Menubar/Menubar.stories.tsx +382 -0
  44. package/Menubar/Menubar.tsx +274 -0
  45. package/Menubar/index.ts +18 -0
  46. package/Pagination/Pagination.stories.tsx +196 -0
  47. package/Pagination/Pagination.tsx +122 -0
  48. package/Popover/Popover.stories.tsx +133 -0
  49. package/Popover/Popover.tsx +31 -0
  50. package/Progress/Progress.stories.tsx +146 -0
  51. package/Progress/Progress.tsx +67 -0
  52. package/RadioGroup/RadioGroup.stories.tsx +159 -0
  53. package/RadioGroup/RadioGroup.tsx +68 -0
  54. package/ScrollArea/ScrollArea.stories.tsx +136 -0
  55. package/ScrollArea/ScrollArea.tsx +46 -0
  56. package/Select/Select.stories.tsx +378 -0
  57. package/Select/Select.tsx +230 -0
  58. package/Separator/Separator.stories.tsx +110 -0
  59. package/Separator/Separator.tsx +29 -0
  60. package/Sidebar/Sidebar.stories.tsx +340 -0
  61. package/Sidebar/Sidebar.tsx +414 -0
  62. package/Sidebar/index.ts +28 -0
  63. package/Skeleton/Skeleton.stories.tsx +117 -0
  64. package/Skeleton/Skeleton.tsx +16 -0
  65. package/Slider/Slider.stories.tsx +216 -0
  66. package/Slider/Slider.tsx +29 -0
  67. package/Spinner/Spinner.stories.tsx +210 -0
  68. package/Spinner/Spinner.tsx +78 -0
  69. package/Switch/Switch.stories.tsx +146 -0
  70. package/Switch/Switch.tsx +59 -0
  71. package/Table/Table.stories.tsx +510 -0
  72. package/Table/Table.tsx +114 -0
  73. package/Tabs/Tabs.stories.tsx +197 -0
  74. package/Tabs/Tabs.tsx +74 -0
  75. package/Textarea/Textarea.stories.tsx +187 -0
  76. package/Textarea/Textarea.tsx +73 -0
  77. package/Toast/Toast.stories.tsx +285 -0
  78. package/Toast/Toast.tsx +59 -0
  79. package/Tooltip/Tooltip.stories.tsx +463 -0
  80. package/Tooltip/Tooltip.tsx +96 -0
  81. package/Typography/Typography.stories.tsx +425 -0
  82. package/Typography/Typography.tsx +106 -0
  83. package/helpers.ts +5 -0
  84. package/{icons.js → icons.ts} +1 -1
  85. package/index.ts +217 -0
  86. package/lib/typography-types.ts +223 -0
  87. package/lib/utils.ts +15 -0
  88. package/package.json +36 -33
  89. package/tsconfig.json +22 -0
  90. package/Alert/Alert.d.ts +0 -13
  91. package/Alert/Alert.js +0 -25
  92. package/AlertDialog/AlertDialog.d.ts +0 -43
  93. package/AlertDialog/AlertDialog.js +0 -71
  94. package/Avatar/Avatar.d.ts +0 -14
  95. package/Avatar/Avatar.js +0 -25
  96. package/Badge/Badge.d.ts +0 -11
  97. package/Badge/Badge.js +0 -23
  98. package/Breadcrumb/Breadcrumb.d.ts +0 -19
  99. package/Breadcrumb/Breadcrumb.js +0 -23
  100. package/Button/Button.d.ts +0 -23
  101. package/Button/Button.js +0 -52
  102. package/Calendar/Calendar.d.ts +0 -20
  103. package/Calendar/Calendar.js +0 -78
  104. package/Card/Card.d.ts +0 -16
  105. package/Card/Card.js +0 -28
  106. package/Carousel/Carousel.d.ts +0 -37
  107. package/Carousel/Carousel.js +0 -132
  108. package/ChatBubble/ChatBubble.d.ts +0 -33
  109. package/ChatBubble/ChatBubble.js +0 -107
  110. package/Checkbox/Checkbox.d.ts +0 -12
  111. package/Checkbox/Checkbox.js +0 -20
  112. package/DataTable/DataTable.d.ts +0 -35
  113. package/DataTable/DataTable.js +0 -51
  114. package/Dialog/Dialog.d.ts +0 -35
  115. package/Dialog/Dialog.js +0 -130
  116. package/Drawer/Drawer.d.ts +0 -33
  117. package/Drawer/Drawer.js +0 -55
  118. package/DropdownMenu/DropdownMenu.d.ts +0 -27
  119. package/DropdownMenu/DropdownMenu.js +0 -35
  120. package/ErrorMessage/ErrorMessage.d.ts +0 -27
  121. package/ErrorMessage/ErrorMessage.js +0 -14
  122. package/Flex/Flex.d.ts +0 -31
  123. package/Flex/Flex.js +0 -64
  124. package/IconButton/IconButton.d.ts +0 -23
  125. package/IconButton/IconButton.js +0 -48
  126. package/Input/Input.d.ts +0 -27
  127. package/Input/Input.js +0 -42
  128. package/InputOTP/InputOTP.d.ts +0 -20
  129. package/InputOTP/InputOTP.js +0 -44
  130. package/Label/Label.d.ts +0 -13
  131. package/Label/Label.js +0 -19
  132. package/Loader/Loader.d.ts +0 -21
  133. package/Loader/Loader.js +0 -30
  134. package/Menubar/Menubar.d.ts +0 -26
  135. package/Menubar/Menubar.js +0 -54
  136. package/Menubar/index.d.ts +0 -1
  137. package/Menubar/index.js +0 -1
  138. package/Pagination/Pagination.d.ts +0 -35
  139. package/Pagination/Pagination.js +0 -37
  140. package/Popover/Popover.d.ts +0 -7
  141. package/Popover/Popover.js +0 -10
  142. package/Progress/Progress.d.ts +0 -17
  143. package/Progress/Progress.js +0 -33
  144. package/RadioGroup/RadioGroup.d.ts +0 -13
  145. package/RadioGroup/RadioGroup.js +0 -26
  146. package/ScrollArea/ScrollArea.d.ts +0 -5
  147. package/ScrollArea/ScrollArea.js +0 -11
  148. package/Select/Select.d.ts +0 -29
  149. package/Select/Select.js +0 -50
  150. package/Separator/Separator.d.ts +0 -4
  151. package/Separator/Separator.js +0 -7
  152. package/Sidebar/Sidebar.d.ts +0 -48
  153. package/Sidebar/Sidebar.js +0 -116
  154. package/Sidebar/index.d.ts +0 -2
  155. package/Sidebar/index.js +0 -1
  156. package/Skeleton/Skeleton.d.ts +0 -4
  157. package/Skeleton/Skeleton.js +0 -7
  158. package/Slider/Slider.d.ts +0 -6
  159. package/Slider/Slider.js +0 -7
  160. package/Spinner/Spinner.d.ts +0 -19
  161. package/Spinner/Spinner.js +0 -31
  162. package/Switch/Switch.d.ts +0 -12
  163. package/Switch/Switch.js +0 -30
  164. package/Table/Table.d.ts +0 -10
  165. package/Table/Table.js +0 -20
  166. package/Tabs/Tabs.d.ts +0 -15
  167. package/Tabs/Tabs.js +0 -24
  168. package/Textarea/Textarea.d.ts +0 -19
  169. package/Textarea/Textarea.js +0 -31
  170. package/Toast/Toast.d.ts +0 -12
  171. package/Toast/Toast.js +0 -25
  172. package/Tooltip/Tooltip.d.ts +0 -17
  173. package/Tooltip/Tooltip.js +0 -29
  174. package/Typography/Typography.d.ts +0 -20
  175. package/Typography/Typography.js +0 -43
  176. package/helpers.d.ts +0 -4
  177. package/helpers.js +0 -5
  178. package/icons.d.ts +0 -1
  179. package/index.d.ts +0 -42
  180. package/index.js +0 -45
  181. package/lib/typography-types.d.ts +0 -4
  182. package/lib/typography-types.js +0 -90
  183. package/lib/utils.d.ts +0 -3
  184. package/lib/utils.js +0 -14
  185. package/tmpclaude-2407-cwd +0 -1
@@ -0,0 +1,136 @@
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import { Button } from "../Button/Button"
4
+ import { Input } from "../Input/Input"
5
+ import { Label } from "../Label/Label"
6
+ import { Flex } from "../Flex/Flex"
7
+ import { Typography } from "../Typography/Typography"
8
+ import { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from "./Card"
9
+
10
+ const meta: Meta<typeof Card> = {
11
+ title: "Components/Card",
12
+ component: Card,
13
+ parameters: {
14
+ layout: "centered",
15
+ },
16
+ argTypes: {
17
+ variant: {
18
+ control: "select",
19
+ options: ["default", "outline"],
20
+ description: "The visual variant of the card",
21
+ },
22
+ },
23
+ tags: ["autodocs"],
24
+ }
25
+
26
+ export default meta
27
+ type Story = StoryObj<typeof meta>
28
+
29
+ export const Default: Story = {
30
+ render: () => (
31
+ <Card className="w-[350px]">
32
+ <CardHeader>
33
+ <CardTitle>Card Title</CardTitle>
34
+ <CardDescription>Card Description</CardDescription>
35
+ </CardHeader>
36
+ <CardContent>
37
+ <p>Card Content</p>
38
+ </CardContent>
39
+ <CardFooter>
40
+ <p>Card Footer</p>
41
+ </CardFooter>
42
+ </Card>
43
+ ),
44
+ }
45
+
46
+ export const Outline: Story = {
47
+ render: () => (
48
+ <Card variant="outline" className="w-[350px]">
49
+ <CardHeader>
50
+ <CardTitle>Outline Card</CardTitle>
51
+ <CardDescription>This card has no shadow</CardDescription>
52
+ </CardHeader>
53
+ <CardContent>
54
+ <p>Card content goes here.</p>
55
+ </CardContent>
56
+ </Card>
57
+ ),
58
+ }
59
+
60
+ export const WithForm: Story = {
61
+ render: () => (
62
+ <Card className="w-[350px]">
63
+ <CardHeader>
64
+ <CardTitle>Create project</CardTitle>
65
+ <CardDescription>Deploy your new project in one-click.</CardDescription>
66
+ </CardHeader>
67
+ <CardContent>
68
+ <form>
69
+ <Flex gap={4}>
70
+ <Flex gap={2}>
71
+ <Label htmlFor="name">Name</Label>
72
+ <Input id="name" placeholder="Name of your project" />
73
+ </Flex>
74
+ <Flex gap={2}>
75
+ <Label htmlFor="framework">Framework</Label>
76
+ <Input id="framework" placeholder="Select a framework" />
77
+ </Flex>
78
+ </Flex>
79
+ </form>
80
+ </CardContent>
81
+ <CardFooter className="flex justify-between">
82
+ <Button variant="outline">Cancel</Button>
83
+ <Button>Deploy</Button>
84
+ </CardFooter>
85
+ </Card>
86
+ ),
87
+ }
88
+
89
+ export const SimpleCard: Story = {
90
+ render: () => (
91
+ <Card className="w-[350px] p-6">
92
+ <Flex gap={2}>
93
+ <Typography variant="h4">Notifications</Typography>
94
+ <Typography variant="body2" color="grey-500">
95
+ You have 3 unread messages.
96
+ </Typography>
97
+ </Flex>
98
+ </Card>
99
+ ),
100
+ }
101
+
102
+ export const AllVariants: Story = {
103
+ render: () => (
104
+ <Flex gap={6}>
105
+ <Typography variant="h4" className="text-white">Card Variants</Typography>
106
+
107
+ <Flex direction="row" gap={4} wrap="wrap">
108
+ <Card className="w-[300px]">
109
+ <CardHeader>
110
+ <CardTitle>Default Card</CardTitle>
111
+ <CardDescription>With shadow</CardDescription>
112
+ </CardHeader>
113
+ <CardContent>
114
+ <p>This is the default card style with a subtle shadow.</p>
115
+ </CardContent>
116
+ <CardFooter>
117
+ <Button size="small">Action</Button>
118
+ </CardFooter>
119
+ </Card>
120
+
121
+ <Card variant="outline" className="w-[300px]">
122
+ <CardHeader>
123
+ <CardTitle>Outline Card</CardTitle>
124
+ <CardDescription>Without shadow</CardDescription>
125
+ </CardHeader>
126
+ <CardContent>
127
+ <p>This card has an outline border but no shadow.</p>
128
+ </CardContent>
129
+ <CardFooter>
130
+ <Button size="small" variant="outline">Action</Button>
131
+ </CardFooter>
132
+ </Card>
133
+ </Flex>
134
+ </Flex>
135
+ ),
136
+ }
package/Card/Card.tsx ADDED
@@ -0,0 +1,96 @@
1
+ import * as React from "react"
2
+ import { cva } from "class-variance-authority"
3
+
4
+ import { cn } from "../lib/utils"
5
+
6
+ type CardVariant = "default" | "outline"
7
+
8
+ const cardVariants = cva(
9
+ "rounded-xl border bg-white text-main-950 shadow-sm",
10
+ {
11
+ variants: {
12
+ variant: {
13
+ default: "border-grey-200",
14
+ outline: "border-grey-300 shadow-none",
15
+ },
16
+ },
17
+ defaultVariants: {
18
+ variant: "default",
19
+ },
20
+ }
21
+ )
22
+
23
+ export interface CardProps
24
+ extends React.HTMLAttributes<HTMLDivElement> {
25
+ variant?: CardVariant
26
+ }
27
+
28
+ const Card = React.forwardRef<HTMLDivElement, CardProps>(
29
+ ({ className, variant, ...props }, ref) => (
30
+ <div
31
+ ref={ref}
32
+ className={cn(cardVariants({ variant }), className)}
33
+ {...props}
34
+ />
35
+ )
36
+ )
37
+ Card.displayName = "Card"
38
+
39
+ const CardHeader = React.forwardRef<
40
+ HTMLDivElement,
41
+ React.HTMLAttributes<HTMLDivElement>
42
+ >(({ className, ...props }, ref) => (
43
+ <div
44
+ ref={ref}
45
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
46
+ {...props}
47
+ />
48
+ ))
49
+ CardHeader.displayName = "CardHeader"
50
+
51
+ const CardTitle = React.forwardRef<
52
+ HTMLDivElement,
53
+ React.HTMLAttributes<HTMLDivElement>
54
+ >(({ className, ...props }, ref) => (
55
+ <div
56
+ ref={ref}
57
+ className={cn("font-semibold leading-none tracking-tight", className)}
58
+ {...props}
59
+ />
60
+ ))
61
+ CardTitle.displayName = "CardTitle"
62
+
63
+ const CardDescription = React.forwardRef<
64
+ HTMLDivElement,
65
+ React.HTMLAttributes<HTMLDivElement>
66
+ >(({ className, ...props }, ref) => (
67
+ <div
68
+ ref={ref}
69
+ className={cn("text-sm text-grey-500", className)}
70
+ {...props}
71
+ />
72
+ ))
73
+ CardDescription.displayName = "CardDescription"
74
+
75
+ const CardContent = React.forwardRef<
76
+ HTMLDivElement,
77
+ React.HTMLAttributes<HTMLDivElement>
78
+ >(({ className, ...props }, ref) => (
79
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
80
+ ))
81
+ CardContent.displayName = "CardContent"
82
+
83
+ const CardFooter = React.forwardRef<
84
+ HTMLDivElement,
85
+ React.HTMLAttributes<HTMLDivElement>
86
+ >(({ className, ...props }, ref) => (
87
+ <div
88
+ ref={ref}
89
+ className={cn("flex items-center p-6 pt-0", className)}
90
+ {...props}
91
+ />
92
+ ))
93
+ CardFooter.displayName = "CardFooter"
94
+
95
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, cardVariants }
96
+ export type { CardVariant }
@@ -0,0 +1,256 @@
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import { Flex } from "../Flex/Flex"
3
+ import { Card, CardContent } from "../Card/Card"
4
+ import { Typography } from "../Typography/Typography"
5
+ import {
6
+ Carousel,
7
+ CarouselContent,
8
+ CarouselItem,
9
+ CarouselNext,
10
+ CarouselPrevious,
11
+ } from "./Carousel"
12
+
13
+ const meta: Meta<typeof Carousel> = {
14
+ title: "Components/Carousel",
15
+ component: Carousel,
16
+ parameters: {
17
+ layout: "centered",
18
+ },
19
+ tags: ["autodocs"],
20
+ argTypes: {
21
+ orientation: {
22
+ control: "select",
23
+ options: ["horizontal", "vertical"],
24
+ description: "The orientation of the carousel",
25
+ },
26
+ },
27
+ }
28
+
29
+ export default meta
30
+ type Story = StoryObj<typeof Carousel>
31
+
32
+ export const Default: Story = {
33
+ render: () => (
34
+ <div className="w-full max-w-xs">
35
+ <Carousel className="w-full max-w-xs">
36
+ <CarouselContent>
37
+ {Array.from({ length: 5 }).map((_, index) => (
38
+ <CarouselItem key={index}>
39
+ <div className="p-1">
40
+ <Card>
41
+ <CardContent className="flex aspect-square items-center justify-center p-6">
42
+ <Typography variant="h3">{index + 1}</Typography>
43
+ </CardContent>
44
+ </Card>
45
+ </div>
46
+ </CarouselItem>
47
+ ))}
48
+ </CarouselContent>
49
+ <CarouselPrevious />
50
+ <CarouselNext />
51
+ </Carousel>
52
+ </div>
53
+ ),
54
+ }
55
+
56
+ export const Sizes: Story = {
57
+ render: () => (
58
+ <div className="w-full max-w-sm">
59
+ <Carousel
60
+ opts={{
61
+ align: "start",
62
+ }}
63
+ className="w-full max-w-sm"
64
+ >
65
+ <CarouselContent>
66
+ {Array.from({ length: 5 }).map((_, index) => (
67
+ <CarouselItem key={index} className="md:basis-1/2 lg:basis-1/3">
68
+ <div className="p-1">
69
+ <Card>
70
+ <CardContent className="flex aspect-square items-center justify-center p-6">
71
+ <Typography variant="h3">{index + 1}</Typography>
72
+ </CardContent>
73
+ </Card>
74
+ </div>
75
+ </CarouselItem>
76
+ ))}
77
+ </CarouselContent>
78
+ <CarouselPrevious />
79
+ <CarouselNext />
80
+ </Carousel>
81
+ </div>
82
+ ),
83
+ }
84
+
85
+ export const Vertical: Story = {
86
+ render: () => (
87
+ <Carousel
88
+ opts={{
89
+ align: "start",
90
+ }}
91
+ orientation="vertical"
92
+ className="w-full max-w-xs"
93
+ >
94
+ <CarouselContent className="-mt-1 h-[200px]">
95
+ {Array.from({ length: 5 }).map((_, index) => (
96
+ <CarouselItem key={index} className="pt-1 md:basis-1/2">
97
+ <div className="p-1">
98
+ <Card>
99
+ <CardContent className="flex items-center justify-center p-6">
100
+ <Typography variant="h3">{index + 1}</Typography>
101
+ </CardContent>
102
+ </Card>
103
+ </div>
104
+ </CarouselItem>
105
+ ))}
106
+ </CarouselContent>
107
+ <CarouselPrevious />
108
+ <CarouselNext />
109
+ </Carousel>
110
+ ),
111
+ }
112
+
113
+ export const Loop: Story = {
114
+ render: () => (
115
+ <div className="w-full max-w-xs">
116
+ <Carousel
117
+ opts={{
118
+ loop: true,
119
+ }}
120
+ className="w-full max-w-xs"
121
+ >
122
+ <CarouselContent>
123
+ {Array.from({ length: 5 }).map((_, index) => (
124
+ <CarouselItem key={index}>
125
+ <div className="p-1">
126
+ <Card>
127
+ <CardContent className="flex aspect-square items-center justify-center p-6">
128
+ <Typography variant="h3">{index + 1}</Typography>
129
+ </CardContent>
130
+ </Card>
131
+ </div>
132
+ </CarouselItem>
133
+ ))}
134
+ </CarouselContent>
135
+ <CarouselPrevious />
136
+ <CarouselNext />
137
+ </Carousel>
138
+ </div>
139
+ ),
140
+ }
141
+
142
+ export const WithoutNavigation: Story = {
143
+ render: () => (
144
+ <div className="w-full max-w-xs">
145
+ <Carousel className="w-full max-w-xs">
146
+ <CarouselContent>
147
+ {Array.from({ length: 5 }).map((_, index) => (
148
+ <CarouselItem key={index}>
149
+ <div className="p-1">
150
+ <Card>
151
+ <CardContent className="flex aspect-square items-center justify-center p-6">
152
+ <Typography variant="h3">{index + 1}</Typography>
153
+ </CardContent>
154
+ </Card>
155
+ </div>
156
+ </CarouselItem>
157
+ ))}
158
+ </CarouselContent>
159
+ </Carousel>
160
+ </div>
161
+ ),
162
+ }
163
+
164
+ export const AllVariants: Story = {
165
+ parameters: {
166
+ layout: "padded",
167
+ },
168
+ render: () => (
169
+ <Flex gap={12} className="p-8">
170
+ <Flex gap={4}>
171
+ <Typography variant="subtitle1" color="main-700">
172
+ Default Carousel
173
+ </Typography>
174
+ <div className="w-full max-w-xs">
175
+ <Carousel className="w-full max-w-xs">
176
+ <CarouselContent>
177
+ {Array.from({ length: 5 }).map((_, index) => (
178
+ <CarouselItem key={index}>
179
+ <div className="p-1">
180
+ <Card>
181
+ <CardContent className="flex aspect-square items-center justify-center p-6">
182
+ <Typography variant="h3">{index + 1}</Typography>
183
+ </CardContent>
184
+ </Card>
185
+ </div>
186
+ </CarouselItem>
187
+ ))}
188
+ </CarouselContent>
189
+ <CarouselPrevious />
190
+ <CarouselNext />
191
+ </Carousel>
192
+ </div>
193
+ </Flex>
194
+
195
+ <Flex gap={4}>
196
+ <Typography variant="subtitle1" color="main-700">
197
+ Multiple Items Per View
198
+ </Typography>
199
+ <div className="w-full max-w-lg">
200
+ <Carousel
201
+ opts={{
202
+ align: "start",
203
+ }}
204
+ className="w-full"
205
+ >
206
+ <CarouselContent>
207
+ {Array.from({ length: 8 }).map((_, index) => (
208
+ <CarouselItem key={index} className="basis-1/3">
209
+ <div className="p-1">
210
+ <Card>
211
+ <CardContent className="flex aspect-square items-center justify-center p-6">
212
+ <Typography variant="h4">{index + 1}</Typography>
213
+ </CardContent>
214
+ </Card>
215
+ </div>
216
+ </CarouselItem>
217
+ ))}
218
+ </CarouselContent>
219
+ <CarouselPrevious />
220
+ <CarouselNext />
221
+ </Carousel>
222
+ </div>
223
+ </Flex>
224
+
225
+ <Flex gap={4}>
226
+ <Typography variant="subtitle1" color="main-700">
227
+ With Loop Enabled
228
+ </Typography>
229
+ <div className="w-full max-w-xs">
230
+ <Carousel
231
+ opts={{
232
+ loop: true,
233
+ }}
234
+ className="w-full max-w-xs"
235
+ >
236
+ <CarouselContent>
237
+ {Array.from({ length: 5 }).map((_, index) => (
238
+ <CarouselItem key={index}>
239
+ <div className="p-1">
240
+ <Card variant="secondary">
241
+ <CardContent className="flex aspect-square items-center justify-center p-6">
242
+ <Typography variant="h3">{index + 1}</Typography>
243
+ </CardContent>
244
+ </Card>
245
+ </div>
246
+ </CarouselItem>
247
+ ))}
248
+ </CarouselContent>
249
+ <CarouselPrevious />
250
+ <CarouselNext />
251
+ </Carousel>
252
+ </div>
253
+ </Flex>
254
+ </Flex>
255
+ ),
256
+ }