Skip to content

Add a locale-aware renderer-independent number input #175

Description

@woksin

Consumer need

A representative custom-token design-system consumer still requires a locale-aware InputNumber supplied by PrimeReact. Components 4's command NumberField uses native type="number", which does not preserve locale grouping/decimal parsing, fraction-digit policy, prefix/suffix composition, and the same min/max UX.

This is a real bounded Prime island rather than a reason to put Prime back into Components.

Direction

Design a Cratis-owned, renderer-independent locale-aware number input only after confirming the representative consumer contract:

  • number | null public boundary;
  • BCP 47 locale from CratisComponentsProvider;
  • grouping and decimal separators;
  • minimum/maximum fraction digits;
  • min/max/step;
  • optional prefix/suffix;
  • accessible spinbutton semantics and validation;
  • command-field adapter through Arc's existing asCommandFormField seam;
  • stable parts/tokens and native fallback behavior.

Do not expose React Aria or another formatter's types publicly.

Acceptance

  • The representative consumer's NumberInput behavior compiles and passes interaction/locale specs without Prime.
  • nb-NO, en-US, keyboard, screen-reader, invalid, disabled, and mobile behavior are covered.
  • Documentation explains when to use native NumberField versus the locale-aware primitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions