Skip to content

Commit

Permalink
chore(storybook): adjust server and client components
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfrancisco committed Nov 6, 2024
1 parent 80e0340 commit 4610808
Show file tree
Hide file tree
Showing 41 changed files with 378 additions and 458 deletions.
8 changes: 4 additions & 4 deletions apps/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"@octokit/auth-oauth-app": "^8.1.1",
"@octokit/core": "^6.1.2",
"@sentry/nextjs": "^8.36.0",
"@supabase/ssr": "^0.5.1",
"@supabase/supabase-js": "^2.46.1",
"@supabase/ssr": "catalog:",
"@supabase/supabase-js": "catalog:",
"@t3-oss/env-core": "^0.11.1",
"@t3-oss/env-nextjs": "^0.11.1",
"@tanstack/react-query": "^5.59.19",
Expand All @@ -44,14 +44,14 @@
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"design-tokens-format-module": "catalog:",
"drizzle-orm": "^0.32.2",
"drizzle-orm": "catalog:",
"drizzle-zod": "^0.5.1",
"framer-motion": "^11.3.21",
"human-id": "^4.1.1",
"memoize": "^10.0.0",
"next": "catalog:",
"next-safe-action": "^7.9.9",
"postgres": "^3.4.5",
"postgres": "catalog:",
"posthog-js": "^1.181.0",
"rambda": "^9.4.0",
"react": "catalog:",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use server';

import { and, eq } from 'drizzle-orm';

import { Integrations, integrationType } from '@ds-project/database/schema';
import { authorizedAction } from '@/lib/safe-action';
import { z } from 'zod';
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/src/stories/accordion/accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
AccordionContent,
AccordionItem,
AccordionTrigger,
} from '@ds-project/components';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
Button,
} from '@ds-project/components';
} from '@ds-project/components/client';
import { Button } from '@ds-project/components/server';
import type { Meta } from '@storybook/react';

export default {
Expand Down
6 changes: 3 additions & 3 deletions apps/storybook/src/stories/alert/alert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import {
AlertDescription,
AlertTitle,
LucideIcons,
} from '@ds-project/components';
import { Meta } from '@storybook/react';
} from '@ds-project/components/server';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Alert',
component: Alert,
render: () => (
<Alert>
<LucideIcons.Terminal className="h-4 w-4" />
<LucideIcons.Terminal className="size-4" />
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the cli.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AspectRatio } from '@ds-project/components';
import { Meta } from '@storybook/react';
import { AspectRatio } from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Aspect Ratio',
Expand All @@ -9,7 +9,7 @@ export default {
<img
src="https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd?w=800&dpr=2&q=80"
alt="Photo by Drew Beamer"
className="h-full w-full rounded-md object-cover"
className="size-full rounded-md object-cover"
/>
</AspectRatio>
),
Expand Down
5 changes: 2 additions & 3 deletions apps/storybook/src/stories/avatar/avatar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import {
Avatar,
AvatarFallback,
AvatarImage,
Button,
} from '@ds-project/components';
import { Meta } from '@storybook/react';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Avatar',
Expand Down
4 changes: 2 additions & 2 deletions apps/storybook/src/stories/badge/badge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Badge, Button } from '@ds-project/components';
import { Meta } from '@storybook/react';
import { Badge } from '@ds-project/components/server';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Badge',
Expand Down
10 changes: 5 additions & 5 deletions apps/storybook/src/stories/breadcrumb/breadcrump.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {
Badge,
Breadcrumb,
BreadcrumbEllipsis,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
Button,
} from '@ds-project/components/server';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@ds-project/components';
import { Meta } from '@storybook/react';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Breadcrumb',
Expand All @@ -28,7 +28,7 @@ export default {
<BreadcrumbItem>
<DropdownMenu>
<DropdownMenuTrigger className="flex items-center gap-1">
<BreadcrumbEllipsis className="h-4 w-4" />
<BreadcrumbEllipsis className="size-4" />
<span className="sr-only">Toggle menu</span>
</DropdownMenuTrigger>
<DropdownMenuContent align="start">
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/src/stories/button/button.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button } from '@ds-project/components';
import { Button } from '@ds-project/components/server';
import type { Meta } from '@storybook/react';

