Skip to content

@zag-js/number-input@2.0.0-next.2

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 31 Aug 19:56
· 0 commits to main since this release
85a12d2

Minor Changes

  • #3252
    c5786c1 Thanks
    @github-actions! - - Added reason to onValueChange and onValueCommit
    details, describing what caused the change: input-change, input-blur, keyboard, increment-press,
    decrement-press, wheel, scrub or script.
    • Fixed issue where onValueCommit did not fire for a released stepper, a finished scrub, api.setValue or
      api.clearValue. It now fires once per settled interaction, including a scrub that streams many steps.

Patch Changes

  • #3252
    c5786c1 Thanks
    @github-actions! - - Fixed issue where onFocusChange reported focus the
    input never received. Pressing a stepper or the scrubber reported focused: true even when focusInputOnChange was
    false and nothing was focused. Focus is now reported from the input's own focus event.

    • Fixed issue where pressing Enter reported onFocusChange({ focused: false }) while the input kept focus.
  • #3252
    c5786c1 Thanks
    @github-actions! - - Fixed issue where a cancelled pointer left the value
    stepping on its own. A hold interrupted by touch scrolling or a re-render never ended, and the repeat interval kept
    running.

    • Fixed issue where holding a stepper on touch could raise the context menu and interrupt the repeat.
  • #3252
    c5786c1 Thanks
    @github-actions! - - Fixed issue where onValueInvalid reported the wrong
    value and reason. With max: 1000, typing 5000 and blurring reported rangeUnderflow for the clamped value 1000,
    which is in range. It now reports rangeOverflow and 5000.

    • Changed when onValueInvalid fires: as the out-of-range value is entered rather than on blur, and no longer when
      clamping brings the value back into range.
  • #3252
    c5786c1 Thanks
    @github-actions! - - Fixed issue where PageUp and PageDown did not step
    the value. They now step by largeStep, matching Shift + ArrowUp and Shift + ArrowDown.

    • Fixed issue where aria-valuetext was only set via translations.valueText, so a value formatted as $500.00 was
      announced as "500" by screen readers. It now falls back to the formatted value.
  • Updated dependencies [2668edc,
    06ddeb3,
    6d57458,
    734b5e8,
    e8b99d2,
    2859ef6,
    2859ef6,
    2859ef6]:

    • @zag-js/dom-query@2.0.0-next.2
    • @zag-js/core@2.0.0-next.2
    • @zag-js/types@2.0.0-next.2
    • @zag-js/utils@2.0.0-next.2
    • @zag-js/anatomy@2.0.0-next.2