@megafon/ui-shared 5.17.0 → 6.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/dist/es/components/AccordionBox/AccordionBox.css +1 -15
  2. package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -2
  3. package/dist/es/components/AccordionBox/AccordionBox.js +6 -49
  4. package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +2 -2
  5. package/dist/es/components/AudioPlayer/AudioPlayer.js +11 -27
  6. package/dist/es/components/AudioPlayer/AudioProgress.d.ts +1 -1
  7. package/dist/es/components/AudioPlayer/AudioProgress.js +10 -22
  8. package/dist/es/components/AudioPlayer/AudioRange.d.ts +1 -1
  9. package/dist/es/components/AudioPlayer/AudioRange.js +8 -10
  10. package/dist/es/components/AudioPlayer/AudioVolume.d.ts +1 -1
  11. package/dist/es/components/AudioPlayer/AudioVolume.js +3 -12
  12. package/dist/es/components/AudioPlayer/hooks/useTrackDuration.js +4 -10
  13. package/dist/es/components/AudioPlayer/timerFormatUtil.js +1 -9
  14. package/dist/es/components/BannerBox/BannerBox.d.ts +1 -1
  15. package/dist/es/components/BannerBox/BannerBox.js +3 -12
  16. package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
  17. package/dist/es/components/BenefitsIcons/BenefitsIcons.js +23 -64
  18. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
  19. package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +9 -36
  20. package/dist/es/components/BenefitsIcons/helpers.d.ts +3 -3
  21. package/dist/es/components/BenefitsIcons/helpers.js +6 -20
  22. package/dist/es/components/BenefitsIcons/types.d.ts +5 -5
  23. package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  24. package/dist/es/components/BenefitsPictures/BenefitsPictures.js +19 -49
  25. package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -43
  26. package/dist/es/components/BenefitsPictures/helpers.d.ts +2 -2
  27. package/dist/es/components/BenefitsPictures/helpers.js +0 -14
  28. package/dist/es/components/BenefitsPictures/types.d.ts +3 -3
  29. package/dist/es/components/BenefitsPictures/types.js +1 -0
  30. package/dist/es/components/Breadcrumbs/Breadcrumbs.css +1 -43
  31. package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
  32. package/dist/es/components/Breadcrumbs/Breadcrumbs.js +10 -39
  33. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
  34. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +11 -36
  35. package/dist/es/components/ButtonBanner/ButtonBanner.css +1 -122
  36. package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +7 -7
  37. package/dist/es/components/ButtonBanner/ButtonBanner.js +22 -53
  38. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
  39. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
  40. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +20 -51
  41. package/dist/es/components/Card/Card.d.ts +4 -4
  42. package/dist/es/components/Card/Card.js +25 -115
  43. package/dist/es/components/Card/types.d.ts +10 -10
  44. package/dist/es/components/Card/types.js +1 -0
  45. package/dist/es/components/CardsBox/CardsBox.js +3 -14
  46. package/dist/es/components/CardsBox/helpers.d.ts +2 -2
  47. package/dist/es/components/CardsBox/helpers.js +0 -4
  48. package/dist/es/components/CarouselBox/CarouselBox.d.ts +2 -2
  49. package/dist/es/components/CarouselBox/CarouselBox.js +11 -24
  50. package/dist/es/components/Container/Container.d.ts +7 -5
  51. package/dist/es/components/Container/Container.js +10 -25
  52. package/dist/es/components/DownloadLinks/DownloadLink.d.ts +1 -1
  53. package/dist/es/components/DownloadLinks/DownloadLink.js +13 -44
  54. package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +3 -3
  55. package/dist/es/components/DownloadLinks/DownloadLinks.js +2 -13
  56. package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +5 -2
  57. package/dist/es/components/FaqWrapper/FaqWrapper.js +1 -3
  58. package/dist/es/components/ImageBanner/ImageBanner.d.ts +8 -7
  59. package/dist/es/components/ImageBanner/ImageBanner.js +37 -88
  60. package/dist/es/components/Instructions/Instructions.d.ts +11 -11
  61. package/dist/es/components/Instructions/Instructions.js +41 -94
  62. package/dist/es/components/NotificationBox/NotificationBox.d.ts +4 -4
  63. package/dist/es/components/NotificationBox/NotificationBox.js +5 -19
  64. package/dist/es/components/PageTitle/PageTitle.d.ts +2 -2
  65. package/dist/es/components/PageTitle/PageTitle.js +12 -37
  66. package/dist/es/components/Partners/Partners.d.ts +2 -2
  67. package/dist/es/components/Partners/Partners.js +17 -48
  68. package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
  69. package/dist/es/components/PictureWithDescription/PictureWithDescription.js +10 -28
  70. package/dist/es/components/Property/Property.d.ts +4 -4
  71. package/dist/es/components/Property/Property.js +37 -81
  72. package/dist/es/components/Property/PropertyDescription.d.ts +3 -3
  73. package/dist/es/components/Property/PropertyDescription.js +8 -28
  74. package/dist/es/components/Property/types.d.ts +7 -5
  75. package/dist/es/components/Property/types.js +1 -0
  76. package/dist/es/components/Steps/Steps.d.ts +2 -1
  77. package/dist/es/components/Steps/Steps.js +4 -19
  78. package/dist/es/components/Steps/StepsItem.d.ts +2 -2
  79. package/dist/es/components/Steps/StepsItem.js +2 -9
  80. package/dist/es/components/StoreBanner/StoreBanner.d.ts +5 -5
  81. package/dist/es/components/StoreBanner/StoreBanner.js +41 -97
  82. package/dist/es/components/StoreButton/StoreButton.d.ts +3 -3
  83. package/dist/es/components/StoreButton/StoreButton.js +13 -44
  84. package/dist/es/components/Table/Table.d.ts +1 -1
  85. package/dist/es/components/Table/Table.js +31 -51
  86. package/dist/es/components/Table/TableCell.js +0 -6
  87. package/dist/es/components/Table/TableRow.js +1 -10
  88. package/dist/es/components/TabsBox/TabsBox.d.ts +1 -1
  89. package/dist/es/components/TabsBox/TabsBox.js +4 -13
  90. package/dist/es/components/TextBox/TextBox.d.ts +2 -1
  91. package/dist/es/components/TextBox/TextBox.js +8 -23
  92. package/dist/es/components/TextBox/TextBoxPicture.d.ts +2 -2
  93. package/dist/es/components/TextBox/TextBoxPicture.js +5 -14
  94. package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +1 -1
  95. package/dist/es/components/TextWithIcon/TextWithIcon.js +6 -24
  96. package/dist/es/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
  97. package/dist/es/components/TextWithIcon/TextWithIconItem.js +6 -21
  98. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  99. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +6 -23
  100. package/dist/es/components/VideoBanner/VideoBanner.d.ts +7 -7
  101. package/dist/es/components/VideoBanner/VideoBanner.js +47 -110
  102. package/dist/es/components/VideoBlock/VideoBlock.d.ts +4 -4
  103. package/dist/es/components/VideoBlock/VideoBlock.js +35 -75
  104. package/dist/es/helpers/getColumnConfig.d.ts +5 -1
  105. package/dist/lib/components/AccordionBox/AccordionBox.css +1 -15
  106. package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -2
  107. package/dist/lib/components/AccordionBox/AccordionBox.js +10 -66
  108. package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +2 -2
  109. package/dist/lib/components/AudioPlayer/AudioPlayer.js +32 -56
  110. package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +1 -1
  111. package/dist/lib/components/AudioPlayer/AudioProgress.js +12 -43
  112. package/dist/lib/components/AudioPlayer/AudioRange.d.ts +1 -1
  113. package/dist/lib/components/AudioPlayer/AudioRange.js +9 -17
  114. package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +1 -1
  115. package/dist/lib/components/AudioPlayer/AudioVolume.js +4 -23
  116. package/dist/lib/components/AudioPlayer/hooks/useTrackDuration.js +5 -16
  117. package/dist/lib/components/AudioPlayer/timerFormatUtil.js +2 -13
  118. package/dist/lib/components/BannerBox/BannerBox.d.ts +1 -1
  119. package/dist/lib/components/BannerBox/BannerBox.js +7 -25
  120. package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +1 -1
  121. package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +26 -86
  122. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +1 -1
  123. package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +13 -53
  124. package/dist/lib/components/BenefitsIcons/helpers.d.ts +3 -3
  125. package/dist/lib/components/BenefitsIcons/helpers.js +10 -37
  126. package/dist/lib/components/BenefitsIcons/types.d.ts +5 -5
  127. package/dist/lib/components/BenefitsIcons/types.js +5 -8
  128. package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +1 -1
  129. package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +24 -71
  130. package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -43
  131. package/dist/lib/components/BenefitsPictures/helpers.d.ts +2 -2
  132. package/dist/lib/components/BenefitsPictures/helpers.js +9 -40
  133. package/dist/lib/components/BenefitsPictures/types.d.ts +3 -3
  134. package/dist/lib/components/BenefitsPictures/types.js +5 -1
  135. package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +1 -43
  136. package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
  137. package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +18 -60
  138. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +4 -4
  139. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +22 -55
  140. package/dist/lib/components/ButtonBanner/ButtonBanner.css +1 -122
  141. package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +7 -7
  142. package/dist/lib/components/ButtonBanner/ButtonBanner.js +40 -89
  143. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.css +1 -19
  144. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +3 -3
  145. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +29 -72
  146. package/dist/lib/components/Card/Card.d.ts +4 -4
  147. package/dist/lib/components/Card/Card.js +67 -164
  148. package/dist/lib/components/Card/types.d.ts +10 -10
  149. package/dist/lib/components/Card/types.js +5 -1
  150. package/dist/lib/components/CardsBox/CardsBox.js +7 -31
  151. package/dist/lib/components/CardsBox/helpers.d.ts +2 -2
  152. package/dist/lib/components/CardsBox/helpers.js +1 -8
  153. package/dist/lib/components/CarouselBox/CarouselBox.d.ts +2 -2
  154. package/dist/lib/components/CarouselBox/CarouselBox.js +15 -39
  155. package/dist/lib/components/Container/Container.d.ts +7 -5
  156. package/dist/lib/components/Container/Container.js +18 -40
  157. package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +1 -1
  158. package/dist/lib/components/DownloadLinks/DownloadLink.js +17 -60
  159. package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +3 -3
  160. package/dist/lib/components/DownloadLinks/DownloadLinks.js +8 -33
  161. package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +5 -2
  162. package/dist/lib/components/FaqWrapper/FaqWrapper.js +6 -9
  163. package/dist/lib/components/ImageBanner/ImageBanner.d.ts +8 -7
  164. package/dist/lib/components/ImageBanner/ImageBanner.js +61 -138
  165. package/dist/lib/components/Instructions/Instructions.d.ts +11 -11
  166. package/dist/lib/components/Instructions/Instructions.js +103 -186
  167. package/dist/lib/components/NotificationBox/NotificationBox.d.ts +4 -4
  168. package/dist/lib/components/NotificationBox/NotificationBox.js +9 -37
  169. package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -2
  170. package/dist/lib/components/PageTitle/PageTitle.js +15 -52
  171. package/dist/lib/components/Partners/Partners.d.ts +2 -2
  172. package/dist/lib/components/Partners/Partners.js +21 -65
  173. package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +4 -2
  174. package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +16 -46
  175. package/dist/lib/components/Property/Property.d.ts +4 -4
  176. package/dist/lib/components/Property/Property.js +60 -120
  177. package/dist/lib/components/Property/PropertyDescription.d.ts +3 -3
  178. package/dist/lib/components/Property/PropertyDescription.js +15 -46
  179. package/dist/lib/components/Property/types.d.ts +7 -5
  180. package/dist/lib/components/Property/types.js +5 -1
  181. package/dist/lib/components/Steps/Steps.d.ts +2 -1
  182. package/dist/lib/components/Steps/Steps.js +8 -35
  183. package/dist/lib/components/Steps/StepsItem.d.ts +2 -2
  184. package/dist/lib/components/Steps/StepsItem.js +11 -23
  185. package/dist/lib/components/StoreBanner/StoreBanner.d.ts +5 -5
  186. package/dist/lib/components/StoreBanner/StoreBanner.js +47 -118
  187. package/dist/lib/components/StoreButton/StoreButton.d.ts +3 -3
  188. package/dist/lib/components/StoreButton/StoreButton.js +17 -63
  189. package/dist/lib/components/Table/Table.d.ts +1 -1
  190. package/dist/lib/components/Table/Table.js +35 -68
  191. package/dist/lib/components/Table/TableCell.js +4 -16
  192. package/dist/lib/components/Table/TableRow.js +5 -19
  193. package/dist/lib/components/TabsBox/TabBox.js +1 -4
  194. package/dist/lib/components/TabsBox/TabsBox.d.ts +1 -1
  195. package/dist/lib/components/TabsBox/TabsBox.js +8 -26
  196. package/dist/lib/components/TextBox/TextBox.d.ts +2 -1
  197. package/dist/lib/components/TextBox/TextBox.js +12 -36
  198. package/dist/lib/components/TextBox/TextBoxPicture.d.ts +2 -2
  199. package/dist/lib/components/TextBox/TextBoxPicture.js +11 -29
  200. package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +1 -1
  201. package/dist/lib/components/TextWithIcon/TextWithIcon.js +10 -39
  202. package/dist/lib/components/TextWithIcon/TextWithIconItem.d.ts +1 -1
  203. package/dist/lib/components/TextWithIcon/TextWithIconItem.js +10 -37
  204. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +1 -1
  205. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +10 -40
  206. package/dist/lib/components/VideoBanner/VideoBanner.d.ts +7 -7
  207. package/dist/lib/components/VideoBanner/VideoBanner.js +83 -176
  208. package/dist/lib/components/VideoBlock/VideoBlock.d.ts +4 -4
  209. package/dist/lib/components/VideoBlock/VideoBlock.js +58 -114
  210. package/dist/lib/constants/throttleTime.js +2 -3
  211. package/dist/lib/helpers/getColumnConfig.d.ts +5 -1
  212. package/dist/lib/helpers/getColumnConfig.js +2 -5
  213. package/dist/lib/index.js +10 -57
  214. package/package.json +87 -92
  215. package/CHANGELOG.md +0 -4002
  216. package/dist/es/components/AudioPlayer/style/AudioPlayer.css +0 -58
  217. package/dist/es/components/AudioPlayer/style/AudioProgress.css +0 -35
  218. package/dist/es/components/AudioPlayer/style/AudioRange.css +0 -68
  219. package/dist/es/components/AudioPlayer/style/AudioVolume.css +0 -34
  220. package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
  221. package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
  222. package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
  223. package/dist/es/components/Card/Card.css +0 -354
  224. package/dist/es/components/Container/Container.css +0 -3245
  225. package/dist/es/components/DownloadLinks/DownloadLink.css +0 -37
  226. package/dist/es/components/DownloadLinks/DownloadLinks.css +0 -36
  227. package/dist/es/components/ImageBanner/ImageBanner.css +0 -252
  228. package/dist/es/components/Instructions/Instructions.css +0 -790
  229. package/dist/es/components/NotificationBox/style/NotificationBox.css +0 -28
  230. package/dist/es/components/PageTitle/PageTitle.css +0 -80
  231. package/dist/es/components/Partners/Partners.css +0 -53
  232. package/dist/es/components/PictureWithDescription/PictureWithDescription.css +0 -80
  233. package/dist/es/components/Property/Property.css +0 -156
  234. package/dist/es/components/Property/PropertyDescription.css +0 -17
  235. package/dist/es/components/Steps/Steps.css +0 -41
  236. package/dist/es/components/Steps/StepsItem.css +0 -42
  237. package/dist/es/components/StoreBanner/StoreBanner.css +0 -346
  238. package/dist/es/components/StoreBanner/doc/img/android-screen.png +0 -0
  239. package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
  240. package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
  241. package/dist/es/components/StoreButton/StoreButton.css +0 -327
  242. package/dist/es/components/Table/Table.css +0 -157
  243. package/dist/es/components/TextBox/TextBox.css +0 -25
  244. package/dist/es/components/TextBox/TextBoxPicture.css +0 -27
  245. package/dist/es/components/TextWithIcon/TextWithIcon.css +0 -10
  246. package/dist/es/components/TextWithIcon/TextWithIconItem.css +0 -29
  247. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
  248. package/dist/es/components/VideoBanner/VideoBanner.css +0 -225
  249. package/dist/es/components/VideoBlock/VideoBlock.css +0 -106
  250. package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +0 -58
  251. package/dist/lib/components/AudioPlayer/style/AudioProgress.css +0 -35
  252. package/dist/lib/components/AudioPlayer/style/AudioRange.css +0 -68
  253. package/dist/lib/components/AudioPlayer/style/AudioVolume.css +0 -34
  254. package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +0 -38
  255. package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +0 -90
  256. package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +0 -16
  257. package/dist/lib/components/Card/Card.css +0 -354
  258. package/dist/lib/components/Container/Container.css +0 -3245
  259. package/dist/lib/components/DownloadLinks/DownloadLink.css +0 -37
  260. package/dist/lib/components/DownloadLinks/DownloadLinks.css +0 -36
  261. package/dist/lib/components/ImageBanner/ImageBanner.css +0 -252
  262. package/dist/lib/components/Instructions/Instructions.css +0 -790
  263. package/dist/lib/components/NotificationBox/style/NotificationBox.css +0 -28
  264. package/dist/lib/components/PageTitle/PageTitle.css +0 -80
  265. package/dist/lib/components/Partners/Partners.css +0 -53
  266. package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +0 -80
  267. package/dist/lib/components/Property/Property.css +0 -156
  268. package/dist/lib/components/Property/PropertyDescription.css +0 -17
  269. package/dist/lib/components/Steps/Steps.css +0 -41
  270. package/dist/lib/components/Steps/StepsItem.css +0 -42
  271. package/dist/lib/components/StoreBanner/StoreBanner.css +0 -346
  272. package/dist/lib/components/StoreBanner/doc/img/android-screen.png +0 -0
  273. package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
  274. package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
  275. package/dist/lib/components/StoreButton/StoreButton.css +0 -327
  276. package/dist/lib/components/Table/Table.css +0 -157
  277. package/dist/lib/components/TextBox/TextBox.css +0 -25
  278. package/dist/lib/components/TextBox/TextBoxPicture.css +0 -27
  279. package/dist/lib/components/TextWithIcon/TextWithIcon.css +0 -10
  280. package/dist/lib/components/TextWithIcon/TextWithIconItem.css +0 -29
  281. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +0 -31
  282. package/dist/lib/components/VideoBanner/VideoBanner.css +0 -225
  283. package/dist/lib/components/VideoBlock/VideoBlock.css +0 -106
