x-ui-design 0.9.51 → 0.9.52

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
@@ -2704,7 +2704,7 @@ const usePopupPosition = ({
2704
2704
  newPlacement = newPlacement.replace('Right', '');
2705
2705
  }
2706
2706
  }
2707
- if ((Math.abs(availableSpace.left) > popupRect.width || Math.abs(availableSpace.right) > popupRect.width) && (newPlacement.includes('top') || newPlacement.includes('bottom'))) {
2707
+ if ((Math.abs(availableSpace.left - container.width - OFFSET) > popupRect.width || Math.abs(availableSpace.right - container.width - OFFSET) > popupRect.width) && (newPlacement.includes('top') || newPlacement.includes('bottom'))) {
2708
2708
  if (availableSpace.left > availableSpace.right) {
2709
2709
  newPlacement = newPlacement + 'Left';
2710
2710
  } else {