tangled
alpha
login
or
join now
ciaran.co.za
/
cumulus
0
fork
atom
A Prediction Market on the AT Protocol
0
fork
atom
overview
issues
pulls
pipelines
chore(components/ui): cleanup
Ciaran
1 week ago
f9324ff9
846a92ab
+5
-259
4 changed files
expand all
collapse all
unified
split
package.json
src
web
components
ui
badge.tsx
card.tsx
table.tsx
+5
-5
package.json
···
20
20
},
21
21
"devDependencies": {
22
22
"@atcute/cid": "^2.4.1",
23
23
+
"@atcute/lex-cli": "^2.5.3",
24
24
+
"@atcute/lexicon-doc": "^2.1.1",
23
25
"@atcute/tid": "^1.1.2",
26
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
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
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
47
-
"@atcute/lex-cli": "^2.5.3",
48
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
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
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
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
1
-
import * as React from "react"
2
2
-
import { cva, type VariantProps } from "class-variance-authority"
3
3
-
import { Slot } from "radix-ui"
4
4
-
5
5
-
import { cn } from "@/web/lib/utils"
6
6
-
7
7
-
const badgeVariants = cva(
8
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
9
-
{
10
10
-
variants: {
11
11
-
variant: {
12
12
-
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
13
13
-
secondary:
14
14
-
"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
15
15
-
destructive:
16
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
17
-
outline:
18
18
-
"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
19
19
-
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
20
20
-
link: "text-primary underline-offset-4 [a&]:hover:underline",
21
21
-
},
22
22
-
},
23
23
-
defaultVariants: {
24
24
-
variant: "default",
25
25
-
},
26
26
-
}
27
27
-
)
28
28
-
29
29
-
function Badge({
30
30
-
className,
31
31
-
variant = "default",
32
32
-
asChild = false,
33
33
-
...props
34
34
-
}: React.ComponentProps<"span"> &
35
35
-
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
36
36
-
const Comp = asChild ? Slot.Root : "span"
37
37
-
38
38
-
return (
39
39
-
<Comp
40
40
-
data-slot="badge"
41
41
-
data-variant={variant}
42
42
-
className={cn(badgeVariants({ variant }), className)}
43
43
-
{...props}
44
44
-
/>
45
45
-
)
46
46
-
}
47
47
-
48
48
-
export { Badge, badgeVariants }
-92
src/web/components/ui/card.tsx
···
1
1
-
import * as React from "react"
2
2
-
3
3
-
import { cn } from "@/web/lib/utils"
4
4
-
5
5
-
function Card({ className, ...props }: React.ComponentProps<"div">) {
6
6
-
return (
7
7
-
<div
8
8
-
data-slot="card"
9
9
-
className={cn(
10
10
-
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
11
11
-
className
12
12
-
)}
13
13
-
{...props}
14
14
-
/>
15
15
-
)
16
16
-
}
17
17
-
18
18
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
19
19
-
return (
20
20
-
<div
21
21
-
data-slot="card-header"
22
22
-
className={cn(
23
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
24
-
className
25
25
-
)}
26
26
-
{...props}
27
27
-
/>
28
28
-
)
29
29
-
}
30
30
-
31
31
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
32
32
-
return (
33
33
-
<div
34
34
-
data-slot="card-title"
35
35
-
className={cn("leading-none font-semibold", className)}
36
36
-
{...props}
37
37
-
/>
38
38
-
)
39
39
-
}
40
40
-
41
41
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
42
42
-
return (
43
43
-
<div
44
44
-
data-slot="card-description"
45
45
-
className={cn("text-sm text-muted-foreground", className)}
46
46
-
{...props}
47
47
-
/>
48
48
-
)
49
49
-
}
50
50
-
51
51
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
52
52
-
return (
53
53
-
<div
54
54
-
data-slot="card-action"
55
55
-
className={cn(
56
56
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
57
57
-
className
58
58
-
)}
59
59
-
{...props}
60
60
-
/>
61
61
-
)
62
62
-
}
63
63
-
64
64
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
65
65
-
return (
66
66
-
<div
67
67
-
data-slot="card-content"
68
68
-
className={cn("px-6", className)}
69
69
-
{...props}
70
70
-
/>
71
71
-
)
72
72
-
}
73
73
-
74
74
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
75
75
-
return (
76
76
-
<div
77
77
-
data-slot="card-footer"
78
78
-
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
79
79
-
{...props}
80
80
-
/>
81
81
-
)
82
82
-
}
83
83
-
84
84
-
export {
85
85
-
Card,
86
86
-
CardHeader,
87
87
-
CardFooter,
88
88
-
CardTitle,
89
89
-
CardAction,
90
90
-
CardDescription,
91
91
-
CardContent,
92
92
-
}
-114
src/web/components/ui/table.tsx
···
1
1
-
import * as React from "react"
2
2
-
3
3
-
import { cn } from "@/web/lib/utils"
4
4
-
5
5
-
function Table({ className, ...props }: React.ComponentProps<"table">) {
6
6
-
return (
7
7
-
<div
8
8
-
data-slot="table-container"
9
9
-
className="relative w-full overflow-x-auto"
10
10
-
>
11
11
-
<table
12
12
-
data-slot="table"
13
13
-
className={cn("w-full caption-bottom text-sm", className)}
14
14
-
{...props}
15
15
-
/>
16
16
-
</div>
17
17
-
)
18
18
-
}
19
19
-
20
20
-
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
21
21
-
return (
22
22
-
<thead
23
23
-
data-slot="table-header"
24
24
-
className={cn("[&_tr]:border-b", className)}
25
25
-
{...props}
26
26
-
/>
27
27
-
)
28
28
-
}
29
29
-
30
30
-
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
31
31
-
return (
32
32
-
<tbody
33
33
-
data-slot="table-body"
34
34
-
className={cn("[&_tr:last-child]:border-0", className)}
35
35
-
{...props}
36
36
-
/>
37
37
-
)
38
38
-
}
39
39
-
40
40
-
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
41
41
-
return (
42
42
-
<tfoot
43
43
-
data-slot="table-footer"
44
44
-
className={cn(
45
45
-
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
46
46
-
className
47
47
-
)}
48
48
-
{...props}
49
49
-
/>
50
50
-
)
51
51
-
}
52
52
-
53
53
-
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
54
54
-
return (
55
55
-
<tr
56
56
-
data-slot="table-row"
57
57
-
className={cn(
58
58
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
59
59
-
className
60
60
-
)}
61
61
-
{...props}
62
62
-
/>
63
63
-
)
64
64
-
}
65
65
-
66
66
-
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
67
67
-
return (
68
68
-
<th
69
69
-
data-slot="table-head"
70
70
-
className={cn(
71
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
72
-
className
73
73
-
)}
74
74
-
{...props}
75
75
-
/>
76
76
-
)
77
77
-
}
78
78
-
79
79
-
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
80
80
-
return (
81
81
-
<td
82
82
-
data-slot="table-cell"
83
83
-
className={cn(
84
84
-
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
85
85
-
className
86
86
-
)}
87
87
-
{...props}
88
88
-
/>
89
89
-
)
90
90
-
}
91
91
-
92
92
-
function TableCaption({
93
93
-
className,
94
94
-
...props
95
95
-
}: React.ComponentProps<"caption">) {
96
96
-
return (
97
97
-
<caption
98
98
-
data-slot="table-caption"
99
99
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
100
100
-
{...props}
101
101
-
/>
102
102
-
)
103
103
-
}
104
104
-
105
105
-
export {
106
106
-
Table,
107
107
-
TableHeader,
108
108
-
TableBody,
109
109
-
TableFooter,
110
110
-
TableHead,
111
111
-
TableRow,
112
112
-
TableCell,
113
113
-
TableCaption,
114
114
-
}