Skip to content

Releases: renatodeleao/floating-ui-x

floating-ui-x-vue@0.1.2

14 Nov 18:12
Compare
Choose a tag to compare
  • Adds proper support for VirtualElements as references. Before we were incorrectly logging a warning.

floating-ui-x-vue@0.1.1

14 Nov 18:11
Compare
Choose a tag to compare
  • Correct exported type definitions paths in package.json, so that TS users can actually access them

floating-ui-x-vue@0.1.0

07 Nov 18:02
Compare
Choose a tag to compare

First public release of floating-ui-x, where x is vue!

The package tries to be a 1-to-1 match of @floating-ui/react-dom (see docs):

  1. exports useFloating and supports the exact same arguments as the original package.
  • Accepts reactive arguments for placement, strategy and middleware and re-computes position accordingly when these change.
  • Handles template refs bounded to raw HTMLElements or Components1
  1. exports arrow middleware, which just a forward to @floating-ui/core arrow middleware but just unrefs the provided element which most likely from a vue template ref.
  2. exports a few experimental extra utils:
    1. arrowPosition middleware: basically mutates the provided element style attributes directly with the correct position, instead of you manually do it by binding the returned middlewareData
    2. computeArrowPosition is the function under the hood of arrowPosition takes middlewareData and placement as argument and computes the correct style object for the arrow to manually assigned — It basically encompasses the official tutorial "How to style the arrow" from the original package into a function to be used if desired.
  1. The component should have single-root node. Consider forwarding your ref as prop if root node is not the desired element. https://vuejs.org/guide/essentials/template-refs.html#ref-on-component