@synerise/ds-tabs 0.13.108 → 0.13.110

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,25 @@
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.13.110](https://github.com/synerise/synerise-design/compare/@synerise/ds-tabs@0.13.109...@synerise/ds-tabs@0.13.110) (2024-05-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **tabs:** fixes containerWidth calc, prevent rendering 0 when tabs=[] ([13c383d](https://github.com/synerise/synerise-design/commit/13c383d97461a03146cfeb9e26e0ff61662a4dc4))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.13.109](https://github.com/synerise/synerise-design/compare/@synerise/ds-tabs@0.13.108...@synerise/ds-tabs@0.13.109) (2024-05-08)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-tabs
20
+
21
+
22
+
23
+
24
+
6
25
  ## [0.13.108](https://github.com/synerise/synerise-design/compare/@synerise/ds-tabs@0.13.107...@synerise/ds-tabs@0.13.108) (2024-05-08)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-tabs
package/dist/Tabs.js CHANGED
@@ -59,6 +59,11 @@ var Tabs = function Tabs(_ref) {
59
59
  useEffect(function () {
60
60
  debouncedEventHandler(width);
61
61
  }, [width, debouncedEventHandler]);
62
+ useEffect(function () {
63
+ var _containerRef$current;
64
+
65
+ containerRef.current && setContainerWidth((_containerRef$current = containerRef.current) == null ? void 0 : _containerRef$current.offsetWidth); // eslint-disable-next-line react-hooks/exhaustive-deps
66
+ }, [containerRef.current]);
62
67
  useEffect(function () {
63
68
  var newTabs = tabs.map(function (tab) {
64
69
  return _objectSpread({}, tab, {
@@ -182,12 +187,12 @@ var Tabs = function Tabs(_ref) {
182
187
  });
183
188
  }));
184
189
  }, [items, underscore, block]);
185
- return /*#__PURE__*/React.createElement(React.Fragment, null, tabs.length && /*#__PURE__*/React.createElement(S.TabsContainer, {
190
+ return /*#__PURE__*/React.createElement(React.Fragment, null, tabs.length > 0 ? /*#__PURE__*/React.createElement(S.TabsContainer, {
186
191
  className: "ds-tabs",
187
192
  ref: containerRef,
188
193
  "data-testid": "tabs-container",
189
194
  block: block
190
- }, renderVisibleTabs, renderDropdown()), !block && renderHelpers);
195
+ }, renderVisibleTabs, renderDropdown()) : null, !block && renderHelpers);
191
196
  };
192
197
 
193
198
  Tabs.defaultProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-tabs",
3
- "version": "0.13.108",
3
+ "version": "0.13.110",
4
4
  "description": "Tabs UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -33,12 +33,12 @@
33
33
  ],
34
34
  "types": "dist/index.d.ts",
35
35
  "dependencies": {
36
- "@synerise/ds-button": "^0.19.7",
37
- "@synerise/ds-dropdown": "^0.17.107",
38
- "@synerise/ds-icon": "^0.60.7",
39
- "@synerise/ds-menu": "^0.18.20",
36
+ "@synerise/ds-button": "^0.19.9",
37
+ "@synerise/ds-dropdown": "^0.17.109",
38
+ "@synerise/ds-icon": "^0.60.9",
39
+ "@synerise/ds-menu": "^0.18.22",
40
40
  "@synerise/ds-typography": "^0.15.0",
41
- "@synerise/ds-utils": "^0.26.3",
41
+ "@synerise/ds-utils": "^0.26.5",
42
42
  "classnames": "2.3.2"
43
43
  },
44
44
  "peerDependencies": {
@@ -50,5 +50,5 @@
50
50
  "devDependencies": {
51
51
  "@testing-library/jest-dom": "5.1.1"
52
52
  },
53
- "gitHead": "700312e731dcbedacd206fd1d3389e5725c80d24"
53
+ "gitHead": "dea3898f262a7c333c6fd8ef806036ed4368bde7"
54
54
  }