@megafon/ui-shared 4.0.0-beta.9 → 4.0.1

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.
Files changed (28) hide show
  1. package/CHANGELOG.md +21 -11
  2. package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  3. package/dist/es/components/BenefitsPictures/BenefitsPictures.js +8 -8
  4. package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  5. package/dist/es/components/Breadcrumbs/Breadcrumbs.js +3 -6
  6. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +1 -1
  7. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +3 -3
  8. package/dist/es/components/Steps/Steps.js +1 -1
  9. package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +0 -2
  10. package/dist/es/components/TextWithIcon/TextWithIcon.js +1 -6
  11. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  12. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +4 -4
  13. package/dist/es/components/VideoBanner/VideoBanner.d.ts +4 -0
  14. package/dist/es/components/VideoBanner/VideoBanner.js +4 -0
  15. package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  16. package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +8 -8
  17. package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  18. package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +3 -6
  19. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +1 -1
  20. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +3 -3
  21. package/dist/lib/components/Steps/Steps.js +1 -1
  22. package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +0 -2
  23. package/dist/lib/components/TextWithIcon/TextWithIcon.js +1 -6
  24. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  25. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +4 -4
  26. package/dist/lib/components/VideoBanner/VideoBanner.d.ts +4 -0
  27. package/dist/lib/components/VideoBanner/VideoBanner.js +4 -0
  28. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,39 +3,49 @@
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
- # [4.0.0-beta.9](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.0.0-beta.8...@megafon/ui-shared@4.0.0-beta.9) (2022-07-14)
6
+ ## [4.0.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.0.0...@megafon/ui-shared@4.0.1) (2022-09-14)
7
7
 
8
8
 
9
- ### Features
9
+ ### Bug Fixes
10
10
 
