@lumx/react 3.6.7-alpha.1 → 3.6.7-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/index.d.ts CHANGED
@@ -794,8 +794,6 @@ 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. */
798
- focusTrapZone?: RefObject<HTMLElement>;
799
797
  /** Z-axis position. */
800
798
  zIndex?: number;
801
799
  /** On close callback (on click away or Escape pressed). */
package/index.js CHANGED
@@ -6538,7 +6538,7 @@ function usePopoverStyle(_ref5) {
6538
6538
  };
6539
6539
  }
6540
6540
 
6541
- const _excluded$m = ["anchorRef", "as", "children", "className", "closeOnClickAway", "closeOnEscape", "elevation", "focusElement", "hasArrow", "isOpen", "onClose", "parentElement", "usePortal", "focusAnchorOnClose", "withFocusTrap", "boundaryRef", "fitToAnchorWidth", "fitWithinViewportHeight", "focusTrapZone", "offset", "placement", "style", "theme", "zIndex"];
6541
+ const _excluded$m = ["anchorRef", "as", "children", "className", "closeOnClickAway", "closeOnEscape", "elevation", "focusElement", "hasArrow", "isOpen", "onClose", "parentElement", "usePortal", "focusAnchorOnClose", "withFocusTrap", "boundaryRef", "fitToAnchorWidth", "fitWithinViewportHeight", "offset", "placement", "style", "theme", "zIndex"];
6542
6542
 
6543
6543
  /**
6544
6544
  * Defines the props of the component.
@@ -6591,7 +6591,6 @@ const _InnerPopover = /*#__PURE__*/forwardRef((props, ref) => {
6591
6591
  boundaryRef,
6592
6592
  fitToAnchorWidth,
6593
6593
  fitWithinViewportHeight,
6594
- focusTrapZone,
6595
6594
  offset,
6596
6595
  placement,
6597
6596
  style,
@@ -6625,13 +6624,11 @@ const _InnerPopover = /*#__PURE__*/forwardRef((props, ref) => {
6625
6624
  anchorRef,
6626
6625
  parentElement
6627
6626
  }, 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);
6630
6627
  useCallbackOnEscape(onClose, isOpen && closeOnEscape);
6631
6628
 
6632
6629
  /** Only set focus within if the focus trap is disabled as they interfere with one another. */
6633
6630
  useFocus(focusElement === null || focusElement === void 0 ? void 0 : focusElement.current, !withFocusTrap && isOpen && isPositioned);
6634
- useFocusTrap(withFocusTrap && isOpen && focusZoneElement, focusElement === null || focusElement === void 0 ? void 0 : focusElement.current);
6631
+ useFocusTrap(withFocusTrap && isOpen && (popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.current), focusElement === null || focusElement === void 0 ? void 0 : focusElement.current);
6635
6632
  const clickAwayRefs = useRef([popoverRef, anchorRef]);
6636
6633
  const mergedRefs = useMergeRefs(setPopperElement, ref, popoverRef);
6637
6634
  return isOpen ? renderPopover( /*#__PURE__*/React.createElement(Component, _extends({}, forwardedProps, {