@meduza/ui-kit-2 0.0.1 → 0.1.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 (385) hide show
  1. package/README.md +7 -179
  2. package/dist/BookmarkButton/BookmarkButton.stories.d.ts +10 -0
  3. package/dist/BookmarkButton/BookmarkButton.types.d.ts +6 -0
  4. package/dist/BookmarkButton/index.d.ts +3 -0
  5. package/dist/Button/Button.stories.d.ts +10 -0
  6. package/dist/Button/Button.types.d.ts +2 -2
  7. package/dist/CardTitle/CardTitle.stories.d.ts +10 -0
  8. package/dist/CardTitle/CardTitle.types.d.ts +8 -0
  9. package/dist/CardTitle/index.d.ts +3 -0
  10. package/dist/ChapterBlock/ChapterBlock.stories.d.ts +10 -0
  11. package/dist/ChapterBlock/ChapterBlock.types.d.ts +7 -0
  12. package/dist/ChapterBlock/index.d.ts +3 -0
  13. package/dist/Cover/Cover.stories.d.ts +10 -0
  14. package/dist/Cover/Cover.types.d.ts +4 -0
  15. package/dist/Cover/index.d.ts +3 -0
  16. package/dist/DocumentItemsCount/DocumentItemsCount.stories.d.ts +10 -0
  17. package/dist/DocumentItemsCount/DocumentItemsCount.types.d.ts +7 -0
  18. package/dist/DocumentItemsCount/index.d.ts +3 -0
  19. package/dist/DotsOnImage/DotsOnImage.stories.d.ts +10 -0
  20. package/dist/DotsOnImage/DotsOnImage.types.d.ts +42 -0
  21. package/dist/DotsOnImage/index.d.ts +3 -0
  22. package/dist/Dropdown/Dropdown.stories.d.ts +10 -0
  23. package/dist/Dropdown/Dropdown.types.d.ts +6 -0
  24. package/dist/Dropdown/index.d.ts +4 -0
  25. package/dist/EmbedBlock/EmbedBlock.d.ts +3 -0
  26. package/dist/EmbedBlock/EmbedBlock.stories.d.ts +10 -0
  27. package/dist/EmbedBlock/EmbedBlock.types.d.ts +5 -0
  28. package/dist/EmbedBlock/IframeBlock.d.ts +3 -0
  29. package/dist/EmbedBlock/index.d.ts +3 -0
  30. package/dist/GroupedBlock/GroupedBlock.stories.d.ts +10 -0
  31. package/dist/GroupedBlock/GroupedBlock.types.d.ts +4 -0
  32. package/dist/GroupedBlock/index.d.ts +3 -0
  33. package/dist/HalfBlock/HalfBlock.stories.d.ts +10 -0
  34. package/dist/HalfBlock/HalfBlock.types.d.ts +4 -0
  35. package/dist/HalfBlock/index.d.ts +3 -0
  36. package/dist/Image/Image.stories.d.ts +10 -0
  37. package/dist/Image/Image.types.d.ts +38 -0
  38. package/dist/Image/RenderPicture.d.ts +4 -0
  39. package/dist/Image/index.d.ts +3 -0
  40. package/dist/ImportantLead/ImportantLead.stories.d.ts +10 -0
  41. package/dist/ImportantLead/ImportantLead.types.d.ts +4 -0
  42. package/dist/ImportantLead/index.d.ts +3 -0
  43. package/dist/Lazy/Lazy.stories.d.ts +10 -0
  44. package/dist/Lazy/Lazy.types.d.ts +5 -0
  45. package/dist/Lazy/index.d.ts +3 -0
  46. package/dist/ListBlock/ListBlock.stories.d.ts +10 -0
  47. package/dist/ListBlock/ListBlock.types.d.ts +4 -0
  48. package/dist/ListBlock/index.d.ts +3 -0
  49. package/dist/MaterialNote/MaterialNote.stories.d.ts +10 -0
  50. package/dist/MaterialNote/MaterialNote.types.d.ts +12 -0
  51. package/dist/MaterialNote/index.d.ts +3 -0
  52. package/dist/MaterialTitle/MaterialTitle.stories.d.ts +10 -0
  53. package/dist/MaterialTitle/MaterialTitle.types.d.ts +4 -0
  54. package/dist/MaterialTitle/index.d.ts +5 -0
  55. package/dist/MediaCaption/MediaCaption.stories.d.ts +10 -0
  56. package/dist/MediaCaption/MediaCaption.types.d.ts +5 -0
  57. package/dist/MediaCaption/index.d.ts +3 -0
  58. package/dist/Meta/Meta.stories.d.ts +10 -0
  59. package/dist/Meta/Meta.types.d.ts +18 -0
  60. package/dist/Meta/MetaContainer.d.ts +3 -0
  61. package/dist/Meta/index.d.ts +3 -0
  62. package/dist/MetaItem/MetaItem.stories.d.ts +10 -0
  63. package/dist/MetaItem/MetaItem.types.d.ts +7 -0
  64. package/dist/MetaItem/index.d.ts +3 -0
  65. package/dist/MetaItemLive/MetaItemLive.stories.d.ts +10 -0
  66. package/dist/MetaItemLive/MetaItemLive.types.d.ts +3 -0
  67. package/dist/MetaItemLive/index.d.ts +3 -0
  68. package/dist/Popover/Popover.stories.d.ts +10 -0
  69. package/dist/Popover/Popover.types.d.ts +5 -0
  70. package/dist/Popover/index.d.ts +3 -0
  71. package/dist/QuoteBlock/QuoteBlock.stories.d.ts +10 -0
  72. package/dist/QuoteBlock/QuoteBlock.types.d.ts +6 -0
  73. package/dist/QuoteBlock/index.d.ts +3 -0
  74. package/dist/RawHtmlBlock/RawHtmlBlock.stories.d.ts +10 -0
  75. package/dist/RawHtmlBlock/RawHtmlBlock.types.d.ts +9 -0
  76. package/dist/RawHtmlBlock/index.d.ts +3 -0
  77. package/dist/RelatedBlock/RelatedBlock.stories.d.ts +10 -0
  78. package/dist/RelatedBlock/RelatedBlock.types.d.ts +4 -0
  79. package/dist/RelatedBlock/index.d.ts +3 -0
  80. package/dist/RenderBlocks/RenderBlocks.stories.d.ts +10 -0
  81. package/dist/RenderBlocks/RenderBlocks.types.d.ts +10 -0
  82. package/dist/RenderBlocks/index.d.ts +3 -0
  83. package/dist/RichTitle/RichTitle.stories.d.ts +10 -0
  84. package/dist/RichTitle/RichTitle.types.d.ts +4 -0
  85. package/dist/RichTitle/index.d.ts +3 -0
  86. package/dist/SimpleBlock/SimpleBlock.stories.d.ts +10 -0
  87. package/dist/SimpleBlock/SimpleBlock.types.d.ts +4 -0
  88. package/dist/SimpleBlock/index.d.ts +3 -0
  89. package/dist/SimpleTitle/SimpleTitle.stories.d.ts +10 -0
  90. package/dist/SimpleTitle/SimpleTitle.types.d.ts +4 -0
  91. package/dist/SimpleTitle/index.d.ts +3 -0
  92. package/dist/SourceBlock/SourceBlock.stories.d.ts +10 -0
  93. package/dist/SourceBlock/SourceBlock.types.d.ts +4 -0
  94. package/dist/SourceBlock/index.d.ts +3 -0
  95. package/dist/Spoiler/Spoiler.stories.d.ts +10 -0
  96. package/dist/Spoiler/Spoiler.types.d.ts +4 -0
  97. package/dist/Spoiler/index.d.ts +3 -0
  98. package/dist/SvgSymbol/SvgSymbol.stories.d.ts +10 -0
  99. package/dist/SvgSymbol/SvgSymbol.types.d.ts +8 -0
  100. package/dist/SvgSymbol/icons.d.ts +157 -0
  101. package/dist/SvgSymbol/index.d.ts +3 -0
  102. package/dist/Switcher/Switcher.stories.d.ts +10 -0
  103. package/dist/Switcher/Switcher.types.d.ts +12 -0
  104. package/dist/Switcher/index.d.ts +3 -0
  105. package/dist/Table/Table.stories.d.ts +10 -0
  106. package/dist/Table/Table.types.d.ts +25 -0
  107. package/dist/Table/index.d.ts +3 -0
  108. package/dist/Tag/Tag.stories.d.ts +10 -0
  109. package/dist/Tag/Tag.types.d.ts +12 -0
  110. package/dist/Tag/index.d.ts +3 -0
  111. package/dist/Timestamp/Timestamp.stories.d.ts +10 -0
  112. package/dist/Timestamp/Timestamp.types.d.ts +5 -0
  113. package/dist/Timestamp/index.d.ts +4 -0
  114. package/dist/Toolbar/Toolbar.stories.d.ts +10 -0
  115. package/dist/Toolbar/Toolbar.types.d.ts +5 -0
  116. package/dist/Toolbar/index.d.ts +3 -0
  117. package/dist/ToolbarButton/ToolbarButton.stories.d.ts +10 -0
  118. package/dist/ToolbarButton/ToolbarButton.types.d.ts +9 -0
  119. package/dist/ToolbarButton/index.d.ts +3 -0
  120. package/dist/_storybook/PreviewWrapper/index.d.ts +6 -0
  121. package/dist/constants.d.ts +22 -0
  122. package/dist/index.d.ts +37 -0
  123. package/dist/ui-kit-2.cjs.development.js +2257 -10
  124. package/dist/ui-kit-2.cjs.development.js.map +1 -1
  125. package/dist/ui-kit-2.cjs.production.min.js +1 -1
  126. package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
  127. package/dist/ui-kit-2.esm.js +2209 -3
  128. package/dist/ui-kit-2.esm.js.map +1 -1
  129. package/dist/utils/BlockContext.d.ts +8 -0
  130. package/dist/utils/DangerousHtml.d.ts +8 -0
  131. package/dist/utils/makeClassName.d.ts +1 -1
  132. package/dist/utils/makeStyleContext.d.ts +2 -0
  133. package/dist/utils/toCamel.d.ts +1 -0
  134. package/package.json +28 -13
  135. package/src/BookmarkButton/BookmarkButton.module.css +50 -0
  136. package/src/BookmarkButton/BookmarkButton.stories.module.css +5 -0
  137. package/src/BookmarkButton/BookmarkButton.stories.tsx +39 -0
  138. package/src/BookmarkButton/BookmarkButton.test.tsx +20 -0
  139. package/src/BookmarkButton/BookmarkButton.types.ts +6 -0
  140. package/src/BookmarkButton/index.tsx +37 -0
  141. package/src/Button/Button.stories.module.css +30 -0
  142. package/src/Button/Button.stories.tsx +87 -0
  143. package/src/Button/Button.test.tsx +42 -0
  144. package/src/Button/Button.types.ts +1 -3
  145. package/src/Button/index.tsx +2 -2
  146. package/src/CardTitle/CardTitle.module.css +52 -0
  147. package/src/CardTitle/CardTitle.stories.module.css +5 -0
  148. package/src/CardTitle/CardTitle.stories.tsx +36 -0
  149. package/src/CardTitle/CardTitle.test.tsx +20 -0
  150. package/src/CardTitle/CardTitle.types.ts +8 -0
  151. package/src/CardTitle/index.tsx +24 -0
  152. package/src/CardTitle/mock.json +8 -0
  153. package/src/ChapterBlock/ChapterBlock.module.css +70 -0
  154. package/src/ChapterBlock/ChapterBlock.stories.module.css +5 -0
  155. package/src/ChapterBlock/ChapterBlock.stories.tsx +36 -0
  156. package/src/ChapterBlock/ChapterBlock.test.tsx +20 -0
  157. package/src/ChapterBlock/ChapterBlock.types.ts +7 -0
  158. package/src/ChapterBlock/index.tsx +31 -0
  159. package/src/ChapterBlock/mock.json +5 -0
  160. package/src/Cover/Cover.module.css +5 -0
  161. package/src/Cover/Cover.stories.module.css +5 -0
  162. package/src/Cover/Cover.stories.tsx +34 -0
  163. package/src/Cover/Cover.test.tsx +20 -0
  164. package/src/Cover/Cover.types.ts +4 -0
  165. package/src/Cover/index.tsx +89 -0
  166. package/src/DocumentItemsCount/DocumentItemsCount.module.css +18 -0
  167. package/src/DocumentItemsCount/DocumentItemsCount.stories.module.css +5 -0
  168. package/src/DocumentItemsCount/DocumentItemsCount.stories.tsx +34 -0
  169. package/src/DocumentItemsCount/DocumentItemsCount.test.tsx +20 -0
  170. package/src/DocumentItemsCount/DocumentItemsCount.types.ts +6 -0
  171. package/src/DocumentItemsCount/index.tsx +54 -0
  172. package/src/DotsOnImage/DotsOnImage.module.css +56 -0
  173. package/src/DotsOnImage/DotsOnImage.stories.module.css +9 -0
  174. package/src/DotsOnImage/DotsOnImage.stories.tsx +37 -0
  175. package/src/DotsOnImage/DotsOnImage.test.tsx +19 -0
  176. package/src/DotsOnImage/DotsOnImage.types.ts +46 -0
  177. package/src/DotsOnImage/index.tsx +79 -0
  178. package/src/DotsOnImage/mock.json +102 -0
  179. package/src/Dropdown/Dropdown.module.css +82 -0
  180. package/src/Dropdown/Dropdown.stories.module.css +5 -0
  181. package/src/Dropdown/Dropdown.stories.tsx +55 -0
  182. package/src/Dropdown/Dropdown.test.tsx +20 -0
  183. package/src/Dropdown/Dropdown.types.ts +5 -0
  184. package/src/Dropdown/index.tsx +35 -0
  185. package/src/EmbedBlock/EmbedBlock.module.css +351 -0
  186. package/src/EmbedBlock/EmbedBlock.stories.module.css +5 -0
  187. package/src/EmbedBlock/EmbedBlock.stories.tsx +39 -0
  188. package/src/EmbedBlock/EmbedBlock.test.tsx +20 -0
  189. package/src/EmbedBlock/EmbedBlock.tsx +236 -0
  190. package/src/EmbedBlock/EmbedBlock.types.ts +5 -0
  191. package/src/EmbedBlock/IframeBlock.tsx +86 -0
  192. package/src/EmbedBlock/index.tsx +16 -0
  193. package/src/EmbedBlock/mock.json +89 -0
  194. package/src/GroupedBlock/GroupedBlock.module.css +94 -0
  195. package/src/GroupedBlock/GroupedBlock.stories.module.css +5 -0
  196. package/src/GroupedBlock/GroupedBlock.stories.tsx +34 -0
  197. package/src/GroupedBlock/GroupedBlock.test.tsx +20 -0
  198. package/src/GroupedBlock/GroupedBlock.types.ts +4 -0
  199. package/src/GroupedBlock/index.tsx +67 -0
  200. package/src/HalfBlock/HalfBlock.module.css +88 -0
  201. package/src/HalfBlock/HalfBlock.stories.module.css +5 -0
  202. package/src/HalfBlock/HalfBlock.stories.tsx +34 -0
  203. package/src/HalfBlock/HalfBlock.test.tsx +20 -0
  204. package/src/HalfBlock/HalfBlock.types.ts +4 -0
  205. package/src/HalfBlock/index.tsx +53 -0
  206. package/src/Image/Image.module.css +78 -0
  207. package/src/Image/Image.stories.module.css +5 -0
  208. package/src/Image/Image.stories.tsx +47 -0
  209. package/src/Image/Image.test.tsx +33 -0
  210. package/src/Image/Image.types.ts +40 -0
  211. package/src/Image/RenderPicture.tsx +70 -0
  212. package/src/Image/index.tsx +101 -0
  213. package/src/Image/mock.json +49 -0
  214. package/src/ImportantLead/ImportantLead.module.css +64 -0
  215. package/src/ImportantLead/ImportantLead.stories.module.css +5 -0
  216. package/src/ImportantLead/ImportantLead.stories.tsx +34 -0
  217. package/src/ImportantLead/ImportantLead.test.tsx +20 -0
  218. package/src/ImportantLead/ImportantLead.types.ts +4 -0
  219. package/src/ImportantLead/index.tsx +35 -0
  220. package/src/Lazy/Lazy.module.css +9 -0
  221. package/src/Lazy/Lazy.stories.module.css +5 -0
  222. package/src/Lazy/Lazy.stories.tsx +48 -0
  223. package/src/Lazy/Lazy.test.tsx +20 -0
  224. package/src/Lazy/Lazy.types.ts +4 -0
  225. package/src/Lazy/index.tsx +41 -0
  226. package/src/ListBlock/ListBlock.module.css +163 -0
  227. package/src/ListBlock/ListBlock.stories.module.css +5 -0
  228. package/src/ListBlock/ListBlock.stories.tsx +34 -0
  229. package/src/ListBlock/ListBlock.test.tsx +20 -0
  230. package/src/ListBlock/ListBlock.types.ts +4 -0
  231. package/src/ListBlock/index.tsx +33 -0
  232. package/src/MaterialNote/MaterialNote.module.css +139 -0
  233. package/src/MaterialNote/MaterialNote.stories.module.css +5 -0
  234. package/src/MaterialNote/MaterialNote.stories.tsx +36 -0
  235. package/src/MaterialNote/MaterialNote.test.tsx +20 -0
  236. package/src/MaterialNote/MaterialNote.types.ts +12 -0
  237. package/src/MaterialNote/index.tsx +30 -0
  238. package/src/MaterialNote/mock.json +18 -0
  239. package/src/MaterialTitle/MaterialTitle.module.css +33 -0
  240. package/src/MaterialTitle/MaterialTitle.stories.module.css +13 -0
  241. package/src/MaterialTitle/MaterialTitle.stories.tsx +52 -0
  242. package/src/MaterialTitle/MaterialTitle.test.tsx +20 -0
  243. package/src/MaterialTitle/MaterialTitle.types.ts +3 -0
  244. package/src/MaterialTitle/index.tsx +20 -0
  245. package/src/MediaCaption/MediaCaption.module.css +85 -0
  246. package/src/MediaCaption/MediaCaption.stories.module.css +5 -0
  247. package/src/MediaCaption/MediaCaption.stories.tsx +37 -0
  248. package/src/MediaCaption/MediaCaption.test.tsx +20 -0
  249. package/src/MediaCaption/MediaCaption.types.ts +5 -0
  250. package/src/MediaCaption/index.tsx +35 -0
  251. package/src/Meta/Meta.module.css +106 -0
  252. package/src/Meta/Meta.stories.module.css +7 -0
  253. package/src/Meta/Meta.stories.tsx +69 -0
  254. package/src/Meta/Meta.test.tsx +20 -0
  255. package/src/Meta/Meta.types.ts +19 -0
  256. package/src/Meta/MetaContainer.tsx +148 -0
  257. package/src/Meta/index.tsx +32 -0
  258. package/src/MetaItem/MetaItem.module.css +104 -0
  259. package/src/MetaItem/MetaItem.stories.module.css +5 -0
  260. package/src/MetaItem/MetaItem.stories.tsx +34 -0
  261. package/src/MetaItem/MetaItem.test.tsx +20 -0
  262. package/src/MetaItem/MetaItem.types.ts +6 -0
  263. package/src/MetaItem/index.tsx +26 -0
  264. package/src/MetaItemLive/MetaItemLive.module.css +124 -0
  265. package/src/MetaItemLive/MetaItemLive.stories.module.css +5 -0
  266. package/src/MetaItemLive/MetaItemLive.stories.tsx +34 -0
  267. package/src/MetaItemLive/MetaItemLive.test.tsx +20 -0
  268. package/src/MetaItemLive/MetaItemLive.types.ts +3 -0
  269. package/src/MetaItemLive/index.tsx +25 -0
  270. package/src/Popover/Popover.module.css +134 -0
  271. package/src/Popover/Popover.stories.module.css +5 -0
  272. package/src/Popover/Popover.stories.tsx +55 -0
  273. package/src/Popover/Popover.test.tsx +20 -0
  274. package/src/Popover/Popover.types.ts +4 -0
  275. package/src/Popover/index.tsx +78 -0
  276. package/src/QuoteBlock/QuoteBlock.module.css +79 -0
  277. package/src/QuoteBlock/QuoteBlock.stories.module.css +7 -0
  278. package/src/QuoteBlock/QuoteBlock.stories.tsx +36 -0
  279. package/src/QuoteBlock/QuoteBlock.test.tsx +20 -0
  280. package/src/QuoteBlock/QuoteBlock.types.ts +6 -0
  281. package/src/QuoteBlock/index.tsx +24 -0
  282. package/src/QuoteBlock/mock.json +6 -0
  283. package/src/RawHtmlBlock/RawHtmlBlock.stories.module.css +5 -0
  284. package/src/RawHtmlBlock/RawHtmlBlock.stories.tsx +34 -0
  285. package/src/RawHtmlBlock/RawHtmlBlock.test.tsx +20 -0
  286. package/src/RawHtmlBlock/RawHtmlBlock.types.ts +9 -0
  287. package/src/RawHtmlBlock/index.tsx +57 -0
  288. package/src/RelatedBlock/RelatedBlock.module.css +129 -0
  289. package/src/RelatedBlock/RelatedBlock.stories.module.css +5 -0
  290. package/src/RelatedBlock/RelatedBlock.stories.tsx +34 -0
  291. package/src/RelatedBlock/RelatedBlock.test.tsx +20 -0
  292. package/src/RelatedBlock/RelatedBlock.types.ts +4 -0
  293. package/src/RelatedBlock/index.tsx +45 -0
  294. package/src/RenderBlocks/RenderBlocks.stories.module.css +5 -0
  295. package/src/RenderBlocks/RenderBlocks.stories.tsx +34 -0
  296. package/src/RenderBlocks/RenderBlocks.test.tsx +20 -0
  297. package/src/RenderBlocks/RenderBlocks.types.ts +10 -0
  298. package/src/RenderBlocks/index.tsx +125 -0
  299. package/src/RichTitle/RichTitle.module.css +85 -0
  300. package/src/RichTitle/RichTitle.stories.module.css +5 -0
  301. package/src/RichTitle/RichTitle.stories.tsx +34 -0
  302. package/src/RichTitle/RichTitle.test.tsx +20 -0
  303. package/src/RichTitle/RichTitle.types.ts +4 -0
  304. package/src/RichTitle/index.tsx +32 -0
  305. package/src/SimpleBlock/FootnoteLink.css +34 -0
  306. package/src/SimpleBlock/SimpleBlock.module.css +393 -0
  307. package/src/SimpleBlock/SimpleBlock.stories.module.css +5 -0
  308. package/src/SimpleBlock/SimpleBlock.stories.tsx +34 -0
  309. package/src/SimpleBlock/SimpleBlock.test.tsx +20 -0
  310. package/src/SimpleBlock/SimpleBlock.types.ts +4 -0
  311. package/src/SimpleBlock/index.tsx +47 -0
  312. package/src/SimpleTitle/SimpleTitle.module.css +33 -0
  313. package/src/SimpleTitle/SimpleTitle.stories.module.css +5 -0
  314. package/src/SimpleTitle/SimpleTitle.stories.tsx +34 -0
  315. package/src/SimpleTitle/SimpleTitle.test.tsx +20 -0
  316. package/src/SimpleTitle/SimpleTitle.types.ts +4 -0
  317. package/src/SimpleTitle/index.tsx +29 -0
  318. package/src/SourceBlock/SourceBlock.module.css +110 -0
  319. package/src/SourceBlock/SourceBlock.stories.module.css +5 -0
  320. package/src/SourceBlock/SourceBlock.stories.tsx +34 -0
  321. package/src/SourceBlock/SourceBlock.test.tsx +20 -0
  322. package/src/SourceBlock/SourceBlock.types.ts +4 -0
  323. package/src/SourceBlock/index.tsx +44 -0
  324. package/src/Spoiler/Spoiler.module.css +177 -0
  325. package/src/Spoiler/Spoiler.stories.module.css +8 -0
  326. package/src/Spoiler/Spoiler.stories.tsx +36 -0
  327. package/src/Spoiler/Spoiler.test.tsx +20 -0
  328. package/src/Spoiler/Spoiler.types.ts +4 -0
  329. package/src/Spoiler/index.tsx +81 -0
  330. package/src/Spoiler/mock.json +49 -0
  331. package/src/SvgSymbol/SvgSymbol.module.css +240 -0
  332. package/src/SvgSymbol/SvgSymbol.stories.module.css +127 -0
  333. package/src/SvgSymbol/SvgSymbol.stories.tsx +95 -0
  334. package/src/SvgSymbol/SvgSymbol.test.tsx +21 -0
  335. package/src/SvgSymbol/SvgSymbol.types.ts +57 -0
  336. package/src/SvgSymbol/icons.ts +217 -0
  337. package/src/SvgSymbol/index.tsx +32 -0
  338. package/src/Switcher/Switcher.module.css +159 -0
  339. package/src/Switcher/Switcher.stories.module.css +28 -0
  340. package/src/Switcher/Switcher.stories.tsx +68 -0
  341. package/src/Switcher/Switcher.test.tsx +43 -0
  342. package/src/Switcher/Switcher.types.ts +16 -0
  343. package/src/Switcher/index.tsx +53 -0
  344. package/src/Table/Table.module.css +300 -0
  345. package/src/Table/Table.stories.module.css +5 -0
  346. package/src/Table/Table.stories.tsx +36 -0
  347. package/src/Table/Table.test.tsx +20 -0
  348. package/src/Table/Table.types.ts +26 -0
  349. package/src/Table/index.tsx +76 -0
  350. package/src/Table/mock.json +301 -0
  351. package/src/Tag/Tag.module.css +115 -0
  352. package/src/Tag/Tag.stories.module.css +5 -0
  353. package/src/Tag/Tag.stories.tsx +53 -0
  354. package/src/Tag/Tag.test.tsx +20 -0
  355. package/src/Tag/Tag.types.ts +14 -0
  356. package/src/Tag/index.tsx +33 -0
  357. package/src/Timestamp/Timestamp.module.css +6 -0
  358. package/src/Timestamp/Timestamp.stories.module.css +5 -0
  359. package/src/Timestamp/Timestamp.stories.tsx +34 -0
  360. package/src/Timestamp/Timestamp.test.tsx +20 -0
  361. package/src/Timestamp/Timestamp.types.ts +5 -0
  362. package/src/Timestamp/index.tsx +40 -0
  363. package/src/Toolbar/Toolbar.module.css +134 -0
  364. package/src/Toolbar/Toolbar.stories.module.css +5 -0
  365. package/src/Toolbar/Toolbar.stories.tsx +89 -0
  366. package/src/Toolbar/Toolbar.test.tsx +20 -0
  367. package/src/Toolbar/Toolbar.types.ts +4 -0
  368. package/src/Toolbar/index.tsx +28 -0
  369. package/src/ToolbarButton/ToolbarButton.module.css +97 -0
  370. package/src/ToolbarButton/ToolbarButton.stories.module.css +5 -0
  371. package/src/ToolbarButton/ToolbarButton.stories.tsx +36 -0
  372. package/src/ToolbarButton/ToolbarButton.test.tsx +20 -0
  373. package/src/ToolbarButton/ToolbarButton.types.ts +19 -0
  374. package/src/ToolbarButton/index.tsx +34 -0
  375. package/src/_storybook/PreviewWrapper/PreviewWrapper.module.css +117 -0
  376. package/src/_storybook/PreviewWrapper/index.tsx +23 -0
  377. package/src/constants.ts +24 -0
  378. package/src/index.tsx +38 -0
  379. package/src/utils/BlockContext.ts +7 -0
  380. package/src/utils/DangerousHtml.tsx +79 -0
  381. package/src/utils/makeClassName.ts +1 -1
  382. package/src/utils/makeStyleContext.ts +13 -0
  383. package/src/utils/toCamel.ts +2 -0
  384. package/LICENSE +0 -21
  385. package/src/global.d.ts +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ui-kit-2.cjs.production.min.js","sources":["../src/Button/loader.tsx","../node_modules/style-inject/dist/style-inject.es.js","../src/Button/index.tsx","../src/utils/makeClassName.ts"],"sourcesContent":["import React from 'react'\n\nconst Loader: React.FC = () => (\n <svg\n width=\"30px\"\n height=\"30px\"\n viewBox=\"0 0 30 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path\n d=\"M15 0C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15zm0 2c7.18 0 13 5.82 13 13s-5.82 13-13 13S2 22.18 2 15 7.82 2 15 2z\"\n opacity=\"0.3\"\n />\n </g>\n <g fillRule=\"evenodd\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 15 15\"\n to=\"360 15 15\"\n dur=\"1000ms\"\n repeatCount=\"indefinite\"\n />\n <path d=\"M15 0c8.18 0 14.83 6.547 14.997 14.686L30 15h-2c0-7.077-5.655-12.833-12.693-12.996L15 2V0z\" />\n </g>\n </svg>\n)\n\nexport default Loader\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { FC } from 'react'\n\nimport makeClassName from '../utils/makeClassName'\nimport Loader from './loader'\nimport styles from './Button.module.css'\nimport { ButtonProps } from './Button.types'\n\nexport const Button: FC<ButtonProps> = ({\n theme = 'gold',\n size = 'default',\n state = 'default',\n styleContext = 'isInToolbar',\n disabled = false,\n onClick,\n children\n}) => {\n const handleClick = () => {\n if (disabled || !onClick) {\n return\n }\n\n onClick()\n }\n\n return (\n <button\n data-testid=\"button\"\n className={makeClassName([\n [styles.root, true],\n [styles[size], !!size],\n [styles[theme], !!theme],\n [styles[state], !!state && !!styles[state]],\n [styles[styleContext], !!styleContext]\n ])}\n disabled={disabled}\n onClick={handleClick}\n type=\"button\"\n >\n {state === 'isLoading' ? (\n <span className={styles.loader}>\n <Loader />\n </span>\n ) : (\n children\n )}\n </button>\n )\n}\n","const makeClassName = (list: Array<[string, boolean]>): string => {\n return list\n .filter(([, active]) => active)\n .map(([className]) => className)\n .join(' ')\n}\n\nexport default makeClassName\n"],"names":["Loader","React","width","height","viewBox","xmlns","d","opacity","fillRule","attributeName","type","from","to","dur","repeatCount","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","list","theme","size","state","styleContext","disabled","onClick","children","className","styles","root","filter","map","join","loader"],"mappings":"gJAEMA,EAAmB,kBACvBC,uBACEC,MAAM,OACNC,OAAO,OACPC,QAAQ,YACRC,MAAM,8BAENJ,yBACEA,wBACEK,EAAE,qKACFC,QAAQ,SAGZN,qBAAGO,SAAS,WACVP,oCACEQ,cAAc,YACdC,KAAK,SACLC,KAAK,UACLC,GAAG,YACHC,IAAI,SACJC,YAAY,eAEdb,wBAAMK,EAAE,2mBCxBd,SAAqBS,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAMX,KAAO,WAEI,QAAbO,GACEE,EAAKI,WACPJ,EAAKK,aAAaH,EAAOF,EAAKI,YAKhCJ,EAAKM,YAAYJ,GAGfA,EAAMK,WACRL,EAAMK,WAAWC,QAAUZ,EAE3BM,EAAMI,YAAYP,SAASU,eAAeb,21JChBP,gBCPhBc,MDQrBC,MAAAA,aAAQ,aACRC,KAAAA,aAAO,gBACPC,MAAAA,aAAQ,gBACRC,aAAAA,aAAe,oBACfC,SAAAA,gBACAC,IAAAA,QACAC,IAAAA,gBAWEnC,wCACc,SACZoC,WC3BiBR,ED2BQ,CACvB,CAACS,EAAOC,MAAM,GACd,CAACD,EAAOP,KAASA,GACjB,CAACO,EAAOR,KAAUA,GAClB,CAACQ,EAAON,KAAUA,KAAWM,EAAON,IACpC,CAACM,EAAOL,KAAiBA,IC/BxBJ,EACJW,QAAO,2BACPC,KAAI,2BACJC,KAAK,MD8BJR,SAAUA,EACVC,QAnBgB,YACdD,GAAaC,GAIjBA,KAeEzB,KAAK,UAEM,cAAVsB,EACC/B,wBAAMoC,UAAWC,EAAOK,QACtB1C,gBAACD,SAGHoC"}
