@megafon/ui-shared 6.0.0-beta.4 → 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,9 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import "core-js/modules/es.array.map.js";
3
2
  import "core-js/modules/es.string.link.js";
4
- import * as React from 'react';
3
+ import "core-js/modules/es.array.map.js";
4
+ import React from 'react';
5
5
  import { Button, Header } from '@megafon/ui-core';
6
6
  import { cnCreate, convert, filterDataAttrs } from '@megafon/ui-helpers';
7
+ import PropTypes from 'prop-types';
7
8
  import "./Card.css";
8
9
  var textsConvertConfig = {
9
10
  b: {
@@ -32,40 +33,43 @@ var textsConvertConfig = {
32
33
  }
33
34
  };
34
35
  var cn = cnCreate('mfui-card');
36
+
35
37
  var Card = function Card(_ref5) {
36
38
  var dataAttrs = _ref5.dataAttrs,
37
- className = _ref5.className,
38
- classes = _ref5.classes,
39
- rootRef = _ref5.rootRef,
40
- _ref5$isFullHeight = _ref5.isFullHeight,
41
- isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
42
- link = _ref5.link,
43
- _ref5$view = _ref5.view,
44
- view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
45
- image = _ref5.image,
46
- icon = _ref5.icon,
47
- title = _ref5.title,
48
- markerList = _ref5.markerList,
49
- textsList = _ref5.textsList,
50
- featuresList = _ref5.featuresList,
51
- iconsList = _ref5.iconsList,
52
- price = _ref5.price,
53
- button = _ref5.button,
54
- extraButton = _ref5.extraButton,
55
- badge = _ref5.badge,
56
- onClick = _ref5.onClick;
39
+ className = _ref5.className,
40
+ classes = _ref5.classes,
41
+ rootRef = _ref5.rootRef,
42
+ _ref5$isFullHeight = _ref5.isFullHeight,
43
+ isFullHeight = _ref5$isFullHeight === void 0 ? false : _ref5$isFullHeight,
44
+ link = _ref5.link,
45
+ _ref5$view = _ref5.view,
46
+ view = _ref5$view === void 0 ? 'shadow' : _ref5$view,
47
+ image = _ref5.image,
48
+ icon = _ref5.icon,
49
+ title = _ref5.title,
50
+ markerList = _ref5.markerList,
51
+ textsList = _ref5.textsList,
52
+ featuresList = _ref5.featuresList,
53
+ iconsList = _ref5.iconsList,
54
+ price = _ref5.price,
55
+ button = _ref5.button,
56
+ extraButton = _ref5.extraButton,
57
+ badge = _ref5.badge,
58
+ onClick = _ref5.onClick;
57
59
  var isOnlyTitle = !image && !icon && !markerList && !textsList && !featuresList && !iconsList && !price && !button && !extraButton;
58
60
  var isLink = (link === null || link === void 0 ? void 0 : link.href) && !button && !extraButton;
59
61
  var isBottomImage = (image === null || image === void 0 ? void 0 : image.position) === 'bottom';
60
62
  var ElementType = isLink ? 'a' : 'div';
63
+
61
64
  var renderImage = function renderImage() {
62
65
  if (!image) {
63
66
  return null;
64
67
  }
68
+
65
69
  var _image$position = image.position,
66
- position = _image$position === void 0 ? 'top' : _image$position,
67
- src = image.src,
68
- alt = image.alt;
70
+ position = _image$position === void 0 ? 'top' : _image$position,
71
+ src = image.src,
72
+ alt = image.alt;
69
73
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.imgBox), {
70
74
  className: cn('img-box', {
71
75
  position: position
@@ -76,14 +80,17 @@ var Card = function Card(_ref5) {
76
80
  alt: alt
77
81
  }));
78
82
  };
83
+
79
84
  var renderIcon = function renderIcon() {
80
85
  if (!icon) {
81
86
  return null;
82
87
  }
88
+
83
89
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.icon), {
84
90
  className: cn('icon')
85
91
  }), icon);
