@faststore/ui 1.6.19 → 1.6.22

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/ui.esm.js CHANGED
@@ -1704,15 +1704,16 @@ const DropdownItem = /*#__PURE__*/forwardRef(function Button({
1704
1704
  */
1705
1705
 
1706
1706
  const useDropdownPosition = () => {
1707
- var _dropdownButtonRef$cu, _dropdownButtonRef$cu2, _dropdownButtonRef$cu3, _dropdownButtonRef$cu4, _dropdownButtonRef$cu5, _dropdownButtonRef$cu6;
1707
+ var _dropdownButtonRef$cu, _buttonRect$top, _buttonRect$height, _buttonRect$left;
1708
1708
 
1709
1709
  const {
1710
1710
  dropdownButtonRef
1711
1711
  } = useDropdown();
1712
- const topLevel = (_dropdownButtonRef$cu = dropdownButtonRef == null ? void 0 : (_dropdownButtonRef$cu2 = dropdownButtonRef.current) == null ? void 0 : _dropdownButtonRef$cu2.offsetTop) != null ? _dropdownButtonRef$cu : 0;
1713
- const topOffset = (_dropdownButtonRef$cu3 = dropdownButtonRef == null ? void 0 : (_dropdownButtonRef$cu4 = dropdownButtonRef.current) == null ? void 0 : _dropdownButtonRef$cu4.offsetHeight) != null ? _dropdownButtonRef$cu3 : 0;
1712
+ const buttonRect = dropdownButtonRef == null ? void 0 : (_dropdownButtonRef$cu = dropdownButtonRef.current) == null ? void 0 : _dropdownButtonRef$cu.getBoundingClientRect();
1713
+ const topLevel = (_buttonRect$top = buttonRect == null ? void 0 : buttonRect.top) != null ? _buttonRect$top : 0;
1714
+ const topOffset = (_buttonRect$height = buttonRect == null ? void 0 : buttonRect.height) != null ? _buttonRect$height : 0;
1714
1715
  const topPosition = topLevel + topOffset;
1715
- const leftPosition = (_dropdownButtonRef$cu5 = dropdownButtonRef == null ? void 0 : (_dropdownButtonRef$cu6 = dropdownButtonRef.current) == null ? void 0 : _dropdownButtonRef$cu6.offsetLeft) != null ? _dropdownButtonRef$cu5 : 0;
1716
+ const leftPosition = (_buttonRect$left = buttonRect == null ? void 0 : buttonRect.left) != null ? _buttonRect$left : 0;
1716
1717
  return {
1717
1718
  position: 'absolute',
1718
1719
  top: topPosition,