@megafon/ui-shared 5.15.0 → 6.0.0-beta.1

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