@syscore/ui-library 1.1.10 → 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 (100) 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/hooks/UseTabs.tsx +35 -0
  34. package/client/hooks/use-mobile.tsx +21 -0
  35. package/client/hooks/use-segmented-control.ts +42 -0
  36. package/client/hooks/use-toast.ts +188 -0
  37. package/client/pages/Index.tsx +88 -0
  38. package/client/pages/NotFound.tsx +29 -0
  39. package/client/ui/Accordion/Accordion.stories.tsx +74 -0
  40. package/client/ui/Alert/Alert.stories.tsx +82 -0
  41. package/client/ui/AlertDialog/AlertDialog.stories.tsx +106 -0
  42. package/client/ui/AspectRatio.stories.tsx +78 -0
  43. package/client/ui/Avatar/Avatar.stories.tsx +94 -0
  44. package/client/ui/Badge/Badge.stories.tsx +60 -0
  45. package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +97 -0
  46. package/client/ui/Button.stories.tsx +429 -0
  47. package/client/ui/Calendar/Calendar.stories.tsx +99 -0
  48. package/client/ui/Card.stories.tsx +84 -0
  49. package/client/ui/Carousel/Carousel.stories.tsx +85 -0
  50. package/client/ui/Chart/Chart.stories.tsx +58 -0
  51. package/client/ui/Checkbox/Checkbox.stories.tsx +112 -0
  52. package/client/ui/Collapsible/Collapsible.stories.tsx +101 -0
  53. package/client/ui/Colors.stories.tsx +1041 -0
  54. package/client/ui/Command/Command.stories.tsx +97 -0
  55. package/client/ui/ContextMenu/ContextMenu.stories.tsx +74 -0
  56. package/client/ui/Dialog.stories.tsx +69 -0
  57. package/client/ui/Drawer/Drawer.stories.tsx +87 -0
  58. package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +139 -0
  59. package/client/ui/Form/Form.stories.tsx +74 -0
  60. package/client/ui/HoverCard/HoverCard.stories.tsx +94 -0
  61. package/client/ui/Icons.stories.tsx +328 -0
  62. package/client/ui/Input/Input.stories.tsx +69 -0
  63. package/client/ui/InputOTP/InputOTP.stories.tsx +85 -0
  64. package/client/ui/Label.stories.tsx +66 -0
  65. package/client/ui/Menubar/Menubar.stories.tsx +88 -0
  66. package/client/ui/Navigation.stories.tsx +57 -0
  67. package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +106 -0
  68. package/client/ui/Pagination/Pagination.stories.tsx +115 -0
  69. package/client/ui/Popover/Popover.stories.tsx +99 -0
  70. package/client/ui/Progress/Progress.stories.tsx +63 -0
  71. package/client/ui/RadioGroup/RadioGroup.stories.tsx +110 -0
  72. package/client/ui/Resizable/Resizable.stories.tsx +88 -0
  73. package/client/ui/ScrollArea/ScrollArea.stories.tsx +64 -0
  74. package/client/ui/SearchField.stories.tsx +63 -0
  75. package/client/ui/Select/Select.stories.tsx +111 -0
  76. package/client/ui/Separator/Separator.stories.tsx +67 -0
  77. package/client/ui/Sheet/Sheet.stories.tsx +138 -0
  78. package/client/ui/Sidebar/Sidebar.stories.tsx +92 -0
  79. package/client/ui/Skeleton/Skeleton.stories.tsx +65 -0
  80. package/client/ui/Slider/Slider.stories.tsx +101 -0
  81. package/client/ui/Sonner/Sonner.stories.tsx +48 -0
  82. package/client/ui/StrategyTable.stories.tsx +138 -0
  83. package/client/ui/Switch/Switch.stories.tsx +96 -0
  84. package/client/ui/Table/Table.stories.tsx +135 -0
  85. package/client/ui/Tabs.stories.tsx +33 -0
  86. package/client/ui/Tag.stories.tsx +190 -0
  87. package/client/ui/Textarea/Textarea.stories.tsx +56 -0
  88. package/client/ui/Toast/Toast.stories.tsx +76 -0
  89. package/client/ui/Toaster/Toaster.stories.tsx +52 -0
  90. package/client/ui/Toggle.stories.tsx +248 -0
  91. package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +88 -0
  92. package/client/ui/Tooltip.stories.tsx +72 -0
  93. package/client/ui/Typography.stories.tsx +421 -0
  94. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +115 -0
  95. package/client/ui/WELLDashboard/index.tsx +221 -0
  96. package/client/vite-env.d.ts +1 -0
  97. package/dist/ui/index.cjs.js +1 -1
  98. package/dist/ui/index.d.ts +1 -0
  99. package/dist/ui/index.es.js +163 -1
  100. package/package.json +2 -1
