@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
package/README.md
CHANGED
|
@@ -1,183 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MEDUZA UI-KIT 4.0
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Разработка
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- `yarn start` - запускает development сборку с hot reload, пишет все в папку dist
|
|
6
|
+
- `cd example && yarn start` - запускает сборку тестового проекта с hot reload,
|
|
7
|
+
в который можно импортировать компоненты из кита
|
|
8
|
+
- `yarn storybook` - запускает storybook
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
`yarn generate` - генератор компонентов. Вводим название компонента, получаем все файлы и импорты
|
|
8
11
|
|
|
9
|
-
## Commands
|
|
10
|
-
|
|
11
|
-
TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.
|
|
12
|
-
|
|
13
|
-
The recommended workflow is to run TSDX in one terminal:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
npm start # or yarn start
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
|
|
20
|
-
|
|
21
|
-
Then run either example playground or storybook:
|
|
22
|
-
|
|
23
|
-
### Storybook
|
|
24
|
-
|
|
25
|
-
Run inside another terminal:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
yarn storybook
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
This loads the stories from `./stories`.
|
|
32
|
-
|
|
33
|
-
> NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
|
|
34
|
-
|
|
35
|
-
### Example
|
|
36
|
-
|
|
37
|
-
Then run the example inside another:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
cd example
|
|
41
|
-
npm i # or yarn to install dependencies
|
|
42
|
-
npm start # or yarn start
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, [we use Parcel's aliasing](https://github.com/palmerhq/tsdx/pull/88/files).
|
|
46
|
-
|
|
47
|
-
To do a one-off build, use `npm run build` or `yarn build`.
|
|
48
|
-
|
|
49
|
-
To run tests, use `npm test` or `yarn test`.
|
|
50
|
-
|
|
51
|
-
## Configuration
|
|
52
|
-
|
|
53
|
-
Code quality is [set up for you](https://github.com/palmerhq/tsdx/pull/45/files) with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
|
|
54
|
-
|
|
55
|
-
### Jest
|
|
56
|
-
|
|
57
|
-
Jest tests are set up to run with `npm test` or `yarn test`. This runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.
|
|
58
|
-
|
|
59
|
-
#### Setup Files
|
|
60
|
-
|
|
61
|
-
This is the folder structure we set up for you:
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
/example
|
|
65
|
-
index.html
|
|
66
|
-
index.tsx # test your component here in a demo app
|
|
67
|
-
package.json
|
|
68
|
-
tsconfig.json
|
|
69
|
-
/src
|
|
70
|
-
index.tsx # EDIT THIS
|
|
71
|
-
/test
|
|
72
|
-
blah.test.tsx # EDIT THIS
|
|
73
|
-
.gitignore
|
|
74
|
-
package.json
|
|
75
|
-
README.md # EDIT THIS
|
|
76
|
-
tsconfig.json
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
#### React Testing Library
|
|
80
|
-
|
|
81
|
-
We do not set up `react-testing-library` for you yet, we welcome contributions and documentation on this.
|
|
82
|
-
|
|
83
|
-
### Rollup
|
|
84
|
-
|
|
85
|
-
TSDX uses [Rollup v1.x](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
|
|
86
|
-
|
|
87
|
-
### TypeScript
|
|
88
|
-
|
|
89
|
-
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
|
|
90
|
-
|
|
91
|
-
## Continuous Integration
|
|
92
|
-
|
|
93
|
-
### Travis
|
|
94
|
-
|
|
95
|
-
_to be completed_
|
|
96
|
-
|
|
97
|
-
### Circle
|
|
98
|
-
|
|
99
|
-
_to be completed_
|
|
100
|
-
|
|
101
|
-
## Optimizations
|
|
102
|
-
|
|
103
|
-
Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
|
|
104
|
-
|
|
105
|
-
```js
|
|
106
|
-
// ./types/index.d.ts
|
|
107
|
-
declare var __DEV__: boolean;
|
|
108
|
-
|
|
109
|
-
// inside your code...
|
|
110
|
-
if (__DEV__) {
|
|
111
|
-
console.log('foo');
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
|
|
116
|
-
|
|
117
|
-
## Module Formats
|
|
118
|
-
|
|
119
|
-
CJS, ESModules, and UMD module formats are supported.
|
|
120
|
-
|
|
121
|
-
The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.
|
|
122
|
-
|
|
123
|
-
## Using the Playground
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
cd example
|
|
127
|
-
npm i # or yarn to install dependencies
|
|
128
|
-
npm start # or yarn start
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**!
|
|
132
|
-
|
|
133
|
-
## Deploying the Playground
|
|
134
|
-
|
|
135
|
-
The Playground is just a simple [Parcel](https://parceljs.org) app, you can deploy it anywhere you would normally deploy that. Here are some guidelines for **manually** deploying with the Netlify CLI (`npm i -g netlify-cli`):
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
cd example # if not already in the example folder
|
|
139
|
-
npm run build # builds to dist
|
|
140
|
-
netlify deploy # deploy the dist folder
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Alternatively, if you already have a git repo connected, you can set up continuous deployment with Netlify:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
netlify init
|
|
147
|
-
# build command: yarn build && cd example && yarn && yarn build
|
|
148
|
-
# directory to deploy: example/dist
|
|
149
|
-
# pick yes for netlify.toml
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
## Named Exports
|
|
153
|
-
|
|
154
|
-
Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.
|
|
155
|
-
|
|
156
|
-
## Including Styles
|
|
157
|
-
|
|
158
|
-
There are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.
|
|
159
|
-
|
|
160
|
-
For vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader.
|
|
161
|
-
|
|
162
|
-
## Publishing to NPM
|
|
163
|
-
|
|
164
|
-
We recommend using https://github.com/sindresorhus/np.
|
|
165
|
-
|
|
166
|
-
## Usage with Lerna
|
|
167
|
-
|
|
168
|
-
When creating a new package with TSDX within a project set up with Lerna, you might encounter a `Cannot resolve dependency` error when trying to run the `example` project. To fix that you will need to make changes to the `package.json` file _inside the `example` directory_.
|
|
169
|
-
|
|
170
|
-
The problem is that due to the nature of how dependencies are installed in Lerna projects, the aliases in the example project's `package.json` might not point to the right place, as those dependencies might have been installed in the root of your Lerna project.
|
|
171
|
-
|
|
172
|
-
Change the `alias` to point to where those packages are actually installed. This depends on the directory structure of your Lerna project, so the actual path might be different from the diff below.
|
|
173
|
-
|
|
174
|
-
```diff
|
|
175
|
-
"alias": {
|
|
176
|
-
- "react": "../node_modules/react",
|
|
177
|
-
- "react-dom": "../node_modules/react-dom"
|
|
178
|
-
+ "react": "../../../node_modules/react",
|
|
179
|
-
+ "react-dom": "../../../node_modules/react-dom"
|
|
180
|
-
},
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
An alternative to fixing this problem would be to remove aliases altogether and define the dependencies referenced as aliases as dev dependencies instead. [However, that might cause other problems.](https://github.com/palmerhq/tsdx/issues/64)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./BookmarkButton.types").BookmarkButtonProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./Button.types").ButtonProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export declare type ButtonThemes = 'sand' | 'gold' | 'light' | 'gray' | 'ghost' | 'dark' | 'black' | 'red';
|
|
3
3
|
export declare type ButtonStates = 'isLoading' | 'isDefault';
|
|
4
4
|
export declare type ButtonSizes = 'auto' | 'default';
|
|
@@ -10,5 +10,5 @@ export interface ButtonProps {
|
|
|
10
10
|
styleContext?: ButtonStyleContexts;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
onClick?: () => void;
|
|
13
|
-
children:
|
|
13
|
+
children: JSX.Element[] | JSX.Element;
|
|
14
14
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./CardTitle.types").CardTitleProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./ChapterBlock.types").ChapterBlockProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./Cover.types").CoverProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./DocumentItemsCount.types").DocumentItemsCountProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./DotsOnImage.types").DotsOnImageProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OptimizedImageItem } from '../Image/Image.types';
|
|
2
|
+
export interface PopoverData {
|
|
3
|
+
title: string;
|
|
4
|
+
body: string;
|
|
5
|
+
id: string;
|
|
6
|
+
show: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SingleDot {
|
|
9
|
+
title: string;
|
|
10
|
+
body: string;
|
|
11
|
+
id: string;
|
|
12
|
+
position: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
icon: {
|
|
17
|
+
type: string;
|
|
18
|
+
number?: string;
|
|
19
|
+
svg_string?: string;
|
|
20
|
+
color: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface DotsOnImageProps {
|
|
24
|
+
block: {
|
|
25
|
+
credit?: string;
|
|
26
|
+
caption?: string;
|
|
27
|
+
cc?: string;
|
|
28
|
+
display?: string;
|
|
29
|
+
optimized?: {
|
|
30
|
+
original: string;
|
|
31
|
+
w325: OptimizedImageItem;
|
|
32
|
+
w520: OptimizedImageItem;
|
|
33
|
+
w650: OptimizedImageItem;
|
|
34
|
+
w980: OptimizedImageItem;
|
|
35
|
+
w1335: OptimizedImageItem;
|
|
36
|
+
};
|
|
37
|
+
width?: number;
|
|
38
|
+
height?: number;
|
|
39
|
+
lazy?: boolean;
|
|
40
|
+
dots: SingleDot[];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./Dropdown.types").DropdownProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./EmbedBlock.types").EmbedBlockProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./GroupedBlock.types").GroupedBlockProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./HalfBlock.types").HalfBlockProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./Image.types").ImageProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface OptimizedImageItem {
|
|
2
|
+
'1x': string;
|
|
3
|
+
'2x': string;
|
|
4
|
+
'1x_webp': string;
|
|
5
|
+
'2x_webp': string;
|
|
6
|
+
}
|
|
7
|
+
export interface ImageProps {
|
|
8
|
+
alt?: string;
|
|
9
|
+
display?: string;
|
|
10
|
+
optimized?: {
|
|
11
|
+
original: string;
|
|
12
|
+
w325: OptimizedImageItem;
|
|
13
|
+
w520: OptimizedImageItem;
|
|
14
|
+
w650: OptimizedImageItem;
|
|
15
|
+
w980: OptimizedImageItem;
|
|
16
|
+
w1335: OptimizedImageItem;
|
|
17
|
+
};
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
source?: object;
|
|
21
|
+
lazy?: boolean;
|
|
22
|
+
fullscreen?: boolean;
|
|
23
|
+
ratio?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface PictureProps {
|
|
26
|
+
source?: object;
|
|
27
|
+
optimized?: {
|
|
28
|
+
original: string;
|
|
29
|
+
w325: OptimizedImageItem;
|
|
30
|
+
w520: OptimizedImageItem;
|
|
31
|
+
w650: OptimizedImageItem;
|
|
32
|
+
w980: OptimizedImageItem;
|
|
33
|
+
w1335: OptimizedImageItem;
|
|
34
|
+
};
|
|
35
|
+
alt?: string;
|
|
36
|
+
fallbackSource: string;
|
|
37
|
+
display: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./ImportantLead.types").ImportantLeadProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./ListBlock.types").ListBlockProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./MaterialNote.types").MaterialNoteProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
themeWrapperSideBySide: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Default: React.FC;
|