diff --git a/apps/v4/app/(app)/forms/page.tsx b/apps/v4/app/(app)/forms/page.tsx index 8d5b813236..2696ab80e4 100644 --- a/apps/v4/app/(app)/forms/page.tsx +++ b/apps/v4/app/(app)/forms/page.tsx @@ -2,8 +2,13 @@ import { FormsDemo } from "@/components/forms-demo" export default function FormsPage() { return ( -
+ {children} +
+ ) +} diff --git a/apps/v4/app/globals.css b/apps/v4/app/globals.css index 238c4b6ae4..e7f6248ae5 100644 --- a/apps/v4/app/globals.css +++ b/apps/v4/app/globals.css @@ -4,7 +4,10 @@ @custom-variant dark (&:is(.dark *)); +@import "./themes.css"; + :root { + --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); @@ -20,7 +23,6 @@ --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); --destructive: oklch(0.577 0.245 27.325); - --destructive-foreground: oklch(0.577 0.245 27.325); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); @@ -29,7 +31,6 @@ --chart-3: oklch(0.398 0.07 227.392); --chart-4: oklch(0.828 0.189 84.429); --chart-5: oklch(0.769 0.188 70.08); - --radius: 0.625rem; --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); --sidebar-primary: oklch(0.205 0 0); @@ -43,22 +44,21 @@ .dark { --background: oklch(0.145 0 0); --foreground: oklch(0.985 0 0); - --card: oklch(0.145 0 0); + --card: oklch(0.205 0 0); --card-foreground: oklch(0.985 0 0); - --popover: oklch(0.145 0 0); + --popover: oklch(0.269 0 0); --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.985 0 0); + --primary: oklch(0.922 0 0); --primary-foreground: oklch(0.205 0 0); --secondary: oklch(0.269 0 0); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.269 0 0); --muted-foreground: oklch(0.708 0 0); - --accent: oklch(0.269 0 0); + --accent: oklch(0.371 0 0); --accent-foreground: oklch(0.985 0 0); - --destructive: oklch(0.396 0.141 25.723); - --destructive-foreground: oklch(0.637 0.237 25.331); - --border: oklch(0.269 0 0); - --input: oklch(0.269 0 0); + --destructive: oklch(0.704 0.191 22.216); + --border: oklch(1 0 0 / 10%); + --input: oklch(1 0 0 / 15%); --ring: oklch(0.556 0 0); --chart-1: oklch(0.488 0.243 264.376); --chart-2: oklch(0.696 0.17 162.48); @@ -71,66 +71,15 @@ --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.269 0 0); --sidebar-accent-foreground: oklch(0.985 0 0); - --sidebar-border: oklch(0.269 0 0); + --sidebar-border: oklch(1 0 0 / 10%); --sidebar-ring: oklch(0.439 0 0); } -.theme-login-one { - --primary: #ce2a2d; - --primary-foreground: #fff; - --ring: #ce2a2d9c; - --radius: 0rem; +@theme inline { --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); - - font-family: var(--font-sans); - - a { - color: var(--primary); - } - - [data-slot="card"] { - border-radius: 0rem; - box-shadow: none; - } -} - -.theme-login-two { - --primary: #035fa8; - --primary-foreground: #fff; - --ring: #035fa89c; - font-family: var(--font-serif); - - a { - color: var(--primary); - } -} - -.theme-login-three { - --primary: #22c55e; - --primary-foreground: #000; - --ring: #22c55e; - --radius: 1.5rem; - - font-family: var(--font-manrope); - - a { - color: var(--primary); - } - - [data-slot="card"] { - @apply shadow-xl; - } - - [data-slot="input"] { - @apply dark:bg-input; - } -} - -@theme inline { - --font-sans: var(--font-sans); - --font-mono: var(--font-mono); + --radius-xl: calc(var(--radius) + 4px); --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); @@ -146,7 +95,6 @@ --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); - --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); @@ -155,10 +103,6 @@ --color-chart-3: var(--chart-3); --color-chart-4: var(--chart-4); --color-chart-5: var(--chart-5); - --radius-sm: calc(var(--radius) - 4px); - --radius-md: calc(var(--radius) - 2px); - --radius-lg: var(--radius); - --radius-xl: calc(var(--radius) + 4px); --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); @@ -167,26 +111,6 @@ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); - --animate-accordion-down: accordion-down 0.2s ease-out; - --animate-accordion-up: accordion-up 0.2s ease-out; - - @keyframes accordion-down { - from { - height: 0; - } - to { - height: var(--radix-accordion-content-height); - } - } - - @keyframes accordion-up { - from { - height: var(--radix-accordion-content-height); - } - to { - height: 0; - } - } } @layer base { diff --git a/apps/v4/app/layout.tsx b/apps/v4/app/layout.tsx index 930c72e6e8..f58cadf1b5 100644 --- a/apps/v4/app/layout.tsx +++ b/apps/v4/app/layout.tsx @@ -1,23 +1,15 @@ import type { Metadata, Viewport } from "next" -import { Geist_Mono as FontMono, Inter as FontSans } from "next/font/google" +import { cookies } from "next/headers" -import { cn } from "@/lib/utils" +import { fontVariables } from "@/lib/fonts" import { Analytics } from "@/components/analytics" import { ThemeProvider } from "@/components/theme-provider" import { Toaster } from "@/registry/new-york-v4/ui/sonner" import { siteConfig } from "@/www/config/site" import "./globals.css" - -const fontSans = FontSans({ - subsets: ["latin"], - variable: "--font-sans", -}) - -const fontMono = FontMono({ - subsets: ["latin"], - variable: "--font-mono", -}) +import { cn } from "@/lib/utils" +import { ActiveThemeProvider } from "@/components/active-theme" const META_THEME_COLORS = { light: "#ffffff", @@ -80,11 +72,14 @@ export const viewport: Viewport = { themeColor: META_THEME_COLORS.light, } -export default function RootLayout({ +export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode }>) { + const cookieStore = await cookies() + const activeThemeValue = cookieStore.get("active_theme")?.value + return ( @@ -103,8 +98,8 @@ export default function RootLayout({
{body}
diff --git a/apps/v4/registry/new-york-v4/ui/hover-card.tsx b/apps/v4/registry/new-york-v4/ui/hover-card.tsx
index bd6b742fdf..2924eaeea5 100644
--- a/apps/v4/registry/new-york-v4/ui/hover-card.tsx
+++ b/apps/v4/registry/new-york-v4/ui/hover-card.tsx
@@ -26,16 +26,18 @@ function HoverCardContent({
...props
}: React.ComponentProps