Skip to content

Commit b0c6980

Browse files
first commit
0 parents  commit b0c6980

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+11904
-0
lines changed

.codinit/ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
components/ui/*
2+
hooks/use-toast.ts

.codinit/prompt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
For all designs I ask you to make, have them be beautiful, not cookie cutter. Make webpages that are fully featured and worthy for production.
2+
3+
When using client-side hooks (useState and useEffect) in a component that's being treated as a Server Component by Next.js, always add the "use client" directive at the top of the file.
4+
5+
Do not write code that will trigger this error: "Warning: Extra attributes from the server: %s%s""class,style"
6+
7+
By default, this template supports JSX syntax with Tailwind CSS classes, the shadcn/ui library, React hooks, and Lucide React for icons. Do not install other packages for UI themes, icons, etc unless absolutely necessary or I request them.
8+
9+
Use icons from lucide-react for logos.

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

app/globals.css

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
:root {
6+
--foreground-rgb: 0, 0, 0;
7+
--background-start-rgb: 214, 219, 220;
8+
--background-end-rgb: 255, 255, 255;
9+
}
10+
11+
@media (prefers-color-scheme: dark) {
12+
:root {
13+
--foreground-rgb: 255, 255, 255;
14+
--background-start-rgb: 0, 0, 0;
15+
--background-end-rgb: 0, 0, 0;
16+
}
17+
}
18+
19+
@layer base {
20+
:root {
21+
--background: 0 0% 100%;
22+
--foreground: 0 0% 3.9%;
23+
--card: 0 0% 100%;
24+
--card-foreground: 0 0% 3.9%;
25+
--popover: 0 0% 100%;
26+
--popover-foreground: 0 0% 3.9%;
27+
--primary: 0 0% 9%;
28+
--primary-foreground: 0 0% 98%;
29+
--secondary: 0 0% 96.1%;
30+
--secondary-foreground: 0 0% 9%;
31+
--muted: 0 0% 96.1%;
32+
--muted-foreground: 0 0% 45.1%;
33+
--accent: 0 0% 96.1%;
34+
--accent-foreground: 0 0% 9%;
35+
--destructive: 0 84.2% 60.2%;
36+
--destructive-foreground: 0 0% 98%;
37+
--border: 0 0% 89.8%;
38+
--input: 0 0% 89.8%;
39+
--ring: 0 0% 3.9%;
40+
--chart-1: 12 76% 61%;
41+
--chart-2: 173 58% 39%;
42+
--chart-3: 197 37% 24%;
43+
--chart-4: 43 74% 66%;
44+
--chart-5: 27 87% 67%;
45+
--radius: 0.5rem;
46+
}
47+
.dark {
48+
--background: 0 0% 3.9%;
49+
--foreground: 0 0% 98%;
50+
--card: 0 0% 3.9%;
51+
--card-foreground: 0 0% 98%;
52+
--popover: 0 0% 3.9%;
53+
--popover-foreground: 0 0% 98%;
54+
--primary: 0 0% 98%;
55+
--primary-foreground: 0 0% 9%;
56+
--secondary: 0 0% 14.9%;
57+
--secondary-foreground: 0 0% 98%;
58+
--muted: 0 0% 14.9%;
59+
--muted-foreground: 0 0% 63.9%;
60+
--accent: 0 0% 14.9%;
61+
--accent-foreground: 0 0% 98%;
62+
--destructive: 0 62.8% 30.6%;
63+
--destructive-foreground: 0 0% 98%;
64+
--border: 0 0% 14.9%;
65+
--input: 0 0% 14.9%;
66+
--ring: 0 0% 83.1%;
67+
--chart-1: 220 70% 50%;
68+
--chart-2: 160 60% 45%;
69+
--chart-3: 30 80% 55%;
70+
--chart-4: 280 65% 60%;
71+
--chart-5: 340 75% 55%;
72+
}
73+
}
74+
75+
@layer base {
76+
* {
77+
@apply border-border;
78+
}
79+
body {
80+
@apply bg-background text-foreground;
81+
}
82+
}

app/layout.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import './globals.css';
2+
import type { Metadata } from 'next';
3+
import { Inter } from 'next/font/google';
4+
5+
const inter = Inter({ subsets: ['latin'] });
6+
7+
export const metadata: Metadata = {
8+
title: 'Create Next App',
9+
description: 'Generated by create next app',
10+
};
11+
12+
export default function RootLayout({
13+
children,
14+
}: {
15+
children: React.ReactNode;
16+
}) {
17+
return (
18+
<html lang="en">
19+
<body className={inter.className}>{children}</body>
20+
</html>
21+
);
22+
}

app/page.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export default function Home() {
2+
return (
3+
<div
4+
style={{
5+
maxWidth: 1280,
6+
margin: '0 auto',
7+
padding: '2rem',
8+
textAlign: 'center',
9+
}}
10+
>
11+
Start prompting.
12+
</div>
13+
);
14+
}

components.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
}
20+
}

components/ui/accordion.tsx

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
'use client';
2+
3+
import * as React from 'react';
4+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
5+
import { ChevronDown } from 'lucide-react';
6+
7+
import { cn } from '@/lib/utils';
8+
9+
const Accordion = AccordionPrimitive.Root;
10+
11+
const AccordionItem = React.forwardRef<
12+
React.ElementRef<typeof AccordionPrimitive.Item>,
13+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
14+
>(({ className, ...props }, ref) => (
15+
<AccordionPrimitive.Item
16+
ref={ref}
17+
className={cn('border-b', className)}
18+
{...props}
19+
/>
20+
));
21+
AccordionItem.displayName = 'AccordionItem';
22+
23+
const AccordionTrigger = React.forwardRef<
24+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
25+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
26+
>(({ className, children, ...props }, ref) => (
27+
<AccordionPrimitive.Header className="flex">
28+
<AccordionPrimitive.Trigger
29+
ref={ref}
30+
className={cn(
31+
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
32+
className
33+
)}
34+
{...props}
35+
>
36+
{children}
37+
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
38+
</AccordionPrimitive.Trigger>
39+
</AccordionPrimitive.Header>
40+
));
41+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
42+
43+
const AccordionContent = React.forwardRef<
44+
React.ElementRef<typeof AccordionPrimitive.Content>,
45+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
46+
>(({ className, children, ...props }, ref) => (
47+
<AccordionPrimitive.Content
48+
ref={ref}
49+
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
50+
{...props}
51+
>
52+
<div className={cn('pb-4 pt-0', className)}>{children}</div>
53+
</AccordionPrimitive.Content>
54+
));
55+
56+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
57+
58+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };

components/ui/alert-dialog.tsx

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
'use client';
2+
3+
import * as React from 'react';
4+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
5+
6+
import { cn } from '@/lib/utils';
7+
import { buttonVariants } from '@/components/ui/button';
8+
9+
const AlertDialog = AlertDialogPrimitive.Root;
10+
11+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
12+
13+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
14+
15+
const AlertDialogOverlay = React.forwardRef<
16+
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
17+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
18+
>(({ className, ...props }, ref) => (
19+
<AlertDialogPrimitive.Overlay
20+
className={cn(
21+
'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
22+
className
23+
)}
24+
{...props}
25+
ref={ref}
26+
/>
27+
));
28+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
29+
30+
const AlertDialogContent = React.forwardRef<
31+
React.ElementRef<typeof AlertDialogPrimitive.Content>,
32+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
33+
>(({ className, ...props }, ref) => (
34+
<AlertDialogPortal>
35+
<AlertDialogOverlay />
36+
<AlertDialogPrimitive.Content
37+
ref={ref}
38+
className={cn(
39+
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
40+
className
41+
)}
42+
{...props}
43+
/>
44+
</AlertDialogPortal>
45+
));
46+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
47+
48+
const AlertDialogHeader = ({
49+
className,
50+
...props
51+
}: React.HTMLAttributes<HTMLDivElement>) => (
52+
<div
53+
className={cn(
54+
'flex flex-col space-y-2 text-center sm:text-left',
55+
className
56+
)}
57+
{...props}
58+
/>
59+
);
60+
AlertDialogHeader.displayName = 'AlertDialogHeader';
61+
62+
const AlertDialogFooter = ({
63+
className,
64+
...props
65+
}: React.HTMLAttributes<HTMLDivElement>) => (
66+
<div
67+
className={cn(
68+
'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
69+
className
70+
)}
71+
{...props}
72+
/>
73+
);
74+
AlertDialogFooter.displayName = 'AlertDialogFooter';
75+
76+
const AlertDialogTitle = React.forwardRef<
77+
React.ElementRef<typeof AlertDialogPrimitive.Title>,
78+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
79+
>(({ className, ...props }, ref) => (
80+
<AlertDialogPrimitive.Title
81+
ref={ref}
82+
className={cn('text-lg font-semibold', className)}
83+
{...props}
84+
/>
85+
));
86+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
87+
88+
const AlertDialogDescription = React.forwardRef<
89+
React.ElementRef<typeof AlertDialogPrimitive.Description>,
90+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
91+
>(({ className, ...props }, ref) => (
92+
<AlertDialogPrimitive.Description
93+
ref={ref}
94+
className={cn('text-sm text-muted-foreground', className)}
95+
{...props}
96+
/>
97+
));
98+
AlertDialogDescription.displayName =
99+
AlertDialogPrimitive.Description.displayName;
100+
101+
const AlertDialogAction = React.forwardRef<
102+
React.ElementRef<typeof AlertDialogPrimitive.Action>,
103+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
104+
>(({ className, ...props }, ref) => (
105+
<AlertDialogPrimitive.Action
106+
ref={ref}
107+
className={cn(buttonVariants(), className)}
108+
{...props}
109+
/>
110+
));
111+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
112+
113+
const AlertDialogCancel = React.forwardRef<
114+
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
115+
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
116+
>(({ className, ...props }, ref) => (
117+
<AlertDialogPrimitive.Cancel
118+
ref={ref}
119+
className={cn(
120+
buttonVariants({ variant: 'outline' }),
121+
'mt-2 sm:mt-0',
122+
className
123+
)}
124+
{...props}
125+
/>
126+
));
127+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
128+
129+
export {
130+
AlertDialog,
131+
AlertDialogPortal,
132+
AlertDialogOverlay,
133+
AlertDialogTrigger,
134+
AlertDialogContent,
135+
AlertDialogHeader,
136+
AlertDialogFooter,
137+
AlertDialogTitle,
138+
AlertDialogDescription,
139+
AlertDialogAction,
140+
AlertDialogCancel,
141+
};

0 commit comments

Comments
 (0)