@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 +1,80 @@
1
- h1,h2,h3,h4,h5{margin:0}@media screen and (min-width:1024px){.mfui-picture-with-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}.mfui-picture-with-description__title{margin-bottom:24px}.mfui-picture-with-description__picture{-ms-flex-item-align:start;align-self:flex-start;overflow:hidden;text-align:center}@media screen and (max-width:1023px){.mfui-picture-with-description__picture{margin:0 auto 32px}}@media screen and (min-width:1024px){.mfui-picture-with-description__picture{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;width:50%}.mfui-picture-with-description__picture_align_left{-webkit-box-ordinal-group:1;-ms-flex-order:0;margin-right:20px;order:0}}.mfui-picture-with-description__img{height:100%;max-width:550px;width:100%}.mfui-picture-with-description__content>:first-child{margin-top:0!important}.mfui-picture-with-description__content>:last-child{margin-bottom:0!important}@media screen and (min-width:1024px){.mfui-picture-with-description__articles{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:50%}.mfui-picture-with-description__articles_text-top-align{-ms-flex-item-align:start;align-self:flex-start}.mfui-picture-with-description__articles_align_right{margin-right:20px}}
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5 {
6
+ margin: 0;
7
+ }
8
+ @media screen and (min-width: 1024px) {
9
+ .mfui-picture-with-description {
10
+ display: -webkit-box;
11
+ display: -ms-flexbox;
12
+ display: flex;
13
+ -webkit-box-align: center;
14
+ -ms-flex-align: center;
15
+ align-items: center;
16
+ -webkit-box-pack: center;
17
+ -ms-flex-pack: center;
18
+ justify-content: center;
19
+ }
20
+ }
21
+ .mfui-picture-with-description__title {
22
+ margin-bottom: 24px;
23
+ }
24
+ .mfui-picture-with-description__picture {
25
+ -ms-flex-item-align: start;
26
+ align-self: flex-start;
27
+ overflow: hidden;
28
+ text-align: center;
29
+ }
30
+ @media screen and (max-width: 1023px) {
31
+ .mfui-picture-with-description__picture {
32
+ margin: 0 auto 32px;
33
+ }
34
+ }
35
+ @media screen and (min-width: 1024px) {
36
+ .mfui-picture-with-description__picture {
37
+ -webkit-box-ordinal-group: 3;
38
+ -ms-flex-order: 2;
39
+ order: 2;
40
+ width: 50%;
41
+ }
42
+ }
43
+ @media screen and (min-width: 1024px) {
44
+ .mfui-picture-with-description__picture_align_left {
45
+ -webkit-box-ordinal-group: 1;
46
+ -ms-flex-order: 0;
47
+ order: 0;
48
+ margin-right: 20px;
49
+ }
50
+ }
51
+ .mfui-picture-with-description__img {
52
+ width: 100%;
53
+ max-width: 550px;
54
+ height: 100%;
55
+ }
56
+ .mfui-picture-with-description__content > :first-child {
57
+ margin-top: 0 !important;
58
+ }
59
+ .mfui-picture-with-description__content > :last-child {
60
+ margin-bottom: 0 !important;
61
+ }
62
+ @media screen and (min-width: 1024px) {
63
+ .mfui-picture-with-description__articles {
64
+ -webkit-box-ordinal-group: 2;
65
+ -ms-flex-order: 1;
66
+ order: 1;
67
+ width: 50%;
68
+ }
69
+ }
70
+ @media screen and (min-width: 1024px) {
71
+ .mfui-picture-with-description__articles_text-top-align {
72
+ -ms-flex-item-align: start;
73
+ align-self: flex-start;
74
+ }
75
+ }
76
+ @media screen and (min-width: 1024px) {
77
+ .mfui-picture-with-description__articles_align_right {
78
+ margin-right: 20px;
79
+ }
80
+ }
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import './PictureWithDescription.scss';
2
+ import './PictureWithDescription.less';
3
3
  export declare const pictureAlignTypes: {
4
4
  readonly LEFT: "left";
5
5
  readonly RIGHT: "right";
6
6
  };
