Skip to content

Commit a447cc3

Browse files
committed
chore: 🤖 upgrade shadcn to react@19
1 parent f5c4928 commit a447cc3

23 files changed

Lines changed: 2936 additions & 3614 deletions

app/about/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ export default function AboutPage() {
2323
<div className="mt-8 grid grid-cols-12 gap-10">
2424
<div className="col-span-12 flex flex-col justify-start md:col-span-7">
2525
<TypographyH1>
26-
<span className="inline-block bg-gradient-to-r from-primary via-fuchsia-600 to-red-400 bg-clip-text text-5xl text-transparent">
26+
<span className="from-primary inline-block bg-linear-to-r via-fuchsia-600 to-red-400 bg-clip-text text-5xl text-transparent">
2727
Hey 👋🏻
2828
</span>
2929
&nbsp;I&apos;m James
3030
</TypographyH1>
31-
<TypographyP className="my-3 break-normal text-xl">
31+
<TypographyP className="my-3 text-xl break-normal">
3232
I live in Utah where I write software & enjoy the outdoors.
3333
</TypographyP>
34-
<TypographyP className="my-3 break-normal text-xl">
34+
<TypographyP className="my-3 text-xl break-normal">
3535
In my free-time I love tinkering with home automations, riding my mountain bike & playing video games.
3636
</TypographyP>
37-
<TypographyP className="my-3 break-normal text-xl">
37+
<TypographyP className="my-3 text-xl break-normal">
3838
I&apos;m a coffee nut. From Espresso, French-Press, to Pour Over, some of my favorite moments in life are
3939
looking out at a crisp morning with a hot cup in my hand.
4040
</TypographyP>
@@ -44,7 +44,7 @@ export default function AboutPage() {
4444
alt="Picture of James Side Profile"
4545
width={416}
4646
height={416}
47-
className="col-span-12 mb-8 mr-auto rounded-lg shadow-xl md:col-span-5 md:rotate-3"
47+
className="col-span-12 mr-auto mb-8 rounded-lg shadow-xl md:col-span-5 md:rotate-3"
4848
priority
4949
/>
5050
<section className="col-span-12 flex flex-col gap-8 md:col-span-7">

app/globals.css

Lines changed: 111 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
2+
3+
@custom-variant dark (&:is(.dark *));
44

55
@layer base {
66
:root {
@@ -59,16 +59,118 @@
5959
}
6060
}
6161

62+
@theme inline {
63+
--radius-sm: calc(var(--radius) - 4px);
64+
--radius-md: calc(var(--radius) - 2px);
65+
--radius-lg: var(--radius);
66+
--radius-xl: calc(var(--radius) + 4px);
67+
--color-background: var(--background);
68+
--color-foreground: var(--foreground);
69+
--color-card: var(--card);
70+
--color-card-foreground: var(--card-foreground);
71+
--color-popover: var(--popover);
72+
--color-popover-foreground: var(--popover-foreground);
73+
--color-primary: var(--primary);
74+
--color-primary-foreground: var(--primary-foreground);
75+
--color-secondary: var(--secondary);
76+
--color-secondary-foreground: var(--secondary-foreground);
77+
--color-muted: var(--muted);
78+
--color-muted-foreground: var(--muted-foreground);
79+
--color-accent: var(--accent);
80+
--color-accent-foreground: var(--accent-foreground);
81+
--color-destructive: var(--destructive);
82+
--color-border: var(--border);
83+
--color-input: var(--input);
84+
--color-ring: var(--ring);
85+
--color-chart-1: var(--chart-1);
86+
--color-chart-2: var(--chart-2);
87+
--color-chart-3: var(--chart-3);
88+
--color-chart-4: var(--chart-4);
89+
--color-chart-5: var(--chart-5);
90+
--color-sidebar: var(--sidebar);
91+
--color-sidebar-foreground: var(--sidebar-foreground);
92+
--color-sidebar-primary: var(--sidebar-primary);
93+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
94+
--color-sidebar-accent: var(--sidebar-accent);
95+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
96+
--color-sidebar-border: var(--sidebar-border);
97+
--color-sidebar-ring: var(--sidebar-ring);
98+
}
99+
100+
:root {
101+
--radius: 0.625rem;
102+
--background: oklch(1 0 0);
103+
--foreground: oklch(0.145 0 0);
104+
--card: oklch(1 0 0);
105+
--card-foreground: oklch(0.145 0 0);
106+
--popover: oklch(1 0 0);
107+
--popover-foreground: oklch(0.145 0 0);
108+
--primary: oklch(0.205 0 0);
109+
--primary-foreground: oklch(0.985 0 0);
110+
--secondary: oklch(0.97 0 0);
111+
--secondary-foreground: oklch(0.205 0 0);
112+
--muted: oklch(0.97 0 0);
113+
--muted-foreground: oklch(0.556 0 0);
114+
--accent: oklch(0.97 0 0);
115+
--accent-foreground: oklch(0.205 0 0);
116+
--destructive: oklch(0.577 0.245 27.325);
117+
--border: oklch(0.922 0 0);
118+
--input: oklch(0.922 0 0);
119+
--ring: oklch(0.708 0 0);
120+
--chart-1: oklch(0.646 0.222 41.116);
121+
--chart-2: oklch(0.6 0.118 184.704);
122+
--chart-3: oklch(0.398 0.07 227.392);
123+
--chart-4: oklch(0.828 0.189 84.429);
124+
--chart-5: oklch(0.769 0.188 70.08);
125+
--sidebar: oklch(0.985 0 0);
126+
--sidebar-foreground: oklch(0.145 0 0);
127+
--sidebar-primary: oklch(0.205 0 0);
128+
--sidebar-primary-foreground: oklch(0.985 0 0);
129+
--sidebar-accent: oklch(0.97 0 0);
130+
--sidebar-accent-foreground: oklch(0.205 0 0);
131+
--sidebar-border: oklch(0.922 0 0);
132+
--sidebar-ring: oklch(0.708 0 0);
133+
}
134+
135+
.dark {
136+
--background: oklch(0.145 0 0);
137+
--foreground: oklch(0.985 0 0);
138+
--card: oklch(0.205 0 0);
139+
--card-foreground: oklch(0.985 0 0);
140+
--popover: oklch(0.205 0 0);
141+
--popover-foreground: oklch(0.985 0 0);
142+
--primary: oklch(0.922 0 0);
143+
--primary-foreground: oklch(0.205 0 0);
144+
--secondary: oklch(0.269 0 0);
145+
--secondary-foreground: oklch(0.985 0 0);
146+
--muted: oklch(0.269 0 0);
147+
--muted-foreground: oklch(0.708 0 0);
148+
--accent: oklch(0.269 0 0);
149+
--accent-foreground: oklch(0.985 0 0);
150+
--destructive: oklch(0.704 0.191 22.216);
151+
--border: oklch(1 0 0 / 10%);
152+
--input: oklch(1 0 0 / 15%);
153+
--ring: oklch(0.556 0 0);
154+
--chart-1: oklch(0.488 0.243 264.376);
155+
--chart-2: oklch(0.696 0.17 162.48);
156+
--chart-3: oklch(0.769 0.188 70.08);
157+
--chart-4: oklch(0.627 0.265 303.9);
158+
--chart-5: oklch(0.645 0.246 16.439);
159+
--sidebar: oklch(0.205 0 0);
160+
--sidebar-foreground: oklch(0.985 0 0);
161+
--sidebar-primary: oklch(0.488 0.243 264.376);
162+
--sidebar-primary-foreground: oklch(0.985 0 0);
163+
--sidebar-accent: oklch(0.269 0 0);
164+
--sidebar-accent-foreground: oklch(0.985 0 0);
165+
--sidebar-border: oklch(1 0 0 / 10%);
166+
--sidebar-ring: oklch(0.556 0 0);
167+
}
168+
62169
@layer base {
63170
* {
64-
@apply border-border;
171+
@apply border-border outline-ring/50;
65172
}
66173
body {
67174
@apply bg-background text-foreground;
68175
}
69176
}
70-
71-
@media (prefers-color-scheme: dark) {
72-
:root {
73-
}
74-
}

app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default async function HomePage() {
2121
<TypographyP className="my-3 text-lg">
2222
I&apos;m a full-stack Software Engineer, UI/UX enthusiast, tinkerer, & self-proclaimed developer advocate.
2323
I&apos;m currently dedicated to enhancing personalized learning for every student at{' '}
24-
<Link href="https://schoolai.com" className="mr-0.5 text-primary hover:underline">
24+
<Link href="https://schoolai.com" className="text-primary mr-0.5 hover:underline">
2525
SchoolAI
2626
</Link>
2727
.
@@ -47,7 +47,7 @@ export default async function HomePage() {
4747
<CardTitle>{post.title}</CardTitle>
4848
</CardHeader>
4949
<CardContent className="flex flex-col gap-4">
50-
<span className="flex items-center text-muted-foreground">
50+
<span className="text-muted-foreground flex items-center">
5151
<Clock width={16} height={16} />
5252
&nbsp;
5353
{calculateTimeToRead(post.source)}&nbsp;min read

app/posts/[slug]/mdx-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const components: MDXRemoteProps['components'] = {
2929
ul: (props: PropsWithChildren) => <ul className="my-6 ml-6 list-disc [&>li]:mt-2" {...props} />,
3030
blockquote: (props: PropsWithChildren) => <TypographyBlockquote {...props} />,
3131
code: (props: PropsWithChildren) => (
32-
<code className="relative rounded-lg bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold" {...props} />
32+
<code className="bg-muted relative rounded-lg px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold" {...props} />
3333
),
3434
pre: ({ className, ...rest }: HTMLAttributes<HTMLElement>) => (
3535
<pre className={cn(className, 'my-5 whitespace-pre-wrap', '[&>code:nth-child(1)]:p-3')} {...rest} />

app/projects/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function ProjectsPage() {
1818
<>
1919
<TypographyH1 className="w-prose">
2020
Things I&apos;ve Helped Build That&nbsp;
21-
<span className="inline-block bg-gradient-to-r from-fuchsia-600 via-red-400 to-primary bg-clip-text text-5xl text-transparent">
21+
<span className="to-primary inline-block bg-linear-to-r from-fuchsia-600 via-red-400 bg-clip-text text-5xl text-transparent">
2222
Make Me Smile
2323
</span>
2424
</TypographyH1>

components.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
3+
"style": "new-york",
44
"rsc": true,
55
"tsx": true,
66
"tailwind": {
77
"config": "tailwind.config.ts",
88
"css": "app/globals.css",
99
"baseColor": "neutral",
10-
"cssVariables": true
10+
"cssVariables": true,
11+
"prefix": ""
1112
},
1213
"aliases": {
1314
"components": "@/components",
14-
"utils": "@/lib/utils"
15-
}
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
1621
}

components/app-shell/footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const socialLinks: SocialLink[] = [
3434

3535
export default function Footer() {
3636
return (
37-
<footer className="flex w-full flex-col justify-between border-t border-border px-10 py-4 sm:grid-cols-1 md:flex-row">
37+
<footer className="border-border flex w-full flex-col justify-between border-t px-10 py-4 sm:grid-cols-1 md:flex-row">
3838
<div className="my-4 flex flex-col-reverse items-center justify-center gap-6 md:flex-col md:items-start">
3939
<div className="flex flex-row gap-6">
4040
{socialLinks.map(({ name, href, ariaLabel, icon }) => (

components/app-shell/mobile-menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function MobileMenu() {
3434
<Sheet>
3535
<SheetTrigger asChild>
3636
<Menu
37-
className="absolute right-0 mb-4 mr-6 mt-6 h-10 w-10 cursor-pointer md:hidden"
37+
className="absolute right-0 mt-6 mr-6 mb-4 h-10 w-10 cursor-pointer md:hidden"
3838
data-testid="mobile-menu-trigger"
3939
/>
4040
</SheetTrigger>

components/app-shell/mode-toggle-menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export function ModeToggleMenu() {
1313
<DropdownMenu>
1414
<DropdownMenuTrigger asChild>
1515
<Button variant="ghost" size="icon" data-testid="mode-toggle-trigger">
16-
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
17-
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
16+
<Sun className="h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90" />
17+
<Moon className="absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0" />
1818
<span className="sr-only">Toggle theme</span>
1919
</Button>
2020
</DropdownMenuTrigger>

components/ui/accordion.tsx

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,53 @@
11
'use client'
22

33
import * as AccordionPrimitive from '@radix-ui/react-accordion'
4-
import { ChevronDown } from 'lucide-react'
4+
import { ChevronDownIcon } from 'lucide-react'
55
import * as React from 'react'
66

77
import { cn } from '@/lib/utils'
88

9-
const Accordion = AccordionPrimitive.Root
9+
function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
10+
return <AccordionPrimitive.Root data-slot="accordion" {...props} />
11+
}
1012

11-
const AccordionItem = React.forwardRef<
12-
React.ElementRef<typeof AccordionPrimitive.Item>,
13-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
14-
>(({ className, ...props }, ref) => (
15-
<AccordionPrimitive.Item ref={ref} className={cn('border-b', className)} {...props} />
16-
))
17-
AccordionItem.displayName = 'AccordionItem'
18-
19-
const AccordionTrigger = React.forwardRef<
20-
React.ElementRef<typeof AccordionPrimitive.Trigger>,
21-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
22-
>(({ className, children, ...props }, ref) => (
23-
<AccordionPrimitive.Header className="flex">
24-
<AccordionPrimitive.Trigger
25-
ref={ref}
26-
className={cn(
27-
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
28-
className,
29-
)}
13+
function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
14+
return (
15+
<AccordionPrimitive.Item
16+
data-slot="accordion-item"
17+
className={cn('border-b last:border-b-0', className)}
18+
{...props}
19+
/>
20+
)
21+
}
22+
23+
function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
24+
return (
25+
<AccordionPrimitive.Header className="flex">
26+
<AccordionPrimitive.Trigger
27+
data-slot="accordion-trigger"
28+
className={cn(
29+
'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
30+
className,
31+
)}
32+
{...props}
33+
>
34+
{children}
35+
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
36+
</AccordionPrimitive.Trigger>
37+
</AccordionPrimitive.Header>
38+
)
39+
}
40+
41+
function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
42+
return (
43+
<AccordionPrimitive.Content
44+
data-slot="accordion-content"
45+
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
3046
{...props}
3147
>
32-
{children}
33-
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
34-
</AccordionPrimitive.Trigger>
35-
</AccordionPrimitive.Header>
36-
))
37-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
38-
39-
const AccordionContent = React.forwardRef<
40-
React.ElementRef<typeof AccordionPrimitive.Content>,
41-
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
42-
>(({ className, children, ...props }, ref) => (
43-
<AccordionPrimitive.Content
44-
ref={ref}
45-
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
46-
{...props}
47-
>
48-
<div className={cn('pb-4 pt-0', className)}>{children}</div>
49-
</AccordionPrimitive.Content>
50-
))
51-
52-
AccordionContent.displayName = AccordionPrimitive.Content.displayName
48+
<div className={cn('pt-0 pb-4', className)}>{children}</div>
49+
</AccordionPrimitive.Content>
50+
)
51+
}
5352

5453
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }

0 commit comments

Comments
 (0)