Skip to content

Commit 0482a0a

Browse files
committed
shadcn update
1 parent bcf9968 commit 0482a0a

File tree

13 files changed

+917
-764
lines changed

13 files changed

+917
-764
lines changed

bun.lock

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,13 @@
135135
"@radix-ui/react-switch": "^1.1.0",
136136
"@radix-ui/react-tooltip": "^1.1.2",
137137
"@xixixao/uploadstuff": "^0.0.5",
138-
"class-variance-authority": "^0.7.0",
139-
"lucide-react": "^0.438.0",
140-
"tailwind-merge": "^2.5.2",
138+
"class-variance-authority": "^0.7.1",
139+
"clsx": "^2.1.1",
140+
"lucide-react": "^0.544.0",
141+
"tailwind-merge": "^3.3.1",
141142
"tailwindcss-animate": "^1.0.7",
142-
"zod": "^3.23.8",
143+
"tw-animate-css": "^1.4.0",
144+
"zod": "^4.1.11",
143145
},
144146
"devDependencies": {
145147
"@tailwindcss/postcss": "^4.1.13",
@@ -1442,7 +1444,7 @@
14421444

14431445
"lucia": ["[email protected]", "", { "dependencies": { "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0" } }, "sha512-P1FlFBGCMPMXu+EGdVD9W4Mjm0DqsusmKgO7Xc33mI5X1bklmsQb0hfzPhXomQr9waWIBDsiOjvr1e6BTaUqpA=="],
14441446

1445-
"lucide-react": ["lucide-react@0.438.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" } }, "sha512-uq6yCB+IzVfgIPMK8ibkecXSWTTSOMs9UjUgZigfrDCVqgdwkpIgYg1fSYnf0XXF2AoSyCJZhoZXQwzoai7VGw=="],
1447+
"lucide-react": ["lucide-react@0.544.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-t5tS44bqd825zAW45UQxpG2CvcC4urOwn2TrwSH8u+MjeE+1NnWl6QqeQ/6NdjMqdOygyiT9p3Ev0p1NJykxjw=="],
14461448

14471449
"magic-string": ["[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw=="],
14481450

@@ -1750,7 +1752,7 @@
17501752

17511753
"supports-preserve-symlinks-flag": ["[email protected]", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="],
17521754

1753-
"tailwind-merge": ["tailwind-merge@2.6.0", "", {}, "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA=="],
1755+
"tailwind-merge": ["tailwind-merge@3.3.1", "", {}, "sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g=="],
17541756

17551757
"tailwindcss": ["[email protected]", "", {}, "sha512-i+zidfmTqtwquj4hMEwdjshYYgMbOrPzb9a0M3ZgNa0JMoZeFC6bxZvO8yr8ozS6ix2SDz0+mvryPeBs2TFE+w=="],
17561758

@@ -1808,6 +1810,8 @@
18081810

18091811
"turbo-windows-arm64": ["[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-oFKkMj11KKUv3xSK9/fhAEQTxLUp1Ol1EOktwc32+SFtEU0uls7kosAz0b+qe8k3pJGEMFdDPdqoEjyJidbxtQ=="],
18101812

1813+
"tw-animate-css": ["[email protected]", "", {}, "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ=="],
1814+
18111815
"type-fest": ["[email protected]", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
18121816

18131817
"typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="],
@@ -1904,6 +1908,8 @@
19041908

19051909
"@convex-dev/auth/cookie": ["[email protected]", "", {}, "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA=="],
19061910

1911+
"@d0/ui/zod": ["[email protected]", "", {}, "sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg=="],
1912+
19071913
"@d0/web/@convex-dev/polar": ["@erquhart/[email protected]", "", { "dependencies": { "@polar-sh/checkout": "^0.1.9", "buffer": "^6.0.3", "convex-helpers": "^0.1.63", "remeda": "^2.20.2", "standardwebhooks": "^1.0.0" }, "peerDependencies": { "@polar-sh/sdk": "^0.26.1", "convex": "^1.19.2", "react": "^18", "react-dom": "^18" } }, "sha512-ZFgEssRQ4PjbvcjN7iXELJ41q0rWJxwfK/wDj8QZZcVxcpFxhOmEiBoRHy4IFJFfMYqpDrhqlnonu3StixYi3g=="],
19081914

19091915
"@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ=="],
@@ -1936,6 +1942,8 @@
19361942

