/** * Components overview — the three grouped specimens for the Primer's * "Components" section. Each maps to one `components/` subfolder and lays its * members out as labelled rows (a mono tag on the left, live specimens on the * right): * * · ControlsOverview — the input atoms (`components/controls/`). * · ShowcaseOverview — the shell molecules & organisms (`components/showcase/`). * · PrimerOverview — the Primer-authoring primitives (`components/primer-specimen/`). * * Like the other showcase specimens, these compose the design-system components * directly, so they track the live theme. The labelled-row chrome * (`dcpl-overview` / `dcpl-ovrow` / `dcpl-ovlabel`) is defined in * `components/primer-specimen/styles.ts`. */ import { type ReactNode, useState } from 'react' import { Button, Chip, Eyebrow, FlowNav, IconButton, Input, NavItem, RenderAddress, Select, SelectMenu, Sidebar, Stage, TweaksPanel, } from '../components' import { type BoxSpec, GlyphGrid, type SpaceStep, SpacingScale, SpecimenBoxRow, type Swatch, SwatchGrid, } from '../components/primer-specimen' /** One labelled row inside an overview: mono tag left, specimens right. */ function OverviewRow({ label, align, children, }: { label: string /** Top-align the tag when the row holds a tall specimen (a panel, a tree). */ align?: 'start' children: ReactNode }) { return (
{label}
{children}
) } /** The input atoms — `components/controls/`. */ export function ControlsOverview() { // SelectMenu is controlled — the row owns its committed value. const [device, setDevice] = useState('Desktop') return (
) } const FLOW_STEPS = [ { id: 'Request link', label: 'Request link' }, { id: 'Check email', label: 'Check email' }, { id: 'Signed in', label: 'Signed in' }, ] const TWEAK_ITEMS = [ { label: 'label', control: , }, { label: 'kind', control: , }, ] const FLOAT_ITEMS = [ { label: 'kind', control: , }, ] /** A labelled showcase section — a mono label sitting above its specimen. */ function Section({ label, children }: { label: string; children: ReactNode }) { return (
{label}
{children}
) } /** The shell molecules & organisms — `components/showcase/`. */ export function ShowcaseOverview() { const [active, setActive] = useState('Check email') return (
{}} onSelect={() => {}} /> {}} /> {}} /> {}} onSelect={() => {}} />
Components Documentation Tweaks
exhibit goes here
atom molecule flow page Check email
{}} />
{'tall exhibit — pan & zoom'} {}} />
) } const SWATCHES: Swatch[] = [ { token: 'brand', color: 'var(--dc-brand)', role: 'accent' }, { token: 'fg', color: 'var(--dc-fg)', role: 'text' }, { token: 'surface', color: 'var(--dc-surface)', role: 'inputs' }, { token: 'border', color: 'var(--dc-border)', role: 'hairline' }, ] const SPACE: SpaceStep[] = [ { token: 'space-2', value: '4px', width: 4 }, { token: 'space-4', value: '8px', width: 8 }, { token: 'space-8', value: '16px', width: 16 }, { token: 'space-16', value: '32px', width: 32 }, ] const GLYPHS = [ { glyph: '☰', use: 'nav' }, { glyph: '⟲', use: 'reset' }, { glyph: '✕', use: 'close' }, { glyph: '+', use: 'zoom in' }, { glyph: '-', use: 'zoom out' }, ] const RADII: BoxSpec[] = [ { label: 'sm', note: '5px · controls', boxStyle: { borderRadius: 'var(--dc-radius-sm)' }, }, { label: 'md', note: '8px · panels', boxStyle: { borderRadius: 'var(--dc-radius-md)' }, }, { label: 'full', note: 'pills · dots', boxStyle: { borderRadius: 'var(--dc-radius-full)', width: '48px' }, }, ] /** The Primer-authoring primitives — `components/primer-specimen/`. */ export function PrimerOverview() { return (
) }