@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,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ITextWithIconItem } from './TextWithIconItem';
3
- import './TextWithIcon.less';
3
+ import './TextWithIcon.scss';
4
4
  export interface ITextWithIconProps {
5
5
  /** Заголовок */
6
6
  title?: string;
@@ -2,27 +2,23 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import * as React from 'react';
3
3
  import { Header, Grid, GridColumn } from '@megafon/ui-core';
4
4
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
5
- import * as PropTypes from 'prop-types';
6
5
  import "./TextWithIcon.css";
7
6
  var testIdPrefix = 'TextWithIcon';
8
7
  var cn = cnCreate('mfui-text-with-icon');
9
-
10
8
  var TextWithIcon = function TextWithIcon(_ref) {
11
9
  var title = _ref.title,
12
- rootRef = _ref.rootRef,
13
- dataAttrs = _ref.dataAttrs,
14
- className = _ref.className,
15
- _ref$isFullWidth = _ref.isFullWidth,
16
- isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
17
- children = _ref.children;
18
-
10
+ rootRef = _ref.rootRef,
11
+ dataAttrs = _ref.dataAttrs,
12
+ className = _ref.className,
13
+ _ref$isFullWidth = _ref.isFullWidth,
14
+ isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
15
+ children = _ref.children;
19
16
  var renderContent = function renderContent() {
20
17
  return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(Header, {
21
18
  className: cn('header'),
22
19
  as: "h5"
23
20
  }, title), children);
24
21
  };
25
-
26
22
  var renderContentWithGrid = function renderContentWithGrid() {
27
23
  return /*#__PURE__*/React.createElement(Grid, {
28
24
  dataAttrs: {
@@ -37,23 +33,9 @@ var TextWithIcon = function TextWithIcon(_ref) {
37
33
  wide: '6'
38
34
  }, renderContent()));
39
35
  };
40
-
41
36
  return /*#__PURE__*/React.createElement("div", _extends({
42
37
  className: cn([className]),
43
38
  ref: rootRef
44
39
  }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), isFullWidth ? renderContent() : renderContentWithGrid());
45
40
  };
46
-
47
- TextWithIcon.propTypes = {
48
- title: PropTypes.string,
49
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
50
- current: PropTypes.elementType
51
- }), PropTypes.any])]),
52
- dataAttrs: PropTypes.shape({
53
- root: PropTypes.objectOf(PropTypes.string.isRequired)
54
- }),
55
- children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element.isRequired]).isRequired,
56
- isFullWidth: PropTypes.bool,
57
- className: PropTypes.string
58
- };
59
41
  export default TextWithIcon;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import './TextWithIconItem.less';
2
+ import './TextWithIconItem.scss';
3
3
  export interface ITextWithIconItem {
4
4
  /** Дополнительные классы для внутренних элементов */
5
5
  classes?: {
@@ -3,26 +3,23 @@ import "core-js/modules/es.array.is-array.js";
3
3
  import "core-js/modules/es.array.map.js";
4
4
  import * as React from 'react';
5
5
  import { cnCreate, convert, filterDataAttrs, textConvertConfig } from '@megafon/ui-helpers';
6
- import * as PropTypes from 'prop-types';
7
6
  import "./TextWithIconItem.css";
8
7
  var testIdPrefix = 'TextWithIconItem';
9
8
  var cn = cnCreate('mfui-text-with-icon-item');
10
-
11
9
  var TextWithIconItem = function TextWithIconItem(_ref) {
12
10
  var className = _ref.className,
13
- _ref$classes = _ref.classes,
14
- classes = _ref$classes === void 0 ? {} : _ref$classes,
15
- text = _ref.text,
16
- icon = _ref.icon,
17
- rootRef = _ref.rootRef,
18
- dataAttrs = _ref.dataAttrs;
11
+ _ref$classes = _ref.classes,
12
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
13
+ text = _ref.text,
14
+ icon = _ref.icon,
15
+ rootRef = _ref.rootRef,
16
+ dataAttrs = _ref.dataAttrs;
19
17
  var renderText = React.useMemo(function () {
20
18
  if (Array.isArray(text)) {
21
19
  return text.map(function (item) {
22
20
  return convert(item, textConvertConfig);
23
21
  });
24
22
  }
25
-
26
23
  return convert(text, textConvertConfig);
27
24
  }, [text]);
28
25
  return /*#__PURE__*/React.createElement("div", _extends({
@@ -36,16 +33,4 @@ var TextWithIconItem = function TextWithIconItem(_ref) {
36
33
  "data-testid": "".concat(testIdPrefix, "-text")
37
34
  }, renderText));
38
35
  };
39
-
40
- TextWithIconItem.propTypes = {
41
- text: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.arrayOf(PropTypes.string.isRequired)]).isRequired,
42
- icon: PropTypes.node.isRequired,
43
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
44
- current: PropTypes.elementType
45
- }), PropTypes.any])]),
46
- dataAttrs: PropTypes.shape({
47
- root: PropTypes.objectOf(PropTypes.string.isRequired)
48
- }),
49
- className: PropTypes.string
50
- };
51
36
  export default TextWithIconItem;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import './TitleDescriptionBox.less';