19371943
"@polar-sh/ui/lucide-react": ["[email protected]", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" } }, "sha512-Scpw3D/dV1bgVRC5Kh774RCm99z0iZpPv75M6kg7QL1lLvkQ1rmI1Sjjic1aGp1ULBwd7FokV6ry0g+d6pMB+w=="],
19381944

1945+
"@polar-sh/ui/tailwind-merge": ["[email protected]", "", {}, "sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA=="],
1946+
19391947
"@prisma/instrumentation/@opentelemetry/instrumentation": ["@opentelemetry/[email protected]", "", { "dependencies": { "@opentelemetry/api-logs": "0.53.0", "@types/shimmer": "^1.2.0", "import-in-the-middle": "^1.8.1", "require-in-the-middle": "^7.1.1", "semver": "^7.5.2", "shimmer": "^1.2.1" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A=="],
19401948

19411949
"@remix-run/server-runtime/cookie": ["[email protected]", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="],

packages/ui/components.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"rsc": true,
55
"tsx": true,
66
"tailwind": {
7-
"config": "tailwind.config.ts",
7+
"config": "",
88
"css": "src/globals.css",
9-
"baseColor": "gray",
9+
"baseColor": "neutral",
1010
"cssVariables": true,
1111
"prefix": ""
1212
},
@@ -16,5 +16,6 @@
1616
"lib": "@/lib",
1717
"ui": "@/components",
1818
"utils": "@/utils"
19-
}
19+
},
20+
"iconLibrary": "lucide"
2021
}

packages/ui/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@
4949
"@radix-ui/react-switch": "^1.1.0",
5050
"@radix-ui/react-tooltip": "^1.1.2",
5151
"@xixixao/uploadstuff": "^0.0.5",
52-
"class-variance-authority": "^0.7.0",
53-
"lucide-react": "^0.438.0",
54-
"tailwind-merge": "^2.5.2",
52+
"class-variance-authority": "^0.7.1",
53+
"clsx": "^2.1.1",
54+
"lucide-react": "^0.544.0",
55+
"tailwind-merge": "^3.3.1",
5556
"tailwindcss-animate": "^1.0.7",
56-
"zod": "^3.23.8"
57+
"tw-animate-css": "^1.4.0",
58+
"zod": "^4.1.11"
5759
}
5860
}
Lines changed: 48 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,53 @@
1-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
2-
import * as React from "react";
1+
"use client"
32

4-
import { cn } from "../utils";
3+
import * as React from "react"
4+
import * as AvatarPrimitive from "@radix-ui/react-avatar"
55

6-
const Avatar = React.forwardRef<
7-
React.ElementRef<typeof AvatarPrimitive.Root>,
8-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
9-
>(({ className, ...props }, ref) => (
10-
<AvatarPrimitive.Root
11-
ref={ref}
12-
className={cn(
13-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
14-
className,
15-
)}
16-
{...props}
17-
/>
18-
));
19-
Avatar.displayName = AvatarPrimitive.Root.displayName;
6+
import { cn } from "@/utils"
207

