Context
The Autocomplete spec (closes #12, §3) mandates reusing CVA variants directly from \select/types.ts. The implementation follows the spec correctly, but this design decision creates structural coupling between two independent components.
Problem
\�utocomplete/types.ts\ imports and re-exports 14 CVA definitions directly from \select/types.ts. As a result:
- A bug in any shared CVA affects both components simultaneously.
- Visual findings scoped to Autocomplete cannot be fixed within its own 6 files.
- Future divergence between Select and Autocomplete requires breaking the import chain.
This was identified during the visual review of Autocomplete, which surfaced 4 MAJOR findings that require changes to \select/types.ts\ — outside the component's own scope:
- \selectTrigger\ uses \ease-[ease], an invalid CSS easing function.
- \selectIndicator\ uses \duration-300, exceeding the 250ms max for interactive elements.
- \selectClearButton\ applies an input-level focus ring opacity (0.15) instead of button-level (0.35/0.40).
- \�ordered\ variant hover has only one visual signal (background) — border-color is not elevated.
Proposed solution
Extract shared CVA to a neutral module that neither component owns:
\
src/components/atoms/
_shared/
form-field-cva.ts ← shared CVA (selectTrigger, selectItem, selectPopover, etc.)
select/
types.ts ← imports from _shared + Select-specific CVA
autocomplete/
types.ts ← imports from _shared + Autocomplete-specific CVA
\\
This removes the dependency between the two components while keeping a single source of truth for the shared visual primitives.
Acceptance criteria
Context
The Autocomplete spec (closes #12, §3) mandates reusing CVA variants directly from \select/types.ts. The implementation follows the spec correctly, but this design decision creates structural coupling between two independent components.
Problem
\�utocomplete/types.ts\ imports and re-exports 14 CVA definitions directly from \select/types.ts. As a result:
This was identified during the visual review of Autocomplete, which surfaced 4 MAJOR findings that require changes to \select/types.ts\ — outside the component's own scope:
Proposed solution
Extract shared CVA to a neutral module that neither component owns:
\
src/components/atoms/
_shared/
form-field-cva.ts ← shared CVA (selectTrigger, selectItem, selectPopover, etc.)
select/
types.ts ← imports from _shared + Select-specific CVA
autocomplete/
types.ts ← imports from _shared + Autocomplete-specific CVA
\\
This removes the dependency between the two components while keeping a single source of truth for the shared visual primitives.
Acceptance criteria