7
- type PictureAlignTypesType = (typeof pictureAlignTypes)[keyof typeof pictureAlignTypes];
7
+ declare type PictureAlignTypesType = typeof pictureAlignTypes[keyof typeof pictureAlignTypes];
8
8
  export interface IPictureWithDescriptionProps {
9
9
  /** Ссылка на корневой элемент */
10
10
  rootRef?: React.Ref<HTMLDivElement>;
@@ -25,8 +25,6 @@ export interface IPictureWithDescriptionProps {
25
25
  pictureAlt?: string;
26
26
  /** Выравнивание текста по верхнему краю */
27
27
  isTextTopAlign?: boolean;
28
- /** Дочерний элемент компонента */
29
- children?: React.ReactNode;
30
28
  }
31
29
  declare const PictureWithDescription: React.FC<IPictureWithDescriptionProps>;
32
30
  export default PictureWithDescription;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Header } from '@megafon/ui-core';
3
3
  import { cnCreate } from '@megafon/ui-helpers';
4
+ import PropTypes from 'prop-types';
4
5
  import "./PictureWithDescription.css";
5
6
  export var pictureAlignTypes = {
6
7
  LEFT: 'left',
@@ -8,18 +9,19 @@ export var pictureAlignTypes = {
8
9
  };
9
10
  var testIdPrefix = 'PictureWithDescription';
10
11
  var cn = cnCreate('mfui-picture-with-description');
12
+
11
13
  var PictureWithDescription = function PictureWithDescription(_ref) {
12
14
  var rootRef = _ref.rootRef,
13
- className = _ref.className,
14
- _ref$classes = _ref.classes,
15
- classes = _ref$classes === void 0 ? {} : _ref$classes,
16
- title = _ref.title,
17
- pictureUrl = _ref.pictureUrl,
18
- _ref$pictureAlign = _ref.pictureAlign,
19
- pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
20
- pictureAlt = _ref.pictureAlt,
21
- isTextTopAlign = _ref.isTextTopAlign,
22
- children = _ref.children;
15
+ className = _ref.className,
16
+ _ref$classes = _ref.classes,
17
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
18
+ title = _ref.title,
19
+ pictureUrl = _ref.pictureUrl,
20
+ _ref$pictureAlign = _ref.pictureAlign,
21
+ pictureAlign = _ref$pictureAlign === void 0 ? 'left' : _ref$pictureAlign,
22
+ pictureAlt = _ref.pictureAlt,
23
+ isTextTopAlign = _ref.isTextTopAlign,
24
+ children = _ref.children;
23
25
  return /*#__PURE__*/React.createElement("div", {
24
26
  className: cn([className, classes.root]),
25
27
  ref: rootRef
@@ -45,4 +47,20 @@ var PictureWithDescription = function PictureWithDescription(_ref) {
45
47
  className: cn('content')
46
48
  }, children)));
47
49
  };
50
+
51
+ PictureWithDescription.propTypes = {
52
+ rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
53
+ current: PropTypes.elementType
54
+ }), PropTypes.any])]),
55
+ className: PropTypes.string,
56
+ classes: PropTypes.shape({
57
+ root: PropTypes.string,
58
+ title: PropTypes.string
59
+ }),
60
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
61
+ pictureUrl: PropTypes.string.isRequired,
62
+ pictureAlign: PropTypes.oneOf([pictureAlignTypes.LEFT, pictureAlignTypes.RIGHT]),
63
+ pictureAlt: PropTypes.string,
64
+ isTextTopAlign: PropTypes.bool
65
+ };
48
66
  export default PictureWithDescription;
