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

Maps every search surface to shared design-system tokens and components (00-shared/02_Design_Tokens.md, 00-shared/04_Design_System_Mapping.md, 00-shared/03_Component_Library.md). No new tokens are invented; module components (07) are compositions of shared primitives.


1. Tokens used

Token classUsage in searchShared source
Colorcolor.surface (bar), color.primary (focus underline, see-all), color.text.secondary (hint/captions), color.error (error state)00-shared/02
Spacing8/12/16 grid: bar padding 16, group gap 16, tile gap 800-shared/02
Radiibar 24 dp (pill), tiles 12 dp00-shared/02
Elevationnone on results (flat list); shadow only on bar when focused00-shared/02
Type scaletitleMedium (tile title), bodyMedium (description), labelSmall (captions/tags)00-shared/02
Motionm-fast 150 ms, m-base 250 ms (10 §5)00-shared/08
Semanticsheading levels on group headers, live region on count00-shared/09

2. Component mapping

Shared component (00-shared/03)Search usageModule wrapper
AppTextFieldsearch input baseSearchBarField (07 §1)
AppListTileresult row baseSearchResultTile (07 §2)
AppAvatarleading avatar / type iconin SearchResultTile
AppChips / AppTaglanding examples; result tags (role/dept/grade — search-indexer.service.ts:83-86)07 §2,6
AppSkeletonfirst-query shimmerSearchResultSkeleton (07 §4)
AppEmptyStatezero results / landingSearchEmptyState (07 §5)
AppErrorStateerror + retrySearchErrorState (07 §5)
AppOfflineBanneroffline bannerdirect use
AppSpinnerbar inline spinner, bottom loaderdirect use
AppButtonclear/back CTAsdirect use
AppBadgegroup count badge (per-page counts — 07 §3)in SearchGroupHeader

3. Iconography

Entity-type icons (proposed set, 07 §2): Student, User, Teacher, Staff, Parent, Book, Organization, Lead, Announcement. Rules: monochrome color.text.secondary; avatar fallback = initials from title (search.service.ts:13).

4. Typography rules

  • Titles never truncate to one line without ellipsis; descriptions max 2 lines.
  • Query text in the bar renders as typed (casing preserved — 08 §3).
  • "No results for “q”" quotes the raw query verbatim.

5. Theme variants

VariantChange
Dark themesurface/elevation tokens only; no layout change
High contrastfocus underline 2 dp; tag borders instead of fills
Text scale ×1.5+groups remain scrollable; tiles stack (a11y, 00-shared/09)

6. What the module does NOT customize

No new color roles, no custom type scale, no custom motion curves; the search surface is a pure composition of shared primitives + the 8 module wrappers in 07.