@megafon/ui-shared 5.17.0 → 6.0.0-beta.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.
Files changed (283) hide show
  1. package/dist/es/components/AccordionBox/AccordionBox.css +1 -15
  2. package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
  3. package/dist/es/components/AccordionBox/AccordionBox.js +6 -49
  4. package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
  5. package/dist/es/components/AudioPlayer/AudioPlayer.js +11 -27
  6. package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
  7. package/dist/es/components/AudioPlayer/AudioProgress.js +10 -22
  8. package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
  9. package/dist/es/components/AudioPlayer/AudioRange.js +8 -10
  10. package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
  11. package/dist/es/components/AudioPlayer/AudioVolume.js +3 -12
  12. package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +4 -10
  13. package/dist/es/components/AudioPlayer/timerFormatUtil.js +1 -9
  14. package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
  15. package/dist/es/components/BannerBox/BannerBox.js +3 -12
  16. package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
  17. package/dist/es/components/BenefitsIcons/BenefitsIcons.js +23 -64
  18. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
  19. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +9 -36
  20. package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
  21. package/dist/es/components/BenefitsIcons/helpers.js +6 -20
  22. package/dist/es/components/BenefitsIcons/types.d.ts +5 -5
  23. package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  24. package/dist/es/components/BenefitsPictures/BenefitsPictures.js +19 -49
  25. package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -43
  26. package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
  27. package/dist/es/components/BenefitsPictures/helpers.js +0 -14
  28. package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
  29. package/dist/es/components/BenefitsPictures/types.js +1 -0
  30. package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -43
  31. package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
  32. package/dist/es/components/Breadcrumbs/Breadcrumbs.js +10 -39
  33. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
  34. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +11 -36
  35. package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -122
  36. package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
  37. package/dist/es/components/ButtonBanner/ButtonBanner.js +22 -53
  38. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
  39. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
  40. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +20 -51
  41. package/dist/es/components/Card/Card.d.ts +4 -4
  42. package/dist/es/components/Card/Card.js +25 -115
  43. package/dist/es/components/Card/types.d.ts +10 -10
  44. package/dist/es/components/Card/types.js +1 -0
  45. package/dist/es/components/CardsBox/CardsBox.js +3 -14
  46. package/dist/es/components/CardsBox/helpers.d.ts +2 -2
  47. package/dist/es/components/CardsBox/helpers.js +0 -4
  48. package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
  49. package/dist/es/components/CarouselBox/CarouselBox.js +11 -24
  50. package/dist/es/components/Container/Container.d.ts +7 -5
  51. package/dist/es/components/Container/Container.js +10 -25
  52. package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
  53. package/dist/es/components/DownloadLinks/DownloadLink.js +13 -44
  54. package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
  55. package/dist/es/components/DownloadLinks/DownloadLinks.js +2 -13
  56. package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +5 -2
  57. package/dist/es/components/FaqWrapper/FaqWrapper.js +1 -3
  58. package/dist/es/components/ImageBanner/ImageBanner.d.ts +8 -7
  59. package/dist/es/components/ImageBanner/ImageBanner.js +37 -88
  60. package/dist/es/components/Instructions/Instructions.d.ts +11 -11
  61. package/dist/es/components/Instructions/Instructions.js +41 -94
  62. package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
  63. package/dist/es/components/NotificationBox/NotificationBox.js +5 -19
  64. package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
  65. package/dist/es/components/PageTitle/PageTitle.js +12 -37
  66. package/dist/es/components/Partners/Partners.d.ts +2 -2
  67. package/dist/es/components/Partners/Partners.js +17 -48
  68. package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
  69. package/dist/es/components/PictureWithDescription/PictureWithDescription.js +10 -28
  70. package/dist/es/components/Property/Property.d.ts +4 -4
  71. package/dist/es/components/Property/Property.js +37 -81
  72. package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
  73. package/dist/es/components/Property/PropertyDescription.js +8 -28
  74. package/dist/es/components/Property/types.d.ts +7 -5
  75. package/dist/es/components/Property/types.js +1 -0
  76. package/dist/es/components/Steps/Steps.d.ts +2 -1
  77. package/dist/es/components/Steps/Steps.js +4 -19
  78. package/dist/es/components/Steps/StepsItem.d.ts +2 -2
  79. package/dist/es/components/Steps/StepsItem.js +2 -9
  80. package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
  81. package/dist/es/components/StoreBanner/StoreBanner.js +41 -97
  82. package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
  83. package/dist/es/components/StoreButton/StoreButton.js +13 -44
  84. package/dist/es/components/Table/Table.d.ts +1 -1
  85. package/dist/es/components/Table/Table.js +31 -51
  86. package/dist/es/components/Table/TableCell.js +0 -6
  87. package/dist/es/components/Table/TableRow.js +1 -10
  88. package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
  89. package/dist/es/components/TabsBox/TabsBox.js +4 -13
  90. package/dist/es/components/TextBox/TextBox.d.ts +2 -1
  91. package/dist/es/components/TextBox/TextBox.js +8 -23
  92. package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
  93. package/dist/es/components/TextBox/TextBoxPicture.js +5 -14
  94. package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
  95. package/dist/es/components/TextWithIcon/TextWithIcon.js +6 -24
  96. package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
  97. package/dist/es/components/TextWithIcon/TextWithIconItem.js +6 -21
  98. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  99. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +6 -23
  100. package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
  101. package/dist/es/components/VideoBanner/VideoBanner.js +47 -110
  102. package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
  103. package/dist/es/components/VideoBlock/VideoBlock.js +35 -75
  104. package/dist/es/helpers/getColumnConfig.d.ts +5 -1
  105. package/dist/lib/components/AccordionBox/AccordionBox.css +1 -15
  106. package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
  107. package/dist/lib/components/AccordionBox/AccordionBox.js +10 -66
  108. package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
  109. package/dist/lib/components/AudioPlayer/AudioPlayer.js +32 -56
  110. package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
  111. package/dist/lib/components/AudioPlayer/AudioProgress.js +12 -43
  112. package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
  113. package/dist/lib/components/AudioPlayer/AudioRange.js +9 -17
  114. package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
  115. package/dist/lib/components/AudioPlayer/AudioVolume.js +4 -23
  116. package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +5 -16
  117. package/dist/lib/components/AudioPlayer/timerFormatUtil.js +2 -13
  118. package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
  119. package/dist/lib/components/BannerBox/BannerBox.js +7 -25
  120. package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
  121. package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +26 -86
  122. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
  123. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +13 -53
  124. package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
  125. package/dist/lib/components/BenefitsIcons/helpers.js +10 -37
  126. package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
  127. package/dist/lib/components/BenefitsIcons/types.js +5 -8
  128. package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  129. package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +24 -71
  130. package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -43
  131. package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
  132. package/dist/lib/components/BenefitsPictures/helpers.js +9 -40
  133. package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
  134. package/dist/lib/components/BenefitsPictures/types.js +5 -1
  135. package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -43
  136. package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
  137. package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +18 -60
  138. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
  139. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +22 -55
  140. package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -122
  141. package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
  142. package/dist/lib/components/ButtonBanner/ButtonBanner.js +40 -89
  143. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
  144. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
  145. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +29 -72
  146. package/dist/lib/components/Card/Card.d.ts +4 -4
  147. package/dist/lib/components/Card/Card.js +67 -164
  148. package/dist/lib/components/Card/types.d.ts +10 -10
  149. package/dist/lib/components/Card/types.js +5 -1
  150. package/dist/lib/components/CardsBox/CardsBox.js +7 -31
  151. package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
  152. package/dist/lib/components/CardsBox/helpers.js +1 -8
  153. package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
  154. package/dist/lib/components/CarouselBox/CarouselBox.js +15 -39
  155. package/dist/lib/components/Container/Container.d.ts +7 -5
  156. package/dist/lib/components/Container/Container.js +18 -40
  157. package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
  158. package/dist/lib/components/DownloadLinks/DownloadLink.js +17 -60
  159. package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
  160. package/dist/lib/components/DownloadLinks/DownloadLinks.js +8 -33
  161. package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +5 -2
  162. package/dist/lib/components/FaqWrapper/FaqWrapper.js +6 -9
  163. package/dist/lib/components/ImageBanner/ImageBanner.d.ts +8 -7
  164. package/dist/lib/components/ImageBanner/ImageBanner.js +61 -138
  165. package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
  166. package/dist/lib/components/Instructions/Instructions.js +103 -186
  167. package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
  168. package/dist/lib/components/NotificationBox/NotificationBox.js +9 -37
  169. package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
  170. package/dist/lib/components/PageTitle/PageTitle.js +15 -52
  171. package/dist/lib/components/Partners/Partners.d.ts +2 -2
  172. package/dist/lib/components/Partners/Partners.js +21 -65
  173. package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
  174. package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +16 -46
  175. package/dist/lib/components/Property/Property.d.ts +4 -4
  176. package/dist/lib/components/Property/Property.js +60 -120
  177. package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
  178. package/dist/lib/components/Property/PropertyDescription.js +15 -46
  179. package/dist/lib/components/Property/types.d.ts +7 -5
  180. package/dist/lib/components/Property/types.js +5 -1
  181. package/dist/lib/components/Steps/Steps.d.ts +2 -1
  182. package/dist/lib/components/Steps/Steps.js +8 -35
  183. package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
  184. package/dist/lib/components/Steps/StepsItem.js +11 -23
  185. package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
  186. package/dist/lib/components/StoreBanner/StoreBanner.js +47 -118
  187. package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
  188. package/dist/lib/components/StoreButton/StoreButton.js +17 -63
  189. package/dist/lib/components/Table/Table.d.ts +1 -1
  190. package/dist/lib/components/Table/Table.js +35 -68
  191. package/dist/lib/components/Table/TableCell.js +4 -16
  192. package/dist/lib/components/Table/TableRow.js +5 -19
  193. package/dist/lib/components/TabsBox/TabBox.js +1 -4
  194. package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
  195. package/dist/lib/components/TabsBox/TabsBox.js +8 -26
  196. package/dist/lib/components/TextBox/TextBox.d.ts +2 -1
  197. package/dist/lib/components/TextBox/TextBox.js +12 -36
  198. package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
  199. package/dist/lib/components/TextBox/TextBoxPicture.js +11 -29
  200. package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
  201. package/dist/lib/components/TextWithIcon/TextWithIcon.js +10 -39
  202. package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
  203. package/dist/lib/components/TextWithIcon/TextWithIconItem.js +10 -37
  204. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  205. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +10 -40
  206. package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
  207. package/dist/lib/components/VideoBanner/VideoBanner.js +83 -176
  208. package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
  209. package/dist/lib/components/VideoBlock/VideoBlock.js +58 -114
  210. package/dist/lib/constants/throttleTime.js +2 -3
  211. package/dist/lib/helpers/getColumnConfig.d.ts +5 -1
  212. package/dist/lib/helpers/getColumnConfig.js +2 -5
  213. package/dist/lib/index.js +10 -57
  214. package/package.json +87 -92
  215. package/CHANGELOG.md +0 -4002
  216. package/dist/es/components/AudioPlayer/style/AudioPlayer.css +0 -58
  217. package/dist/es/components/AudioPlayer/style/AudioProgress.css +0 -35
  218. package/dist/es/components/AudioPlayer/style/AudioRange.css +0 -68
  219. package/dist/es/components/AudioPlayer/style/AudioVolume.css +0 -34
  220. package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
  221. package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
  222. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
  223. package/dist/es/components/Card/Card.css +0 -354
  224. package/dist/es/components/Container/Container.css +0 -3245
  225. package/dist/es/components/DownloadLinks/DownloadLink.css +0 -37
  226. package/dist/es/components/DownloadLinks/DownloadLinks.css +0 -36
  227. package/dist/es/components/ImageBanner/ImageBanner.css +0 -252
  228. package/dist/es/components/Instructions/Instructions.css +0 -790
  229. package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
  230. package/dist/es/components/PageTitle/PageTitle.css +0 -80
  231. package/dist/es/components/Partners/Partners.css +0 -53
  232. package/dist/es/components/PictureWithDescription/PictureWithDescription.css +0 -80
  233. package/dist/es/components/Property/Property.css +0 -156
  234. package/dist/es/components/Property/PropertyDescription.css +0 -17
  235. package/dist/es/components/Steps/Steps.css +0 -41
  236. package/dist/es/components/Steps/StepsItem.css +0 -42
  237. package/dist/es/components/StoreBanner/StoreBanner.css +0 -346
  238. package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
  239. package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
  240. package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
  241. package/dist/es/components/StoreButton/StoreButton.css +0 -327
  242. package/dist/es/components/Table/Table.css +0 -157
  243. package/dist/es/components/TextBox/TextBox.css +0 -25
  244. package/dist/es/components/TextBox/TextBoxPicture.css +0 -27
  245. package/dist/es/components/TextWithIcon/TextWithIcon.css +0 -10
  246. package/dist/es/components/TextWithIcon/TextWithIconItem.css +0 -29
  247. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
  248. package/dist/es/components/VideoBanner/VideoBanner.css +0 -225
  249. package/dist/es/components/VideoBlock/VideoBlock.css +0 -106
  250. package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +0 -58
  251. package/dist/lib/components/AudioPlayer/style/AudioProgress.css +0 -35
  252. package/dist/lib/components/AudioPlayer/style/AudioRange.css +0 -68
  253. package/dist/lib/components/AudioPlayer/style/AudioVolume.css +0 -34
  254. package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
  255. package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
  256. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
  257. package/dist/lib/components/Card/Card.css +0 -354
  258. package/dist/lib/components/Container/Container.css +0 -3245
  259. package/dist/lib/components/DownloadLinks/DownloadLink.css +0 -37
  260. package/dist/lib/components/DownloadLinks/DownloadLinks.css +0 -36
  261. package/dist/lib/components/ImageBanner/ImageBanner.css +0 -252
  262. package/dist/lib/components/Instructions/Instructions.css +0 -790
  263. package/dist/lib/components/NotificationBox/style/NotificationBox.css +0 -28
  264. package/dist/lib/components/PageTitle/PageTitle.css +0 -80
  265. package/dist/lib/components/Partners/Partners.css +0 -53
  266. package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +0 -80
  267. package/dist/lib/components/Property/Property.css +0 -156
  268. package/dist/lib/components/Property/PropertyDescription.css +0 -17
  269. package/dist/lib/components/Steps/Steps.css +0 -41
  270. package/dist/lib/components/Steps/StepsItem.css +0 -42
  271. package/dist/lib/components/StoreBanner/StoreBanner.css +0 -346
  272. package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
  273. package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
  274. package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
  275. package/dist/lib/components/StoreButton/StoreButton.css +0 -327
  276. package/dist/lib/components/Table/Table.css +0 -157
  277. package/dist/lib/components/TextBox/TextBox.css +0 -25
  278. package/dist/lib/components/TextBox/TextBoxPicture.css +0 -27
  279. package/dist/lib/components/TextWithIcon/TextWithIcon.css +0 -10
  280. package/dist/lib/components/TextWithIcon/TextWithIconItem.css +0 -29
  281. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
  282. package/dist/lib/components/VideoBanner/VideoBanner.css +0 -225
  283. package/dist/lib/components/VideoBlock/VideoBlock.css +0 -106
