@altimateai/ui-components 0.0.1-beta.3 → 0.0.1-beta.4

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 (55) hide show
  1. package/dist/Accordion.js +43 -114
  2. package/dist/Badge.js +1 -1
  3. package/dist/CoachForm.js +7112 -7241
  4. package/dist/DbtDocsRenderer.js +833 -2651
  5. package/dist/Tooltip.js +115 -0
  6. package/dist/chatbot/index.js +100 -96
  7. package/dist/flowchart-elk-definition-170a3958.js +1 -1
  8. package/dist/index.js +1 -1
  9. package/dist/index2.js +1 -5
  10. package/dist/lineage/index.js +2284 -2710
  11. package/dist/main.js +49 -184
  12. package/dist/mindmap-definition-44684416.js +1 -1
  13. package/dist/redux-toolkit.modern.js +1 -1
  14. package/dist/shadcn/index.js +352 -382
  15. package/dist/v4.js +524 -514
  16. package/package.json +2 -2
  17. package/dist/Stack.js +0 -132
  18. package/dist/assets/icons/index.d.ts +0 -96
  19. package/dist/chatbot/index.d.ts +0 -39
  20. package/dist/chatbotV2/index.d.ts +0 -176
  21. package/dist/index.d.ts +0 -217
  22. package/dist/lineage/index.d.ts +0 -183
  23. package/dist/shadcn/index.d.ts +0 -517
  24. package/dist/storybook/Accordion.stories.tsx +0 -61
  25. package/dist/storybook/Alert.stories.tsx +0 -65
  26. package/dist/storybook/AlertDialog.stories.tsx +0 -166
  27. package/dist/storybook/Avatar.stories.tsx +0 -58
  28. package/dist/storybook/Badge.stories.tsx +0 -36
  29. package/dist/storybook/Button.stories.tsx +0 -129
  30. package/dist/storybook/Card.stories.tsx +0 -76
  31. package/dist/storybook/Checkbox.stories.tsx +0 -74
  32. package/dist/storybook/Command.stories.tsx +0 -35
  33. package/dist/storybook/DropdownMenu.stories.tsx +0 -36
  34. package/dist/storybook/Form.stories.tsx +0 -120
  35. package/dist/storybook/HoverCard.stories.tsx +0 -105
  36. package/dist/storybook/Input.stories.tsx +0 -53
  37. package/dist/storybook/Label.stories.tsx +0 -42
  38. package/dist/storybook/Menubar.stories.tsx +0 -159
  39. package/dist/storybook/Pagination.stories.tsx +0 -155
  40. package/dist/storybook/Popover.stories.tsx +0 -25
  41. package/dist/storybook/Progress.stories.tsx +0 -89
  42. package/dist/storybook/RadioGroup.stories.tsx +0 -61
  43. package/dist/storybook/Resizable.stories.tsx +0 -119
  44. package/dist/storybook/ScrollArea.stories.tsx +0 -120
  45. package/dist/storybook/Select.stories.tsx +0 -95
  46. package/dist/storybook/Sheet.stories.tsx +0 -75
  47. package/dist/storybook/Sidebar.stories.tsx +0 -97
  48. package/dist/storybook/Slider.stories.tsx +0 -81
  49. package/dist/storybook/Switch.stories.tsx +0 -99
  50. package/dist/storybook/Textarea.stories.tsx +0 -50
  51. package/dist/storybook/Toast.stories.tsx +0 -111
  52. package/dist/storybook/Tooltip.stories.tsx +0 -33
  53. package/dist/storybook/Typography.stories.tsx +0 -178
  54. package/dist/types-PVxbm0tZ.d.ts +0 -99
  55. /package/dist/{Stack.css → v4.css} +0 -0
