feat: design system v1.0.0 — reconcile tokens from cross-repo audit

Extracted real production usage from 8 KDC repos and consolidated the
consensus (kdcsurveyadd / kdcvault / kdc_void_planner) into the canonical
design.md + tokens.

Highlights:
- brand.ink #000000 -> #1A1530 (purple-tinted, matches real usage)
- brand.canvas #F5F4F0 -> #F7F4ED (warm)
- neutral ramp rebuilt around ink (purple-tinted, not cold slate)
- semantic palette retuned for warm canvas + soft tints
- elevation shadows retinted with brand-ink rgb
- new accent.gold (product) and accent.mint (marketing) tokens
- real themes/light, themes/dark, themes/high-contrast
- fleshed out every component + foundation README
- docs/consolidation-2026-05.md captures the full audit + drift inventory

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Roberts
2026-05-17 17:51:39 +00:00
parent 5c6d703774
commit 6593bdf689
28 changed files with 904 additions and 247 deletions
+27 -13
View File
@@ -1,25 +1,39 @@
# Tooltips
Specification for the **tooltips** primitive.
Brief, hover/focus-triggered hints. Reference: `kdcvault/frontend/src/components/ui/tooltip.tsx` (base-ui Tooltip).
## Anatomy
TODO — drop `anatomy.svg` next to this file.
## Variants
- default
- (list per-component variants)
See `anatomy.svg`. Trigger · floating panel · optional arrow. Max-width 240px; wraps to 3 lines maximum.
## States
default · hover · focus-visible · active/pressed · disabled · loading
## Styling
- Background `brand.ink` (`#1A1530`), text `text.inverse`, `caption` typography.
- Radius `rounded.sm` (4px), padding `6px 10px`.
- Shadow `elevation.2`.
- Arrow 6×6px, same fill as panel.
- Offset 8px from trigger; flip to opposite side at viewport edge.
## Timing
- Open delay 400ms (skip if another tooltip is already open within 500ms).
- Close delay 100ms (allow hover-into-tooltip for copy / link interactions).
- Open/close transition: `motion.duration.fast` `motion.easing.standard`.
## Tokens used
See `design.md``components.tooltips.*`.
`colors.brand.ink`, `colors.text.inverse`, `typography.caption`, `rounded.sm`, `elevation.2`.
## Accessibility
- All interactive instances are keyboard-reachable.
- Focus state has ≥ 3:1 contrast against its background.
- Pair color with an icon or text to convey meaning.
- Trigger is keyboard-focusable; tooltip opens on focus as well as hover.
- Use `aria-describedby` on the trigger pointing at the tooltip's `id`.
- Never put interactive content inside a tooltip — use a popover instead.
- Dismiss on `Esc` and on focus / hover leave.
## Do / Don't
- ✅ Use the canonical token references.
- ❌ Don't hardcode colors, sizes, or radii.
- ✅ Keep copy ≤ 80 chars; one sentence, no period.
- ✅ Use to surface a *non-essential* hint (full label, keyboard shortcut, brief explanation).
- ❌ Don't put a tooltip on a tappable mobile target — touch users never see it.
- ❌ Don't put interactive elements (links, buttons) inside a tooltip — escalate to a `popover`.