86
92
  };
93
+
87
94
  var renderContent = function renderContent() {
88
95
  if (markerList) {
89
96
  return /*#__PURE__*/React.createElement("ul", {
@@ -97,6 +104,7 @@ var Card = function Card(_ref5) {
97
104
  }, convert(item.note, {})));
98
105
  }));
99
106
  }
107
+
100
108
  if (textsList) {
101
109
  return /*#__PURE__*/React.createElement("div", {
102
110
  className: cn('texts')
@@ -111,6 +119,7 @@ var Card = function Card(_ref5) {
111
119
  }, convert(item.desc, textsConvertConfig)));
112
120
  }));
113
121
  }
122
+
114
123
  if (featuresList) {
115
124
  return /*#__PURE__*/React.createElement("div", {
116
125
  className: cn('features')
@@ -131,6 +140,7 @@ var Card = function Card(_ref5) {
131
140
  }, item.value)));
132
141
  })), featuresList.desc);
133
142
  }
143
+
134
144
  if (iconsList) {
135
145
  return /*#__PURE__*/React.createElement("div", {
136
146
  className: cn('icons')
@@ -149,12 +159,15 @@ var Card = function Card(_ref5) {
149
159
  }, item.text));
150
160
  })));
151
161
  }
162
+
152
163
  return null;
153
164
  };
