diff --git a/CHANGELOG.md b/CHANGELOG.md index 98cee38..3ae3e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,29 @@ All notable changes to the KDC Design System will be documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/). -## [Unreleased] +## [1.0.0] — 2026-05-17 + +### Changed (breaking) +- **Brand ink** `brand.ink` `#000000` → `#1A1530` (purple-tinted; matches all on-brand product surfaces). +- **Canvas** `brand.canvas` `#F5F4F0` → `#F7F4ED` (warmer; consensus across surveyadd / vault / void). +- **Neutral ramp** swapped from cold slate (`#EDEFF3` / `#6B7280` / `#111827`) to a purple-tinted ramp aligned with `brand.ink`. +- **Semantic palette** retuned for the warm canvas — `success` `#16A34A` → `#2F7A5A`, `warning` `#F59E0B` → `#C9892B`, `danger` `#DC2626` → `#B0382F`, `info` `#0EA5E9` → `#5C2D90`. Each now ships a `*Soft` background tint. +- **Elevation shadows** retinted with `rgb(26 21 48)` (brand ink) instead of `rgb(17 24 39)` (slate). New keys: `elevation.focusRing`. +- **`brand.primaryHover`** `#582A8D` → `#5C2D90` (matches `primary-2` in product CSS). ### Added -- Initial repository scaffold: `design.md`, brand, foundations, components, themes, templates, docs. +- `brand.primaryLight` `#8456C2`, `brand.primarySoft` `#F1E9F8`, `brand.canvasCool` `#F7F6FB`. +- `accent.gold` `#C9892B` (+ strong/soft), `accent.mint` `#46C194` (workspace marketing). +- `scale.brand-50/100/200/500/600/700/800` for Tailwind-style usage. +- `neutral.50/150/400/600/700/800` (extra steps). +- Semantic-soft tints, role tokens `text.soft`, `text.disabled`, `text.brand`, `border.subtle`. +- Component variants in `design.md`: `button.accent`, `button.outline`, `card.elevated`, `badge.success/warning/danger`. +- Fleshed-out READMEs for all components (buttons, cards, inputs, badges, modals, forms, navigation, tables, tooltips) and foundations (colors, typography, spacing, radius, elevation, motion, breakpoints, grid). +- Real theme files for `themes/light`, `themes/dark`, `themes/high-contrast`. +- `docs/consolidation-2026-05.md` — extraction report across the 8 KDC repos. + +### Notes +- Reconciliation source: `kdcsurveyadd`, `kdcvault`, `kdc_void_planner` (refined product family) and `k-d-c-workspace` (marketing dashboard). These three product apps share an essentially identical implementation; the design system now reflects their consensus. +- Drift identified in `kdcdiary`, `kdctracker`, `kdcdocs`, `kdcmapper` — different purples and typefaces. Tracked in the consolidation report; migration is out of scope for this release. + +## [Unreleased] diff --git a/README.md b/README.md index bb1ab31..bf08a5c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ KDCDesignSystem/ ## Status -Version: **beta**. Tokens and components are still settling — expect breaking changes. +Version: **1.0.0** (reconciled 2026-05-17). Canonical palette and components match the production implementations in `kdcsurveyadd`, `kdcvault`, and `kdc_void_planner`. See [`docs/consolidation-2026-05.md`](./docs/consolidation-2026-05.md) for the cross-repo audit and outstanding drift in `kdcdiary` / `kdctracker` / `kdcdocs` / `kdcmapper`. ## Contributing diff --git a/components/badges/README.md b/components/badges/README.md index d9a40c0..653ab3d 100644 --- a/components/badges/README.md +++ b/components/badges/README.md @@ -1,25 +1,41 @@ # Badges -Specification for the **badges** primitive. +Small inline labels for status, counts, and metadata. Pill-shaped by default. Reference: `kdcvault/frontend/src/components/ui/badge.tsx`. ## Anatomy -TODO — drop `anatomy.svg` next to this file. + +See `anatomy.svg`. Optional leading dot or icon · label · `rounded.full` shape · 22px default height. ## Variants -- default -- (list per-component variants) -## States -default · hover · focus-visible · active/pressed · disabled · loading +| Token | Use | Background | Text | +|-------|-----|------------|------| +| `badge.default` | Neutral tag | `brand.primarySoft` | `brand.primaryHover` | +| `badge.success` | Positive status | `semantic.successSoft` | `semantic.success` | +| `badge.warning` | Caution / attention | `semantic.warningSoft` | `semantic.warning` | +| `badge.danger` | Failure / blocked | `semantic.dangerSoft` | `semantic.danger` | +| `badge.outline` | Inline tag w/o fill | transparent | `text.muted` + `border.default` | +| `badge.solid` | High-emphasis count | `brand.primary` | `text.inverse` | + +## Sizes + +| Size | Height | Padding | Typography | +|------|--------|---------|------------| +| `sm` | 18px | `0 6px` | `caption` | +| `md` (default) | 22px | `2px 10px` | `caption` | +| `lg` | 26px | `4px 12px` | `bodyS` | ## Tokens used -See `design.md` → `components.badges.*`. + +`components.badge.*`, `colors.semantic.*Soft`. ## 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. + +- Decorative badges don't need ARIA, but status badges should set `role="status"` and include a text label (not colour alone). +- Counts greater than 99 should render as `99+`. ## Do / Don't -- ✅ Use the canonical token references. -- ❌ Don't hardcode colors, sizes, or radii. + +- ✅ Pair colour with text or an icon to convey status. +- ❌ Don't stack more than two badges in a row — fold them into a single chip group instead. +- ❌ Don't use `badge.solid` for ambient counts; reserve it for active selections. diff --git a/components/buttons/README.md b/components/buttons/README.md index 0c18af7..6e40587 100644 --- a/components/buttons/README.md +++ b/components/buttons/README.md @@ -1,25 +1,58 @@ # Buttons -Specification for the **buttons** primitive. +Specification for the **buttons** primitive, reconciled from production usage in kdcsurveyadd, kdcvault, and kdc_void_planner (CVA-driven shadcn variants). ## Anatomy -TODO — drop `anatomy.svg` next to this file. + +See `anatomy.svg` — label · optional leading/trailing icon · 8px gap · 40px height (default size). ## Variants -- default -- (list per-component variants) + +| Token | Use | Background | Text | +|-------|-----|------------|------| +| `button.primary` | Default CTA (one per surface) | `brand.primary` | `text.inverse` | +| `button.accent` | Emphasis / submit / commit action | `accent.gold` | `text.inverse` | +| `button.secondary` | Neutral default action | `surface.subtle` | `text.default` | +| `button.outline` | Lower-emphasis bordered | transparent | `text.default` + `border.strong` | +| `button.ghost` | Tertiary, inline within text | transparent | `brand.primary` | +| `button.destructive` | Irreversible negative action | `semantic.danger` | `text.inverse` | +| `button.link` | Visually a link, behaves as a button | transparent | `brand.primary` (underlined on hover) | + +Reference implementation: `kdcvault/frontend/src/components/ui/button.tsx` (class-variance-authority). + +## Sizes + +| Size | Height | Padding | Typography | +|------|--------|---------|------------| +| `xs` | 28px | `4px 10px` | `caption` | +| `sm` | 32px | `6px 12px` | `bodyS` | +| `md` (default) | 40px | `10px 16px` | `bodyM` | +| `lg` | 48px | `12px 20px` | `bodyM` | +| `icon` | 40×40px | `0` | — | ## States -default · hover · focus-visible · active/pressed · disabled · loading + +`default · hover · focus-visible · active/pressed · disabled · loading` + +- **Hover** swaps `primary` → `primaryHover` (`#5C2D90`), darkens accent by ~12%. +- **Focus-visible** applies `elevation.focusRing` (`0 0 0 3px rgba(107,53,167,0.18)`). +- **Disabled** sets `opacity: 0.5` and `pointer-events: none`. Keep colour — don't desaturate. +- **Loading** swaps the label for a 14px spinner; preserve width to avoid layout shift. ## Tokens used -See `design.md` → `components.buttons.*`. + +See `design.md` → `components.button.*` and `elevation.focusRing`. ## 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. + +- All buttons are keyboard-reachable and have a visible focus ring. +- Icon-only buttons must carry `aria-label`. +- Focus and hover states meet ≥ 3:1 contrast against the button surface. +- Touch target ≥ 44×44px on mobile (`md` size satisfies this). ## Do / Don't -- ✅ Use the canonical token references. -- ❌ Don't hardcode colors, sizes, or radii. + +- ✅ One `primary` *or* one `accent` per surface, never both side-by-side. +- ✅ Use `accent.gold` for the *forward-moving* action in a multi-step flow. +- ❌ Don't hardcode `#6B35A7` — use `colors.brand.primary`. +- ❌ Don't put two CTAs of equal emphasis next to each other. diff --git a/components/cards/README.md b/components/cards/README.md index 969a4bd..1b9ec9f 100644 --- a/components/cards/README.md +++ b/components/cards/README.md @@ -1,25 +1,37 @@ # Cards -Specification for the **cards** primitive. +A surface for grouping related content. Two canonical variants: `default` (flat, hairline border) and `elevated` (lifted shadow). ## Anatomy -TODO — drop `anatomy.svg` next to this file. + +See `anatomy.svg`. Standard parts: `CardHeader` · `CardTitle` · `CardDescription` · `CardAction` (top-right slot) · `CardContent` · `CardFooter`. Reference: `kdcvault/frontend/src/components/ui/card.tsx`. ## Variants -- default -- (list per-component variants) + +| Token | Background | Border | Shadow | Radius | Padding | +|-------|------------|--------|--------|--------|---------| +| `card.default` | `surface.background` | `border.default` (1px) | `elevation.1` | `rounded.lg` (12px) | 24px | +| `card.elevated` | `surface.background` | none | `elevation.3` | `rounded.xl` (16px) | 28px | +| `card.muted` | `surface.subtle` | `border.subtle` | none | `rounded.lg` | 24px | +| `card.outlined` | `surface.background` | `border.strong` (1px) | none | `rounded.lg` | 24px | ## States -default · hover · focus-visible · active/pressed · disabled · loading + +- **Hover (interactive cards only)** — bump shadow one level (`1` → `2`) and shift `translateY(-2px)` over `motion.duration.fast`. +- **Focus-visible** — apply `elevation.focusRing` on the card root. +- **Selected** — 2px `brand.primary` left border or full `border.strong` ring. ## Tokens used -See `design.md` → `components.cards.*`. + +`components.card.*`, `elevation.1`–`3`, `colors.surface.*`, `colors.border.*`. ## 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. + +- If the card is clickable, the entire card is the hit target; expose it as a `