@lumx/react 3.11.1-alpha.2 → 3.11.1-alpha.3

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/package.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "url": "https://github.com/lumapps/design-system/issues"
7
7
  },
8
8
  "dependencies": {
9
- "@lumx/core": "^3.11.1-alpha.2",
10
- "@lumx/icons": "^3.11.1-alpha.2",
9
+ "@lumx/core": "^3.11.1-alpha.3",
10
+ "@lumx/icons": "^3.11.1-alpha.3",
11
11
  "@popperjs/core": "^2.5.4",
12
12
  "body-scroll-lock": "^3.1.5",
13
13
  "classnames": "^2.3.2",
@@ -110,5 +110,5 @@
110
110
  "build:storybook": "storybook build"
111
111
  },
112
112
  "sideEffects": false,
113
- "version": "3.11.1-alpha.2"
113
+ "version": "3.11.1-alpha.3"
114
114
  }
@@ -6,7 +6,7 @@ import classNames from 'classnames';
6
6
  import { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';
7
7
  import { useFocus } from '@lumx/react/hooks/useFocus';
8
8
  import { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';
9
- import { DOCUMENT } from '@lumx/react/constants';
9
+ import { DOCUMENT, VISUALLY_HIDDEN } from '@lumx/react/constants';
10
10
  import { Comp, GenericProps, HasTheme } from '@lumx/react/utils/type';
11
11
  import { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';
12
12
  import { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';
@@ -167,6 +167,8 @@ const _InnerPopover = forwardRef<PopoverProps, HTMLDivElement>((props, ref) => {
167
167
  elevation: Math.min(elevation || 0, 5),
168
168
  position,
169
169
  }),
170
+ // Do not show the popover while it's not properly placed
171
+ !styles.popover?.transform ? VISUALLY_HIDDEN : undefined,
170
172
  )}
171
173
  style={styles.popover}
172
174
  {...attributes.popper}
@@ -170,9 +170,6 @@ export function usePopoverStyle({
170
170
  newStyles.maxHeight = WINDOW?.innerHeight || DOCUMENT?.documentElement.clientHeight;
171
171
  }
172
172
 
173
- // Do not show the popover while it's not properly placed
174
- if (!newStyles.transform) newStyles.opacity = 0;
175
-
176
173
  return newStyles;
177
174
  }, [style, styles.popper, zIndex, fitWithinViewportHeight]);
178
175