@@ -0,0 +1,57 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Navigation } from "@/components/ui/Navigation";
3
+
4
+ const meta = {
5
+ title: "Review/Navigation",
6
+ component: Navigation,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "fullscreen",
10
+ },
11
+ } satisfies Meta<typeof Navigation>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ const navItems = [
18
+ { label: "WELL", active: true },
19
+ { label: "Pursuits", active: false },
20
+ { label: "Network", active: false },
21
+ { label: "Knowledge", active: false },
22
+ { label: "IWBI", active: false },
23
+ ];
24
+
25
+ export const Default: Story = {
26
+ render: () => (
27
+ <div className="h-screen bg-[linear-gradient(var(--gradient-0))]">
28
+ <Navigation
29
+ navItems={navItems}
30
+ isStrategy={false}
31
+ onLinkClick={(href) => console.log("Clicked:", href)}
32
+ />
33
+ <div className="pt-20 p-8">
34
+ <p className="text-gray-600">
35
+ Navigation component is fixed at the top.
36
+ </p>
37
+ <p className="text-gray-600">Hover over menu items to see dropdowns.</p>
38
+ </div>
39
+ </div>
40
+ ),
41
+ };
42
+
43
+ export const StrategyMode: Story = {
44
+ render: () => (
45
+ <div className="h-screen bg-white">
46
+ <Navigation
47
+ navItems={navItems}
48
+ isStrategy={true}
49
+ onLinkClick={(href) => console.log("Clicked:", href)}
50
+ />
51
+
52
+ <div className="pt-20 p-8">
53
+ <p className="text-gray-600">Strategy mode navigation.</p>
54
+ </div>
55
+ </div>
56
+ ),
57
+ };
@@ -0,0 +1,106 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ NavigationMenu,
4
+ NavigationMenuList,
5
+ NavigationMenuItem,
6
+ NavigationMenuTrigger,
7
+ NavigationMenuContent,
8
+ NavigationMenuLink,
9
+ } from "../../components/ui/navigation-menu";
10
+
11
+ const meta = {
12
+ title: "UI/NavigationMenu",
13
+ component: NavigationMenu,
14
+ tags: ["autodocs"],
15
+ parameters: {
16
+ layout: "padded",
17
+ },
18
+ } satisfies Meta<typeof NavigationMenu>;
19
+
20
+ export default meta;
21
+
22
+ type Story = StoryObj<typeof meta>;
23
+
24
+ export const Default: Story = {
25
+ render: () => (
26
+ <NavigationMenu>
27
+ <NavigationMenuList>
28
+ <NavigationMenuItem>
29
+ <NavigationMenuTrigger>Getting started</NavigationMenuTrigger>
30
+ <NavigationMenuContent>
31
+ <div className="grid gap-4 p-4 md:w-[400px] lg:w-[500px]">
32
+ <div className="space-y-1">
33
+ <NavigationMenuLink
34
+ href="/docs"
35
+ className="block text-sm font-medium"
36
+ >
37
+ Introduction
38
+ </NavigationMenuLink>
39
+ <p className="text-sm text-gray-600">
40
+ Get started with our guides and tutorials.
41
+ </p>
42
+ </div>
43
+ </div>
44
+ </NavigationMenuContent>
45
+ </NavigationMenuItem>
46
+ <NavigationMenuItem>
47
+ <NavigationMenuTrigger>Components</NavigationMenuTrigger>
48
+ <NavigationMenuContent>
49
+ <div className="grid gap-4 p-4 md:w-[400px] lg:w-[500px]">
50
+ <div className="space-y-1">
51
+ <NavigationMenuLink
52
+ href="/docs/components"
53
+ className="block text-sm font-medium"
54
+ >
55
+ All Components
56
+ </NavigationMenuLink>
57
+ <p className="text-sm text-gray-600">
58
+ Browse our component library.
59
+ </p>
60
+ </div>
61
+ </div>
62
+ </NavigationMenuContent>
63
+ </NavigationMenuItem>
64
+ <NavigationMenuItem>
65
+ <NavigationMenuLink href="/docs/api" className="text-sm font-medium">
66
+ Documentation
67
+ </NavigationMenuLink>
68
+ </NavigationMenuItem>
69
+ </NavigationMenuList>
70
+ </NavigationMenu>
71
+ ),
72
+ };
73
+
74
+ export const Complex: Story = {
75
+ render: () => (
76
+ <NavigationMenu>
77
+ <NavigationMenuList>
78
+ <NavigationMenuItem>
79
+ <NavigationMenuTrigger>Products</NavigationMenuTrigger>
80
+ <NavigationMenuContent>
81
+ <ul className="grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px]">
82
+ <li>
83
+ <NavigationMenuLink
84
+ href="#"
85
+ className="block p-3 rounded-lg hover:bg-gray-100"
86
+ >
87
+ <div className="text-sm font-medium">Pro</div>
88
+ <p className="text-xs text-gray-600">Advanced features</p>
89
+ </NavigationMenuLink>
90
+ </li>
91
+ <li>
92
+ <NavigationMenuLink
93
+ href="#"
94
+ className="block p-3 rounded-lg hover:bg-gray-100"
95
+ >
96
+ <div className="text-sm font-medium">Team</div>
97
+ <p className="text-xs text-gray-600">For teams</p>
98
+ </NavigationMenuLink>
99
+ </li>
100
+ </ul>
101
+ </NavigationMenuContent>
102
+ </NavigationMenuItem>
103
+ </NavigationMenuList>
104
+ </NavigationMenu>
105
+ ),
106
+ };
@@ -0,0 +1,115 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Pagination,
4
+ PaginationContent,
5
+ PaginationEllipsis,
6
+ PaginationItem,
7
+ PaginationLink,
8
+ PaginationNext,
9
+ PaginationPrevious,
10
+ } from "../../components/ui/pagination";
11
+
12
+ const meta = {
13
+ title: "UI/Pagination",
14
+ component: Pagination,
15
+ tags: ["autodocs"],
16
+ parameters: {
17
+ layout: "padded",
18
+ },
19
+ } satisfies Meta<typeof Pagination>;
20
+
21
+ export default meta;
22
+
23
+ type Story = StoryObj<typeof meta>;
24
+
25
+ export const Default: Story = {
26
+ render: () => (
27
+ <Pagination>
28
+ <PaginationContent>
29
+ <PaginationItem>
30
+ <PaginationPrevious href="#" />
31
+ </PaginationItem>
32
+ <PaginationItem>
33
+ <PaginationLink href="#">1</PaginationLink>
34
+ </PaginationItem>
35
+ <PaginationItem>
36
+ <PaginationLink href="#" isActive>
37
+ 2
38
+ </PaginationLink>
39
+ </PaginationItem>
40
+ <PaginationItem>
41
+ <PaginationLink href="#">3</PaginationLink>
42
+ </PaginationItem>
43
+ <PaginationItem>
44
+ <PaginationEllipsis />
45
+ </PaginationItem>
46
+ <PaginationItem>
47
+ <PaginationNext href="#" />
48
+ </PaginationItem>
49
+ </PaginationContent>
50
+ </Pagination>
51
+ ),
52
+ };
53
+
54
+ export const Extended: Story = {
55
+ render: () => (
56
+ <Pagination>
57
+ <PaginationContent>
58
+ <PaginationItem>
59
+ <PaginationPrevious href="#" />
60
+ </PaginationItem>
61
+ {[1, 2, 3, 4, 5, 6, 7, 8].map((page) => (
62
+ <PaginationItem key={page}>
63
+ <PaginationLink href="#" isActive={page === 3}>
64
+ {page}
65
+ </PaginationLink>
66
+ </PaginationItem>
67
+ ))}
68
+ <PaginationItem>
69
+ <PaginationEllipsis />
70
+ </PaginationItem>
71
+ <PaginationItem>
72
+ <PaginationNext href="#" />
73
+ </PaginationItem>
74
+ </PaginationContent>
75
+ </Pagination>
76
+ ),
77
+ };
78
+
79
+ export const WithEllipsis: Story = {
80
+ render: () => (
81
+ <Pagination>
82
+ <PaginationContent>
83
+ <PaginationItem>
84
+ <PaginationPrevious href="#" />
85
+ </PaginationItem>
86
+ <PaginationItem>
87
+ <PaginationLink href="#">1</PaginationLink>
88
+ </PaginationItem>
89
+ <PaginationItem>
90
+ <PaginationEllipsis />
91
+ </PaginationItem>
92
+ <PaginationItem>
93
+ <PaginationLink href="#">10</PaginationLink>
94
+ </PaginationItem>
95
+ <PaginationItem>
96
+ <PaginationLink href="#" isActive>
97
+ 11
98
+ </PaginationLink>
99
+ </PaginationItem>
100
+ <PaginationItem>
101
+ <PaginationLink href="#">12</PaginationLink>
102
+ </PaginationItem>
103
+ <PaginationItem>
104
+ <PaginationEllipsis />
105
+ </PaginationItem>
106
+ <PaginationItem>
107
+ <PaginationLink href="#">20</PaginationLink>
108
+ </PaginationItem>
109
+ <PaginationItem>
110
+ <PaginationNext href="#" />
111
+ </PaginationItem>
112
+ </PaginationContent>
113
+ </Pagination>
114
+ ),
115
+ };
@@ -0,0 +1,99 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Popover,
4
+ PopoverTrigger,
5
+ PopoverContent,
6
+ } from "../../components/ui/popover";
7
+ import { Button } from "../../components/ui/button";
8
+ import { useState } from "react";
9
+
10
+ const meta = {
11
+ title: "UI/Popover",
12
+ component: Popover,
13
+ tags: ["autodocs"],
14
+ parameters: {
15
+ layout: "centered",
16
+ },
17
+ } satisfies Meta<typeof Popover>;
18
+
19
+ export default meta;
20
+
21
+ type Story = StoryObj<typeof meta>;
22
+
23
+ export const Default: Story = {
24
+ render: () => {
25
+ const [open, setOpen] = useState(false);
26
+ return (
27
+ <Popover open={open} onOpenChange={setOpen}>
28
+ <PopoverTrigger asChild>
29
+ <Button variant="outline">Open Popover</Button>
30
+ </PopoverTrigger>
31
+ <PopoverContent>
32
+ <div className="space-y-2">
33
+ <h4 className="font-semibold text-sm">Popover Title</h4>
34
+ <p className="text-sm text-gray-600">
35
+ This is the popover content. Click outside to close.
36
+ </p>
37
+ </div>
38
+ </PopoverContent>
39
+ </Popover>
40
+ );
41
+ },
42
+ };
43
+
44
+ export const WithMenu: Story = {
45
+ render: () => {
46
+ const [open, setOpen] = useState(false);
47
+ return (
48
+ <Popover open={open} onOpenChange={setOpen}>
49
+ <PopoverTrigger asChild>
50
+ <Button variant="outline">Menu</Button>
51
+ </PopoverTrigger>
52
+ <PopoverContent className="w-48">
53
+ <div className="space-y-2">
54
+ <button className="w-full text-left px-4 py-2 text-sm hover:bg-gray-100 rounded">
55
+ Option 1
56
+ </button>
57
+ <button className="w-full text-left px-4 py-2 text-sm hover:bg-gray-100 rounded">
58
+ Option 2
59
+ </button>
60
+ <button className="w-full text-left px-4 py-2 text-sm hover:bg-gray-100 rounded">
61
+ Option 3
62
+ </button>
63
+ </div>
64
+ </PopoverContent>
65
+ </Popover>
66
+ );
67
+ },
68
+ };
69
+
70
+ export const Profile: Story = {
71
+ render: () => {
72
+ const [open, setOpen] = useState(false);
73
+ return (
74
+ <Popover open={open} onOpenChange={setOpen}>
75
+ <PopoverTrigger asChild>
76
+ <Button variant="ghost">Profile</Button>
77
+ </PopoverTrigger>
78
+ <PopoverContent className="w-64">
79
+ <div className="space-y-3">
80
+ <div className="flex items-center gap-3">
81
+ <div className="w-10 h-10 rounded-full bg-gray-200"></div>
82
+ <div>
83
+ <p className="text-sm font-semibold">John Doe</p>
84
+ <p className="text-xs text-gray-600">john@example.com</p>
85
+ </div>
86
+ </div>
87
+ <hr className="my-2" />
88
+ <button className="w-full text-left px-4 py-2 text-sm hover:bg-gray-100 rounded">
89
+ Settings
90
+ </button>
91
+ <button className="w-full text-left px-4 py-2 text-sm hover:bg-gray-100 rounded">
92
+ Sign Out
93
+ </button>
94
+ </div>
95
+ </PopoverContent>
96
+ </Popover>
97
+ );
98
+ },
99
+ };
@@ -0,0 +1,63 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Progress } from "../../components/ui/progress";
3
+
4
+ const meta = {
5
+ title: "UI/Progress",
6
+ component: Progress,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "padded",
10
+ },
11
+ } satisfies Meta<typeof Progress>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const Default: Story = {
18
+ args: {
19
+ value: 65,
20
+ },
21
+ };
22
+
23
+ export const Values: Story = {
24
+ render: () => (
25
+ <div className="space-y-6 w-full max-w-md">
26
+ <div>
27
+ <div className="flex justify-between text-sm mb-2">
28
+ <span>0%</span>
29
+ <span>0%</span>
30
+ </div>
31
+ <Progress value={0} />
32
+ </div>
33
+ <div>
34
+ <div className="flex justify-between text-sm mb-2">
35
+ <span>Loading...</span>
36
+ <span>25%</span>
37
+ </div>
38
+ <Progress value={25} />
39
+ </div>
40
+ <div>
41
+ <div className="flex justify-between text-sm mb-2">
42
+ <span>Processing...</span>
43
+ <span>50%</span>
44
+ </div>
45
+ <Progress value={50} />
46
+ </div>
47
+ <div>
48
+ <div className="flex justify-between text-sm mb-2">
49
+ <span>Almost done...</span>
50
+ <span>75%</span>
51
+ </div>
52
+ <Progress value={75} />
53
+ </div>
54
+ <div>
55
+ <div className="flex justify-between text-sm mb-2">
56
+ <span>Complete</span>
57
+ <span>100%</span>
58
+ </div>
59
+ <Progress value={100} />
60
+ </div>
61
+ </div>
62
+ ),
63
+ };
@@ -0,0 +1,110 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { RadioGroup, RadioGroupItem } from "../../components/ui/radio-group";
3
+ import { Label } from "../../components/ui/Label";
4
+ import { useState } from "react";
5
+
6
+ const meta = {
7
+ title: "UI/RadioGroup",
8
+ component: RadioGroup,
9
+ tags: ["autodocs"],
10
+ parameters: {
11
+ layout: "centered",
12
+ },
13
+ } satisfies Meta<typeof RadioGroup>;
14
+
15
+ export default meta;
16
+
17
+ type Story = StoryObj<typeof meta>;
18
+
19
+ export const Default: Story = {
20
+ render: () => {
21
+ const [value, setValue] = useState("");
22
+ return (
23
+ <RadioGroup value={value} onValueChange={setValue}>
24
+ <div className="flex items-center space-x-2">
25
+ <RadioGroupItem value="option-1" id="option-1" />
26
+ <Label htmlFor="option-1">Option 1</Label>
27
+ </div>
28
+ <div className="flex items-center space-x-2">
29
+ <RadioGroupItem value="option-2" id="option-2" />
30
+ <Label htmlFor="option-2">Option 2</Label>
31
+ </div>
32
+ <div className="flex items-center space-x-2">
33
+ <RadioGroupItem value="option-3" id="option-3" />
34
+ <Label htmlFor="option-3">Option 3</Label>
35
+ </div>
36
+ </RadioGroup>
37
+ );
38
+ },
39
+ };
40
+
41
+ export const Vertical: Story = {
42
+ render: () => {
43
+ const [value, setValue] = useState("comfort");
44
+ return (
45
+ <RadioGroup value={value} onValueChange={setValue}>
46
+ <div className="space-y-3">
47
+ <div className="flex items-center space-x-2">
48
+ <RadioGroupItem value="comfortable" id="comfortable" />
49
+ <Label htmlFor="comfortable">Comfortable</Label>
50
+ </div>
51
+ <div className="flex items-center space-x-2">
52
+ <RadioGroupItem value="compact" id="compact" />
53
+ <Label htmlFor="compact">Compact</Label>
54
+ </div>
55
+ <div className="flex items-center space-x-2">
56
+ <RadioGroupItem value="spacious" id="spacious" />
57
+ <Label htmlFor="spacious">Spacious</Label>
58
+ </div>
59
+ </div>
60
+ </RadioGroup>
61
+ );
62
+ },
63
+ };
64
+
65
+ export const WithDescription: Story = {
66
+ render: () => {
67
+ const [value, setValue] = useState("free");
68
+ return (
69
+ <RadioGroup
70
+ value={value}
71
+ onValueChange={setValue}
72
+ className="w-full max-w-md"
73
+ >
74
+ <div className="space-y-4">
75
+ <div className="flex items-start space-x-2">
76
+ <RadioGroupItem value="free" id="free" className="mt-1" />
77
+ <div>
78
+ <Label htmlFor="free">Free</Label>
79
+ <p className="text-sm text-gray-600 mt-1">
80
+ All basic features included
81
+ </p>
82
+ </div>
83
+ </div>
84
+ <div className="flex items-start space-x-2">
85
+ <RadioGroupItem value="pro" id="pro" className="mt-1" />
86
+ <div>
87
+ <Label htmlFor="pro">Pro</Label>
88
+ <p className="text-sm text-gray-600 mt-1">
89
+ Advanced features and priority support
90
+ </p>
91
+ </div>
92
+ </div>
93
+ <div className="flex items-start space-x-2">
94
+ <RadioGroupItem
95
+ value="enterprise"
96
+ id="enterprise"
97
+ className="mt-1"
98
+ />
99
+ <div>
100
+ <Label htmlFor="enterprise">Enterprise</Label>
101
+ <p className="text-sm text-gray-600 mt-1">
102
+ Custom solutions and dedicated support
103
+ </p>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </RadioGroup>
108
+ );
109
+ },
110
+ };
@@ -0,0 +1,88 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ ResizablePanelGroup,
4
+ ResizablePanel,
5
+ ResizableHandle,
6
+ } from "../../components/ui/resizable";
7
+
8
+ const meta = {
9
+ title: "UI/Resizable",
10
+ component: ResizablePanelGroup,
11
+ tags: ["autodocs"],
12
+ parameters: {
13
+ layout: "padded",
14
+ },
15
+ } satisfies Meta<typeof ResizablePanelGroup>;
16
+
17
+ export default meta;
18
+
19
+ type Story = StoryObj<typeof meta>;
20
+
21
+ export const Horizontal: Story = {
22
+ render: () => (
23
+ <ResizablePanelGroup
24
+ direction="horizontal"
25
+ className="w-full h-64 rounded-lg border"
26
+ >
27
+ <ResizablePanel defaultSize={50} minSize={20}>
28
+ <div className="flex items-center justify-center h-full bg-gray-50">
29
+ <span className="text-gray-600">Panel 1</span>
30
+ </div>
31
+ </ResizablePanel>
32
+ <ResizableHandle />
33
+ <ResizablePanel defaultSize={50} minSize={20}>
34
+ <div className="flex items-center justify-center h-full bg-gray-100">
35
+ <span className="text-gray-600">Panel 2</span>
36
+ </div>
37
+ </ResizablePanel>
38
+ </ResizablePanelGroup>
39
+ ),
40
+ };
41
+
42
+ export const Vertical: Story = {
43
+ render: () => (
44
+ <ResizablePanelGroup
45
+ direction="vertical"
46
+ className="w-full h-96 rounded-lg border"
47
+ >
48
+ <ResizablePanel defaultSize={50} minSize={20}>
49
+ <div className="flex items-center justify-center h-full bg-blue-50">
50
+ <span className="text-gray-600">Top Panel</span>
51
+ </div>
52
+ </ResizablePanel>
53
+ <ResizableHandle />
54
+ <ResizablePanel defaultSize={50} minSize={20}>
55
+ <div className="flex items-center justify-center h-full bg-blue-100">
56
+ <span className="text-gray-600">Bottom Panel</span>
57
+ </div>
58
+ </ResizablePanel>
59
+ </ResizablePanelGroup>
60
+ ),
61
+ };
62
+
63
+ export const Multiple: Story = {
64
+ render: () => (
65
+ <ResizablePanelGroup
66
+ direction="horizontal"
67
+ className="w-full h-64 rounded-lg border"
68
+ >
69
+ <ResizablePanel defaultSize={33} minSize={15}>
70
+ <div className="flex items-center justify-center h-full bg-gray-50">
71
+ <span className="text-gray-600">Left</span>
72
+ </div>
73
+ </ResizablePanel>
74
+ <ResizableHandle />
75
+ <ResizablePanel defaultSize={34} minSize={15}>
76
+ <div className="flex items-center justify-center h-full bg-gray-100">
77
+ <span className="text-gray-600">Center</span>
78
+ </div>
79
+ </ResizablePanel>
80
+ <ResizableHandle />
81
+ <ResizablePanel defaultSize={33} minSize={15}>
82
+ <div className="flex items-center justify-center h-full bg-gray-200">
83
+ <span className="text-gray-600">Right</span>
84
+ </div>
85
+ </ResizablePanel>
86
+ </ResizablePanelGroup>
87
+ ),
88
+ };