equinor / equinor/fusion-web-components

Refactor `textinput` — drop MWC dependency, adopt EDS tokens

Open
#2,240 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
13
Forks
4
Avg merge
3d 20h
Merged PRs (30d)
35

Description

Refactor `fwc-textinput` to a standalone Lit element with EDS tokens. Drop `@material/mwc-textfield`.

## Requirements
- Preserve attributes: `value`, `type`, `label`, `disabled`, `required`, `maxLength`, `pattern`, `icon`, `iconTrailing`, `helper`, `validationMessage`, `placeholder`, `variant`
- Preserve tag name: `fwc-textinput`
- Preserve events (`input`, `change`) and CSS custom properties (`--fwc-textinput-*`)
- Adopt EDS tokens for color, spacing, typography
- Extend `LitElement` directly, no MWC imports
- Use `ElementInternals` for native form association
- Maintain constraint validation API (`checkValidity()`, `reportValidity()`, `validity`)
- Maintain accessibility (textbox role)

Part of #2229

Contributor guide

Open the contributing guide

Research direction

Start at the existing fwc-textinput implementation and inspect how it currently uses @material/mwc-textfield, including its public attributes, events, CSS custom properties, and form behavior. Verify the standalone element against the listed preservation requirements, then check its accessibility and constraint-validation behavior with the project’s existing component tests, if present. Done means no MWC imports, native form association works, and the fwc-textinput API remains compatible.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.