11
- * **header:** add new prop space ([e5bef7c](https://github.com/MegafonWebLab/megafon-ui/commit/e5bef7c8e13c57e477a4c25f07a4a4a6dbb8b6bd))
11
+ * remove forgotten deprecated props ([3acaf97](https://github.com/MegafonWebLab/megafon-ui/commit/3acaf9731780f89c7087a8b6f9af943a62f7a185))
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- # [4.0.0-beta.8](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.0.0-beta.7...@megafon/ui-shared@4.0.0-beta.8) (2022-07-13)
18
-
19
- **Note:** Version bump only for package @megafon/ui-shared
17
+ # [4.0.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.5.0...@megafon/ui-shared@4.0.0) (2022-09-14)
20
18
 
21
19
 
20
+ ### Bug Fixes
22
21
 
22
+ * **breadcrumbs:** change default color prop value from black to default ([fd0c9b6](https://github.com/MegafonWebLab/megafon-ui/commit/fd0c9b645d41523f34b198e3f9310d27ea7e34f3))
23
23
 
24
24
 
25
- # [4.0.0-beta.7](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.0.0-beta.6...@megafon/ui-shared@4.0.0-beta.7) (2022-07-05)
25
+ ### Features
26
26
 
27
- **Note:** Version bump only for package @megafon/ui-shared
27
+ * **header:** add new prop space ([7a9479e](https://github.com/MegafonWebLab/megafon-ui/commit/7a9479e85c1f5c19b7f2bae2e6a4d234712f2d7c))
28
+ * **paragraph:** remove prop size; add new prop; add 'pale' option to colors ([32b0c54](https://github.com/MegafonWebLab/megafon-ui/commit/32b0c54eaf82ceb1f24d5fc90a9aa81d3e427ee3))
29
+ * **tabs:** update by new design ([08d76f0](https://github.com/MegafonWebLab/megafon-ui/commit/08d76f0e15b8b7a54a18d7f115db4744b12e8ac2))
30
+ * **text-with-icon:** delete centering in mobile resolution ([0bf1236](https://github.com/MegafonWebLab/megafon-ui/commit/0bf1236c216a327bf574c5dc0e2009e98479390a))
28
31
 
29
32
 
33
+ ### BREAKING CHANGES
30
34
 
35
+ * **text-with-icon:** centering in mobile resolution was removed according guides
36
+ * **tabs:** new prop autoWidth added
37
+ size prop small vallue removed
38
+ new sizes
39
+ * **breadcrumbs:** color is now depends on current theme. by default it matches content text color.
40
+ for keep black color on light background use 'black' value for prop 'color'.
41
+ * **paragraph:** prop 'size' is no longer exists.
42
+ use component Caption instead of Paragraph size="small"
31
43
 
32
44
 
33
- # [4.0.0-beta.6](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.4.3...@megafon/ui-shared@4.0.0-beta.6) (2022-06-29)
34
45
 
35
46
 
36
- ### Bug Fixes
37
47
 
38
- * **breadcrumbs:** change default color prop value from black to default ([5c30998](https://github.com/MegafonWebLab/megafon-ui/commit/5c30998fe192be143add5af873c08cf51deb299e))
48
+ # [3.5.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@3.4.6...@megafon/ui-shared@3.5.0) (2022-09-14)
39
49
 
40
50
 
41
51
  ### Features
@@ -7,7 +7,7 @@ export interface IBenefitsPicturesProps {
7
7
  /** Данные для бенефитов */
8
8
  items: IBenefit[];
9
9
  /** Горизонтальное выравнивание */
10
- hAlign?: 'left' | 'center';
10
+ align?: 'left' | 'center';
11
11
  /** Расстояние между бенефитами */
12
12
  gridGap?: GridGutterSize;
13
13
  /** Дополнительный css класс для корневого элемента */
@@ -113,8 +113,8 @@ var cn = cnCreate('mfui-benefits-pictures');
113
113
 
114
114
  var BenefitsPictures = function BenefitsPictures(_ref) {
115
115
  var items = _ref.items,
116
- _ref$hAlign = _ref.hAlign,
117
- hAlign = _ref$hAlign === void 0 ? 'left' : _ref$hAlign,
116
+ _ref$align = _ref.align,
117
+ align = _ref$align === void 0 ? 'left' : _ref$align,
118
118
  _ref$gridGap = _ref.gridGap,
119
119
  gridGap = _ref$gridGap === void 0 ? 'large' : _ref$gridGap,
120
120
  rootRef = _ref.rootRef,
@@ -122,7 +122,7 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
122
122
  _ref$classes = _ref.classes,
123
123
  classes = _ref$classes === void 0 ? {} : _ref$classes;
124
124
  var isLargeGutter = gridGap === 'large';
125
- var isGridCenterAlign = hAlign === 'center' && items.length !== ONLY_LEFT_ALIGN_ITEMS_COUNT;
125
+ var isGridCenterAlign = align === 'center' && items.length !== ONLY_LEFT_ALIGN_ITEMS_COUNT;
126
126
 
127
127
  var _React$useState = React.useState(gridGap),
128
128
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -158,22 +158,22 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
158
158
  var img = _ref2.img,
159
159
  title = _ref2.title,
160
160
  text = _ref2.text;
161
- return /*#__PURE__*/React.createElement(GridColumn, _extends({}, hAlign === 'left' ? getLeftConfig(items.length, index) : getCenterConfig(items.length, index, gridGap), {
161
+ return /*#__PURE__*/React.createElement(GridColumn, _extends({}, align === 'left' ? getLeftConfig(items.length, index) : getCenterConfig(items.length, index, gridGap), {
162
162
  key: index
163
163
  }), /*#__PURE__*/React.createElement("div", {
164
164
  className: cn('item', [classes.item])
165
165
  }, /*#__PURE__*/React.createElement("img", {
166
166
  className: cn('img', {
167
- 'h-align': hAlign
167
+ 'h-align': align
168
168
  }),
169
169
  src: img,
170
170
  alt: ""
171
171
  }), /*#__PURE__*/React.createElement(Header, {
172
172
  className: cn('title'),
173
- hAlign: hAlign,
173
+ align: align,
174
174
  as: "h3"
175
175
  }, convert(title)), /*#__PURE__*/React.createElement(Paragraph, {
176
- align: hAlign
176
+ align: align
177
177
  }, convert(text))));
178
178
  })));
179
179
  };
@@ -187,7 +187,7 @@ BenefitsPictures.propTypes = {
187
187
  text: PropTypes.string.isRequired,
188
188
  img: PropTypes.string.isRequired
189
189
  }).isRequired).isRequired,
190
- hAlign: PropTypes.oneOf(['left', 'center']),
190
+ align: PropTypes.oneOf(['left', 'center']),
191
191
  gridGap: PropTypes.oneOf(['medium', 'large']),
192
192
  className: PropTypes.string,
193
193
  classes: PropTypes.shape({
@@ -3,7 +3,6 @@ import './Breadcrumbs.less';
3
3
  declare type ItemObjectType = {
4
4
  title?: string;
5
5
  href?: string;
6
- component?: React.ReactElement;
7
6
  };
8
7
  declare type ItemType = JSX.Element | ItemObjectType;
9
8
  export declare const TextColor: {
@@ -46,8 +46,8 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
46
46
  if (isObjectElement(item)) {
47
47
  return /*#__PURE__*/React.createElement("div", {
48
48
  className: cn('item', classes.item),
49
- key: item.component ? i : item.title
50
- }, item.component || /*#__PURE__*/React.createElement(TextLink, {
49
+ key: item.title
50
+ }, /*#__PURE__*/React.createElement(TextLink, {
51
51
  href: item.href,
52
52
  color: color,
53
53
  dataAttrs: {
@@ -71,10 +71,7 @@ Breadcrumbs.propTypes = {
71
71
  }),
72
72
  items: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.arrayOf(PropTypes.shape({
73
73
  title: PropTypes.string,
74
- href: PropTypes.string,
75
-
76
- /* @deprecated */
77
- component: PropTypes.element
74
+ href: PropTypes.string
78
75
  }).isRequired)]).isRequired,
79
76
  color: PropTypes.oneOf(Object.values(TextColor))
80
77
  };
@@ -36,7 +36,7 @@ export interface IButtonLinkBoxProps {
36
36
  /** Добавляет атрибут download к свойству тега <a> */
37
37
  linkDownload?: boolean;
38
38
  /** Горизонтальное выравнивание */
39
- hAlign?: 'center' | 'left';
39
+ align?: 'center' | 'left';
40
40
  /** Обработчик клика по кнопке */
41
41
  onButtonClick?: (e: React.SyntheticEvent<EventTarget>) => void;
42
42
  /** Обработчик клика по ссылке */
@@ -18,7 +18,7 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
18
18
  linkTitle = _ref.linkTitle,
19
19
  linkUrl = _ref.linkUrl,
20
20
  linkDownload = _ref.linkDownload,
21
- hAlign = _ref.hAlign,
21
+ align = _ref.align,
22
22
  className = _ref.className,
23
23
  buttonTarget = _ref.buttonTarget,
24
24
  linkTarget = _ref.linkTarget,
@@ -28,7 +28,7 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
28
28
  onLinkClick = _ref.onLinkClick;
29
29
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
30
30
  className: cn({
31
- 'h-align': hAlign
31
+ 'h-align': align
32
32
  }, [className, classes.root]),
33
33
  ref: rootRef
34
34
  }), buttonTitle && /*#__PURE__*/React.createElement("div", {
@@ -80,7 +80,7 @@ ButtonLinkBox.propTypes = {
80
80
  linkTitle: PropTypes.string,
81
81
  linkUrl: PropTypes.string,
82
82
  linkDownload: PropTypes.bool,
83
- hAlign: PropTypes.oneOf(['center']),
83
+ align: PropTypes.oneOf(['center']),
84
84
  onButtonClick: PropTypes.func,
85
85
  onLinkClick: PropTypes.func
86
86
  };
@@ -15,7 +15,7 @@ var Steps = function Steps(_ref) {
15
15
  ref: rootRef
16
16
  }, /*#__PURE__*/React.createElement(Header, {
17
17
  as: "h2",
18
- hAlign: "center",
18
+ align: "center",
19
19
  className: cn('title')
20
20
  }, title), /*#__PURE__*/React.createElement("ul", {
21
21
  className: cn('list')
@@ -14,8 +14,6 @@ export interface ITextWithIconProps {
14
14
  className?: string;
15
15
  /** Включить растягивание на всю ширину контейнера */
16
16
  isFullWidth?: boolean;
17
- /** Выравнивание по центру на мобильных */
18
- centeringOnMobile?: boolean;
19
17
  /** Допустимый дочерний компонент */
20
18
  children: React.ReactElement<ITextWithIconItem>[] | React.ReactElement<ITextWithIconItem>;
21
19
  }
@@ -13,8 +13,6 @@ var TextWithIcon = function TextWithIcon(_ref) {
13
13
  className = _ref.className,
14
14
  _ref$isFullWidth = _ref.isFullWidth,
15
15
  isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
16
- _ref$centeringOnMobil = _ref.centeringOnMobile,
17
- centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil,
18
16
  children = _ref.children;
19
17
 
20
18
  var renderContent = function renderContent() {
@@ -34,9 +32,7 @@ var TextWithIcon = function TextWithIcon(_ref) {
34
32
  };
35
33
 
36
34
  return /*#__PURE__*/React.createElement("div", _extends({
37
- className: cn({
38
- 'centering-on-mobile': centeringOnMobile
39
- }, [className]),
35
+ className: cn([className]),
40
36
  ref: rootRef
41
37
  }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), isFullWidth ? renderContent() : renderContentWithGrid());
42
38
  };
@@ -51,7 +47,6 @@ TextWithIcon.propTypes = {
51
47
  }),
52
48
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element.isRequired]).isRequired,
53
49
  isFullWidth: PropTypes.bool,
54
- centeringOnMobile: PropTypes.bool,
55
50
  className: PropTypes.string
56
51
  };
57
52
  export default TextWithIcon;
@@ -16,7 +16,7 @@ export interface ITitleDescriptionBoxProps {
16
16
  /** Цвет текста */
17
17
  textColor?: 'white';
18
18
  /** Горизонтальное выравнивание */
19
- hAlign?: 'center';
19
+ align?: 'center';
20
20
  }
21
21
  declare const TitleDescriptionBox: React.FC<ITitleDescriptionBoxProps>;
22
22
  export default TitleDescriptionBox;
@@ -13,7 +13,7 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
13
13
  title = _ref.title,
14
14
  description = _ref.description,
15
15
  textColor = _ref.textColor,
16
- hAlign = _ref.hAlign,
16
+ align = _ref.align,
17
17
  rootRef = _ref.rootRef,
18
18
  className = _ref.className;
19
19
  var renderDescription = React.useCallback(function () {
@@ -31,12 +31,12 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
31
31
  }, [description]);
32
32
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
33
33
  className: cn({
34
- 'h-align': hAlign,
34
+ 'h-align': align,
35
35
  'text-color': textColor
36
36
  }, className),
37
37
  ref: rootRef
38
38
  }), /*#__PURE__*/React.createElement(Grid, {
39
- hAlign: hAlign
39
+ hAlign: align
40
40
  }, /*#__PURE__*/React.createElement(GridColumn, {
41
41
  wide: "8",
42
42
  desktop: "10"
@@ -59,7 +59,7 @@ TitleDescriptionBox.propTypes = {
59
59
  className: PropTypes.string,
60
60
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
61
61
  description: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
62
- hAlign: PropTypes.oneOf(['center']),
62
+ align: PropTypes.oneOf(['center']),
63
63
  textColor: PropTypes.oneOf(['white'])
64
64
  };
65
65
  export default TitleDescriptionBox;
@@ -30,6 +30,8 @@ export interface IContent {
30
30
  buttonTitle?: string;
31
31
  /** Ссылка на кнопке */
32
32
  buttonHref?: string;
33
+ /** Target свойство кнопки */
34
+ buttonTarget?: '_self' | '_blank' | '_parent' | '_top';
33
35
  /** Добавляет атрибут download для тега <a> компонента Button */
34
36
  buttonDownload?: boolean;
35
37
  /** Цвет кнопки */
@@ -46,6 +48,8 @@ export interface IContent {
46
48
  linkTitle?: string;
47
49
  /** Адрес ссылки */
48
50
  linkUrl?: string;
51
+ /** Target свойство ссылки */
52
+ linkTarget?: '_self' | '_blank' | '_parent' | '_top';
49
53
  /** Добавляет атрибут download для тега <a> компонента TextLink */
50
54
  linkDownload?: boolean;
51
55
  /** Строка со стоимостью услуги */
@@ -79,6 +79,7 @@ var VideoBanner = function VideoBanner(_ref2) {
79
79
  description = _ref3.description,
80
80
  buttonTitle = _ref3.buttonTitle,
81
81
  buttonHref = _ref3.buttonHref,
82
+ buttonTarget = _ref3.buttonTarget,
82
83
  buttonDownload = _ref3.buttonDownload,
83
84
  _ref3$buttonColor = _ref3.buttonColor,
84
85
  buttonColor = _ref3$buttonColor === void 0 ? ButtonColor.GREEN : _ref3$buttonColor,
@@ -89,6 +90,7 @@ var VideoBanner = function VideoBanner(_ref2) {
89
90
  textColorMobile = _ref3.textColorMobile,
90
91
  linkTitle = _ref3.linkTitle,
91
92
  linkUrl = _ref3.linkUrl,
93
+ linkTarget = _ref3.linkTarget,
92
94
  linkDownload = _ref3.linkDownload,
93
95
  cost = _ref3.cost;
94
96
  return /*#__PURE__*/React.createElement(Grid, {
@@ -125,6 +127,7 @@ var VideoBanner = function VideoBanner(_ref2) {
125
127
  className: cn(ClassName.BUTTON, [classes.button]),
126
128
  theme: buttonColor,
127
129
  href: buttonHref,
130
+ target: buttonTarget,
128
131
  onClick: onButtonClick,
129
132
  download: buttonDownload
130
133
  }, buttonTitle), linkTitle && /*#__PURE__*/React.createElement(TextLink, {
@@ -134,6 +137,7 @@ var VideoBanner = function VideoBanner(_ref2) {
134
137
  className: cn(ClassName.LINK, [classes.link]),
135
138
  href: linkUrl,
136
139
  download: linkDownload,
140
+ target: linkTarget,
137
141
  onClick: onLinkClick
138
142
  }, linkTitle)))));
139
143
  }, [classes.button, classes.link, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link]);
@@ -7,7 +7,7 @@ export interface IBenefitsPicturesProps {
7
7
  /** Данные для бенефитов */
8
8
  items: IBenefit[];
9
9
  /** Горизонтальное выравнивание */
10
- hAlign?: 'left' | 'center';
10
+ align?: 'left' | 'center';
11
11
  /** Расстояние между бенефитами */
12
12
  gridGap?: GridGutterSize;
13
13
  /** Дополнительный css класс для корневого элемента */
@@ -136,8 +136,8 @@ var cn = (0, _uiHelpers.cnCreate)('mfui-benefits-pictures');
136
136
 
137
137
  var BenefitsPictures = function BenefitsPictures(_ref) {
138
138
  var items = _ref.items,
139
- _ref$hAlign = _ref.hAlign,
140
- hAlign = _ref$hAlign === void 0 ? 'left' : _ref$hAlign,
139
+ _ref$align = _ref.align,
140
+ align = _ref$align === void 0 ? 'left' : _ref$align,
141
141
  _ref$gridGap = _ref.gridGap,
142
142
  gridGap = _ref$gridGap === void 0 ? 'large' : _ref$gridGap,
143
143
  rootRef = _ref.rootRef,
@@ -145,7 +145,7 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
145
145
  _ref$classes = _ref.classes,
146
146
  classes = _ref$classes === void 0 ? {} : _ref$classes;
147
147
  var isLargeGutter = gridGap === 'large';
148
- var isGridCenterAlign = hAlign === 'center' && items.length !== ONLY_LEFT_ALIGN_ITEMS_COUNT;
148
+ var isGridCenterAlign = align === 'center' && items.length !== ONLY_LEFT_ALIGN_ITEMS_COUNT;
149
149
 
150
150
  var _React$useState = React.useState(gridGap),
151
151
  _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
@@ -181,22 +181,22 @@ var BenefitsPictures = function BenefitsPictures(_ref) {
181
181
  var img = _ref2.img,
182
182
  title = _ref2.title,
183
183
  text = _ref2.text;
184
- return /*#__PURE__*/React.createElement(_uiCore.GridColumn, (0, _extends2["default"])({}, hAlign === 'left' ? getLeftConfig(items.length, index) : getCenterConfig(items.length, index, gridGap), {
184
+ return /*#__PURE__*/React.createElement(_uiCore.GridColumn, (0, _extends2["default"])({}, align === 'left' ? getLeftConfig(items.length, index) : getCenterConfig(items.length, index, gridGap), {
185
185
  key: index
186
186
  }), /*#__PURE__*/React.createElement("div", {
187
187
  className: cn('item', [classes.item])
188
188
  }, /*#__PURE__*/React.createElement("img", {
189
189
  className: cn('img', {
190
- 'h-align': hAlign
190
+ 'h-align': align
191
191
  }),
192
192
  src: img,
193
193
  alt: ""
194
194
  }), /*#__PURE__*/React.createElement(_uiCore.Header, {
195
195
  className: cn('title'),
196
- hAlign: hAlign,
196
+ align: align,
197
197
  as: "h3"
198
198
  }, (0, _htmr["default"])(title)), /*#__PURE__*/React.createElement(_uiCore.Paragraph, {
199
- align: hAlign
199
+ align: align
200
200
  }, (0, _htmr["default"])(text))));
201
201
  })));
202
202
  };
@@ -210,7 +210,7 @@ BenefitsPictures.propTypes = {
210
210
  text: _propTypes["default"].string.isRequired,
211
211
  img: _propTypes["default"].string.isRequired
212
212
  }).isRequired).isRequired,
213
- hAlign: _propTypes["default"].oneOf(['left', 'center']),
213
+ align: _propTypes["default"].oneOf(['left', 'center']),
214
214
  gridGap: _propTypes["default"].oneOf(['medium', 'large']),
215
215
  className: _propTypes["default"].string,
216
216
  classes: _propTypes["default"].shape({
@@ -3,7 +3,6 @@ import './Breadcrumbs.less';
3
3
  declare type ItemObjectType = {
4
4
  title?: string;
5
5
  href?: string;
6
- component?: React.ReactElement;
7
6
  };
8
7
  declare type ItemType = JSX.Element | ItemObjectType;
9
8
  export declare const TextColor: {
@@ -63,8 +63,8 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
63
63
  if (isObjectElement(item)) {
64
64
  return /*#__PURE__*/_react["default"].createElement("div", {
65
65
  className: cn('item', classes.item),
66
- key: item.component ? i : item.title
67
- }, item.component || /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
66
+ key: item.title
67
+ }, /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
68
68
  href: item.href,
69
69
  color: color,
70
70
  dataAttrs: {
@@ -88,10 +88,7 @@ Breadcrumbs.propTypes = {
88
88
  }),
89
89
  items: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].element.isRequired), _propTypes["default"].arrayOf(_propTypes["default"].shape({
90
90
  title: _propTypes["default"].string,
91
- href: _propTypes["default"].string,
92
-
93
- /* @deprecated */
94
- component: _propTypes["default"].element
91
+ href: _propTypes["default"].string
95
92
  }).isRequired)]).isRequired,
96
93
  color: _propTypes["default"].oneOf(Object.values(TextColor))
97
94
  };
@@ -36,7 +36,7 @@ export interface IButtonLinkBoxProps {
36
36
  /** Добавляет атрибут download к свойству тега <a> */
37
37
  linkDownload?: boolean;
38
38
  /** Горизонтальное выравнивание */
39
- hAlign?: 'center' | 'left';
39
+ align?: 'center' | 'left';
40
40
  /** Обработчик клика по кнопке */
41
41
  onButtonClick?: (e: React.SyntheticEvent<EventTarget>) => void;
42
42
  /** Обработчик клика по ссылке */
@@ -38,7 +38,7 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
38
38
  linkTitle = _ref.linkTitle,
39
39
  linkUrl = _ref.linkUrl,
40
40
  linkDownload = _ref.linkDownload,
41
- hAlign = _ref.hAlign,
41
+ align = _ref.align,
42
42
  className = _ref.className,
43
43
  buttonTarget = _ref.buttonTarget,
44
44
  linkTarget = _ref.linkTarget,
@@ -48,7 +48,7 @@ var ButtonLinkBox = function ButtonLinkBox(_ref) {
48
48
  onLinkClick = _ref.onLinkClick;
49
49
  return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
50
50
  className: cn({
51
- 'h-align': hAlign
51
+ 'h-align': align
52
52
  }, [className, classes.root]),
53
53
  ref: rootRef
54
54
  }), buttonTitle && /*#__PURE__*/_react["default"].createElement("div", {
@@ -100,7 +100,7 @@ ButtonLinkBox.propTypes = {
100
100
  linkTitle: PropTypes.string,
101
101
  linkUrl: PropTypes.string,
102
102
  linkDownload: PropTypes.bool,
103
- hAlign: PropTypes.oneOf(['center']),
103
+ align: PropTypes.oneOf(['center']),
104
104
  onButtonClick: PropTypes.func,
105
105
  onLinkClick: PropTypes.func
106
106
  };
@@ -34,7 +34,7 @@ var Steps = function Steps(_ref) {
34
34
  ref: rootRef
35
35
  }, /*#__PURE__*/React.createElement(_uiCore.Header, {
36
36
  as: "h2",
37
- hAlign: "center",
37
+ align: "center",
38
38
  className: cn('title')
39
39
  }, title), /*#__PURE__*/React.createElement("ul", {
40
40
  className: cn('list')
@@ -14,8 +14,6 @@ export interface ITextWithIconProps {
14
14
  className?: string;
15
15
  /** Включить растягивание на всю ширину контейнера */
16
16
  isFullWidth?: boolean;
17
- /** Выравнивание по центру на мобильных */
18
- centeringOnMobile?: boolean;
19
17
  /** Допустимый дочерний компонент */
20
18
  children: React.ReactElement<ITextWithIconItem>[] | React.ReactElement<ITextWithIconItem>;
21
19
  }
@@ -32,8 +32,6 @@ var TextWithIcon = function TextWithIcon(_ref) {
32
32
  className = _ref.className,
33
33
  _ref$isFullWidth = _ref.isFullWidth,
34
34
  isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
35
- _ref$centeringOnMobil = _ref.centeringOnMobile,
36
- centeringOnMobile = _ref$centeringOnMobil === void 0 ? true : _ref$centeringOnMobil,
37
35
  children = _ref.children;
38
36
 
39
37
  var renderContent = function renderContent() {
@@ -53,9 +51,7 @@ var TextWithIcon = function TextWithIcon(_ref) {
53
51
  };
54
52
 
55
53
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
56
- className: cn({
57
- 'centering-on-mobile': centeringOnMobile
58
- }, [className]),
54
+ className: cn([className]),
59
55
  ref: rootRef
60
56
  }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), isFullWidth ? renderContent() : renderContentWithGrid());
61
57
  };
@@ -70,7 +66,6 @@ TextWithIcon.propTypes = {
70
66
  }),
71
67
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element.isRequired]).isRequired,
72
68
  isFullWidth: PropTypes.bool,
73
- centeringOnMobile: PropTypes.bool,
74
69
  className: PropTypes.string
75
70
  };
76
71
  var _default = TextWithIcon;
@@ -16,7 +16,7 @@ export interface ITitleDescriptionBoxProps {
16
16
  /** Цвет текста */
17
17
  textColor?: 'white';
18
18
  /** Горизонтальное выравнивание */
19
- hAlign?: 'center';
19
+ align?: 'center';
20
20
  }
21
21
  declare const TitleDescriptionBox: React.FC<ITitleDescriptionBoxProps>;
22
22
  export default TitleDescriptionBox;
@@ -34,7 +34,7 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
34
34
  title = _ref.title,
35
35
  description = _ref.description,
36
36
  textColor = _ref.textColor,
37
- hAlign = _ref.hAlign,
37
+ align = _ref.align,
38
38
  rootRef = _ref.rootRef,
39
39
  className = _ref.className;
40
40
  var renderDescription = React.useCallback(function () {
@@ -52,12 +52,12 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
52
52
  }, [description]);
53
53
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
54
54
  className: cn({
55
- 'h-align': hAlign,
55
+ 'h-align': align,
56
56
  'text-color': textColor
57
57
  }, className),
58
58
  ref: rootRef
59
59
  }), /*#__PURE__*/React.createElement(_uiCore.Grid, {
60
- hAlign: hAlign
60
+ hAlign: align
61
61
  }, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
62
62
  wide: "8",
63
63
  desktop: "10"
@@ -80,7 +80,7 @@ TitleDescriptionBox.propTypes = {
80
80
  className: PropTypes.string,
81
81
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
82
82
  description: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
83
- hAlign: PropTypes.oneOf(['center']),
83
+ align: PropTypes.oneOf(['center']),
84
84
  textColor: PropTypes.oneOf(['white'])
85
85
  };
86
86
  var _default = TitleDescriptionBox;
@@ -30,6 +30,8 @@ export interface IContent {
30
30
  buttonTitle?: string;
31
31
  /** Ссылка на кнопке */
32
32
  buttonHref?: string;
33
+ /** Target свойство кнопки */
34
+ buttonTarget?: '_self' | '_blank' | '_parent' | '_top';
33
35
  /** Добавляет атрибут download для тега <a> компонента Button */
34
36
  buttonDownload?: boolean;
35
37
  /** Цвет кнопки */
@@ -46,6 +48,8 @@ export interface IContent {
46
48
  linkTitle?: string;
47
49
  /** Адрес ссылки */
48
50
  linkUrl?: string;
51
+ /** Target свойство ссылки */
52
+ linkTarget?: '_self' | '_blank' | '_parent' | '_top';
49
53
  /** Добавляет атрибут download для тега <a> компонента TextLink */
50
54
  linkDownload?: boolean;
51
55
  /** Строка со стоимостью услуги */
@@ -112,6 +112,7 @@ var VideoBanner = function VideoBanner(_ref2) {
112
112
  description = _ref3.description,
113
113
  buttonTitle = _ref3.buttonTitle,
114
114
  buttonHref = _ref3.buttonHref,
115
+ buttonTarget = _ref3.buttonTarget,
115
116
  buttonDownload = _ref3.buttonDownload,
116
117
  _ref3$buttonColor = _ref3.buttonColor,
117
118
  buttonColor = _ref3$buttonColor === void 0 ? ButtonColor.GREEN : _ref3$buttonColor,
@@ -122,6 +123,7 @@ var VideoBanner = function VideoBanner(_ref2) {
122
123
  textColorMobile = _ref3.textColorMobile,
123
124
  linkTitle = _ref3.linkTitle,
124
125
  linkUrl = _ref3.linkUrl,
126
+ linkTarget = _ref3.linkTarget,
125
127
  linkDownload = _ref3.linkDownload,
126
128
  cost = _ref3.cost;
127
129
  return /*#__PURE__*/_react["default"].createElement(_uiCore.Grid, {
@@ -158,6 +160,7 @@ var VideoBanner = function VideoBanner(_ref2) {
158
160
  className: cn(ClassName.BUTTON, [classes.button]),
159
161
  theme: buttonColor,
160
162
  href: buttonHref,
163
+ target: buttonTarget,
161
164
  onClick: onButtonClick,
162
165
  download: buttonDownload
163
166
  }, buttonTitle), linkTitle && /*#__PURE__*/_react["default"].createElement(_uiCore.TextLink, {
@@ -167,6 +170,7 @@ var VideoBanner = function VideoBanner(_ref2) {
167
170
  className: cn(ClassName.LINK, [classes.link]),
168
171
  href: linkUrl,
169
172
  download: linkDownload,
173
+ target: linkTarget,
170
174
  onClick: onLinkClick
171
175
  }, linkTitle)))));
172
176
  }, [classes.button, classes.link, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-shared",
3
- "version": "4.0.0-beta.9",
3
+ "version": "4.0.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -52,7 +52,7 @@
52
52
  "@babel/preset-env": "^7.8.6",
53
53
  "@babel/preset-react": "^7.8.3",
54
54
  "@babel/preset-typescript": "^7.8.3",
55
- "@megafon/ui-icons": "^2.0.0-beta.2",
55
+ "@megafon/ui-icons": "^2.0.0",
56
56
  "@svgr/core": "^2.4.1",
57
57
  "@types/enzyme": "^3.10.5",
58
58
  "@types/enzyme-adapter-react-16": "^1.0.6",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "dependencies": {
84
84
  "@babel/runtime": "^7.8.4",
85
- "@megafon/ui-core": "^4.0.0-beta.8",
85
+ "@megafon/ui-core": "^4.0.1",
86
86
  "@megafon/ui-helpers": "^2.1.2",
87
87
  "core-js": "^3.6.4",
88
88
  "htmr": "^0.9.2",
@@ -90,5 +90,5 @@
90
90
  "prop-types": "^15.7.2",
91
91
  "swiper": "^6.5.6"
92
92
  },
93
- "gitHead": "ba1ae8e1c21ca8905a131d2b02fbfdf6356a5d8a"
93
+ "gitHead": "0633ca221fdcbf7374dbb325997c58d72afe80d4"
94
94
  }