@megafon/ui-core 5.1.1 → 5.1.2

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,20 @@
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
+ ## [5.1.2](https://hq-gitlab.megafon.ru/site-portal/libraries/javascript/megafon-ui/compare/@megafon/ui-core@5.1.0...@megafon/ui-core@5.1.2) (2023-08-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **accordion:** reduced mobile paddings ([35c207a](https://hq-gitlab.megafon.ru/site-portal/libraries/javascript/megafon-ui/commit/35c207a1e704023a2553f4a0c4ed4a928d3d5fd9))
12
+ * **badge:** new color purple gradient ([fbaec53](https://hq-gitlab.megafon.ru/site-portal/libraries/javascript/megafon-ui/commit/fbaec53961cef1e2683ea54676f6ded0f6514841))
13
+ * **button:** fix redefining styles ([d0002f9](https://hq-gitlab.megafon.ru/site-portal/libraries/javascript/megafon-ui/commit/d0002f90d6dbd7b120b5f88b2dac129b11593ccb))
14
+ * **tabs:** fix underfline width in tabs ([57b8258](https://hq-gitlab.megafon.ru/site-portal/libraries/javascript/megafon-ui/commit/57b8258584c72064c3d46c2ef95c2f1dd314ae3a))
15
+
16
+
17
+
18
+
19
+
6
20
  ## [5.1.1](https://hq-gitlab.megafon.ru/site-portal/libraries/javascript/megafon-ui/compare/@megafon/ui-core@5.1.0...@megafon/ui-core@5.1.1) (2023-07-18)
7
21
 
8
22
 
@@ -378,12 +378,19 @@ var Tabs = function Tabs(_ref) {
378
378
  }
379
379
 
380
380
  if (isChildrenLengthDiff) {
381
+ var activeTabNode = tabsRef.current[currentIndex];
382
+
383
+ var _activeTabNode$getBou = activeTabNode.getBoundingClientRect(),
384
+ width = _activeTabNode$getBou.width;
385
+
381
386
  handleFromEdge(swiperInstance);
387
+ setActiveTabWidth(width);
388
+ calculateUnderline();
382
389
  return;
383
390
  }
384
391
 
385
392
  handleFromEdge(swiperInstance);
386
- }, [swiperInstance, isChildrenLengthDiff, handleFromEdge]);
393
+ }, [swiperInstance, isChildrenLengthDiff, handleFromEdge, currentIndex, calculateUnderline]);
387
394
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
388
395
  className: cn({
389
396
  size: size,
@@ -409,12 +409,19 @@ var Tabs = function Tabs(_ref) {
409
409
  }
410
410
 
411
411
  if (isChildrenLengthDiff) {
412
+ var activeTabNode = tabsRef.current[currentIndex];
413
+
414
+ var _activeTabNode$getBou = activeTabNode.getBoundingClientRect(),
415
+ width = _activeTabNode$getBou.width;
416
+
412
417
  handleFromEdge(swiperInstance);
418
+ setActiveTabWidth(width);
419
+ calculateUnderline();
413
420
  return;
414
421
  }
415
422
 
416
423
  handleFromEdge(swiperInstance);
417
- }, [swiperInstance, isChildrenLengthDiff, handleFromEdge]);
424
+ }, [swiperInstance, isChildrenLengthDiff, handleFromEdge, currentIndex, calculateUnderline]);
418
425
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
419
426
  className: cn({
420
427
  size: size,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "styles"
@@ -50,7 +50,7 @@
50
50
  "@babel/preset-env": "^7.8.6",
51
51
  "@babel/preset-react": "^7.8.3",
52
52
  "@babel/preset-typescript": "^7.8.3",
53
- "@megafon/ui-icons": "^2.13.0",
53
+ "@megafon/ui-icons": "^2.14.0",
54
54
  "@svgr/core": "^2.4.1",
55
55
  "@testing-library/jest-dom": "5.16.2",
56
56
  "@testing-library/react": "12.1.2",
@@ -85,7 +85,7 @@
85
85
  "dependencies": {
86
86
  "@babel/runtime": "^7.8.4",
87
87
  "@datepicker-react/hooks": "^2.7.0",
88
- "@megafon/ui-helpers": "^2.5.1",
88
+ "@megafon/ui-helpers": "^2.5.2",
89
89
  "@popperjs/core": "^2.5.3",
90
90
  "core-js": "^3.6.4",
91
91
  "date-fns": "^2.16.1",
@@ -96,5 +96,5 @@
96
96
  "react-popper": "^2.2.3",
97
97
  "swiper": "^6.5.6"
98
98
  },
99
- "gitHead": "9d1e595eebdde3e8652d07511c1bf3057d61a8f3"
99
+ "gitHead": "5c1ab056af4f3c2ced942d4e4b820e049b671a5d"
100
100
  }