@jetbrains/ring-ui 5.1.3 → 5.1.4
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.
|
@@ -132,8 +132,8 @@ export const CollapsibleTabs = ({ children, selected, onSelect, moreClassName, m
|
|
|
132
132
|
const container = measureRef.current;
|
|
133
133
|
const descendants = [...container?.children ?? []];
|
|
134
134
|
const moreButton = descendants.pop();
|
|
135
|
-
let moreButtonWidth = moreButton
|
|
136
|
-
const { marginLeft: moreButtonMarginLeft, marginRight: moreButtonMarginRight } = getComputedStyle(moreButton);
|
|
135
|
+
let moreButtonWidth = moreButton?.offsetWidth ?? 0;
|
|
136
|
+
const { marginLeft: moreButtonMarginLeft = '0', marginRight: moreButtonMarginRight = '0' } = moreButton ? getComputedStyle(moreButton) : {};
|
|
137
137
|
moreButtonWidth += +moreButtonMarginLeft.replace('px', '') + +moreButtonMarginRight.replace('px', '');
|
|
138
138
|
const tabsWidth = descendants.map(node => {
|
|
139
139
|
const { marginLeft, marginRight } = getComputedStyle(node);
|
|
@@ -262,19 +262,21 @@ var CollapsibleTabs = function CollapsibleTabs(_ref) {
|
|
|
262
262
|
return undefined;
|
|
263
263
|
}
|
|
264
264
|
var measureTask = fastdom.measure(function () {
|
|
265
|
-
var _container$children;
|
|
265
|
+
var _container$children, _moreButton$offsetWid;
|
|
266
266
|
var container = measureRef.current;
|
|
267
267
|
var descendants = _toConsumableArray((_container$children = container === null || container === void 0 ? void 0 : container.children) !== null && _container$children !== void 0 ? _container$children : []);
|
|
268
268
|
var moreButton = descendants.pop();
|
|
269
|
-
var moreButtonWidth = moreButton.offsetWidth;
|
|
270
|
-
var
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
var moreButtonWidth = (_moreButton$offsetWid = moreButton === null || moreButton === void 0 ? void 0 : moreButton.offsetWidth) !== null && _moreButton$offsetWid !== void 0 ? _moreButton$offsetWid : 0;
|
|
270
|
+
var _ref2 = moreButton ? getComputedStyle(moreButton) : {},
|
|
271
|
+
_ref2$marginLeft = _ref2.marginLeft,
|
|
272
|
+
moreButtonMarginLeft = _ref2$marginLeft === void 0 ? '0' : _ref2$marginLeft,
|
|
273
|
+
_ref2$marginRight = _ref2.marginRight,
|
|
274
|
+
moreButtonMarginRight = _ref2$marginRight === void 0 ? '0' : _ref2$marginRight;
|
|
273
275
|
moreButtonWidth += +moreButtonMarginLeft.replace('px', '') + +moreButtonMarginRight.replace('px', '');
|
|
274
276
|
var tabsWidth = descendants.map(function (node) {
|
|
275
|
-
var
|
|
276
|
-
marginLeft =
|
|
277
|
-
marginRight =
|
|
277
|
+
var _getComputedStyle = getComputedStyle(node),
|
|
278
|
+
marginLeft = _getComputedStyle.marginLeft,
|
|
279
|
+
marginRight = _getComputedStyle.marginRight;
|
|
278
280
|
var width = node.getBoundingClientRect().width;
|
|
279
281
|
return width + +marginLeft.replace('px', '') + +marginRight.replace('px', '');
|
|
280
282
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"react-test-renderer": "^18.2.0",
|
|
163
163
|
"regenerator-runtime": "^0.14.0",
|
|
164
164
|
"rimraf": "^5.0.1",
|
|
165
|
-
"rollup": "^3.
|
|
165
|
+
"rollup": "^3.29.0",
|
|
166
166
|
"rollup-plugin-clear": "^2.0.7",
|
|
167
167
|
"rollup-plugin-styles": "^4.0.0",
|
|
168
168
|
"sinon": "^15.2.0",
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"@babel/preset-typescript": "^7.22.15",
|
|
206
206
|
"@jetbrains/babel-preset-jetbrains": "^2.3.2",
|
|
207
207
|
"@jetbrains/icons": "^3.21.0",
|
|
208
|
-
"@jetbrains/logos": "^2.2.
|
|
208
|
+
"@jetbrains/logos": "^2.2.17",
|
|
209
209
|
"@jetbrains/postcss-require-hover": "^0.1.2",
|
|
210
210
|
"@types/combokeys": "^2.4.7",
|
|
211
211
|
"@types/deep-equal": "^1.0.1",
|