@zag-js/hover-card@2.0.0-next.2
Pre-release
Pre-release
·
0 commits
to main
since this release
Minor Changes
-
#3252
45451e9Thanks
@github-actions! - Add areasontoonOpenChange, describing what caused
the change.- Added
reasontoonOpenChangedetails:trigger-hover,trigger-focus,trigger-blur,pointer-leave,
interact-outside,escape-keyorscript.api.setOpenaccepts a reason as its second argument, defaulting to
script. - Fixed issue where dismissing with the
Escapekey was reported the same way as pressing outside. - Fixed issue where leaving the trigger before the open delay elapsed fired
onOpenChangewithopen: false, even
though the hover card had never opened.
- Added
-
#3252
afdeee4Thanks
@github-actions! - Add inline positioning for references that wrap across
lines.- Fixed issue where a hover card anchored to a trigger spanning multiple lines was positioned against the box covering
every line, landing far from the pointer instead of under the line being hovered. - Fixed issue where the hover card stayed over the previous trigger when the active trigger changed, showing the new
trigger's content in the old position. - Added
inlineandgetInlineRectCoordsto@zag-js/popper, alongside apositioning.middlewareoption for
supplying extra Floating UI middleware. The middleware is only bundled by machines that import it.
- Fixed issue where a hover card anchored to a trigger spanning multiple lines was positioned against the box covering
-
#3252
d402e9cThanks
@github-actions! - Add@zag-js/safe-areaand use it in the hover card to
track the pointer travelling between the trigger and the content.- Fixed issue where the hover card closed while the pointer was still on its way to the content. Moving diagonally, or
pausing for longer thancloseDelay, no longer dismisses it. - Fixed issue where a hover card opened programmatically or by keyboard was dismissed by pointer movement anywhere on
the page.
The
openandclosingstates are nowopen.idleandopen.closing.state.matches("open")still works, but code
matching the literal state"closing"should use"open.closing".The tooltip uses it too when
interactiveis set, so the pointer can reach a hoverable tooltip without it closing on
the way (WCAG 1.4.13). Non-interactive tooltips are unchanged. - Fixed issue where the hover card closed while the pointer was still on its way to the content. Moving diagonally, or
Patch Changes
- #3252
f7f9abfThanks
@github-actions! - Fixed issue where the hover card opened on focus that
followed a pointer interaction, such as a dialog restoring focus to the trigger. It now opens only for keyboard and
assistive-technology focus, matching@zag-js/tooltip. - Updated dependencies [
2668edc,
06ddeb3,
021c599,
2859ef6,
82692cd,
afdeee4,
6d57458,
734b5e8,
d402e9c,
e8b99d2,
2859ef6,
2859ef6,
2859ef6]:- @zag-js/dom-query@2.0.0-next.2
- @zag-js/dismissable@2.0.0-next.2
- @zag-js/focus-visible@2.0.0-next.2
- @zag-js/popper@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/safe-area@2.0.0-next.2
- @zag-js/anatomy@2.0.0-next.2