Skip to content

feat: add opt-in design system v1 for research prototypes#15

Open
yepzdk wants to merge 1 commit intomainfrom
feature/add-design-system
Open

feat: add opt-in design system v1 for research prototypes#15
yepzdk wants to merge 1 commit intomainfrom
feature/add-design-system

Conversation

@yepzdk
Copy link
Copy Markdown
Contributor

@yepzdk yepzdk commented Apr 24, 2026

Summary

  • Adds a shared, opt-in design system at docs/public/design-system/v1/ — plain CSS + tokens, no build step, no framework. Existing prototypes are not retrofitted.
  • ITK Dev teal/cyan primary with aarhus.dk-inspired pink accent, pastel surfaces, and softer shapes to signal "same municipal family" without cloning.
  • Ships with a live playground, two realistic example pages (citizen webpage + admin app dashboard), line icon sprite, Chart.js/Leaflet theme helpers, and VitePress docs.

What's included

Static assets (docs/public/design-system/v1/)

  • tokens.css, base.css, components.css, index.css — opt-in via one <link>, scoped under .ds
  • icons.svg — 27-icon line SVG sprite
  • playground.html — live gallery of every component variant
  • examples/website.html — citizen-facing webpage with full-bleed hero
  • examples/app.html — admin dashboard with sidebar, charts, table with sparklines
  • viz/chart-theme.js — Chart.js global defaults + ITK palette plugin
  • viz/leaflet-theme.css + viz/leaflet-overlays.js — themed map with dsMakePin, dsHeatmap, dsCluster

VitePress docs (docs/projects/design-system/)

  • Overview, Tokens, Components, Diagrams (Mermaid), Data viz, Usage
  • Top-nav entry + sidebar registered in docs/.vitepress/sidebar.mts

How to opt in

<link rel="stylesheet" href="/research-projects/design-system/v1/index.css">
<div class="ds"> ... </div>

Versioned at v1/ so breaking changes can ship as v2/ without disturbing pinned prototypes.

Test plan

  • npm run docs:build completes without errors
  • Top-nav → "Design System" renders Overview, Tokens, Components, Diagrams, Data viz, Usage
  • Playground loads; every section renders with ITK palette (buttons, badges, cards, forms, tables, modal, sidebar, stats, alerts, surfaces, hero, quick-links, charts, sparklines, icons, map)
  • Example pages: Webpage (full-bleed hero, quick-links, news grid, campaign, stats, footer) and App dashboard (sidebar, KPIs, chart, activity, table with sparklines)
  • Demo nav at the top of the playground/examples links all three and marks the active one
  • Existing prototypes (climate-nudging, salary-negotiation, book-aarhus, etc.) render unchanged — they do not import the new CSS
  • Opt-in smoke test: adding the <link> + .ds wrapper to a throwaway HTML picks up the styles; omitting .ds does not leak to non-scoped elements

🤖 Generated with Claude Code

Adds a shared, opt-in visual language at docs/public/design-system/v1/ —
plain CSS + tokens, no build step, no framework. Existing prototypes are
not retrofitted.

- ITK Dev teal/cyan primary with aarhus.dk-inspired pink accent, pastel
  surfaces, and softer shapes to signal "same municipal family"
- Tokens: colors, Inter typography, spacing, radii, shadows, transitions
- Components: buttons (incl. pill + accent), badges, cards (incl. soft),
  form inputs, tables, modal, sidebar nav, stat cards, alerts, hero,
  quick-link tiles, sparklines
- Line icon SVG sprite at icons.svg with 27 icons, used in place of emoji
- Data viz helpers at v1/viz/: Chart.js palette theme, Leaflet theme CSS,
  dsMakePin / dsHeatmap / dsCluster overlay helpers — all CDN-loaded,
  no new npm deps
- Playground with every component variant, plus two realistic example
  pages (citizen webpage, admin app dashboard) linked via a shared nav
- VitePress docs pages: Overview, Tokens, Components, Diagrams (Mermaid),
  Data viz, Usage — plus top-nav entry

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant