@megafon/ui-core 3.1.0 → 3.2.0

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,24 @@
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
+ # [3.2.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.1.0...@megafon/ui-core@3.2.0) (2022-02-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **checkbox:** delete outline focus effect ([ecd98e7](https://github.com/MegafonWebLab/megafon-ui/commit/ecd98e7129ddd305ce6e21c1c98cdacc3670ff92))
12
+ * **tile:** delete unnecessary symbol ([1f0ed90](https://github.com/MegafonWebLab/megafon-ui/commit/1f0ed9009ef2cb9e5562f257640a623eceae225e))
13
+
14
+
15
+ ### Features
16
+
17
+ * **carousel:** fix data-attribute passing for NavArrow ([af0d26e](https://github.com/MegafonWebLab/megafon-ui/commit/af0d26ef85a19cdb4fd863a45b2c2b2365d9c086))
18
+ * **tile:** add target props for link ([e49d040](https://github.com/MegafonWebLab/megafon-ui/commit/e49d0402725e88b9fd7d80fd418acd81bea321ba))
19
+
20
+
21
+
22
+
23
+
6
24
  # [3.1.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.2...@megafon/ui-core@3.1.0) (2022-02-22)
7
25
 
8
26
 
@@ -281,7 +281,10 @@ var Carousel = function Carousel(_ref) {
281
281
  onFocus: handleSlideFocus(i),
282
282
  onMouseDown: disableFocusOnSlideClick
283
283
  }), child);
284
- })), /*#__PURE__*/React.createElement(NavArrow, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.prev), {
284
+ })), /*#__PURE__*/React.createElement(NavArrow, {
285
+ dataAttrs: {
286
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.prev
287
+ },
285
288
  className: cn('arrow', {
286
289
  prev: true,
287
290
  locked: isLocked
@@ -289,7 +292,10 @@ var Carousel = function Carousel(_ref) {
289
292
  onClick: handlePrevClick,
290
293
  disabled: !loop && isBeginning,
291
294
  theme: ArrowTheme.PURPLE
292
- })), /*#__PURE__*/React.createElement(NavArrow, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.next), {
295
+ }), /*#__PURE__*/React.createElement(NavArrow, {
296
+ dataAttrs: {
297
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.next
298
+ },
293
299
  className: cn('arrow', {
294
300
  next: true,
295
301
  locked: isLocked
@@ -298,7 +304,7 @@ var Carousel = function Carousel(_ref) {
298
304
  onClick: handleNextClick,
299
305
  disabled: !loop && isEnd,
300
306
  theme: ArrowTheme.PURPLE
301
- })));
307
+ }));
302
308
  };
303
309
 
304
310
  Carousel.propTypes = {
@@ -37,6 +37,9 @@
37
37
  border: 2px solid;
38
38
  border-radius: 2px;
39
39
  }
40
+ .mfui-checkbox__custom-input:focus {
41
+ outline: none;
42
+ }
40
43
  .mfui-checkbox__icon {
41
44
  display: block;
42
45
  width: 32px;
@@ -20,6 +20,8 @@ declare type ShadowType = typeof Shadow[keyof typeof Shadow];
20
20
  export interface ITileProps {
21
21
  /** Ссылка */
22
22
  href?: string;
23
+ /** Атрибут для открытия ссылки */
24
+ target?: '_self' | '_blank';
23
25
  /** Тема */
24
26
  theme?: ThemeType;
25
27
  /** Радиус границы */
@@ -33,7 +33,9 @@ var Tile = function Tile(_ref) {
33
33
  _ref$isInteractive = _ref.isInteractive,
34
34
  isInteractive = _ref$isInteractive === void 0 ? false : _ref$isInteractive,
35
35
  onClick = _ref.onClick,
36
- dataAttrs = _ref.dataAttrs;
36
+ dataAttrs = _ref.dataAttrs,
37
+ _ref$target = _ref.target,
38
+ target = _ref$target === void 0 ? '_self' : _ref$target;
37
39
 
38
40
  var handleClick = function handleClick(e) {
39
41
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
@@ -51,7 +53,8 @@ var Tile = function Tile(_ref) {
51
53
  onClick: handleClick
52
54
  }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), href && /*#__PURE__*/React.createElement("a", {
53
55
  href: href,
54
- className: cn('link')
56
+ className: cn('link'),
57
+ target: target
55
58
  }, children), !href && children);
56
59
  };
57
60
 
@@ -65,6 +68,7 @@ Tile.propTypes = {
65
68
  onClick: PropTypes.func,
66
69
  dataAttrs: PropTypes.shape({
67
70
  root: PropTypes.objectOf(PropTypes.string.isRequired)
68
- })
71
+ }),
72
+ target: PropTypes.oneOf(['_self', '_blank'])
69
73
  };
70
74
  export default Tile;
@@ -311,7 +311,10 @@ var Carousel = function Carousel(_ref) {
311
311
  onFocus: handleSlideFocus(i),
312
312
  onMouseDown: disableFocusOnSlideClick
313
313
  }), child);
314
- })), /*#__PURE__*/React.createElement(_NavArrow["default"], (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.prev), {
314
+ })), /*#__PURE__*/React.createElement(_NavArrow["default"], {
315
+ dataAttrs: {
316
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.prev
317
+ },
315
318
  className: cn('arrow', {
316
319
  prev: true,
317
320
  locked: isLocked
@@ -319,7 +322,10 @@ var Carousel = function Carousel(_ref) {
319
322
  onClick: handlePrevClick,
320
323
  disabled: !loop && isBeginning,
321
324
  theme: _NavArrow.Theme.PURPLE
322
- })), /*#__PURE__*/React.createElement(_NavArrow["default"], (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.next), {
325
+ }), /*#__PURE__*/React.createElement(_NavArrow["default"], {
326
+ dataAttrs: {
327
+ root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.next
328
+ },
323
329
  className: cn('arrow', {
324
330
  next: true,
325
331
  locked: isLocked
@@ -328,7 +334,7 @@ var Carousel = function Carousel(_ref) {
328
334
  onClick: handleNextClick,
329
335
  disabled: !loop && isEnd,
330
336
  theme: _NavArrow.Theme.PURPLE
331
- })));
337
+ }));
332
338
  };
333
339
 
334
340
  Carousel.propTypes = {
@@ -37,6 +37,9 @@
37
37
  border: 2px solid;
38
38
  border-radius: 2px;
39
39
  }
40
+ .mfui-checkbox__custom-input:focus {
41
+ outline: none;
42
+ }
40
43
  .mfui-checkbox__icon {
41
44
  display: block;
42
45
  width: 32px;
@@ -20,6 +20,8 @@ declare type ShadowType = typeof Shadow[keyof typeof Shadow];
20
20
  export interface ITileProps {
21
21
  /** Ссылка */
22
22
  href?: string;
23
+ /** Атрибут для открытия ссылки */
24
+ target?: '_self' | '_blank';
23
25
  /** Тема */
24
26
  theme?: ThemeType;
25
27
  /** Радиус границы */
@@ -49,7 +49,9 @@ var Tile = function Tile(_ref) {
49
49
  _ref$isInteractive = _ref.isInteractive,
50
50
  isInteractive = _ref$isInteractive === void 0 ? false : _ref$isInteractive,
51
51
  onClick = _ref.onClick,
52
- dataAttrs = _ref.dataAttrs;
52
+ dataAttrs = _ref.dataAttrs,
53
+ _ref$target = _ref.target,
54
+ target = _ref$target === void 0 ? '_self' : _ref$target;
53
55
 
54
56
  var handleClick = function handleClick(e) {
55
57
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
@@ -67,7 +69,8 @@ var Tile = function Tile(_ref) {
67
69
  onClick: handleClick
68
70
  }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), href && /*#__PURE__*/_react["default"].createElement("a", {
69
71
  href: href,
70
- className: cn('link')
72
+ className: cn('link'),
73
+ target: target
71
74
  }, children), !href && children);
72
75
  };
73
76
 
@@ -81,7 +84,8 @@ Tile.propTypes = {
81
84
  onClick: _propTypes["default"].func,
82
85
  dataAttrs: _propTypes["default"].shape({
83
86
  root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
84
- })
87
+ }),
88
+ target: _propTypes["default"].oneOf(['_self', '_blank'])
85
89
  };
86
90
  var _default = Tile;
87
91
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "styles"
@@ -54,7 +54,7 @@
54
54
  "@babel/preset-env": "^7.8.6",
55
55
  "@babel/preset-react": "^7.8.3",
56
56
  "@babel/preset-typescript": "^7.8.3",
57
- "@megafon/ui-icons": "^1.0.1",
57
+ "@megafon/ui-icons": "^1.0.2",
58
58
  "@svgr/core": "^2.4.1",
59
59
  "@testing-library/react-hooks": "^7.0.1",
60
60
  "@types/enzyme": "^3.10.5",
@@ -97,5 +97,5 @@
97
97
  "react-popper": "^2.2.3",
98
98
  "swiper": "^6.5.6"
99
99
  },
100
- "gitHead": "3b91f6030703838090828a8a77cff3d82cb14c10"
100
+ "gitHead": "c0a542f967f26e925dfb99dd6e07a2df2e97be14"
101
101
  }