{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "status-tokens-demo", "title": "Status Tokens Example", "author": "MR ", "description": "A full page rendering Status Tokens, with its own sample data — what \"Open in v0\" hands over, and what to copy when wiring the component into a real screen.", "registryDependencies": [ "@cantera/status-tokens" ], "files": [ { "path": "registry/examples/status-tokens-demo.tsx", "content": "import { statusCssVars } from '@/lib/status-tokens'\n\n/**\n * One color, one meaning. Recoverable states are warning, not danger; absence is\n * neutral, not an error. The classes come from the installed CSS variables, and\n * `statusCssVars` carries the same twelve tokens for the places a class cannot\n * reach — here, the inline swatch a chart series would use.\n */\nconst tones = [\n {\n name: 'success',\n meaning: 'Healthy. A live grant that needs nothing.',\n solid: 'bg-status-success text-status-success-foreground',\n surface: 'bg-status-success-surface text-status-success',\n swatch: statusCssVars.success,\n },\n {\n name: 'warning',\n meaning: 'Recoverable, needs attention. Expiring soon and expired both live here.',\n solid: 'bg-status-warning text-status-warning-foreground',\n surface: 'bg-status-warning-surface text-status-warning',\n swatch: statusCssVars.warning,\n },\n {\n name: 'danger',\n meaning: 'A failure the user must act on — a revoked grant, a rejected scope.',\n solid: 'bg-status-danger text-status-danger-foreground',\n surface: 'bg-status-danger-surface text-status-danger',\n swatch: statusCssVars.danger,\n },\n {\n name: 'neutral',\n meaning: 'Absence. Never connected, nothing to report.',\n solid: 'bg-status-neutral text-status-neutral-foreground',\n surface: 'bg-status-neutral-surface text-status-neutral',\n swatch: statusCssVars.neutral,\n },\n]\n\n/** Server-safe: no state, no effects, nothing to hydrate. */\nexport function StatusTokensDemo() {\n return (\n
\n {tones.map((tone) => (\n
\n
\n \n \n --status-{tone.name}\n \n {tone.meaning}\n
\n
\n Solid fill, -foreground ink\n
\n
\n -surface, text-status ink\n
\n
\n ))}\n
\n )\n}\n", "type": "registry:component", "target": "components/examples/status-tokens-demo.tsx" }, { "path": "registry/examples/pages/status-tokens-demo-page.tsx", "content": "// Generated by scripts/build-examples.mts. Edit the demo, not this file.\nimport { StatusTokensDemo } from '@/components/examples/status-tokens-demo'\n\nexport default function Page() {\n return (\n
\n
\n \n
\n
\n )\n}\n", "type": "registry:page", "target": "app/examples/status-tokens/page.tsx" } ], "categories": [ "theming", "status" ], "type": "registry:example" }