@syscore/ui-library 1.27.3 → 2.0.0-beta-publish-workflow-beta.2

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 (169) hide show
  1. package/client/App.tsx +0 -2
  2. package/client/assets/alert/icon-clear.svg +4 -0
  3. package/client/assets/alert/icon-done.svg +3 -0
  4. package/client/assets/avatar-identity/photo.png +0 -0
  5. package/client/assets/avatar-identity/placeholder-icon.svg +8 -0
  6. package/client/assets/breadcrumb/icon-ellipsis.svg +5 -0
  7. package/client/assets/breadcrumb/icon-home.svg +3 -0
  8. package/client/assets/breadcrumb/icon-separator.svg +3 -0
  9. package/client/assets/button-v01/icon-back.svg +4 -0
  10. package/client/assets/button-v01/icon-check.svg +3 -0
  11. package/client/assets/button-v01/icon-close.svg +4 -0
  12. package/client/assets/button-v01/icon-delete.svg +3 -0
  13. package/client/assets/button-v01/icon-device.svg +3 -0
  14. package/client/assets/dropdown/icon-carrot-contract.svg +3 -0
  15. package/client/assets/dropdown/icon-carrot-expand.svg +3 -0
  16. package/client/assets/dropdown/icon-clear.svg +4 -0
  17. package/client/assets/dropdown/icon-enter.svg +3 -0
  18. package/client/components/icons/UtilityChangeType.tsx +21 -0
  19. package/client/components/ui/alert-dialog-panel.tsx +246 -0
  20. package/client/components/ui/alert-v02.tsx +214 -0
  21. package/client/components/ui/app-bar.tsx +299 -0
  22. package/client/components/ui/avatar-identity.tsx +122 -0
  23. package/client/components/ui/banner.tsx +108 -0
  24. package/client/components/ui/bottom-navigation.tsx +223 -0
  25. package/client/components/ui/breadcrumb-trail.tsx +170 -0
  26. package/client/components/ui/button-v01.tsx +238 -0
  27. package/client/components/ui/button.tsx +2 -0
  28. package/client/components/ui/card.tsx +108 -26
  29. package/client/components/ui/code-badge.tsx +62 -0
  30. package/client/components/ui/date-picker.tsx +188 -0
  31. package/client/components/ui/dropdown.tsx +448 -0
  32. package/client/components/ui/empty-state.tsx +197 -0
  33. package/client/components/ui/file-upload.tsx +214 -0
  34. package/client/components/ui/footer.tsx +179 -0
  35. package/client/components/ui/layout.tsx +1182 -0
  36. package/client/components/ui/pagination-v01.tsx +157 -0
  37. package/client/components/ui/password-field-v01.tsx +67 -0
  38. package/client/components/ui/search-field-v01.tsx +192 -0
  39. package/client/components/ui/section-heading.tsx +49 -0
  40. package/client/components/ui/sidebar.tsx +2 -3
  41. package/client/components/ui/standard-navigation.tsx +8 -2
  42. package/client/components/ui/stepper.tsx +148 -0
  43. package/client/components/ui/switch-v01.tsx +71 -0
  44. package/client/components/ui/system-bar.tsx +119 -0
  45. package/client/components/ui/table-v01.tsx +230 -0
  46. package/client/components/ui/tabs-v01.tsx +99 -0
  47. package/client/components/ui/tag-v02.tsx +113 -0
  48. package/client/components/ui/text-area-v01.tsx +33 -0
  49. package/client/components/ui/text-field-v01.tsx +108 -0
  50. package/client/components/ui/timeline.tsx +181 -0
  51. package/client/components/ui/toast-v01.tsx +206 -0
  52. package/client/components/ui/tooltip.tsx +264 -71
  53. package/client/global.css +9565 -4378
  54. package/client/storybook.css +125 -0
  55. package/client/ui/Accordion.stories.tsx +1 -1
  56. package/client/ui/AlertDialogPanel/AlertDialogPanel.stories.tsx +150 -0
  57. package/client/ui/AlertV02/AlertV02.stories.tsx +188 -0
  58. package/client/ui/AppBar/app-bar.stories.tsx +280 -0
  59. package/client/ui/AspectRatio.stories.tsx +1 -1
  60. package/client/ui/AvatarIdentity/AvatarIdentity.stories.tsx +77 -0
  61. package/client/ui/Banner/banner.stories.tsx +238 -0
  62. package/client/ui/BottomNavigation/bottom-navigation.stories.tsx +285 -0
  63. package/client/ui/BreadcrumbTrail/BreadcrumbTrail.stories.tsx +232 -0
  64. package/client/ui/Button.stories.tsx +1 -1
  65. package/client/ui/ButtonV01/ButtonV01.stories.tsx +417 -0
  66. package/client/ui/Calendar/Calendar.stories.tsx +1 -1
  67. package/client/ui/Card.stories.tsx +285 -168
  68. package/client/ui/Carousel/Carousel.stories.tsx +1 -1
  69. package/client/ui/Chart/Chart.stories.tsx +1 -1
  70. package/client/ui/Checkbox.stories.tsx +1 -1
  71. package/client/ui/Collapsible/Collapsible.stories.tsx +1 -1
  72. package/client/ui/Colors.stories.tsx +1 -1
  73. package/client/ui/Command/Command.stories.tsx +1 -1
  74. package/client/ui/ContextMenu/ContextMenu.stories.tsx +1 -1
  75. package/client/ui/DatePicker/DatePicker.stories.tsx +293 -0
  76. package/client/ui/Dialog.stories.tsx +1 -1
  77. package/client/ui/Drawer/Drawer.stories.tsx +1 -1
  78. package/client/ui/Dropdown/Dropdown.stories.tsx +205 -0
  79. package/client/ui/EmptyState/empty-state.stories.tsx +251 -0
  80. package/client/ui/FileUpload/FileUpload.stories.tsx +218 -0
  81. package/client/ui/Footer/footer.stories.tsx +194 -0
  82. package/client/ui/Form/Form.stories.tsx +1 -1
  83. package/client/ui/Hero.stories.tsx +1 -1
  84. package/client/ui/HoverCard/HoverCard.stories.tsx +1 -1
  85. package/client/ui/Icons.stories.tsx +1 -1
  86. package/client/ui/Input.stories.tsx +1 -1
  87. package/client/ui/InputOTP/InputOTP.stories.tsx +1 -1
  88. package/client/ui/Label.stories.tsx +1 -1
  89. package/client/ui/Layout/Center.stories.tsx +100 -0
  90. package/client/ui/Layout/Columns.stories.tsx +136 -0
  91. package/client/ui/Layout/Container.stories.tsx +104 -0
  92. package/client/ui/Layout/FormLayout.stories.tsx +144 -0
  93. package/client/ui/Layout/Grid.stories.tsx +158 -0
  94. package/client/ui/Layout/GridSpan.stories.tsx +75 -0
  95. package/client/ui/Layout/HStack.stories.tsx +128 -0
  96. package/client/ui/Layout/Layout.stories.tsx +287 -0
  97. package/client/ui/Layout/LayoutContent.stories.tsx +91 -0
  98. package/client/ui/Layout/LayoutFooter.stories.tsx +77 -0
  99. package/client/ui/Layout/LayoutHeader.stories.tsx +104 -0
  100. package/client/ui/Layout/LayoutPanel.stories.tsx +143 -0
  101. package/client/ui/Layout/Positioned.stories.tsx +113 -0
  102. package/client/ui/Layout/Section.stories.tsx +84 -0
  103. package/client/ui/Layout/ShowHide.stories.tsx +99 -0
  104. package/client/ui/Layout/Spacer.stories.tsx +149 -0
  105. package/client/ui/Layout/Stack.stories.tsx +69 -0
  106. package/client/ui/Layout/StackItem.stories.tsx +124 -0
  107. package/client/ui/Layout/VStack.stories.tsx +101 -0
  108. package/client/ui/Layout/controls.ts +33 -0
  109. package/client/ui/Layout/demo.tsx +37 -0
  110. package/client/ui/Menubar/Menubar.stories.tsx +1 -1
  111. package/client/ui/MobileNav.stories.tsx +1 -1
  112. package/client/ui/Navigation.stories.tsx +1 -1
  113. package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +1 -1
  114. package/client/ui/PageHeader.stories.tsx +13 -13
  115. package/client/ui/Pagination/Pagination.stories.tsx +178 -98
  116. package/client/ui/Pagination/PaginationLegacy.stories.tsx +121 -0
  117. package/client/ui/Panel.stories.tsx +1 -1
  118. package/client/ui/Popover/Popover.stories.tsx +1 -1
  119. package/client/ui/Progress/Progress.stories.tsx +1 -1
  120. package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
  121. package/client/ui/Resizable/Resizable.stories.tsx +1 -1
  122. package/client/ui/ScrollArea/ScrollArea.stories.tsx +1 -1
  123. package/client/ui/SearchField/SearchField.stories.tsx +153 -0
  124. package/client/ui/{SearchField.stories.tsx → SearchField/SearchFieldLegacy.stories.tsx} +2 -2
  125. package/client/ui/SectionBadge.stories.tsx +1 -1
  126. package/client/ui/Select.stories.tsx +1 -1
  127. package/client/ui/Separator/Separator.stories.tsx +1 -1
  128. package/client/ui/Sheet/Sheet.stories.tsx +1 -1
  129. package/client/ui/Sidebar/Sidebar.stories.tsx +57 -8
  130. package/client/ui/Skeleton/Skeleton.stories.tsx +1 -1
  131. package/client/ui/Slider/Slider.stories.tsx +1 -1
  132. package/client/ui/StandardNavigation.stories.tsx +1 -1
  133. package/client/ui/Stepper/Stepper.stories.tsx +344 -0
  134. package/client/ui/Switch.stories.tsx +1 -1
  135. package/client/ui/SwitchV01/SwitchV01.stories.tsx +152 -0
  136. package/client/ui/SystemBar/system-bar.stories.tsx +179 -0
  137. package/client/ui/Table/TableV01.stories.tsx +256 -0
  138. package/client/ui/Tabs.stories.tsx +1 -1
  139. package/client/ui/TabsV01/TabsV01.stories.tsx +144 -0
  140. package/client/ui/Tag.stories.tsx +1 -1
  141. package/client/ui/TagV02/TagStatusV02.stories.tsx +132 -0
  142. package/client/ui/TagV02/TagV02.stories.tsx +142 -0
  143. package/client/ui/TextAreaV01/TextAreaV01.stories.tsx +146 -0
  144. package/client/ui/TextFieldV01/PasswordFieldV01.stories.tsx +161 -0
  145. package/client/ui/TextFieldV01/TextFieldV01.stories.tsx +160 -0
  146. package/client/ui/Textarea.stories.tsx +1 -1
  147. package/client/ui/Timeline/timeline.stories.tsx +404 -0
  148. package/client/ui/Toast/Toast.stories.tsx +1 -1
  149. package/client/ui/ToastV01/ToastV01.stories.tsx +201 -0
  150. package/client/ui/Toaster/Toaster.stories.tsx +1 -1
  151. package/client/ui/Toggle.stories.tsx +1 -1
  152. package/client/ui/Tooltip.stories.tsx +287 -114
  153. package/client/ui/Typography.stories.tsx +1 -1
  154. package/dist/index.cjs.js +1 -1
  155. package/dist/index.d.ts +649 -13
  156. package/dist/index.es.js +4405 -653
  157. package/package.json +1 -1
  158. package/client/components/ui/badge.tsx +0 -33
  159. package/client/components/ui/sonner.tsx +0 -26
  160. package/client/components/ui/toggle-group.tsx +0 -76
  161. package/client/ui/Alert/Alert.stories.tsx +0 -82
  162. package/client/ui/AlertDialog/AlertDialog.stories.tsx +0 -106
  163. package/client/ui/Avatar/Avatar.stories.tsx +0 -94
  164. package/client/ui/Badge/Badge.stories.tsx +0 -60
  165. package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +0 -97
  166. package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +0 -139
  167. package/client/ui/Sonner/Sonner.stories.tsx +0 -48
  168. package/client/ui/Table/Table.stories.tsx +0 -135
  169. package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +0 -88
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syscore/ui-library",
3
- "version": "1.27.3",
3
+ "version": "2.0.0-beta-publish-workflow-beta.2",
4
4
  "description": "A comprehensive React component library built with Radix UI, Tailwind CSS, and TypeScript",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1,33 +0,0 @@
