@megafon/ui-shared 6.0.0-beta.3 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/CHANGELOG.md +4031 -0
  2. package/dist/es/components/AccordionBox/AccordionBox.css +15 -1
  3. package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
  4. package/dist/es/components/AccordionBox/AccordionBox.js +49 -6
  5. package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
  6. package/dist/es/components/AudioPlayer/AudioPlayer.js +27 -11
  7. package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
  8. package/dist/es/components/AudioPlayer/AudioProgress.js +22 -10
  9. package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
  10. package/dist/es/components/AudioPlayer/AudioRange.js +10 -8
  11. package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
  12. package/dist/es/components/AudioPlayer/AudioVolume.js +12 -3
  13. package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +10 -4
  14. package/dist/es/components/AudioPlayer/style/AudioPlayer.css +58 -1
  15. package/dist/es/components/AudioPlayer/style/AudioProgress.css +35 -1
  16. package/dist/es/components/AudioPlayer/style/AudioRange.css +68 -1
  17. package/dist/es/components/AudioPlayer/style/AudioVolume.css +34 -1
  18. package/dist/es/components/AudioPlayer/timerFormatUtil.js +9 -1
  19. package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
  20. package/dist/es/components/BannerBox/BannerBox.js +12 -3
  21. package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
  22. package/dist/es/components/BenefitsIcons/BenefitsIcons.js +64 -23
  23. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
  24. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +36 -9
  25. package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
  26. package/dist/es/components/BenefitsIcons/helpers.js +20 -6
  27. package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +38 -1
  28. package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +90 -1
  29. package/dist/es/components/BenefitsIcons/types.d.ts +5 -5
  30. package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  31. package/dist/es/components/BenefitsPictures/BenefitsPictures.js +49 -19
  32. package/dist/es/components/BenefitsPictures/BenfitsPictures.css +43 -1
  33. package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
  34. package/dist/es/components/BenefitsPictures/helpers.js +14 -0
  35. package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
  36. package/dist/es/components/BenefitsPictures/types.js +0 -1
  37. package/dist/es/components/Breadcrumbs/Breadcrumbs.css +43 -1
  38. package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
  39. package/dist/es/components/Breadcrumbs/Breadcrumbs.js +39 -10
  40. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -1
  41. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
  42. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +36 -11
  43. package/dist/es/components/ButtonBanner/ButtonBanner.css +122 -1
  44. package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
  45. package/dist/es/components/ButtonBanner/ButtonBanner.js +53 -22
  46. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +19 -1
  47. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
  48. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +51 -20
  49. package/dist/es/components/Card/Card.css +354 -1
  50. package/dist/es/components/Card/Card.d.ts +4 -4
  51. package/dist/es/components/Card/Card.js +115 -25
  52. package/dist/es/components/Card/types.d.ts +10 -10
  53. package/dist/es/components/Card/types.js +0 -1
  54. package/dist/es/components/CardsBox/CardsBox.js +14 -3
  55. package/dist/es/components/CardsBox/helpers.d.ts +2 -2
  56. package/dist/es/components/CardsBox/helpers.js +4 -0
  57. package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
  58. package/dist/es/components/CarouselBox/CarouselBox.js +24 -11
  59. package/dist/es/components/Container/Container.css +3287 -1
  60. package/dist/es/components/Container/Container.d.ts +5 -7
  61. package/dist/es/components/Container/Container.js +25 -10
  62. package/dist/es/components/DownloadLinks/DownloadLink.css +37 -1
  63. package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
  64. package/dist/es/components/DownloadLinks/DownloadLink.js +44 -13
  65. package/dist/es/components/DownloadLinks/DownloadLinks.css +36 -1
  66. package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
  67. package/dist/es/components/DownloadLinks/DownloadLinks.js +13 -2
  68. package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +2 -5
  69. package/dist/es/components/FaqWrapper/FaqWrapper.js +3 -1
  70. package/dist/es/components/ImageBanner/ImageBanner.css +252 -1
  71. package/dist/es/components/ImageBanner/ImageBanner.d.ts +7 -8
  72. package/dist/es/components/ImageBanner/ImageBanner.js +88 -37
  73. package/dist/es/components/Instructions/Instructions.css +790 -1
  74. package/dist/es/components/Instructions/Instructions.d.ts +11 -11
  75. package/dist/es/components/Instructions/Instructions.js +94 -41
  76. package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
  77. package/dist/es/components/NotificationBox/NotificationBox.js +19 -5
  78. package/dist/es/components/NotificationBox/style/NotificationBox.css +28 -0
  79. package/dist/es/components/PageTitle/PageTitle.css +80 -1
  80. package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
  81. package/dist/es/components/PageTitle/PageTitle.js +37 -12
  82. package/dist/es/components/Partners/Partners.css +53 -1
  83. package/dist/es/components/Partners/Partners.d.ts +2 -2
  84. package/dist/es/components/Partners/Partners.js +48 -17
  85. package/dist/es/components/PictureWithDescription/PictureWithDescription.css +80 -1
  86. package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +2 -4
  87. package/dist/es/components/PictureWithDescription/PictureWithDescription.js +28 -10
  88. package/dist/es/components/Property/Property.css +156 -1
  89. package/dist/es/components/Property/Property.d.ts +4 -4
  90. package/dist/es/components/Property/Property.js +81 -37
  91. package/dist/es/components/Property/PropertyDescription.css +17 -1
  92. package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
  93. package/dist/es/components/Property/PropertyDescription.js +28 -8
  94. package/dist/es/components/Property/types.d.ts +5 -7
  95. package/dist/es/components/Property/types.js +0 -1
  96. package/dist/es/components/Steps/Steps.css +41 -1
  97. package/dist/es/components/Steps/Steps.d.ts +1 -2
  98. package/dist/es/components/Steps/Steps.js +19 -4
  99. package/dist/es/components/Steps/StepsItem.css +42 -1
  100. package/dist/es/components/Steps/StepsItem.d.ts +2 -2
  101. package/dist/es/components/Steps/StepsItem.js +9 -2
  102. package/dist/es/components/StoreBanner/StoreBanner.css +346 -1
  103. package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
  104. package/dist/es/components/StoreBanner/StoreBanner.js +97 -41
  105. package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
  106. package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
  107. package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
  108. package/dist/es/components/StoreButton/StoreButton.css +327 -1
  109. package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
  110. package/dist/es/components/StoreButton/StoreButton.js +44 -13
  111. package/dist/es/components/Table/Table.css +157 -1
  112. package/dist/es/components/Table/Table.d.ts +1 -1
  113. package/dist/es/components/Table/Table.js +51 -31
  114. package/dist/es/components/Table/TableCell.js +6 -0
  115. package/dist/es/components/Table/TableRow.js +10 -1
  116. package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
  117. package/dist/es/components/TabsBox/TabsBox.js +13 -4
  118. package/dist/es/components/TextBox/TextBox.css +25 -1
  119. package/dist/es/components/TextBox/TextBox.d.ts +1 -2
  120. package/dist/es/components/TextBox/TextBox.js +23 -8
  121. package/dist/es/components/TextBox/TextBoxPicture.css +27 -1
  122. package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
  123. package/dist/es/components/TextBox/TextBoxPicture.js +14 -5
  124. package/dist/es/components/TextWithIcon/TextWithIcon.css +10 -1
  125. package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
  126. package/dist/es/components/TextWithIcon/TextWithIcon.js +24 -6
  127. package/dist/es/components/TextWithIcon/TextWithIconItem.css +29 -1
  128. package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
  129. package/dist/es/components/TextWithIcon/TextWithIconItem.js +21 -6
  130. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +31 -1
  131. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  132. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +23 -6
  133. package/dist/es/components/VideoBanner/VideoBanner.css +225 -1
  134. package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
  135. package/dist/es/components/VideoBanner/VideoBanner.js +110 -47
  136. package/dist/es/components/VideoBlock/VideoBlock.css +106 -1
  137. package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
  138. package/dist/es/components/VideoBlock/VideoBlock.js +75 -35
  139. package/dist/es/helpers/getColumnConfig.d.ts +1 -5
  140. package/dist/lib/components/AccordionBox/AccordionBox.css +15 -1
  141. package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
  142. package/dist/lib/components/AccordionBox/AccordionBox.js +66 -10
  143. package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
  144. package/dist/lib/components/AudioPlayer/AudioPlayer.js +56 -32
  145. package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
  146. package/dist/lib/components/AudioPlayer/AudioProgress.js +43 -12
  147. package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
  148. package/dist/lib/components/AudioPlayer/AudioRange.js +17 -9
  149. package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
  150. package/dist/lib/components/AudioPlayer/AudioVolume.js +23 -4
  151. package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +16 -5
  152. package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +58 -1
  153. package/dist/lib/components/AudioPlayer/style/AudioProgress.css +35 -1
  154. package/dist/lib/components/AudioPlayer/style/AudioRange.css +68 -1
  155. package/dist/lib/components/AudioPlayer/style/AudioVolume.css +34 -1
  156. package/dist/lib/components/AudioPlayer/timerFormatUtil.js +13 -2
  157. package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
  158. package/dist/lib/components/BannerBox/BannerBox.js +25 -7
  159. package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
  160. package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +86 -26
  161. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
  162. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +53 -13
  163. package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
  164. package/dist/lib/components/BenefitsIcons/helpers.js +37 -10
  165. package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +38 -1
  166. package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +90 -1
  167. package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
  168. package/dist/lib/components/BenefitsIcons/types.js +8 -5
  169. package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  170. package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +71 -24
  171. package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +43 -1
  172. package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
  173. package/dist/lib/components/BenefitsPictures/helpers.js +40 -9
  174. package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
  175. package/dist/lib/components/BenefitsPictures/types.js +1 -5
  176. package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +43 -1
  177. package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
  178. package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +60 -18
  179. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -1
  180. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
  181. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +55 -22
  182. package/dist/lib/components/ButtonBanner/ButtonBanner.css +122 -1
  183. package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
  184. package/dist/lib/components/ButtonBanner/ButtonBanner.js +89 -40
  185. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +19 -1
  186. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
  187. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +72 -29
  188. package/dist/lib/components/Card/Card.css +354 -1
  189. package/dist/lib/components/Card/Card.d.ts +4 -4
  190. package/dist/lib/components/Card/Card.js +164 -67
  191. package/dist/lib/components/Card/types.d.ts +10 -10
  192. package/dist/lib/components/Card/types.js +1 -5
  193. package/dist/lib/components/CardsBox/CardsBox.js +31 -7
  194. package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
  195. package/dist/lib/components/CardsBox/helpers.js +8 -1
  196. package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
  197. package/dist/lib/components/CarouselBox/CarouselBox.js +39 -15
  198. package/dist/lib/components/Container/Container.css +3287 -1
  199. package/dist/lib/components/Container/Container.d.ts +5 -7
  200. package/dist/lib/components/Container/Container.js +40 -18
  201. package/dist/lib/components/DownloadLinks/DownloadLink.css +37 -1
  202. package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
  203. package/dist/lib/components/DownloadLinks/DownloadLink.js +60 -17
  204. package/dist/lib/components/DownloadLinks/DownloadLinks.css +36 -1
  205. package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
  206. package/dist/lib/components/DownloadLinks/DownloadLinks.js +33 -8
  207. package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +2 -5
  208. package/dist/lib/components/FaqWrapper/FaqWrapper.js +9 -6
  209. package/dist/lib/components/ImageBanner/ImageBanner.css +252 -1
  210. package/dist/lib/components/ImageBanner/ImageBanner.d.ts +7 -8
  211. package/dist/lib/components/ImageBanner/ImageBanner.js +138 -61
  212. package/dist/lib/components/Instructions/Instructions.css +790 -1
  213. package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
  214. package/dist/lib/components/Instructions/Instructions.js +186 -103
  215. package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
  216. package/dist/lib/components/NotificationBox/NotificationBox.js +37 -9
  217. package/dist/lib/components/NotificationBox/style/NotificationBox.css +28 -0
  218. package/dist/lib/components/PageTitle/PageTitle.css +80 -1
  219. package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
  220. package/dist/lib/components/PageTitle/PageTitle.js +52 -15
  221. package/dist/lib/components/Partners/Partners.css +53 -1
  222. package/dist/lib/components/Partners/Partners.d.ts +2 -2
  223. package/dist/lib/components/Partners/Partners.js +65 -21
  224. package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +80 -1
  225. package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +2 -4
  226. package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +46 -16
  227. package/dist/lib/components/Property/Property.css +156 -1
  228. package/dist/lib/components/Property/Property.d.ts +4 -4
  229. package/dist/lib/components/Property/Property.js +120 -60
  230. package/dist/lib/components/Property/PropertyDescription.css +17 -1
  231. package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
  232. package/dist/lib/components/Property/PropertyDescription.js +46 -15
  233. package/dist/lib/components/Property/types.d.ts +5 -7
  234. package/dist/lib/components/Property/types.js +1 -5
  235. package/dist/lib/components/Steps/Steps.css +41 -1
  236. package/dist/lib/components/Steps/Steps.d.ts +1 -2
  237. package/dist/lib/components/Steps/Steps.js +35 -8
  238. package/dist/lib/components/Steps/StepsItem.css +42 -1
  239. package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
  240. package/dist/lib/components/Steps/StepsItem.js +23 -11
  241. package/dist/lib/components/StoreBanner/StoreBanner.css +346 -1
  242. package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
  243. package/dist/lib/components/StoreBanner/StoreBanner.js +118 -47
  244. package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
  245. package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
  246. package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
  247. package/dist/lib/components/StoreButton/StoreButton.css +327 -1
  248. package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
  249. package/dist/lib/components/StoreButton/StoreButton.js +63 -17
  250. package/dist/lib/components/Table/Table.css +157 -1
  251. package/dist/lib/components/Table/Table.d.ts +1 -1
  252. package/dist/lib/components/Table/Table.js +68 -35
  253. package/dist/lib/components/Table/TableCell.js +16 -4
  254. package/dist/lib/components/Table/TableRow.js +19 -5
  255. package/dist/lib/components/TabsBox/TabBox.js +4 -1
  256. package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
  257. package/dist/lib/components/TabsBox/TabsBox.js +26 -8
  258. package/dist/lib/components/TextBox/TextBox.css +25 -1
  259. package/dist/lib/components/TextBox/TextBox.d.ts +1 -2
  260. package/dist/lib/components/TextBox/TextBox.js +36 -12
  261. package/dist/lib/components/TextBox/TextBoxPicture.css +27 -1
  262. package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
  263. package/dist/lib/components/TextBox/TextBoxPicture.js +29 -11
  264. package/dist/lib/components/TextWithIcon/TextWithIcon.css +10 -1
  265. package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
  266. package/dist/lib/components/TextWithIcon/TextWithIcon.js +39 -10
  267. package/dist/lib/components/TextWithIcon/TextWithIconItem.css +29 -1
  268. package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
  269. package/dist/lib/components/TextWithIcon/TextWithIconItem.js +37 -10
  270. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +31 -1
  271. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  272. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +40 -10
  273. package/dist/lib/components/VideoBanner/VideoBanner.css +225 -1
  274. package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
  275. package/dist/lib/components/VideoBanner/VideoBanner.js +176 -83
  276. package/dist/lib/components/VideoBlock/VideoBlock.css +106 -1
  277. package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
  278. package/dist/lib/components/VideoBlock/VideoBlock.js +114 -58
  279. package/dist/lib/constants/throttleTime.js +3 -2
  280. package/dist/lib/helpers/getColumnConfig.d.ts +1 -5
  281. package/dist/lib/helpers/getColumnConfig.js +5 -2
  282. package/dist/lib/index.js +57 -10
  283. package/package.json +92 -87
  284. package/dist/es/components/NotificationBox/NotificationBox.css +0 -1
  285. package/dist/lib/components/NotificationBox/NotificationBox.css +0 -1
