@festo-ui/react 9.0.1-dev.787 → 9.0.1-dev.793

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.
@@ -1,4 +1,5 @@
1
1
  .fwe-popover-container {
2
+ z-index: var(--fwe-z-index-popover);
2
3
  filter: drop-shadow(0 1px 4px #33333329);
3
4
  }
4
5
 
@@ -1,6 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import "./Popover.css";
3
- import { FloatingArrow, arrow, autoUpdate, flip, offset, useClick, useDismiss, useFloating, useHover, useInteractions } from "@floating-ui/react";
3
+ import { FloatingArrow, FloatingPortal, arrow, autoUpdate, flip, offset, shift, useClick, useDismiss, useFloating, useHover, useInteractions } from "@floating-ui/react";
4
4
  import classnames from "classnames";
5
5
  import { useRef } from "react";
6
6
  import { useControlled } from "../../../utils/useControlled.js";
@@ -20,7 +20,11 @@ function Popover({ children, className, 'data-testid': dataTestId, containerClas
20
20
  middleware: [
21
21
  offset(12),
22
22
  enableFlip && flip({
23
- fallbackPlacements: fallbackPositions || void 0
23
+ fallbackPlacements: fallbackPositions || void 0,
24
+ fallbackAxisSideDirection: 'end'
25
+ }),
26
+ shift({
27
+ padding: 8
24
28
  }),
25
29
  showArrow && arrow({
26
30
  element: arrowRef,
@@ -56,25 +60,27 @@ function Popover({ children, className, 'data-testid': dataTestId, containerClas
56
60
  }),
57
61
  children: children
58
62
  }),
59
- showPopover && /*#__PURE__*/ jsxs("div", {
60
- className: "fwe-popover-container",
61
- ref: refs.setFloating,
62
- style: floatingStyles,
63
- ...getFloatingProps(),
64
- children: [
65
- showArrow && /*#__PURE__*/ jsx(FloatingArrow, {
66
- ref: arrowRef,
67
- context: context,
68
- fill: "white",
69
- width: 16,
70
- height: 8
71
- }),
72
- /*#__PURE__*/ jsx("div", {
73
- "data-testid": dataTestId,
74
- className: classnames('fwe-popover', containerClassName),
75
- children: content
76
- })
77
- ]
63
+ showPopover && /*#__PURE__*/ jsx(FloatingPortal, {
64
+ children: /*#__PURE__*/ jsxs("div", {
65
+ className: "fwe-popover-container",
66
+ ref: refs.setFloating,
67
+ style: floatingStyles,
68
+ ...getFloatingProps(),
69
+ children: [
70
+ showArrow && /*#__PURE__*/ jsx(FloatingArrow, {
71
+ ref: arrowRef,
72
+ context: context,
73
+ fill: "white",
74
+ width: 16,
75
+ height: 8
76
+ }),
77
+ /*#__PURE__*/ jsx("div", {
78
+ "data-testid": dataTestId,
79
+ className: classnames('fwe-popover', containerClassName),
80
+ children: content
81
+ })
82
+ ]
83
+ })
78
84
  })
79
85
  ]
80
86
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "9.0.1-dev.787",
3
+ "version": "9.0.1-dev.793",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "copyright": "Copyright (c) 2025 Festo SE & Co. KG. All rights reserved.",
6
6
  "license": "apache-2.0",