@megafon/ui-shared 6.11.0 → 6.12.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.
@@ -1,6 +1,6 @@
1
1
  import React, { ReactElement, Ref } from 'react';
2
2
  import './Card.less';
3
- import { ButtonType, FeaturesList, IconsList, Image, Link, MarkerList, Price, TextsList, Title } from './types';
3
+ import { ExtraButtonType, FeaturesList, IconsList, Image, Link, MainButtonType, MarkerList, Price, TextsList, Title } from './types';
4
4
  export interface ICard {
5
5
  /** Дополнительные data атрибуты к внутренним элементам */
6
6
  dataAttrs?: {
@@ -42,9 +42,9 @@ export interface ICard {
42
42
  /** Цена */
43
43
  price?: Price;
44
44
  /** Кнопка */
45
- button?: ButtonType;
45
+ button?: MainButtonType;
46
46
  /** Дополнительная кнопка */
47
- extraButton?: ButtonType;
47
+ extraButton?: ExtraButtonType;
48
48
  /** Бейдж */
49
49
  badge?: ReactElement;
50
50
  /** Обработчик клика по карточке */
@@ -184,6 +184,7 @@ var Card = function Card(_ref5) {
184
184
  return null;
185
185
  }
186
186
 
187
+ var extraButtonType = (button === null || button === void 0 ? void 0 : button.type) === 'outline' ? 'text' : extraButton === null || extraButton === void 0 ? void 0 : extraButton.type;
187
188
  return /*#__PURE__*/React.createElement("div", {
188
189
  className: cn('buttons', {
189
190
  centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
@@ -195,6 +196,8 @@ var Card = function Card(_ref5) {
195
196
  className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.button]),
196
197
  href: button.href,
197
198
  target: button.target,
199
+ type: button.type || 'primary',
200
+ theme: button.theme || 'green',
198
201
  onClick: button === null || button === void 0 ? void 0 : button.onClick
199
202
  }, button.title), !!extraButton && /*#__PURE__*/React.createElement(Button, {
200
203
  dataAttrs: {
@@ -203,7 +206,7 @@ var Card = function Card(_ref5) {
203
206
  className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.extraButton]),
204
207
  href: extraButton.href,
205
208
  target: extraButton.target,
206
- type: "outline",
209
+ type: extraButtonType || 'outline',
207
210
  onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
208
211
  }, extraButton.title));
209
212
  };
@@ -298,6 +301,8 @@ Card.propTypes = {
298
301
  href: PropTypes.string,
299
302
  target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
300
303
  isCentered: PropTypes.bool,
304
+ type: PropTypes.oneOf(['primary', 'outline']),
305
+ theme: PropTypes.oneOf(['green', 'green-soft']),
301
306
  onClick: PropTypes.func
302
307
  }),
303
308
  extraButton: PropTypes.shape({
@@ -305,6 +310,7 @@ Card.propTypes = {
305
310
  href: PropTypes.string,
306
311
  target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
307
312
  isCentered: PropTypes.bool,
313
+ type: PropTypes.oneOf(['text', 'outline']),
308
314
  onClick: PropTypes.func
309
315
  }),
310
316
  onClick: PropTypes.func
@@ -62,7 +62,7 @@ export declare type Price = {
62
62
  /** Период */
63
63
  period?: string;
64
64
  };
65
- export declare type ButtonType = {
65
+ export declare type MainButtonType = {
66
66
  /** Название */
67
67
  title: string;
68
68
  /** Ссылка */
@@ -71,6 +71,24 @@ export declare type ButtonType = {
71
71
  target?: Target;
72
72
  /** Центрировать кнопку */
73
73
  isCentered?: boolean;
74
+ /** Тип кнопки */
75
+ type?: 'primary' | 'outline';
76
+ /** Тема кнопки */
77
+ theme?: 'green' | 'green-soft';
78
+ /** Обработчик клика по кнопке */
79
+ onClick?: () => void;
80
+ };
81
+ export declare type ExtraButtonType = {
82
+ /** Название */
83
+ title: string;
84
+ /** Ссылка */
85
+ href?: string;
86
+ /** Target свойство кнопки */
87
+ target?: Target;
88
+ /** Центрировать кнопку */
89
+ isCentered?: boolean;
90
+ /** Тип кнопки */
91
+ type?: 'outline' | 'text';
74
92
  /** Обработчик клика по кнопке */
75
93
  onClick?: () => void;
76
94
  };
@@ -11,7 +11,6 @@ h5 {
11
11
  }
12
12
  .mfui-v6-container .mfui-v6-container__inner {
13
13
  padding-bottom: 96px;
14
- border-radius: 24px;
15
14
  }
16
15
  @media screen and (max-width: 767px) {
17
16
  .mfui-v6-container .mfui-v6-container__inner {
@@ -23,13 +22,20 @@ h5 {
23
22
  padding-bottom: 72px;
24
23
  }
25
24
  }
25
+ @media screen and (min-width: 768px) {
26
+ .mfui-v6-container .mfui-v6-container__inner {
27
+ border-radius: 40px;
28
+ }
29
+ }
26
30
  .mfui-v6-container .mfui-v6-container__inner_prevent {
27
31
  padding-top: 0.1px;
28
32
  }
33
+ .mfui-v6-container_disable-radius-top .mfui-v6-container__inner,
29
34
  .mfui-v6-container:first-child .mfui-v6-container__inner {
30
35
  border-top-left-radius: 0;
31
36
  border-top-right-radius: 0;
32
37
  }
38
+ .mfui-v6-container_disable-radius-bottom .mfui-v6-container__inner,
33
39
  .mfui-v6-container:last-child .mfui-v6-container__inner {
34
40
  border-bottom-right-radius: 0;
35
41
  border-bottom-left-radius: 0;
@@ -15,12 +15,21 @@ declare type Props = {
15
15
  rootRef?: Ref<HTMLDivElement>;
16
16
  /** Дополнительный класс корневого элемента */
17
17
  className?: string;
18
+ /** Дополнительные классы для корневого и внутренних элементов */
19
+ classes?: {
20
+ root?: string;
21
+ inner?: string;
22
+ };
18
23
  /** Цвет фона */
19
24
  backgroundColor?: BackgroundColorType;
20
25
  /** Отключить отступ сверху */
21
26
  disablePaddingTop?: boolean;
22
27
  /** Отключить отступ снизу */
23
28
  disablePaddingBottom?: boolean;
29
+ /** Отключить скругление сверху */
30
+ disableRadiusTop?: boolean;
31
+ /** Отключить скругление снизу */
32
+ disableRadiusBottom?: boolean;
24
33
  /** Включить тень в нижней части компонента */
25
34
  bottomShadow?: boolean;
26
35
  /** Предотвратить прохождение верхнего отступа дочернего компонента через верхнюю границу контейнера */
@@ -19,9 +19,12 @@ var Container = function Container(_ref) {
19
19
  rootRef = _ref.rootRef,
20
20
  id = _ref.id,
21
21
  className = _ref.className,
22
+ classes = _ref.classes,
22
23
  children = _ref.children,
23
24
  disablePaddingTop = _ref.disablePaddingTop,
24
25
  disablePaddingBottom = _ref.disablePaddingBottom,
26
+ disableRadiusTop = _ref.disableRadiusTop,
27
+ disableRadiusBottom = _ref.disableRadiusBottom,
25
28
  _ref$bottomShadow = _ref.bottomShadow,
26
29
  bottomShadow = _ref$bottomShadow === void 0 ? false : _ref$bottomShadow,
27
30
  _ref$preventMarginTop = _ref.preventMarginTopCollapse,
@@ -31,26 +34,34 @@ var Container = function Container(_ref) {
31
34
  'bg-color': backgroundColor,
32
35
  'bottom-shadow': bottomShadow,
33
36
  'disable-padding-top': disablePaddingTop,
34
- 'disable-padding-bottom': disablePaddingBottom
35
- }, [className]),
37
+ 'disable-padding-bottom': disablePaddingBottom,
38
+ 'disable-radius-top': disableRadiusTop,
39
+ 'disable-radius-bottom': disableRadiusBottom
40
+ }, [className, classes === null || classes === void 0 ? void 0 : classes.root]),
36
41
  ref: rootRef,
37
42
  id: id
38
43
  }, /*#__PURE__*/React.createElement("div", {
39
44
  className: cn('inner', {
40
45
  prevent: preventMarginTopCollapse
41
- })
46
+ }, [classes === null || classes === void 0 ? void 0 : classes.inner])
42
47
  }, /*#__PURE__*/React.createElement(ContentArea, null, children)));
43
48
  };
44
49
 
45
50
  Container.propTypes = {
46
51
  id: PropTypes.string,
47
52
  className: PropTypes.string,
53
+ classes: PropTypes.shape({
54
+ root: PropTypes.string,
55
+ inner: PropTypes.string
56
+ }),
48
57
  backgroundColor: PropTypes.oneOf(Object.values(BackgroundColors)),
49
58
  rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
50
59
  current: PropTypes.elementType
51
60
  }), PropTypes.any])]),
52
61
  disablePaddingTop: PropTypes.bool,
53
62
  disablePaddingBottom: PropTypes.bool,
63
+ disableRadiusTop: PropTypes.bool,
64
+ disableRadiusBottom: PropTypes.bool,
54
65
  bottomShadow: PropTypes.bool,
55
66
  preventMarginTopCollapse: PropTypes.bool
56
67
  };
@@ -67,6 +67,33 @@ h5 {
67
67
  margin-top: 45px;
68
68
  }
69
69
  }
70
+ .mfui-v6-page-title__title_single.mfui-v6-page-title__title_margin-top_small {
71
+ margin-top: 48px;
72
+ }
73
+ @media screen and (min-width: 768px) and (max-width: 1023px) {
74
+ .mfui-v6-page-title__title_single.mfui-v6-page-title__title_margin-top_small {
75
+ margin-top: 40px;
76
+ }
77
+ }
78
+ @media screen and (max-width: 767px) {
79
+ .mfui-v6-page-title__title_single.mfui-v6-page-title__title_margin-top_small {
80
+ margin-top: 32px;
81
+ }
82
+ }
83
+ .mfui-v6-page-title__description {
84
+ font-family: inherit;
85
+ font-size: 15px;
86
+ line-height: 24px;
87
+ font-weight: 400;
88
+ margin-top: 24px;
89
+ color: inherit;
90
+ white-space: pre-wrap;
91
+ }
92
+ @media screen and (max-width: 767px) {
93
+ .mfui-v6-page-title__description {
94
+ margin-top: 16px;
95
+ }
96
+ }
70
97
  .mfui-v6-page-title__badge + .mfui-v6-page-title__title {
71
98
  margin-top: 8px;
72
99
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import './PageTitle.less';
3
2
  import { Props as BreadcrumbsType } from '../Breadcrumbs/Breadcrumbs';
3
+ import './PageTitle.less';
4
4
  export declare type PageTitleProps = {
5
5
  /** Дополнительные data атрибуты к внутренним элементам */
6
6
  dataAttrs?: {
@@ -10,6 +10,8 @@ export declare type PageTitleProps = {
10
10
  };
11
11
  /** Текст заголовка */
12
12
  title: string | React.ReactNode | React.ReactNode[];
13
+ /** Описание */
14
+ description?: string | React.ReactNode | React.ReactNode[];
13
15
  /** Хлебные крошки */
14
16
  breadcrumbs?: BreadcrumbsType['items'];
15
17
  /** Текст бейджа */
@@ -18,10 +20,13 @@ export declare type PageTitleProps = {
18
20
  isFullWidth?: boolean;
19
21
  /** Включить микроразметку для хлебных крошек */
20
22
  hasBreadcrumbsMicrodata?: boolean;
23
+ /** Отступ сверху */
24
+ marginTop?: 'default' | 'small';
21
25
  /** Класс для корневого элемента */
22
26
  className?: string;
23
27
  /** Дополнительные классы для внутренних элементов */
24
28
  classes?: {
29
+ title?: string;
25
30
  breadcrumbs?: string;
26
31
  };
27
32
  /** Ссылка на корневой элемент */
@@ -1,40 +1,52 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import "core-js/modules/es.symbol.js";
3
+ import "core-js/modules/es.symbol.description.js";
2
4
  import * as React from 'react';
3
5
  import { Header, Grid, GridColumn } from '@megafon/ui-core';
4
6
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
5
7
  import PropTypes from 'prop-types';
6
- import "./PageTitle.css";
7
8
  import Breadcrumbs from "../Breadcrumbs/Breadcrumbs";
9
+ import "./PageTitle.css";
8
10
  var testIdPrefix = 'PageTitle';
9
11
  var cn = cnCreate('mfui-v6-page-title');
10
12
 
11
13
  var PageTitle = function PageTitle(_ref) {
12
14
  var dataAttrs = _ref.dataAttrs,
13
15
  title = _ref.title,
16
+ description = _ref.description,
14
17
  breadcrumbs = _ref.breadcrumbs,
15
18
  badge = _ref.badge,
16
19
  _ref$isFullWidth = _ref.isFullWidth,
17
20
  isFullWidth = _ref$isFullWidth === void 0 ? true : _ref$isFullWidth,
18
21
  _ref$hasBreadcrumbsMi = _ref.hasBreadcrumbsMicrodata,
19
22
  hasBreadcrumbsMicrodata = _ref$hasBreadcrumbsMi === void 0 ? false : _ref$hasBreadcrumbsMi,
23
+ _ref$marginTop = _ref.marginTop,
24
+ marginTop = _ref$marginTop === void 0 ? 'default' : _ref$marginTop,
20
25
  className = _ref.className,
21
26
  _ref$classes = _ref.classes,
22
27
  classes = _ref$classes === void 0 ? {} : _ref$classes,
23
28
  rootRef = _ref.rootRef;
24
29
  var isBreadcrumbs = !!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length);
25
- var renderPageTitle = React.useCallback(function () {
26
- return /*#__PURE__*/React.createElement(React.Fragment, null, badge && /*#__PURE__*/React.createElement("div", {
27
- className: cn('badge', {
28
- 'under-breadcrumbs': isBreadcrumbs
29
- })
30
- }, badge), /*#__PURE__*/React.createElement(Header, {
31
- className: cn('title', {
32
- 'under-breadcrumbs': isBreadcrumbs && !badge
33
- }),
34
- as: "h1"
35
- }, title));
36
- }, [badge, title, isBreadcrumbs]);
37
- var renderPageTitleWithGrid = React.useCallback(function () {
30
+ var titleContent = /*#__PURE__*/React.createElement(React.Fragment, null, badge && /*#__PURE__*/React.createElement("div", {
31
+ className: cn('badge', {
32
+ 'under-breadcrumbs': isBreadcrumbs
33
+ })
34
+ }, badge), /*#__PURE__*/React.createElement(Header, {
35
+ className: cn('title', {
36
+ single: !isBreadcrumbs && !badge,
37
+ 'margin-top': marginTop,
38
+ 'under-breadcrumbs': isBreadcrumbs && !badge
39
+ }, [classes.title]),
40
+ as: "h1"
41
+ }, title), description && /*#__PURE__*/React.createElement("div", {
42
+ className: cn('description')
43
+ }, description));
44
+
45
+ var renderContent = function renderContent() {
46
+ if (isFullWidth) {
47
+ return titleContent;
48
+ }
49
+
38
50
  return /*#__PURE__*/React.createElement(Grid, {
39
51
  dataAttrs: {
40
52
  root: {
@@ -46,8 +58,9 @@ var PageTitle = function PageTitle(_ref) {
46
58
  desktop: "10",
47
59
  tablet: "12",
48
60
  mobile: "12"
49
- }, renderPageTitle()));
50
- }, [renderPageTitle]);
61
+ }, titleContent));
62
+ };
63
+
51
64
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
52
65
  className: cn([className]),
53
66
  ref: rootRef
@@ -61,7 +74,7 @@ var PageTitle = function PageTitle(_ref) {
61
74
  link: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.breadcrumbsLink
62
75
  },
63
76
  className: cn('breadcrumbs', [classes.breadcrumbs])
64
- }), isFullWidth ? renderPageTitle() : renderPageTitleWithGrid());
77
+ }), renderContent());
65
78
  };