@@ -1,10 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import "core-js/modules/es.string.link.js";
3
2
  import "core-js/modules/es.array.map.js";
4
- import React from 'react';
3
+ import "core-js/modules/es.string.link.js";
4
+ import * as React from 'react';
5
5
  import { Button, Header } from '@megafon/ui-core';
6
6
  import { cnCreate, convert, filterDataAttrs } from '@megafon/ui-helpers';
7
- import PropTypes from 'prop-types';
8
7
  import "./Card.css";
9
8
  var textsConvertConfig = {
10
9
  b: {
@@ -33,43 +32,40 @@ var textsConvertConfig = {
33
32
  }
34
33
  };
35
34
  var cn = cnCreate('mfui-card');
36
-
37
35
  var Card = function Card(_ref5) {
38
36
  var dataAttrs = _ref5.dataAttrs,
39
- className = _ref5.className,
40
- classes = _ref5.classes,
41
- rootRef = _ref5.rootRef,
42
- _ref5$isFullHeight = _ref5.isFullHeight,
43
- isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
44
- link = _ref5.link,
45
- _ref5$view = _ref5.view,
46
- view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
47
- image = _ref5.image,
48
- icon = _ref5.icon,
49
- title = _ref5.title,
50
- markerList = _ref5.markerList,
51
- textsList = _ref5.textsList,
52
- featuresList = _ref5.featuresList,
53
- iconsList = _ref5.iconsList,
54
- price = _ref5.price,
55
- button = _ref5.button,
56
- extraButton = _ref5.extraButton,
57
- badge = _ref5.badge,
58
- onClick = _ref5.onClick;
37
+ className = _ref5.className,
38
+ classes = _ref5.classes,
39
+ rootRef = _ref5.rootRef,
40
+ _ref5$isFullHeight = _ref5.isFullHeight,
41
+ isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
42
+ link = _ref5.link,
43
+ _ref5$view = _ref5.view,
44
+ view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
45
+ image = _ref5.image,
46
+ icon = _ref5.icon,
47
+ title = _ref5.title,
48
+ markerList = _ref5.markerList,
49
+ textsList = _ref5.textsList,
50
+ featuresList = _ref5.featuresList,
51
+ iconsList = _ref5.iconsList,
52
+ price = _ref5.price,
53
+ button = _ref5.button,
54
+ extraButton = _ref5.extraButton,
55
+ badge = _ref5.badge,
56
+ onClick = _ref5.onClick;
59
57
  var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
60
58
  var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
61
59
  var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
62
60
  var ElementType = isLink ? 'a' : 'div';
63
-
64
61
  var renderImage = function renderImage() {
65
62
  if (!image) {
66
63
  return null;
67
64
  }
68
-
69
65
  var _image$position = image.position,
70
- position = _image$position === void 0 ? 'top' : _image$position,
71
- src = image.src,
72
- alt = image.alt;
66
+ position = _image$position === void 0 ? 'top' : _image$position,
67
+ src = image.src,
68
+ alt = image.alt;
73
69
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
74
70
  className: cn('img-box', {
75
71
  position: position
@@ -80,17 +76,14 @@ var Card = function Card(_ref5) {
80
76
  alt: alt
81
77
  }));
82
78
  };
83
-
84
79
  var renderIcon = function renderIcon() {
85
80
  if (!icon) {
86
81
  return null;
87
82
  }
88
-
89
83
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
90
84
  className: cn('icon')
91
85
  }), icon);
