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 (Fees Module)

How Fees maps to 00-shared/02 tokens and 00-shared/03 components. No new design tokens; money + finance get semantic aliases only.


1. Theme recipes (module)

PurposeRecipe (light / dark)Used for
Paid / settledsuccessContainer / onSuccessContainerpaid chip, settled banners
Partial / pendingwarningContainer / onWarningContainerpartial chip, "amount due" emphasis
OverdueerrorContainer / onErrorContainer + error iconoverdue chip, overdue amounts
IssuedprimaryContainer / onPrimaryContainerissued chip, info banners
Money emphasisonSurface mono tabular (02 §2)totals, dues, receipts
Money secondaryonSurfaceVariantlabels, per-item amounts
Negative/refunderrorrefund amounts
Zero stateonSurfaceVariant"Settled" text

Semantic roles: success (paid), warning (partial), error (overdue/refund) — standalone custom roles per 00-shared/02 §1.1.

2. Widget → token

WidgetTokens
AmountTextbodyLargedisplaySmall mono, tabularFigures, onSurface/onSurfaceVariant
StatusChip*Container role colors, labelMedium, R-r-sm, e-0
InvoiceCardsurfaceContainerLow, R-r-lg, e-1
DueRowsurface, R-r-md, e-0; row height ≥ 56
LineItemsTablesurfaceContainerLow, R-r-md; mismatch banner tertiaryContainer
ReceiptDocumentsurfaceContainerHigh, R-r-lg, e-1; mono for numbers
MoneyFieldsurfaceVariant fill, outline border, error on error, focus primary
Payment sheetsurfaceContainerHigh, R-r-xl, e-5

3. Typography mapping

TokenUse
displaySmallinvoice total, dues headline amounts
titleLargescreen titles (Fees, Dues)
titleMediumcard titles, section headers, amounts on cards
bodyMediumsecondary rows (structure meta, payment refs)
bodySmallcaptions ("Reduces total at issue time")
labelMediumchips, badges
monoall amounts, refs (transactionReference, receiptNumber, idempotencyKey display)

Numerals: FontFeature.tabularFigures() mandatory on every amount (00-shared/02 §2).

4. Iconography

Material Symbols (outlined 24) + filled for status:

IconUsage
paymentsfees destination, collect action
receipt_longreceipt view
descriptioninvoice doc, draft chip
mailissued chip
hourglasspartial chip
check_circlepaid chip
scheduleoverdue chip, past-due dates
cancelcancelled chip
walletpayment method
content_copycopy reference
qr_codereceipt QR (forward-looking)

Every icon has a text label or tooltip+Semantics (02 §7).

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

TokenWhere
Mo.m-instantchip cross-fades under reduced motion, value changes
Mo.m-faststatus chip AnimatedSwitcher, hover tints
Mo.m-basepayment sheet spring, dialogs, card fade on delete, amount counting
Mo.m-entrancelist item stagger (40 ms)
Mo.m-slowskeleton shimmer

6. Contrast & dark parity

  • All amount text ≥ 4.5:1 (onSurface on surface); secondary amounts onSurfaceVariant ≥ 3:1 minimum per 02 §10.
  • Status chips: text + icon + container colors must pass 4.5:1 in both modes (verify tertiaryContainer/errorContainer pairs).
  • Dark mode: elevation substitutes for color; no hardcoded light-only styles.
  • Reduced-motion & dark QA hooks listed in 14_QA_Checklist.md.

7. Breakpoint behaviour

WidthBehaviour
< 600 dpsingle pane; payment sheet full-height; bottom nav
600–839 dp2-column lists; sheet as right drawer (proposed)
840–1199 dpmaster-detail (dues list + invoice detail), nav rail
≥ 1200 dprail + full-width report (proposed); hover states

8. Theming rules (enforced)

  1. No color in widget code — tokens only (02 §10).
  2. Amounts always mono + tabular + currency — no exceptions.
  3. Status never color-only (09 §9 → icon + text + color).
  4. Tenant branding overrides primary only (02 §1); fees semantics fixed.
  5. AppTheme.light()/dark() unchanged; module adds constants only (AppSpacing, AppRadius, AppMotion).