66
79
 
67
80
  PageTitle.propTypes = {
@@ -71,6 +84,7 @@ PageTitle.propTypes = {
71
84
  breadcrumbsLink: PropTypes.objectOf(PropTypes.string.isRequired)
72
85
  }),
73
86
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired,
87
+ description: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
74
88
  breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
75
89
  title: PropTypes.string.isRequired,
76
90
  href: PropTypes.string
@@ -78,8 +92,10 @@ PageTitle.propTypes = {
78
92
  badge: PropTypes.string,
79
93
  isFullWidth: PropTypes.bool,
80
94
  hasBreadcrumbsMicrodata: PropTypes.bool,
95
+ marginTop: PropTypes.oneOf(['default', 'small']),
81
96
  className: PropTypes.string,
82
97
  classes: PropTypes.shape({
98
+ title: PropTypes.string,
83
99
  breadcrumbs: PropTypes.string
84
100
  }),
85
101
  rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
@@ -1,6 +1,6 @@
1
1
  import React, { ReactElement, Ref } from 'react';
2
2
  import './Card.less';
3
- import { ButtonType, FeaturesList, IconsList, Image, Link, MarkerList, Price, TextsList, Title } from './types';
3
+ import { ExtraButtonType, FeaturesList, IconsList, Image, Link, MainButtonType, MarkerList, Price, TextsList, Title } from './types';
4
4
  export interface ICard {
5
5
  /** Дополнительные data атрибуты к внутренним элементам */
6
6
  dataAttrs?: {
@@ -42,9 +42,9 @@ export interface ICard {
42
42
  /** Цена */
43
43
  price?: Price;
44
44
  /** Кнопка */
45
- button?: ButtonType;
45
+ button?: MainButtonType;
46
46
  /** Дополнительная кнопка */
47
- extraButton?: ButtonType;
47
+ extraButton?: ExtraButtonType;
48
48
  /** Бейдж */
49
49
  badge?: ReactElement;
50
50
  /** Обработчик клика по карточке */
@@ -199,6 +199,7 @@ var Card = function Card(_ref5) {
199
199
  return null;
200
200
  }
201
201
 
202
+ var extraButtonType = (button === null || button === void 0 ? void 0 : button.type) === 'outline' ? 'text' : extraButton === null || extraButton === void 0 ? void 0 : extraButton.type;
202
203
  return /*#__PURE__*/_react["default"].createElement("div", {
203
204
  className: cn('buttons', {
204
205
  centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
@@ -210,6 +211,8 @@ var Card = function Card(_ref5) {
210
211
  className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.button]),
211
212
  href: button.href,
212
213
  target: button.target,
214
+ type: button.type || 'primary',
215
+ theme: button.theme || 'green',
213
216
  onClick: button === null || button === void 0 ? void 0 : button.onClick
214
217
  }, button.title), !!extraButton && /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
215
218
  dataAttrs: {
@@ -218,7 +221,7 @@ var Card = function Card(_ref5) {
218
221
  className: cn('button', [classes === null || classes === void 0 ? void 0 : classes.extraButton]),
219
222
  href: extraButton.href,
220
223
  target: extraButton.target,
221
- type: "outline",
224
+ type: extraButtonType || 'outline',
222
225
  onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
223
226
  }, extraButton.title));
224
227
  };
@@ -313,6 +316,8 @@ Card.propTypes = {
313
316
  href: _propTypes["default"].string,
314
317
  target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top']),
315
318
  isCentered: _propTypes["default"].bool,
319
+ type: _propTypes["default"].oneOf(['primary', 'outline']),
320
+ theme: _propTypes["default"].oneOf(['green', 'green-soft']),
316
321
  onClick: _propTypes["default"].func
317
322
  }),
318
323
  extraButton: _propTypes["default"].shape({
@@ -320,6 +325,7 @@ Card.propTypes = {
320
325
  href: _propTypes["default"].string,
321
326
  target: _propTypes["default"].oneOf(['_self', '_blank', '_parent', '_top']),
322
327
  isCentered: _propTypes["default"].bool,
328
+ type: _propTypes["default"].oneOf(['text', 'outline']),
323
329
  onClick: _propTypes["default"].func
324
330
  }),
325
331
  onClick: _propTypes["default"].func
@@ -62,7 +62,7 @@ export declare type Price = {
62
62
  /** Период */
63
63
  period?: string;
64
64
  };
65
- export declare type ButtonType = {
65
+ export declare type MainButtonType = {
66
66
  /** Название */
67
67
  title: string;
68
68
  /** Ссылка */
@@ -71,6 +71,24 @@ export declare type ButtonType = {
71
71
  target?: Target;
72
72
  /** Центрировать кнопку */
73
73
  isCentered?: boolean;
74
+ /** Тип кнопки */
75
+ type?: 'primary' | 'outline';
76
+ /** Тема кнопки */
77
+ theme?: 'green' | 'green-soft';
78
+ /** Обработчик клика по кнопке */
79
+ onClick?: () => void;
80
+ };
81
+ export declare type ExtraButtonType = {
82
+ /** Название */
83
+ title: string;
84
+ /** Ссылка */
85
+ href?: string;
86
+ /** Target свойство кнопки */
87
+ target?: Target;
88
+ /** Центрировать кнопку */
89
+ isCentered?: boolean;
90
+ /** Тип кнопки */
91
+ type?: 'outline' | 'text';
74
92
  /** Обработчик клика по кнопке */
75
93
  onClick?: () => void;
76
94
  };
@@ -11,7 +11,6 @@ h5 {
11
11
  }
12
12
  .mfui-v6-container .mfui-v6-container__inner {
13
13
  padding-bottom: 96px;
14
- border-radius: 24px;
15
14
  }
16
15
  @media screen and (max-width: 767px) {
17
16
  .mfui-v6-container .mfui-v6-container__inner {
@@ -23,13 +22,20 @@ h5 {
23
22
  padding-bottom: 72px;
24
23
  }
25
24
  }
25
+ @media screen and (min-width: 768px) {
26
+ .mfui-v6-container .mfui-v6-container__inner {
27
+ border-radius: 40px;
28
+ }
29
+ }
26
30
  .mfui-v6-container .mfui-v6-container__inner_prevent {
27
31
  padding-top: 0.1px;
28
32
  }
33
+ .mfui-v6-container_disable-radius-top .mfui-v6-container__inner,
29
34
  .mfui-v6-container:first-child .mfui-v6-container__inner {
30
35
  border-top-left-radius: 0;
31
36
  border-top-right-radius: 0;
32
37
  }
38
+ .mfui-v6-container_disable-radius-bottom .mfui-v6-container__inner,
33
39
  .mfui-v6-container:last-child .mfui-v6-container__inner {
34
40
  border-bottom-right-radius: 0;
35
41
  border-bottom-left-radius: 0;
@@ -15,12 +15,21 @@ declare type Props = {
15
15
  rootRef?: Ref<HTMLDivElement>;
16
16
  /** Дополнительный класс корневого элемента */
17
17
  className?: string;
18
+ /** Дополнительные классы для корневого и внутренних элементов */
19
+ classes?: {
20
+ root?: string;
21
+ inner?: string;
22
+ };
18
23
  /** Цвет фона */
19
24
  backgroundColor?: BackgroundColorType;
20
25
  /** Отключить отступ сверху */
21
26
  disablePaddingTop?: boolean;
22
27
  /** Отключить отступ снизу */
23
28
  disablePaddingBottom?: boolean;
29
+ /** Отключить скругление сверху */
30
+ disableRadiusTop?: boolean;
31
+ /** Отключить скругление снизу */
32
+ disableRadiusBottom?: boolean;
24
33
  /** Включить тень в нижней части компонента */
25
34
  bottomShadow?: boolean;
26
35
  /** Предотвратить прохождение верхнего отступа дочернего компонента через верхнюю границу контейнера */
@@ -33,9 +33,12 @@ var Container = function Container(_ref) {
33
33
  rootRef = _ref.rootRef,
34
34
  id = _ref.id,
35
35
  className = _ref.className,
36
+ classes = _ref.classes,
36
37
  children = _ref.children,
37
38
  disablePaddingTop = _ref.disablePaddingTop,
38
39
  disablePaddingBottom = _ref.disablePaddingBottom,
40
+ disableRadiusTop = _ref.disableRadiusTop,
41
+ disableRadiusBottom = _ref.disableRadiusBottom,
39
42
  _ref$bottomShadow = _ref.bottomShadow,
40
43
  bottomShadow = _ref$bottomShadow === void 0 ? false : _ref$bottomShadow,
41
44
  _ref$preventMarginTop = _ref.preventMarginTopCollapse,
@@ -45,26 +48,34 @@ var Container = function Container(_ref) {
45
48
  'bg-color': backgroundColor,
46
49
  'bottom-shadow': bottomShadow,
47
50
  'disable-padding-top': disablePaddingTop,
48
- 'disable-padding-bottom': disablePaddingBottom
49
- }, [className]),
51
+ 'disable-padding-bottom': disablePaddingBottom,
52
+ 'disable-radius-top': disableRadiusTop,
53
+ 'disable-radius-bottom': disableRadiusBottom
54
+ }, [className, classes === null || classes === void 0 ? void 0 : classes.root]),
50
55
  ref: rootRef,
51
56
  id: id
52
57
  }, /*#__PURE__*/_react["default"].createElement("div", {
53
58
  className: cn('inner', {
54
59
  prevent: preventMarginTopCollapse
55
- })
60
+ }, [classes === null || classes === void 0 ? void 0 : classes.inner])
56
61
  }, /*#__PURE__*/_react["default"].createElement(_uiCore.ContentArea, null, children)));
57
62
  };
58
63
 
59
64
  Container.propTypes = {
60
65
  id: _propTypes["default"].string,
61
66
  className: _propTypes["default"].string,
67
+ classes: _propTypes["default"].shape({
68
+ root: _propTypes["default"].string,
69
+ inner: _propTypes["default"].string
70
+ }),
62
71
  backgroundColor: _propTypes["default"].oneOf(Object.values(BackgroundColors)),
63
72
  rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
64
73
  current: _propTypes["default"].elementType
65
74
  }), _propTypes["default"].any])]),
