v2.2.0
2.2.0 (2024-08-22)
Features
popup: added more ways to control the popup position (b658de1)
- Preferred directions can now be a function
- You can now specify a positionModifier to modify the resulting position.
popup: added positioning options for left/right/top/bottom/center most (1762faa)
popup: added avoidRepositioning option to prevent recalculation of best position (877b764)
This allows the popup to be opened in a good position and keep that position if
the user scrolls, without it picking a different position. This can be useful
for things like menus where we expect them to stay pinned.
popup: popup now exposes a way to set the reference "button" element manually without the slot (1cb497f)
- The element need not be an element, so long as it implement
getBoundingClientRect. - This makes it possible to use the popup only for positioning when we don't
have access to the button directly, only a position we want to place the popup
relative to.