@syscore/ui-library 1.1.9 → 1.1.11

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 (141) hide show
  1. package/client/App.tsx +47 -0
  2. package/client/components/icons/ConceptIcons.tsx +667 -0
  3. package/client/components/icons/NavAccount.tsx +31 -0
  4. package/client/components/icons/NavBullet.tsx +19 -0
  5. package/client/components/icons/NavLogo.tsx +36 -0
  6. package/client/components/icons/ProviderBadges.tsx +295 -0
  7. package/client/components/icons/ProviderSeals.tsx +319 -0
  8. package/client/components/icons/SealHealthSafetyRating.tsx +65 -0
  9. package/client/components/icons/SealIwbiMember.tsx +86 -0
  10. package/client/components/icons/SealWell.tsx +84 -0
  11. package/client/components/icons/SealWellCertification.tsx +138 -0
  12. package/client/components/icons/SealWellCommunity.tsx +122 -0
  13. package/client/components/icons/SealWellResidence.tsx +122 -0
  14. package/client/components/icons/SealWorksWithWell.tsx +140 -0
  15. package/client/components/icons/UtilityAccordion.tsx +21 -0
  16. package/client/components/icons/UtilityChevronDown.tsx +36 -0
  17. package/client/components/icons/UtilityClassification.tsx +45 -0
  18. package/client/components/icons/UtilityClose.tsx +41 -0
  19. package/client/components/icons/UtilityDrag.tsx +69 -0
  20. package/client/components/icons/UtilityEdit.tsx +42 -0
  21. package/client/components/icons/UtilityOptions.tsx +45 -0
  22. package/client/components/icons/UtilityPortfolio.tsx +87 -0
  23. package/client/components/icons/UtilityReset.tsx +41 -0
  24. package/client/components/icons/UtilityScoring.tsx +43 -0
  25. package/client/components/icons/UtilitySearch.tsx +38 -0
  26. package/client/components/icons/UtilitySort.tsx +52 -0
  27. package/client/components/icons/UtilityText.tsx +34 -0
  28. package/client/components/icons/WaterMarkWWWProducts.tsx +26 -0
  29. package/client/components/icons/WaterMarkWellProjects.tsx +30 -0
  30. package/client/components/icons/WatermarkMemberOrg.tsx +59 -0
  31. package/client/components/icons/WellSeal.tsx +79 -0
  32. package/client/components/icons/X.tsx +35 -0
  33. package/client/components/ui/Navigation.tsx +958 -0
  34. package/client/components/ui/SearchField.tsx +157 -0
  35. package/client/components/ui/StrategyTable.tsx +303 -0
  36. package/client/components/ui/Tag.tsx +127 -0
  37. package/client/components/ui/alert-dialog.tsx +1 -1
  38. package/client/components/ui/button.tsx +67 -127
  39. package/client/components/ui/calendar.tsx +2 -2
  40. package/client/components/ui/card.tsx +10 -13
  41. package/client/components/ui/carousel.tsx +56 -46
  42. package/client/components/ui/command.tsx +27 -16
  43. package/client/components/ui/dialog.tsx +113 -92
  44. package/client/components/ui/label.tsx +5 -3
  45. package/client/components/ui/menubar.tsx +1 -1
  46. package/client/components/ui/pagination.tsx +3 -3
  47. package/client/components/ui/sidebar.tsx +1 -1
  48. package/client/components/ui/tabs.tsx +350 -5
  49. package/client/components/ui/toggle.tsx +71 -19
  50. package/client/components/ui/tooltip.tsx +69 -18
  51. package/client/global.css +635 -58
  52. package/client/hooks/UseTabs.tsx +35 -0
  53. package/client/hooks/use-mobile.tsx +21 -0
  54. package/client/hooks/use-segmented-control.ts +42 -0
  55. package/client/hooks/use-toast.ts +188 -0
  56. package/client/pages/Index.tsx +88 -0
  57. package/client/pages/NotFound.tsx +29 -0
  58. package/client/ui/Accordion/Accordion.stories.tsx +74 -0
  59. package/client/ui/Alert/Alert.stories.tsx +82 -0
  60. package/client/ui/AlertDialog/AlertDialog.stories.tsx +106 -0
  61. package/client/ui/AspectRatio.stories.tsx +78 -0
  62. package/client/ui/Avatar/Avatar.stories.tsx +94 -0
  63. package/client/ui/Badge/Badge.stories.tsx +60 -0
  64. package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +97 -0
  65. package/client/ui/Button.stories.tsx +429 -0
  66. package/client/ui/Calendar/Calendar.stories.tsx +99 -0
  67. package/client/ui/Card.stories.tsx +84 -0
  68. package/client/ui/Carousel/Carousel.stories.tsx +85 -0
  69. package/client/ui/Chart/Chart.stories.tsx +58 -0
  70. package/client/ui/Checkbox/Checkbox.stories.tsx +112 -0
  71. package/client/ui/Collapsible/Collapsible.stories.tsx +101 -0
  72. package/client/ui/Colors.stories.tsx +1041 -0
  73. package/client/ui/Command/Command.stories.tsx +97 -0
  74. package/client/ui/ContextMenu/ContextMenu.stories.tsx +74 -0
  75. package/client/ui/Dialog.stories.tsx +69 -0
  76. package/client/ui/Drawer/Drawer.stories.tsx +87 -0
  77. package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +139 -0
  78. package/client/ui/Form/Form.stories.tsx +74 -0
  79. package/client/ui/HoverCard/HoverCard.stories.tsx +94 -0
  80. package/client/ui/Icons.stories.tsx +328 -0
  81. package/client/ui/Input/Input.stories.tsx +69 -0
  82. package/client/ui/InputOTP/InputOTP.stories.tsx +85 -0
  83. package/client/ui/Label.stories.tsx +66 -0
  84. package/client/ui/Menubar/Menubar.stories.tsx +88 -0
  85. package/client/ui/Navigation.stories.tsx +57 -0
  86. package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +106 -0
  87. package/client/ui/Pagination/Pagination.stories.tsx +115 -0
  88. package/client/ui/Popover/Popover.stories.tsx +99 -0
  89. package/client/ui/Progress/Progress.stories.tsx +63 -0
  90. package/client/ui/RadioGroup/RadioGroup.stories.tsx +110 -0
  91. package/client/ui/Resizable/Resizable.stories.tsx +88 -0
  92. package/client/ui/ScrollArea/ScrollArea.stories.tsx +64 -0
  93. package/client/ui/SearchField.stories.tsx +63 -0
  94. package/client/ui/Select/Select.stories.tsx +111 -0
  95. package/client/ui/Separator/Separator.stories.tsx +67 -0
  96. package/client/ui/Sheet/Sheet.stories.tsx +138 -0
  97. package/client/ui/Sidebar/Sidebar.stories.tsx +92 -0
  98. package/client/ui/Skeleton/Skeleton.stories.tsx +65 -0
  99. package/client/ui/Slider/Slider.stories.tsx +101 -0
  100. package/client/ui/Sonner/Sonner.stories.tsx +48 -0
  101. package/client/ui/StrategyTable.stories.tsx +138 -0
  102. package/client/ui/Switch/Switch.stories.tsx +96 -0
  103. package/client/ui/Table/Table.stories.tsx +135 -0
  104. package/client/ui/Tabs.stories.tsx +33 -0
  105. package/client/ui/Tag.stories.tsx +190 -0
  106. package/client/ui/Textarea/Textarea.stories.tsx +56 -0
  107. package/client/ui/Toast/Toast.stories.tsx +76 -0
  108. package/client/ui/Toaster/Toaster.stories.tsx +52 -0
  109. package/client/ui/Toggle.stories.tsx +248 -0
  110. package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +88 -0
  111. package/client/ui/Tooltip.stories.tsx +72 -0
  112. package/client/ui/Typography.stories.tsx +421 -0
  113. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +115 -0
  114. package/client/ui/WELLDashboard/index.tsx +221 -0
  115. package/client/vite-env.d.ts +1 -0
  116. package/dist/ui/fonts/FT-Made/FTMade-Regular.otf +0 -0
  117. package/dist/ui/fonts/FT-Made/FTMade-Regular.ttf +0 -0
  118. package/dist/ui/fonts/FT-Made/FTMade-Regular.woff +0 -0
  119. package/dist/ui/fonts/FT-Made/FTMade-Regular.woff2 +0 -0
  120. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-black.otf +0 -0
  121. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-blackitalic.otf +0 -0
  122. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-bold.otf +0 -0
  123. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-bolditalic.otf +0 -0
  124. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-extrabold.otf +0 -0
  125. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-extrabolditalic.otf +0 -0
  126. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-extralight.otf +0 -0
  127. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-extralightitalic.otf +0 -0
  128. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-italic.otf +0 -0
  129. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-light.otf +0 -0
  130. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-lightitalic.otf +0 -0
  131. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-medium.otf +0 -0
  132. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-mediumitalic.otf +0 -0
  133. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-regular.otf +0 -0
  134. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-semibold.otf +0 -0
  135. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-semibolditalic.otf +0 -0
  136. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-thin.otf +0 -0
  137. package/dist/ui/fonts/Mazzard-M/mazzardsoftm-thinitalic.otf +0 -0
  138. package/dist/ui/index.cjs.js +1 -1
  139. package/dist/ui/index.d.ts +2 -1
  140. package/dist/ui/index.es.js +563 -329
  141. package/package.json +4 -2
