fix(deps): update dependency @floating-ui/react to ^0.21.0
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
@floating-ui/react (source) | ^0.20.0 -> ^0.21.0 |
Release Notes
floating-ui/floating-ui
v0.21.1
Bug Fixes
- fix: remove timeouts for focus guards on Safari (#2227)
v0.21.0
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 explicitx
andy
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 tofalse
, and allow bubbling prevention to work without usingFloatingTree
(#2207) -
refactor(useTypeahead): reduce default
resetMs
to750
from1000
(#2213) -
refactor(FloatingArrow): internally double
strokeWidth
so it matchesborderWidth
values (#2223)⚠ ️strokeWidth
s larger than the floating element'sborderWidth
are not supported. -
refactor(useTypeahead): add
onTypingChange
callback to allow setting a local ref and deprecatecontext.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
andreturnFocus
non-reactive (#2211) -
fix: share
floatingId
viacontext
object (#2203) -
fix(FloatingFocusManager): reset preventing
returnFocus
withcloseOnFocusOut={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
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.