From 68fe57f5855a61d96638918f672b47e4bd4b038c Mon Sep 17 00:00:00 2001 From: Kawa Date: Wed, 1 Apr 2026 09:05:56 +0200 Subject: [PATCH] docs(phase-09): research MD3 components phase --- .../phases/09-md3-components/09-RESEARCH.md | 679 ++++++++++++++++++ 1 file changed, 679 insertions(+) create mode 100644 .planning/phases/09-md3-components/09-RESEARCH.md diff --git a/.planning/phases/09-md3-components/09-RESEARCH.md b/.planning/phases/09-md3-components/09-RESEARCH.md new file mode 100644 index 0000000..62455c6 --- /dev/null +++ b/.planning/phases/09-md3-components/09-RESEARCH.md @@ -0,0 +1,679 @@ +# Phase 9: MD3 Components - Research + +**Researched:** 2026-04-01 +**Domain:** React + Tailwind v4 CSS-custom-property-based MD3 component styling +**Confidence:** HIGH + +--- + +## Summary + +Phase 9 delivers five component-level upgrades to a working wizard that already has a complete +MD3 color token system (Phase 8 complete). The token layer (`--r2b-*` CSS custom properties +mapped to Tailwind semantic utilities via `@theme`) is the foundation — every new component +pattern must consume `bg-primary`, `text-on-surface`, `border-outline`, etc., never raw colors. + +The work divides into four visual domains: (1) outlined text fields with CSS-only floating +labels, (2) a three-tier button hierarchy (filled / outlined / text), (3) MD3 elevation on +BackendCard and OutputBlock, and (4) a rebuilt StepIndicator with numbered circles and a +connector line. One non-visual task (DEBT-01) fixes an aria-label inconsistency inside +FieldRenderer's tooltip button. + +The project has a hard constraint of **zero new runtime dependencies**. All styling must be +achieved with Tailwind v4 utility classes and plain CSS transitions — no component library, no +animation library. The existing 166 tests are GREEN and must stay GREEN throughout. The +critical test-breaking risk is that 131 test selectors use `getByLabelText` with +`htmlFor`/`id` relationships; the floating label pattern must preserve those relationships +exactly. + +**Primary recommendation:** Build a new `` wrapper component, styled button +variant classes (not a separate component), an elevation mixin via Tailwind `shadow-` tokens, +and a rebuilt `` using Tailwind flex + absolute-positioned connector — all +consuming the existing semantic token utilities. + +--- + + +## Phase Requirements + +| ID | Description | Research Support | +|----|-------------|-----------------| +| COMP-01 | All text inputs render as MD3 outlined text fields with floating labels that animate on focus and when the field has content | Floating label via CSS `peer` + `placeholder=" "` trick; `` wraps `` + `