@@ -0,0 +1,64 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { ScrollArea } from "../../components/ui/scroll-area";
3
+
4
+ const meta = {
5
+ title: "UI/ScrollArea",
6
+ component: ScrollArea,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "padded",
10
+ },
11
+ } satisfies Meta<typeof ScrollArea>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const Default: Story = {
18
+ render: () => (
19
+ <ScrollArea className="h-48 w-48 rounded-md border p-4">
20
+ <div className="space-y-2">
21
+ {Array.from({ length: 20 }).map((_, i) => (
22
+ <div key={i} className="text-sm">
23
+ Item {i + 1}
24
+ </div>
25
+ ))}
26
+ </div>
27
+ </ScrollArea>
28
+ ),
29
+ };
30
+
31
+ export const WithContent: Story = {
32
+ render: () => (
33
+ <ScrollArea className="h-64 w-full max-w-md rounded-md border p-4">
34
+ <div className="space-y-4">
35
+ {Array.from({ length: 10 }).map((_, i) => (
36
+ <div key={i} className="pb-4 last:pb-0">
37
+ <h4 className="font-semibold text-sm">Item {i + 1}</h4>
38
+ <p className="text-sm text-gray-600 line-clamp-2">
39
+ This is a sample content item with some text that might wrap to
40
+ multiple lines.
41
+ </p>
42
+ </div>
43
+ ))}
44
+ </div>
45
+ </ScrollArea>
46
+ ),
47
+ };
48
+
49
+ export const Horizontal: Story = {
50
+ render: () => (
51
+ <ScrollArea className="w-full h-32 rounded-md border">
52
+ <div className="flex gap-4 p-4">
53
+ {Array.from({ length: 10 }).map((_, i) => (
54
+ <div
55
+ key={i}
56
+ className="shrink-0 w-20 h-20 bg-gray-200 rounded flex items-center justify-center text-sm font-medium"
57
+ >
58
+ Item {i + 1}
59
+ </div>
60
+ ))}
61
+ </div>
62
+ </ScrollArea>
63
+ ),
64
+ };
@@ -0,0 +1,63 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { SearchField } from "@/components/ui/SearchField";
3
+
4
+ const meta = {
5
+ title: "Review/SearchField",
6
+ component: SearchField,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "centered",
10
+ },
11
+ } satisfies Meta<typeof SearchField>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ const mockOptions = [
18
+ { value: "1", label: "Air Quality" },
19
+ { value: "2", label: "Water Quality" },
20
+ { value: "3", label: "Light Quality" },
21
+ { value: "4", label: "Thermal Comfort" },
22
+ { value: "5", label: "Sound Quality" },
23
+ { value: "6", label: "Movement" },
24
+ { value: "7", label: "Nourishment" },
25
+ { value: "8", label: "Mind" },
26
+ { value: "9", label: "Community" },
27
+ { value: "10", label: "Materials" },
28
+ ];
29
+
30
+ export const Default: Story = {
31
+ args: {
32
+ options: mockOptions,
33
+ emptyMessage: "No results found",
34
+ placeholder: "Search...",
35
+ },
36
+ };
37
+
38
+ export const WithValue: Story = {
39
+ args: {
40
+ options: mockOptions,
41
+ emptyMessage: "No results found",
42
+ placeholder: "Search...",
43
+ value: { value: "1", label: "Air Quality" },
44
+ },
45
+ };
46
+
47
+ export const Loading: Story = {
48
+ args: {
49
+ options: mockOptions,
50
+ emptyMessage: "No results found",
51
+ placeholder: "Search...",
52
+ isLoading: true,
53
+ },
54
+ };
55
+
56
+ export const Disabled: Story = {
57
+ args: {
58
+ options: mockOptions,
59
+ emptyMessage: "No results found",
60
+ placeholder: "Search...",
61
+ disabled: true,
62
+ },
63
+ };
@@ -0,0 +1,111 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Select,
4
+ SelectContent,
5
+ SelectItem,
6
+ SelectTrigger,
7
+ SelectValue,
8
+ } from "../../components/ui/select";
9
+ import { useState } from "react";
10
+
11
+ const meta = {
12
+ title: "UI/Select",
13
+ component: Select,
14
+ tags: ["autodocs"],
15
+ parameters: {
16
+ layout: "padded",
17
+ },
18
+ } satisfies Meta<typeof Select>;
19
+
20
+ export default meta;
21
+
22
+ type Story = StoryObj<typeof meta>;
23
+
24
+ export const Default: Story = {
25
+ render: () => {
26
+ const [value, setValue] = useState("");
27
+ return (
28
+ <Select value={value} onValueChange={setValue}>
29
+ <SelectTrigger className="w-48">
30
+ <SelectValue placeholder="Select an option" />
31
+ </SelectTrigger>
32
+ <SelectContent>
33
+ <SelectItem value="option1">Option 1</SelectItem>
34
+ <SelectItem value="option2">Option 2</SelectItem>
35
+ <SelectItem value="option3">Option 3</SelectItem>
36
+ </SelectContent>
37
+ </Select>
38
+ );
39
+ },
40
+ };
41
+
42
+ export const Countries: Story = {
43
+ render: () => {
44
+ const [value, setValue] = useState("");
45
+ return (
46
+ <Select value={value} onValueChange={setValue}>
47
+ <SelectTrigger className="w-56">
48
+ <SelectValue placeholder="Select a country" />
49
+ </SelectTrigger>
50
+ <SelectContent>
51
+ <SelectItem value="us">United States</SelectItem>
52
+ <SelectItem value="ca">Canada</SelectItem>
53
+ <SelectItem value="uk">United Kingdom</SelectItem>
54
+ <SelectItem value="au">Australia</SelectItem>
55
+ <SelectItem value="de">Germany</SelectItem>
56
+ <SelectItem value="fr">France</SelectItem>
57
+ </SelectContent>
58
+ </Select>
59
+ );
60
+ },
61
+ };
62
+
63
+ export const Disabled: Story = {
64
+ render: () => (
65
+ <Select disabled>
66
+ <SelectTrigger className="w-48">
67
+ <SelectValue placeholder="Disabled select" />
68
+ </SelectTrigger>
69
+ <SelectContent>
70
+ <SelectItem value="option1">Option 1</SelectItem>
71
+ <SelectItem value="option2">Option 2</SelectItem>
72
+ </SelectContent>
73
+ </Select>
74
+ ),
75
+ };
76
+
77
+ export const WithDescription: Story = {
78
+ render: () => {
79
+ const [value, setValue] = useState("");
80
+ return (
81
+ <div className="space-y-2 w-full max-w-md">
82
+ <label className="text-sm font-medium">Choose a plan</label>
83
+ <Select value={value} onValueChange={setValue}>
84
+ <SelectTrigger>
85
+ <SelectValue placeholder="Select a plan" />
86
+ </SelectTrigger>
87
+ <SelectContent>
88
+ <SelectItem value="free">
89
+ <div>
90
+ <p className="font-medium">Free</p>
91
+ <p className="text-sm text-gray-500">Basic features</p>
92
+ </div>
93
+ </SelectItem>
94
+ <SelectItem value="pro">
95
+ <div>
96
+ <p className="font-medium">Pro</p>
97
+ <p className="text-sm text-gray-500">Advanced features</p>
98
+ </div>
99
+ </SelectItem>
100
+ <SelectItem value="enterprise">
101
+ <div>
102
+ <p className="font-medium">Enterprise</p>
103
+ <p className="text-sm text-gray-500">Custom solutions</p>
104
+ </div>
105
+ </SelectItem>
106
+ </SelectContent>
107
+ </Select>
108
+ </div>
109
+ );
110
+ },
111
+ };
@@ -0,0 +1,67 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Separator } from "../../components/ui/separator";
3
+
4
+ const meta = {
5
+ title: "UI/Separator",
6
+ component: Separator,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "padded",
10
+ },
11
+ } satisfies Meta<typeof Separator>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const Horizontal: Story = {
18
+ render: () => (
19
+ <div className="w-full max-w-md space-y-4">
20
+ <div>
21
+ <h4 className="font-semibold">Section One</h4>
22
+ <p className="text-sm text-gray-600">Some content here</p>
23
+ </div>
24
+ <Separator />
25
+ <div>
26
+ <h4 className="font-semibold">Section Two</h4>
27
+ <p className="text-sm text-gray-600">More content here</p>
28
+ </div>
29
+ </div>
30
+ ),
31
+ };
32
+
33
+ export const Vertical: Story = {
34
+ render: () => (
35
+ <div className="flex items-center gap-4 h-12 max-w-md">
36
+ <div>
37
+ <span className="text-sm font-semibold">Item 1</span>
38
+ </div>
39
+ <Separator orientation="vertical" />
40
+ <div>
41
+ <span className="text-sm font-semibold">Item 2</span>
42
+ </div>
43
+ <Separator orientation="vertical" />
44
+ <div>
45
+ <span className="text-sm font-semibold">Item 3</span>
46
+ </div>
47
+ </div>
48
+ ),
49
+ };
50
+
51
+ export const WithMargin: Story = {
52
+ render: () => (
53
+ <div className="w-full max-w-md">
54
+ <div className="space-y-2 mb-4">
55
+ <h3 className="font-semibold">Content Section</h3>
56
+ <p className="text-sm text-gray-600">This is the main content area.</p>
57
+ </div>
58
+ <Separator className="my-4" />
59
+ <div className="space-y-2">
60
+ <h3 className="font-semibold">Another Section</h3>
61
+ <p className="text-sm text-gray-600">
62
+ This section is separated from the previous one.
63
+ </p>
64
+ </div>
65
+ </div>
66
+ ),
67
+ };
@@ -0,0 +1,138 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Sheet,
4
+ SheetTrigger,
5
+ SheetContent,
6
+ SheetHeader,
7
+ SheetTitle,
8
+ SheetDescription,
9
+ SheetFooter,
10
+ } from "../../components/ui/sheet";
11
+ import { Button } from "../../components/ui/button";
12
+ import { useState } from "react";
13
+
14
+ const meta = {
15
+ title: "UI/Sheet",
16
+ component: Sheet,
17
+ tags: ["autodocs"],
18
+ parameters: {
19
+ layout: "centered",
20
+ },
21
+ } satisfies Meta<typeof Sheet>;
22
+
23
+ export default meta;
24
+
25
+ type Story = StoryObj<typeof meta>;
26
+
27
+ export const Default: Story = {
28
+ render: () => {
29
+ const [open, setOpen] = useState(false);
30
+ return (
31
+ <Sheet open={open} onOpenChange={setOpen}>
32
+ <SheetTrigger asChild>
33
+ <Button>Open Sheet</Button>
34
+ </SheetTrigger>
35
+ <SheetContent>
36
+ <SheetHeader>
37
+ <SheetTitle>Sheet Title</SheetTitle>
38
+ <SheetDescription>Sheet description goes here.</SheetDescription>
39
+ </SheetHeader>
40
+ <div className="py-4">
41
+ <p className="text-sm">Sheet content</p>
42
+ </div>
43
+ <SheetFooter>
44
+ <Button onClick={() => setOpen(false)}>Done</Button>
45
+ </SheetFooter>
46
+ </SheetContent>
47
+ </Sheet>
48
+ );
49
+ },
50
+ };
51
+
52
+ export const Left: Story = {
53
+ render: () => {
54
+ const [open, setOpen] = useState(false);
55
+ return (
56
+ <Sheet open={open} onOpenChange={setOpen}>
57
+ <SheetTrigger asChild>
58
+ <Button>Open Sheet</Button>
59
+ </SheetTrigger>
60
+ <SheetContent side="left">
61
+ <SheetHeader>
62
+ <SheetTitle>Navigation</SheetTitle>
63
+ </SheetHeader>
64
+ <div className="space-y-2 py-4">
65
+ <button className="w-full text-left px-4 py-2 hover:bg-gray-100 rounded">
66
+ Home
67
+ </button>
68
+ <button className="w-full text-left px-4 py-2 hover:bg-gray-100 rounded">
69
+ About
70
+ </button>
71
+ <button className="w-full text-left px-4 py-2 hover:bg-gray-100 rounded">
72
+ Contact
73
+ </button>
74
+ </div>
75
+ </SheetContent>
76
+ </Sheet>
77
+ );
78
+ },
79
+ };
80
+
81
+ export const Top: Story = {
82
+ render: () => {
83
+ const [open, setOpen] = useState(false);
84
+ return (
85
+ <Sheet open={open} onOpenChange={setOpen}>
86
+ <SheetTrigger asChild>
87
+ <Button>Open Sheet</Button>
88
+ </SheetTrigger>
89
+ <SheetContent side="top">
90
+ <SheetHeader>
91
+ <SheetTitle>Top Sheet</SheetTitle>
92
+ </SheetHeader>
93
+ <div className="py-4">
94
+ <p className="text-sm">Top sheet content</p>
95
+ </div>
96
+ </SheetContent>
97
+ </Sheet>
98
+ );
99
+ },
100
+ };
101
+
102
+ export const WithForm: Story = {
103
+ render: () => {
104
+ const [open, setOpen] = useState(false);
105
+ return (
106
+ <Sheet open={open} onOpenChange={setOpen}>
107
+ <SheetTrigger asChild>
108
+ <Button>Add Item</Button>
109
+ </SheetTrigger>
110
+ <SheetContent>
111
+ <SheetHeader>
112
+ <SheetTitle>Add New Item</SheetTitle>
113
+ <SheetDescription>Fill in the details below</SheetDescription>
114
+ </SheetHeader>
115
+ <div className="space-y-4 py-4">
116
+ <div className="space-y-2">
117
+ <label className="text-sm font-medium">Name</label>
118
+ <input
119
+ className="w-full border rounded px-3 py-2 text-sm"
120
+ placeholder="Item name"
121
+ />
122
+ </div>
123
+ <div className="space-y-2">
124
+ <label className="text-sm font-medium">Description</label>
125
+ <textarea
126
+ className="w-full border rounded px-3 py-2 text-sm"
127
+ placeholder="Item description"
128
+ />
129
+ </div>
130
+ </div>
131
+ <SheetFooter>
132
+ <Button onClick={() => setOpen(false)}>Add Item</Button>
133
+ </SheetFooter>
134
+ </SheetContent>
135
+ </Sheet>
136
+ );
137
+ },
138
+ };
@@ -0,0 +1,92 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Sidebar,
4
+ SidebarContent,
5
+ SidebarGroup,
6
+ SidebarGroupContent,
7
+ SidebarGroupLabel,
8
+ SidebarMenu,
9
+ SidebarMenuButton,
10
+ SidebarMenuItem,
11
+ SidebarHeader,
12
+ SidebarFooter,
13
+ } from "../../components/ui/sidebar";
14
+ import { Home, Settings, Users, CreditCard, LogOut } from "lucide-react";
15
+
16
+ const meta = {
17
+ title: "UI/Sidebar",
18
+ component: Sidebar,
19
+ tags: ["autodocs"],
20
+ parameters: {
21
+ layout: "padded",
22
+ },
23
+ } satisfies Meta<typeof Sidebar>;
24
+
25
+ export default meta;
26
+
27
+ type Story = StoryObj<typeof meta>;
28
+
29
+ export const Default: Story = {
30
+ render: () => (
31
+ <div className="flex gap-4 border rounded-lg overflow-hidden h-96">
32
+ <Sidebar>
33
+ <SidebarHeader>
34
+ <h2 className="font-semibold">App</h2>
35
+ </SidebarHeader>
36
+ <SidebarContent>
37
+ <SidebarGroup>
38
+ <SidebarGroupLabel>Main</SidebarGroupLabel>
39
+ <SidebarGroupContent>
40
+ <SidebarMenu>
41
+ <SidebarMenuItem>
42
+ <SidebarMenuButton>
43
+ <Home className="h-4 w-4 mr-2" />
44
+ Home
45
+ </SidebarMenuButton>
46
+ </SidebarMenuItem>
47
+ <SidebarMenuItem>
48
+ <SidebarMenuButton>
49
+ <Users className="h-4 w-4 mr-2" />
50
+ Users
51
+ </SidebarMenuButton>
52
+ </SidebarMenuItem>
53
+ </SidebarMenu>
54
+ </SidebarGroupContent>
55
+ </SidebarGroup>
56
+ <SidebarGroup>
57
+ <SidebarGroupLabel>Settings</SidebarGroupLabel>
58
+ <SidebarGroupContent>
59
+ <SidebarMenu>
60
+ <SidebarMenuItem>
61
+ <SidebarMenuButton>
62
+ <Settings className="h-4 w-4 mr-2" />
63
+ Settings
64
+ </SidebarMenuButton>
65
+ </SidebarMenuItem>
66
+ <SidebarMenuItem>
67
+ <SidebarMenuButton>
68
+ <CreditCard className="h-4 w-4 mr-2" />
69
+ Billing
70
+ </SidebarMenuButton>
71
+ </SidebarMenuItem>
72
+ </SidebarMenu>
73
+ </SidebarGroupContent>
74
+ </SidebarGroup>
75
+ </SidebarContent>
76
+ <SidebarFooter>
77
+ <SidebarMenu>
78
+ <SidebarMenuItem>
79
+ <SidebarMenuButton>
80
+ <LogOut className="h-4 w-4 mr-2" />
81
+ Logout
82
+ </SidebarMenuButton>
83
+ </SidebarMenuItem>
84
+ </SidebarMenu>
85
+ </SidebarFooter>
86
+ </Sidebar>
87
+ <div className="flex-1 p-4 bg-gray-50">
88
+ <p className="text-sm text-gray-600">Main content area</p>
89
+ </div>
90
+ </div>
91
+ ),
92
+ };
@@ -0,0 +1,65 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Skeleton } from "../../components/ui/skeleton";
3
+
4
+ const meta = {
5
+ title: "UI/Skeleton",
6
+ component: Skeleton,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "padded",
10
+ },
11
+ } satisfies Meta<typeof Skeleton>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const Default: Story = {
18
+ render: () => <Skeleton className="w-12 h-12 rounded-full" />,
19
+ };
20
+
21
+ export const Card: Story = {
22
+ render: () => (
23
+ <div className="space-y-3 w-full max-w-sm p-4 bg-white rounded-lg border">
24
+ <Skeleton className="h-12 rounded-full w-12" />
25
+ <Skeleton className="h-4 w-3/4" />
26
+ <Skeleton className="h-4 w-1/2" />
27
+ <div className="pt-2 space-y-2">
28
+ <Skeleton className="h-3 w-full" />
29
+ <Skeleton className="h-3 w-5/6" />
30
+ </div>
31
+ </div>
32
+ ),
33
+ };
34
+
35
+ export const Avatar: Story = {
36
+ render: () => <Skeleton className="h-12 w-12 rounded-full" />,
37
+ };
38
+
39
+ export const CardGrid: Story = {
40
+ render: () => (
41
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4 max-w-4xl">
42
+ {[1, 2, 3].map((i) => (
43
+ <div key={i} className="space-y-3 p-4 bg-white rounded-lg border">
44
+ <Skeleton className="h-48 w-full rounded" />
45
+ <Skeleton className="h-4 w-3/4" />
46
+ <Skeleton className="h-4 w-1/2" />
47
+ <div className="pt-2 space-y-2">
48
+ <Skeleton className="h-3 w-full" />
49
+ <Skeleton className="h-3 w-5/6" />
50
+ </div>
51
+ </div>
52
+ ))}
53
+ </div>
54
+ ),
55
+ };
56
+
57
+ export const Text: Story = {
58
+ render: () => (
59
+ <div className="space-y-2 w-full max-w-md">
60
+ <Skeleton className="h-4 w-full" />
61
+ <Skeleton className="h-4 w-5/6" />
62
+ <Skeleton className="h-4 w-4/6" />
63
+ </div>
64
+ ),
65
+ };