@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
@@ -0,0 +1,12 @@
1
+ export interface MaterialNoteProps {
2
+ block: {
3
+ data: {
4
+ data: string;
5
+ id: string;
6
+ lenght: number;
7
+ type: 'note_caption' | 'note_credit';
8
+ }[];
9
+ id: string;
10
+ };
11
+ styleContext?: string | string[];
12
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MaterialNoteProps } from './MaterialNote.types';
3
+ export declare const MaterialNote: React.FC<MaterialNoteProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./MaterialTitle.types").MaterialTitleProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export interface MaterialTitleProps {
3
+ children?: JSX.Element[] | JSX.Element;
4
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { MaterialTitleProps } from './MaterialTitle.types';
3
+ export declare const Primary: React.FC<MaterialTitleProps>;
4
+ export declare const Secondary: React.FC<MaterialTitleProps>;
5
+ export declare const MaterialTitle: React.FC<MaterialTitleProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./MediaCaption.types").MediaCaptionProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,5 @@
1
+ export interface MediaCaptionProps {
2
+ credit?: string;
3
+ caption?: string;
4
+ styleContext?: string | string[];
5
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MediaCaptionProps } from './MediaCaption.types';
3
+ export declare const MediaCaption: React.FC<MediaCaptionProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./Meta.types").MetaProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ export interface MetaContainerProps {
3
+ block: any;
4
+ styleContext: string[] | string;
5
+ isRead: boolean;
6
+ isListened: boolean;
7
+ isInBookmarks: boolean;
8
+ bookmarkAction?: (service: string, place: string) => void;
9
+ lightBox?: () => void;
10
+ lang: 'ru' | 'en';
11
+ }
12
+ export interface MetaProps {
13
+ onlyOn?: string;
14
+ styleContext?: string[] | string;
15
+ hasSource?: boolean;
16
+ theme?: string;
17
+ children: React.ReactNode;
18
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MetaContainerProps } from './Meta.types';
3
+ export declare const MetaContainer: React.FC<MetaContainerProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MetaProps } from './Meta.types';
3
+ export declare const Meta: React.FC<MetaProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./MetaItem.types").MetaItemProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface MetaItemProps {
3
+ bullets?: boolean;
4
+ hasSource?: boolean;
5
+ type?: string;
6
+ children: JSX.Element[] | JSX.Element;
7
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MetaItemProps } from './MetaItem.types';
3
+ export declare const MetaItem: React.FC<MetaItemProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./MetaItemLive.types").MetaItemLiveProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,3 @@
1
+ export interface MetaItemLiveProps {
2
+ theme?: 'gold' | 'light' | 'inherit';
3
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MetaItemLiveProps } from './MetaItemLive.types';
3
+ export declare const MetaItemLive: React.FC<MetaItemLiveProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./Popover.types").PopoverProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface PopoverProps {
3
+ children: JSX.Element[] | JSX.Element;
4
+ onClose: () => void;
5
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { PopoverProps } from './Popover.types';
3
+ export declare const Popover: React.FC<PopoverProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./QuoteBlock.types").QuoteBlockProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,6 @@
1
+ export interface QuoteBlockProps {
2
+ styleContext?: string | string[];
3
+ block: {
4
+ data: string;
5
+ };
6
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { QuoteBlockProps } from './QuoteBlock.types';
3
+ export declare const QuoteBlock: React.FC<QuoteBlockProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./RawHtmlBlock.types").RawHtmlBlockProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,9 @@
1
+ export interface RawHtmlBlockProps {
2
+ block: any;
3
+ styleContext: string[] | string;
4
+ isRead: boolean;
5
+ isListened: boolean;
6
+ isInBookmarks: boolean;
7
+ bookmarkAction?: (service: string, place: string) => void;
8
+ lightBox?: () => void;
9
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { RawHtmlBlockProps } from './RawHtmlBlock.types';
3
+ export declare const RawHtmlBlock: React.FC<RawHtmlBlockProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./RelatedBlock.types").RelatedBlockProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,4 @@
1
+ export interface RelatedBlockProps {
2
+ block: any;
3
+ styleContext?: string[] | string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { RelatedBlockProps } from './RelatedBlock.types';
3
+ export declare const RelatedBlock: React.FC<RelatedBlockProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./RenderBlocks.types").RenderBlocksProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,10 @@
1
+ export interface RenderBlocksProps {
2
+ block: any;
3
+ styleContext?: any;
4
+ isRead?: boolean;
5
+ isListened?: boolean;
6
+ isInBookmarks?: boolean;
7
+ bookmarkAction?: (service: string, place: string) => void;
8
+ lightBox?: () => void;
9
+ lang?: 'ru' | 'en';
10
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { RenderBlocksProps } from './RenderBlocks.types';
3
+ export declare const RenderBlocks: React.FC<RenderBlocksProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./RichTitle.types").RichTitleProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,4 @@
1
+ export interface RichTitleProps {
2
+ block: any;
3
+ styleContext?: string[] | string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { RichTitleProps } from './RichTitle.types';
3
+ export declare const RichTitle: React.FC<RichTitleProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./SimpleBlock.types").SimpleBlockProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,4 @@
1
+ export interface SimpleBlockProps {
2
+ block: any;
3
+ styleContext?: string[] | string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SimpleBlockProps } from './SimpleBlock.types';
3
+ export declare const SimpleBlock: React.FC<SimpleBlockProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./SimpleTitle.types").SimpleTitleProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,4 @@
1
+ export interface SimpleTitleProps {
2
+ block: any;
3
+ styleContext?: string[] | string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SimpleTitleProps } from './SimpleTitle.types';
3
+ export declare const SimpleTitle: React.FC<SimpleTitleProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./SourceBlock.types").SourceBlockProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,4 @@
1
+ export interface SourceBlockProps {
2
+ block: any;
3
+ styleContext?: string[] | string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SourceBlockProps } from './SourceBlock.types';
3
+ export declare const SourceBlock: React.FC<SourceBlockProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./Spoiler.types").SpoilerProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,4 @@
1
+ export interface SpoilerProps {
2
+ block: any;
3
+ styleContext?: string[] | string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SpoilerProps } from './Spoiler.types';
3
+ export declare const Spoiler: React.FC<SpoilerProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./SvgSymbol.types").SvgSymbolProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,8 @@
1
+ export declare type SvgSymbolStyleContexts = 'isInFeature' | 'isInCard' | 'isInTopicBlockItem' | 'isInPageStatic' | 'isInMaterialMeta' | 'isInToolbar' | 'isInEpisodeBlock' | 'isInAudioPlayer' | 'isInAudioPanel' | 'isInPlaylist' | 'PodcastMaterial' | 'isInHeader' | 'isInProfile' | 'isInBookmark';
2
+ export declare type Icons = 'meduzaLogo' | 'meduzaSymbol' | 'menu' | 'fb' | 'tw' | 'vk' | 'ok' | 'tg' | 'chat' | 'backward' | 'forward' | 'download' | 'play' | 'pause' | 'speedHalf' | 'speedOne' | 'speedOneHalf' | 'speedTwo' | 'podcastBookmark' | 'reaction' | 'cross' | 'link' | 'search' | 'card' | 'podcast' | 'arrow' | 'brent' | 'user' | 'bookmark' | 'receipt' | 'read' | 'listened';
3
+ export declare type Sizes = 'small' | 'normal' | 'medium' | 'large' | 'unset';
4
+ export interface SvgSymbolProps {
5
+ styleContext?: SvgSymbolStyleContexts;
6
+ size?: Sizes;
7
+ icon: Icons;
8
+ }
@@ -0,0 +1,157 @@
1
+ export declare const icons: {
2
+ meduzaLogo: {
3
+ width: number;
4
+ height: number;
5
+ content: string;
6
+ };
7
+ menu: {
8
+ width: number;
9
+ height: number;
10
+ content: string;
11
+ };
12
+ fb: {
13
+ width: number;
14
+ height: number;
15
+ content: string;
16
+ };
17
+ tw: {
18
+ width: number;
19
+ height: number;
20
+ content: string;
21
+ };
22
+ vk: {
23
+ width: number;
24
+ height: number;
25
+ content: string;
26
+ };
27
+ ok: {
28
+ width: number;
29
+ height: number;
30
+ content: string;
31
+ };
32
+ tg: {
33
+ width: number;
34
+ height: number;
35
+ content: string;
36
+ };
37
+ meduzaSymbol: {
38
+ width: number;
39
+ height: number;
40
+ content: string;
41
+ };
42
+ backward: {
43
+ width: number;
44
+ height: number;
45
+ content: string;
46
+ };
47
+ forward: {
48
+ width: number;
49
+ height: number;
50
+ content: string;
51
+ };
52
+ download: {
53
+ width: number;
54
+ height: number;
55
+ content: string;
56
+ };
57
+ play: {
58
+ width: number;
59
+ height: number;
60
+ content: string;
61
+ };
62
+ pause: {
63
+ width: number;
64
+ height: number;
65
+ content: string;
66
+ };
67
+ speedHalf: {
68
+ width: number;
69
+ height: number;
70
+ content: string;
71
+ };
72
+ speedOne: {
73
+ width: number;
74
+ height: number;
75
+ content: string;
76
+ };
77
+ speedOneHalf: {
78
+ width: number;
79
+ height: number;
80
+ content: string;
81
+ };
82
+ speedTwo: {
83
+ width: number;
84
+ height: number;
85
+ content: string;
86
+ };
87
+ podcastBookmark: {
88
+ width: number;
89
+ height: number;
90
+ content: string;
91
+ };
92
+ reaction: {
93
+ width: number;
94
+ height: number;
95
+ content: string;
96
+ };
97
+ cross: {
98
+ width: number;
99
+ height: number;
100
+ content: string;
101
+ };
102
+ link: {
103
+ width: number;
104
+ height: number;
105
+ content: string;
106
+ };
107
+ search: {
108
+ width: number;
109
+ height: number;
110
+ content: string;
111
+ };
112
+ card: {
113
+ width: number;
114
+ height: number;
115
+ content: string;
116
+ };
117
+ podcast: {
118
+ width: number;
119
+ height: number;
120
+ content: string;
121
+ };
122
+ arrow: {
123
+ width: number;
124
+ height: number;
125
+ content: string;
126
+ };
127
+ brent: {
128
+ width: number;
129
+ height: number;
130
+ content: string;
131
+ };
132
+ user: {
133
+ width: number;
134
+ height: number;
135
+ content: string;
136
+ };
137
+ bookmark: {
138
+ width: number;
139
+ height: number;
140
+ content: string;
141
+ };
142
+ receipt: {
143
+ width: number;
144
+ height: number;
145
+ content: string;
146
+ };
147
+ read: {
148
+ width: number;
149
+ height: number;
150
+ content: string;
151
+ };
152
+ listened: {
153
+ width: number;
154
+ height: number;
155
+ content: string;
156
+ };
157
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SvgSymbolProps } from './SvgSymbol.types';
3
+ export declare const SvgSymbol: React.FC<SvgSymbolProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./Switcher.types").SwitcherProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare type SwitcherStyleContexts = 'isInLive' | 'isInPanel' | 'isInMenu';
3
+ export declare type SwitcherThemes = 'light' | 'dark';
4
+ export declare type SwitcherChildrenPositions = 'left' | 'right';
5
+ export interface SwitcherProps {
6
+ enabled: boolean;
7
+ styleContext: SwitcherStyleContexts;
8
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
+ theme?: SwitcherThemes;
10
+ children: JSX.Element[] | JSX.Element;
11
+ childrenPosition?: SwitcherChildrenPositions;
12
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SwitcherProps } from './Switcher.types';
3
+ export declare const Switcher: React.FC<SwitcherProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./Table.types").TableProps>;
5
+ parameters: {
6
+ themeWrapperSideBySide: boolean;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: React.FC;
@@ -0,0 +1,25 @@
1
+ export interface Row {
2
+ cells: {
3
+ key: string;
4
+ color?: string;
5
+ val?: string;
6
+ }[];
7
+ key: string;
8
+ }
9
+ export interface TableProps {
10
+ styleContext?: string | string[];
11
+ block: {
12
+ type: string;
13
+ columns_widths: number[];
14
+ display: string;
15
+ id: string;
16
+ options: {
17
+ header: boolean;
18
+ fixed_first_column?: boolean;
19
+ num_fixed_columns: number;
20
+ num_fixed_rows: number;
21
+ };
22
+ rows: Row[];
23
+ table_credit?: string;
24
+ };
25
+ }