@bearmenu/ui 0.1.1 → 0.5.0

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 (113) hide show
  1. package/dist/{chunk-2CUFS5LF.js → chunk-2BMJRXQX.js} +1 -1
  2. package/dist/chunk-HLQ2IRE7.js +279 -0
  3. package/dist/chunk-IQASCH2V.js +25 -0
  4. package/dist/{chunk-UXAYXRFN.js → chunk-QJ54Z7TC.js} +15 -1
  5. package/dist/{chunk-X6GATUI2.js → chunk-UISA4CIG.js} +1 -0
  6. package/dist/components/alert-dialog.js +1 -1
  7. package/dist/components/button.js +1 -1
  8. package/dist/components/calendar.d.ts +9 -7
  9. package/dist/components/calendar.js +153 -39
  10. package/dist/components/card.d.ts +2 -1
  11. package/dist/components/card.js +1 -1
  12. package/dist/components/carousel.js +1 -1
  13. package/dist/components/checkbox.js +3 -25
  14. package/dist/components/dropdown-menu.js +1 -1
  15. package/dist/components/empty-state.js +1 -1
  16. package/dist/components/haptic-button.js +1 -1
  17. package/dist/components/link-button.js +1 -1
  18. package/dist/components/multi-select-combobox.js +1 -1
  19. package/dist/components/multi-select-menu.d.ts +26 -0
  20. package/dist/components/multi-select-menu.js +71 -0
  21. package/dist/components/pagination.js +1 -1
  22. package/dist/components/phone-frame.d.ts +17 -0
  23. package/dist/components/phone-frame.js +41 -0
  24. package/dist/components/place-about-tab.d.ts +17 -0
  25. package/dist/components/place-about-tab.js +6 -0
  26. package/dist/components/place-card.d.ts +17 -0
  27. package/dist/components/place-card.js +145 -0
  28. package/dist/components/place-details-mobile.d.ts +18 -0
  29. package/dist/components/place-details-mobile.js +187 -0
  30. package/dist/components/place-types.d.ts +145 -0
  31. package/dist/components/place-types.js +1 -0
  32. package/dist/components/search-bar.js +1 -1
  33. package/dist/components/searchable-select.js +1 -1
  34. package/dist/components/skeleton-card.js +1 -1
  35. package/dist/components/skeleton.js +1 -1
  36. package/dist/components/sliding-panels.js +1 -1
  37. package/dist/components/sonner.js +11 -2
  38. package/dist/components/tabs.js +1 -1
  39. package/dist/components/toaster.js +1 -1
  40. package/package.json +28 -9
  41. package/src/components/accordion.stories.tsx +51 -0
  42. package/src/components/alert-dialog.stories.tsx +45 -0
  43. package/src/components/alert.stories.tsx +85 -0
  44. package/src/components/aspect-ratio.stories.tsx +47 -0
  45. package/src/components/avatar.stories.tsx +66 -0
  46. package/src/components/badge.stories.tsx +60 -0
  47. package/src/components/breadcrumb.stories.tsx +63 -0
  48. package/src/components/button.stories.tsx +115 -0
  49. package/src/components/button.tsx +1 -1
  50. package/src/components/calendar.stories.tsx +47 -0
  51. package/src/components/calendar.tsx +160 -40
  52. package/src/components/card.stories.tsx +72 -0
  53. package/src/components/card.tsx +13 -1
  54. package/src/components/carousel.stories.tsx +62 -0
  55. package/src/components/checkbox.stories.tsx +54 -0
  56. package/src/components/checkbox.tsx +1 -1
  57. package/src/components/collapsible.stories.tsx +34 -0
  58. package/src/components/command.stories.tsx +64 -0
  59. package/src/components/currency-input.stories.tsx +50 -0
  60. package/src/components/dialog.stories.tsx +75 -0
  61. package/src/components/drawer.stories.tsx +47 -0
  62. package/src/components/dropdown-menu.stories.tsx +64 -0
  63. package/src/components/dropdown-menu.tsx +1 -1
  64. package/src/components/empty-state.stories.tsx +67 -0
  65. package/src/components/form.stories.tsx +73 -0
  66. package/src/components/haptic-button.stories.tsx +41 -0
  67. package/src/components/input-otp.stories.tsx +42 -0
  68. package/src/components/input.stories.tsx +41 -0
  69. package/src/components/label.stories.tsx +35 -0
  70. package/src/components/markdown-renderer.stories.tsx +45 -0
  71. package/src/components/multi-select-combobox.stories.tsx +78 -0
  72. package/src/components/multi-select-menu.tsx +96 -0
  73. package/src/components/pagination.stories.tsx +48 -0
  74. package/src/components/phone-frame.stories.tsx +51 -0
  75. package/src/components/phone-frame.test.tsx +82 -0
  76. package/src/components/phone-frame.tsx +59 -0
  77. package/src/components/place-about-tab.stories.tsx +164 -0
  78. package/src/components/place-about-tab.test.tsx +325 -0
  79. package/src/components/place-about-tab.tsx +474 -0
  80. package/src/components/place-card.stories.tsx +120 -0
  81. package/src/components/place-card.test.tsx +187 -0
  82. package/src/components/place-card.tsx +187 -0
  83. package/src/components/place-details-mobile.tsx +251 -0
  84. package/src/components/place-types.ts +127 -0
  85. package/src/components/popover.stories.tsx +42 -0
  86. package/src/components/progress.stories.tsx +35 -0
  87. package/src/components/radio-group.stories.tsx +46 -0
  88. package/src/components/rating.stories.tsx +45 -0
  89. package/src/components/scroll-area.stories.tsx +48 -0
  90. package/src/components/search-bar.stories.tsx +92 -0
  91. package/src/components/searchable-select.stories.tsx +55 -0
  92. package/src/components/select.stories.tsx +92 -0
  93. package/src/components/separator.stories.tsx +33 -0
  94. package/src/components/sheet.stories.tsx +95 -0
  95. package/src/components/skeleton-card.stories.tsx +53 -0
  96. package/src/components/skeleton.stories.tsx +42 -0
  97. package/src/components/skeleton.tsx +1 -0
  98. package/src/components/slider.stories.tsx +27 -0
  99. package/src/components/sliding-panels.stories.tsx +68 -0
  100. package/src/components/sonner.tsx +17 -2
  101. package/src/components/sticky-container.stories.tsx +33 -0
  102. package/src/components/switch.stories.tsx +35 -0
  103. package/src/components/table.stories.tsx +60 -0
  104. package/src/components/tabs.stories.tsx +53 -0
  105. package/src/components/tabs.tsx +1 -1
  106. package/src/components/text.stories.tsx +82 -0
  107. package/src/components/textarea.stories.tsx +35 -0
  108. package/src/components/toast.stories.tsx +63 -0
  109. package/src/components/toggle-group.stories.tsx +60 -0
  110. package/src/components/toggle.stories.tsx +48 -0
  111. package/src/components/tooltip.stories.tsx +71 -0
  112. package/src/globals.css +14 -2
  113. package/src/test/setup.ts +9 -0