2
+ import './TitleDescriptionBox.scss';
3
3
  export interface ITitleDescriptionBoxProps {
4
4
  /** Дополнительные data атрибуты к внутренним элементам */
5
5
  dataAttrs?: {
@@ -4,19 +4,17 @@ import "core-js/modules/es.symbol.description.js";
4
4
  import * as React from 'react';
5
5
  import { Header, Paragraph, Grid, GridColumn } from '@megafon/ui-core';
6
6
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
7
- import * as PropTypes from 'prop-types';
8
7
  import "./TitleDescriptionBox.css";
9
8
  var testIdPrefix = 'TitleDescriptionBox';
10
9
  var cn = cnCreate('mfui-title-description-box');
11
-
12
10
  var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
13
11
  var dataAttrs = _ref.dataAttrs,
14
- title = _ref.title,
15
- description = _ref.description,
16
- textColor = _ref.textColor,
17
- align = _ref.align,
18
- rootRef = _ref.rootRef,
19
- className = _ref.className;
12
+ title = _ref.title,
13
+ description = _ref.description,
14
+ textColor = _ref.textColor,
15
+ align = _ref.align,
16
+ rootRef = _ref.rootRef,
17
+ className = _ref.className;
20
18
  var renderDescription = React.useCallback(function () {
21
19
  if (typeof description === 'string') {
22
20
  return /*#__PURE__*/React.createElement(Paragraph, {
@@ -30,7 +28,6 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
30
28
  }
31
29
  }, description);
32
30
  }
33
-
34
31
  return /*#__PURE__*/React.createElement("div", {
35
32
  className: cn('description'),
36
33
  "data-testid": "".concat(testIdPrefix, "-description-node")
@@ -60,18 +57,4 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
60
57
  color: "inherit"
61
58
  }, title), description && renderDescription())));
62
59
  };
63
-
64
- TitleDescriptionBox.propTypes = {
65
- dataAttrs: PropTypes.shape({
66
- root: PropTypes.objectOf(PropTypes.string.isRequired)
67
- }),
68
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
69
- current: PropTypes.elementType
70
- }), PropTypes.any])]),
71
- className: PropTypes.string,
72
- title: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
73
- description: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
74
- align: PropTypes.oneOf(['center']),
75
- textColor: PropTypes.oneOf(['white'])
76
- };
77
60
  export default TitleDescriptionBox;
@@ -1,7 +1,7 @@
1
- import React, { Ref } from 'react';
1
+ import * as React from 'react';
2
2
  import { Props as BreadcrumbsPropsType } from '../Breadcrumbs/Breadcrumbs';
3
- import './VideoBanner.less';
4
- export declare type BreadCrumbsItemsType = BreadcrumbsPropsType['items'];
3
+ import './VideoBanner.scss';
4
+ export type BreadCrumbsItemsType = BreadcrumbsPropsType['items'];
5
5
  export declare const testIdPrefix = "VideoBanner";
