@megafon/ui-shared 2.0.0-beta.97 → 2.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 (211) hide show
  1. package/CHANGELOG.md +1634 -0
  2. package/README.md +0 -5
  3. package/dist/es/components/AccordionBox/AccordionBox.css +13 -0
  4. package/dist/es/components/AccordionBox/AccordionBox.d.ts +16 -1
  5. package/dist/es/components/AccordionBox/AccordionBox.js +29 -13
  6. package/dist/es/components/BannerBox/BannerBox.js +3 -2
  7. package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +13 -2
  8. package/dist/es/components/BenefitsIcons/BenefitsIcons.js +82 -17
  9. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +2 -1
  10. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +15 -14
  11. package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +3 -3
  12. package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +19 -12
  13. package/dist/es/components/BenefitsIcons/types.d.ts +7 -2
  14. package/dist/es/components/BenefitsIcons/types.js +4 -0
  15. package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +10 -1
  16. package/dist/es/components/BenefitsPictures/BenefitsPictures.js +28 -12
  17. package/dist/es/components/BenefitsPictures/BenfitsPictures.css +4 -4
  18. package/dist/es/components/Breadcrumbs/Breadcrumbs.css +46 -0
  19. package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
  20. package/dist/es/components/Breadcrumbs/Breadcrumbs.js +49 -0
  21. package/dist/es/components/ButtonBanner/ButtonBanner.css +122 -0
  22. package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +54 -0
  23. package/dist/es/components/ButtonBanner/ButtonBanner.js +107 -0
  24. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +3 -3
  25. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +22 -2
  26. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +37 -8
  27. package/dist/es/components/Card/Card.css +71 -44
  28. package/dist/es/components/Card/Card.d.ts +33 -3
  29. package/dist/es/components/Card/Card.js +103 -42
  30. package/dist/es/components/CardsBox/CardsBox.d.ts +10 -2
  31. package/dist/es/components/CardsBox/CardsBox.js +26 -13
  32. package/dist/es/components/CarouselBox/CarouselBox.js +3 -2
  33. package/dist/es/components/Container/Container.css +1815 -547
  34. package/dist/es/components/Container/Container.d.ts +11 -1
  35. package/dist/es/components/Container/Container.js +28 -6
  36. package/dist/es/components/DownloadLinks/DownloadLink.css +5 -5
  37. package/dist/es/components/DownloadLinks/DownloadLink.d.ts +7 -0
  38. package/dist/es/components/DownloadLinks/DownloadLink.js +28 -6
  39. package/dist/es/components/DownloadLinks/DownloadLinks.css +9 -6
  40. package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +2 -0
  41. package/dist/es/components/DownloadLinks/DownloadLinks.js +18 -3
  42. package/dist/es/components/Instructions/Instructions.css +189 -130
  43. package/dist/es/components/Instructions/Instructions.d.ts +21 -2
  44. package/dist/es/components/Instructions/Instructions.js +115 -74
  45. package/dist/es/components/Instructions/img/iphone12.png +0 -0
  46. package/dist/es/components/PageTitle/PageTitle.css +80 -0
  47. package/dist/es/components/PageTitle/PageTitle.d.ts +23 -0
  48. package/dist/es/components/PageTitle/PageTitle.js +65 -0
  49. package/dist/es/components/Partners/Partners.css +22 -31
  50. package/dist/es/components/Partners/Partners.d.ts +13 -1
  51. package/dist/es/components/Partners/Partners.js +40 -18
  52. package/dist/es/components/PictureWithDescription/PictureWithDescription.css +25 -10
  53. package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +13 -0
  54. package/dist/es/components/PictureWithDescription/PictureWithDescription.js +31 -7
  55. package/dist/es/components/Property/Property.css +79 -71
  56. package/dist/es/components/Property/Property.d.ts +21 -2
  57. package/dist/es/components/Property/Property.js +80 -34
  58. package/dist/es/components/Property/PropertyDescription.css +3 -3
  59. package/dist/es/components/Property/PropertyDescription.js +19 -21
  60. package/dist/es/components/Property/types.d.ts +7 -2
  61. package/dist/es/components/Steps/Steps.css +41 -0
  62. package/dist/es/components/Steps/Steps.d.ts +10 -0
  63. package/dist/es/components/Steps/Steps.js +35 -0
  64. package/dist/es/components/Steps/StepsItem.css +37 -0
  65. package/dist/es/components/Steps/StepsItem.d.ts +10 -0
  66. package/dist/es/components/Steps/StepsItem.js +26 -0
  67. package/dist/es/components/StoreBanner/StoreBanner.css +289 -0
  68. package/dist/es/components/StoreBanner/StoreBanner.d.ts +65 -0
  69. package/dist/es/components/StoreBanner/StoreBanner.js +145 -0
  70. package/dist/es/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
  71. package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
  72. package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
  73. package/dist/es/components/StoreBanner/img/android.png +0 -0
  74. package/dist/es/components/StoreBanner/img/black-iphone.png +0 -0
  75. package/dist/es/components/StoreBanner/img/new-iphone.png +0 -0
  76. package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
  77. package/dist/es/components/StoreButton/StoreButton.css +15 -0
  78. package/dist/es/components/StoreButton/StoreButton.d.ts +17 -0
  79. package/dist/es/components/StoreButton/StoreButton.js +37 -0
  80. package/dist/es/components/StoreButton/img/app-store.png +0 -0
  81. package/dist/es/components/StoreButton/img/google-play.png +0 -0
  82. package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
  83. package/dist/es/components/Table/Table.css +67 -67
  84. package/dist/es/components/Table/Table.js +4 -4
  85. package/dist/es/components/Table/TableRow.js +1 -0
  86. package/dist/es/components/TabsBox/TabsBox.d.ts +4 -1
  87. package/dist/es/components/TabsBox/TabsBox.js +24 -3
  88. package/dist/es/components/TextBox/TextBox.css +7 -1
  89. package/dist/es/components/TextBox/TextBox.d.ts +8 -0
  90. package/dist/es/components/TextBox/TextBox.js +37 -5
  91. package/dist/es/components/TextBox/TextBoxPicture.css +24 -0
  92. package/dist/es/components/TextBox/TextBoxPicture.d.ts +17 -0
  93. package/dist/es/components/TextBox/TextBoxPicture.js +32 -0
  94. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +15 -4
  95. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +8 -2
  96. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +34 -14
  97. package/dist/es/components/VideoBanner/VideoBanner.css +155 -76
  98. package/dist/es/components/VideoBanner/VideoBanner.d.ts +64 -13
  99. package/dist/es/components/VideoBanner/VideoBanner.js +202 -70
  100. package/dist/es/components/VideoBlock/VideoBlock.css +32 -28
  101. package/dist/es/components/VideoBlock/VideoBlock.d.ts +20 -6
  102. package/dist/es/components/VideoBlock/VideoBlock.js +63 -44
  103. package/dist/es/constants/throttleTime.d.ts +4 -0
  104. package/dist/es/constants/throttleTime.js +3 -0
  105. package/dist/es/index.d.ts +8 -0
  106. package/dist/es/index.js +8 -0
  107. package/dist/lib/components/AccordionBox/AccordionBox.css +13 -0
  108. package/dist/lib/components/AccordionBox/AccordionBox.d.ts +16 -1
  109. package/dist/lib/components/AccordionBox/AccordionBox.js +31 -19
  110. package/dist/lib/components/BannerBox/BannerBox.js +3 -5
  111. package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +13 -2
  112. package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +84 -20
  113. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +2 -1
  114. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +15 -16
  115. package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +3 -3
  116. package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +19 -12
  117. package/dist/lib/components/BenefitsIcons/types.d.ts +7 -2
  118. package/dist/lib/components/BenefitsIcons/types.js +7 -2
  119. package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +10 -1
  120. package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +32 -15
  121. package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +4 -4
  122. package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +46 -0
  123. package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
  124. package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +65 -0
  125. package/dist/lib/components/ButtonBanner/ButtonBanner.css +122 -0
  126. package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +54 -0
  127. package/dist/lib/components/ButtonBanner/ButtonBanner.js +133 -0
  128. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +3 -3
  129. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +22 -2
  130. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +45 -11
  131. package/dist/lib/components/Card/Card.css +71 -44
  132. package/dist/lib/components/Card/Card.d.ts +33 -3
  133. package/dist/lib/components/Card/Card.js +118 -59
  134. package/dist/lib/components/CardsBox/CardsBox.d.ts +10 -2
  135. package/dist/lib/components/CardsBox/CardsBox.js +30 -16
  136. package/dist/lib/components/CarouselBox/CarouselBox.js +3 -5
  137. package/dist/lib/components/Container/Container.css +1815 -547
  138. package/dist/lib/components/Container/Container.d.ts +11 -1
  139. package/dist/lib/components/Container/Container.js +32 -11
  140. package/dist/lib/components/DownloadLinks/DownloadLink.css +5 -5
  141. package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +7 -0
  142. package/dist/lib/components/DownloadLinks/DownloadLink.js +32 -11
  143. package/dist/lib/components/DownloadLinks/DownloadLinks.css +9 -6
  144. package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +2 -0
  145. package/dist/lib/components/DownloadLinks/DownloadLinks.js +20 -6
  146. package/dist/lib/components/Instructions/Instructions.css +189 -130
  147. package/dist/lib/components/Instructions/Instructions.d.ts +21 -2
  148. package/dist/lib/components/Instructions/Instructions.js +148 -104
  149. package/dist/lib/components/Instructions/img/iphone12.png +0 -0
  150. package/dist/lib/components/PageTitle/PageTitle.css +80 -0
  151. package/dist/lib/components/PageTitle/PageTitle.d.ts +23 -0
  152. package/dist/lib/components/PageTitle/PageTitle.js +85 -0
  153. package/dist/lib/components/Partners/Partners.css +22 -31
  154. package/dist/lib/components/Partners/Partners.d.ts +13 -1
  155. package/dist/lib/components/Partners/Partners.js +43 -23
  156. package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +25 -10
  157. package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +13 -0
  158. package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +33 -8
  159. package/dist/lib/components/Property/Property.css +79 -71
  160. package/dist/lib/components/Property/Property.d.ts +21 -2
  161. package/dist/lib/components/Property/Property.js +93 -53
  162. package/dist/lib/components/Property/PropertyDescription.css +3 -3
  163. package/dist/lib/components/Property/PropertyDescription.js +21 -25
  164. package/dist/lib/components/Property/types.d.ts +7 -2
  165. package/dist/lib/components/Steps/Steps.css +41 -0
  166. package/dist/lib/components/Steps/Steps.d.ts +10 -0
  167. package/dist/lib/components/Steps/Steps.js +55 -0
  168. package/dist/lib/components/Steps/StepsItem.css +37 -0
  169. package/dist/lib/components/Steps/StepsItem.d.ts +10 -0
  170. package/dist/lib/components/Steps/StepsItem.js +39 -0
  171. package/dist/lib/components/StoreBanner/StoreBanner.css +289 -0
  172. package/dist/lib/components/StoreBanner/StoreBanner.d.ts +65 -0
  173. package/dist/lib/components/StoreBanner/StoreBanner.js +169 -0
  174. package/dist/lib/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
  175. package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
  176. package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
  177. package/dist/lib/components/StoreBanner/img/android.png +0 -0
  178. package/dist/lib/components/StoreBanner/img/black-iphone.png +0 -0
  179. package/dist/lib/components/StoreBanner/img/new-iphone.png +0 -0
  180. package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
  181. package/dist/lib/components/StoreButton/StoreButton.css +15 -0
  182. package/dist/lib/components/StoreButton/StoreButton.d.ts +17 -0
  183. package/dist/lib/components/StoreButton/StoreButton.js +58 -0
  184. package/dist/lib/components/StoreButton/img/app-store.png +0 -0
  185. package/dist/lib/components/StoreButton/img/google-play.png +0 -0
  186. package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
  187. package/dist/lib/components/Table/Table.css +67 -67
  188. package/dist/lib/components/Table/Table.js +6 -8
  189. package/dist/lib/components/Table/TableRow.js +1 -0
  190. package/dist/lib/components/TabsBox/TabsBox.d.ts +4 -1
  191. package/dist/lib/components/TabsBox/TabsBox.js +25 -2
  192. package/dist/lib/components/TextBox/TextBox.css +7 -1
  193. package/dist/lib/components/TextBox/TextBox.d.ts +8 -0
  194. package/dist/lib/components/TextBox/TextBox.js +39 -6
  195. package/dist/lib/components/TextBox/TextBoxPicture.css +24 -0
  196. package/dist/lib/components/TextBox/TextBoxPicture.d.ts +17 -0
  197. package/dist/lib/components/TextBox/TextBoxPicture.js +49 -0
  198. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +15 -4
  199. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +8 -2
  200. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +39 -19
  201. package/dist/lib/components/VideoBanner/VideoBanner.css +155 -76
  202. package/dist/lib/components/VideoBanner/VideoBanner.d.ts +64 -13
  203. package/dist/lib/components/VideoBanner/VideoBanner.js +225 -89
  204. package/dist/lib/components/VideoBlock/VideoBlock.css +32 -28
  205. package/dist/lib/components/VideoBlock/VideoBlock.d.ts +20 -6
  206. package/dist/lib/components/VideoBlock/VideoBlock.js +76 -68
  207. package/dist/lib/constants/throttleTime.d.ts +4 -0
  208. package/dist/lib/constants/throttleTime.js +10 -0
  209. package/dist/lib/index.d.ts +8 -0
  210. package/dist/lib/index.js +64 -0
  211. package/package.json +19 -75
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React, { Ref } from 'react';
2
2
  import './Container.less';
