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

Maps every leave surface to the shared Material 3 token set (00-shared/02 Design Tokens — proposed defaults until a designer finalizes them) and the shared component system (00-shared/03). No hardcoded colors; all module-specific semantic usage is enumerated here.


1. Color semantics

SemanticToken (00-shared/02)Usage
Leave status pendingcolor.tertiary (+ onTertiary)StatusChip dot/fill; balance "0 remaining" not used here
Leave status approvedcolor.successStatusChip; calendar day tint; approval confirm button
Leave status rejectedcolor.errorStatusChip; rejected row accent; over-entitlement bar
Leave status cancelledcolor.surfaceVariant + onSurfaceVariantdefensive render (unreachable, leave-request.schema.ts:11)
Substitution assignedcolor.primarySubstitutionTile chip (only reachable state, leave.service.ts:261)
Calendar leave-daycolor.primaryContainer fill, onPrimaryContainer textCalendarDayCell
Calendar todaycolor.outline bordertoday ring
Insufficient balancecolor.errorContainer + onErrorContainerApprovalTile inline chip
Info caption ("includes weekends")color.onSurfaceVariantrequest form caption

2. Typography (from 00-shared/02)

ElementStyle
Screen title (AppBar)text.titleLarge
Balance headline numbertext.headlineSmall (tabular figures font-feature to avoid width jump)
Card title / request rangetext.titleMedium
Card sub-line (reason, notes, metadata)text.bodyMedium onSurfaceVariant
Chip labeltext.labelMedium
Caption ("includes weekends", "live balance")text.bodySmall onSurfaceVariant

3. Spacing & shape

  • Card padding space.m (16); internal gaps space.s (8) / space.xs (4).
  • Chip shape shape.pill; cards shape.lg (16) consistent with 00-shared/02.
  • List row height ≥ 64 dp (48 dp min target).

4. Iconography

IconUse
Icons.event_busyrequest tile leading (or type-code badge text)
Icons.balance / Icons.pie_chartbalance screen header
Icons.check_circle_outline / Icons.cancel_outlinedapprove / reject actions
Icons.swap_horizsubstitutions
Icons.calendar_monthcalendar

5. Elevation & state layers

  • Cards: elevation.level1 resting, level2 hover (desktop), pressed overlay stateLayer.pressed per M3 (00-shared/02).
  • Bottom sheets: elevation.level3; scrim scrim@40%.

6. Dark mode & density

  • All tokens are theme-aware (00-shared/02); status colors use light/dark variants automatically.
  • Density: list rows density.comfortable on mobile, density.compact on desktop tablets for the approvals queue (per 00-shared/02).

7. Motion mapping

Motion tokenWhere
m-fast (120 ms)chip state swap after decision; pull-to-refresh fade
m-base (200 ms)screen push; sheet open/close; progress bar fill
m-slow (300 ms)calendar month cross-fade on pager

8. Component → design-system traceability

Leave component (07)Shared primitivesTokens
StatusChipAppChips (variant)color.success/error/tertiary, shape.pill, text.labelMedium
BalanceCardAppCard + LinearProgresscolor.primary, text.headlineSmall
RequestTile / ApprovalTileAppListTile + AppBadge + AppMenuspacing per 03, state layers
SubstitutionTileAppListTile + AppChipscolor.primary chip
ApprovalActionSheetAppBottomSheet + SegmentedButton + AppTextField + AppButtonelevation.level3
LeaveTypeCardAppCard + AppBadgetext.titleMedium
CalendarDayCell / MonthGrid(module-specific)color.primaryContainer, outline, shape.md