@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/CHANGELOG.md +30 -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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.6.22 (2022-03-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **sdk:** Improve useStorage and Optimistic revalidate effect ([#1186](https://github.com/vtex/faststore/issues/1186)) ([08c616b](https://github.com/vtex/faststore/commit/08c616be4c6bc5a215da7ab0c37ff2731aa09f9a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 1.6.21 (2022-03-25)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @faststore/ui
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 1.6.20 (2022-03-24)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* fix dropdown component bug ([#1192](https://github.com/vtex/faststore/issues/1192)) ([f188ac0](https://github.com/vtex/faststore/commit/f188ac0c59db5a0ef7a95eb2412d0bbcd024ae36))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## 1.6.19 (2022-03-24)
|
|
7
37
|
|
|
8
38
|
|
|
@@ -1712,15 +1712,16 @@ const DropdownItem = /*#__PURE__*/React.forwardRef(function Button({
|
|
|
1712
1712
|
*/
|
|
1713
1713
|
|
|
1714
1714
|
const useDropdownPosition = () => {
|
|
1715
|
-
var _dropdownButtonRef$cu,
|
|
1715
|
+
var _dropdownButtonRef$cu, _buttonRect$top, _buttonRect$height, _buttonRect$left;
|
|
1716
1716
|
|
|
1717
1717
|
const {
|
|
1718
1718
|
dropdownButtonRef
|
|
1719
1719
|
} = useDropdown();
|
|
1720
|
-
const
|
|
1721
|
-
const
|
|
1720
|
+
const buttonRect = dropdownButtonRef == null ? void 0 : (_dropdownButtonRef$cu = dropdownButtonRef.current) == null ? void 0 : _dropdownButtonRef$cu.getBoundingClientRect();
|
|
1721
|
+
const topLevel = (_buttonRect$top = buttonRect == null ? void 0 : buttonRect.top) != null ? _buttonRect$top : 0;
|
|
1722
|
+
const topOffset = (_buttonRect$height = buttonRect == null ? void 0 : buttonRect.height) != null ? _buttonRect$height : 0;
|
|
1722
1723
|
const topPosition = topLevel + topOffset;
|
|
1723
|
-
const leftPosition = (
|
|
1724
|
+
const leftPosition = (_buttonRect$left = buttonRect == null ? void 0 : buttonRect.left) != null ? _buttonRect$left : 0;
|
|
1724
1725
|
return {
|
|
1725
1726
|
position: 'absolute',
|
|
1726
1727
|
top: topPosition,
|