@@ -1,15 +1 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
- .mfui-accordion-box + .mfui-accordion-box {
9
- margin-top: 8px;
10
- }
11
- @media screen and (min-width: 768px) {
12
- .mfui-accordion-box + .mfui-accordion-box {
13
- margin-top: 12px;
14
- }
15
- }
1
+ h1,h2,h3,h4,h5{margin:0}.mfui-accordion-box+.mfui-accordion-box{margin-top:8px}@media screen and (min-width:768px){.mfui-accordion-box+.mfui-accordion-box{margin-top:12px}}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IHeaderProps } from '@megafon/ui-core/dist/lib/components/Header/Header';
3
- import './AccordionBox.less';
3
+ import './AccordionBox.scss';
4
4
  export interface IAccordionBox {
5
5
  /** Дополнительные data атрибуты к внутренним элементам */
6
6
  dataAttrs?: {
@@ -43,5 +43,5 @@ export interface IAccordionBox {
43
43
  /** Обработчик клика */
44
44
  onClickAccordion?: (isOpened: boolean) => void;
45
45
  }
46
- declare const AccordionBox: React.FC<IAccordionBox>;
46
+ declare const AccordionBox: React.FC<React.PropsWithChildren<IAccordionBox>>;
47
47
  export default AccordionBox;
@@ -1,57 +1,36 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
- require("core-js/modules/es.array.index-of.js");
13
-
14
9
  require("core-js/modules/es.symbol.js");
15
-
10
+ require("core-js/modules/es.array.index-of.js");
16
11
  var React = _interopRequireWildcard(require("react"));
17
-
18
12
  var _uiCore = require("@megafon/ui-core");
19
-
20
13
  var _uiHelpers = require("@megafon/ui-helpers");
21
-
22
- var PropTypes = _interopRequireWildcard(require("prop-types"));
23
-
24
14
  var _getColumnConfig = require("../../helpers/getColumnConfig");
25
-
26
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
-
28
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
-
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
30
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
-
32
18
  var __rest = void 0 && (void 0).__rest || function (s, e) {
33
19
  var t = {};
34
-
35
- for (var p in s) {
36
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
37
- }
38
-
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
39
21
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
40
22
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
41
23
  }
42
24
  return t;
43
25
  };
44
-
45
26
  var testIdPrefix = 'AccordionBox';
46
27
  var cn = (0, _uiHelpers.cnCreate)('mfui-accordion-box');
47
-
48
28
  var AccordionBox = function AccordionBox(_a) {
49
29
  var _a$hCenterAlignWide = _a.hCenterAlignWide,
50
- hCenterAlignWide = _a$hCenterAlignWide === void 0 ? false : _a$hCenterAlignWide,
51
- _a$isFullWidth = _a.isFullWidth,
52
- isFullWidth = _a$isFullWidth === void 0 ? false : _a$isFullWidth,
53
- restProps = __rest(_a, ["hCenterAlignWide", "isFullWidth"]);
54
-
30
+ hCenterAlignWide = _a$hCenterAlignWide === void 0 ? false : _a$hCenterAlignWide,
31
+ _a$isFullWidth = _a.isFullWidth,
32
+ isFullWidth = _a$isFullWidth === void 0 ? false : _a$isFullWidth,
33
+ restProps = __rest(_a, ["hCenterAlignWide", "isFullWidth"]);
55
34
  return /*#__PURE__*/React.createElement("div", {
56
35
  className: cn()
57
36
  }, /*#__PURE__*/React.createElement(_uiCore.Grid, {
@@ -69,39 +48,4 @@ var AccordionBox = function AccordionBox(_a) {
69
48
  }
70
49
  }), /*#__PURE__*/React.createElement(_uiCore.Accordion, restProps))));