1
+ {"version":3,"file":"ui-kit-2.cjs.production.min.js","sources":["../src/utils/makeClassName.ts","../src/Button/loader.tsx","../node_modules/style-inject/dist/style-inject.es.js","../src/Button/index.tsx","../src/SvgSymbol/icons.ts","../src/SvgSymbol/index.tsx","../src/utils/BlockContext.ts","../src/utils/viewportSize.ts","../src/constants.ts","../src/Lazy/index.tsx","../src/Image/RenderPicture.tsx","../src/utils/toCamel.ts","../src/Image/index.tsx","../src/utils/makeStyleContext.ts","../src/Tag/index.tsx","../src/MediaCaption/index.tsx","../src/Table/index.tsx","../src/MaterialNote/index.tsx","../src/BookmarkButton/index.tsx","../src/Popover/index.tsx","../src/Meta/index.tsx","../src/Timestamp/index.tsx","../src/utils/DangerousHtml.tsx","../src/EmbedBlock/EmbedBlock.tsx","../src/EmbedBlock/IframeBlock.tsx","../src/EmbedBlock/index.tsx","../src/QuoteBlock/index.tsx","../src/CardTitle/index.tsx","../src/ChapterBlock/index.tsx","../src/SimpleTitle/index.tsx","../src/RichTitle/index.tsx","../src/SimpleBlock/index.tsx","../src/ListBlock/index.tsx","../src/RelatedBlock/index.tsx","../src/SourceBlock/index.tsx","../src/GroupedBlock/index.tsx","../src/MetaItem/index.tsx","../src/MetaItemLive/index.tsx","../src/DocumentItemsCount/index.tsx","../src/utils/pluralize.ts","../src/Meta/MetaContainer.tsx","../src/RenderBlocks/index.tsx","../src/Cover/index.tsx","../src/utils/generateGradient.ts","../src/HalfBlock/index.tsx","../src/ImportantLead/index.tsx","../src/utils/postMessage.ts","../src/Spoiler/index.tsx","../src/DotsOnImage/index.tsx","../src/Dropdown/index.tsx","../src/MaterialTitle/index.tsx","../src/RawHtmlBlock/index.tsx","../src/Switcher/index.tsx","../src/Toolbar/index.tsx","../src/ToolbarButton/index.tsx"],"sourcesContent":["const makeClassName = (list: (string[] | string | boolean)[][]): string => {\n return list\n .filter(([, active]) => active)\n .map(([className]) => className)\n .join(' ')\n}\n\nexport default makeClassName\n","import React from 'react'\n\nconst Loader: React.FC = () => (\n <svg\n width=\"30px\"\n height=\"30px\"\n viewBox=\"0 0 30 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path\n d=\"M15 0C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15zm0 2c7.18 0 13 5.82 13 13s-5.82 13-13 13S2 22.18 2 15 7.82 2 15 2z\"\n opacity=\"0.3\"\n />\n </g>\n <g fillRule=\"evenodd\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 15 15\"\n to=\"360 15 15\"\n dur=\"1000ms\"\n repeatCount=\"indefinite\"\n />\n <path d=\"M15 0c8.18 0 14.83 6.547 14.997 14.686L30 15h-2c0-7.077-5.655-12.833-12.693-12.996L15 2V0z\" />\n </g>\n </svg>\n)\n\nexport default Loader\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { FC } from 'react'\n\nimport makeClassName from '../utils/makeClassName'\nimport Loader from './loader'\nimport styles from './Button.module.css'\nimport { ButtonProps } from './Button.types'\n\nexport const Button: FC<ButtonProps> = ({\n theme = 'gold',\n size = 'default',\n state = 'isDefault',\n styleContext = 'isInToolbar',\n disabled = false,\n onClick,\n children\n}) => {\n const handleClick = (): void => {\n if (disabled || !onClick) {\n return\n }\n\n onClick()\n }\n\n return (\n <button\n data-testid=\"button\"\n className={makeClassName([\n [styles.root, true],\n [styles[size], !!size],\n [styles[theme], !!theme],\n [styles[state], !!state && !!styles[state]],\n [styles[styleContext], !!styleContext]\n ])}\n disabled={disabled}\n onClick={handleClick}\n type=\"button\"\n >\n {state === 'isLoading' ? (\n <span className={styles.loader}>\n <Loader />\n </span>\n ) : (\n children\n )}\n </button>\n )\n}\n","export const icons = {\n meduzaLogo: {\n width: 544,\n height: 115,\n content:\n '<path d=\"M59.1008614,49.65632 L59.1008614,106.01472 L84.9480411,114.24 L84.9480411,49.65632 L101.574882,49.65632 L101.574882,106.01472 L127.270909,114.24 L144.048902,91.392 L127.422062,91.392 L127.422062,35.7952 L101.726035,26.80832 L84.9480411,46.60992 L84.9480411,35.7952 L59.2520145,26.80832 L42.4740206,46.60992 L42.4740206,35.7952 L16.7779939,26.80832 L0,49.65632 L16.6268408,49.65632 L16.6268408,106.01472 L42.4740206,114.24 L42.4740206,49.65632 L59.1008614,49.65632 L59.1008614,49.65632 Z M336.61795,91.392 L336.61795,35.0336 L310.770769,26.80832 L310.770769,105.25312 L336.466796,114.24 L353.24479,94.4384 L353.24479,105.25312 L378.940817,114.24 L395.71881,91.392 L379.091969,91.392 L379.091969,35.0336 L353.24479,26.80832 L353.24479,91.392 L336.61795,91.392 L336.61795,91.392 Z M527.373159,38.08 L502.130592,26.80832 L472.202278,41.1264 L502.130592,52.39808 L461.016949,72.352 L461.016949,104.94848 L486.86413,114.24 L502.130592,94.28608 L502.130592,105.25312 L527.977771,114.24 L544,91.23968 L527.373159,91.23968 L527.373159,38.08 L527.373159,38.08 Z M177.453737,114.24 L207.079744,102.35904 L177.453737,91.23968 L177.453737,75.24608 L216.300083,56.3584 L194.231731,26.80832 L151.606557,47.37152 L151.606557,103.12064 L177.453737,114.24 L177.453737,114.24 Z M455.424284,89.56416 L423.984441,79.968 L453.459295,42.19264 L416.577937,26.80832 L397.230341,51.48416 L428.821339,61.23264 L398.741873,98.85568 L436.076687,114.24 L455.424284,89.56416 L455.424284,89.56416 Z M486.86413,91.392 L486.86413,68.84864 L502.130592,61.53728 L502.130592,91.392 L486.86413,91.392 L486.86413,91.392 Z M177.453737,41.58336 L190.452904,59.55712 L177.453737,65.80224 L177.453737,41.58336 L177.453737,41.58336 Z M222.95082,103.12064 L248.797999,114.24 L291.27202,97.18016 L291.27202,29.7024 L222.95082,0 L222.95082,26.30784 L265.424841,43.21536 L265.424841,97.33248 L248.797999,91.23968 L248.797999,43.71584 L222.95082,51.94112 L222.95082,103.12064 L222.95082,103.12064 Z\" />'\n },\n\n menu: {\n width: 24,\n height: 24,\n content:\n '<path d=\"M2 21h20M2 12h20M2 3h20\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" vector-effect=\"non-scaling-stroke\" />'\n },\n\n fb: {\n width: 16,\n height: 18,\n content:\n '<path d=\"M15.117 1H.883A.883.883 0 0 0 0 1.883v14.234A.883.883 0 0 0 .883 17h7.663v-6.196H6.461V8.389h2.085V6.61a2.91 2.91 0 0 1 3.106-3.192c.622-.003 1.244.03 1.863.095v2.16h-1.279c-1.002 0-1.196.476-1.196 1.176v1.541h2.39l-.31 2.415h-2.08V17h4.077a.883.883 0 0 0 .883-.883V1.883A.883.883 0 0 0 15.117 1\" />'\n },\n\n tw: {\n width: 20,\n height: 18,\n content:\n '<path d=\"M20 3.1c-.7.3-1.5.6-2.4.7.8-.5 1.5-1.4 1.8-2.4-.8.5-1.7.8-2.6 1-.7-.8-1.8-1.4-3-1.4-2.3 0-4.1 1.9-4.1 4.3 0 .3 0 .7.1 1-3.3-.1-6.4-1.8-8.4-4.4-.3.6-.5 1.4-.5 2.2 0 1.5.7 2.8 1.8 3.6-.7 0-1.3-.2-1.9-.5v.1c0 2.1 1.4 3.8 3.3 4.2-.3.1-.7.2-1.1.2-.3 0-.5 0-.8-.1.5 1.7 2 2.9 3.8 3-1.3 1-3.1 1.6-5 1.6-.3 0-.7 0-1-.1C1.8 17.3 4 18 6.3 18 13.8 18 18 11.5 18 5.8v-.6c.8-.5 1.5-1.2 2-2.1\" fill-rule=\"nonzero\"/>'\n },\n\n vk: {\n width: 20,\n height: 18,\n content:\n '<path d=\"M16.517 9.851s2.587-3.768 2.886-5.058c.1-.396-.1-.694-.498-.694h-2.288c-.498 0-.697.199-.896.595 0 0-1.194 2.678-2.686 4.364-.498.496-.697.694-.995.694-.2 0-.299-.198-.299-.694V4.793c0-.595-.1-.793-.597-.793H7.463c-.2 0-.398.198-.398.397 0 .595.796.694.796 2.28v3.174c0 .595 0 .893-.299.893-.796 0-2.686-2.777-3.681-5.851-.2-.595-.398-.794-.995-.794H.597C.299 4.1 0 4.298 0 4.694c0 .595.697 3.471 3.483 7.34C5.373 14.611 7.86 16 10.05 16c1.393 0 1.691-.198 1.691-.793v-1.984c0-.496.2-.694.498-.694s.895.1 2.189 1.388C15.92 15.405 16.02 16 16.915 16h2.587c.299 0 .498-.1.498-.595 0-.595-.796-1.587-1.89-2.876-.498-.595-1.195-1.29-1.493-1.686-.398-.397-.299-.595-.1-.992\" fill-rule=\"nonzero\"/>'\n },\n\n ok: {\n width: 9,\n height: 18,\n content:\n '<path d=\"M4.5 2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4m0 5.7c-.9 0-1.6-.8-1.6-1.7 0-.9.7-1.6 1.6-1.6.9 0 1.7.7 1.7 1.7 0 .8-.8 1.6-1.7 1.6\" fill-rule=\"nonzero\"/> <path d=\"M6.127 12.982a9.194 9.194 0 0 0 2.307-.904c.602-.301.703-1.004.402-1.507-.301-.502-1.104-.703-1.605-.401-1.605 1.004-3.812 1.004-5.417 0-.502-.302-1.304-.201-1.605.3-.401.604-.2 1.206.401 1.608a9.194 9.194 0 0 0 2.307.904L.61 15.092c-.502.401-.502 1.104 0 1.607a1.357 1.357 0 0 0 1.705 0l2.207-2.11L6.73 16.7a1.357 1.357 0 0 0 1.705 0c.502-.402.502-1.105 0-1.608l-2.307-2.109\" fill-rule=\"nonzero\"/>'\n },\n\n tg: {\n width: 18,\n height: 18,\n content:\n '<path d=\"M9 18c-5 0-9-4-9-9s4-9 9-9 9 4 9 9-4 9-9 9zm-1.5-7.4c1.1 1 2 3.3 2 3.3.4.2.7.1.8-.4l2.1-7.4c.1-.6-.2-.8-.6-.7L4 8.3c-.6.2-.6.5-.1.7 0 .1 2.4.6 3.6 1.6z\" fill-rule=\"nonzero\"/>'\n },\n\n meduzaSymbol: {\n width: 24,\n height: 18,\n content:\n '<path d=\"M10.026233,17.0968697 L13.9737671,18.3530831 L13.9737671,10.9855851 L13.9737671,8.48948164 L16.5131165,8.48948164 L16.5131165,17.0968697 L20.4375656,18.3530831 L23,14.8636014 L20.4606507,14.8636014 L20.4606507,6.37252945 L16.5362015,5 L13.9737671,8.02421743 L13.9737671,6.37252945 L10.049318,5 L7.48688354,8.02421743 L7.48688354,6.37252945 L3.56243443,5 L1,8.48948164 L3.53934943,8.48948164 L3.53934943,17.0968697 L7.48688354,18.3530831 L7.48688354,8.48948164 L10.026233,8.48948164 L10.026233,17.0968697 Z\" />'\n },\n\n backward: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M13 0v2.01c6.672.263 12 5.754 12 12.49C25 21.404 19.404 27 12.5 27S0 21.404 0 14.5c0-3.493 1.441-6.758 3.936-9.105a.75.75 0 111.028 1.092A10.965 10.965 0 001.5 14.5c0 6.075 4.925 11 11 11s11-4.925 11-11c0-5.907-4.656-10.727-10.499-10.989L13 6 8 3l5-3zm3.295 11.33v1.25h-3.16v1.63c.32-.32.86-.56 1.47-.56 1.13 0 2.14.81 2.14 2.16 0 1.42-1.06 2.31-2.67 2.31-1.16 0-2-.38-2.57-1l.79-.99c.45.47 1.07.73 1.77.73.79 0 1.24-.45 1.24-.99 0-.59-.44-.99-1.2-.99-.55 0-1 .16-1.4.54l-.99-.26v-3.83h4.58zm-5.94 0V18h-1.42v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24z\" fill-rule=\"nonzero\"/>'\n },\n\n forward: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M12 0l5 3-5 3V3.511C6.157 3.773 1.5 8.592 1.5 14.5c0 6.075 4.925 11 11 11s11-4.925 11-11c0-3.075-1.267-5.946-3.464-8.013a.75.75 0 011.028-1.092A12.465 12.465 0 0125 14.5C25 21.404 19.404 27 12.5 27S0 21.404 0 14.5C0 7.764 5.328 2.272 12 2.01V0zm4.295 11.33v1.25h-3.16v1.63c.32-.32.86-.56 1.47-.56 1.13 0 2.14.81 2.14 2.16 0 1.42-1.06 2.31-2.67 2.31-1.16 0-2-.38-2.57-1l.79-.99c.45.47 1.07.73 1.77.73.79 0 1.24-.45 1.24-.99 0-.59-.44-.99-1.2-.99-.55 0-1 .16-1.4.54l-.99-.26v-3.83h4.58zm-5.94 0V18h-1.42v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24z\" fill-rule=\"nonzero\"/>'\n },\n\n download: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M12.5 2C19.404 2 25 7.596 25 14.5S19.404 27 12.5 27 0 21.404 0 14.5 5.596 2 12.5 2zm0 1.5c-6.075 0-11 4.925-11 11s4.925 11 11 11 11-4.925 11-11-4.925-11-11-11zm6 15.75a.75.75 0 01.102 1.493l-.102.007h-12a.75.75 0 01-.102-1.493l.102-.007h12zm-6-12a.75.75 0 01.743.648L13.25 8v7.598l1.834-1.222a.75.75 0 11.832 1.248l-3 2a.75.75 0 01-.832 0l-3-2a.75.75 0 11.832-1.248l1.834 1.223V8a.75.75 0 01.648-.743l.102-.007z\" fill-rule=\"nonzero\" fill=\"currentColor\" />'\n },\n\n play: {\n width: 62,\n height: 62,\n content:\n '<path d=\"M24.35 41.772a.5.5 0 0 1-.739-.439V20.667a.5.5 0 0 1 .74-.44l18.944 10.334a.5.5 0 0 1 0 .878L24.351 41.772z\" fill-rule=\"nonzero\"/>'\n },\n\n pause: {\n width: 22,\n height: 22,\n content:\n '<path d=\"M12.832 4h2.8c.276 0 .5.224.5.5v12.394c0 .277-.224.5-.5.5h-2.8c-.276 0-.5-.223-.5-.5V4.5c0-.276.224-.5.5-.5zM6.5 4h2.8c.277 0 .5.224.5.5v12.394c0 .277-.223.5-.5.5H6.5c-.276 0-.5-.223-.5-.5V4.5c0-.276.224-.5.5-.5z\" />'\n },\n\n speedHalf: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M7.212 15.198V12.29l-.676.724L6 12.406 7.35 11h.825v4.198h-.963zM8.056 18H7.3l4.23-7h.765l-4.24 7zm2.99 0v-.735c1.717-1.27 2.134-1.679 2.134-2.14 0-.389-.288-.578-.665-.578-.467 0-.884.263-1.083.525l-.496-.64c.417-.493 1.053-.693 1.599-.693.913 0 1.599.462 1.599 1.312 0 .682-.556 1.28-1.708 2.14h1.737V18h-3.118zm5.998-2.918l-1.39 1.48-.567-.577 1.4-1.49-1.4-1.48.566-.588 1.39 1.49 1.4-1.49.557.588-1.4 1.48 1.4 1.49-.556.577-1.4-1.48z\" /><path d=\"M12.5 27C19.404 27 25 21.404 25 14.5S19.404 2 12.5 2 0 7.596 0 14.5 5.596 27 12.5 27zm0-1.5c-6.075 0-11-4.925-11-11s4.925-11 11-11 11 4.925 11 11-4.925 11-11 11z\" />'\n },\n\n speedOne: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M9.955 18v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24V18h-1.42zm4.6-2.78l-1.4 1.41-.57-.55 1.41-1.42-1.41-1.41.57-.56 1.4 1.42 1.41-1.42.56.56-1.41 1.41 1.41 1.42-.56.55-1.41-1.41z\" fill-rule=\"nonzero\"/><path d=\"M12.5 27C19.404 27 25 21.404 25 14.5S19.404 2 12.5 2 0 7.596 0 14.5 5.596 27 12.5 27zm0-1.5c-6.075 0-11-4.925-11-11s4.925-11 11-11 11 4.925 11 11-4.925 11-11 11z\" fill-rule=\"nonzero\"/>'\n },\n\n speedOneHalf: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M5.62 18v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24V18H5.62zm3.37-2.67v-2.77l-.68.69-.54-.58 1.36-1.34h.83v4h-.97zM9.84 18h-.76l4.26-6.67h.77L9.84 18zm3.01 0v-.7c1.73-1.21 2.15-1.6 2.15-2.04 0-.37-.29-.55-.67-.55-.47 0-.89.25-1.09.5l-.5-.61c.42-.47 1.06-.66 1.61-.66.92 0 1.61.44 1.61 1.25 0 .65-.56 1.22-1.72 2.04h1.75V18h-3.14zm6.04-2.78l-1.4 1.41-.57-.55 1.41-1.42-1.41-1.41.57-.56 1.4 1.42 1.41-1.42.56.56-1.41 1.41 1.41 1.42-.56.55-1.41-1.41z\" fill-rule=\"nonzero\"/><path d=\"M12.5 27C19.404 27 25 21.404 25 14.5S19.404 2 12.5 2 0 7.596 0 14.5 5.596 27 12.5 27zm0-1.5c-6.075 0-11-4.925-11-11s4.925-11 11-11 11 4.925 11 11-4.925 11-11 11z\" fill-rule=\"nonzero\"/>'\n },\n\n speedTwo: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M7.147 18v-1.158c2.685-2.078 3.471-2.792 3.471-3.64 0-.6-.52-.9-1.061-.9-.748 0-1.318.311-1.76.797L7 12.127C7.64 11.352 8.613 11 9.527 11c1.396 0 2.507.827 2.507 2.202 0 1.18-.924 2.203-2.625 3.506h2.675V18H7.147zm7.916-2.874l-1.377 1.457-.56-.568 1.386-1.468-1.386-1.458.56-.58 1.377 1.469 1.386-1.468.551.579-1.386 1.458L17 16.015l-.55.568-1.387-1.457z\" fill-rule=\"nonzero\"/><path d=\"M12.5 27C19.404 27 25 21.404 25 14.5S19.404 2 12.5 2 0 7.596 0 14.5 5.596 27 12.5 27zm0-1.5c-6.075 0-11-4.925-11-11s4.925-11 11-11 11 4.925 11 11-4.925 11-11 11z\" fill-rule=\"nonzero\"/>'\n },\n\n podcastBookmark: {\n width: 25,\n height: 27,\n content:\n '<path d=\"M12.5 27C19.404 27 25 21.404 25 14.5S19.404 2 12.5 2 0 7.596 0 14.5 5.596 27 12.5 27zm0-1.5c-6.075 0-11-4.925-11-11s4.925-11 11-11 11 4.925 11 11-4.925 11-11 11z\" /> <path d=\"M17.071 8.25H8a.75.75 0 00-.75.75v11.545l.007.104a.75.75 0 001.228.468l4.05-3.437 4.051 3.437a.75.75 0 001.235-.572V9a.75.75 0 00-.75-.75zm-.75 1.499v9.176l-3.3-2.8-.098-.07a.75.75 0 00-.873.07l-3.3 2.799V9.749h7.571z\" data-stroke=\"true\" /> <path d=\"M17.071 8.25H8a.75.75 0 00-.75.75v11.545l.007.104a.75.75 0 001.228.468l4.05-3.437 4.051 3.437a.75.75 0 001.235-.572V9a.75.75 0 00-.75-.75z\" data-fill=\"true\" />'\n },\n\n reaction: {\n width: 16,\n height: 16,\n content:\n '<path data-theme=\"light\" fill=\"#D09959\" d=\"M1 2h14v12H1z\"/> <path d=\"M0 1.778C0 .8.8 0 1.778 0h12.444C15.2 0 16 .8 16 1.778v12.444C16 15.2 15.2 16 14.222 16H1.778C.8 16 0 15.2 0 14.222V1.778zM6.8 11.7l2.5.8V6.2h1.6v5.5l2.5.8 1.6-2.3h-1.6V4.8L10.9 4 9.3 5.9V4.8L6.8 4 5.1 5.9V4.8L2.6 4 1 6.2h1.6v5.5l2.5.8V6.2h1.7v5.5z\" />'\n },\n\n cross: {\n width: 18,\n height: 18,\n content:\n '<path fill=\"none\" fill-rule=\"evenodd\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" vector-effect=\"non-scaling-stroke\" d=\"M2 2l14 14M16 2L2 16\" />'\n },\n\n link: {\n width: 24,\n height: 24,\n content:\n '<path d=\"M9.158 18.928c-1.065 0-2.13-.405-2.94-1.215-1.624-1.623-1.624-4.262 0-5.884l.643-.645c.327-.326.854-.326 1.18 0 .325.326.325.853 0 1.178l-.645.645c-.972.972-.972 2.554 0 3.526.973.972 2.554.973 3.526 0l2.842-2.84c.97-.972.97-2.555 0-3.527-.325-.325-.325-.854 0-1.18.325-.324.853-.324 1.178 0 1.623 1.625 1.623 4.264 0 5.885l-2.84 2.84c-.81.81-1.877 1.216-2.942 1.216\" /> <path d=\"M10.578 14.184c-.213 0-.426-.082-.59-.244-.784-.785-1.217-1.83-1.217-2.94 0-1.113.433-2.158 1.22-2.944l2.84-2.84c1.622-1.62 4.26-1.62 5.883 0 1.622 1.623 1.622 4.262 0 5.883l-.645.643c-.325.326-.852.326-1.178 0-.325-.325-.325-.852 0-1.178l.645-.644c.972-.97.972-2.554 0-3.526s-2.556-.972-3.527 0l-2.84 2.842c-.47.47-.73 1.096-.73 1.762 0 .667.26 1.293.73 1.763.325.327.325.854 0 1.18-.163.162-.376.244-.59.244\" />'\n },\n\n search: {\n width: 16,\n height: 16,\n content:\n '<g transform=\"translate(2 1)\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" vector-effect=\"non-scaling-stroke\"><circle cx=\"5.5\" cy=\"5.5\" r=\"5.5\"/><path d=\"M11.37 13.442l-.995-1.272\"/></g>'\n },\n\n card: {\n width: 15,\n height: 15,\n content:\n '<path d=\"M9 5.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H4a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5zm-.5 1h-4v4h4v-4zm2.5-3a.5.5 0 0 1 .5.5v5a.5.5 0 1 1-1 0V4.5H6a.5.5 0 0 1 0-1h5z\" fill-rule=\"nonzero\"/>'\n },\n\n podcast: {\n width: 15,\n height: 15,\n content:\n '<path d=\"M5.252 11.432A.5.5 0 0 1 4.5 11V4a.5.5 0 0 1 .752-.432l6 3.5a.5.5 0 0 1 0 .864l-6 3.5zm.248-1.303L10.008 7.5 5.5 4.87v5.26z\" fill-rule=\"nonzero\" />'\n },\n\n arrow: {\n width: 12,\n height: 12,\n content:\n '<path d=\"M3 7l3 3.5L9 7M6 10V1\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.2\" vector-effect=\"non-scaling-stroke\" />'\n },\n\n brent: {\n width: 9,\n height: 12,\n content:\n '<g fill=\"#999\" fill-rule=\"nonzero\"><path d=\"M4.332 0l.528.606c2.528 2.902 3.804 5.07 3.804 6.634A4.332 4.332 0 110 7.24C0 5.676 1.276 3.508 3.804.606L4.332 0zm0 2.143l-.176.212C2.313 4.589 1.4 6.248 1.4 7.24a2.932 2.932 0 105.864 0c0-.992-.914-2.651-2.756-4.885l-.176-.212z\"/><path d=\"M2.973 7.475c0 .415.417.863.835.924l.097.008v.7c-.79 0-1.548-.716-1.626-1.5l-.006-.132h.7z\"/></g> '\n },\n\n user: {\n width: 16,\n height: 16,\n content:\n '<path fill=\"currentColor\" fill-rule=\"nonzero\" d=\"M8 1a4.25 4.25 0 012.676 7.552 6.751 6.751 0 014.074 6.198.75.75 0 11-1.5 0 5.25 5.25 0 00-10.5 0 .75.75 0 11-1.5 0 6.752 6.752 0 014.074-6.199A4.25 4.25 0 018 1zm0 1.5A2.75 2.75 0 108 8a2.75 2.75 0 000-5.5z\" />'\n },\n\n bookmark: {\n width: 17,\n height: 21,\n content:\n '<path d=\"M16 20l-7.5-6.333L1 20V1h15z\" stroke=\"currentColor\" fill-rule=\"evenodd\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>'\n },\n\n receipt: {\n width: 10,\n height: 13,\n content:\n '<g fill=\"currentColor\" fill-rule=\"nonzero\"><path d=\"M10 0H0v13l2-1.74 1.5 1.305L5 11.26l1.5 1.305L8 11.26 10 13V0zM9 .997v9.81l-1-.87-1.5 1.304L5 9.937 3.5 11.24 2 9.937l-1 .87V.996h8z\"/><path d=\"M7 3v1H3V3zM7 6v1H3V6z\"/></g>'\n },\n\n read: {\n width: 15,\n height: 15,\n content:\n '<g fill=\"none\" fill-rule=\"evenodd\"><path opacity=\".98\" d=\"M0 0h15v15H0z\"/><path d=\"M13.085 1.694a.513.513 0 01.855.56l-.051.077-3.163 3.975a.514.514 0 01-.73.075l-.068-.069-1.812-2.208a.512.512 0 01.729-.716l.065.066 1.409 1.718 2.766-3.478z\" fill=\"#6EAC65\" fill-rule=\"nonzero\"/><path d=\"M6.454 12.997l-.06-.01-.078-.023a.49.49 0 01-.266-.24l.011.015a2.349 2.349 0 00-.535-.607c-.89-.745-2.117-.917-3.813-.12a.5.5 0 01-.706-.37L1 11.558V4.568a.5.5 0 01.287-.453c2.053-.963 3.695-.733 4.88.26.327.272.556.548.698.77l.084.144.018.04.022.076.01.071L7 11.233l.126-.09c.95-.656 2.16-.857 3.608-.417l.266.087v-2.81a.5.5 0 01.41-.491l.09-.008a.5.5 0 01.492.41l.008.09v3.555a.5.5 0 01-.713.452c-1.696-.796-2.922-.624-3.813.12a2.533 2.533 0 00-.497.544l-.038.064a.486.486 0 01-.485.258zm-4.29-8.17L2 4.892v5.92c1.637-.572 2.977-.348 4 .42l.002-5.58a2.605 2.605 0 00-.476-.513c-.81-.677-1.897-.88-3.362-.314z\" fill=\"currentColor\" fill-rule=\"nonzero\"/></g>'\n },\n listened: {\n width: 15,\n height: 15,\n content:\n '<g fill-rule=\"nonzero\"><path d=\"M4.978 4.354a.5.5 0 01-.332.624c-1.197.367-2.064 1.527-2.14 2.897l-.005.167a.749.749 0 01.999.708v3a.75.75 0 01-1.458.248L2 12a1 1 0 01-1-1v-1a1 1 0 01.5-.866V8.072c0-1.886 1.172-3.535 2.854-4.05a.5.5 0 01.624.332zM10 7a.5.5 0 01.492.41l.008.09.001 1.634a1 1 0 01.492.745L11 10v1a1 1 0 01-.883.993L10 12l-.042-.002a.75.75 0 01-1.451-.146L8.5 11.75v-3a.75.75 0 011.001-.707L9.5 7.5l.008-.09A.5.5 0 0110 7z\" fill=\"currentColor\" /><path d=\"M11.585 1.194a.513.513 0 01.855.56l-.051.077-3.163 3.975a.514.514 0 01-.73.075l-.068-.069-1.812-2.208a.512.512 0 01.729-.716l.065.066 1.409 1.718 2.766-3.478z\" fill=\"#6EAC65\" /></g>'\n }\n}\n","import React from 'react'\nimport { SvgSymbolProps } from './SvgSymbol.types'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './SvgSymbol.module.css'\nimport { icons } from './icons'\n\nexport const SvgSymbol: React.FC<SvgSymbolProps> = ({\n icon,\n size,\n styleContext\n}) => {\n const data = icons[icon]\n\n return (\n <svg\n data-testid=\"svg-symbol\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n className={makeClassName([\n [styles.root, true],\n [styles[size], !!styles[size]],\n [styles[icon], !!styles[icon]],\n [styles[styleContext], !!styles[styleContext]]\n ])}\n width={data.width}\n height={data.height}\n viewBox={`0 0 ${data.width} ${data.height}`}\n dangerouslySetInnerHTML={{ __html: data.content }}\n />\n )\n}\n","import React from 'react'\n\nconst BlockContext = React.createContext({ lightBox: null })\n\nexport const BlockProvider = BlockContext.Provider\n\nexport default BlockContext\n","type viewportSize = {\n width: number\n height: number\n}\n\nexport default (): viewportSize => ({\n width:\n window.innerWidth ||\n document.documentElement.clientWidth ||\n document.body.clientWidth,\n height:\n window.innerHeight ||\n document.documentElement.clientHeight ||\n document.body.clientHeight\n})\n","export const MediaQuerySizes = {\n MOBILE: 512,\n PORTRAIT_TABLET: 768,\n LANDSCAPE_TABLET: 1024,\n DESKTOP: 1010,\n WIDE_DESKTOP: 1200\n}\n\nexport const imageBreakpoints = {\n 325: '(min-width: 0)',\n 520: '(min-width: 325px)',\n 600: '(min-width: 600px)',\n 650: '(min-width: 650px)',\n 980: '(min-width: 1000px)',\n 1335: '(min-width: 1000px)'\n}\n\nexport const imageConditionalKeys = {\n xs: [325],\n superFull: [1335, 650, 520, 325],\n full: [980, 650, 520, 325],\n default: [650, 520, 325],\n narrow: [600, 325]\n}\n","import React, { useState, useEffect } from 'react'\nimport { useInView } from 'react-intersection-observer'\n\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './Lazy.module.css'\n\nimport { LazyProps } from './Lazy.types'\n\nexport const Lazy: React.FC<LazyProps> = ({ children, threshold }) => {\n const [ref, inView, entry] = useInView({\n threshold: threshold || 0\n })\n\n const [visible, setVisible] = useState(false)\n\n useEffect(() => {\n if (entry && entry.boundingClientRect && entry.boundingClientRect.y < 0) {\n setVisible(true)\n }\n }, [entry])\n\n useEffect(() => {\n if (inView) {\n setVisible(true)\n }\n }, [inView])\n\n return (\n <div\n className={makeClassName([\n [styles.root, true],\n [styles.visible, visible]\n ])}\n ref={ref}\n data-testid=\"lazy\"\n >\n {visible && children}\n </div>\n )\n}\n","import React, { useState, useEffect } from 'react'\nimport { PictureProps } from './Image.types'\n\nimport { imageBreakpoints, imageConditionalKeys } from '../constants'\nimport { toCamel } from '../utils/toCamel'\n\nexport const RenderPicture: React.FC<PictureProps> = ({\n source,\n fallbackSource,\n optimized,\n alt,\n display\n}) => {\n const [fallback, setFallback] = useState(false)\n\n useEffect(() => {\n setFallback(!window.HTMLPictureElement)\n }, [])\n\n const keys =\n imageConditionalKeys[toCamel(display)] || imageConditionalKeys.default\n\n return (\n <picture>\n {source && (\n <source media=\"(min-width: 325px)\" srcSet={`${source[1]} 2x`} />\n )}\n\n {optimized && !optimized.w325 && (\n <source media=\"(min-width: 0)\" srcSet={`${optimized.original}`} />\n )}\n\n {optimized &&\n keys.map(key => {\n const breakpoint = optimized[`w${key}`]\n\n if (!breakpoint) {\n return null\n }\n\n return (\n <React.Fragment key={key}>\n <source\n type=\"image/webp\"\n media={imageBreakpoints[key]}\n srcSet={`${breakpoint['2x_webp']} 2x, ${breakpoint['1x_webp']} 1x `}\n />\n\n <source\n type=\"image/png\"\n media={imageBreakpoints[key]}\n srcSet={`${breakpoint['2x']} 2x, ${breakpoint['1x']} 1x `}\n />\n </React.Fragment>\n )\n })}\n\n <img\n src={\n fallback\n ? fallbackSource\n : 'data:image/gif;base64,R0lGODlhAQABAPAAAPLy8gAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=='\n }\n alt={alt}\n />\n </picture>\n )\n}\n\nexport default RenderPicture\n","export const toCamel = (s: string): string =>\n s.replace(/([_][a-z])/gi, str => str.toUpperCase().replace('_', ''))\n","import React, { useContext } from 'react'\nimport { ImageProps } from './Image.types'\n\nimport makeClassName from '../utils/makeClassName'\n\nimport BlockContext from '../utils/BlockContext'\nimport viewportSize from '../utils/viewportSize'\nimport { MediaQuerySizes } from '../constants'\n\nimport { Lazy } from '../Lazy'\nimport RenderPicture from './RenderPicture'\n\nimport styles from './Image.module.css'\n\nexport const Image: React.FC<ImageProps> = ({\n alt,\n display,\n optimized,\n width,\n height,\n source,\n lazy,\n fullscreen,\n ratio\n}) => {\n const { lightBox } = useContext(BlockContext)\n\n const handleClick = (): void => {\n const { width: viewportWidth } = viewportSize()\n\n if (\n (optimized && !optimized.original) ||\n !lightBox ||\n (viewportWidth >= MediaQuerySizes.LANDSCAPE_TABLET && !fullscreen)\n ) {\n return\n }\n\n postMessage('fullscreen_click', 'click')\n lightBox.show(optimized, width, height, alt)\n }\n\n const pictureStyles = {\n paddingBottom: `${100 / (ratio || width / height)}%`\n }\n\n const blockStyles = {\n maxWidth: width <= 649 ? width : '100%'\n }\n\n /* fallback w325 url until w6 was released */\n const fallbackSource =\n (source && source[0]) ||\n (optimized.w325 && optimized.w325['1x']) ||\n optimized.original\n\n return (\n <div\n className={makeClassName([\n [styles.root, true],\n [styles.fullscreen, fullscreen]\n ])}\n style={blockStyles}\n data-testid=\"image\"\n >\n <div\n className={styles.wrapper}\n style={pictureStyles}\n onClick={(): void => handleClick()}\n onKeyPress={(): void => handleClick()}\n role=\"button\"\n tabIndex={0}\n >\n {lazy ? (\n <>\n <Lazy threshold={0.25}>\n <RenderPicture\n fallbackSource={fallbackSource}\n source={source}\n optimized={optimized}\n alt={alt}\n display={display}\n />\n </Lazy>\n <noscript>\n <img src={fallbackSource} alt={alt} />\n </noscript>\n </>\n ) : (\n <RenderPicture\n fallbackSource={fallbackSource}\n source={source}\n optimized={optimized}\n alt={alt}\n display={display}\n />\n )}\n </div>\n </div>\n )\n}\n","const makeStyleContext = (\n classNames: (string[] | string | boolean)[][],\n styleContext: string[] | string,\n styles\n): (string[] | string | boolean)[][] => {\n const context = Array.isArray(styleContext)\n ? styleContext.filter(ctx => styles[ctx]).map(ctx => [[styles[ctx]], true])\n : [[styles[styleContext], !!styleContext && !!styles[styleContext]]]\n\n return classNames.concat(context)\n}\n\nexport default makeStyleContext\n","import React from 'react'\nimport { TagProps } from './Tag.types'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './Tag.module.css'\n\nexport const Tag: React.FC<TagProps> = ({\n children,\n size = 'small',\n theme = 'gold',\n styleContext,\n correlation,\n onlyOn\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[size], !!size && !!styles[size]],\n [styles[theme], !!theme && !!styles[theme]],\n [styles[onlyOn], !!onlyOn && !!styles[onlyOn]],\n [styles[correlation], !!correlation && !!styles[correlation]]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"tag\" className={makeClassName(classNames)}>\n {children}\n </div>\n )\n}\n","import React from 'react'\nimport { MediaCaptionProps } from './MediaCaption.types'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './MediaCaption.module.css'\n\nexport const MediaCaption: React.FC<MediaCaptionProps> = ({\n credit,\n caption,\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [[styles.root, true]]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"media-caption\" className={makeClassName(classNames)}>\n {caption && (\n <div\n className={styles.caption}\n dangerouslySetInnerHTML={{ __html: caption }}\n />\n )}\n {credit && (\n <div\n className={styles.credit}\n dangerouslySetInnerHTML={{ __html: credit }}\n />\n )}\n </div>\n )\n}\n","import React from 'react'\nimport { TableProps } from './Table.types'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport makeClassName from '../utils/makeClassName'\n\nimport { MediaCaption } from '../MediaCaption'\n\nimport styles from './Table.module.css'\n\nexport const Table: React.FC<TableProps> = ({\n styleContext,\n block: {\n rows,\n options,\n display,\n columns_widths: columnsWidth,\n table_credit: tableCredit\n }\n}) => {\n const colors = {\n '#ffffff': 'white',\n '#f5f5f5': 'gray',\n '#feeeee': 'pink',\n '#e6f3ff': 'blue',\n '#fffde6': 'yellow',\n '#fff9f2': 'orange',\n '#e7f2ef': 'green',\n '#f4f0f8': 'violet'\n }\n\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[display], !!display && !!styles[display]]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"table\" className={makeClassName(classNames)}>\n <div className={styles.wrapper}>\n <div className={styles.table}>\n <div className={styles.tracks}>\n {rows.map((row, i) => {\n return (\n <div key={row.key} className={styles.row}>\n {row.cells.map((cell, j) => (\n <div\n key={cell.key}\n className={makeClassName([\n [styles.cell, true],\n [styles.header, options.header && i === 0],\n [styles[colors[cell.color]], true],\n [styles[columnsWidth[j]], true],\n [\n styles.fixedColumn,\n options.fixed_first_column && j === 0\n ]\n ])}\n dangerouslySetInnerHTML={{ __html: cell.val }}\n />\n ))}\n </div>\n )\n })}\n </div>\n </div>\n </div>\n\n {tableCredit && (\n <MediaCaption credit={tableCredit} styleContext={styleContext} />\n )}\n </div>\n )\n}\n","import React from 'react'\nimport { MaterialNoteProps } from './MaterialNote.types'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './MaterialNote.module.css'\n\nexport const MaterialNote: React.FC<MaterialNoteProps> = ({\n block: { data },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [[styles.root, true]]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"material-note\" className={makeClassName(classNames)}>\n {data &&\n data.map(item => (\n <p\n className={styles[item.type]}\n key={item.id}\n dangerouslySetInnerHTML={{ __html: item.data }}\n />\n ))}\n </div>\n )\n}\n","import React from 'react'\nimport { BookmarkButtonProps } from './BookmarkButton.types'\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport { SvgSymbol } from '../SvgSymbol'\n\nimport styles from './BookmarkButton.module.css'\n\nexport const BookmarkButton: React.FC<BookmarkButtonProps> = ({\n styleContext,\n theme,\n isInBookmarks,\n onClick\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles.isInBookmarks, isInBookmarks],\n [styles[theme], !!theme && !!styles[theme]]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"bookmark-button\" className={makeClassName(classNames)}>\n <button\n className={styles.control}\n onClick={(): void => onClick()}\n type=\"button\"\n >\n <SvgSymbol icon=\"bookmark\" size=\"unset\" />\n </button>\n </div>\n )\n}\n","import React, { useState, useEffect } from 'react'\nimport { PopoverProps } from './Popover.types'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './Popover.module.css'\n\nexport const Popover: React.FC<PopoverProps> = ({ children, onClose }) => {\n const [visible, setVisible] = useState(true)\n\n const handleClose = (): void => {\n setVisible(false)\n setTimeout(onClose, 350)\n }\n\n const handleScroll = (): void => {\n handleClose()\n }\n\n const escFunction = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n handleClose()\n }\n }\n\n useEffect(() => {\n window.addEventListener('keydown', escFunction, false)\n window.addEventListener('scroll', handleScroll, false)\n\n return () => {\n window.removeEventListener('keydown', escFunction, false)\n window.removeEventListener('scroll', handleScroll, false)\n }\n }, [visible])\n\n /* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\n return (\n <div\n data-testid=\"popover\"\n className={makeClassName([\n [styles.root, true],\n [styles.visible, visible]\n ])}\n >\n <div className={styles.overlay} onClick={(): void => handleClose()} />\n\n <div className={styles.container}>\n <button\n type=\"button\"\n className={styles.dismiss}\n onClick={(): void => handleClose()}\n aria-label=\"dismiss\"\n />\n <svg width=\"100%\" className={styles.background}>\n <defs>\n <mask id=\"myMask\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">\n <rect fill=\"white\" y=\"0\" width=\"100%\" height=\"100%\" x=\"0\" />\n <svg x=\"50%\" overflow=\"visible\">\n <g transform=\"translate(-12 0)\">\n <path d=\"M4.61852778e-14,9.76996262e-15 L9.84597532,5.80270273 C11.0992017,6.54128882 12.6546044,6.54128882 13.9078308,5.80270273 L23.7538061,9.76996262e-15 L4.61852778e-14,9.76996262e-15 Z\" />\n </g>\n </svg>\n </mask>\n </defs>\n <rect\n fill=\"#F7F7F7\"\n id=\"base-mask\"\n mask=\"url(#myMask)\"\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n />\n </svg>\n {children}\n </div>\n </div>\n )\n}\n","import React from 'react'\nimport { MetaProps } from './Meta.types'\n\nimport makeStyleContext from '../utils/makeStyleContext'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './Meta.module.css'\n\nexport const Meta: React.FC<MetaProps> = ({\n hasSource,\n theme,\n children,\n onlyOn,\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[theme], !!theme && !!styles[theme]],\n [styles[onlyOn], !!onlyOn],\n [styles.hasSource, hasSource]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"meta\" className={makeClassName(classNames)}>\n {children}\n </div>\n )\n}\n","import React from 'react'\nimport { TimestampProps } from './Timestamp.types'\n\nimport dayjs from 'dayjs'\nimport 'dayjs/locale/ru'\n\nimport relativeTime from 'dayjs/plugin/relativeTime'\n\nimport styles from './Timestamp.module.css'\n\nexport const Timestamp: React.FC<TimestampProps> = ({\n publishedAt,\n locale = 'ru',\n type\n}) => {\n let published\n const timeFormat =\n locale === 'ru' ? 'HH:mm, D MMMM YYYY' : 'h:mm a, MMMM D, YYYY'\n\n const preparedPublishedAt = publishedAt * 1000\n\n dayjs.locale(locale)\n dayjs.extend(relativeTime)\n\n if (type === 'fromNow') {\n published = dayjs(preparedPublishedAt).fromNow()\n } else if (type === 'format') {\n published = dayjs(preparedPublishedAt).format('HH:mm')\n } else if (type === 'date') {\n published = dayjs(preparedPublishedAt).format(timeFormat)\n } else {\n throw new Error('Unknown time type')\n }\n\n return (\n <time data-testid=\"timestamp\" className={styles.root}>\n {published}\n </time>\n )\n}\n","import React, { useCallback, useEffect, useRef, useState } from 'react'\n\ninterface DangerousHtmlProps {\n className?: string\n html: string\n tagName?: string\n}\n\nconst DangerousHTML: React.FC<DangerousHtmlProps> = ({\n className = '',\n tagName: TagName = 'div',\n html\n}) => {\n const element = useRef<HTMLElement | null>(null)\n const [canRenderHtml, setCanRenderHtml] = useState(false)\n\n useEffect(() => {\n setCanRenderHtml(true)\n }, [])\n\n const replaceScriptElementsRecursive = useCallback(node => {\n if (\n node.tagName === 'SCRIPT' &&\n (!node.id || node.id.indexOf('script-') !== 0)\n ) {\n const script = document.createElement('script')\n\n script.id = `script-${Math.random()\n .toString(16)\n .slice(2)}`\n script.innerHTML = node.innerHTML\n\n const attrs = node.attributes\n\n for (let i = 0; i < attrs.length; i += 1) {\n const { name, value } = attrs[i]\n\n script.setAttribute(name, value)\n }\n\n node.parentElement.replaceChild(script, node)\n } else {\n let i = 0\n const children = node.childNodes\n\n while (i < children.length) {\n replaceScriptElementsRecursive(children[i])\n i += 1\n }\n }\n }, [])\n\n const prepareAnchors = useCallback(() => {\n const anchors = Array.from(element.current.querySelectorAll('a'))\n\n anchors.forEach(a => {\n a.setAttribute('target', '_blank')\n })\n }, [])\n\n useEffect(() => {\n if (canRenderHtml && html.indexOf('script') > -1 && element.current) {\n element.current.innerHTML = html\n replaceScriptElementsRecursive(element.current)\n prepareAnchors()\n }\n }, [canRenderHtml, element, html])\n\n return (\n <TagName\n // @ts-ignore\n ref={element}\n className={className}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n}\n\nexport default DangerousHTML\n","import React, { useState, useEffect, useRef } from 'react'\n\nimport enableInlineVideo from 'iphone-inline-video'\n\nimport { Image } from '../Image'\nimport { Popover } from '../Popover'\nimport { MediaCaption } from '../MediaCaption'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport viewportSize from '../utils/viewportSize'\nimport DangerousHTML from '../utils/DangerousHtml'\n\nimport { MediaQuerySizes } from '../constants'\n\nimport { EmbedBlockProps } from './EmbedBlock.types'\n\nimport styles from './EmbedBlock.module.css'\n\nexport const EmbedBlock: React.FC<EmbedBlockProps> = ({\n block,\n block: {\n data,\n data: {\n display,\n only_on: onlyOn,\n provider,\n cc,\n optimized,\n small_url: small,\n large_url: large\n }\n },\n styleContext,\n children\n}) => {\n const [isPopoverShown, setIsPopoverShown] = useState(false)\n\n const [videoFrozen, setVideoFrozen] = useState(false)\n const videoElem = useRef(null)\n const wrapperElem = useRef(null)\n\n const handleVideoTouch = (): void => {\n videoElem.current.play()\n setVideoFrozen(false)\n }\n\n const handleVideoError = (): void => {\n const video = videoElem.current\n\n video.setAttribute('poster', video.dataset.gif)\n\n setVideoFrozen(false)\n }\n\n useEffect(() => {\n const video = videoElem.current\n\n if (block.type === 'gif' && video) {\n const { width: viewportWidth } = viewportSize()\n\n enableInlineVideo(video)\n\n if (viewportWidth >= MediaQuerySizes.MOBILE) {\n video.setAttribute('autoplay', true)\n video.play()\n } else {\n setVideoFrozen(true)\n video.pause()\n video.addEventListener('touchstart', handleVideoTouch)\n }\n\n video.addEventListener('error', handleVideoError)\n }\n\n return (): void => {\n if (video) {\n video.removeEventListener('touchstart', handleVideoTouch)\n video.removeEventListener('error', handleVideoError)\n }\n }\n }, [])\n\n const renderCC = (context?: string | string[]): JSX.Element => (\n <MediaCaption\n credit={data.credit}\n caption={data.caption}\n styleContext={context || styleContext}\n />\n )\n\n const renderEmbed = (style: any): JSX.Element[] | JSX.Element => {\n const { html } = block.data\n\n switch (block.type) {\n case 'gif': {\n return (\n <div className={styles.figure}>\n <div\n className={styles.objectWrap}\n style={style}\n ref={wrapperElem}\n data-frozen={videoFrozen}\n >\n <video\n playsInline\n muted\n loop\n autoPlay\n preload=\"metadata\"\n data-gif={block.data.gif_url}\n ref={videoElem}\n >\n <source\n src={`https://meduza.io${block.data.mp4_url}`}\n type=\"video/mp4\"\n />\n </video>\n </div>\n </div>\n )\n }\n case 'image': {\n return (\n <div className={styles.figure}>\n {(small || optimized) && (\n <Image\n fullscreen={block.data.fullscreen}\n source={!optimized && [small, large]}\n optimized={block.data.optimized}\n width={block.data.width}\n height={block.data.height}\n alt={block.data.caption}\n display={block.data.display}\n lazy={block.data.lazy}\n />\n )}\n </div>\n )\n }\n case 'game_embed': {\n return (\n <div className={styles.gameEmbed}>\n <iframe\n src={block.data.game_src}\n id={block.data.game_id}\n title=\"Game embed\"\n />\n </div>\n )\n }\n\n default: {\n return (\n <div className={styles.object}>\n <div className={styles.wrapper} style={style}>\n <DangerousHTML className={styles.objectWrap} html={html} />\n </div>\n </div>\n )\n }\n }\n }\n\n const style: React.CSSProperties = {}\n\n let isProportional\n\n // @TODO: Разобраться зачем это было нужно\n // const className = Object.keys(styleContext)\n // .filter(key => key.startsWith('isIn') && styles[key])\n // .reduce((acc, key) => {\n // acc.push([styles[key], true])\n\n // return acc\n // }, [])\n\n /* eslint-disable react/no-array-index-key, no-mixed-operators */\n if (block.data.height && block.data.width) {\n style.paddingBottom = `${(block.data.height / block.data.width) * 100}%`\n style.height = 0\n\n isProportional = true\n }\n\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles.cc, cc],\n [styles[display], !!display && styles[display]],\n [styles[provider], !!provider && !!styles[provider]],\n [styles[onlyOn], !!onlyOn && styles[onlyOn]],\n [styles.proportional, !!styles.proportional && isProportional]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <figure className={makeClassName(classNames)}>\n {children && (\n <div className={styles.object}>\n <div className={styles.wrapper} style={style}>\n <div className={styles.objectWrap}>{children}</div>\n </div>\n </div>\n )}\n\n {!children && renderEmbed(style)}\n\n {cc === 'default' && <figcaption>{renderCC()}</figcaption>}\n\n {cc === 'button' && (\n <button\n className={styles.control}\n type=\"button\"\n aria-label=\"Open\"\n onClick={(): void => {\n setIsPopoverShown(!isPopoverShown)\n }}\n />\n )}\n\n {cc === 'button' && isPopoverShown && (\n <Popover\n onClose={(): void => {\n setIsPopoverShown(false)\n }}\n >\n {renderCC('isInPopover')}\n </Popover>\n )}\n </figure>\n )\n}\n","import React, { useEffect, useRef } from 'react'\nimport { EmbedBlockProps } from './EmbedBlock.types'\n\nimport { EmbedBlock } from './EmbedBlock'\n\nexport const IframeBlock: React.FC<EmbedBlockProps> = ({\n block,\n block: { id },\n styleContext,\n lang = 'ru'\n}) => {\n const element = useRef(null)\n\n const renderIframe = (): void => {\n const rootEl = document.createElement('div')\n const contentEl = document.createElement('div')\n const scriptEl = document.createElement('script')\n const style = document.createElement('style')\n const range = document.createRange()\n\n range.setStart(contentEl, 0)\n contentEl.setAttribute('id', 'content')\n scriptEl.textContent = `\n function getDocHeight() {\n var doc = document;\n var body = doc.body;\n var html = doc.documentElement;\n var height = Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight );\n\n doc.body.style.margin=\"0\";\n\n return document.getElementById('content') ? document.getElementById('content').offsetHeight : height;\n }\n\n function sendDocHeightMsg() {\n var height = getDocHeight();\n var message = JSON.stringify({\n action: {\n type: \"UPDATE_HEIGHT\",\n payload: {\n id: \"${block.id}\",\n height: height\n }\n }\n });\n parent.postMessage(\"mdzMaterialEmbedHeight=\" + message, '*');\n }\n\n setInterval(sendDocHeightMsg, 300);\n `\n\n style.type = 'text/css'\n style.innerHTML =\n block.type === 'embed_code'\n ? '.twitter-tweet { padding-top: 15px; margin: 0 !important; }'\n : '.twitter-tweet { margin: 0 !important; } .fb-post { display: block; } .instagram-media { min-width: 0 !important; }'\n\n contentEl.appendChild(range.createContextualFragment(block.data.html))\n rootEl.appendChild(scriptEl)\n rootEl.appendChild(contentEl)\n contentEl.appendChild(style)\n\n const frame = element.current.querySelector('iframe').contentDocument\n\n frame.open()\n frame.close()\n frame.documentElement.setAttribute('lang', lang)\n frame.body.appendChild(rootEl)\n }\n\n useEffect(() => {\n renderIframe()\n }, [])\n\n return (\n <EmbedBlock block={block} styleContext={styleContext}>\n <div\n ref={element}\n dangerouslySetInnerHTML={{\n __html: `<iframe id=${id} frameBorder=\"0\" scrolling=\"no\"></iframe>`\n }}\n />\n </EmbedBlock>\n )\n}\n","import React from 'react'\nimport { EmbedBlockProps } from './EmbedBlock.types'\n\nimport { EmbedBlock } from './EmbedBlock'\nimport { IframeBlock } from './IframeBlock'\n\nexport const EmbedBlockContainer: React.FC<EmbedBlockProps> = ({\n block,\n styleContext,\n lang\n}) => {\n if (block.data.wrap_with_iframe) {\n return <IframeBlock block={block} styleContext={styleContext} lang={lang} />\n }\n return <EmbedBlock block={block} styleContext={styleContext} />\n}\n","import React from 'react'\nimport { QuoteBlockProps } from './QuoteBlock.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport styles from './QuoteBlock.module.css'\n\nexport const QuoteBlock: React.FC<QuoteBlockProps> = ({\n block: { data },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [[styles.root, true]]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"quote-block\" className={makeClassName(classNames)}>\n <p dangerouslySetInnerHTML={{ __html: data }} />\n </div>\n )\n}\n","import React from 'react'\nimport { CardTitleProps } from './CardTitle.types'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './CardTitle.module.css'\n\nexport const CardTitle: React.FC<CardTitleProps> = ({\n block: { only_on: onlyOn, index, text },\n styleContext\n}) => {\n return (\n <div\n data-testid=\"card-title\"\n className={makeClassName([\n [styles.root, true],\n [styles[onlyOn], !!onlyOn],\n [styles[styleContext], !!styleContext && !!styles[styleContext]]\n ])}\n >\n <div className={styles.index}>{index}</div>\n <h3 className={styles.title}>{text}</h3>\n </div>\n )\n}\n","import React from 'react'\nimport { ChapterBlockProps } from './ChapterBlock.types'\nimport makeClassName from '../utils/makeClassName'\n\nimport DangerousHTML from '../utils/DangerousHtml'\n\nimport styles from './ChapterBlock.module.css'\n\nexport const ChapterBlock: React.FC<ChapterBlockProps> = ({\n block,\n block: { only_on: onlyOn },\n styleContext\n}) => {\n return (\n <div\n data-testid=\"chapter-block\"\n className={makeClassName([\n [styles.root, true],\n [styles[onlyOn], !!onlyOn]\n ])}\n >\n <DangerousHTML\n className={makeClassName([\n [styles.subtitle, true],\n [styles[styleContext], !!styleContext && !!styles[styleContext]]\n ])}\n html={block.data}\n />\n </div>\n )\n}\n","import React from 'react'\nimport { SimpleTitleProps } from './SimpleTitle.types'\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport styles from './SimpleTitle.module.css'\n\nexport const SimpleTitle: React.FC<SimpleTitleProps> = ({\n block: {\n data: { first },\n only_on: onlyOn\n },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], true]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"simple-title\" className={makeClassName(classNames)}>\n {first}\n </div>\n )\n}\n","import React from 'react'\nimport { RichTitleProps } from './RichTitle.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport styles from './RichTitle.module.css'\n\nexport const RichTitle: React.FC<RichTitleProps> = ({\n block: {\n only_on: onlyOn,\n data: { featured, first, second }\n },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], true],\n [styles.featured, !!featured]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <h1 data-testid=\"rich-title\" className={makeClassName(classNames)}>\n {first}\n {second && <span> {second}</span>}\n </h1>\n )\n}\n","import React from 'react'\nimport { SimpleBlockProps } from './SimpleBlock.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport DangerousHTML from '../utils/DangerousHtml'\n\nimport styles from './SimpleBlock.module.css'\n\nexport const SimpleBlock: React.FC<SimpleBlockProps> = ({\n block: { data, type, only_on: onlyOn },\n styleContext\n}) => {\n let tagName\n\n let classNames: (string[] | string | boolean)[][] = [\n [styles[type], !!type && !!styles[type]],\n [styles[onlyOn], true]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n switch (type) {\n case 'context_p':\n case 'lead':\n case 'note_caption':\n case 'note_credit': {\n tagName = 'p'\n break\n }\n case 'lead_hr': {\n tagName = 'div'\n break\n }\n default:\n tagName = type\n }\n return (\n <DangerousHTML\n className={makeClassName(classNames)}\n html={data || ''}\n tagName={tagName}\n />\n )\n}\n","import React from 'react'\nimport { ListBlockProps } from './ListBlock.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport DangerousHTML from '../utils/DangerousHtml'\n\nimport styles from './ListBlock.module.css'\n\nexport const ListBlock: React.FC<ListBlockProps> = ({\n block: { type, data, only_on: onlyOn },\n styleContext\n}) => {\n const TagName = type\n\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], true],\n [styles[type], !!type && !!styles[type]]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <TagName className={makeClassName(classNames)}>\n {data.map((item, index) => (\n <DangerousHTML key={index} html={item} tagName=\"li\" />\n ))}\n </TagName>\n )\n}\n","import React from 'react'\nimport { RelatedBlockProps } from './RelatedBlock.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport styles from './RelatedBlock.module.css'\n\nexport const RelatedBlock: React.FC<RelatedBlockProps> = ({\n block: {\n data: { title, related },\n only_on: onlyOn\n },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], true]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"related-block\" className={makeClassName(classNames)}>\n <h3 className={styles.header}>{title}</h3>\n <ul className={styles.items}>\n {related.map((item, index) => (\n <li key={item.id || index} className={styles[item.layout]}>\n <a\n href={item.full_url || `/${item.url}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span className={styles.first}>{item.title}</span>\n {item.second_title && ' '}\n {item.second_title && <span>{item.second_title}</span>}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )\n}\n","import React from 'react'\nimport { SourceBlockProps } from './SourceBlock.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport DangerousHTML from '../utils/DangerousHtml'\n\nimport styles from './SourceBlock.module.css'\n\nexport const SourceBlock: React.FC<SourceBlockProps> = ({\n block: { only_on: onlyOn, quote, origin, url },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], true]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <blockquote\n data-testid=\"source-block\"\n cite={url}\n className={makeClassName(classNames)}\n >\n <a\n className={styles.text}\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {quote.map((item, index) => (\n <DangerousHTML key={index} html={item.data} tagName=\"p\" />\n ))}\n <footer>\n <cite className={styles.origin}>{origin}</cite>\n </footer>\n </a>\n </blockquote>\n )\n}\n","import React from 'react'\nimport { GroupedBlockProps } from './GroupedBlock.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport { EmbedBlockContainer } from '../EmbedBlock'\nimport { MediaCaption } from '../MediaCaption'\n\nimport styles from './GroupedBlock.module.css'\n\nexport const GroupedBlock: React.FC<GroupedBlockProps> = ({\n block,\n block: { only_on: onlyOn },\n styleContext\n}) => {\n const maxHeight = Math.min(...block.data.map(item => item.data.height))\n\n const normalizedBoxesWidth = block.data.map(\n item => item.data.width / (item.data.height / maxHeight)\n )\n\n const sumWidth = normalizedBoxesWidth.reduce((sum, x) => sum + x)\n\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], true],\n [styles.hasFigcaption, block.cc === 'default'],\n [styles[block.display], !!block.display && styles[block.display]]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"grouped-block\" className={makeClassName(classNames)}>\n <div className={styles.items}>\n {block.data.map((item, index) => {\n const percentWidth = (normalizedBoxesWidth[index] / sumWidth) * 100\n\n return (\n <div\n className={styles.item}\n key={item.id}\n style={{ width: `${percentWidth}%` }}\n >\n <EmbedBlockContainer\n block={item}\n styleContext=\"isInGroupedBlock\"\n />\n </div>\n )\n })}\n </div>\n {block.cc && (\n <figcaption className={styles.figcaption}>\n <MediaCaption\n credit={block.credit}\n caption={block.caption}\n styleContext={styleContext}\n />\n </figcaption>\n )}\n </div>\n )\n}\n","import React from 'react'\nimport { MetaItemProps } from './MetaItem.types'\n\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './MetaItem.module.css'\n\nexport const MetaItem: React.FC<MetaItemProps> = ({\n hasSource,\n type,\n children,\n bullets\n}) => {\n const classNames = [\n [styles.root, true],\n [styles[type], !!type && !!styles[type]],\n [styles.hasSource, !!hasSource],\n [styles.hasBullets, !!bullets]\n ]\n\n return (\n <div data-testid=\"meta-item\" className={makeClassName(classNames)}>\n {children}\n </div>\n )\n}\n","import React from 'react'\nimport { MetaItemLiveProps } from './MetaItemLive.types'\n\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './MetaItemLive.module.css'\n\nexport const MetaItemLive: React.FC<MetaItemLiveProps> = ({\n theme = 'gold'\n}) => {\n const classNames = [\n [styles.root, true],\n [styles[theme], !!theme && styles[theme]]\n ]\n\n return (\n <div\n data-testid=\"meta-item-live\"\n data-meta=\"live\"\n className={makeClassName(classNames)}\n >\n <div className={styles.frame} />\n </div>\n )\n}\n","import React from 'react'\nimport { DocumentItemsCountProps } from './DocumentItemsCount.types'\n\nimport pluralize from '../utils/pluralize'\n\nimport styles from './DocumentItemsCount.module.css'\n\nexport const DocumentItemsCount: React.FC<DocumentItemsCountProps> = ({\n type,\n lang = 'ru',\n items,\n children\n}) => {\n const i18n = {\n ru: {\n card: {\n one: 'карточка',\n two: 'карточки',\n five: 'карточек'\n },\n podcast: {\n one: 'эпизод',\n two: 'эпизода',\n five: 'эпизодов'\n }\n },\n en: {\n card: {\n one: 'card',\n two: 'cards',\n five: 'cards'\n },\n podcast: {\n one: 'episode',\n two: 'episodes',\n five: 'episodes'\n }\n }\n }\n\n const itemsCount = `${items} ${pluralize(\n items,\n i18n[lang][type].one,\n i18n[lang][type].two,\n i18n[lang][type].five\n )}`\n\n return (\n <div data-testid=\"document-items-count\" className={styles.root}>\n {children}\n <span className={styles.items}>{itemsCount}</span>\n </div>\n )\n}\n","const pluralize = (\n number: number,\n one: string,\n two: string,\n five: string\n): string => {\n let n = Math.abs(number)\n n %= 100\n\n if (n >= 5 && n <= 20) {\n return five\n }\n\n n %= 10\n\n if (n === 1) {\n return one\n }\n\n if (n >= 2 && n <= 4) {\n return two\n }\n\n return five\n}\n\nexport default pluralize\n","import React from 'react'\nimport { MetaContainerProps } from './Meta.types'\n\nimport { Meta } from './'\nimport { MetaItem } from '../MetaItem'\nimport { MetaItemLive } from '../MetaItemLive'\nimport { DocumentItemsCount } from '../DocumentItemsCount'\n\nimport { BookmarkButton } from '../BookmarkButton'\nimport { Timestamp } from '../Timestamp'\nimport { SvgSymbol } from '../SvgSymbol'\n\nimport styles from './Meta.module.css'\n\nexport const MetaContainer: React.FC<MetaContainerProps> = ({\n lang,\n block,\n isRead,\n isListened,\n bookmarkAction,\n isInBookmarks,\n block: {\n data: { components, theme }\n },\n styleContext\n}) => {\n const themeColor =\n styleContext && styleContext.indexOf('dark') !== -1 ? 'light' : 'unset'\n const isPodcast = styleContext && styleContext.indexOf('podcast') !== -1\n const isSlides = styleContext && styleContext.indexOf('slide') !== -1\n\n const hasSource = !!components.find(item => item.type === 'source_name')\n\n return (\n <Meta\n styleContext={styleContext}\n theme={theme || themeColor}\n onlyOn={block.only_on}\n hasSource={hasSource}\n >\n {components.map(component => {\n switch (component.type) {\n case 'source_name': {\n return (\n <MetaItem hasSource={hasSource} bullets key={component.id}>\n <>\n {lang === 'ru' ? 'Источник: ' : 'Source: '}\n {component.url && (\n <a\n href={component.url}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n {component.text}\n </a>\n )}\n {!component.url && component.text}\n </>\n </MetaItem>\n )\n }\n case 'duration': {\n return (\n <MetaItem hasSource={hasSource} bullets key={component.id}>\n <>\n <SvgSymbol icon=\"podcast\" size=\"small\" />\n {component.text}\n </>\n </MetaItem>\n )\n }\n case 'datetime': {\n return (\n <MetaItem\n hasSource={hasSource}\n bullets\n key={component.id}\n type=\"datetime\"\n >\n <Timestamp\n publishedAt={component.datetime}\n type=\"date\"\n locale={lang}\n />\n </MetaItem>\n )\n }\n\n case 'items_count': {\n return (\n <MetaItem hasSource={hasSource} bullets key={component.id}>\n <DocumentItemsCount\n items={component.count}\n type={isPodcast ? 'podcast' : 'card'}\n lang={lang}\n >\n <SvgSymbol icon=\"card\" size=\"unset\" />\n </DocumentItemsCount>\n </MetaItem>\n )\n }\n case 'broadcast_active': {\n return (\n <MetaItem hasSource={hasSource} bullets key={component.id}>\n <>\n <MetaItemLive /> Прямой эфир\n </>\n </MetaItem>\n )\n }\n case 'broadcast': {\n return (\n <MetaItem hasSource={hasSource} bullets key={component.id}>\n <>\n {component.with_icon && <MetaItemLive />}\n\n {component.label}\n </>\n </MetaItem>\n )\n }\n\n default: {\n return null\n }\n }\n })}\n {(isRead || isListened) && (\n <MetaItem\n hasSource={hasSource}\n bullets\n type={isListened ? 'listened' : 'read'}\n >\n <SvgSymbol icon={isListened ? 'listened' : 'read'} size=\"unset\" />\n </MetaItem>\n )}\n\n {isSlides && lang === 'ru' && (\n <div className={styles.bookmark}>\n <BookmarkButton\n isInBookmarks={isInBookmarks}\n onClick={(): void => bookmarkAction('bookmark', 'top')}\n />\n </div>\n )}\n </Meta>\n )\n}\n","import React from 'react'\nimport { RenderBlocksProps } from './RenderBlocks.types'\n\nimport { Tag } from '../Tag'\nimport { SimpleTitle } from '../SimpleTitle'\nimport { RichTitle } from '../RichTitle'\nimport { SimpleBlock } from '../SimpleBlock'\nimport { ListBlock } from '../ListBlock'\nimport { ChapterBlock } from '../ChapterBlock'\nimport { QuoteBlock } from '../QuoteBlock'\nimport { CardTitle } from '../CardTitle'\nimport { RelatedBlock } from '../RelatedBlock'\nimport { SourceBlock } from '../SourceBlock'\nimport { EmbedBlockContainer } from '../EmbedBlock'\nimport { GroupedBlock } from '../GroupedBlock'\nimport { MetaContainer } from '../Meta/MetaContainer'\nimport { Table } from '../Table'\nimport { MaterialNote } from '../MaterialNote'\n\nexport const RenderBlocks: React.FC<RenderBlocksProps> = ({\n block,\n styleContext,\n lang,\n isRead,\n isListened,\n bookmarkAction,\n isInBookmarks\n}) => {\n switch (block.type) {\n case 'tag': {\n return (\n <Tag\n size=\"large\"\n onlyOn={block.only_on}\n theme={block.data.theme}\n styleContext={styleContext}\n >\n {block.data.text}\n </Tag>\n )\n }\n\n case 'simple_title': {\n return <SimpleTitle block={block} styleContext={styleContext} />\n }\n\n case 'rich_title': {\n return <RichTitle block={block} styleContext={styleContext} />\n }\n\n case 'meta': {\n return (\n <MetaContainer\n block={block}\n lang={block.data.lang}\n styleContext={styleContext}\n isRead={isRead}\n isListened={isListened}\n isInBookmarks={isInBookmarks}\n bookmarkAction={bookmarkAction}\n />\n )\n }\n\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'blockquote':\n case 'p':\n case 'context_p':\n case 'lead':\n case 'lead_hr': {\n return <SimpleBlock block={block} styleContext={styleContext} />\n }\n\n case 'quote':\n return <QuoteBlock block={block} styleContext={styleContext} />\n\n case 'ol':\n case 'ul': {\n return <ListBlock block={block} styleContext={styleContext} />\n }\n\n case 'chapter-subtitle': {\n return <ChapterBlock block={block} styleContext={styleContext} />\n }\n\n case 'card_title': {\n return <CardTitle block={block} styleContext={styleContext} />\n }\n\n case 'related': {\n return <RelatedBlock block={block} styleContext={styleContext} />\n }\n\n case 'source':\n return <SourceBlock block={block} styleContext={styleContext} />\n\n case 'table':\n return <Table block={block} styleContext={styleContext} />\n\n case 'embed':\n case 'embed_code':\n case 'game_embed':\n case 'image':\n case 'gif':\n return (\n <EmbedBlockContainer\n block={block}\n styleContext={styleContext}\n lang={lang}\n />\n )\n case 'grouped':\n return <GroupedBlock block={block} styleContext={styleContext} />\n\n case 'material_note':\n return <MaterialNote block={block} styleContext={styleContext} />\n\n default: {\n return null\n }\n }\n}\n","import React, { useState } from 'react'\nimport { CoverProps } from './Cover.types'\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport generateGradient from '../utils/generateGradient'\n\nimport styles from './Cover.module.css'\n\nimport { RenderBlocks } from '../RenderBlocks'\nimport { MediaCaption } from '../MediaCaption'\nimport { Image } from '../Image'\nimport { Popover } from '../Popover'\n\nexport const Cover: React.FC<CoverProps> = ({\n block: {\n only_on: onlyOn,\n data: {\n blocks,\n cover: { credit, caption, urls, mobile_ratio: mobileRatio, gradients, cc }\n }\n },\n styleContext\n}) => {\n const [isPopoverShown, setIsPopoverShown] = useState(false)\n\n const style: React.CSSProperties = {}\n let theme\n\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[theme], true],\n [styles[onlyOn], !!onlyOn && !!styles[onlyOn]]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n if (gradients) {\n theme = gradients.text_rgb === '0,0,0' ? 'dark' : 'light'\n\n style.backgroundImage = generateGradient(gradients.bg_rgb)\n }\n\n const renderCC = (context?: string): JSX.Element => (\n <MediaCaption\n credit={credit}\n caption={caption}\n styleContext={context || styleContext}\n />\n )\n\n return (\n <div data-testid=\"cover\" className={makeClassName(classNames)}>\n <div className={styles.image}>\n <Image optimized={urls} ratio={mobileRatio} display=\"narrow\" />\n </div>\n <div className={styles.body} style={style}>\n {blocks.map(item => (\n <RenderBlocks\n key={item.id}\n block={item}\n styleContext={styleContext}\n />\n ))}\n </div>\n {cc === 'button' && (\n <button\n className={styles.control}\n type=\"button\"\n aria-label=\"Open\"\n onClick={(): void => {\n setIsPopoverShown(!isPopoverShown)\n }}\n />\n )}\n\n {cc === 'button' && isPopoverShown && (\n <Popover\n onClose={(): void => {\n setIsPopoverShown(false)\n }}\n >\n {renderCC('isInPopover')}\n </Popover>\n )}\n </div>\n )\n}\n","const generateGradient = (color: string): string => {\n const gradientSteps = [\n [0, 7],\n [0.08, 12],\n [0.16, 17],\n [0.22, 21],\n [0.32, 26],\n [0.42, 32],\n [0.52, 38],\n [0.62, 47],\n [0.72, 57],\n [0.82, 65],\n [1, 82]\n ]\n\n const gradient = gradientSteps.map(i => `rgba(${color}, ${i[0]}) ${i[1]}%`)\n\n return `linear-gradient(-180deg, ${gradient})`\n}\n\nexport default generateGradient\n","import React from 'react'\nimport { HalfBlockProps } from './HalfBlock.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport { RenderBlocks } from '../RenderBlocks'\nimport { Image } from '../Image'\nimport { MediaCaption } from '../MediaCaption'\n\nimport styles from './HalfBlock.module.css'\n\nexport const HalfBlock: React.FC<HalfBlockProps> = ({\n block: {\n only_on: onlyOn,\n data,\n data: {\n cover: { optimized, ratio, credit, caption }\n }\n },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], true]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"half-block\" className={makeClassName(classNames)}>\n <div className={styles.main}>\n <div className={styles.image}>\n <Image optimized={optimized} ratio={ratio} display=\"super_full\" />\n </div>\n <div className={styles.body}>\n {data.blocks.map(item => (\n <RenderBlocks key={item.id} block={item} styleContext={['rich']} />\n ))}\n </div>\n </div>\n <div className={styles.footer}>\n <MediaCaption\n credit={credit}\n caption={caption}\n styleContext={styleContext}\n />\n </div>\n </div>\n )\n}\n","import React from 'react'\nimport { ImportantLeadProps } from './ImportantLead.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport { RenderBlocks } from '../RenderBlocks'\n\nimport styles from './ImportantLead.module.css'\n\nexport const ImportantLead: React.FC<ImportantLeadProps> = ({\n block: { only_on: onlyOn, data },\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], !!onlyOn]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"important-lead\" className={makeClassName(classNames)}>\n {data.map(item => (\n <RenderBlocks\n key={item.id}\n block={item}\n styleContext=\"isInImportantLead\"\n />\n ))}\n </div>\n )\n}\n","const POST_MESSAGE_PREFIX = 'mdzKitMsg'\n\nconst postMessage = (element: string, action: string): void => {\n const target = window.top\n\n const msg = `${POST_MESSAGE_PREFIX}=${JSON.stringify({\n element,\n action\n })}`\n\n if (typeof target !== 'undefined') {\n target.postMessage(msg, '*')\n }\n}\n\nexport default postMessage\n","import React, { useState, useRef } from 'react'\nimport { SpoilerProps } from './Spoiler.types'\n\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\nimport postMessage from '../utils/postMessage'\n\nimport { RenderBlocks } from '../RenderBlocks'\nimport { Button } from '../Button'\nimport { SvgSymbol } from '../SvgSymbol'\n\nimport styles from './Spoiler.module.css'\n\nexport const Spoiler: React.FC<SpoilerProps> = ({\n block: {\n display,\n button,\n only_on: onlyOn,\n btn_title: buttonTitle,\n title,\n blocks\n },\n styleContext\n}) => {\n const [spoiled, setSpoiled] = useState(false)\n const ref = useRef(null)\n\n const handleButtonClick = (): void => {\n setSpoiled(!spoiled)\n\n if (spoiled) {\n postMessage('closeSpoiler', 'click')\n const rect = ref.current.getBoundingClientRect()\n if (rect.top < 0) {\n ref.current.scrollIntoView({ behavior: 'smooth' })\n }\n } else {\n postMessage('openSpoiler', 'click')\n }\n }\n\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[onlyOn], !!onlyOn],\n [styles[display], !!display && styles[display]],\n [[styles.spoiled], !!spoiled]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n const buttonCollapse = button ? button.collapse : 'Свернуть'\n const buttonExpande = button ? button.expand : buttonTitle\n\n return (\n <div ref={ref} className={makeClassName(classNames)} data-testid=\"spoiler\">\n <div className={styles.header}>{title && <h3>{title}</h3>}</div>\n <div className={styles.body}>\n {blocks.map(item => (\n <RenderBlocks\n key={item.id}\n block={item}\n styleContext={styleContext}\n />\n ))}\n </div>\n <div className={styles.footer}>\n <Button\n size=\"default\"\n theme=\"gray\"\n onClick={(): void => handleButtonClick()}\n styleContext=\"isInSpoiler\"\n >\n {spoiled ? buttonCollapse : buttonExpande}\n <SvgSymbol icon=\"arrow\" />\n </Button>\n </div>\n </div>\n )\n}\n","import React, { useState } from 'react'\nimport { PopoverData, DotsOnImageProps, SingleDot } from './DotsOnImage.types'\nimport makeClassName from '../utils/makeClassName'\n\nimport { Image } from '../Image'\n\nimport styles from './DotsOnImage.module.css'\n\nexport const DotsOnImage: React.FC<DotsOnImageProps> = ({ block }) => {\n const { optimized, width, height, credit, display, dots } = block\n\n const [popover, setPopover] = useState<PopoverData>({\n title: null,\n body: null,\n show: false,\n id: null\n })\n\n const handleDotClick = (dot: SingleDot): void => {\n const shouldShow = dot.id !== popover.id\n\n setPopover({\n title: dot.title,\n body: dot.body,\n show: shouldShow,\n id: shouldShow ? dot.id : null\n })\n }\n\n return (\n <div\n data-testid=\"dots-on-image\"\n className={makeClassName([[styles.root, true]])}\n >\n <div className={styles.dots}>\n {dots.map(dot => (\n <button\n className={styles.dot}\n type=\"button\"\n key={dot.id}\n style={{\n top: `${dot.position.y}%`,\n left: `${dot.position.x}%`,\n backgroundColor: dot.icon.color\n }}\n onClick={(): void => handleDotClick(dot)}\n >\n {dot.icon.type === 'svg' && (\n <div\n className={styles.icon}\n dangerouslySetInnerHTML={{ __html: dot.icon.svg_string }}\n />\n )}\n {dot.icon.type === 'number' && dot.icon.number}\n </button>\n ))}\n </div>\n <div className={styles.image}>\n <Image\n optimized={optimized}\n width={width}\n height={height}\n alt={credit}\n display={display}\n />\n </div>\n\n {popover.show && (\n <div className={styles.popover}>\n <div className={styles.popoverTitle}>{popover.title}</div>\n <div\n className={styles.popoverBody}\n dangerouslySetInnerHTML={{ __html: popover.body }}\n />\n </div>\n )}\n </div>\n )\n}\n","import React from 'react'\nimport { DropdownProps } from './Dropdown.types'\nimport makeClassName from '../utils/makeClassName'\nimport makeStyleContext from '../utils/makeStyleContext'\n\nimport styles from './Dropdown.module.css'\n\nexport const Menu: React.FC<DropdownProps> = ({ children }) => {\n return (\n <div data-testid=\"dropdown\" className={styles.menu}>\n {children}\n </div>\n )\n}\n\nexport const Dropdown: React.FC<DropdownProps> = ({\n children,\n active,\n styleContext\n}) => {\n let classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles.active, !!active && !!styles.active]\n ]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n return (\n <div data-testid=\"dropdown\" className={makeClassName(classNames)}>\n {children}\n </div>\n )\n}\n","import React from 'react'\nimport { MaterialTitleProps } from './MaterialTitle.types'\n\nimport styles from './MaterialTitle.module.css'\n\nexport const Primary: React.FC<MaterialTitleProps> = ({ children }) => {\n return <span className={styles.primary}>{children}</span>\n}\n\nexport const Secondary: React.FC<MaterialTitleProps> = ({ children }) => {\n return <span className={styles.secondary}>{children}</span>\n}\n\nexport const MaterialTitle: React.FC<MaterialTitleProps> = ({ children }) => {\n return (\n <h1 className={styles.root} data-testid=\"material-title\">\n {children}\n </h1>\n )\n}\n","import React from 'react'\nimport { RawHtmlBlockProps } from './RawHtmlBlock.types'\n\nimport { ImportantLead } from '../ImportantLead'\nimport { RenderBlocks } from '../RenderBlocks'\nimport { Spoiler } from '../Spoiler'\nimport { HalfBlock } from '../HalfBlock'\nimport { Cover } from '../Cover'\n\nimport { BlockProvider } from '../utils/BlockContext'\n\nexport const RawHtmlBlock: React.FC<RawHtmlBlockProps> = ({\n block,\n styleContext,\n isRead,\n isListened,\n isInBookmarks,\n bookmarkAction,\n lightBox\n}) => {\n const context = {\n lightBox: lightBox || null\n }\n\n switch (block.type) {\n case 'important_lead': {\n return <ImportantLead block={block} styleContext={styleContext} />\n }\n\n case 'spoiler': {\n return <Spoiler block={block} styleContext={styleContext} />\n }\n\n case 'cover': {\n return <Cover block={block} styleContext={styleContext} />\n }\n\n case 'half': {\n return <HalfBlock block={block} styleContext={styleContext} />\n }\n\n default: {\n return (\n <BlockProvider value={context}>\n <RenderBlocks\n block={block}\n styleContext={styleContext}\n isRead={isRead}\n isListened={isListened}\n isInBookmarks={isInBookmarks}\n bookmarkAction={bookmarkAction}\n />\n </BlockProvider>\n )\n }\n }\n}\n","import React from 'react'\nimport { SwitcherProps } from './Switcher.types'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './Switcher.module.css'\n\nexport const Switcher: React.FC<SwitcherProps> = ({\n enabled,\n children,\n childrenPosition = 'left',\n onChange,\n styleContext,\n theme = 'light'\n}) => (\n <label\n data-testid=\"switcher\"\n className={makeClassName([\n [styles.root, true],\n [styles[theme], !!styles[theme]],\n [styles[styleContext], !!styles[styleContext]]\n ])}\n >\n {children && childrenPosition === 'left' && (\n <div\n className={makeClassName([\n [styles.children, true],\n [styles.left, true]\n ])}\n >\n {children}\n </div>\n )}\n <input\n className={styles.input}\n type=\"checkbox\"\n checked={enabled}\n onChange={onChange}\n />\n <span className={styles.control}>\n <span className={styles.knob} />\n </span>\n {children && childrenPosition === 'right' && (\n <div\n className={makeClassName([\n [styles.children, true],\n [styles.right, true]\n ])}\n >\n {children}\n </div>\n )}\n </label>\n)\n","import React, { Children } from 'react'\nimport { ToolbarProps } from './Toolbar.types'\n\nimport makeStyleContext from '../utils/makeStyleContext'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './Toolbar.module.css'\n\nexport const Toolbar: React.FC<ToolbarProps> = ({ children, styleContext }) => {\n let classNames: (string[] | string | boolean)[][] = [[styles.root, true]]\n\n if (styleContext) {\n classNames = makeStyleContext(classNames, styleContext, styles)\n }\n\n const renderItems = (): JSX.Element[] =>\n Children.map(children, (item: JSX.Element, index) => (\n <li className={styles.item} key={`${index}-${item.props.type}`}>\n {React.cloneElement(item)}\n </li>\n ))\n\n return (\n <div data-testid=\"toolbar\" className={makeClassName(classNames)}>\n <ul className={styles.list}>{renderItems()}</ul>\n </div>\n )\n}\n","import React from 'react'\nimport { ToolbarButtonProps } from './ToolbarButton.types'\n\nimport { SvgSymbol } from '../SvgSymbol/'\nimport makeClassName from '../utils/makeClassName'\n\nimport styles from './ToolbarButton.module.css'\n\nexport const ToolbarButton: React.FC<ToolbarButtonProps> = ({\n children,\n type,\n theme,\n isActive,\n onClick\n}) => {\n const classNames: (string[] | string | boolean)[][] = [\n [styles.root, true],\n [styles[type], !!styles[type]],\n [styles[theme], !!styles[theme] && !!theme],\n [styles.isActive, !!isActive]\n ]\n\n return (\n <button\n data-testid=\"toolbar-button\"\n className={makeClassName(classNames)}\n type=\"button\"\n onClick={(): void => onClick(type)}\n >\n <SvgSymbol size=\"medium\" icon={type} styleContext=\"isInToolbar\" />\n {children && <span className={styles.text}>{children}</span>}\n </button>\n )\n}\n"],"names":["makeClassName","list","filter","map","join","Loader","React","width","height","viewBox","xmlns","d","opacity","fillRule","attributeName","type","from","to","dur","repeatCount","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Button","theme","size","state","styleContext","disabled","onClick","children","className","styles","root","loader","icons","meduzaLogo","content","menu","fb","tw","vk","ok","tg","meduzaSymbol","backward","forward","download","play","pause","speedHalf","speedOne","speedOneHalf","speedTwo","podcastBookmark","reaction","cross","link","search","card","podcast","arrow","brent","user","bookmark","receipt","read","listened","SvgSymbol","icon","data","xmlnsXlink","dangerouslySetInnerHTML","__html","BlockContext","createContext","lightBox","BlockProvider","Provider","window","innerWidth","documentElement","clientWidth","body","innerHeight","clientHeight","imageBreakpoints","imageConditionalKeys","xs","superFull","full","narrow","Lazy","useInView","threshold","inView","entry","useState","visible","setVisible","useEffect","boundingClientRect","y","RenderPicture","source","fallbackSource","optimized","alt","display","fallback","setFallback","HTMLPictureElement","s","keys","replace","str","toUpperCase","media","srcSet","w325","original","key","breakpoint","Fragment","src","Image","lazy","fullscreen","ratio","useContext","handleClick","viewportSize","postMessage","show","pictureStyles","paddingBottom","blockStyles","maxWidth","onKeyPress","role","tabIndex","makeStyleContext","classNames","context","Array","isArray","ctx","concat","Tag","correlation","onlyOn","MediaCaption","credit","caption","Table","block","rows","options","columnsWidth","columns_widths","tableCredit","table_credit","colors","wrapper","table","tracks","row","i","cells","cell","j","header","color","fixedColumn","fixed_first_column","val","MaterialNote","item","id","BookmarkButton","isInBookmarks","control","Popover","onClose","handleClose","setTimeout","handleScroll","escFunction","event","addEventListener","removeEventListener","x","fill","overflow","transform","mask","Meta","hasSource","Timestamp","published","locale","timeFormat","preparedPublishedAt","publishedAt","dayjs","extend","relativeTime","fromNow","format","Error","DangerousHTML","tagName","TagName","html","element","useRef","canRenderHtml","setCanRenderHtml","replaceScriptElementsRecursive","useCallback","node","indexOf","childNodes","length","script","Math","random","toString","slice","innerHTML","attrs","attributes","setAttribute","name","value","parentElement","replaceChild","prepareAnchors","current","querySelectorAll","forEach","a","EmbedBlock","only_on","provider","cc","small","small_url","large","large_url","isPopoverShown","setIsPopoverShown","videoFrozen","setVideoFrozen","videoElem","wrapperElem","handleVideoTouch","handleVideoError","video","dataset","gif","viewportWidth","enableInlineVideo","isProportional","renderCC","proportional","object","objectWrap","figure","playsInline","muted","loop","autoPlay","preload","gif_url","mp4_url","gameEmbed","game_src","game_id","title","renderEmbed","IframeBlock","lang","rootEl","contentEl","scriptEl","range","createRange","setStart","textContent","createContextualFragment","frame","querySelector","contentDocument","open","close","renderIframe","EmbedBlockContainer","wrap_with_iframe","QuoteBlock","CardTitle","index","text","ChapterBlock","subtitle","SimpleTitle","first","RichTitle","second","featured","SimpleBlock","ListBlock","RelatedBlock","related","items","layout","href","full_url","url","target","rel","second_title","SourceBlock","quote","origin","cite","GroupedBlock","maxHeight","min","normalizedBoxesWidth","sumWidth","reduce","sum","hasFigcaption","figcaption","MetaItem","hasBullets","bullets","MetaItemLive","DocumentItemsCount","one","two","five","n","i18n","ru","en","itemsCount","abs","MetaContainer","isRead","isListened","bookmarkAction","components","themeColor","isPodcast","isSlides","find","component","datetime","count","with_icon","label","RenderBlocks","Cover","blocks","cover","urls","mobileRatio","mobile_ratio","gradients","text_rgb","backgroundImage","bg_rgb","image","HalfBlock","main","footer","ImportantLead","action","top","msg","POST_MESSAGE_PREFIX","JSON","stringify","Spoiler","button","buttonTitle","btn_title","spoiled","setSpoiled","buttonCollapse","collapse","buttonExpande","expand","getBoundingClientRect","scrollIntoView","behavior","dots","popover","setPopover","dot","position","left","backgroundColor","shouldShow","handleDotClick","svg_string","number","popoverTitle","popoverBody","active","enabled","childrenPosition","onChange","input","checked","knob","right","Children","props","cloneElement","isActive"],"mappings":"oVAAMA,EAAgB,SAACC,UACdA,EACJC,QAAO,2BACPC,KAAI,2BACJC,KAAK,MCFJC,EAAmB,kBACvBC,uBACEC,MAAM,OACNC,OAAO,OACPC,QAAQ,YACRC,MAAM,8BAENJ,yBACEA,wBACEK,EAAE,qKACFC,QAAQ,SAGZN,qBAAGO,SAAS,WACVP,oCACEQ,cAAc,YACdC,KAAK,SACLC,KAAK,UACLC,GAAG,YACHC,IAAI,SACJC,YAAY,eAEdb,wBAAMK,EAAE,kGCxBd,SAASS,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,M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