The Open Standard for Generative UI
Docs styling fixes (#261)
Rabi Shanker Guha60c639d00440
diff --git a/docs/app/(home)/components/BuildChatSection.tsx b/docs/app/(home)/components/BuildChatSection.tsxindex a40a62f95..77646b078 100644--- a/docs/app/(home)/components/BuildChatSection.tsx+++ b/docs/app/(home)/components/BuildChatSection.tsx@@ -1,10 +1,10 @@"use client";import { useEffect, useRef, useState } from "react";+import Image from "next/image";+import dashboardImg from "@/public/images/home/d67b5e94653944c1d0d4998c6b169c37f98060ad.png";import { CopyIcon } from "./shared";-const dashboardImg = "/images/home/d67b5e94653944c1d0d4998c6b169c37f98060ad.png";-// ---------------------------------------------------------------------------// Constants// ---------------------------------------------------------------------------@@ -96,10 +96,11 @@ function CtaButton() {function DashboardIllustration() {return (- <img+ <Imagesrc={dashboardImg}alt="AI chat dashboard illustration"- className="w-full h-auto rounded-[12px] object-contain"+ className="w-full h-auto rounded-xl object-contain"+ placeholder="blur"/>);}diff --git a/docs/app/docs/chat/page.tsx b/docs/app/docs/chat/page.tsxindex 99d972f66..85f08d501 100644--- a/docs/app/docs/chat/page.tsx+++ b/docs/app/docs/chat/page.tsx@@ -1,6 +1,7 @@import { Button } from "@/components/button";import { HeroBadge } from "@/components/hero-badge";-import { Card, Cards } from "fumadocs-ui/components/card";+import { FeatureCard, FeatureCards } from "@/components/overview-components";+import { CodeBlock } from "@/components/overview-components";import {Code2,Database,@@ -20,6 +21,26 @@ export const metadata = {"Production-ready chat UI for AI agents. Drop-in layouts, streaming, and state management.",};+const headlessCode = `import { useChat } from '@openuidev/react';++function CustomChat() {+ const { messages, append, isLoading } = useChat();++ return (+ <div>+ {messages.map(m => (+ <div key={m.id}>+ {m.content}+ </div>+ ))}++ <input+ onChange={e => append(e.target.value)}+ />+ </div>+ );+}`;+export default function ChatOverviewPage() {return (<div className="max-w-5xl mx-auto py-10 px-6 space-y-20">@@ -47,32 +68,15 @@ export default function ChatOverviewPage() {{/* --- Layouts Showcase --- */}<section><div className="flex items-center gap-2 mb-8">- <Layout className="text-blue-600" />- <h2 className="text-2xl font-bold text-slate-900 dark:text-white">- Batteries-Included Layouts- </h2>+ <Layout className="text-fd-foreground" />+ <h2 className="text-2xl font-bold">Batteries-Included Layouts</h2></div>- <Cards className="lg:grid-cols-3">- <Card- icon={<PanelRightOpen className="text-slate-600 dark:text-slate-400" size={20} />}- title="Copilot"- description="A sidebar assistant that lives alongside your main application content."- href="/docs/chat/copilot"- />- <Card- icon={<Maximize2 className="text-slate-600 dark:text-slate-400" size={20} />}- title="Full Screen"- description="A standalone, immersive chat page similar to ChatGPT or Claude."- href="/docs/chat/fullscreen"- />- <Card- icon={<MessageCircle className="text-slate-600 dark:text-slate-400" size={20} />}- title="Bottom Tray"- description="A floating support-style widget that expands from the bottom corner."- href="/docs/chat/bottom-tray"- />- </Cards>+ <FeatureCards>+ <FeatureCard icon={<PanelRightOpen />} title="Copilot" description="A sidebar assistant that lives alongside your main application content." href="/docs/chat/copilot" />+ <FeatureCard icon={<Maximize2 />} title="Full Screen" description="A standalone, immersive chat page similar to ChatGPT or Claude." href="/docs/chat/fullscreen" />+ <FeatureCard icon={<MessageCircle />} title="Bottom Tray" description="A floating support-style widget that expands from the bottom corner." href="/docs/chat/bottom-tray" />+ </FeatureCards></section>{/* --- Headless / Features Split --- */}@@ -80,34 +84,22 @@ export default function ChatOverviewPage() {{/* Left: Core Features */}<div className="space-y-8"><div className="flex items-center gap-2">- <Zap className="text-amber-500" />- <h2 className="text-2xl font-bold text-slate-900 dark:text-white">Core Capabilities</h2>+ <Zap className="text-fd-foreground" />+ <h2 className="text-2xl font-bold">Core Capabilities</h2></div>- <Cards>- <Card- icon={<MessageSquare className="text-slate-400" size={20} />}- title="Streaming Native"- description="Handles text deltas, optimistic updates, and loading states automatically."- />- <Card- icon={<Database className="text-slate-400" size={20} />}- title="Thread Persistence"- description="Built-in support for saving and loading conversation history via simple API contracts."- />- <Card- icon={<Palette className="text-slate-400" size={20} />}- title="Theming"- description="Customize every color, radius, and font using CSS variables or Tailwind."- />- </Cards>+ <FeatureCards direction="horizontal">+ <FeatureCard direction="horizontal" icon={<MessageSquare />} title="Streaming Native" description="Handles text deltas, optimistic updates, and loading states automatically." />+ <FeatureCard direction="horizontal" icon={<Database />} title="Thread Persistence" description="Built-in support for saving and loading conversation history via simple API contracts." />+ <FeatureCard direction="horizontal" icon={<Palette />} title="Theming" description="Customize every color, radius, and font using CSS variables or Tailwind." />+ </FeatureCards></div>{/* Right: Headless Code Snippet */}<div className="space-y-6"><div className="flex items-center gap-2">- <Code2 className="text-purple-500" />- <h2 className="text-2xl font-bold text-slate-900 dark:text-white">Go Headless</h2>+ <Code2 className="text-fd-foreground" />+ <h2 className="text-2xl font-bold">Go Headless</h2></div><p className="text-slate-600 dark:text-slate-400">@@ -115,36 +107,7 @@ export default function ChatOverviewPage() {state.</p>- <div className="relative rounded-xl overflow-hidden bg-slate-900 shadow-xl border border-slate-800">- <div className="flex items-center gap-2 px-4 py-3 border-b border-slate-800 bg-slate-900/50">- <div className="w-3 h-3 rounded-full bg-red-500/20 border border-red-500/50" />- <div className="w-3 h-3 rounded-full bg-yellow-500/20 border border-yellow-500/50" />- <div className="w-3 h-3 rounded-full bg-green-500/20 border border-green-500/50" />- </div>- <div className="p-4 overflow-x-auto">- <pre className="text-sm font-mono text-slate-300">- {`import { useChat } from '@openuidev/react';--function CustomChat() {- const { messages, append, isLoading } = useChat();-- return (- <div>- {messages.map(m => (- <div key={m.id}>- {m.content}- </div>- ))}-- <input- onChange={e => append(e.target.value)}- />- </div>- );-}`}- </pre>- </div>- </div>+ <CodeBlock code={headlessCode} title="CustomChat.tsx" /><div className="text-right"><Linkdiff --git a/docs/app/docs/introduction/page.module.css b/docs/app/docs/introduction/page.module.cssnew file mode 100644index 000000000..9951302e3--- /dev/null+++ b/docs/app/docs/introduction/page.module.css@@ -0,0 +1,8 @@+:global(#nd-docs-layout:not(:has(#nd-sidebar))) {+ grid-template-columns: 1fr !important;+ grid-template-areas: "main" !important;+}++:global(#nd-docs-layout:not(:has(#nd-sidebar))) > * {+ grid-area: main !important;+}diff --git a/docs/app/docs/introduction/page.tsx b/docs/app/docs/introduction/page.tsxindex 70acfd79e..630bdcbbf 100644--- a/docs/app/docs/introduction/page.tsx+++ b/docs/app/docs/introduction/page.tsx@@ -1,3 +1,4 @@+import "@/app/docs/introduction/page.module.css";import { OverviewPage } from "@/components/overview-components/overview-page";export const metadata = {diff --git a/docs/app/docs/openui-lang/page.tsx b/docs/app/docs/openui-lang/page.tsxindex d0e725e49..a29e1e09b 100644--- a/docs/app/docs/openui-lang/page.tsx+++ b/docs/app/docs/openui-lang/page.tsx@@ -12,6 +12,11 @@ import {Waves,Zap,} from "lucide-react";+import {+ FeatureCard,+ FeatureCards,+} from "@/components/overview-components";+import Link from "next/link";import { useState } from "react";const steps = [@@ -62,9 +67,6 @@ export default function OpenUILangOverview() {{/* Introduction */}<div className="mb-12 sm:mb-20"><div className="mb-4 flex items-start gap-3 sm:mb-6 sm:gap-4">- <div className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-emerald-50 sm:size-12 dark:bg-emerald-900/30">- <Code2 className="size-5 text-emerald-600 sm:size-6 dark:text-emerald-400" />- </div><div><h1 className="mb-1 text-3xl font-bold sm:mb-2 sm:text-4xl">OpenUI Lang</h1><p className="text-sm text-slate-500 sm:text-base dark:text-slate-400">@@ -75,23 +77,23 @@ export default function OpenUILangOverview() {<p className="mb-6 text-sm text-slate-600 sm:mb-8 sm:text-base dark:text-slate-400">An alternative to{" "}- <a- href="https://json-render.dev/"+ <Link+ href="https://json-render.dev"target="_blank"rel="noopener noreferrer"- className="text-blue-600 underline hover:no-underline dark:text-blue-400"+ className="underline hover:no-underline">Vercel JSON renderer- </a>{" "}+ </Link>{" "}and{" "}- <a+ <Linkhref="https://a2ui.org/"target="_blank"rel="noopener noreferrer"- className="text-blue-600 underline hover:no-underline dark:text-blue-400"+ className=" underline hover:no-underline">A2UI- </a>{" "}+ </Link>{" "}that uses ~52% fewer tokens than equivalent JSON structures. Define your component librarywith Zod schemas and parse LLM responses into renderable components.</p>@@ -116,34 +118,23 @@ export default function OpenUILangOverview() {<div className="mb-12 sm:mb-20"><h2 className="mb-6 text-2xl font-bold sm:mb-8 sm:text-3xl">Key Features</h2>- <div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">- <SimpleCard className="p-6">- <Waves className="mb-4 size-8 text-amber-500" />- <h3 className="mb-2 text-lg font-semibold">Streaming Native</h3>- <p className="text-sm text-slate-500 dark:text-slate-400">- Line-oriented syntax means the UI renders line-by-line. No waiting for valid JSON- closing braces.- </p>- </SimpleCard>-- <SimpleCard className="p-6">- <Zap className="mb-4 size-8 text-blue-500" />- <h3 className="mb-2 text-lg font-semibold">Token Efficient</h3>- <p className="text-sm text-slate-500 dark:text-slate-400">- Uses ~52% fewer tokens than equivalent JSON structures, significantly reducing- inference cost and latency.- </p>- </SimpleCard>-- <SimpleCard className="p-6">- <Shield className="mb-4 size-8 text-emerald-500" />- <h3 className="mb-2 text-lg font-semibold">Hallucination Resistant</h3>- <p className="text-sm text-slate-500 dark:text-slate-400">- Strictly typed against your Zod schemas. If the generated code does not match your- definition, it does not render.- </p>- </SimpleCard>- </div>+ <FeatureCards>+ <FeatureCard+ icon={<Waves />}+ title="Streaming Native"+ description="Line-oriented syntax means the UI renders line-by-line. No waiting for valid JSON closing braces."+ />+ <FeatureCard+ icon={<Zap />}+ title="Token Efficient"+ description="Uses ~52% fewer tokens than equivalent JSON structures, significantly reducing inference cost and latency."+ />+ <FeatureCard+ icon={<Shield />}+ title="Hallucination Resistant"+ description="Strictly typed against your Zod schemas. If the generated code does not match your definition, it does not render."+ />+ </FeatureCards></div><Separator className="my-8 sm:my-16" />@@ -399,10 +390,8 @@ cancelBtn = Button("Cancel", "action:cancel_contact", "secondary")`}<SimpleCard className="p-4 sm:p-6"><div className="mb-4"><div className="mb-2 flex items-center gap-3">- <div className="flex size-8 items-center justify-center rounded-lg bg-blue-50 dark:bg-blue-900/30">- <span className="text-sm font-semibold text-blue-600 dark:text-blue-400">- {activeStep + 1}- </span>+ <div className="flex size-8 items-center justify-center rounded-lg bg-fd-muted dark:bg-fd-muted">+ <span className="text-sm font-semibold text-fd-foreground">{activeStep + 1}</span></div><div><h3 className="text-base font-semibold sm:text-lg">{steps[activeStep].title}</h3>@@ -442,37 +431,23 @@ cancelBtn = Button("Cancel", "action:cancel_contact", "secondary")`}Real-world applications where OpenUI Lang excels</p>- <div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">- <SimpleCard className="p-4 sm:p-6">- <div className="mb-3 flex size-10 items-center justify-center rounded-lg bg-blue-50 sm:mb-4 sm:size-12 dark:bg-blue-900/30">- <BarChart3 className="size-5 text-blue-500 sm:size-6" />- </div>- <h3 className="mb-2 text-base font-semibold sm:text-lg">Analytics Dashboards</h3>- <p className="mb-4 text-sm text-slate-500 dark:text-slate-400">- Generate complex data visualizations and metric cards from natural language queries.- </p>- </SimpleCard>-- <SimpleCard className="p-4 sm:p-6">- <div className="mb-3 flex size-10 items-center justify-center rounded-lg bg-emerald-50 sm:mb-4 sm:size-12 dark:bg-emerald-900/30">- <MessageSquare className="size-5 text-emerald-500 sm:size-6" />- </div>- <h3 className="mb-2 text-base font-semibold sm:text-lg">AI Chat Interfaces</h3>- <p className="mb-4 text-sm text-slate-500 dark:text-slate-400">- Stream UI components in real-time as the LLM generates responses.- </p>- </SimpleCard>-- <SimpleCard className="p-4 sm:p-6">- <div className="mb-3 flex size-10 items-center justify-center rounded-lg bg-purple-50 sm:mb-4 sm:size-12 dark:bg-purple-900/30">- <FileText className="size-5 text-purple-500 sm:size-6" />- </div>- <h3 className="mb-2 text-base font-semibold sm:text-lg">Dynamic Forms</h3>- <p className="mb-4 text-sm text-slate-500 dark:text-slate-400">- Build adaptive forms that change based on user input or context.- </p>- </SimpleCard>- </div>+ <FeatureCards>+ <FeatureCard+ icon={<BarChart3 />}+ title="Analytics Dashboards"+ description="Generate complex data visualizations and metric cards from natural language queries."+ />+ <FeatureCard+ icon={<MessageSquare />}+ title="AI Chat Interfaces"+ description="Stream UI components in real-time as the LLM generates responses."+ />+ <FeatureCard+ icon={<FileText />}+ title="Dynamic Forms"+ description="Build adaptive forms that change based on user input or context."+ />+ </FeatureCards></div></div>);diff --git a/docs/app/global.css b/docs/app/global.cssindex 8d1ce10d6..8e47f0566 100644--- a/docs/app/global.css+++ b/docs/app/global.css@@ -13,6 +13,27 @@.light {--color-fd-background: hsl(0, 0%, 100%);+ --color-doc-surface: #f8f8fa;+ --color-doc-surface-raised: #ffffff;+ --color-doc-surface-sunken: #f0f0f4;+ --color-doc-border: rgba(0, 0, 0, 0.08);+ --color-doc-code-bg: #f4f4f8;+}++.dark {+ --color-fd-background: #0b0b0f;+ --color-fd-foreground: #e2e1e6;+ --color-fd-muted: #141418;+ --color-fd-popover: #131317;+ --color-fd-card: #111115;+ --color-fd-secondary: #141418;++ /* Doc component surface tokens */+ --color-doc-surface: #111115;+ --color-doc-surface-raised: #16161b;+ --color-doc-surface-sunken: #0e0e12;+ --color-doc-border: rgba(255, 255, 255, 0.08);+ --color-doc-code-bg: #0d0d11;}#nd-docs-layout {@@ -24,13 +45,8 @@#nd-docs-layout:not(:has(#nd-sidebar)) {--fd-sidebar-width: 0px !important;--fd-toc-width: 0px !important;- grid-template-columns: 1fr !important;- grid-template-areas: "main" !important;}-#nd-docs-layout:not(:has(#nd-sidebar)) > * {- grid-area: main !important;-}#nd-sidebar {background-color: transparent !important;diff --git a/docs/app/og/docs/[...slug]/route.tsx b/docs/app/og/docs/[...slug]/route.tsxindex d10cf1de5..7e98c015e 100644--- a/docs/app/og/docs/[...slug]/route.tsx+++ b/docs/app/og/docs/[...slug]/route.tsx@@ -11,7 +11,7 @@ export async function GET(_req: Request, { params }: RouteContext<"/og/docs/[...if (!page) notFound();return new ImageResponse(- <DefaultImage title={page.data.title} description={page.data.description} site="My App" />,+ <DefaultImage title={page.data.title} description={page.data.description} site="OpenUI" />,{width: 1200,height: 630,diff --git a/docs/components/brand-logo.tsx b/docs/components/brand-logo.tsxindex d4bd75e1a..7cd4e6f62 100644--- a/docs/components/brand-logo.tsx+++ b/docs/components/brand-logo.tsx@@ -1,8 +1,10 @@"use client";import mascotSvgPaths from "@/imports/svg-kl5jpwq8km";+import mascotDarkSvgPaths from "@/imports/svg-mascot-dark";import svgPaths from "@/imports/svg-urruvoh2be";import { AnimatePresence, motion } from "motion/react";+import Link from "next/link";import { useEffect, useState } from "react";const COUNT_UP_DURATION = 3000;@@ -86,27 +88,72 @@ export function OpenUILogo({ variant = "light" }: { variant?: LogoVariant }) {: "font-['Geist',sans-serif] font-semibold text-[15px] text-black leading-6";return (- <a href="/" className="flex items-center gap-0.5 no-underline">+ <Link href="/" className="flex items-center gap-0.5 no-underline">{/* Shiro mascot */}<div className="relative shrink-0 size-8">- <svg- className="absolute block"- style={{ inset: "9.29% 0 10% 0" }}- fill="none"- preserveAspectRatio="xMidYMid meet"- viewBox="0 0 32.6 26.43"- >- <path d={mascotSvgPaths.p30a6b580} fill={color} stroke={color} strokeWidth="0.3" />- <path d={mascotSvgPaths.p3c631dc0} fill={color} />- <path d={mascotSvgPaths.p310be380} fill={color} stroke={color} strokeWidth="0.3" />- <path d={mascotSvgPaths.p41b57c8} fill={color} stroke={color} strokeWidth="0.3" />- <path d={mascotSvgPaths.p13c7e180} fill={color} />- <path d={mascotSvgPaths.p2ab36c00} fill={color} />- <path d={mascotSvgPaths.p1c9f7d00} fill={color} stroke={color} strokeWidth="0.3" />- </svg>+ {isDark ? (+ <svg+ className="absolute block"+ style={{ inset: "0" }}+ fill="none"+ preserveAspectRatio="xMidYMid meet"+ viewBox="0 0 33 32"+ >+ <path d={mascotDarkSvgPaths.pBody} fill="white" />+ <path+ d={mascotDarkSvgPaths.pOutline}+ fill="#464646"+ stroke="#464646"+ strokeWidth="0.3"+ />+ <path d={mascotDarkSvgPaths.pMouth} fill="#464646" />+ <path+ d={mascotDarkSvgPaths.pEarLeft}+ fill="#464646"+ stroke="#464646"+ strokeWidth="0.3"+ />+ <path+ d={mascotDarkSvgPaths.pEarRight}+ fill="#464646"+ stroke="#464646"+ strokeWidth="0.3"+ />+ <path d={mascotDarkSvgPaths.pEyeLeft} fill="#464646" />+ <path d={mascotDarkSvgPaths.pEyeRight} fill="#464646" />+ <path+ d={mascotDarkSvgPaths.pHornLeft}+ fill="#464646"+ stroke="#464646"+ strokeWidth="0.3"+ />+ <path+ d={mascotDarkSvgPaths.pHornRight}+ fill="#464646"+ stroke="#464646"+ strokeWidth="0.3"+ />+ </svg>+ ) : (+ <svg+ className="absolute block"+ style={{ inset: "9.29% 0 10% 0" }}+ fill="none"+ preserveAspectRatio="xMidYMid meet"+ viewBox="0 0 32.6 26.43"+ >+ <path d={mascotSvgPaths.p30a6b580} fill={color} stroke={color} strokeWidth="0.3" />+ <path d={mascotSvgPaths.p3c631dc0} fill={color} />+ <path d={mascotSvgPaths.p310be380} fill={color} stroke={color} strokeWidth="0.3" />+ <path d={mascotSvgPaths.p41b57c8} fill={color} stroke={color} strokeWidth="0.3" />+ <path d={mascotSvgPaths.p13c7e180} fill={color} />+ <path d={mascotSvgPaths.p2ab36c00} fill={color} />+ <path d={mascotSvgPaths.p1c9f7d00} fill={color} stroke={color} strokeWidth="0.3" />+ </svg>+ )}</div><span className={textClass}>OpenUI</span>- </a>+ </Link>);}diff --git a/docs/components/button.tsx b/docs/components/button.tsxindex ab73bc301..d614acb82 100644--- a/docs/components/button.tsx+++ b/docs/components/button.tsx@@ -14,7 +14,7 @@ export function Button({ href, text, size = "lg", variant = "primary" }: ButtonPconst variantClasses =variant === "primary"? "text-white bg-slate-900 rounded-lg hover:bg-slate-800 transition-colors dark:bg-white dark:text-slate-900 dark:hover:bg-slate-100"- : "text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors dark:bg-slate-900 dark:text-slate-300 dark:border-slate-800 dark:hover:bg-slate-800";+ : "text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors dark:bg-[var(--color-doc-surface)] dark:text-slate-300 dark:border-[var(--color-doc-border)] dark:hover:bg-[var(--color-doc-surface-raised)]";return (<Linkdiff --git a/docs/components/docs-navbar.tsx b/docs/components/docs-navbar.tsxindex d47bf4ba4..61f41a8cf 100644--- a/docs/components/docs-navbar.tsx+++ b/docs/components/docs-navbar.tsx@@ -6,7 +6,9 @@ import { useSearchContext } from "fumadocs-ui/contexts/search";import Link from "next/link";import { usePathname } from "next/navigation";import { useEffect, useState } from "react";-import { OpenUILogo } from "./brand-logo";+import { useTheme } from "next-themes";+import { OpenUILogo, ThesysLogo } from "./brand-logo";+import { ThemeToggle } from "./theme-toggle";const tabs = [{ title: "Introduction", url: "/docs/introduction" },@@ -17,11 +19,9 @@ const tabs = [function SearchBar() {const { setOpenSearch } = useSearchContext();- const [isMac, setIsMac] = useState(false);-- useEffect(() => {- setIsMac(navigator.platform.toUpperCase().includes("MAC"));- }, []);+ const [isMac, setIsMac] = useState(+ () => typeof navigator !== "undefined" && /mac/i.test(navigator.userAgent),+ );useEffect(() => {const handler = (e: KeyboardEvent) => {@@ -66,11 +66,18 @@ function SearchBar() {export function DocsNavbar({ showSidebarToggle = false }: { showSidebarToggle?: boolean }) {const pathname = usePathname();+ const [isThesysHovered, setIsThesysHovered] = useState(false);+ const { resolvedTheme } = useTheme();+ const [mounted, setMounted] = useState(false);+ useEffect(() => {+ setMounted(true);+ }, []);+ const logoVariant = mounted && resolvedTheme === "dark" ? "dark" : "light";return (<header className="fixed top-0 inset-x-0 z-40 w-full border-b border-fd-border bg-fd-background/80 backdrop-blur-xl">{/* Top row: logo left, actions right */}- <div className="flex items-center h-16 max-w-[97rem] mx-auto px-8">+ <div className="flex items-center h-16 max-w-[97rem] mx-auto px-3 md:px-8">{showSidebarToggle && (<SidebarTrigger className="docs-nav-sidebar-toggle flex items-center justify-center size-9 rounded-lg text-fd-muted-foreground bg-transparent border-none cursor-pointer mr-3"><svg@@ -92,11 +99,17 @@ export function DocsNavbar({ showSidebarToggle = false }: { showSidebarToggle?:{/* Brand */}<div className="flex items-center gap-2.5 shrink-0">- <OpenUILogo />+ <ThesysLogo+ isHovered={isThesysHovered}+ onHoverChange={setIsThesysHovered}+ variant={logoVariant}+ />+ <span className="text-fd-muted-foreground text-[15px] select-none px-0.5">|</span>+ <OpenUILogo variant={logoVariant} /></div>{/* Actions */}- <div className="flex items-center gap-3 ml-auto shrink-0">+ <div className="hidden md:flex items-center gap-3 ml-auto shrink-0"><SearchBar /><div className="flex items-center gap-0.5">{/* Discord */}@@ -123,12 +136,14 @@ export function DocsNavbar({ showSidebarToggle = false }: { showSidebarToggle?:<path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z" /></svg></Link>+ {/* Theme toggle */}+ <ThemeToggle /></div></div></div>{/* Bottom row: tabs */}- <div className="max-w-[97rem] mx-auto px-8">+ <div className="max-w-388 mx-auto px-8"><nav className="docs-nav-tabs flex items-center overflow-x-auto">{tabs.map((tab) => {const isActive = pathname.startsWith(tab.url);diff --git a/docs/components/docs-route-layout.tsx b/docs/components/docs-route-layout.tsxindex 8c1de4230..d74316766 100644--- a/docs/components/docs-route-layout.tsx+++ b/docs/components/docs-route-layout.tsx@@ -102,6 +102,7 @@ export function DocsRouteLayout({ tree, children }: DocsRouteLayoutProps) {),}}searchToggle={{ enabled: false }}+ themeSwitch={{ enabled: false }}>{children}</DocsLayout>diff --git a/docs/components/overview-components/code-block.tsx b/docs/components/overview-components/code-block.tsxindex 16e7827fc..f1f082a93 100644--- a/docs/components/overview-components/code-block.tsx+++ b/docs/components/overview-components/code-block.tsx@@ -25,12 +25,12 @@ export function CodeBlock({};return (- <div- className={`overflow-hidden rounded-lg border border-slate-200 dark:border-slate-800 flex flex-col ${className}`}- >+ <div className={`overflow-hidden rounded-lg border border-slate-200 dark:border-[var(--color-doc-border)] flex flex-col ${className}`}>{title && (- <div className="flex items-center justify-between border-b border-slate-200 bg-slate-50 px-4 py-2.5 dark:border-slate-800 dark:bg-slate-900/50">- <span className="text-xs font-medium text-slate-600 dark:text-slate-400">{title}</span>+ <div className="flex items-center justify-between border-b border-slate-200 bg-slate-50 px-4 py-2.5 dark:border-[var(--color-doc-border)] dark:bg-[var(--color-doc-surface)]">+ <span className="text-xs font-medium text-slate-600 dark:text-slate-400">+ {title}+ </span><buttononClick={handleCopy}className="text-xs text-slate-500 transition-colors hover:text-slate-700 dark:hover:text-slate-300"@@ -39,9 +39,7 @@ export function CodeBlock({</button></div>)}- <pre- className={`grow-1 overflow-x-auto bg-slate-950 p-4 text-sm leading-relaxed text-slate-300 ${codeBlockClassName}`}- >+ <pre className={`grow-1 overflow-x-auto bg-[var(--color-doc-code-bg)] p-4 text-sm leading-relaxed text-slate-700 dark:text-slate-300 ${codeBlockClassName}`}><code>{code}</code></pre></div>diff --git a/docs/components/overview-components/feature-card.tsx b/docs/components/overview-components/feature-card.tsxnew file mode 100644index 000000000..37ef408b5--- /dev/null+++ b/docs/components/overview-components/feature-card.tsx@@ -0,0 +1,85 @@+import type { ReactNode } from "react";+import { SimpleCard } from "./simple-card";++interface FeatureCardProps {+ icon?: ReactNode;+ title: string;+ description: string;+ href?: string;+ direction?: "vertical" | "horizontal";+}++export function FeatureCard({ icon, title, description, href, direction = "vertical" }: FeatureCardProps) {+ let content;++ if (direction === "horizontal") {+ content = (+ <SimpleCard className="p-4">+ <div className="flex items-start gap-4">+ {icon && (+ <div className="flex shrink-0 size-9 items-center justify-center rounded-lg bg-fd-muted">+ <div className="flex size-4 items-center justify-center text-fd-foreground">{icon}</div>+ </div>+ )}+ <div>+ <h3 className="mb-1 text-base font-semibold">{title}</h3>+ <p className="text-sm text-fd-muted-foreground">{description}</p>+ </div>+ </div>+ </SimpleCard>+ );+ } else {+ content = (+ <SimpleCard className="p-6 flex flex-col h-full">+ {icon && (+ <div className="mb-4 flex size-10 items-center justify-center rounded-lg bg-fd-muted">+ <div className="flex size-5 items-center justify-center text-fd-foreground">{icon}</div>+ </div>+ )}+ <h3 className="mb-2 text-lg font-semibold">{title}</h3>+ <p className="text-sm text-fd-muted-foreground">{description}</p>+ </SimpleCard>+ );+ }++ if (href) {+ return (+ <a href={href} className="flex no-underline hover:opacity-80 transition-opacity">+ {content}+ </a>+ );+ }++ return content;+}++interface FeatureCardsProps {+ children: ReactNode;+ direction?: "vertical" | "horizontal";+ cols?: 1 | 2 | 3 | 4;+ className?: string;+}++const colsMap: Record<number, string> = {+ 1: "sm:grid-cols-1",+ 2: "sm:grid-cols-2",+ 3: "sm:grid-cols-3",+ 4: "sm:grid-cols-4",+};++export function FeatureCards({ children, direction = "vertical", cols, className }: FeatureCardsProps) {+ let gridClass: string;++ if (direction === "horizontal") {+ const colClass = cols ? colsMap[cols] : "sm:grid-cols-1";+ gridClass = `grid grid-cols-1 gap-3 ${colClass}`;+ } else {+ gridClass = "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 items-stretch";+ }++ return (+ <div className={`${gridClass} ${className ?? ""}`}>+ {children}+ </div>+ );+}diff --git a/docs/components/overview-components/index.ts b/docs/components/overview-components/index.tsindex aaad4dd1f..058a05cc3 100644--- a/docs/components/overview-components/index.ts+++ b/docs/components/overview-components/index.ts@@ -1,4 +1,5 @@export { CodeBlock } from "./code-block";+export { FeatureCard, FeatureCards } from "./feature-card";export { InlineButton } from "./inline-button";export { OverviewPage } from "./overview-page";export { Separator } from "./separator";diff --git a/docs/components/overview-components/inline-button.tsx b/docs/components/overview-components/inline-button.tsxindex 4fc312703..d0e9290f1 100644--- a/docs/components/overview-components/inline-button.tsx+++ b/docs/components/overview-components/inline-button.tsx@@ -22,9 +22,9 @@ export function InlineButton({primary:"bg-slate-900 text-white hover:bg-slate-800 dark:bg-white dark:text-slate-900 dark:hover:bg-slate-100",secondary:- "bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700",+ "bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-[var(--color-doc-surface)] dark:text-slate-300 dark:hover:bg-[var(--color-doc-surface-raised)]",outline:- "border border-slate-200 text-slate-700 hover:bg-slate-50 dark:border-slate-800 dark:text-slate-300 dark:hover:bg-slate-800",+ "border border-slate-200 text-slate-700 hover:bg-slate-50 dark:border-[var(--color-doc-border)] dark:text-slate-300 dark:hover:bg-[var(--color-doc-surface)]",};return (diff --git a/docs/components/overview-components/overview-page.tsx b/docs/components/overview-components/overview-page.tsxindex 6a599d0d6..285612254 100644--- a/docs/components/overview-components/overview-page.tsx+++ b/docs/components/overview-components/overview-page.tsx@@ -9,6 +9,8 @@ import {TabsContent,TabsList,TabsTrigger,+ FeatureCard,+ FeatureCards,} from "@/components/overview-components";import { Code2, MessageSquare, Package } from "lucide-react";import { genuiOutput } from "./genui";@@ -26,52 +28,33 @@ export function OverviewPage() {</p>{/* Quick Navigation */}- <div className="grid grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4">- <a href="#genui-lang" className="group no-underline">- <SimpleCard className="h-full p-4 transition-all hover:border-blue-500 hover:shadow-md sm:p-6">- <div className="mb-2 flex size-10 items-center justify-center rounded-lg bg-blue-50 group-hover:bg-blue-100 sm:mb-4 sm:size-12 dark:bg-blue-900/30 dark:group-hover:bg-blue-900/50">- <Code2 className="size-5 text-blue-600 sm:size-6 dark:text-blue-400" />- </div>- <h3 className="mb-1 text-sm font-semibold sm:mb-2 sm:text-base">OpenUI Lang</h3>- <p className="text-xs text-slate-500 sm:text-sm dark:text-slate-400">- Token-efficient DSL for structured LLM outputs with automatic prompt generation- </p>- </SimpleCard>- </a>-- <a href="#chat-ui" className="group no-underline">- <SimpleCard className="h-full p-4 transition-all hover:border-purple-500 hover:shadow-md sm:p-6">- <div className="mb-2 flex size-10 items-center justify-center rounded-lg bg-purple-50 group-hover:bg-purple-100 sm:mb-4 sm:size-12 dark:bg-purple-900/30 dark:group-hover:bg-purple-900/50">- <MessageSquare className="size-5 text-purple-600 sm:size-6 dark:text-purple-400" />- </div>- <h3 className="mb-1 text-sm font-semibold sm:mb-2 sm:text-base">OpenUI Chat</h3>- <p className="text-xs text-slate-500 sm:text-sm dark:text-slate-400">- Production-ready, themeable chat components with headless state management- </p>- </SimpleCard>- </a>-- <a href="#library" className="group col-span-2 no-underline sm:col-span-1">- <SimpleCard className="h-full p-4 transition-all hover:border-emerald-500 hover:shadow-md sm:p-6">- <div className="mb-2 flex size-10 items-center justify-center rounded-lg bg-emerald-50 group-hover:bg-emerald-100 sm:mb-4 sm:size-12 dark:bg-emerald-900/30 dark:group-hover:bg-emerald-900/50">- <Package className="size-5 text-emerald-600 sm:size-6 dark:text-emerald-400" />- </div>- <h3 className="mb-1 text-sm font-semibold sm:mb-2 sm:text-base">- Default Component Library- </h3>- <p className="text-xs text-slate-500 sm:text-sm dark:text-slate-400">- 50+ pre-built components optimized for LLM generation, ready to use- </p>- </SimpleCard>- </a>- </div>+ <FeatureCards>+ <FeatureCard+ icon={<Code2 />}+ title="OpenUI Lang"+ description="Token-efficient DSL for structured LLM outputs with automatic prompt generation"+ href="#genui-lang"+ />+ <FeatureCard+ icon={<MessageSquare />}+ title="OpenUI Chat"+ description="Production-ready, themeable chat components with headless state management"+ href="#chat-ui"+ />+ <FeatureCard+ icon={<Package />}+ title="Default Component Library"+ description="50+ pre-built components optimized for LLM generation, ready to use"+ href="#library"+ />+ </FeatureCards></div>{/* OpenUI Lang Section */}<div id="genui-lang" className="mb-12 sm:mb-20"><div className="mb-4 flex items-start gap-3 sm:mb-6 sm:gap-4">- <div className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-blue-50 sm:size-12 dark:bg-blue-900/30">- <Code2 className="size-5 text-blue-600 sm:size-6 dark:text-blue-400" />+ <div className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-fd-muted sm:size-12">+ <Code2 className="size-5 text-fd-foreground sm:size-6" /></div><div><h2 className="mb-1 text-2xl font-bold sm:mb-2 sm:text-3xl">OpenUI Lang</h2>@@ -87,7 +70,7 @@ export function OverviewPage() {href="https://json-render.dev/"target="_blank"rel="noopener noreferrer"- className="text-blue-600 underline hover:no-underline dark:text-blue-400"+ className="underline hover:no-underline ">Vercel JSON renderer</a>{" "}@@ -96,7 +79,7 @@ export function OverviewPage() {href="https://a2ui.org/"target="_blank"rel="noopener noreferrer"- className="text-blue-600 underline hover:no-underline dark:text-blue-400"+ className="underline hover:no-underline">A2UI</a>{" "}@@ -104,10 +87,10 @@ export function OverviewPage() {automatic system prompts, and parse LLM responses into renderable components.</p>- <SimpleCard className="mb-4 border-blue-200 bg-blue-50 p-3 sm:p-4 dark:border-blue-900 dark:bg-blue-900/20">+ <SimpleCard className="mb-4 border-blue-200 p-3 sm:p-4"><p className="text-xs sm:text-sm"><strong>Quick start:</strong> Use our{" "}- <a href="#library" className="text-blue-600 underline dark:text-blue-400">+ <a href="#library" className="underline">default component library</a>{" "}to get started immediately with 50+ pre-built components.@@ -200,8 +183,8 @@ export function AssistantMessage({ content, isStreaming }) {{/* Chat UI Section */}<div id="chat-ui" className="mb-12 sm:mb-20"><div className="mb-4 flex items-start gap-3 sm:mb-6 sm:gap-4">- <div className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-purple-50 sm:size-12 dark:bg-purple-900/30">- <MessageSquare className="size-5 text-purple-600 sm:size-6 dark:text-purple-400" />+ <div className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-fd-muted sm:size-12">+ <MessageSquare className="size-5 text-fd-foreground sm:size-6" /></div><div><h2 className="mb-1 text-2xl font-bold sm:mb-2 sm:text-3xl">OpenUI Chat</h2>@@ -216,22 +199,23 @@ export function AssistantMessage({ content, isStreaming }) {headless hooks. Fully themeable and accessible out of the box.</p>- <div className="mb-6 grid gap-4 sm:grid-cols-3">- <SimpleCard className="p-4">- <h4 className="mb-1 font-medium">Copilot</h4>- <p className="text-sm text-slate-500 dark:text-slate-400">- Floating widget for AI assistants- </p>- </SimpleCard>- <SimpleCard className="p-4">- <h4 className="mb-1 font-medium">Fullscreen</h4>- <p className="text-sm text-slate-500 dark:text-slate-400">Full-page chat interface</p>- </SimpleCard>- <SimpleCard className="p-4">- <h4 className="mb-1 font-medium">Bottom Tray</h4>- <p className="text-sm text-slate-500 dark:text-slate-400">Slide-up mobile tray</p>- </SimpleCard>- </div>+ <FeatureCards direction="horizontal" cols={3} className="mb-6">+ <FeatureCard+ direction="horizontal"+ title="Copilot"+ description="Floating widget for AI assistants"+ />+ <FeatureCard+ direction="horizontal"+ title="Fullscreen"+ description="Full-page chat interface"+ />+ <FeatureCard+ direction="horizontal"+ title="Bottom Tray"+ description="Slide-up mobile tray"+ />+ </FeatureCards><div className="mb-6"><CodeBlock@@ -263,8 +247,8 @@ import { FullScreen, defaultLibrary } from "@openuidev/react-ui";{/* Default Library Section */}<div id="library" className="mb-12 sm:mb-20"><div className="mb-4 flex items-start gap-3 sm:mb-6 sm:gap-4">- <div className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-emerald-50 sm:size-12 dark:bg-emerald-900/30">- <Package className="size-5 text-emerald-600 sm:size-6 dark:text-emerald-400" />+ <div className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-fd-muted sm:size-12">+ <Package className="size-5 text-fd-foreground sm:size-6" /></div><div><h2 className="mb-1 text-2xl font-bold sm:mb-2 sm:text-3xl">@@ -281,24 +265,16 @@ import { FullScreen, defaultLibrary } from "@openuidev/react-ui";with your own custom components. Includes layouts, forms, data display, charts, and more.</p>- <div className="mb-4 grid gap-3 sm:mb-6 sm:grid-cols-2 md:grid-cols-4">- <SimpleCard className="p-3">- <p className="text-sm font-medium">Layout</p>- <p className="text-xs text-slate-500 dark:text-slate-400">Grid, Stack, Flex</p>- </SimpleCard>- <SimpleCard className="p-3">- <p className="text-sm font-medium">Forms</p>- <p className="text-xs text-slate-500 dark:text-slate-400">Input, Select, Radio</p>- </SimpleCard>- <SimpleCard className="p-3">- <p className="text-sm font-medium">Data Display</p>- <p className="text-xs text-slate-500 dark:text-slate-400">Table, Card, Badge</p>- </SimpleCard>- <SimpleCard className="p-3">- <p className="text-sm font-medium">Charts</p>- <p className="text-xs text-slate-500 dark:text-slate-400">Line, Bar, Pie</p>- </SimpleCard>- </div>+ <FeatureCards direction="horizontal" cols={4} className="mb-4 sm:mb-6">+ <FeatureCard direction="horizontal" title="Layout" description="Grid, Stack, Flex" />+ <FeatureCard direction="horizontal" title="Forms" description="Input, Select, Radio" />+ <FeatureCard+ direction="horizontal"+ title="Data Display"+ description="Table, Card, Badge"+ />+ <FeatureCard direction="horizontal" title="Charts" description="Line, Bar, Pie" />+ </FeatureCards><div className="mb-4"><Tabs defaultValue="quick-example" className="mb-6">diff --git a/docs/components/overview-components/separator.tsx b/docs/components/overview-components/separator.tsxindex 508007ee5..852d370ca 100644--- a/docs/components/overview-components/separator.tsx+++ b/docs/components/overview-components/separator.tsx@@ -3,5 +3,9 @@ interface SeparatorProps {}export function Separator({ className }: SeparatorProps) {- return <hr className={`border-slate-200 dark:border-slate-800 ${className ?? ""}`} />;+ return (+ <hr+ className={`border-slate-200 dark:border-[var(--color-doc-border)] ${className ?? ""}`}+ />+ );}diff --git a/docs/components/overview-components/simple-card.tsx b/docs/components/overview-components/simple-card.tsxindex c9a3b49ea..c9db1f447 100644--- a/docs/components/overview-components/simple-card.tsx+++ b/docs/components/overview-components/simple-card.tsx@@ -8,7 +8,7 @@ interface SimpleCardProps {export function SimpleCard({ children, className }: SimpleCardProps) {return (<div- className={`rounded-xl border border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-900 ${className ?? ""}`}+ className={`rounded-xl border border-slate-200 bg-white dark:border-[var(--color-doc-border)] dark:bg-[var(--color-doc-surface)] ${className ?? ""}`}>{children}</div>diff --git a/docs/components/overview-components/tabs.tsx b/docs/components/overview-components/tabs.tsxindex a56f06687..6c1f7e01c 100644--- a/docs/components/overview-components/tabs.tsx+++ b/docs/components/overview-components/tabs.tsx@@ -30,7 +30,7 @@ interface TabsListProps {export function TabsList({ children, className }: TabsListProps) {return (<div- className={`inline-flex rounded-lg border border-slate-200 bg-slate-100 p-1 dark:border-slate-800 dark:bg-slate-900 ${className ?? ""}`}+ className={`inline-flex rounded-lg border border-slate-200 bg-slate-100 p-1 dark:border-[var(--color-doc-border)] dark:bg-[var(--color-doc-surface)] ${className ?? ""}`}>{children}</div>@@ -51,7 +51,7 @@ export function TabsTrigger({ value, children, className }: TabsTriggerProps) {onClick={() => ctx.onChange(value)}className={`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${active- ? "bg-white text-slate-900 shadow-sm dark:bg-slate-800 dark:text-white"+ ? "bg-white text-slate-900 shadow-sm dark:bg-[var(--color-doc-surface-raised)] dark:text-white": "text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200"} ${className ?? ""}`}>diff --git a/docs/components/theme-toggle.tsx b/docs/components/theme-toggle.tsxnew file mode 100644index 000000000..4b21998f1--- /dev/null+++ b/docs/components/theme-toggle.tsx@@ -0,0 +1,45 @@+'use client';++import { useEffect, useState } from 'react';+import { Moon, Sun } from 'lucide-react';+import { useTheme } from 'next-themes';+import { cn } from '@/lib/cn';++export function ThemeToggle({ className }: { className?: string }) {+ const { setTheme, resolvedTheme } = useTheme();+ const [mounted, setMounted] = useState(false);++ useEffect(() => {+ setMounted(true);+ }, []);++ const value = mounted ? resolvedTheme : null;++ return (+ <button+ className={cn(+ 'inline-flex items-center rounded-full border p-0.5 *:rounded-full cursor-pointer',+ className,+ )}+ aria-label="Toggle Theme"+ onClick={() => setTheme(value === 'light' ? 'dark' : 'light')}+ data-theme-toggle=""+ >+ {(['light', 'dark'] as const).map((key) => {+ const Icon = key === 'light' ? Sun : Moon;+ return (+ <Icon+ key={key}+ fill="currentColor"+ className={cn(+ 'size-5 p-1',+ value === key+ ? 'bg-fd-accent text-fd-accent-foreground rounded-full'+ : 'text-fd-muted-foreground',+ )}+ />+ );+ })}+ </button>+ );+}diff --git a/docs/imports/svg-mascot-dark.ts b/docs/imports/svg-mascot-dark.tsnew file mode 100644index 000000000..0fbf06553--- /dev/null+++ b/docs/imports/svg-mascot-dark.ts@@ -0,0 +1,22 @@+export default {+ // White body fill+ pBody:+ "M12.7998 4.5H14.7998L16.2998 5H18.2998L18.7998 4L19.7998 5.5L21.2998 5L23.7998 6.5L25.7998 9L26.2998 11L29.2998 13L30.7998 16L31.7998 20L29.2998 22.5L28.7998 24.5L26.2998 26L23.7998 25L21.7998 27L19.2998 27.5L15.2998 28.5L11.7998 26.5L9.2998 26L8.2998 24.5L4.7998 25L3.2998 23L0.799805 21V18.5L2.7998 15.5V12L4.7998 10.5L7.7998 9L8.2998 7L10.2998 6L12.7998 4.5Z",+ // Dark detail paths (#464646)+ pOutline:+ "M5.84863 9.45135C5.99735 9.43334 6.21914 9.41276 6.41309 9.45428C6.51144 9.47537 6.61421 9.51473 6.69727 9.58807C6.78383 9.66452 6.83882 9.76998 6.85254 9.90155L6.85742 9.94843L6.83496 9.98944C6.66612 10.2967 6.34933 10.4092 6.06055 10.4728C5.9158 10.5047 5.75972 10.5282 5.62598 10.5519C5.48694 10.5767 5.36543 10.6032 5.26562 10.6428C4.06816 11.1178 3.37644 11.9164 3.06641 12.8596C2.75454 13.8083 2.8241 14.918 3.18359 16.0119L3.22168 16.1252L3.11914 16.1867C2.31009 16.6752 1.66015 17.3283 1.3457 18.1994V18.2004C1.07365 18.9435 1.09694 19.7587 1.4082 20.4826L1.47461 20.6252V20.6262C1.73674 21.1669 2.05101 21.5115 2.42871 21.7687C2.71542 21.9639 3.04163 22.1115 3.41992 22.2551L3.81641 22.3986L3.89844 22.4279L3.91406 22.5139C3.98686 22.9219 4.03827 23.1801 4.24023 23.5178L4.24121 23.5187C4.51412 23.9793 4.96728 24.3092 5.49512 24.4299H5.49609C6.2198 24.5998 6.81594 24.3903 7.44824 24.0197C7.32927 23.4979 7.26143 22.9664 7.24316 22.4318C6.24076 22.0478 5.69439 21.2279 5.54004 20.3098C5.38662 19.3965 5.61828 18.3836 6.16602 17.5891C5.79531 16.8172 5.66886 15.7437 6.0957 14.9572C6.17971 14.8024 6.2959 14.5466 6.44336 14.3439C6.59199 14.1397 6.80526 13.9401 7.1084 13.9426L7.13965 13.9435L7.16797 13.9562C7.21492 13.9771 7.24451 13.9883 7.27051 13.9992C7.2928 14.0085 7.32549 14.0222 7.35547 14.0461C7.38668 14.071 7.40688 14.1003 7.4209 14.1213L7.48047 14.2111L7.49902 14.2385L7.50488 14.2717C7.5486 14.5453 7.45091 14.7614 7.33105 14.9514C7.27291 15.0435 7.20321 15.1395 7.1416 15.2287C7.07783 15.3211 7.01681 15.4144 6.96582 15.5158C6.86579 15.7148 6.79961 15.9507 6.83398 16.2697C6.86883 16.5929 7.00825 17.0104 7.33691 17.5676L7.3877 17.6525L7.3291 17.7326C6.71567 18.5704 6.42046 19.3736 6.52344 20.0578C6.62455 20.7291 7.1175 21.3343 8.19629 21.7648L8.29395 21.8039L8.29102 21.9084C8.28638 22.079 8.28328 22.2496 8.28125 22.4201C8.26449 23.8587 8.87532 25.0642 10.2598 25.6555C10.8602 25.9118 11.4191 25.908 12.1016 25.9123H12.1709L12.2158 25.966C12.6547 26.4923 13.0395 26.8992 13.4873 27.2111C13.9321 27.5209 14.4454 27.7416 15.1455 27.884H15.1465C16.1652 28.0749 17.3111 27.8604 18.1562 27.2746C18.2876 27.1835 18.3924 27.0947 18.4912 27.0099C18.5878 26.9271 18.6847 26.8436 18.792 26.7785C19.0229 26.6385 19.2831 26.5937 19.7031 26.6857C20.7611 26.9178 21.6837 26.6707 22.333 26.1164C22.9831 25.5614 23.3725 24.6866 23.3418 23.6379V23.6271L23.3428 23.6174C23.359 23.4723 23.4344 23.3577 23.5264 23.2687C23.6169 23.1813 23.7299 23.1114 23.8398 23.0539C23.9492 22.9967 24.0691 22.9449 24.166 22.8996C24.2685 22.8517 24.3452 22.8118 24.3945 22.7736C25.157 22.1813 25.53 21.4576 25.5938 20.6984C25.6577 19.9354 25.4111 19.12 24.9033 18.3508L24.8604 18.2863L24.8877 18.215C25.1245 17.595 25.2699 17.2972 25.3604 16.676C25.4223 16.2504 25.2781 15.8769 25.1094 15.5578C25.0673 15.4783 25.0238 15.4032 24.9824 15.3312C24.9416 15.2602 24.9012 15.1905 24.8672 15.1262C24.8335 15.0623 24.8027 14.9978 24.7822 14.9357C24.7621 14.8747 24.7484 14.8038 24.7598 14.7316L24.7646 14.6955L24.7861 14.6662C24.8395 14.5933 24.8834 14.5349 24.9414 14.4885C24.9994 14.442 25.0659 14.4116 25.1494 14.3752L25.1738 14.3654L25.1992 14.3635C25.536 14.3402 25.7562 14.5276 25.8994 14.7492C26.0378 14.9635 26.1206 15.2334 26.1836 15.424C26.4728 16.2995 26.4176 17.313 26.0039 18.1467C26.0268 18.1847 26.0499 18.2225 26.0723 18.2609C26.5996 19.1488 26.7675 20.1986 26.5459 21.1994L26.4961 21.3986C26.3078 22.0771 26.0396 22.5787 25.665 22.9933C25.3087 23.3878 24.8607 23.6951 24.3135 24.006C24.3024 24.2269 24.3046 24.4497 24.3076 24.6789C24.5776 24.9354 24.7902 25.0385 25.1514 25.2062L25.3281 25.2775C25.7348 25.4306 26.1023 25.4882 26.5586 25.4689L26.8252 25.4455C27.4401 25.3606 28.0092 25.067 28.4316 24.6115C29.0032 23.9836 29.1665 23.2334 29.124 22.3957L29.1182 22.298L29.207 22.2541C31.5386 21.1065 32.2 18.3496 30.4531 16.3703C30.4234 16.3366 30.3438 16.2719 30.2246 16.1838C30.11 16.0991 29.9728 16.0033 29.8369 15.9064C29.7027 15.8107 29.5697 15.7139 29.4678 15.632C29.4171 15.5913 29.3706 15.5509 29.335 15.5148C29.3173 15.4969 29.299 15.4777 29.2842 15.4572C29.2714 15.4396 29.2512 15.4079 29.2432 15.3674C29.1724 15.004 29.1935 14.6185 29.1855 14.2766C29.1773 13.9246 29.1396 13.595 28.9697 13.2814L28.9648 13.2726V13.2717C28.6309 12.5451 28.2517 12.1986 27.8066 11.967C27.5793 11.8487 27.3313 11.7586 27.0537 11.6642C26.7785 11.5707 26.4732 11.4728 26.1455 11.341L26.1064 11.3254L26.0811 11.2912C26.0092 11.1934 25.969 11.0942 25.9805 10.9836C25.9907 10.8852 26.0417 10.798 26.083 10.7277L26.0996 10.6984L26.1279 10.6799C26.3393 10.5367 26.5903 10.5172 26.8115 10.548C29.1047 10.8676 30.3944 12.8117 30.2539 14.9416C31.6019 15.6788 32.3304 17.061 32.4365 18.4894C32.5448 19.9477 32.0071 21.4716 30.8008 22.426C30.5901 22.5926 30.3942 22.731 30.1748 22.8762C30.0462 23.6348 29.938 24.3301 29.4336 25.0139C28.5769 26.1749 27.116 26.6392 25.7275 26.4201C25.0361 26.3109 24.4917 26.0697 23.9404 25.6926C23.4568 26.5783 22.8144 27.1719 22.0371 27.4953C21.2385 27.8275 20.3164 27.8687 19.3154 27.6779C19.1115 27.8651 18.8928 28.0222 18.6611 28.1642H18.6602C17.4521 28.9013 15.9959 29.132 14.6152 28.8049V28.8039C14.1024 28.6843 13.51 28.4294 12.9785 28.0969C12.4736 27.7809 12.0117 27.3869 11.7236 26.9611C10.9009 26.9052 10.1632 26.759 9.51758 26.4377C8.88687 26.1238 8.35392 25.646 7.91309 24.9426C6.95042 25.4899 5.92102 25.6495 5.03223 25.381C4.1175 25.1046 3.37518 24.3826 3.02051 23.2228C2.03737 22.8506 1.26538 22.261 0.770508 21.4894C0.263251 20.6984 0.0531388 19.7288 0.191406 18.6349C0.35381 17.3508 1.00099 16.5092 1.99121 15.757C1.9895 15.7479 1.98799 15.7388 1.98633 15.7297C1.71603 14.2482 1.85135 12.823 2.47363 11.6926C3.09889 10.5569 4.20643 9.73522 5.84082 9.45233L5.84863 9.45135Z",+ pMouth:+ "M15.8759 18.3902C16.187 18.3701 16.7373 18.3541 17.1854 18.5025C17.4127 18.5778 17.6488 18.7069 17.8016 18.9331C17.9609 19.1692 17.9975 19.4626 17.9169 19.7935C17.846 20.0837 17.6472 20.3128 17.4481 20.481C17.3015 20.6048 17.1375 20.7084 16.9852 20.7935C16.9885 20.9812 16.9933 21.1709 16.9979 21.3618C17.3935 21.7956 17.7243 22.0013 17.994 22.0845C18.272 22.1701 18.5147 22.136 18.7411 22.0474C18.9792 21.9541 19.1871 21.8063 19.4061 21.6597C19.5091 21.5908 19.6219 21.5172 19.7333 21.4644C19.8157 21.4254 19.9171 21.3884 20.0282 21.3794L20.1425 21.3814L20.2372 21.3911L20.3085 21.4546C20.6127 21.7245 20.6989 22.1942 20.4022 22.5454C19.9706 23.0561 19.3554 23.3174 18.7372 23.4087C18.6572 23.9203 18.5424 24.4594 18.2889 24.9068C17.9851 25.4431 17.4922 25.8361 16.7011 25.9361C16.4645 25.9864 16.1885 25.9782 15.9345 25.9312C15.6732 25.8827 15.401 25.7882 15.1932 25.6441C14.3644 25.0688 14.1637 24.2033 14.0155 23.4146C13.6815 23.3823 13.2589 23.2793 12.8964 23.0992C12.446 22.8751 11.9508 22.4557 12.0448 21.8003C12.0893 21.4923 12.3656 21.3913 12.4306 21.3609L12.4911 21.3326H12.5585C12.723 21.3332 12.862 21.3944 12.9706 21.4634C13.0767 21.5309 13.1728 21.618 13.2518 21.6919C13.4315 21.8599 13.5411 21.9674 13.662 22.0113C14.0902 22.1659 14.4488 22.1286 14.7733 21.9849C15.0819 21.8481 15.3684 21.6078 15.6542 21.313L15.662 20.8228C15.4075 20.6655 15.1791 20.485 15.0028 20.2896C14.8168 20.0832 14.6689 19.8408 14.6288 19.5806C14.5861 19.3021 14.6725 19.0313 14.8973 18.8179C15.1087 18.6176 15.4271 18.4809 15.8339 18.396L15.8544 18.3911L15.8759 18.3902ZM16.6659 22.5152C16.6726 23.031 16.8618 24.056 16.2538 24.187C15.6472 23.8855 16.1362 22.7798 15.8759 22.5533C15.5985 22.7142 15.2588 22.9259 14.9667 23.0454C15.1919 24.1728 15.1987 24.651 16.3983 25.0279C16.6386 24.9472 16.9374 24.8653 17.1259 24.7046L17.1503 24.6841C17.3502 24.5126 17.4589 24.2617 17.5692 24.024L17.8114 23.0718C17.4021 22.9434 17.0271 22.7431 16.6659 22.5152ZM12.8095 21.7173C13.0506 21.8706 13.2698 22.1895 13.5604 22.2945V22.2935C13.2698 22.1883 13.0507 21.8695 12.8095 21.7163V21.7173ZM16.7011 21.482C16.8134 21.6105 16.9229 21.7239 17.0292 21.8228L16.8681 21.6636C16.8133 21.6069 16.7573 21.5463 16.7011 21.482ZM15.953 21.439H15.954L15.9647 20.6558L15.9638 20.6548L15.953 21.439Z",+ pEarLeft:+ "M12.6426 3.927C12.7953 3.90314 13.0345 3.90209 13.2949 3.92505C13.5591 3.94836 13.857 3.99679 14.125 4.07739C14.3881 4.15656 14.6451 4.27235 14.8047 4.4436C14.887 4.53194 14.9471 4.63981 14.9639 4.76587C14.9805 4.89192 14.951 5.02115 14.8818 5.15063L14.8633 5.18677L14.8291 5.20825C14.7156 5.27853 14.5815 5.27809 14.4619 5.26001C14.3403 5.24158 14.2034 5.19905 14.0635 5.15356C13.7753 5.05983 13.4502 4.94424 13.0947 4.90845C12.7445 4.87319 12.3701 4.91726 11.9893 5.1438C11.6062 5.37174 11.2029 5.7925 10.8125 6.53638L10.7715 6.6145L10.6846 6.61646C10.1134 6.63322 9.70475 6.66036 9.3584 6.79517C9.02379 6.92545 8.73355 7.163 8.41992 7.63208C8.29888 7.88301 8.26732 8.16386 8.21973 8.46997C8.17379 8.76533 8.11123 9.08765 7.89551 9.34204C7.83888 9.4088 7.76705 9.43515 7.7002 9.4397C7.6433 9.4435 7.58653 9.43128 7.55469 9.42505L7.51855 9.41821L7.49023 9.39575C7.28012 9.23 7.18522 8.9907 7.16406 8.7522C7.01274 7.49753 7.918 6.15256 9.14355 5.80591C9.38359 5.73802 9.5693 5.70043 9.7168 5.66919C9.86716 5.63734 9.96857 5.6132 10.0566 5.57446C10.2209 5.50211 10.3641 5.36747 10.6494 4.9231L10.7285 4.81372C10.9284 4.56669 11.2292 4.37628 11.5439 4.23657C11.9069 4.07547 12.3077 3.97245 12.6426 3.92603V3.927Z",+ pEarRight:+ "M20.605 4.58978C21.3618 4.54657 22.016 4.67435 22.5679 4.99017C23.1006 5.29513 23.5251 5.76938 23.8569 6.40619C24.6021 6.52006 25.3102 6.86129 25.8032 7.38763C26.3165 7.93562 26.5944 8.6802 26.436 9.55267C26.4173 9.65589 26.3562 9.72632 26.2964 9.77338C26.2399 9.81775 26.1744 9.84876 26.1323 9.86908L26.0962 9.88666L26.0562 9.88373C25.925 9.87437 25.8141 9.84259 25.7241 9.7851C25.6324 9.72647 25.5729 9.64739 25.5347 9.56049C25.4976 9.47627 25.4799 9.3852 25.4702 9.29974C25.461 9.21827 25.4567 9.12857 25.4517 9.04974C25.3208 8.39158 25.0626 8.0233 24.7065 7.79291C24.3376 7.55435 23.8464 7.45006 23.2202 7.36224L23.1343 7.35052L23.1021 7.27045C22.8639 6.68423 22.5264 6.1974 22.0952 5.90717C21.6702 5.6213 21.1409 5.51751 20.4878 5.71576C20.3111 5.76941 19.9951 5.84441 19.7446 5.81146C19.619 5.79488 19.4746 5.74649 19.3911 5.61615C19.3065 5.484 19.3137 5.31564 19.3784 5.13275L19.3901 5.10248L19.4116 5.07904C19.5711 4.91247 19.7736 4.81739 19.9751 4.75092C20.1712 4.68628 20.3937 4.64089 20.5757 4.59369L20.5903 4.59076L20.605 4.58978Z",+ pEyeLeft:+ "M11.0955 14.745C11.3902 14.6423 11.7115 14.6417 12.0066 14.743C12.5546 14.9312 12.9246 15.4381 12.9314 16.0106C12.9383 16.5831 12.5802 17.0988 12.0369 17.2997C11.3199 17.5645 10.5214 17.201 10.2595 16.4911C9.99792 15.781 10.3735 14.9965 11.0955 14.745Z",+ pEyeRight:+ "M19.517 14.7445C19.8116 14.6418 20.133 14.6412 20.4281 14.7425C20.976 14.9306 21.3459 15.4376 21.3529 16.0101C21.3598 16.5825 21.0025 17.0982 20.4594 17.2991C19.7423 17.5643 18.943 17.2016 18.681 16.4915C18.4192 15.7813 18.7949 14.996 19.517 14.7445Z",+ pHornLeft:+ "M14.3389 2.82202C14.6026 2.81735 14.9307 2.90176 15.2539 3.03687C15.5798 3.1731 15.9141 3.36665 16.1914 3.59253C16.4661 3.81629 16.6985 4.08296 16.7988 4.36987C16.8497 4.51548 16.8681 4.66883 16.8369 4.823C16.8057 4.97747 16.7267 5.12309 16.6006 5.25659L16.5576 5.30249L16.4951 5.30347C16.357 5.30706 16.3041 5.28732 16.1953 5.25952L16.165 5.25171L16.1406 5.23315C15.9538 5.08932 15.8641 4.9058 15.7891 4.74683C15.7117 4.58291 15.6484 4.44352 15.5225 4.32202C15.4384 4.24096 15.3282 4.17749 15.1973 4.12085C15.0646 4.06347 14.9242 4.0183 14.7754 3.96558C14.4978 3.86722 14.169 3.73822 14.0283 3.4314L14.0146 3.40015V3.36597C14.019 3.13547 14.1268 3.01579 14.2178 2.8855L14.2617 2.823L14.3389 2.82202Z",+ pHornRight:+ "M20.0981 3.32666C20.215 3.3368 20.3426 3.36231 20.4468 3.42627C20.531 3.47807 20.5967 3.55326 20.6294 3.65283L20.6509 3.76025V3.76123C20.6586 3.8715 20.6667 4.00713 20.6099 4.11768C20.5434 4.24679 20.4149 4.3032 20.2622 4.32959C20.0341 4.36894 19.8505 4.39035 19.7026 4.41064C19.5524 4.43127 19.4411 4.45076 19.3413 4.48389C19.1517 4.54686 18.9812 4.66799 18.6821 5.01709C18.6441 5.07082 18.6096 5.12148 18.5786 5.16162C18.5441 5.20631 18.5055 5.2493 18.4565 5.28467C18.3551 5.35786 18.2357 5.37729 18.0786 5.38818L18.0366 5.39111L17.9995 5.37158C17.8048 5.27125 17.7085 5.11177 17.6958 4.93213C17.684 4.76467 17.7453 4.59573 17.8257 4.45557C18.1808 3.8365 18.8261 3.54467 19.437 3.35596L19.4546 3.3501L19.4731 3.34912C19.5944 3.34253 19.8688 3.30675 20.0981 3.32666Z",+};diff --git a/docs/lib/layout.shared.tsx b/docs/lib/layout.shared.tsxindex a34afe2ec..58740c198 100644--- a/docs/lib/layout.shared.tsx+++ b/docs/lib/layout.shared.tsx@@ -16,6 +16,5 @@ export function baseOptions(): BaseLayoutProps {nav: {title: "OpenUI",},- githubUrl: siteConfig.githubUrl,};}diff --git a/docs/package.json b/docs/package.jsonindex 5f041b9ee..d81d8d07c 100644--- a/docs/package.json+++ b/docs/package.json@@ -25,6 +25,7 @@"motion": "^12.34.3","next": "16.1.6","posthog-js": "^1.358.1",+ "next-themes": "^0.4.6","prism-react-renderer": "^2.4.1","react": "^19.2.4","react-dom": "^19.2.4",diff --git a/docs/shared/design-system/styles/variables/colors.css b/docs/shared/design-system/styles/variables/colors.cssindex d8d3adcc0..da0156a25 100644--- a/docs/shared/design-system/styles/variables/colors.css+++ b/docs/shared/design-system/styles/variables/colors.css@@ -107,7 +107,7 @@:root[data-theme="dark"] {/* Surface colors */- --background: var(--swatch-neutral-900);+ --background: #0b0b0f;--foreground: var(--swatch-neutral-800);--popover-background: var(--swatch-neutral-800);--sunk-light: var(--swatch-white-a02);@@ -131,12 +131,12 @@--pink-background: var(--swatch-pink-500);/* Text / Neutral */- --text-neutral-primary: var(--swatch-white);+ --text-neutral-primary: #e2e1e6;--text-neutral-secondary: var(--swatch-white-a50);--text-neutral-tertiary: var(--swatch-white-a20);- --text-neutral-link: var(--swatch-white);+ --text-neutral-link: #e2e1e6;- --text-brand: var(--swatch-white);+ --text-brand: #e2e1e6;--text-white: var(--swatch-white);--text-black: var(--swatch-black);diff --git a/packages/react-ui/.gitignore b/packages/react-ui/.gitignorenew file mode 100644index 000000000..e8c21f8b8--- /dev/null+++ b/packages/react-ui/.gitignore@@ -0,0 +1 @@+src/cssUtils.scssdiff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a7c7480d0..242576e15 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -77,6 +77,9 @@ importers:next:specifier: 16.1.6version: 16.1.6(@babel/[email protected])(@opentelemetry/[email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])+ next-themes:+ specifier: ^0.4.6posthog-js:specifier: ^1.358.1version: 1.358.1