x-ui-design 0.9.17 → 0.9.18

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.esm.js CHANGED
@@ -2640,6 +2640,15 @@ const usePopupPosition = ({
2640
2640
  relativePosition
2641
2641
  } = getElementParentDetails(targetRef.current, true);
2642
2642
  const _containsElement = scrollableParents?.contains(popupContainer) && popupContainer !== scrollableParents;
2643
+ console.info({
2644
+ container,
2645
+ scrollableParents,
2646
+ relativePosition,
2647
+ positions: !popupContainer,
2648
+ _containsElement,
2649
+ inBody,
2650
+ popupRef
2651
+ });
2643
2652
  const positions = !popupContainer ? {
2644
2653
  top: (targetRef.current?.offsetTop || 0) + OFFSET,
2645
2654
  left: targetRef.current?.offsetLeft || 0
@@ -2666,6 +2675,10 @@ const usePopupPosition = ({
2666
2675
  left: container.left - (popupRect.width + OFFSET),
2667
2676
  right: (inBody ? window.innerWidth : scrollableParents?.clientWidth || 0) - (container.right + popupRect.width + OFFSET)
2668
2677
  };
2678
+ console.info({
2679
+ popupRect,
2680
+ availableSpace
2681
+ });
2669
2682
  let newPlacement = _placement;
2670
2683
  if (availableSpace.bottom < 0 && availableSpace.top > 0) {
2671
2684
  newPlacement = newPlacement.replace('bottom', 'top');