@altimateai/ui-components 0.0.1-beta.5 → 0.0.1-beta.6

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 (33) hide show
  1. package/dist/CoachForm.js +1 -1
  2. package/dist/storybook/Accordion.stories.tsx +52 -52
  3. package/dist/storybook/Alert.stories.tsx +61 -61
  4. package/dist/storybook/AlertDialog.stories.tsx +161 -161
  5. package/dist/storybook/Avatar.stories.tsx +58 -58
  6. package/dist/storybook/Badge.stories.tsx +36 -36
  7. package/dist/storybook/Button.stories.tsx +109 -109
  8. package/dist/storybook/Card.stories.tsx +69 -69
  9. package/dist/storybook/Checkbox.stories.tsx +65 -65
  10. package/dist/storybook/Command.stories.tsx +35 -35
  11. package/dist/storybook/DropdownMenu.stories.tsx +36 -36
  12. package/dist/storybook/Form.stories.tsx +114 -114
  13. package/dist/storybook/HoverCard.stories.tsx +99 -99
  14. package/dist/storybook/Input.stories.tsx +53 -53
  15. package/dist/storybook/Label.stories.tsx +42 -42
  16. package/dist/storybook/Menubar.stories.tsx +159 -159
  17. package/dist/storybook/Pagination.stories.tsx +152 -152
  18. package/dist/storybook/Popover.stories.tsx +23 -23
  19. package/dist/storybook/Progress.stories.tsx +89 -89
  20. package/dist/storybook/RadioGroup.stories.tsx +58 -58
  21. package/dist/storybook/Resizable.stories.tsx +119 -119
  22. package/dist/storybook/ScrollArea.stories.tsx +101 -101
  23. package/dist/storybook/Select.stories.tsx +95 -95
  24. package/dist/storybook/Sheet.stories.tsx +69 -69
  25. package/dist/storybook/Sidebar.stories.tsx +97 -97
  26. package/dist/storybook/Slider.stories.tsx +79 -79
  27. package/dist/storybook/Switch.stories.tsx +90 -90
  28. package/dist/storybook/Textarea.stories.tsx +50 -50
  29. package/dist/storybook/Toast.stories.tsx +107 -107
  30. package/dist/storybook/Tooltip.stories.tsx +28 -28
  31. package/dist/storybook/Typography.stories.tsx +178 -178
  32. package/package.json +2 -2
  33. package/readme.md +11 -11