6
6
  export declare enum ClassName {
7
7
  BUTTON = "button",
@@ -11,17 +11,17 @@ export declare const VideoType: {
11
11
  readonly YOUTUBE: "youtube";
12
12
  readonly VIDEO: "video";
13
13
  };
14
- declare type VideoType = typeof VideoType[keyof typeof VideoType];
14
+ type VideoType = (typeof VideoType)[keyof typeof VideoType];
15
15
  export declare const ButtonColor: {
16
16
  readonly GREEN: "green";
17
17
  readonly PURPLE: "purple";
18
18
  };
19
- export declare type ButtonColorType = typeof ButtonColor[keyof typeof ButtonColor];
19
+ export type ButtonColorType = (typeof ButtonColor)[keyof typeof ButtonColor];
20
20
  export declare const TextColor: {
21
21
  readonly BLACK: "black";
22
22
  readonly WHITE: "white";
23
23
  };
24
- declare type TextColorType = typeof TextColor[keyof typeof TextColor];
24
+ type TextColorType = (typeof TextColor)[keyof typeof TextColor];
25
25
  export interface IContent {
26
26
  /** Заголовок */
27
27
  title: string;
@@ -80,7 +80,7 @@ export interface IVideoBannerProps {
80
80
  video?: string;
81
81
  };
82
82
  /** Ссылка на корневой элемент */
83
- rootRef?: Ref<HTMLDivElement>;
83
+ rootRef?: React.Ref<HTMLDivElement>;
84
84
  /** Данные для блока с контентом */
85
85
  content?: IContent;
86
86
  /** Источник видео. */
@@ -2,26 +2,22 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "core-js/modules/es.symbol.js";
4
4
  import "core-js/modules/es.symbol.description.js";
5
- import "core-js/modules/es.string.link.js";
6
5
  import "core-js/modules/es.array.concat.js";
7
- import "core-js/modules/es.object.values.js";
8
- import React from 'react';
6
+ import "core-js/modules/es.string.link.js";
7
+ import * as React from 'react';
9
8
  import { Button, Header, ContentArea, TextLink, Grid, GridColumn } from '@megafon/ui-core';
10
9
  import { breakpoints, cnCreate, filterDataAttrs, convert, titleConvertConfig } from '@megafon/ui-helpers';
11
10
  import throttle from 'lodash.throttle';
12
- import * as PropTypes from 'prop-types';
13
11
  import throttleTime from "../../constants/throttleTime";
14
12
  import Breadcrumbs from "../Breadcrumbs/Breadcrumbs";
15
13
  import "./VideoBanner.css";
16
14
  export var testIdPrefix = 'VideoBanner';
17
15
  var cn = cnCreate('mfui-video-banner');
18
16
  export var ClassName;
19
-
20
17
  (function (ClassName) {
21
18
  ClassName["BUTTON"] = "button";
22
19
  ClassName["LINK"] = "link";
23
20
  })(ClassName || (ClassName = {}));
24
-
25
21
  var typographyConfig = {
26
22
  b: {
27
23
  component: function component(_ref) {
@@ -46,61 +42,58 @@ export var TextColor = {
46
42
  BLACK: 'black',
47
43
  WHITE: 'white'
48
44
  };
49
-
50
45
  var VideoBanner = function VideoBanner(_ref2) {
51
46
  var dataAttrs = _ref2.dataAttrs,
52
- className = _ref2.className,
53
- _ref2$classes = _ref2.classes,
54
- classes = _ref2$classes === void 0 ? {} : _ref2$classes,
55
- rootRef = _ref2.rootRef,
56
- videoSrc = _ref2.videoSrc,
57
- videoType = _ref2.videoType,
58
- imageMobile = _ref2.imageMobile,
59
- imageTablet = _ref2.imageTablet,
60
- _ref2$imageDesktop = _ref2.imageDesktop,
61
- imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
62
- _ref2$imageDesktopWid = _ref2.imageDesktopWide,
63
- imageDesktopWide = _ref2$imageDesktopWid === void 0 ? '' : _ref2$imageDesktopWid,
64
- imageAlt = _ref2.imageAlt,
65
- content = _ref2.content,
66
- _ref2$isMuted = _ref2.isMuted,
67
- isMuted = _ref2$isMuted === void 0 ? true : _ref2$isMuted,
68
- breadcrumbs = _ref2.breadcrumbs,
69
- _ref2$videoMobile = _ref2.videoMobile,
70
- videoMobile = _ref2$videoMobile === void 0 ? false : _ref2$videoMobile,
71
- _ref2$hasBreadcrumbsM = _ref2.hasBreadcrumbsMicrodata,
72
- hasBreadcrumbsMicrodata = _ref2$hasBreadcrumbsM === void 0 ? false : _ref2$hasBreadcrumbsM,
73
- _ref2$bottomShadow = _ref2.bottomShadow,
74
- bottomShadow = _ref2$bottomShadow === void 0 ? false : _ref2$bottomShadow;
75
-
47
+ className = _ref2.className,
48
+ _ref2$classes = _ref2.classes,
49
+ classes = _ref2$classes === void 0 ? {} : _ref2$classes,
50
+ rootRef = _ref2.rootRef,
51
+ videoSrc = _ref2.videoSrc,
52
+ videoType = _ref2.videoType,
53
+ imageMobile = _ref2.imageMobile,
54
+ imageTablet = _ref2.imageTablet,
55
+ _ref2$imageDesktop = _ref2.imageDesktop,
56
+ imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
57
+ _ref2$imageDesktopWid = _ref2.imageDesktopWide,
58
+ imageDesktopWide = _ref2$imageDesktopWid === void 0 ? '' : _ref2$imageDesktopWid,
59
+ imageAlt = _ref2.imageAlt,
60
+ content = _ref2.content,
61
+ _ref2$isMuted = _ref2.isMuted,
62
+ isMuted = _ref2$isMuted === void 0 ? true : _ref2$isMuted,
63
+ breadcrumbs = _ref2.breadcrumbs,
64
+ _ref2$videoMobile = _ref2.videoMobile,
65
+ videoMobile = _ref2$videoMobile === void 0 ? false : _ref2$videoMobile,
66
+ _ref2$hasBreadcrumbsM = _ref2.hasBreadcrumbsMicrodata,
67
+ hasBreadcrumbsMicrodata = _ref2$hasBreadcrumbsM === void 0 ? false : _ref2$hasBreadcrumbsM,
68
+ _ref2$bottomShadow = _ref2.bottomShadow,
69
+ bottomShadow = _ref2$bottomShadow === void 0 ? false : _ref2$bottomShadow;
76
70
  var _React$useState = React.useState(true),
77
- _React$useState2 = _slicedToArray(_React$useState, 2),
78
- isMobile = _React$useState2[0],
79
- setIsMobile = _React$useState2[1];
80
-
71
+ _React$useState2 = _slicedToArray(_React$useState, 2),
72
+ isMobile = _React$useState2[0],
73
+ setIsMobile = _React$useState2[1];
81
74
  var isVideoData = !!videoSrc && !!videoType;
82
75
  var isRenderVideo = (!isMobile || videoMobile) && isVideoData;
83
76
  var renderContent = React.useCallback(function (_ref3) {
84
77
  var title = _ref3.title,
85
- description = _ref3.description,
86
- buttonTitle = _ref3.buttonTitle,
87
- buttonHref = _ref3.buttonHref,
88
- buttonTarget = _ref3.buttonTarget,
89
- buttonDownload = _ref3.buttonDownload,
90
- _ref3$buttonColor = _ref3.buttonColor,
91
- buttonColor = _ref3$buttonColor === void 0 ? ButtonColor.GREEN : _ref3$buttonColor,
92
- buttonRel = _ref3.buttonRel,
93
- onButtonClick = _ref3.onButtonClick,
94
- onLinkClick = _ref3.onLinkClick,
95
- _ref3$textColor = _ref3.textColor,
96
- textColor = _ref3$textColor === void 0 ? TextColor.BLACK : _ref3$textColor,
97
- textColorMobile = _ref3.textColorMobile,
98
- linkTitle = _ref3.linkTitle,
99
- linkUrl = _ref3.linkUrl,
100
- linkTarget = _ref3.linkTarget,
101
- linkDownload = _ref3.linkDownload,
102
- linkRel = _ref3.linkRel,
103
- cost = _ref3.cost;
78
+ description = _ref3.description,
79
+ buttonTitle = _ref3.buttonTitle,
80
+ buttonHref = _ref3.buttonHref,
81
+ buttonTarget = _ref3.buttonTarget,
82
+ buttonDownload = _ref3.buttonDownload,
83
+ _ref3$buttonColor = _ref3.buttonColor,
84
+ buttonColor = _ref3$buttonColor === void 0 ? ButtonColor.GREEN : _ref3$buttonColor,
85
+ buttonRel = _ref3.buttonRel,
86
+ onButtonClick = _ref3.onButtonClick,
87
+ onLinkClick = _ref3.onLinkClick,
88
+ _ref3$textColor = _ref3.textColor,
89
+ textColor = _ref3$textColor === void 0 ? TextColor.BLACK : _ref3$textColor,
90
+ textColorMobile = _ref3.textColorMobile,
91
+ linkTitle = _ref3.linkTitle,
92
+ linkUrl = _ref3.linkUrl,
93
+ linkTarget = _ref3.linkTarget,
94
+ linkDownload = _ref3.linkDownload,
95
+ linkRel = _ref3.linkRel,
96
+ cost = _ref3.cost;
104
97
  return /*#__PURE__*/React.createElement(Grid, {
105
98
  className: cn('grid'),
106
99
  guttersLeft: "medium"
@@ -177,7 +170,6 @@ var VideoBanner = function VideoBanner(_ref2) {
177
170
  "data-testid": "".concat(testIdPrefix, "-iframe-video")
178
171
  });
179
172
  }
180
-
181
173
  case VideoType.VIDEO:
182
174
  {
183
175
  return (
@@ -195,7 +187,6 @@ var VideoBanner = function VideoBanner(_ref2) {
195
187
  }))
196
188
  );
197
189
  }
198
-
199
190
  default:
200
191
  {
201
192
  return null;
@@ -206,7 +197,6 @@ var VideoBanner = function VideoBanner(_ref2) {
206
197
  var resizeHandler = function resizeHandler() {
207
198
  setIsMobile(window.innerWidth < breakpoints.DESKTOP_SMALL_START);
208
199
  };
209
-
210
200
  var resizeHandlerThrottled = throttle(resizeHandler, throttleTime.resize);
211
201
  resizeHandler();
212
202
  window.addEventListener('resize', resizeHandlerThrottled);
@@ -251,57 +241,4 @@ var VideoBanner = function VideoBanner(_ref2) {
251
241
  alt: imageAlt
252
242
  })))));
253
243
  };
254
-
255
- VideoBanner.propTypes = {
256
- dataAttrs: PropTypes.shape({
257
- root: PropTypes.objectOf(PropTypes.string.isRequired),
258
- breadcrumbs: PropTypes.objectOf(PropTypes.string.isRequired),
259
- breadcrumbsLink: PropTypes.objectOf(PropTypes.string.isRequired),
260
- button: PropTypes.objectOf(PropTypes.string.isRequired),
261
- link: PropTypes.objectOf(PropTypes.string.isRequired)
262
- }),
263
- className: PropTypes.string,
264
- classes: PropTypes.shape({
265
- root: PropTypes.string,
266
- button: PropTypes.string,
267
- link: PropTypes.string,
268
- breadcrumbs: PropTypes.string
269
- }),
270
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
271
- current: PropTypes.elementType
272
- }), PropTypes.any])]),
273
- videoSrc: PropTypes.string,
274
- videoType: PropTypes.oneOf(Object.values(VideoType)),
275
- videoMobile: PropTypes.bool,
276
- content: PropTypes.shape({
277
- title: PropTypes.string.isRequired,
278
- description: PropTypes.string.isRequired,
279
- buttonTitle: PropTypes.string,
280
- buttonHref: PropTypes.string,
281
- buttonDownload: PropTypes.bool,
282
- buttonColor: PropTypes.oneOf(Object.values(ButtonColor)),
283
- buttonRel: PropTypes.string,
284
- onButtonClick: PropTypes.func,
285
- onLinkClick: PropTypes.func,
286
- textColor: PropTypes.oneOf(Object.values(TextColor)),
287
- textColorMobile: PropTypes.oneOf(Object.values(TextColor)),
288
- linkTitle: PropTypes.string,
289
- linkUrl: PropTypes.string,
290
- linkDownload: PropTypes.bool,
291
- linkRel: PropTypes.string,
292
- cost: PropTypes.string
293
- }),
294
- isMuted: PropTypes.bool,
295
- imageMobile: PropTypes.string.isRequired,
296
- imageTablet: PropTypes.string.isRequired,
297
- imageDesktop: PropTypes.string,
298
- imageDesktopWide: PropTypes.string,
299
- imageAlt: PropTypes.string,
300
- breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
301
- title: PropTypes.string.isRequired,
302
- href: PropTypes.string
303
- }).isRequired),
304
- hasBreadcrumbsMicrodata: PropTypes.bool,
305
- bottomShadow: PropTypes.bool
306
- };
307
244
  export default VideoBanner;