66
75
  disablePaddingTop: _propTypes["default"].bool,
67
76
  disablePaddingBottom: _propTypes["default"].bool,
77
+ disableRadiusTop: _propTypes["default"].bool,
78
+ disableRadiusBottom: _propTypes["default"].bool,
68
79
  bottomShadow: _propTypes["default"].bool,
69
80
  preventMarginTopCollapse: _propTypes["default"].bool
70
81
  };
@@ -67,6 +67,33 @@ h5 {
67
67
  margin-top: 45px;
68
68
  }
69
69
  }
70
+ .mfui-v6-page-title__title_single.mfui-v6-page-title__title_margin-top_small {
71
+ margin-top: 48px;
72
+ }
73
+ @media screen and (min-width: 768px) and (max-width: 1023px) {
74
+ .mfui-v6-page-title__title_single.mfui-v6-page-title__title_margin-top_small {
75
+ margin-top: 40px;
76
+ }
77
+ }
78
+ @media screen and (max-width: 767px) {
79
+ .mfui-v6-page-title__title_single.mfui-v6-page-title__title_margin-top_small {
80
+ margin-top: 32px;
81
+ }
82
+ }
83
+ .mfui-v6-page-title__description {
84
+ font-family: inherit;
85
+ font-size: 15px;
86
+ line-height: 24px;
87
+ font-weight: 400;
88
+ margin-top: 24px;
89
+ color: inherit;
90
+ white-space: pre-wrap;
91
+ }
92
+ @media screen and (max-width: 767px) {
93
+ .mfui-v6-page-title__description {
94
+ margin-top: 16px;
95
+ }
96
+ }
70
97
  .mfui-v6-page-title__badge + .mfui-v6-page-title__title {
71
98
  margin-top: 8px;
72
99
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import './PageTitle.less';
3
2
  import { Props as BreadcrumbsType } from '../Breadcrumbs/Breadcrumbs';
3
+ import './PageTitle.less';
4
4
  export declare type PageTitleProps = {
5
5
  /** Дополнительные data атрибуты к внутренним элементам */
6
6
  dataAttrs?: {
@@ -10,6 +10,8 @@ export declare type PageTitleProps = {
10
10
  };
11
11
  /** Текст заголовка */
12
12
  title: string | React.ReactNode | React.ReactNode[];
13
+ /** Описание */
14
+ description?: string | React.ReactNode | React.ReactNode[];
13
15
  /** Хлебные крошки */
14
16
  breadcrumbs?: BreadcrumbsType['items'];
15
17
  /** Текст бейджа */
@@ -18,10 +20,13 @@ export declare type PageTitleProps = {
18
20
  isFullWidth?: boolean;
19
21
  /** Включить микроразметку для хлебных крошек */
20
22
  hasBreadcrumbsMicrodata?: boolean;
23
+ /** Отступ сверху */
24
+ marginTop?: 'default' | 'small';
21
25
  /** Класс для корневого элемента */
22
26
  className?: string;
23
27
  /** Дополнительные классы для внутренних элементов */
24
28
  classes?: {
29
+ title?: string;
25
30
  breadcrumbs?: string;
26
31
  };
27
32
  /** Ссылка на корневой элемент */