@@ -0,0 +1,95 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Sheet,
4
+ SheetContent,
5
+ SheetDescription,
6
+ SheetHeader,
7
+ SheetTitle,
8
+ SheetTrigger,
9
+ SheetFooter,
10
+ SheetClose,
11
+ } from "./sheet";
12
+ import { Button } from "./button";
13
+ import { Input } from "./input";
14
+ import { Label } from "./label";
15
+
16
+ const meta = {
17
+ title: "Components/Sheet",
18
+ component: Sheet,
19
+ tags: ["autodocs"],
20
+ } satisfies Meta<typeof Sheet>;
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+
25
+ export const Right: Story = {
26
+ render: () => (
27
+ <Sheet>
28
+ <SheetTrigger asChild>
29
+ <Button variant="outline">Open Sheet</Button>
30
+ </SheetTrigger>
31
+ <SheetContent>
32
+ <SheetHeader>
33
+ <SheetTitle>Edit Profile</SheetTitle>
34
+ <SheetDescription>Make changes to your profile here.</SheetDescription>
35
+ </SheetHeader>
36
+ <div className="grid gap-4 py-4">
37
+ <div className="grid grid-cols-4 items-center gap-4">
38
+ <Label htmlFor="name" className="text-right">
39
+ Name
40
+ </Label>
41
+ <Input id="name" defaultValue="John Doe" className="col-span-3" />
42
+ </div>
43
+ <div className="grid grid-cols-4 items-center gap-4">
44
+ <Label htmlFor="username" className="text-right">
45
+ Username
46
+ </Label>
47
+ <Input id="username" defaultValue="@johndoe" className="col-span-3" />
48
+ </div>
49
+ </div>
50
+ <SheetFooter>
51
+ <SheetClose asChild>
52
+ <Button type="submit">Save changes</Button>
53
+ </SheetClose>
54
+ </SheetFooter>
55
+ </SheetContent>
56
+ </Sheet>
57
+ ),
58
+ };
59
+
60
+ export const Left: Story = {
61
+ render: () => (
62
+ <Sheet>
63
+ <SheetTrigger asChild>
64
+ <Button variant="outline">Open Left</Button>
65
+ </SheetTrigger>
66
+ <SheetContent side="left">
67
+ <SheetHeader>
68
+ <SheetTitle>Navigation</SheetTitle>
69
+ <SheetDescription>Browse the app sections.</SheetDescription>
70
+ </SheetHeader>
71
+ <div className="py-4 space-y-2">
72
+ <Button variant="ghost" className="w-full justify-start">Home</Button>
73
+ <Button variant="ghost" className="w-full justify-start">Products</Button>
74
+ <Button variant="ghost" className="w-full justify-start">Settings</Button>
75
+ </div>
76
+ </SheetContent>
77
+ </Sheet>
78
+ ),
79
+ };
80
+
81
+ export const Bottom: Story = {
82
+ render: () => (
83
+ <Sheet>
84
+ <SheetTrigger asChild>
85
+ <Button variant="outline">Open Bottom</Button>
86
+ </SheetTrigger>
87
+ <SheetContent side="bottom">
88
+ <SheetHeader>
89
+ <SheetTitle>Filters</SheetTitle>
90
+ <SheetDescription>Apply filters to narrow your search.</SheetDescription>
91
+ </SheetHeader>
92
+ </SheetContent>
93
+ </Sheet>
94
+ ),
95
+ };
@@ -0,0 +1,53 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { SkeletonCard } from "./skeleton-card";
3
+
4
+ const meta = {
5
+ title: "Components/SkeletonCard",
6
+ component: SkeletonCard,
7
+ tags: ["autodocs"],
8
+ } satisfies Meta<typeof SkeletonCard>;
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Experience: Story = {
14
+ render: () => <SkeletonCard variant="experience" className="w-[350px]" />,
15
+ };
16
+
17
+ export const Restaurant: Story = {
18
+ render: () => <SkeletonCard variant="restaurant" className="w-[350px]" />,
19
+ };
20
+
21
+ export const Place: Story = {
22
+ render: () => <SkeletonCard variant="place" className="w-[350px]" />,
23
+ };
24
+
25
+ export const Dish: Story = {
26
+ render: () => <SkeletonCard variant="dish" className="w-[350px]" />,
27
+ };
28
+
29
+ export const Drink: Story = {
30
+ render: () => <SkeletonCard variant="drink" className="w-[350px]" />,
31
+ };
32
+
33
+ export const Event: Story = {
34
+ render: () => <SkeletonCard variant="event" className="w-[350px]" />,
35
+ };
36
+
37
+ export const Generic: Story = {
38
+ render: () => <SkeletonCard variant="generic" className="w-[350px]" />,
39
+ };
40
+
41
+ export const AllVariants: Story = {
42
+ render: () => (
43
+ <div className="grid grid-cols-2 gap-4 w-[750px]">
44
+ <SkeletonCard variant="experience" />
45
+ <SkeletonCard variant="restaurant" />
46
+ <SkeletonCard variant="place" />
47
+ <SkeletonCard variant="dish" />
48
+ <SkeletonCard variant="drink" />
49
+ <SkeletonCard variant="event" />
50
+ <SkeletonCard variant="generic" />
51
+ </div>
52
+ ),
53
+ };
@@ -0,0 +1,42 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Skeleton } from "./skeleton";
3
+
4
+ const meta = {
5
+ title: "Components/Skeleton",
6
+ component: Skeleton,
7
+ tags: ["autodocs"],
8
+ } satisfies Meta<typeof Skeleton>;
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Default: Story = {
14
+ render: () => <Skeleton className="h-4 w-[250px]" />,
15
+ };
16
+
17
+ export const Circle: Story = {
18
+ render: () => <Skeleton className="h-12 w-12 rounded-full" />,
19
+ };
20
+
21
+ export const CardLayout: Story = {
22
+ render: () => (
23
+ <div className="flex items-center space-x-4">
24
+ <Skeleton className="h-12 w-12 rounded-full" />
25
+ <div className="space-y-2">
26
+ <Skeleton className="h-4 w-[250px]" />
27
+ <Skeleton className="h-4 w-[200px]" />
28
+ </div>
29
+ </div>
30
+ ),
31
+ };
32
+
33
+ export const ContentBlock: Story = {
34
+ render: () => (
35
+ <div className="space-y-3 w-[300px]">
36
+ <Skeleton className="h-[125px] w-full rounded-xl" />
37
+ <Skeleton className="h-4 w-full" />
38
+ <Skeleton className="h-4 w-[80%]" />
39
+ <Skeleton className="h-4 w-[60%]" />
40
+ </div>
41
+ ),
42
+ };
@@ -4,6 +4,7 @@ import { cn } from "../lib/utils";
4
4
  function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
