@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,101 +1,101 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { ScrollArea } from "../shadcn";
3
-
4
- export default {
5
- title: "Shadcn/Components/ScrollArea",
6
- component: ScrollArea,
7
- } as Meta;
8
-
9
- const tags = Array.from({ length: 50 }).map((_, i, a) => `v1.2.0-beta.${a.length - i}`);
10
-
11
- export const Default: StoryFn = () => (
12
- <ScrollArea className="al-h-72 al-w-48 al-rounded-md al-border">
13
- <div className="al-p-4">
14
- <h4 className="al-mb-4 al-text-sm al-font-medium al-leading-none">Tags</h4>
15
- {tags.map(tag => (
16
- <div key={tag} className="al-text-sm">
17
- {tag}
18
- </div>
19
- ))}
20
- </div>
21
- </ScrollArea>
22
- );
23
-
24
- export const HorizontalScroll: StoryFn = () => (
25
- <ScrollArea className="al-w-96 al-whitespace-nowrap al-rounded-md al-border">
26
- <div className="al-flex al-w-max al-space-x-4 al-p-4">
27
- {Array.from({ length: 50 }, (_, i) => (
28
- <div key={i} className="al-w-40 al-shrink-0 al-rounded-md al-border al-p-4">
29
- <div className="al-text-sm">Item {i + 1}</div>
30
- </div>
31
- ))}
32
- </div>
33
- </ScrollArea>
34
- );
35
-
36
- export const WithContent: StoryFn = () => (
37
- <ScrollArea className="al-h-[300px] al-w-[350px] al-rounded-md al-border al-p-4">
38
- <div className="al-space-y-4">
39
- <h4 className="al-text-sm al-font-medium al-leading-none">Documentation</h4>
40
- {Array.from({ length: 20 }, (_, i) => (
41
- <div key={i} className="al-text-sm">
42
- <h5 className="al-mb-1 al-font-medium">Section {i + 1}</h5>
43
- <p className="al-text-muted-foreground">
44
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor
45
- incididunt ut labore et dolore magna aliqua.
46
- </p>
47
- </div>
48
- ))}
49
- </div>
50
- </ScrollArea>
51
- );
52
-
53
- export const WithCard: StoryFn = () => (
54
- <ScrollArea className="al-h-[300px] al-w-[600px] al-rounded-lg al-border">
55
- <div className="al-p-6">
56
- <h4 className="al-mb-4 al-text-xl al-font-bold">Recent Activity</h4>
57
- {Array.from({ length: 20 }, (_, i) => (
58
- <div key={i} className="al-mb-4 al-rounded-lg al-border al-p-4 last:al-mb-0">
59
- <div className="al-flex al-items-center al-justify-between">
60
- <div className="al-space-y-1">
61
- <p className="al-text-sm al-font-medium al-leading-none">Activity {i + 1}</p>
62
- <p className="al-text-sm al-text-muted-foreground">
63
- This is a description of the activity that occurred.
64
- </p>
65
- </div>
66
- <div className="al-text-sm al-text-muted-foreground">
67
- {new Date().toLocaleDateString()}
68
- </div>
69
- </div>
70
- </div>
71
- ))}
72
- </div>
73
- </ScrollArea>
74
- );
75
-
76
- export const WithNestedContent: StoryFn = () => (
77
- <ScrollArea className="al-h-[400px] al-w-[600px] al-rounded-lg al-border">
78
- <div className="al-p-6">
79
- <h4 className="al-mb-4 al-text-xl al-font-bold">Nested Content Example</h4>
80
- <div className="al-grid al-gap-4">
81
- {Array.from({ length: 5 }, (_, i) => (
82
- <div key={i} className="al-space-y-2">
83
- <h5 className="al-text-lg al-font-semibold">Section {i + 1}</h5>
84
- <ScrollArea className="al-h-[150px] al-w-full al-rounded-md al-border">
85
- <div className="al-p-4">
86
- {Array.from({ length: 10 }, (_, j) => (
87
- <div key={j} className="al-mb-2 al-rounded al-border al-p-2 last:al-mb-0">
88
- <p className="al-text-sm">Subsection {j + 1}</p>
89
- <p className="al-text-xs al-text-muted-foreground">
90
- Nested scrollable content example.
91
- </p>
92
- </div>
93
- ))}
94
- </div>
95
- </ScrollArea>
96
- </div>
97
- ))}
98
- </div>
99
- </div>
100
- </ScrollArea>
101
- );
1
+ import { Meta, StoryFn } from "@storybook/react";
2
+ import { ScrollArea } from "../shadcn";
3
+
4
+ export default {
5
+ title: "Shadcn/Components/ScrollArea",
6
+ component: ScrollArea,
7
+ } as Meta;
8
+
9
+ const tags = Array.from({ length: 50 }).map((_, i, a) => `v1.2.0-beta.${a.length - i}`);
10
+
11
+ export const Default: StoryFn = () => (
12
+ <ScrollArea className="al-h-72 al-w-48 al-rounded-md al-border">
13
+ <div className="al-p-4">
14
+ <h4 className="al-mb-4 al-text-sm al-font-medium al-leading-none">Tags</h4>
15
+ {tags.map(tag => (
16
+ <div key={tag} className="al-text-sm">
17
+ {tag}
18
+ </div>
19
+ ))}
20
+ </div>
21
+ </ScrollArea>
22
+ );
23
+
24
+ export const HorizontalScroll: StoryFn = () => (
25
+ <ScrollArea className="al-w-96 al-whitespace-nowrap al-rounded-md al-border">
26
+ <div className="al-flex al-w-max al-space-x-4 al-p-4">
27
+ {Array.from({ length: 50 }, (_, i) => (
28
+ <div key={i} className="al-w-40 al-shrink-0 al-rounded-md al-border al-p-4">
29
+ <div className="al-text-sm">Item {i + 1}</div>
30
+ </div>
31
+ ))}
32
+ </div>
33
+ </ScrollArea>
34
+ );
35
+
36
+ export const WithContent: StoryFn = () => (
37
+ <ScrollArea className="al-h-[300px] al-w-[350px] al-rounded-md al-border al-p-4">
38
+ <div className="al-space-y-4">
39
+ <h4 className="al-text-sm al-font-medium al-leading-none">Documentation</h4>
40
+ {Array.from({ length: 20 }, (_, i) => (
41
+ <div key={i} className="al-text-sm">
42
+ <h5 className="al-mb-1 al-font-medium">Section {i + 1}</h5>
43
+ <p className="al-text-muted-foreground">
44
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor
45
+ incididunt ut labore et dolore magna aliqua.
46
+ </p>
47
+ </div>
48
+ ))}
49
+ </div>
50
+ </ScrollArea>
51
+ );
52
+
53
+ export const WithCard: StoryFn = () => (
54
+ <ScrollArea className="al-h-[300px] al-w-[600px] al-rounded-lg al-border">
55
+ <div className="al-p-6">
56
+ <h4 className="al-mb-4 al-text-xl al-font-bold">Recent Activity</h4>
57
+ {Array.from({ length: 20 }, (_, i) => (
58
+ <div key={i} className="al-mb-4 al-rounded-lg al-border al-p-4 last:al-mb-0">
59
+ <div className="al-flex al-items-center al-justify-between">
60
+ <div className="al-space-y-1">
61
+ <p className="al-text-sm al-font-medium al-leading-none">Activity {i + 1}</p>
62
+ <p className="al-text-sm al-text-muted-foreground">
63
+ This is a description of the activity that occurred.
64
+ </p>
65
+ </div>
66
+ <div className="al-text-sm al-text-muted-foreground">
67
+ {new Date().toLocaleDateString()}
68
+ </div>
69
+ </div>
70
+ </div>
71
+ ))}
72
+ </div>
73
+ </ScrollArea>
74
+ );
75
+
76
+ export const WithNestedContent: StoryFn = () => (
77
+ <ScrollArea className="al-h-[400px] al-w-[600px] al-rounded-lg al-border">
78
+ <div className="al-p-6">
79
+ <h4 className="al-mb-4 al-text-xl al-font-bold">Nested Content Example</h4>
80
+ <div className="al-grid al-gap-4">
81
+ {Array.from({ length: 5 }, (_, i) => (
82
+ <div key={i} className="al-space-y-2">
83
+ <h5 className="al-text-lg al-font-semibold">Section {i + 1}</h5>
84
+ <ScrollArea className="al-h-[150px] al-w-full al-rounded-md al-border">
85
+ <div className="al-p-4">
86
+ {Array.from({ length: 10 }, (_, j) => (
87
+ <div key={j} className="al-mb-2 al-rounded al-border al-p-2 last:al-mb-0">
88
+ <p className="al-text-sm">Subsection {j + 1}</p>
89
+ <p className="al-text-xs al-text-muted-foreground">
90
+ Nested scrollable content example.
91
+ </p>
92
+ </div>
93
+ ))}
94
+ </div>
95
+ </ScrollArea>
96
+ </div>
97
+ ))}
98
+ </div>
99
+ </div>
100
+ </ScrollArea>
101
+ );
@@ -1,95 +1,95 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import {
3
- Select,
4
- SelectTrigger,
5
- SelectContent,
6
- SelectItem,
7
- SelectValue,
8
- SelectGroup,
9
- SelectLabel,
10
- SelectSeparator,
11
- } from "../shadcn";
12
-
13
- export default {
14
- title: "Shadcn/Components/Select",
15
- component: Select,
16
- } as Meta;
17
-
18
- const Template: StoryFn = args => (
19
- <Select {...args}>
20
- <SelectTrigger>
21
- <SelectValue placeholder="Select an option" />
22
- </SelectTrigger>
23
- <SelectContent>
24
- <SelectItem value="option1">Option 1</SelectItem>
25
- <SelectItem value="option2">Option 2</SelectItem>
26
- <SelectItem value="option3">Option 3</SelectItem>
27
- </SelectContent>
28
- </Select>
29
- );
30
-
31
- export const Default = Template.bind({});
32
-
33
- export const WithGroups: StoryFn = () => (
34
- <Select>
35
- <SelectTrigger className="al-w-[280px]">
36
- <SelectValue placeholder="Select a fruit" />
37
- </SelectTrigger>
38
- <SelectContent>
39
- <SelectGroup>
40
- <SelectLabel>Fruits</SelectLabel>
41
- <SelectItem value="apple">Apple</SelectItem>
42
- <SelectItem value="banana">Banana</SelectItem>
43
- <SelectItem value="orange">Orange</SelectItem>
44
- </SelectGroup>
45
- <SelectSeparator />
46
- <SelectGroup>
47
- <SelectLabel>Vegetables</SelectLabel>
48
- <SelectItem value="carrot">Carrot</SelectItem>
49
- <SelectItem value="potato">Potato</SelectItem>
50
- <SelectItem value="tomato">Tomato</SelectItem>
51
- </SelectGroup>
52
- </SelectContent>
53
- </Select>
54
- );
55
-
56
- export const Disabled: StoryFn = () => (
57
- <Select disabled>
58
- <SelectTrigger className="al-w-[280px]">
59
- <SelectValue placeholder="Select an option" />
60
- </SelectTrigger>
61
- <SelectContent>
62
- <SelectItem value="option1">Option 1</SelectItem>
63
- <SelectItem value="option2">Option 2</SelectItem>
64
- <SelectItem value="option3">Option 3</SelectItem>
65
- </SelectContent>
66
- </Select>
67
- );
68
-
69
- export const WithDisabledOptions: StoryFn = () => (
70
- <Select>
71
- <SelectTrigger className="al-w-[280px]">
72
- <SelectValue placeholder="Select an option" />
73
- </SelectTrigger>
74
- <SelectContent>
75
- <SelectItem value="option1">Option 1</SelectItem>
76
- <SelectItem value="option2" disabled>
77
- Option 2 (Disabled)
78
- </SelectItem>
79
- <SelectItem value="option3">Option 3</SelectItem>
80
- </SelectContent>
81
- </Select>
82
- );
83
-
84
- export const WithDefaultValue: StoryFn = () => (
85
- <Select defaultValue="option2">
86
- <SelectTrigger className="al-w-[280px]">
87
- <SelectValue />
88
- </SelectTrigger>
89
- <SelectContent>
90
- <SelectItem value="option1">Option 1</SelectItem>
91
- <SelectItem value="option2">Option 2</SelectItem>
92
- <SelectItem value="option3">Option 3</SelectItem>
93
- </SelectContent>
94
- </Select>
95
- );
1
+ import { Meta, StoryFn } from "@storybook/react";
2
+ import {
3
+ Select,
4
+ SelectTrigger,
5
+ SelectContent,
6
+ SelectItem,
7
+ SelectValue,
8
+ SelectGroup,
9
+ SelectLabel,
10
+ SelectSeparator,
11
+ } from "../shadcn";
12
+
13
+ export default {
14
+ title: "Shadcn/Components/Select",
15
+ component: Select,
16
+ } as Meta;
17
+
18
+ const Template: StoryFn = args => (
19
+ <Select {...args}>
20
+ <SelectTrigger>
21
+ <SelectValue placeholder="Select an option" />
22
+ </SelectTrigger>
23
+ <SelectContent>
24
+ <SelectItem value="option1">Option 1</SelectItem>
25
+ <SelectItem value="option2">Option 2</SelectItem>
26
+ <SelectItem value="option3">Option 3</SelectItem>
27
+ </SelectContent>
28
+ </Select>
29
+ );
30
+
31
+ export const Default = Template.bind({});
32
+
33
+ export const WithGroups: StoryFn = () => (
34
+ <Select>
35
+ <SelectTrigger className="al-w-[280px]">
36
+ <SelectValue placeholder="Select a fruit" />
37
+ </SelectTrigger>
38
+ <SelectContent>
39
+ <SelectGroup>
40
+ <SelectLabel>Fruits</SelectLabel>
41
+ <SelectItem value="apple">Apple</SelectItem>
42
+ <SelectItem value="banana">Banana</SelectItem>
43
+ <SelectItem value="orange">Orange</SelectItem>
44
+ </SelectGroup>
45
+ <SelectSeparator />
46
+ <SelectGroup>
47
+ <SelectLabel>Vegetables</SelectLabel>
48
+ <SelectItem value="carrot">Carrot</SelectItem>
49
+ <SelectItem value="potato">Potato</SelectItem>
50
+ <SelectItem value="tomato">Tomato</SelectItem>
51
+ </SelectGroup>
52
+ </SelectContent>
53
+ </Select>
54
+ );
55
+
56
+ export const Disabled: StoryFn = () => (
57
+ <Select disabled>
58
+ <SelectTrigger className="al-w-[280px]">
59
+ <SelectValue placeholder="Select an option" />
60
+ </SelectTrigger>
61
+ <SelectContent>
62
+ <SelectItem value="option1">Option 1</SelectItem>
63
+ <SelectItem value="option2">Option 2</SelectItem>
64
+ <SelectItem value="option3">Option 3</SelectItem>
65
+ </SelectContent>
66
+ </Select>
67
+ );
68
+
69
+ export const WithDisabledOptions: StoryFn = () => (
70
+ <Select>
71
+ <SelectTrigger className="al-w-[280px]">
72
+ <SelectValue placeholder="Select an option" />
73
+ </SelectTrigger>
74
+ <SelectContent>
75
+ <SelectItem value="option1">Option 1</SelectItem>
76
+ <SelectItem value="option2" disabled>
77
+ Option 2 (Disabled)
78
+ </SelectItem>
79
+ <SelectItem value="option3">Option 3</SelectItem>
80
+ </SelectContent>
81
+ </Select>
82
+ );
83
+
84
+ export const WithDefaultValue: StoryFn = () => (
85
+ <Select defaultValue="option2">
86
+ <SelectTrigger className="al-w-[280px]">
87
+ <SelectValue />
88
+ </SelectTrigger>
89
+ <SelectContent>
90
+ <SelectItem value="option1">Option 1</SelectItem>
91
+ <SelectItem value="option2">Option 2</SelectItem>
92
+ <SelectItem value="option3">Option 3</SelectItem>
93
+ </SelectContent>
94
+ </Select>
95
+ );
@@ -1,69 +1,69 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { Button } from "../shadcn";
3
- import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle } from "../shadcn";
4
-
5
- export default {
6
- title: "Shadcn/Components/Sheet",
7
- component: Sheet,
8
- argTypes: {
9
- side: {
10
- control: "select",
11
- options: ["top", "right", "bottom", "left"],
12
- },
13
- },
14
- } as Meta;
15
-
16
- const Template: StoryFn = ({ side = "right" }) => (
17
- <Sheet>
18
- <SheetTrigger asChild>
19
- <Button variant="outline">Open Sheet</Button>
20
- </SheetTrigger>
21
- <SheetContent side={side}>
22
- <SheetHeader>
23
- <SheetTitle>Sheet Title</SheetTitle>
24
- </SheetHeader>
25
- <div className="al-py-4">
26
- <p>This is the sheet content.</p>
27
- </div>
28
- </SheetContent>
29
- </Sheet>
30
- );
31
-
32
- export const Default = Template.bind({});
33
-
34
- export const LeftSide = Template.bind({});
35
- LeftSide.args = {
36
- side: "left",
37
- };
38
-
39
- export const TopSide = Template.bind({});
40
- TopSide.args = {
41
- side: "top",
42
- };
43
-
44
- export const BottomSide = Template.bind({});
45
- BottomSide.args = {
46
- side: "bottom",
47
- };
48
-
49
- export const WithForm = () => (
50
- <Sheet>
51
- <SheetTrigger asChild>
52
- <Button variant="outline">Edit Profile</Button>
53
- </SheetTrigger>
54
- <SheetContent>
55
- <SheetHeader>
56
- <SheetTitle>Edit Profile</SheetTitle>
57
- </SheetHeader>
58
- <div className="al-grid al-gap-4 al-py-4">
59
- <div className="al-grid al-gap-2">
60
- <label htmlFor="name">Name</label>
61
- <input id="name" className="al-border al-rounded al-p-2" />
62
- </div>
63
- </div>
64
- <div className="al-flex al-justify-end">
65
- <Button>Save Changes</Button>
66
- </div>
67
- </SheetContent>
68
- </Sheet>
69
- );
1
+ import { Meta, StoryFn } from "@storybook/react";
2
+ import { Button } from "../shadcn";
3
+ import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle } from "../shadcn";
4
+
5
+ export default {
6
+ title: "Shadcn/Components/Sheet",
7
+ component: Sheet,
8
+ argTypes: {
9
+ side: {
10
+ control: "select",
11
+ options: ["top", "right", "bottom", "left"],
12
+ },
13
+ },
14
+ } as Meta;
15
+
16
+ const Template: StoryFn = ({ side = "right" }) => (
17
+ <Sheet>
18
+ <SheetTrigger asChild>
19
+ <Button variant="outline">Open Sheet</Button>
20
+ </SheetTrigger>
21
+ <SheetContent side={side}>
22
+ <SheetHeader>
23
+ <SheetTitle>Sheet Title</SheetTitle>
24
+ </SheetHeader>
25
+ <div className="al-py-4">
26
+ <p>This is the sheet content.</p>
27
+ </div>
28
+ </SheetContent>
29
+ </Sheet>
30
+ );
31
+
32
+ export const Default = Template.bind({});
33
+
34
+ export const LeftSide = Template.bind({});
35
+ LeftSide.args = {
36
+ side: "left",
37
+ };
38
+
39
+ export const TopSide = Template.bind({});
40
+ TopSide.args = {
41
+ side: "top",
42
+ };
43
+
44
+ export const BottomSide = Template.bind({});
45
+ BottomSide.args = {
46
+ side: "bottom",
47
+ };
48
+
49
+ export const WithForm = () => (
50
+ <Sheet>
51
+ <SheetTrigger asChild>
52
+ <Button variant="outline">Edit Profile</Button>
53
+ </SheetTrigger>
54
+ <SheetContent>
55
+ <SheetHeader>
56
+ <SheetTitle>Edit Profile</SheetTitle>
57
+ </SheetHeader>
58
+ <div className="al-grid al-gap-4 al-py-4">
59
+ <div className="al-grid al-gap-2">
60
+ <label htmlFor="name">Name</label>
61
+ <input id="name" className="al-border al-rounded al-p-2" />
62
+ </div>
63
+ </div>
64
+ <div className="al-flex al-justify-end">
65
+ <Button>Save Changes</Button>
66
+ </div>
67
+ </SheetContent>
68
+ </Sheet>
69
+ );