@gsk_poc/untitled-ui-base 0.1.1

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 (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -0
  3. package/components/application/app-navigation/base-components/featured-cards.demo.tsx +86 -0
  4. package/components/application/app-navigation/base-components/featured-cards.story.tsx +49 -0
  5. package/components/application/app-navigation/header-navigation.demo.tsx +59 -0
  6. package/components/application/app-navigation/header-navigation.story.tsx +23 -0
  7. package/components/application/app-navigation/sidebar-navigation.demo.tsx +409 -0
  8. package/components/application/app-navigation/sidebar-navigation.story.tsx +47 -0
  9. package/components/application/carousel/carousel.demo.tsx +107 -0
  10. package/components/application/carousel/carousel.story.tsx +21 -0
  11. package/components/application/charts/activity-gauges.demo.tsx +251 -0
  12. package/components/application/charts/activity-gauges.story.tsx +27 -0
  13. package/components/application/charts/bar-charts.demo.tsx +506 -0
  14. package/components/application/charts/bar-charts.story.tsx +36 -0
  15. package/components/application/charts/line-charts.demo.tsx +604 -0
  16. package/components/application/charts/line-charts.story.tsx +43 -0
  17. package/components/application/charts/pie-charts.demo.tsx +193 -0
  18. package/components/application/charts/pie-charts.story.tsx +30 -0
  19. package/components/application/charts/progress-circles.demo.tsx +110 -0
  20. package/components/application/charts/progress-circles.story.tsx +33 -0
  21. package/components/application/charts/radar-charts.demo.tsx +203 -0
  22. package/components/application/charts/radar-charts.story.tsx +18 -0
  23. package/components/application/date-picker/date-picker.demo.tsx +217 -0
  24. package/components/application/date-picker/date-picker.story.tsx +44 -0
  25. package/components/application/file-upload/file-upload.demo.tsx +292 -0
  26. package/components/application/file-upload/file-upload.story.tsx +70 -0
  27. package/components/application/loading-indicator/loading-indicator.demo.tsx +73 -0
  28. package/components/application/loading-indicator/loading-indicator.story.tsx +22 -0
  29. package/components/application/pagination/pagination.demo.tsx +104 -0
  30. package/components/application/pagination/pagination.story.tsx +54 -0
  31. package/components/application/table/table.demo.tsx +1038 -0
  32. package/components/application/table/table.story.tsx +119 -0
  33. package/components/application/tabs/tabs.demo.tsx +322 -0
  34. package/components/application/tabs/tabs.story.tsx +43 -0
  35. package/components/base/avatar/avatar.demo.tsx +865 -0
  36. package/components/base/avatar/avatar.story.tsx +27 -0
  37. package/components/base/badges/badge-groups.demo.tsx +357 -0
  38. package/components/base/badges/badge-groups.story.tsx +25 -0
  39. package/components/base/badges/badges.demo.tsx +497 -0
  40. package/components/base/badges/badges.story.tsx +83 -0
  41. package/components/base/button-group/button-group.demo.tsx +131 -0
  42. package/components/base/button-group/button-group.story.tsx +16 -0
  43. package/components/base/buttons/app-store-buttons.demo.tsx +129 -0
  44. package/components/base/buttons/app-store-buttons.story.tsx +13 -0
  45. package/components/base/buttons/buttons.demo.tsx +1022 -0
  46. package/components/base/buttons/buttons.story.tsx +42 -0
  47. package/components/base/buttons/social-buttons.demo.tsx +432 -0
  48. package/components/base/buttons/social-buttons.story.tsx +20 -0
  49. package/components/base/checkbox/checkbox.demo.tsx +62 -0
  50. package/components/base/checkbox/checkbox.story.tsx +18 -0
  51. package/components/base/dropdown/dropdown.demo.tsx +137 -0
  52. package/components/base/dropdown/dropdown.story.tsx +22 -0
  53. package/components/base/input/inputs.demo.tsx +758 -0
  54. package/components/base/input/inputs.story.tsx +52 -0
  55. package/components/base/pin-input/pin-input.demo.tsx +126 -0
  56. package/components/base/pin-input/pin-input.story.tsx +22 -0
  57. package/components/base/progress-indicators/progress-indicators.demo.tsx +54 -0
  58. package/components/base/progress-indicators/progress-indicators.story.tsx +57 -0
  59. package/components/base/radio-buttons/radio-buttons.demo.tsx +77 -0
  60. package/components/base/radio-buttons/radio-buttons.story.tsx +19 -0
  61. package/components/base/select/select.demo.tsx +936 -0
  62. package/components/base/select/select.story.tsx +43 -0
  63. package/components/base/slider/slider.demo.tsx +19 -0
  64. package/components/base/slider/slider.story.tsx +26 -0
  65. package/components/base/tags/tags.demo.tsx +341 -0
  66. package/components/base/tags/tags.story.tsx +28 -0
  67. package/components/base/textarea/textarea.demo.tsx +25 -0
  68. package/components/base/textarea/textarea.story.tsx +15 -0
  69. package/components/base/toggle/toggle.demo.tsx +76 -0
  70. package/components/base/toggle/toggle.story.tsx +23 -0
  71. package/components/base/tooltip/tooltip.demo.tsx +125 -0
  72. package/components/base/tooltip/tooltip.story.tsx +21 -0
  73. package/components/foundations/featured-icon/featured-icon.demo.tsx +160 -0
  74. package/components/foundations/featured-icon/featured-icon.story.tsx +25 -0
  75. package/components/shared-assets/credit-card/credit-card.demo.tsx +106 -0
  76. package/components/shared-assets/credit-card/credit-card.story.tsx +41 -0
  77. package/dist/index.d.mts +1417 -0
  78. package/dist/index.d.ts +1417 -0
  79. package/dist/index.js +10435 -0
  80. package/dist/index.js.map +1 -0
  81. package/dist/index.mjs +10345 -0
  82. package/dist/index.mjs.map +1 -0
  83. package/package.json +126 -0
  84. package/styles/globals.css +65 -0
  85. package/styles/theme.css +430 -0
  86. package/styles/tokens-mapped.css +233 -0
  87. package/styles/tokens.css +807 -0
  88. package/styles/typography.css +430 -0
  89. package/tokens/design-tokens.dtcg.json +3515 -0
@@ -0,0 +1,409 @@
1
+ "use client";
2
+
3
+ import type { FC } from "react";
4
+ import {
5
+ Archive,
6
+ BarChartSquare02,
7
+ Calendar,
8
+ CheckDone01,
9
+ ChevronRight,
10
+ ClockFastForward,
11
+ CurrencyDollarCircle,
12
+ File05,
13
+ Folder,
14
+ Grid03,
15
+ HomeLine,
16
+ Inbox01,
17
+ LayoutAlt01,
18
+ LifeBuoy01,
19
+ LineChartUp03,
20
+ MessageChatCircle,
21
+ NotificationBox,
22
+ Package,
23
+ PieChart03,
24
+ Rows01,
25
+ Settings01,
26
+ Settings03,
27
+ Star01,
28
+ Stars01,
29
+ User01,
30
+ UserSquare,
31
+ Users01,
32
+ UsersPlus,
33
+ } from "@untitledui/icons";
34
+ import { FeaturedCardProgressBar, FeaturedCardProgressCircle } from "@/components/application/app-navigation/base-components/featured-cards.demo";
35
+ import type { NavItemDividerType, NavItemType } from "@/components/application/app-navigation/config";
36
+ import { SidebarNavigationDualTier } from "@/components/application/app-navigation/sidebar-navigation/sidebar-dual-tier";
37
+ import { SidebarNavigationSectionDividers } from "@/components/application/app-navigation/sidebar-navigation/sidebar-section-dividers";
38
+ import { SidebarNavigationSectionsSubheadings } from "@/components/application/app-navigation/sidebar-navigation/sidebar-sections-subheadings";
39
+ import { SidebarNavigationSimple } from "@/components/application/app-navigation/sidebar-navigation/sidebar-simple";
40
+ import { SidebarNavigationSlim } from "@/components/application/app-navigation/sidebar-navigation/sidebar-slim";
41
+ import { Avatar } from "@/components/base/avatar/avatar";
42
+ import { Badge, BadgeWithDot } from "@/components/base/badges/badges";
43
+
44
+ const navItemsSimple: NavItemType[] = [
45
+ {
46
+ label: "Home",
47
+ href: "/",
48
+ icon: HomeLine,
49
+ items: [
50
+ { label: "Overview", href: "/overview", icon: Grid03 },
51
+ { label: "Products", href: "/products", icon: Package },
52
+ { label: "Orders", href: "/orders", icon: CurrencyDollarCircle },
53
+ { label: "Customers", href: "/customers", icon: Users01 },
54
+ ],
55
+ },
56
+ {
57
+ label: "Dashboard",
58
+ href: "/dashboard",
59
+ icon: BarChartSquare02,
60
+ items: [
61
+ { label: "Overview", href: "/dashboard/overview", icon: Grid03 },
62
+ { label: "Notifications", href: "/dashboard/notifications", icon: NotificationBox, badge: 10 },
63
+ { label: "Analytics", href: "/dashboard/analytics", icon: LineChartUp03 },
64
+ { label: "Saved reports", href: "/dashboard/saved-reports", icon: Star01 },
65
+ ],
66
+ },
67
+ {
68
+ label: "Projects",
69
+ href: "/projects",
70
+ icon: Rows01,
71
+ items: [
72
+ { label: "View all", href: "/projects/all", icon: Rows01 },
73
+ { label: "Personal", href: "/projects/personal", icon: User01 },
74
+ { label: "Team", href: "/projects/team", icon: Users01 },
75
+ { label: "Shared with me", href: "/projects/shared-with-me", icon: UsersPlus },
76
+ { label: "Archive", href: "/projects/archive", icon: Archive },
77
+ ],
78
+ },
79
+ {
80
+ label: "Tasks",
81
+ href: "/tasks",
82
+ icon: CheckDone01,
83
+ badge: 10,
84
+ },
85
+ {
86
+ label: "Reporting",
87
+ href: "/reporting",
88
+ icon: PieChart03,
89
+ },
90
+ {
91
+ label: "Users",
92
+ href: "/users",
93
+ icon: Users01,
94
+ },
95
+ ];
96
+
97
+ const navItemsDualTier: (NavItemType & { icon: FC<{ className?: string }> })[] = [
98
+ {
99
+ label: "Home",
100
+ href: "/",
101
+ icon: HomeLine,
102
+ items: [
103
+ { label: "Overview", href: "/overview", icon: Grid03 },
104
+ { label: "Products", href: "/products", icon: Package },
105
+ { label: "Orders", href: "/orders", icon: CurrencyDollarCircle },
106
+ { label: "Customers", href: "/customers", icon: Users01 },
107
+ { label: "Inbox", href: "/inbox", icon: Inbox01, badge: 4 },
108
+ { label: "What's new?", href: "/whats-new", icon: Stars01 },
109
+ ],
110
+ },
111
+ {
112
+ label: "Dashboard",
113
+ href: "/dashboard",
114
+ icon: BarChartSquare02,
115
+ items: [
116
+ { label: "Overview", href: "/dashboard/overview", icon: Grid03 },
117
+ { label: "Notifications", href: "/dashboard/notifications", icon: NotificationBox, badge: 10 },
118
+ { label: "Analytics", href: "/dashboard/analytics", icon: LineChartUp03 },
119
+ { label: "Saved reports", href: "/dashboard/saved-reports", icon: Star01 },
120
+ { label: "Scheduled reports", href: "/dashboard/scheduled-reports", icon: ClockFastForward },
121
+ { label: "User reports", href: "/dashboard/user-reports", icon: UserSquare },
122
+ { label: "Manage notifications", href: "/dashboard/manage-notifications", icon: Settings03 },
123
+ ],
124
+ },
125
+ {
126
+ label: "Projects",
127
+ href: "/projects",
128
+ icon: Rows01,
129
+ items: [
130
+ { label: "View all", href: "/projects/all", icon: Rows01 },
131
+ { label: "Personal", href: "/projects/personal", icon: User01 },
132
+ { label: "Team", href: "/projects/team", icon: Users01 },
133
+ { label: "Shared with me", href: "/projects/shared-with-me", icon: UsersPlus },
134
+ { label: "Archive", href: "/projects/archive", icon: Archive },
135
+ ],
136
+ },
137
+ {
138
+ label: "Tasks",
139
+ href: "/tasks",
140
+ icon: CheckDone01,
141
+ badge: 10,
142
+ },
143
+ {
144
+ label: "Reporting",
145
+ href: "/reporting",
146
+ icon: PieChart03,
147
+ },
148
+ {
149
+ label: "Users",
150
+ href: "/users",
151
+ icon: Users01,
152
+ },
153
+ ];
154
+
155
+ const navItemsWithDividers: (NavItemType | NavItemDividerType)[] = [
156
+ {
157
+ label: "Home",
158
+ href: "/",
159
+ icon: HomeLine,
160
+ },
161
+ {
162
+ label: "Dashboard",
163
+ href: "/dashboard",
164
+ icon: BarChartSquare02,
165
+ },
166
+ {
167
+ label: "Projects",
168
+ href: "/projects",
169
+ icon: Rows01,
170
+ },
171
+ { divider: true },
172
+ {
173
+ label: "Folders",
174
+ icon: Folder,
175
+ href: "/folders",
176
+ items: [
177
+ { label: "View all", badge: 18, href: "/folders/view-all" },
178
+ { label: "Recent", badge: 8, href: "/folders/recent" },
179
+ { label: "Favorites", badge: 6, href: "/folders/favorites" },
180
+ { label: "Shared", badge: 4, href: "/folders/shared" },
181
+ ],
182
+ },
183
+ { divider: true },
184
+ {
185
+ label: "Reporting",
186
+ href: "/reporting",
187
+ icon: PieChart03,
188
+ },
189
+ {
190
+ label: "Settings",
191
+ href: "/settings",
192
+ icon: Settings01,
193
+ },
194
+ {
195
+ label: "Support",
196
+ href: "/support",
197
+ icon: MessageChatCircle,
198
+ badge: (
199
+ <BadgeWithDot color="success" type="modern" size="sm">
200
+ Online
201
+ </BadgeWithDot>
202
+ ),
203
+ },
204
+ {
205
+ label: "Open in browser",
206
+ href: "https://www.untitledui.com/",
207
+ icon: LayoutAlt01,
208
+ },
209
+ ];
210
+
211
+ const navItemsWithSectionsSubheadings: Array<{ label: string; items: NavItemType[] }> = [
212
+ {
213
+ label: "General",
214
+ items: [
215
+ {
216
+ label: "Dashboard",
217
+ href: "/",
218
+ icon: BarChartSquare02,
219
+ },
220
+ {
221
+ label: "Projects",
222
+ href: "/projects",
223
+ icon: Rows01,
224
+ },
225
+ {
226
+ label: "Documents",
227
+ href: "/documents",
228
+ icon: File05,
229
+ },
230
+ {
231
+ label: "Calendar",
232
+ href: "/calendar",
233
+ icon: Calendar,
234
+ },
235
+ ],
236
+ },
237
+ {
238
+ label: "Untitled UI",
239
+ items: [
240
+ {
241
+ label: "Reporting",
242
+ href: "#",
243
+ icon: PieChart03,
244
+ },
245
+ {
246
+ label: "Tasks",
247
+ href: "#",
248
+ icon: CheckDone01,
249
+ badge: (
250
+ <Badge size="sm" type="modern">
251
+ 8
252
+ </Badge>
253
+ ),
254
+ },
255
+ {
256
+ label: "Users",
257
+ href: "#",
258
+ icon: Users01,
259
+ },
260
+ ],
261
+ },
262
+ {
263
+ label: "Your teams",
264
+ items: [
265
+ {
266
+ label: "Catalog",
267
+ href: "#",
268
+ icon: () => <Avatar src="https://www.untitledui.com/logos/images/Catalog.jpg" className="mr-2 size-5" />,
269
+ badge: (
270
+ <div className="flex items-center gap-3">
271
+ <Badge size="sm" type="modern">
272
+ ⌘1
273
+ </Badge>
274
+ <ChevronRight size={16} className="text-fg-quaternary" />
275
+ </div>
276
+ ),
277
+ },
278
+ {
279
+ label: "Warpspeed",
280
+ href: "#",
281
+ icon: () => <Avatar src="https://www.untitledui.com/logos/images/Warpspeed.jpg" className="mr-2 size-5" />,
282
+ badge: (
283
+ <div className="flex items-center gap-3">
284
+ <Badge size="sm" type="modern">
285
+ ⌘2
286
+ </Badge>
287
+ <ChevronRight size={16} className="text-fg-quaternary" />
288
+ </div>
289
+ ),
290
+ },
291
+ {
292
+ label: "Boltshift",
293
+ href: "#",
294
+ icon: () => <Avatar src="https://www.untitledui.com/logos/images/Boltshift.jpg" className="mr-2 size-5" />,
295
+ badge: (
296
+ <div className="flex items-center gap-3">
297
+ <Badge size="sm" type="modern">
298
+ ⌘3
299
+ </Badge>
300
+ <ChevronRight size={16} className="text-fg-quaternary" />
301
+ </div>
302
+ ),
303
+ },
304
+ {
305
+ label: "Sisyphus",
306
+ href: "#",
307
+ icon: () => <Avatar src="https://www.untitledui.com/logos/images/Sisyphus.jpg" className="mr-2 size-5" />,
308
+ badge: (
309
+ <div className="flex items-center gap-3">
310
+ <Badge size="sm" type="modern">
311
+ ⌘4
312
+ </Badge>
313
+ <ChevronRight size={16} className="text-fg-quaternary" />
314
+ </div>
315
+ ),
316
+ },
317
+ ],
318
+ },
319
+ ];
320
+
321
+ export const SidebarNavigationSimpleDemo = () => (
322
+ <SidebarNavigationSimple
323
+ items={navItemsSimple}
324
+ footerItems={[
325
+ {
326
+ label: "Settings",
327
+ href: "/settings",
328
+ icon: Settings01,
329
+ },
330
+ {
331
+ label: "Support",
332
+ href: "/support",
333
+ icon: MessageChatCircle,
334
+ badge: (
335
+ <BadgeWithDot color="success" type="modern" size="sm">
336
+ Online
337
+ </BadgeWithDot>
338
+ ),
339
+ },
340
+ {
341
+ label: "Open in browser",
342
+ href: "https://www.untitledui.com/",
343
+ icon: LayoutAlt01,
344
+ },
345
+ ]}
346
+ featureCard={
347
+ <FeaturedCardProgressBar
348
+ title="Used space"
349
+ description="Your team has used 80% of your available space. Need more?"
350
+ confirmLabel="Upgrade plan"
351
+ progress={80}
352
+ className="hidden md:flex"
353
+ onDismiss={() => {}}
354
+ onConfirm={() => {}}
355
+ />
356
+ }
357
+ />
358
+ );
359
+
360
+ export const SidebarNavigationDualTierDemo = () => (
361
+ <SidebarNavigationDualTier
362
+ items={navItemsDualTier}
363
+ footerItems={[
364
+ {
365
+ label: "Support",
366
+ href: "/support",
367
+ icon: LifeBuoy01,
368
+ },
369
+ {
370
+ label: "Settings",
371
+ href: "/settings",
372
+ icon: Settings01,
373
+ },
374
+ ]}
375
+ featureCard={
376
+ <FeaturedCardProgressCircle
377
+ title="Used space"
378
+ description="Your team has used 80% of your available space. Need more?"
379
+ confirmLabel="Upgrade plan"
380
+ progress={80}
381
+ className="hidden lg:flex"
382
+ onDismiss={() => {}}
383
+ onConfirm={() => {}}
384
+ />
385
+ }
386
+ />
387
+ );
388
+
389
+ export const SidebarNavigationSlimDemo = () => (
390
+ <SidebarNavigationSlim
391
+ items={navItemsDualTier}
392
+ footerItems={[
393
+ {
394
+ label: "Support",
395
+ href: "/support",
396
+ icon: LifeBuoy01,
397
+ },
398
+ {
399
+ label: "Settings",
400
+ href: "/settings",
401
+ icon: Settings01,
402
+ },
403
+ ]}
404
+ />
405
+ );
406
+
407
+ export const SidebarSectionDividersDemo = () => <SidebarNavigationSectionDividers activeUrl="/" items={navItemsWithDividers} />;
408
+
409
+ export const SidebarNavigationSectionsSubheadingsDemo = () => <SidebarNavigationSectionsSubheadings activeUrl="/" items={navItemsWithSectionsSubheadings} />;
@@ -0,0 +1,47 @@
1
+ import { withOverlayAware } from "@/components/internal/decorators";
2
+ import * as Demos from "./sidebar-navigation.demo";
3
+
4
+ export default {
5
+ title: "Application/Application navigation",
6
+ decorators: [withOverlayAware((Story, context) => <div className="min-h-screen w-full bg-primary">{Story(context, context)}</div>)],
7
+ };
8
+
9
+ export const SidebarNavigationSimpleDemo = () => <Demos.SidebarNavigationSimpleDemo />;
10
+ SidebarNavigationSimpleDemo.storyName = "Sidebar navigation simple";
11
+ SidebarNavigationSimpleDemo.parameters = {
12
+ design: {
13
+ desktop: "1161-8593",
14
+ },
15
+ };
16
+
17
+ export const SidebarNavigationDualTierDemo = () => <Demos.SidebarNavigationDualTierDemo />;
18
+ SidebarNavigationDualTierDemo.storyName = "Sidebar navigation dual-tier";
19
+ SidebarNavigationDualTierDemo.parameters = {
20
+ design: {
21
+ desktop: "1161-17322",
22
+ },
23
+ };
24
+
25
+ export const SidebarNavigationSlimDemo = () => <Demos.SidebarNavigationSlimDemo />;
26
+ SidebarNavigationSlimDemo.storyName = "Sidebar navigation slim";
27
+ SidebarNavigationSlimDemo.parameters = {
28
+ design: {
29
+ desktop: "1165-2013",
30
+ },
31
+ };
32
+
33
+ export const SidebarSectionDividersDemo = () => <Demos.SidebarSectionDividersDemo />;
34
+ SidebarSectionDividersDemo.storyName = "Sidebar sections dividers";
35
+ SidebarSectionDividersDemo.parameters = {
36
+ design: {
37
+ desktop: "7893-127251",
38
+ },
39
+ };
40
+
41
+ export const SidebarNavigationSectionsSubheadingsDemo = () => <Demos.SidebarNavigationSectionsSubheadingsDemo />;
42
+ SidebarNavigationSectionsSubheadingsDemo.storyName = "Sidebar navigation sections subheadings";
43
+ SidebarNavigationSectionsSubheadingsDemo.parameters = {
44
+ design: {
45
+ desktop: "7901-412479",
46
+ },
47
+ };
@@ -0,0 +1,107 @@
1
+ "use client";
2
+
3
+ import { ChevronLeft, ChevronRight } from "@untitledui/icons";
4
+ import { Carousel, useCarousel } from "@/components/application/carousel/carousel-base";
5
+ import { PaginationDot } from "@/components/application/pagination/pagination-dot";
6
+
7
+ export const CarouselIndicator = ({
8
+ size = "md",
9
+ isBrand,
10
+ framed,
11
+ className,
12
+ }: {
13
+ size?: "md" | "lg";
14
+ isBrand?: boolean;
15
+ framed?: boolean;
16
+ className?: string;
17
+ }) => {
18
+ const { selectedIndex, scrollSnaps, api } = useCarousel();
19
+
20
+ return (
21
+ <PaginationDot
22
+ size={size}
23
+ framed={framed}
24
+ isBrand={isBrand}
25
+ page={selectedIndex + 1}
26
+ total={scrollSnaps.length}
27
+ className={className}
28
+ onPageChange={(page) => {
29
+ api?.scrollTo(page - 1);
30
+ }}
31
+ />
32
+ );
33
+ };
34
+
35
+ export const CarouselMd = () => {
36
+ return (
37
+ <Carousel.Root className="relative aspect-[1.6] max-w-160">
38
+ <Carousel.PrevTrigger className="absolute top-1/2 left-4 z-10 flex size-9 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-alpha-white/90 p-2 text-fg-secondary outline-focus-ring backdrop-blur-xs focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:bg-disabled_subtle disabled:text-fg-disabled">
39
+ <ChevronLeft className="size-5" />
40
+ </Carousel.PrevTrigger>
41
+ <Carousel.NextTrigger className="absolute top-1/2 right-4 z-10 flex size-9 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-alpha-white/90 p-2 text-fg-secondary outline-focus-ring backdrop-blur-xs focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:bg-disabled_subtle disabled:text-fg-disabled">
42
+ <ChevronRight className="size-5" />
43
+ </Carousel.NextTrigger>
44
+
45
+ <div className="absolute bottom-4 left-1/2 z-10 -translate-x-1/2">
46
+ <CarouselIndicator framed />
47
+ </div>
48
+
49
+ <Carousel.Content className="gap-2">
50
+ <Carousel.Item className="overflow-hidden rounded-xl">
51
+ <img alt="Image by Unsplash" src="https://www.untitledui.com/application/plants.webp" className="size-full object-cover" />
52
+ </Carousel.Item>
53
+ <Carousel.Item className="overflow-hidden rounded-xl">
54
+ <img
55
+ alt="Image by Unsplash"
56
+ src="https://images.unsplash.com/photo-1484506097116-1bcba4fa7568?q=80&w=2970&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
57
+ className="size-full object-cover"
58
+ />
59
+ </Carousel.Item>
60
+ <Carousel.Item className="overflow-hidden rounded-xl">
61
+ <img
62
+ alt="Image by Unsplash"
63
+ src="https://images.unsplash.com/photo-1471899236350-e3016bf1e69e?q=80&w=2971&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
64
+ className="size-full object-cover"
65
+ />
66
+ </Carousel.Item>
67
+ </Carousel.Content>
68
+ </Carousel.Root>
69
+ );
70
+ };
71
+
72
+ export const CarouselLg = () => {
73
+ return (
74
+ <Carousel.Root className="relative aspect-[1.6] max-w-160">
75
+ <Carousel.PrevTrigger className="absolute top-1/2 left-5 z-10 flex size-11 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-alpha-white/90 p-2 text-fg-secondary outline-focus-ring backdrop-blur-xs focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:bg-disabled_subtle disabled:text-fg-disabled">
76
+ <ChevronLeft className="size-6" />
77
+ </Carousel.PrevTrigger>
78
+ <Carousel.NextTrigger className="absolute top-1/2 right-5 z-10 flex size-11 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-alpha-white/90 p-2 text-fg-secondary outline-focus-ring backdrop-blur-xs focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:bg-disabled_subtle disabled:text-fg-disabled">
79
+ <ChevronRight className="size-6" />
80
+ </Carousel.NextTrigger>
81
+
82
+ <div className="absolute bottom-4 left-1/2 z-10 -translate-x-1/2">
83
+ <CarouselIndicator framed size="lg" />
84
+ </div>
85
+
86
+ <Carousel.Content className="gap-2">
87
+ <Carousel.Item className="overflow-hidden rounded-xl">
88
+ <img alt="Image by Unsplash" src="https://www.untitledui.com/application/plants.webp" className="size-full object-cover" />
89
+ </Carousel.Item>
90
+ <Carousel.Item className="overflow-hidden rounded-xl">
91
+ <img
92
+ alt="Image by Unsplash"
93
+ src="https://images.unsplash.com/photo-1484506097116-1bcba4fa7568?q=80&w=2970&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
94
+ className="size-full object-cover"
95
+ />
96
+ </Carousel.Item>
97
+ <Carousel.Item className="overflow-hidden rounded-xl">
98
+ <img
99
+ alt="Image by Unsplash"
100
+ src="https://images.unsplash.com/photo-1471899236350-e3016bf1e69e?q=80&w=2971&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
101
+ className="size-full object-cover"
102
+ />
103
+ </Carousel.Item>
104
+ </Carousel.Content>
105
+ </Carousel.Root>
106
+ );
107
+ };
@@ -0,0 +1,21 @@
1
+ import type { FC } from "react";
2
+ import * as Carousels from "./carousel.demo";
3
+
4
+ export default {
5
+ title: "Application/Carousels",
6
+ decorators: [
7
+ (Story: FC) => (
8
+ <div className="flex min-h-screen items-center justify-center bg-primary p-8">
9
+ <div>
10
+ <Story />
11
+ </div>
12
+ </div>
13
+ ),
14
+ ],
15
+ };
16
+
17
+ export const CarouselMd = () => <Carousels.CarouselMd />;
18
+ CarouselMd.storyName = "Carousel md";
19
+
20
+ export const CarouselLg = () => <Carousels.CarouselLg />;
21
+ CarouselLg.storyName = "Carousel lg";