export default {
Expand Down
6 changes: 4 additions & 2 deletions apps/storybook/src/stories/card/card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import {
CardTitle,
Input,
Label,
} from '@ds-project/components/server';
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@ds-project/components';
import { Meta } from '@storybook/react';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Card',
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/src/stories/checkbox/checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Checkbox } from '@ds-project/components';
import { Checkbox } from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
Expand Down
8 changes: 3 additions & 5 deletions apps/storybook/src/stories/dialog/dialog.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { Button, Input, Label } from '@ds-project/components/server';
import {
Button,
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
Input,
Label,
} from '@ds-project/components';
import { Meta } from '@storybook/react';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Dialog',
Expand Down
35 changes: 17 additions & 18 deletions apps/storybook/src/stories/dropdown-menu/dropdown-menu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, LucideIcons } from '@ds-project/components/server';
import {
Button,
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
Expand All @@ -12,9 +12,8 @@ import {
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuTrigger,
LucideIcons,
} from '@ds-project/components';
import { Meta } from '@storybook/react';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
title: 'Components/Dropdown Menu',
Expand All @@ -29,77 +28,77 @@ export default {
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem>
<LucideIcons.User className="mr-2 h-4 w-4" />
<LucideIcons.User className="mr-2 size-4" />
<span>Profile</span>
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
<LucideIcons.CreditCard className="mr-2 h-4 w-4" />
<LucideIcons.CreditCard className="mr-2 size-4" />
<span>Billing</span>
<DropdownMenuShortcut>⌘B</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
<LucideIcons.Settings className="mr-2 h-4 w-4" />
<LucideIcons.Settings className="mr-2 size-4" />
<span>Settings</span>
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
<LucideIcons.Keyboard className="mr-2 h-4 w-4" />
<LucideIcons.Keyboard className="mr-2 size-4" />
<span>Keyboard shortcuts</span>
<DropdownMenuShortcut>⌘K</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem>
<LucideIcons.Users className="mr-2 h-4 w-4" />
<LucideIcons.Users className="mr-2 size-4" />
<span>Team</span>
</DropdownMenuItem>
<DropdownMenuSub>
<DropdownMenuSubTrigger>
<LucideIcons.UserPlus className="mr-2 h-4 w-4" />
<LucideIcons.UserPlus className="mr-2 size-4" />
<span>Invite users</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuItem>
<LucideIcons.Mail className="mr-2 h-4 w-4" />
<LucideIcons.Mail className="mr-2 size-4" />
<span>Email</span>
</DropdownMenuItem>
<DropdownMenuItem>
<LucideIcons.MessageSquare className="mr-2 h-4 w-4" />
<LucideIcons.MessageSquare className="mr-2 size-4" />
<span>Message</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
<LucideIcons.PlusCircle className="mr-2 h-4 w-4" />
<LucideIcons.PlusCircle className="mr-2 size-4" />
<span>More...</span>
</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuPortal>
</DropdownMenuSub>
<DropdownMenuItem>
<LucideIcons.Plus className="mr-2 h-4 w-4" />
<LucideIcons.Plus className="mr-2 size-4" />
<span>New Team</span>
<DropdownMenuShortcut>⌘+T</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuItem>
<LucideIcons.Github className="mr-2 h-4 w-4" />
<LucideIcons.Github className="mr-2 size-4" />
<span>GitHub</span>
</DropdownMenuItem>
<DropdownMenuItem>
<LucideIcons.LifeBuoy className="mr-2 h-4 w-4" />
<LucideIcons.LifeBuoy className="mr-2 size-4" />
<span>Support</span>
</DropdownMenuItem>
<DropdownMenuItem disabled>
<LucideIcons.Cloud className="mr-2 h-4 w-4" />
<LucideIcons.Cloud className="mr-2 size-4" />
<span>API</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
<LucideIcons.LogOut className="mr-2 h-4 w-4" />
<LucideIcons.LogOut className="mr-2 size-4" />
<span>Log out</span>
<DropdownMenuShortcut>⇧⌘Q</DropdownMenuShortcut>
</DropdownMenuItem>
Expand Down
8 changes: 4 additions & 4 deletions apps/storybook/src/stories/form/form.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {
Button,
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@ds-project/components';
} from '@ds-project/components/client';
import { Button } from '@ds-project/components/server';
import type { Meta } from '@storybook/react';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import { z } from 'zod';
import { toast } from '@ds-project/components';
import { Input } from '@ds-project/components';
import { toast } from '@ds-project/components/client';
import { Input } from '@ds-project/components/server';

const FormSchema = z.object({
username: z.string().min(2, {
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/src/stories/icons/icons.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconGallery, IconItem, Meta } from '@storybook/blocks';
import { Icons, LucideIcons } from '@ds-project/components';
import { Icons, LucideIcons } from '@ds-project/components/server';

<Meta title="Components/Icons" />

Expand Down
3 changes: 1 addition & 2 deletions apps/storybook/src/stories/input-otp/input-otp.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {
Input,
InputOTP,
InputOTPGroup,
InputOTPSeparator,
InputOTPSlot,
} from '@ds-project/components';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/src/stories/input/input.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input } from '@ds-project/components';
import { Input } from '@ds-project/components/server';
import type { Meta } from '@storybook/react';

export default {
Expand Down
3 changes: 2 additions & 1 deletion apps/storybook/src/stories/label/label.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Checkbox, Label } from '@ds-project/components';
import { Checkbox } from '@ds-project/components/client';
import { Label } from '@ds-project/components/server';
import type { Meta } from '@storybook/react';

export default {
Expand Down
3 changes: 1 addition & 2 deletions apps/storybook/src/stories/menubar/menubar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
Button,
Menubar,
MenubarCheckboxItem,
MenubarContent,
Expand All @@ -13,7 +12,7 @@ import {
MenubarSubContent,
MenubarSubTrigger,
MenubarTrigger,
} from '@ds-project/components';
} from '@ds-project/components/client';
import type { Meta } from '@storybook/react';

export default {
Expand Down
Loading

0 comments on commit 4610808

Please sign in to comment.