1
- import * as React from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const badgeVariants = cva(
7
- "badge",
8
- {
9
- variants: {
10
- variant: {
11
- default: "badge--default",
12
- secondary: "badge--secondary",
13
- destructive: "badge--destructive",
14
- outline: "badge--outline",
15
- },
16
- },
17
- defaultVariants: {
18
- variant: "default",
19
- },
20
- },
21
- );
22
-
23
- export interface BadgeProps
24
- extends React.HTMLAttributes<HTMLDivElement>,
25
- VariantProps<typeof badgeVariants> {}
26
-
27
- function Badge({ className, variant, ...props }: BadgeProps) {
28
- return (
29
- <div className={cn(badgeVariants({ variant }), className)} {...props} />
30
- );
31
- }
32
-
33
- export { Badge, badgeVariants };
@@ -1,26 +0,0 @@
1
- import { useTheme } from "next-themes";
2
- import { Toaster as Sonner } from "sonner";
3
-
4
- type ToasterProps = React.ComponentProps<typeof Sonner>;
5
-
6
- const Toaster = ({ ...props }: ToasterProps) => {
7
- const { theme = "system" } = useTheme();
8
-
9
- return (
10
- <Sonner
11
- theme={theme as ToasterProps["theme"]}
12
- className="toaster"
13
- toastOptions={{
14
- classNames: {
15
- toast: "toast",
16
- description: "toast-description",
17
- actionButton: "toast-action",
18
- cancelButton: "toast-cancel",
19
- },
20
- }}
21
- {...props}
22
- />
23
- );
24
- };
25
-
26
- export { Toaster };
@@ -1,76 +0,0 @@
1
- import * as React from "react";
2
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const toggleVariants = cva(
8
- "toggle-group-item",
9
- {
10
- variants: {
11
- variant: {
12
- default: "toggle-group-item--default",
13
- },
14
- size: {
15
- default: "toggle-group-item--size-default",
16
- },
17
- },
18
- defaultVariants: {
19
- variant: "default",
20
- size: "default",
21
- },
22
- },
23
- );
24
-
25
- const ToggleGroupContext = React.createContext<
26
- VariantProps<typeof toggleVariants>
27
- >({
28
- size: "default",
29
- variant: "default",
30
- });
31
-
32
- const ToggleGroup = React.forwardRef<
33
- React.ElementRef<typeof ToggleGroupPrimitive.Root>,
34
- React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
35
- VariantProps<typeof toggleVariants>
36
- >(({ className, variant, size, children, ...props }, ref) => (
37
- <ToggleGroupPrimitive.Root
38
- ref={ref}
39
- className={cn("toggle-group", className)}
40
- {...props}
41
- >
42
- <ToggleGroupContext.Provider value={{ variant, size }}>
43
- {children}
44
- </ToggleGroupContext.Provider>
45
- </ToggleGroupPrimitive.Root>
46
- ));
47
-
48
- ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
49
-
50
- const ToggleGroupItem = React.forwardRef<
51
- React.ElementRef<typeof ToggleGroupPrimitive.Item>,
52
- React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
53
- VariantProps<typeof toggleVariants>
54
- >(({ className, children, variant, size, ...props }, ref) => {
55
- const context = React.useContext(ToggleGroupContext);
56
-
57
- return (
58
- <ToggleGroupPrimitive.Item
59
- ref={ref}
60
- className={cn(
61
- toggleVariants({
62
- variant: context.variant || variant,
63
- size: context.size || size,
64
- }),
65
- className,
66
- )}
67
- {...props}
68
- >
69
- {children}
70
- </ToggleGroupPrimitive.Item>
71
- );
72
- });
73
-
74
- ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
75
-
76
- export { ToggleGroup, ToggleGroupItem };
@@ -1,82 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Alert, AlertTitle, AlertDescription } from "../../components/ui/alert";
3
- import { AlertCircle, Terminal, CheckCircle2 } from "lucide-react";
4
-
5
- const meta = {
6
- title: "UI/Alert",
7
- component: Alert,
8
- tags: ["autodocs"],
9
- parameters: {
10
- layout: "padded",
11
- },
12
- } satisfies Meta<typeof Alert>;
13
-
14
- export default meta;
15
-
16
- type Story = StoryObj<typeof meta>;
17
-
18
- export const Default: Story = {
19
- render: () => (
20
- <Alert>
21
- <Terminal className="h-4 w-4" />
22
- <AlertTitle>Heads up!</AlertTitle>
23
- <AlertDescription>
24
- You can add components to your app using the code below.
25
- </AlertDescription>
26
- </Alert>
27
- ),
28
- };
29
-
30
- export const Destructive: Story = {
31
- render: () => (
32
- <Alert variant="destructive">
33
- <AlertCircle className="h-4 w-4" />
34
- <AlertTitle>Error</AlertTitle>
35
- <AlertDescription>
36
- Your session has expired. Please log in again.
37
- </AlertDescription>
38
- </Alert>
39
- ),
40
- };
41
-
42
- export const Success: Story = {
43
- render: () => (
44
- <Alert>
45
- <CheckCircle2 className="h-4 w-4" />
46
- <AlertTitle>Success</AlertTitle>
47
- <AlertDescription>
48
- Your changes have been saved successfully.
49
- </AlertDescription>
50
- </Alert>
51
- ),
52
- };
53
-
54
- export const AllVariants: Story = {
55
- render: () => (
56
- <div className="space-y-4 max-w-md">
57
- <Alert>
58
- <Terminal className="h-4 w-4" />
59
- <AlertTitle>Heads up!</AlertTitle>
60
- <AlertDescription>
61
- You can add components to your app using the code below.
62
- </AlertDescription>
63
- </Alert>
64
-
65
- <Alert variant="destructive">
66
- <AlertCircle className="h-4 w-4" />
67
- <AlertTitle>Error</AlertTitle>
68
- <AlertDescription>
69
- Your session has expired. Please log in again.
70
- </AlertDescription>
71
- </Alert>
72
-
73
- <Alert>
74
- <CheckCircle2 className="h-4 w-4" />
75
- <AlertTitle>Success</AlertTitle>
76
- <AlertDescription>
77
- Your changes have been saved successfully.
78
- </AlertDescription>
79
- </Alert>
80
- </div>
81
- ),
82
- };
@@ -1,106 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import {
3
- AlertDialog,
4
- AlertDialogTrigger,
5
- AlertDialogContent,
6
- AlertDialogHeader,
7
- AlertDialogTitle,
8
- AlertDialogDescription,
9
- AlertDialogFooter,
10
- AlertDialogAction,
11
- AlertDialogCancel,
12
- } from "../../components/ui/alert-dialog";
13
- import { Button } from "../../components/ui/button";
14
- import { useState } from "react";
15
-
16
- const meta = {
17
- title: "UI/AlertDialog",
18
- component: AlertDialog,
19
- tags: ["autodocs"],
20
- parameters: {
21
- layout: "centered",
22
- },
23
- } satisfies Meta<typeof AlertDialog>;
24
-
25
- export default meta;
26
-
27
- type Story = StoryObj<typeof meta>;
28
-
29
- export const Default: Story = {
30
- render: () => {
31
- const [open, setOpen] = useState(false);
32
- return (
33
- <AlertDialog open={open} onOpenChange={setOpen}>
34
- <AlertDialogTrigger asChild>
35
- <Button>Open Alert</Button>
36
- </AlertDialogTrigger>
37
- <AlertDialogContent>
38
- <AlertDialogHeader>
39
- <AlertDialogTitle>Confirm Action</AlertDialogTitle>
40
- <AlertDialogDescription>
41
- Are you sure you want to proceed with this action?
42
- </AlertDialogDescription>
43
- </AlertDialogHeader>
44
- <AlertDialogFooter>
45
- <AlertDialogCancel>Cancel</AlertDialogCancel>
46
- <AlertDialogAction>Continue</AlertDialogAction>
47
- </AlertDialogFooter>
48
- </AlertDialogContent>
49
- </AlertDialog>
50
- );
51
- },
52
- };
53
-
54
- export const Delete: Story = {
55
- render: () => {
56
- const [open, setOpen] = useState(false);
57
- return (
58
- <AlertDialog open={open} onOpenChange={setOpen}>
59
- <AlertDialogTrigger asChild>
60
- <Button variant="destructive">Delete Item</Button>
61
- </AlertDialogTrigger>
62
- <AlertDialogContent>
63
- <AlertDialogHeader>
64
- <AlertDialogTitle>Are you sure?</AlertDialogTitle>
65
- <AlertDialogDescription>
66
- This action cannot be undone. This will permanently delete the
67
- item.
68
- </AlertDialogDescription>
69
- </AlertDialogHeader>
70
- <AlertDialogFooter>
71
- <AlertDialogCancel>Cancel</AlertDialogCancel>
72
- <AlertDialogAction className="bg-destructive text-destructive-foreground hover:bg-destructive/90">
73
- Delete
74
- </AlertDialogAction>
75
- </AlertDialogFooter>
76
- </AlertDialogContent>
77
- </AlertDialog>
78
- );
79
- },
80
- };
81
-
82
- export const Warning: Story = {
83
- render: () => {
84
- const [open, setOpen] = useState(false);
85
- return (
86
- <AlertDialog open={open} onOpenChange={setOpen}>
87
- <AlertDialogTrigger asChild>
88
- <Button variant="outline">Show Warning</Button>
89
- </AlertDialogTrigger>
90
- <AlertDialogContent>
91
- <AlertDialogHeader>
92
- <AlertDialogTitle>Warning</AlertDialogTitle>
93
- <AlertDialogDescription>
94
- This action will have significant consequences. Please confirm
95
- that you understand the risks.
96
- </AlertDialogDescription>
97
- </AlertDialogHeader>
98
- <AlertDialogFooter>
99
- <AlertDialogCancel>Cancel</AlertDialogCancel>
100
- <AlertDialogAction>I Understand</AlertDialogAction>
101
- </AlertDialogFooter>
102
- </AlertDialogContent>
103
- </AlertDialog>
104
- );
105
- },
106
- };
@@ -1,94 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import {
3
- Avatar,
4
- AvatarImage,
5
- AvatarFallback,
6
- } from "../../components/ui/avatar";
7
-
8
- const meta = {
9
- title: "UI/Avatar",
10
- component: Avatar,
11
- tags: ["autodocs"],
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Avatar>;
16
-
17
- export default meta;
18
-
19
- type Story = StoryObj<typeof meta>;
20
-
21
- export const Default: Story = {
22
- render: () => (
23
- <Avatar>
24
- <AvatarImage src="https://github.com/shadcn.png" />
25
- <AvatarFallback>CN</AvatarFallback>
26
- </Avatar>
27
- ),
28
- };
29
-
30
- export const Fallback: Story = {
31
- render: () => (
32
- <Avatar>
33
- <AvatarImage src="" />
34
- <AvatarFallback>JD</AvatarFallback>
35
- </Avatar>
36
- ),
37
- };
38
-
39
- export const Multiple: Story = {
40
- render: () => (
41
- <div className="flex gap-4">
42
- <Avatar>
43
- <AvatarImage src="https://github.com/shadcn.png" />
44
- <AvatarFallback>CN</AvatarFallback>
45
- </Avatar>
46
- <Avatar>
47
- <AvatarImage src="" />
48
- <AvatarFallback>JD</AvatarFallback>
49
- </Avatar>
50
- <Avatar>
51
- <AvatarImage src="" />
52
- <AvatarFallback>AB</AvatarFallback>
53
- </Avatar>
54
- <Avatar>
55
- <AvatarImage src="" />
56
- <AvatarFallback>XY</AvatarFallback>
57
- </Avatar>
58
- </div>
59
- ),
60
- };
61
-
62
- export const WithUser: Story = {
63
- render: () => (
64
- <div className="flex items-center gap-3">
65
- <Avatar>
66
- <AvatarImage src="" />
67
- <AvatarFallback>JD</AvatarFallback>
68
- </Avatar>
69
- <div>
70
- <p className="text-sm font-semibold">John Doe</p>
71
- <p className="text-xs text-gray-600">john@example.com</p>
72
- </div>
73
- </div>
74
- ),
75
- };
76
-
77
- export const Sizes: Story = {
78
- render: () => (
79
- <div className="flex items-center gap-4">
80
- <Avatar className="h-8 w-8">
81
- <AvatarImage src="" />
82
- <AvatarFallback>CN</AvatarFallback>
83
- </Avatar>
84
- <Avatar>
85
- <AvatarImage src="" />
86
- <AvatarFallback>CN</AvatarFallback>
87
- </Avatar>
88
- <Avatar className="h-16 w-16">
89
- <AvatarImage src="" />
90
- <AvatarFallback>CN</AvatarFallback>
91
- </Avatar>
92
- </div>
93
- ),
94
- };
@@ -1,60 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Badge } from "../../components/ui/badge";
3
-
4
- const meta = {
5
- title: "UI/Badge",
6
- component: Badge,
7
- tags: ["autodocs"],
8
- parameters: {
9
- layout: "centered",
10
- },
11
- argTypes: {
12
- variant: {
13
- control: { type: "select" },
14
- options: ["default", "secondary", "destructive", "outline-solid"],
15
- },
16
- },
17
- } satisfies Meta<typeof Badge>;
18
-
19
- export default meta;
20
-
21
- type Story = StoryObj<typeof meta>;
22
-
23
- export const Default: Story = {
24
- args: {
25
- children: "Default",
26
- variant: "default",
27
- },
28
- };
29
-
30
- export const Secondary: Story = {
31
- args: {
32
- children: "Secondary",
33
- variant: "secondary",
34
- },
35
- };
36
-
37
- export const Destructive: Story = {
38
- args: {
39
- children: "Destructive",
40
- variant: "destructive",
41
- },
42
- };
43
-
44
- export const Outline: Story = {
45
- args: {
46
- children: "Outline",
47
- variant: "outline",
48
- },
49
- };
50
-
51
- export const AllVariants: Story = {
52
- render: () => (
53
- <div className="flex flex-wrap gap-4">
54
- <Badge variant="default">Default</Badge>
55
- <Badge variant="secondary">Secondary</Badge>
56
- <Badge variant="destructive">Destructive</Badge>
57
- <Badge variant="outline">Outline</Badge>
58
- </div>
59
- ),
60
- };
@@ -1,97 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import {
3
- Breadcrumb,
4
- BreadcrumbItem,
5
- BreadcrumbLink,
6
- BreadcrumbList,
7
- BreadcrumbPage,
8
- BreadcrumbSeparator,
9
- } from "../../components/ui/breadcrumb";
10
- import { ChevronRight } from "lucide-react";
11
-
12
- const meta = {
13
- title: "UI/Breadcrumb",
14
- component: Breadcrumb,
15
- tags: ["autodocs"],
16
- parameters: {
17
- layout: "padded",
18
- },
19
- } satisfies Meta<typeof Breadcrumb>;
20
-
21
- export default meta;
22
-
23
- type Story = StoryObj<typeof meta>;
24
-
25
- export const Default: Story = {
26
- render: () => (
27
- <Breadcrumb>
28
- <BreadcrumbList>
29
- <BreadcrumbItem>
30
- <BreadcrumbLink href="/">Home</BreadcrumbLink>
31
- </BreadcrumbItem>
32
- <BreadcrumbSeparator />
33
- <BreadcrumbItem>
34
- <BreadcrumbLink href="/docs">Documentation</BreadcrumbLink>
35
- </BreadcrumbItem>
36
- <BreadcrumbSeparator />
37
- <BreadcrumbItem>
38
- <BreadcrumbPage>Getting Started</BreadcrumbPage>
39
- </BreadcrumbItem>
40
- </BreadcrumbList>
41
- </Breadcrumb>
42
- ),
43
- };
44
-
45
- export const WithCustomSeparator: Story = {
46
- render: () => (
47
- <Breadcrumb>
48
- <BreadcrumbList>
49
- <BreadcrumbItem>
50
- <BreadcrumbLink href="/">Home</BreadcrumbLink>
51
- </BreadcrumbItem>
52
- <BreadcrumbSeparator>
53
- <ChevronRight className="h-4 w-4" />
54
- </BreadcrumbSeparator>
55
- <BreadcrumbItem>
56
- <BreadcrumbLink href="/products">Products</BreadcrumbLink>
57
- </BreadcrumbItem>
58
- <BreadcrumbSeparator>
59
- <ChevronRight className="h-4 w-4" />
60
- </BreadcrumbSeparator>
61
- <BreadcrumbItem>
62
- <BreadcrumbPage>Product Details</BreadcrumbPage>
63
- </BreadcrumbItem>
64
- </BreadcrumbList>
65
- </Breadcrumb>
66
- ),
67
- };
68
-
69
- export const Long: Story = {
70
- render: () => (
71
- <Breadcrumb>
72
- <BreadcrumbList>
73
- <BreadcrumbItem>
74
- <BreadcrumbLink href="/">Home</BreadcrumbLink>
75
- </BreadcrumbItem>
76
- <BreadcrumbSeparator />
77
- <BreadcrumbItem>
78
- <BreadcrumbLink href="/docs">Docs</BreadcrumbLink>
79
- </BreadcrumbItem>
80
- <BreadcrumbSeparator />
81
- <BreadcrumbItem>
82
- <BreadcrumbLink href="/docs/components">Components</BreadcrumbLink>
83
- </BreadcrumbItem>
84
- <BreadcrumbSeparator />
85
- <BreadcrumbItem>
86
- <BreadcrumbLink href="/docs/components/breadcrumb">
87
- Breadcrumb
88
- </BreadcrumbLink>
89
- </BreadcrumbItem>
90
- <BreadcrumbSeparator />
91
- <BreadcrumbItem>
92
- <BreadcrumbPage>Implementation</BreadcrumbPage>
93
- </BreadcrumbItem>
94
- </BreadcrumbList>
95
- </Breadcrumb>
96
- ),
97
- };