web/storybook/docs/ThemeTokens.mdx
import { Meta } from "@storybook/addon-docs/blocks";
<Meta title="Theme Tokens" />export const Swatch = ({ token, css }) => (
<div className="flex min-w-0 flex-col gap-1"> <div className="border-border h-12 w-full rounded-md border" style={{ backgroundColor: css ?? `hsl(var(--${token}))` }} /> <div className="text-muted-foreground font-mono text-xs leading-tight" style={{ fontSize: "0.75rem" }} > --{token} </div> </div> );export const PairChip = ({ bg, fg, label = "Aa — sample text" }) => (
<div className="flex min-w-0 flex-col gap-1"> <div className="border-border flex h-12 items-center justify-center rounded-md border px-2 text-xs font-bold" style={{ backgroundColor: `hsl(var(--${bg}))`, color: `hsl(var(--${fg}))`, }} > {label} </div> <div className="text-muted-foreground font-mono text-xs leading-tight" style={{ fontSize: "0.75rem" }} > --{bg} / --{fg} </div> </div> );export const TokenGrid = ({ children }) => (
<div className="storybook-token-grid">{children}</div> );export const semanticPairs = [ "primary", "secondary", "tertiary", "accent", "destructive", ];
export const statusPairs = [ ["light-red", "dark-red"], ["light-yellow", "dark-yellow"], ["light-green", "dark-green"], ["light-blue", "dark-blue"], ["accent-light-green", "accent-dark-green"], ["accent-light-blue", "accent-dark-blue"], ];
Tokens live in web/src/styles/globals.css. This page reads them directly, so
the reference stays aligned with the application theme.