A Prediction Market on the AT Protocol

chore(components/ui): cleanup

Ciaran f9324ff9 846a92ab

+5 -259
+5 -5
package.json
··· 20 20 }, 21 21 "devDependencies": { 22 22 "@atcute/cid": "^2.4.1", 23 + "@atcute/lex-cli": "^2.5.3", 24 + "@atcute/lexicon-doc": "^2.1.1", 23 25 "@atcute/tid": "^1.1.2", 26 + "@tailwindcss/vite": "^4.2.1", 24 27 "@types/bun": "latest", 25 28 "@types/pg": "^8.18.0", 26 29 "@types/react": "^19.2.14", 27 30 "@types/react-dom": "^19.2.3", 28 31 "@vitejs/plugin-react": "^5.1.4", 32 + "dotenv": "^17.3.1", 29 33 "drizzle-kit": "^0.31.9", 30 34 "path": "^0.12.7", 31 35 "react": "^19.2.4", 32 36 "react-dom": "^19.2.4", 33 37 "shadcn": "^3.8.5", 38 + "tailwindcss": "^4.2.1", 34 39 "tw-animate-css": "^1.4.0", 35 40 "vite": "^7.3.1", 36 41 "vitest": "^4.0.18" ··· 44 49 "@atcute/client": "^4.2.1", 45 50 "@atcute/identity-resolver": "^1.2.2", 46 51 "@atcute/jetstream": "^1.1.2", 47 - "@atcute/lex-cli": "^2.5.3", 48 - "@atcute/lexicon-doc": "^2.1.1", 49 52 "@atcute/lexicons": "^1.2.9", 50 53 "@atcute/oauth-browser-client": "^3.0.0", 51 54 "@elysiajs/cors": "^1.4.1", 52 55 "@elysiajs/eden": "^1.4.8", 53 56 "@elysiajs/static": "^1.4.7", 54 57 "@elysiajs/swagger": "^1.3.1", 55 - "@tailwindcss/vite": "^4.2.1", 56 58 "@tanstack/react-query": "^5.90.21", 57 59 "class-variance-authority": "^0.7.1", 58 60 "clsx": "^2.1.1", 59 61 "date-fns": "^4.1.0", 60 - "dotenv": "^17.3.1", 61 62 "drizzle-orm": "^0.45.1", 62 63 "elysia": "^1.4.27", 63 64 "lucide-react": "^0.577.0", ··· 67 68 "recharts": "2.15.4", 68 69 "sonner": "^2.0.7", 69 70 "tailwind-merge": "^3.5.0", 70 - "tailwindcss": "^4.2.1", 71 71 "usehooks-ts": "^3.1.1", 72 72 "vaul": "^1.1.2", 73 73 "zod": "^4.3.6"
-48
src/web/components/ui/badge.tsx
··· 1 - import * as React from "react" 2 - import { cva, type VariantProps } from "class-variance-authority" 3 - import { Slot } from "radix-ui" 4 - 5 - import { cn } from "@/web/lib/utils" 6 - 7 - const badgeVariants = cva( 8 - "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", 9 - { 10 - variants: { 11 - variant: { 12 - default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90", 13 - secondary: 14 - "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", 15 - destructive: 16 - "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90", 17 - outline: 18 - "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", 19 - ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground", 20 - link: "text-primary underline-offset-4 [a&]:hover:underline", 21 - }, 22 - }, 23 - defaultVariants: { 24 - variant: "default", 25 - }, 26 - } 27 - ) 28 - 29 - function Badge({ 30 - className, 31 - variant = "default", 32 - asChild = false, 33 - ...props 34 - }: React.ComponentProps<"span"> & 35 - VariantProps<typeof badgeVariants> & { asChild?: boolean }) { 36 - const Comp = asChild ? Slot.Root : "span" 37 - 38 - return ( 39 - <Comp 40 - data-slot="badge" 41 - data-variant={variant} 42 - className={cn(badgeVariants({ variant }), className)} 43 - {...props} 44 - /> 45 - ) 46 - } 47 - 48 - export { Badge, badgeVariants }
-92
src/web/components/ui/card.tsx
··· 1 - import * as React from "react" 2 - 3 - import { cn } from "@/web/lib/utils" 4 - 5 - function Card({ className, ...props }: React.ComponentProps<"div">) { 6 - return ( 7 - <div 8 - data-slot="card" 9 - className={cn( 10 - "flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm", 11 - className 12 - )} 13 - {...props} 14 - /> 15 - ) 16 - } 17 - 18 - function CardHeader({ className, ...props }: React.ComponentProps<"div">) { 19 - return ( 20 - <div 21 - data-slot="card-header" 22 - className={cn( 23 - "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", 24 - className 25 - )} 26 - {...props} 27 - /> 28 - ) 29 - } 30 - 31 - function CardTitle({ className, ...props }: React.ComponentProps<"div">) { 32 - return ( 33 - <div 34 - data-slot="card-title" 35 - className={cn("leading-none font-semibold", className)} 36 - {...props} 37 - /> 38 - ) 39 - } 40 - 41 - function CardDescription({ className, ...props }: React.ComponentProps<"div">) { 42 - return ( 43 - <div 44 - data-slot="card-description" 45 - className={cn("text-sm text-muted-foreground", className)} 46 - {...props} 47 - /> 48 - ) 49 - } 50 - 51 - function CardAction({ className, ...props }: React.ComponentProps<"div">) { 52 - return ( 53 - <div 54 - data-slot="card-action" 55 - className={cn( 56 - "col-start-2 row-span-2 row-start-1 self-start justify-self-end", 57 - className 58 - )} 59 - {...props} 60 - /> 61 - ) 62 - } 63 - 64 - function CardContent({ className, ...props }: React.ComponentProps<"div">) { 65 - return ( 66 - <div 67 - data-slot="card-content" 68 - className={cn("px-6", className)} 69 - {...props} 70 - /> 71 - ) 72 - } 73 - 74 - function CardFooter({ className, ...props }: React.ComponentProps<"div">) { 75 - return ( 76 - <div 77 - data-slot="card-footer" 78 - className={cn("flex items-center px-6 [.border-t]:pt-6", className)} 79 - {...props} 80 - /> 81 - ) 82 - } 83 - 84 - export { 85 - Card, 86 - CardHeader, 87 - CardFooter, 88 - CardTitle, 89 - CardAction, 90 - CardDescription, 91 - CardContent, 92 - }
-114
src/web/components/ui/table.tsx
··· 1 - import * as React from "react" 2 - 3 - import { cn } from "@/web/lib/utils" 4 - 5 - function Table({ className, ...props }: React.ComponentProps<"table">) { 6 - return ( 7 - <div 8 - data-slot="table-container" 9 - className="relative w-full overflow-x-auto" 10 - > 11 - <table 12 - data-slot="table" 13 - className={cn("w-full caption-bottom text-sm", className)} 14 - {...props} 15 - /> 16 - </div> 17 - ) 18 - } 19 - 20 - function TableHeader({ className, ...props }: React.ComponentProps<"thead">) { 21 - return ( 22 - <thead 23 - data-slot="table-header" 24 - className={cn("[&_tr]:border-b", className)} 25 - {...props} 26 - /> 27 - ) 28 - } 29 - 30 - function TableBody({ className, ...props }: React.ComponentProps<"tbody">) { 31 - return ( 32 - <tbody 33 - data-slot="table-body" 34 - className={cn("[&_tr:last-child]:border-0", className)} 35 - {...props} 36 - /> 37 - ) 38 - } 39 - 40 - function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) { 41 - return ( 42 - <tfoot 43 - data-slot="table-footer" 44 - className={cn( 45 - "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", 46 - className 47 - )} 48 - {...props} 49 - /> 50 - ) 51 - } 52 - 53 - function TableRow({ className, ...props }: React.ComponentProps<"tr">) { 54 - return ( 55 - <tr 56 - data-slot="table-row" 57 - className={cn( 58 - "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", 59 - className 60 - )} 61 - {...props} 62 - /> 63 - ) 64 - } 65 - 66 - function TableHead({ className, ...props }: React.ComponentProps<"th">) { 67 - return ( 68 - <th 69 - data-slot="table-head" 70 - className={cn( 71 - "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", 72 - className 73 - )} 74 - {...props} 75 - /> 76 - ) 77 - } 78 - 79 - function TableCell({ className, ...props }: React.ComponentProps<"td">) { 80 - return ( 81 - <td 82 - data-slot="table-cell" 83 - className={cn( 84 - "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", 85 - className 86 - )} 87 - {...props} 88 - /> 89 - ) 90 - } 91 - 92 - function TableCaption({ 93 - className, 94 - ...props 95 - }: React.ComponentProps<"caption">) { 96 - return ( 97 - <caption 98 - data-slot="table-caption" 99 - className={cn("mt-4 text-sm text-muted-foreground", className)} 100 - {...props} 101 - /> 102 - ) 103 - } 104 - 105 - export { 106 - Table, 107 - TableHeader, 108 - TableBody, 109 - TableFooter, 110 - TableHead, 111 - TableRow, 112 - TableCell, 113 - TableCaption, 114 - }