@faststore/ui 1.6.19 → 1.6.20
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/CHANGELOG.md +11 -0
- package/dist/ui.cjs.development.js +5 -4
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +5 -4
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/molecules/Dropdown/hooks/useDropdownPosition.ts +4 -4
- package/src/molecules/Dropdown/stories/Dropdown.mdx +13 -1
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,
|
|
1707
|
+
var _dropdownButtonRef$cu, _buttonRect$top, _buttonRect$height, _buttonRect$left;
|
|
1708
1708
|
|
|
1709
1709
|
const {
|
|
1710
1710
|
dropdownButtonRef
|
|
1711
1711
|
} = useDropdown();
|
|
1712
|
-
const
|
|
1713
|
-
const
|
|
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 = (
|
|
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,
|