5
5
  return (
6
6
  <div
7
+ data-slot="skeleton"
7
8
  className={cn(
8
9
  "animate-pulse rounded-xl glass border border-border/30 relative overflow-hidden",
9
10
  "before:absolute before:inset-0 before:-translate-x-full before:animate-[shimmer_2s_infinite] before:bg-gradient-to-r before:from-transparent before:via-white/10 before:to-transparent",
@@ -0,0 +1,27 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Slider } from "./slider";
3
+
4
+ const meta = {
5
+ title: "Components/Slider",
6
+ component: Slider,
7
+ tags: ["autodocs"],
8
+ } satisfies Meta<typeof Slider>;
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Default: Story = {
14
+ render: () => <Slider defaultValue={[50]} max={100} step={1} className="w-[300px]" />,
15
+ };
16
+
17
+ export const Range: Story = {
18
+ render: () => <Slider defaultValue={[25, 75]} max={100} step={1} className="w-[300px]" />,
19
+ };
20
+
21
+ export const Disabled: Story = {
22
+ render: () => <Slider defaultValue={[50]} max={100} step={1} disabled className="w-[300px]" />,
23
+ };
24
+
25
+ export const SmallStep: Story = {
26
+ render: () => <Slider defaultValue={[0.5]} max={1} step={0.1} className="w-[300px]" />,
27
+ };
@@ -0,0 +1,68 @@
1
+ import { useState } from "react";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import { SlidingPanels } from "./sliding-panels";
4
+ import { Button } from "./button";
5
+
6
+ const meta = {
7
+ title: "Components/SlidingPanels",
8
+ component: SlidingPanels,
9
+ tags: ["autodocs"],
10
+ } satisfies Meta<typeof SlidingPanels>;
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+
15
+ function SlidingPanelsDemo() {
16
+ const [currentPanel, setCurrentPanel] = useState("panel-1");
17
+
18
+ const panels = [
19
+ {
20
+ id: "panel-1",
21
+ content: (
22
+ <div className="space-y-4 p-4">
23
+ <h3 className="text-lg font-semibold">Step 1: Select Category</h3>
24
+ <p className="text-muted-foreground">Choose a category to continue.</p>
25
+ <Button onClick={() => setCurrentPanel("panel-2")}>Next</Button>
26
+ </div>
27
+ ),
28
+ },
29
+ {
30
+ id: "panel-2",
31
+ showBackButton: true,
32
+ backButtonLabel: "Details",
33
+ content: (
34
+ <div className="space-y-4 p-4">
35
+ <h3 className="text-lg font-semibold">Step 2: Enter Details</h3>
36
+ <p className="text-muted-foreground">Fill in your information.</p>
37
+ <Button onClick={() => setCurrentPanel("panel-3")}>Next</Button>
38
+ </div>
39
+ ),
40
+ },
41
+ {
42
+ id: "panel-3",
43
+ showBackButton: true,
44
+ backButtonLabel: "Confirm",
45
+ content: (
46
+ <div className="space-y-4 p-4">
47
+ <h3 className="text-lg font-semibold">Step 3: Confirm</h3>
48
+ <p className="text-muted-foreground">Review and submit.</p>
49
+ <Button onClick={() => setCurrentPanel("panel-1")}>Start Over</Button>
50
+ </div>
51
+ ),
52
+ },
53
+ ];
54
+
55
+ return (
56
+ <div className="w-[400px] border rounded-lg overflow-hidden">
57
+ <SlidingPanels
58
+ panels={panels}
59
+ currentPanel={currentPanel}
60
+ onPanelChange={setCurrentPanel}
61
+ />
62
+ </div>
63
+ );
64
+ }
65
+
66
+ export const Default: Story = {
67
+ render: () => <SlidingPanelsDemo />,
68
+ };
@@ -1,20 +1,35 @@
1
1
  "use client";
2
2
 
3
+ import {
4
+ CircleCheckIcon,
5
+ InfoIcon,
6
+ Loader2Icon,
7
+ OctagonXIcon,
8
+ TriangleAlertIcon,
9
+ } from "lucide-react";
3
10
  import { useTheme } from "next-themes";
4
- import { Toaster as Sonner, ToasterProps } from "sonner";
11
+ import { Toaster as Sonner, type ToasterProps } from "sonner";
5
12
 
6
13
  const Toaster = ({ ...props }: ToasterProps) => {
7
14
  const { theme = "system" } = useTheme();
8
15
 
9
16
  return (
10
17
  <Sonner
11
- theme={theme as ToasterProps["theme"]}
18
+ theme={(theme ?? "system") as NonNullable<ToasterProps["theme"]>}
12
19
  className="toaster group"
20
+ icons={{
21
+ success: <CircleCheckIcon className="size-4" />,
22
+ info: <InfoIcon className="size-4" />,
23
+ warning: <TriangleAlertIcon className="size-4" />,
24
+ error: <OctagonXIcon className="size-4" />,
25
+ loading: <Loader2Icon className="size-4 animate-spin" />,
26
+ }}
13
27
  style={
14
28
  {
15
29
  "--normal-bg": "var(--popover)",
16
30
  "--normal-text": "var(--popover-foreground)",
17
31
  "--normal-border": "var(--border)",
32
+ "--border-radius": "var(--radius)",
18
33
  } as React.CSSProperties
19
34
  }
20
35
  {...props}
@@ -0,0 +1,33 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { StickyContainer } from "./sticky-container";
3
+
4
+ const meta = {
5
+ title: "Components/StickyContainer",
6
+ component: StickyContainer,
7
+ tags: ["autodocs"],
8
+ } satisfies Meta<typeof StickyContainer>;
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Default: Story = {
14
+ render: () => (
15
+ <div className="h-[400px] overflow-y-auto border rounded-lg">
16
+ <div className="p-4">
17
+ <p className="text-muted-foreground mb-4">Scroll down to see the sticky container in action.</p>
18
+ </div>
19
+ <StickyContainer topOffset="top-0" className="px-4">
20
+ <div className="bg-primary text-primary-foreground p-3 rounded-lg text-center font-medium">
21
+ Sticky Header
22
+ </div>
23
+ </StickyContainer>
24
+ <div className="p-4 space-y-4">
25
+ {Array.from({ length: 20 }).map((_, i) => (
26
+ <p key={i} className="text-muted-foreground">
27
+ Content line {i + 1} — scroll to see the sticky behavior.
28
+ </p>
29
+ ))}
30
+ </div>
31
+ </div>
32
+ ),
33
+ };
@@ -0,0 +1,35 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Switch } from "./switch";
3
+ import { Label } from "./label";
4
+
5
+ const meta = {
6
+ title: "Components/Switch",
7
+ component: Switch,
8
+ tags: ["autodocs"],
9
+ } satisfies Meta<typeof Switch>;
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+
14
+ export const Default: Story = {};
15
+
16
+ export const Checked: Story = {
17
+ args: { defaultChecked: true },
18
+ };
19
+
20
+ export const Disabled: Story = {
21
+ args: { disabled: true },
22
+ };
23
+
24
+ export const DisabledChecked: Story = {
25
+ args: { disabled: true, defaultChecked: true },
26
+ };
27
+
28
+ export const WithLabel: Story = {
29
+ render: () => (
30
+ <div className="flex items-center gap-2">
31
+ <Switch id="notifications" />
32
+ <Label htmlFor="notifications">Enable notifications</Label>
33
+ </div>
34
+ ),
35
+ };
@@ -0,0 +1,60 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Table,
4
+ TableBody,
5
+ TableCaption,
6
+ TableCell,
7
+ TableFooter,
8
+ TableHead,
9
+ TableHeader,
10
+ TableRow,
11
+ } from "./table";
12
+
13
+ const meta = {
14
+ title: "Components/Table",
15
+ component: Table,
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof Table>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ const invoices = [
23
+ { invoice: "INV001", status: "Paid", method: "Credit Card", amount: "$250.00" },
24
+ { invoice: "INV002", status: "Pending", method: "PayPal", amount: "$150.00" },
25
+ { invoice: "INV003", status: "Unpaid", method: "Bank Transfer", amount: "$350.00" },
26
+ { invoice: "INV004", status: "Paid", method: "Credit Card", amount: "$450.00" },
27
+ { invoice: "INV005", status: "Paid", method: "PayPal", amount: "$550.00" },
28
+ ];
29
+
30
+ export const Default: Story = {
31
+ render: () => (
32
+ <Table>
33
+ <TableCaption>A list of recent invoices.</TableCaption>
34
+ <TableHeader>
35
+ <TableRow>
36
+ <TableHead className="w-[100px]">Invoice</TableHead>
37
+ <TableHead>Status</TableHead>
38
+ <TableHead>Method</TableHead>
39
+ <TableHead className="text-right">Amount</TableHead>
40
+ </TableRow>
41
+ </TableHeader>
42
+ <TableBody>
43
+ {invoices.map((invoice) => (
44
+ <TableRow key={invoice.invoice}>
45
+ <TableCell className="font-medium">{invoice.invoice}</TableCell>
46
+ <TableCell>{invoice.status}</TableCell>
47
+ <TableCell>{invoice.method}</TableCell>
48
+ <TableCell className="text-right">{invoice.amount}</TableCell>
49
+ </TableRow>
50
+ ))}
51
+ </TableBody>
52
+ <TableFooter>
53
+ <TableRow>
54
+ <TableCell colSpan={3}>Total</TableCell>
55
+ <TableCell className="text-right">$1,750.00</TableCell>
56
+ </TableRow>
57
+ </TableFooter>
58
+ </Table>
59
+ ),
60
+ };
@@ -0,0 +1,53 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs";
3
+
4
+ const meta = {
5
+ title: "Components/Tabs",
6
+ component: Tabs,
7
+ tags: ["autodocs"],
8
+ } satisfies Meta<typeof Tabs>;
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Pill: Story = {
14
+ render: () => (
15
+ <Tabs defaultValue="account" className="w-[400px]">
16
+ <TabsList variant="pill">
17
+ <TabsTrigger value="account">Account</TabsTrigger>
18
+ <TabsTrigger value="password">Password</TabsTrigger>
19
+ <TabsTrigger value="settings">Settings</TabsTrigger>
20
+ </TabsList>
21
+ <TabsContent value="account">
22
+ <p className="text-sm text-muted-foreground">Manage your account settings.</p>
23
+ </TabsContent>
24
+ <TabsContent value="password">
25
+ <p className="text-sm text-muted-foreground">Change your password here.</p>
26
+ </TabsContent>
27
+ <TabsContent value="settings">
28
+ <p className="text-sm text-muted-foreground">Configure app settings.</p>
29
+ </TabsContent>
30
+ </Tabs>
31
+ ),
32
+ };
33
+
34
+ export const Underline: Story = {
35
+ render: () => (
36
+ <Tabs defaultValue="overview" className="w-[400px]">
37
+ <TabsList variant="underline">
38
+ <TabsTrigger value="overview">Overview</TabsTrigger>
39
+ <TabsTrigger value="analytics">Analytics</TabsTrigger>
40
+ <TabsTrigger value="reports">Reports</TabsTrigger>
41
+ </TabsList>
42
+ <TabsContent value="overview">
43
+ <p className="text-sm text-muted-foreground">Overview content.</p>
44
+ </TabsContent>
45
+ <TabsContent value="analytics">
46
+ <p className="text-sm text-muted-foreground">Analytics content.</p>
47
+ </TabsContent>
48
+ <TabsContent value="reports">
49
+ <p className="text-sm text-muted-foreground">Reports content.</p>
50
+ </TabsContent>
51
+ </Tabs>
52
+ ),
53
+ };
@@ -21,7 +21,7 @@ const TabsList = React.forwardRef<
21
21
  ref={ref}
22
22
  className={cn(
23
23
  variant === "pill"
24
- ? "inline-flex h-12 items-center justify-center gap-2 rounded-3xl glass p-1 text-muted-foreground border border-border/50 shadow-lg"
24
+ ? "inline-flex h-12 items-center justify-center gap-2 rounded-3xl bg-sidebar p-1 text-muted-foreground border border-border/50 shadow-lg"
25
25
  : "inline-flex h-auto items-center gap-0 rounded-none bg-transparent border-b border-border p-0 shadow-none text-muted-foreground",
26
26
  className
27
27
  )}
@@ -0,0 +1,82 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Text } from "./text";
3
+
4
+ const meta = {
5
+ title: "Components/Text",
6
+ component: Text,
7
+ tags: ["autodocs"],
8
+ argTypes: {
9
+ variant: {
10
+ control: "select",
11
+ options: ["display", "h1", "h2", "h3", "h4", "body-lg", "body", "body-sm", "caption", "label", "overline"],
12
+ },
13
+ color: {
14
+ control: "select",
15
+ options: ["default", "muted", "primary", "destructive", "primary-foreground", "inherit"],
16
+ },
17
+ weight: {
18
+ control: "select",
19
+ options: ["normal", "medium", "semibold", "bold"],
20
+ },
21
+ },
22
+ } satisfies Meta<typeof Text>;
23
+
24
+ export default meta;
25
+ type Story = StoryObj<typeof meta>;
26
+
27
+ export const Default: Story = {
28
+ args: { children: "The quick brown fox jumps over the lazy dog", variant: "body" },
29
+ };
30
+
31
+ export const Display: Story = {
32
+ args: { children: "Display", variant: "display" },
33
+ };
34
+
35
+ export const Heading1: Story = {
36
+ args: { children: "Heading 1", variant: "h1", as: "h1" },
37
+ };
38
+
39
+ export const Heading2: Story = {
40
+ args: { children: "Heading 2", variant: "h2", as: "h2" },
41
+ };
42
+
43
+ export const Heading3: Story = {
44
+ args: { children: "Heading 3", variant: "h3", as: "h3" },
45
+ };
46
+
47
+ export const Caption: Story = {
48
+ args: { children: "Caption text", variant: "caption" },
49
+ };
50
+
51
+ export const Overline: Story = {
52
+ args: { children: "Overline", variant: "overline" },
53
+ };
54
+
55
+ export const AllVariants: Story = {
56
+ render: () => (
57
+ <div className="flex flex-col gap-3">
58
+ <Text variant="display">Display</Text>
59
+ <Text variant="h1" as="h1">Heading 1</Text>
60
+ <Text variant="h2" as="h2">Heading 2</Text>
61
+ <Text variant="h3" as="h3">Heading 3</Text>
62
+ <Text variant="h4" as="h4">Heading 4</Text>
63
+ <Text variant="body-lg">Body Large</Text>
64
+ <Text variant="body">Body</Text>
65
+ <Text variant="body-sm">Body Small</Text>
66
+ <Text variant="caption">Caption</Text>
67
+ <Text variant="label">Label</Text>
68
+ <Text variant="overline">Overline</Text>
69
+ </div>
70
+ ),
71
+ };
72
+
73
+ export const Colors: Story = {
74
+ render: () => (
75
+ <div className="flex flex-col gap-2">
76
+ <Text variant="body" color="default">Default</Text>
77
+ <Text variant="body" color="muted">Muted</Text>
78
+ <Text variant="body" color="primary">Primary</Text>
79
+ <Text variant="body" color="destructive">Destructive</Text>
80
+ </div>
81
+ ),
82
+ };
@@ -0,0 +1,35 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Textarea } from "./textarea";
3
+ import { Label } from "./label";
4
+
5
+ const meta = {
6
+ title: "Components/Textarea",
7
+ component: Textarea,
8
+ tags: ["autodocs"],
9
+ } satisfies Meta<typeof Textarea>;
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+
14
+ export const Default: Story = {
15
+ render: () => <Textarea placeholder="Type your message here..." />,
16
+ };
17
+
18
+ export const WithLabel: Story = {
19
+ render: () => (
20
+ <div className="grid w-full gap-1.5">
21
+ <Label htmlFor="message">Your message</Label>
22
+ <Textarea id="message" placeholder="Type your message here..." />
23
+ </div>
24
+ ),
25
+ };
26
+
27
+ export const Disabled: Story = {
28
+ render: () => <Textarea placeholder="Disabled textarea" disabled />,
29
+ };
30
+
31
+ export const WithValue: Story = {
32
+ render: () => (
33
+ <Textarea defaultValue="This textarea already has some content in it that demonstrates how text wraps and displays within the component." />
34
+ ),
35
+ };