From 9c1a2719eddb662b0f527617f1c2f803f891f53d Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Tue, 23 Sep 2025 14:50:49 -0700 Subject: [PATCH] chore(demo): migrate to tailwind v4 (#4855) --- .../app/(auth)/forget-password/page.tsx | 2 +- .../app/accept-invitation/[id]/page.tsx | 2 +- demo/nextjs/app/dashboard/change-plan.tsx | 8 +- .../app/dashboard/organization-card.tsx | 4 +- demo/nextjs/app/dashboard/upgrade-button.tsx | 4 +- demo/nextjs/app/features.tsx | 2 +- demo/nextjs/app/globals.css | 107 +++++++++--------- demo/nextjs/components/blocks/pricing.tsx | 6 +- demo/nextjs/components/theme-toggle.tsx | 2 +- .../components/ui/canvas-reveal-effect.tsx | 2 +- demo/nextjs/components/ui/chart.tsx | 4 +- demo/nextjs/components/ui/context-menu.tsx | 10 +- demo/nextjs/components/ui/dropdown-menu.tsx | 14 +-- demo/nextjs/components/ui/input-otp.tsx | 2 +- demo/nextjs/components/ui/menubar.tsx | 10 +- demo/nextjs/components/ui/navigation-menu.tsx | 8 +- demo/nextjs/components/ui/scroll-area.tsx | 4 +- demo/nextjs/components/ui/select.tsx | 8 +- demo/nextjs/components/ui/separator.tsx | 2 +- demo/nextjs/components/ui/tabs2.tsx | 4 +- demo/nextjs/components/ui/toast.tsx | 4 +- demo/nextjs/components/ui/tooltip.tsx | 2 +- demo/nextjs/components/wrapper.tsx | 2 +- demo/nextjs/package.json | 6 +- demo/nextjs/tailwind.config.ts | 41 ++++--- pnpm-lock.yaml | 13 ++- 26 files changed, 138 insertions(+), 135 deletions(-) diff --git a/demo/nextjs/app/(auth)/forget-password/page.tsx b/demo/nextjs/app/(auth)/forget-password/page.tsx index 5a417bf1..26ff59c7 100644 --- a/demo/nextjs/app/(auth)/forget-password/page.tsx +++ b/demo/nextjs/app/(auth)/forget-password/page.tsx @@ -76,7 +76,7 @@ export default function Component() { return (
{/* Radial gradient for the container to give a faded look */} -
+
Forgot password diff --git a/demo/nextjs/app/accept-invitation/[id]/page.tsx b/demo/nextjs/app/accept-invitation/[id]/page.tsx index b25599b5..b6f997d1 100644 --- a/demo/nextjs/app/accept-invitation/[id]/page.tsx +++ b/demo/nextjs/app/accept-invitation/[id]/page.tsx @@ -87,7 +87,7 @@ export default function InvitationPage() { return (
-
+
{invitation ? ( diff --git a/demo/nextjs/app/dashboard/change-plan.tsx b/demo/nextjs/app/dashboard/change-plan.tsx index 1b5bdd0a..02d85e3a 100644 --- a/demo/nextjs/app/dashboard/change-plan.tsx +++ b/demo/nextjs/app/dashboard/change-plan.tsx @@ -27,7 +27,7 @@ function Component(props: { currentPlan?: string; isTrial?: boolean }) { className={cn( "gap-2", !props.currentPlan && - " bg-gradient-to-br from-purple-100 to-stone-300", + " bg-linear-to-br from-purple-100 to-stone-300", )} > {props.currentPlan ? ( @@ -67,7 +67,7 @@ function Component(props: { currentPlan?: string; isTrial?: boolean }) { value={selectedPlan} onValueChange={(value) => setSelectedPlan(value)} > -
+
-
+
-
+
-
+

Members

@@ -202,7 +202,7 @@ export function OrganizationCard(props: { )}
-
+

Invites

diff --git a/demo/nextjs/app/dashboard/upgrade-button.tsx b/demo/nextjs/app/dashboard/upgrade-button.tsx index 705424f0..82947dad 100644 --- a/demo/nextjs/app/dashboard/upgrade-button.tsx +++ b/demo/nextjs/app/dashboard/upgrade-button.tsx @@ -9,7 +9,7 @@ export default function UpgradeButton() { return ( setIsHovered(true)} onHoverEnd={() => setIsHovered(false)} whileHover={{ scale: 1.05 }} @@ -20,7 +20,7 @@ export default function UpgradeButton() { Upgrade to Pro setHovered(true)} onMouseLeave={() => setHovered(false)} - className="border border-black/[0.2] group/canvas-card flex items-center justify-center dark:border-white/[0.2] max-w-sm w-full mx-auto p-4 relative h-[18rem]" + className="border border-black/20 group/canvas-card flex items-center justify-center dark:border-white/20 max-w-sm w-full mx-auto p-4 relative h-72" > diff --git a/demo/nextjs/app/globals.css b/demo/nextjs/app/globals.css index 7ad5e382..19e9a363 100644 --- a/demo/nextjs/app/globals.css +++ b/demo/nextjs/app/globals.css @@ -1,63 +1,62 @@ @import "tailwindcss"; +@config "../tailwind.config.ts"; @import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); -@layer base { - :root { - --background: hsl(0 0% 100%); - --foreground: hsl(20 14.3% 4.1%); - --card: hsl(0 0% 100%); - --card-foreground: hsl(20 14.3% 4.1%); - --popover: hsl(0 0% 100%); - --popover-foreground: hsl(20 14.3% 4.1%); - --primary: hsl(24 9.8% 10%); - --primary-foreground: hsl(60 9.1% 97.8%); - --secondary: hsl(60 4.8% 95.9%); - --secondary-foreground: hsl(24 9.8% 10%); - --muted: hsl(60 4.8% 95.9%); - --muted-foreground: hsl(25 5.3% 44.7%); - --accent: hsl(60 4.8% 95.9%); - --accent-foreground: hsl(24 9.8% 10%); - --destructive: hsl(0 84.2% 60.2%); - --destructive-foreground: hsl(60 9.1% 97.8%); - --border: hsl(20 5.9% 90%); - --input: hsl(20 5.9% 90%); - --ring: hsl(20 14.3% 4.1%); - --radius: 0rem; - --chart-1: hsl(12 76% 61%); - --chart-2: hsl(173 58% 39%); - --chart-3: hsl(197 37% 24%); - --chart-4: hsl(43 74% 66%); - --chart-5: hsl(27 87% 67%); - } +:root { + --background: hsl(0 0% 100%); + --foreground: hsl(20 14.3% 4.1%); + --card: hsl(0 0% 100%); + --card-foreground: hsl(20 14.3% 4.1%); + --popover: hsl(0 0% 100%); + --popover-foreground: hsl(20 14.3% 4.1%); + --primary: hsl(24 9.8% 10%); + --primary-foreground: hsl(60 9.1% 97.8%); + --secondary: hsl(60 4.8% 95.9%); + --secondary-foreground: hsl(24 9.8% 10%); + --muted: hsl(60 4.8% 95.9%); + --muted-foreground: hsl(25 5.3% 44.7%); + --accent: hsl(60 4.8% 95.9%); + --accent-foreground: hsl(24 9.8% 10%); + --destructive: hsl(0 84.2% 60.2%); + --destructive-foreground: hsl(60 9.1% 97.8%); + --border: hsl(20 5.9% 90%); + --input: hsl(20 5.9% 90%); + --ring: hsl(20 14.3% 4.1%); + --radius: 0rem; + --chart-1: hsl(12 76% 61%); + --chart-2: hsl(173 58% 39%); + --chart-3: hsl(197 37% 24%); + --chart-4: hsl(43 74% 66%); + --chart-5: hsl(27 87% 67%); +} - .dark { - --background: hsl(20 14.3% 4.1%); - --foreground: hsl(60 9.1% 97.8%); - --card: hsl(20 14.3% 4.1%); - --card-foreground: hsl(60 9.1% 97.8%); - --popover: hsl(20 14.3% 4.1%); - --popover-foreground: hsl(60 9.1% 97.8%); - --primary: hsl(60 9.1% 97.8%); - --primary-foreground: hsl(24 9.8% 10%); - --secondary: hsl(12 6.5% 15.1%); - --secondary-foreground: hsl(60 9.1% 97.8%); - --muted: hsl(12 6.5% 15.1%); - --muted-foreground: hsl(24 5.4% 63.9%); - --accent: hsl(12 6.5% 15.1%); - --accent-foreground: hsl(60 9.1% 97.8%); - --destructive: hsl(0 62.8% 30.6%); - --destructive-foreground: hsl(60 9.1% 97.8%); - --border: hsl(12 6.5% 15.1%); - --input: hsl(12 6.5% 15.1%); - --ring: hsl(24 5.7% 82.9%); - --chart-1: hsl(220 70% 50%); - --chart-2: hsl(160 60% 45%); - --chart-3: hsl(30 80% 55%); - --chart-4: hsl(280 65% 60%); - --chart-5: hsl(340 75% 55%); - } +.dark { + --background: hsl(20 14.3% 4.1%); + --foreground: hsl(60 9.1% 97.8%); + --card: hsl(20 14.3% 4.1%); + --card-foreground: hsl(60 9.1% 97.8%); + --popover: hsl(20 14.3% 4.1%); + --popover-foreground: hsl(60 9.1% 97.8%); + --primary: hsl(60 9.1% 97.8%); + --primary-foreground: hsl(24 9.8% 10%); + --secondary: hsl(12 6.5% 15.1%); + --secondary-foreground: hsl(60 9.1% 97.8%); + --muted: hsl(12 6.5% 15.1%); + --muted-foreground: hsl(24 5.4% 63.9%); + --accent: hsl(12 6.5% 15.1%); + --accent-foreground: hsl(60 9.1% 97.8%); + --destructive: hsl(0 62.8% 30.6%); + --destructive-foreground: hsl(60 9.1% 97.8%); + --border: hsl(12 6.5% 15.1%); + --input: hsl(12 6.5% 15.1%); + --ring: hsl(24 5.7% 82.9%); + --chart-1: hsl(220 70% 50%); + --chart-2: hsl(160 60% 45%); + --chart-3: hsl(30 80% 55%); + --chart-4: hsl(280 65% 60%); + --chart-5: hsl(340 75% 55%); } @theme inline { diff --git a/demo/nextjs/components/blocks/pricing.tsx b/demo/nextjs/components/blocks/pricing.tsx index 2330719a..be01e0e6 100644 --- a/demo/nextjs/components/blocks/pricing.tsx +++ b/demo/nextjs/components/blocks/pricing.tsx @@ -139,12 +139,12 @@ export function Pricing({ opacity: { duration: 0.5 }, }} className={cn( - `rounded-sm border-[1px] p-6 bg-background text-center lg:flex lg:flex-col lg:justify-center relative`, + `rounded-sm border p-6 bg-background text-center lg:flex lg:flex-col lg:justify-center relative`, plan.isPopular ? "border-border border-2" : "border-border", "flex flex-col", !plan.isPopular && "mt-5", index === 0 || index === 2 - ? "z-0 transform translate-x-0 translate-y-0 -translate-z-[50px] rotate-y-[10deg]" + ? "z-0 transform translate-x-0 translate-y-0 -translate-z-[50px] rotate-y-10" : "z-10", index === 0 && "origin-right", index === 2 && "origin-left", @@ -196,7 +196,7 @@ export function Pricing({
    {plan.features.map((feature, idx) => (
  • - + {feature}
  • ))} diff --git a/demo/nextjs/components/theme-toggle.tsx b/demo/nextjs/components/theme-toggle.tsx index 6c2d457a..5310a798 100644 --- a/demo/nextjs/components/theme-toggle.tsx +++ b/demo/nextjs/components/theme-toggle.tsx @@ -13,7 +13,7 @@ export function ThemeToggle() { size="icon" onClick={() => setTheme(theme === "light" ? "dark" : "light")} > - + Toggle theme diff --git a/demo/nextjs/components/ui/canvas-reveal-effect.tsx b/demo/nextjs/components/ui/canvas-reveal-effect.tsx index ac4e6447..3565b2e0 100644 --- a/demo/nextjs/components/ui/canvas-reveal-effect.tsx +++ b/demo/nextjs/components/ui/canvas-reveal-effect.tsx @@ -42,7 +42,7 @@ export const CanvasRevealEffect = ({ />
{showGradient && ( -
+
)}
); diff --git a/demo/nextjs/components/ui/chart.tsx b/demo/nextjs/components/ui/chart.tsx index 6689230f..86da51e3 100644 --- a/demo/nextjs/components/ui/chart.tsx +++ b/demo/nextjs/components/ui/chart.tsx @@ -158,7 +158,7 @@ const ChartTooltipContent = ({
@@ -187,7 +187,7 @@ const ChartTooltipContent = ({ !hideIndicator && (
( ( {children}{" "}