chore: initial scaffold of KDC Design System
Lint / lint (push) Has been cancelled

Initial repository scaffold:
- design.md (google-labs-code/design.md format) as canonical token + guidelines source
- brand assets, foundations, tokens (W3C-style JSON)
- 12 component primitives, each with labeled anatomy.svg and spec README
- light / dark / high-contrast themes, web/mobile/email/print/presentation templates
- docs (getting started, principles, a11y, voice & tone, contributing)
- runnable web example, token build script stub, CI placeholder

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Roberts
2026-04-29 19:01:53 +00:00
commit 16989d834c
114 changed files with 2011 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
# Accessibility
KDS targets **WCAG 2.2 AA**.
- Color contrast: ≥ 4.5:1 body, ≥ 3:1 large text and UI.
- Focus-visible on every interactive element.
- Don't rely on color alone — pair with icon/text.
- Honor `prefers-reduced-motion` — disable non-essential motion.
- Provide accessible names for all icons used standalone.
- Test with keyboard, screen reader (NVDA / VoiceOver), and 200% zoom.
+3
View File
@@ -0,0 +1,3 @@
# Changelog
See the project-level [`CHANGELOG.md`](../../CHANGELOG.md).
+16
View File
@@ -0,0 +1,16 @@
# Contributing
1. Open an issue describing the proposed change (token, component, doc).
2. Branch from `main`: `git checkout -b feat/<short-name>`.
3. Update `design.md` first — it is the source of truth.
4. Regenerate `tokens/` exports.
5. Add or update component documentation under `components/<name>/`.
6. Open a PR; the design-system maintainers (see `CODEOWNERS`) will review.
## PR checklist
- [ ] `design.md` updated
- [ ] Tokens regenerated
- [ ] Component spec updated (states + a11y)
- [ ] Changelog entry added under `[Unreleased]`
- [ ] Visual examples attached
+17
View File
@@ -0,0 +1,17 @@
# Getting Started
1. **Read** [`design.md`](../../design.md) — the canonical token spec.
2. **Pick** a platform from [`examples/`](../../examples/).
3. **Install** the fonts from [`assets/fonts/`](../../assets/fonts/).
4. **Import** the tokens from [`tokens/`](../../tokens/).
5. **Layer** a theme from [`themes/`](../../themes/).
## Local setup
```bash
# install
npm install
# regenerate tokens (when scripts/build-tokens.js is implemented)
npm run build:tokens
```
+7
View File
@@ -0,0 +1,7 @@
# Design Principles
1. **Clarity over cleverness** — the obvious solution is the right one.
2. **Consistency builds trust** — use system tokens, not bespoke values.
3. **Accessibility is the floor** — WCAG 2.2 AA is the minimum, not a goal.
4. **Whitespace is structural** — let layout breathe before adding rules.
5. **Motion is feedback** — animation explains state change, never decorates.
+12
View File
@@ -0,0 +1,12 @@
# Voice & Tone
**Voice (constant):** clear, confident, human.
**Tone (situational):** warm in onboarding, terse in errors, neutral in data.
## Writing rules
- Sentence case for headings, buttons, and labels.
- Active voice. "Save changes" not "Changes will be saved".
- Lead with what the user gets, not what we did.
- Numbers as digits (`3 items`, not `three items`).
- One idea per sentence in error messages.