3
3
  export declare const BackgroundColors: {
4
4
  readonly DEFAULT: "default";
@@ -9,8 +9,18 @@ export declare const BackgroundColors: {
9
9
  };
10
10
  declare type BackgroundColorType = typeof BackgroundColors[keyof typeof BackgroundColors];
11
11
  declare type Props = {
12
+ /** Атрибут корневого тега */
13
+ id?: string;
14
+ /** Ссылка на корневой элемент */
15
+ rootRef?: Ref<HTMLDivElement>;
16
+ /** Дополнительный класс корневого элемента */
17
+ className?: string;
12
18
  /** Цвет фона */
13
19
  backgroundColor?: BackgroundColorType;
20
+ /** Отключить отступ сверху */
21
+ disablePaddingTop?: boolean;
22
+ /** Отключить отступ снизу */
23
+ disablePaddingBottom?: boolean;
14
24
  };
15
25
  declare const Container: React.FC<Props>;
16
26
  export default Container;
@@ -1,6 +1,9 @@
1
- import * as React from 'react';
1
+ import "core-js/modules/es.object.values";
2
+ import React from 'react';
3
+ import { ContentArea } from '@megafon/ui-core';
4
+ import { cnCreate } from '@megafon/ui-helpers';
5
+ import PropTypes from 'prop-types';
2
6
  import "./Container.css";
3
- import { cnCreate, ContentArea } from '@megafon/ui-core';
4
7
  export var BackgroundColors = {
5
8
  DEFAULT: 'default',
6
9
  LIGHT_GRAY: 'light-gray',
@@ -8,17 +11,36 @@ export var BackgroundColors = {
8
11
  GREEN: 'green',
9
12
  PURPLE: 'purple'
10
13
  };
11
- var cn = cnCreate('mfui-beta-container');
14
+ var cn = cnCreate('mfui-container');
12
15
 
13
16
  var Container = function Container(_ref) {
14
17
  var _ref$backgroundColor = _ref.backgroundColor,
15
18
  backgroundColor = _ref$backgroundColor === void 0 ? 'default' : _ref$backgroundColor,
16
- children = _ref.children;
19
+ rootRef = _ref.rootRef,
20
+ id = _ref.id,
21
+ className = _ref.className,
22
+ children = _ref.children,
23
+ disablePaddingTop = _ref.disablePaddingTop,
24
+ disablePaddingBottom = _ref.disablePaddingBottom;
17
25
  return /*#__PURE__*/React.createElement("div", {
18
26
  className: cn({
19
- 'bg-color': backgroundColor
20
- })
27
+ 'bg-color': backgroundColor,
28
+ 'disable-padding-top': disablePaddingTop,
29
+ 'disable-padding-bottom': disablePaddingBottom
30
+ }, [className]),
31
+ ref: rootRef,
32
+ id: id
21
33
  }, /*#__PURE__*/React.createElement(ContentArea, null, children));
22
34
  };