165
+
154
166
  var renderPrice = function renderPrice() {
155
167
  if (!price) {
156
168
  return null;
157
169
  }
170
+
158
171
  return /*#__PURE__*/React.createElement("div", {
159
172
  className: cn('price')
160
173
  }, !!price.oldValue && /*#__PURE__*/React.createElement("div", {
@@ -165,10 +178,12 @@ var Card = function Card(_ref5) {
165
178
  className: cn('price-period')
166
179
  }, price.period));
167
180
  };
181
+
168
182
  var renderButtons = function renderButtons() {
169
183
  if (!button && !extraButton) {
170
184
  return null;
171
185
  }
186
+
172
187
  return /*#__PURE__*/React.createElement("div", {
173
188
  className: cn('buttons', {
174
189
  centered: (button === null || button === void 0 ? void 0 : button.isCentered) || (extraButton === null || extraButton === void 0 ? void 0 : extraButton.isCentered)
@@ -192,14 +207,17 @@ var Card = function Card(_ref5) {
192
207
  onClick: extraButton === null || extraButton === void 0 ? void 0 : extraButton.onClick
193
208
  }, extraButton.title));
194
209
  };
210
+
195
211
  var renderFooter = function renderFooter() {
196
212
  if (!price && !button && !extraButton && !image) {
197
213
  return null;
198
214
  }
215
+
199
216
  return /*#__PURE__*/React.createElement("div", {
200
217
  className: cn('footer')
201
218
  }, isBottomImage && renderImage(), renderPrice(), renderButtons());
202
219
  };
220
+
203
221
  return /*#__PURE__*/React.createElement(ElementType, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
204
222
  className: cn({
205
223
  'only-title': isOnlyTitle,
@@ -219,4 +237,76 @@ var Card = function Card(_ref5) {
219
237
  align: title.align
220
238
  }, title.text), badge), renderContent(), renderFooter());
221
239
  };
240
+
241
+ Card.propTypes = {
242
+ dataAttrs: PropTypes.shape({
243
+ root: PropTypes.objectOf(PropTypes.string.isRequired),
244
+ icon: PropTypes.objectOf(PropTypes.string.isRequired),
245
+ imgBox: PropTypes.objectOf(PropTypes.string.isRequired),
246
+ button: PropTypes.objectOf(PropTypes.string.isRequired),
247
+ extraButton: PropTypes.objectOf(PropTypes.string.isRequired)
248
+ }),
249
+ className: PropTypes.string,
250
+ classes: PropTypes.shape({
251
+ root: PropTypes.string,
252
+ button: PropTypes.string,
253
+ extraButton: PropTypes.string
254
+ }),
255
+ rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
256
+ current: PropTypes.elementType
257
+ }), PropTypes.any])]),
258
+ view: PropTypes.oneOf(['shadow', 'background']),
259
+ link: PropTypes.shape({
260
+ href: PropTypes.string,
261
+ target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
262
+ }),
263
+ image: PropTypes.shape({
264
+ src: PropTypes.string.isRequired,
265
+ alt: PropTypes.string,
266
+ position: PropTypes.oneOf(['top', 'bottom'])
267
+ }),
268
+ icon: PropTypes.node,
269
+ title: PropTypes.shape({
270
+ text: PropTypes.string.isRequired,
271
+ align: PropTypes.oneOf(['left', 'center'])
272
+ }).isRequired,
273
+ textsList: PropTypes.arrayOf(PropTypes.shape({
274
+ title: PropTypes.string,
275
+ desc: PropTypes.string.isRequired
276
+ }).isRequired),
277
+ featuresList: PropTypes.shape({
278
+ desc: PropTypes.string,
279
+ items: PropTypes.arrayOf(PropTypes.shape({
280
+ title: PropTypes.string.isRequired,
281
+ value: PropTypes.string.isRequired
282
+ }).isRequired).isRequired
283
+ }),
284
+ iconsList: PropTypes.shape({
285
+ desc: PropTypes.string,
286
+ items: PropTypes.arrayOf(PropTypes.shape({
287
+ icon: PropTypes.node.isRequired,
288
+ text: PropTypes.string.isRequired
289
+ }).isRequired).isRequired
290
+ }),
291
+ price: PropTypes.shape({
292
+ oldValue: PropTypes.string,
293
+ value: PropTypes.string.isRequired,
294
+ period: PropTypes.string
295
+ }),
296
+ button: PropTypes.shape({
297
+ title: PropTypes.string.isRequired,
298
+ href: PropTypes.string,
299
+ target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
300
+ isCentered: PropTypes.bool,
301
+ onClick: PropTypes.func
302
+ }),
303
+ extraButton: PropTypes.shape({
304
+ title: PropTypes.string.isRequired,
305
+ href: PropTypes.string,
306
+ target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
307
+ isCentered: PropTypes.bool,
308
+ onClick: PropTypes.func
309
+ }),
310
+ onClick: PropTypes.func
311
+ };
222
312
  export default Card;
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
- type Target = '_self' | '_blank' | '_parent' | '_top';
3
- export type Link = {
2
+ declare type Target = '_self' | '_blank' | '_parent' | '_top';
3
+ export declare type Link = {
4
4
  /** Ссылка */
5
5
  href?: string;
6
6
  /** Target свойство ссылки */
7
7
  target?: Target;
8
8
  };
9
- export type Image = {
9
+ export declare type Image = {
10
10
  /** Ссылка на изображение */
11
11
  src: string;
12
12
  /** Значение тега alt для изображения */
@@ -14,25 +14,25 @@ export type Image = {
14
14
  /** Позиция изображения */
15
15
  position?: 'top' | 'bottom';
16
16
  };
17
- export type Title = {
17
+ export declare type Title = {
18
18
  /** Текст */
19
19
  text: string;
20
20
  /** Выравнивание */
21
21
  align?: 'left' | 'center';
22
22
  };
23
- export type MarkerList = {
23
+ export declare type MarkerList = {
24
24
  /** Заголовок */
25
25
  title: string;
26
26
  /** Примечание */
27
27
  note?: string;
28
28
  }[];
29
- export type TextsList = {
29
+ export declare type TextsList = {
30
30
  /** Заголовок */
31
31
  title?: string;
32
32
  /** Описание */
33
33
  desc: string;
34
34
  }[];
35
- export type FeaturesList = {
35
+ export declare type FeaturesList = {
36
36
  /** Список */
37
37
  items: {
38
38
  /** Заголовок */
@@ -43,7 +43,7 @@ export type FeaturesList = {
43
43
  /** Описание */
44
44
  desc?: string;
45
45
  };
46
- export type IconsList = {
46
+ export declare type IconsList = {
47
47
  /** Список */
48
48
  items: {
49
49
  /** Иконка */
@@ -54,7 +54,7 @@ export type IconsList = {
54
54
  /** Описание */
55
55
  desc?: string;
56
56
  };
57
- export type Price = {
57
+ export declare type Price = {
58
58
  /** Старая цена */
59
59
  oldValue?: string;
60
60
  /** Текущая цена */
@@ -62,7 +62,7 @@ export type Price = {
62
62
  /** Период */
63
63
  period?: string;
64
64
  };
65
- export type ButtonType = {
65
+ export declare type ButtonType = {
66
66
  /** Название */
67
67
  title: string;
68
68
  /** Ссылка */
@@ -1 +0,0 @@
1
- export {};
@@ -3,13 +3,15 @@ import "core-js/modules/es.array.map.js";
3
3
  import * as React from 'react';
4
4
  import { Grid, GridColumn } from '@megafon/ui-core';
5
5
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
6
+ import * as PropTypes from 'prop-types';
6
7
  import getColumnConfig from "./helpers";
7
8
  var cn = cnCreate('mfui-cards-box');
9
+
8
10
  var CardsBox = function CardsBox(_ref) {
9
11
  var _ref$renderTwoColumns = _ref.renderTwoColumnsInRow,
10
- renderTwoColumnsInRow = _ref$renderTwoColumns === void 0 ? false : _ref$renderTwoColumns,
11
- dataAttrs = _ref.dataAttrs,
12
- children = _ref.children;
12
+ renderTwoColumnsInRow = _ref$renderTwoColumns === void 0 ? false : _ref$renderTwoColumns,
13
+ dataAttrs = _ref.dataAttrs,
14
+ children = _ref.children;
13
15
  return /*#__PURE__*/React.createElement("div", _extends({
14
16
  className: cn()
15
17
  }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement(Grid, {
@@ -23,4 +25,13 @@ var CardsBox = function CardsBox(_ref) {
23
25
  }, getColumnConfig(React.Children.count(children), i, renderTwoColumnsInRow)), child);
24
26
  })));
25
27
  };
28
+
29
+ CardsBox.propTypes = {
30
+ renderTwoColumnsInRow: PropTypes.bool,
31
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element]).isRequired,
32
+ dataAttrs: PropTypes.shape({
33
+ root: PropTypes.objectOf(PropTypes.string.isRequired),
34
+ column: PropTypes.objectOf(PropTypes.string.isRequired)
35
+ })
36
+ };
26
37
  export default CardsBox;
@@ -1,5 +1,5 @@
1
- type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
2
- type GridConfig = {
1
+ declare type TGridSizeValues = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
2
+ declare type GridConfig = {
3
3
  all?: TGridSizeValues;
4
4
  tablet?: TGridSizeValues;
5
5
  mobile?: TGridSizeValues;
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+
2
3
  var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInRow) {
3
4
  var offset = renderTwoColumnsInRow ? '2' : undefined;
4
5
  var offsetForEvenColumn = index % 2 ? undefined : offset;
@@ -7,6 +8,7 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
7
8
  tablet: '6',
8
9
  mobile: '12'
9
10
  };
11
+
10
12
  switch (count) {
11
13
  case 2:
12
14
  case 4:
@@ -14,8 +16,10 @@ var getColumnConfig = function getColumnConfig(count, index, renderTwoColumnsInR
14
16
  leftOffsetWide: offsetForEvenColumn,
15
17
  leftOffsetDesktop: offsetForEvenColumn
16
18
  });
19
+
17
20
  default:
18
21
  return _extends({}, columnSize);
19
22
  }
20
23
  };
24
+
21
25
  export default getColumnConfig;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Carousel } from '@megafon/ui-core';
3
- type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
4
- type DesktopSlidesPerView = 3 | 4;
3
+ declare type CarouselPropsTypes = React.ComponentProps<typeof Carousel>;
4
+ declare type DesktopSlidesPerView = 3 | 4;
5
5
  interface ICarouselBox extends CarouselPropsTypes {
6
6
  /** Количество видимых слайдов на разрешении 1280 и выше */
7
7
  desktopSlidesPerView?: DesktopSlidesPerView;
@@ -1,40 +1,52 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import "core-js/modules/es.symbol.js";
4
3
  import "core-js/modules/es.array.index-of.js";
4
+ import "core-js/modules/es.symbol.js";
5
+
5
6
  var __rest = this && this.__rest || function (s, e) {
6
7
  var t = {};
7
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
8
+
9
+ for (var p in s) {
10
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
11
+ }
12
+
8
13
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9
14
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
10
15
  }
11
16
  return t;
12
17
  };
18
+
13
19
  import * as React from 'react';
14
20
  import { Carousel } from '@megafon/ui-core';
15
21
  import { cnCreate, breakpoints } from '@megafon/ui-helpers';
22
+
16
23
  var getDefaultSlideSettings = function getDefaultSlideSettings(desktopSlidesPerView) {
17
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, breakpoints.MOBILE_SMALL_START, {
24
+ var _ref;
25
+
26
+ return _ref = {}, _defineProperty(_ref, breakpoints.MOBILE_SMALL_START, {
18
27
  slidesPerView: 1,
19
28
  spaceBetween: 16
20
- }), breakpoints.MOBILE_BIG_START, {
29
+ }), _defineProperty(_ref, breakpoints.MOBILE_BIG_START, {
21
30
  slidesPerView: 2,
22
31
  spaceBetween: 20
23
- }), breakpoints.DESKTOP_SMALL_START, {
32
+ }), _defineProperty(_ref, breakpoints.DESKTOP_SMALL_START, {
24
33
  slidesPerView: 3,
25
34
  spaceBetween: 20
26
- }), breakpoints.DESKTOP_MIDDLE_START, {
35
+ }), _defineProperty(_ref, breakpoints.DESKTOP_MIDDLE_START, {
27
36
  slidesPerView: desktopSlidesPerView,
28
37
  spaceBetween: 20
29
- });
38
+ }), _ref;
30
39
  };
40
+
31
41
  var cn = cnCreate('mfui-carousel-box');
42
+
32
43
  var CarouselBox = function CarouselBox(_a) {
33
44
  var children = _a.children,
34
- slidesSettings = _a.slidesSettings,
35
- _a$desktopSlidesPerVi = _a.desktopSlidesPerView,
36
- desktopSlidesPerView = _a$desktopSlidesPerVi === void 0 ? 4 : _a$desktopSlidesPerVi,
37
- props = __rest(_a, ["children", "slidesSettings", "desktopSlidesPerView"]);
45
+ slidesSettings = _a.slidesSettings,
46
+ _a$desktopSlidesPerVi = _a.desktopSlidesPerView,
47
+ desktopSlidesPerView = _a$desktopSlidesPerVi === void 0 ? 4 : _a$desktopSlidesPerVi,
48
+ props = __rest(_a, ["children", "slidesSettings", "desktopSlidesPerView"]);
49
+
38
50
  var settings = slidesSettings || getDefaultSlideSettings(desktopSlidesPerView);
39
51
  return /*#__PURE__*/React.createElement("div", {
40
52
  className: cn()
@@ -42,4 +54,5 @@ var CarouselBox = function CarouselBox(_a) {
42
54
  slidesSettings: settings
43
55
  }), children));
44
56
  };
57
+
45
58
  export default CarouselBox;