@@ -1,5 +1,5 @@
1
- import React, { Ref } from 'react';
2
- import './VideoBlock.less';
1
+ import * as React from 'react';
2
+ import './VideoBlock.scss';
3
3
  export interface IContent {
4
4
  /** Заголовок */
5
5
  title: string;
@@ -20,7 +20,7 @@ export declare const VideoTypes: {
20
20
  readonly YOUTUBE: "youtube";
21
21
  readonly VIDEO: "video";
22
22
  };
23
- declare type VideoType = typeof VideoTypes[keyof typeof VideoTypes];
23
+ type VideoType = (typeof VideoTypes)[keyof typeof VideoTypes];
24
24
  export interface IVideoBlockProps {
25
25
  /** Дополнительные data атрибуты к внутренним элементам */
26
26
  dataAttrs?: {
@@ -36,7 +36,7 @@ export interface IVideoBlockProps {
36
36
  description?: string;
37
37
  };
38
38
  /** Ссылка на корневой элемент */
39
- rootRef?: Ref<HTMLDivElement>;
39
+ rootRef?: React.Ref<HTMLDivElement>;
40
40
  /** Данные для блока с контентом */
41
41
  content?: IContent;
42
42
  /** Тип видео */
@@ -1,12 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import "core-js/modules/es.array.concat.js";
3
2
  import "core-js/modules/es.symbol.js";
4
3
  import "core-js/modules/es.symbol.description.js";
5
- import "core-js/modules/es.object.values.js";
6
- import React from 'react';
4
+ import "core-js/modules/es.array.concat.js";
5
+ import * as React from 'react';
7
6
  import { Header, Button, Grid, GridColumn } from '@megafon/ui-core';
8
7
  import { cnCreate, filterDataAttrs, convert, titleConvertConfig, textConvertConfig } from '@megafon/ui-helpers';
9
- import PropTypes from 'prop-types';
10
8
  import "./VideoBlock.css";
11
9
  export var VideoTypes = {
12
10
  YOUTUBE: 'youtube',
@@ -14,28 +12,27 @@ export var VideoTypes = {
14
12
  };
15
13
  export var testIdPrefix = 'VideoBlock';
16
14
  var cn = cnCreate('mfui-video-block');
17
-
18
15
  var VideoBlock = function VideoBlock(_ref) {
19
16
  var dataAttrs = _ref.dataAttrs,
20
- className = _ref.className,
21
- _ref$classes = _ref.classes,
22
- classes = _ref$classes === void 0 ? {} : _ref$classes,
23
- rootRef = _ref.rootRef,
24
- content = _ref.content,
25
- _ref$videoType = _ref.videoType,
26
- videoType = _ref$videoType === void 0 ? 'video' : _ref$videoType,
27
- videoSrc = _ref.videoSrc,
28
- _ref$isMuted = _ref.isMuted,
29
- isMuted = _ref$isMuted === void 0 ? true : _ref$isMuted,
30
- _ref$isAutoplay = _ref.isAutoplay,
31
- isAutoplay = _ref$isAutoplay === void 0 ? false : _ref$isAutoplay,
32
- _ref$contentPositionR = _ref.contentPositionRight,
33
- contentPositionRight = _ref$contentPositionR === void 0 ? false : _ref$contentPositionR,
34
- poster = _ref.poster,
35
- _ref$playsinline = _ref.playsinline,
36
- playsinline = _ref$playsinline === void 0 ? false : _ref$playsinline,
37
- _ref$fixWhiteVideoBac = _ref.fixWhiteVideoBackground,
38
- fixWhiteVideoBackground = _ref$fixWhiteVideoBac === void 0 ? false : _ref$fixWhiteVideoBac;
17
+ className = _ref.className,
18
+ _ref$classes = _ref.classes,
19
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
20
+ rootRef = _ref.rootRef,
21
+ content = _ref.content,
22
+ _ref$videoType = _ref.videoType,
23
+ videoType = _ref$videoType === void 0 ? 'video' : _ref$videoType,
24
+ videoSrc = _ref.videoSrc,
25
+ _ref$isMuted = _ref.isMuted,
26
+ isMuted = _ref$isMuted === void 0 ? true : _ref$isMuted,
27
+ _ref$isAutoplay = _ref.isAutoplay,
28
+ isAutoplay = _ref$isAutoplay === void 0 ? false : _ref$isAutoplay,
29
+ _ref$contentPositionR = _ref.contentPositionRight,
30
+ contentPositionRight = _ref$contentPositionR === void 0 ? false : _ref$contentPositionR,
31
+ poster = _ref.poster,
32
+ _ref$playsinline = _ref.playsinline,
33
+ playsinline = _ref$playsinline === void 0 ? false : _ref$playsinline,
34
+ _ref$fixWhiteVideoBac = _ref.fixWhiteVideoBackground,
35
+ fixWhiteVideoBackground = _ref$fixWhiteVideoBac === void 0 ? false : _ref$fixWhiteVideoBac;
39
36
  var renderVideo = React.useCallback(function () {
40
37
  switch (videoType) {
41
38
  case VideoTypes.YOUTUBE:
@@ -65,7 +62,6 @@ var VideoBlock = function VideoBlock(_ref) {
65
62
  "data-testid": "".concat(testIdPrefix, "-iframe-video")
66
63
  }));
67
64
  }
68
-
69
65
  case VideoTypes.VIDEO:
70
66
  {
71
67
  return (
@@ -88,7 +84,6 @@ var VideoBlock = function VideoBlock(_ref) {
88
84
  }))
89
85
  );
90
86
  }
91
-
92
87
  default:
93
88
  {
94
89
  return null;
@@ -97,12 +92,12 @@ var VideoBlock = function VideoBlock(_ref) {
97
92
  }, [videoType, videoSrc, isAutoplay, isMuted, poster, playsinline, fixWhiteVideoBackground]);
98
93
  var renderContent = React.useCallback(function (_ref2) {
99
94
  var title = _ref2.title,
100
- description = _ref2.description,
101
- href = _ref2.href,
102
- buttonDownload = _ref2.buttonDownload,
103
- buttonTitle = _ref2.buttonTitle,
104
- buttonRel = _ref2.buttonRel,
105
- onButtonClick = _ref2.onButtonClick;
95
+ description = _ref2.description,
96
+ href = _ref2.href,
97
+ buttonDownload = _ref2.buttonDownload,
98
+ buttonTitle = _ref2.buttonTitle,
99
+ buttonRel = _ref2.buttonRel,
100
+ onButtonClick = _ref2.onButtonClick;
106
101
  return /*#__PURE__*/React.createElement("div", {
107
102
  className: cn('content', {
108
103
  'position-right': contentPositionRight
@@ -127,29 +122,27 @@ var VideoBlock = function VideoBlock(_ref) {
127
122
  var renderGridColumns = React.useCallback(function () {
128
123
  var columns = [];
129
124
  var columnWidth = content ? '7' : '10';
130
-
131
125
  if (content) {
132
126
  columns.push( /*#__PURE__*/React.createElement(GridColumn, {
133
127
  all: "5",
134
128
  tablet: "12",
135
129
  mobile: "12",
136
- orderTablet: "2",
137
- orderMobile: "2",
130
+ orderTablet: "1",
131
+ orderMobile: "1",
132
+ orderWide: contentPositionRight ? '1' : '0',
133
+ orderDesktop: contentPositionRight ? '1' : '0',
138
134
  key: "column-content",
139
- className: cn('content-column', {
140
- 'position-right': contentPositionRight
141
- })
135
+ className: cn('content-column')
142
136
  }, renderContent(content)));
143
137
  }
144
-
145
138
  columns.push( /*#__PURE__*/React.createElement(GridColumn, {
146
139
  all: columnWidth,
147
140
  tablet: "12",
148
141
  mobile: "12",
149
142
  key: "column-video",
150
- className: cn('video-column', {
151
- 'position-left': contentPositionRight
152
- })
143
+ orderDesktop: contentPositionRight ? '0' : '1',
144
+ orderWide: contentPositionRight ? '0' : '1',
145
+ className: cn('video-column')
153
146
  }, renderVideo()));
154
147
  return columns;
155
148
  }, [renderContent, renderVideo, content, contentPositionRight]);
@@ -161,37 +154,4 @@ var VideoBlock = function VideoBlock(_ref) {
161
154
  className: cn('grid')
162
155
  }, renderGridColumns()));
163
156
  };
164
-
165
- VideoBlock.propTypes = {
166
- dataAttrs: PropTypes.shape({
167
- root: PropTypes.objectOf(PropTypes.string.isRequired),
168
- button: PropTypes.objectOf(PropTypes.string.isRequired)
169
- }),
170
- className: PropTypes.string,
171
- classes: PropTypes.shape({
172
- root: PropTypes.string,
173
- button: PropTypes.string,
174
- description: PropTypes.string
175
- }),
176
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
177
- current: PropTypes.elementType
178
- }), PropTypes.any])]),
179
- content: PropTypes.shape({
180
- title: PropTypes.string.isRequired,
181
- description: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
182
- href: PropTypes.string,
183
- buttonTitle: PropTypes.string,
184
- buttonDownload: PropTypes.bool,
185
- buttonRel: PropTypes.string,
186
- onButtonClick: PropTypes.func
187
- }),
188
- videoType: PropTypes.oneOf(Object.values(VideoTypes)),
189
- videoSrc: PropTypes.string.isRequired,
190
- isMuted: PropTypes.bool,
191
- isAutoplay: PropTypes.bool,
192
- poster: PropTypes.string,
193
- playsinline: PropTypes.bool,
194
- contentPositionRight: PropTypes.bool,
195
- fixWhiteVideoBackground: PropTypes.bool
196
- };
197
157
  export default VideoBlock;
@@ -1,2 +1,6 @@
1
1
  import React from 'react';
2
- export declare const getColumnConfig: (isFullWidth: boolean) => Pick<React.PropsWithChildren<import("../../../ui-core/dist/lib/components/Grid/GridColumn").IGridColumn>, "all" | "wide" | "mobile" | "desktop" | "tablet">;
2
+ import { GridColumn } from '@megafon/ui-core';
3
+ type GridColumnPropsType = React.ComponentProps<typeof GridColumn>;
4
+ type GridColumnConfigType = Partial<Pick<GridColumnPropsType, 'all' | 'wide' | 'desktop' | 'tablet' | 'mobile'>>;
5
+ export declare const getColumnConfig: (isFullWidth: boolean) => GridColumnConfigType;
6
+ export {};