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

Extends 00-shared/04_Design_System_Mapping.md with attendance-specific mappings: status semantics, module components → M3 widgets/tokens, typography, layout, and theming rules. Tokens per 00-shared/02.


1. Status color semantics (single source of truth)

StatusM3 roleLight tokenDark tokenIcon (filled)
presentsuccess#16A34A / successContainerdark variant (§1.4)check_circle
absenterror#BA1A1A / errorContainerdark variant (§1.4)block
latewarning#F97316 / warningContainerdark variant (§1.4)schedule
half_daywarningas late (distinct icon)sameright_half_circle
leaveneutralsurfaceVariant fg onSurfaceVariantdark variantbeach_access
holidayneutralsurfaceVariantdark variantwb_sunny
unmarkedoutlineoutline dashed chipoutlineVariantradio_button_unchecked

Rules: icon + label always (never color-only, 00-shared/09 §9:76); chip text contrast ≥ 4.5:1 light, ≥ 4.5:1 dark (use on* tokens); error container text #601410 dark.

2. Module components → M3/Flutter mapping

Component (07)M3 patternFlutter widgetsTokens
AttendanceGridTable-like listListView.builder + itemExtent, sticky header via SliverPersistentHeaderrow 56 dp, surface bg, zebra surfaceVariant 4%
StatusChipFilter/Input chipInkWell + Container (rounded r-full/r-md), AnimatedContainer*Container role colors, labelLarge
StatusChipPopoverBottom sheetshowModalBottomSheet + Wrap of chipssurfaceContainerHigh, e-5, r-xl top
BatchEditSheetBottom sheetshowModalBottomSheet, AppButtonas popover; AppBanner for conflict
MarkedCountBarSticky summary stripcustom Material strip + Wrap chipssurfaceContainerLow, e-2, labelMedium
StatusFilterChipsFilter chipsFilterChip with Badge countsselected secondaryContainer, else surfaceVariant
CalendarHeatmapCalendarGridView.builder (7 cols), InkWell cellscells surfaceVariant/status tints, labelMedium
DaySummaryCardCardCard.filled + AppInfoRowssurfaceContainerLow, e-1, r-lg
SummaryDonutChartAppCharts (fl_chart wrapper)02 chart tokens; Semantics summary
AbsenceAlertCardBannerAppBanner warningtertiaryContainer
BiometricDeviceTileList tileAppListTile + AppBadgerow 72 dp (device meta)
UndoBarSnackbar variantcustom bottom bar / SnackBar with actioninverseSurface
ReportJobCardCard + progressAppCard + LinearProgressIndicatore-1, primary progress

3. Typography mapping

UseTokenWidget
Screen title (grid)headlineMediumAppBar title
Grid subtitle (date + count)bodyMedium onSurfaceVariantunder title
Student nametitleMediumrow title
Roll number / admission nomono (tabular)row subtitle bodySmall
Status chip labellabelLargechip text
MarkedCountBar chipslabelMediumcounts
Heatmap day numberlabelMediumcell
Form labelsbodyMediumpopover fields

4. Layout tokens

  • Row height 56 dp; dense a11y mode 44 dp chips (allowed, 02 §9); sheet half-height (S3) ~ 40% screen; heatmap cell 40×40 min; batch bar 64 dp; sticky elements e-2 (bar) / e-3 (FAB).
  • Grid horizontal padding Sp 16 phone / Sp 24 tablet+.

5. Motion tokens

Mo.m-fast status flips; Mo.m-base sheets/bars; Mo.m-instant settle pulse; Mo.m-entrance first-load stagger (reduced-motion → none). All from 02 §6.

6. Iconography

Material Symbols outlined for chrome; filled for status icons (per component table). Sizes: 16 dense chips, 20 sheet items, 24 default, 32 empty state, 40 device header. Every icon paired with a label/tooltip + Semantics (02 §7).

7. Theming rules (attendance-specific)

  1. Status colors come only from the mapping in §1 — never bespoke hexes in widgets.
  2. Zebra striping and "was:" transient labels must exist in dark mode too (contrast audit per 00-shared/09 §2).
  3. Tenant branding (organization.branding.color) overrides primary only — status colors must remain semantic and readable under any seed (02 §1:39-40).
  4. No hardcoded durations/padding in grid widgets (00-shared/04 §7).

8. Accessibility specifics

  • Chips announce state changes (live region), Semantics(toggled:); heatmap cells announce "20 Jul — 28 present, 2 absent".
  • Focus rings primary 2 dp offset 2 on all interactive cells (desktop).
  • 200% text scale: chips collapse to icon + short label; grid stays tabular (00-shared/09 §4).