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:
@@ -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.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Changelog
|
||||
|
||||
See the project-level [`CHANGELOG.md`](../../CHANGELOG.md).
|
||||
@@ -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
|
||||
@@ -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
|
||||
```
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user