@@ -1,89 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { Progress } from "../shadcn";
3
- import { useEffect, useState } from "react";
4
-
5
- export default {
6
- title: "Shadcn/Components/Progress",
7
- component: Progress,
8
- argTypes: {
9
- value: {
10
- control: { type: "number", min: 0, max: 100 },
11
- },
12
- },
13
- } as Meta;
14
-
15
- const Template: StoryFn = (args) => <Progress {...args} />;
16
-
17
- export const Default = Template.bind({});
18
- Default.args = {
19
- value: 40,
20
- };
21
-
22
- export const Empty = Template.bind({});
23
- Empty.args = {
24
- value: 0,
25
- };
26
-
27
- export const Full = Template.bind({});
28
- Full.args = {
29
- value: 100,
30
- };
31
-
32
- export const CustomStyles: StoryFn = () => (
33
- <div className="al-space-y-4">
34
- <Progress value={40} className="al-h-2" />
35
- <Progress value={60} className="al-h-3 al-bg-secondary/20" />
36
- <Progress value={80} className="al-h-4 [&>div]:al-bg-green-500" />
37
- </div>
38
- );
39
-
40
- export const WithLabel: StoryFn = () => (
41
- <div className="al-space-y-2">
42
- <div className="al-flex al-justify-between al-text-sm">
43
- <span>Progress</span>
44
- <span>40%</span>
45
- </div>
46
- <Progress value={40} />
47
- </div>
48
- );
49
-
50
- export const Animated: StoryFn = () => {
51
- const [progress, setProgress] = useState(0);
52
-
53
- useEffect(() => {
54
- const timer = setInterval(() => {
55
- setProgress((prevProgress) => {
56
- if (prevProgress === 100) {
57
- return 0;
58
- }
59
- return Math.min(prevProgress + 10, 100);
60
- });
61
- }, 500);
62
-
63
- return () => {
64
- clearInterval(timer);
65
- };
66
- }, []);
67
-
68
- return <Progress value={progress} />;
69
- };
70
-
71
- export const WithCustomMaxValue: StoryFn = () => (
72
- <div className="al-space-y-2">
73
- <div className="al-flex al-justify-between al-text-sm">
74
- <span>Score</span>
75
- <span>7/10</span>
76
- </div>
77
- <Progress value={7} max={10} />
78
- </div>
79
- );
80
-
81
- export const Loading: StoryFn = () => (
82
- <div className="al-space-y-2">
83
- <div className="al-flex al-justify-between al-text-sm">
84
- <span>Loading...</span>
85
- <span className="al-text-muted-foreground">Please wait</span>
86
- </div>
87
- <Progress value={null} />
88
- </div>
89
- );
@@ -1,61 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { RadioGroup, RadioGroupItem } from "../shadcn";
3
-
4
- export default {
5
- title: "Shadcn/Components/RadioGroup",
6
- component: RadioGroup,
7
- } as Meta;
8
-
9
- const Template: StoryFn = (args) => (
10
- <RadioGroup defaultValue="option-1" {...args}>
11
- {["option-1", "option-2", "option-3"].map((option) => (
12
- <div key={option} className="al-flex al-items-center al-space-x-2">
13
- <RadioGroupItem value={option} id={option} />
14
- <label htmlFor={option} className="al-text-sm al-font-medium">
15
- {option.charAt(0).toUpperCase() + option.slice(1)}
16
- </label>
17
- </div>
18
- ))}
19
- </RadioGroup>
20
- );
21
-
22
- export const Default = Template.bind({});
23
-
24
- export const WithDisabledOption = () => (
25
- <RadioGroup defaultValue="option-1">
26
- <div className="flex items-center space-x-2">
27
- <RadioGroupItem value="option-1" id="option-1" />
28
- <label htmlFor="option-1" className="text-sm font-medium">
29
- Option 1
30
- </label>
31
- </div>
32
- <div className="flex items-center space-x-2">
33
- <RadioGroupItem value="option-2" id="option-2" disabled />
34
- <label
35
- htmlFor="option-2"
36
- className="text-sm font-medium text-muted-foreground"
37
- >
38
- Option 2 (Disabled)
39
- </label>
40
- </div>
41
- <div className="flex items-center space-x-2">
42
- <RadioGroupItem value="option-3" id="option-3" />
43
- <label htmlFor="option-3" className="text-sm font-medium">
44
- Option 3
45
- </label>
46
- </div>
47
- </RadioGroup>
48
- );
49
-
50
- export const Horizontal = () => (
51
- <RadioGroup defaultValue="option-1" className="al-flex al-space-x-4">
52
- {["option-1", "option-2", "option-3"].map((option) => (
53
- <div key={option} className="al-flex al-items-center al-space-x-2">
54
- <RadioGroupItem value={option} id={`h-${option}`} />
55
- <label htmlFor={`h-${option}`} className="al-text-sm al-font-medium">
56
- {option.charAt(0).toUpperCase() + option.slice(1)}
57
- </label>
58
- </div>
59
- ))}
60
- </RadioGroup>
61
- );
@@ -1,119 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from "../shadcn";
3
-
4
- export default {
5
- title: "Shadcn/Components/Resizable",
6
- component: ResizablePanelGroup,
7
- } as Meta;
8
-
9
- export const HorizontalLayout: StoryFn = () => (
10
- <div className="al-h-[400px] al-max-w-[800px] al-rounded-lg al-border">
11
- <ResizablePanelGroup direction="horizontal">
12
- <ResizablePanel defaultSize={25}>
13
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
14
- <span className="al-font-semibold">Sidebar</span>
15
- </div>
16
- </ResizablePanel>
17
- <ResizableHandle withHandle />
18
- <ResizablePanel defaultSize={75}>
19
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
20
- <span className="al-font-semibold">Content</span>
21
- </div>
22
- </ResizablePanel>
23
- </ResizablePanelGroup>
24
- </div>
25
- );
26
-
27
- export const VerticalLayout: StoryFn = () => (
28
- <div className="al-h-[400px] al-max-w-[800px] al-rounded-lg al-border">
29
- <ResizablePanelGroup direction="vertical">
30
- <ResizablePanel defaultSize={25}>
31
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
32
- <span className="al-font-semibold">Header</span>
33
- </div>
34
- </ResizablePanel>
35
- <ResizableHandle withHandle />
36
- <ResizablePanel defaultSize={75}>
37
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
38
- <span className="al-font-semibold">Content</span>
39
- </div>
40
- </ResizablePanel>
41
- </ResizablePanelGroup>
42
- </div>
43
- );
44
-
45
- export const ThreePanels: StoryFn = () => (
46
- <div className="al-h-[400px] al-max-w-[800px] al-rounded-lg al-border">
47
- <ResizablePanelGroup direction="horizontal">
48
- <ResizablePanel defaultSize={20}>
49
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
50
- <span className="al-font-semibold">Navigation</span>
51
- </div>
52
- </ResizablePanel>
53
- <ResizableHandle withHandle />
54
- <ResizablePanel defaultSize={60}>
55
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
56
- <span className="al-font-semibold">Content</span>
57
- </div>
58
- </ResizablePanel>
59
- <ResizableHandle withHandle />
60
- <ResizablePanel defaultSize={20}>
61
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
62
- <span className="al-font-semibold">Properties</span>
63
- </div>
64
- </ResizablePanel>
65
- </ResizablePanelGroup>
66
- </div>
67
- );
68
-
69
- export const NestedPanels: StoryFn = () => (
70
- <div className="al-h-[400px] al-max-w-[800px] al-rounded-lg al-border">
71
- <ResizablePanelGroup direction="horizontal">
72
- <ResizablePanel defaultSize={30}>
73
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
74
- <span className="al-font-semibold">Sidebar</span>
75
- </div>
76
- </ResizablePanel>
77
- <ResizableHandle withHandle />
78
- <ResizablePanel defaultSize={70}>
79
- <ResizablePanelGroup direction="vertical">
80
- <ResizablePanel defaultSize={70}>
81
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
82
- <span className="al-font-semibold">Main Content</span>
83
- </div>
84
- </ResizablePanel>
85
- <ResizableHandle withHandle />
86
- <ResizablePanel defaultSize={30}>
87
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
88
- <span className="al-font-semibold">Console</span>
89
- </div>
90
- </ResizablePanel>
91
- </ResizablePanelGroup>
92
- </ResizablePanel>
93
- </ResizablePanelGroup>
94
- </div>
95
- );
96
-
97
- export const WithMinSize: StoryFn = () => (
98
- <div className="al-h-[400px] al-max-w-[800px] al-rounded-lg al-border">
99
- <ResizablePanelGroup direction="horizontal">
100
- <ResizablePanel defaultSize={25} minSize={20}>
101
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
102
- <span className="al-font-semibold">Min 20%</span>
103
- </div>
104
- </ResizablePanel>
105
- <ResizableHandle withHandle />
106
- <ResizablePanel defaultSize={50}>
107
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
108
- <span className="al-font-semibold">Flexible</span>
109
- </div>
110
- </ResizablePanel>
111
- <ResizableHandle withHandle />
112
- <ResizablePanel defaultSize={25} minSize={15}>
113
- <div className="al-flex al-h-full al-items-center al-justify-center al-p-6">
114
- <span className="al-font-semibold">Min 15%</span>
115
- </div>
116
- </ResizablePanel>
117
- </ResizablePanelGroup>
118
- </div>
119
- );
@@ -1,120 +0,0 @@
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(
10
- (_, i, a) => `v1.2.0-beta.${a.length - i}`
11
- );
12
-
13
- export const Default: StoryFn = () => (
14
- <ScrollArea className="al-h-72 al-w-48 al-rounded-md al-border">
15
- <div className="al-p-4">
16
- <h4 className="al-mb-4 al-text-sm al-font-medium al-leading-none">
17
- Tags
18
- </h4>
19
- {tags.map((tag) => (
20
- <div key={tag} className="al-text-sm">
21
- {tag}
22
- </div>
23
- ))}
24
- </div>
25
- </ScrollArea>
26
- );
27
-
28
- export const HorizontalScroll: StoryFn = () => (
29
- <ScrollArea className="al-w-96 al-whitespace-nowrap al-rounded-md al-border">
30
- <div className="al-flex al-w-max al-space-x-4 al-p-4">
31
- {Array.from({ length: 50 }, (_, i) => (
32
- <div
33
- key={i}
34
- className="al-w-40 al-shrink-0 al-rounded-md al-border al-p-4"
35
- >
36
- <div className="al-text-sm">Item {i + 1}</div>
37
- </div>
38
- ))}
39
- </div>
40
- </ScrollArea>
41
- );
42
-
43
- export const WithContent: StoryFn = () => (
44
- <ScrollArea className="al-h-[300px] al-w-[350px] al-rounded-md al-border al-p-4">
45
- <div className="al-space-y-4">
46
- <h4 className="al-text-sm al-font-medium al-leading-none">
47
- Documentation
48
- </h4>
49
- {Array.from({ length: 20 }, (_, i) => (
50
- <div key={i} className="al-text-sm">
51
- <h5 className="al-mb-1 al-font-medium">Section {i + 1}</h5>
52
- <p className="al-text-muted-foreground">
53
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do
54
- eiusmod tempor incididunt ut labore et dolore magna aliqua.
55
- </p>
56
- </div>
57
- ))}
58
- </div>
59
- </ScrollArea>
60
- );
61
-
62
- export const WithCard: StoryFn = () => (
63
- <ScrollArea className="al-h-[300px] al-w-[600px] al-rounded-lg al-border">
64
- <div className="al-p-6">
65
- <h4 className="al-mb-4 al-text-xl al-font-bold">Recent Activity</h4>
66
- {Array.from({ length: 20 }, (_, i) => (
67
- <div
68
- key={i}
69
- className="al-mb-4 al-rounded-lg al-border al-p-4 last:al-mb-0"
70
- >
71
- <div className="al-flex al-items-center al-justify-between">
72
- <div className="al-space-y-1">
73
- <p className="al-text-sm al-font-medium al-leading-none">
74
- Activity {i + 1}
75
- </p>
76
- <p className="al-text-sm al-text-muted-foreground">
77
- This is a description of the activity that occurred.
78
- </p>
79
- </div>
80
- <div className="al-text-sm al-text-muted-foreground">
81
- {new Date().toLocaleDateString()}
82
- </div>
83
- </div>
84
- </div>
85
- ))}
86
- </div>
87
- </ScrollArea>
88
- );
89
-
90
- export const WithNestedContent: StoryFn = () => (
91
- <ScrollArea className="al-h-[400px] al-w-[600px] al-rounded-lg al-border">
92
- <div className="al-p-6">
93
- <h4 className="al-mb-4 al-text-xl al-font-bold">
94
- Nested Content Example
95
- </h4>
96
- <div className="al-grid al-gap-4">
97
- {Array.from({ length: 5 }, (_, i) => (
98
- <div key={i} className="al-space-y-2">
99
- <h5 className="al-text-lg al-font-semibold">Section {i + 1}</h5>
100
- <ScrollArea className="al-h-[150px] al-w-full al-rounded-md al-border">
101
- <div className="al-p-4">
102
- {Array.from({ length: 10 }, (_, j) => (
103
- <div
104
- key={j}
105
- className="al-mb-2 al-rounded al-border al-p-2 last:al-mb-0"
106
- >
107
- <p className="al-text-sm">Subsection {j + 1}</p>
108
- <p className="al-text-xs al-text-muted-foreground">
109
- Nested scrollable content example.
110
- </p>
111
- </div>
112
- ))}
113
- </div>
114
- </ScrollArea>
115
- </div>
116
- ))}
117
- </div>
118
- </div>
119
- </ScrollArea>
120
- );
@@ -1,95 +0,0 @@
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,75 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react";
2
- import { Button } from "../shadcn";
3
- import {
4
- Sheet,
5
- SheetTrigger,
6
- SheetContent,
7
- SheetHeader,
8
- SheetTitle,
9
- } from "../shadcn";
10
-
11
- export default {
12
- title: "Shadcn/Components/Sheet",
13
- component: Sheet,
14
- argTypes: {
15
- side: {
16
- control: "select",
17
- options: ["top", "right", "bottom", "left"],
18
- },
19
- },
20
- } as Meta;
21
-
22
- const Template: StoryFn = ({ side = "right" }) => (
23
- <Sheet>
24
- <SheetTrigger asChild>
25
- <Button variant="outline">Open Sheet</Button>
26
- </SheetTrigger>
27
- <SheetContent side={side}>
28
- <SheetHeader>
29
- <SheetTitle>Sheet Title</SheetTitle>
30
- </SheetHeader>
31
- <div className="al-py-4">
32
- <p>This is the sheet content.</p>
33
- </div>
34
- </SheetContent>
35
- </Sheet>
36
- );
37
-
38
- export const Default = Template.bind({});
39
-
40
- export const LeftSide = Template.bind({});
41
- LeftSide.args = {
42
- side: "left",
43
- };
44
-
45
- export const TopSide = Template.bind({});
46
- TopSide.args = {
47
- side: "top",
48
- };
49
-
50
- export const BottomSide = Template.bind({});
51
- BottomSide.args = {
52
- side: "bottom",
53
- };
54
-
55
- export const WithForm = () => (
56
- <Sheet>
57
- <SheetTrigger asChild>
58
- <Button variant="outline">Edit Profile</Button>
59
- </SheetTrigger>
60
- <SheetContent>
61
- <SheetHeader>
62
- <SheetTitle>Edit Profile</SheetTitle>
63
- </SheetHeader>
64
- <div className="al-grid al-gap-4 al-py-4">
65
- <div className="al-grid al-gap-2">
66
- <label htmlFor="name">Name</label>
67
- <input id="name" className="al-border al-rounded al-p-2" />
68
- </div>
69
- </div>
70
- <div className="al-flex al-justify-end">
71
- <Button>Save Changes</Button>
72
- </div>
73
- </SheetContent>
74
- </Sheet>
75
- );
@@ -1,97 +0,0 @@
1
- import type { Meta, StoryFn } from "@storybook/react";
2
- import { Sidebar, SidebarProvider } from "../shadcn";
3
-
4
- export default {
5
- title: "Shadcn/Components/Sidebar",
6
- component: Sidebar,
7
- decorators: [
8
- (Story) => (
9
- <SidebarProvider>
10
- <Story />
11
- </SidebarProvider>
12
- ),
13
- ],
14
- parameters: {
15
- layout: "fullscreen",
16
- },
17
- } as Meta<typeof Sidebar>;
18
-
19
- const Template: StoryFn<typeof Sidebar> = (args) => (
20
- <div className="al-h-screen">
21
- <Sidebar {...args}>
22
- <div className="al-p-4">
23
- <h2 className="al-text-lg al-font-semibold">Sidebar Content</h2>
24
- <p className="al-mt-2">This is an example of sidebar content.</p>
25
- <ul className="al-mt-4 al-space-y-2">
26
- <li>Menu Item 1</li>
27
- <li>Menu Item 2</li>
28
- <li>Menu Item 3</li>
29
- </ul>
30
- </div>
31
- </Sidebar>
32
- </div>
33
- );
34
-
35
- export const Default = Template.bind({});
36
- Default.args = {};
37
-
38
- export const RightSide = Template.bind({});
39
- RightSide.args = {
40
- side: "right",
41
- };
42
-
43
- export const FloatingVariant = Template.bind({});
44
- FloatingVariant.args = {
45
- variant: "floating",
46
- };
47
-
48
- export const InsetVariant = Template.bind({});
49
- InsetVariant.args = {
50
- variant: "inset",
51
- };
52
-
53
- export const IconCollapsible = Template.bind({});
54
- IconCollapsible.args = {
55
- collapsible: "icon",
56
- };
57
-
58
- export const NonCollapsible = Template.bind({});
59
- NonCollapsible.args = {
60
- collapsible: "none",
61
- };
62
-
63
- // Example with custom content and styling
64
- export const CustomStyling = Template.bind({});
65
- CustomStyling.args = {
66
- className: "al-bg-primary al-text-primary-foreground",
67
- };
68
-
69
- // Example with controlled state
70
- export const ControlledState: StoryFn<typeof Sidebar> = (args) => {
71
- return (
72
- <div className="al-h-screen">
73
- <SidebarProvider defaultOpen={false}>
74
- <Sidebar {...args}>
75
- <div className="al-p-4">
76
- <h2 className="al-text-lg al-font-semibold">Controlled Sidebar</h2>
77
- <p className="al-mt-2">This sidebar starts in a collapsed state.</p>
78
- </div>
79
- </Sidebar>
80
- </SidebarProvider>
81
- </div>
82
- );
83
- };
84
-
85
- // Example with mobile view
86
- export const MobileView: StoryFn<typeof Sidebar> = (args) => {
87
- return (
88
- <div className="al-h-screen al-w-screen md:al-hidden">
89
- <Sidebar {...args}>
90
- <div className="al-p-4">
91
- <h2 className="al-text-lg al-font-semibold">Mobile Sidebar</h2>
92
- <p className="al-mt-2">This sidebar is optimized for mobile view.</p>
93
- </div>
94
- </Sidebar>
95
- </div>
96
- );
97
- };