Skip to content

fix(deps): update dependency @floating-ui/react to ^0.21.0

Soapbox Bot requested to merge renovate/floating-ui-react-0.x into develop

This MR contains the following updates:

Package Change Age Adoption Passing Confidence
@floating-ui/react (source) ^0.20.0 -> ^0.21.0 age adoption passing confidence

Release Notes

floating-ui/floating-ui

v0.21.1

Compare Source

Bug Fixes

  • fix: remove timeouts for focus guards on Safari (#​2227)

v0.21.0

Compare Source

New Features

  • feat: useClientPoint interaction hook (#​2179)

    This hook provides the ability to position the floating element relative to a client "point" reference. By default, "client" means mouse event coordinates since they possess clientX/Y values, so it follows the cursor when open. You can also use explicit x and y client coordinates.

    If you've used Tippy.js, it provides similar functionality to followCursor while being a bit more general.

    const clientPoint = useClientPoint(context, {
      enabled?: boolean,
      // Restrict the client point to an axis, use the DOM
      // reference as the other axis
      axis?: 'both' | 'x' | 'y',
      // Position explicitly at these client coordinates
      x?: number | null,
      y?: number | null,
    });

Refactors

  • refactor(useDismiss): default bubbles.escapeKey option to false, and allow bubbling prevention to work without using FloatingTree (#​2207)

  • refactor(useTypeahead): reduce default resetMs to 750 from 1000 (#​2213)

  • refactor(FloatingArrow): internally double strokeWidth so it matches borderWidth values (#​2223)

    strokeWidths larger than the floating element's borderWidth are not supported.

  • refactor(useTypeahead): add onTypingChange callback to allow setting a local ref and deprecate context.dataRef.current.typing value (#​2213)

Bug Fixes

  • fix(useFloating): return extended elements from hook (#​2209)

  • fix(useListNavigation): use mounted rather than open state to focus parent floating in tree (#​2210)

  • fix(FloatingFocusManager): make initialFocus and returnFocus non-reactive (#​2211)

  • fix: share floatingId via context object (#​2203)

  • fix(FloatingFocusManager): reset preventing returnFocus with closeOnFocusOut={false} when tabbing out then back in (#​2214)

  • fix(FloatingFocusManager): mutate internal preventReturnFocusRef instead of returnFocusRef (#​2215)

  • fix(useTypeahead): improve logic (#​2213)

    • Reset timeout from a non-match
    • Don't require a role be set and stop propagation/prevent default if typeahead is in use
  • fix(FloatingFocusManager): ensure returnFocus of a nested floating element can return to a root reference if it wasn't focused upon open (such as with a pointer) (#​2221)

  • fix(FloatingArrow): prevent transparency overlap if the floating element border and stroke are both partially transparent (#​2223)

  • fix(FloatingFocusManager): ensure initialFocus works if re-opening floating element while it was transitioning out (#​2221)

  • fix(FloatingArrow): ensure correct vertical size with larger stroke widths (#​2223)

  • fix(FloatingArrow): allow height > width (#​2223)


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports

Loading