@meduza/ui-kit-2 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -179
- package/dist/BookmarkButton/BookmarkButton.stories.d.ts +10 -0
- package/dist/BookmarkButton/BookmarkButton.types.d.ts +6 -0
- package/dist/BookmarkButton/index.d.ts +3 -0
- package/dist/Button/Button.stories.d.ts +10 -0
- package/dist/Button/Button.types.d.ts +2 -2
- package/dist/CardTitle/CardTitle.stories.d.ts +10 -0
- package/dist/CardTitle/CardTitle.types.d.ts +8 -0
- package/dist/CardTitle/index.d.ts +3 -0
- package/dist/ChapterBlock/ChapterBlock.stories.d.ts +10 -0
- package/dist/ChapterBlock/ChapterBlock.types.d.ts +7 -0
- package/dist/ChapterBlock/index.d.ts +3 -0
- package/dist/Cover/Cover.stories.d.ts +10 -0
- package/dist/Cover/Cover.types.d.ts +4 -0
- package/dist/Cover/index.d.ts +3 -0
- package/dist/DocumentItemsCount/DocumentItemsCount.stories.d.ts +10 -0
- package/dist/DocumentItemsCount/DocumentItemsCount.types.d.ts +7 -0
- package/dist/DocumentItemsCount/index.d.ts +3 -0
- package/dist/DotsOnImage/DotsOnImage.stories.d.ts +10 -0
- package/dist/DotsOnImage/DotsOnImage.types.d.ts +42 -0
- package/dist/DotsOnImage/index.d.ts +3 -0
- package/dist/Dropdown/Dropdown.stories.d.ts +10 -0
- package/dist/Dropdown/Dropdown.types.d.ts +6 -0
- package/dist/Dropdown/index.d.ts +4 -0
- package/dist/EmbedBlock/EmbedBlock.d.ts +3 -0
- package/dist/EmbedBlock/EmbedBlock.stories.d.ts +10 -0
- package/dist/EmbedBlock/EmbedBlock.types.d.ts +5 -0
- package/dist/EmbedBlock/IframeBlock.d.ts +3 -0
- package/dist/EmbedBlock/index.d.ts +3 -0
- package/dist/GroupedBlock/GroupedBlock.stories.d.ts +10 -0
- package/dist/GroupedBlock/GroupedBlock.types.d.ts +4 -0
- package/dist/GroupedBlock/index.d.ts +3 -0
- package/dist/HalfBlock/HalfBlock.stories.d.ts +10 -0
- package/dist/HalfBlock/HalfBlock.types.d.ts +4 -0
- package/dist/HalfBlock/index.d.ts +3 -0
- package/dist/Image/Image.stories.d.ts +10 -0
- package/dist/Image/Image.types.d.ts +38 -0
- package/dist/Image/RenderPicture.d.ts +4 -0
- package/dist/Image/index.d.ts +3 -0
- package/dist/ImportantLead/ImportantLead.stories.d.ts +10 -0
- package/dist/ImportantLead/ImportantLead.types.d.ts +4 -0
- package/dist/ImportantLead/index.d.ts +3 -0
- package/dist/Lazy/Lazy.stories.d.ts +10 -0
- package/dist/Lazy/Lazy.types.d.ts +5 -0
- package/dist/Lazy/index.d.ts +3 -0
- package/dist/ListBlock/ListBlock.stories.d.ts +10 -0
- package/dist/ListBlock/ListBlock.types.d.ts +4 -0
- package/dist/ListBlock/index.d.ts +3 -0
- package/dist/MaterialNote/MaterialNote.stories.d.ts +10 -0
- package/dist/MaterialNote/MaterialNote.types.d.ts +12 -0
- package/dist/MaterialNote/index.d.ts +3 -0
- package/dist/MaterialTitle/MaterialTitle.stories.d.ts +10 -0
- package/dist/MaterialTitle/MaterialTitle.types.d.ts +4 -0
- package/dist/MaterialTitle/index.d.ts +5 -0
- package/dist/MediaCaption/MediaCaption.stories.d.ts +10 -0
- package/dist/MediaCaption/MediaCaption.types.d.ts +5 -0
- package/dist/MediaCaption/index.d.ts +3 -0
- package/dist/Meta/Meta.stories.d.ts +10 -0
- package/dist/Meta/Meta.types.d.ts +18 -0
- package/dist/Meta/MetaContainer.d.ts +3 -0
- package/dist/Meta/index.d.ts +3 -0
- package/dist/MetaItem/MetaItem.stories.d.ts +10 -0
- package/dist/MetaItem/MetaItem.types.d.ts +7 -0
- package/dist/MetaItem/index.d.ts +3 -0
- package/dist/MetaItemLive/MetaItemLive.stories.d.ts +10 -0
- package/dist/MetaItemLive/MetaItemLive.types.d.ts +3 -0
- package/dist/MetaItemLive/index.d.ts +3 -0
- package/dist/Popover/Popover.stories.d.ts +10 -0
- package/dist/Popover/Popover.types.d.ts +5 -0
- package/dist/Popover/index.d.ts +3 -0
- package/dist/QuoteBlock/QuoteBlock.stories.d.ts +10 -0
- package/dist/QuoteBlock/QuoteBlock.types.d.ts +6 -0
- package/dist/QuoteBlock/index.d.ts +3 -0
- package/dist/RawHtmlBlock/RawHtmlBlock.stories.d.ts +10 -0
- package/dist/RawHtmlBlock/RawHtmlBlock.types.d.ts +9 -0
- package/dist/RawHtmlBlock/index.d.ts +3 -0
- package/dist/RelatedBlock/RelatedBlock.stories.d.ts +10 -0
- package/dist/RelatedBlock/RelatedBlock.types.d.ts +4 -0
- package/dist/RelatedBlock/index.d.ts +3 -0
- package/dist/RenderBlocks/RenderBlocks.stories.d.ts +10 -0
- package/dist/RenderBlocks/RenderBlocks.types.d.ts +10 -0
- package/dist/RenderBlocks/index.d.ts +3 -0
- package/dist/RichTitle/RichTitle.stories.d.ts +10 -0
- package/dist/RichTitle/RichTitle.types.d.ts +4 -0
- package/dist/RichTitle/index.d.ts +3 -0
- package/dist/SimpleBlock/SimpleBlock.stories.d.ts +10 -0
- package/dist/SimpleBlock/SimpleBlock.types.d.ts +4 -0
- package/dist/SimpleBlock/index.d.ts +3 -0
- package/dist/SimpleTitle/SimpleTitle.stories.d.ts +10 -0
- package/dist/SimpleTitle/SimpleTitle.types.d.ts +4 -0
- package/dist/SimpleTitle/index.d.ts +3 -0
- package/dist/SourceBlock/SourceBlock.stories.d.ts +10 -0
- package/dist/SourceBlock/SourceBlock.types.d.ts +4 -0
- package/dist/SourceBlock/index.d.ts +3 -0
- package/dist/Spoiler/Spoiler.stories.d.ts +10 -0
- package/dist/Spoiler/Spoiler.types.d.ts +4 -0
- package/dist/Spoiler/index.d.ts +3 -0
- package/dist/SvgSymbol/SvgSymbol.stories.d.ts +10 -0
- package/dist/SvgSymbol/SvgSymbol.types.d.ts +8 -0
- package/dist/SvgSymbol/icons.d.ts +157 -0
- package/dist/SvgSymbol/index.d.ts +3 -0
- package/dist/Switcher/Switcher.stories.d.ts +10 -0
- package/dist/Switcher/Switcher.types.d.ts +12 -0
- package/dist/Switcher/index.d.ts +3 -0
- package/dist/Table/Table.stories.d.ts +10 -0
- package/dist/Table/Table.types.d.ts +25 -0
- package/dist/Table/index.d.ts +3 -0
- package/dist/Tag/Tag.stories.d.ts +10 -0
- package/dist/Tag/Tag.types.d.ts +12 -0
- package/dist/Tag/index.d.ts +3 -0
- package/dist/Timestamp/Timestamp.stories.d.ts +10 -0
- package/dist/Timestamp/Timestamp.types.d.ts +5 -0
- package/dist/Timestamp/index.d.ts +4 -0
- package/dist/Toolbar/Toolbar.stories.d.ts +10 -0
- package/dist/Toolbar/Toolbar.types.d.ts +5 -0
- package/dist/Toolbar/index.d.ts +3 -0
- package/dist/ToolbarButton/ToolbarButton.stories.d.ts +10 -0
- package/dist/ToolbarButton/ToolbarButton.types.d.ts +9 -0
- package/dist/ToolbarButton/index.d.ts +3 -0
- package/dist/_storybook/PreviewWrapper/index.d.ts +6 -0
- package/dist/constants.d.ts +22 -0
- package/dist/index.d.ts +37 -0
- package/dist/ui-kit-2.cjs.development.css +36 -0
- package/dist/ui-kit-2.cjs.development.js +2187 -39
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +2139 -32
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/utils/BlockContext.d.ts +8 -0
- package/dist/utils/DangerousHtml.d.ts +8 -0
- package/dist/utils/makeClassName.d.ts +1 -1
- package/dist/utils/makeStyleContext.d.ts +2 -0
- package/dist/utils/toCamel.d.ts +1 -0
- package/package.json +29 -13
- package/src/BookmarkButton/BookmarkButton.module.css +50 -0
- package/src/BookmarkButton/BookmarkButton.stories.module.css +5 -0
- package/src/BookmarkButton/BookmarkButton.stories.tsx +39 -0
- package/src/BookmarkButton/BookmarkButton.test.tsx +20 -0
- package/src/BookmarkButton/BookmarkButton.types.ts +6 -0
- package/src/BookmarkButton/index.tsx +37 -0
- package/src/Button/Button.stories.module.css +30 -0
- package/src/Button/Button.stories.tsx +87 -0
- package/src/Button/Button.test.tsx +42 -0
- package/src/Button/Button.types.ts +1 -3
- package/src/Button/index.tsx +2 -2
- package/src/CardTitle/CardTitle.module.css +52 -0
- package/src/CardTitle/CardTitle.stories.module.css +5 -0
- package/src/CardTitle/CardTitle.stories.tsx +36 -0
- package/src/CardTitle/CardTitle.test.tsx +20 -0
- package/src/CardTitle/CardTitle.types.ts +8 -0
- package/src/CardTitle/index.tsx +24 -0
- package/src/CardTitle/mock.json +8 -0
- package/src/ChapterBlock/ChapterBlock.module.css +70 -0
- package/src/ChapterBlock/ChapterBlock.stories.module.css +5 -0
- package/src/ChapterBlock/ChapterBlock.stories.tsx +36 -0
- package/src/ChapterBlock/ChapterBlock.test.tsx +20 -0
- package/src/ChapterBlock/ChapterBlock.types.ts +7 -0
- package/src/ChapterBlock/index.tsx +31 -0
- package/src/ChapterBlock/mock.json +5 -0
- package/src/Cover/Cover.module.css +5 -0
- package/src/Cover/Cover.stories.module.css +5 -0
- package/src/Cover/Cover.stories.tsx +34 -0
- package/src/Cover/Cover.test.tsx +20 -0
- package/src/Cover/Cover.types.ts +4 -0
- package/src/Cover/index.tsx +89 -0
- package/src/DocumentItemsCount/DocumentItemsCount.module.css +18 -0
- package/src/DocumentItemsCount/DocumentItemsCount.stories.module.css +5 -0
- package/src/DocumentItemsCount/DocumentItemsCount.stories.tsx +34 -0
- package/src/DocumentItemsCount/DocumentItemsCount.test.tsx +20 -0
- package/src/DocumentItemsCount/DocumentItemsCount.types.ts +6 -0
- package/src/DocumentItemsCount/index.tsx +54 -0
- package/src/DotsOnImage/DotsOnImage.module.css +56 -0
- package/src/DotsOnImage/DotsOnImage.stories.module.css +9 -0
- package/src/DotsOnImage/DotsOnImage.stories.tsx +37 -0
- package/src/DotsOnImage/DotsOnImage.test.tsx +19 -0
- package/src/DotsOnImage/DotsOnImage.types.ts +46 -0
- package/src/DotsOnImage/index.tsx +79 -0
- package/src/DotsOnImage/mock.json +75 -0
- package/src/Dropdown/Dropdown.module.css +82 -0
- package/src/Dropdown/Dropdown.stories.module.css +5 -0
- package/src/Dropdown/Dropdown.stories.tsx +55 -0
- package/src/Dropdown/Dropdown.test.tsx +20 -0
- package/src/Dropdown/Dropdown.types.ts +5 -0
- package/src/Dropdown/index.tsx +35 -0
- package/src/EmbedBlock/EmbedBlock.module.css +351 -0
- package/src/EmbedBlock/EmbedBlock.stories.module.css +5 -0
- package/src/EmbedBlock/EmbedBlock.stories.tsx +39 -0
- package/src/EmbedBlock/EmbedBlock.test.tsx +20 -0
- package/src/EmbedBlock/EmbedBlock.tsx +236 -0
- package/src/EmbedBlock/EmbedBlock.types.ts +5 -0
- package/src/EmbedBlock/IframeBlock.tsx +86 -0
- package/src/EmbedBlock/index.tsx +16 -0
- package/src/EmbedBlock/mock.json +89 -0
- package/src/GroupedBlock/GroupedBlock.module.css +94 -0
- package/src/GroupedBlock/GroupedBlock.stories.module.css +5 -0
- package/src/GroupedBlock/GroupedBlock.stories.tsx +34 -0
- package/src/GroupedBlock/GroupedBlock.test.tsx +20 -0
- package/src/GroupedBlock/GroupedBlock.types.ts +4 -0
- package/src/GroupedBlock/index.tsx +67 -0
- package/src/HalfBlock/HalfBlock.module.css +88 -0
- package/src/HalfBlock/HalfBlock.stories.module.css +5 -0
- package/src/HalfBlock/HalfBlock.stories.tsx +34 -0
- package/src/HalfBlock/HalfBlock.test.tsx +20 -0
- package/src/HalfBlock/HalfBlock.types.ts +4 -0
- package/src/HalfBlock/index.tsx +53 -0
- package/src/Image/Image.module.css +78 -0
- package/src/Image/Image.stories.module.css +5 -0
- package/src/Image/Image.stories.tsx +47 -0
- package/src/Image/Image.test.tsx +33 -0
- package/src/Image/Image.types.ts +40 -0
- package/src/Image/RenderPicture.tsx +70 -0
- package/src/Image/index.tsx +101 -0
- package/src/Image/mock.json +49 -0
- package/src/ImportantLead/ImportantLead.module.css +64 -0
- package/src/ImportantLead/ImportantLead.stories.module.css +5 -0
- package/src/ImportantLead/ImportantLead.stories.tsx +34 -0
- package/src/ImportantLead/ImportantLead.test.tsx +20 -0
- package/src/ImportantLead/ImportantLead.types.ts +4 -0
- package/src/ImportantLead/index.tsx +35 -0
- package/src/Lazy/Lazy.module.css +9 -0
- package/src/Lazy/Lazy.stories.module.css +5 -0
- package/src/Lazy/Lazy.stories.tsx +48 -0
- package/src/Lazy/Lazy.test.tsx +20 -0
- package/src/Lazy/Lazy.types.ts +4 -0
- package/src/Lazy/index.tsx +41 -0
- package/src/ListBlock/ListBlock.module.css +163 -0
- package/src/ListBlock/ListBlock.stories.module.css +5 -0
- package/src/ListBlock/ListBlock.stories.tsx +34 -0
- package/src/ListBlock/ListBlock.test.tsx +20 -0
- package/src/ListBlock/ListBlock.types.ts +4 -0
- package/src/ListBlock/index.tsx +33 -0
- package/src/MaterialNote/MaterialNote.module.css +139 -0
- package/src/MaterialNote/MaterialNote.stories.module.css +5 -0
- package/src/MaterialNote/MaterialNote.stories.tsx +36 -0
- package/src/MaterialNote/MaterialNote.test.tsx +20 -0
- package/src/MaterialNote/MaterialNote.types.ts +12 -0
- package/src/MaterialNote/index.tsx +30 -0
- package/src/MaterialNote/mock.json +18 -0
- package/src/MaterialTitle/MaterialTitle.module.css +33 -0
- package/src/MaterialTitle/MaterialTitle.stories.module.css +13 -0
- package/src/MaterialTitle/MaterialTitle.stories.tsx +52 -0
- package/src/MaterialTitle/MaterialTitle.test.tsx +20 -0
- package/src/MaterialTitle/MaterialTitle.types.ts +3 -0
- package/src/MaterialTitle/index.tsx +20 -0
- package/src/MediaCaption/MediaCaption.module.css +85 -0
- package/src/MediaCaption/MediaCaption.stories.module.css +5 -0
- package/src/MediaCaption/MediaCaption.stories.tsx +37 -0
- package/src/MediaCaption/MediaCaption.test.tsx +20 -0
- package/src/MediaCaption/MediaCaption.types.ts +5 -0
- package/src/MediaCaption/index.tsx +35 -0
- package/src/Meta/Meta.module.css +106 -0
- package/src/Meta/Meta.stories.module.css +7 -0
- package/src/Meta/Meta.stories.tsx +69 -0
- package/src/Meta/Meta.test.tsx +20 -0
- package/src/Meta/Meta.types.ts +19 -0
- package/src/Meta/MetaContainer.tsx +148 -0
- package/src/Meta/index.tsx +32 -0
- package/src/MetaItem/MetaItem.module.css +104 -0
- package/src/MetaItem/MetaItem.stories.module.css +5 -0
- package/src/MetaItem/MetaItem.stories.tsx +34 -0
- package/src/MetaItem/MetaItem.test.tsx +20 -0
- package/src/MetaItem/MetaItem.types.ts +6 -0
- package/src/MetaItem/index.tsx +26 -0
- package/src/MetaItemLive/MetaItemLive.module.css +124 -0
- package/src/MetaItemLive/MetaItemLive.stories.module.css +5 -0
- package/src/MetaItemLive/MetaItemLive.stories.tsx +34 -0
- package/src/MetaItemLive/MetaItemLive.test.tsx +20 -0
- package/src/MetaItemLive/MetaItemLive.types.ts +3 -0
- package/src/MetaItemLive/index.tsx +25 -0
- package/src/Popover/Popover.module.css +134 -0
- package/src/Popover/Popover.stories.module.css +5 -0
- package/src/Popover/Popover.stories.tsx +55 -0
- package/src/Popover/Popover.test.tsx +20 -0
- package/src/Popover/Popover.types.ts +4 -0
- package/src/Popover/index.tsx +78 -0
- package/src/QuoteBlock/QuoteBlock.module.css +79 -0
- package/src/QuoteBlock/QuoteBlock.stories.module.css +7 -0
- package/src/QuoteBlock/QuoteBlock.stories.tsx +36 -0
- package/src/QuoteBlock/QuoteBlock.test.tsx +20 -0
- package/src/QuoteBlock/QuoteBlock.types.ts +6 -0
- package/src/QuoteBlock/index.tsx +24 -0
- package/src/QuoteBlock/mock.json +6 -0
- package/src/RawHtmlBlock/RawHtmlBlock.stories.module.css +5 -0
- package/src/RawHtmlBlock/RawHtmlBlock.stories.tsx +34 -0
- package/src/RawHtmlBlock/RawHtmlBlock.test.tsx +20 -0
- package/src/RawHtmlBlock/RawHtmlBlock.types.ts +9 -0
- package/src/RawHtmlBlock/index.tsx +57 -0
- package/src/RelatedBlock/RelatedBlock.module.css +129 -0
- package/src/RelatedBlock/RelatedBlock.stories.module.css +5 -0
- package/src/RelatedBlock/RelatedBlock.stories.tsx +34 -0
- package/src/RelatedBlock/RelatedBlock.test.tsx +20 -0
- package/src/RelatedBlock/RelatedBlock.types.ts +4 -0
- package/src/RelatedBlock/index.tsx +45 -0
- package/src/RenderBlocks/RenderBlocks.stories.module.css +5 -0
- package/src/RenderBlocks/RenderBlocks.stories.tsx +34 -0
- package/src/RenderBlocks/RenderBlocks.test.tsx +20 -0
- package/src/RenderBlocks/RenderBlocks.types.ts +10 -0
- package/src/RenderBlocks/index.tsx +125 -0
- package/src/RichTitle/RichTitle.module.css +85 -0
- package/src/RichTitle/RichTitle.stories.module.css +5 -0
- package/src/RichTitle/RichTitle.stories.tsx +34 -0
- package/src/RichTitle/RichTitle.test.tsx +20 -0
- package/src/RichTitle/RichTitle.types.ts +4 -0
- package/src/RichTitle/index.tsx +32 -0
- package/src/SimpleBlock/FootnoteLink.css +34 -0
- package/src/SimpleBlock/SimpleBlock.module.css +393 -0
- package/src/SimpleBlock/SimpleBlock.stories.module.css +5 -0
- package/src/SimpleBlock/SimpleBlock.stories.tsx +34 -0
- package/src/SimpleBlock/SimpleBlock.test.tsx +20 -0
- package/src/SimpleBlock/SimpleBlock.types.ts +4 -0
- package/src/SimpleBlock/index.tsx +47 -0
- package/src/SimpleTitle/SimpleTitle.module.css +33 -0
- package/src/SimpleTitle/SimpleTitle.stories.module.css +5 -0
- package/src/SimpleTitle/SimpleTitle.stories.tsx +34 -0
- package/src/SimpleTitle/SimpleTitle.test.tsx +20 -0
- package/src/SimpleTitle/SimpleTitle.types.ts +4 -0
- package/src/SimpleTitle/index.tsx +29 -0
- package/src/SourceBlock/SourceBlock.module.css +110 -0
- package/src/SourceBlock/SourceBlock.stories.module.css +5 -0
- package/src/SourceBlock/SourceBlock.stories.tsx +34 -0
- package/src/SourceBlock/SourceBlock.test.tsx +20 -0
- package/src/SourceBlock/SourceBlock.types.ts +4 -0
- package/src/SourceBlock/index.tsx +44 -0
- package/src/Spoiler/Spoiler.module.css +177 -0
- package/src/Spoiler/Spoiler.stories.module.css +8 -0
- package/src/Spoiler/Spoiler.stories.tsx +36 -0
- package/src/Spoiler/Spoiler.test.tsx +20 -0
- package/src/Spoiler/Spoiler.types.ts +4 -0
- package/src/Spoiler/index.tsx +81 -0
- package/src/Spoiler/mock.json +49 -0
- package/src/SvgSymbol/SvgSymbol.module.css +240 -0
- package/src/SvgSymbol/SvgSymbol.stories.module.css +127 -0
- package/src/SvgSymbol/SvgSymbol.stories.tsx +95 -0
- package/src/SvgSymbol/SvgSymbol.test.tsx +21 -0
- package/src/SvgSymbol/SvgSymbol.types.ts +57 -0
- package/src/SvgSymbol/icons.ts +217 -0
- package/src/SvgSymbol/index.tsx +32 -0
- package/src/Switcher/Switcher.module.css +159 -0
- package/src/Switcher/Switcher.stories.module.css +28 -0
- package/src/Switcher/Switcher.stories.tsx +68 -0
- package/src/Switcher/Switcher.test.tsx +43 -0
- package/src/Switcher/Switcher.types.ts +16 -0
- package/src/Switcher/index.tsx +53 -0
- package/src/Table/Table.module.css +300 -0
- package/src/Table/Table.stories.module.css +5 -0
- package/src/Table/Table.stories.tsx +36 -0
- package/src/Table/Table.test.tsx +20 -0
- package/src/Table/Table.types.ts +26 -0
- package/src/Table/index.tsx +76 -0
- package/src/Table/mock.json +301 -0
- package/src/Tag/Tag.module.css +115 -0
- package/src/Tag/Tag.stories.module.css +5 -0
- package/src/Tag/Tag.stories.tsx +53 -0
- package/src/Tag/Tag.test.tsx +20 -0
- package/src/Tag/Tag.types.ts +14 -0
- package/src/Tag/index.tsx +33 -0
- package/src/Timestamp/Timestamp.module.css +6 -0
- package/src/Timestamp/Timestamp.stories.module.css +5 -0
- package/src/Timestamp/Timestamp.stories.tsx +34 -0
- package/src/Timestamp/Timestamp.test.tsx +20 -0
- package/src/Timestamp/Timestamp.types.ts +5 -0
- package/src/Timestamp/index.tsx +40 -0
- package/src/Toolbar/Toolbar.module.css +134 -0
- package/src/Toolbar/Toolbar.stories.module.css +5 -0
- package/src/Toolbar/Toolbar.stories.tsx +89 -0
- package/src/Toolbar/Toolbar.test.tsx +20 -0
- package/src/Toolbar/Toolbar.types.ts +4 -0
- package/src/Toolbar/index.tsx +28 -0
- package/src/ToolbarButton/ToolbarButton.module.css +97 -0
- package/src/ToolbarButton/ToolbarButton.stories.module.css +5 -0
- package/src/ToolbarButton/ToolbarButton.stories.tsx +36 -0
- package/src/ToolbarButton/ToolbarButton.test.tsx +20 -0
- package/src/ToolbarButton/ToolbarButton.types.ts +19 -0
- package/src/ToolbarButton/index.tsx +34 -0
- package/src/_storybook/PreviewWrapper/PreviewWrapper.module.css +117 -0
- package/src/_storybook/PreviewWrapper/index.tsx +23 -0
- package/src/constants.ts +24 -0
- package/src/index.tsx +38 -0
- package/src/utils/BlockContext.ts +7 -0
- package/src/utils/DangerousHtml.tsx +79 -0
- package/src/utils/makeClassName.ts +1 -1
- package/src/utils/makeStyleContext.ts +13 -0
- package/src/utils/toCamel.ts +2 -0
- package/LICENSE +0 -21
- package/src/global.d.ts +0 -4
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
@import '../vars.css';
|
|
2
|
+
|
|
3
|
+
.root {
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.small {
|
|
11
|
+
height: 14px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.normal {
|
|
15
|
+
height: 14px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.medium {
|
|
19
|
+
width: 24px;
|
|
20
|
+
height: 24px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.large {
|
|
24
|
+
width: 42px;
|
|
25
|
+
height: 42px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.adaptive {
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.fb {
|
|
34
|
+
width: 16px;
|
|
35
|
+
|
|
36
|
+
fill: $fbColor;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.vk {
|
|
40
|
+
width: 20px;
|
|
41
|
+
|
|
42
|
+
fill: $vkColor;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ok {
|
|
46
|
+
width: 9px;
|
|
47
|
+
|
|
48
|
+
fill: $okColor;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tw {
|
|
52
|
+
width: 20px;
|
|
53
|
+
|
|
54
|
+
fill: $twColor;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tg {
|
|
58
|
+
width: 18px;
|
|
59
|
+
|
|
60
|
+
fill: $tgColor;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.reaction {
|
|
64
|
+
width: 16px;
|
|
65
|
+
|
|
66
|
+
color: $gold;
|
|
67
|
+
|
|
68
|
+
fill: #262626;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.card,
|
|
72
|
+
.podcast,
|
|
73
|
+
.read,
|
|
74
|
+
.listened {
|
|
75
|
+
width: 15px;
|
|
76
|
+
height: 15px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.menu {
|
|
80
|
+
width: 24px;
|
|
81
|
+
height: 24px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.cross {
|
|
85
|
+
width: 14px;
|
|
86
|
+
height: 14px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.isInFeature,
|
|
90
|
+
.isInCard {
|
|
91
|
+
width: 16px;
|
|
92
|
+
height: 16px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.isInTopicBlockItem {
|
|
96
|
+
width: 16px;
|
|
97
|
+
height: 16px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.isInPageStatic {
|
|
101
|
+
width: 64px;
|
|
102
|
+
height: 64px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.isInMaterialMeta {
|
|
106
|
+
margin-right: 6px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.isInAudioPlayer {
|
|
110
|
+
width: 29px;
|
|
111
|
+
height: 29px;
|
|
112
|
+
|
|
113
|
+
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.isInEpisodeBlock {
|
|
117
|
+
width: 38px;
|
|
118
|
+
height: 38px;
|
|
119
|
+
|
|
120
|
+
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.isInButtonPlaybackRate {
|
|
124
|
+
width: 34px;
|
|
125
|
+
height: 28px;
|
|
126
|
+
|
|
127
|
+
@media $contentWidth {
|
|
128
|
+
width: 28px;
|
|
129
|
+
height: 22px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.isInButtonBackward,
|
|
134
|
+
.isInButtonForward {
|
|
135
|
+
width: 28px;
|
|
136
|
+
height: 28px;
|
|
137
|
+
|
|
138
|
+
@media $contentWidth {
|
|
139
|
+
width: 22px;
|
|
140
|
+
height: 22px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.isInToolbar.cross {
|
|
145
|
+
width: 18px;
|
|
146
|
+
height: 18px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.play {
|
|
150
|
+
width: 100%;
|
|
151
|
+
height: 100%;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.meduzaLogo {
|
|
155
|
+
width: 92px;
|
|
156
|
+
height: 20px;
|
|
157
|
+
|
|
158
|
+
@media $landscapeTablet {
|
|
159
|
+
width: 100px;
|
|
160
|
+
height: 45px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.arrow {
|
|
165
|
+
width: 12px;
|
|
166
|
+
height: 12px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.oil {
|
|
170
|
+
width: 9px;
|
|
171
|
+
height: 12px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.search {
|
|
175
|
+
width: 24px;
|
|
176
|
+
height: 24px;
|
|
177
|
+
|
|
178
|
+
@media $landscapeTablet {
|
|
179
|
+
width: 16px;
|
|
180
|
+
height: 16px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.user {
|
|
185
|
+
width: 14px;
|
|
186
|
+
height: 14px;
|
|
187
|
+
|
|
188
|
+
@media $landscapeTablet {
|
|
189
|
+
width: 16px;
|
|
190
|
+
height: 16px;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.bookmark {
|
|
195
|
+
width: 17px;
|
|
196
|
+
height: auto;
|
|
197
|
+
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
|
|
200
|
+
stroke-width: 2px;
|
|
201
|
+
|
|
202
|
+
@media $landscapeTablet {
|
|
203
|
+
width: 14px;
|
|
204
|
+
|
|
205
|
+
stroke-width: 1.5px;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.isInToolbar.bookmark {
|
|
210
|
+
width: 14px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.receipt {
|
|
214
|
+
width: 10px;
|
|
215
|
+
height: 13px;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.isInHeader.cross {
|
|
219
|
+
width: 22px;
|
|
220
|
+
height: 22px;
|
|
221
|
+
|
|
222
|
+
@media $landscapeTablet {
|
|
223
|
+
width: 14px;
|
|
224
|
+
height: 14px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.isInHeader.search circle {
|
|
229
|
+
@media $landscapeTablet {
|
|
230
|
+
stroke-width: 1.5px;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.isInHeader.cross path {
|
|
235
|
+
stroke-width: 1.8px;
|
|
236
|
+
|
|
237
|
+
@media $landscapeTablet {
|
|
238
|
+
stroke-width: 1.3px;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'PF Regal';
|
|
3
|
+
font-style: normal;
|
|
4
|
+
|
|
5
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-RegularB.woff') format('woff');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: 'PF Regal';
|
|
10
|
+
font-style: italic;
|
|
11
|
+
|
|
12
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-RegularBItalic.woff') format('woff');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@font-face {
|
|
16
|
+
font-weight: bold;
|
|
17
|
+
font-family: 'PF Regal';
|
|
18
|
+
|
|
19
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-Bold.woff') format('woff');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@font-face {
|
|
23
|
+
font-weight: bold;
|
|
24
|
+
font-family: 'PF Regal';
|
|
25
|
+
font-style: italic;
|
|
26
|
+
|
|
27
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-BoldItalic.woff') format('woff');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@font-face {
|
|
31
|
+
font-weight: 400;
|
|
32
|
+
font-family: 'Proxima Nova';
|
|
33
|
+
font-style: normal;
|
|
34
|
+
|
|
35
|
+
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Regular.woff2') format('woff2'),
|
|
36
|
+
url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Regular.woff') format('woff');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@font-face {
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
font-family: 'Proxima Nova';
|
|
42
|
+
font-style: normal;
|
|
43
|
+
|
|
44
|
+
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Semibold.woff2') format('woff2'),
|
|
45
|
+
url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Semibold.woff') format('woff');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@font-face {
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
font-family: 'Proxima Nova';
|
|
51
|
+
font-style: normal;
|
|
52
|
+
|
|
53
|
+
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Bold.woff2') format('woff2'),
|
|
54
|
+
url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Bold.woff') format('woff');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
* { box-sizing: border-box; }
|
|
58
|
+
|
|
59
|
+
.row {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-flow: row wrap;
|
|
62
|
+
|
|
63
|
+
padding: 15px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.panel {
|
|
67
|
+
padding: 15px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
.root h2 {
|
|
72
|
+
margin-bottom: 0;
|
|
73
|
+
padding: 0 12px;
|
|
74
|
+
|
|
75
|
+
font-family: sans-serif;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.row[data-theme='dark'] {
|
|
79
|
+
color: #fff;
|
|
80
|
+
|
|
81
|
+
background: #262626;
|
|
82
|
+
border-radius: 10px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.row[data-type='buttons'] .item {
|
|
86
|
+
min-width: 40%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.item {
|
|
90
|
+
margin-right: 15px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.icon {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
|
|
98
|
+
min-width: 45px;
|
|
99
|
+
height: 45px;
|
|
100
|
+
padding: 4px;
|
|
101
|
+
|
|
102
|
+
vertical-align: top;
|
|
103
|
+
|
|
104
|
+
background: #f1f1f1;
|
|
105
|
+
|
|
106
|
+
border: 1px solid #fff;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.row[data-type='MediaBlock'] {
|
|
110
|
+
color: #808080;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.row[data-type='MediaBlock'] svg {
|
|
114
|
+
color: #b88b58;
|
|
115
|
+
|
|
116
|
+
fill: #b88b58;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.row[data-type='MediaMaterial'] {
|
|
120
|
+
color: rgba(255, 255, 255, 0.7);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.row[data-type='MediaMaterial'] svg {
|
|
124
|
+
color: rgba(255, 255, 255, 0.7);
|
|
125
|
+
|
|
126
|
+
fill: rgba(255, 255, 255, 0.7);
|
|
127
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { SvgSymbol } from './'
|
|
4
|
+
import { PreviewWrapper } from '../_storybook/PreviewWrapper'
|
|
5
|
+
import styles from './SvgSymbol.stories.module.css'
|
|
6
|
+
import { Icons } from 'SvgSymbol/SvgSymbol.types'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Main / SvgSymbol',
|
|
10
|
+
component: SvgSymbol,
|
|
11
|
+
parameters: {
|
|
12
|
+
themeWrapperSideBySide: true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const social: Icons[] = ['fb', 'tw', 'vk', 'ok', 'tg', 'reaction']
|
|
17
|
+
|
|
18
|
+
const podcast: Icons[] = [
|
|
19
|
+
'backward',
|
|
20
|
+
'forward',
|
|
21
|
+
'download',
|
|
22
|
+
'play',
|
|
23
|
+
'pause',
|
|
24
|
+
'speedHalf',
|
|
25
|
+
'speedOne',
|
|
26
|
+
'speedOneHalf',
|
|
27
|
+
'speedTwo'
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
const meta: Icons[] = ['card', 'podcast', 'read', 'listened']
|
|
31
|
+
|
|
32
|
+
const other: Icons[] = [
|
|
33
|
+
'meduzaLogo',
|
|
34
|
+
'meduzaSymbol',
|
|
35
|
+
'menu',
|
|
36
|
+
'search',
|
|
37
|
+
'cross',
|
|
38
|
+
'link',
|
|
39
|
+
'user',
|
|
40
|
+
'bookmark',
|
|
41
|
+
'receipt'
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
const Example: React.FC = () => {
|
|
45
|
+
return (
|
|
46
|
+
<div className={styles.root}>
|
|
47
|
+
<h2>Кнопки соц. сетей и реакций</h2>
|
|
48
|
+
<div className={styles.row}>
|
|
49
|
+
{social.map(icon => (
|
|
50
|
+
<span title={icon} key={`iconName-${icon}`} className={styles.icon}>
|
|
51
|
+
<SvgSymbol icon={icon} size="medium" />
|
|
52
|
+
</span>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<h2>Мета</h2>
|
|
57
|
+
<div className={styles.row}>
|
|
58
|
+
{meta.map(icon => (
|
|
59
|
+
<span title={icon} key={`iconName-${icon}`} className={styles.icon}>
|
|
60
|
+
<SvgSymbol icon={icon} size="medium" />
|
|
61
|
+
</span>
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<h2>Плеер</h2>
|
|
66
|
+
<div className={styles.row}>
|
|
67
|
+
{podcast.map(icon => (
|
|
68
|
+
<span title={icon} key={`iconName-${icon}`} className={styles.icon}>
|
|
69
|
+
<SvgSymbol icon={icon} size="medium" />
|
|
70
|
+
</span>
|
|
71
|
+
))}
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<h2>Другие</h2>
|
|
75
|
+
<div className={styles.row}>
|
|
76
|
+
{other.map(icon => (
|
|
77
|
+
<span title={icon} key={`iconName-${icon}`} className={styles.icon}>
|
|
78
|
+
<SvgSymbol icon={icon} size="medium" />
|
|
79
|
+
</span>
|
|
80
|
+
))}
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const Default: React.FC = () => (
|
|
87
|
+
<>
|
|
88
|
+
<PreviewWrapper theme="light">
|
|
89
|
+
<Example />
|
|
90
|
+
</PreviewWrapper>
|
|
91
|
+
<PreviewWrapper theme="dark">
|
|
92
|
+
<Example />
|
|
93
|
+
</PreviewWrapper>
|
|
94
|
+
</>
|
|
95
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { render, RenderResult } from '@testing-library/react'
|
|
3
|
+
|
|
4
|
+
import { SvgSymbol } from './'
|
|
5
|
+
import { SvgSymbolProps } from './SvgSymbol.types'
|
|
6
|
+
import styles from './SvgSymbol.module.css'
|
|
7
|
+
|
|
8
|
+
describe('Svg Symbol', () => {
|
|
9
|
+
let props: SvgSymbolProps
|
|
10
|
+
|
|
11
|
+
const renderComponent = (): RenderResult =>
|
|
12
|
+
render(<SvgSymbol icon="meduzaLogo" {...props} />)
|
|
13
|
+
|
|
14
|
+
it('should have root style', () => {
|
|
15
|
+
const { getByTestId } = renderComponent()
|
|
16
|
+
|
|
17
|
+
const svgSymbol = getByTestId('svg-symbol')
|
|
18
|
+
|
|
19
|
+
expect(svgSymbol).toHaveClass(styles.root)
|
|
20
|
+
})
|
|
21
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type SvgSymbolStyleContexts =
|
|
2
|
+
| 'isInFeature'
|
|
3
|
+
| 'isInCard'
|
|
4
|
+
| 'isInTopicBlockItem'
|
|
5
|
+
| 'isInPageStatic'
|
|
6
|
+
| 'isInMaterialMeta'
|
|
7
|
+
| 'isInToolbar'
|
|
8
|
+
| 'isInEpisodeBlock'
|
|
9
|
+
| 'isInAudioPlayer'
|
|
10
|
+
| 'isInAudioPanel'
|
|
11
|
+
| 'isInPlaylist'
|
|
12
|
+
| 'PodcastMaterial'
|
|
13
|
+
| 'isInHeader'
|
|
14
|
+
| 'isInProfile'
|
|
15
|
+
| 'isInBookmark'
|
|
16
|
+
|
|
17
|
+
export type Icons =
|
|
18
|
+
| 'meduzaLogo'
|
|
19
|
+
| 'meduzaSymbol'
|
|
20
|
+
| 'menu'
|
|
21
|
+
| 'fb'
|
|
22
|
+
| 'tw'
|
|
23
|
+
| 'vk'
|
|
24
|
+
| 'ok'
|
|
25
|
+
| 'tg'
|
|
26
|
+
| 'chat'
|
|
27
|
+
| 'backward'
|
|
28
|
+
| 'forward'
|
|
29
|
+
| 'download'
|
|
30
|
+
| 'play'
|
|
31
|
+
| 'pause'
|
|
32
|
+
| 'speedHalf'
|
|
33
|
+
| 'speedOne'
|
|
34
|
+
| 'speedOneHalf'
|
|
35
|
+
| 'speedTwo'
|
|
36
|
+
| 'podcastBookmark'
|
|
37
|
+
| 'reaction'
|
|
38
|
+
| 'cross'
|
|
39
|
+
| 'link'
|
|
40
|
+
| 'search'
|
|
41
|
+
| 'card'
|
|
42
|
+
| 'podcast'
|
|
43
|
+
| 'arrow'
|
|
44
|
+
| 'brent'
|
|
45
|
+
| 'user'
|
|
46
|
+
| 'bookmark'
|
|
47
|
+
| 'receipt'
|
|
48
|
+
| 'read'
|
|
49
|
+
| 'listened'
|
|
50
|
+
|
|
51
|
+
export type Sizes = 'small' | 'normal' | 'medium' | 'large' | 'unset'
|
|
52
|
+
|
|
53
|
+
export interface SvgSymbolProps {
|
|
54
|
+
styleContext?: SvgSymbolStyleContexts
|
|
55
|
+
size?: Sizes
|
|
56
|
+
icon: Icons
|
|
57
|
+
}
|