@jpmorganchase/mosaic-components 0.1.0-beta.10
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/.turbo/turbo-build.log +6 -0
- package/CHANGELOG.md +31 -0
- package/README.md +22 -0
- package/dist/Accordion/index.css +1 -0
- package/dist/Accordion/index.d.ts +46 -0
- package/dist/Accordion/index.js +1 -0
- package/dist/Accordion/styles.css.css +1 -0
- package/dist/Accordion/styles.css.d.ts +5 -0
- package/dist/Accordion/styles.css.js +1 -0
- package/dist/AudioPlayer/index.css +1 -0
- package/dist/AudioPlayer/index.d.ts +7 -0
- package/dist/AudioPlayer/index.js +1 -0
- package/dist/AudioPlayer/styles.css.css +1 -0
- package/dist/AudioPlayer/styles.css.d.ts +9 -0
- package/dist/AudioPlayer/styles.css.js +1 -0
- package/dist/BrowserOnly.d.ts +5 -0
- package/dist/BrowserOnly.js +1 -0
- package/dist/Button.d.ts +6 -0
- package/dist/Button.js +1 -0
- package/dist/Callout/index.css +1 -0
- package/dist/Callout/index.d.ts +33 -0
- package/dist/Callout/index.js +1 -0
- package/dist/Callout/styles.css.css +1 -0
- package/dist/Callout/styles.css.d.ts +17 -0
- package/dist/Callout/styles.css.js +1 -0
- package/dist/Card/index.css +1 -0
- package/dist/Card/index.d.ts +25 -0
- package/dist/Card/index.js +1 -0
- package/dist/Card/styles.css.css +1 -0
- package/dist/Card/styles.css.d.ts +6 -0
- package/dist/Card/styles.css.js +1 -0
- package/dist/Cards.css +1 -0
- package/dist/Cards.d.ts +7 -0
- package/dist/Cards.js +1 -0
- package/dist/ColorModeProvider.d.ts +16 -0
- package/dist/ColorModeProvider.js +1 -0
- package/dist/ComponentExample/index.css +1 -0
- package/dist/ComponentExample/index.d.ts +8 -0
- package/dist/ComponentExample/index.js +1 -0
- package/dist/ComponentExample/styles.css.css +1 -0
- package/dist/ComponentExample/styles.css.d.ts +6 -0
- package/dist/ComponentExample/styles.css.js +1 -0
- package/dist/DataTable.d.ts +19 -0
- package/dist/DataTable.js +1 -0
- package/dist/EditionFilterView/index.css +1 -0
- package/dist/EditionFilterView/index.d.ts +27 -0
- package/dist/EditionFilterView/index.js +1 -0
- package/dist/EditionFilterView/styles.css.d.ts +4 -0
- package/dist/EditionFilterView/styles.css.js +1 -0
- package/dist/EditionTileLink/index.css +1 -0
- package/dist/EditionTileLink/index.d.ts +18 -0
- package/dist/EditionTileLink/index.js +1 -0
- package/dist/EditionTileLink/styles.css.css +1 -0
- package/dist/EditionTileLink/styles.css.d.ts +30 -0
- package/dist/EditionTileLink/styles.css.js +1 -0
- package/dist/Feature/Feature.css +1 -0
- package/dist/Feature/Feature.d.ts +44 -0
- package/dist/Feature/Feature.js +1 -0
- package/dist/Feature/FeatureActions/index.css +1 -0
- package/dist/Feature/FeatureActions/index.d.ts +11 -0
- package/dist/Feature/FeatureActions/index.js +1 -0
- package/dist/Feature/FeatureActions/styles.css.css +1 -0
- package/dist/Feature/FeatureActions/styles.css.d.ts +4 -0
- package/dist/Feature/FeatureActions/styles.css.js +1 -0
- package/dist/Feature/FeatureContent/index.css +1 -0
- package/dist/Feature/FeatureContent/index.d.ts +11 -0
- package/dist/Feature/FeatureContent/index.js +1 -0
- package/dist/Feature/FeatureContent/styles.css.css +1 -0
- package/dist/Feature/FeatureContent/styles.css.d.ts +4 -0
- package/dist/Feature/FeatureContent/styles.css.js +1 -0
- package/dist/Feature/FeatureEyebrow/index.css +1 -0
- package/dist/Feature/FeatureEyebrow/index.d.ts +11 -0
- package/dist/Feature/FeatureEyebrow/index.js +1 -0
- package/dist/Feature/FeatureEyebrow/styles.css.css +1 -0
- package/dist/Feature/FeatureEyebrow/styles.css.d.ts +4 -0
- package/dist/Feature/FeatureEyebrow/styles.css.js +1 -0
- package/dist/Feature/FeatureTitle/index.d.ts +11 -0
- package/dist/Feature/FeatureTitle/index.js +1 -0
- package/dist/Feature/FeatureTitle/styles.css.d.ts +4 -0
- package/dist/Feature/FeatureTitle/styles.css.js +1 -0
- package/dist/Feature/index.css +1 -0
- package/dist/Feature/index.d.ts +10 -0
- package/dist/Feature/index.js +1 -0
- package/dist/Feature/styles.css.css +1 -0
- package/dist/Feature/styles.css.d.ts +13 -0
- package/dist/Feature/styles.css.js +1 -0
- package/dist/Features/index.css +1 -0
- package/dist/Features/index.d.ts +15 -0
- package/dist/Features/index.js +1 -0
- package/dist/Features/styles.css.css +1 -0
- package/dist/Features/styles.css.d.ts +4 -0
- package/dist/Features/styles.css.js +1 -0
- package/dist/FilterToolbar/ContentArea/index.css +1 -0
- package/dist/FilterToolbar/ContentArea/index.d.ts +2 -0
- package/dist/FilterToolbar/ContentArea/index.js +1 -0
- package/dist/FilterToolbar/ContentArea/styles.css.css +1 -0
- package/dist/FilterToolbar/ContentArea/styles.css.d.ts +4 -0
- package/dist/FilterToolbar/ContentArea/styles.css.js +1 -0
- package/dist/FilterToolbar/FilterDropdown/index.css +1 -0
- package/dist/FilterToolbar/FilterDropdown/index.d.ts +7 -0
- package/dist/FilterToolbar/FilterDropdown/index.js +1 -0
- package/dist/FilterToolbar/FilterDropdown/styles.css.css +1 -0
- package/dist/FilterToolbar/FilterDropdown/styles.css.d.ts +4 -0
- package/dist/FilterToolbar/FilterDropdown/styles.css.js +1 -0
- package/dist/FilterToolbar/PillGroup/index.css +1 -0
- package/dist/FilterToolbar/PillGroup/index.d.ts +6 -0
- package/dist/FilterToolbar/PillGroup/index.js +1 -0
- package/dist/FilterToolbar/PillGroup/styles.css.css +1 -0
- package/dist/FilterToolbar/PillGroup/styles.css.d.ts +4 -0
- package/dist/FilterToolbar/PillGroup/styles.css.js +1 -0
- package/dist/FilterToolbar/Search/index.css +1 -0
- package/dist/FilterToolbar/Search/index.d.ts +5 -0
- package/dist/FilterToolbar/Search/index.js +1 -0
- package/dist/FilterToolbar/Search/styles.css.css +1 -0
- package/dist/FilterToolbar/Search/styles.css.d.ts +4 -0
- package/dist/FilterToolbar/Search/styles.css.js +1 -0
- package/dist/FilterToolbar/SortDropdown/index.css +1 -0
- package/dist/FilterToolbar/SortDropdown/index.d.ts +11 -0
- package/dist/FilterToolbar/SortDropdown/index.js +1 -0
- package/dist/FilterToolbar/SortDropdown/styles.css.css +1 -0
- package/dist/FilterToolbar/SortDropdown/styles.css.d.ts +4 -0
- package/dist/FilterToolbar/SortDropdown/styles.css.js +1 -0
- package/dist/FilterToolbar/Toolbar.css +1 -0
- package/dist/FilterToolbar/Toolbar.d.ts +20 -0
- package/dist/FilterToolbar/Toolbar.js +1 -0
- package/dist/FilterToolbar/ToolbarProvider.d.ts +33 -0
- package/dist/FilterToolbar/ToolbarProvider.js +1 -0
- package/dist/FilterToolbar/index.css +1 -0
- package/dist/FilterToolbar/index.d.ts +9 -0
- package/dist/FilterToolbar/index.js +1 -0
- package/dist/FilterToolbar/styles.css.css +1 -0
- package/dist/FilterToolbar/styles.css.d.ts +4 -0
- package/dist/FilterToolbar/styles.css.js +1 -0
- package/dist/FilterView/ContentArea/index.css +1 -0
- package/dist/FilterView/ContentArea/index.d.ts +9 -0
- package/dist/FilterView/ContentArea/index.js +1 -0
- package/dist/FilterView/ContentArea/styles.css.d.ts +5 -0
- package/dist/FilterView/ContentArea/styles.css.js +1 -0
- package/dist/FilterView/FilterView.css +1 -0
- package/dist/FilterView/FilterView.d.ts +54 -0
- package/dist/FilterView/FilterView.js +1 -0
- package/dist/FilterView/FilterViewProvider.d.ts +12 -0
- package/dist/FilterView/FilterViewProvider.js +1 -0
- package/dist/FilterView/NoResults/index.css +1 -0
- package/dist/FilterView/NoResults/index.d.ts +7 -0
- package/dist/FilterView/NoResults/index.js +1 -0
- package/dist/FilterView/NoResults/styles.css.css +1 -0
- package/dist/FilterView/NoResults/styles.css.d.ts +4 -0
- package/dist/FilterView/NoResults/styles.css.js +1 -0
- package/dist/FilterView/Pagination/index.css +1 -0
- package/dist/FilterView/Pagination/index.d.ts +18 -0
- package/dist/FilterView/Pagination/index.js +1 -0
- package/dist/FilterView/Pagination/styles.css.css +1 -0
- package/dist/FilterView/Pagination/styles.css.d.ts +4 -0
- package/dist/FilterView/Pagination/styles.css.js +1 -0
- package/dist/FilterView/Pagination/usePagination.d.ts +12 -0
- package/dist/FilterView/Pagination/usePagination.js +1 -0
- package/dist/FilterView/ResultCount/index.css +1 -0
- package/dist/FilterView/ResultCount/index.d.ts +6 -0
- package/dist/FilterView/ResultCount/index.js +1 -0
- package/dist/FilterView/ResultCount/styles.css.css +1 -0
- package/dist/FilterView/ResultCount/styles.css.d.ts +4 -0
- package/dist/FilterView/ResultCount/styles.css.js +1 -0
- package/dist/FilterView/index.css +1 -0
- package/dist/FilterView/index.d.ts +4 -0
- package/dist/FilterView/index.js +1 -0
- package/dist/FilterView/useResultCount.d.ts +2 -0
- package/dist/FilterView/useResultCount.js +1 -0
- package/dist/FormattedContent.css +1 -0
- package/dist/FormattedContent.d.ts +21 -0
- package/dist/FormattedContent.js +1 -0
- package/dist/Grid/index.css +1 -0
- package/dist/Grid/index.d.ts +11 -0
- package/dist/Grid/index.js +1 -0
- package/dist/Grid/styles.css.css +1 -0
- package/dist/Grid/styles.css.d.ts +9 -0
- package/dist/Grid/styles.css.js +1 -0
- package/dist/GridBase/index.css +1 -0
- package/dist/GridBase/index.d.ts +16 -0
- package/dist/GridBase/index.js +1 -0
- package/dist/GridBase/styles.css.css +1 -0
- package/dist/GridBase/styles.css.d.ts +7 -0
- package/dist/GridBase/styles.css.js +1 -0
- package/dist/HelpLinks/index.css +1 -0
- package/dist/HelpLinks/index.d.ts +34 -0
- package/dist/HelpLinks/index.js +1 -0
- package/dist/HelpLinks/styles.css.css +1 -0
- package/dist/HelpLinks/styles.css.d.ts +8 -0
- package/dist/HelpLinks/styles.css.js +1 -0
- package/dist/Hero/index.css +1 -0
- package/dist/Hero/index.d.ts +42 -0
- package/dist/Hero/index.js +1 -0
- package/dist/Hero/styles.css.css +1 -0
- package/dist/Hero/styles.css.d.ts +22 -0
- package/dist/Hero/styles.css.js +1 -0
- package/dist/Icon/index.d.ts +11 -0
- package/dist/Icon/index.js +1 -0
- package/dist/Icon/styles.css.d.ts +6 -0
- package/dist/Icon/styles.css.js +1 -0
- package/dist/ImageProvider.d.ts +4 -0
- package/dist/ImageProvider.js +1 -0
- package/dist/Impact/index.css +1 -0
- package/dist/Impact/index.d.ts +9 -0
- package/dist/Impact/index.js +1 -0
- package/dist/Impact/styles.css.css +1 -0
- package/dist/Impact/styles.css.d.ts +8 -0
- package/dist/Impact/styles.css.js +1 -0
- package/dist/Impacts.css +1 -0
- package/dist/Impacts.d.ts +7 -0
- package/dist/Impacts.js +1 -0
- package/dist/IsomorphicSuspense.d.ts +4 -0
- package/dist/IsomorphicSuspense.js +1 -0
- package/dist/Label/index.css +1 -0
- package/dist/Label/index.d.ts +12 -0
- package/dist/Label/index.js +1 -0
- package/dist/Label/styles.css.css +1 -0
- package/dist/Label/styles.css.d.ts +6 -0
- package/dist/Label/styles.css.js +1 -0
- package/dist/Link/index.css +1 -0
- package/dist/Link/index.d.ts +9 -0
- package/dist/Link/index.js +1 -0
- package/dist/Link/styles.css.css +1 -0
- package/dist/Link/styles.css.d.ts +9 -0
- package/dist/Link/styles.css.js +1 -0
- package/dist/LinkBase/index.d.ts +8 -0
- package/dist/LinkBase/index.js +1 -0
- package/dist/LinkButton.d.ts +7 -0
- package/dist/LinkButton.js +1 -0
- package/dist/LinkProvider.d.ts +4 -0
- package/dist/LinkProvider.js +1 -0
- package/dist/LinkText/index.css +1 -0
- package/dist/LinkText/index.d.ts +22 -0
- package/dist/LinkText/index.js +1 -0
- package/dist/LinkText/styles.css.css +1 -0
- package/dist/LinkText/styles.css.d.ts +8 -0
- package/dist/LinkText/styles.css.js +1 -0
- package/dist/Links/index.css +1 -0
- package/dist/Links/index.d.ts +6 -0
- package/dist/Links/index.js +1 -0
- package/dist/Links/styles.css.css +1 -0
- package/dist/Links/styles.css.d.ts +4 -0
- package/dist/Links/styles.css.js +1 -0
- package/dist/List/ListItem.d.ts +8 -0
- package/dist/List/ListItem.js +1 -0
- package/dist/List/OrderedList.d.ts +4 -0
- package/dist/List/OrderedList.js +1 -0
- package/dist/List/UnorderedList.d.ts +7 -0
- package/dist/List/UnorderedList.js +1 -0
- package/dist/List/index.d.ts +3 -0
- package/dist/List/index.js +1 -0
- package/dist/Markdown/AnchorHeading/index.css +1 -0
- package/dist/Markdown/AnchorHeading/index.css.css +1 -0
- package/dist/Markdown/AnchorHeading/index.css.d.ts +17 -0
- package/dist/Markdown/AnchorHeading/index.css.js +1 -0
- package/dist/Markdown/AnchorHeading/index.d.ts +10 -0
- package/dist/Markdown/AnchorHeading/index.js +1 -0
- package/dist/Markdown/BlockQuote/index.css.d.ts +5 -0
- package/dist/Markdown/BlockQuote/index.css.js +1 -0
- package/dist/Markdown/BlockQuote/index.d.ts +4 -0
- package/dist/Markdown/BlockQuote/index.js +1 -0
- package/dist/Markdown/Heading.d.ts +8 -0
- package/dist/Markdown/Heading.js +1 -0
- package/dist/Markdown/InlineCode.d.ts +4 -0
- package/dist/Markdown/InlineCode.js +1 -0
- package/dist/Markdown/Link.css +1 -0
- package/dist/Markdown/Link.d.ts +6 -0
- package/dist/Markdown/Link.js +1 -0
- package/dist/Markdown/Pre/index.css +1 -0
- package/dist/Markdown/Pre/index.css.css +1 -0
- package/dist/Markdown/Pre/index.css.d.ts +7 -0
- package/dist/Markdown/Pre/index.css.js +1 -0
- package/dist/Markdown/Pre/index.d.ts +22 -0
- package/dist/Markdown/Pre/index.js +1 -0
- package/dist/Markdown/Table.d.ts +4 -0
- package/dist/Markdown/Table.js +1 -0
- package/dist/Markdown/Tbody.d.ts +4 -0
- package/dist/Markdown/Tbody.js +1 -0
- package/dist/Markdown/Td.d.ts +4 -0
- package/dist/Markdown/Td.js +1 -0
- package/dist/Markdown/Th.d.ts +4 -0
- package/dist/Markdown/Th.js +1 -0
- package/dist/Markdown/Thead.d.ts +4 -0
- package/dist/Markdown/Thead.js +1 -0
- package/dist/Markdown/ThematicBreak/index.css.d.ts +4 -0
- package/dist/Markdown/ThematicBreak/index.css.js +1 -0
- package/dist/Markdown/ThematicBreak/index.d.ts +4 -0
- package/dist/Markdown/ThematicBreak/index.js +1 -0
- package/dist/Markdown/Tr.d.ts +4 -0
- package/dist/Markdown/Tr.js +1 -0
- package/dist/Markdown/index.css +1 -0
- package/dist/Markdown/index.d.ts +172 -0
- package/dist/Markdown/index.js +1 -0
- package/dist/Markdown/markdownElements.css +1 -0
- package/dist/Markdown/markdownElements.d.ts +33 -0
- package/dist/Markdown/markdownElements.js +1 -0
- package/dist/Markdown/withMarkdownSpacing/index.d.ts +10 -0
- package/dist/Markdown/withMarkdownSpacing/index.js +1 -0
- package/dist/Markdown/withMarkdownSpacing/styles.css.d.ts +6 -0
- package/dist/Markdown/withMarkdownSpacing/styles.css.js +1 -0
- package/dist/PageFilterView/index.css +1 -0
- package/dist/PageFilterView/index.d.ts +12 -0
- package/dist/PageFilterView/index.js +1 -0
- package/dist/PageFilterView/styles.css.d.ts +4 -0
- package/dist/PageFilterView/styles.css.js +1 -0
- package/dist/ReactLive/index.css +1 -0
- package/dist/ReactLive/index.d.ts +11 -0
- package/dist/ReactLive/index.js +1 -0
- package/dist/ReactLive/styles.css.css +1 -0
- package/dist/ReactLive/styles.css.d.ts +8 -0
- package/dist/ReactLive/styles.css.js +1 -0
- package/dist/SecondaryNavbar/index.css +1 -0
- package/dist/SecondaryNavbar/index.d.ts +11 -0
- package/dist/SecondaryNavbar/index.js +1 -0
- package/dist/SecondaryNavbar/styles.css.css +1 -0
- package/dist/SecondaryNavbar/styles.css.d.ts +9 -0
- package/dist/SecondaryNavbar/styles.css.js +1 -0
- package/dist/SectionHeading/index.d.ts +10 -0
- package/dist/SectionHeading/index.js +1 -0
- package/dist/SectionHeading/styles.css.d.ts +4 -0
- package/dist/SectionHeading/styles.css.js +1 -0
- package/dist/StickyHeader/index.css +1 -0
- package/dist/StickyHeader/index.d.ts +8 -0
- package/dist/StickyHeader/index.js +1 -0
- package/dist/StickyHeader/styles.css.css +1 -0
- package/dist/StickyHeader/styles.css.d.ts +5 -0
- package/dist/StickyHeader/styles.css.js +1 -0
- package/dist/Story/index.css +1 -0
- package/dist/Story/index.d.ts +12 -0
- package/dist/Story/index.js +1 -0
- package/dist/Story/styles.css.css +1 -0
- package/dist/Story/styles.css.d.ts +10 -0
- package/dist/Story/styles.css.js +1 -0
- package/dist/Tabs/index.css +1 -0
- package/dist/Tabs/index.d.ts +9 -0
- package/dist/Tabs/index.js +1 -0
- package/dist/Tabs/styles.css.d.ts +4 -0
- package/dist/Tabs/styles.css.js +1 -0
- package/dist/TabsBase/TabsBase.css +1 -0
- package/dist/TabsBase/TabsBase.d.ts +19 -0
- package/dist/TabsBase/TabsBase.js +1 -0
- package/dist/TabsBase/TabsButton.css +1 -0
- package/dist/TabsBase/TabsButton.d.ts +15 -0
- package/dist/TabsBase/TabsButton.js +1 -0
- package/dist/TabsBase/TabsLink.css +1 -0
- package/dist/TabsBase/TabsLink.d.ts +15 -0
- package/dist/TabsBase/TabsLink.js +1 -0
- package/dist/TabsBase/TabsMenuButton.css +1 -0
- package/dist/TabsBase/TabsMenuButton.d.ts +20 -0
- package/dist/TabsBase/TabsMenuButton.js +1 -0
- package/dist/TabsBase/index.css +1 -0
- package/dist/TabsBase/index.d.ts +4 -0
- package/dist/TabsBase/index.js +1 -0
- package/dist/TabsBase/styles.css.css +1 -0
- package/dist/TabsBase/styles.css.d.ts +11 -0
- package/dist/TabsBase/styles.css.js +1 -0
- package/dist/TabsBase/tabsMenuButton.css.css +1 -0
- package/dist/TabsBase/tabsMenuButton.css.d.ts +4 -0
- package/dist/TabsBase/tabsMenuButton.css.js +1 -0
- package/dist/Tag/index.css +1 -0
- package/dist/Tag/index.d.ts +27 -0
- package/dist/Tag/index.js +1 -0
- package/dist/Tag/styles.css.css +1 -0
- package/dist/Tag/styles.css.d.ts +23 -0
- package/dist/Tag/styles.css.js +1 -0
- package/dist/ThemeProvider.d.ts +4 -0
- package/dist/ThemeProvider.js +1 -0
- package/dist/TileBase/TileBase.css +1 -0
- package/dist/TileBase/TileBase.d.ts +42 -0
- package/dist/TileBase/TileBase.js +1 -0
- package/dist/TileBase/TileStateProvider.d.ts +13 -0
- package/dist/TileBase/TileStateProvider.js +1 -0
- package/dist/TileBase/index.css +1 -0
- package/dist/TileBase/index.d.ts +2 -0
- package/dist/TileBase/index.js +1 -0
- package/dist/TileBase/styles.css.css +1 -0
- package/dist/TileBase/styles.css.d.ts +8 -0
- package/dist/TileBase/styles.css.js +1 -0
- package/dist/TileButton/index.css +1 -0
- package/dist/TileButton/index.d.ts +6 -0
- package/dist/TileButton/index.js +1 -0
- package/dist/TileContent/index.css +1 -0
- package/dist/TileContent/index.d.ts +38 -0
- package/dist/TileContent/index.js +1 -0
- package/dist/TileContent/styles.css.css +1 -0
- package/dist/TileContent/styles.css.d.ts +75 -0
- package/dist/TileContent/styles.css.js +1 -0
- package/dist/TileContentLabel/index.css +1 -0
- package/dist/TileContentLabel/index.d.ts +11 -0
- package/dist/TileContentLabel/index.js +1 -0
- package/dist/TileContentLabel/styles.css.css +1 -0
- package/dist/TileContentLabel/styles.css.d.ts +7 -0
- package/dist/TileContentLabel/styles.css.js +1 -0
- package/dist/TileLink/index.css +1 -0
- package/dist/TileLink/index.d.ts +8 -0
- package/dist/TileLink/index.js +1 -0
- package/dist/TileLink/styles.css.css +1 -0
- package/dist/TileLink/styles.css.d.ts +4 -0
- package/dist/TileLink/styles.css.js +1 -0
- package/dist/Tiles.css +1 -0
- package/dist/Tiles.d.ts +8 -0
- package/dist/Tiles.js +1 -0
- package/dist/Typography/Typography.d.ts +14 -0
- package/dist/Typography/Typography.js +1 -0
- package/dist/Typography/index.d.ts +40 -0
- package/dist/Typography/index.js +1 -0
- package/dist/Typography/withStyledTypography.d.ts +3 -0
- package/dist/Typography/withStyledTypography.js +1 -0
- package/dist/VideoPlayer/index.css +1 -0
- package/dist/VideoPlayer/index.d.ts +6 -0
- package/dist/VideoPlayer/index.js +1 -0
- package/dist/VideoPlayer/styles.css.css +1 -0
- package/dist/VideoPlayer/styles.css.d.ts +10 -0
- package/dist/VideoPlayer/styles.css.js +1 -0
- package/dist/ViewStack/View.d.ts +14 -0
- package/dist/ViewStack/View.js +1 -0
- package/dist/ViewStack/ViewStack.d.ts +11 -0
- package/dist/ViewStack/ViewStack.js +1 -0
- package/dist/ViewStack/index.d.ts +2 -0
- package/dist/ViewStack/index.js +1 -0
- package/dist/canUseDOM.d.ts +1 -0
- package/dist/canUseDOM.js +1 -0
- package/dist/chunk-25XBJ4GK.js +1 -0
- package/dist/chunk-2NB3GP4B.js +1 -0
- package/dist/chunk-2O36BNKY.js +1 -0
- package/dist/chunk-2U6FNIPR.js +1 -0
- package/dist/chunk-32QG4S7S.js +1 -0
- package/dist/chunk-335WBXRV.js +1 -0
- package/dist/chunk-3DFTW2GM.js +1 -0
- package/dist/chunk-3EEX4X6D.js +1 -0
- package/dist/chunk-3G3LBCJD.js +1 -0
- package/dist/chunk-3I6IJ7AC.js +1 -0
- package/dist/chunk-3R4QYYQ4.js +1 -0
- package/dist/chunk-42WFLOC6.js +1 -0
- package/dist/chunk-44RW6ETD.js +1 -0
- package/dist/chunk-4FUNGARO.js +1 -0
- package/dist/chunk-4TSVFJ7M.js +1 -0
- package/dist/chunk-4W6HT3B4.js +1 -0
- package/dist/chunk-4YSU7BCU.js +1 -0
- package/dist/chunk-5KK5475X.js +1 -0
- package/dist/chunk-5NKWGBQZ.js +1 -0
- package/dist/chunk-5YW35QBU.js +1 -0
- package/dist/chunk-6464SWDK.js +1 -0
- package/dist/chunk-6AIEZTB5.js +1 -0
- package/dist/chunk-6CR2UHLM.js +1 -0
- package/dist/chunk-6CXFXGTP.js +1 -0
- package/dist/chunk-7AKIGM4A.js +1 -0
- package/dist/chunk-7I7I5ZGV.js +1 -0
- package/dist/chunk-7IOACAEU.js +1 -0
- package/dist/chunk-7OWUJHAN.js +1 -0
- package/dist/chunk-7W3FVLQG.js +1 -0
- package/dist/chunk-A2A5KLET.js +1 -0
- package/dist/chunk-A4KE4JRL.js +1 -0
- package/dist/chunk-A62MVD3W.js +1 -0
- package/dist/chunk-APRWJQYV.js +1 -0
- package/dist/chunk-AU72IVSS.js +1 -0
- package/dist/chunk-AUVYPVBP.js +1 -0
- package/dist/chunk-AZUFJ6VU.js +1 -0
- package/dist/chunk-BKMMLJQN.js +1 -0
- package/dist/chunk-BUHTZKLI.js +1 -0
- package/dist/chunk-BUSQA7KE.js +0 -0
- package/dist/chunk-BX52WGFN.js +1 -0
- package/dist/chunk-BZH4QVWW.js +1 -0
- package/dist/chunk-C252LIKT.js +1 -0
- package/dist/chunk-C3QGODZV.js +1 -0
- package/dist/chunk-C4ELYUSC.js +1 -0
- package/dist/chunk-CBP5ZGTJ.js +1 -0
- package/dist/chunk-CFOEPTHY.js +1 -0
- package/dist/chunk-CIOSZ7JO.js +1 -0
- package/dist/chunk-CK3NOI7N.js +1 -0
- package/dist/chunk-CQEDEYK6.js +2 -0
- package/dist/chunk-CUOEKXWQ.js +1 -0
- package/dist/chunk-CV3R74GK.js +1 -0
- package/dist/chunk-CXU4OJZ3.js +1 -0
- package/dist/chunk-DCD762X4.js +1 -0
- package/dist/chunk-DHXA4PUS.js +1 -0
- package/dist/chunk-ERIQ6SXC.js +1 -0
- package/dist/chunk-ESKTX4WM.js +1 -0
- package/dist/chunk-ETW7NOZJ.js +1 -0
- package/dist/chunk-F6WIBZNK.js +1 -0
- package/dist/chunk-FABGH4NH.js +1 -0
- package/dist/chunk-FFDB7JSZ.js +1 -0
- package/dist/chunk-FLVGGPW5.js +1 -0
- package/dist/chunk-FRUOJ2YQ.js +0 -0
- package/dist/chunk-FUUUTGVL.js +1 -0
- package/dist/chunk-G34NQQSQ.js +1 -0
- package/dist/chunk-GHEBJRO3.js +1 -0
- package/dist/chunk-GMHXY34G.js +1 -0
- package/dist/chunk-GPRXLXR2.js +1 -0
- package/dist/chunk-GTXJRRSA.js +1 -0
- package/dist/chunk-GVHGTOUS.js +1 -0
- package/dist/chunk-H5M4JDKA.js +1 -0
- package/dist/chunk-HAMMUBE7.js +1 -0
- package/dist/chunk-HF7NXOFI.js +1 -0
- package/dist/chunk-HJSXLVTZ.js +1 -0
- package/dist/chunk-HLJ5MAIP.js +1 -0
- package/dist/chunk-HNI5K3YJ.js +1 -0
- package/dist/chunk-HOA24BWP.js +1 -0
- package/dist/chunk-HQWNNYBM.js +1 -0
- package/dist/chunk-I3NDLK5N.js +1 -0
- package/dist/chunk-ICZ6LXV7.js +1 -0
- package/dist/chunk-IK3UKYGT.js +1 -0
- package/dist/chunk-IZFGOF3C.js +1 -0
- package/dist/chunk-JHZOWA4W.js +1 -0
- package/dist/chunk-JRWXQ7TA.js +1 -0
- package/dist/chunk-JS3RLRUL.js +1 -0
- package/dist/chunk-JUKXV3LK.js +1 -0
- package/dist/chunk-KD2IHEOH.js +1 -0
- package/dist/chunk-KOETTUXE.js +1 -0
- package/dist/chunk-L6NJFBPJ.js +1 -0
- package/dist/chunk-L7XSP7BP.js +1 -0
- package/dist/chunk-LBEE3FLI.js +1 -0
- package/dist/chunk-LOTVJGGJ.js +1 -0
- package/dist/chunk-LTWUYEB2.js +1 -0
- package/dist/chunk-M3BQLI4H.js +1 -0
- package/dist/chunk-NOS6FYP4.js +1 -0
- package/dist/chunk-NOY2XYXH.js +1 -0
- package/dist/chunk-NYQMI5LM.js +1 -0
- package/dist/chunk-O5II25ZN.js +1 -0
- package/dist/chunk-OK36TZP7.js +1 -0
- package/dist/chunk-OUSBK7KV.js +1 -0
- package/dist/chunk-PLGWF3DG.js +0 -0
- package/dist/chunk-PWDUR2QJ.js +1 -0
- package/dist/chunk-PY55ZUDE.js +1 -0
- package/dist/chunk-QBWO3SO2.js +1 -0
- package/dist/chunk-QHVCEJD6.js +0 -0
- package/dist/chunk-QMVHSNCH.js +1 -0
- package/dist/chunk-QQRJOQDC.js +1 -0
- package/dist/chunk-QRA62OWQ.js +1 -0
- package/dist/chunk-QYR5BEHF.js +1 -0
- package/dist/chunk-R7XNHFZS.js +1 -0
- package/dist/chunk-RNOFZ325.js +1 -0
- package/dist/chunk-ROI2EB7Y.js +1 -0
- package/dist/chunk-RRJ67KJR.js +0 -0
- package/dist/chunk-RRPJQPHW.js +1 -0
- package/dist/chunk-RRVEX5DC.js +1 -0
- package/dist/chunk-SF7SQKVF.js +1 -0
- package/dist/chunk-SMWRJVC7.js +1 -0
- package/dist/chunk-SS3XUXOS.js +1 -0
- package/dist/chunk-ST4P6AN6.js +0 -0
- package/dist/chunk-T4DAKHDZ.js +1 -0
- package/dist/chunk-TBLQRXJC.js +1 -0
- package/dist/chunk-THZHIJBQ.js +1 -0
- package/dist/chunk-TIPUHCNI.js +1 -0
- package/dist/chunk-U2VVI5ES.js +1 -0
- package/dist/chunk-U3L7YGSF.js +1 -0
- package/dist/chunk-UBSU7YCQ.js +1 -0
- package/dist/chunk-UKE34O57.js +1 -0
- package/dist/chunk-UOERMLXJ.js +1 -0
- package/dist/chunk-UP2CLMRV.js +1 -0
- package/dist/chunk-US5YZNOL.js +1 -0
- package/dist/chunk-UTPSJF3Y.js +1 -0
- package/dist/chunk-V7R4OTS2.js +1 -0
- package/dist/chunk-VBJRZIXT.js +1 -0
- package/dist/chunk-VCZHUY2M.js +1 -0
- package/dist/chunk-VIQKAFRZ.js +1 -0
- package/dist/chunk-VROQRL3K.js +1 -0
- package/dist/chunk-VSQXG6EA.js +1 -0
- package/dist/chunk-WRJSODGW.js +1 -0
- package/dist/chunk-WWCF4CKB.js +1 -0
- package/dist/chunk-XKXLMQA4.js +1 -0
- package/dist/chunk-XTLNI7GW.js +1 -0
- package/dist/chunk-XYZBCTIZ.js +1 -0
- package/dist/chunk-Y3XHSJV3.js +1 -0
- package/dist/chunk-Y5JERV2O.js +1 -0
- package/dist/chunk-Y7KOFQIK.js +1 -0
- package/dist/chunk-YHDUTISD.js +1 -0
- package/dist/chunk-YKXHKTDJ.js +1 -0
- package/dist/chunk-YQLFGUES.js +1 -0
- package/dist/chunk-YS422YJI.js +1 -0
- package/dist/chunk-YTOBFDVN.js +1 -0
- package/dist/chunk-YX3L5Z7J.js +1 -0
- package/dist/chunk-Z4OMWKVB.js +1 -0
- package/dist/chunk-Z5AJM7RV.js +0 -0
- package/dist/chunk-ZAUKECSD.js +1 -0
- package/dist/chunk-ZBHN343P.js +0 -0
- package/dist/chunk-ZEDS62HY.js +1 -0
- package/dist/chunk-ZMAGNUVU.js +1 -0
- package/dist/common/types/index.d.ts +8 -0
- package/dist/common/types/index.js +0 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +1 -0
- package/dist/labs/Diagram.d.ts +6 -0
- package/dist/labs/Sitemap/drawTree.d.ts +74 -0
- package/dist/labs/Sitemap/index.d.ts +10 -0
- package/dist/labs/Sitemap/styles.css.d.ts +6 -0
- package/dist/labs/index.d.ts +9 -0
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +47 -0
- package/dist/styles.js +1 -0
- package/dist/useBreakpoint.d.ts +1 -0
- package/dist/useBreakpoint.js +1 -0
- package/dist/useLockBodyScroll.d.ts +1 -0
- package/dist/useLockBodyScroll.js +1 -0
- package/dist/useSize.d.ts +4 -0
- package/dist/useSize.js +1 -0
- package/dist/useSpacing.d.ts +2 -0
- package/dist/useSpacing.js +1 -0
- package/dist/utils/hasProtocol.d.ts +1 -0
- package/dist/utils/hasProtocol.js +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist-labs/Diagram.js +1 -0
- package/dist-labs/Sitemap/drawTree.js +1 -0
- package/dist-labs/Sitemap/index.css +1 -0
- package/dist-labs/Sitemap/index.js +1 -0
- package/dist-labs/Sitemap/styles.css.css +1 -0
- package/dist-labs/Sitemap/styles.css.js +1 -0
- package/dist-labs/index.css +1 -0
- package/dist-labs/index.js +1 -0
- package/package.json +58 -0
- package/src/Accordion/__tests__/index.test.tsx +82 -0
- package/src/Accordion/index.tsx +75 -0
- package/src/Accordion/styles.css.ts +16 -0
- package/src/AudioPlayer/__tests__/index.test.tsx +19 -0
- package/src/AudioPlayer/index.tsx +167 -0
- package/src/AudioPlayer/styles.css.ts +64 -0
- package/src/BrowserOnly.tsx +17 -0
- package/src/Button.tsx +18 -0
- package/src/Callout/__tests__/index.test.tsx +102 -0
- package/src/Callout/index.tsx +62 -0
- package/src/Callout/styles.css.ts +77 -0
- package/src/Card/index.tsx +35 -0
- package/src/Card/styles.css.ts +23 -0
- package/src/Cards.tsx +25 -0
- package/src/ColorModeProvider.tsx +70 -0
- package/src/ComponentExample/index.tsx +23 -0
- package/src/ComponentExample/styles.css.ts +25 -0
- package/src/DataTable.tsx +114 -0
- package/src/EditionFilterView/__tests__/index.test.tsx +49 -0
- package/src/EditionFilterView/index.tsx +113 -0
- package/src/EditionFilterView/styles.css.ts +8 -0
- package/src/EditionTileLink/index.tsx +85 -0
- package/src/EditionTileLink/styles.css.ts +95 -0
- package/src/Feature/Feature.tsx +92 -0
- package/src/Feature/FeatureActions/index.tsx +30 -0
- package/src/Feature/FeatureActions/styles.css.ts +15 -0
- package/src/Feature/FeatureContent/index.tsx +30 -0
- package/src/Feature/FeatureContent/styles.css.ts +13 -0
- package/src/Feature/FeatureEyebrow/index.tsx +19 -0
- package/src/Feature/FeatureEyebrow/styles.css.ts +11 -0
- package/src/Feature/FeatureTitle/index.tsx +18 -0
- package/src/Feature/FeatureTitle/styles.css.ts +9 -0
- package/src/Feature/index.tsx +10 -0
- package/src/Feature/styles.css.ts +58 -0
- package/src/Features/index.tsx +33 -0
- package/src/Features/styles.css.ts +10 -0
- package/src/FilterToolbar/ContentArea/index.tsx +14 -0
- package/src/FilterToolbar/ContentArea/styles.css.ts +16 -0
- package/src/FilterToolbar/FilterDropdown/__tests__/index.test.tsx +22 -0
- package/src/FilterToolbar/FilterDropdown/index.tsx +62 -0
- package/src/FilterToolbar/FilterDropdown/styles.css.ts +9 -0
- package/src/FilterToolbar/PillGroup/__tests__/index.test.tsx +26 -0
- package/src/FilterToolbar/PillGroup/index.tsx +33 -0
- package/src/FilterToolbar/PillGroup/styles.css.ts +17 -0
- package/src/FilterToolbar/Search/__tests__/index.test.tsx +34 -0
- package/src/FilterToolbar/Search/index.tsx +33 -0
- package/src/FilterToolbar/Search/styles.css.ts +9 -0
- package/src/FilterToolbar/SortDropdown/__tests__/index.test.tsx +22 -0
- package/src/FilterToolbar/SortDropdown/defaultSort.js +8 -0
- package/src/FilterToolbar/SortDropdown/index.tsx +55 -0
- package/src/FilterToolbar/SortDropdown/styles.css.ts +9 -0
- package/src/FilterToolbar/Toolbar.tsx +41 -0
- package/src/FilterToolbar/ToolbarProvider.tsx +94 -0
- package/src/FilterToolbar/__tests__/Toolbar.test.tsx +127 -0
- package/src/FilterToolbar/__tests__/ToolbarProvider.test.tsx +85 -0
- package/src/FilterToolbar/index.tsx +9 -0
- package/src/FilterToolbar/styles.css.ts +19 -0
- package/src/FilterView/ContentArea/index.tsx +27 -0
- package/src/FilterView/ContentArea/styles.css.ts +16 -0
- package/src/FilterView/FilterView.tsx +205 -0
- package/src/FilterView/FilterViewProvider.tsx +23 -0
- package/src/FilterView/NoResults/index.tsx +19 -0
- package/src/FilterView/NoResults/styles.css.ts +13 -0
- package/src/FilterView/Pagination/index.tsx +38 -0
- package/src/FilterView/Pagination/styles.css.ts +15 -0
- package/src/FilterView/Pagination/usePagination.ts +31 -0
- package/src/FilterView/ResultCount/index.tsx +21 -0
- package/src/FilterView/ResultCount/styles.css.ts +11 -0
- package/src/FilterView/__tests__/index.test.tsx +109 -0
- package/src/FilterView/index.tsx +4 -0
- package/src/FilterView/useResultCount.tsx +8 -0
- package/src/FormattedContent.tsx +75 -0
- package/src/Grid/index.tsx +29 -0
- package/src/Grid/styles.css.ts +13 -0
- package/src/GridBase/index.tsx +60 -0
- package/src/GridBase/styles.css.ts +19 -0
- package/src/HelpLinks/index.tsx +80 -0
- package/src/HelpLinks/styles.css.ts +32 -0
- package/src/Hero/__tests__/index.test.tsx +19 -0
- package/src/Hero/index.tsx +179 -0
- package/src/Hero/styles.css.ts +111 -0
- package/src/Icon/index.tsx +40 -0
- package/src/Icon/styles.css.ts +9 -0
- package/src/ImageProvider.ts +9 -0
- package/src/Impact/index.tsx +36 -0
- package/src/Impact/styles.css.ts +72 -0
- package/src/Impacts.tsx +25 -0
- package/src/IsomorphicSuspense.tsx +9 -0
- package/src/Label/__tests__/index.test.tsx +27 -0
- package/src/Label/index.tsx +52 -0
- package/src/Label/styles.css.ts +14 -0
- package/src/Link/index.tsx +83 -0
- package/src/Link/styles.css.ts +15 -0
- package/src/LinkBase/index.tsx +32 -0
- package/src/LinkButton.tsx +20 -0
- package/src/LinkProvider.ts +9 -0
- package/src/LinkText/index.tsx +121 -0
- package/src/LinkText/styles.css.ts +21 -0
- package/src/Links/index.tsx +18 -0
- package/src/Links/styles.css.ts +13 -0
- package/src/List/ListItem.tsx +31 -0
- package/src/List/OrderedList.tsx +19 -0
- package/src/List/UnorderedList.tsx +35 -0
- package/src/List/index.tsx +3 -0
- package/src/Markdown/AnchorHeading/__tests__/index.test.tsx +56 -0
- package/src/Markdown/AnchorHeading/index.css.ts +64 -0
- package/src/Markdown/AnchorHeading/index.tsx +97 -0
- package/src/Markdown/BlockQuote/index.css.ts +6 -0
- package/src/Markdown/BlockQuote/index.tsx +18 -0
- package/src/Markdown/Heading.tsx +39 -0
- package/src/Markdown/InlineCode.tsx +9 -0
- package/src/Markdown/Link.tsx +11 -0
- package/src/Markdown/Pre/index.css.ts +35 -0
- package/src/Markdown/Pre/index.tsx +148 -0
- package/src/Markdown/Table.tsx +11 -0
- package/src/Markdown/Tbody.tsx +9 -0
- package/src/Markdown/Td.tsx +9 -0
- package/src/Markdown/Th.tsx +9 -0
- package/src/Markdown/Thead.tsx +9 -0
- package/src/Markdown/ThematicBreak/index.css.ts +5 -0
- package/src/Markdown/ThematicBreak/index.tsx +10 -0
- package/src/Markdown/Tr.tsx +9 -0
- package/src/Markdown/__tests__/Heading.test.tsx +56 -0
- package/src/Markdown/index.tsx +208 -0
- package/src/Markdown/markdownElements.tsx +51 -0
- package/src/Markdown/withMarkdownSpacing/index.tsx +33 -0
- package/src/Markdown/withMarkdownSpacing/styles.css.ts +7 -0
- package/src/PageFilterView/index.tsx +86 -0
- package/src/PageFilterView/styles.css.ts +8 -0
- package/src/ReactLive/index.tsx +71 -0
- package/src/ReactLive/styles.css.ts +28 -0
- package/src/SecondaryNavbar/index.tsx +55 -0
- package/src/SecondaryNavbar/styles.css.ts +27 -0
- package/src/SectionHeading/__tests__/index.test.tsx +20 -0
- package/src/SectionHeading/index.tsx +33 -0
- package/src/SectionHeading/styles.css.ts +15 -0
- package/src/StickyHeader/index.tsx +52 -0
- package/src/StickyHeader/styles.css.ts +17 -0
- package/src/Story/index.tsx +70 -0
- package/src/Story/styles.css.ts +37 -0
- package/src/Tabs/index.tsx +65 -0
- package/src/Tabs/styles.css.ts +7 -0
- package/src/TabsBase/TabsBase.tsx +89 -0
- package/src/TabsBase/TabsButton.tsx +26 -0
- package/src/TabsBase/TabsLink.tsx +26 -0
- package/src/TabsBase/TabsMenuButton.tsx +37 -0
- package/src/TabsBase/index.ts +4 -0
- package/src/TabsBase/styles.css.ts +64 -0
- package/src/TabsBase/tabsMenuButton.css.ts +25 -0
- package/src/Tag/__tests__/index.test.tsx +58 -0
- package/src/Tag/index.tsx +62 -0
- package/src/Tag/styles.css.ts +48 -0
- package/src/ThemeProvider.tsx +21 -0
- package/src/TileBase/TileBase.tsx +159 -0
- package/src/TileBase/TileStateProvider.tsx +52 -0
- package/src/TileBase/index.ts +2 -0
- package/src/TileBase/styles.css.ts +15 -0
- package/src/TileButton/index.tsx +68 -0
- package/src/TileContent/index.tsx +153 -0
- package/src/TileContent/styles.css.ts +229 -0
- package/src/TileContentLabel/index.tsx +74 -0
- package/src/TileContentLabel/styles.css.ts +22 -0
- package/src/TileLink/index.tsx +83 -0
- package/src/TileLink/styles.css.ts +9 -0
- package/src/Tiles.tsx +17 -0
- package/src/Typography/Typography.tsx +22 -0
- package/src/Typography/index.tsx +54 -0
- package/src/Typography/withStyledTypography.tsx +22 -0
- package/src/VideoPlayer/__tests__/index.test.tsx +13 -0
- package/src/VideoPlayer/index.tsx +176 -0
- package/src/VideoPlayer/styles.css.ts +82 -0
- package/src/ViewStack/View.tsx +19 -0
- package/src/ViewStack/ViewStack.tsx +50 -0
- package/src/ViewStack/__tests__/index.test.tsx +86 -0
- package/src/ViewStack/index.tsx +2 -0
- package/src/__tests__/Button.test.tsx +13 -0
- package/src/__tests__/LinkButton.test.tsx +16 -0
- package/src/__tests__/ReactLive.test.tsx +20 -0
- package/src/canUseDOM.ts +5 -0
- package/src/common/types/index.ts +52 -0
- package/src/index.tsx +59 -0
- package/src/labs/Diagram.tsx +26 -0
- package/src/labs/Sitemap/drawTree.ts +163 -0
- package/src/labs/Sitemap/index.tsx +223 -0
- package/src/labs/Sitemap/styles.css.ts +24 -0
- package/src/labs/index.ts +13 -0
- package/src/styles.ts +47 -0
- package/src/useBreakpoint.ts +28 -0
- package/src/useLockBodyScroll.ts +16 -0
- package/src/useSize.ts +32 -0
- package/src/useSpacing.ts +17 -0
- package/src/utils/hasProtocol.ts +1 -0
- package/src/utils/index.ts +1 -0
- package/tsconfig.json +8 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import Highlight, { defaultProps as defaultPrismProps } from 'prism-react-renderer';
|
|
4
|
+
import type { Language } from 'prism-react-renderer';
|
|
5
|
+
import { Icon } from '../../Icon';
|
|
6
|
+
|
|
7
|
+
import { Button } from '../../Button';
|
|
8
|
+
import { Link } from '../../Link';
|
|
9
|
+
import { ReactLive } from '../../ReactLive';
|
|
10
|
+
import { P2 } from '../../Typography';
|
|
11
|
+
import styles from './index.css';
|
|
12
|
+
|
|
13
|
+
export type CodeBlockPropsType = {
|
|
14
|
+
components?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export type CodeBlockMeta = {
|
|
17
|
+
code?: string;
|
|
18
|
+
filename?: string;
|
|
19
|
+
language?: Language;
|
|
20
|
+
live?: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type PreProps = CodeBlockMeta &
|
|
24
|
+
React.HTMLProps<HTMLDivElement> & { CodeBlockProps?: CodeBlockPropsType };
|
|
25
|
+
|
|
26
|
+
const httpPattern = /^((http[s]?):\/\/)/;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Supported syntax:
|
|
30
|
+
*
|
|
31
|
+
* ```jsx live
|
|
32
|
+
* <div>I will be live editable!</div>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export const Pre: React.FC<PreProps> = ({
|
|
36
|
+
children,
|
|
37
|
+
className,
|
|
38
|
+
code: codeProp = '',
|
|
39
|
+
CodeBlockProps,
|
|
40
|
+
filename,
|
|
41
|
+
language: languageProp,
|
|
42
|
+
live,
|
|
43
|
+
...rest
|
|
44
|
+
}) => {
|
|
45
|
+
const preRef = useRef<HTMLPreElement | null>(null);
|
|
46
|
+
const [hovered, setHovered] = useState(false);
|
|
47
|
+
|
|
48
|
+
const handleMouseEnter = () => {
|
|
49
|
+
setHovered(true);
|
|
50
|
+
};
|
|
51
|
+
const handleMouseLeave = () => {
|
|
52
|
+
setHovered(false);
|
|
53
|
+
};
|
|
54
|
+
const handleClickCopy = () => {
|
|
55
|
+
if (preRef.current && preRef.current.textContent) {
|
|
56
|
+
navigator.clipboard.writeText(preRef.current.textContent);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
let code: string | undefined = codeProp.replace(/<br>/g, '\n');
|
|
61
|
+
let language: Language | undefined = languageProp;
|
|
62
|
+
if (children) {
|
|
63
|
+
const codeBlock = (children as React.ReactElement<{ className?: string; children: string }>)
|
|
64
|
+
.props;
|
|
65
|
+
code = codeBlock.children;
|
|
66
|
+
language = codeBlock.className?.replace('language-', '') as Language;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (typeof code !== 'string') {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
let FilenameElement;
|
|
74
|
+
if (!filename) {
|
|
75
|
+
FilenameElement = null;
|
|
76
|
+
} else if (httpPattern.test(filename)) {
|
|
77
|
+
const basename = filename.substring(filename.lastIndexOf('/') + 1);
|
|
78
|
+
FilenameElement = (
|
|
79
|
+
<Link link={filename} variant="component">
|
|
80
|
+
{basename}
|
|
81
|
+
</Link>
|
|
82
|
+
);
|
|
83
|
+
} else {
|
|
84
|
+
FilenameElement = <P2>{filename}</P2>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// If a language other than JSX or TSX is specified, bail out
|
|
88
|
+
const isLive = live && (language === 'tsx' || language === 'jsx');
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<div
|
|
92
|
+
{...rest}
|
|
93
|
+
className={classnames(styles.root, className)}
|
|
94
|
+
onMouseEnter={handleMouseEnter}
|
|
95
|
+
onMouseLeave={handleMouseLeave}
|
|
96
|
+
>
|
|
97
|
+
<div className={styles.filename}>
|
|
98
|
+
{FilenameElement}
|
|
99
|
+
{hovered && (
|
|
100
|
+
<Button className={styles.button} onClick={handleClickCopy}>
|
|
101
|
+
<Icon aria-label="Copy to clipboard" name="copy" />
|
|
102
|
+
</Button>
|
|
103
|
+
)}
|
|
104
|
+
</div>
|
|
105
|
+
<CodeBlock {...CodeBlockProps} code={code} isLive={isLive} language={language} ref={preRef} />
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const CodeBlock = React.memo(
|
|
111
|
+
React.forwardRef<
|
|
112
|
+
HTMLPreElement | null,
|
|
113
|
+
{ isLive?: boolean; code: string; components?: Record<string, unknown>; language?: Language }
|
|
114
|
+
>(({ code, components, isLive = false, language = '' }, ref) =>
|
|
115
|
+
isLive ? (
|
|
116
|
+
<ReactLive className={`language-${language}`} scope={components}>
|
|
117
|
+
{code}
|
|
118
|
+
</ReactLive>
|
|
119
|
+
) : (
|
|
120
|
+
<pre className={classnames(styles.pre, `language-${language}`)} ref={ref}>
|
|
121
|
+
<CodeHighlight code={code} language={language as Language} />
|
|
122
|
+
</pre>
|
|
123
|
+
)
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
const CodeHighlight: React.FC<{ code: string; language: Language }> = function CodeHighlight({
|
|
128
|
+
code,
|
|
129
|
+
language
|
|
130
|
+
}) {
|
|
131
|
+
return (
|
|
132
|
+
<Highlight {...defaultPrismProps} code={code} language={language}>
|
|
133
|
+
{({ tokens, getLineProps, getTokenProps }) => (
|
|
134
|
+
<>
|
|
135
|
+
{tokens.map((line, i) => (
|
|
136
|
+
// eslint-disable-next-line react/jsx-key
|
|
137
|
+
<div {...getLineProps({ line, key: i })} style={{}}>
|
|
138
|
+
{line.map((token, key) => (
|
|
139
|
+
// eslint-disable-next-line react/jsx-key
|
|
140
|
+
<span {...getTokenProps({ token, key })} style={{}} />
|
|
141
|
+
))}
|
|
142
|
+
</div>
|
|
143
|
+
))}
|
|
144
|
+
</>
|
|
145
|
+
)}
|
|
146
|
+
</Highlight>
|
|
147
|
+
);
|
|
148
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { table, tableContainer } from '@jpmorganchase/mosaic-theme';
|
|
4
|
+
|
|
5
|
+
export interface TableProps extends React.HTMLProps<HTMLTableElement> {}
|
|
6
|
+
|
|
7
|
+
export const Table: React.FC<TableProps> = ({ className, ...rest }) => (
|
|
8
|
+
<div className={classnames(className, tableContainer())}>
|
|
9
|
+
<table className={table()} {...rest} />
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { tbody } from '@jpmorganchase/mosaic-theme';
|
|
4
|
+
|
|
5
|
+
export interface TbodyProps extends React.HTMLProps<HTMLTableSectionElement> {}
|
|
6
|
+
|
|
7
|
+
export const Tbody: React.FC<TbodyProps> = ({ className, ...rest }) => (
|
|
8
|
+
<tbody className={classnames(className, tbody())} {...rest} />
|
|
9
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { td } from '@jpmorganchase/mosaic-theme';
|
|
4
|
+
|
|
5
|
+
export interface TdProps extends React.HTMLProps<HTMLTableDataCellElement> {}
|
|
6
|
+
|
|
7
|
+
export const Td: React.FC<TdProps> = ({ className, ...rest }) => (
|
|
8
|
+
<td className={classnames(className, td())} {...rest} />
|
|
9
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { th } from '@jpmorganchase/mosaic-theme';
|
|
4
|
+
|
|
5
|
+
export interface ThProps extends React.HTMLProps<HTMLTableHeaderCellElement> {}
|
|
6
|
+
|
|
7
|
+
export const Th: React.FC<ThProps> = ({ className, ...rest }) => (
|
|
8
|
+
<th className={classnames(className, th())} {...rest} />
|
|
9
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { thead } from '@jpmorganchase/mosaic-theme';
|
|
4
|
+
|
|
5
|
+
export interface TheadProps extends React.HTMLProps<HTMLTableSectionElement> {}
|
|
6
|
+
|
|
7
|
+
export const Thead: React.FC<TheadProps> = ({ className, ...rest }) => (
|
|
8
|
+
<thead className={classnames(className, thead())} {...rest} />
|
|
9
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
|
|
4
|
+
import styles from './index.css';
|
|
5
|
+
|
|
6
|
+
export interface ThematicBreakProps extends React.HTMLProps<HTMLHRElement> {}
|
|
7
|
+
|
|
8
|
+
export const ThematicBreak: React.FC<ThematicBreakProps> = ({ className }) => (
|
|
9
|
+
<hr className={classnames(className, styles.root)} />
|
|
10
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { tr } from '@jpmorganchase/mosaic-theme';
|
|
4
|
+
|
|
5
|
+
export interface TrProps extends React.HTMLProps<HTMLTableRowElement> {}
|
|
6
|
+
|
|
7
|
+
export const Tr: React.FC<TrProps> = ({ className, ...rest }) => (
|
|
8
|
+
<tr className={classnames(className, tr())} {...rest} />
|
|
9
|
+
);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import * as Heading from '../Heading';
|
|
5
|
+
|
|
6
|
+
describe('GIVEN a Heading', () => {
|
|
7
|
+
test('THEN a H0 can be rendered', () => {
|
|
8
|
+
// arrange
|
|
9
|
+
render(<Heading.H0>H0</Heading.H0>);
|
|
10
|
+
// assert
|
|
11
|
+
expect(screen.getByText('H0')).toBeInTheDocument();
|
|
12
|
+
expect(screen.getByRole('heading', { level: 1 })).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
test('THEN a H1 can be rendered', () => {
|
|
15
|
+
// arrange
|
|
16
|
+
render(<Heading.H1>H1</Heading.H1>);
|
|
17
|
+
// assert
|
|
18
|
+
expect(screen.getByText('H1')).toBeInTheDocument();
|
|
19
|
+
expect(screen.getByRole('heading', { level: 1 })).toBeInTheDocument();
|
|
20
|
+
});
|
|
21
|
+
test('THEN a H1 can be rendered', () => {
|
|
22
|
+
// arrange
|
|
23
|
+
render(<Heading.H2>H2</Heading.H2>);
|
|
24
|
+
// assert
|
|
25
|
+
expect(screen.getByText('H2')).toBeInTheDocument();
|
|
26
|
+
expect(screen.getByRole('heading', { level: 2 })).toBeInTheDocument();
|
|
27
|
+
});
|
|
28
|
+
test('THEN a H3 can be rendered', () => {
|
|
29
|
+
// arrange
|
|
30
|
+
render(<Heading.H3>H3</Heading.H3>);
|
|
31
|
+
// assert
|
|
32
|
+
expect(screen.getByText('H3')).toBeInTheDocument();
|
|
33
|
+
expect(screen.getByRole('heading', { level: 3 })).toBeInTheDocument();
|
|
34
|
+
});
|
|
35
|
+
test('THEN a H4 can be rendered', () => {
|
|
36
|
+
// arrange
|
|
37
|
+
render(<Heading.H4>H4</Heading.H4>);
|
|
38
|
+
// assert
|
|
39
|
+
expect(screen.getByText('H4')).toBeInTheDocument();
|
|
40
|
+
expect(screen.getByRole('heading', { level: 4 })).toBeInTheDocument();
|
|
41
|
+
});
|
|
42
|
+
test('THEN a H5 can be rendered', () => {
|
|
43
|
+
// arrange
|
|
44
|
+
render(<Heading.H5>H5</Heading.H5>);
|
|
45
|
+
// assert
|
|
46
|
+
expect(screen.getByText('H5')).toBeInTheDocument();
|
|
47
|
+
expect(screen.getByRole('heading', { level: 5 })).toBeInTheDocument();
|
|
48
|
+
});
|
|
49
|
+
test('THEN a H6 can be rendered', () => {
|
|
50
|
+
// arrange
|
|
51
|
+
render(<Heading.H6>H6</Heading.H6>);
|
|
52
|
+
// assert
|
|
53
|
+
expect(screen.getByText('H6')).toBeInTheDocument();
|
|
54
|
+
expect(screen.getByRole('heading', { level: 6 })).toBeInTheDocument();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
action,
|
|
4
|
+
amount,
|
|
5
|
+
caption,
|
|
6
|
+
eyebrow,
|
|
7
|
+
heading,
|
|
8
|
+
paragraph,
|
|
9
|
+
subtitle,
|
|
10
|
+
watermark
|
|
11
|
+
} from '@jpmorganchase/mosaic-theme';
|
|
12
|
+
import { Icon, IconProps } from '../Icon';
|
|
13
|
+
import { getMarkdownElements } from './markdownElements';
|
|
14
|
+
import { Accordion, AccordionSection, AccordionDetails, AccordionSummary } from '../Accordion';
|
|
15
|
+
import type { AccordionProps } from '../Accordion';
|
|
16
|
+
import { AudioPlayer } from '../AudioPlayer';
|
|
17
|
+
import { Button } from '../Button';
|
|
18
|
+
import { Callout } from '../Callout';
|
|
19
|
+
import type { CalloutProps } from '../Callout';
|
|
20
|
+
import { Card } from '../Card';
|
|
21
|
+
import type { CardProps } from '../Card';
|
|
22
|
+
import { Cards } from '../Cards';
|
|
23
|
+
import type { CardsProps } from '../Cards';
|
|
24
|
+
import { ComponentExample } from '../ComponentExample';
|
|
25
|
+
import type { ComponentExampleProps } from '../ComponentExample';
|
|
26
|
+
import { DataTable } from '../DataTable';
|
|
27
|
+
import type { DataTableProps } from '../DataTable';
|
|
28
|
+
import { Feature, FeatureActions, FeatureContent, FeatureTitle, FeatureEyebrow } from '../Feature';
|
|
29
|
+
import type { FeatureProps } from '../Feature';
|
|
30
|
+
import type { FeaturesProps } from '../Features';
|
|
31
|
+
import { Features } from '../Features';
|
|
32
|
+
import {
|
|
33
|
+
FilterDropdown,
|
|
34
|
+
FilterPillGroup,
|
|
35
|
+
FilterSearch,
|
|
36
|
+
FilterSortDropdown,
|
|
37
|
+
FilterToolbar
|
|
38
|
+
} from '../FilterToolbar';
|
|
39
|
+
import type {
|
|
40
|
+
FilterDropdownProps,
|
|
41
|
+
FilterPillGroupProps,
|
|
42
|
+
FilterSearchProps,
|
|
43
|
+
FilterSortDropdownProps,
|
|
44
|
+
FilterToolbarProps
|
|
45
|
+
} from '../FilterToolbar';
|
|
46
|
+
import { FilterNoResults, FilterResultCount, FilterView } from '../FilterView';
|
|
47
|
+
import type { FilterViewProps, FilterResultCountProps, FilterNoResultsProps } from '../FilterView';
|
|
48
|
+
import { HelpLinks } from '../HelpLinks';
|
|
49
|
+
import type { HelpLinksProps } from '../HelpLinks';
|
|
50
|
+
import { Hero } from '../Hero';
|
|
51
|
+
import { Impact } from '../Impact';
|
|
52
|
+
import type { ImpactProps } from '../Impact';
|
|
53
|
+
import { Impacts } from '../Impacts';
|
|
54
|
+
import type { ImpactsProps } from '../Impacts';
|
|
55
|
+
import { Label } from '../Label';
|
|
56
|
+
import type { LabelProps } from '../Label';
|
|
57
|
+
import { Link } from '../Link';
|
|
58
|
+
import { LinkBase, LinkBaseProps } from '../LinkBase';
|
|
59
|
+
import { LinkText, LinkTextProps } from '../LinkText';
|
|
60
|
+
import { Links } from '../Links';
|
|
61
|
+
import type { LinksProps } from '../Links';
|
|
62
|
+
import { Tag } from '../Tag';
|
|
63
|
+
import type { TagProps } from '../Tag';
|
|
64
|
+
import { EditionFilterView } from '../EditionFilterView';
|
|
65
|
+
import type { EditionTileLinkProps } from '../EditionTileLink';
|
|
66
|
+
import { EditionTileLink } from '../EditionTileLink';
|
|
67
|
+
import { GridBase } from '../GridBase';
|
|
68
|
+
import type { GridBaseProps } from '../GridBase';
|
|
69
|
+
import { Grid } from '../Grid';
|
|
70
|
+
import type { GridProps } from '../Grid';
|
|
71
|
+
import { PageFilterView } from '../PageFilterView';
|
|
72
|
+
import { SecondaryNavbar } from '../SecondaryNavbar';
|
|
73
|
+
import type { SecondaryNavbarProps } from '../SecondaryNavbar';
|
|
74
|
+
import { SectionHeading } from '../SectionHeading';
|
|
75
|
+
import { StickyHeader } from '../StickyHeader';
|
|
76
|
+
import { Story } from '../Story';
|
|
77
|
+
import type { StoryProps } from '../Story';
|
|
78
|
+
import { TabsBase } from '../TabsBase';
|
|
79
|
+
import { Tabs, Tab } from '../Tabs';
|
|
80
|
+
import type { TabsProps } from '../Tabs';
|
|
81
|
+
import { Tiles } from '../Tiles';
|
|
82
|
+
import type { TilesProps } from '../Tiles';
|
|
83
|
+
import { TileBase } from '../TileBase';
|
|
84
|
+
import type { TileBaseProps } from '../TileBase';
|
|
85
|
+
import { TileButton } from '../TileButton';
|
|
86
|
+
import type { TileButtonProps } from '../TileButton';
|
|
87
|
+
import { TileContent } from '../TileContent';
|
|
88
|
+
import type { TileContentProps } from '../TileContent';
|
|
89
|
+
import { TileContentLabel } from '../TileContentLabel';
|
|
90
|
+
import type { TileContentLabelProps } from '../TileContentLabel';
|
|
91
|
+
import { TileLink } from '../TileLink';
|
|
92
|
+
import type { TileLinkProps } from '../TileLink';
|
|
93
|
+
import { VideoPlayer } from '../VideoPlayer';
|
|
94
|
+
import { ViewStack, View } from '../ViewStack';
|
|
95
|
+
import type { ViewStackProps } from '../ViewStack';
|
|
96
|
+
import { withStyledTypography } from '../Typography/withStyledTypography';
|
|
97
|
+
import { withMarkdownSpacing } from './withMarkdownSpacing';
|
|
98
|
+
import { ListItem, OrderedList, UnorderedList } from '../List';
|
|
99
|
+
import type { ListItemProps, OrderedListProps, UnOrderedListProps } from '../List';
|
|
100
|
+
|
|
101
|
+
export { getMarkdownElements } from './markdownElements';
|
|
102
|
+
|
|
103
|
+
export { withMarkdownSpacing } from './withMarkdownSpacing';
|
|
104
|
+
export * from './Pre';
|
|
105
|
+
|
|
106
|
+
const markdownElements = getMarkdownElements();
|
|
107
|
+
export const getMarkdownComponents = () => ({
|
|
108
|
+
Accordion: withMarkdownSpacing<AccordionProps>(Accordion),
|
|
109
|
+
AccordionDetails,
|
|
110
|
+
AccordionSection,
|
|
111
|
+
AccordionSummary,
|
|
112
|
+
AudioPlayer,
|
|
113
|
+
Button,
|
|
114
|
+
Callout: withMarkdownSpacing<CalloutProps>(Callout),
|
|
115
|
+
Card: withMarkdownSpacing<CardProps>(Card),
|
|
116
|
+
Cards: withMarkdownSpacing<CardsProps>(Cards),
|
|
117
|
+
ComponentExample: withMarkdownSpacing<ComponentExampleProps>(ComponentExample),
|
|
118
|
+
DataTable: withMarkdownSpacing<DataTableProps<any> & { ref?: Ref<HTMLTableElement> }>(DataTable),
|
|
119
|
+
EditionFilterView,
|
|
120
|
+
EditionTileLink: withMarkdownSpacing<EditionTileLinkProps>(EditionTileLink),
|
|
121
|
+
Feature: withMarkdownSpacing<FeatureProps>(Feature),
|
|
122
|
+
FeatureActions,
|
|
123
|
+
FeatureContent,
|
|
124
|
+
FeatureEyebrow,
|
|
125
|
+
FeatureTitle,
|
|
126
|
+
Features: withMarkdownSpacing<FeaturesProps>(Features),
|
|
127
|
+
FilterView: withMarkdownSpacing<FilterViewProps<any>>(FilterView),
|
|
128
|
+
FilterDropdown: withMarkdownSpacing<FilterDropdownProps>(FilterDropdown),
|
|
129
|
+
FilterToolbar: withMarkdownSpacing<FilterToolbarProps>(FilterToolbar),
|
|
130
|
+
FilterNoResults: withMarkdownSpacing<FilterNoResultsProps>(FilterNoResults),
|
|
131
|
+
FilterPillGroup: withMarkdownSpacing<FilterPillGroupProps>(FilterPillGroup),
|
|
132
|
+
FilterSortDropdown: withMarkdownSpacing<FilterSortDropdownProps>(FilterSortDropdown),
|
|
133
|
+
FilterSearch: withMarkdownSpacing<FilterSearchProps>(FilterSearch),
|
|
134
|
+
FilterResultCount: withMarkdownSpacing<FilterResultCountProps>(FilterResultCount),
|
|
135
|
+
Grid: withMarkdownSpacing<GridProps>(Grid),
|
|
136
|
+
GridBase: withMarkdownSpacing<GridBaseProps>(GridBase),
|
|
137
|
+
Hero,
|
|
138
|
+
HelpLinks: withMarkdownSpacing<HelpLinksProps>(HelpLinks),
|
|
139
|
+
Icon: withMarkdownSpacing<IconProps>(Icon, 'regular', true),
|
|
140
|
+
Impact: withMarkdownSpacing<ImpactProps>(Impact),
|
|
141
|
+
Impacts: withMarkdownSpacing<ImpactsProps>(Impacts),
|
|
142
|
+
Label: withMarkdownSpacing<LabelProps>(Label),
|
|
143
|
+
Link,
|
|
144
|
+
LinkBase: withMarkdownSpacing<LinkBaseProps>(LinkBase),
|
|
145
|
+
LinkText: withMarkdownSpacing<LinkTextProps>(LinkText),
|
|
146
|
+
Links: withMarkdownSpacing<LinksProps>(Links),
|
|
147
|
+
ListItem: withMarkdownSpacing<ListItemProps>(ListItem),
|
|
148
|
+
OrderedList: withMarkdownSpacing<OrderedListProps>(OrderedList),
|
|
149
|
+
PageFilterView,
|
|
150
|
+
Tag: withMarkdownSpacing<TagProps>(Tag),
|
|
151
|
+
SecondaryNavbar: withMarkdownSpacing<SecondaryNavbarProps>(SecondaryNavbar),
|
|
152
|
+
SectionHeading,
|
|
153
|
+
StickyHeader,
|
|
154
|
+
Story: withMarkdownSpacing<StoryProps>(Story),
|
|
155
|
+
Tabs: withMarkdownSpacing<TabsProps>(Tabs),
|
|
156
|
+
Tab,
|
|
157
|
+
TabsBase,
|
|
158
|
+
Tiles: withMarkdownSpacing<TilesProps>(Tiles),
|
|
159
|
+
TileBase: withMarkdownSpacing<TileBaseProps>(TileBase),
|
|
160
|
+
TileButton: withMarkdownSpacing<TileButtonProps>(TileButton),
|
|
161
|
+
TileContent: withMarkdownSpacing<TileContentProps>(TileContent),
|
|
162
|
+
TileContentLabel: withMarkdownSpacing<TileContentLabelProps>(TileContentLabel),
|
|
163
|
+
TileLink: withMarkdownSpacing<TileLinkProps>(TileLink),
|
|
164
|
+
UnorderedList: withMarkdownSpacing<UnOrderedListProps>(UnorderedList),
|
|
165
|
+
ViewStack: withMarkdownSpacing<ViewStackProps<any>>(ViewStack),
|
|
166
|
+
VideoPlayer,
|
|
167
|
+
View,
|
|
168
|
+
Action1: withStyledTypography(action({ variant: 'action1', context: 'markdown' })),
|
|
169
|
+
Action2: withStyledTypography(action({ variant: 'action2', context: 'markdown' })),
|
|
170
|
+
Action3: withStyledTypography(action({ variant: 'action3', context: 'markdown' })),
|
|
171
|
+
Action4: withStyledTypography(action({ variant: 'action4', context: 'markdown' })),
|
|
172
|
+
Action5: withStyledTypography(action({ variant: 'action5', context: 'markdown' })),
|
|
173
|
+
Action6: withStyledTypography(action({ variant: 'action6', context: 'markdown' })),
|
|
174
|
+
Action7: withStyledTypography(action({ variant: 'action7', context: 'markdown' })),
|
|
175
|
+
Action8: withStyledTypography(action({ variant: 'action8', context: 'markdown' })),
|
|
176
|
+
Caption1: withStyledTypography(caption({ variant: 'caption1', context: 'markdown' })),
|
|
177
|
+
Caption2: withStyledTypography(caption({ variant: 'caption2', context: 'markdown' })),
|
|
178
|
+
Caption3: withStyledTypography(caption({ variant: 'caption3', context: 'markdown' })),
|
|
179
|
+
Caption4: withStyledTypography(caption({ variant: 'caption4', context: 'markdown' })),
|
|
180
|
+
Caption5: withStyledTypography(caption({ variant: 'caption5', context: 'markdown' })),
|
|
181
|
+
Caption6: withStyledTypography(caption({ variant: 'caption6', context: 'markdown' })),
|
|
182
|
+
Hr: markdownElements.hr,
|
|
183
|
+
H0: withStyledTypography(heading({ variant: 'heading0', context: 'markdown' }), 'h1'),
|
|
184
|
+
H1: markdownElements.h1,
|
|
185
|
+
H2: markdownElements.h2,
|
|
186
|
+
H3: markdownElements.h3,
|
|
187
|
+
H4: markdownElements.h4,
|
|
188
|
+
H5: markdownElements.h5,
|
|
189
|
+
H6: markdownElements.h6,
|
|
190
|
+
P1: markdownElements.p,
|
|
191
|
+
P2: withStyledTypography(paragraph({ variant: 'paragraph2', context: 'markdown' })),
|
|
192
|
+
P3: withStyledTypography(paragraph({ variant: 'paragraph3', context: 'markdown' })),
|
|
193
|
+
P4: withStyledTypography(paragraph({ variant: 'paragraph4', context: 'markdown' })),
|
|
194
|
+
P5: withStyledTypography(paragraph({ variant: 'paragraph5', context: 'markdown' })),
|
|
195
|
+
P6: withStyledTypography(paragraph({ variant: 'paragraph6', context: 'markdown' })),
|
|
196
|
+
Subtitle1: withStyledTypography(subtitle({ variant: 'subtitle1', context: 'markdown' })),
|
|
197
|
+
Subtitle2: withStyledTypography(subtitle({ variant: 'subtitle2', context: 'markdown' })),
|
|
198
|
+
Subtitle3: withStyledTypography(subtitle({ variant: 'subtitle3', context: 'markdown' })),
|
|
199
|
+
Subtitle4: withStyledTypography(subtitle({ variant: 'subtitle4', context: 'markdown' })),
|
|
200
|
+
Subtitle5: withStyledTypography(subtitle({ variant: 'subtitle5', context: 'markdown' })),
|
|
201
|
+
Subtitle6: withStyledTypography(subtitle({ variant: 'subtitle6', context: 'markdown' })),
|
|
202
|
+
Amount: withStyledTypography(amount({ context: 'markdown' })),
|
|
203
|
+
Eyebrow: withStyledTypography(eyebrow({ context: 'markdown' })),
|
|
204
|
+
Watermark: withStyledTypography(watermark({ context: 'markdown' })),
|
|
205
|
+
Emphasis: markdownElements.em,
|
|
206
|
+
Strong: markdownElements.strong,
|
|
207
|
+
...markdownElements
|
|
208
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { emphasis, link, paragraph } from '@jpmorganchase/mosaic-theme';
|
|
2
|
+
|
|
3
|
+
import { withAnchorHeading } from './AnchorHeading';
|
|
4
|
+
import { BlockQuote } from './BlockQuote';
|
|
5
|
+
import * as Heading from './Heading';
|
|
6
|
+
import { ListItem, OrderedList, UnorderedList } from '../List';
|
|
7
|
+
import { InlineCode } from './InlineCode';
|
|
8
|
+
import { Link } from './Link';
|
|
9
|
+
import { Pre } from './Pre';
|
|
10
|
+
import { Table } from './Table';
|
|
11
|
+
import { Tbody } from './Tbody';
|
|
12
|
+
import { Thead } from './Thead';
|
|
13
|
+
import { Th } from './Th';
|
|
14
|
+
import { Td } from './Td';
|
|
15
|
+
import { Tr } from './Tr';
|
|
16
|
+
import { withStyledTypography } from '../Typography/withStyledTypography';
|
|
17
|
+
import { withMarkdownSpacing } from './withMarkdownSpacing';
|
|
18
|
+
import { ThematicBreak } from './ThematicBreak';
|
|
19
|
+
|
|
20
|
+
export const getMarkdownElements = () => ({
|
|
21
|
+
a: withMarkdownSpacing(Link, link({ context: 'markdown', variant: 'document' })),
|
|
22
|
+
blockquote: withMarkdownSpacing(BlockQuote),
|
|
23
|
+
ol: withMarkdownSpacing(OrderedList),
|
|
24
|
+
ul: withMarkdownSpacing(UnorderedList),
|
|
25
|
+
li: withMarkdownSpacing(ListItem, 'none'),
|
|
26
|
+
hr: ThematicBreak,
|
|
27
|
+
h1: withAnchorHeading(Heading.H1),
|
|
28
|
+
h2: withAnchorHeading(Heading.H2),
|
|
29
|
+
h3: withAnchorHeading(Heading.H3),
|
|
30
|
+
h4: withAnchorHeading(Heading.H4),
|
|
31
|
+
h5: withAnchorHeading(Heading.H5),
|
|
32
|
+
h6: withAnchorHeading(Heading.H6),
|
|
33
|
+
p: withStyledTypography(paragraph({ variant: 'paragraph2', context: 'markdown' })),
|
|
34
|
+
pre: withMarkdownSpacing(Pre),
|
|
35
|
+
Pre: withMarkdownSpacing(Pre),
|
|
36
|
+
inlineCode: withMarkdownSpacing(InlineCode, 'none'),
|
|
37
|
+
table: withMarkdownSpacing(Table),
|
|
38
|
+
Table: withMarkdownSpacing(Table),
|
|
39
|
+
tbody: withMarkdownSpacing(Tbody, 'none'),
|
|
40
|
+
Tbody: withMarkdownSpacing(Tbody, 'none'),
|
|
41
|
+
thead: withMarkdownSpacing(Thead, 'none'),
|
|
42
|
+
Thead: withMarkdownSpacing(Thead, 'none'),
|
|
43
|
+
th: withMarkdownSpacing(Th, 'none'),
|
|
44
|
+
Th: withMarkdownSpacing(Th, 'none'),
|
|
45
|
+
td: withMarkdownSpacing(Td, 'none'),
|
|
46
|
+
Td: withMarkdownSpacing(Td, 'none'),
|
|
47
|
+
tr: withMarkdownSpacing(Tr, 'none'),
|
|
48
|
+
Tr: withMarkdownSpacing(Tr, 'none'),
|
|
49
|
+
em: withStyledTypography(emphasis({ variant: 'regular', context: 'markdown' }), 'span'),
|
|
50
|
+
strong: withStyledTypography(emphasis({ variant: 'strong', context: 'markdown' }), 'span')
|
|
51
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
4
|
+
|
|
5
|
+
import styles from './styles.css';
|
|
6
|
+
|
|
7
|
+
export interface MarkdownComponentProps {
|
|
8
|
+
/** Additional class name for root class override */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Spacing */
|
|
11
|
+
spacing?: 'none' | 'regular';
|
|
12
|
+
/** Whether element is inline */
|
|
13
|
+
inline?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function withMarkdownSpacing<TProps extends MarkdownComponentProps>(
|
|
17
|
+
Component: React.ComponentType<TProps>,
|
|
18
|
+
spacing = 'regular',
|
|
19
|
+
inline = false
|
|
20
|
+
): React.FC<TProps> {
|
|
21
|
+
const MarkdownComponent: React.FC<TProps> = ({
|
|
22
|
+
className = '',
|
|
23
|
+
spacing: spacingProp,
|
|
24
|
+
...rest
|
|
25
|
+
}) => (
|
|
26
|
+
<Component
|
|
27
|
+
className={classnames(styles[spacingProp || spacing], className, { [styles.inline]: inline })}
|
|
28
|
+
{...(rest as TProps)}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
hoistNonReactStatics(MarkdownComponent, Component);
|
|
32
|
+
return MarkdownComponent;
|
|
33
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { responsiveSprinkles } from '@jpmorganchase/mosaic-theme';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
none: responsiveSprinkles({ marginTop: ['none', 'none', 'none', 'none'] }),
|
|
5
|
+
regular: responsiveSprinkles({ marginTop: ['x6', 'x6', 'x6', 'x6'] }),
|
|
6
|
+
inline: responsiveSprinkles({ paddingLeft: ['x1', 'x1', 'x1', 'x1'] })
|
|
7
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { TileContentLabel } from '../TileContentLabel';
|
|
4
|
+
import { TileLink } from '../TileLink';
|
|
5
|
+
import type { GridItemSize } from '../Grid';
|
|
6
|
+
import type { SortFn } from '../FilterView';
|
|
7
|
+
import { createDefaultSort, FilterResultCount, FilterView } from '../FilterView';
|
|
8
|
+
import { FilterDropdown, FilterSortDropdown } from '../FilterToolbar';
|
|
9
|
+
import styles from './styles.css';
|
|
10
|
+
|
|
11
|
+
const createItemRenderer = (filterKey, filterLabel) => (item, itemIndex) => {
|
|
12
|
+
const { description, name } = item;
|
|
13
|
+
let captionElement;
|
|
14
|
+
if (filterKey) {
|
|
15
|
+
const relatedFilters = Array.isArray(item[filterKey]) ? item[filterKey] : [item[filterKey]];
|
|
16
|
+
captionElement = <TileContentLabel labelItems={relatedFilters} labelName={filterLabel} />;
|
|
17
|
+
}
|
|
18
|
+
return (
|
|
19
|
+
<TileLink
|
|
20
|
+
action={item.action}
|
|
21
|
+
caption={captionElement || null}
|
|
22
|
+
description={description}
|
|
23
|
+
image={item.image}
|
|
24
|
+
key={`${name}-${itemIndex}`}
|
|
25
|
+
link={item.link}
|
|
26
|
+
title={item.name}
|
|
27
|
+
variant="grid"
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type PageFilterViewProps<T> = {
|
|
33
|
+
sortKey?: SortFn<T>;
|
|
34
|
+
view?: T[];
|
|
35
|
+
filterKey?: string;
|
|
36
|
+
filterLabel?: string;
|
|
37
|
+
filterSource?: string[];
|
|
38
|
+
size: GridItemSize;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export function PageFilterView<T>({
|
|
42
|
+
sortKey = createDefaultSort('name'),
|
|
43
|
+
view = [],
|
|
44
|
+
filterKey,
|
|
45
|
+
filterLabel,
|
|
46
|
+
filterSource,
|
|
47
|
+
size = 'small'
|
|
48
|
+
}: PageFilterViewProps<T>) {
|
|
49
|
+
const itemRenderer = createItemRenderer(filterKey, filterLabel);
|
|
50
|
+
let filter;
|
|
51
|
+
if (filterKey) {
|
|
52
|
+
filter = (filterView, filters) =>
|
|
53
|
+
filterView.filter(viewItem => {
|
|
54
|
+
if (filterKey in viewItem === false) {
|
|
55
|
+
console.warn(
|
|
56
|
+
`Trying to filter view with key "${filterKey}" which does not exist on view item`,
|
|
57
|
+
viewItem
|
|
58
|
+
);
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
if (Array.isArray(viewItem[filterKey])) {
|
|
62
|
+
return viewItem[filterKey].some(targetValue => filters.includes(targetValue));
|
|
63
|
+
}
|
|
64
|
+
return filters.includes(viewItem[filterKey]);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<FilterView
|
|
70
|
+
className={styles.root}
|
|
71
|
+
filter={filter}
|
|
72
|
+
itemRenderer={itemRenderer}
|
|
73
|
+
size={size}
|
|
74
|
+
sort={sortKey}
|
|
75
|
+
view={view}
|
|
76
|
+
>
|
|
77
|
+
{filter ? (
|
|
78
|
+
<>
|
|
79
|
+
<FilterResultCount />
|
|
80
|
+
<FilterDropdown source={filterSource} />
|
|
81
|
+
</>
|
|
82
|
+
) : null}
|
|
83
|
+
<FilterSortDropdown />
|
|
84
|
+
</FilterView>
|
|
85
|
+
);
|
|
86
|
+
}
|