@lumx/react 3.6.7-alpha.0 → 3.6.7-alpha.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/index.d.ts CHANGED
@@ -794,7 +794,7 @@ interface PopoverProps extends GenericProps, HasTheme {
794
794
  placement?: Placement;
795
795
  /** Whether the popover should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
796
796
  usePortal?: boolean;
797
- /** The element in which the focus trap should be set. Default to popover */
797
+ /** The element in which the focus trap should be set. Default to popover. */
798
798
  focusTrapZone?: RefObject<HTMLElement>;
799
799
  /** Z-axis position. */
800
800
  zIndex?: number;
package/index.js CHANGED
@@ -6625,11 +6625,13 @@ const _InnerPopover = /*#__PURE__*/forwardRef((props, ref) => {
6625
6625
  anchorRef,
6626
6626
  parentElement
6627
6627
  }, popperElement);
6628
+ const focusZoneElement = (focusTrapZone === null || focusTrapZone === void 0 ? void 0 : focusTrapZone.current) || (popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.current);
6629
+ console.log('focusZone', focusZoneElement);
6628
6630
  useCallbackOnEscape(onClose, isOpen && closeOnEscape);
6629
6631
 
6630
6632
  /** Only set focus within if the focus trap is disabled as they interfere with one another. */
6631
6633
  useFocus(focusElement === null || focusElement === void 0 ? void 0 : focusElement.current, !withFocusTrap && isOpen && isPositioned);
6632
- useFocusTrap(withFocusTrap && isOpen && (focusTrapZone === null || focusTrapZone === void 0 ? void 0 : focusTrapZone.current) || (popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.current), focusElement === null || focusElement === void 0 ? void 0 : focusElement.current);
6634
+ useFocusTrap(withFocusTrap && isOpen && focusZoneElement, focusElement === null || focusElement === void 0 ? void 0 : focusElement.current);
6633
6635
  const clickAwayRefs = useRef([popoverRef, anchorRef]);
6634
6636
  const mergedRefs = useMergeRefs(setPopperElement, ref, popoverRef);
6635
6637
  return isOpen ? renderPopover( /*#__PURE__*/React.createElement(Component, _extends({}, forwardedProps, {