71
50
  };
72
-
73
- AccordionBox.propTypes = {
74
- dataAttrs: PropTypes.shape({
75
- root: PropTypes.objectOf(PropTypes.string.isRequired),
76
- header: PropTypes.shape({
77
- root: PropTypes.objectOf(PropTypes.string.isRequired)
78
- }),
79
- collapse: PropTypes.shape({
80
- root: PropTypes.objectOf(PropTypes.string.isRequired),
81
- inner: PropTypes.objectOf(PropTypes.string.isRequired)
82
- }),
83
- titleWrap: PropTypes.objectOf(PropTypes.string.isRequired),
84
- arrowUp: PropTypes.objectOf(PropTypes.string.isRequired),
85
- arrowDown: PropTypes.objectOf(PropTypes.string.isRequired)
86
- }),
87
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
88
- current: PropTypes.elementType
89
- }), PropTypes.any])]),
90
- title: PropTypes.string.isRequired,
91
- titleTag: PropTypes.oneOf(['h1', 'h2', 'h3', 'h5']),
92
- isFullWidth: PropTypes.bool,
93
- isOpened: PropTypes.bool,
94
- hasMicrodata: PropTypes.bool,
95
- hCenterAlignWide: PropTypes.bool,
96
- className: PropTypes.string,
97
- classes: PropTypes.shape({
98
- openedClass: PropTypes.string,
99
- root: PropTypes.string,
100
- collapse: PropTypes.string,
101
- titleWrap: PropTypes.string,
102
- title: PropTypes.string
103
- }),
104
- onClickAccordion: PropTypes.func
105
- };
106
- var _default = AccordionBox;
107
- exports["default"] = _default;
51
+ var _default = exports["default"] = AccordionBox;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import './style/AudioPlayer.less';
1
+ import * as React from 'react';
2
+ import './style/AudioPlayer.scss';
3
3
  export interface IAudioPlayerProps {
4
4
  audioSrc: string;
5
5
  audioTitle: string;
@@ -1,120 +1,98 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports["default"] = void 0;
7
-
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
-
10
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
10
+ var React = _interopRequireWildcard(require("react"));
14
11
  var _uiCore = require("@megafon/ui-core");
15
-
16
12
  var _uiHelpers = require("@megafon/ui-helpers");
17
-
18
13
  var _AudioProgress = _interopRequireDefault(require("./AudioProgress"));
19
-
20
14
  var _AudioVolume = _interopRequireDefault(require("./AudioVolume"));
21
-
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
-
24
18
  var IconPause = function IconPause(props) {
25
- return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
19
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
26
20
  viewBox: "0 0 32 32"
27
- }, props), /*#__PURE__*/_react["default"].createElement("path", {
21
+ }, props), /*#__PURE__*/React.createElement("path", {
28
22
  d: "M11 10.5v11a.5.5 0 00.5.5h2a.5.5 0 00.5-.5v-11a.5.5 0 00-.5-.5h-2a.5.5 0 00-.5.5zm7 0v11a.5.5 0 00.5.5h2a.5.5 0 00.5-.5v-11a.5.5 0 00-.5-.5h-2a.5.5 0 00-.5.5z"
29
23
  }));
