@homebound/beam 3.12.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +26 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4721,17 +4721,33 @@ function Popper(props) {
|
|
|
4721
4721
|
styles,
|
|
4722
4722
|
attributes
|
|
4723
4723
|
} = (0, import_react_popper.usePopper)(targetElement, popperRef.current, {
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4724
|
+
// Use `fixed` positioning so the portaled tooltip is positioned relative to the viewport.
|
|
4725
|
+
// With the default `absolute` strategy the tooltip is appended to `document.body` and counts
|
|
4726
|
+
// toward the document's scroll size, so a trigger near an edge pushes the tooltip past the
|
|
4727
|
+
// document bounds and introduces scrollbars / renders off-screen. `fixed` elements don't
|
|
4728
|
+
// contribute to document scroll size, so they can be kept within the viewport instead.
|
|
4729
|
+
strategy: "fixed",
|
|
4730
|
+
modifiers: [
|
|
4731
|
+
{
|
|
4732
|
+
name: "arrow",
|
|
4733
|
+
options: {
|
|
4734
|
+
element: arrowRef
|
|
4735
|
+
}
|
|
4736
|
+
},
|
|
4737
|
+
{
|
|
4738
|
+
name: "offset",
|
|
4739
|
+
options: {
|
|
4740
|
+
offset: [0, 5]
|
|
4741
|
+
}
|
|
4742
|
+
},
|
|
4743
|
+
// Keep the tooltip inside the viewport (with a small gutter) rather than overflowing it.
|
|
4744
|
+
{
|
|
4745
|
+
name: "preventOverflow",
|
|
4746
|
+
options: {
|
|
4747
|
+
padding: 8
|
|
4748
|
+
}
|
|
4733
4749
|
}
|
|
4734
|
-
|
|
4750
|
+
],
|
|
4735
4751
|
placement
|
|
4736
4752
|
});
|
|
4737
4753
|
return (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ref: popperRef, ...attributes.popper, ...ariaProps, onMouseEnter, onMouseLeave, ...(0, import_runtime2.mergeProps)(void 0, styles.popper, {
|