Skip to content

Commit a045855

Browse files
feat: tailwind v4 (#4)
* feat: tailwind v4 * fix: update shadcn
1 parent 3565ac8 commit a045855

20 files changed

+448
-660
lines changed

components.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"rsc": true,
55
"tsx": true,
66
"tailwind": {
7-
"config": "tailwind.config.ts",
8-
"css": "src/styles/globals.css",
7+
"config": "",
8+
"css": "src/index.css",
99
"baseColor": "neutral",
1010
"cssVariables": true,
1111
"prefix": ""
@@ -18,4 +18,4 @@
1818
"hooks": "@/hooks"
1919
},
2020
"iconLibrary": "lucide"
21-
}
21+
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"zod": "^3.23.3"
5858
},
5959
"devDependencies": {
60+
"@tailwindcss/postcss": "^4.1.4",
6061
"@types/eslint": "^8.56.10",
6162
"@types/node": "^20.14.10",
6263
"@types/react": "^18.3.3",
@@ -67,8 +68,8 @@
6768
"eslint-config-next": "^15.0.1",
6869
"postcss": "^8.4.39",
6970
"prettier": "^3.3.2",
70-
"prettier-plugin-tailwindcss": "^0.6.5",
71-
"tailwindcss": "^3.4.3",
71+
"prettier-plugin-tailwindcss": "^0.6.11",
72+
"tailwindcss": "^4.1.4",
7273
"typescript": "^5.5.3"
7374
},
7475
"ct3aMetadata": {

pnpm-lock.yaml

Lines changed: 275 additions & 490 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
22
plugins: {
3-
tailwindcss: {},
3+
'@tailwindcss/postcss': {},
44
},
55
};

src/app/login/github.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function Github({ callbackURL }: { callbackURL: string }) {
2828
"w-full min-w-52 py-6",
2929
isLoading
3030
? "flex cursor-not-allowed items-center justify-center bg-white/20 text-white hover:bg-white/20"
31-
: "grid grid-cols-[auto_1fr] grid-rows-1 bg-white hover:bg-white/80",
31+
: "grid grid-cols-[auto_1fr] grid-rows-1 cursor-pointer bg-white hover:bg-white/80",
3232
)}
3333
>
3434
{isLoading ? (

src/components/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const HEADER_HEIGHT = "4.5rem";
88

99
export async function Header() {
1010
return (
11-
<header className="sticky top-0 isolate z-20 flex h-[--header-height] w-full shrink-0 items-center justify-center border-b bg-card">
11+
<header className="sticky top-0 isolate z-20 flex h-(--header-height) w-full shrink-0 items-center justify-center border-b bg-card">
1212
<div className="container mx-auto flex items-center justify-center space-x-6 px-4">
1313
<Link href="/">
1414
<div className="flex items-center space-x-4">

src/components/sidebar/admin-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function AdminSidebar({
8686
<Sidebar
8787
collapsible="icon"
8888
variant="inset"
89-
className="top-[--header-height] pb-[--header-height]"
89+
className="top-(--header-height) pb-(--header-height)"
9090
{...props}
9191
>
9292
<SidebarHeader>

src/components/sidebar/nav-user.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function NavUser({
5454
</SidebarMenuButton>
5555
</DropdownMenuTrigger>
5656
<DropdownMenuContent
57-
className="w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg"
57+
className="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg"
5858
side={isMobile ? "bottom" : "right"}
5959
align="end"
6060
sideOffset={4}

src/components/ui/button.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ import { cva, type VariantProps } from "class-variance-authority";
55
import { cn } from "@/lib/utils";
66

77
const buttonVariants = cva(
8-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30 [&_svg]:pointer-events-none [&_svg]:shrink-0",
8+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30 [&_svg]:pointer-events-none [&_svg]:shrink-0",
99
{
1010
variants: {
1111
variant: {
1212
default:
13-
"bg-primary text-primary-foreground shadow hover:bg-primary/90",
13+
"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
1414
destructive:
15-
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/80",
15+
"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/80",
1616
success:
17-
"bg-success text-success-foreground shadow-sm hover:bg-success/80",
17+
"bg-success text-success-foreground shadow-xs hover:bg-success/80",
1818
outline:
19-
"border border-border bg-transparent shadow-sm hover:bg-border/30 hover:text-accent-foreground",
19+
"border border-border bg-transparent shadow-xs hover:bg-border/30 hover:text-accent-foreground",
2020
secondary:
21-
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
21+
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
2222
ghost: "hover:bg-accent hover:text-accent-foreground",
2323
link: "text-primary underline-offset-4 hover:underline",
2424
},

src/components/ui/command.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const CommandInput = React.forwardRef<
4444
<CommandPrimitive.Input
4545
ref={ref}
4646
className={cn(
47-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
47+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
4848
className,
4949
)}
5050
{...props}
@@ -115,7 +115,7 @@ const CommandItem = React.forwardRef<
115115
<CommandPrimitive.Item
116116
ref={ref}
117117
className={cn(
118-
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
118+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
119119
className,
120120
)}
121121
{...props}

0 commit comments

Comments
 (0)