@@ -1 +1,156 @@
1
- @charset "UTF-8";h1,h2,h3,h4,h5{margin:0}.mfui-property__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:24px 0}.mfui-property_border-top.mfui-property_border-color_default .mfui-property__wrapper{border-top:1px solid var(--spbSky1)}.mfui-property_border-bottom.mfui-property_border-color_default .mfui-property__wrapper{border-bottom:1px solid var(--spbSky1)}.mfui-property_border-top.mfui-property_border-color_darker .mfui-property__wrapper{border-top:1px solid var(--spbSky2)}.mfui-property_border-bottom.mfui-property_border-color_darker .mfui-property__wrapper{border-bottom:1px solid var(--spbSky2)}.mfui-property__main{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-property__main:not(:first-child){margin-top:24px}.mfui-property__main_with-out-title{margin-top:16px!important}.mfui-property__main_with-badge{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-property__title-item_size_default{font-size:15px;font-weight:500;line-height:24px}.mfui-property__title-item_size_big{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px}@media screen and (min-width:1280px){.mfui-property__title-item_size_big{font-size:20px;line-height:28px}}@media screen and (max-width:767px){.mfui-property__title-item{font-size:15px;font-weight:500;line-height:24px}}.mfui-property__icon{display:inline-block;height:24px;margin-left:1px;margin-right:8px;overflow:hidden;vertical-align:bottom;width:24px}.mfui-property__badge{margin-bottom:8px}@media screen and (min-width:768px){.mfui-property__title .mfui-property__desc{width:100%}}.mfui-property__tooltip{cursor:pointer;display:inline-block;height:20px;margin-left:8px;vertical-align:text-bottom;width:20px;fill:var(--spbSky2)}.mfui-property__tooltip-inner{max-width:350px}.mfui-property__desc{margin-top:12px}@media screen and (min-width:768px){.mfui-property__desc{width:70%}}.mfui-property__desc_collapsible{margin-top:12px}.mfui-property__value-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;border-radius:8px;padding:4px 8px;text-align:right;white-space:pre-line}.mfui-property__value-wrapper_frame_default{background:var(--base)}.mfui-property__value-wrapper_frame_gray{background:var(--spbSky0)}.mfui-property__value{font-size:18px;font-weight:500;letter-spacing:.5px;line-height:24px}@media screen and (min-width:1280px){.mfui-property__value{font-size:20px;line-height:28px}}@media screen and (max-width:767px){.mfui-property__value{font-size:15px;font-weight:500;line-height:24px}}.mfui-property__value-unit:before{content:" "}
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5 {
6
+ margin: 0;
7
+ }
8
+ .mfui-property__wrapper {
9
+ display: -webkit-box;
10
+ display: -ms-flexbox;
11
+ display: flex;
12
+ -webkit-box-orient: vertical;
13
+ -webkit-box-direction: normal;
14
+ -ms-flex-direction: column;
15
+ flex-direction: column;
16
+ padding: 24px 0;
17
+ }
18
+ .mfui-property_border-top.mfui-property_border-color_default .mfui-property__wrapper {
19
+ border-top: 1px solid var(--spbSky1);
20
+ }
21
+ .mfui-property_border-bottom.mfui-property_border-color_default .mfui-property__wrapper {
22
+ border-bottom: 1px solid var(--spbSky1);
23
+ }
24
+ .mfui-property_border-top.mfui-property_border-color_darker .mfui-property__wrapper {
25
+ border-top: 1px solid var(--spbSky2);
26
+ }
27
+ .mfui-property_border-bottom.mfui-property_border-color_darker .mfui-property__wrapper {
28
+ border-bottom: 1px solid var(--spbSky2);
29
+ }
30
+ .mfui-property__main {
31
+ display: -webkit-box;
32
+ display: -ms-flexbox;
33
+ display: flex;
34
+ gap: 20px;
35
+ -webkit-box-align: baseline;
36
+ -ms-flex-align: baseline;
37
+ align-items: baseline;
38
+ -webkit-box-pack: justify;
39
+ -ms-flex-pack: justify;
40
+ justify-content: space-between;
41
+ }
42
+ .mfui-property__main:not(:first-child) {
43
+ margin-top: 24px;
44
+ }
45
+ .mfui-property__main_with-out-title {
46
+ margin-top: 16px !important;
47
+ }
48
+ .mfui-property__main_with-badge {
49
+ -webkit-box-align: center;
50
+ -ms-flex-align: center;
51
+ align-items: center;
52
+ }
53
+ .mfui-property__title-item_size_default {
54
+ font-size: 15px;
55
+ line-height: 24px;
56
+ font-weight: 500;
57
+ }
58
+ .mfui-property__title-item_size_big {
59
+ font-weight: 500;
60
+ font-size: 18px;
61
+ line-height: 24px;
62
+ letter-spacing: 0.5px;
63
+ }
64
+ @media screen and (min-width: 1280px) {
65
+ .mfui-property__title-item_size_big {
66
+ font-size: 20px;
67
+ line-height: 28px;
68
+ }
69
+ }
70
+ @media screen and (max-width: 767px) {
71
+ .mfui-property__title-item {
72
+ font-size: 15px;
73
+ line-height: 24px;
74
+ font-weight: 500;
75
+ }
76
+ }
77
+ .mfui-property__icon {
78
+ display: inline-block;
79
+ width: 24px;
80
+ height: 24px;
81
+ margin-right: 8px;
82
+ margin-left: 1px;
83
+ overflow: hidden;
84
+ vertical-align: bottom;
85
+ }
86
+ .mfui-property__badge {
87
+ margin-bottom: 8px;
88
+ }
89
+ @media screen and (min-width: 768px) {
90
+ .mfui-property__title .mfui-property__desc {
91
+ width: 100%;
92
+ }
93
+ }
94
+ .mfui-property__tooltip {
95
+ display: inline-block;
96
+ width: 20px;
97
+ height: 20px;
98
+ margin-left: 8px;
99
+ vertical-align: text-bottom;
100
+ cursor: pointer;
101
+ fill: var(--spbSky2);
102
+ }
103
+ .mfui-property__tooltip-inner {
104
+ max-width: 350px;
105
+ }
106
+ .mfui-property__desc {
107
+ margin-top: 12px;
108
+ }
109
+ @media screen and (min-width: 768px) {
110
+ .mfui-property__desc {
111
+ width: 70%;
112
+ }
113
+ }
114
+ .mfui-property__desc_collapsible {
115
+ margin-top: 12px;
116
+ }
117
+ .mfui-property__value-wrapper {
118
+ display: -webkit-box;
119
+ display: -ms-flexbox;
120
+ display: flex;
121
+ -webkit-box-align: baseline;
122
+ -ms-flex-align: baseline;
123
+ align-items: baseline;
124
+ padding: 4px 8px;
125
+ border-radius: 8px;
126
+ white-space: pre-line;
127
+ text-align: right;
128
+ }
129
+ .mfui-property__value-wrapper_frame_default {
130
+ background: var(--base);
131
+ }
132
+ .mfui-property__value-wrapper_frame_gray {
133
+ background: var(--spbSky0);
134
+ }
135
+ .mfui-property__value {
136
+ font-weight: 500;
137
+ font-size: 18px;
138
+ line-height: 24px;
139
+ letter-spacing: 0.5px;
140
+ }
141
+ @media screen and (min-width: 1280px) {
142
+ .mfui-property__value {
143
+ font-size: 20px;
144
+ line-height: 28px;
145
+ }
146
+ }
147
+ @media screen and (max-width: 767px) {
148
+ .mfui-property__value {
149
+ font-size: 15px;
150
+ line-height: 24px;
151
+ font-weight: 500;
152
+ }
153
+ }
154
+ .mfui-property__value-unit:before {
155
+ content: '\00a0';
156
+ }
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
1
+ import React, { Ref, ComponentProps } from 'react';
2
2
  import { PromoBadge } from '@megafon/ui-core';
3
- import './Property.scss';
3
+ import './Property.less';
4
4
  import { Item } from './types';
5
5
  export interface IProperty {
6
6
  /** Ссылка на корневой элемент */
7
- rootRef?: React.Ref<HTMLDivElement>;
7
+ rootRef?: Ref<HTMLDivElement>;
8
8
  /** Массив с данными для строки */
9
9
  items: Item[];
10
10
  /** Дополнительный класс для основного контейнера */
@@ -12,7 +12,7 @@ export interface IProperty {
12
12
  /** Текст для бейджа */
13
13
  badge?: string;
14
14
  /** Тип бейджа */
15
- badgeType?: React.ComponentProps<typeof PromoBadge>['type'];
15
+ badgeType?: ComponentProps<typeof PromoBadge>['type'];
16
16
  /** Текст тултипа */
17
17
  tooltip?: string;
18
18
  /** Отключить верхнюю границу */
@@ -1,13 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import "core-js/modules/es.array.map.js";
2
3
  import "core-js/modules/es.symbol.js";
3
4
  import "core-js/modules/es.symbol.description.js";
4
- import "core-js/modules/es.array.map.js";
5
- import * as React from 'react';
5
+ import React, { Fragment, useRef } from 'react';
6
6
  import { Grid, GridColumn, PromoBadge, Caption, Tooltip } from '@megafon/ui-core';
7
7
  import { cnCreate, filterDataAttrs, convert } from '@megafon/ui-helpers';
8
+ import PropTypes from 'prop-types';
8
9
  import "./Property.css";
9
10
  import { getColumnConfig } from "../../helpers/getColumnConfig";
10
11
  import PropertyDescription from "./PropertyDescription";
12
+
11
13
  var InfoIcon = function InfoIcon(props) {
12
14
  return /*#__PURE__*/React.createElement("svg", _extends({
13
15
  viewBox: "0 0 20 20"
@@ -15,34 +17,37 @@ var InfoIcon = function InfoIcon(props) {
15
17
  d: "M10 2c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8zm0 5c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1zm1 8V9H9v6h2z"
16
18
  }));
17
19
  };
20
+
18
21
  export var testIdPrefix = 'Property';
19
22
  var cn = cnCreate('mfui-property');
23
+
20
24
  var Property = function Property(_ref) {
21
25
  var rootRef = _ref.rootRef,
22
- items = _ref.items,
23
- className = _ref.className,
24
- _ref$badge = _ref.badge,
25
- badge = _ref$badge === void 0 ? '' : _ref$badge,
26
- _ref$badgeType = _ref.badgeType,
27
- badgeType = _ref$badgeType === void 0 ? 'popular' : _ref$badgeType,
28
- tooltip = _ref.tooltip,
29
- icon = _ref.icon,
30
- _ref$disableBorderTop = _ref.disableBorderTop,
31
- disableBorderTop = _ref$disableBorderTop === void 0 ? false : _ref$disableBorderTop,
32
- _ref$borderBottom = _ref.borderBottom,
33
- borderBottom = _ref$borderBottom === void 0 ? false : _ref$borderBottom,
34
- _ref$borderColor = _ref.borderColor,
35
- borderColor = _ref$borderColor === void 0 ? 'default' : _ref$borderColor,
36
- _ref$mergedValue = _ref.mergedValue,
37
- mergedValue = _ref$mergedValue === void 0 ? '' : _ref$mergedValue,
38
- _ref$fullWidth = _ref.fullWidth,
39
- fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
40
- _ref$classes = _ref.classes,
41
- classes = _ref$classes === void 0 ? {} : _ref$classes,
42
- dataAttrs = _ref.dataAttrs;
43
- var tooltipRef = React.useRef(null);
44
- var renderTitle = function renderTitle(titles, titleSize, isFirstItem) {
45
- return titles === null || titles === void 0 ? void 0 : titles.map(function (titleItem, i) {
26
+ items = _ref.items,
27
+ className = _ref.className,
28
+ _ref$badge = _ref.badge,
29
+ badge = _ref$badge === void 0 ? '' : _ref$badge,
30
+ _ref$badgeType = _ref.badgeType,
31
+ badgeType = _ref$badgeType === void 0 ? 'popular' : _ref$badgeType,
32
+ tooltip = _ref.tooltip,
33
+ icon = _ref.icon,
34
+ _ref$disableBorderTop = _ref.disableBorderTop,
35
+ disableBorderTop = _ref$disableBorderTop === void 0 ? false : _ref$disableBorderTop,
36
+ _ref$borderBottom = _ref.borderBottom,
37
+ borderBottom = _ref$borderBottom === void 0 ? false : _ref$borderBottom,
38
+ _ref$borderColor = _ref.borderColor,
39
+ borderColor = _ref$borderColor === void 0 ? 'default' : _ref$borderColor,
40
+ _ref$mergedValue = _ref.mergedValue,
41
+ mergedValue = _ref$mergedValue === void 0 ? '' : _ref$mergedValue,
42
+ _ref$fullWidth = _ref.fullWidth,
43
+ fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
44
+ _ref$classes = _ref.classes,
45
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
46
+ dataAttrs = _ref.dataAttrs;
47
+ var tooltipRef = useRef(null);
48
+
49
+ var renderTitle = function renderTitle(title, titleSize, isFirstItem) {
50
+ return title && title.map(function (titleItem, i) {
46
51
  var isFirstTitle = i === 0;
47
52
  return /*#__PURE__*/React.createElement("div", {
48
53
  key: i,
@@ -61,10 +66,11 @@ var Property = function Property(_ref) {
61
66
  }, tooltip)));
62
67
  });
63
68
  };
69
+
64
70
  var renderDescription = function renderDescription(description) {
65
- return description === null || description === void 0 ? void 0 : description.map(function (_ref2, j) {
71
+ return description && description.map(function (_ref2, j) {
66
72
  var value = _ref2.value,
67
- isCollapsible = _ref2.isCollapsible;
73
+ isCollapsible = _ref2.isCollapsible;
68
74
  return /*#__PURE__*/React.createElement("div", {
69
75
  className: cn('desc', {
70
76
  collapsible: isCollapsible
@@ -83,6 +89,7 @@ var Property = function Property(_ref) {
83
89
  }));
84
90
  });
85
91
  };
92
+
86
93
  var renderValue = function renderValue(valueFrameColor, value, valueUnit) {
87
94
  return /*#__PURE__*/React.createElement("div", {
88
95
  className: cn('value-wrapper', {
@@ -96,6 +103,7 @@ var Property = function Property(_ref) {
96
103
  hasMargin: false
97
104
  }, convert(valueUnit, {})));
98
105
  };
106
+
99
107
  return /*#__PURE__*/React.createElement("div", _extends({
100
108
  className: cn({
101
109
  'border-top': !disableBorderTop,
@@ -113,17 +121,17 @@ var Property = function Property(_ref) {
113
121
  className: cn('wrapper')
114
122
  }, items.map(function (_ref3, i) {
115
123
  var title = _ref3.title,
116
- value = _ref3.value,
117
- description = _ref3.description,
118
- _ref3$valueUnit = _ref3.valueUnit,
119
- valueUnit = _ref3$valueUnit === void 0 ? '' : _ref3$valueUnit,
120
- _ref3$titleSize = _ref3.titleSize,
121
- titleSize = _ref3$titleSize === void 0 ? 'default' : _ref3$titleSize,
122
- _ref3$valueFrameColor = _ref3.valueFrameColor,
123
- valueFrameColor = _ref3$valueFrameColor === void 0 ? 'none' : _ref3$valueFrameColor;
124
+ value = _ref3.value,
125
+ description = _ref3.description,
126
+ _ref3$valueUnit = _ref3.valueUnit,
127
+ valueUnit = _ref3$valueUnit === void 0 ? '' : _ref3$valueUnit,
128
+ _ref3$titleSize = _ref3.titleSize,
129
+ titleSize = _ref3$titleSize === void 0 ? 'default' : _ref3$titleSize,
130
+ _ref3$valueFrameColor = _ref3.valueFrameColor,
131
+ valueFrameColor = _ref3$valueFrameColor === void 0 ? 'none' : _ref3$valueFrameColor;
124
132
  var isFirstItem = i === 0;
125
133
  var isRenderBadge = isFirstItem && !!badge;
126
- return /*#__PURE__*/React.createElement(React.Fragment, {
134
+ return /*#__PURE__*/React.createElement(Fragment, {
127
135
  key: i
128
136
  }, /*#__PURE__*/React.createElement("div", {
129
137
  className: cn('main', {
@@ -138,4 +146,40 @@ var Property = function Property(_ref) {
138
146
  }, badge), title ? renderTitle(title, titleSize, isFirstItem) : renderDescription(description)), mergedValue && isFirstItem && renderValue(valueFrameColor, mergedValue, valueUnit), !mergedValue && value && renderValue(valueFrameColor, value, valueUnit)), title && renderDescription(description));
139
147
  })))));
140
148
  };
149
+
150
+ Property.propTypes = {
151
+ rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
152
+ current: PropTypes.elementType
153
+ }), PropTypes.any])]),
154
+ items: PropTypes.arrayOf(PropTypes.shape({
155
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]),
156
+ description: PropTypes.arrayOf(PropTypes.shape({
157
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]).isRequired,
158
+ isCollapsible: PropTypes.bool
159
+ })),
160
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
161
+ titleSize: PropTypes.oneOf(['default', 'big']),
162
+ valueUnit: PropTypes.string,
163
+ valueFrameColor: PropTypes.oneOf(['none', 'default', 'gray'])
164
+ }).isRequired).isRequired,
165
+ className: PropTypes.string,
166
+ badge: PropTypes.string,
167
+ badgeType: PropTypes.oneOf(['hit', 'new', 'vip', 'popular', 'user-choice', 'interests']),
168
+ tooltip: PropTypes.string,
169
+ disableBorderTop: PropTypes.bool,
170
+ borderBottom: PropTypes.bool,
171
+ borderColor: PropTypes.oneOf(['default', 'darker']),
172
+ mergedValue: PropTypes.string,
173
+ icon: PropTypes.node,
174
+ fullWidth: PropTypes.bool,
175
+ dataAttrs: PropTypes.shape({
176
+ root: PropTypes.objectOf(PropTypes.string.isRequired),
177
+ moreLink: PropTypes.objectOf(PropTypes.string.isRequired)
178
+ }),
179
+ classes: PropTypes.shape({
180
+ title: PropTypes.string,
181
+ openedDescription: PropTypes.string,
182
+ toggleDescription: PropTypes.string
183
+ })
184
+ };
141
185
  export default Property;
@@ -1 +1,17 @@
1
- h1,h2,h3,h4,h5{margin:0}.mfui-property-description__collapse{color:var(--systemBlue);cursor:pointer;font-size:12px;-webkit-text-decoration:underline dashed var(--systemBlue);text-decoration:underline dashed var(--systemBlue)}.mfui-property-description__content-inner{margin-bottom:8px}
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5 {
6
+ margin: 0;
7
+ }
8
+ .mfui-property-description__collapse {
9
+ color: var(--systemBlue);
10
+ font-size: 12px;
11
+ -webkit-text-decoration: underline dashed var(--systemBlue);
12
+ text-decoration: underline dashed var(--systemBlue);
13
+ cursor: pointer;
14
+ }
15
+ .mfui-property-description__content-inner {
16
+ margin-bottom: 8px;
17
+ }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import './PropertyDescription.scss';
3
- import { DescriptionType } from './types';
2
+ import './PropertyDescription.less';
3
+ import { Desc } from './types';
4
4
  export declare const testIdPrefix = "PropertyDescription";
5
- declare const PropertyDescription: React.FC<DescriptionType>;
5
+ declare const PropertyDescription: React.FC<Desc>;
6
6
  export default PropertyDescription;
@@ -1,27 +1,34 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+
3
4
  /* eslint-disable jsx-a11y/no-static-element-interactions */
5
+
4
6
  /* eslint-disable jsx-a11y/click-events-have-key-events */
5
7
  import * as React from 'react';
6
8
  import { Collapse } from '@megafon/ui-core';
7
9
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
10
+ import PropTypes from 'prop-types';
8
11
  import "./PropertyDescription.css";
9
12
  export var testIdPrefix = 'PropertyDescription';
10
13
  var cn = cnCreate('mfui-property-description');
14
+
11
15
  var PropertyDescription = function PropertyDescription(_ref) {
12
16
  var value = _ref.value,
13
- _ref$isCollapsible = _ref.isCollapsible,
14
- isCollapsible = _ref$isCollapsible === void 0 ? false : _ref$isCollapsible,
15
- _ref$classes = _ref.classes,
16
- classes = _ref$classes === void 0 ? {} : _ref$classes,
17
- dataAttrs = _ref.dataAttrs;
17
+ _ref$isCollapsible = _ref.isCollapsible,
18
+ isCollapsible = _ref$isCollapsible === void 0 ? false : _ref$isCollapsible,
19
+ _ref$classes = _ref.classes,
20
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
21
+ dataAttrs = _ref.dataAttrs;
22
+
18
23
  var _React$useState = React.useState(false),
19
- _React$useState2 = _slicedToArray(_React$useState, 2),
20
- isOpened = _React$useState2[0],
21
- setIsOpened = _React$useState2[1];
24
+ _React$useState2 = _slicedToArray(_React$useState, 2),
25
+ isOpened = _React$useState2[0],
26
+ setIsOpened = _React$useState2[1];
27
+
22
28
  var handleClickDesc = React.useCallback(function () {
23
29
  return setIsOpened(!isOpened);
24
30
  }, [isOpened]);
31
+
25
32
  if (isCollapsible) {
26
33
  return /*#__PURE__*/React.createElement("div", {
27
34
  className: cn([isOpened ? classes.open : undefined]),
@@ -36,8 +43,21 @@ var PropertyDescription = function PropertyDescription(_ref) {
36
43
  className: cn('collapse', classes.toggle)
37
44
  }), isOpened ? 'Скрыть' : 'Подробнее'));
38
45
  }
46
+
39
47
  return /*#__PURE__*/React.createElement("div", {
40
48
  className: cn()
41
49
  }, value);
42
50
  };
51
+
52
+ PropertyDescription.propTypes = {
53
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node)]).isRequired,
54
+ isCollapsible: PropTypes.bool,
55
+ classes: PropTypes.shape({
56
+ open: PropTypes.string,
57
+ toggle: PropTypes.string
58
+ }),
59
+ dataAttrs: PropTypes.shape({
60
+ moreLink: PropTypes.objectOf(PropTypes.string.isRequired)
61
+ })
62
+ };
43
63
  export default PropertyDescription;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export type DescriptionType = {
2
+ export declare type Desc = {
3
3
  value: string | React.ReactNode[];
4
4
  isCollapsible?: boolean;
5
5
  classes?: {
@@ -10,12 +10,10 @@ export type DescriptionType = {
10
10
  moreLink?: Record<string, string>;
11
11
  };
12
12
  };
13
- export type TitleSizeType = 'default' | 'big';
14
- export type ValueFrameColor = 'none' | 'default' | 'gray';
15
- export type Item = {
16
- title?: React.ReactNode[];
17
- titleSize?: TitleSizeType;
18
- description?: DescriptionType[];
13
+ export declare type Item = {
14
+ title?: string[] | React.ReactNode[];
15
+ titleSize?: 'default' | 'big';
16
+ description?: Desc[];
19
17
  value?: string | React.ReactNode;
20
18
  valueUnit?: string;
21
19
  valueFrameColor?: 'none' | 'default' | 'gray';
@@ -1 +0,0 @@
1
- export {};