Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

11 — Design System Mapping (Audit Module)

Audit module → Material 3 / Flutter / token mapping, extending 00-shared/04. Every color, type, spacing, elevation, radius, icon, motion reference traces to 00-shared/02_Design_Tokens.md. Diff semantics use the standalone custom roles success / warning / error (00-shared/02 §1.1).


1. Theme recipes (module)

SurfaceThemeException
List (cards/table)surface, rows surfaceContainerLowsticky table header surfaceContainerHigh El-e-2
Realtime-new row flashprimaryContainer transientback to surface after m-base
Diff addedsecondary (success) tinted rowtext on onSecondary-adjacent surface
Diff removederror tinted row, struck-throughnever color-only (icon + label)
Diff changedtertiary (warning) tinted row
Immutability footnotebodySmall onSurfaceVariant

2. Widget → token

ComponentM3 / FlutterTokensElevRadius
List card (phone row)AppCard flatsurfaceContainerLowe-0r-lg
Desktop tablecustom Tablesurface; header surfaceContainerHigh; divider outlineVariante-0/e-2 header
Filter barWrap + dropdownsfill surfaceVariant, border outline, focus primaryr-md
Active filter chipsAppChips selectedselected secondaryContainerr-sm
AuditActionChipChip/Badgecategory: success/error/tertiary/primaryContainerr-sm
Diff row — changedrow + Badge tertiarytertiary icon changer-sm
Diff row — addedrow + Badge secondarysecondary icon addr-sm
Diff row — removedrow + Badge errorerror icon remove + TextDecoration.lineThroughr-sm
JSON treenested SelectableTextmono; depth indent 16
Empty stateAppEmptyStatedisplaySmall title, bodyMedium onSurfaceVariant
Realtime bannerAppBanner infoprimaryContainere-1r-md
SnackbarsSnackBarinverseSurfacee-5r-md

3. Typography mapping

TokenScreen element
headlineMediumlist/detail screen titles
titleMediumrow action line, section headers
bodyMediumactor/time lines, filter labels
bodySmallcontext line (correlationId), footnotes, immutability note
labelMediumdiff key labels
monoactorId, entityId, correlationId, JSON values, table Context column

Numerals (times, counts) use FontFeature.tabularFigures() (00-shared/02 §2).

4. Iconography

Material Symbols outlined; module map: receipt_long (log), manage_search (filter), history (timeline (proposed)), person/badge (actor), change_circle (diff changed), add_circle (diff added), remove_circle (diff removed), file_download (export (planned)), content_copy (copy), filter_alt (filter sheet), bolt/new_releases (realtime new), keyboard_arrow_right (row chevron).

5. Motion tokens (values 00-shared/02 §6)

PurposeTokenApplied to
Route push detailm-baselist→detail
Realtime appendm-base + flashnew row
First-load staggerm-entrance (40 ms)row entrance
Filter content swapm-slow cross-faderesult area
JSON expandm-fast AnimatedSizedetail
Hover tintm-fasttable rows

Rules: reduced-motion substitutes fades/instants (08 §4); no parallax/stagger.

6. Contrast & dark parity

  • All text ≥ 4.5:1; UI chrome ≥ 3:1 (00-shared/09 §2).
  • Diff colors on dark: chromatic dark variants TBD by designer (00-shared/02 §1.4); all text on row surfaces keeps ≥ 4.5:1.
  • Never color-only status: every diff badge pairs icon + text (00-shared/09 §9).
  • Dark: sticky header surfaceContainerHigh; JSON mono on surfaceContainerLow.

7. Breakpoint behaviour

ClassLayout
phone < 600filter bar in bottom sheet; AuditEntryRow cards; detail pushed
600–839filter bar inline; cards 2-column (tablet)
840–1199master-detail: list left, detail right pane; table (min-width 720 scrolls)
≥ 1200full-width AuditTable (primary target); master-detail; keyboard nav; breadcrumbs

8. Spacing & density

  • Table row height 56 (default) / 40 (dense toggle (proposed) for compliance scanning).
  • Filter bar gap 12; section gap 24; card padding 16 (00-shared/02 §3).
  • Touch targets ≥ 48; dense inline controls 44 with tooltips.