// KitDocs.jsx — browseable docs page for the Compliance kit. const { useState: useDocsCompState } = React; const { COLORS: DCC, statusColor: dStatus, pctDisplay: dPct, cAlpha: dA, CompPageHeader: DHeader, CompButton: DBtn, TeamTabs: DTabs, VariantPill: DVPill, StatusRibbon: DRibbon, MetricHealthCard: DMHC, MetricBadge: DMB, SeenBadge: DSB, DeviceTable: DDT, DeviceTableToolbar: DDTT, DeviceTableHeader: DDTH, DeviceRow: DDR, CompEmpty: DEmpty, ChartCard: DChart, ChartLegend: DLegend, DefinitionTooltip: DTip, RollbackDialog: DRoll, RollbackToast: DToast, CompIcon: DIcon, } = window.COMP; const { CompliancePage: DPage } = window.COMP_PAGE; function CSection({ id, eyebrow, title, blurb, children }) { return (
{eyebrow && (
{eyebrow}
)}

{title}

{blurb && (

{blurb}

)}
{children}
); } function CCode({ children }) { return ( {children} ); } function CSwatch({ name, value, role }) { return (
{name}
{role}
{value}
); } function CSpec({ label, children }) { return (
{label}
{children}
); } function CSpecimen({ children, padding = 24 }) { return (
{children}
); } const TABS = [ { id: 'overview', label: 'Overview' }, { id: 'tokens', label: 'Tokens' }, { id: 'components', label: 'Components' }, { id: 'assemblies', label: 'Assemblies' }, { id: 'reference', label: 'Reference Page' }, ]; const subhead = { margin: '32px 0 6px 0', fontFamily: 'var(--font-mono)', fontSize: 13, fontWeight: 700, color: 'var(--fg-1)', textTransform: 'uppercase', letterSpacing: '0.08em', }; const subblurb = { margin: '0 0 12px 0', fontFamily: 'var(--font-display)', fontSize: 13, lineHeight: 1.55, color: 'var(--fg-muted)', maxWidth: 720, }; const SAMPLE_FAMILY_BAD = { metricId: 'VM-CRITICAL', category: 'Vulnerability Management', target: 0.95, worstStatus: 'Below 15% of Target', entries: [ { metric_id: 'VM-CRITICAL', priority: 'P1', compliance_pct: 0.74, status: 'Below 15% of Target' }, { metric_id: 'VM-CRITICAL', priority: 'P2', compliance_pct: 0.91, status: 'Within 15% of Target' }, ], }; const SAMPLE_FAMILY_OK = { metricId: 'EDR-DEPLOY', category: 'Endpoint Protection', target: 0.95, worstStatus: 'Meets/Exceeds Target', entries: [{ metric_id: 'EDR-DEPLOY', compliance_pct: 0.96, status: 'Meets/Exceeds Target' }], }; function CKitDocs() { const [active, setActive] = useDocsCompState('overview'); const handle = (id) => { setActive(id); const el = document.getElementById(id); if (el) { const top = el.getBoundingClientRect().top + window.scrollY - 80; window.scrollTo({ top, behavior: 'smooth' }); } }; return (
STEAM Security · UI Kit

Compliance

The AEO Compliance view: per-team metric health, six trend charts, and a non-compliant device drilldown. Identity color is teal — distinct from the green-titled CVE pages — with status colors that map green/amber/red onto target adherence.

Identity

Teal owns the page header, the active team tab, the upload CTA, the active device row, and any "neutral compliance signal" surface. Status colors (green/amber/red) own everything that represents target adherence — never decorative.

Layout

Page header → team tabs → metric health row (one card per metric family) → 3×2 chart grid → device table with active/resolved tabs and hostname search. Selecting a metric card filters the table; selecting a row opens a detail panel.

Status (target adherence)
Identity
Category
background linear-gradient(135deg, rgba(30,41,59,.95), rgba(15,23,42,.98)) resting 1.5px solid {`{statusColor}`} @ 0.25 · hover 0.50 · active 1.0 + 15% bg fill var(--font-mono) · 24 / 700 · uppercase · 0.1em tracking · 16px text-shadow glow A family's worstStatus is the lowest-severity entry across all variants — drives card border + ribbon

CompPageHeader

Teal title with glow, last-report meta + optional rollback button, network/vertical scores, and a refresh + upload CTA on the right.

{}} />

TeamTabs

Two-team toggle pinned above the metric strip. The active tab fills with teal at 18% alpha.

{}} />

CompButton

Four variants. Primary is the lone teal CTA (Upload Report). Danger fronts the rollback flow.

Upload Report Refresh Rollback Cancel

MetricHealthCard

The big clickable card in the metric strip. Border + ID color follow the family's worst status, so a single bad variant turns the whole family red. Click filters the device table; the info "i" opens a definition panel.

{}} onInfoClick={() => {}} />
{}} onInfoClick={() => {}} />
{}} onInfoClick={() => {}} />

VariantPill · StatusRibbon

Atoms inside MetricHealthCard. VariantPill = one priority's % readout. StatusRibbon = the bottom lozenge.

MetricBadge · SeenBadge

Row-level chips in the device table. MetricBadge tints by category; SeenBadge escalates slate→amber→red as repeat-failure count grows.

DeviceRow

One non-compliant host per row. Selected state shifts the left border + hostname color to teal.

{}} /> {}} />

ChartCard

Wrapper for any of the six trend charts. Title in mono uppercase, optional subtitle in disabled grey, 240px chart well by default.

chart well

DefinitionTooltip

Hover popover used to surface a metric's title, business justification, and data sources.

Metric health row

One MetricHealthCard per family, flexed evenly. Click a card to filter the device table to only its IDs; an "× clear filter" button appears in the section label when active.

Metric Health — click to filter × clear filter
{}} onInfoClick={() => {}} />
{}} onInfoClick={() => {}} />

Device table

Toolbar (active/resolved tabs + hostname search) → header row → DeviceRows. Empty/loading/error states are centered messages inside the same chrome.

{}} count={3} search="" onSearchChange={() => {}} /> {}} /> {}} /> {}} />
); } window.COMP_DOCS = { CKitDocs };