Skip to content

The Open Standard for Generative UI

docs: remove /components design-system pages and redirect them to /docs (#1477)

devin-ai-integration[bot]977962bbaeb1
diff --git a/docs/app/components/.gitignore b/docs/app/components/.gitignore
deleted file mode 100644
index 5ef6a5207..000000000
--- a/docs/app/components/.gitignore
+++ /dev/null
@@ -1,41 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.*
-.yarn/*
-!.yarn/patches
-!.yarn/plugins
-!.yarn/releases
-!.yarn/versions
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-.pnpm-debug.log*
-
-# env files (can opt-in for committing if needed)
-.env*
-
-# vercel
-.vercel
-
-# typescript
-*.tsbuildinfo
-next-env.d.ts
diff --git a/docs/app/components/README.md b/docs/app/components/README.md
deleted file mode 100644
index 09a8a4d2c..000000000
--- a/docs/app/components/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
-
-## Getting Started
-
-First, run the development server:
-
-```bash
-npm run dev
-# or
-yarn dev
-# or
-pnpm dev
-# or
-bun dev
-```
-
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
-
-You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
-
-This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
-
-## Learn More
-
-To learn more about Next.js, take a look at the following resources:
-
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
-
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
-
-## Deploy on Vercel
-
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
-
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
diff --git a/docs/app/components/blocks/_components/BlocksDocPage.tsx b/docs/app/components/blocks/_components/BlocksDocPage.tsx
deleted file mode 100644
index 77f966783..000000000
--- a/docs/app/components/blocks/_components/BlocksDocPage.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import { ReactNode } from "react";
-
-export default function BlocksDocPage({
- title,
- description,
- variantTitle = "Basic",
- variantDescription = "A basic preview variant.",
- preview,
- beforePreview,
- afterPreview,
-}: {
- title: string;
- description: string;
- variantTitle?: string;
- variantDescription?: string;
- preview?: ReactNode;
- beforePreview?: ReactNode;
- afterPreview?: ReactNode;
-}) {
- return (
- <PreviewPage>
- <PreviewSection title={title} headingLevel="h1" description={description}>
- {beforePreview}
- <BlockVariantPreview
- title={variantTitle}
- description={variantDescription}
- preview={preview}
- />
- {afterPreview}
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/_components/ClientOnly.tsx b/docs/app/components/blocks/_components/ClientOnly.tsx
deleted file mode 100644
index f3e56b07d..000000000
--- a/docs/app/components/blocks/_components/ClientOnly.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-"use client";
-
-import { useEffect, useState, type ReactNode } from "react";
-
-export default function ClientOnly({ children }: { children: ReactNode }) {
- const [mounted, setMounted] = useState(false);
- useEffect(() => setMounted(true), []);
- return mounted ? <>{children}</> : null;
-}
diff --git a/docs/app/components/blocks/accordion/page.module.css b/docs/app/components/blocks/accordion/page.module.css
deleted file mode 100644
index 849f09e65..000000000
--- a/docs/app/components/blocks/accordion/page.module.css
+++ /dev/null
@@ -1,32 +0,0 @@
-.previewWrapper {
- width: 100%;
- display: flex;
- justify-content: center;
-}
-
-.previewWrapper > * {
- width: 500px;
- min-width: 500px;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.selectWrapper {
- width: 100%;
-}
diff --git a/docs/app/components/blocks/accordion/page.tsx b/docs/app/components/blocks/accordion/page.tsx
deleted file mode 100644
index 262644945..000000000
--- a/docs/app/components/blocks/accordion/page.tsx
+++ /dev/null
@@ -1,220 +0,0 @@
-"use client";
-
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import {
- Accordion,
- AccordionContent,
- AccordionItem,
- AccordionTrigger,
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@openuidev/react-ui";
-import { useState } from "react";
-import styles from "./page.module.css";
-
-type VariantMode = "clear" | "card" | "sunk";
-type TypeMode = "single" | "multiple";
-
-const VARIANT_OPTIONS: { value: VariantMode; label: string }[] = [
- { value: "clear", label: "Clear" },
- { value: "card", label: "Card" },
- { value: "sunk", label: "Sunk" },
-];
-
-const TYPE_OPTIONS: { value: TypeMode; label: string }[] = [
- { value: "single", label: "Single" },
- { value: "multiple", label: "Multiple" },
-];
-
-const ACCORDION_ITEMS = [
- {
- value: "item-1",
- trigger: "What is OpenUI UI?",
- content:
- "OpenUI UI is a design system and component library for building consistent, polished interfaces.",
- },
- {
- value: "item-2",
- trigger: "How do I install it?",
- content: "Install via pnpm: pnpm add @openuidev/react-ui",
- },
- {
- value: "item-3",
- trigger: "Can I customise the theme?",
- content:
- "Yes — OpenUI UI supports full theming through CSS custom properties and SCSS design tokens.",
- },
-];
-
-function ClearPreview() {
- return (
- <div className={styles.previewWrapper}>
- <Accordion type="single" collapsible variant="clear" defaultValue="item-1">
- {ACCORDION_ITEMS.map((item) => (
- <AccordionItem key={item.value} value={item.value}>
- <AccordionTrigger text={item.trigger} />
- <AccordionContent>{item.content}</AccordionContent>
- </AccordionItem>
- ))}
- </Accordion>
- </div>
- );
-}
-
-function CardPreview() {
- return (
- <div className={styles.previewWrapper}>
- <Accordion type="single" collapsible variant="card" defaultValue="item-1">
- {ACCORDION_ITEMS.map((item) => (
- <AccordionItem key={item.value} value={item.value}>
- <AccordionTrigger text={item.trigger} />
- <AccordionContent>{item.content}</AccordionContent>
- </AccordionItem>
- ))}
- </Accordion>
- </div>
- );
-}
-
-function SunkPreview() {
- return (
- <div className={styles.previewWrapper}>
- <Accordion type="single" collapsible variant="sunk" defaultValue="item-1">
- {ACCORDION_ITEMS.map((item) => (
- <AccordionItem key={item.value} value={item.value}>
- <AccordionTrigger text={item.trigger} />
- <AccordionContent>{item.content}</AccordionContent>
- </AccordionItem>
- ))}
- </Accordion>
- </div>
- );
-}
-
-function ConfigurableAccordionPreview({ variant, type }: { variant: VariantMode; type: TypeMode }) {
- if (type === "multiple") {
- return (
- <div className={styles.previewWrapper}>
- <Accordion type="multiple" variant={variant} defaultValue={["item-1"]}>
- {ACCORDION_ITEMS.map((item) => (
- <AccordionItem key={item.value} value={item.value}>
- <AccordionTrigger text={item.trigger} />
- <AccordionContent>{item.content}</AccordionContent>
- </AccordionItem>
- ))}
- </Accordion>
- </div>
- );
- }
-
- return (
- <div className={styles.previewWrapper}>
- <Accordion type="single" collapsible variant={variant} defaultValue="item-1">
- {ACCORDION_ITEMS.map((item) => (
- <AccordionItem key={item.value} value={item.value}>
- <AccordionTrigger text={item.trigger} />
- <AccordionContent>{item.content}</AccordionContent>
- </AccordionItem>
- ))}
- </Accordion>
- </div>
- );
-}
-
-function AccordionControls({
- variant,
- type,
- onVariantChange,
- onTypeChange,
-}: {
- variant: VariantMode;
- type: TypeMode;
- onVariantChange: (next: VariantMode) => void;
- onTypeChange: (next: TypeMode) => void;
-}) {
- return (
- <div className={styles.controlsPanel}>
- <div className={styles.controlSection}>
- <p className={styles.sectionTitle}>Variant</p>
- <Select value={variant} onValueChange={(v) => onVariantChange(v as VariantMode)}>
- <SelectTrigger size="sm" className={styles.selectWrapper}>
- <SelectValue />
- </SelectTrigger>
- <SelectContent>
- {VARIANT_OPTIONS.map((opt) => (
- <SelectItem key={opt.value} value={opt.value}>
- {opt.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
-
- <div className={styles.controlSection}>
- <p className={styles.sectionTitle}>Type</p>
- <Select value={type} onValueChange={(v) => onTypeChange(v as TypeMode)}>
- <SelectTrigger size="sm" className={styles.selectWrapper}>
- <SelectValue />
- </SelectTrigger>
- <SelectContent>
- {TYPE_OPTIONS.map((opt) => (
- <SelectItem key={opt.value} value={opt.value}>
- {opt.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
- </div>
- );
-}
-
-export default function BlocksAccordionPage() {
- const [variant, setVariant] = useState<VariantMode>("clear");
- const [type, setType] = useState<TypeMode>("single");
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Accordion"
- headingLevel="h1"
- description="Vertically stacked, collapsible content sections."
- >
- <BlockVariantPreview
- title="Clear"
- description="Minimal style without borders or background. Best for inline content sections."
- preview={<ClearPreview />}
- />
-
- <BlockVariantPreview
- title="Card"
- description="Each item rendered as a card with subtle elevation. Great for FAQ pages and settings."
- preview={<CardPreview />}
- />
-
- <BlockVariantPreview
- title="Sunk"
- description="Recessed background style. Ideal for grouped content within a panel."
- preview={<SunkPreview />}
- />
-
- <BlockVariantPreview
- title="Configurations"
- description="Customise variant and expand behaviour."
- preview={<ConfigurableAccordionPreview variant={variant} type={type} />}
- rightControls={
- <AccordionControls
- variant={variant}
- type={type}
- onVariantChange={setVariant}
- onTypeChange={setType}
- />
- }
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/attribute-list/page.module.css b/docs/app/components/blocks/attribute-list/page.module.css
deleted file mode 100644
index e33383213..000000000
--- a/docs/app/components/blocks/attribute-list/page.module.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.previewWrapper {
- width: 460px;
- max-width: 100%;
- margin: 0 auto;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
diff --git a/docs/app/components/blocks/button-group/page.module.css b/docs/app/components/blocks/button-group/page.module.css
deleted file mode 100644
index b9aad1d4b..000000000
--- a/docs/app/components/blocks/button-group/page.module.css
+++ /dev/null
@@ -1,19 +0,0 @@
-.previewWrapper {
- width: 100%;
- min-height: 280px;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
diff --git a/docs/app/components/blocks/button-group/page.tsx b/docs/app/components/blocks/button-group/page.tsx
deleted file mode 100644
index bdac44a10..000000000
--- a/docs/app/components/blocks/button-group/page.tsx
+++ /dev/null
@@ -1,208 +0,0 @@
-"use client";
-
-import {
- BlockVariantPreview,
- PreviewPage,
- PreviewSection,
- SegmentedToggle,
-} from "@components/components/preview";
-import {
- Button,
- Buttons,
- IconButton,
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@openuidev/react-ui";
-import { useState } from "react";
-import styles from "./page.module.css";
-
-type ButtonType = "normal" | "destructive";
-type ButtonVariant = "primary" | "secondary" | "tertiary";
-type ButtonContentMode = "text" | "icon";
-
-function buildSingleButtonPrompt({
- buttonType,
- buttonVariant,
- buttonContentMode,
-}: {
- buttonType: ButtonType;
- buttonVariant: ButtonVariant;
- buttonContentMode: ButtonContentMode;
-}) {
- const contentLabel = buttonContentMode === "icon" ? "icon-only" : "text";
- const destructivePrefix = buttonType === "destructive" ? "destructive " : "";
- return `Use a ${destructivePrefix}${buttonVariant} ${contentLabel} button for <enter use case>.`;
-}
-
-function SingleButtonPreview({
- buttonType,
- buttonVariant,
- buttonContentMode,
-}: {
- buttonType: ButtonType;
- buttonVariant: ButtonVariant;
- buttonContentMode: ButtonContentMode;
-}) {
- return (
- <div className={styles.previewWrapper}>
- {buttonContentMode === "text" ? (
- <Button variant={buttonVariant} buttonType={buttonType}>
- {buttonVariant[0].toUpperCase() + buttonVariant.slice(1)}
- </Button>
- ) : (
- <IconButton
- icon={
- <svg aria-hidden viewBox="0 0 24 24" width="16" height="16" fill="none">
- <path
- d="M12 4v10m0 0 4-4m-4 4-4-4M5 18h14"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- />
- </svg>
- }
- variant={buttonVariant}
- appearance={buttonType}
- aria-label="Download"
- />
- )}
- </div>
- );
-}
-
-function ButtonsGroupPreview() {
- const downloadIcon = (
- <svg aria-hidden viewBox="0 0 24 24" width="16" height="16" fill="none">
- <path
- d="M12 4v10m0 0 4-4m-4 4-4-4M5 18h14"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- />
- </svg>
- );
-
- return (
- <Buttons variant="horizontal" style={{ width: "fit-content" }}>
- <Button variant="primary">Primary</Button>
- <Button variant="secondary">Secondary</Button>
- <IconButton icon={downloadIcon} variant="tertiary" aria-label="Download" />
- </Buttons>
- );
-}
-
-function ButtonControls({
- buttonType,
- buttonVariant,
- buttonContentMode,
- onButtonTypeChange,
- onButtonVariantChange,
- onButtonContentModeChange,
-}: {
- buttonType: ButtonType;
- buttonVariant: ButtonVariant;
- buttonContentMode: ButtonContentMode;
- onButtonTypeChange: (next: ButtonType) => void;
- onButtonVariantChange: (next: ButtonVariant) => void;
- onButtonContentModeChange: (next: ButtonContentMode) => void;
-}) {
- return (
- <div className={styles.controlsPanel}>
- <div className={styles.controlSection}>
- <SegmentedToggle
- ariaLabel="Button type"
- value={buttonType}
- onChange={onButtonTypeChange}
- options={[
- { label: "Normal", value: "normal" },
- { label: "Destructive", value: "destructive" },
- ]}
- />
- </div>
-
- <div className={styles.controlSection}>
- <Select
- value={buttonVariant}
- onValueChange={(value) => onButtonVariantChange(value as ButtonVariant)}
- >
- <SelectTrigger size="md" style={{ width: "100%" }}>
- <SelectValue placeholder="Variant" />
- </SelectTrigger>
- <SelectContent>
- <SelectItem value="primary" showTick={false}>
- Primary
- </SelectItem>
- <SelectItem value="secondary" showTick={false}>
- Secondary
- </SelectItem>
- <SelectItem value="tertiary" showTick={false}>
- Tertiary
- </SelectItem>
- </SelectContent>
- </Select>
- </div>
-
- <div className={styles.controlSection}>
- <SegmentedToggle
- ariaLabel="Button content mode"
- value={buttonContentMode}
- onChange={onButtonContentModeChange}
- options={[
- { label: "Text", value: "text" },
- { label: "Icon", value: "icon" },
- ]}
- />
- </div>
- </div>
- );
-}
-
-export default function BlocksButtonGroupPage() {
- const [buttonType, setButtonType] = useState<ButtonType>("normal");
- const [buttonVariant, setButtonVariant] = useState<ButtonVariant>("primary");
- const [buttonContentMode, setButtonContentMode] = useState<ButtonContentMode>("text");
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Buttons"
- headingLevel="h1"
- description="You already know who am I and what I do."
- >
- <BlockVariantPreview
- title="Atom"
- description="A single button."
- preview={
- <SingleButtonPreview
- buttonType={buttonType}
- buttonVariant={buttonVariant}
- buttonContentMode={buttonContentMode}
- />
- }
- rightControls={
- <ButtonControls
- buttonType={buttonType}
- buttonVariant={buttonVariant}
- buttonContentMode={buttonContentMode}
- onButtonTypeChange={setButtonType}
- onButtonVariantChange={setButtonVariant}
- onButtonContentModeChange={setButtonContentMode}
- />
- }
- prompt={buildSingleButtonPrompt({ buttonType, buttonVariant, buttonContentMode })}
- />
- <BlockVariantPreview
- title="Button group"
- description="A group of buttons to present related actions."
- preview={<ButtonsGroupPreview />}
- prompt="Use a button group to present related actions in one row when <enter use case>."
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/callout/page.tsx b/docs/app/components/blocks/callout/page.tsx
deleted file mode 100644
index c4f8a1caf..000000000
--- a/docs/app/components/blocks/callout/page.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-"use client";
-
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
- TextCallout,
-} from "@openuidev/react-ui";
-import { useState } from "react";
-
-type CalloutVariant = "neutral" | "info" | "warning" | "success" | "danger";
-
-function CalloutPreview({ variant }: { variant: CalloutVariant }) {
- return (
- <div style={{ width: "600px" }}>
- <TextCallout
- variant={variant}
- title="Heads up"
- description="Use callouts to highlight important information, warnings, or guidance."
- />
- </div>
- );
-}
-
-export default function BlocksCalloutPage() {
- const [variant, setVariant] = useState<CalloutVariant>("neutral");
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Callout"
- headingLevel="h1"
- description="Highlights important information, warnings, or guidance within content. Helps draw attention to critical messages without breaking flow."
- >
- <BlockVariantPreview
- title="Basic"
- description="A callout with selectable variant."
- headerControl={
- <div style={{ width: "160px" }}>
- <Select
- value={variant}
- onValueChange={(value) => setVariant(value as CalloutVariant)}
- >
- <SelectTrigger size="sm" style={{ width: "160px" }}>
- <SelectValue placeholder="Select variant" />
- </SelectTrigger>
- <SelectContent className="openui-select-content-sm">
- <SelectItem value="neutral" showTick={false}>
- Neutral
- </SelectItem>
- <SelectItem value="info" showTick={false}>
- Info
- </SelectItem>
- <SelectItem value="warning" showTick={false}>
- Warning
- </SelectItem>
- <SelectItem value="success" showTick={false}>
- Success
- </SelectItem>
- <SelectItem value="danger" showTick={false}>
- Danger
- </SelectItem>
- </SelectContent>
- </Select>
- </div>
- }
- preview={<CalloutPreview variant={variant} />}
- prompt={`Use ${variant} callout to highlight important information when <enter use case>.`}
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/cards-group/page.module.css b/docs/app/components/blocks/cards-group/page.module.css
deleted file mode 100644
index 2e617c4a3..000000000
--- a/docs/app/components/blocks/cards-group/page.module.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.previewWrapper {
- width: 900px;
- max-width: 100%;
- margin: 0 auto;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
diff --git a/docs/app/components/blocks/charts/area/page.tsx b/docs/app/components/blocks/charts/area/page.tsx
deleted file mode 100644
index 521cf57e4..000000000
--- a/docs/app/components/blocks/charts/area/page.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-"use client";
-
-import ClientOnly from "@components/blocks/_components/ClientOnly";
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import { AreaChart, AreaChartCondensed } from "@openuidev/react-ui";
-
-const areaData = [
- { month: "Jan", desktop: 150, mobile: 90 },
- { month: "Feb", desktop: 280, mobile: 180 },
- { month: "Mar", desktop: 220, mobile: 140 },
-];
-
-const scrollableAreaData = [
- { month: "Jan", desktop: 150, mobile: 90 },
- { month: "Feb", desktop: 280, mobile: 180 },
- { month: "Mar", desktop: 220, mobile: 140 },
- { month: "Apr", desktop: 260, mobile: 170 },
- { month: "May", desktop: 300, mobile: 210 },
- { month: "Jun", desktop: 320, mobile: 220 },
- { month: "Jul", desktop: 310, mobile: 205 },
- { month: "Aug", desktop: 340, mobile: 230 },
- { month: "Sep", desktop: 360, mobile: 245 },
- { month: "Oct", desktop: 390, mobile: 265 },
-];
-
-function DefaultAreaChartPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <AreaChart data={areaData} categoryKey="month" />
- </div>
- </ClientOnly>
- );
-}
-
-function AreaChartCondensedPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <AreaChartCondensed data={scrollableAreaData} categoryKey="month" />
- </div>
- </ClientOnly>
- );
-}
-
-export default function BlocksAreaChartPage() {
- return (
- <PreviewPage>
- <PreviewSection
- title="Area"
- headingLevel="h1"
- description="Preview for the Area chart block."
- >
- <BlockVariantPreview
- title="Scrollable"
- description="Scrollable area chart variant."
- preview={<DefaultAreaChartPreview />}
- />
- <BlockVariantPreview
- title="Condensed"
- description="Condensed area chart variant."
- preview={<AreaChartCondensedPreview />}
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/charts/bar/page.tsx b/docs/app/components/blocks/charts/bar/page.tsx
deleted file mode 100644
index 811a83052..000000000
--- a/docs/app/components/blocks/charts/bar/page.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-"use client";
-
-import ClientOnly from "@components/blocks/_components/ClientOnly";
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import { BarChart, BarChartCondensed } from "@openuidev/react-ui";
-
-const barData = [
- { month: "Jan", desktop: 150, mobile: 90 },
- { month: "Feb", desktop: 280, mobile: 180 },
- { month: "Mar", desktop: 220, mobile: 140 },
-];
-
-const scrollableBarData = [
- { month: "Jan", desktop: 150, mobile: 90 },
- { month: "Feb", desktop: 280, mobile: 180 },
- { month: "Mar", desktop: 220, mobile: 140 },
- { month: "Apr", desktop: 310, mobile: 200 },
- { month: "May", desktop: 260, mobile: 170 },
- { month: "Jun", desktop: 330, mobile: 220 },
- { month: "Jul", desktop: 295, mobile: 190 },
- { month: "Aug", desktop: 360, mobile: 240 },
- { month: "Sep", desktop: 340, mobile: 230 },
- { month: "Oct", desktop: 380, mobile: 250 },
-];
-
-function DefaultBarChartPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <BarChart data={barData} categoryKey="month" />
- </div>
- </ClientOnly>
- );
-}
-
-function BarChartCondensedPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <BarChartCondensed data={scrollableBarData} categoryKey="month" />
- </div>
- </ClientOnly>
- );
-}
-
-export default function BlocksBarChartPage() {
- return (
- <PreviewPage>
- <PreviewSection title="Bar" headingLevel="h1" description="Preview for the Bar chart block.">
- <BlockVariantPreview
- title="Scrollable"
- description="Scrollable bar chart variant."
- preview={<DefaultBarChartPreview />}
- />
- <BlockVariantPreview
- title="Condensed"
- description="Condensed bar chart variant."
- preview={<BarChartCondensedPreview />}
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/charts/donut/page.tsx b/docs/app/components/blocks/charts/donut/page.tsx
deleted file mode 100644
index 59af6b50c..000000000
--- a/docs/app/components/blocks/charts/donut/page.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import ClientOnly from "@components/blocks/_components/ClientOnly";
-import { PieChart } from "@openuidev/react-ui";
-
-const donutData = [
- { category: "January", value: 1250 },
- { category: "February", value: 980 },
- { category: "March", value: 1450 },
- { category: "April", value: 1320 },
- { category: "May", value: 1680 },
- { category: "June", value: 2100 },
-];
-
-function DonutChartPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "760px" }}>
- <PieChart
- data={donutData}
- categoryKey="category"
- dataKey="value"
- variant="donut"
- format="percentage"
- legend
- legendVariant="stacked"
- minChartSize={296}
- maxChartSize={296}
- customPalette={["#1f7ecc", "#2a8fdf", "#3f9ae6", "#5ca9ed", "#7cbbee", "#9ecdf2"]}
- />
- </div>
- </ClientOnly>
- );
-}
-
-export default function BlocksDonutChartPage() {
- return (
- <BlocksDocPage
- title="Donut"
- description="Preview for the Donut chart block."
- preview={<DonutChartPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/charts/line/page.tsx b/docs/app/components/blocks/charts/line/page.tsx
deleted file mode 100644
index 3c56d8c08..000000000
--- a/docs/app/components/blocks/charts/line/page.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-"use client";
-
-import ClientOnly from "@components/blocks/_components/ClientOnly";
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import { LineChart, LineChartCondensed } from "@openuidev/react-ui";
-
-const lineData = [
- { month: "Jan", desktop: 150, mobile: 90 },
- { month: "Feb", desktop: 280, mobile: 180 },
- { month: "Mar", desktop: 220, mobile: 140 },
-];
-
-const scrollableLineData = [
- { month: "Jan", desktop: 150, mobile: 90 },
- { month: "Feb", desktop: 280, mobile: 180 },
- { month: "Mar", desktop: 220, mobile: 140 },
- { month: "Apr", desktop: 260, mobile: 170 },
- { month: "May", desktop: 300, mobile: 210 },
- { month: "Jun", desktop: 320, mobile: 220 },
- { month: "Jul", desktop: 310, mobile: 205 },
- { month: "Aug", desktop: 340, mobile: 230 },
- { month: "Sep", desktop: 360, mobile: 245 },
- { month: "Oct", desktop: 390, mobile: 265 },
-];
-
-function DefaultLineChartPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <LineChart data={lineData} categoryKey="month" />
- </div>
- </ClientOnly>
- );
-}
-
-function LineChartCondensedPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <LineChartCondensed data={scrollableLineData} categoryKey="month" />
- </div>
- </ClientOnly>
- );
-}
-
-export default function BlocksLineChartPage() {
- return (
- <PreviewPage>
- <PreviewSection
- title="Line"
- headingLevel="h1"
- description="Preview for the Line chart block."
- >
- <BlockVariantPreview
- title="Scrollable"
- description="Scrollable line chart variant."
- preview={<DefaultLineChartPreview />}
- />
- <BlockVariantPreview
- title="Scrollable"
- description="Condensed line chart variant."
- preview={<LineChartCondensedPreview />}
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/charts/pie/page.tsx b/docs/app/components/blocks/charts/pie/page.tsx
deleted file mode 100644
index 6b511208b..000000000
--- a/docs/app/components/blocks/charts/pie/page.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import ClientOnly from "@components/blocks/_components/ClientOnly";
-import { PieChart } from "@openuidev/react-ui";
-
-const pieData = [
- { category: "January", value: 1250 },
- { category: "February", value: 980 },
- { category: "March", value: 1450 },
- { category: "April", value: 1320 },
- { category: "May", value: 1680 },
- { category: "June", value: 2100 },
-];
-
-function PieChartPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "720px" }}>
- <PieChart
- data={pieData}
- categoryKey="category"
- dataKey="value"
- variant="pie"
- format="percentage"
- legend
- legendVariant="stacked"
- minChartSize={296}
- maxChartSize={296}
- customPalette={["#1f7ecc", "#2a8fdf", "#3f9ae6", "#5ca9ed", "#7cbbee", "#9ecdf2"]}
- />
- </div>
- </ClientOnly>
- );
-}
-
-export default function BlocksPieChartPage() {
- return (
- <BlocksDocPage
- title="Pie"
- description="Preview for the Pie chart block."
- preview={<PieChartPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/charts/radial/page.tsx b/docs/app/components/blocks/charts/radial/page.tsx
deleted file mode 100644
index 6bcf6989b..000000000
--- a/docs/app/components/blocks/charts/radial/page.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import ClientOnly from "@components/blocks/_components/ClientOnly";
-import { RadialChart } from "@openuidev/react-ui";
-
-const radialData = [
- { month: "January", value: 1250 },
- { month: "February", value: 980 },
- { month: "March", value: 1450 },
- { month: "April", value: 1320 },
-];
-
-function RadialChartPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <RadialChart data={radialData} categoryKey="month" dataKey="value" variant="circular" />
- </div>
- </ClientOnly>
- );
-}
-
-export default function BlocksRadialChartPage() {
- return (
- <BlocksDocPage
- title="Radial chart"
- description="Preview for the Radial chart block."
- preview={<RadialChartPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/charts/scatter/page.tsx b/docs/app/components/blocks/charts/scatter/page.tsx
deleted file mode 100644
index d8abd6c5b..000000000
--- a/docs/app/components/blocks/charts/scatter/page.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import ClientOnly from "@components/blocks/_components/ClientOnly";
-import { ScatterChart } from "@openuidev/react-ui";
-
-const scatterData = [
- {
- name: "A school",
- data: [
- { x: 100, y: 200, z: 200 },
- { x: 120, y: 100, z: 260 },
- { x: 170, y: 300, z: 400 },
- ],
- },
- {
- name: "B school",
- data: [
- { x: 200, y: 180, z: 240 },
- { x: 180, y: 350, z: 220 },
- { x: 160, y: 320, z: 250 },
- ],
- },
-];
-
-function ScatterChartPreview() {
- return (
- <ClientOnly>
- <div style={{ width: "600px" }}>
- <ScatterChart data={scatterData} xAxisDataKey="x" yAxisDataKey="y" />
- </div>
- </ClientOnly>
- );
-}
-
-export default function BlocksScatterChartPage() {
- return (
- <BlocksDocPage
- title="Scatter"
- description="Preview for the Scatter chart block."
- preview={<ScatterChartPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/checkbox-group/page.tsx b/docs/app/components/blocks/checkbox-group/page.tsx
deleted file mode 100644
index ee9b71871..000000000
--- a/docs/app/components/blocks/checkbox-group/page.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import { CheckBoxGroup, CheckBoxItem } from "@openuidev/react-ui";
-
-function CheckboxGroupPreview() {
- return (
- <CheckBoxGroup variant="card">
- <CheckBoxItem
- value="email"
- label="Email notifications"
- description="Receive updates by email"
- />
- <CheckBoxItem value="slack" label="Slack alerts" description="Receive updates in Slack" />
- <CheckBoxItem value="sms" label="SMS alerts" description="Receive urgent updates by SMS" />
- </CheckBoxGroup>
- );
-}
-
-export default function BlocksCheckboxGroupPage() {
- return (
- <BlocksDocPage
- title="Checkbox group"
- description="Preview for the Checkbox group block."
- preview={<CheckboxGroupPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/chips-group/page.module.css b/docs/app/components/blocks/chips-group/page.module.css
deleted file mode 100644
index d141b6af2..000000000
--- a/docs/app/components/blocks/chips-group/page.module.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.previewWrapper {
- width: 760px;
- max-width: 100%;
- margin: 0 auto;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
diff --git a/docs/app/components/blocks/curated-cards/1/page.module.css b/docs/app/components/blocks/curated-cards/1/page.module.css
deleted file mode 100644
index 4253943f0..000000000
--- a/docs/app/components/blocks/curated-cards/1/page.module.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.previewWrapper {
- width: 100%;
- max-width: 800px;
- display: flex;
- justify-content: center;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.selectWrapper {
- width: 100%;
-}
diff --git a/docs/app/components/blocks/curated-cards/2/page.module.css b/docs/app/components/blocks/curated-cards/2/page.module.css
deleted file mode 100644
index 4253943f0..000000000
--- a/docs/app/components/blocks/curated-cards/2/page.module.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.previewWrapper {
- width: 100%;
- max-width: 800px;
- display: flex;
- justify-content: center;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.selectWrapper {
- width: 100%;
-}
diff --git a/docs/app/components/blocks/curated-cards/3/page.module.css b/docs/app/components/blocks/curated-cards/3/page.module.css
deleted file mode 100644
index 4253943f0..000000000
--- a/docs/app/components/blocks/curated-cards/3/page.module.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.previewWrapper {
- width: 100%;
- max-width: 800px;
- display: flex;
- justify-content: center;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.selectWrapper {
- width: 100%;
-}
diff --git a/docs/app/components/blocks/curated-cards/4/page.module.css b/docs/app/components/blocks/curated-cards/4/page.module.css
deleted file mode 100644
index 4253943f0..000000000
--- a/docs/app/components/blocks/curated-cards/4/page.module.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.previewWrapper {
- width: 100%;
- max-width: 800px;
- display: flex;
- justify-content: center;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.selectWrapper {
- width: 100%;
-}
diff --git a/docs/app/components/blocks/curated-cards/5/page.module.css b/docs/app/components/blocks/curated-cards/5/page.module.css
deleted file mode 100644
index 4253943f0..000000000
--- a/docs/app/components/blocks/curated-cards/5/page.module.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.previewWrapper {
- width: 100%;
- max-width: 800px;
- display: flex;
- justify-content: center;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.selectWrapper {
- width: 100%;
-}
diff --git a/docs/app/components/blocks/date-picker/page.tsx b/docs/app/components/blocks/date-picker/page.tsx
deleted file mode 100644
index 61f749a56..000000000
--- a/docs/app/components/blocks/date-picker/page.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import { DatePicker } from "@openuidev/react-ui";
-
-function DatePickerPreview() {
- return <DatePicker mode="single" style={{ width: "360px" }} />;
-}
-
-export default function BlocksDatePickerPage() {
- return (
- <BlocksDocPage
- title="Date picker"
- description="Preview for the Date picker block."
- preview={<DatePickerPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/free-card/page.module.css b/docs/app/components/blocks/free-card/page.module.css
deleted file mode 100644
index 331b072e4..000000000
--- a/docs/app/components/blocks/free-card/page.module.css
+++ /dev/null
@@ -1,90 +0,0 @@
-.previewWrapper {
- width: 900px;
- max-width: 100%;
- margin: 0 auto;
-}
-
-.cardHeader {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-md-emphasis);
-}
-
-.cardBody {
- margin: 0;
- color: var(--openui-text-neutral-secondary);
- font: var(--openui-text-body-sm);
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.selectTrigger {
- width: 100%;
-}
-
-.bodyComposerRow {
- display: flex;
- align-items: center;
- gap: var(--openui-space-s);
-}
-
-.bodyComposerSelect {
- flex: 1;
-}
-
-.bodyElementsList {
- display: flex;
- flex-wrap: wrap;
- gap: var(--openui-space-2xs);
-}
-
-.bodyElementChip {
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-full);
- background: var(--openui-highlight-subtle);
- color: var(--openui-text-neutral-primary);
- padding: var(--openui-space-2xs) var(--openui-space-xs);
- font: var(--openui-text-label-sm);
- cursor: pointer;
-}
-
-.bodyElementChip:hover {
- background: var(--openui-highlight);
- border-color: var(--openui-border-interactive);
-}
-
-.helperText {
- margin: 0;
- color: var(--openui-text-neutral-secondary);
- font: var(--openui-text-label-sm);
-}
-
-.headerImage {
- width: 100%;
- height: 160px;
- object-fit: cover;
- border-radius: var(--openui-radius-xl);
-}
-
-.bodyImage {
- width: 100%;
- height: 140px;
- object-fit: cover;
- border-radius: var(--openui-radius-l);
-}
diff --git a/docs/app/components/blocks/image-items/page.module.css b/docs/app/components/blocks/image-items/page.module.css
deleted file mode 100644
index e4c14a5ac..000000000
--- a/docs/app/components/blocks/image-items/page.module.css
+++ /dev/null
@@ -1,33 +0,0 @@
-.previewWrapper {
- width: 900px;
- max-width: 100%;
- margin: 0 auto;
-}
-
-.desktopFrame {
- max-width: 640px;
- margin: 0 auto;
-}
-
-.mobileFrame {
- max-width: 320px;
- margin: 0 auto;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
diff --git a/docs/app/components/blocks/image-items/page.tsx b/docs/app/components/blocks/image-items/page.tsx
deleted file mode 100644
index 88f86f559..000000000
--- a/docs/app/components/blocks/image-items/page.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-"use client";
-
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import { ImageBlock } from "@openuidev/react-ui";
-import styles from "./page.module.css";
-
-const DEFAULT_IMAGE =
- "https://images.unsplash.com/photo-1738168246881-40f35f8aba0a?w=900&auto=format&fit=crop&q=60";
-
-function DefaultImageBlockPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.desktopFrame}>
- <ImageBlock src={DEFAULT_IMAGE} alt="Landscape preview" />
- </div>
- </div>
- );
-}
-
-export default function BlocksImageItemsPage() {
- return (
- <PreviewPage>
- <PreviewSection title="Image" headingLevel="h1" description="An image. That's about it.">
- <BlockVariantPreview preview={<DefaultImageBlockPreview />} />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/input-field/page.tsx b/docs/app/components/blocks/input-field/page.tsx
deleted file mode 100644
index 81c789160..000000000
--- a/docs/app/components/blocks/input-field/page.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import { Input } from "@openuidev/react-ui";
-
-function InputFieldPreview() {
- return <Input size="medium" placeholder="Enter text..." />;
-}
-
-export default function BlocksInputFieldPage() {
- return (
- <BlocksDocPage
- title="Input field"
- description="Preview for the Input field block."
- preview={<InputFieldPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/layout.module.css b/docs/app/components/blocks/layout.module.css
deleted file mode 100644
index aef2d9471..000000000
--- a/docs/app/components/blocks/layout.module.css
+++ /dev/null
@@ -1,15 +0,0 @@
-.blocksLayout {
- position: relative;
- padding: 0 var(--openui-space-xl);
-}
-
-.blocksContent {
- min-width: 0;
- margin-left: 264px;
-}
-
-@media (max-width: 1050px) {
- .blocksContent {
- margin-left: 0;
- }
-}
diff --git a/docs/app/components/blocks/layout.tsx b/docs/app/components/blocks/layout.tsx
deleted file mode 100644
index 830e978d8..000000000
--- a/docs/app/components/blocks/layout.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-"use client";
-
-import SideNav from "@components/components/SideNav";
-import { BLOCKS_NAV_ITEMS } from "@components/config/navigation";
-import type { ReactNode } from "react";
-import styles from "./layout.module.css";
-
-interface BlocksLayoutProps {
- children: ReactNode;
-}
-
-export default function BlocksLayout({ children }: BlocksLayoutProps) {
- return (
- <div className={styles.blocksLayout}>
- <SideNav sections={BLOCKS_NAV_ITEMS} />
- <div className={styles.blocksContent}>{children}</div>
- </div>
- );
-}
diff --git a/docs/app/components/blocks/lists/page.module.css b/docs/app/components/blocks/lists/page.module.css
deleted file mode 100644
index 90dfffd48..000000000
--- a/docs/app/components/blocks/lists/page.module.css
+++ /dev/null
@@ -1,29 +0,0 @@
-.previewWrapper {
- width: 100%;
- display: flex;
- justify-content: center;
- align-self: center;
-}
-
-.previewInner {
- width: 560px;
- max-width: 100%;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
diff --git a/docs/app/components/blocks/lists/page.tsx b/docs/app/components/blocks/lists/page.tsx
deleted file mode 100644
index 8e07c26ce..000000000
--- a/docs/app/components/blocks/lists/page.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-"use client";
-
-import {
- BlockVariantPreview,
- PreviewPage,
- PreviewSection,
- SegmentedToggle,
-} from "@components/components/preview";
-import { ListBlock, ListItem } from "@openuidev/react-ui";
-import { ChevronRight, FileText, Globe, LayoutPanelTop } from "lucide-react";
-import { useMemo, useState } from "react";
-import styles from "./page.module.css";
-
-type ListVariant = "number" | "icon" | "image";
-type ListInteractionMode = "static" | "clickable";
-
-function ListsPreview({
- variant,
- showDescription,
- interactionMode,
-}: {
- variant: ListVariant;
- showDescription: boolean;
- interactionMode: ListInteractionMode;
-}) {
- const descriptionFor = (text: string) => (showDescription ? text : undefined);
-
- const commonActionProps = useMemo(() => {
- if (interactionMode === "static") {
- return {};
- }
- return {
- actionIcon: <ChevronRight size={16} />,
- onClick: () => undefined,
- };
- }, [interactionMode]);
-
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.previewInner}>
- <ListBlock variant={variant}>
- <ListItem
- variant={variant}
- index={0}
- listHasSubtitle={showDescription}
- icon={variant === "icon" ? <FileText size={16} /> : undefined}
- image={variant === "image" ? { src: "/file.svg", alt: "File" } : undefined}
- title="Connect your data"
- subtitle={descriptionFor("Link your database or upload a CSV to get started.")}
- {...commonActionProps}
- />
- <ListItem
- variant={variant}
- index={1}
- listHasSubtitle={showDescription}
- icon={variant === "icon" ? <Globe size={16} /> : undefined}
- image={variant === "image" ? { src: "/globe.svg", alt: "Globe" } : undefined}
- title="Choose a goal"
- subtitle={descriptionFor("Summarize, classify, extract, or generate UI from prompts.")}
- {...commonActionProps}
- />
- <ListItem
- variant={variant}
- index={2}
- listHasSubtitle={showDescription}
- icon={variant === "icon" ? <LayoutPanelTop size={16} /> : undefined}
- image={variant === "image" ? { src: "/window.svg", alt: "Window" } : undefined}
- title="Review and refine"
- subtitle={descriptionFor("Edit the result and rerun with tighter instructions.")}
- {...commonActionProps}
- />
- </ListBlock>
- </div>
- </div>
- );
-}
-
-export default function BlocksListsPage() {
- const [variant, setVariant] = useState<ListVariant>("number");
- const [description, setDescription] = useState<"show" | "hide">("show");
- const [interactionMode, setInteractionMode] = useState<ListInteractionMode>("static");
-
- const showDescription = description === "show";
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Lists"
- headingLevel="h1"
- description="Presents ordered or structured items in a vertical, easy-to-scan format. Great for steps, tasks, or grouped information."
- >
- <BlockVariantPreview
- preview={<ListsPreview variant="number" showDescription interactionMode="static" />}
- prompt="Use numbered list with description to display ordered items when <enter use case>."
- />
-
- <BlockVariantPreview
- title="Configurations"
- description="Toggle list variant, description, and interaction."
- preview={
- <ListsPreview
- variant={variant}
- showDescription={showDescription}
- interactionMode={interactionMode}
- />
- }
- prompt={`Use ${variant} list${showDescription ? " with description" : ""}${interactionMode === "clickable" ? " and clickable items" : ""} to display structured items when <enter use case>.`}
- rightControls={
- <div className={styles.controlsPanel}>
- <div className={styles.controlSection}>
- <p className={styles.sectionTitle}>Variant</p>
- <SegmentedToggle
- ariaLabel="Toggle list indicator variant"
- value={variant}
- onChange={(value) => setVariant(value as ListVariant)}
- options={[
- { label: "Number", value: "number" },
- { label: "Icon", value: "icon" },
- { label: "Image", value: "image" },
- ]}
- />
- </div>
-
- <div className={styles.controlSection}>
- <p className={styles.sectionTitle}>Description</p>
- <SegmentedToggle
- ariaLabel="Toggle description visibility"
- value={description}
- onChange={(value) => setDescription(value as "show" | "hide")}
- options={[
- { label: "Show", value: "show" },
- { label: "Hide", value: "hide" },
- ]}
- />
- </div>
-
- <div className={styles.controlSection}>
- <p className={styles.sectionTitle}>Interaction</p>
- <SegmentedToggle
- ariaLabel="Toggle list interaction mode"
- value={interactionMode}
- onChange={(value) => setInteractionMode(value as ListInteractionMode)}
- options={[
- { label: "Static", value: "static" },
- { label: "Clickable", value: "clickable" },
- ]}
- />
- </div>
- </div>
- }
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/page.module.css b/docs/app/components/blocks/page.module.css
deleted file mode 100644
index 69a0ca1c6..000000000
--- a/docs/app/components/blocks/page.module.css
+++ /dev/null
@@ -1,15 +0,0 @@
-.body {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-m);
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
-}
-
-.body ul {
- margin: 0;
- padding-left: var(--openui-space-xl);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xs);
-}
diff --git a/docs/app/components/blocks/page.tsx b/docs/app/components/blocks/page.tsx
deleted file mode 100644
index 62e2048b9..000000000
--- a/docs/app/components/blocks/page.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import styles from "./page.module.css";
-
-export default function BlocksPage() {
- return (
- <PreviewPage>
- <PreviewSection title="Introduction" headingLevel="h1">
- <div className={styles.body}>
- <p>
- Blocks are the core building units of OpenUI. Think of them like LEGO pieces for
- generative interfaces: small, self-contained UI primitives that can be combined to
- create rich, structured experiences.
- </p>
- <p>
- Each block is designed to represent a specific pattern of structured data, such as
- attribute lists, callouts, tabs, tables, and more. These blocks are purpose-made
- generative UI - so they are optimized for flexibility and composability. Whether
- you&rsquo;re displaying &ldquo;Things to do in Paris&rdquo; or a complex data-rich
- interface, blocks provide a consistent, scalable foundation that keeps generated UI
- clean, predictable, and easy to evolve.
- </p>
- </div>
- <BlockVariantPreview hidePrompt />
- </PreviewSection>
-
- <PreviewSection title="How to compose">
- <div className={styles.body}>
- <p>Composition is how individual blocks come together to form complete interfaces.</p>
- <p>
- AI is responsible for assembling blocks based on its understanding of the content and
- context. Given structured data and intent, the model selects the blocks that best fit
- the information hierarchy and user experience. This allows interfaces to be generated
- dynamically while still maintaining strong visual and structural consistency.
- </p>
- <p>However, this behavior is not a black box, you remain in control.</p>
- <p>You can guide composition through system prompts and usage rules, for example:</p>
- <ul>
- <li>defining when a particular block should be preferred</li>
- <li>specifying which block to use for specific contexts</li>
- <li>discouraging blocks in specific contexts</li>
- </ul>
- </div>
- <BlockVariantPreview hidePrompt />
- </PreviewSection>
-
- <PreviewSection title="Understanding configurations">
- <div className={styles.body}>
- <p>
- Many OpenUI blocks expose configurations that control their children elements and
- appearance. These configuration surfaces allow a single block to support multiple
- variations without requiring separate components.
- </p>
- <p>
- By default, the system intelligently selects the configuration that best fits the
- generated context. This keeps outputs adaptive and reduces the need for manual tuning in
- most cases.
- </p>
- <p>
- When more control is needed, you can explicitly steer configuration selection through
- your system prompts. This approach preserves the flexibility of generative UI while
- giving you precise control where consistency or requirements demand it.
- </p>
- </div>
- <BlockVariantPreview hidePrompt />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/radio-button-group/page.tsx b/docs/app/components/blocks/radio-button-group/page.tsx
deleted file mode 100644
index 3b0010613..000000000
--- a/docs/app/components/blocks/radio-button-group/page.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import { RadioGroup, RadioItem } from "@openuidev/react-ui";
-
-function RadioButtonGroupPreview() {
- return (
- <RadioGroup variant="card">
- <RadioItem value="starter" label="Starter" description="For personal use" />
- <RadioItem value="pro" label="Pro" description="For growing teams" />
- <RadioItem value="enterprise" label="Enterprise" description="For large organizations" />
- </RadioGroup>
- );
-}
-
-export default function BlocksRadioButtonGroupPage() {
- return (
- <BlocksDocPage
- title="Radio button group"
- description="Preview for the Radio button group block."
- preview={<RadioButtonGroupPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/section/page.module.css b/docs/app/components/blocks/section/page.module.css
deleted file mode 100644
index b5722e421..000000000
--- a/docs/app/components/blocks/section/page.module.css
+++ /dev/null
@@ -1,41 +0,0 @@
-.previewWrapper {
- width: 560px;
- max-width: 100%;
- margin: 0 auto;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.sectionTrigger {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.sectionTriggerTitle {
- margin: 0;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-md-emphasis);
-}
-
-.sectionTriggerDescription {
- margin: 0;
- color: var(--openui-text-neutral-secondary);
- font: var(--openui-text-body-sm);
-}
diff --git a/docs/app/components/blocks/select/page.tsx b/docs/app/components/blocks/select/page.tsx
deleted file mode 100644
index cde712be4..000000000
--- a/docs/app/components/blocks/select/page.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import {
- Select,
- SelectContent,
- SelectGroup,
- SelectItem,
- SelectLabel,
- SelectSeparator,
- SelectTrigger,
- SelectValue,
-} from "@openuidev/react-ui";
-
-function SelectPreview() {
- return (
- <div style={{ width: "240px" }}>
- <Select>
- <SelectTrigger size="md">
- <SelectValue placeholder="Select an option" />
- </SelectTrigger>
- <SelectContent>
- <SelectGroup>
- <SelectLabel>Fruits</SelectLabel>
- <SelectItem value="apple">Apple</SelectItem>
- <SelectItem value="banana">Banana</SelectItem>
- <SelectItem value="grapes">Grapes</SelectItem>
- <SelectSeparator />
- <SelectLabel>Fast Food</SelectLabel>
- <SelectItem value="burger">Burger</SelectItem>
- <SelectItem value="pizza">Pizza</SelectItem>
- </SelectGroup>
- </SelectContent>
- </Select>
- </div>
- );
-}
-
-export default function BlocksSelectPage() {
- return (
- <BlocksDocPage
- title="Select"
- description="Preview for the Select block."
- preview={<SelectPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/tables/page.tsx b/docs/app/components/blocks/tables/page.tsx
deleted file mode 100644
index 5f97aa359..000000000
--- a/docs/app/components/blocks/tables/page.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-"use client";
-
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import {
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
- Tag,
-} from "@openuidev/react-ui";
-
-function TablePreview() {
- return (
- <Table containerStyle={{ width: 680 }}>
- <TableHeader>
- <TableRow>
- <TableHead>Invoice</TableHead>
- <TableHead>Status</TableHead>
- <TableHead>Method</TableHead>
- <TableHead>Tags</TableHead>
- <TableHead align="right">Amount</TableHead>
- </TableRow>
- </TableHeader>
- <TableBody>
- <TableRow>
- <TableCell>INV001</TableCell>
- <TableCell>Paid</TableCell>
- <TableCell>Credit Card</TableCell>
- <TableCell>
- <Tag text="Priority" size="sm" variant="info" styles={{ width: "fit-content" }} />
- </TableCell>
- <TableCell align="right">$250.00</TableCell>
- </TableRow>
- <TableRow>
- <TableCell>INV002</TableCell>
- <TableCell>Pending</TableCell>
- <TableCell>PayPal</TableCell>
- <TableCell>
- <Tag text="Follow up" size="sm" variant="warning" styles={{ width: "fit-content" }} />
- </TableCell>
- <TableCell align="right">$150.00</TableCell>
- </TableRow>
- <TableRow>
- <TableCell>INV003</TableCell>
- <TableCell>Unpaid</TableCell>
- <TableCell>Bank Transfer</TableCell>
- <TableCell>
- <Tag text="Overdue" size="sm" variant="danger" styles={{ width: "fit-content" }} />
- </TableCell>
- <TableCell align="right">$350.00</TableCell>
- </TableRow>
- <TableRow>
- <TableCell>INV004</TableCell>
- <TableCell>Paid</TableCell>
- <TableCell>Apple Pay</TableCell>
- <TableCell>
- <Tag text="Recurring" size="sm" variant="success" styles={{ width: "fit-content" }} />
- </TableCell>
- <TableCell align="right">$89.99</TableCell>
- </TableRow>
- </TableBody>
- </Table>
- );
-}
-
-export default function BlocksTablesPage() {
- return (
- <PreviewPage>
- <PreviewSection
- title="Tables"
- headingLevel="h1"
- description="Structured data in rows and columns."
- >
- <BlockVariantPreview
- title="Basic"
- description="A basic table with header and body rows."
- preview={<TablePreview />}
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/tabs/page.module.css b/docs/app/components/blocks/tabs/page.module.css
deleted file mode 100644
index b9aad1d4b..000000000
--- a/docs/app/components/blocks/tabs/page.module.css
+++ /dev/null
@@ -1,19 +0,0 @@
-.previewWrapper {
- width: 100%;
- min-height: 280px;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.controlsPanel {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.controlSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
diff --git a/docs/app/components/blocks/tabs/page.tsx b/docs/app/components/blocks/tabs/page.tsx
deleted file mode 100644
index d4f3fcf0f..000000000
--- a/docs/app/components/blocks/tabs/page.tsx
+++ /dev/null
@@ -1,157 +0,0 @@
-"use client";
-
-import {
- BlockVariantPreview,
- PreviewPage,
- PreviewSection,
- SegmentedToggle,
-} from "@components/components/preview";
-import { Tabs, TabsList, TabsTrigger } from "@openuidev/react-ui";
-import { useState } from "react";
-import styles from "./page.module.css";
-
-type TabsVariant = "title" | "iconTitle" | "iconTitleSubtext" | "imageTitle" | "imageTitleSubtext";
-type MediaMode = "none" | "icon" | "image";
-type SubtextMode = "no" | "yes";
-function resolveVariant(media: MediaMode, subtext: SubtextMode): TabsVariant {
- if (media === "icon") return subtext === "yes" ? "iconTitleSubtext" : "iconTitle";
- if (media === "image") return subtext === "yes" ? "imageTitleSubtext" : "imageTitle";
- return "title";
-}
-
-function promptDescription(media: MediaMode, subtext: SubtextMode): string {
- if (media === "none" && subtext === "no") return "";
- const parts: string[] = [];
- if (media !== "none") parts.push(media);
- if (subtext === "yes") parts.push("subtext");
- return ` with ${parts.join(" and ")}`;
-}
-
-const CITIES = [
- { value: "paris", label: "Paris", subtext: "France" },
- { value: "tokyo", label: "Tokyo", subtext: "Japan" },
- { value: "new-york", label: "New York", subtext: "USA" },
-];
-
-const CITY_ICONS: Record<string, string> = {
- paris: "✈️",
- tokyo: "🚢",
- "new-york": "🚌",
-};
-
-const CITY_IMAGES: Record<string, string> = {
- paris: "https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=64",
- tokyo: "https://images.unsplash.com/photo-1536098561742-ca998e48cbcc?w=64",
- "new-york": "https://images.unsplash.com/photo-1496442226666-8d4d0e62e6e9?w=64",
-};
-
-function TabsPreview({ variant }: { variant: TabsVariant }) {
- const showIcon = variant === "iconTitle" || variant === "iconTitleSubtext";
- const showImage = variant === "imageTitle" || variant === "imageTitleSubtext";
- const showSubtext = variant === "iconTitleSubtext" || variant === "imageTitleSubtext";
-
- return (
- <div className={styles.previewWrapper}>
- <Tabs defaultValue="paris">
- <TabsList variant={variant}>
- {CITIES.map((city) => (
- <TabsTrigger
- key={city.value}
- value={city.value}
- text={city.label}
- {...(showIcon ? { icon: <span>{CITY_ICONS[city.value]}</span> } : {})}
- {...(showImage ? { image: CITY_IMAGES[city.value] } : {})}
- {...(showSubtext ? { subtext: city.subtext } : {})}
- />
- ))}
- </TabsList>
- </Tabs>
- </div>
- );
-}
-
-function ConfigurableTabsPreview({ media, subtext }: { media: MediaMode; subtext: SubtextMode }) {
- const variant = resolveVariant(media, subtext);
-
- return <TabsPreview variant={variant} />;
-}
-
-function TabsControls({
- media,
- subtext,
- onMediaChange,
- onSubtextChange,
-}: {
- media: MediaMode;
- subtext: SubtextMode;
- onMediaChange: (next: MediaMode) => void;
- onSubtextChange: (next: SubtextMode) => void;
-}) {
- return (
- <div className={styles.controlsPanel}>
- <div className={styles.controlSection}>
- <SegmentedToggle
- ariaLabel="Media type"
- value={media}
- onChange={onMediaChange}
- options={[
- { label: "None", value: "none" as MediaMode },
- { label: "Icon", value: "icon" as MediaMode },
- { label: "Image", value: "image" as MediaMode },
- ]}
- />
- </div>
- <div className={styles.controlSection}>
- <SegmentedToggle
- ariaLabel="Subtext"
- value={subtext}
- onChange={onSubtextChange}
- options={[
- { label: "No subtext", value: "no" as SubtextMode },
- { label: "Subtext", value: "yes" as SubtextMode },
- ]}
- />
- </div>
- </div>
- );
-}
-
-export default function BlocksTabsPage() {
- const [media, setMedia] = useState<MediaMode>("none");
- const [subtext, setSubtext] = useState<SubtextMode>("no");
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Tabs"
- headingLevel="h1"
- description="A row of labeled tabs that lets users switch between related content views, helping organize information within the same space and reduce clutter."
- >
- <BlockVariantPreview
- title="Default"
- description="Basic text-only tabs for simple section switching."
- preview={<TabsPreview variant="title" />}
- prompt="Use Default variant of tabs to group related content when <enter use case>."
- />
- <BlockVariantPreview
- title="Configurations"
- description="Explore different tab variants."
- preview={<ConfigurableTabsPreview media={media} subtext={subtext} />}
- rightControls={
- <TabsControls
- media={media}
- subtext={subtext}
- onMediaChange={setMedia}
- onSubtextChange={setSubtext}
- />
- }
- prompt={
- media === "none" && subtext === "no"
- ? "Use default variant of tabs to group related content when <enter use case>."
- : `Use tabs${promptDescription(media, subtext)} to group related content when <enter use case>.`
- }
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/tag-item/page.tsx b/docs/app/components/blocks/tag-item/page.tsx
deleted file mode 100644
index 0f20ed377..000000000
--- a/docs/app/components/blocks/tag-item/page.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import { Tag } from "@openuidev/react-ui";
-
-function TagItemPreview() {
- const tags = [
- { text: "Design", variant: "info" as const },
- { text: "Docs", variant: "neutral" as const },
- { text: "Released", variant: "success" as const },
- ];
-
- return (
- <div style={{ display: "flex", gap: "8px", flexWrap: "wrap" }}>
- {tags.map((tag) => (
- <Tag key={tag.text} text={tag.text} variant={tag.variant} />
- ))}
- </div>
- );
-}
-
-export default function BlocksTagItemPage() {
- return (
- <BlocksDocPage
- title="Tag item"
- description="Displays compact status, category labels or key attributes."
- preview={<TagItemPreview />}
- />
- );
-}
diff --git a/docs/app/components/blocks/text-items/page.module.css b/docs/app/components/blocks/text-items/page.module.css
deleted file mode 100644
index 005a32f02..000000000
--- a/docs/app/components/blocks/text-items/page.module.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.previewWrapper {
- width: 100%;
- display: flex;
- justify-content: center;
-}
-
-.sizesGrid {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
- width: 400px;
- min-width: 400px;
-}
diff --git a/docs/app/components/blocks/text-items/page.tsx b/docs/app/components/blocks/text-items/page.tsx
deleted file mode 100644
index 89b39ffe9..000000000
--- a/docs/app/components/blocks/text-items/page.tsx
+++ /dev/null
@@ -1,403 +0,0 @@
-"use client";
-
-import { BlockVariantPreview, PreviewPage, PreviewSection } from "@components/components/preview";
-import styles from "./page.module.css";
-
-const TextBlock = (_props: any) => {
- return "";
-};
-
-function TitleTextPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock
- variant="title-text"
- primary="Title Text"
- secondary="Supporting description"
- type="text"
- size="xs"
- align="left"
- />
- <TextBlock
- variant="title-text"
- primary="Title Text"
- secondary="Supporting description"
- type="text"
- size="sm"
- align="left"
- />
- <TextBlock
- variant="title-text"
- primary="Title Text"
- secondary="Supporting description"
- type="text"
- size="md"
- align="left"
- />
- <TextBlock
- variant="title-text"
- primary="Title Text"
- secondary="Supporting description"
- type="text"
- size="lg"
- align="left"
- />
- </div>
- </div>
- );
-}
-
-function NumberTitleTextPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock
- variant="number-title-text"
- primary="$156,800"
- secondary="Total Revenue"
- tertiary="Updated 2h ago"
- type="number"
- size="xs"
- align="left"
- />
- <TextBlock
- variant="number-title-text"
- primary="$156,800"
- secondary="Total Revenue"
- tertiary="Updated 2h ago"
- type="number"
- size="sm"
- align="left"
- />
- <TextBlock
- variant="number-title-text"
- primary="$156,800"
- secondary="Total Revenue"
- tertiary="Updated 2h ago"
- type="number"
- size="md"
- align="left"
- />
- <TextBlock
- variant="number-title-text"
- primary="$156,800"
- secondary="Total Revenue"
- tertiary="Updated 2h ago"
- type="number"
- size="lg"
- align="left"
- />
- </div>
- </div>
- );
-}
-
-function TextSubtextPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock
- variant="text-subtext"
- primary="Active Users"
- secondary="Currently online"
- type="text"
- size="xs"
- align="left"
- />
- <TextBlock
- variant="text-subtext"
- primary="Active Users"
- secondary="Currently online"
- type="text"
- size="sm"
- align="left"
- />
- <TextBlock
- variant="text-subtext"
- primary="Active Users"
- secondary="Currently online"
- type="text"
- size="md"
- align="left"
- />
- <TextBlock
- variant="text-subtext"
- primary="Active Users"
- secondary="Currently online"
- type="text"
- size="lg"
- align="left"
- />
- </div>
- </div>
- );
-}
-
-function HighlightTextNumberSubtextPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$9,250"
- secondary="+18.5%"
- type="number"
- size="xs"
- align="left"
- secondaryTone="positive"
- />
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$9,250"
- secondary="+18.5%"
- type="number"
- size="sm"
- align="left"
- secondaryTone="positive"
- />
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$9,250"
- secondary="+18.5%"
- type="number"
- size="md"
- align="left"
- secondaryTone="positive"
- />
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$9,250"
- secondary="+18.5%"
- type="number"
- size="lg"
- align="left"
- secondaryTone="positive"
- />
- </div>
- </div>
- );
-}
-
-function HighlightTextNumberSubtextNegativePreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$4,120"
- secondary="-7.2%"
- type="number"
- size="xs"
- align="left"
- secondaryTone="negative"
- />
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$4,120"
- secondary="-7.2%"
- type="number"
- size="sm"
- align="left"
- secondaryTone="negative"
- />
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$4,120"
- secondary="-7.2%"
- type="number"
- size="md"
- align="left"
- secondaryTone="negative"
- />
- <TextBlock
- variant="highlight-text-number-subtext"
- primary="$4,120"
- secondary="-7.2%"
- type="number"
- size="lg"
- align="left"
- secondaryTone="negative"
- />
- </div>
- </div>
- );
-}
-
-function TextPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock variant="text" primary="Plain text label" size="xs" align="left" />
- <TextBlock variant="text" primary="Plain text label" size="sm" align="left" />
- <TextBlock variant="text" primary="Plain text label" size="md" align="left" />
- <TextBlock variant="text" primary="Plain text label" size="lg" align="left" />
- </div>
- </div>
- );
-}
-
-function HighlightTextPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock variant="highlight-text" primary="Highlighted label" size="xs" align="left" />
- <TextBlock variant="highlight-text" primary="Highlighted label" size="sm" align="left" />
- <TextBlock variant="highlight-text" primary="Highlighted label" size="md" align="left" />
- <TextBlock variant="highlight-text" primary="Highlighted label" size="lg" align="left" />
- </div>
- </div>
- );
-}
-
-function NumberPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock variant="number" primary="42,847" type="number" size="xs" align="left" />
- <TextBlock variant="number" primary="42,847" type="number" size="sm" align="left" />
- <TextBlock variant="number" primary="42,847" type="number" size="md" align="left" />
- <TextBlock variant="number" primary="42,847" type="number" size="lg" align="left" />
- </div>
- </div>
- );
-}
-
-function HighlightNumberPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock
- variant="highlight-number"
- primary="$9,250"
- type="number"
- size="xs"
- align="left"
- />
- <TextBlock
- variant="highlight-number"
- primary="$9,250"
- type="number"
- size="sm"
- align="left"
- />
- <TextBlock
- variant="highlight-number"
- primary="$9,250"
- type="number"
- size="md"
- align="left"
- />
- <TextBlock
- variant="highlight-number"
- primary="$9,250"
- type="number"
- size="lg"
- align="left"
- />
- </div>
- </div>
- );
-}
-
-function AlignmentPreview() {
- return (
- <div className={styles.previewWrapper}>
- <div className={styles.sizesGrid}>
- <TextBlock
- variant="title-text"
- primary="Left aligned"
- secondary="Description text"
- size="md"
- align="left"
- />
- <TextBlock
- variant="title-text"
- primary="Center aligned"
- secondary="Description text"
- size="md"
- align="center"
- />
- <TextBlock
- variant="title-text"
- primary="Right aligned"
- secondary="Description text"
- size="md"
- align="right"
- />
- </div>
- </div>
- );
-}
-
-export default function BlocksTextItemsPage() {
- return (
- <PreviewPage>
- <PreviewSection
- title="Text Block"
- headingLevel="h1"
- description="Flexible text display component with multiple layout variants, sizes, types, and alignment options. Used inside cards and standalone for titles, metrics, and labels."
- >
- <BlockVariantPreview
- title="Title Text"
- description="Primary heading with secondary subtitle. Sizes: xs, sm, md, lg."
- preview={<TitleTextPreview />}
- />
-
- <BlockVariantPreview
- title="Number Title Text"
- description="Large number with title and tertiary line. Sizes: xs, sm, md, lg."
- preview={<NumberTitleTextPreview />}
- />
-
- <BlockVariantPreview
- title="Text Subtext"
- description="Compact primary text with smaller subtext. Sizes: xs, sm, md, lg."
- preview={<TextSubtextPreview />}
- />
-
- <BlockVariantPreview
- title="Highlight + Number Subtext (Positive)"
- description="Bold value with positive metric subtext. Sizes: xs, sm, md, lg."
- preview={<HighlightTextNumberSubtextPreview />}
- />
-
- <BlockVariantPreview
- title="Highlight + Number Subtext (Negative)"
- description="Bold value with negative metric subtext. Sizes: xs, sm, md, lg."
- preview={<HighlightTextNumberSubtextNegativePreview />}
- />
-
- <BlockVariantPreview
- title="Text"
- description="Single-line plain text. Sizes: xs, sm, md, lg."
- preview={<TextPreview />}
- />
-
- <BlockVariantPreview
- title="Highlight Text"
- description="Single-line emphasised text. Sizes: xs, sm, md, lg."
- preview={<HighlightTextPreview />}
- />
-
- <BlockVariantPreview
- title="Number"
- description="Single-line number display. Sizes: xs, sm, md, lg."
- preview={<NumberPreview />}
- />
-
- <BlockVariantPreview
- title="Highlight Number"
- description="Single-line emphasised number. Sizes: xs, sm, md, lg."
- preview={<HighlightNumberPreview />}
- />
-
- <BlockVariantPreview
- title="Alignment"
- description="Left, center, and right alignment options."
- preview={<AlignmentPreview />}
- />
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/blocks/toggle-group/page.tsx b/docs/app/components/blocks/toggle-group/page.tsx
deleted file mode 100644
index 2c5de58b6..000000000
--- a/docs/app/components/blocks/toggle-group/page.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-"use client";
-
-import BlocksDocPage from "@components/blocks/_components/BlocksDocPage";
-import { SwitchGroup, SwitchItem } from "@openuidev/react-ui";
-
-function ToggleGroupPreview() {
- return (
- <SwitchGroup variant="card">
- <SwitchItem value="left" label="Left align" description="Align content to the left" />
- <SwitchItem value="center" label="Center align" description="Align content to the center" />
- <SwitchItem value="right" label="Right align" description="Align content to the right" />
- </SwitchGroup>
- );
-}
-
-export default function BlocksToggleGroupPage() {
- return (
- <BlocksDocPage
- title="Toggle group"
- description="Preview for the Toggle group block."
- preview={<ToggleGroupPreview />}
- />
- );
-}
diff --git a/docs/app/components/components/AppThemeProvider/AppThemeProvider.tsx b/docs/app/components/components/AppThemeProvider/AppThemeProvider.tsx
deleted file mode 100644
index 0358dd222..000000000
--- a/docs/app/components/components/AppThemeProvider/AppThemeProvider.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-"use client";
-
-import { fontOverrides, legacyVarCss, swatchVarCss } from "@/shared/theme/openuiThemeBridge";
-import type { ThemeMode } from "@components/types";
-import { ThemeProvider } from "@openuidev/react-ui/ThemeProvider";
-import { useTheme } from "next-themes";
-import { createContext, useContext, useEffect, useMemo, type ReactNode } from "react";
-
-interface AppThemeProviderProps {
- children: ReactNode;
-}
-
-type AppThemeContextValue = {
- mode: ThemeMode;
- setMode: (mode: ThemeMode) => void;
- toggleMode: () => void;
-};
-
-const AppThemeContext = createContext<AppThemeContextValue | null>(null);
-
-export const useAppTheme = (): AppThemeContextValue => {
- const context = useContext(AppThemeContext);
- if (!context) {
- throw new Error("useAppTheme must be used within AppThemeProvider");
- }
- return context;
-};
-
-export default function AppThemeProvider({ children }: AppThemeProviderProps) {
- const { resolvedTheme, setTheme } = useTheme();
- const mode: ThemeMode = resolvedTheme === "dark" ? "dark" : "light";
-
- useEffect(() => {
- document.documentElement.setAttribute("data-theme", mode);
- document.body.setAttribute("data-theme", mode);
- }, [mode]);
-
- const contextValue = useMemo(
- () => ({
- mode,
- setMode: (nextMode: ThemeMode) => setTheme(nextMode),
- toggleMode: () => setTheme(mode === "light" ? "dark" : "light"),
- }),
- [mode, setTheme],
- );
-
- return (
- <AppThemeContext.Provider value={contextValue}>
- <ThemeProvider key={mode} mode={mode} lightTheme={fontOverrides}>
- <style>{`
- body {
- ${legacyVarCss}
- ${swatchVarCss}
- }
- `}</style>
- {children}
- </ThemeProvider>
- </AppThemeContext.Provider>
- );
-}
diff --git a/docs/app/components/components/BottomNav/BottomNav.module.css b/docs/app/components/components/BottomNav/BottomNav.module.css
deleted file mode 100644
index a0ef56c54..000000000
--- a/docs/app/components/components/BottomNav/BottomNav.module.css
+++ /dev/null
@@ -1,64 +0,0 @@
-.bottomNav {
- position: fixed;
- left: 50%;
- bottom: 24px;
- transform: translateX(-50%);
- z-index: 10;
- display: flex;
- gap: var(--openui-space-xs);
- padding: var(--openui-space-xs);
- border-radius: var(--openui-radius-full);
- border: 1px solid var(--openui-border-default);
- background: var(--openui-foreground);
- box-shadow: var(--openui-shadow-xl);
-}
-
-.button {
- border: 1px solid transparent;
- background: transparent;
- color: var(--openui-text-neutral-secondary);
- border-radius: var(--openui-radius-full);
- padding: var(--openui-space-xs) var(--openui-space-s);
- font-size: 13px;
- line-height: 18px;
- cursor: pointer;
- transition:
- background-color var(--motion-duration-fast) var(--motion-ease-standard),
- color var(--motion-duration-fast) var(--motion-ease-standard),
- border-color var(--motion-duration-fast) var(--motion-ease-standard),
- box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
-}
-
-.button:hover {
- background: var(--openui-highlight-subtle);
- color: var(--openui-text-neutral-primary);
-}
-
-.buttonActive {
- background: var(--openui-interactive-accent-default);
- border-color: var(--openui-border-interactive-selected);
- color: var(--openui-text-accent-primary);
- box-shadow: var(--openui-shadow-s);
-}
-
-.buttonActive:hover {
- background: var(--openui-interactive-accent-hover);
- color: var(--openui-text-accent-primary);
-}
-
-.buttonActive:active {
- background: var(--openui-interactive-accent-pressed);
-}
-
-.button:focus-visible {
- outline: 2px solid var(--openui-border-interactive-selected);
- outline-offset: 2px;
-}
-
-@media (max-width: 700px) {
- .bottomNav {
- width: calc(100% - 32px);
- justify-content: space-between;
- bottom: 16px;
- }
-}
diff --git a/docs/app/components/components/BottomNav/BottomNav.tsx b/docs/app/components/components/BottomNav/BottomNav.tsx
deleted file mode 100644
index 0dfb007d2..000000000
--- a/docs/app/components/components/BottomNav/BottomNav.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-interface BottomNavTab {
- id: string;
- label: string;
-}
-
-interface BottomNavProps {
- tabs: BottomNavTab[];
- activeTab: string;
- onTabChange: (tabId: string) => void;
-}
-
-import styles from "./BottomNav.module.css";
-
-export default function BottomNav({ tabs, activeTab, onTabChange }: BottomNavProps) {
- return (
- <nav className={styles.bottomNav} aria-label="Primary navigation">
- {tabs.map((tab) => {
- const isActive = tab.id === activeTab;
- return (
- <button
- key={tab.id}
- type="button"
- className={`${styles.button}${isActive ? ` ${styles.buttonActive}` : ""}`}
- onClick={() => onTabChange(tab.id)}
- aria-current={isActive ? "page" : undefined}
- >
- {tab.label}
- </button>
- );
- })}
- </nav>
- );
-}
diff --git a/docs/app/components/components/BottomNav/index.ts b/docs/app/components/components/BottomNav/index.ts
deleted file mode 100644
index 3d547fccb..000000000
--- a/docs/app/components/components/BottomNav/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./BottomNav";
diff --git a/docs/app/components/components/CodeBlock/CodeBlock.module.css b/docs/app/components/components/CodeBlock/CodeBlock.module.css
deleted file mode 100644
index 1b80ca694..000000000
--- a/docs/app/components/components/CodeBlock/CodeBlock.module.css
+++ /dev/null
@@ -1,24 +0,0 @@
-.codeBlockWrapper {
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-2xl);
- overflow-x: auto;
-}
-
-.codeBlockWrapperDark {
- background: var(--swatch-neutral-950);
-}
-
-.codeBlockWrapperLight {
- background: var(--swatch-white);
-}
-
-.codeBlock {
- margin: 0;
- padding: 20px 24px;
- font: var(--openui-text-code-sm);
- background: transparent !important;
-}
-
-.codeLine {
- white-space: pre;
-}
diff --git a/docs/app/components/components/CodeBlock/CodeBlock.tsx b/docs/app/components/components/CodeBlock/CodeBlock.tsx
deleted file mode 100644
index 5ea7b9c7a..000000000
--- a/docs/app/components/components/CodeBlock/CodeBlock.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import type { ThemeMode } from "@components/types";
-import { Highlight, themes } from "prism-react-renderer";
-import styles from "./CodeBlock.module.css";
-
-interface CodeBlockProps {
- code: string;
- language?: string;
- themeMode?: ThemeMode;
-}
-
-export default function CodeBlock({ code, language = "css", themeMode = "dark" }: CodeBlockProps) {
- const highlightTheme = themeMode === "light" ? themes.github : themes.vsDark;
- const wrapperThemeClass =
- themeMode === "light" ? styles.codeBlockWrapperLight : styles.codeBlockWrapperDark;
-
- return (
- <div className={`${styles.codeBlockWrapper} ${wrapperThemeClass}`} aria-label="Code snippet">
- <Highlight theme={highlightTheme} code={code.trim()} language={language}>
- {({ className, style, tokens, getLineProps, getTokenProps }) => (
- <pre className={`${className} ${styles.codeBlock}`} style={style}>
- <code>
- {tokens.map((line, index) => (
- <div key={index} {...getLineProps({ line })} className={styles.codeLine}>
- {line.map((token, tokenIndex) => (
- <span key={tokenIndex} {...getTokenProps({ token })} />
- ))}
- </div>
- ))}
- </code>
- </pre>
- )}
- </Highlight>
- </div>
- );
-}
diff --git a/docs/app/components/components/CodeBlock/index.ts b/docs/app/components/components/CodeBlock/index.ts
deleted file mode 100644
index 45a9fcacd..000000000
--- a/docs/app/components/components/CodeBlock/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./CodeBlock";
diff --git a/docs/app/components/components/ProAccessBanner/ProAccessBanner.module.css b/docs/app/components/components/ProAccessBanner/ProAccessBanner.module.css
deleted file mode 100644
index 6f07faf9c..000000000
--- a/docs/app/components/components/ProAccessBanner/ProAccessBanner.module.css
+++ /dev/null
@@ -1,59 +0,0 @@
-.banner {
- width: 100%;
- max-width: 800px;
- border-radius: var(--openui-radius-4xl);
- padding: var(--openui-space-m-l) var(--openui-space-l) var(--openui-space-l) var(--openui-space-l);
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- gap: var(--openui-space-l);
- color: var(--openui-text-accent-primary);
- background: var(--openui-inverted-background);
-}
-
-.title {
- margin: 0;
- font: var(--openui-text-body-default);
- color: inherit;
- max-width: 840px;
-}
-
-html[data-theme="light"] .banner {
- color: var(--swatch-white);
-}
-
-html[data-theme="dark"] .banner {
- color: var(--swatch-neutral-900);
-}
-
-.ctaButton {
- box-shadow: none;
-}
-
-html[data-theme="light"] .ctaButton {
- background: var(--swatch-neutral-800);
- color: var(--swatch-white);
- border-color: var(--swatch-white-a24);
-}
-
-html[data-theme="light"] .ctaButton:not(:disabled):hover {
- background: var(--swatch-neutral-700);
-}
-
-html[data-theme="light"] .ctaButton:not(:disabled):active {
- background: var(--swatch-neutral-900);
-}
-
-html[data-theme="dark"] .ctaButton {
- background: var(--swatch-white);
- color: var(--swatch-neutral-900);
- border-color: var(--swatch-black-a16);
-}
-
-html[data-theme="dark"] .ctaButton:not(:disabled):hover {
- background: var(--swatch-neutral-100);
-}
-
-html[data-theme="dark"] .ctaButton:not(:disabled):active {
- background: var(--swatch-neutral-200);
-}
diff --git a/docs/app/components/components/ProAccessBanner/ProAccessBanner.tsx b/docs/app/components/components/ProAccessBanner/ProAccessBanner.tsx
deleted file mode 100644
index 6be64f5cf..000000000
--- a/docs/app/components/components/ProAccessBanner/ProAccessBanner.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-"use client";
-
-import { Button } from "@openuidev/react-ui";
-import styles from "./ProAccessBanner.module.css";
-
-interface ProAccessBannerProps {
- title?: string;
- ctaLabel?: string;
-}
-
-export default function ProAccessBanner({
- title = "Access these beautifully curated components along with a suite of other benefits to power-up your Generative UI stack with Thesys C1.",
- ctaLabel = "Learn more",
-}: ProAccessBannerProps) {
- return (
- <div className={styles.banner}>
- <p className={styles.title}>{title}</p>
- <Button type="button" variant="primary" size="small" className={styles.ctaButton}>
- {ctaLabel}
- </Button>
- </div>
- );
-}
diff --git a/docs/app/components/components/ProAccessBanner/index.ts b/docs/app/components/components/ProAccessBanner/index.ts
deleted file mode 100644
index b59b30c21..000000000
--- a/docs/app/components/components/ProAccessBanner/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./ProAccessBanner";
diff --git a/docs/app/components/components/SideNav/SideNav.module.css b/docs/app/components/components/SideNav/SideNav.module.css
deleted file mode 100644
index 35f28e070..000000000
--- a/docs/app/components/components/SideNav/SideNav.module.css
+++ /dev/null
@@ -1,166 +0,0 @@
-.sidePanel {
- position: fixed;
- left: max(calc((100vw - 1472px) / 2), 0px);
- width: 240px;
- max-height: calc(100vh - 104px);
- overflow-y: auto;
- scrollbar-width: none;
- -ms-overflow-style: none;
- padding-top: 20px;
-}
-
-.sidePanel::-webkit-scrollbar {
- width: 0;
- height: 0;
-}
-
-.title {
- font: var(--openui-text-label-sm);
- padding: 0 var(--openui-space-m);
- color: var(--openui-text-neutral-tertiary);
- margin-bottom: var(--openui-space-s);
- border: 1px solid transparent;
-}
-
-.list {
- list-style: none;
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
- margin: 0;
- padding: 0;
-}
-
-.item {
- margin: 0;
-}
-
-.parentItem {
- position: relative;
-}
-
-.nestedItem {
- margin: 0;
-}
-
-.group {
- margin: 0;
-}
-
-.groupTitle {
- font: var(--openui-text-label-sm);
- color: var(--openui-text-neutral-tertiary);
- padding: 0 var(--openui-space-m);
- margin: 0 0 var(--openui-space-s);
- border: 1px solid transparent;
-}
-
-.groupList {
- list-style: none;
- margin: 0;
- padding: 0;
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
- margin-bottom: var(--openui-space-xl);
-}
-
-.nestedList {
- margin-top: var(--openui-space-2xs);
- margin-bottom: 0;
- padding-left: var(--openui-space-m);
- gap: var(--openui-space-2xs);
- max-height: 0;
- opacity: 0;
- overflow: hidden;
- transform: translateY(calc(var(--openui-space-2xs) * -1));
- pointer-events: none;
- transition:
- max-height 0.4s ease,
- opacity 0.4s ease,
- transform 0.4s ease;
-}
-
-.parentItem:hover > .nestedList {
- max-height: 400px;
- opacity: 1;
- transform: translateY(0);
- pointer-events: auto;
-}
-
-.link {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--openui-space-s);
- width: 100%;
- padding: var(--openui-space-s) var(--openui-space-m);
- border-radius: var(--openui-radius-l);
- border: 1px solid transparent;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
- transition:
- background-color 0.1s ease,
- color 0.1s ease;
-}
-
-.nestedLink {
- font: var(--openui-text-label-sm);
- padding: var(--openui-space-s) var(--openui-space-m);
- border-radius: var(--openui-radius-l);
-}
-
-.linkLabel {
- display: block;
- width: 100%;
- padding: var(--openui-space-s) var(--openui-space-m);
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.linkParent {
- margin-bottom: 0;
-}
-
-.link:hover {
- background: var(--openui-highlight-subtle);
- color: var(--openui-text-neutral-primary);
-}
-
-.linkActive {
- background: var(--openui-highlight);
- color: var(--openui-text-neutral-primary);
-}
-
-.proIcon {
- color: var(--openui-text-neutral-secondary);
- flex-shrink: 0;
-}
-
-.linkMeta {
- display: inline-flex;
- align-items: center;
- gap: var(--openui-space-2xs);
- flex-shrink: 0;
-}
-
-.alertBadge {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- padding: var(--openui-space-3xs) var(--openui-space-xs);
- border-radius: var(--openui-radius-xs);
- background: var(--openui-alert-background);
- color: var(--openui-text-alert-primary);
- font: var(--openui-text-label-xs);
- white-space: nowrap;
-}
-
-@media (max-width: 1050px) {
- .sidePanel {
- position: static;
- width: 100%;
- max-height: none;
- overflow: visible;
- }
-}
diff --git a/docs/app/components/components/SideNav/SideNav.tsx b/docs/app/components/components/SideNav/SideNav.tsx
deleted file mode 100644
index c3024e2af..000000000
--- a/docs/app/components/components/SideNav/SideNav.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-"use client";
-
-import StarIcon from "@components/components/StarIcon";
-import type { NavSection, NestedNavItem } from "@components/types";
-import Link from "next/link";
-import { usePathname } from "next/navigation";
-import styles from "./SideNav.module.css";
-
-interface SideNavProps {
- title?: string;
- sections: NavSection[];
-}
-
-const isActive = (pathname: string, href: string): boolean =>
- pathname === href || pathname.startsWith(`${href}/`);
-
-const isGroupedSection = (
- section: NavSection,
-): section is NavSection & { items: NestedNavItem[] } =>
- Array.isArray((section as NavSection & { items?: NestedNavItem[] }).items);
-
-const hasChildren = (item: NestedNavItem): boolean =>
- Array.isArray(item.items) && item.items.length > 0;
-
-const isItemActive = (pathname: string, item: NestedNavItem): boolean => {
- const selfActive = item.href ? isActive(pathname, item.href) : false;
- if (!hasChildren(item)) {
- return selfActive;
- }
-
- return selfActive || (item.items ?? []).some((child) => isItemActive(pathname, child));
-};
-
-export default function SideNav({ title, sections }: SideNavProps) {
- const pathname = usePathname();
- const navLabel = title ? `${title} navigation` : "Side navigation";
-
- const renderNavItem = (item: NestedNavItem, depth = 0) => {
- const active = isItemActive(pathname, item);
- const nested = hasChildren(item);
-
- return (
- <li
- key={item.id}
- className={`${styles.item}${depth > 0 ? ` ${styles.nestedItem}` : ""}${
- nested ? ` ${styles.parentItem}` : ""
- }`}
- >
- {item.href ? (
- <Link
- href={item.href}
- className={`${styles.link}${depth > 0 ? ` ${styles.nestedLink}` : ""}${
- active ? ` ${styles.linkActive}` : ""
- }${nested ? ` ${styles.linkParent}` : ""}`}
- aria-current={active && !nested ? "page" : undefined}
- >
- <span>{item.label}</span>
- {(item.badgeText || item.isPro) && (
- <span className={styles.linkMeta}>
- {item.badgeText ? (
- <span className={styles.alertBadge}>{item.badgeText}</span>
- ) : null}
- {item.isPro ? (
- <StarIcon
- className={styles.proIcon}
- aria-label={`${item.label} is available in Pro`}
- size={14}
- />
- ) : null}
- </span>
- )}
- </Link>
- ) : (
- <p className={`${styles.linkLabel}${depth > 0 ? ` ${styles.nestedLink}` : ""}`}>
- {item.label}
- </p>
- )}
- {nested ? (
- <ul className={`${styles.groupList} ${styles.nestedList}`}>
- {(item.items ?? []).map((child) => renderNavItem(child, depth + 1))}
- </ul>
- ) : null}
- </li>
- );
- };
-
- return (
- <aside className={styles.sidePanel} aria-label={navLabel}>
- {title ? <p className={styles.title}>{title}</p> : null}
- <ul className={styles.list}>
- {sections.map((section) => {
- if (isGroupedSection(section)) {
- return (
- <li key={section.id} className={`${styles.item} ${styles.group}`}>
- {section.label ? <p className={styles.groupTitle}>{section.label}</p> : null}
- <ul className={styles.groupList}>
- {(section as NavSection & { items: NestedNavItem[] }).items.map((item) =>
- renderNavItem(item),
- )}
- </ul>
- </li>
- );
- }
-
- return renderNavItem(section as NestedNavItem);
- })}
- </ul>
- </aside>
- );
-}
diff --git a/docs/app/components/components/SideNav/index.ts b/docs/app/components/components/SideNav/index.ts
deleted file mode 100644
index f4ad414ca..000000000
--- a/docs/app/components/components/SideNav/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./SideNav";
diff --git a/docs/app/components/components/StarIcon/StarIcon.tsx b/docs/app/components/components/StarIcon/StarIcon.tsx
deleted file mode 100644
index f0b1b1f9d..000000000
--- a/docs/app/components/components/StarIcon/StarIcon.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import type { SVGProps } from "react";
-
-interface StarIconProps extends Omit<SVGProps<SVGSVGElement>, "children"> {
- size?: number;
- title?: string;
-}
-
-export default function StarIcon({
- size = 14,
- title,
- "aria-label": ariaLabel,
- ...props
-}: StarIconProps) {
- return (
- <svg
- width={size}
- height={size}
- viewBox="0 0 14 14"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- role={title || ariaLabel ? "img" : undefined}
- aria-label={ariaLabel}
- aria-hidden={title || ariaLabel ? undefined : true}
- {...props}
- >
- {title ? <title>{title}</title> : null}
- <path
- d="M12.8132 6.28121L10.3523 8.40473L11.102 11.5804C11.1434 11.7528 11.1327 11.9336 11.0714 12.1C11.0101 12.2663 10.9008 12.4107 10.7575 12.515C10.6141 12.6193 10.443 12.6787 10.2659 12.6859C10.0887 12.693 9.91344 12.6474 9.76217 12.555L7.00045 10.8553L4.23709 12.555C4.08584 12.6469 3.91078 12.692 3.73394 12.6846C3.5571 12.6773 3.38639 12.6177 3.24331 12.5135C3.10024 12.4093 2.99119 12.2651 2.9299 12.0991C2.86861 11.9331 2.85782 11.7526 2.89889 11.5804L3.65139 8.40473L1.19045 6.28121C1.05663 6.16555 0.959851 6.01303 0.912195 5.8427C0.864539 5.67236 0.868121 5.49176 0.922494 5.32345C0.976867 5.15514 1.07962 5.00658 1.21792 4.89632C1.35623 4.78606 1.52395 4.71899 1.70014 4.70348L4.9267 4.44317L6.17139 1.43098C6.23876 1.26682 6.35343 1.1264 6.50081 1.02757C6.6482 0.928744 6.82164 0.875977 6.99909 0.875977C7.17654 0.875977 7.34998 0.928744 7.49736 1.02757C7.64474 1.1264 7.75941 1.26682 7.82678 1.43098L9.07092 4.44317L12.2975 4.70348C12.474 4.71841 12.6422 4.78511 12.781 4.89522C12.9199 5.00532 13.0231 5.15395 13.0778 5.32246C13.1325 5.49098 13.1363 5.67189 13.0886 5.84254C13.041 6.01318 12.944 6.16597 12.8099 6.28176L12.8132 6.28121Z"
- fill="currentColor"
- fillOpacity="0.2"
- />
- </svg>
- );
-}
diff --git a/docs/app/components/components/StarIcon/index.ts b/docs/app/components/components/StarIcon/index.ts
deleted file mode 100644
index 7a903b500..000000000
--- a/docs/app/components/components/StarIcon/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./StarIcon";
diff --git a/docs/app/components/components/ThemeBuilder/ChartsSection.tsx b/docs/app/components/components/ThemeBuilder/ChartsSection.tsx
deleted file mode 100644
index de7d2d738..000000000
--- a/docs/app/components/components/ThemeBuilder/ChartsSection.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-"use client";
-
-import {
- AreaChart,
- BarChart,
- LineChart,
- PieChart,
- RadialChart,
- ScatterChart,
-} from "@openuidev/react-ui";
-import styles from "./realBlocksCanvas.module.css";
-
-const MONTHLY_DATA = [
- { month: "Jan", desktop: 120, mobile: 80 },
- { month: "Feb", desktop: 220, mobile: 140 },
- { month: "Mar", desktop: 180, mobile: 110 },
- { month: "Apr", desktop: 260, mobile: 160 },
-];
-
-const PIE_DATA = [
- { category: "January", value: 1250 },
- { category: "February", value: 980 },
- { category: "March", value: 1450 },
- { category: "April", value: 1320 },
-];
-
-const RADIAL_DATA = [
- { month: "January", value: 1250 },
- { month: "February", value: 980 },
- { month: "March", value: 1450 },
- { month: "April", value: 1320 },
-];
-
-const SCATTER_DATA = [
- {
- name: "A school",
- data: [
- { x: 100, y: 200, z: 200 },
- { x: 120, y: 100, z: 260 },
- { x: 170, y: 300, z: 400 },
- ],
- },
- {
- name: "B school",
- data: [
- { x: 200, y: 180, z: 240 },
- { x: 180, y: 350, z: 220 },
- { x: 160, y: 320, z: 250 },
- ],
- },
-];
-
-const CHART_PALETTE = ["#1f7ecc", "#2a8fdf", "#3f9ae6", "#5ca9ed"];
-
-function Block({ children }: { children: React.ReactNode }) {
- return <article className={styles.block}>{children}</article>;
-}
-
-export default function ChartsSection() {
- return (
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Charts</h2>
- <Block>
- <BarChart data={MONTHLY_DATA} categoryKey="month" />
- </Block>
- <Block>
- <LineChart data={MONTHLY_DATA} categoryKey="month" />
- </Block>
- <Block>
- <AreaChart data={MONTHLY_DATA} categoryKey="month" />
- </Block>
- <Block>
- <PieChart
- data={PIE_DATA}
- categoryKey="category"
- dataKey="value"
- variant="pie"
- format="percentage"
- legend
- legendVariant="stacked"
- minChartSize={296}
- maxChartSize={296}
- customPalette={CHART_PALETTE}
- />
- </Block>
- <Block>
- <PieChart
- data={PIE_DATA}
- categoryKey="category"
- dataKey="value"
- variant="donut"
- format="percentage"
- legend
- legendVariant="stacked"
- minChartSize={296}
- maxChartSize={296}
- customPalette={CHART_PALETTE}
- />
- </Block>
- <Block>
- <ScatterChart data={SCATTER_DATA} xAxisDataKey="x" yAxisDataKey="y" />
- </Block>
- <Block>
- <RadialChart data={RADIAL_DATA} categoryKey="month" dataKey="value" variant="circular" />
- </Block>
- </section>
- );
-}
diff --git a/docs/app/components/components/ThemeBuilder/realBlocksCanvas.module.css b/docs/app/components/components/ThemeBuilder/realBlocksCanvas.module.css
deleted file mode 100644
index b26130308..000000000
--- a/docs/app/components/components/ThemeBuilder/realBlocksCanvas.module.css
+++ /dev/null
@@ -1,84 +0,0 @@
-.canvas {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xl);
- width: 100%;
- max-width: 800px;
- margin: 0 auto;
-}
-
-.section {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
-}
-
-.sectionTitle {
- margin: 0;
- font: var(--openui-text-heading-xs);
- color: var(--openui-text-neutral-primary);
-}
-
-.block {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
- padding-bottom: var(--openui-space-m);
-}
-
-.block:last-child {
- border-bottom: none;
- padding-bottom: 0;
-}
-
-.blockTitle {
- margin: 0;
- font: var(--openui-text-label-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-.inlineGrid2 {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: var(--openui-space-l);
-}
-
-.inlineStack {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.tagRow {
- display: flex;
- gap: var(--openui-space-2xs);
- flex-wrap: wrap;
-}
-
-.buttonRow {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: var(--openui-space-s);
-}
-
-.selectWrap {
- width: 100%;
- max-width: 260px;
-}
-
-.inputWrap {
- width: 100%;
- max-width: 320px;
-}
-
-.tableWrap {
- width: 100%;
- overflow-x: auto;
-}
-
-@media (max-width: 980px) {
- .inlineGrid2 {
- grid-template-columns: 1fr;
- }
-}
diff --git a/docs/app/components/components/ThemeBuilder/realBlocksCanvas.tsx b/docs/app/components/components/ThemeBuilder/realBlocksCanvas.tsx
deleted file mode 100644
index 1c1d60c51..000000000
--- a/docs/app/components/components/ThemeBuilder/realBlocksCanvas.tsx
+++ /dev/null
@@ -1,237 +0,0 @@
-"use client";
-
-import {
- Accordion,
- AccordionContent,
- AccordionItem,
- AccordionTrigger,
- Button,
- Buttons,
- CheckBoxGroup,
- CheckBoxItem,
- DatePicker,
- IconButton,
- ImageBlock,
- Input,
- RadioGroup,
- RadioItem,
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
- SwitchGroup,
- SwitchItem,
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
- Tabs,
- TabsList,
- TabsTrigger,
- Tag,
- TextCallout,
-} from "@openuidev/react-ui";
-import dynamic from "next/dynamic";
-import { useState } from "react";
-import styles from "./realBlocksCanvas.module.css";
-
-const ChartsSection = dynamic(() => import("./ChartsSection"), { ssr: false });
-
-const PREVIEW_IMAGE =
- "https://images.unsplash.com/photo-1738168246881-40f35f8aba0a?w=900&auto=format&fit=crop&q=60";
-
-function Block({ title: _title, children }: { title: string; children: React.ReactNode }) {
- return <article className={styles.block}>{children}</article>;
-}
-
-export default function RealBlocksCanvas() {
- const [city, setCity] = useState("paris");
-
- return (
- <div className={styles.canvas}>
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Navigation</h2>
- <Block title="Tabs">
- <div className={styles.inlineStack}>
- <Tabs defaultValue="paris">
- <TabsList variant="title">
- <TabsTrigger value="paris" text="Paris" />
- <TabsTrigger value="tokyo" text="Tokyo" />
- <TabsTrigger value="new-york" text="New York" />
- </TabsList>
- </Tabs>
- <Tabs defaultValue="insights">
- <TabsList variant="iconTitleSubtext">
- <TabsTrigger
- value="insights"
- text="Insights"
- icon={<span>📊</span>}
- subtext="KPIs"
- />
- <TabsTrigger value="revenue" text="Revenue" icon={<span>💰</span>} subtext="MRR" />
- <TabsTrigger value="users" text="Users" icon={<span>👥</span>} subtext="MAU" />
- </TabsList>
- </Tabs>
- </div>
- </Block>
- </section>
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Individual Blocks</h2>
- <Block title="Accordion">
- <Accordion type="single" collapsible variant="clear" defaultValue="item-1">
- <AccordionItem value="item-1">
- <AccordionTrigger text="What is OpenUI UI?" />
- <AccordionContent>
- OpenUI UI is a design system for polished interfaces.
- </AccordionContent>
- </AccordionItem>
- <AccordionItem value="item-2">
- <AccordionTrigger text="Can I customise the theme?" />
- <AccordionContent>
- Yes, theme tokens are applied through ThemeProvider variables.
- </AccordionContent>
- </AccordionItem>
- </Accordion>
- </Block>
- <Block title="Buttons">
- <div className={styles.buttonRow}>
- <Button variant="primary">Primary</Button>
- <Button variant="secondary">Secondary</Button>
- <IconButton
- icon={
- <svg aria-hidden viewBox="0 0 24 24" width="16" height="16" fill="none">
- <path
- d="M12 4v10m0 0 4-4m-4 4-4-4M5 18h14"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- />
- </svg>
- }
- variant="tertiary"
- aria-label="Download"
- />
- </div>
- <Buttons variant="horizontal" style={{ width: "fit-content" }}>
- <Button variant="primary">Save</Button>
- <Button variant="secondary">Cancel</Button>
- </Buttons>
- </Block>
- <Block title="Callout">
- <TextCallout
- variant="info"
- title="Heads up"
- description="This callout updates with your current theme settings."
- />
- </Block>
- <Block title="Image">
- <ImageBlock src={PREVIEW_IMAGE} alt="Scenic landscape preview" />
- </Block>
- <Block title="Tables">
- <div className={styles.tableWrap}>
- <Table containerStyle={{ width: 680 }}>
- <TableHeader>
- <TableRow>
- <TableHead>Invoice</TableHead>
- <TableHead>Status</TableHead>
- <TableHead align="right">Amount</TableHead>
- </TableRow>
- </TableHeader>
- <TableBody>
- <TableRow>
- <TableCell>INV001</TableCell>
- <TableCell>Paid</TableCell>
- <TableCell align="right">$250.00</TableCell>
- </TableRow>
- <TableRow>
- <TableCell>INV002</TableCell>
- <TableCell>Pending</TableCell>
- <TableCell align="right">$150.00</TableCell>
- </TableRow>
- </TableBody>
- </Table>
- </div>
- </Block>
- <Block title="Text items">
- <div className={styles.inlineStack}>
- <TextCallout
- title="Text item title"
- description="Supporting description for text item."
- />
- <TextCallout title="3.7%" description="Conversion rate" variant="success" />
- </div>
- </Block>
- <Block title="Tag item">
- <div className={styles.tagRow}>
- <Tag text="Design" variant="info" />
- <Tag text="Docs" variant="neutral" />
- <Tag text="Released" variant="success" />
- </div>
- </Block>
- </section>
-
- <ChartsSection />
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Forms</h2>
- <Block title="Checkbox group">
- <CheckBoxGroup variant="card">
- <CheckBoxItem
- value="email"
- label="Email notifications"
- description="Receive updates by email"
- />
- <CheckBoxItem
- value="slack"
- label="Slack alerts"
- description="Receive updates in Slack"
- />
- </CheckBoxGroup>
- </Block>
- <Block title="Date picker">
- <DatePicker mode="single" style={{ width: "100%" }} />
- </Block>
- <Block title="Input field">
- <div className={styles.inputWrap}>
- <Input size="medium" placeholder="Enter text..." />
- </div>
- </Block>
- <Block title="Toggle group">
- <SwitchGroup variant="card">
- <SwitchItem value="left" label="Left align" description="Align content to the left" />
- <SwitchItem
- value="center"
- label="Center align"
- description="Align content to the center"
- />
- </SwitchGroup>
- </Block>
- <Block title="Radio button group">
- <RadioGroup variant="card">
- <RadioItem value="starter" label="Starter" description="For personal use" />
- <RadioItem value="pro" label="Pro" description="For growing teams" />
- </RadioGroup>
- </Block>
- <Block title="Select">
- <div className={styles.selectWrap}>
- <Select value={city} onValueChange={setCity}>
- <SelectTrigger size="md">
- <SelectValue placeholder="Choose city" />
- </SelectTrigger>
- <SelectContent>
- <SelectItem value="paris">Paris</SelectItem>
- <SelectItem value="tokyo">Tokyo</SelectItem>
- <SelectItem value="new-york">New York</SelectItem>
- </SelectContent>
- </Select>
- </div>
- </Block>
- </section>
- </div>
- );
-}
diff --git a/docs/app/components/components/ThemeToggle/ThemeToggle.module.css b/docs/app/components/components/ThemeToggle/ThemeToggle.module.css
deleted file mode 100644
index 72cb7a56d..000000000
--- a/docs/app/components/components/ThemeToggle/ThemeToggle.module.css
+++ /dev/null
@@ -1,85 +0,0 @@
-.themeToggle {
- display: inline-flex;
- gap: var(--openui-space-2xs);
- padding: var(--openui-space-2xs);
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-full);
- background: var(--openui-foreground);
- box-shadow: var(--openui-shadow-s);
-}
-
-.themeToggleButton {
- border: 1px solid transparent;
- background: transparent;
- display: inline-flex;
- align-items: center;
- gap: var(--openui-space-2xs);
- color: var(--openui-text-neutral-secondary);
- border-radius: var(--openui-radius-s);
- font: var(--openui-text-label-sm);
- padding: 6px 10px;
- cursor: pointer;
- transition:
- background-color var(--motion-duration-fast) var(--motion-ease-standard),
- color var(--motion-duration-fast) var(--motion-ease-standard),
- border-color var(--motion-duration-fast) var(--motion-ease-standard),
- box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
-}
-
-.themeToggleButton:hover {
- background: var(--openui-highlight-subtle);
- color: var(--openui-text-neutral-primary);
-}
-
-.themeToggleButton:active {
- background: var(--openui-highlight);
-}
-
-.themeToggleButtonActive {
- color: var(--openui-text-accent-primary);
- background: var(--openui-interactive-accent-default);
- border-color: var(--openui-border-interactive-selected);
- box-shadow: var(--openui-shadow-s);
-}
-
-.themeToggleButtonActive:hover {
- background: var(--openui-interactive-accent-hover);
- color: var(--openui-text-accent-primary);
-}
-
-.themeToggleButtonActive:active {
- background: var(--openui-interactive-accent-pressed);
-}
-
-.themeIconButton {
- border: 1px solid var(--openui-border-default);
- background: var(--openui-foreground);
- color: var(--openui-text-neutral-primary);
- border-radius: var(--openui-radius-s);
- width: 28px;
- height: 28px;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- box-shadow: var(--openui-shadow-s);
- transition:
- background-color var(--motion-duration-fast) var(--motion-ease-standard),
- color var(--motion-duration-fast) var(--motion-ease-standard),
- border-color var(--motion-duration-fast) var(--motion-ease-standard),
- box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
-}
-
-.themeIconButton:hover {
- background: var(--openui-highlight-subtle);
-}
-
-.themeIconButton:active {
- background: var(--openui-highlight);
-}
-
-.themeToggleButton:focus-visible,
-.themeIconButton:focus-visible {
- outline: 2px solid var(--openui-border-interactive-selected);
- outline-offset: 2px;
-}
diff --git a/docs/app/components/components/ThemeToggle/ThemeToggle.tsx b/docs/app/components/components/ThemeToggle/ThemeToggle.tsx
deleted file mode 100644
index 6c8f296d1..000000000
--- a/docs/app/components/components/ThemeToggle/ThemeToggle.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-"use client";
-
-import { useAppTheme } from "@components/components/AppThemeProvider/AppThemeProvider";
-import { IconButton } from "@openuidev/react-ui/IconButton";
-import { Contrast } from "lucide-react";
-
-export default function ThemeToggle() {
- const { mode, toggleMode } = useAppTheme();
- const nextMode = mode === "light" ? "dark" : "light";
-
- return (
- <IconButton
- icon={<Contrast size={14} />}
- variant="secondary"
- size="small"
- onClick={toggleMode}
- aria-label={`Switch to ${nextMode} mode`}
- title={`Switch to ${nextMode} mode`}
- />
- );
-}
diff --git a/docs/app/components/components/ThemeToggle/index.ts b/docs/app/components/components/ThemeToggle/index.ts
deleted file mode 100644
index b3c9211c9..000000000
--- a/docs/app/components/components/ThemeToggle/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./ThemeToggle";
diff --git a/docs/app/components/components/Tooltip/Tooltip.module.css b/docs/app/components/components/Tooltip/Tooltip.module.css
deleted file mode 100644
index 5a8878ff8..000000000
--- a/docs/app/components/components/Tooltip/Tooltip.module.css
+++ /dev/null
@@ -1,18 +0,0 @@
-.tooltipTrigger {
- position: relative;
- display: block;
-}
-
-.tooltipBubble {
- background: var(--openui-inverted-background);
- color: var(--openui-text-accent-primary);
- border: 1px solid var(--openui-border-accent);
- border-radius: var(--openui-radius-s);
- font-family: var(--font-geist-mono);
- font-size: 11px;
- line-height: 16px;
- padding: 6px 8px;
- white-space: nowrap;
- pointer-events: none;
- box-shadow: 0 8px 24px var(--swatch-black-a24);
-}
diff --git a/docs/app/components/components/Tooltip/Tooltip.tsx b/docs/app/components/components/Tooltip/Tooltip.tsx
deleted file mode 100644
index 3e5d7bdc1..000000000
--- a/docs/app/components/components/Tooltip/Tooltip.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-"use client";
-
-import type { ReactNode } from "react";
-import { useEffect, useRef, useState } from "react";
-import { createPortal } from "react-dom";
-import styles from "./Tooltip.module.css";
-
-interface TooltipProps {
- content: ReactNode;
- children: ReactNode;
- className?: string;
-}
-
-export default function Tooltip({ content, children, className }: TooltipProps) {
- const triggerRef = useRef<HTMLSpanElement>(null);
- const [isOpen, setIsOpen] = useState(false);
- const [position, setPosition] = useState({ top: 0, left: 0 });
-
- const updatePosition = () => {
- if (!triggerRef.current) return;
- const rect = triggerRef.current.getBoundingClientRect();
- setPosition({
- top: rect.top - 8,
- left: rect.left + rect.width / 2,
- });
- };
-
- useEffect(() => {
- if (!isOpen) return;
-
- updatePosition();
- const handleReposition = () => updatePosition();
-
- window.addEventListener("scroll", handleReposition, true);
- window.addEventListener("resize", handleReposition);
-
- return () => {
- window.removeEventListener("scroll", handleReposition, true);
- window.removeEventListener("resize", handleReposition);
- };
- }, [isOpen]);
-
- return (
- <>
- <span
- ref={triggerRef}
- className={`${styles.tooltipTrigger}${className ? ` ${className}` : ""}`}
- tabIndex={0}
- onMouseEnter={() => setIsOpen(true)}
- onMouseLeave={() => setIsOpen(false)}
- onFocus={() => setIsOpen(true)}
- onBlur={() => setIsOpen(false)}
- >
- {children}
- </span>
-
- {isOpen &&
- createPortal(
- <span
- role="tooltip"
- className={styles.tooltipBubble}
- style={{
- position: "fixed",
- top: `${position.top}px`,
- left: `${position.left}px`,
- transform: "translate(-50%, -100%)",
- zIndex: 9999,
- }}
- >
- {content}
- </span>,
- document.body,
- )}
- </>
- );
-}
diff --git a/docs/app/components/components/Tooltip/index.ts b/docs/app/components/components/Tooltip/index.ts
deleted file mode 100644
index d60062351..000000000
--- a/docs/app/components/components/Tooltip/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./Tooltip";
diff --git a/docs/app/components/components/TopBarDocsButton/TopBarDocsButton.tsx b/docs/app/components/components/TopBarDocsButton/TopBarDocsButton.tsx
deleted file mode 100644
index 494cc190d..000000000
--- a/docs/app/components/components/TopBarDocsButton/TopBarDocsButton.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-"use client";
-
-import { Button } from "@openuidev/react-ui/Button";
-import { useRouter } from "next/navigation";
-
-export default function TopBarDocsButton() {
- const router = useRouter();
-
- return (
- <Button variant="primary" size="small" onClick={() => router.push("/components/blocks")}>
- Docs
- </Button>
- );
-}
diff --git a/docs/app/components/components/TopNav/TopNav.tsx b/docs/app/components/components/TopNav/TopNav.tsx
deleted file mode 100644
index b6a63afae..000000000
--- a/docs/app/components/components/TopNav/TopNav.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-"use client";
-
-import styles from "@components/layout.module.css";
-import type { NavItem } from "@components/types";
-import Link from "next/link";
-import { usePathname } from "next/navigation";
-
-interface TopNavProps {
- items: NavItem[];
-}
-
-const isItemActive = (pathname: string, href: string): boolean => {
- if (href === "/components/foundation/colors") {
- return pathname.startsWith("/components/foundation");
- }
- return pathname === href || pathname.startsWith(`${href}/`);
-};
-
-export default function TopNav({ items }: TopNavProps) {
- const pathname = usePathname();
-
- return (
- <nav className={styles.topNav} aria-label="Primary navigation">
- {items.map((item) => {
- const active = isItemActive(pathname, item.href);
- return (
- <Link
- key={item.id}
- href={item.href}
- className={`${styles.topNavLink}${active ? ` ${styles.topNavLinkActive}` : ""}`}
- aria-current={active ? "page" : undefined}
- >
- {item.label}
- </Link>
- );
- })}
- </nav>
- );
-}
diff --git a/docs/app/components/components/TopNav/index.ts b/docs/app/components/components/TopNav/index.ts
deleted file mode 100644
index a78a90bf8..000000000
--- a/docs/app/components/components/TopNav/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from "./TopNav";
diff --git a/docs/app/components/components/compose/ComposeExamplePage.module.css b/docs/app/components/components/compose/ComposeExamplePage.module.css
deleted file mode 100644
index 1bae8942c..000000000
--- a/docs/app/components/components/compose/ComposeExamplePage.module.css
+++ /dev/null
@@ -1,264 +0,0 @@
-.shell {
- display: flex;
- flex-direction: column;
- height: calc(100vh - 72px - var(--openui-space-xl) - 20px);
- margin-top: 20px;
- margin-bottom: -48px;
- padding: 0 var(--openui-space-xl) 0 0;
-}
-
-.body {
- display: flex;
- flex-direction: row;
- gap: var(--openui-space-3xl);
- flex: 1;
- min-height: 0;
-}
-
-/* Left panel ------------------------------------------------------------ */
-
-.leftPanel {
- overflow-y: auto;
- overflow-x: hidden;
- scrollbar-width: none;
- -ms-overflow-style: none;
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-3xl);
- padding-right: var(--openui-space-2xs);
- width: 100%;
- max-width: 400px;
- padding-bottom: 80px;
-}
-
-.leftPanel.fadeTop {
- mask-image: linear-gradient(to bottom, transparent 0%, black 48px);
- -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 48px);
-}
-
-.leftPanel.fadeBottom {
- mask-image: linear-gradient(to bottom, black calc(100% - 80px), transparent 100%);
- -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 80px), transparent 100%);
-}
-
-.leftPanel.fadeTop.fadeBottom {
- mask-image: linear-gradient(
- to bottom,
- transparent 0%,
- black 48px,
- black calc(100% - 80px),
- transparent 100%
- );
- -webkit-mask-image: linear-gradient(
- to bottom,
- transparent 0%,
- black 48px,
- black calc(100% - 80px),
- transparent 100%
- );
-}
-
-.leftPanel::-webkit-scrollbar {
- display: none;
-}
-
-.exampleHeader {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
- padding-left: var(--openui-space-l);
-}
-
-.exampleTitle {
- margin: 0;
- font: var(--openui-text-heading-xl);
- font-size: 48px;
- color: var(--openui-text-neutral-primary);
- letter-spacing: -1px;
-}
-
-.exampleDescription {
- margin: 0;
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
- line-height: var(--openui-line-height-default);
-}
-
-.stepList {
- list-style: none;
- margin: 0;
- padding: 0;
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.stepSection {
- display: flex;
- flex-direction: column;
-}
-
-.stepHeader {
- display: flex;
- flex-direction: column;
- gap: 2px;
- width: 100%;
- text-align: left;
- border: none;
- border-left: 3px solid transparent;
- border-radius: 0 var(--openui-radius-2xl) var(--openui-radius-2xl) 0;
- background: transparent;
- color: var(--openui-text-neutral-primary);
- padding: var(--openui-space-m) var(--openui-space-m) var(--openui-space-m) var(--openui-space-l);
- cursor: pointer;
- transition:
- background-color 0.2s ease-in-out,
- border-color 0.2s ease-in-out,
- border-radius 0.2s ease-in-out,
- border-left-width 0.2s ease-in-out,
- padding-left 0.2s ease-in-out;
-}
-
-.stepHeader:hover {
- background: var(--openui-highlight);
-}
-
-.stepHeaderActive {
- border-left-color: var(--openui-interactive-accent-default);
- background: var(--openui-highlight);
- border-radius: 0 var(--openui-radius-2xl) var(--openui-radius-2xl) 0;
-}
-
-.stepNumber {
- font: var(--openui-text-label-lg-heavy);
- color: var(--openui-text-neutral-primary);
-}
-
-.stepTitle {
- font: var(--openui-text-body-lg-heavy);
- color: var(--openui-text-neutral-primary);
-}
-
-.stepDescription {
- margin-top: var(--openui-space-2xs);
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
- line-height: var(--openui-line-height-default);
-}
-
-/* Right panel ----------------------------------------------------------- */
-
-.rightPanel {
- display: flex;
- flex-direction: column;
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-7xl);
- background: var(--openui-pink-background);
- padding: var(--openui-space-xl);
- gap: var(--openui-space-xl);
- overflow: hidden;
- width: 100%;
- height: calc(100% - 20px);
- margin-bottom: 20px;
-}
-
-.toggleBar {
- display: flex;
- justify-content: center;
- padding: var(--openui-space-m);
- flex-shrink: 0;
-}
-
-.toggleBar > * {
- width: auto;
- min-width: 180px;
-}
-
-.previewScroll {
- flex: 1;
- overflow-y: auto;
- overflow-x: hidden;
- padding: 0 var(--openui-space-m) var(--openui-space-m);
-}
-
-.previewScope {
- background: var(--openui-foreground);
- border-radius: var(--openui-radius-2xl);
- padding: var(--openui-space-m);
- min-height: 200px;
-}
-
-/* CSS code block view --------------------------------------------------- */
-
-.codeScroll {
- flex: 1;
- overflow: hidden;
- padding: 0 var(--openui-space-m) var(--openui-space-m);
-}
-
-.codeBlock {
- background: var(--openui-foreground);
- border-radius: var(--openui-radius-2xl);
- padding: var(--openui-space-m-l) var(--openui-space-xl);
- margin: auto;
- max-width: 100%;
- height: 100%;
- overflow: hidden;
-}
-
-.codeBlock code {
- font: var(--openui-text-code-sm);
- color: var(--openui-text-neutral-primary);
- white-space: pre-wrap;
- word-break: break-all;
- display: block;
- line-height: 1.75;
-}
-
-.codeLine {
- display: inline;
-}
-
-.codeProperty {
- color: var(--openui-text-neutral-primary);
-}
-
-.codePunctuation {
- color: var(--openui-text-neutral-tertiary);
-}
-
-.codeValue {
- color: var(--openui-text-brand);
-}
-
-.codeComment {
- color: var(--openui-text-neutral-tertiary);
- font-style: italic;
-}
-
-/* Responsive ------------------------------------------------------------ */
-
-@media (max-width: 1024px) {
- .shell {
- height: auto;
- overflow: visible;
- margin-bottom: 0;
- }
-
- .body {
- flex-direction: column;
- flex: none;
- overflow: visible;
- }
-
- .leftPanel {
- overflow: visible;
- max-height: none;
- max-width: none;
- }
-
- .rightPanel {
- height: 400px;
- margin-bottom: 0;
- }
-}
diff --git a/docs/app/components/components/compose/ComposeExamplePage.tsx b/docs/app/components/components/compose/ComposeExamplePage.tsx
deleted file mode 100644
index 7654dd881..000000000
--- a/docs/app/components/components/compose/ComposeExamplePage.tsx
+++ /dev/null
@@ -1,253 +0,0 @@
-"use client";
-
-import dynamic from "next/dynamic";
-import { useCallback, useEffect, useMemo, useRef, useState } from "react";
-
-import { useAppTheme } from "@components/components/AppThemeProvider/AppThemeProvider";
-import SegmentedToggle from "@components/components/preview/SegmentedToggle";
-import type { GuideExample } from "@components/config/guide";
-import { ThemeProvider, type Theme } from "@openuidev/react-ui/ThemeProvider";
-import styles from "./ComposeExamplePage.module.css";
-
-const RealBlocksCanvas = dynamic(
- () => import("@components/components/ThemeBuilder/realBlocksCanvas"),
- { ssr: false },
-);
-
-interface ComposeExamplePageProps {
- example: GuideExample;
-}
-
-interface CssLine {
- property: string;
- value: string;
- previousValue: string | null;
-}
-
-function buildCssLines(
- vars: Record<string, string>,
- previousVars: Record<string, string>,
- defaults: Record<string, string>,
-): CssLine[] {
- return Object.entries(vars).map(([property, value]) => ({
- property,
- value,
- previousValue: previousVars[property] ?? defaults[property] ?? null,
- }));
-}
-
-export default function ComposeExamplePage({ example }: ComposeExamplePageProps) {
- const { mode } = useAppTheme();
- const [activeStepIndex, setActiveStepIndex] = useState<number | null>(null);
- const [rightPanelMode, setRightPanelMode] = useState<"preview" | "css">("preview");
-
- const hasThemeGuide = example.goalTheme != null;
- const activeStep = activeStepIndex != null ? example.steps[activeStepIndex] : null;
-
- const leftPanelRef = useRef<HTMLDivElement>(null);
-
- const [canScrollUp, setCanScrollUp] = useState(false);
- const [canScrollDown, setCanScrollDown] = useState(false);
-
- const updateScrollFade = useCallback(() => {
- const panel = leftPanelRef.current;
- if (!panel) return;
- setCanScrollUp(panel.scrollTop > 2);
- setCanScrollDown(panel.scrollTop + panel.clientHeight < panel.scrollHeight - 2);
- }, []);
-
- useEffect(() => {
- const panel = leftPanelRef.current;
- if (!panel) return;
- updateScrollFade();
- panel.addEventListener("scroll", updateScrollFade, { passive: true });
- const ro = new ResizeObserver(updateScrollFade);
- ro.observe(panel);
- return () => {
- panel.removeEventListener("scroll", updateScrollFade);
- ro.disconnect();
- };
- }, [updateScrollFade]);
-
- const cumulativeTheme = useMemo(() => {
- if (activeStepIndex == null) {
- return {};
- }
- return example.steps
- .slice(0, activeStepIndex + 1)
- .reduce<Record<string, string>>((acc, step) => ({ ...acc, ...step.themeOverrides }), {});
- }, [activeStepIndex, example.steps]);
-
- const previousCumulativeCss = useMemo(() => {
- if (activeStepIndex == null || activeStepIndex === 0) {
- return {};
- }
- return example.steps
- .slice(0, activeStepIndex)
- .reduce<Record<string, string>>((acc, step) => ({ ...acc, ...step.cssVariables }), {});
- }, [activeStepIndex, example.steps]);
-
- const previewTheme = useMemo((): Partial<Theme> => {
- if (!hasThemeGuide) {
- return {};
- }
- if (activeStepIndex == null) {
- if (rightPanelMode === "css") {
- return (example.goalTheme ?? {}) as Partial<Theme>;
- }
- return {};
- }
- return cumulativeTheme as Partial<Theme>;
- }, [hasThemeGuide, activeStepIndex, rightPanelMode, example.goalTheme, cumulativeTheme]);
-
- const toggleValue = rightPanelMode;
- const toggleLabels =
- activeStepIndex == null
- ? { preview: "Start", css: "Goal" }
- : { preview: "Preview", css: "CSS" };
-
- const handleToggle = (value: "preview" | "css") => {
- setRightPanelMode(value);
- };
-
- const handleStepClick = (index: number) => {
- if (activeStepIndex === index) {
- return;
- }
- setActiveStepIndex(index);
- setRightPanelMode("preview");
- };
-
- const handleIntroClick = () => {
- setActiveStepIndex(null);
- setRightPanelMode("preview");
- };
-
- const showCodeBlock =
- rightPanelMode === "css" && activeStepIndex != null && activeStep?.cssVariables;
-
- return (
- <div className={styles.shell}>
- <div className={styles.body}>
- {/* Left panel */}
- <div
- className={`${styles.leftPanel}${canScrollUp ? ` ${styles.fadeTop}` : ""}${canScrollDown ? ` ${styles.fadeBottom}` : ""}`}
- ref={leftPanelRef}
- >
- <div className={styles.exampleHeader}>
- <h1 className={styles.exampleTitle}>{example.title}</h1>
- <p className={styles.exampleDescription}>{example.summary}</p>
- </div>
-
- <ul className={styles.stepList} role="list">
- {hasThemeGuide && (
- <li>
- <section className={styles.stepSection} aria-label="Step 0: Spotting differences">
- <button
- type="button"
- className={`${styles.stepHeader}${activeStepIndex == null ? ` ${styles.stepHeaderActive}` : ""}`}
- onClick={handleIntroClick}
- aria-current={activeStepIndex == null ? "step" : undefined}
- >
- <span className={styles.stepTitle}>Spotting the differences</span>
- <span className={styles.stepDescription}>
- First, let&rsquo;s compare the starting theme with the final goal side by side
- to understand what we&rsquo;re aiming for.
- </span>
- </button>
- </section>
- </li>
- )}
- {example.steps.map((step, index) => {
- const isActive = index === activeStepIndex;
- return (
- <li key={step.id}>
- <section
- id={step.id}
- className={styles.stepSection}
- aria-label={`Step ${index + 1}: ${step.title}`}
- >
- <button
- type="button"
- className={`${styles.stepHeader}${isActive ? ` ${styles.stepHeaderActive}` : ""}`}
- onClick={() => handleStepClick(index)}
- aria-current={isActive ? "step" : undefined}
- >
- <span className={styles.stepNumber}>{index + 1}</span>
- <span className={styles.stepTitle}>{step.title}</span>
- <span className={styles.stepDescription}>{step.description}</span>
- </button>
- </section>
- </li>
- );
- })}
- </ul>
- </div>
-
- {/* Right panel */}
- <div
- className={styles.rightPanel}
- role="region"
- aria-label={
- activeStep ? `Preview for step ${activeStepIndex! + 1}: ${activeStep.title}` : "Preview"
- }
- >
- {hasThemeGuide && (
- <div className={styles.toggleBar}>
- <SegmentedToggle
- ariaLabel="Preview mode"
- options={[
- { label: toggleLabels.preview, value: "preview" as const },
- { label: toggleLabels.css, value: "css" as const },
- ]}
- value={toggleValue}
- onChange={handleToggle}
- />
- </div>
- )}
-
- {showCodeBlock ? (
- <div className={styles.codeScroll}>
- <pre className={styles.codeBlock}>
- <code>
- {buildCssLines(
- activeStep!.cssVariables!,
- previousCumulativeCss,
- example.defaultCssVariables ?? {},
- ).map((line, i) => (
- <span key={i} className={styles.codeLine}>
- <span className={styles.codeProperty}>{line.property}</span>
- <span className={styles.codePunctuation}>: </span>
- <span className={styles.codeValue}>{line.value}</span>
- <span className={styles.codePunctuation}>;</span>
- {line.previousValue != null && (
- <span className={styles.codeComment}>
- {" /* was: "}
- {line.previousValue}
- {" */"}
- </span>
- )}
- {"\n"}
- </span>
- ))}
- </code>
- </pre>
- </div>
- ) : (
- <div className={styles.previewScroll}>
- <ThemeProvider
- mode={mode}
- theme={previewTheme}
- cssSelector={`.${styles.previewScope}`}
- >
- <div className={styles.previewScope}>
- <RealBlocksCanvas />
- </div>
- </ThemeProvider>
- </div>
- )}
- </div>
- </div>
- </div>
- );
-}
diff --git a/docs/app/components/components/compose/index.ts b/docs/app/components/components/compose/index.ts
deleted file mode 100644
index 74bd76697..000000000
--- a/docs/app/components/components/compose/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default as ComposeExamplePage } from "./ComposeExamplePage";
diff --git a/docs/app/components/components/preview/BlockVariantPreview.module.css b/docs/app/components/components/preview/BlockVariantPreview.module.css
deleted file mode 100644
index 5a1429571..000000000
--- a/docs/app/components/components/preview/BlockVariantPreview.module.css
+++ /dev/null
@@ -1,161 +0,0 @@
-.variant {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
- padding: var(--openui-space-l) 0;
-}
-
-.header {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.title {
- margin: 0;
- font: var(--openui-text-heading-sm);
- color: var(--openui-text-neutral-primary);
-}
-
-.description {
- margin: 0;
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
-}
-
-.preview {
- min-height: 240px;
- border-radius: var(--openui-radius-3xl);
- border: 4px solid var(--openui-border-default);
- padding: var(--openui-space-3xl);
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.previewContainer {
- border-radius: var(--openui-radius-3xl);
- background: var(--openui-highlight-subtle);
- padding: var(--openui-space-2xs);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.previewToolbar {
- padding: var(--openui-space-s) var(--openui-space-m);
- display: flex;
- align-items: center;
- justify-content: flex-start;
-}
-
-.previewSurface {
- min-height: 240px;
- border-radius: var(--openui-radius-3xl);
- border: 1px solid var(--openui-border-default);
- background: var(--openui-foreground);
- padding: var(--openui-space-2xl);
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.previewWithRightControls {
- width: 100%;
- max-width: 1080px;
- border-radius: var(--openui-radius-3xl);
- border: 1px solid var(--openui-border-default);
- background: var(--openui-highlight-subtle);
- padding: var(--openui-space-2xs);
- display: grid;
- grid-template-columns: minmax(0, 1fr) 260px;
- gap: var(--openui-space-2xs);
- box-sizing: border-box;
-}
-
-.previewWithRightControlsSurface {
- min-height: 320px;
- border-radius: var(--openui-radius-2xl);
- background: var(--openui-foreground);
- padding: var(--openui-space-xl);
- display: flex;
- align-items: flex-start;
- justify-content: flex-start;
- overflow: hidden;
-}
-
-.previewRightControls {
- min-height: 320px;
- border-radius: var(--openui-radius-2xl);
- background: var(--openui-foreground);
- padding: var(--openui-space-l);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-m);
- overflow-y: auto;
-}
-
-.prompt {
- border-radius: var(--openui-radius-3xl);
- background: var(--openui-highlight-subtle);
- padding: var(--openui-space-2xs);
- display: flex;
- flex-direction: column;
- align-items: stretch;
- justify-content: flex-start;
-}
-
-.variantWithRightControls .prompt {
- max-width: 800px;
-}
-
-.promptHeader {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--openui-space-s);
- padding-right: var(--openui-space-2xs);
-}
-
-.promptLabel {
- margin: 0;
- font: var(--openui-text-label-sm);
- color: var(--openui-text-neutral-secondary);
- padding: var(--openui-space-s) var(--openui-space-m);
-}
-
-.promptField {
- min-height: 80px;
- border-radius: var(--openui-radius-xl);
- border: 1px solid var(--openui-border-default);
- background: var(--openui-foreground);
- padding: var(--openui-space-m) var(--openui-space-m);
- display: flex;
- align-items: flex-start;
-}
-
-.placeholder {
- font: var(--openui-text-label-default);
- color: var(--openui-text-neutral-tertiary);
-}
-
-.promptText {
- width: 100%;
- margin: 0;
- white-space: pre-wrap;
- word-break: break-word;
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-primary);
-}
-
-@media (max-width: 1120px) {
- .previewWithRightControls {
- max-width: 100%;
- grid-template-columns: 1fr;
- }
-
- .previewWithRightControlsSurface,
- .previewRightControls {
- min-height: auto;
- }
-}
diff --git a/docs/app/components/components/preview/BlockVariantPreview.tsx b/docs/app/components/components/preview/BlockVariantPreview.tsx
deleted file mode 100644
index 1cd845102..000000000
--- a/docs/app/components/components/preview/BlockVariantPreview.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import type { CSSProperties, ReactNode } from "react";
-import styles from "./BlockVariantPreview.module.css";
-import PromptCopyButton from "./PromptCopyButton";
-
-interface BlockVariantPreviewProps {
- title?: string;
- description?: string;
- preview?: ReactNode;
- headerControl?: ReactNode;
- rightControls?: ReactNode;
- prompt?: ReactNode | string;
- promptTitle?: string;
- hidePrompt?: boolean;
-}
-
-export default function BlockVariantPreview({
- title,
- description,
- preview,
- headerControl,
- rightControls,
- prompt,
- promptTitle = "Prompt",
- hidePrompt = false,
-}: BlockVariantPreviewProps) {
- const previewContent = preview ?? <span className={styles.placeholder}>Preview</span>;
- const promptContent =
- prompt ?? "A small prompt to be used to add this component in your generations";
- const promptCopyText = typeof promptContent === "string" ? promptContent : "";
- const variantStyle = rightControls
- ? ({ "--section-content-max-width": "1080px" } as CSSProperties)
- : undefined;
- const variantClassName = `${styles.variant} ${rightControls ? styles.variantWithRightControls : ""}`;
- return (
- <div className={variantClassName} style={variantStyle}>
- <div className={styles.header}>
- {title ? <h2 className={styles.title}>{title}</h2> : null}
- {description ? <p className={styles.description}>{description}</p> : null}
- </div>
-
- {rightControls ? (
- <div className={styles.previewWithRightControls}>
- <div className={styles.previewWithRightControlsSurface}>{previewContent}</div>
- <aside className={styles.previewRightControls}>{rightControls}</aside>
- </div>
- ) : headerControl ? (
- <div className={styles.previewContainer}>
- <div className={styles.previewToolbar}>{headerControl}</div>
- <div className={styles.previewSurface}>{previewContent}</div>
- </div>
- ) : (
- <div className={styles.preview}>{previewContent}</div>
- )}
-
- {!hidePrompt && (
- <div className={styles.prompt}>
- <div className={styles.promptHeader}>
- <p className={styles.promptLabel}>{promptTitle}</p>
- <PromptCopyButton text={promptCopyText} />
- </div>
- <div className={styles.promptField}>
- {typeof promptContent === "string" ? (
- <p className={styles.promptText}>{promptContent}</p>
- ) : (
- promptContent
- )}
- </div>
- </div>
- )}
- </div>
- );
-}
diff --git a/docs/app/components/components/preview/ColorSwatchesPreviewSection.tsx b/docs/app/components/components/preview/ColorSwatchesPreviewSection.tsx
deleted file mode 100644
index 15892fe64..000000000
--- a/docs/app/components/components/preview/ColorSwatchesPreviewSection.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-"use client";
-
-import Tooltip from "@components/components/Tooltip/Tooltip";
-import PreviewCode from "@components/components/preview/PreviewCode";
-import PreviewSection from "@components/components/preview/PreviewSection";
-import type { HeadingLevel, SwatchRow } from "@components/types";
-import { useEffect, useState } from "react";
-import styles from "./PreviewLayout.module.css";
-
-const getSwatchStep = (tokenName = ""): string => {
- const step = tokenName.replace(/^--swatch-[a-z]+-?/, "");
- return step || "base";
-};
-
-interface ColorSwatchesPreviewSectionProps {
- id?: string;
- title: string;
- description?: string;
- headingLevel?: HeadingLevel;
- rows: SwatchRow[];
- code?: string;
-}
-
-export default function ColorSwatchesPreviewSection({
- id,
- title,
- description,
- headingLevel,
- rows = [],
- code,
-}: ColorSwatchesPreviewSectionProps) {
- const [tokenValues, setTokenValues] = useState<Record<string, string>>({});
-
- useEffect(() => {
- const computedStyles = getComputedStyle(document.body);
- const values: Record<string, string> = {};
- rows.forEach((row) => {
- (row.tokens ?? []).forEach((swatch) => {
- const tokenName = typeof swatch === "string" ? swatch : swatch.token;
- values[tokenName] = computedStyles.getPropertyValue(tokenName).trim() || "var(...)";
- });
- });
- setTokenValues(values);
- }, [rows]);
-
- return (
- <PreviewSection id={id} title={title} description={description} headingLevel={headingLevel}>
- <div className={styles.colorSwatchSectionContent}>
- <div className={styles.colorSwatchRows}>
- {rows.map((row, rowIndex) => (
- <div key={row.id ?? row.title ?? rowIndex} className={styles.colorSwatchRow}>
- <div className={styles.colorSwatchRowLine}>
- {row.title ? <h4 className={styles.foundationRowTitle}>{row.title}</h4> : null}
- <div className={styles.colorSwatchTrack}>
- {(row.tokens ?? []).map((swatch) => {
- const tokenName = typeof swatch === "string" ? swatch : swatch.token;
- const swatchStep = getSwatchStep(tokenName);
- const swatchValue =
- typeof swatch === "string"
- ? (tokenValues[tokenName] ?? "var(...)")
- : swatch.value;
- const tooltipContent = `${swatchStep} · ${swatchValue}`;
-
- return (
- <Tooltip key={tokenName} content={tooltipContent}>
- <span
- className={styles.colorSwatchDot}
- style={{ backgroundColor: `var(${tokenName})` }}
- aria-label={tokenName}
- />
- </Tooltip>
- );
- })}
- </div>
- </div>
- {row.description ? (
- <p className={styles.sectionDescription}>{row.description}</p>
- ) : null}
- </div>
- ))}
- </div>
- {code ? <PreviewCode code={code} /> : null}
- </div>
- </PreviewSection>
- );
-}
diff --git a/docs/app/components/components/preview/ColorTokenPreviewSection.tsx b/docs/app/components/components/preview/ColorTokenPreviewSection.tsx
deleted file mode 100644
index 1d83ab730..000000000
--- a/docs/app/components/components/preview/ColorTokenPreviewSection.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import PreviewSwatchesSection from "@components/components/preview/PreviewSwatchesSection";
-import type { ComponentProps } from "react";
-
-type ColorTokenPreviewSectionProps = ComponentProps<typeof PreviewSwatchesSection>;
-
-export default function ColorTokenPreviewSection(props: ColorTokenPreviewSectionProps) {
- return <PreviewSwatchesSection {...props} />;
-}
diff --git a/docs/app/components/components/preview/ColorTokenTable.tsx b/docs/app/components/components/preview/ColorTokenTable.tsx
deleted file mode 100644
index 85effc4dc..000000000
--- a/docs/app/components/components/preview/ColorTokenTable.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import FoundationTable from "@components/components/preview/FoundationTable";
-import type { ColorTokenItem, TableColumn } from "@components/types";
-import styles from "./FoundationTokenTable.module.css";
-
-const columns: TableColumn[] = [
- { key: "token", label: "Color token" },
- { key: "useCase", label: "Use case" },
- { key: "className", label: "Class name" },
-];
-
-const toDisplayName = (token = ""): string =>
- token
- .replace(/^--/, "")
- .replace(/^openui-/, "")
- .replace(/^(openui|text|interactive|border)-/, "")
- .split("-")
- .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
- .join(" ");
-
-interface ColorTokenTableProps {
- items: ColorTokenItem[];
-}
-
-export default function ColorTokenTable({ items = [] }: ColorTokenTableProps) {
- return (
- <FoundationTable columns={columns}>
- {items.map((item) => (
- <tr key={item.token} className={styles.foundationTableBodyRow}>
- <td className={styles.foundationTableCell}>
- <div className={styles.foundationTokenCell}>
- <span
- className={styles.foundationColorDot}
- style={{ backgroundColor: `var(${item.token})` }}
- />
- <span>{item.label ?? toDisplayName(item.token)}</span>
- </div>
- </td>
- <td className={styles.foundationTableCell}>{item.useCase}</td>
- <td className={styles.foundationTableCell}>
- <code className={styles.foundationTokenName}>{item.className ?? item.token}</code>
- </td>
- </tr>
- ))}
- </FoundationTable>
- );
-}
diff --git a/docs/app/components/components/preview/FoundationTable.tsx b/docs/app/components/components/preview/FoundationTable.tsx
deleted file mode 100644
index 603074363..000000000
--- a/docs/app/components/components/preview/FoundationTable.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import type { TableColumn } from "@components/types";
-import type { ReactNode } from "react";
-import styles from "./FoundationTokenTable.module.css";
-
-interface FoundationTableProps {
- columns: TableColumn[];
- colgroup?: ReactNode;
- children: ReactNode;
-}
-
-export default function FoundationTable({ columns, colgroup, children }: FoundationTableProps) {
- return (
- <table className={styles.foundationTable}>
- {colgroup}
- <thead>
- <tr className={styles.foundationTableHeadRow}>
- {columns.map((column) => (
- <th key={column.key} className={styles.foundationTableHeaderCell} scope="col">
- {column.label}
- </th>
- ))}
- </tr>
- </thead>
- <tbody>{children}</tbody>
- </table>
- );
-}
diff --git a/docs/app/components/components/preview/FoundationTokenTable.module.css b/docs/app/components/components/preview/FoundationTokenTable.module.css
deleted file mode 100644
index 167ae4eb4..000000000
--- a/docs/app/components/components/preview/FoundationTokenTable.module.css
+++ /dev/null
@@ -1,85 +0,0 @@
-.foundationTable {
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-.foundationTableHeadRow {
- border-bottom: 1px solid var(--openui-border-default);
-}
-
-.foundationTableHeaderCell {
- padding: var(--openui-space-m) var(--openui-space-000);
- text-align: left;
- font: var(--openui-text-label-sm-heavy);
- color: var(--openui-text-neutral-primary);
-}
-
-.foundationTableBodyRow {
- border-bottom: 1px solid var(--openui-border-default);
-}
-
-.foundationTableCell {
- padding: var(--openui-space-l) var(--openui-space-000);
- font: var(--openui-text-body-sm);
- color: var(--openui-text-neutral-primary);
- vertical-align: middle;
-}
-
-.foundationTokenCell {
- display: flex;
- align-items: center;
- gap: var(--openui-space-s);
-}
-
-.foundationColorDot {
- width: 20px;
- height: 20px;
- border-radius: var(--openui-radius-full);
- border: 1px solid var(--openui-border-default);
- flex-shrink: 0;
-}
-
-.foundationTokenName {
- margin: 0;
- font: var(--openui-text-code-sm);
- color: var(--openui-text-neutral-primary);
-}
-
-.typographyTokenPreview {
- margin: 0;
- color: var(--openui-text-neutral-primary);
-}
-
-.typographyExampleCol {
- width: 68%;
-}
-
-.typographyClassCol {
- width: 32%;
-}
-
-.foundationComponentsPlaceholder {
- margin-top: var(--openui-space-l);
- border: 1px dashed var(--openui-border-default);
- border-radius: var(--openui-radius-m);
- min-height: 120px;
- background: var(--openui-sunk-light);
- display: flex;
- align-items: center;
- justify-content: center;
- font: var(--openui-text-body-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-.tokenGroupStack {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
-}
-
-.tokenGroupTitle {
- margin: 0 0 var(--openui-space-s) 0;
- font: var(--openui-text-label-default-heavy);
- color: var(--openui-text-neutral-primary);
-}
diff --git a/docs/app/components/components/preview/PreviewCode.tsx b/docs/app/components/components/preview/PreviewCode.tsx
deleted file mode 100644
index b24a87fd7..000000000
--- a/docs/app/components/components/preview/PreviewCode.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import CodeBlock from "@components/components/CodeBlock/CodeBlock";
-import type { ThemeMode } from "@components/types";
-
-interface PreviewCodeProps {
- code?: string;
- themeMode?: ThemeMode;
-}
-
-export default function PreviewCode({ code, themeMode }: PreviewCodeProps) {
- if (!code) return null;
- return <CodeBlock code={code} themeMode={themeMode} />;
-}
diff --git a/docs/app/components/components/preview/PreviewLayout.module.css b/docs/app/components/components/preview/PreviewLayout.module.css
deleted file mode 100644
index 43e67e9af..000000000
--- a/docs/app/components/components/preview/PreviewLayout.module.css
+++ /dev/null
@@ -1,528 +0,0 @@
-.main {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
-}
-
-.section {
- scroll-margin-top: 88px;
- padding: 24px 24px 24px 80px;
- background: var(--openui-foreground);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-3xl);
-}
-
-.section > * {
- width: 100%;
- max-width: var(--section-content-max-width, 800px);
- box-sizing: border-box;
-}
-
-.sectionHeader {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-m);
-}
-
-.sectionTitle {
- color: var(--openui-text-neutral-primary);
-}
-
-.sectionTitlePage {
- font: var(--openui-text-heading-xl);
-}
-
-.sectionTitleSection {
- font: var(--openui-text-heading-sm);
-}
-
-.sectionDescription {
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
-}
-
-.foundationRows {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-m-l);
-}
-
-.foundationRow {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s-m);
-}
-
-.foundationRowTitle {
- font: var(--openui-text-label-default-heavy);
- color: var(--openui-text-neutral-primary);
-}
-
-.foundationSwatchTrack {
- display: grid;
- grid-template-columns: repeat(14, minmax(24px, 1fr));
- gap: var(--openui-space-s-m);
- overflow-x: auto;
- overflow-y: visible;
- padding-bottom: 2px;
-}
-
-.foundationSwatchItem {
- min-width: 24px;
-}
-
-.foundationSwatch {
- width: 100%;
- height: 56px;
- display: block;
- border-radius: var(--openui-radius-s);
- border: 1px solid var(--openui-border-default);
-}
-
-.swatchTooltip {
- display: block;
-}
-
-.foundationSwatchLabel {
- display: block;
- margin-top: 6px;
- font-family: var(--font-geist-mono);
- font-size: 11px;
- line-height: 16px;
- color: var(--openui-text-neutral-secondary);
- text-align: center;
- white-space: nowrap;
-}
-
-.swatchLabelTooltip {
- display: block;
- width: fit-content;
- margin: 0 auto;
- cursor: default;
-}
-
-.typographyRows {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-m);
-}
-
-.typographyRow {
- display: grid;
- grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
- align-items: center;
- gap: var(--openui-space-m-l);
- padding: 14px 16px;
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-s);
- background: var(--openui-foreground);
-}
-
-.typographyVariable {
- font-family: var(--font-geist-mono);
- font-size: 12px;
- line-height: 18px;
- color: var(--openui-text-neutral-secondary);
- white-space: nowrap;
-}
-
-.typographySample {
- color: var(--openui-text-neutral-primary);
-}
-
-.tokenRows {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s-m);
-}
-
-.tokenRow {
- display: grid;
- grid-template-columns: minmax(220px, 280px) minmax(80px, 120px) minmax(0, 1fr);
- gap: var(--openui-space-m);
- align-items: center;
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-s);
- background: var(--openui-foreground);
- padding: 12px 14px;
-}
-
-.tokenName {
- font-family: var(--font-geist-mono);
- font-size: 12px;
- line-height: 18px;
- color: var(--openui-text-neutral-secondary);
-}
-
-.tokenValue {
- font-family: var(--font-geist-mono);
- font-size: 12px;
- line-height: 18px;
- color: var(--openui-text-neutral-primary);
-}
-
-.tokenPreview {
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-s);
- background: var(--openui-sunk-light);
- min-height: 44px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
-}
-
-.shapeStrip {
- display: flex;
- gap: var(--openui-space-s-m);
- align-items: center;
- flex-wrap: wrap;
-}
-
-.shapeTile {
- width: 72px;
- height: 44px;
- border: 1px solid var(--openui-border-default);
- background: var(--openui-interactive-accent-default);
-}
-
-.shadowSurface {
- padding: 20px;
- border-radius: var(--openui-radius-l);
- background: var(--openui-foreground);
- border: 1px solid var(--openui-border-default);
-}
-
-.shadowCard {
- height: 60px;
- border-radius: var(--openui-radius-m);
- background: var(--openui-foreground);
- border: 1px solid var(--openui-border-default);
-}
-
-.motionRow {
- display: grid;
- grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
- gap: var(--openui-space-m);
- align-items: center;
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-s);
- padding: 12px 14px;
-}
-
-.motionTrack {
- position: relative;
- height: 12px;
- border-radius: var(--openui-radius-full);
- background: var(--openui-sunk-light);
- overflow: hidden;
-}
-
-.motionDot {
- position: absolute;
- top: 1px;
- left: 1px;
- width: 10px;
- height: 10px;
- border-radius: var(--openui-radius-full);
- background: var(--openui-interactive-accent-default);
-}
-
-.previewHeader {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--openui-space-m);
-}
-
-.previewTitle {
- font-size: 16px;
- font-weight: 500;
-}
-
-.previewToggle {
- display: inline-flex;
- gap: var(--openui-space-2xs);
- padding: 4px;
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-full);
- background: var(--openui-foreground);
- box-shadow: var(--openui-shadow-s);
-}
-
-.previewToggleButton {
- border: 1px solid transparent;
- background: transparent;
- color: var(--openui-text-neutral-secondary);
- border-radius: var(--openui-radius-s);
- padding: 6px 10px;
- font-size: 12px;
- line-height: 16px;
- cursor: pointer;
- transition:
- background-color var(--motion-duration-fast) var(--motion-ease-standard),
- color var(--motion-duration-fast) var(--motion-ease-standard),
- border-color var(--motion-duration-fast) var(--motion-ease-standard),
- box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
-}
-
-.previewToggleButton:hover {
- background: var(--openui-highlight-subtle);
- color: var(--openui-text-neutral-primary);
-}
-
-.previewToggleButton:active {
- background: var(--openui-highlight);
-}
-
-.previewToggleButtonActive {
- color: var(--openui-text-accent-primary);
- background: var(--openui-interactive-accent-default);
- border-color: var(--openui-border-interactive-selected);
- box-shadow: var(--openui-shadow-s);
-}
-
-.previewToggleButtonActive:hover {
- background: var(--openui-interactive-accent-hover);
- color: var(--openui-text-accent-primary);
-}
-
-.previewToggleButtonActive:active {
- background: var(--openui-interactive-accent-pressed);
-}
-
-.previewToggleButton:focus-visible {
- outline: 2px solid var(--openui-border-interactive-selected);
- outline-offset: 2px;
-}
-
-.previewShell {
- --preview-shell-bg: var(--swatch-neutral-950);
- --preview-frame-bg: var(--swatch-neutral-900);
- --preview-item-border: var(--openui-border-accent);
- width: 100%;
- max-width: 800px;
- box-sizing: border-box;
- border-radius: var(--openui-radius-l);
- background: var(--preview-shell-bg);
- padding: 24px;
-}
-
-.previewFrame {
- border-radius: var(--openui-radius-l);
- background: var(--preview-frame-bg);
- padding: 16px;
-}
-
-.previewSwatchRows {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-m-l);
-}
-
-.colorSwatchRows {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
-}
-
-.previewSwatchRow {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s-m);
-}
-
-.colorSwatchRow {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xs);
-}
-
-.colorSwatchSectionContent {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-xl);
- margin-top: var(--openui-space-s);
-}
-
-.previewGrid {
- display: grid;
- grid-template-columns: repeat(4, minmax(0, 1fr));
- gap: var(--openui-space-m);
-}
-
-.colorSwatchGrid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
- gap: var(--openui-space-m);
-}
-
-.colorSwatchRowLine {
- display: grid;
- grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
- align-items: center;
- gap: var(--openui-space-m-l);
-}
-
-.colorSwatchTrack {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: var(--openui-space-s);
-}
-
-.colorSwatchDot {
- width: 28px;
- height: 28px;
- border-radius: var(--openui-radius-full);
- border: 1px solid var(--openui-border-default);
- display: inline-block;
-}
-
-.previewItem {
- min-height: 86px;
- border-radius: var(--openui-radius-m);
- border: 1px solid var(--preview-item-border);
-}
-
-.semanticCard {
- min-height: 144px;
- padding: var(--openui-space-m);
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-start;
- gap: var(--openui-space-s);
-}
-
-.semanticCardValue {
- margin: 0;
- font-family: var(--openui-font-code);
- font-size: var(--openui-font-size-sm);
- font-weight: var(--openui-font-weight-regular);
- line-height: var(--openui-line-height-code);
- letter-spacing: var(--openui-text-code-sm-letter-spacing);
-}
-
-.semanticCardLabel {
- margin: 0;
- font: var(--openui-text-label-sm-heavy);
-}
-
-.semanticCardToneDark {
- color: var(--openui-text-neutral-primary);
-}
-
-.semanticCardToneDark .semanticCardValue {
- color: var(--openui-text-neutral-secondary);
-}
-
-.semanticCardToneLight {
- color: var(--openui-text-accent-primary);
-}
-
-.semanticCardToneLight .semanticCardValue {
- color: var(--openui-text-accent-secondary);
-}
-
-.previewShell[data-preview-theme="light"] {
- --preview-shell-bg: var(--swatch-neutral-200);
- --preview-frame-bg: var(--swatch-neutral-100);
- --preview-item-border: var(--openui-border-default);
- --openui-background: var(--swatch-neutral-100);
- --openui-foreground: var(--swatch-white);
- --openui-popover-background: var(--swatch-white);
- --openui-sunk-light: var(--swatch-black-a02);
- --openui-sunk: var(--swatch-black-a04);
- --openui-sunk-deep: var(--swatch-black-a08);
- --openui-elevated: var(--swatch-black-a16);
- --openui-overlay: var(--swatch-black-a24);
- --openui-highlight-subtle: var(--swatch-black-a04);
- --openui-highlight: var(--swatch-black-a08);
- --openui-highlight-strong: var(--swatch-black-a16);
- --openui-highlight-intense: var(--swatch-black-a32);
- --openui-inverted-background: var(--swatch-black-a96);
-}
-
-.previewShell[data-preview-theme="dark"] {
- --preview-shell-bg: var(--swatch-neutral-950);
- --preview-frame-bg: var(--swatch-neutral-900);
- --preview-item-border: var(--openui-border-accent);
- --openui-background: var(--swatch-neutral-900);
- --openui-foreground: var(--swatch-neutral-800);
- --openui-popover-background: var(--swatch-neutral-800);
- --openui-sunk-light: var(--swatch-white-a02);
- --openui-sunk: var(--swatch-white-a04);
- --openui-sunk-deep: var(--swatch-white-a08);
- --openui-elevated: var(--swatch-white-a16);
- --openui-overlay: var(--swatch-black-a50);
- --openui-highlight-subtle: var(--swatch-white-a04);
- --openui-highlight: var(--swatch-white-a08);
- --openui-highlight-strong: var(--swatch-white-a16);
- --openui-highlight-intense: var(--swatch-white-a30);
- --openui-inverted-background: var(--swatch-white-a96);
-}
-
-@keyframes foundationMotionSlide {
- from {
- transform: translateX(0);
- }
-
- to {
- transform: translateX(240px);
- }
-}
-
-@media (max-width: 900px) {
- .tokenRow {
- grid-template-columns: 1fr;
- gap: var(--openui-space-s);
- }
-
- .typographyRow {
- grid-template-columns: 1fr;
- align-items: flex-start;
- gap: var(--openui-space-s-m);
- }
-
- .typographyVariable {
- white-space: normal;
- }
-
- .motionRow {
- grid-template-columns: 1fr;
- gap: var(--openui-space-s);
- }
-
- .previewTitle {
- font-size: 24px;
- line-height: 32px;
- }
-
- .previewGrid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
-}
-
-@media (max-width: 700px) {
- .section {
- padding: 16px;
- }
-}
-
-@media (max-width: 560px) {
- .previewGrid {
- grid-template-columns: 1fr;
- }
-
- .colorSwatchGrid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
-
- .colorSwatchRowLine {
- grid-template-columns: 1fr;
- gap: var(--openui-space-s);
- }
-}
diff --git a/docs/app/components/components/preview/PreviewPage.tsx b/docs/app/components/components/preview/PreviewPage.tsx
deleted file mode 100644
index c911e50e5..000000000
--- a/docs/app/components/components/preview/PreviewPage.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { ReactNode } from "react";
-import styles from "./PreviewLayout.module.css";
-
-interface PreviewPageProps {
- children: ReactNode;
-}
-
-export default function PreviewPage({ children }: PreviewPageProps) {
- return <main className={styles.main}>{children}</main>;
-}
diff --git a/docs/app/components/components/preview/PreviewSection.tsx b/docs/app/components/components/preview/PreviewSection.tsx
deleted file mode 100644
index fcb4503c2..000000000
--- a/docs/app/components/components/preview/PreviewSection.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import type { HeadingLevel } from "@components/types";
-import type { ReactNode } from "react";
-import styles from "./PreviewLayout.module.css";
-import PreviewSectionHeader from "./PreviewSectionHeader";
-
-interface PreviewSectionProps {
- id?: string;
- title: string;
- description?: string;
- headingLevel?: HeadingLevel;
- children?: ReactNode;
-}
-
-export default function PreviewSection({
- id,
- title,
- description,
- headingLevel = "h2",
- children,
-}: PreviewSectionProps) {
- return (
- <section id={id} className={styles.section}>
- <PreviewSectionHeader title={title} description={description} headingLevel={headingLevel} />
- {children}
- </section>
- );
-}
diff --git a/docs/app/components/components/preview/PreviewSectionHeader.tsx b/docs/app/components/components/preview/PreviewSectionHeader.tsx
deleted file mode 100644
index a671e1834..000000000
--- a/docs/app/components/components/preview/PreviewSectionHeader.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import type { HeadingLevel } from "@components/types";
-import styles from "./PreviewLayout.module.css";
-
-interface PreviewSectionHeaderProps {
- title?: string;
- description?: string;
- headingLevel?: HeadingLevel;
-}
-
-export default function PreviewSectionHeader({
- title,
- description,
- headingLevel = "h2",
-}: PreviewSectionHeaderProps) {
- const HeadingTag = headingLevel as keyof React.JSX.IntrinsicElements;
- const sectionTitleClassName =
- headingLevel === "h1"
- ? `${styles.sectionTitle} ${styles.sectionTitlePage}`
- : `${styles.sectionTitle} ${styles.sectionTitleSection}`;
-
- if (!title && !description) return null;
-
- return (
- <div className={styles.sectionHeader}>
- {title ? <HeadingTag className={sectionTitleClassName}>{title}</HeadingTag> : null}
- {description ? <p className={styles.sectionDescription}>{description}</p> : null}
- </div>
- );
-}
diff --git a/docs/app/components/components/preview/PreviewSwatchesSection.tsx b/docs/app/components/components/preview/PreviewSwatchesSection.tsx
deleted file mode 100644
index be3c2f057..000000000
--- a/docs/app/components/components/preview/PreviewSwatchesSection.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-"use client";
-
-import Tooltip from "@components/components/Tooltip/Tooltip";
-import PreviewCode from "@components/components/preview/PreviewCode";
-import PreviewSection from "@components/components/preview/PreviewSection";
-import PreviewThemeToggle from "@components/components/preview/PreviewThemeToggle";
-import type { HeadingLevel, SwatchInput, SwatchRow, ThemeMode } from "@components/types";
-import { useMemo, useState } from "react";
-import styles from "./PreviewLayout.module.css";
-
-const getDefaultLabel = (tokenName = ""): string =>
- tokenName
- .replace(/^--/, "")
- .replace(/^(openui|text|interactive|border)-/, "")
- .split("-")
- .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
- .join(" ");
-
-interface PreviewSwatchesSectionProps {
- id?: string;
- title: string;
- description?: string;
- headingLevel?: HeadingLevel;
- tokens?: SwatchInput[];
- rows?: SwatchRow[];
- code?: string;
- variant?: "grid" | "semantic-card";
- initialTheme?: ThemeMode;
- previewLabel?: string;
- showThemeToggle?: boolean;
-}
-
-export default function PreviewSwatchesSection({
- id,
- title,
- description,
- headingLevel,
- tokens,
- rows,
- code,
- variant = "grid",
- initialTheme = "dark",
- previewLabel = "Preview",
- showThemeToggle = true,
-}: PreviewSwatchesSectionProps) {
- const [previewTheme, setPreviewTheme] = useState<ThemeMode>(initialTheme);
-
- const normalizedRows = useMemo((): SwatchRow[] => {
- if (rows?.length) return rows;
- if (tokens?.length) return [{ id: "default", tokens }];
- return [];
- }, [rows, tokens]);
-
- return (
- <PreviewSection id={id} title={title} description={description} headingLevel={headingLevel}>
- <div className={styles.previewHeader}>
- <h3 className={styles.previewTitle}>{previewLabel}</h3>
- {showThemeToggle ? (
- <PreviewThemeToggle value={previewTheme} onChange={setPreviewTheme} />
- ) : null}
- </div>
-
- <div className={styles.previewShell} data-preview-theme={previewTheme}>
- <div className={styles.previewFrame}>
- <div className={styles.previewSwatchRows}>
- {normalizedRows.map((row, rowIndex) => (
- <div key={row.id ?? row.title ?? rowIndex} className={styles.previewSwatchRow}>
- {row.title ? <h4 className={styles.foundationRowTitle}>{row.title}</h4> : null}
- {row.description ? (
- <p className={styles.sectionDescription}>{row.description}</p>
- ) : null}
- <div className={styles.previewGrid}>
- {(row.tokens ?? []).map((swatch) => {
- const tokenName = typeof swatch === "string" ? swatch : swatch.token;
- const tokenLabel =
- typeof swatch === "string" ? getDefaultLabel(tokenName) : swatch.label;
- const tokenValue = typeof swatch === "string" ? undefined : swatch.value;
- const toneClassName =
- typeof swatch === "string"
- ? styles.semanticCardToneDark
- : swatch.tone === "light"
- ? styles.semanticCardToneLight
- : styles.semanticCardToneDark;
-
- return (
- <Tooltip key={tokenName} content={tokenName}>
- {variant === "semantic-card" ? (
- <article
- className={`${styles.previewItem} ${styles.semanticCard} ${toneClassName}`}
- style={{ backgroundColor: `var(${tokenName})` }}
- aria-label={tokenName}
- >
- <code className={styles.semanticCardValue}>
- {tokenValue ?? "var(...)"}
- </code>
- <p className={styles.semanticCardLabel}>
- {tokenLabel ?? getDefaultLabel(tokenName)}
- </p>
- </article>
- ) : (
- <div
- className={styles.previewItem}
- style={{ backgroundColor: `var(${tokenName})` }}
- aria-label={tokenName}
- />
- )}
- </Tooltip>
- );
- })}
- </div>
- </div>
- ))}
- </div>
- </div>
- </div>
-
- <PreviewCode code={code} themeMode={previewTheme} />
- </PreviewSection>
- );
-}
diff --git a/docs/app/components/components/preview/PreviewThemeToggle.tsx b/docs/app/components/components/preview/PreviewThemeToggle.tsx
deleted file mode 100644
index 6c4362a2b..000000000
--- a/docs/app/components/components/preview/PreviewThemeToggle.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import type { ThemeMode } from "@components/types";
-import styles from "./PreviewLayout.module.css";
-
-interface PreviewThemeToggleProps {
- value: ThemeMode;
- onChange: (theme: ThemeMode) => void;
-}
-
-export default function PreviewThemeToggle({ value, onChange }: PreviewThemeToggleProps) {
- return (
- <div className={styles.previewToggle} role="group" aria-label="Preview theme">
- <button
- type="button"
- className={`${styles.previewToggleButton}${value === "dark" ? ` ${styles.previewToggleButtonActive}` : ""}`}
- onClick={() => onChange("dark")}
- >
- Dark
- </button>
- <button
- type="button"
- className={`${styles.previewToggleButton}${value === "light" ? ` ${styles.previewToggleButtonActive}` : ""}`}
- onClick={() => onChange("light")}
- >
- Light
- </button>
- </div>
- );
-}
diff --git a/docs/app/components/components/preview/PromptCopyButton.tsx b/docs/app/components/components/preview/PromptCopyButton.tsx
deleted file mode 100644
index 8317e2816..000000000
--- a/docs/app/components/components/preview/PromptCopyButton.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-"use client";
-
-import { IconButton } from "@openuidev/react-ui";
-import { Check, Copy } from "lucide-react";
-import { useEffect, useState } from "react";
-
-interface PromptCopyButtonProps {
- text: string;
-}
-
-const FEEDBACK_DURATION_MS = 1600;
-
-export default function PromptCopyButton({ text }: PromptCopyButtonProps) {
- const [copied, setCopied] = useState(false);
- const canCopy = text.trim().length > 0;
-
- useEffect(() => {
- if (!copied) return;
-
- const timeoutId = window.setTimeout(() => {
- setCopied(false);
- }, FEEDBACK_DURATION_MS);
-
- return () => window.clearTimeout(timeoutId);
- }, [copied]);
-
- const handleCopy = async () => {
- if (!canCopy) return;
-
- try {
- await navigator.clipboard.writeText(text);
- setCopied(true);
- } catch {
- setCopied(false);
- }
- };
-
- return (
- <IconButton
- icon={copied ? <Check size={14} /> : <Copy size={14} />}
- variant="tertiary"
- size="extra-small"
- aria-label={copied ? "Prompt copied" : "Copy prompt"}
- onClick={handleCopy}
- disabled={!canCopy}
- />
- );
-}
diff --git a/docs/app/components/components/preview/SegmentedToggle.module.css b/docs/app/components/components/preview/SegmentedToggle.module.css
deleted file mode 100644
index ed56b8ed6..000000000
--- a/docs/app/components/components/preview/SegmentedToggle.module.css
+++ /dev/null
@@ -1,71 +0,0 @@
-.root {
- width: 100%;
- display: grid;
- grid-template-columns: repeat(var(--segment-count, 2), minmax(max-content, 1fr));
- gap: var(--openui-space-2xs);
- padding: var(--openui-space-3xs);
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-l);
- background: var(--openui-highlight-subtle);
- box-shadow: var(--openui-shadow-s);
- box-sizing: border-box;
- font: var(--openui-text-label-sm);
- overflow-x: auto;
- scrollbar-width: none;
-}
-
-.root::-webkit-scrollbar {
- display: none;
-}
-
-.option {
- width: 100%;
- min-height: 32px;
- padding-inline: var(--openui-space-xs);
- border: 1px solid transparent;
- border-radius: var(--openui-radius-m);
- background: transparent;
- color: var(--openui-text-neutral-secondary);
- font: var(--openui-text-label-sm);
- display: inline-flex;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- white-space: nowrap;
- cursor: pointer;
- transition:
- background-color var(--motion-duration-fast) var(--motion-ease-standard),
- color var(--motion-duration-fast) var(--motion-ease-standard),
- border-color var(--motion-duration-fast) var(--motion-ease-standard),
- box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
-}
-
-.option:hover {
- background: var(--openui-highlight-subtle);
- color: var(--openui-text-neutral-primary);
-}
-
-.option:active {
- background: var(--openui-highlight);
-}
-
-.optionSelected {
- border-color: var(--openui-border-default);
- background: var(--openui-foreground);
- color: var(--openui-text-neutral-primary);
- box-shadow: var(--openui-shadow-s);
-}
-
-.optionSelected:hover {
- background: var(--openui-elevated-light);
-}
-
-.option:focus-visible {
- outline: 2px solid var(--openui-border-interactive-selected);
- outline-offset: 1px;
-}
-
-.option:disabled {
- cursor: not-allowed;
- color: var(--openui-text-neutral-tertiary);
-}
diff --git a/docs/app/components/components/preview/SegmentedToggle.tsx b/docs/app/components/components/preview/SegmentedToggle.tsx
deleted file mode 100644
index f0d8d1e0d..000000000
--- a/docs/app/components/components/preview/SegmentedToggle.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-"use client";
-
-import type { CSSProperties } from "react";
-import styles from "./SegmentedToggle.module.css";
-
-export interface SegmentedToggleOption<T extends string> {
- label: string;
- value: T;
- disabled?: boolean;
-}
-
-interface SegmentedToggleProps<T extends string> {
- ariaLabel: string;
- options: SegmentedToggleOption<T>[];
- value: T;
- onChange: (value: T) => void;
-}
-
-export default function SegmentedToggle<T extends string>({
- ariaLabel,
- options,
- value,
- onChange,
-}: SegmentedToggleProps<T>) {
- const rootStyle = { "--segment-count": options.length } as CSSProperties;
-
- return (
- <div className={styles.root} style={rootStyle} role="tablist" aria-label={ariaLabel}>
- {options.map((option) => {
- const isSelected = option.value === value;
-
- return (
- <button
- key={option.value}
- type="button"
- className={`${styles.option} ${isSelected ? styles.optionSelected : ""}`}
- onClick={() => onChange(option.value)}
- disabled={option.disabled}
- role="tab"
- aria-selected={isSelected}
- >
- {option.label}
- </button>
- );
- })}
- </div>
- );
-}
diff --git a/docs/app/components/components/preview/TokenRows.tsx b/docs/app/components/components/preview/TokenRows.tsx
deleted file mode 100644
index 30ed6ab24..000000000
--- a/docs/app/components/components/preview/TokenRows.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import type { FoundationTokenItem } from "@components/types";
-import type { ReactNode } from "react";
-import styles from "./PreviewLayout.module.css";
-
-interface TokenRowsProps {
- items: FoundationTokenItem[];
- renderPreview: (item: FoundationTokenItem) => ReactNode;
-}
-
-export default function TokenRows({ items, renderPreview }: TokenRowsProps) {
- return (
- <div className={styles.tokenRows}>
- {items.map((item) => (
- <article key={item.key ?? item.token} className={styles.tokenRow}>
- <code className={styles.tokenName}>{item.token}</code>
- <code className={styles.tokenValue}>{item.value ?? "..."}</code>
- <div className={styles.tokenPreview}>{renderPreview(item)}</div>
- </article>
- ))}
- </div>
- );
-}
diff --git a/docs/app/components/components/preview/TypographyRows.tsx b/docs/app/components/components/preview/TypographyRows.tsx
deleted file mode 100644
index d44731cc7..000000000
--- a/docs/app/components/components/preview/TypographyRows.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import type { TypographyRow } from "@components/types";
-import type { CSSProperties } from "react";
-import styles from "./PreviewLayout.module.css";
-
-interface TypographyRowsProps {
- rows: TypographyRow[];
- getStyle: (token: string) => CSSProperties;
-}
-
-export default function TypographyRows({ rows, getStyle }: TypographyRowsProps) {
- return (
- <div className={styles.typographyRows}>
- {rows.map((row) => (
- <article key={row.key ?? `${row.token}-${row.sample}`} className={styles.typographyRow}>
- <code className={styles.typographyVariable}>{row.token}</code>
- <p className={styles.typographySample} style={getStyle(row.token)}>
- {row.sample}
- </p>
- </article>
- ))}
- </div>
- );
-}
diff --git a/docs/app/components/components/preview/TypographyTokenTable.tsx b/docs/app/components/components/preview/TypographyTokenTable.tsx
deleted file mode 100644
index 0ffd14bd8..000000000
--- a/docs/app/components/components/preview/TypographyTokenTable.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import FoundationTable from "@components/components/preview/FoundationTable";
-import type { TableColumn, TypographyPreviewItem } from "@components/types";
-import styles from "./FoundationTokenTable.module.css";
-
-const columns: TableColumn[] = [
- { key: "preview", label: "Aa Example" },
- { key: "className", label: "Class name" },
-];
-
-interface TypographyTokenTableProps {
- items: TypographyPreviewItem[];
-}
-
-export default function TypographyTokenTable({ items = [] }: TypographyTokenTableProps) {
- return (
- <FoundationTable
- columns={columns}
- colgroup={
- <colgroup>
- <col className={styles.typographyExampleCol} />
- <col className={styles.typographyClassCol} />
- </colgroup>
- }
- >
- {items.map((item) => (
- <tr key={item.token} className={styles.foundationTableBodyRow}>
- <td className={styles.foundationTableCell}>
- <p className={styles.typographyTokenPreview} style={item.style}>
- {item.preview}
- </p>
- </td>
- <td className={styles.foundationTableCell}>
- <code className={styles.foundationTokenName}>{item.className ?? item.token}</code>
- </td>
- </tr>
- ))}
- </FoundationTable>
- );
-}
diff --git a/docs/app/components/components/preview/index.ts b/docs/app/components/components/preview/index.ts
deleted file mode 100644
index 009ac3ce2..000000000
--- a/docs/app/components/components/preview/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export { default as BlockVariantPreview } from "./BlockVariantPreview";
-export { default as ColorSwatchesPreviewSection } from "./ColorSwatchesPreviewSection";
-export { default as ColorTokenPreviewSection } from "./ColorTokenPreviewSection";
-export { default as ColorTokenTable } from "./ColorTokenTable";
-export { default as FoundationTable } from "./FoundationTable";
-export { default as PreviewCode } from "./PreviewCode";
-export { default as PreviewPage } from "./PreviewPage";
-export { default as PreviewSection } from "./PreviewSection";
-export { default as PreviewSectionHeader } from "./PreviewSectionHeader";
-export { default as PreviewSwatchesSection } from "./PreviewSwatchesSection";
-export { default as PreviewThemeToggle } from "./PreviewThemeToggle";
-export { default as SegmentedToggle } from "./SegmentedToggle";
-export { default as TokenRows } from "./TokenRows";
-export { default as TypographyRows } from "./TypographyRows";
-export { default as TypographyTokenTable } from "./TypographyTokenTable";
diff --git a/docs/app/components/components/preview/pages/ColorsPreviewPage.tsx b/docs/app/components/components/preview/pages/ColorsPreviewPage.tsx
deleted file mode 100644
index f44f47f99..000000000
--- a/docs/app/components/components/preview/pages/ColorsPreviewPage.tsx
+++ /dev/null
@@ -1,252 +0,0 @@
-import {
- ColorSwatchesPreviewSection,
- ColorTokenTable,
- PreviewPage,
- PreviewSection,
-} from "@components/components/preview";
-import tableStyles from "@components/components/preview/FoundationTokenTable.module.css";
-
-const surfaceItems = [
- { token: "--openui-background", useCase: "Page and canvas backgrounds." },
- { token: "--openui-foreground", useCase: "Card and container surfaces." },
- { token: "--openui-popover-background", useCase: "Floating surfaces like popovers and menus." },
- { token: "--openui-sunk", useCase: "Inset areas and subtle pressed backgrounds." },
- { token: "--openui-elevated", useCase: "Raised layers and elevated fills." },
- { token: "--openui-overlay", useCase: "Backdrop overlays behind modals and drawers." },
- { token: "--openui-highlight", useCase: "Hover emphasis on neutral surfaces." },
- { token: "--openui-inverted-background", useCase: "High-contrast inverse surface." },
- { token: "--openui-info-background", useCase: "Informational status backgrounds." },
- { token: "--openui-success-background", useCase: "Success status backgrounds." },
- { token: "--openui-alert-background", useCase: "Warning status backgrounds." },
- { token: "--openui-danger-background", useCase: "Danger and error status backgrounds." },
- { token: "--openui-purple-background", useCase: "Purple semantic backgrounds." },
- { token: "--openui-pink-background", useCase: "Pink semantic backgrounds." },
-];
-
-const textItems = [
- { token: "--openui-text-neutral-primary", useCase: "Primary readable text." },
- { token: "--openui-text-neutral-secondary", useCase: "Secondary descriptive copy." },
- { token: "--openui-text-neutral-tertiary", useCase: "Subtle helper text." },
- { token: "--openui-text-neutral-link", useCase: "Default link text." },
- { token: "--openui-text-brand", useCase: "Brand-colored text accents." },
- { token: "--openui-text-accent-primary", useCase: "Primary text on accent backgrounds." },
- { token: "--openui-text-accent-secondary", useCase: "Secondary text on accent backgrounds." },
- { token: "--openui-text-accent-tertiary", useCase: "Tertiary text on accent backgrounds." },
- { token: "--openui-text-white", useCase: "Explicit white text utility." },
- { token: "--openui-text-black", useCase: "Explicit black text utility." },
-];
-
-const interactiveBrandItems = [
- { token: "--openui-interactive-accent-default", useCase: "Primary accent action default fill." },
- { token: "--openui-interactive-accent-hover", useCase: "Primary accent action hover fill." },
- { token: "--openui-interactive-accent-pressed", useCase: "Primary accent action pressed fill." },
- {
- token: "--openui-interactive-accent-disabled",
- useCase: "Primary accent action disabled fill.",
- },
-];
-
-const interactiveDestructiveItems = [
- {
- token: "--openui-interactive-destructive-accent-default",
- useCase: "Destructive action default fill.",
- },
- {
- token: "--openui-interactive-destructive-accent-hover",
- useCase: "Destructive action hover fill.",
- },
- {
- token: "--openui-interactive-destructive-accent-pressed",
- useCase: "Destructive action pressed fill.",
- },
- {
- token: "--openui-interactive-destructive-accent-disabled",
- useCase: "Destructive action disabled fill.",
- },
-];
-
-const borderItems = [
- { token: "--openui-border-default", useCase: "Default outlines and separators." },
- { token: "--openui-border-interactive", useCase: "Interactive element borders." },
- { token: "--openui-border-interactive-emphasis", useCase: "High emphasis outlines." },
- { token: "--openui-border-interactive-selected", useCase: "Selected state borders." },
- { token: "--openui-border-accent", useCase: "Accent borders and outlines." },
- { token: "--openui-border-accent-emphasis", useCase: "High-emphasis accent borders." },
- { token: "--openui-border-info", useCase: "Info border state." },
- { token: "--openui-border-info-emphasis", useCase: "Info-emphasis border state." },
- { token: "--openui-border-alert", useCase: "Alert border state." },
- { token: "--openui-border-alert-emphasis", useCase: "Alert-emphasis border state." },
- { token: "--openui-border-success", useCase: "Success border state." },
- { token: "--openui-border-success-emphasis", useCase: "Success-emphasis border state." },
- { token: "--openui-border-danger", useCase: "Danger border state." },
- { token: "--openui-border-danger-emphasis", useCase: "Danger-emphasis border state." },
-];
-
-const swatchScale = [25, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 925, 950, 1000];
-const swatchFamilies = [
- "neutral",
- "slate",
- "gray",
- "zinc",
- "stone",
- "blue",
- "sky",
- "cyan",
- "teal",
- "emerald",
- "lime",
- "amber",
- "orange",
- "green",
- "yellow",
- "red",
- "purple",
- "violet",
- "fuchsia",
- "pink",
-];
-
-const alphaScale = [
- "a02",
- "a04",
- "a06",
- "a08",
- "a10",
- "a12",
- "a20",
- "a30",
- "a40",
- "a50",
- "a60",
- "a70",
- "a80",
- "a90",
- "a100",
-];
-const familyAlphaScale = [
- "a02",
- "a04",
- "a06",
- "a08",
- "a10",
- "a12",
- "a20",
- "a30",
- "a40",
- "a50",
- "a60",
- "a70",
- "a80",
- "a90",
- "a100",
-];
-const toTitleCase = (value: string) => value.charAt(0).toUpperCase() + value.slice(1);
-const familyTitleByFamily: Record<string, string> = {
- gray: "Steel",
- zinc: "Iron",
- stone: "Graphite",
-};
-const familyAlphaBaseByFamily: Record<string, number> = {
- neutral: 1000,
- slate: 1000,
- gray: 1000,
- zinc: 1000,
- stone: 1000,
-};
-
-const buildPaletteRow = (family: string) => ({
- id: `swatch-${family}`,
- title: familyTitleByFamily[family] ?? toTitleCase(family),
- tokens: swatchScale.map((step) => `--swatch-${family}-${step}`),
-});
-const buildFamilyAlphaRow = (family: string) => ({
- id: `swatch-alpha-${family}`,
- title: `${familyTitleByFamily[family] ?? toTitleCase(family)} alpha`,
- tokens: familyAlphaScale.map(
- (step) => `--swatch-${family}-${familyAlphaBaseByFamily[family] ?? 600}-${step}`,
- ),
-});
-
-const colorSwatchRows = [
- ...swatchFamilies.flatMap((family) => [buildPaletteRow(family), buildFamilyAlphaRow(family)]),
- {
- id: "swatch-alpha-black",
- title: "Black alpha",
- tokens: alphaScale.map((step) => `--swatch-black-${step}`),
- },
- {
- id: "swatch-alpha-white",
- title: "White alpha",
- tokens: alphaScale.map((step) => `--swatch-white-${step}`),
- },
-];
-
-export default function ColorsPreviewPage() {
- return (
- <PreviewPage>
- <PreviewSection
- id="foundation"
- title="Colors"
- headingLevel="h1"
- description="Foundation palette and semantic color tokens for surfaces, text, interactive states, and strokes."
- />
-
- <PreviewSection
- title="Surface"
- description="Surface tokens establish depth, contrast, and baseline backgrounds."
- >
- <ColorTokenTable items={surfaceItems} />
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Surface components preview coming soon.
- </div>
- </PreviewSection>
-
- <PreviewSection
- title="Text"
- description="Text tokens support hierarchy and semantic messaging states."
- >
- <ColorTokenTable items={textItems} />
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Text components preview coming soon.
- </div>
- </PreviewSection>
-
- <PreviewSection
- title="Accent"
- description="Accent interaction tokens define visual states for primary actions."
- >
- <ColorTokenTable items={interactiveBrandItems} />
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Accent components preview coming soon.
- </div>
- </PreviewSection>
-
- <PreviewSection
- title="Destructive"
- description="Destructive interaction tokens define visual states for destructive actions."
- >
- <ColorTokenTable items={interactiveDestructiveItems} />
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Destructive components preview coming soon.
- </div>
- </PreviewSection>
-
- <PreviewSection
- title="Stroke"
- description="Stroke tokens define default and semantic borders across components."
- >
- <ColorTokenTable items={borderItems} />
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Stroke components preview coming soon.
- </div>
- </PreviewSection>
-
- <ColorSwatchesPreviewSection
- id="swatches"
- title="Color swatches"
- description="Complete swatch palette shown below the semantic variable tokens."
- rows={colorSwatchRows}
- />
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/components/preview/pages/MotionPreviewPage.tsx b/docs/app/components/components/preview/pages/MotionPreviewPage.tsx
deleted file mode 100644
index 5b33ee308..000000000
--- a/docs/app/components/components/preview/pages/MotionPreviewPage.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-"use client";
-
-import { PreviewPage, PreviewSection } from "@components/components/preview";
-import styles from "@components/components/preview/PreviewLayout.module.css";
-import { useEffect, useState } from "react";
-
-const MOTION_TOKENS = [
- "--motion-duration-fast",
- "--motion-duration-default",
- "--motion-duration-slow",
- "--motion-duration-slower",
-];
-
-export default function MotionPreviewPage() {
- const [tokenValues, setTokenValues] = useState<Record<string, string>>({});
-
- useEffect(() => {
- const computedStyles = getComputedStyle(document.body);
- const map: Record<string, string> = {};
- MOTION_TOKENS.forEach((token) => {
- map[token] = computedStyles.getPropertyValue(token).trim() || "0ms";
- });
- map["--motion-ease-standard"] =
- computedStyles.getPropertyValue("--motion-ease-standard").trim() || "ease";
- map["--motion-ease-emphasized"] =
- computedStyles.getPropertyValue("--motion-ease-emphasized").trim() || "ease-in-out";
- setTokenValues(map);
- }, []);
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Motion"
- headingLevel="h1"
- description="Motion tokens standardize durations and easings for transitions and micro-interactions."
- >
- <div className={styles.tokenRows}>
- {MOTION_TOKENS.map((token) => (
- <article key={token} className={styles.motionRow}>
- <div>
- <code className={styles.tokenName}>{token}</code>
- <div className={styles.tokenValue}>{tokenValues[token] ?? "..."}</div>
- </div>
- <div className={styles.motionTrack}>
- <span
- className={styles.motionDot}
- style={{
- animationName: "foundationMotionSlide",
- animationDuration: `var(${token})`,
- animationTimingFunction: "var(--motion-ease-standard)",
- animationIterationCount: "infinite",
- animationDirection: "alternate",
- }}
- />
- </div>
- </article>
- ))}
- <article className={styles.tokenRow}>
- <code className={styles.tokenName}>--motion-ease-standard</code>
- <code className={styles.tokenValue}>
- {tokenValues["--motion-ease-standard"] ?? "..."}
- </code>
- <div className={styles.tokenPreview}>Primary easing curve</div>
- </article>
- <article className={styles.tokenRow}>
- <code className={styles.tokenName}>--motion-ease-emphasized</code>
- <code className={styles.tokenValue}>
- {tokenValues["--motion-ease-emphasized"] ?? "..."}
- </code>
- <div className={styles.tokenPreview}>Emphasized easing curve</div>
- </article>
- </div>
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/components/preview/pages/RadiusPreviewPage.tsx b/docs/app/components/components/preview/pages/RadiusPreviewPage.tsx
deleted file mode 100644
index ed2713949..000000000
--- a/docs/app/components/components/preview/pages/RadiusPreviewPage.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-"use client";
-
-import { FoundationTable, PreviewPage, PreviewSection } from "@components/components/preview";
-import tableStyles from "@components/components/preview/FoundationTokenTable.module.css";
-import { useEffect, useState } from "react";
-
-function formatRadiusLabel(token: string) {
- const rawLabel = token.replace("--openui-radius-", "");
- if (/^[a-z]+$/.test(rawLabel)) {
- return `${rawLabel.charAt(0).toUpperCase()}${rawLabel.slice(1)}`;
- }
- return rawLabel.toUpperCase();
-}
-
-const RADIUS_TOKENS = [
- "--openui-radius-none",
- "--openui-radius-3xs",
- "--openui-radius-2xs",
- "--openui-radius-xs",
- "--openui-radius-s",
- "--openui-radius-m",
- "--openui-radius-l",
- "--openui-radius-xl",
- "--openui-radius-2xl",
- "--openui-radius-3xl",
- "--openui-radius-4xl",
- "--openui-radius-5xl",
- "--openui-radius-6xl",
- "--openui-radius-7xl",
- "--openui-radius-8xl",
- "--openui-radius-9xl",
- "--openui-radius-full",
-];
-
-export default function RadiusPreviewPage() {
- const [tokenValues, setTokenValues] = useState<Record<string, string>>({});
-
- useEffect(() => {
- const computedStyles = getComputedStyle(document.body);
- const map: Record<string, string> = {};
- RADIUS_TOKENS.forEach((token) => {
- map[token] = computedStyles.getPropertyValue(token).trim() || "0";
- });
- setTokenValues(map);
- }, []);
-
- const radiusItems = RADIUS_TOKENS.map((token) => ({
- token,
- value: tokenValues[token] ?? "...",
- }));
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Radius"
- headingLevel="h1"
- description="Radius tokens define corner curvature for inputs, cards, popovers, chips, and avatars."
- >
- <FoundationTable
- columns={[
- { key: "name", label: "Name" },
- { key: "value", label: "Variable value" },
- { key: "className", label: "Class name" },
- ]}
- >
- {radiusItems.map((item) => (
- <tr key={item.token} className={tableStyles.foundationTableBodyRow}>
- <td className={tableStyles.foundationTableCell}>
- <span>{formatRadiusLabel(item.token)}</span>
- </td>
- <td className={tableStyles.foundationTableCell}>
- <code className={tableStyles.foundationTokenName}>{item.value ?? "..."}</code>
- </td>
- <td className={tableStyles.foundationTableCell}>
- <code className={tableStyles.foundationTokenName}>{item.token}</code>
- </td>
- </tr>
- ))}
- </FoundationTable>
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Radius components preview coming soon.
- </div>
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/components/preview/pages/ShadowsPreviewPage.tsx b/docs/app/components/components/preview/pages/ShadowsPreviewPage.tsx
deleted file mode 100644
index c81e6c755..000000000
--- a/docs/app/components/components/preview/pages/ShadowsPreviewPage.tsx
+++ /dev/null
@@ -1,165 +0,0 @@
-"use client";
-
-import { FoundationTable, PreviewPage, PreviewSection } from "@components/components/preview";
-import tableStyles from "@components/components/preview/FoundationTokenTable.module.css";
-import { useEffect, useState } from "react";
-
-const SHADOW_TOKENS = [
- { cssVar: "--openui-shadow-0", themeKey: "shadow0" },
- { cssVar: "--openui-shadow-s", themeKey: "shadowS" },
- { cssVar: "--openui-shadow-m", themeKey: "shadowM" },
- { cssVar: "--openui-shadow-l", themeKey: "shadowL" },
- { cssVar: "--openui-shadow-xl", themeKey: "shadowXl" },
- { cssVar: "--openui-shadow-2xl", themeKey: "shadow2xl" },
- { cssVar: "--openui-shadow-3xl", themeKey: "shadow3xl" },
-] as const;
-
-function formatShadowLabel(token: string) {
- const rawLabel = token.replace("--openui-shadow-", "");
- if (/^[a-z]+$/.test(rawLabel)) {
- return `${rawLabel.charAt(0).toUpperCase()}${rawLabel.slice(1)}`;
- }
- return rawLabel.toUpperCase();
-}
-
-function srgbChannelToLinear(channel: number) {
- const normalized = channel / 255;
- if (normalized <= 0.04045) return normalized / 12.92;
- return ((normalized + 0.055) / 1.055) ** 2.4;
-}
-
-function formatNumber(value: number, maxDecimals = 3) {
- const rounded = Number(value.toFixed(maxDecimals));
- if (!Number.isFinite(rounded)) return "0";
- if (Math.abs(rounded) < 0.0005) return "0";
- return `${rounded}`;
-}
-
-function rgbaToOklchDisplay(r: number, g: number, b: number, alpha = 1) {
- const rl = srgbChannelToLinear(r);
- const gl = srgbChannelToLinear(g);
- const bl = srgbChannelToLinear(b);
-
- const l = 0.4122214708 * rl + 0.5363325363 * gl + 0.0514459929 * bl;
- const m = 0.2119034982 * rl + 0.6806995451 * gl + 0.1073969566 * bl;
- const s = 0.0883024619 * rl + 0.2817188376 * gl + 0.6299787005 * bl;
-
- const lCbrt = Math.cbrt(l);
- const mCbrt = Math.cbrt(m);
- const sCbrt = Math.cbrt(s);
-
- const okl = 0.2104542553 * lCbrt + 0.793617785 * mCbrt - 0.0040720468 * sCbrt;
- const oka = 1.9779984951 * lCbrt - 2.428592205 * mCbrt + 0.4505937099 * sCbrt;
- const okb = 0.0259040371 * lCbrt + 0.7827717662 * mCbrt - 0.808675766 * sCbrt;
-
- const c = Math.sqrt(oka * oka + okb * okb);
- const h = (Math.atan2(okb, oka) * 180) / Math.PI;
- const hue = c < 1e-6 ? 0 : h < 0 ? h + 360 : h;
- const alphaString = Number.isFinite(alpha) ? formatNumber(alpha, 3) : "1";
-
- return `oklch(${formatNumber(okl)} ${formatNumber(c)} ${formatNumber(hue, 2)} / ${alphaString})`;
-}
-
-function hexToOklchDisplay(hexValue: string) {
- const hex = hexValue.replace("#", "");
- let red;
- let green;
- let blue;
- let alpha = 1;
-
- if (hex.length === 3 || hex.length === 4) {
- red = Number.parseInt(`${hex[0]}${hex[0]}`, 16);
- green = Number.parseInt(`${hex[1]}${hex[1]}`, 16);
- blue = Number.parseInt(`${hex[2]}${hex[2]}`, 16);
- if (hex.length === 4) alpha = Number.parseInt(`${hex[3]}${hex[3]}`, 16) / 255;
- } else if (hex.length === 6 || hex.length === 8) {
- red = Number.parseInt(hex.slice(0, 2), 16);
- green = Number.parseInt(hex.slice(2, 4), 16);
- blue = Number.parseInt(hex.slice(4, 6), 16);
- if (hex.length === 8) alpha = Number.parseInt(hex.slice(6, 8), 16) / 255;
- } else {
- return hexValue;
- }
-
- return rgbaToOklchDisplay(red, green, blue, alpha);
-}
-
-function rgbStringToOklchDisplay(rgbValue: string) {
- const match = rgbValue.match(/rgba?\(([^)]+)\)/i);
- if (!match) return rgbValue;
-
- const channels = match[1]
- .split(/[,\s/]+/)
- .filter(Boolean)
- .map((part) => Number.parseFloat(part));
-
- if (channels.length < 3 || channels.some((value) => Number.isNaN(value))) return rgbValue;
- const [r, g, b, a = 1] = channels;
- return rgbaToOklchDisplay(r, g, b, a);
-}
-
-function normalizeShadowValueToOklch(value: string) {
- if (!value || value === "none") return value;
-
- let normalized = value;
- normalized = normalized.replace(
- /#(?:[\da-fA-F]{3}|[\da-fA-F]{4}|[\da-fA-F]{6}|[\da-fA-F]{8})\b/g,
- (hex) => hexToOklchDisplay(hex),
- );
- normalized = normalized.replace(/rgba?\([^)]+\)/gi, (rgb) => rgbStringToOklchDisplay(rgb));
- return normalized;
-}
-
-export default function ShadowsPreviewPage() {
- const [tokenValues, setTokenValues] = useState<Record<string, string>>({});
-
- useEffect(() => {
- const computedStyles = getComputedStyle(document.body);
- const map: Record<string, string> = {};
- SHADOW_TOKENS.forEach(({ cssVar }) => {
- const rawValue = computedStyles.getPropertyValue(cssVar).trim() || "none";
- map[cssVar] = normalizeShadowValueToOklch(rawValue);
- });
- setTokenValues(map);
- }, []);
-
- const shadowItems = SHADOW_TOKENS.map(({ cssVar }) => ({
- token: cssVar,
- value: tokenValues[cssVar] ?? "...",
- }));
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Shadows"
- headingLevel="h1"
- description="Elevation tokens represent depth and hierarchy for surfaces like cards, modals, and dropdowns."
- >
- <FoundationTable
- columns={[
- { key: "name", label: "Name" },
- { key: "value", label: "Variable value" },
- { key: "className", label: "Class name" },
- ]}
- >
- {shadowItems.map((item) => (
- <tr key={item.token} className={tableStyles.foundationTableBodyRow}>
- <td className={tableStyles.foundationTableCell}>
- <span>{formatShadowLabel(item.token)}</span>
- </td>
- <td className={tableStyles.foundationTableCell}>
- <code className={tableStyles.foundationTokenName}>{item.value ?? "..."}</code>
- </td>
- <td className={tableStyles.foundationTableCell}>
- <code className={tableStyles.foundationTokenName}>{item.token}</code>
- </td>
- </tr>
- ))}
- </FoundationTable>
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Shadow components preview coming soon.
- </div>
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/components/preview/pages/SpacingPreviewPage.tsx b/docs/app/components/components/preview/pages/SpacingPreviewPage.tsx
deleted file mode 100644
index 6d93b2b39..000000000
--- a/docs/app/components/components/preview/pages/SpacingPreviewPage.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-"use client";
-
-import { FoundationTable, PreviewPage, PreviewSection } from "@components/components/preview";
-import tableStyles from "@components/components/preview/FoundationTokenTable.module.css";
-import { useEffect, useState } from "react";
-
-function formatSpacingLabel(token: string) {
- const raw = token.replace("--openui-space-", "");
- if (raw === "000") return "0";
- return raw.toUpperCase();
-}
-
-const SPACING_TOKENS = [
- "--openui-space-000",
- "--openui-space-3xs",
- "--openui-space-2xs",
- "--openui-space-xs",
- "--openui-space-s",
- "--openui-space-s-m",
- "--openui-space-m",
- "--openui-space-m-l",
- "--openui-space-l",
- "--openui-space-xl",
- "--openui-space-2xl",
- "--openui-space-3xl",
-];
-
-export default function SpacingPreviewPage() {
- const [tokenValues, setTokenValues] = useState<Record<string, string>>({});
-
- useEffect(() => {
- const computedStyles = getComputedStyle(document.body);
- const map: Record<string, string> = {};
- SPACING_TOKENS.forEach((token) => {
- map[token] = computedStyles.getPropertyValue(token).trim() || "0px";
- });
- setTokenValues(map);
- }, []);
-
- const spacingItems = SPACING_TOKENS.map((token) => ({
- token,
- value: tokenValues[token] ?? "...",
- }));
-
- return (
- <PreviewPage>
- <PreviewSection
- title="Spacing"
- headingLevel="h1"
- description="Spacing tokens are used for consistent gaps, padding, and layout rhythm across the system."
- >
- <FoundationTable
- columns={[
- { key: "name", label: "Name" },
- { key: "value", label: "Variable value" },
- { key: "className", label: "Class name" },
- ]}
- >
- {spacingItems.map((item) => (
- <tr key={item.token} className={tableStyles.foundationTableBodyRow}>
- <td className={tableStyles.foundationTableCell}>
- <span>{formatSpacingLabel(item.token)}</span>
- </td>
- <td className={tableStyles.foundationTableCell}>
- <code className={tableStyles.foundationTokenName}>{item.value ?? "..."}</code>
- </td>
- <td className={tableStyles.foundationTableCell}>
- <code className={tableStyles.foundationTokenName}>{item.token}</code>
- </td>
- </tr>
- ))}
- </FoundationTable>
- <div className={tableStyles.foundationComponentsPlaceholder}>
- Spacing components preview coming soon.
- </div>
- </PreviewSection>
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/components/preview/pages/TypographyPreviewPage.js b/docs/app/components/components/preview/pages/TypographyPreviewPage.js
deleted file mode 100644
index ecf53ed01..000000000
--- a/docs/app/components/components/preview/pages/TypographyPreviewPage.js
+++ /dev/null
@@ -1,159 +0,0 @@
-import { PreviewPage, PreviewSection, TypographyTokenTable } from "@components/components/preview";
-
-const typographySections = [
- {
- id: "heading",
- label: "Heading",
- description: "Display and hierarchy titles across pages and sections.",
- },
- {
- id: "body",
- label: "Body",
- description: "Long-form and supporting copy styles for content readability.",
- },
- {
- id: "label",
- label: "Label",
- description: "Compact labels for form controls, badges, and field metadata.",
- },
- {
- id: "numbers",
- label: "Numbers",
- description: "Numerical values for stats, metrics, and tabular data.",
- },
- {
- id: "code",
- label: "Code",
- description: "Monospace styles for snippets, tokens, and command text.",
- },
-];
-
-const typographyPreviewRows = {
- heading: [
- { token: "--openui-text-heading-xl", sample: "Make something people want" },
- { token: "--openui-text-heading-lg", sample: "Make something people want" },
- { token: "--openui-text-heading-md", sample: "Make something people want" },
- { token: "--openui-text-heading-sm", sample: "Make something people want" },
- { token: "--openui-text-heading-xs", sample: "Make something people want" },
- ],
- body: [
- {
- token: "--openui-text-body-lg",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-lg-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-default",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-default-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-sm",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-sm-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-xs",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-xs-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- ],
- label: [
- { token: "--openui-text-label-lg", sample: "Label Large" },
- { token: "--openui-text-label-lg-heavy", sample: "Label Large Heavy" },
- { token: "--openui-text-label-default", sample: "Label" },
- { token: "--openui-text-label-default-heavy", sample: "Label Heavy" },
- { token: "--openui-text-label-sm", sample: "Label Small" },
- { token: "--openui-text-label-sm-heavy", sample: "Label Small Heavy" },
- { token: "--openui-text-label-xs", sample: "Label Extra Small" },
- { token: "--openui-text-label-xs-heavy", sample: "Label Extra Small Heavy" },
- ],
- numbers: [
- { token: "--openui-text-numbers-lg", sample: "12,345,678.90" },
- { token: "--openui-text-numbers-lg-heavy", sample: "9,876.54" },
- { token: "--openui-text-numbers-default", sample: "345,678.12" },
- { token: "--openui-text-numbers-default-heavy", sample: "123,456.78" },
- { token: "--openui-text-numbers-sm", sample: "78,901.23" },
- { token: "--openui-text-numbers-sm-heavy", sample: "56,789.01" },
- { token: "--openui-text-numbers-xs", sample: "34,567.89" },
- { token: "--openui-text-numbers-xs-heavy", sample: "12,345.67" },
- ],
- code: [
- { token: "--openui-text-code-default", sample: "<Button variant='secondary' />" },
- { token: "--openui-text-code-default-heavy", sample: "pnpm run build && pnpm run start" },
- { token: "--openui-text-code-sm", sample: "const tokenName = '--openui-text-code-sm';" },
- {
- token: "--openui-text-code-sm-heavy",
- sample: "const tokenName = '--openui-text-code-sm-heavy';",
- },
- ],
-};
-
-const getTypographyTokenStyle = (token) => ({
- font: `var(${token})`,
- letterSpacing: `var(${token}-letter-spacing)`,
- color: "var(--openui-text-neutral-primary)",
-});
-
-const formatTypographyPreviewLabel = (token) => {
- const parts = token.replace(/^--openui-text-/, "").split("-");
- const [category, ...rest] = parts;
-
- const formatPart = (part) => {
- if (part === "default") return "Default";
- if (part === "heavy") return "Heavy";
- return part.toUpperCase();
- };
-
- const categoryLabel = category ? category.charAt(0).toUpperCase() + category.slice(1) : "Text";
- const variantLabel = rest.map(formatPart).join("-");
- return variantLabel ? `${categoryLabel}-${variantLabel}` : categoryLabel;
-};
-
-export default function TypographyPreviewPage() {
- return (
- <PreviewPage>
- <PreviewSection
- title="Typography"
- headingLevel="h1"
- description="Type tokens grouped by heading, body, label, numbers, and code families."
- />
-
- {typographySections.map((section) => (
- <PreviewSection key={section.id} title={section.label} description={section.description}>
- <TypographyTokenTable
- items={(typographyPreviewRows[section.id] ?? []).map((row) => ({
- token: row.token,
- preview:
- section.id === "heading"
- ? row.sample
- : (row.sample ?? formatTypographyPreviewLabel(row.token)),
- className: row.token,
- style: getTypographyTokenStyle(row.token),
- }))}
- />
- </PreviewSection>
- ))}
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/components/preview/pages/TypographyPreviewPage.tsx b/docs/app/components/components/preview/pages/TypographyPreviewPage.tsx
deleted file mode 100644
index 92f11906e..000000000
--- a/docs/app/components/components/preview/pages/TypographyPreviewPage.tsx
+++ /dev/null
@@ -1,159 +0,0 @@
-import { PreviewPage, PreviewSection, TypographyTokenTable } from "@components/components/preview";
-
-const typographySections = [
- {
- id: "heading",
- label: "Heading",
- description: "Display and hierarchy titles across pages and sections.",
- },
- {
- id: "body",
- label: "Body",
- description: "Long-form and supporting copy styles for content readability.",
- },
- {
- id: "label",
- label: "Label",
- description: "Compact labels for form controls, badges, and field metadata.",
- },
- {
- id: "numbers",
- label: "Numbers",
- description: "Numerical values for stats, metrics, and tabular data.",
- },
- {
- id: "code",
- label: "Code",
- description: "Monospace styles for snippets, tokens, and command text.",
- },
-];
-
-const typographyPreviewRows: Record<string, { token: string; sample: string }[]> = {
- heading: [
- { token: "--openui-text-heading-xl", sample: "Make something people want" },
- { token: "--openui-text-heading-lg", sample: "Make something people want" },
- { token: "--openui-text-heading-md", sample: "Make something people want" },
- { token: "--openui-text-heading-sm", sample: "Make something people want" },
- { token: "--openui-text-heading-xs", sample: "Make something people want" },
- ],
- body: [
- {
- token: "--openui-text-body-lg",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-lg-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-default",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-default-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-sm",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-sm-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-xs",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- {
- token: "--openui-text-body-xs-heavy",
- sample:
- "Body copy should stay comfortable to scan on long paragraphs and dense content surfaces.",
- },
- ],
- label: [
- { token: "--openui-text-label-lg", sample: "Label Large" },
- { token: "--openui-text-label-lg-heavy", sample: "Label Large Heavy" },
- { token: "--openui-text-label-default", sample: "Label" },
- { token: "--openui-text-label-default-heavy", sample: "Label Heavy" },
- { token: "--openui-text-label-sm", sample: "Label Small" },
- { token: "--openui-text-label-sm-heavy", sample: "Label Small Heavy" },
- { token: "--openui-text-label-xs", sample: "Label Extra Small" },
- { token: "--openui-text-label-xs-heavy", sample: "Label Extra Small Heavy" },
- ],
- numbers: [
- { token: "--openui-text-numbers-lg", sample: "12,345,678.90" },
- { token: "--openui-text-numbers-lg-heavy", sample: "9,876.54" },
- { token: "--openui-text-numbers-default", sample: "345,678.12" },
- { token: "--openui-text-numbers-default-heavy", sample: "123,456.78" },
- { token: "--openui-text-numbers-sm", sample: "78,901.23" },
- { token: "--openui-text-numbers-sm-heavy", sample: "56,789.01" },
- { token: "--openui-text-numbers-xs", sample: "34,567.89" },
- { token: "--openui-text-numbers-xs-heavy", sample: "12,345.67" },
- ],
- code: [
- { token: "--openui-text-code-default", sample: "<Button variant='secondary' />" },
- { token: "--openui-text-code-default-heavy", sample: "pnpm run build && pnpm run start" },
- { token: "--openui-text-code-sm", sample: "const tokenName = '--openui-text-code-sm';" },
- {
- token: "--openui-text-code-sm-heavy",
- sample: "const tokenName = '--openui-text-code-sm-heavy';",
- },
- ],
-};
-
-const getTypographyTokenStyle = (token: string) => ({
- font: `var(${token})`,
- letterSpacing: `var(${token}-letter-spacing)`,
- color: "var(--openui-text-neutral-primary)",
-});
-
-const formatTypographyPreviewLabel = (token: string) => {
- const parts = token.replace(/^--openui-text-/, "").split("-");
- const [category, ...rest] = parts;
-
- const formatPart = (part: string) => {
- if (part === "default") return "Default";
- if (part === "heavy") return "Heavy";
- return part.toUpperCase();
- };
-
- const categoryLabel = category ? category.charAt(0).toUpperCase() + category.slice(1) : "Text";
- const variantLabel = rest.map(formatPart).join("-");
- return variantLabel ? `${categoryLabel}-${variantLabel}` : categoryLabel;
-};
-
-export default function TypographyPreviewPage() {
- return (
- <PreviewPage>
- <PreviewSection
- title="Typography"
- headingLevel="h1"
- description="Type tokens grouped by heading, body, label, numbers, and code families."
- />
-
- {typographySections.map((section) => (
- <PreviewSection key={section.id} title={section.label} description={section.description}>
- <TypographyTokenTable
- items={(typographyPreviewRows[section.id] ?? []).map((row) => ({
- token: row.token,
- preview:
- section.id === "heading"
- ? row.sample
- : (row.sample ?? formatTypographyPreviewLabel(row.token)),
- className: row.token,
- style: getTypographyTokenStyle(row.token),
- }))}
- />
- </PreviewSection>
- ))}
- </PreviewPage>
- );
-}
diff --git a/docs/app/components/components/preview/pages/index.ts b/docs/app/components/components/preview/pages/index.ts
deleted file mode 100644
index caf060dd4..000000000
--- a/docs/app/components/components/preview/pages/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export { default as ColorsPreviewPage } from "./ColorsPreviewPage";
-export { default as MotionPreviewPage } from "./MotionPreviewPage";
-export { default as RadiusPreviewPage } from "./RadiusPreviewPage";
-export { default as ShadowsPreviewPage } from "./ShadowsPreviewPage";
-export { default as SpacingPreviewPage } from "./SpacingPreviewPage";
-export { default as TypographyPreviewPage } from "./TypographyPreviewPage";
diff --git a/docs/app/components/compose/page.tsx b/docs/app/components/compose/page.tsx
deleted file mode 100644
index f734dd869..000000000
--- a/docs/app/components/compose/page.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import { ComposeExamplePage } from "@components/components/compose";
-import { getGuideExampleById } from "@components/config/guide";
-
-export default function ComposePage() {
- const example = getGuideExampleById("prompt-control")!;
-
- return <ComposeExamplePage example={example} />;
-}
diff --git a/docs/app/components/config/guide.ts b/docs/app/components/config/guide.ts
deleted file mode 100644
index 3474f2ae8..000000000
--- a/docs/app/components/config/guide.ts
+++ /dev/null
@@ -1,483 +0,0 @@
-export interface GuidePreviewCard {
- id: string;
- title: string;
- description: string;
-}
-
-export interface GuideStep {
- id: string;
- title: string;
- description: string;
- previewCards?: GuidePreviewCard[];
- /** Theme property overrides (camelCase keys matching the Theme interface) used by ThemeProvider */
- themeOverrides?: Record<string, string>;
- /** Curated CSS variable names to values, displayed in the code block view */
- cssVariables?: Record<string, string>;
-}
-
-export interface GuideExample {
- id: string;
- title: string;
- description: string;
- summary: string;
- goalTheme?: Record<string, string>;
- /** Default CSS variable values before any guide step is applied (base theme). */
- defaultCssVariables?: Record<string, string>;
- steps: GuideStep[];
-}
-
-// ---------------------------------------------------------------------------
-// Customizing OpenUI – theme values
-// ---------------------------------------------------------------------------
-
-const POPPINS = '"Poppins", sans-serif';
-const CODE_FONT = '"SFMono-Regular", Menlo, monospace';
-
-const toPx = (v: number): string => (v === 0 ? "0" : `${Math.round(v * 100) / 100}px`);
-
-function buildTypography(family: string): Record<string, string> {
- return {
- fontBody: family,
- fontHeading: family,
- fontLabel: family,
- fontNumbers: family,
- fontCode: CODE_FONT,
- textBodyXs: `400 12px/1.5 ${family}`,
- textBodyXsHeavy: `500 12px/1.5 ${family}`,
- textBodySm: `400 14px/1.5 ${family}`,
- textBodySmHeavy: `500 14px/1.5 ${family}`,
- textBodyDefault: `400 16px/1.5 ${family}`,
- textBodyDefaultHeavy: `500 16px/1.5 ${family}`,
- textBodyLg: `400 18px/1.5 ${family}`,
- textBodyLgHeavy: `500 18px/1.5 ${family}`,
- textHeadingXs: `600 16px/1.25 ${family}`,
- textHeadingSm: `600 18px/1.25 ${family}`,
- textHeadingMd: `600 24px/1.1 ${family}`,
- textHeadingLg: `600 28px/1.1 ${family}`,
- textHeadingXl: `700 32px/1.1 ${family}`,
- textLabelXs: `400 12px/1.25 ${family}`,
- textLabelXsHeavy: `500 12px/1.25 ${family}`,
- textLabelSm: `400 14px/1.25 ${family}`,
- textLabelSmHeavy: `500 14px/1.25 ${family}`,
- textLabelDefault: `400 16px/1.25 ${family}`,
- textLabelDefaultHeavy: `500 16px/1.25 ${family}`,
- textLabelLg: `400 18px/1.25 ${family}`,
- textLabelLgHeavy: `500 18px/1.25 ${family}`,
- textNumbersXs: `400 12px/1.5 ${family}`,
- textNumbersXsHeavy: `500 12px/1.5 ${family}`,
- textNumbersSm: `400 14px/1.5 ${family}`,
- textNumbersSmHeavy: `500 14px/1.5 ${family}`,
- textNumbersDefault: `400 16px/1.5 ${family}`,
- textNumbersDefaultHeavy: `500 16px/1.5 ${family}`,
- textNumbersLg: `400 18px/1.5 ${family}`,
- textNumbersLgHeavy: `500 18px/1.5 ${family}`,
- textCodeSm: `400 12px/1.5 ${CODE_FONT}`,
- textCodeSmHeavy: `700 12px/1.5 ${CODE_FONT}`,
- textCodeDefault: `400 14px/1.5 ${CODE_FONT}`,
- textCodeDefaultHeavy: `700 14px/1.5 ${CODE_FONT}`,
- };
-}
-
-// Step 1 – accent color (purple swatch)
-const ACCENT_OVERRIDES: Record<string, string> = {
- interactiveAccentDefault: "oklch(0.558 0.252 302.321 / 1)",
- interactiveAccentHover: "oklch(0.558 0.252 302.321 / 0.82)",
- interactiveAccentPressed: "oklch(0.496 0.237 301.924 / 1)",
- interactiveAccentDisabled: "oklch(0.558 0.252 302.321 / 0.45)",
- textBrand: "oklch(0.558 0.252 302.321 / 1)",
- textAccentPrimary: "oklch(0.994 0.001 106.423 / 1)",
- textAccentSecondary: "oklch(0.994 0.001 106.423 / 0.6)",
- borderAccent: "oklch(0.558 0.252 302.321 / 0.16)",
- borderAccentEmphasis: "oklch(0.558 0.252 302.321 / 0.32)",
-};
-
-const ACCENT_CSS: Record<string, string> = {
- "--openui-interactive-accent-default": "oklch(0.558 0.252 302.321 / 1)",
- "--openui-interactive-accent-hover": "oklch(0.558 0.252 302.321 / 0.82)",
- "--openui-interactive-accent-pressed": "oklch(0.496 0.237 301.924 / 1)",
- "--openui-interactive-accent-disabled": "oklch(0.558 0.252 302.321 / 0.45)",
- "--openui-text-brand": "oklch(0.558 0.252 302.321 / 1)",
- "--openui-text-accent-primary": "oklch(0.994 0.001 106.423 / 1)",
- "--openui-border-accent": "oklch(0.558 0.252 302.321 / 0.16)",
- "--openui-border-accent-emphasis": "oklch(0.558 0.252 302.321 / 0.32)",
-};
-
-// Step 2 – base color (stone swatch)
-const BASE_OVERRIDES: Record<string, string> = {
- background: "oklch(0.97 0.001 106.424 / 1)",
- foreground: "oklch(0.994 0.001 106.423 / 1)",
- popoverBackground: "oklch(0.994 0.001 106.423 / 1)",
- sunkLight: "oklch(0.108 0.005 71.346 / 0.02)",
- sunk: "oklch(0.108 0.005 71.346 / 0.04)",
- highlightSubtle: "oklch(0.108 0.005 71.346 / 0.02)",
- highlight: "oklch(0.108 0.005 71.346 / 0.04)",
- highlightStrong: "oklch(0.108 0.005 71.346 / 0.08)",
- textNeutralPrimary: "oklch(0.108 0.005 71.346 / 1)",
- textNeutralSecondary: "oklch(0.108 0.005 71.346 / 0.6)",
- textNeutralTertiary: "oklch(0.108 0.005 71.346 / 0.35)",
- borderDefault: "oklch(0.108 0.005 71.346 / 0.08)",
- borderInteractive: "oklch(0.108 0.005 71.346 / 0.14)",
- borderInteractiveEmphasis: "oklch(0.108 0.005 71.346 / 0.28)",
-};
-
-const BASE_CSS: Record<string, string> = {
- "--openui-background": "oklch(0.97 0.001 106.424 / 1)",
- "--openui-foreground": "oklch(0.994 0.001 106.423 / 1)",
- "--openui-popover-background": "oklch(0.994 0.001 106.423 / 1)",
- "--openui-sunk-light": "oklch(0.108 0.005 71.346 / 0.02)",
- "--openui-sunk": "oklch(0.108 0.005 71.346 / 0.04)",
- "--openui-highlight-subtle": "oklch(0.108 0.005 71.346 / 0.02)",
- "--openui-highlight": "oklch(0.108 0.005 71.346 / 0.04)",
- "--openui-highlight-strong": "oklch(0.108 0.005 71.346 / 0.08)",
- "--openui-text-neutral-primary": "oklch(0.108 0.005 71.346 / 1)",
- "--openui-text-neutral-secondary": "oklch(0.108 0.005 71.346 / 0.6)",
- "--openui-text-neutral-tertiary": "oklch(0.108 0.005 71.346 / 0.35)",
- "--openui-border-default": "oklch(0.108 0.005 71.346 / 0.08)",
- "--openui-border-interactive": "oklch(0.108 0.005 71.346 / 0.14)",
- "--openui-border-interactive-emphasis": "oklch(0.108 0.005 71.346 / 0.28)",
-};
-
-// Step 3 – font (Poppins)
-const FONT_OVERRIDES = buildTypography(POPPINS);
-
-const FONT_CSS: Record<string, string> = {
- "--openui-font-body": POPPINS,
- "--openui-font-heading": POPPINS,
- "--openui-font-label": POPPINS,
- "--openui-font-numbers": POPPINS,
-};
-
-// Step 4 – heading style (heavier weights)
-const HEADING_OVERRIDES: Record<string, string> = {
- textHeadingXs: `700 16px/1.2 ${POPPINS}`,
- textHeadingSm: `700 18px/1.2 ${POPPINS}`,
- textHeadingMd: `700 24px/1.1 ${POPPINS}`,
- textHeadingLg: `700 28px/1.05 ${POPPINS}`,
- textHeadingXl: `800 32px/1.05 ${POPPINS}`,
-};
-
-const HEADING_CSS: Record<string, string> = {
- "--openui-text-heading-xs": `700 16px/1.2 ${POPPINS}`,
- "--openui-text-heading-sm": `700 18px/1.2 ${POPPINS}`,
- "--openui-text-heading-md": `700 24px/1.1 ${POPPINS}`,
- "--openui-text-heading-lg": `700 28px/1.05 ${POPPINS}`,
- "--openui-text-heading-xl": `800 32px/1.05 ${POPPINS}`,
-};
-
-// Step 5 – radius (larger, base 2.5)
-const RADIUS_BASE = 2.5;
-
-const RADIUS_OVERRIDES: Record<string, string> = {
- radiusNone: "0",
- radius3xs: toPx(RADIUS_BASE * 0.5),
- radius2xs: toPx(RADIUS_BASE * 1),
- radiusXs: toPx(RADIUS_BASE * 2),
- radiusS: toPx(RADIUS_BASE * 3),
- radiusM: toPx(RADIUS_BASE * 4),
- radiusL: toPx(RADIUS_BASE * 5),
- radiusXl: toPx(RADIUS_BASE * 6),
- radius2xl: toPx(RADIUS_BASE * 7),
- radius3xl: toPx(RADIUS_BASE * 8),
- radius4xl: toPx(RADIUS_BASE * 10),
- radius5xl: toPx(RADIUS_BASE * 12),
- radius6xl: toPx(RADIUS_BASE * 14),
- radius7xl: toPx(RADIUS_BASE * 16),
- radius8xl: toPx(RADIUS_BASE * 20),
- radius9xl: toPx(RADIUS_BASE * 24),
- radiusFull: "9999px",
-};
-
-const RADIUS_CSS: Record<string, string> = {
- "--openui-radius-3xs": toPx(RADIUS_BASE * 0.5),
- "--openui-radius-2xs": toPx(RADIUS_BASE * 1),
- "--openui-radius-xs": toPx(RADIUS_BASE * 2),
- "--openui-radius-s": toPx(RADIUS_BASE * 3),
- "--openui-radius-m": toPx(RADIUS_BASE * 4),
- "--openui-radius-l": toPx(RADIUS_BASE * 5),
- "--openui-radius-xl": toPx(RADIUS_BASE * 6),
- "--openui-radius-2xl": toPx(RADIUS_BASE * 7),
- "--openui-radius-3xl": toPx(RADIUS_BASE * 8),
- "--openui-radius-full": "9999px",
-};
-
-// Step 6 – spacing (comfortable, multiplier 1.2)
-const SPACING_BASE = 2 * 1.2;
-
-const SPACING_OVERRIDES: Record<string, string> = {
- space000: "0",
- space3xs: toPx(SPACING_BASE * 1),
- space2xs: toPx(SPACING_BASE * 2),
- spaceXs: toPx(SPACING_BASE * 3),
- spaceS: toPx(SPACING_BASE * 4),
- spaceSM: toPx(SPACING_BASE * 5),
- spaceM: toPx(SPACING_BASE * 6),
- spaceML: toPx(SPACING_BASE * 8),
- spaceL: toPx(SPACING_BASE * 9),
- spaceXl: toPx(SPACING_BASE * 12),
- space2xl: toPx(SPACING_BASE * 18),
- space3xl: toPx(SPACING_BASE * 24),
-};
-
-const SPACING_CSS: Record<string, string> = {
- "--openui-space-3xs": toPx(SPACING_BASE * 1),
- "--openui-space-2xs": toPx(SPACING_BASE * 2),
- "--openui-space-xs": toPx(SPACING_BASE * 3),
- "--openui-space-s": toPx(SPACING_BASE * 4),
- "--openui-space-s-m": toPx(SPACING_BASE * 5),
- "--openui-space-m": toPx(SPACING_BASE * 6),
- "--openui-space-m-l": toPx(SPACING_BASE * 8),
- "--openui-space-l": toPx(SPACING_BASE * 9),
- "--openui-space-xl": toPx(SPACING_BASE * 12),
- "--openui-space-2xl": toPx(SPACING_BASE * 18),
- "--openui-space-3xl": toPx(SPACING_BASE * 24),
-};
-
-// ---------------------------------------------------------------------------
-// Examples
-// ---------------------------------------------------------------------------
-
-const CUSTOMIZING_STEPS: GuideStep[] = [
- {
- id: "set-accent-color",
- title: "Set the accent color",
- description:
- "Start by updating the accent color to match the highlight tone in the goal preview. This immediately brings buttons and interactive states closer to the target style.",
- themeOverrides: ACCENT_OVERRIDES,
- cssVariables: ACCENT_CSS,
- },
- {
- id: "align-base-color",
- title: "Align the base color",
- description:
- "Next, adjust the base color to mirror the background tone in the goal and create a cohesive visual foundation.",
- themeOverrides: BASE_OVERRIDES,
- cssVariables: BASE_CSS,
- },
- {
- id: "update-font",
- title: "Update the body font",
- description:
- "Now update the primary body font so paragraphs and labels reflect the intended style and readability.",
- themeOverrides: FONT_OVERRIDES,
- cssVariables: FONT_CSS,
- },
- {
- id: "match-heading-style",
- title: "Match the heading style",
- description:
- "Finally, update the heading style to match the stronger hierarchy in the goal and give the interface its intended personality.",
- themeOverrides: HEADING_OVERRIDES,
- cssVariables: HEADING_CSS,
- },
- {
- id: "adjust-radius",
- title: "Adjusting the radius",
- description:
- "Border radius controls the roundness of corners across the UI. Increasing it gives a softer, more modern feel.",
- themeOverrides: RADIUS_OVERRIDES,
- cssVariables: RADIUS_CSS,
- },
- {
- id: "tweak-spacing",
- title: "Tweaking spacing",
- description:
- "Spacing affects how roomy or compact the interface feels. A comfortable scale gives elements more breathing room.",
- themeOverrides: SPACING_OVERRIDES,
- cssVariables: SPACING_CSS,
- },
-];
-
-const CUSTOMIZING_GOAL: Record<string, string> = CUSTOMIZING_STEPS.reduce<Record<string, string>>(
- (acc, step) => ({ ...acc, ...step.themeOverrides }),
- {},
-);
-
-const INTER = '"Inter", sans-serif';
-
-const DEFAULT_CSS: Record<string, string> = {
- // Step 1 – accent (default: neutral-1000 solid)
- "--openui-interactive-accent-default": "oklch(0.097 0 0 / 1)",
- "--openui-interactive-accent-hover": "oklch(0.097 0 0 / 0.8)",
- "--openui-interactive-accent-pressed": "oklch(0.097 0 0 / 1)",
- "--openui-interactive-accent-disabled": "oklch(0.097 0 0 / 0.4)",
- "--openui-text-brand": "oklch(0.097 0 0 / 1)",
- "--openui-text-accent-primary": "oklch(0.994 0 89.876 / 1)",
- "--openui-border-accent": "oklch(0.097 0 0 / 0.08)",
- "--openui-border-accent-emphasis": "oklch(0.097 0 0 / 0.3)",
-
- // Step 2 – base (default: neutral swatch)
- "--openui-background": "oklch(0.97 0 89.876 / 1)",
- "--openui-foreground": "oklch(0.994 0 89.876 / 1)",
- "--openui-popover-background": "oklch(0.994 0 89.876 / 1)",
- "--openui-sunk-light": "oklch(0.097 0 0 / 0.02)",
- "--openui-sunk": "oklch(0.097 0 0 / 0.04)",
- "--openui-highlight-subtle": "oklch(0.097 0 0 / 0.02)",
- "--openui-highlight": "oklch(0.097 0 0 / 0.04)",
- "--openui-highlight-strong": "oklch(0.097 0 0 / 0.08)",
- "--openui-text-neutral-primary": "oklch(0.097 0 0 / 1)",
- "--openui-text-neutral-secondary": "oklch(0.097 0 0 / 0.6)",
- "--openui-text-neutral-tertiary": "oklch(0.097 0 0 / 0.2)",
- "--openui-border-default": "oklch(0.097 0 0 / 0.06)",
- "--openui-border-interactive": "oklch(0.097 0 0 / 0.12)",
- "--openui-border-interactive-emphasis": "oklch(0.097 0 0 / 0.3)",
-
- // Step 3 – font (default: Inter)
- "--openui-font-body": INTER,
- "--openui-font-heading": INTER,
- "--openui-font-label": INTER,
- "--openui-font-numbers": INTER,
-
- // Step 4 – headings (default weights)
- "--openui-text-heading-xs": `600 16px/1.25 ${INTER}`,
- "--openui-text-heading-sm": `600 18px/1.25 ${INTER}`,
- "--openui-text-heading-md": `600 24px/1.1 ${INTER}`,
- "--openui-text-heading-lg": `600 28px/1.1 ${INTER}`,
- "--openui-text-heading-xl": `700 32px/1.1 ${INTER}`,
-
- // Step 5 – radius (base 2)
- "--openui-radius-3xs": "1px",
- "--openui-radius-2xs": "2px",
- "--openui-radius-xs": "4px",
- "--openui-radius-s": "6px",
- "--openui-radius-m": "8px",
- "--openui-radius-l": "10px",
- "--openui-radius-xl": "12px",
- "--openui-radius-2xl": "14px",
- "--openui-radius-3xl": "16px",
- "--openui-radius-full": "9999px",
-
- // Step 6 – spacing (base 2, multiplier 1)
- "--openui-space-3xs": "2px",
- "--openui-space-2xs": "4px",
- "--openui-space-xs": "6px",
- "--openui-space-s": "8px",
- "--openui-space-s-m": "10px",
- "--openui-space-m": "12px",
- "--openui-space-m-l": "16px",
- "--openui-space-l": "18px",
- "--openui-space-xl": "24px",
- "--openui-space-2xl": "36px",
- "--openui-space-3xl": "48px",
-};
-
-export const GUIDE_EXAMPLES: GuideExample[] = [
- {
- id: "customizing-openui",
- title: "Customizing OpenUI",
- description: "Styling OpenUI to look like your brand",
- summary:
- "Think of this as a guided makeover. We\u2019ll start with the base OpenUI theme and gradually refine each setting until the interface mirrors the final goal.",
- goalTheme: CUSTOMIZING_GOAL,
- defaultCssVariables: DEFAULT_CSS,
- steps: CUSTOMIZING_STEPS,
- },
- {
- id: "prompt-control",
- title: "Controlling compositions",
- description: "Shaping generations and outputs with prompts",
- summary: "Compare prompt variants to guide formatting, specificity, and behavior.",
- steps: [
- {
- id: "prompt-step-1",
- title: "Define outcome, audience, and success",
- description:
- "Specify the desired outcome, target audience, and acceptance criteria so the model understands purpose, calibrates depth, and produces responses aligned with practical success.",
- previewCards: [
- {
- id: "prompt-step-1-option-1",
- title: "Clarity-first intent",
- description: "Prompt optimized for user comprehension and concise explanation.",
- },
- {
- id: "prompt-step-1-option-2",
- title: "Execution-first intent",
- description: "Prompt optimized for rapid implementation and immediate action.",
- },
- ],
- },
- {
- id: "prompt-step-2",
- title: "Constrain format, order, and length",
- description:
- "Define strict output structure, ordering, and length limits to reduce variance, improve readability, and ensure every response contains the exact sections stakeholders expect.",
- previewCards: [
- {
- id: "prompt-step-2-option-1",
- title: "Strict section template",
- description: "Require fixed sections with specific headings and ordering.",
- },
- {
- id: "prompt-step-2-option-2",
- title: "Length-bounded response",
- description: "Enforce concise output with a short summary plus action bullets.",
- },
- ],
- },
- {
- id: "prompt-step-3",
- title: "Inject domain context and hard constraints",
- description:
- "Provide domain-specific constraints, terminology, and non-negotiable rules so generated responses stay compliant, technically accurate, and consistent with product behavior and team conventions.",
- previewCards: [
- {
- id: "prompt-step-3-option-1",
- title: "Domain glossary",
- description: "Embed required terms and naming conventions for consistency.",
- },
- {
- id: "prompt-step-3-option-2",
- title: "Constraint block",
- description: "List hard restrictions the response must never violate.",
- },
- ],
- },
- {
- id: "prompt-step-4",
- title: "Set tone, depth, and reasoning transparency",
- description:
- "Set tone, depth, and rationale visibility to balance brevity with clarity, ensuring explanations feel appropriate for context while still exposing important trade-offs and assumptions.",
- previewCards: [
- {
- id: "prompt-step-4-option-1",
- title: "Teammate mode",
- description: "Friendly, practical tone with concise but complete implementation notes.",
- },
- {
- id: "prompt-step-4-option-2",
- title: "Expert mode",
- description: "Technical depth with explicit trade-offs and assumptions.",
- },
- ],
- },
- {
- id: "prompt-step-5",
- title: "Add guardrails, fallback, and iteration hooks",
- description:
- "Add fallback behavior and clarification prompts for ambiguous inputs so the model asks focused questions, avoids unsafe guesses, and iterates toward a reliable final answer.",
- previewCards: [
- {
- id: "prompt-step-5-option-1",
- title: "Fallback behavior",
- description: "Instruct safe default behavior when context is incomplete.",
- },
- {
- id: "prompt-step-5-option-2",
- title: "Clarification loop",
- description: "Prompt the model to ask targeted follow-ups before finalizing output.",
- },
- ],
- },
- ],
- },
-];
-
-export const getGuideExampleById = (exampleId: string): GuideExample | undefined =>
- GUIDE_EXAMPLES.find((example) => example.id === exampleId);
-
-export const getNextGuideExampleId = (exampleId: string): string | undefined => {
- const index = GUIDE_EXAMPLES.findIndex((example) => example.id === exampleId);
- if (index < 0 || index >= GUIDE_EXAMPLES.length - 1) {
- return undefined;
- }
- return GUIDE_EXAMPLES[index + 1].id;
-};
diff --git a/docs/app/components/config/navigation.ts b/docs/app/components/config/navigation.ts
deleted file mode 100644
index 463ae6ea2..000000000
--- a/docs/app/components/config/navigation.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import type { NavGroup, NavItem } from "@components/types";
-
-export const TOP_NAV_ITEMS: NavItem[] = [
- { id: "customize", label: "Customize", href: "/components/customize" },
- { id: "compose", label: "Compose", href: "/components/compose" },
- { id: "blocks", label: "Blocks", href: "/components/blocks" },
- { id: "foundation", label: "Foundation", href: "/components/foundation" },
- { id: "theme-builder", label: "Theme Builder", href: "/components/theme-builder" },
-];
-
-export const FOUNDATION_NAV_ITEMS: NavGroup[] = [
- {
- id: "foundation-group",
- label: "",
- items: [
- { id: "introduction", label: "Introduction", href: "/components/foundation" },
- { id: "colors", label: "Colors", href: "/components/foundation/colors" },
- { id: "spacing", label: "Spacing", href: "/components/foundation/spacing" },
- { id: "typography", label: "Typography", href: "/components/foundation/typography" },
- { id: "radius", label: "Radius", href: "/components/foundation/radius" },
- { id: "shadows", label: "Shadows", href: "/components/foundation/shadows" },
- ],
- },
-];
-
-export const BLOCKS_NAV_ITEMS: NavGroup[] = [
- {
- id: "overview-group",
- label: "",
- items: [{ id: "introduction", label: "Introduction", href: "/components/blocks" }],
- },
- {
- id: "navigation",
- label: "Navigation",
- items: [{ id: "tabs", label: "Tabs", href: "/components/blocks/tabs" }],
- },
- {
- id: "individual-blocks",
- label: "Individual blocks",
- items: [
- {
- id: "accordion",
- label: "Accordion",
- href: "/components/blocks/accordion",
- badgeText: "Fixing",
- },
- { id: "button-group", label: "Buttons", href: "/components/blocks/button-group" },
- { id: "callout", label: "Callout", href: "/components/blocks/callout" },
- { id: "image-items", label: "Image", href: "/components/blocks/image-items" },
- { id: "lists", label: "Lists", href: "/components/blocks/lists" },
- { id: "tables", label: "Tables", href: "/components/blocks/tables", badgeText: "Fixing" },
- {
- id: "text-items",
- label: "Text items",
- href: "/components/blocks/text-items",
- badgeText: "Fixing",
- },
- { id: "tag-item", label: "Tag item", href: "/components/blocks/tag-item" },
- ],
- },
- {
- id: "charts",
- label: "Charts",
- items: [
- { id: "bar-chart", label: "Bar", href: "/components/blocks/charts/bar" },
- { id: "line-chart", label: "Line", href: "/components/blocks/charts/line" },
- { id: "area-chart", label: "Area", href: "/components/blocks/charts/area" },
- { id: "pie-chart", label: "Pie", href: "/components/blocks/charts/pie" },
- { id: "donut-chart", label: "Donut", href: "/components/blocks/charts/donut" },
- { id: "scatter-chart", label: "Scatter", href: "/components/blocks/charts/scatter" },
- { id: "radial-chart", label: "Radial chart", href: "/components/blocks/charts/radial" },
- ],
- },
- {
- id: "forms",
- label: "Forms",
- items: [
- { id: "checkbox-group", label: "Checkbox group", href: "/components/blocks/checkbox-group" },
- { id: "date-picker", label: "Date picker", href: "/components/blocks/date-picker" },
- { id: "input-field", label: "Input field", href: "/components/blocks/input-field" },
- { id: "toggle-group", label: "Toggle group", href: "/components/blocks/toggle-group" },
- {
- id: "radio-button-group",
- label: "Radio button group",
- href: "/components/blocks/radio-button-group",
- },
- { id: "select", label: "Select", href: "/components/blocks/select" },
- ],
- },
-];
diff --git a/docs/app/components/customize/page.tsx b/docs/app/components/customize/page.tsx
deleted file mode 100644
index 75821d69d..000000000
--- a/docs/app/components/customize/page.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import { ComposeExamplePage } from "@components/components/compose";
-import { getGuideExampleById } from "@components/config/guide";
-
-export default function CustomizePage() {
- const example = getGuideExampleById("customizing-openui")!;
-
- return <ComposeExamplePage example={example} />;
-}
diff --git a/docs/app/components/foundation/colors/page.tsx b/docs/app/components/foundation/colors/page.tsx
deleted file mode 100644
index 2bb04d89c..000000000
--- a/docs/app/components/foundation/colors/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { ColorsPreviewPage } from "@components/components/preview/pages";
-
-export default function FoundationColorsPage() {
- return <ColorsPreviewPage />;
-}
diff --git a/docs/app/components/foundation/layout.module.css b/docs/app/components/foundation/layout.module.css
deleted file mode 100644
index d09c923df..000000000
--- a/docs/app/components/foundation/layout.module.css
+++ /dev/null
@@ -1,15 +0,0 @@
-.foundationLayout {
- position: relative;
- padding: 0 var(--openui-space-xl);
-}
-
-.foundationContent {
- min-width: 0;
- margin-left: 264px;
-}
-
-@media (max-width: 1050px) {
- .foundationContent {
- margin-left: 0;
- }
-}
diff --git a/docs/app/components/foundation/layout.tsx b/docs/app/components/foundation/layout.tsx
deleted file mode 100644
index 42379646e..000000000
--- a/docs/app/components/foundation/layout.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-"use client";
-
-import SideNav from "@components/components/SideNav";
-import { FOUNDATION_NAV_ITEMS } from "@components/config/navigation";
-import type { ReactNode } from "react";
-import styles from "./layout.module.css";
-
-interface FoundationLayoutProps {
- children: ReactNode;
-}
-
-export default function FoundationLayout({ children }: FoundationLayoutProps) {
- return (
- <div className={styles.foundationLayout}>
- <SideNav sections={FOUNDATION_NAV_ITEMS} />
- <div className={styles.foundationContent}>{children}</div>
- </div>
- );
-}
diff --git a/docs/app/components/foundation/motion/page.tsx b/docs/app/components/foundation/motion/page.tsx
deleted file mode 100644
index 2fc380e2c..000000000
--- a/docs/app/components/foundation/motion/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { MotionPreviewPage } from "@components/components/preview/pages";
-
-export default function FoundationMotionPage() {
- return <MotionPreviewPage />;
-}
diff --git a/docs/app/components/foundation/page.module.css b/docs/app/components/foundation/page.module.css
deleted file mode 100644
index 97c498c1d..000000000
--- a/docs/app/components/foundation/page.module.css
+++ /dev/null
@@ -1,208 +0,0 @@
-.introPage {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xl);
- max-width: 640px;
- padding: var(--openui-space-2xl) 0;
-}
-
-.title {
- margin: 0;
- font: var(--openui-text-heading-xl);
- color: var(--openui-text-neutral-primary);
-}
-
-.description {
- margin: 0;
- font: var(--openui-text-body-lg);
- color: var(--openui-text-neutral-secondary);
- line-height: 1.6;
-}
-
-.section {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionBody {
- margin: 0;
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
- line-height: 1.6;
-}
-
-.page {
- width: 100%;
- padding: var(--openui-space-m-l) 0;
-}
-
-.builderShell {
- display: grid;
- grid-template-columns: minmax(0, 1fr) 280px;
- gap: var(--openui-space-2xs);
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-3xl);
- background: var(--openui-highlight-subtle);
- padding: var(--openui-space-2xs);
- align-items: start;
-}
-
-.previewPane {
- min-width: 0;
- height: calc(100vh - 170px);
- overflow-y: auto;
- padding: var(--openui-space-xl);
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-2xl);
- background: var(--openui-foreground);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.previewScope {
- color: var(--openui-text-neutral-primary);
-}
-
-.blocksHeader {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.blocksTitle {
- margin: 0;
- font: var(--openui-text-heading-sm);
- color: var(--openui-text-neutral-primary);
-}
-
-.blocksDescription {
- margin: 0;
- font: var(--openui-text-body-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-.blockSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- font: var(--openui-text-label-default-heavy);
- color: var(--openui-text-neutral-primary);
-}
-
-.blockGrid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: var(--openui-space-s);
-}
-
-.blockCard {
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-xl);
- background: var(--openui-background);
- padding: var(--openui-space-m);
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--openui-space-s);
-}
-
-.blockCardBody {
- min-width: 0;
-}
-
-.blockCardTitle {
- margin: 0;
- font: var(--openui-text-label-default);
- color: var(--openui-text-neutral-primary);
-}
-
-.blockCardMeta {
- margin: var(--openui-space-3xs) 0 0;
- font: var(--openui-text-body-xs);
- color: var(--openui-text-neutral-tertiary);
- word-break: break-word;
-}
-
-.blockCardLink {
- flex-shrink: 0;
- padding: var(--openui-space-2xs) var(--openui-space-s);
- border-radius: var(--openui-radius-full);
- border: 1px solid var(--openui-border-interactive);
- background: var(--openui-foreground);
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-xs);
- text-decoration: none;
-}
-
-.controlsPane {
- position: sticky;
- top: 88px;
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-2xl);
- background: var(--openui-foreground);
- padding: var(--openui-space-l);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
- max-height: calc(100vh - 120px);
- overflow-y: auto;
-}
-
-.controlsHeader {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.controlsTitle {
- margin: 0;
- font: var(--openui-text-heading-xs);
- color: var(--openui-text-neutral-primary);
-}
-
-.controlsDescription {
- margin: 0;
- font: var(--openui-text-body-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-.controlsGroup {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.controlLabel {
- font: var(--openui-text-label-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-@media (max-width: 1100px) {
- .builderShell {
- grid-template-columns: 1fr;
- }
-
- .previewPane {
- height: auto;
- max-height: none;
- overflow: visible;
- }
-
- .controlsPane {
- position: static;
- top: auto;
- max-height: none;
- }
-}
-
-@media (max-width: 860px) {
- .blockGrid {
- grid-template-columns: 1fr;
- }
-}
diff --git a/docs/app/components/foundation/page.tsx b/docs/app/components/foundation/page.tsx
deleted file mode 100644
index aa23c4666..000000000
--- a/docs/app/components/foundation/page.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import styles from "./page.module.css";
-
-export default function FoundationPage() {
- return (
- <div className={styles.introPage}>
- <h1 className={styles.title}>Foundation</h1>
- <p className={styles.description}>
- The foundation layer defines the core visual language of OpenUI. These tokens &mdash;
- colors, spacing, typography, radius, and shadows &mdash; ensure every component shares a
- consistent look and feel across themes and modes.
- </p>
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Design tokens</h2>
- <p className={styles.sectionBody}>
- Every value in the system is expressed as a CSS custom property. This means you can
- override any token at any scope &mdash; globally, per section, or per component &mdash;
- without touching component code.
- </p>
- </section>
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Theming</h2>
- <p className={styles.sectionBody}>
- OpenUI ships with light and dark modes built in. Switch modes or layer your own palette by
- reassigning the token values in the Theme Builder.
- </p>
- </section>
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Explore</h2>
- <p className={styles.sectionBody}>
- Use the sidebar to browse each token category. Every page includes live previews so you
- can see exactly how tokens render in context.
- </p>
- </section>
- </div>
- );
-}
diff --git a/docs/app/components/foundation/radius/page.tsx b/docs/app/components/foundation/radius/page.tsx
deleted file mode 100644
index ee1a8cbcf..000000000
--- a/docs/app/components/foundation/radius/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { RadiusPreviewPage } from "@components/components/preview/pages";
-
-export default function FoundationRadiusPage() {
- return <RadiusPreviewPage />;
-}
diff --git a/docs/app/components/foundation/shadows/page.tsx b/docs/app/components/foundation/shadows/page.tsx
deleted file mode 100644
index 9ce72f822..000000000
--- a/docs/app/components/foundation/shadows/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { ShadowsPreviewPage } from "@components/components/preview/pages";
-
-export default function FoundationShadowsPage() {
- return <ShadowsPreviewPage />;
-}
diff --git a/docs/app/components/foundation/spacing/page.tsx b/docs/app/components/foundation/spacing/page.tsx
deleted file mode 100644
index 503ec2fcc..000000000
--- a/docs/app/components/foundation/spacing/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { SpacingPreviewPage } from "@components/components/preview/pages";
-
-export default function FoundationSpacingPage() {
- return <SpacingPreviewPage />;
-}
diff --git a/docs/app/components/foundation/typography/page.tsx b/docs/app/components/foundation/typography/page.tsx
deleted file mode 100644
index af50f76a9..000000000
--- a/docs/app/components/foundation/typography/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { TypographyPreviewPage } from "@components/components/preview/pages";
-
-export default function FoundationTypographyPage() {
- return <TypographyPreviewPage />;
-}
diff --git a/docs/app/components/globals.css b/docs/app/components/globals.css
deleted file mode 100644
index 7399cae27..000000000
--- a/docs/app/components/globals.css
+++ /dev/null
@@ -1,35 +0,0 @@
-@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Text:wght@400;500;700&display=swap");
-@import "../../../packages/react-ui/dist/styles/index.css";
-
-html,
-body {
- max-width: 100vw;
- overflow-x: hidden;
-}
-
-body {
- color: var(--openui-text-neutral-primary);
- background: var(--openui-foreground);
- font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-* {
- box-sizing: border-box;
- padding: 0;
- margin: 0;
-}
-
-a {
- color: inherit;
- text-decoration: none;
-}
-
-html[data-theme="light"] {
- color-scheme: light;
-}
-
-html[data-theme="dark"] {
- color-scheme: dark;
-}
diff --git a/docs/app/components/layout.module.css b/docs/app/components/layout.module.css
deleted file mode 100644
index 0808abd2f..000000000
--- a/docs/app/components/layout.module.css
+++ /dev/null
@@ -1,136 +0,0 @@
-.appShell {
- min-height: 100vh;
- padding-top: 72px;
- background: var(--openui-foreground);
- color: var(--openui-text-neutral-primary);
-}
-
-.topBar {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 20;
- background: var(--openui-foreground);
-}
-
-.topBar::after {
- content: "";
- position: absolute;
- left: 0;
- right: 0;
- bottom: -24px;
- height: 24px;
- background: linear-gradient(to bottom, var(--openui-foreground), transparent);
- pointer-events: none;
-}
-
-.topBarInner {
- width: 100%;
- max-width: 1472px;
- margin: 0 auto;
- min-height: 72px;
- display: grid;
- grid-template-columns: 1fr auto 1fr;
- align-items: center;
- gap: var(--openui-space-l);
- padding: 0 var(--openui-space-l);
-}
-
-.brand {
- display: inline-flex;
- align-items: center;
- gap: var(--openui-space-xs);
-}
-
-.brandMark {
- width: 18px;
- height: 18px;
- border-radius: var(--openui-radius-full);
- border: 2px solid var(--openui-text-neutral-primary);
- box-shadow: inset 0 0 0 4px var(--openui-foreground);
-}
-
-.brandText {
- font-size: 13px;
- line-height: 18px;
- color: var(--openui-text-neutral-secondary);
-}
-
-.topBarControls {
- display: inline-flex;
- align-items: center;
- gap: var(--openui-space-s);
- justify-self: end;
-}
-
-.topNav {
- display: inline-flex;
- align-items: center;
- gap: var(--openui-space-2xs);
- justify-self: center;
-}
-
-.topNavLink {
- padding: var(--openui-space-xs) var(--openui-space-s);
- border-radius: var(--openui-radius-m);
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-sm);
- border: 1px solid transparent;
- text-decoration: none;
- transition:
- background-color 0.15s ease,
- color 0.15s ease;
-}
-
-.topNavLink:hover {
- background: var(--openui-highlight);
-}
-
-.topNavLinkActive {
- color: var(--openui-text-neutral-primary);
- background: var(--openui-highlight-strong);
-}
-
-.pageContainer {
- width: 100%;
- max-width: 1472px;
- margin: 0 auto;
- padding: var(--openui-space-xl) 0 48px;
-}
-
-@media (max-width: 960px) {
- .appShell {
- padding-top: 72px;
- }
-
- .topBarInner {
- min-height: 72px;
- padding: 0 var(--openui-space-l);
- }
-
- .brandText {
- display: none;
- }
-}
-
-@media (max-width: 700px) {
- .appShell {
- padding-top: 88px;
- }
-
- .topBarInner {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- padding: var(--openui-space-s) var(--openui-space-m);
- }
-
- .brand {
- display: none;
- }
-
- .topBarControls {
- margin-left: 0;
- }
-}
diff --git a/docs/app/components/layout.tsx b/docs/app/components/layout.tsx
deleted file mode 100644
index 465a8477d..000000000
--- a/docs/app/components/layout.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import { createLayoutMetadata } from "@/lib/page-metadata";
-import AppThemeProvider from "@components/components/AppThemeProvider/AppThemeProvider";
-import ThemeToggle from "@components/components/ThemeToggle";
-import TopBarDocsButton from "@components/components/TopBarDocsButton/TopBarDocsButton";
-import TopNav from "@components/components/TopNav";
-import { TOP_NAV_ITEMS } from "@components/config/navigation";
-import { Geist, Geist_Mono, Inter } from "next/font/google";
-import Link from "next/link";
-import type { ReactNode } from "react";
-import "./globals.css";
-import styles from "./layout.module.css";
-import page from "./metadata";
-
-const inter = Inter({
- variable: "--font-inter",
- subsets: ["latin"],
-});
-
-const geistSans = Geist({
- variable: "--font-geist-sans",
- subsets: ["latin"],
-});
-
-const geistMono = Geist_Mono({
- variable: "--font-geist-mono",
- subsets: ["latin"],
-});
-
-export const metadata = createLayoutMetadata(page);
-
-interface RootLayoutProps {
- children: ReactNode;
-}
-
-export default function RootLayout({ children }: RootLayoutProps) {
- const fontClassName = [inter.variable, geistSans.variable, geistMono.variable].join(" ");
-
- return (
- <AppThemeProvider>
- <div className={`${fontClassName} ${styles.appShell}`}>
- <header className={styles.topBar}>
- <div className={styles.topBarInner}>
- <Link href="/" className={styles.brand}>
- <span className={styles.brandMark} aria-hidden />
- <span className={styles.brandText}>DS</span>
- </Link>
- <TopNav items={TOP_NAV_ITEMS} />
- <div className={styles.topBarControls}>
- <ThemeToggle />
- <TopBarDocsButton />
- </div>
- </div>
- </header>
- <div className={styles.pageContainer}>{children}</div>
- </div>
- </AppThemeProvider>
- );
-}
diff --git a/docs/app/components/metadata.ts b/docs/app/components/metadata.ts
deleted file mode 100644
index e633f36e2..000000000
--- a/docs/app/components/metadata.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import type { PageMetadataInput } from "@/lib/page-metadata";
-
-export default {
- pathname: "/components",
- title: "Generative UI component library",
- description:
- "The OpenUI Design System: charts, tables, form inputs and layout blocks that agents compose into Generative UI, with design foundations and a theme builder.",
- openGraph: { title: "OpenUI Design System" },
-} satisfies PageMetadataInput;
diff --git a/docs/app/components/page.module.css b/docs/app/components/page.module.css
deleted file mode 100644
index 0e2c518ce..000000000
--- a/docs/app/components/page.module.css
+++ /dev/null
@@ -1,111 +0,0 @@
-.page {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-3xl);
- max-width: 1200px;
- margin: 0 auto;
- padding: var(--openui-space-3xl) var(--openui-space-xl);
-}
-
-.hero {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.heroTitle {
- font: var(--openui-text-heading-xl);
- color: var(--openui-text-neutral-primary);
-}
-
-.heroTitleLight {
- font-weight: var(--openui-font-weight-regular);
- color: var(--openui-text-neutral-tertiary);
-}
-
-.heroSubtitle {
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
- max-width: 420px;
-}
-
-.placeholder {
- background: var(--openui-sunk);
- border-radius: var(--openui-radius-m);
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--openui-text-neutral-tertiary);
- font: var(--openui-text-label-sm);
-}
-
-.heroImage {
- height: 320px;
-}
-
-.yellowSection {
- background: var(--openui-alert-background);
- border-radius: var(--openui-radius-l);
- padding: var(--openui-space-2xl);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.yellowHeading {
- font: var(--openui-text-heading-lg);
- color: var(--openui-text-neutral-primary);
-}
-
-.yellowColumns {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: var(--openui-space-xl);
-}
-
-.yellowBody {
- font: var(--openui-text-body-sm);
- color: var(--openui-text-neutral-primary);
-}
-
-.section {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.sectionTitle {
- font: var(--openui-text-heading-md);
- color: var(--openui-text-neutral-primary);
-}
-
-.codePreview {
- height: 240px;
-}
-
-.cardGrid {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: var(--openui-space-m);
-}
-
-.card {
- height: 140px;
- text-decoration: none;
- transition: opacity 0.15s ease;
-}
-
-.card:hover {
- opacity: 0.8;
-}
-
-.faqAccordion {
- height: 200px;
- max-width: 480px;
-}
-
-.footer {
- background: var(--openui-inverted-background);
- height: 48px;
- border-radius: var(--openui-radius-m);
-}
diff --git a/docs/app/components/page.tsx b/docs/app/components/page.tsx
deleted file mode 100644
index d5a7c1f5c..000000000
--- a/docs/app/components/page.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import Link from "next/link";
-import styles from "./page.module.css";
-
-export default function HomePage() {
- return (
- <main className={styles.page}>
- <section className={styles.hero}>
- <h1 className={styles.heroTitle}>
- OpenUI <span className={styles.heroTitleLight}>Design System</span>
- </h1>
- <p className={styles.heroSubtitle}>
- Purpose made for Generative UI.
- <br />
- Built to be scaleable.
- <br />
- Designed with precision and craft.
- </p>
- <div className={`${styles.placeholder} ${styles.heroImage}`}>Image placeholder</div>
- </section>
-
- <section className={styles.yellowSection}>
- <h2 className={styles.yellowHeading}>So why another design system?</h2>
- <div className={styles.yellowColumns}>
- <p className={styles.yellowBody}>
- The caf&eacute; on the corner never seemed busy, yet it was never empty either. People
- drifted in like thoughts you couldn&rsquo;t quite finish&mdash;quiet students with open
- laptops, retirees lingering over tiny cups of coffee, a courier who always arrived at
- precisely 10:17. Outside, traffic pulsed in uneven waves, but inside the air felt
- suspended, as if time had agreed to slow down just enough for everyone to catch their
- breath.
- </p>
- <p className={styles.yellowBody}>
- The caf&eacute; on the corner never seemed busy, yet it was never empty either. People
- drifted in like thoughts you couldn&rsquo;t quite finish&mdash;quiet students with open
- laptops, retirees lingering over tiny cups of coffee.
- </p>
- </div>
- </section>
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>How to use it?</h2>
- <div className={`${styles.placeholder} ${styles.codePreview}`}>Code block preview</div>
- </section>
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Dig deeper</h2>
- <div className={styles.cardGrid}>
- <Link href="/components/customize" className={`${styles.placeholder} ${styles.card}`}>
- Customize
- </Link>
- <Link href="/components/compose" className={`${styles.placeholder} ${styles.card}`}>
- Compose
- </Link>
- <Link href="/components/blocks" className={`${styles.placeholder} ${styles.card}`}>
- Blocks
- </Link>
- <Link href="/components/foundation" className={`${styles.placeholder} ${styles.card}`}>
- Foundation
- </Link>
- <Link href="/components/theme-builder" className={`${styles.placeholder} ${styles.card}`}>
- Theme Builder
- </Link>
- </div>
- </section>
-
- <section className={styles.section}>
- <h2 className={styles.sectionTitle}>Frequently Asked Questions</h2>
- <div className={`${styles.placeholder} ${styles.faqAccordion}`}>Accordion</div>
- </section>
-
- <div className={styles.footer} />
- </main>
- );
-}
diff --git a/docs/app/components/placeholderPage.module.css b/docs/app/components/placeholderPage.module.css
deleted file mode 100644
index 56a7ffd67..000000000
--- a/docs/app/components/placeholderPage.module.css
+++ /dev/null
@@ -1,18 +0,0 @@
-.page {
- max-width: 820px;
- padding: 24px;
- background: var(--openui-foreground);
- display: flex;
- flex-direction: column;
- gap: 12px;
-}
-
-.title {
- font: var(--openui-text-heading-sm);
- color: var(--openui-text-neutral-primary);
-}
-
-.description {
- font: var(--openui-text-body-default);
- color: var(--openui-text-neutral-secondary);
-}
diff --git a/docs/app/components/theme-builder/layout.tsx b/docs/app/components/theme-builder/layout.tsx
deleted file mode 100644
index 98c0032d5..000000000
--- a/docs/app/components/theme-builder/layout.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import {
- DM_Sans,
- Lato,
- Montserrat,
- Nunito,
- Playfair_Display,
- Poppins,
- Roboto,
- Source_Sans_3,
-} from "next/font/google";
-import type { ReactNode } from "react";
-
-const roboto = Roboto({
- variable: "--font-roboto",
- subsets: ["latin"],
-});
-
-const poppins = Poppins({
- variable: "--font-poppins",
- subsets: ["latin"],
- weight: ["400", "500", "600"],
-});
-
-const lato = Lato({
- variable: "--font-lato",
- subsets: ["latin"],
- weight: ["400", "700"],
-});
-
-const montserrat = Montserrat({
- variable: "--font-montserrat",
- subsets: ["latin"],
-});
-
-const nunito = Nunito({
- variable: "--font-nunito",
- subsets: ["latin"],
-});
-
-const playfairDisplay = Playfair_Display({
- variable: "--font-playfair-display",
- subsets: ["latin"],
-});
-
-const sourceSans3 = Source_Sans_3({
- variable: "--font-source-sans-3",
- subsets: ["latin"],
-});
-
-const dmSans = DM_Sans({
- variable: "--font-dm-sans",
- subsets: ["latin"],
-});
-
-const fontClassName = [
- roboto.variable,
- poppins.variable,
- lato.variable,
- montserrat.variable,
- nunito.variable,
- playfairDisplay.variable,
- sourceSans3.variable,
- dmSans.variable,
-].join(" ");
-
-export default function ThemeBuilderLayout({ children }: { children: ReactNode }) {
- return <div className={fontClassName}>{children}</div>;
-}
diff --git a/docs/app/components/theme-builder/page.module.css b/docs/app/components/theme-builder/page.module.css
deleted file mode 100644
index 5bf23fe7e..000000000
--- a/docs/app/components/theme-builder/page.module.css
+++ /dev/null
@@ -1,174 +0,0 @@
-.page {
- width: 100%;
- padding: var(--openui-space-m-l) var(--openui-space-xl);
-}
-
-.builderShell {
- display: grid;
- grid-template-columns: minmax(0, 1fr) 280px;
- gap: var(--openui-space-2xs);
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-3xl);
- background: var(--openui-highlight-subtle);
- padding: var(--openui-space-2xs);
- align-items: start;
-}
-
-.previewPane {
- min-width: 0;
- height: calc(100vh - 170px);
- overflow-y: auto;
- padding: var(--openui-space-xl);
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-2xl);
- background: var(--openui-foreground);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
-}
-
-.previewScope {
- color: var(--openui-text-neutral-primary);
-}
-
-.blocksHeader {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.blocksTitle {
- margin: 0;
- font: var(--openui-text-heading-sm);
- color: var(--openui-text-neutral-primary);
-}
-
-.blocksDescription {
- margin: 0;
- font: var(--openui-text-body-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-.blockSection {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-s);
-}
-
-.sectionTitle {
- margin: 0;
- font: var(--openui-text-label-default-heavy);
- color: var(--openui-text-neutral-primary);
-}
-
-.blockGrid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: var(--openui-space-s);
-}
-
-.blockCard {
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-xl);
- background: var(--openui-background);
- padding: var(--openui-space-m);
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: var(--openui-space-s);
-}
-
-.blockCardBody {
- min-width: 0;
-}
-
-.blockCardTitle {
- margin: 0;
- font: var(--openui-text-label-default);
- color: var(--openui-text-neutral-primary);
-}
-
-.blockCardMeta {
- margin: var(--openui-space-3xs) 0 0;
- font: var(--openui-text-body-xs);
- color: var(--openui-text-neutral-tertiary);
- word-break: break-word;
-}
-
-.blockCardLink {
- flex-shrink: 0;
- padding: var(--openui-space-2xs) var(--openui-space-s);
- border-radius: var(--openui-radius-full);
- border: 1px solid var(--openui-border-interactive);
- background: var(--openui-foreground);
- color: var(--openui-text-neutral-primary);
- font: var(--openui-text-label-xs);
- text-decoration: none;
-}
-
-.controlsPane {
- position: sticky;
- top: 88px;
- border: 1px solid var(--openui-border-default);
- border-radius: var(--openui-radius-2xl);
- background: var(--openui-foreground);
- padding: var(--openui-space-l);
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-l);
- max-height: calc(100vh - 120px);
- overflow-y: auto;
-}
-
-.controlsHeader {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.controlsTitle {
- margin: 0;
- font: var(--openui-text-heading-xs);
- color: var(--openui-text-neutral-primary);
-}
-
-.controlsDescription {
- margin: 0;
- font: var(--openui-text-body-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-.controlsGroup {
- display: flex;
- flex-direction: column;
- gap: var(--openui-space-2xs);
-}
-
-.controlLabel {
- font: var(--openui-text-label-sm);
- color: var(--openui-text-neutral-secondary);
-}
-
-@media (max-width: 1100px) {
- .builderShell {
- grid-template-columns: 1fr;
- }
-
- .previewPane {
- height: auto;
- max-height: none;
- overflow: visible;
- }
-
- .controlsPane {
- position: static;
- top: auto;
- max-height: none;
- }
-}
-
-@media (max-width: 860px) {
- .blockGrid {
- grid-template-columns: 1fr;
- }
-}
diff --git a/docs/app/components/theme-builder/page.tsx b/docs/app/components/theme-builder/page.tsx
deleted file mode 100644
index 94397c717..000000000
--- a/docs/app/components/theme-builder/page.tsx
+++ /dev/null
@@ -1,408 +0,0 @@
-"use client";
-
-import { useAppTheme } from "@components/components/AppThemeProvider/AppThemeProvider";
-import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@openuidev/react-ui";
-import {
- ThemeProvider,
- swatch,
- withAlpha,
- type BrandSwatchName,
- type NeutralSwatchName,
- type Theme,
-} from "@openuidev/react-ui/ThemeProvider";
-import dynamic from "next/dynamic";
-import { useMemo, useState } from "react";
-import styles from "./page.module.css";
-
-const RealBlocksCanvas = dynamic(
- () => import("@components/components/ThemeBuilder/realBlocksCanvas"),
- { ssr: false },
-);
-
-type ScaleOption = "compact" | "default" | "comfortable";
-type RadiusScaleOption = "none" | "small" | "default" | "large" | "full";
-type FontOption =
- | "google-sans"
- | "inter"
- | "roboto"
- | "poppins"
- | "lato"
- | "montserrat"
- | "nunito"
- | "playfair-display"
- | "source-sans-3"
- | "dm-sans";
-
-const BASE_COLOR_OPTIONS: Array<{ value: NeutralSwatchName; label: string }> = [
- { value: "neutral", label: "Neutral" },
- { value: "slate", label: "Slate" },
- { value: "gray", label: "Gray" },
- { value: "zinc", label: "Zinc" },
- { value: "stone", label: "Stone" },
-];
-
-const ACCENT_COLOR_OPTIONS: Array<{ value: BrandSwatchName; label: string }> = [
- { value: "blue", label: "Blue" },
- { value: "purple", label: "Purple" },
- { value: "pink", label: "Pink" },
- { value: "teal", label: "Teal" },
- { value: "cyan", label: "Cyan" },
- { value: "emerald", label: "Emerald" },
- { value: "violet", label: "Violet" },
- { value: "neutral", label: "Neutral" },
-];
-
-const SCALE_OPTIONS: Array<{ value: ScaleOption; label: string }> = [
- { value: "compact", label: "Compact" },
- { value: "default", label: "Default" },
- { value: "comfortable", label: "Comfortable" },
-];
-
-const RADIUS_SCALE_OPTIONS: Array<{ value: RadiusScaleOption; label: string }> = [
- { value: "none", label: "None" },
- { value: "small", label: "Small" },
- { value: "default", label: "Default" },
- { value: "large", label: "Large" },
- { value: "full", label: "Full" },
-];
-
-const FONT_OPTIONS: Array<{ value: FontOption; label: string; family: string }> = [
- {
- value: "google-sans",
- label: "Google Sans",
- family: '"Google Sans Text", "Google Sans", sans-serif',
- },
- { value: "inter", label: "Inter", family: 'var(--font-inter), "Inter", sans-serif' },
- { value: "roboto", label: "Roboto", family: 'var(--font-roboto), "Roboto", sans-serif' },
- { value: "poppins", label: "Poppins", family: 'var(--font-poppins), "Poppins", sans-serif' },
- { value: "lato", label: "Lato", family: 'var(--font-lato), "Lato", sans-serif' },
- {
- value: "montserrat",
- label: "Montserrat",
- family: 'var(--font-montserrat), "Montserrat", sans-serif',
- },
- { value: "nunito", label: "Nunito", family: 'var(--font-nunito), "Nunito", sans-serif' },
- {
- value: "playfair-display",
- label: "Playfair Display",
- family: 'var(--font-playfair-display), "Playfair Display", serif',
- },
- {
- value: "source-sans-3",
- label: "Source Sans 3",
- family: 'var(--font-source-sans-3), "Source Sans 3", sans-serif',
- },
- { value: "dm-sans", label: "DM Sans", family: 'var(--font-dm-sans), "DM Sans", sans-serif' },
-];
-
-const SPACING_SCALE_MULTIPLIER: Record<ScaleOption, number> = {
- compact: 0.85,
- default: 1,
- comfortable: 1.2,
-};
-
-const RADIUS_PRESET_BASE: Record<RadiusScaleOption, number> = {
- none: 0,
- small: 1,
- default: 2,
- large: 2.5,
- full: 3.25,
-};
-
-const getBrandBaseShade = (brandSwatch: BrandSwatchName): 600 | 1000 =>
- brandSwatch === "neutral" ||
- brandSwatch === "slate" ||
- brandSwatch === "gray" ||
- brandSwatch === "zinc" ||
- brandSwatch === "stone"
- ? 1000
- : 600;
-
-const toPx = (value: number): string => {
- if (value === 0) {
- return "0";
- }
- const rounded = Math.round(value * 100) / 100;
- return `${rounded}px`;
-};
-
-const CODE_FONT_FAMILY = '"SFMono-Regular", Menlo, monospace';
-
-const buildTypographyOverrides = (fontFamily: string): Partial<Theme> => ({
- fontBody: fontFamily,
- fontHeading: fontFamily,
- fontLabel: fontFamily,
- fontNumbers: fontFamily,
- fontCode: CODE_FONT_FAMILY,
-
- textBodyXs: `400 12px/1.5 ${fontFamily}`,
- textBodyXsHeavy: `500 12px/1.5 ${fontFamily}`,
- textBodySm: `400 14px/1.5 ${fontFamily}`,
- textBodySmHeavy: `500 14px/1.5 ${fontFamily}`,
- textBodyDefault: `400 16px/1.5 ${fontFamily}`,
- textBodyDefaultHeavy: `500 16px/1.5 ${fontFamily}`,
- textBodyLg: `400 18px/1.5 ${fontFamily}`,
- textBodyLgHeavy: `500 18px/1.5 ${fontFamily}`,
-
- textHeadingXs: `600 16px/1.25 ${fontFamily}`,
- textHeadingSm: `600 18px/1.25 ${fontFamily}`,
- textHeadingMd: `600 24px/1.1 ${fontFamily}`,
- textHeadingLg: `600 28px/1.1 ${fontFamily}`,
- textHeadingXl: `700 32px/1.1 ${fontFamily}`,
-
- textLabelXs: `400 12px/1.25 ${fontFamily}`,
- textLabelXsHeavy: `500 12px/1.25 ${fontFamily}`,
- textLabelSm: `400 14px/1.25 ${fontFamily}`,
- textLabelSmHeavy: `500 14px/1.25 ${fontFamily}`,
- textLabelDefault: `400 16px/1.25 ${fontFamily}`,
- textLabelDefaultHeavy: `500 16px/1.25 ${fontFamily}`,
- textLabelLg: `400 18px/1.25 ${fontFamily}`,
- textLabelLgHeavy: `500 18px/1.25 ${fontFamily}`,
-
- textNumbersXs: `400 12px/1.5 ${fontFamily}`,
- textNumbersXsHeavy: `500 12px/1.5 ${fontFamily}`,
- textNumbersSm: `400 14px/1.5 ${fontFamily}`,
- textNumbersSmHeavy: `500 14px/1.5 ${fontFamily}`,
- textNumbersDefault: `400 16px/1.5 ${fontFamily}`,
- textNumbersDefaultHeavy: `500 16px/1.5 ${fontFamily}`,
- textNumbersLg: `400 18px/1.5 ${fontFamily}`,
- textNumbersLgHeavy: `500 18px/1.5 ${fontFamily}`,
-
- textCodeSm: `400 12px/1.5 ${CODE_FONT_FAMILY}`,
- textCodeSmHeavy: `700 12px/1.5 ${CODE_FONT_FAMILY}`,
- textCodeDefault: `400 14px/1.5 ${CODE_FONT_FAMILY}`,
- textCodeDefaultHeavy: `700 14px/1.5 ${CODE_FONT_FAMILY}`,
-});
-
-function buildThemeOverrides({
- mode,
- baseColor,
- accentColor,
- fontFamily,
- spacingScale,
- radiusScale,
-}: {
- mode: "light" | "dark";
- baseColor: NeutralSwatchName;
- accentColor: BrandSwatchName;
- fontFamily: string;
- spacingScale: ScaleOption;
- radiusScale: RadiusScaleOption;
-}): Theme {
- const isDark = mode === "dark";
- const overlayBase = isDark ? swatch(baseColor, 25) : swatch(baseColor, 1000);
- const neutralPrimary = isDark ? swatch(baseColor, 50) : swatch(baseColor, 1000);
-
- const accentSolid =
- accentColor === "neutral"
- ? isDark
- ? swatch(baseColor, 25)
- : swatch(baseColor, 1000)
- : swatch(accentColor, getBrandBaseShade(accentColor));
-
- const accentText =
- accentColor === "neutral"
- ? isDark
- ? swatch(baseColor, 1000)
- : swatch(baseColor, 25)
- : swatch(baseColor, 25);
-
- const spacingBase = 2 * SPACING_SCALE_MULTIPLIER[spacingScale];
- const radiusBase = RADIUS_PRESET_BASE[radiusScale];
-
- return {
- background: isDark ? swatch(baseColor, 950) : swatch(baseColor, 100),
- foreground: isDark ? swatch(baseColor, 900) : swatch(baseColor, 25),
- popoverBackground: isDark ? swatch(baseColor, 900) : swatch(baseColor, 25),
- sunkLight: withAlpha(overlayBase, 0.02),
- sunk: withAlpha(overlayBase, 0.04),
- elevated: withAlpha(overlayBase, 0.08),
- overlay: isDark ? withAlpha("oklch(0 0 0 / 1)", 0.6) : withAlpha("oklch(0 0 0 / 1)", 0.4),
- highlightSubtle: withAlpha(overlayBase, 0.02),
- highlight: withAlpha(overlayBase, 0.04),
- highlightStrong: withAlpha(overlayBase, 0.08),
- textNeutralPrimary: neutralPrimary,
- textNeutralSecondary: withAlpha(neutralPrimary, 0.6),
- textNeutralTertiary: withAlpha(neutralPrimary, 0.35),
- textBrand: accentSolid,
- textAccentPrimary: accentText,
- textAccentSecondary: withAlpha(accentText, 0.6),
- borderDefault: withAlpha(overlayBase, isDark ? 0.14 : 0.08),
- borderInteractive: withAlpha(overlayBase, isDark ? 0.22 : 0.14),
- borderInteractiveEmphasis: withAlpha(overlayBase, isDark ? 0.4 : 0.28),
- borderAccent: withAlpha(accentSolid, isDark ? 0.35 : 0.16),
- borderAccentEmphasis: withAlpha(accentSolid, isDark ? 0.5 : 0.32),
- interactiveAccentDefault: accentSolid,
- interactiveAccentHover: withAlpha(accentSolid, 0.82),
- interactiveAccentPressed: accentSolid,
- interactiveAccentDisabled: withAlpha(accentSolid, 0.45),
- ...buildTypographyOverrides(fontFamily),
- space000: toPx(0),
- space3xs: toPx(spacingBase * 1),
- space2xs: toPx(spacingBase * 2),
- spaceXs: toPx(spacingBase * 3),
- spaceS: toPx(spacingBase * 4),
- spaceSM: toPx(spacingBase * 5),
- spaceM: toPx(spacingBase * 6),
- spaceML: toPx(spacingBase * 8),
- spaceL: toPx(spacingBase * 9),
- spaceXl: toPx(spacingBase * 12),
- space2xl: toPx(spacingBase * 18),
- space3xl: toPx(spacingBase * 24),
- radiusNone: toPx(0),
- radius3xs: toPx(radiusBase * 0.5),
- radius2xs: toPx(radiusBase * 1),
- radiusXs: toPx(radiusBase * 2),
- radiusS: toPx(radiusBase * 3),
- radiusM: toPx(radiusBase * 4),
- radiusL: toPx(radiusBase * 5),
- radiusXl: toPx(radiusBase * 6),
- radius2xl: toPx(radiusBase * 7),
- radius3xl: toPx(radiusBase * 8),
- radius4xl: toPx(radiusBase * 10),
- radius5xl: toPx(radiusBase * 12),
- radius6xl: toPx(radiusBase * 14),
- radius7xl: toPx(radiusBase * 16),
- radius8xl: toPx(radiusBase * 20),
- radius9xl: toPx(radiusBase * 24),
- radiusFull: "9999px",
- };
-}
-
-export default function ThemeBuilderPage() {
- const { mode } = useAppTheme();
- const [baseColor, setBaseColor] = useState<NeutralSwatchName>("neutral");
- const [accentColor, setAccentColor] = useState<BrandSwatchName>("blue");
- const [fontFamily, setFontFamily] = useState<FontOption>("inter");
- const [radiusScale, setRadiusScale] = useState<RadiusScaleOption>("default");
- const [spacingScale, setSpacingScale] = useState<ScaleOption>("default");
-
- const themeOverrides = useMemo(
- () =>
- buildThemeOverrides({
- mode,
- baseColor,
- accentColor,
- fontFamily:
- FONT_OPTIONS.find((option) => option.value === fontFamily)?.family ??
- FONT_OPTIONS[0].family,
- spacingScale,
- radiusScale,
- }),
- [mode, baseColor, accentColor, fontFamily, spacingScale, radiusScale],
- );
-
- return (
- <main className={styles.page}>
- <section className={styles.builderShell}>
- <ThemeProvider mode={mode} theme={themeOverrides} cssSelector={`.${styles.previewScope}`}>
- <div className={`${styles.previewPane} ${styles.previewScope}`}>
- <RealBlocksCanvas />
- </div>
- </ThemeProvider>
-
- <aside className={styles.controlsPane}>
- <div className={styles.controlsHeader}>
- <h2 className={styles.controlsTitle}>Theme</h2>
- <p className={styles.controlsDescription}>Changes apply only to the left overview.</p>
- </div>
-
- <div className={styles.controlsGroup}>
- <label className={styles.controlLabel}>Base color</label>
- <Select
- value={baseColor}
- onValueChange={(value) => setBaseColor(value as NeutralSwatchName)}
- >
- <SelectTrigger size="md" style={{ width: "100%" }}>
- <SelectValue placeholder="Choose base color" />
- </SelectTrigger>
- <SelectContent>
- {BASE_COLOR_OPTIONS.map((option) => (
- <SelectItem key={option.value} value={option.value} showTick={false}>
- {option.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
-
- <div className={styles.controlsGroup}>
- <label className={styles.controlLabel}>Accent</label>
- <Select
- value={accentColor}
- onValueChange={(value) => setAccentColor(value as BrandSwatchName)}
- >
- <SelectTrigger size="md" style={{ width: "100%" }}>
- <SelectValue placeholder="Choose accent color" />
- </SelectTrigger>
- <SelectContent>
- {ACCENT_COLOR_OPTIONS.map((option) => (
- <SelectItem key={option.value} value={option.value} showTick={false}>
- {option.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
-
- <div className={styles.controlsGroup}>
- <label className={styles.controlLabel}>Font</label>
- <Select
- value={fontFamily}
- onValueChange={(value) => setFontFamily(value as FontOption)}
- >
- <SelectTrigger size="md" style={{ width: "100%" }}>
- <SelectValue placeholder="Choose font" />
- </SelectTrigger>
- <SelectContent>
- {FONT_OPTIONS.map((option) => (
- <SelectItem key={option.value} value={option.value} showTick={false}>
- {option.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
-
- <div className={styles.controlsGroup}>
- <label className={styles.controlLabel}>Radius</label>
- <Select
- value={radiusScale}
- onValueChange={(value) => setRadiusScale(value as RadiusScaleOption)}
- >
- <SelectTrigger size="md" style={{ width: "100%" }}>
- <SelectValue placeholder="Choose radius scale" />
- </SelectTrigger>
- <SelectContent>
- {RADIUS_SCALE_OPTIONS.map((option) => (
- <SelectItem key={option.value} value={option.value} showTick={false}>
- {option.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
-
- <div className={styles.controlsGroup}>
- <label className={styles.controlLabel}>Spacing</label>
- <Select
- value={spacingScale}
- onValueChange={(value) => setSpacingScale(value as ScaleOption)}
- >
- <SelectTrigger size="md" style={{ width: "100%" }}>
- <SelectValue placeholder="Choose spacing scale" />
- </SelectTrigger>
- <SelectContent>
- {SCALE_OPTIONS.map((option) => (
- <SelectItem key={option.value} value={option.value} showTick={false}>
- {option.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
- </aside>
- </section>
- </main>
- );
-}
diff --git a/docs/app/components/types/index.ts b/docs/app/components/types/index.ts
deleted file mode 100644
index f80d8313f..000000000
--- a/docs/app/components/types/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-export type { NavGroup, NavItem, NavSection, NestedNavItem } from "./navigation";
-export type {
- BlockVariantConfig,
- ColorTokenItem,
- FoundationTokenItem,
- HeadingLevel,
- SwatchInput,
- SwatchRow,
- SwatchToken,
- TableColumn,
- ThemeMode,
- TypographyPreviewItem,
- TypographyRow,
-} from "./tokens";
diff --git a/docs/app/components/types/navigation.ts b/docs/app/components/types/navigation.ts
deleted file mode 100644
index 4ca07906c..000000000
--- a/docs/app/components/types/navigation.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-export interface NavItem {
- id: string;
- label: string;
- href: string;
- isPro?: boolean;
- badgeText?: string;
-}
-
-export interface NestedNavItem {
- id: string;
- label: string;
- href?: string;
- isPro?: boolean;
- badgeText?: string;
- items?: NestedNavItem[];
-}
-
-export interface NavGroup {
- id: string;
- label: string;
- items: NestedNavItem[];
-}
-
-export type NavSection = NavGroup | NestedNavItem;
diff --git a/docs/app/components/types/tokens.ts b/docs/app/components/types/tokens.ts
deleted file mode 100644
index 05846c1b6..000000000
--- a/docs/app/components/types/tokens.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import type { CSSProperties, ReactNode } from "react";
-
-export type ThemeMode = "light" | "dark";
-
-export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
-
-export interface TableColumn {
- key: string;
- label: string;
-}
-
-export interface ColorTokenItem {
- token: string;
- useCase?: string;
- label?: string;
- className?: string;
-}
-
-export interface SwatchToken {
- token: string;
- label?: string;
- value?: string;
- tone?: "light" | "dark";
-}
-
-export type SwatchInput = string | SwatchToken;
-
-export interface SwatchRow {
- id?: string;
- title?: string;
- description?: string;
- tokens?: SwatchInput[];
-}
-
-export interface FoundationTokenItem {
- token: string;
- value?: string;
- key?: string;
-}
-
-export interface TypographyPreviewItem {
- token: string;
- preview: string;
- className?: string;
- style?: CSSProperties;
-}
-
-export interface TypographyRow {
- token: string;
- sample: string;
- key?: string;
-}
-
-export interface BlockVariantConfig {
- title?: string;
- description?: string;
- preview?: ReactNode;
- prompt?: ReactNode | string;
- promptTitle?: string;
-}
diff --git a/docs/app/sitemap.ts b/docs/app/sitemap.ts
index ea75aa7d9..ec7376ca6 100644
--- a/docs/app/sitemap.ts
+++ b/docs/app/sitemap.ts
@@ -17,7 +17,6 @@ const STATIC_PATHS = [
"/cloud/gateway/models",
"/cloud/observability",
"/openclaw-os",
- "/components",
"/blog",
"/benchmarks",
"/benchmarks/language",
diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index ba545d97b..8ba7977be 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -121,8 +121,8 @@ const config = {
permanent: false,
},
{
- source: "/components/blocks/accordian",
- destination: "/components/blocks/accordion",
+ source: "/components/:path*",
+ destination: "/docs",
permanent: true,
},
{
diff --git a/docs/tsconfig.json b/docs/tsconfig.json
index b4cc3cb66..1fc461adf 100644
--- a/docs/tsconfig.json
+++ b/docs/tsconfig.json
@@ -20,9 +20,6 @@
"jsx": "react-jsx",
"incremental": true,
"paths": {
- "@components/*": [
- "./app/components/*"
- ],
"@/*": [
"./*"
],