92
86
  };
93
-
94
87
  var renderContent = function renderContent() {
95
88
  if (markerList) {
96
89
  return /*#__PURE__*/React.createElement("ul", {
@@ -104,7 +97,6 @@ var Card = function Card(_ref5) {
104
97
  }, convert(item.note, {})));
105
98
  }));
106
99
  }
107
-
108
100
  if (textsList) {
109
101
  return /*#__PURE__*/React.createElement("div", {
110
102
  className: cn('texts')
@@ -119,7 +111,6 @@ var Card = function Card(_ref5) {
119
111
  }, convert(item.desc, textsConvertConfig)));
120
112
  }));
121
113
  }
122
-
123
114
  if (featuresList) {
124
115
  return /*#__PURE__*/React.createElement("div", {
125
116
  className: cn('features')
@@ -140,7 +131,6 @@ var Card = function Card(_ref5) {
140
131
  }, item.value)));
141
132
  })), featuresList.desc);
142
133
  }
143
-
144
134
  if (iconsList) {
145
135
  return /*#__PURE__*/React.createElement("div", {
146
136
  className: cn('icons')
@@ -159,15 +149,12 @@ var Card = function Card(_ref5) {
159
149
  }, item.text));
160
150
  })));
161
151
  }
162
-
163
152
  return null;