30
24
  };
31
-
32
25
  var IconPlay = function IconPlay(props) {
33
- return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
26
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
34
27
  viewBox: "0 0 32 32"
35
- }, props), /*#__PURE__*/_react["default"].createElement("path", {
28
+ }, props), /*#__PURE__*/React.createElement("path", {
36
29
  d: "M11.5 22.13V9.87a.5.5 0 01.752-.431l10.508 6.13a.5.5 0 010 .863l-10.508 6.13a.5.5 0 01-.752-.433z"
37
30
  }));
38
31
  };
39
-
40
32
  var cn = (0, _uiHelpers.cnCreate)('mfui-audio-player');
41
-
42
33
  var AudioPlayer = function AudioPlayer(_ref) {
43
34
  var audioSrc = _ref.audioSrc,
44
- audioTitle = _ref.audioTitle,
45
- _ref$position = _ref.position,
46
- position = _ref$position === void 0 ? 'center' : _ref$position,
47
- isFullWidth = _ref.isFullWidth;
48
-
49
- var audioRef = _react["default"].useRef(null);
50
-
51
- var _React$useState = _react["default"].useState(false),
52
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
53
- isPlaying = _React$useState2[0],
54
- setIsPlaying = _React$useState2[1];
55
-
56
- var _React$useState3 = _react["default"].useState(false),
57
- _React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
58
- isPause = _React$useState4[0],
59
- setIsPause = _React$useState4[1];
60
-
35
+ audioTitle = _ref.audioTitle,
36
+ _ref$position = _ref.position,
37
+ position = _ref$position === void 0 ? 'center' : _ref$position,
38
+ isFullWidth = _ref.isFullWidth;
39
+ var audioRef = React.useRef(null);
40
+ var _React$useState = React.useState(false),
41
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
42
+ isPlaying = _React$useState2[0],
43
+ setIsPlaying = _React$useState2[1];
44
+ var _React$useState3 = React.useState(false),
45
+ _React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
46
+ isPause = _React$useState4[0],
47
+ setIsPause = _React$useState4[1];
61
48
  var handlePLay = function handlePLay() {
62
49
  var _a;
63
-
64
50
  setIsPlaying(true);
65
51
  setIsPause(false);
66
52
  (_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.play();
67
53
  };
68
-
69
54
  var handlePause = function handlePause() {
70
55
  var _a;
71
-
72
56
  setIsPlaying(false);
73
57
  setIsPause(true);
74
58
  (_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.pause();
75
59
  };
76
-
77
60
  var handleChangeAudioCurrentTime = function handleChangeAudioCurrentTime(currentTime) {
78
61
  if (!audioRef || !audioRef.current) {
79
62
  return;
80
63
  }
81
-
82
64
  audioRef.current.currentTime = currentTime;
83
65
  };
84
-
85
66
  var handleChangeAudioVolume = function handleChangeAudioVolume(volume) {
86
67
  if (!audioRef || !audioRef.current) {
87
68
  return;
88
69
  }
89
-
90
70
  audioRef.current.volume = volume;
91
71
  audioRef.current.muted = !volume;
92
72
  };
93
-
94
- var playingIconHandleClick = _react["default"].useMemo(function () {
73
+ var playingIconHandleClick = React.useMemo(function () {
95
74
  return isPlaying ? handlePause : handlePLay;
96
75
  }, [isPlaying]);
97
-
98
- return /*#__PURE__*/_react["default"].createElement("div", {
76
+ return /*#__PURE__*/React.createElement("div", {
99
77
  className: cn({
100
78
  'full-width': isFullWidth,
101
79
  position: position
102
80
  }),
103
81
  "data-testid": "AudioPlayer"
104
- }, /*#__PURE__*/_react["default"].createElement("div", {
82
+ }, /*#__PURE__*/React.createElement("div", {
105
83
  className: cn('player')
106
- }, /*#__PURE__*/_react["default"].createElement("audio", {
84
+ }, /*#__PURE__*/React.createElement("audio", {
107
85
  className: cn('audio'),
108
86
  ref: audioRef,
109
87
  controls: false,
110
88
  "data-testid": "AudioPlayer-audio"
111
- }, /*#__PURE__*/_react["default"].createElement("source", {
89
+ }, /*#__PURE__*/React.createElement("source", {
112
90
  src: audioSrc,
113
91
  type: "audio/mpeg"
114
- })), /*#__PURE__*/_react["default"].createElement("div", {
92
+ })), /*#__PURE__*/React.createElement("div", {
115
93
  className: cn('playing-controls')
116
- }, /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
117
- icon: isPlaying ? /*#__PURE__*/_react["default"].createElement(IconPause, null) : /*#__PURE__*/_react["default"].createElement(IconPlay, null),
94
+ }, /*#__PURE__*/React.createElement(_uiCore.Button, {
95
+ icon: isPlaying ? /*#__PURE__*/React.createElement(IconPause, null) : /*#__PURE__*/React.createElement(IconPlay, null),
118
96
  onClick: playingIconHandleClick,
119
97
  sizeAll: "small",
120
98
  className: cn('button'),
@@ -123,7 +101,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
123
101
  'data-testid': 'AudioPlayer-btn'
124
102
  }
125
103
  }
126
- })), /*#__PURE__*/_react["default"].createElement(_AudioProgress["default"], {
104
+ })), /*#__PURE__*/React.createElement(_AudioProgress["default"], {
127
105
  audioRef: audioRef,
128
106
  audioTitle: audioTitle,
129
107
  isPlaying: isPlaying,
@@ -131,10 +109,8 @@ var AudioPlayer = function AudioPlayer(_ref) {
131
109
  onChangeAudioCurrentTime: handleChangeAudioCurrentTime,
132
110
  onPlay: handlePLay,
133
111
  onSetIsPlaying: setIsPlaying
134
- }), /*#__PURE__*/_react["default"].createElement(_AudioVolume["default"], {
112
+ }), /*#__PURE__*/React.createElement(_AudioVolume["default"], {
135
113
  onChangeAudioVolume: handleChangeAudioVolume
136
114
  })));
137
115
  };
138
-
139
- var _default = AudioPlayer;
140
- exports["default"] = _default;
116
+ var _default = exports["default"] = AudioPlayer;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './style/AudioProgress.less';
2
+ import './style/AudioProgress.scss';
3
3
  export declare const INTERVAL_DELAY = 1000;
4
4
  export interface IAudioProgressProps {
5
5
  audioRef: React.MutableRefObject<HTMLAudioElement | null>;
@@ -4,106 +4,77 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = exports.INTERVAL_DELAY = void 0;
7
-
8
7
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
-
10
- require("core-js/modules/web.timers.js");
11
-
12
8
  require("core-js/modules/es.number.constructor.js");
13
-
9
+ require("core-js/modules/web.timers.js");
14
10
  var _react = _interopRequireDefault(require("react"));
15
-
16
11
  var _uiHelpers = require("@megafon/ui-helpers");
17
-
18
12
  var _AudioRange = _interopRequireDefault(require("./AudioRange"));
19
-
20
13
  var _useTrackDuration = _interopRequireDefault(require("./hooks/useTrackDuration"));
21
-
22
14
  var _timerFormatUtil = _interopRequireDefault(require("./timerFormatUtil"));
23
-
24
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
-
26
- var INTERVAL_DELAY = 1000;
27
- exports.INTERVAL_DELAY = INTERVAL_DELAY;
16
+ var INTERVAL_DELAY = exports.INTERVAL_DELAY = 1000;
28
17
  var cn = (0, _uiHelpers.cnCreate)('mfui-audio-progress');
29
-
30
18
  var AudioProgress = function AudioProgress(_ref) {
31
19
  var audioRef = _ref.audioRef,
32
- audioTitle = _ref.audioTitle,
33
- isPlaying = _ref.isPlaying,
34
- isPause = _ref.isPause,
35
- onChangeAudioCurrentTime = _ref.onChangeAudioCurrentTime,
36
- onPlay = _ref.onPlay,
37
- onSetIsPlaying = _ref.onSetIsPlaying;
38
-
20
+ audioTitle = _ref.audioTitle,
21
+ isPlaying = _ref.isPlaying,
22
+ isPause = _ref.isPause,
23
+ onChangeAudioCurrentTime = _ref.onChangeAudioCurrentTime,
24
+ onPlay = _ref.onPlay,
25
+ onSetIsPlaying = _ref.onSetIsPlaying;
39
26
  var intervalId = _react["default"].useRef(null);
40
-
41
27
  var _React$useState = _react["default"].useState(0),
42
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
43
- trackProgress = _React$useState2[0],
44
- setTrackProgress = _React$useState2[1];
45
-
28
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
29
+ trackProgress = _React$useState2[0],
30
+ setTrackProgress = _React$useState2[1];
46
31
  var trackDuration = (0, _useTrackDuration["default"])(audioRef);
47
-
48
32
  var progressColorPercent = _react["default"].useMemo(function () {
49
33
  return trackProgress / trackDuration * 100;
50
34
  }, [trackDuration, trackProgress]);
51
-
52
35
  var progressValue = _react["default"].useMemo(function () {
53
36
  return isPlaying || isPause ? trackProgress : trackDuration;
54
37
  }, [isPause, isPlaying, trackDuration, trackProgress]);
55
-
56
38
  var handleStartTimer = _react["default"].useCallback(function () {
57
39
  intervalId.current && clearInterval(intervalId.current);
58
40
  intervalId.current = setInterval(function () {
59
41
  var _a, _b, _c;
60
-
61
42
  if ((_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.ended) {
62
43
  onSetIsPlaying === null || onSetIsPlaying === void 0 ? void 0 : onSetIsPlaying(false);
63
44
  setTrackProgress(Math.floor(((_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.duration) || 0));
64
45
  return;
65
46
  }
66
-
67
47
  setTrackProgress(Math.floor(((_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) || 0));
68
48
  }, INTERVAL_DELAY);
69
49
  }, [audioRef, onSetIsPlaying]);
70
-
71
50
  var handleScrubProgress = function handleScrubProgress(e) {
72
51
  var currentTime = Number(e.target.value);
73
52
  setTrackProgress(currentTime);
74
53
  onChangeAudioCurrentTime === null || onChangeAudioCurrentTime === void 0 ? void 0 : onChangeAudioCurrentTime(currentTime);
75
54
  };
76
-
77
55
  var handleScrubEndProgress = function handleScrubEndProgress() {
78
56
  if (!isPlaying) {
79
57
  onPlay === null || onPlay === void 0 ? void 0 : onPlay();
80
58
  }
81
-
82
59
  handleStartTimer();
83
60
  };
84
-
85
61
  _react["default"].useEffect(function () {
86
62
  var _a;
87
-
88
63
  setTrackProgress(Math.floor(((_a = audioRef === null || audioRef === void 0 ? void 0 : audioRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) || 0));
89
64
  }, [audioRef]);
90
-
91
65
  _react["default"].useEffect(function () {
92
66
  if (isPlaying) {
93
67
  handleStartTimer();
94
68
  }
95
-
96
69
  if (isPause) {
97
70
  intervalId.current && clearInterval(intervalId.current);
98
71
  }
99
72
  }, [handleStartTimer, isPause, isPlaying]);
100
-
101
73
  _react["default"].useEffect(function () {
102
74
  return function () {
103
75
  intervalId.current && clearInterval(intervalId.current);
104
76
  };
105
77
  }, []);
106
-
107
78
  return /*#__PURE__*/_react["default"].createElement("div", {
108
79
  className: cn()
109
80
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -128,6 +99,4 @@ var AudioProgress = function AudioProgress(_ref) {
128
99
  }
129
100
  })));
130
101
  };
131
-
132
- var _default = AudioProgress;
133
- exports["default"] = _default;
102
+ var _default = exports["default"] = AudioProgress;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './style/AudioRange.less';
2
+ import './style/AudioRange.scss';
3
3
  export interface IAudioRangeProps {
4
4
  className?: string;
5
5
  maxValue: number | string;
@@ -4,27 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _uiHelpers = require("@megafon/ui-helpers");
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
-
16
11
  var cn = (0, _uiHelpers.cnCreate)('mfui-audio-range');
17
-
18
12
  var AudioRange = function AudioRange(_ref) {
19
13
  var className = _ref.className,
20
- maxValue = _ref.maxValue,
21
- value = _ref.value,
22
- step = _ref.step,
23
- colorPercent = _ref.colorPercent,
24
- onChange = _ref.onChange,
25
- onMouseUp = _ref.onMouseUp,
26
- onTouchEnd = _ref.onTouchEnd,
27
- dataAttrs = _ref.dataAttrs;
14
+ maxValue = _ref.maxValue,
15
+ value = _ref.value,
16
+ step = _ref.step,
17
+ colorPercent = _ref.colorPercent,
18
+ onChange = _ref.onChange,
19
+ onMouseUp = _ref.onMouseUp,
20
+ onTouchEnd = _ref.onTouchEnd,
21
+ dataAttrs = _ref.dataAttrs;
28
22
  return /*#__PURE__*/_react["default"].createElement("input", (0, _extends2["default"])({
29
23
  className: cn([className]),
30
24
  style: {
@@ -40,6 +34,4 @@ var AudioRange = function AudioRange(_ref) {
40
34
  onTouchEnd: onTouchEnd
41
35
  }, (0, _uiHelpers.filterDataAttrs)(dataAttrs)));
42
36
  };
43
-
44
- var _default = AudioRange;
45
- exports["default"] = _default;
37
+ var _default = exports["default"] = AudioRange;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './style/AudioVolume.less';
2
+ import './style/AudioVolume.scss';
3
3
  export interface IAudioVolumeProps {
4
4
  onChangeAudioVolume?: (volume: number) => void;
5
5
  }
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
9
  require("core-js/modules/es.number.constructor.js");
13
-
14
10
  var _react = _interopRequireDefault(require("react"));
15
-
16
11
  var _uiCore = require("@megafon/ui-core");
17
-
18
12
  var _uiHelpers = require("@megafon/ui-helpers");
19
-
20
13
  var _AudioRange = _interopRequireDefault(require("./AudioRange"));
21
-
22
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
-
24
15
  var NoVolumeIcon = function NoVolumeIcon(props) {
25
16
  return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
26
17
  viewBox: "0 0 24 24"
@@ -30,7 +21,6 @@ var NoVolumeIcon = function NoVolumeIcon(props) {
30
21
  d: "M16.094 10.174c.261.56.406 1.177.406 1.826 0 1.426-.7 2.701-1.8 3.548-.3.23-.7-.004-.7-.382v-3.152l2.094-1.84zm-1.225-1.586L14 9.35v-.517c0-.378.4-.613.7-.382.058.044.114.09.169.136zm1.923-1.69a6.998 6.998 0 00-2.438-1.491.525.525 0 01-.354-.489V3.849c0-.32.299-.559.606-.466a8.994 8.994 0 013.694 2.19l-1.508 1.325zM12 11.108V5.36a.5.5 0 00-.342-.474l-.822-.274a.5.5 0 00-.553.167L7.15 8.807A.5.5 0 016.756 9H3.707a.5.5 0 00-.353.146l-.207.208A.5.5 0 003 9.707v4.586a.5.5 0 00.147.353l.207.208a.5.5 0 00.353.146h3.049a.5.5 0 01.394.193l.082.105L12 11.108zM8.462 16.88l1.82 2.34a.5.5 0 00.554.168l.822-.274A.5.5 0 0012 18.64v-4.87l-3.538 3.11zm-5.488 3.563a.5.5 0 01.046-.705L21.497 3.503a.5.5 0 11.66.751L3.68 20.49a.5.5 0 01-.706-.046z"
31
22
  }));
32
23
  };
33
-
34
24
  var VolumeIcon = function VolumeIcon(props) {
35
25
  return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
36
26
  viewBox: "0 0 24 24"
@@ -40,29 +30,22 @@ var VolumeIcon = function VolumeIcon(props) {
40
30
  d: "M16.5 12c0 1.426-.7 2.701-1.8 3.548-.3.23-.7-.004-.7-.382V8.834c0-.378.4-.613.7-.382 1.1.847 1.8 2.122 1.8 3.548z"
41
31
  }));
42
32
  };
43
-
44
33
  var cn = (0, _uiHelpers.cnCreate)('mfui-audio-volume');
45
-
46
34
  var AudioVolume = function AudioVolume(_ref) {
47
35
  var onChangeAudioVolume = _ref.onChangeAudioVolume;
48
-
49
36
  var tooltipTrigger = _react["default"].useRef(null);
50
-
51
37
  var _React$useState = _react["default"].useState(0.3),
52
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
53
- trackVolume = _React$useState2[0],
54
- setTrackVolume = _React$useState2[1];
55
-
38
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
39
+ trackVolume = _React$useState2[0],
40
+ setTrackVolume = _React$useState2[1];
56
41
  var volumeColorPercent = _react["default"].useMemo(function () {
57
42
  return trackVolume * 100;
58
43
  }, [trackVolume]);
59
-
60
44
  var handleScrubVolume = function handleScrubVolume(e) {
61
45
  var currentVolume = Number(e.target.value);
62
46
  setTrackVolume(currentVolume);
63
47
  onChangeAudioVolume === null || onChangeAudioVolume === void 0 ? void 0 : onChangeAudioVolume(currentVolume);
64
48
  };
65
-
66
49
  return /*#__PURE__*/_react["default"].createElement("div", {
67
50
  className: cn()
68
51
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -97,6 +80,4 @@ var AudioVolume = function AudioVolume(_ref) {
97
80
  }
98
81
  })));
99
82
  };
100
-
101
- var _default = AudioVolume;
102
- exports["default"] = _default;
83
+ var _default = exports["default"] = AudioVolume;
@@ -4,29 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
10
  var useTrackDuration = function useTrackDuration(audioRef) {
15
11
  var _React$useState = _react["default"].useState(0),
16
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
17
- trackDuration = _React$useState2[0],
18
- setTrackDuration = _React$useState2[1];
19
-
12
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
13
+ trackDuration = _React$useState2[0],
14
+ setTrackDuration = _React$useState2[1];
20
15
  _react["default"].useEffect(function () {
21
16
  var audioNode = audioRef.current;
22
-
23
17
  if (!audioNode) {
24
18
  return;
25
19
  }
26
-
27
20
  var readyState = audioNode.readyState,
28
- duration = audioNode.duration;
29
-
21
+ duration = audioNode.duration;
30
22
  if (readyState > 0) {
31
23
  setTrackDuration(Math.round(duration));
32
24
  } else {
@@ -36,9 +28,6 @@ var useTrackDuration = function useTrackDuration(audioRef) {
36
28
  };
37
29
  }
38
30
  }, [audioRef]);
39
-
40
31
  return trackDuration;
41
32
  };
42
-
43
- var _default = useTrackDuration;
44
- exports["default"] = _default;
33
+ var _default = exports["default"] = useTrackDuration;