21-
const AvatarImage = React.forwardRef<
22-
React.ElementRef<typeof AvatarPrimitive.Image>,
23-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
24-
>(({ className, ...props }, ref) => (
25-
<AvatarPrimitive.Image
26-
ref={ref}
27-
className={cn("aspect-square h-full w-full", className)}
28-
{...props}
29-
/>
30-
));
31-
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
8+
function Avatar({
9+
className,
10+
...props
11+
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
12+
return (
13+
<AvatarPrimitive.Root
14+
data-slot="avatar"
15+
className={cn(
16+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
17+
className
18+
)}
19+
{...props}
20+
/>
21+
)
22+
}
3223

33-
const AvatarFallback = React.forwardRef<
34-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
35-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
36-
>(({ className, ...props }, ref) => (
37-
<AvatarPrimitive.Fallback
38-
ref={ref}
39-
className={cn(
40-
"flex h-full w-full items-center justify-center rounded-full bg-muted",
41-
className,
42-
)}
43-
{...props}
44-
/>
45-
));
46-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
24+
function AvatarImage({
25+
className,
26+
...props
27+
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
28+
return (
29+
<AvatarPrimitive.Image
30+
data-slot="avatar-image"
31+
className={cn("aspect-square size-full", className)}
32+
{...props}
33+
/>
34+
)
35+
}
4736

48-
export { Avatar, AvatarImage, AvatarFallback };
37+
function AvatarFallback({
38+
className,
39+
...props
40+
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
41+
return (
42+
<AvatarPrimitive.Fallback
43+
data-slot="avatar-fallback"
44+
className={cn(
45+
"bg-muted flex size-full items-center justify-center rounded-full",
46+
className
47+
)}
48+
{...props}
49+
/>
50+
)
51+
}
52+
53+
export { Avatar, AvatarImage, AvatarFallback }
Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,58 @@
1-
import { Slot } from "@radix-ui/react-slot";
2-
import { type VariantProps, cva } from "class-variance-authority";
3-
import * as React from "react";
1+
import * as React from "react"
2+
import { Slot } from "@radix-ui/react-slot"
3+
import { cva, type VariantProps } from "class-variance-authority"
44

5-
import { cn } from "../utils";
5+
import { cn } from "@/utils"
66

77
const buttonVariants = cva(
8-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
8+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
99
{
1010
variants: {
1111
variant: {
1212
default: "bg-primary text-primary-foreground hover:bg-primary/90",
1313
destructive:
14-
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
14+
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
1515
outline:
16-
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
16+
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
1717
secondary:
1818
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
19-
ghost: "hover:bg-accent hover:text-accent-foreground",
19+
ghost:
20+
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
2021
link: "text-primary underline-offset-4 hover:underline",
2122
},
2223
size: {
23-
default: "h-10 px-4 py-2",
24-
sm: "h-9 rounded-md px-3",
25-
lg: "h-11 rounded-md px-8",
26-
icon: "h-10 w-10",
24+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
25+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
26+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
27+
icon: "size-9",
2728
},
2829
},
2930
defaultVariants: {
3031
variant: "default",
3132
size: "default",
3233
},
33-
},
34-
);
34+
}
35+
)
3536

36-
export interface ButtonProps
37-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38-
VariantProps<typeof buttonVariants> {
39-
asChild?: boolean;
40-
}
37+
function Button({
38+
className,
39+
variant,
40+
size,
41+
asChild = false,
42+
...props
43+
}: React.ComponentProps<"button"> &
44+
VariantProps<typeof buttonVariants> & {
45+
asChild?: boolean
46+
}) {
47+
const Comp = asChild ? Slot : "button"
4148

42-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43-
({ className, variant, size, asChild = false, ...props }, ref) => {
44-
const Comp = asChild ? Slot : "button";
45-
return (
46-
<Comp
47-
className={cn(buttonVariants({ variant, size, className }))}
48-
ref={ref}
49-
{...props}
50-
/>
51-
);
52-
},
53-
);
54-
Button.displayName = "Button";
49+
return (
50+
<Comp
51+
data-slot="button"
52+
className={cn(buttonVariants({ variant, size, className }))}
53+
{...props}
54+
/>
55+
)
56+
}
5557

56-
export { Button, buttonVariants };
58+
export { Button, buttonVariants }

0 commit comments

Comments
 (0)