@synerise/ds-utils 0.26.2 → 0.26.3

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 CHANGED
@@ -3,6 +3,17 @@
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
+ ## [0.26.3](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@0.26.2...@synerise/ds-utils@0.26.3) (2024-04-15)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **tabs:** tabs height and testing issues ([424707d](https://github.com/synerise/synerise-design/commit/424707d35bdfbea65621ff175fa7772996f24c77))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.26.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@0.26.1...@synerise/ds-utils@0.26.2) (2024-04-02)
7
18
 
8
19
 
@@ -1,6 +1,3 @@
1
1
  import { RefObject } from 'react';
2
- declare const useResizeObserver: (elementRef: RefObject<HTMLElement | undefined>) => {
3
- width: number;
4
- height: number;
5
- };
2
+ declare const useResizeObserver: (elementRef: RefObject<HTMLElement | undefined>) => DOMRect;
6
3
  export default useResizeObserver;
@@ -1,20 +1,13 @@
1
1
  import { useEffect, useState, useRef, useCallback } from 'react';
2
2
 
3
3
  var useResizeObserver = function useResizeObserver(elementRef) {
4
- var _useState = useState({
5
- width: 0,
6
- height: 0
7
- }),
4
+ var _useState = useState(new DOMRect()),
8
5
  dimensions = _useState[0],
9
6
  setDimensions = _useState[1];
10
7
 
11
- var resizeObserver = useRef(new window.ResizeObserver(function () {
12
- if (elementRef.current) {
13
- setDimensions({
14
- width: elementRef.current.clientWidth,
15
- height: elementRef.current.clientHeight
16
- });
17
- }
8
+ var resizeObserver = useRef(new window.ResizeObserver(function (entries) {
9
+ var contentRect = entries[0].contentRect;
10
+ setDimensions(contentRect);
18
11
  })).current;
19
12
  var observe = useCallback(function () {
20
13
  elementRef.current && resizeObserver.observe(elementRef.current); // eslint-disable-next-line react-hooks/exhaustive-deps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-utils",
3
- "version": "0.26.2",
3
+ "version": "0.26.3",
4
4
  "description": "Utils UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "@testing-library/react": "10.0.1"
45
45
  },
46
- "gitHead": "67108cb227db0024b189fa289840cfb5a5d0de8c"
46
+ "gitHead": "fcc57aef73d1309a366e4c6e80ce4defdd9f20f8"
47
47
  }