@@ -1,58 +1,58 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { Avatar, AvatarImage, AvatarFallback } from "../shadcn";
3
-
4
- export default {
5
- title: "Shadcn/Components/Avatar",
6
- component: Avatar,
7
- } as Meta<typeof Avatar>;
8
-
9
- const Template: StoryFn = () => (
10
- <div className="flex gap-4">
11
- <Avatar>
12
- <AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
13
- <AvatarFallback>CN</AvatarFallback>
14
- </Avatar>
15
- </div>
16
- );
17
-
18
- export const Default = Template.bind({});
19
-
20
- export const WithFallback = () => (
21
- <div className="flex gap-4">
22
- <Avatar>
23
- <AvatarImage src="invalid-image.jpg" alt="@invalid" />
24
- <AvatarFallback>IN</AvatarFallback>
25
- </Avatar>
26
- </div>
27
- );
28
-
29
- export const Sizes = () => (
30
- <div className="flex gap-4 items-center">
31
- <Avatar className="h-6 w-6">
32
- <AvatarImage src="https://github.com/shadcn.png" alt="@small" />
33
- <AvatarFallback>SM</AvatarFallback>
34
- </Avatar>
35
- <Avatar>
36
- <AvatarImage src="https://github.com/shadcn.png" alt="@medium" />
37
- <AvatarFallback>MD</AvatarFallback>
38
- </Avatar>
39
- <Avatar className="h-14 w-14">
40
- <AvatarImage src="https://github.com/shadcn.png" alt="@large" />
41
- <AvatarFallback>LG</AvatarFallback>
42
- </Avatar>
43
- </div>
44
- );
45
-
46
- export const CustomColors = () => (
47
- <div className="flex gap-4">
48
- <Avatar>
49
- <AvatarFallback className="bg-blue-500 text-white">BL</AvatarFallback>
50
- </Avatar>
51
- <Avatar>
52
- <AvatarFallback className="bg-green-500 text-white">GR</AvatarFallback>
53
- </Avatar>
54
- <Avatar>
55
- <AvatarFallback className="bg-red-500 text-white">RD</AvatarFallback>
56
- </Avatar>
57
- </div>
58
- );
1
+ import { Meta, StoryFn } from "@storybook/react";
2
+ import { Avatar, AvatarImage, AvatarFallback } from "../shadcn";
3
+
4
+ export default {
5
+ title: "Shadcn/Components/Avatar",
6
+ component: Avatar,
7
+ } as Meta<typeof Avatar>;
8
+
9
+ const Template: StoryFn = () => (
10
+ <div className="flex gap-4">
11
+ <Avatar>
12
+ <AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
13
+ <AvatarFallback>CN</AvatarFallback>
14
+ </Avatar>
15
+ </div>
16
+ );
17
+
18
+ export const Default = Template.bind({});
19
+
20
+ export const WithFallback = () => (
21
+ <div className="flex gap-4">
22
+ <Avatar>
23
+ <AvatarImage src="invalid-image.jpg" alt="@invalid" />
24
+ <AvatarFallback>IN</AvatarFallback>
25
+ </Avatar>
26
+ </div>
27
+ );
28
+
29
+ export const Sizes = () => (
30
+ <div className="flex gap-4 items-center">
31
+ <Avatar className="h-6 w-6">
32
+ <AvatarImage src="https://github.com/shadcn.png" alt="@small" />
33
+ <AvatarFallback>SM</AvatarFallback>
34
+ </Avatar>
35
+ <Avatar>
36
+ <AvatarImage src="https://github.com/shadcn.png" alt="@medium" />
37
+ <AvatarFallback>MD</AvatarFallback>
38
+ </Avatar>
39
+ <Avatar className="h-14 w-14">
40
+ <AvatarImage src="https://github.com/shadcn.png" alt="@large" />
41
+ <AvatarFallback>LG</AvatarFallback>
42
+ </Avatar>
43
+ </div>
44
+ );
45
+
46
+ export const CustomColors = () => (
47
+ <div className="flex gap-4">
48
+ <Avatar>
49
+ <AvatarFallback className="bg-blue-500 text-white">BL</AvatarFallback>
50
+ </Avatar>
51
+ <Avatar>
52
+ <AvatarFallback className="bg-green-500 text-white">GR</AvatarFallback>
53
+ </Avatar>
54
+ <Avatar>
55
+ <AvatarFallback className="bg-red-500 text-white">RD</AvatarFallback>
56
+ </Avatar>
57
+ </div>
58
+ );
@@ -1,36 +1,36 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Badge } from "../shadcn";
3
-
4
- export default {
5
- title: "Shadcn/Components/Badge",
6
- component: Badge,
7
- } as Meta<typeof Badge>;
8
-
9
- type Story = StoryObj<typeof Badge>;
10
-
11
- export const Default: Story = {
12
- args: {
13
- children: "Badge",
14
- },
15
- };
16
-
17
- export const Secondary: Story = {
18
- args: {
19
- variant: "secondary",
20
- children: "Secondary",
21
- },
22
- };
23
-
24
- export const Destructive: Story = {
25
- args: {
26
- variant: "destructive",
27
- children: "Destructive",
28
- },
29
- };
30
-
31
- export const Outline: Story = {
32
- args: {
33
- variant: "outline",
34
- children: "Outline",
35
- },
36
- };
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Badge } from "../shadcn";
3
+
4
+ export default {
5
+ title: "Shadcn/Components/Badge",
6
+ component: Badge,
7
+ } as Meta<typeof Badge>;
8
+
9
+ type Story = StoryObj<typeof Badge>;
10
+
11
+ export const Default: Story = {
12
+ args: {
13
+ children: "Badge",
14
+ },
15
+ };
16
+
17
+ export const Secondary: Story = {
18
+ args: {
19
+ variant: "secondary",
20
+ children: "Secondary",
21
+ },
22
+ };
23
+
24
+ export const Destructive: Story = {
25
+ args: {
26
+ variant: "destructive",
27
+ children: "Destructive",
28
+ },
29
+ };
30
+
31
+ export const Outline: Story = {
32
+ args: {
33
+ variant: "outline",
34
+ children: "Outline",
35
+ },
36
+ };
@@ -1,109 +1,109 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { Button, ButtonProps } from "../shadcn";
3
- import { CloseIcon } from "@ac-assets/icons";
4
-
5
- export default {
6
- title: "Shadcn/Components/Button",
7
- component: Button,
8
- argTypes: {
9
- variant: {
10
- control: "select",
11
- options: ["default", "destructive", "outline", "secondary", "ghost", "link"],
12
- },
13
- size: {
14
- control: "select",
15
- options: ["default", "sm", "lg", "icon"],
16
- },
17
- },
18
- } as Meta;
19
-
20
- const Template: StoryFn<ButtonProps> = args => <Button {...args} />;
21
-
22
- export const Default = Template.bind({});
23
- Default.args = {
24
- children: "Button",
25
- };
26
-
27
- export const Destructive = Template.bind({});
28
- Destructive.args = {
29
- variant: "destructive",
30
- children: "Delete",
31
- };
32
-
33
- export const Outline = Template.bind({});
34
- Outline.args = {
35
- variant: "outline",
36
- children: "Outline",
37
- };
38
-
39
- export const Secondary = Template.bind({});
40
- Secondary.args = {
41
- variant: "secondary",
42
- children: "Secondary",
43
- };
44
-
45
- export const Small = Template.bind({});
46
- Small.args = {
47
- size: "sm",
48
- children: "Small",
49
- };
50
-
51
- export const Large = Template.bind({});
52
- Large.args = {
53
- size: "lg",
54
- children: "Large",
55
- };
56
-
57
- export const Icon = Template.bind({});
58
- Icon.args = {
59
- size: "icon",
60
- children: "🔍",
61
- };
62
-
63
- const buttonVariants = ["Default", "Secondary", "Destructive", "Success", "Ghost", "Link"];
64
-
65
- export const Buttons = {
66
- render: () => (
67
- <div className="al-space-y-4">
68
- {buttonVariants.map(v => (
69
- <div className="al-space-x-4" key={v}>
70
- <Button variant={v.toLowerCase() as ButtonProps["variant"]} className="al-align-bottom">
71
- {v}
72
- </Button>
73
- <Button
74
- variant={v.toLowerCase() as ButtonProps["variant"]}
75
- size="sm"
76
- className="al-align-bottom"
77
- >
78
- {v} sm
79
- </Button>
80
- <Button
81
- variant={v.toLowerCase() as ButtonProps["variant"]}
82
- disabled
83
- className="al-align-bottom"
84
- >
85
- {v} disabled
86
- </Button>
87
- <Button variant={v.toLowerCase() as ButtonProps["variant"]} className="al-align-bottom">
88
- <CloseIcon />
89
- {v} with icon
90
- </Button>
91
- <Button
92
- variant={v.toLowerCase() as ButtonProps["variant"]}
93
- size="icon"
94
- className="al-align-bottom"
95
- >
96
- <CloseIcon />
97
- </Button>
98
- <Button
99
- variant={v.toLowerCase() as ButtonProps["variant"]}
100
- size="lg"
101
- className="al-align-bottom"
102
- >
103
- {v} lg
104
- </Button>
105
- </div>
106
- ))}
107
- </div>
108
- ),
109
- };
1
+ import { Meta, StoryFn } from "@storybook/react";
2
+ import { Button, ButtonProps } from "../shadcn";
3
+ import { CloseIcon } from "@ac-assets/icons";
4
+
5
+ export default {
6
+ title: "Shadcn/Components/Button",
7
+ component: Button,
8
+ argTypes: {
9
+ variant: {
10
+ control: "select",
11
+ options: ["default", "destructive", "outline", "secondary", "ghost", "link"],
12
+ },
13
+ size: {
14
+ control: "select",
15
+ options: ["default", "sm", "lg", "icon"],
16
+ },
17
+ },
18
+ } as Meta;
19
+
20
+ const Template: StoryFn<ButtonProps> = args => <Button {...args} />;
21
+
22
+ export const Default = Template.bind({});
23
+ Default.args = {
24
+ children: "Button",
25
+ };
26
+
27
+ export const Destructive = Template.bind({});
28
+ Destructive.args = {
29
+ variant: "destructive",
30
+ children: "Delete",
31
+ };
32
+
33
+ export const Outline = Template.bind({});
34
+ Outline.args = {
35
+ variant: "outline",
36
+ children: "Outline",
37
+ };
38
+
39
+ export const Secondary = Template.bind({});
40
+ Secondary.args = {
41
+ variant: "secondary",
42
+ children: "Secondary",
43
+ };
44
+
45
+ export const Small = Template.bind({});
46
+ Small.args = {
47
+ size: "sm",
48
+ children: "Small",
49
+ };
50
+
51
+ export const Large = Template.bind({});
52
+ Large.args = {
53
+ size: "lg",
54
+ children: "Large",
55
+ };
56
+
57
+ export const Icon = Template.bind({});
58
+ Icon.args = {
59
+ size: "icon",
60
+ children: "🔍",
61
+ };
62
+
63
+ const buttonVariants = ["Default", "Secondary", "Destructive", "Success", "Ghost", "Link"];
64
+
65
+ export const Buttons = {
66
+ render: () => (
67
+ <div className="al-space-y-4">
68
+ {buttonVariants.map(v => (
69
+ <div className="al-space-x-4" key={v}>
70
+ <Button variant={v.toLowerCase() as ButtonProps["variant"]} className="al-align-bottom">
71
+ {v}
72
+ </Button>
73
+ <Button
74
+ variant={v.toLowerCase() as ButtonProps["variant"]}
75
+ size="sm"
76
+ className="al-align-bottom"
77
+ >
78
+ {v} sm
79
+ </Button>
80
+ <Button
81
+ variant={v.toLowerCase() as ButtonProps["variant"]}
82
+ disabled
83
+ className="al-align-bottom"
84
+ >
85
+ {v} disabled
86
+ </Button>
87
+ <Button variant={v.toLowerCase() as ButtonProps["variant"]} className="al-align-bottom">
88
+ <CloseIcon />
89
+ {v} with icon
90
+ </Button>
91
+ <Button
92
+ variant={v.toLowerCase() as ButtonProps["variant"]}
93
+ size="icon"
94
+ className="al-align-bottom"
95
+ >
96
+ <CloseIcon />
97
+ </Button>
98
+ <Button
99
+ variant={v.toLowerCase() as ButtonProps["variant"]}
100
+ size="lg"
101
+ className="al-align-bottom"
102
+ >
103
+ {v} lg
104
+ </Button>
105
+ </div>
106
+ ))}
107
+ </div>
108
+ ),
109
+ };
@@ -1,69 +1,69 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { Button } from "../shadcn";
3
- import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "../shadcn";
4
-
5
- export default {
6
- title: "Shadcn/Components/Card",
7
- component: Card,
8
- } as Meta;
9
-
10
- const Template: StoryFn = () => (
11
- <Card className="w-[350px]">
12
- <CardHeader>
13
- <CardTitle>Card Title</CardTitle>
14
- <CardDescription>Card Description</CardDescription>
15
- </CardHeader>
16
- <CardContent>
17
- <p>Card Content</p>
18
- </CardContent>
19
- <CardFooter>
20
- <Button>Action</Button>
21
- </CardFooter>
22
- </Card>
23
- );
24
-
25
- export const Default = Template.bind({});
26
-
27
- export const WithForm = () => (
28
- <Card className="w-[350px]">
29
- <CardHeader>
30
- <CardTitle>Create Account</CardTitle>
31
- <CardDescription>Enter your details below.</CardDescription>
32
- </CardHeader>
33
- <CardContent>
34
- <div className="grid w-full items-center gap-4">
35
- <div className="flex flex-col space-y-1.5">
36
- <label htmlFor="name">Name</label>
37
- <input id="name" className="border rounded p-2" />
38
- </div>
39
- <div className="flex flex-col space-y-1.5">
40
- <label htmlFor="email">Email</label>
41
- <input id="email" className="border rounded p-2" />
42
- </div>
43
- </div>
44
- </CardContent>
45
- <CardFooter className="flex justify-between">
46
- <Button variant="outline">Cancel</Button>
47
- <Button>Create</Button>
48
- </CardFooter>
49
- </Card>
50
- );
51
-
52
- export const Pricing = () => (
53
- <Card className="w-[350px]">
54
- <CardHeader>
55
- <CardTitle>Pro Plan</CardTitle>
56
- <CardDescription>$29/month</CardDescription>
57
- </CardHeader>
58
- <CardContent>
59
- <ul className="space-y-2">
60
- <li>✓ Feature 1</li>
61
- <li>✓ Feature 2</li>
62
- <li>✓ Feature 3</li>
63
- </ul>
64
- </CardContent>
65
- <CardFooter>
66
- <Button className="w-full">Subscribe</Button>
67
- </CardFooter>
68
- </Card>
69
- );
1
+ import { Meta, StoryFn } from "@storybook/react";
2
+ import { Button } from "../shadcn";
3
+ import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "../shadcn";
4
+
5
+ export default {
6
+ title: "Shadcn/Components/Card",
7
+ component: Card,
8
+ } as Meta;
9
+
10
+ const Template: StoryFn = () => (
11
+ <Card className="w-[350px]">
12
+ <CardHeader>
13
+ <CardTitle>Card Title</CardTitle>
14
+ <CardDescription>Card Description</CardDescription>
15
+ </CardHeader>
16
+ <CardContent>
17
+ <p>Card Content</p>
18
+ </CardContent>
19
+ <CardFooter>
20
+ <Button>Action</Button>
21
+ </CardFooter>
22
+ </Card>
23
+ );
24
+
25
+ export const Default = Template.bind({});
26
+
27
+ export const WithForm = () => (
28
+ <Card className="w-[350px]">
29
+ <CardHeader>
30
+ <CardTitle>Create Account</CardTitle>
31
+ <CardDescription>Enter your details below.</CardDescription>
32
+ </CardHeader>
33
+ <CardContent>
34
+ <div className="grid w-full items-center gap-4">
35
+ <div className="flex flex-col space-y-1.5">
36
+ <label htmlFor="name">Name</label>
37
+ <input id="name" className="border rounded p-2" />
38
+ </div>
39
+ <div className="flex flex-col space-y-1.5">
40
+ <label htmlFor="email">Email</label>
41
+ <input id="email" className="border rounded p-2" />
42
+ </div>
43
+ </div>
44
+ </CardContent>
45
+ <CardFooter className="flex justify-between">
46
+ <Button variant="outline">Cancel</Button>
47
+ <Button>Create</Button>
48
+ </CardFooter>
49
+ </Card>
50
+ );
51
+
52
+ export const Pricing = () => (
53
+ <Card className="w-[350px]">
54
+ <CardHeader>
55
+ <CardTitle>Pro Plan</CardTitle>
56
+ <CardDescription>$29/month</CardDescription>
57
+ </CardHeader>
58
+ <CardContent>
59
+ <ul className="space-y-2">
60
+ <li>✓ Feature 1</li>
61
+ <li>✓ Feature 2</li>
62
+ <li>✓ Feature 3</li>
63
+ </ul>
64
+ </CardContent>
65
+ <CardFooter>
66
+ <Button className="w-full">Subscribe</Button>
67
+ </CardFooter>
68
+ </Card>
69
+ );