164
153
  };
165
-
166
154
  var renderPrice = function renderPrice() {
167
155
  if (!price) {
168
156
  return null;
169
157
  }
170
-
171
158
  return /*#__PURE__*/React.createElement("div", {
172
159
  className: cn('price')
173
160
  }, !!price.oldValue && /*#__PURE__*/React.createElement("div", {
@@ -178,12 +165,10 @@ var Card = function Card(_ref5) {
178
165
  className: cn('price-period')
179
166
  }, price.period));
180
167
  };
181
-
182
168
  var renderButtons = function renderButtons() {
183
169
  if (!button && !extraButton) {
184
170
  return null;
185
171
  }
186
-
187
172
  return /*#__PURE__*/React.createElement("div", {
188
173
  className: cn('buttons', {
189
174
  centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
@@ -207,17 +192,14 @@ var Card = function Card(_ref5) {
207
192
  onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
208
193
  }, extraButton.title));
209
194
  };
210
-
211
195
  var renderFooter = function renderFooter() {
212
196
  if (!price && !button && !extraButton && !image) {
213
197
  return null;
214
198
  }
215
-
216
199
  return /*#__PURE__*/React.createElement("div", {
217
200
  className: cn('footer')
218
201
  }, isBottomImage && renderImage(), renderPrice(), renderButtons());
219
202
  };
220
-
221
203
  return /*#__PURE__*/React.createElement(ElementType, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
222
204
  className: cn({
223
205
  'only-title': isOnlyTitle,
@@ -237,76 +219,4 @@ var Card = function Card(_ref5) {
237
219
  align: title.align
238
220
  }, title.text), badge), renderContent(), renderFooter());
239
221
  };
240
-
241
- Card.propTypes = {
242
- dataAttrs: PropTypes.shape({
243
- root: PropTypes.objectOf(PropTypes.string.isRequired),
244
- icon: PropTypes.objectOf(PropTypes.string.isRequired),
245
- imgBox: PropTypes.objectOf(PropTypes.string.isRequired),
246
- button: PropTypes.objectOf(PropTypes.string.isRequired),
247
- extraButton: PropTypes.objectOf(PropTypes.string.isRequired)
248
- }),
249
- className: PropTypes.string,
250
- classes: PropTypes.shape({
251
- root: PropTypes.string,
252
- button: PropTypes.string,
253
- extraButton: PropTypes.string
254
- }),
255
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
256
- current: PropTypes.elementType
257
- }), PropTypes.any])]),
258
- view: PropTypes.oneOf(['shadow', 'background']),
259
- link: PropTypes.shape({
260
- href: PropTypes.string,
261
- target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
262
- }),
263
- image: PropTypes.shape({
264
- src: PropTypes.string.isRequired,
265
- alt: PropTypes.string,
266
- position: PropTypes.oneOf(['top', 'bottom'])
267
- }),
268
- icon: PropTypes.node,
269
- title: PropTypes.shape({
270
- text: PropTypes.string.isRequired,
271
- align: PropTypes.oneOf(['left', 'center'])
272
- }).isRequired,
273
- textsList: PropTypes.arrayOf(PropTypes.shape({
274
- title: PropTypes.string,
275
- desc: PropTypes.string.isRequired
276
- }).isRequired),
277
- featuresList: PropTypes.shape({
278
- desc: PropTypes.string,
279
- items: PropTypes.arrayOf(PropTypes.shape({
280
- title: PropTypes.string.isRequired,
281
- value: PropTypes.string.isRequired
282
- }).isRequired).isRequired
283
- }),
284
- iconsList: PropTypes.shape({
285
- desc: PropTypes.string,
286
- items: PropTypes.arrayOf(PropTypes.shape({
287
- icon: PropTypes.node.isRequired,
288
- text: PropTypes.string.isRequired
289
- }).isRequired).isRequired
290
- }),
291
- price: PropTypes.shape({
292
- oldValue: PropTypes.string,
293
- value: PropTypes.string.isRequired,
294
- period: PropTypes.string
295
- }),
296
- button: PropTypes.shape({
297
- title: PropTypes.string.isRequired,
298
- href: PropTypes.string,
299
- target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
300
- isCentered: PropTypes.bool,
301
- onClick: PropTypes.func
302
- }),
303
- extraButton: PropTypes.shape({
304
- title: PropTypes.string.isRequired,
305
- href: PropTypes.string,
306
- target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
307
- isCentered: PropTypes.bool,
308
- onClick: PropTypes.func
309
- }),
310
- onClick: PropTypes.func
311
- };
312
222
  export default Card;
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
- declare type Target = '_self' | '_blank' | '_parent' | '_top';
3
- export declare type Link = {
2
+ type Target = '_self' | '_blank' | '_parent' | '_top';
3
+ export type Link = {
4
4
  /** Ссылка */
5
5
  href?: string;
6
6
  /** Target свойство ссылки */
7
7
  target?: Target;
8
8
  };
9
- export declare type Image = {
9
+ export type Image = {
10
10
  /** Ссылка на изображение */
11
11
  src: string;
12
12
  /** Значение тега alt для изображения */
@@ -14,25 +14,25 @@ export declare type Image = {
14
14
  /** Позиция изображения */
15
15
  position?: 'top' | 'bottom';
16
16
  };
17
- export declare type Title = {
17
+ export type Title = {
18
18
  /** Текст */
19
19
  text: string;
20
20
  /** Выравнивание */
21
21
  align?: 'left' | 'center';
22
22
  };
23
- export declare type MarkerList = {
23
+ export type MarkerList = {
24
24
  /** Заголовок */
25
25
  title: string;
26
26
  /** Примечание */
27
27
  note?: string;
28
28
  }[];
29
- export declare type TextsList = {
29
+ export type TextsList = {
30
30
  /** Заголовок */
31
31
  title?: string;
32
32
  /** Описание */
33
33
  desc: string;
34
34
  }[];
35
- export declare type FeaturesList = {
35
+ export type FeaturesList = {
36
36
  /** Список */
37
37
  items: {
38
38
  /** Заголовок */
@@ -43,7 +43,7 @@ export declare type FeaturesList = {
43
43
  /** Описание */
44
44
  desc?: string;
45
45
  };
46
- export declare type IconsList = {
46
+ export type IconsList = {
47
47
  /** Список */
48
48
  items: {
49
49
  /** Иконка */
@@ -54,7 +54,7 @@ export declare type IconsList = {
54
54
  /** Описание */
55
55
  desc?: string;
56
56
  };
57
- export declare type Price = {
57
+ export type Price = {
58
58
  /** Старая цена */
59
59
  oldValue?: string;
60
60
  /** Текущая цена */
@@ -62,7 +62,7 @@ export declare type Price = {
62
62
  /** Период */
63
63
  period?: string;
64
64
  };
65
- export declare type ButtonType = {
65
+ export type ButtonType = {
66
66
  /** Название */
67
67
  title: string;
68
68
  /** Ссылка */
@@ -0,0 +1 @@
1
+ export {};
@@ -3,15 +3,13 @@ import "core-js/modules/es.array.map.js";
3
3
  import * as React from 'react';
4
4
  import { Grid, GridColumn } from '@megafon/ui-core';
5
5
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
6
- import * as PropTypes from 'prop-types';
7
6
  import getColumnConfig from "./helpers";
8
7
  var cn = cnCreate('mfui-cards-box');
9
-
10
8
  var CardsBox = function CardsBox(_ref) {
11
9
  var _ref$renderTwoColumns = _ref.renderTwoColumnsInRow,
12
- renderTwoColumnsInRow = _ref$renderTwoColumns === void 0 ? false : _ref$renderTwoColumns,
13
- dataAttrs = _ref.dataAttrs,
14
- children = _ref.children;
10
+ renderTwoColumnsInRow = _ref$renderTwoColumns === void 0 ? false : _ref$renderTwoColumns,
11
+ dataAttrs = _ref.dataAttrs,
12
+ children = _ref.children;
15
13
  return /*#__PURE__*/React.createElement("div", _extends({
16
14
  className: cn()
17
15
  }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(Grid, {
@@ -25,13 +23,4 @@ var CardsBox = function CardsBox(_ref) {
25
23
  }, getColumnConfig(React.Children.count(children), i, renderTwoColumnsInRow)), child);
26
24
  })));
27
25
  };
28
-
29
- CardsBox.propTypes = {
30
- renderTwoColumnsInRow: PropTypes.bool,
31
- children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]).isRequired,
32
- dataAttrs: PropTypes.shape({
33
- root: PropTypes.objectOf(PropTypes.string.isRequired),
34
- column: PropTypes.objectOf(PropTypes.string.isRequired)
35
- })
36
- };
37
26
  export default CardsBox;
@@ -1,5 +1,5 @@
1
- declare type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
2
- declare type GridConfig = {
1
+ type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
2
+ type GridConfig = {
3
3
  all?: TGridSizeValues;
4
4
  tablet?: TGridSizeValues;
5
5
  mobile?: TGridSizeValues;
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
-
3
2
  var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInRow) {
4
3
  var offset = renderTwoColumnsInRow ? '2' : undefined;
5
4
  var offsetForEvenColumn = index % 2 ? undefined : offset;
@@ -8,7 +7,6 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
8
7
  tablet: '6',
9
8
  mobile: '12'
10
9
  };
11
-
12
10
  switch (count) {
13
11
  case 2:
14
12
  case 4:
@@ -16,10 +14,8 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
16
14
  leftOffsetWide: offsetForEvenColumn,
17
15
  leftOffsetDesktop: offsetForEvenColumn
18
16
  });
19
-
20
17
  default:
21
18
  return _extends({}, columnSize);
22
19
  }
23
20
  };
24
-
25
21
  export default getColumnConfig;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Carousel } from '@megafon/ui-core';
3
- declare type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
4
- declare type DesktopSlidesPerView = 3 | 4;
3
+ type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
4
+ type DesktopSlidesPerView = 3 | 4;
5
5
  interface ICarouselBox extends CarouselPropsTypes {
6
6
  /** Количество видимых слайдов на разрешении 1280 и выше */
7
7
  desktopSlidesPerView?: DesktopSlidesPerView;
@@ -1,52 +1,40 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import "core-js/modules/es.array.index-of.js";
4
3
  import "core-js/modules/es.symbol.js";
5
-
4
+ import "core-js/modules/es.array.index-of.js";
6
5
  var __rest = this && this.__rest || function (s, e) {
7
6
  var t = {};
8
-
9
- for (var p in s) {
10
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
11
- }
12
-
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
13
8
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
14
9
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
15
10
  }
16
11
  return t;
17
12
  };
18
-
19
13
  import * as React from 'react';
20
14
  import { Carousel } from '@megafon/ui-core';
21
15
  import { cnCreate, breakpoints } from '@megafon/ui-helpers';
22
-
23
16
  var getDefaultSlideSettings = function getDefaultSlideSettings(desktopSlidesPerView) {
24
- var _ref;
25
-
26
- return _ref = {}, _defineProperty(_ref, breakpoints.MOBILE_SMALL_START, {
17
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, breakpoints.MOBILE_SMALL_START, {
27
18
  slidesPerView: 1,
28
19
  spaceBetween: 16
29
- }), _defineProperty(_ref, breakpoints.MOBILE_BIG_START, {
20
+ }), breakpoints.MOBILE_BIG_START, {
30
21
  slidesPerView: 2,
31
22
  spaceBetween: 20
32
- }), _defineProperty(_ref, breakpoints.DESKTOP_SMALL_START, {
23
+ }), breakpoints.DESKTOP_SMALL_START, {
33
24
  slidesPerView: 3,
34
25
  spaceBetween: 20
35
- }), _defineProperty(_ref, breakpoints.DESKTOP_MIDDLE_START, {
26
+ }), breakpoints.DESKTOP_MIDDLE_START, {
36
27
  slidesPerView: desktopSlidesPerView,
37
28
  spaceBetween: 20
38
- }), _ref;
29
+ });
39
30
  };
40
-
41
31
  var cn = cnCreate('mfui-carousel-box');
42
-
43
32
  var CarouselBox = function CarouselBox(_a) {
44
33
  var children = _a.children,
45
- slidesSettings = _a.slidesSettings,
46
- _a$desktopSlidesPerVi = _a.desktopSlidesPerView,
47
- desktopSlidesPerView = _a$desktopSlidesPerVi === void 0 ? 4 : _a$desktopSlidesPerVi,
48
- props = __rest(_a, ["children", "slidesSettings", "desktopSlidesPerView"]);
49
-
34
+ slidesSettings = _a.slidesSettings,
35
+ _a$desktopSlidesPerVi = _a.desktopSlidesPerView,
36
+ desktopSlidesPerView = _a$desktopSlidesPerVi === void 0 ? 4 : _a$desktopSlidesPerVi,
37
+ props = __rest(_a, ["children", "slidesSettings", "desktopSlidesPerView"]);
50
38
  var settings = slidesSettings || getDefaultSlideSettings(desktopSlidesPerView);
51
39
  return /*#__PURE__*/React.createElement("div", {
52
40
  className: cn()
@@ -54,5 +42,4 @@ var CarouselBox = function CarouselBox(_a) {
54
42
  slidesSettings: settings
55
43
  }), children));
56
44
  };
57
-
58
45
  export default CarouselBox;
@@ -1,5 +1,5 @@
1
- import React, { Ref } from 'react';
2
- import './Container.less';
1
+ import * as React from 'react';
2
+ import './Container.scss';
3
3
  export declare const BackgroundColors: {
4
4
  readonly DEFAULT: "default";
5
5
  readonly LIGHT_GRAY: "light-gray";
@@ -7,12 +7,12 @@ export declare const BackgroundColors: {
7
7
  readonly GREEN: "green";
8
8
  readonly PURPLE: "purple";
9
9
  };
10
- declare type BackgroundColorType = typeof BackgroundColors[keyof typeof BackgroundColors];
11
- declare type Props = {
10
+ type BackgroundColorType = (typeof BackgroundColors)[keyof typeof BackgroundColors];
11
+ type Props = {
12
12
  /** Атрибут корневого тега */
13
13
  id?: string;
14
14
  /** Ссылка на корневой элемент */
15
- rootRef?: Ref<HTMLDivElement>;
15
+ rootRef?: React.Ref<HTMLDivElement>;
16
16
  /** Дополнительный класс корневого элемента */
17
17
  className?: string;
18
18
  /** Цвет фона */
@@ -23,6 +23,8 @@ declare type Props = {
23
23
  disablePaddingBottom?: boolean;
24
24
  /** Включить тень в нижней части компонента */
25
25
  bottomShadow?: boolean;
26
+ /** Дочерние элементы */
27
+ children?: React.ReactNode;
26
28
  };
27
29
  declare const Container: React.FC<Props>;
28
30
  export default Container;
@@ -1,8 +1,6 @@
1
- import "core-js/modules/es.object.values.js";
2
- import React from 'react';
1
+ import * as React from 'react';
3
2
  import { ContentArea } from '@megafon/ui-core';
4
3
  import { cnCreate } from '@megafon/ui-helpers';
5
- import PropTypes from 'prop-types';
6
4
  import "./Container.css";
7
5
  export var BackgroundColors = {
8
6
  DEFAULT: 'default',
@@ -12,18 +10,17 @@ export var BackgroundColors = {
12
10
  PURPLE: 'purple'
13
11
  };
14
12
  var cn = cnCreate('mfui-container');
15
-
16
13
  var Container = function Container(_ref) {
17
14
  var _ref$backgroundColor = _ref.backgroundColor,
18
- backgroundColor = _ref$backgroundColor === void 0 ? 'default' : _ref$backgroundColor,
19
- rootRef = _ref.rootRef,
20
- id = _ref.id,
21
- className = _ref.className,
22
- children = _ref.children,
23
- disablePaddingTop = _ref.disablePaddingTop,
24
- disablePaddingBottom = _ref.disablePaddingBottom,
25
- _ref$bottomShadow = _ref.bottomShadow,
26
- bottomShadow = _ref$bottomShadow === void 0 ? false : _ref$bottomShadow;
15
+ backgroundColor = _ref$backgroundColor === void 0 ? 'default' : _ref$backgroundColor,
16
+ rootRef = _ref.rootRef,
17
+ id = _ref.id,
18
+ className = _ref.className,
19
+ children = _ref.children,
20
+ disablePaddingTop = _ref.disablePaddingTop,
21
+ disablePaddingBottom = _ref.disablePaddingBottom,
22
+ _ref$bottomShadow = _ref.bottomShadow,
23
+ bottomShadow = _ref$bottomShadow === void 0 ? false : _ref$bottomShadow;
27
24
  return /*#__PURE__*/React.createElement("div", {
28
25
  className: cn({
29
26
  'bg-color': backgroundColor,
@@ -37,16 +34,4 @@ var Container = function Container(_ref) {
37
34
  className: cn('inner')
38
35
  }, /*#__PURE__*/React.createElement(ContentArea, null, children)));
39
36
  };
40
-
41
- Container.propTypes = {
42
- id: PropTypes.string,
43
- className: PropTypes.string,
44
- backgroundColor: PropTypes.oneOf(Object.values(BackgroundColors)),
45
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
46
- current: PropTypes.elementType
47
- }), PropTypes.any])]),
48
- disablePaddingTop: PropTypes.bool,
49
- disablePaddingBottom: PropTypes.bool,
50
- bottomShadow: PropTypes.bool
51
- };
52
37
  export default Container;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import './DownloadLink.less';
2
+ import './DownloadLink.scss';
3
3
  export interface IDownloadLink {
4
4
  /** Дополнительные data атрибуты к внутренним элементам */
5
5
  dataAttrs?: {
@@ -1,12 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import "core-js/modules/es.string.link.js";
3
2
  import "core-js/modules/es.array.concat.js";
3
+ import "core-js/modules/es.string.link.js";
4
4
  import * as React from 'react';
5
5
  import { TextLink } from '@megafon/ui-core';
6
6
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
7
- import * as PropTypes from 'prop-types';
8
7
  import "./DownloadLink.css";
9
-
10
8
  var DownloadIcon = function DownloadIcon(props) {
11
9
  return /*#__PURE__*/React.createElement("svg", _extends({
12
10
  viewBox: "0 0 40 40"
@@ -14,36 +12,30 @@ var DownloadIcon = function DownloadIcon(props) {
14
12
  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
13
  }));
16
14
  };
17
-
18
15
  var cn = cnCreate('mfui-download-link');
19
-
20
16
  var DownloadLink = function DownloadLink(_ref) {
21
17
  var href = _ref.href,
22
- text = _ref.text,
23
- extension = _ref.extension,
24
- fileSize = _ref.fileSize,
25
- onClick = _ref.onClick,
26
- className = _ref.className,
27
- _ref$classes = _ref.classes,
28
- classes = _ref$classes === void 0 ? {} : _ref$classes,
29
- rootRef = _ref.rootRef,
30
- dataAttrs = _ref.dataAttrs,
31
- disableDownload = _ref.disableDownload,
32
- target = _ref.target,
33
- rel = _ref.rel;
34
-
18
+ text = _ref.text,
19
+ extension = _ref.extension,
20
+ fileSize = _ref.fileSize,
21
+ onClick = _ref.onClick,
22
+ className = _ref.className,
23
+ _ref$classes = _ref.classes,
24
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
25
+ rootRef = _ref.rootRef,
26
+ dataAttrs = _ref.dataAttrs,
27
+ disableDownload = _ref.disableDownload,
28
+ target = _ref.target,
29
+ rel = _ref.rel;
35
30
  var setRelAttribute = function setRelAttribute() {
36
31
  if (rel) {
37
32
  return rel;
38
33
  }
39
-
40
34
  if (target && target !== '_self') {
41
35
  return 'noreferrer noopener';
42
36
  }
43
-
44
37
  return undefined;
45
38
  };
46
-
47
39
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
48
40
  className: cn([className, classes.root]),
49
41
  ref: rootRef
@@ -66,27 +58,4 @@ var DownloadLink = function DownloadLink(_ref) {
66
58
  className: cn('info')
67
59
  }, "".concat(extension).concat(extension && fileSize ? ', ' : '').concat(fileSize))));
68
60
  };
69
-
70
- DownloadLink.propTypes = {
71
- dataAttrs: PropTypes.shape({
72
- root: PropTypes.objectOf(PropTypes.string.isRequired),
73
- link: PropTypes.objectOf(PropTypes.string.isRequired)
74
- }),
75
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
76
- current: PropTypes.elementType
77
- }), PropTypes.any])]),
78
- href: PropTypes.string.isRequired,
79
- text: PropTypes.string.isRequired,
80
- extension: PropTypes.string.isRequired,
81
- fileSize: PropTypes.string.isRequired,
82
- className: PropTypes.string,
83
- classes: PropTypes.shape({
84
- root: PropTypes.string,
85
- link: PropTypes.string
86
- }),
87
- onClick: PropTypes.func,
88
- disableDownload: PropTypes.bool,
89
- target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
90
- rel: PropTypes.string
91
- };
92
61
  export default DownloadLink;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { GridColumn } from '@megafon/ui-core';
3
- import './DownloadLinks.less';
3
+ import './DownloadLinks.scss';
4
4
  import { IDownloadLink } from './DownloadLink';
5
- declare type GridColumnType = React.ComponentProps<typeof GridColumn>;
6
- declare type ColumnConfig = {
5
+ type GridColumnType = React.ComponentProps<typeof GridColumn>;
6
+ type ColumnConfig = {
7
7
  wide?: GridColumnType['wide'];
8
8
  desktop?: GridColumnType['desktop'];
9
9
  tablet?: GridColumnType['tablet'];