aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/components
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-02-26 17:53:38 -0700
committerDhravya <[email protected]>2024-02-26 17:53:38 -0700
commiteba818ffb4ca84f24f4d29924533bc2c098c88ce (patch)
tree542bbc30559a93bc4569fcc103e9cc2fdc20e50c /apps/web/src/components
parentchaos (diff)
downloadsupermemory-eba818ffb4ca84f24f4d29924533bc2c098c88ce.tar.xz
supermemory-eba818ffb4ca84f24f4d29924533bc2c098c88ce.zip
EVERYTHING WORKING PERFECTLY
Diffstat (limited to 'apps/web/src/components')
-rw-r--r--apps/web/src/components/component.tsx192
-rw-r--r--apps/web/src/components/ui/avatar.tsx50
-rw-r--r--apps/web/src/components/ui/badge.tsx36
-rw-r--r--apps/web/src/components/ui/button.tsx56
-rw-r--r--apps/web/src/components/ui/card.tsx79
-rw-r--r--apps/web/src/components/ui/input.tsx25
6 files changed, 438 insertions, 0 deletions
diff --git a/apps/web/src/components/component.tsx b/apps/web/src/components/component.tsx
new file mode 100644
index 00000000..3edb2049
--- /dev/null
+++ b/apps/web/src/components/component.tsx
@@ -0,0 +1,192 @@
+/**
+ * This code was generated by v0 by Vercel.
+ * @see https://v0.dev/t/pva6O4OIeZq
+ */
+import { Input } from "@/components/ui/input"
+import { AvatarImage, AvatarFallback, Avatar } from "@/components/ui/avatar"
+import { Button } from "@/components/ui/button"
+import { Badge } from "@/components/ui/badge"
+import { CardContent, CardFooter, Card } from "@/components/ui/card"
+
+export function Component() {
+ return (
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
+ <header className="flex justify-between items-center py-6">
+ <div className="flex items-center space-x-4">
+ <FlagIcon className="h-8 w-8 text-blue-500" />
+ <h1 className="text-3xl font-bold text-gray-900">zenfetch</h1>
+ </div>
+ <div className="flex items-center space-x-4">
+ <Input className="w-72" placeholder="Search..." />
+ <Avatar>
+ <AvatarImage alt="User avatar" src="/placeholder.svg?height=32&width=32" />
+ <AvatarFallback>U</AvatarFallback>
+ </Avatar>
+ <Button className="whitespace-nowrap" variant="outline">
+ Chat with AI
+ </Button>
+ </div>
+ </header>
+ <nav className="flex space-x-2 my-4">
+ <Badge variant="secondary">Technology (2)</Badge>
+ <Badge variant="secondary">Business & Finance (1)</Badge>
+ <Badge variant="secondary">Education & Career (1)</Badge>
+ </nav>
+ <main className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
+ <Card className="w-full">
+ <img
+ alt="Hard drive"
+ className="w-full h-48 object-cover"
+ height="200"
+ src="/placeholder.svg"
+ style={{
+ aspectRatio: "300/200",
+ objectFit: "cover",
+ }}
+ width="300"
+ />
+ <CardContent>
+ <h3 className="text-lg font-semibold">I'd like to sell you a hard drive.</h3>
+ <p className="text-sm text-gray-600">SUBSTACK.COM</p>
+ <p className="text-sm">
+ Zenfetch is a proposed tool aimed to help knowledge workers retain and leverage the knowledge.
+ </p>
+ </CardContent>
+ <CardFooter className="flex justify-between">
+ <Button variant="ghost">Read More</Button>
+ </CardFooter>
+ </Card>
+ <Card className="w-full">
+ <img
+ alt="AI Prompting"
+ className="w-full h-48 object-cover"
+ height="200"
+ src="/placeholder.svg"
+ style={{
+ aspectRatio: "300/200",
+ objectFit: "cover",
+ }}
+ width="300"
+ />
+ <CardContent>
+ <h3 className="text-lg font-semibold">A guide to prompting AI (for what it is worth)</h3>
+ <p className="text-sm text-gray-600">ONEUSEFULTHING.ORG</p>
+ <p className="text-sm">Summary is still generating. Try refreshing the page in a few seconds.</p>
+ </CardContent>
+ <CardFooter className="flex justify-between">
+ <Button variant="ghost">Read More</Button>
+ </CardFooter>
+ </Card>
+ <Card className="w-full">
+ <img
+ alt="Unlocking Creativity"
+ className="w-full h-48 object-cover"
+ height="200"
+ src="/placeholder.svg"
+ style={{
+ aspectRatio: "300/200",
+ objectFit: "cover",
+ }}
+ width="300"
+ />
+ <CardContent>
+ <h3 className="text-lg font-semibold">Pixel Perfect: How AI Unlocks Creativity</h3>
+ <p className="text-sm text-gray-600">DIGITALNATIVE.TECH</p>
+ <p className="text-sm">Summary is still generating. Try refreshing the page in a few seconds.</p>
+ </CardContent>
+ <CardFooter className="flex justify-between">
+ <Button variant="ghost">Read More</Button>
+ </CardFooter>
+ </Card>
+ <Card className="w-full">
+ <img
+ alt="Tolerance for Fiction"
+ className="w-full h-48 object-cover"
+ height="200"
+ src="/placeholder.svg"
+ style={{
+ aspectRatio: "300/200",
+ objectFit: "cover",
+ }}
+ width="300"
+ />
+ <CardContent>
+ <h3 className="text-lg font-semibold">
+ Our Declining Tolerance for Fiction & Wild Concepts Likely To Become
+ </h3>
+ <p className="text-sm text-gray-600">ARXIV.ORG</p>
+ <p className="text-sm">Summary is still generating. Try refreshing the page in a few seconds.</p>
+ </CardContent>
+ <CardFooter className="flex justify-between">
+ <Button variant="ghost">Read More</Button>
+ </CardFooter>
+ </Card>
+ <Card className="w-full">
+ <img
+ alt="Graph of Thoughts"
+ className="w-full h-48 object-cover"
+ height="200"
+ src="/placeholder.svg"
+ style={{
+ aspectRatio: "300/200",
+ objectFit: "cover",
+ }}
+ width="300"
+ />
+ <CardContent>
+ <h3 className="text-lg font-semibold">
+ Graph of Thoughts: Solving Elaborate Problems with Large Language Models
+ </h3>
+ <p className="text-sm text-gray-600">ARXIV.ORG</p>
+ <p className="text-sm">Summary is still generating. Try refreshing the page in a few seconds.</p>
+ </CardContent>
+ <CardFooter className="flex justify-between">
+ <Button variant="ghost">Read More</Button>
+ </CardFooter>
+ </Card>
+ <Card className="w-full">
+ <img
+ alt="Lacking creativity"
+ className="w-full h-48 object-cover"
+ height="200"
+ src="/placeholder.svg"
+ style={{
+ aspectRatio: "300/200",
+ objectFit: "cover",
+ }}
+ width="300"
+ />
+ <CardContent>
+ <h3 className="text-lg font-semibold">You're not lacking creativity, you're overwhelmed</h3>
+ <p className="text-sm text-gray-600">ARXIV.ORG</p>
+ <p className="text-sm">Summary is still generating. Try refreshing the page in a few seconds.</p>
+ </CardContent>
+ <CardFooter className="flex justify-between">
+ <Button variant="ghost">Read More</Button>
+ </CardFooter>
+ </Card>
+ </main>
+ </div>
+ )
+}
+
+
+function FlagIcon(props: React.SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ {...props}
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="2"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" />
+ <line x1="4" x2="4" y1="22" y2="15" />
+ </svg>
+ )
+}
diff --git a/apps/web/src/components/ui/avatar.tsx b/apps/web/src/components/ui/avatar.tsx
new file mode 100644
index 00000000..fb190df3
--- /dev/null
+++ b/apps/web/src/components/ui/avatar.tsx
@@ -0,0 +1,50 @@
+"use client"
+
+import * as React from "react"
+import * as AvatarPrimitive from "@radix-ui/react-avatar"
+
+import { cn } from "@/lib/utils"
+
+const Avatar = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Root
+ ref={ref}
+ className={cn(
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
+ className
+ )}
+ {...props}
+ />
+))
+Avatar.displayName = AvatarPrimitive.Root.displayName
+
+const AvatarImage = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Image>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Image
+ ref={ref}
+ className={cn("aspect-square h-full w-full", className)}
+ {...props}
+ />
+))
+AvatarImage.displayName = AvatarPrimitive.Image.displayName
+
+const AvatarFallback = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Fallback>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Fallback
+ ref={ref}
+ className={cn(
+ "flex h-full w-full items-center justify-center rounded-full bg-gray-100 dark:bg-gray-800",
+ className
+ )}
+ {...props}
+ />
+))
+AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
+
+export { Avatar, AvatarImage, AvatarFallback }
diff --git a/apps/web/src/components/ui/badge.tsx b/apps/web/src/components/ui/badge.tsx
new file mode 100644
index 00000000..1e21383f
--- /dev/null
+++ b/apps/web/src/components/ui/badge.tsx
@@ -0,0 +1,36 @@
+import * as React from "react"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const badgeVariants = cva(
+ "inline-flex items-center rounded-full border border-gray-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 dark:border-gray-800 dark:focus:ring-gray-300",
+ {
+ variants: {
+ variant: {
+ default:
+ "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
+ secondary:
+ "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ destructive:
+ "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
+ outline: "text-foreground",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
+export interface BadgeProps
+ extends React.HTMLAttributes<HTMLDivElement>,
+ VariantProps<typeof badgeVariants> {}
+
+function Badge({ className, variant, ...props }: BadgeProps) {
+ return (
+ <div className={cn(badgeVariants({ variant }), className)} {...props} />
+ )
+}
+
+export { Badge, badgeVariants }
diff --git a/apps/web/src/components/ui/button.tsx b/apps/web/src/components/ui/button.tsx
new file mode 100644
index 00000000..b67d2657
--- /dev/null
+++ b/apps/web/src/components/ui/button.tsx
@@ -0,0 +1,56 @@
+import * as React from "react"
+import { Slot } from "@radix-ui/react-slot"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const buttonVariants = cva(
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300",
+ {
+ variants: {
+ variant: {
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
+ destructive:
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90",
+ outline:
+ "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
+ secondary:
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ ghost: "hover:bg-accent hover:text-accent-foreground",
+ link: "text-primary underline-offset-4 hover:underline",
+ },
+ size: {
+ default: "h-10 px-4 py-2",
+ sm: "h-9 rounded-md px-3",
+ lg: "h-11 rounded-md px-8",
+ icon: "h-10 w-10",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ size: "default",
+ },
+ }
+)
+
+export interface ButtonProps
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
+ VariantProps<typeof buttonVariants> {
+ asChild?: boolean
+}
+
+const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
+ const Comp = asChild ? Slot : "button"
+ return (
+ <button
+ className={cn(buttonVariants({ variant, size, className }))}
+ ref={ref}
+ {...props}
+ />
+ )
+ }
+)
+Button.displayName = "Button"
+
+export { Button, buttonVariants }
diff --git a/apps/web/src/components/ui/card.tsx b/apps/web/src/components/ui/card.tsx
new file mode 100644
index 00000000..65119a16
--- /dev/null
+++ b/apps/web/src/components/ui/card.tsx
@@ -0,0 +1,79 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+const Card = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn(
+ "rounded-lg border border-gray-200 bg-white text-gray-950 shadow-sm dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50",
+ className
+ )}
+ {...props}
+ />
+))
+Card.displayName = "Card"
+
+const CardHeader = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
+ {...props}
+ />
+))
+CardHeader.displayName = "CardHeader"
+
+const CardTitle = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLHeadingElement>
+>(({ className, ...props }, ref) => (
+ <h3
+ ref={ref}
+ className={cn(
+ "text-2xl font-semibold leading-none tracking-tight",
+ className
+ )}
+ {...props}
+ />
+))
+CardTitle.displayName = "CardTitle"
+
+const CardDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <p
+ ref={ref}
+ className={cn("text-sm text-gray-500 dark:text-gray-400", className)}
+ {...props}
+ />
+))
+CardDescription.displayName = "CardDescription"
+
+const CardContent = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
+))
+CardContent.displayName = "CardContent"
+
+const CardFooter = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex items-center p-6 pt-0", className)}
+ {...props}
+ />
+))
+CardFooter.displayName = "CardFooter"
+
+export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
diff --git a/apps/web/src/components/ui/input.tsx b/apps/web/src/components/ui/input.tsx
new file mode 100644
index 00000000..aae15c80
--- /dev/null
+++ b/apps/web/src/components/ui/input.tsx
@@ -0,0 +1,25 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+export interface InputProps
+ extends React.InputHTMLAttributes<HTMLInputElement> {}
+
+const Input = React.forwardRef<HTMLInputElement, InputProps>(
+ ({ className, type, ...props }, ref) => {
+ return (
+ <input
+ type={type}
+ className={cn(
+ "flex h-10 w-full rounded-md border border-gray-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-800 dark:bg-gray-950 dark:ring-offset-gray-950 dark:placeholder:text-gray-400 dark:focus-visible:ring-gray-300",
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ )
+ }
+)
+Input.displayName = "Input"
+
+export { Input }