23
35
 
36
+ Container.propTypes = {
37
+ id: PropTypes.string,
38
+ className: PropTypes.string,
39
+ backgroundColor: PropTypes.oneOf(Object.values(BackgroundColors)),
40
+ rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
41
+ current: PropTypes.elementType
42
+ }), PropTypes.any])]),
43
+ disablePaddingTop: PropTypes.bool,
44
+ disablePaddingBottom: PropTypes.bool
45
+ };
24
46
  export default Container;
@@ -5,12 +5,12 @@ h4,
5
5
  h5 {
6
6
  margin: 0;
7
7
  }
8
- .mfui-beta-download-link {
8
+ .mfui-download-link {
9
9
  display: -webkit-box;
10
10
  display: -ms-flexbox;
11
11
  display: flex;
12
12
  }
13
- .mfui-beta-download-link__icon {
13
+ .mfui-download-link__icon {
14
14
  -ms-flex-negative: 0;
15
15
  flex-shrink: 0;
16
16
  width: 40px;
@@ -18,16 +18,16 @@ h5 {
18
18
  margin-right: 22px;
19
19
  }
20
20
  @media screen and (max-width: 1023px) {
21
- .mfui-beta-download-link__icon {
21
+ .mfui-download-link__icon {
22
22
  width: 32px;
23
23
  height: 32px;
24
24
  }
25
25
  }
26
- .mfui-beta-download-link__icon-svg {
26
+ .mfui-download-link__icon-svg {
27
27
  width: inherit;
28
28
  height: inherit;
29
29
  }
30
- .mfui-beta-download-link__info {
30
+ .mfui-download-link__info {
31
31
  margin: 0;
32
32
  font-size: 12px;
33
33
  line-height: 16px;
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import './DownloadLink.less';
3
3
  export interface IDownloadLink {
4
+ /** Ссылка на корневой элемент */
5
+ rootRef?: React.Ref<HTMLDivElement>;
4
6
  /** Адресы ссылки */
5
7
  href: string;
6
8
  /** Текст ссылки */
@@ -11,6 +13,11 @@ export interface IDownloadLink {
11
13
  fileSize: string;
12
14
  /** Дополнительный класс для компонента */
13
15
  className?: string;
16
+ /** Дополнительные классы для корневого и внутренних элементов */
17
+ classes?: {
18
+ root?: string;
19
+ link?: string;
20
+ };
14
21
  /** Обработчик клика по ссылке */
15
22
  onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
16
23
  }
@@ -1,10 +1,21 @@
1
1
  import "core-js/modules/es.array.concat";
2
+ import "core-js/modules/es.string.link";
3
+ import _extends from "@babel/runtime/helpers/extends";
2
4
  import * as React from 'react';
5
+ import { TextLink } from '@megafon/ui-core';
6
+ import { cnCreate } from '@megafon/ui-helpers';
3
7
  import * as PropTypes from 'prop-types';
4
- import { cnCreate, TextLink } from '@megafon/ui-core';
5
8
  import "./DownloadLink.css";
6
- import DownloadIcon from '@megafon/ui-core/dist/icons/basic-32-download_32';
7
- var cn = cnCreate('mfui-beta-download-link');
9
+
10
+ var DownloadIcon = function DownloadIcon(props) {
11
+ return /*#__PURE__*/React.createElement("svg", _extends({
12
+ viewBox: "0 0 40 40"
13
+ }, props), /*#__PURE__*/React.createElement("path", {
14
+ d: "M21 6v14l2.68-4 1.65 1-4.44 6.74h-1.77L14.68 17l1.65-1L19 20V6zM8 20H6a14 14 0 0028 0h-2a12 12 0 01-24 0z"
15
+ }));
16
+ };
17
+
18
+ var cn = cnCreate('mfui-download-link');
8
19
 
9
20
  var DownloadLink = function DownloadLink(_ref) {
10
21
  var href = _ref.href,
@@ -12,15 +23,19 @@ var DownloadLink = function DownloadLink(_ref) {
12
23
  extension = _ref.extension,
13
24
  fileSize = _ref.fileSize,
14
25
  onClick = _ref.onClick,
15
- className = _ref.className;
26
+ className = _ref.className,
27
+ _ref$classes = _ref.classes,
28
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
29
+ rootRef = _ref.rootRef;
16
30
  return /*#__PURE__*/React.createElement("div", {
17
- className: cn([className])
31
+ className: cn([className, classes.root]),
32
+ ref: rootRef
18
33
  }, /*#__PURE__*/React.createElement("div", {
19
34
  className: cn('icon')
20
35
  }, /*#__PURE__*/React.createElement(DownloadIcon, {
21
36
  className: cn('icon-svg')
22
37
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextLink, {
23
- className: cn('link'),
38
+ className: cn('link', [classes.link]),
24
39
  href: href,
25
40
  onClick: onClick,
26
41
  download: true
@@ -30,11 +45,18 @@ var DownloadLink = function DownloadLink(_ref) {
30
45
  };
31
46
 
32
47
  DownloadLink.propTypes = {
48
+ rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
49
+ current: PropTypes.elementType
50
+ }), PropTypes.any])]),
33
51
  href: PropTypes.string.isRequired,
34
52
  text: PropTypes.string.isRequired,
35
53
  extension: PropTypes.string.isRequired,
36
54
  fileSize: PropTypes.string.isRequired,
37
55
  className: PropTypes.string,
56
+ classes: PropTypes.shape({
57
+ root: PropTypes.string,
58
+ link: PropTypes.string
59
+ }),
38
60
  onClick: PropTypes.func
39
61
  };
40
62
  export default DownloadLink;
@@ -6,28 +6,31 @@ h5 {
6
6
  margin: 0;
7
7
  }
8
8
  @media screen and (min-width: 1024px) {
9
- .mfui-beta-download-links__column:nth-child(n + 4) {
9
+ .mfui-download-links__column:nth-child(n + 4) {
10
10
  margin-top: 24px;
11
11
  }
12
12
  }
13
13
  @media screen and (min-width: 768px) and (max-width: 1023px) {
14
- .mfui-beta-download-links__column:nth-child(n + 3) {
14
+ .mfui-download-links__column:nth-child(n + 3) {
15
15
  margin-top: 24px;
16
16
  }
17
17
  }
18
18
  @media screen and (max-width: 767px) {
19
- .mfui-beta-download-links__column:not(:first-child) {
19
+ .mfui-download-links__column:not(:first-child) {
20
20
  margin-top: 24px;
21
21
  }
22
22
  }
23
23
  @media screen and (min-width: 768px) {
24
- .mfui-beta-download-links_count_2 .mfui-beta-download-links__column:nth-child(n + 2) {
24
+ .mfui-download-links_count_2 .mfui-download-links__column:nth-child(n + 2) {
25
25
  margin-top: 24px;
26
26
  }
27
27
  }
28
28
  @media screen and (min-width: 768px) {
29
- .mfui-beta-download-links_count_3 .mfui-beta-download-links__column:nth-child(n + 3),
30
- .mfui-beta-download-links_count_4 .mfui-beta-download-links__column:nth-child(n + 3) {
29
+ .mfui-download-links_count_3 .mfui-download-links__column:nth-child(n + 3),
30
+ .mfui-download-links_count_4 .mfui-download-links__column:nth-child(n + 3) {
31
31
  margin-top: 24px;
32
32
  }
33
33
  }
34
+ .mfui-download-links__item:not(:first-child) {
35
+ margin-top: 24px;
36
+ }
@@ -2,6 +2,8 @@ import * as React from 'react';
2
2
  import './DownloadLinks.less';
3
3
  import { IDownloadLink } from './DownloadLink';
4
4
  interface IDownloadLinks {
5
+ /** Выстраивать ссылки в одну колонку вне зависимости от количества */
6
+ inOneColumn?: boolean;
5
7
  children: Array<React.ReactElement<IDownloadLink>> | React.ReactElement<IDownloadLink>;
6
8
  }
7
9
  declare const DownloadLinks: React.FC<IDownloadLinks>;
@@ -1,8 +1,9 @@
1
1
  import "core-js/modules/es.array.map";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import * as React from 'react';
4
+ import { Grid, GridColumn } from '@megafon/ui-core';
5
+ import { cnCreate } from '@megafon/ui-helpers';
4
6
  import * as PropTypes from 'prop-types';
5
- import { cnCreate, Grid, GridColumn } from '@megafon/ui-core';
6
7
  import "./DownloadLinks.css";
7
8
 
8
9
  var getColumnConfig = function getColumnConfig(itemsCount) {
@@ -35,10 +36,23 @@ var getColumnConfig = function getColumnConfig(itemsCount) {
35
36
  }
36
37
  };
37
38
 
38
- var cn = cnCreate('mfui-beta-download-links');
39
+ var cn = cnCreate('mfui-download-links');
39
40
 
40
41
  var DownloadLinks = function DownloadLinks(_ref) {
41
- var children = _ref.children;
42
+ var _ref$inOneColumn = _ref.inOneColumn,
43
+ inOneColumn = _ref$inOneColumn === void 0 ? false : _ref$inOneColumn,
44
+ children = _ref.children;
45
+
46
+ if (inOneColumn) {
47
+ return /*#__PURE__*/React.createElement("div", {
48
+ className: cn()
49
+ }, React.Children.map(children, function (child) {
50
+ return /*#__PURE__*/React.createElement("div", {
51
+ className: cn('item')
52
+ }, child);
53
+ }));
54
+ }
55
+
42
56
  var itemsCount = React.Children.count(children);
43
57
  var columnConfig = getColumnConfig(itemsCount);
44
58
  return /*#__PURE__*/React.createElement("div", {
@@ -55,6 +69,7 @@ var DownloadLinks = function DownloadLinks(_ref) {
55
69
  };
56
70
 
57
71
  DownloadLinks.propTypes = {
72
+ inOneColumn: PropTypes.bool,
58
73
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]).isRequired
59
74
  };
60
75
  export default DownloadLinks;