From 8330e93fe5fe0404b7aee63588310a73848df8ce Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Thu, 21 May 2026 02:19:22 +0200 Subject: [PATCH] docs(design): add CREWLI-DESIGN-TOKENS.md token inventory (Plan 2.5 Track B) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per RFC-WS-PRIMEVUE-PLAN-2-5 Track B (§6). Inventories and classifies the design tokens live in the codebase (Brand-essential / Bespoke / Generic per RFC §6.2) and records the Typography decision register (AD-2.5-T1) end-to-end — including the historical Public Sans removal across both the CSS path (P2, commit 41af1801) and the webfontloader JS path (P2-followup, commit 641ca513). Inventory covers: - Tailwind v4 @theme + :root (font tokens + dark variant selector) - PrimeVue Aura preset (full 11-step Crewli teal primary palette + light/dark colorScheme bindings; everything else inherits Aura) - PrimeVue runtime config (darkModeSelector='.dark', cssLayer=false, empty pt defaults scaffold) - Iconify (Tabler set, dash-naming convention) - useShellUiStore runtime writers (.dark class, data-density) - Workspace gradient palette (8 pairs, deterministic per org id) - Brand-square recipe (32px / rounded-lg / px-4 / centring equation) - Density axis (comfortable | compact, axis present but no component-level reaction yet — backlog DENSITY-AWARE-SPACING) Drift items flagged for Plan 4 (no fix in P7 — read-only audit): - Workspace gradient palette uses Tailwind palette anchors, not derivations of Crewli's #0D9394 - User-avatar gradient hardcodes #f472b6 (Tailwind pink) + a fallback #0d9488 that's NOT Crewli's #0D9394 - --topbar-h referenced with fallback only, never declared in :root - 'density' axis attribute set but no component spacing reacts to it Remaining token decisions (surface tones, focus-ring, radius scale, font-size scale, spacing rhythm, density-aware spacing, shadow scale, secondary palette) explicitly deferred to Plan 4 per RFC §6.4. Read-only audit: zero code files touched (verified via git status). Foundation document for Plan 4's template-layer token work. Co-Authored-By: Claude Opus 4.7 (1M context) --- dev-docs/CREWLI-DESIGN-TOKENS.md | 280 +++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 dev-docs/CREWLI-DESIGN-TOKENS.md diff --git a/dev-docs/CREWLI-DESIGN-TOKENS.md b/dev-docs/CREWLI-DESIGN-TOKENS.md new file mode 100644 index 00000000..6db6ce79 --- /dev/null +++ b/dev-docs/CREWLI-DESIGN-TOKENS.md @@ -0,0 +1,280 @@ +# Crewli Design Tokens — Audit & Decision Register + +| Field | Value | +| ---------------------- | ------------------------------------------- | +| Source design system | crewli-starter / PrimeVue Aura | +| Aura preset version | `@primeuix/themes` 4.5.x | +| Tailwind version | v4 (CSS-first `@theme`, no `tailwind.config.ts`) | +| Audit date | 2026-05-21 | +| Phase-1 decided tokens | Typography (AD-2.5-T1) | +| Plan reference | RFC-WS-PRIMEVUE-PLAN-2-5 §6 (Track B) | +| Related docs | [PRIMEVUE_COMPONENTS.md](./PRIMEVUE_COMPONENTS.md), [RFC-WS-PRIMEVUE-PLAN-2-5.md](./RFC-WS-PRIMEVUE-PLAN-2-5.md) | + +## 1. Purpose & scope + +This document is the **inventory and decision register** for the design tokens currently live in the Crewli SPA. It is generated as **Track B** of `RFC-WS-PRIMEVUE-PLAN-2-5` and serves as the foundation for Plan 4's template-layer token work. + +**What this doc does:** +- Inventories every token source (Tailwind v4 `@theme`, PrimeVue Aura preset, component-level CSS variables, store-managed runtime attributes). +- Classifies each token as **Brand-essential**, **Bespoke**, or **Generic** per the RFC §6.2 framework. +- Records the **Typography Decision Register** (AD-2.5-T1) end-to-end, including the historical Public Sans removal across both the CSS path and the webfontloader JS path. +- Flags drift, inconsistencies, and follow-up items for Plan 4. + +**What this doc does NOT do:** +- Make new token decisions beyond Typography (per RFC §6.4, the rest is deferred to Plan 2.5b or absorbed into Plan 4). +- Refactor, consolidate, or move any token value. This is a read-only audit; the doc records state without changing it. +- Decide on density-aware component spacing, focus-ring tuning, surface-tone overrides, or radius-scale customization — all explicitly deferred. + +If a token value changes after this audit date, update the relevant row + the **Audit date** field; do not silently let the inventory drift. + +## 2. Classification scheme + +Each token is one of (verbatim from RFC §6.2): + +- **Brand-essential** — token carries Crewli brand identity. Keep current value. Examples: `--p-primary-color` (teal), gradient definitions, Crewli wordmark colors. +- **Bespoke** — token has a non-default value with deliberate design intent. Keep current value with rationale. Examples: the brand-square recipe (32px / `rounded-lg` / `px-4`), the density axis attribute, custom topbar height. +- **Generic** — token has a non-default value with no documented intent. Default decision: **revert to framework default**. Override requires explicit rationale. + +## 3. Token sources + +| Source | Type | Notes | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| [`apps/app/src/assets/styles/tailwind.css`](../apps/app/src/assets/styles/tailwind.css) | Tailwind v4 `@theme` + `:root` | Single source for Tailwind tokens. Houses `--font-sans` (`@theme`), `--crewli-font-family` (`:root`), and the `@custom-variant dark` selector binding. | +| [`apps/app/src/plugins/primevue/theme.ts`](../apps/app/src/plugins/primevue/theme.ts) | PrimeVue Aura preset (programmatic) | `definePreset(Aura, {...})` — overrides ONLY the `semantic.primary` palette + the light/dark `colorScheme` bindings. Everything else inherits Aura defaults. | +| [`apps/app/src/plugins/primevue/index.ts`](../apps/app/src/plugins/primevue/index.ts) | PrimeVue runtime config | `darkModeSelector: '.dark'`, `cssLayer: false`, Dutch locale, empty `pt` defaults. | +| [`apps/app/src/plugins/iconify.ts`](../apps/app/src/plugins/iconify.ts) | Iconify runtime | Tabler set eager-loaded; icon name convention `tabler-` (dash, NOT Iconify standard colon). | +| [`apps/app/src/stores/useShellUiStore.ts`](../apps/app/src/stores/useShellUiStore.ts) | Pinia store (runtime DOM attribute writer) | Writes `` (theme) and `` (density) via `applyDomAttributes()`. | +| [`apps/app/src/utils/v2/gradient.ts`](../apps/app/src/utils/v2/gradient.ts) | Component data | The 8-pair gradient palette consumed by the WorkspaceSwitcher avatar (per-org gradient via deterministic hash). | +| Component scoped CSS (`