As a DS designer and developer, I want to be able to use a number input component, because number validation is required in the Simple Query Builder (e.g. with the Quantity input component).
ACs
- The style of the extended number input's states should entirely match that of the text input component's (see specs)
- The number input component should be documented in Storybook according to the specifications (see below)
States
Same as the input family:
- Default state
- Hover
- Active/Focus
- Disabled
- Validation: error
- Validation: warning
Storybook:
The extended number input component will be included in its own Storybook page, under the section "Wikibase components":
- Basic (controllable story displaying a single number input: Controls should allow users to modify the label and placeholder texts)
- All (story displaying all number input states for visual regression testing purposes)
Notes:
- An investigation was conducted in order to figure out if using "type=number" with our current input would provide us with a flexible-enough component for future use in Wikidata, e.g. with the Quantity input (T273795)
- The extended number input component should be able to perform validation that is identical to the validation performed at the backend in WB