@@ -1 +1,252 @@
1
- h1,h2,h3,h4,h5{margin:0}.mfui-image-banner{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden}@media screen and (min-width:1024px){.mfui-image-banner{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:420px}}.mfui-image-banner__picture{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media screen and (min-width:1024px){.mfui-image-banner__picture{height:100%;max-width:672px;width:50%}}.mfui-image-banner__picture_v-align_top{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.mfui-image-banner__picture_v-align_center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-image-banner__picture_v-align_bottom{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.mfui-image-banner__image{display:block;max-height:150px;max-width:100%}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__image{max-height:230px}}@media screen and (min-width:1024px){.mfui-image-banner__image{max-height:100%;-o-object-fit:contain;object-fit:contain}}.mfui-image-banner__content{z-index:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media screen and (max-width:1023px){.mfui-image-banner__content{padding:24px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-image-banner__content{text-align:center}}@media screen and (min-width:1024px){.mfui-image-banner__content{padding:0 80px;width:50%}}.mfui-image-banner__description{margin-top:16px;white-space:pre-wrap}.mfui-image-banner__cost{font-size:15px;font-weight:500;line-height:24px;margin-top:16px}.mfui-image-banner__value{display:inline;margin:0 4px}@media screen and (max-width:1023px),screen and (min-width:1024px) and (max-width:1279px){.mfui-image-banner__value{line-height:21px}}.mfui-image-banner__text,.mfui-image-banner__title{white-space:pre-wrap}.mfui-image-banner__children{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:32px}@media screen and (max-width:767px){.mfui-image-banner__children{-webkit-box-align:center;-ms-flex-align:center;align-items:center}}@media screen and (min-width:768px){.mfui-image-banner__children{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}@media screen and (min-width:1024px){.mfui-image-banner__children{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}}@media screen and (max-width:1023px){.mfui-image-banner__badges-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}}.mfui-image-banner__badges{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:16px}.mfui-image-banner__ad-block{margin:0 0 16px auto}@media screen and (min-width:1024px){.mfui-image-banner__ad-block{position:absolute;right:24px;top:24px}}.mfui-image-banner_radius_rounded{border-radius:24px}@media screen and (min-width:1024px){.mfui-image-banner_auto-height .mfui-image-banner__content{padding:48px 80px}.mfui-image-banner_auto-height{height:auto}.mfui-image-banner_has-image .mfui-image-banner__content{padding-right:0}.mfui-image-banner_full-width .mfui-image-banner__image{bottom:0;display:block;max-width:unset;position:absolute;right:0}.mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}}.mfui-image-banner_background-color_green{background-color:var(--brandGreen)}.mfui-image-banner_background-color_purple{background-color:var(--brandPurple)}.mfui-image-banner_background-color_gradient{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-image-banner_background-color_light{background-color:#f6f2f9}.mfui-image-banner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-image-banner_text-color_light .mfui-image-banner__content{color:var(--stcWhite)}.mfui-image-banner_text-color_dark .mfui-image-banner__content{color:var(--stcBlack)}
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5 {
6
+ margin: 0;
7
+ }
8
+ .mfui-image-banner {
9
+ position: relative;
10
+ display: -webkit-box;
11
+ display: -ms-flexbox;
12
+ display: flex;
13
+ -webkit-box-orient: vertical;
14
+ -webkit-box-direction: normal;
15
+ -ms-flex-direction: column;
16
+ flex-direction: column;
17
+ -webkit-box-pack: justify;
18
+ -ms-flex-pack: justify;
19
+ justify-content: space-between;
20
+ overflow: hidden;
21
+ }
22
+ @media screen and (min-width: 1024px) {
23
+ .mfui-image-banner {
24
+ -webkit-box-orient: horizontal;
25
+ -webkit-box-direction: normal;
26
+ -ms-flex-direction: row;
27
+ flex-direction: row;
28
+ -webkit-box-align: center;
29
+ -ms-flex-align: center;
30
+ align-items: center;
31
+ height: 420px;
32
+ }
33
+ }
34
+ .mfui-image-banner__picture {
35
+ display: -webkit-box;
36
+ display: -ms-flexbox;
37
+ display: flex;
38
+ -ms-flex-negative: 0;
39
+ flex-shrink: 0;
40
+ -webkit-box-pack: center;
41
+ -ms-flex-pack: center;
42
+ justify-content: center;
43
+ }
44
+ @media screen and (min-width: 1024px) {
45
+ .mfui-image-banner__picture {
46
+ width: 50%;
47
+ max-width: 672px;
48
+ height: 100%;
49
+ }
50
+ }
51
+ .mfui-image-banner__picture_v-align_top {
52
+ -webkit-box-align: start;
53
+ -ms-flex-align: start;
54
+ align-items: flex-start;
55
+ }
56
+ .mfui-image-banner__picture_v-align_center {
57
+ -webkit-box-align: center;
58
+ -ms-flex-align: center;
59
+ align-items: center;
60
+ }
61
+ .mfui-image-banner__picture_v-align_bottom {
62
+ -webkit-box-align: end;
63
+ -ms-flex-align: end;
64
+ align-items: flex-end;
65
+ }
66
+ .mfui-image-banner__image {
67
+ display: block;
68
+ max-width: 100%;
69
+ max-height: 150px;
70
+ }
71
+ @media screen and (min-width: 768px) and (max-width: 1023px) {
72
+ .mfui-image-banner__image {
73
+ max-height: 230px;
74
+ }
75
+ }
76
+ @media screen and (min-width: 1024px) {
77
+ .mfui-image-banner__image {
78
+ max-height: 100%;
79
+ -o-object-fit: contain;
80
+ object-fit: contain;
81
+ }
82
+ }
83
+ .mfui-image-banner__content {
84
+ z-index: 1;
85
+ -webkit-box-flex: 1;
86
+ -ms-flex-positive: 1;
87
+ flex-grow: 1;
88
+ }
89
+ @media screen and (max-width: 1023px) {
90
+ .mfui-image-banner__content {
91
+ padding: 24px;
92
+ }
93
+ }
94
+ @media screen and (min-width: 768px) and (max-width: 1023px) {
95
+ .mfui-image-banner__content {
96
+ text-align: center;
97
+ }
98
+ }
99
+ @media screen and (min-width: 1024px) {
100
+ .mfui-image-banner__content {
101
+ width: 50%;
102
+ padding: 0 80px;
103
+ }
104
+ }
105
+ .mfui-image-banner__description {
106
+ margin-top: 16px;
107
+ white-space: pre-wrap;
108
+ }
109
+ .mfui-image-banner__cost {
110
+ font-size: 15px;
111
+ line-height: 24px;
112
+ font-weight: 500;
113
+ margin-top: 16px;
114
+ }
115
+ .mfui-image-banner__value {
116
+ display: inline;
117
+ margin: 0 4px;
118
+ }
119
+ @media screen and (max-width: 1023px), screen and (min-width: 1024px) and (max-width: 1279px) {
120
+ .mfui-image-banner__value {
121
+ line-height: 21px;
122
+ }
123
+ }
124
+ .mfui-image-banner__title,
125
+ .mfui-image-banner__text {
126
+ white-space: pre-wrap;
127
+ }
128
+ .mfui-image-banner__children {
129
+ display: -webkit-box;
130
+ display: -ms-flexbox;
131
+ display: flex;
132
+ -webkit-box-orient: vertical;
133
+ -webkit-box-direction: normal;
134
+ -ms-flex-direction: column;
135
+ flex-direction: column;
136
+ -ms-flex-wrap: wrap;
137
+ flex-wrap: wrap;
138
+ gap: 16px;
139
+ -webkit-box-pack: center;
140
+ -ms-flex-pack: center;
141
+ justify-content: center;
142
+ margin-top: 32px;
143
+ }
144
+ @media screen and (max-width: 767px) {
145
+ .mfui-image-banner__children {
146
+ -webkit-box-align: center;
147
+ -ms-flex-align: center;
148
+ align-items: center;
149
+ }
150
+ }
151
+ @media screen and (min-width: 768px) {
152
+ .mfui-image-banner__children {
153
+ -webkit-box-orient: horizontal;
154
+ -webkit-box-direction: normal;
155
+ -ms-flex-direction: row;
156
+ flex-direction: row;
157
+ }
158
+ }
159
+ @media screen and (min-width: 1024px) {
160
+ .mfui-image-banner__children {
161
+ -webkit-box-pack: start;
162
+ -ms-flex-pack: start;
163
+ justify-content: flex-start;
164
+ }
165
+ }
166
+ @media screen and (max-width: 1023px) {
167
+ .mfui-image-banner__badges-container {
168
+ display: -webkit-box;
169
+ display: -ms-flexbox;
170
+ display: flex;
171
+ gap: 8px;
172
+ }
173
+ }
174
+ .mfui-image-banner__badges {
175
+ display: -webkit-box;
176
+ display: -ms-flexbox;
177
+ display: flex;
178
+ -webkit-box-flex: 1;
179
+ -ms-flex-positive: 1;
180
+ flex-grow: 1;
181
+ -ms-flex-wrap: wrap;
182
+ flex-wrap: wrap;
183
+ gap: 8px;
184
+ margin-bottom: 16px;
185
+ }
186
+ .mfui-image-banner__ad-block {
187
+ margin: 0 0 16px auto;
188
+ }
189
+ @media screen and (min-width: 1024px) {
190
+ .mfui-image-banner__ad-block {
191
+ position: absolute;
192
+ top: 24px;
193
+ right: 24px;
194
+ }
195
+ }
196
+ .mfui-image-banner_radius_rounded {
197
+ border-radius: 24px;
198
+ }
199
+ @media screen and (min-width: 1024px) {
200
+ .mfui-image-banner_auto-height .mfui-image-banner__content {
201
+ padding: 48px 80px;
202
+ }
203
+ }
204
+ @media screen and (min-width: 1024px) {
205
+ .mfui-image-banner_auto-height {
206
+ height: auto;
207
+ }
208
+ }
209
+ @media screen and (min-width: 1024px) {
210
+ .mfui-image-banner_has-image .mfui-image-banner__content {
211
+ padding-right: 0;
212
+ }
213
+ }
214
+ @media screen and (min-width: 1024px) {
215
+ .mfui-image-banner_full-width .mfui-image-banner__image {
216
+ position: absolute;
217
+ right: 0;
218
+ bottom: 0;
219
+ display: block;
220
+ max-width: unset;
221
+ }
222
+ }
223
+ @media screen and (min-width: 1024px) {
224
+ .mfui-image-banner_full-width.mfui-image-banner_auto-height .mfui-image-banner__image {
225
+ width: 100%;
226
+ height: 100%;
227
+ -o-object-fit: cover;
228
+ object-fit: cover;
229
+ }
230
+ }
231
+ .mfui-image-banner_background-color_green {
232
+ background-color: var(--brandGreen);
233
+ }
234
+ .mfui-image-banner_background-color_purple {
235
+ background-color: var(--brandPurple);
236
+ }
237
+ .mfui-image-banner_background-color_gradient {
238
+ background: -webkit-gradient(linear, right top, left top, from(#ADA6BA), to(#F6F2F9));
239
+ background: linear-gradient(270deg, #ADA6BA 0%, #F6F2F9 100%);
240
+ }
241
+ .mfui-image-banner_background-color_light {
242
+ background-color: #F6F2F9;
243
+ }
244
+ .mfui-image-banner_background-color_spbSky0 {
245
+ background-color: var(--spbSky0);
246
+ }
247
+ .mfui-image-banner_text-color_light .mfui-image-banner__content {
248
+ color: var(--stcWhite);
249
+ }
250
+ .mfui-image-banner_text-color_dark .mfui-image-banner__content {
251
+ color: var(--stcBlack);
252
+ }
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import './ImageBanner.scss';
1
+ import React, { Ref } from 'react';
2
+ import './ImageBanner.less';
3
3
  export declare const BackgroundColor: {
4
4
  readonly TRANSPARENT: "transparent";
5
5
  readonly GREEN: "green";
@@ -8,23 +8,23 @@ export declare const BackgroundColor: {
8
8
  readonly GRADIENT: "gradient";
9
9
  readonly LIGHT: "light";
10
10
  };
11
- export type BackgroundColorType = (typeof BackgroundColor)[keyof typeof BackgroundColor];
11
+ export declare type BackgroundColorType = typeof BackgroundColor[keyof typeof BackgroundColor];
12
12
  export declare const Radius: {
13
13
  readonly CORNERS: "corners";
14
14
  readonly ROUNDED: "rounded";
15
15
  };
16
- export type RadiusType = (typeof Radius)[keyof typeof Radius];
16
+ export declare type RadiusType = typeof Radius[keyof typeof Radius];
17
17
  export declare const NavTheme: {
18
18
  readonly LIGHT: "light";
19
19
  readonly DARK: "dark";
20
20
  };
21
- export type NavThemeType = (typeof NavTheme)[keyof typeof NavTheme];
21
+ export declare type NavThemeType = typeof NavTheme[keyof typeof NavTheme];
22
22
  export declare const ImageVerticalAlign: {
23
23
  readonly TOP: "top";
24
24
  readonly CENTER: "center";
25
25
  readonly BOTTOM: "bottom";
26
26
  };
27
- export type ImageVerticalAlignType = (typeof ImageVerticalAlign)[keyof typeof ImageVerticalAlign];
27
+ export declare type ImageVerticalAlignType = typeof ImageVerticalAlign[keyof typeof ImageVerticalAlign];
28
28
  export interface IImageBannerProps {
29
29
  /** Дополнительные data атрибуты к внутренним элементам */
30
30
  dataAttrs?: {
@@ -47,7 +47,7 @@ export interface IImageBannerProps {
47
47
  children?: string;
48
48
  };
49
49
  /** Ссылка на корневой элемент */
50
- rootRef?: React.Ref<HTMLDivElement>;
50
+ rootRef?: Ref<HTMLDivElement>;
51
51
  /** Заголовок */
52
52
  title?: string | React.ReactNode | React.ReactNode[];
53
53
  /** Текст-описание */
@@ -82,7 +82,6 @@ export interface IImageBannerProps {
82
82
  badges?: JSX.Element[] | JSX.Element;
83
83
  /** Элемент блока с рекламой */
84
84
  adBlock?: JSX.Element | null;
85
- children?: React.ReactNode;
86
85
  }
87
86
  declare const ImageBanner: React.FC<IImageBannerProps>;
88
87
  export default ImageBanner;
@@ -1,22 +1,39 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
- exports["default"] = exports.Radius = exports.NavTheme = exports.ImageVerticalAlign = exports.BackgroundColor = void 0;
8
+ exports["default"] = exports.ImageVerticalAlign = exports.NavTheme = exports.Radius = exports.BackgroundColor = void 0;
9
+
8
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
9
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+
10
14
  require("core-js/modules/es.symbol.js");
15
+
11
16
  require("core-js/modules/es.symbol.description.js");
17
+
12
18
  require("core-js/modules/es.array.concat.js");
13
- var React = _interopRequireWildcard(require("react"));
19
+
20
+ require("core-js/modules/es.object.values.js");
21
+
22
+ var _react = _interopRequireDefault(require("react"));
23
+
14
24
  var _uiCore = require("@megafon/ui-core");
25
+
15
26
  var _uiHelpers = require("@megafon/ui-helpers");
16
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
27
+
28
+ var PropTypes = _interopRequireWildcard(require("prop-types"));
29
+
30
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
+
32
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
+
18
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
- var BackgroundColor = exports.BackgroundColor = {
35
+
36
+ var BackgroundColor = {
20
37
  TRANSPARENT: 'transparent',
21
38
  GREEN: 'green',
22
39
  PURPLE: 'purple',
@@ -24,34 +41,41 @@ var BackgroundColor = exports.BackgroundColor = {
24
41
  GRADIENT: 'gradient',
25
42
  LIGHT: 'light'
26
43
  };
27
- var Radius = exports.Radius = {
44
+ exports.BackgroundColor = BackgroundColor;
45
+ var Radius = {
28
46
  CORNERS: 'corners',
29
47
  ROUNDED: 'rounded'
30
48
  };
31
- var NavTheme = exports.NavTheme = {
49
+ exports.Radius = Radius;
50
+ var NavTheme = {
32
51
  LIGHT: 'light',
33
52
  DARK: 'dark'
34
53
  };
35
- var ImageVerticalAlign = exports.ImageVerticalAlign = {
54
+ exports.NavTheme = NavTheme;
55
+ var ImageVerticalAlign = {
36
56
  TOP: 'top',
37
57
  CENTER: 'center',
38
58
  BOTTOM: 'bottom'
39
59
  };
60
+ exports.ImageVerticalAlign = ImageVerticalAlign;
61
+
40
62
  var getTheme = function getTheme(backgrounColor) {
41
63
  switch (backgrounColor) {
42
64
  case BackgroundColor.GREEN:
43
65
  case BackgroundColor.PURPLE:
44
66
  return NavTheme.LIGHT;
67
+
45
68
  default:
46
69
  return NavTheme.DARK;
47
70
  }
48
71
  };
72
+
49
73
  var cn = (0, _uiHelpers.cnCreate)('mfui-image-banner');
50
74
  var typographyConfig = {
51
75
  b: {
52
76
  component: function component(_ref) {
53
77
  var children = _ref.children;
54
- return /*#__PURE__*/React.createElement(_uiCore.Header, {
78
+ return /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
55
79
  className: cn('value'),
56
80
  as: "h3",
57
81
  color: "inherit"
@@ -59,97 +83,108 @@ var typographyConfig = {
59
83
  }
60
84
  }
61
85
  };
86
+
62
87
  var ImageBanner = function ImageBanner(_ref2) {
63
88
  var dataAttrs = _ref2.dataAttrs,
64
- className = _ref2.className,
65
- _ref2$classes = _ref2.classes,
66
- classes = _ref2$classes === void 0 ? {} : _ref2$classes,
67
- rootRef = _ref2.rootRef,
68
- _ref2$imageMobile = _ref2.imageMobile,
69
- imageMobile = _ref2$imageMobile === void 0 ? '' : _ref2$imageMobile,
70
- _ref2$imageMobile2x = _ref2.imageMobile2x,
71
- imageMobile2x = _ref2$imageMobile2x === void 0 ? '' : _ref2$imageMobile2x,
72
- _ref2$imageDesktop = _ref2.imageDesktop,
73
- imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
74
- _ref2$imageDesktop2x = _ref2.imageDesktop2x,
75
- imageDesktop2x = _ref2$imageDesktop2x === void 0 ? '' : _ref2$imageDesktop2x,
76
- _ref2$imageAlt = _ref2.imageAlt,
77
- imageAlt = _ref2$imageAlt === void 0 ? '' : _ref2$imageAlt,
78
- _ref2$imageVerticalAl = _ref2.imageVerticalAlign,
79
- imageVerticalAlign = _ref2$imageVerticalAl === void 0 ? ImageVerticalAlign.CENTER : _ref2$imageVerticalAl,
80
- title = _ref2.title,
81
- description = _ref2.description,
82
- cost = _ref2.cost,
83
- _ref2$headerLevelMobi = _ref2.headerLevelMobile,
84
- headerLevelMobile = _ref2$headerLevelMobi === void 0 ? 'h1' : _ref2$headerLevelMobi,
85
- _ref2$headerLevel = _ref2.headerLevel,
86
- headerLevel = _ref2$headerLevel === void 0 ? 'h1' : _ref2$headerLevel,
87
- _ref2$backgroundColor = _ref2.backgroundColor,
88
- backgroundColor = _ref2$backgroundColor === void 0 ? BackgroundColor.TRANSPARENT : _ref2$backgroundColor,
89
- _ref2$radius = _ref2.radius,
90
- radius = _ref2$radius === void 0 ? Radius.CORNERS : _ref2$radius,
91
- autoHeight = _ref2.autoHeight,
92
- isImageFullWidth = _ref2.isImageFullWidth,
93
- badges = _ref2.badges,
94
- adBlock = _ref2.adBlock,
95
- _ref2$children = _ref2.children,
96
- children = _ref2$children === void 0 ? [] : _ref2$children;
97
- var _React$useState = React.useState(false),
98
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
99
- isMobile = _React$useState2[0],
100
- setIsMobile = _React$useState2[1];
101
- React.useEffect(function () {
89
+ className = _ref2.className,
90
+ _ref2$classes = _ref2.classes,
91
+ classes = _ref2$classes === void 0 ? {} : _ref2$classes,
92
+ rootRef = _ref2.rootRef,
93
+ _ref2$imageMobile = _ref2.imageMobile,
94
+ imageMobile = _ref2$imageMobile === void 0 ? '' : _ref2$imageMobile,
95
+ _ref2$imageMobile2x = _ref2.imageMobile2x,
96
+ imageMobile2x = _ref2$imageMobile2x === void 0 ? '' : _ref2$imageMobile2x,
97
+ _ref2$imageDesktop = _ref2.imageDesktop,
98
+ imageDesktop = _ref2$imageDesktop === void 0 ? '' : _ref2$imageDesktop,
99
+ _ref2$imageDesktop2x = _ref2.imageDesktop2x,
100
+ imageDesktop2x = _ref2$imageDesktop2x === void 0 ? '' : _ref2$imageDesktop2x,
101
+ _ref2$imageAlt = _ref2.imageAlt,
102
+ imageAlt = _ref2$imageAlt === void 0 ? '' : _ref2$imageAlt,
103
+ _ref2$imageVerticalAl = _ref2.imageVerticalAlign,
104
+ imageVerticalAlign = _ref2$imageVerticalAl === void 0 ? ImageVerticalAlign.CENTER : _ref2$imageVerticalAl,
105
+ title = _ref2.title,
106
+ description = _ref2.description,
107
+ cost = _ref2.cost,
108
+ _ref2$headerLevelMobi = _ref2.headerLevelMobile,
109
+ headerLevelMobile = _ref2$headerLevelMobi === void 0 ? 'h1' : _ref2$headerLevelMobi,
110
+ _ref2$headerLevel = _ref2.headerLevel,
111
+ headerLevel = _ref2$headerLevel === void 0 ? 'h1' : _ref2$headerLevel,
112
+ _ref2$backgroundColor = _ref2.backgroundColor,
113
+ backgroundColor = _ref2$backgroundColor === void 0 ? BackgroundColor.TRANSPARENT : _ref2$backgroundColor,
114
+ _ref2$radius = _ref2.radius,
115
+ radius = _ref2$radius === void 0 ? Radius.CORNERS : _ref2$radius,
116
+ autoHeight = _ref2.autoHeight,
117
+ isImageFullWidth = _ref2.isImageFullWidth,
118
+ badges = _ref2.badges,
119
+ adBlock = _ref2.adBlock,
120
+ _ref2$children = _ref2.children,
121
+ children = _ref2$children === void 0 ? [] : _ref2$children;
122
+
123
+ var _React$useState = _react["default"].useState(false),
124
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
125
+ isMobile = _React$useState2[0],
126
+ setIsMobile = _React$useState2[1];
127
+
128
+ _react["default"].useEffect(function () {
102
129
  var mediaQuery = window.matchMedia("(max-width: ".concat(_uiHelpers.breakpoints.MOBILE_MIDDLE_END, "px)"));
130
+
103
131
  var handleMediaChange = function handleMediaChange(_ref3) {
104
132
  var matches = _ref3.matches;
105
133
  setIsMobile(matches);
106
134
  };
135
+
107
136
  setIsMobile(mediaQuery.matches);
108
137
  mediaQuery.addEventListener('change', handleMediaChange);
109
138
  return function () {
110
139
  mediaQuery.removeEventListener('change', handleMediaChange);
111
140
  };
112
141
  }, []);
142
+
113
143
  var navTheme = getTheme(backgroundColor);
114
144
  var hasImage = !!(imageMobile || imageMobile2x || imageDesktop || imageDesktop2x);
115
- var renderBadges = !!badges && /*#__PURE__*/React.createElement("div", {
145
+
146
+ var renderBadges = !!badges && /*#__PURE__*/_react["default"].createElement("div", {
116
147
  className: cn('badges', [classes.badges])
117
148
  }, badges);
118
- var renderAdBlock = !!adBlock && /*#__PURE__*/React.createElement("div", {
149
+
150
+ var renderAdBlock = !!adBlock && /*#__PURE__*/_react["default"].createElement("div", {
119
151
  className: cn('ad-block', [classes.adBlock])
120
152
  }, adBlock);
121
- var renderContent = /*#__PURE__*/React.createElement("div", {
153
+
154
+ var renderContent = /*#__PURE__*/_react["default"].createElement("div", {
122
155
  className: cn('content')
123
- }, /*#__PURE__*/React.createElement("div", {
156
+ }, /*#__PURE__*/_react["default"].createElement("div", {
124
157
  className: cn('badges-container', [classes.badgesContainer])
125
- }, renderBadges, renderAdBlock), !!title && /*#__PURE__*/React.createElement(_uiCore.Header, {
158
+ }, renderBadges, renderAdBlock), !!title && /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
126
159
  className: cn('title', [classes.title]),
127
160
  color: "inherit",
128
161
  as: isMobile ? headerLevelMobile : headerLevel
129
- }, typeof title === 'string' ? (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig) : title), !!description && /*#__PURE__*/React.createElement(_uiCore.Header, {
162
+ }, typeof title === 'string' ? (0, _uiHelpers.convert)(title, _uiHelpers.titleConvertConfig) : title), !!description && /*#__PURE__*/_react["default"].createElement(_uiCore.Header, {
130
163
  className: cn('description', [classes.description]),
131
164
  as: "h5",
132
165
  color: "inherit"
133
- }, typeof description === 'string' ? (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig) : description), !!cost && /*#__PURE__*/React.createElement("div", {
166
+ }, typeof description === 'string' ? (0, _uiHelpers.convert)(description, _uiHelpers.titleConvertConfig) : description), !!cost && /*#__PURE__*/_react["default"].createElement("div", {
134
167
  className: cn('cost', [classes.cost])
135
- }, (0, _uiHelpers.convert)(cost, typographyConfig)), !!children && !!React.Children.count(children) && /*#__PURE__*/React.createElement("div", {
168
+ }, (0, _uiHelpers.convert)(cost, typographyConfig)), !!children && !!_react["default"].Children.count(children) && /*#__PURE__*/_react["default"].createElement("div", {
136
169
  className: cn('children', [classes.children])
137
170
  }, children));
138
- var renderImage = /*#__PURE__*/React.createElement("picture", {
171
+
172
+ var renderImage = /*#__PURE__*/_react["default"].createElement("picture", {
139
173
  className: cn('picture', {
140
174
  'v-align': imageVerticalAlign
141
175
  })
142
- }, /*#__PURE__*/React.createElement("source", {
176
+ }, /*#__PURE__*/_react["default"].createElement("source", {
143
177
  className: classes.imageSource,
144
178
  media: "(min-width: ".concat(_uiHelpers.breakpoints.DESKTOP_SMALL_START, "px)"),
145
179
  srcSet: "".concat(imageDesktop, ", ").concat(imageDesktop2x, " 2x")
146
- }), /*#__PURE__*/React.createElement("img", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image), {
180
+ }), /*#__PURE__*/_react["default"].createElement("img", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.image), {
147
181
  className: cn('image', [classes.image]),
148
182
  src: imageMobile || imageMobile2x,
149
183
  srcSet: imageMobile2x ? "".concat(imageMobile2x, " 2x") : undefined,
150
184
  alt: imageAlt
151
185
  })));
152
- return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
186
+
187
+ return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
153
188
  className: cn({
154
189
  'background-color': backgroundColor,
155
190
  'text-color': navTheme,
@@ -161,4 +196,46 @@ var ImageBanner = function ImageBanner(_ref2) {
161
196
  ref: rootRef
162
197
  }), renderContent, hasImage && renderImage);
163
198
  };
164
- var _default = exports["default"] = ImageBanner;
199
+
200
+ ImageBanner.propTypes = {
201
+ dataAttrs: PropTypes.shape({
202
+ root: PropTypes.objectOf(PropTypes.string.isRequired),
203
+ image: PropTypes.objectOf(PropTypes.string.isRequired)
204
+ }),
205
+ className: PropTypes.string,
206
+ classes: PropTypes.shape({
207
+ root: PropTypes.string,
208
+ image: PropTypes.string,
209
+ imageSource: PropTypes.string,
210
+ title: PropTypes.string,
211
+ description: PropTypes.string,
212
+ cost: PropTypes.string,
213
+ badgesContainer: PropTypes.string,
214
+ badges: PropTypes.string,
215
+ badge: PropTypes.string,
216
+ adBlock: PropTypes.string,
217
+ children: PropTypes.string
218
+ }),
219
+ rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
220
+ current: PropTypes.elementType
221
+ }), PropTypes.any])]),
222
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
223
+ description: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
224
+ cost: PropTypes.string,
225
+ headerLevelMobile: PropTypes.oneOf(['h1', 'h2']),
226
+ headerLevel: PropTypes.oneOf(['h1', 'h2']),
227
+ backgroundColor: PropTypes.oneOf(Object.values(BackgroundColor)),
228
+ radius: PropTypes.oneOf(Object.values(Radius)),
229
+ imageMobile: PropTypes.string,
230
+ imageMobile2x: PropTypes.string,
231
+ imageDesktop: PropTypes.string,
232
+ imageDesktop2x: PropTypes.string,
233
+ imageAlt: PropTypes.string,
234
+ imageVerticalAlign: PropTypes.oneOf(Object.values(ImageVerticalAlign)),
235
+ autoHeight: PropTypes.bool,
236
+ isImageFullWidth: PropTypes.bool,
237
+ badges: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]),
238
+ adBlock: PropTypes.element
239
+ };
240
+ var _default = ImageBanner;
241
+ exports["default"] = _default;