@redocly/theme 0.1.7 → 0.1.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/Button/index.d.ts +1 -1
- package/Button/index.js +1 -1
- package/CodeBlock/index.d.ts +1 -1
- package/CodeBlock/index.js +1 -1
- package/CopyButton/index.d.ts +2 -2
- package/CopyButton/index.js +2 -2
- package/Footer/Footer.d.ts +3 -0
- package/Footer/Footer.js +35 -0
- package/Footer/FooterColumn.d.ts +7 -0
- package/Footer/FooterColumn.js +39 -0
- package/Footer/FooterColumns.d.ts +7 -0
- package/Footer/FooterColumns.js +44 -0
- package/Footer/FooterCopyright.d.ts +5 -0
- package/Footer/FooterCopyright.js +30 -0
- package/Footer/index.d.ts +4 -0
- package/Footer/index.js +20 -0
- package/Headings/index.d.ts +1 -1
- package/Headings/index.js +1 -1
- package/JsonViewer/JsonViewer.js +1 -1
- package/JsonViewer/index.d.ts +2 -1
- package/JsonViewer/index.js +2 -1
- package/Layout/PageLayout.d.ts +6 -0
- package/Layout/PageLayout.js +31 -0
- package/Layout/RootLayout.d.ts +7 -0
- package/Layout/RootLayout.js +32 -0
- package/Layout/index.d.ts +2 -0
- package/Layout/index.js +18 -0
- package/Markdown/Admonition.d.ts +9 -0
- package/Markdown/Admonition.js +39 -0
- package/Markdown/CodeSample/CodeSample.d.ts +8 -0
- package/Markdown/CodeSample/CodeSample.js +30 -0
- package/Markdown/CodeSample/index.d.ts +3 -0
- package/Markdown/CodeSample/index.js +19 -0
- package/Markdown/CodeSample/styled.d.ts +5 -0
- package/Markdown/CodeSample/styled.js +109 -0
- package/Markdown/CodeSample/types.d.ts +9 -0
- package/Markdown/CodeSample/types.js +2 -0
- package/Markdown/ContentWrapper.d.ts +5 -0
- package/Markdown/ContentWrapper.js +21 -0
- package/Markdown/Heading.d.ts +5 -0
- package/Markdown/Heading.js +23 -0
- package/Markdown/MarkdownLayout.d.ts +7 -0
- package/Markdown/MarkdownLayout.js +23 -0
- package/Markdown/Mermaid.d.ts +6 -0
- package/Markdown/Mermaid.js +19 -0
- package/Markdown/PageWrapper.d.ts +3 -0
- package/Markdown/PageWrapper.js +15 -0
- package/Markdown/StyledMarkdown.d.ts +8 -0
- package/Markdown/StyledMarkdown.js +54 -0
- package/Markdown/Tabs/Tab.d.ts +8 -0
- package/Markdown/Tabs/Tab.js +35 -0
- package/Markdown/Tabs/Tabs.d.ts +10 -0
- package/Markdown/Tabs/Tabs.js +43 -0
- package/Markdown/Tabs/index.d.ts +2 -0
- package/Markdown/Tabs/index.js +18 -0
- package/Markdown/index.d.ts +9 -0
- package/Markdown/index.js +25 -0
- package/Navbar/Navbar.d.ts +1 -1
- package/Navbar/Navbar.js +9 -3
- package/Navbar/NavbarItem.d.ts +1 -1
- package/Navbar/NavbarItem.js +4 -4
- package/Navbar/NavbarMenu.d.ts +1 -1
- package/Navbar/NavbarMenu.js +8 -4
- package/Navbar/index.d.ts +3 -0
- package/Navbar/index.js +19 -0
- package/NavbarLogo/NavbarLogo.d.ts +6 -0
- package/{Logo/Logo.js → NavbarLogo/NavbarLogo.js} +8 -5
- package/NavbarLogo/index.d.ts +1 -0
- package/NavbarLogo/index.js +17 -0
- package/OperationBadge/OperationBadge.d.ts +5 -0
- package/OperationBadge/OperationBadge.js +15 -0
- package/OperationBadge/index.d.ts +1 -0
- package/OperationBadge/index.js +17 -0
- package/PageNavigation/NextPageLink.d.ts +2 -0
- package/PageNavigation/NextPageLink.js +25 -0
- package/PageNavigation/PageNavigation.d.ts +2 -0
- package/PageNavigation/PageNavigation.js +31 -0
- package/PageNavigation/PreviousPageLink.d.ts +2 -0
- package/PageNavigation/PreviousPageLink.js +25 -0
- package/PageNavigation/index.d.ts +3 -0
- package/PageNavigation/index.js +19 -0
- package/Panel/CodePanel.js +6 -6
- package/Panel/ContentPanel.js +4 -4
- package/Panel/Panel.d.ts +1 -1
- package/Panel/Panel.js +3 -3
- package/Panel/PanelComponent.d.ts +1 -1
- package/Panel/PanelComponent.js +3 -3
- package/Panel/index.d.ts +8 -7
- package/Panel/index.js +8 -7
- package/REAMDE.md +1 -0
- package/SamplesPanelControls/index.d.ts +1 -1
- package/SamplesPanelControls/index.js +1 -1
- package/Search/Autocomplete.d.ts +13 -0
- package/Search/Autocomplete.js +79 -0
- package/Search/ClearIcon.d.ts +2 -0
- package/Search/ClearIcon.js +29 -0
- package/Search/Input.d.ts +3 -0
- package/Search/Input.js +15 -0
- package/Search/Parameters.d.ts +7 -0
- package/Search/Parameters.js +42 -0
- package/Search/Popover.d.ts +3 -0
- package/Search/Popover.js +15 -0
- package/Search/Search.d.ts +2 -0
- package/Search/Search.js +39 -0
- package/Search/SearchIcon.d.ts +2 -0
- package/Search/SearchIcon.js +29 -0
- package/Search/SearchItem.d.ts +7 -0
- package/Search/SearchItem.js +47 -0
- package/Search/index.d.ts +9 -0
- package/Search/index.js +25 -0
- package/Search/utils.d.ts +2 -0
- package/Search/utils.js +21 -0
- package/Sidebar/ApiCallItem.d.ts +8 -0
- package/Sidebar/ApiCallItem.js +35 -0
- package/Sidebar/ArrowBack.d.ts +4 -0
- package/Sidebar/ArrowBack.js +29 -0
- package/Sidebar/BackButton.d.ts +6 -0
- package/Sidebar/BackButton.js +31 -0
- package/Sidebar/Drilldown.d.ts +8 -0
- package/Sidebar/Drilldown.js +46 -0
- package/Sidebar/DrilldownMenu.d.ts +3 -0
- package/Sidebar/DrilldownMenu.js +55 -0
- package/Sidebar/DrilldownMenuItem.d.ts +3 -0
- package/Sidebar/DrilldownMenuItem.js +32 -0
- package/Sidebar/ExternalIcon.d.ts +4 -0
- package/Sidebar/ExternalIcon.js +29 -0
- package/Sidebar/Menu.d.ts +3 -0
- package/Sidebar/Menu.js +15 -0
- package/Sidebar/MenuContainer.d.ts +1 -0
- package/Sidebar/MenuContainer.js +13 -0
- package/Sidebar/MenuGroup.d.ts +9 -0
- package/Sidebar/MenuGroup.js +37 -0
- package/Sidebar/MenuItem.d.ts +3 -0
- package/Sidebar/MenuItem.js +34 -0
- package/Sidebar/MenuItemLabel.d.ts +5 -0
- package/Sidebar/MenuItemLabel.js +19 -0
- package/Sidebar/MenuLink.d.ts +5 -0
- package/Sidebar/MenuLink.js +16 -0
- package/Sidebar/MenuLinkItem.d.ts +3 -0
- package/Sidebar/MenuLinkItem.js +31 -0
- package/Sidebar/MobileSidebarButton.d.ts +5 -0
- package/Sidebar/MobileSidebarButton.js +21 -0
- package/Sidebar/Separator.d.ts +3 -0
- package/Sidebar/Separator.js +32 -0
- package/Sidebar/SeparatorItem.d.ts +5 -0
- package/Sidebar/SeparatorItem.js +14 -0
- package/Sidebar/SeparatorLine.d.ts +3 -0
- package/Sidebar/SeparatorLine.js +15 -0
- package/Sidebar/Sidebar.d.ts +8 -0
- package/Sidebar/Sidebar.js +24 -0
- package/Sidebar/SidebarLayout.d.ts +7 -0
- package/Sidebar/SidebarLayout.js +36 -0
- package/Sidebar/index.d.ts +19 -0
- package/Sidebar/index.js +35 -0
- package/Sidebar/types/DrilldownMenuProps.d.ts +6 -0
- package/Sidebar/types/DrilldownMenuProps.js +2 -0
- package/Sidebar/types/ItemState.d.ts +8 -0
- package/Sidebar/types/ItemState.js +2 -0
- package/Sidebar/types/MenuItemProps.d.ts +5 -0
- package/Sidebar/types/MenuItemProps.js +2 -0
- package/Sidebar/types/MenuStyle.d.ts +3 -0
- package/Sidebar/types/MenuStyle.js +8 -0
- package/Sidebar/types/NavItem.d.ts +26 -0
- package/Sidebar/types/NavItem.js +2 -0
- package/Sidebar/types/index.d.ts +5 -0
- package/Sidebar/types/index.js +21 -0
- package/SidebarLogo/index.d.ts +1 -1
- package/SidebarLogo/index.js +1 -1
- package/SourceCode/SourceCode.js +2 -2
- package/SourceCode/index.d.ts +1 -1
- package/SourceCode/index.js +1 -1
- package/TableOfContent/TableOfContent.d.ts +9 -0
- package/TableOfContent/TableOfContent.js +65 -0
- package/TableOfContent/index.d.ts +1 -0
- package/TableOfContent/index.js +17 -0
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/index.js +1 -1
- package/globalStyle.js +1 -1
- package/hooks/index.d.ts +7 -3
- package/hooks/index.js +7 -3
- package/hooks/useActiveHeading.d.ts +2 -0
- package/hooks/useActiveHeading.js +34 -0
- package/hooks/useActiveSectionId.d.ts +3 -0
- package/hooks/useActiveSectionId.js +49 -0
- package/hooks/useFullHeight.d.ts +2 -0
- package/hooks/useFullHeight.js +47 -0
- package/hooks/useMobileMenu.d.ts +2 -0
- package/hooks/useMobileMenu.js +13 -0
- package/hooks/useNavbarHeight.d.ts +3 -0
- package/hooks/useNavbarHeight.js +20 -0
- package/icons/ShelfIcon/ShelfIcon.js +2 -2
- package/icons/ShelfIcon/index.d.ts +2 -2
- package/icons/ShelfIcon/index.js +1 -1
- package/icons/index.d.ts +1 -1
- package/icons/index.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/mocks/hooks/usePageData.d.ts +5 -0
- package/mocks/hooks/usePageData.js +7 -0
- package/mocks/models.d.ts +3 -0
- package/mocks/models.js +2 -0
- package/mocks/search.d.ts +22 -0
- package/mocks/search.js +13 -0
- package/mocks/types/index.d.ts +1 -0
- package/mocks/types/index.js +2 -0
- package/mocks/usePreloadHistory.d.ts +3 -0
- package/mocks/usePreloadHistory.js +12 -0
- package/package.json +5 -2
- package/src/Button/Button.stories.tsx +2 -2
- package/src/Button/__tests__/Button.test.tsx +1 -1
- package/src/Button/index.ts +1 -1
- package/src/CodeBlock/__tests__/CodeBlock.test.tsx +1 -1
- package/src/CodeBlock/index.ts +1 -1
- package/src/CopyButton/CopyButton.stories.tsx +2 -2
- package/src/CopyButton/CopyButton.tsx +1 -1
- package/src/CopyButton/CopyButtonWrapper.tsx +4 -4
- package/src/CopyButton/__tests__/CopyButton.test.tsx +1 -1
- package/src/CopyButton/__tests__/CopyButtonWrapper.test.tsx +2 -1
- package/src/CopyButton/index.ts +2 -2
- package/src/Footer/Footer.stories.tsx +57 -0
- package/src/Footer/Footer.tsx +31 -0
- package/src/Footer/FooterColumn.tsx +62 -0
- package/src/Footer/FooterColumns.tsx +53 -0
- package/src/Footer/FooterCopyright.tsx +28 -0
- package/src/Footer/__tests__/Footer.test.tsx +55 -0
- package/src/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +253 -0
- package/src/Footer/index.ts +4 -0
- package/src/Headings/Headings.stories.tsx +1 -1
- package/src/Headings/Headings.ts +1 -1
- package/src/Headings/__tests__/Headings.test.tsx +1 -1
- package/src/Headings/index.ts +1 -1
- package/src/JsonViewer/JsonViewer.stories.tsx +2 -2
- package/src/JsonViewer/JsonViewer.tsx +6 -7
- package/src/JsonViewer/__tests__/JsonViewer.test.tsx +2 -1
- package/src/JsonViewer/index.ts +2 -1
- package/src/Layout/PageLayout.tsx +34 -0
- package/src/Layout/RootLayout.tsx +24 -0
- package/src/Layout/__tests__/PageLayout.test.tsx +17 -0
- package/src/Layout/__tests__/RootLayout.test.tsx +17 -0
- package/src/Layout/__tests__/__snapshots__/PageLayout.test.tsx.snap +38 -0
- package/src/Layout/__tests__/__snapshots__/RootLayout.test.tsx.snap +18 -0
- package/src/Layout/index.ts +2 -0
- package/src/Markdown/Admonition.tsx +64 -0
- package/src/Markdown/CodeSample/CodeSample.tsx +39 -0
- package/src/Markdown/CodeSample/index.ts +3 -0
- package/src/Markdown/CodeSample/styled.ts +289 -0
- package/src/Markdown/CodeSample/types.ts +40 -0
- package/src/Markdown/ContentWrapper.tsx +20 -0
- package/src/Markdown/Heading.tsx +38 -0
- package/src/Markdown/MarkdownLayout.tsx +25 -0
- package/src/Markdown/Mermaid.tsx +23 -0
- package/src/Markdown/PageWrapper.tsx +9 -0
- package/src/Markdown/StyledMarkdown.tsx +312 -0
- package/src/Markdown/Tabs/Tab.tsx +37 -0
- package/src/Markdown/Tabs/Tabs.tsx +45 -0
- package/src/Markdown/Tabs/index.ts +2 -0
- package/src/Markdown/index.ts +9 -0
- package/src/Navbar/Navbar.stories.tsx +9 -15
- package/src/Navbar/Navbar.tsx +21 -28
- package/src/Navbar/NavbarItem.tsx +3 -3
- package/src/Navbar/NavbarMenu.tsx +6 -6
- package/src/Navbar/index.ts +3 -0
- package/src/NavbarLogo/NavbarLogo.stories.tsx +20 -0
- package/src/NavbarLogo/NavbarLogo.tsx +24 -0
- package/src/NavbarLogo/__tests__/NavbarLogo.test.tsx +47 -0
- package/src/NavbarLogo/__tests__/__snapshots__/NavbarLogo.test.tsx.snap +38 -0
- package/src/NavbarLogo/index.ts +1 -0
- package/src/OperationBadge/OperationBadge.stories.tsx +35 -0
- package/src/OperationBadge/OperationBadge.ts +59 -0
- package/src/OperationBadge/__tests__/OperationBadge.test.tsx +59 -0
- package/src/OperationBadge/__tests__/__snapshots__/OperationBadge.test.tsx.snap +651 -0
- package/src/OperationBadge/index.ts +1 -0
- package/src/PageNavigation/NextPageLink.tsx +22 -0
- package/src/PageNavigation/PageNavigation.tsx +20 -0
- package/src/PageNavigation/PreviousPageLink.tsx +22 -0
- package/src/PageNavigation/index.ts +3 -0
- package/src/Panel/CodePanel.stories.tsx +1 -2
- package/src/Panel/CodePanel.ts +8 -7
- package/src/Panel/ContentPanel.stories.tsx +1 -2
- package/src/Panel/ContentPanel.ts +5 -6
- package/src/Panel/Panel.stories.tsx +1 -3
- package/src/Panel/Panel.ts +3 -3
- package/src/Panel/PanelComponent.tsx +4 -5
- package/src/Panel/__tests__/CodePanel.test.tsx +1 -1
- package/src/Panel/__tests__/ContentPanel.test.tsx +1 -1
- package/src/Panel/__tests__/Panel.test.tsx +1 -2
- package/src/Panel/__tests__/__snapshots__/CodePanel.test.tsx.snap +8 -8
- package/src/Panel/__tests__/__snapshots__/ContentPanel.test.tsx.snap +22 -22
- package/src/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +16 -16
- package/src/Panel/index.ts +8 -7
- package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +2 -2
- package/src/SamplesPanelControls/SamplesPanelControls.ts +1 -1
- package/src/SamplesPanelControls/index.ts +1 -1
- package/src/Search/Autocomplete.tsx +128 -0
- package/src/Search/ClearIcon.tsx +31 -0
- package/src/Search/Input.tsx +19 -0
- package/src/Search/Parameters.tsx +62 -0
- package/src/Search/Popover.tsx +20 -0
- package/src/Search/Search.tsx +52 -0
- package/src/Search/SearchIcon.tsx +32 -0
- package/src/Search/SearchItem.tsx +85 -0
- package/src/Search/index.ts +9 -0
- package/src/Search/utils.tsx +19 -0
- package/src/Sidebar/ApiCallItem.tsx +33 -0
- package/src/Sidebar/ArrowBack.tsx +22 -0
- package/src/Sidebar/BackButton.tsx +44 -0
- package/src/Sidebar/Drilldown.tsx +46 -0
- package/src/Sidebar/DrilldownMenu.tsx +58 -0
- package/src/Sidebar/DrilldownMenuItem.tsx +40 -0
- package/src/Sidebar/ExternalIcon.tsx +37 -0
- package/src/Sidebar/Menu.tsx +11 -0
- package/src/Sidebar/MenuContainer.tsx +8 -0
- package/src/Sidebar/MenuGroup.tsx +55 -0
- package/src/Sidebar/MenuItem.tsx +25 -0
- package/src/Sidebar/MenuItemLabel.tsx +41 -0
- package/src/Sidebar/MenuLink.tsx +14 -0
- package/src/Sidebar/MenuLinkItem.tsx +24 -0
- package/src/Sidebar/MobileSidebarButton.tsx +44 -0
- package/src/Sidebar/Separator.tsx +17 -0
- package/src/Sidebar/SeparatorItem.tsx +14 -0
- package/src/Sidebar/SeparatorLine.tsx +9 -0
- package/src/Sidebar/Sidebar.tsx +54 -0
- package/src/Sidebar/SidebarLayout.tsx +30 -0
- package/src/Sidebar/index.ts +19 -0
- package/src/Sidebar/types/DrilldownMenuProps.ts +7 -0
- package/src/Sidebar/types/ItemState.ts +9 -0
- package/src/Sidebar/types/MenuItemProps.ts +6 -0
- package/src/Sidebar/types/MenuStyle.ts +4 -0
- package/src/Sidebar/types/NavItem.ts +27 -0
- package/src/Sidebar/types/index.ts +5 -0
- package/src/SidebarLogo/SidebarLogo.stories.tsx +2 -2
- package/src/SidebarLogo/__tests__/SidebarLogo.test.tsx +1 -1
- package/src/SidebarLogo/index.ts +1 -1
- package/src/SourceCode/SourceCode.stories.tsx +2 -2
- package/src/SourceCode/SourceCode.tsx +7 -3
- package/src/SourceCode/__tests__/SourceCode.test.tsx +2 -1
- package/src/SourceCode/index.ts +1 -1
- package/src/TableOfContent/TableOfContent.stories.tsx +39 -0
- package/src/TableOfContent/TableOfContent.tsx +112 -0
- package/src/TableOfContent/index.ts +1 -0
- package/src/Tooltip/Tooltip.stories.tsx +2 -2
- package/src/Tooltip/Tooltip.tsx +1 -1
- package/src/Tooltip/__tests__/Tooltip.test.tsx +1 -1
- package/src/Tooltip/index.ts +1 -1
- package/src/Welcome.stories.mdx +7 -0
- package/src/globalStyle.ts +99 -28
- package/src/hooks/index.ts +7 -3
- package/src/hooks/useActiveHeading.ts +46 -0
- package/src/hooks/useActiveSectionId.ts +53 -0
- package/src/hooks/useFullHeight.ts +47 -0
- package/src/hooks/useMobileMenu.ts +11 -0
- package/src/hooks/useNavbarHeight.ts +24 -0
- package/src/icons/ShelfIcon/ShelfIcon.stories.tsx +1 -1
- package/src/icons/ShelfIcon/ShelfIcon.tsx +1 -1
- package/src/icons/ShelfIcon/__tests__/ShelfIcon.test.tsx +1 -1
- package/src/icons/ShelfIcon/index.ts +2 -2
- package/src/icons/index.ts +1 -1
- package/src/index.ts +2 -0
- package/src/mocks/hooks/usePageData.ts +8 -0
- package/src/mocks/models.ts +3 -0
- package/src/mocks/search.ts +31 -0
- package/src/mocks/types/index.ts +1 -0
- package/src/mocks/usePreloadHistory.ts +9 -0
- package/src/types/portal/index.d.ts +5 -0
- package/src/types/portal/src/client/app/Sidebar/types.d.ts +41 -0
- package/src/types/portal/src/client/app/media-css.d.ts +7 -0
- package/src/types/portal/src/client/styling/default.d.ts +601 -0
- package/src/types/portal/src/client/styling/index.d.ts +10 -0
- package/src/types/portal/src/client/styling/resolve.d.ts +1 -0
- package/src/types/portal/src/server/constants.d.ts +7 -0
- package/src/types/portal/src/server/plugins/markdown/types.d.ts +23 -0
- package/src/types/portal/src/server/plugins/portal-config/types.d.ts +23 -0
- package/src/types/portal/src/server/plugins/types.d.ts +55 -0
- package/src/types/portal/src/server/store.d.ts +53 -0
- package/src/types/portal/src/server/utils/async.d.ts +1 -0
- package/src/types/portal/src/server/utils/content-provider.d.ts +51 -0
- package/src/types/portal/src/server/utils/crypto.d.ts +3 -0
- package/src/types/portal/src/server/utils/fs.d.ts +3 -0
- package/src/types/portal/src/server/utils/index.d.ts +6 -0
- package/src/types/portal/src/server/utils/paths.d.ts +13 -0
- package/src/types/portal/src/server/utils/reporter/formatter.d.ts +11 -0
- package/src/types/portal/src/server/utils/reporter/reporter.d.ts +17 -0
- package/src/types/portal/src/server/utils/yaml.d.ts +1 -0
- package/src/types/portal/src/server/version-store.d.ts +35 -0
- package/src/types/portal/src/shared/constants.d.ts +8 -0
- package/src/types/portal/src/shared/types.d.ts +116 -0
- package/src/types/portal/src/shared/urls.d.ts +8 -0
- package/src/types/portal/src/shared/utils.d.ts +10 -0
- package/src/ui/AlertIcon.tsx +111 -0
- package/src/ui/Arrow.tsx +36 -0
- package/src/ui/Background.tsx +16 -0
- package/src/ui/Box.tsx +39 -0
- package/src/ui/Button.tsx +19 -0
- package/src/ui/Dropdown.tsx +132 -0
- package/src/ui/Flex.tsx +21 -0
- package/src/ui/Jumbotron.tsx +57 -0
- package/src/ui/Tiles/ThinTile.tsx +151 -0
- package/src/ui/Tiles/TileHeader.ts +13 -0
- package/src/ui/Tiles/TileText.tsx +12 -0
- package/src/ui/Tiles/WideTile.tsx +138 -0
- package/src/ui/Tiles/index.ts +4 -0
- package/src/ui/Typography.tsx +167 -0
- package/src/ui/UniversalLink.tsx +100 -0
- package/src/ui/index.tsx +17 -0
- package/src/utils/__tests__/ClipboardService.test.ts +1 -1
- package/src/utils/__tests__/css-variables.test.ts +1 -1
- package/src/utils/__tests__/highlight.test.ts +1 -1
- package/src/utils/__tests__/jsonToHtml.test.ts +1 -1
- package/src/utils/__tests__/media-css.test.ts +1 -1
- package/src/utils/__tests__/theme-helpers.test.ts +1 -1
- package/src/utils/getNavbarElement.ts +10 -0
- package/src/utils/isUrl.ts +42 -0
- package/src/utils/replaceHashInColor.ts +3 -0
- package/ui/AlertIcon.d.ts +10 -0
- package/ui/AlertIcon.js +45 -0
- package/ui/Arrow.d.ts +7 -0
- package/ui/Arrow.js +42 -0
- package/ui/Background.d.ts +7 -0
- package/ui/Background.js +16 -0
- package/ui/Box.d.ts +6 -0
- package/ui/Box.js +16 -0
- package/ui/Button.d.ts +7 -0
- package/ui/Button.js +27 -0
- package/ui/Dropdown.d.ts +8 -0
- package/ui/Dropdown.js +55 -0
- package/ui/Flex.d.ts +10 -0
- package/ui/Flex.js +31 -0
- package/ui/Jumbotron.d.ts +18 -0
- package/ui/Jumbotron.js +44 -0
- package/ui/Tiles/ThinTile.d.ts +21 -0
- package/ui/Tiles/ThinTile.js +98 -0
- package/ui/Tiles/TileHeader.d.ts +5 -0
- package/ui/Tiles/TileHeader.js +15 -0
- package/ui/Tiles/TileText.d.ts +5 -0
- package/ui/Tiles/TileText.js +15 -0
- package/ui/Tiles/WideTile.d.ts +7 -0
- package/ui/Tiles/WideTile.js +93 -0
- package/ui/Tiles/index.d.ts +4 -0
- package/ui/Tiles/index.js +20 -0
- package/ui/Typography.d.ts +110 -0
- package/ui/Typography.js +137 -0
- package/ui/UniversalLink.d.ts +17 -0
- package/ui/UniversalLink.js +62 -0
- package/ui/index.d.ts +14 -0
- package/ui/index.js +34 -0
- package/utils/getNavbarElement.d.ts +1 -0
- package/utils/getNavbarElement.js +14 -0
- package/utils/isUrl.d.ts +12 -0
- package/utils/isUrl.js +36 -0
- package/utils/replaceHashInColor.d.ts +1 -0
- package/utils/replaceHashInColor.js +7 -0
- package/Logo/Logo.d.ts +0 -10
- package/src/Introduction.stories.mdx +0 -7
- package/src/Logo/Logo.tsx +0 -23
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLocation, LinkProps } from 'react-router-dom';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import { isUrl } from '@theme/utils/isUrl';
|
|
6
|
+
import { replaceHashInColor } from '@theme/utils/replaceHashInColor';
|
|
7
|
+
import { Link } from '@portal/Link';
|
|
8
|
+
|
|
9
|
+
const StyledExternalLink = styled.a`
|
|
10
|
+
&.external-url {
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
:after {
|
|
14
|
+
content: '';
|
|
15
|
+
display: inline-block;
|
|
16
|
+
position: absolute;
|
|
17
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath fill='${({
|
|
18
|
+
theme,
|
|
19
|
+
}) =>
|
|
20
|
+
replaceHashInColor(
|
|
21
|
+
theme.colors.text.primary,
|
|
22
|
+
)}' d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E");
|
|
23
|
+
width: 10px;
|
|
24
|
+
height: 10px;
|
|
25
|
+
background-repeat: no-repeat;
|
|
26
|
+
top: 50%;
|
|
27
|
+
right: -15px;
|
|
28
|
+
transform: translateY(-50%);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
// TODO: We're using our own Link component so probably filtering is not necessary here.
|
|
34
|
+
// filter out unnecessary props
|
|
35
|
+
const propsList = [
|
|
36
|
+
'color',
|
|
37
|
+
'size',
|
|
38
|
+
'variant',
|
|
39
|
+
'bgColor',
|
|
40
|
+
'bgImage',
|
|
41
|
+
'disableArrow',
|
|
42
|
+
'withIcon',
|
|
43
|
+
'maxWidth',
|
|
44
|
+
'inversed',
|
|
45
|
+
'transparent',
|
|
46
|
+
'large',
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export const withPropsFilter =
|
|
50
|
+
(filterList: string[]) => (WrappedComponent: React.FunctionComponent) =>
|
|
51
|
+
function WithPropsFilter(props: React.PropsWithChildren<object>): JSX.Element {
|
|
52
|
+
const filteredProps = Object.fromEntries(
|
|
53
|
+
Object.entries(props).filter(([key]) => !filterList.includes(key)),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
return <WrappedComponent {...filteredProps} />;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export interface PortalLinkProps<TState> extends LinkProps<TState> {
|
|
60
|
+
activeClassName?: string;
|
|
61
|
+
activeStyle?: object;
|
|
62
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
63
|
+
partiallyActive?: boolean;
|
|
64
|
+
replace?: boolean;
|
|
65
|
+
state?: TState;
|
|
66
|
+
to: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface UniversalLinkProps extends Partial<PortalLinkProps<object>> {
|
|
70
|
+
external?: boolean;
|
|
71
|
+
ref?: any;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const UniversalLink = withPropsFilter(propsList)((props: UniversalLinkProps) => {
|
|
75
|
+
return (typeof props.to === 'string' && (isUrl(props.to) || props.to.startsWith('mailto:'))) ||
|
|
76
|
+
props.external ? (
|
|
77
|
+
<StyledExternalLink
|
|
78
|
+
style={props.style}
|
|
79
|
+
href={props.to}
|
|
80
|
+
target={props.target || (props.external && '_blank') || '_self'}
|
|
81
|
+
className={`${props.external ? 'external-url' : ''} ${props.className}`}
|
|
82
|
+
rel={props.rel}
|
|
83
|
+
data-cy={`universalLink-${
|
|
84
|
+
typeof props.children === 'string' ? props.children : 'with-nested-jsx'
|
|
85
|
+
}`}
|
|
86
|
+
>
|
|
87
|
+
{props.children}
|
|
88
|
+
</StyledExternalLink>
|
|
89
|
+
) : props.to == null ? (
|
|
90
|
+
<a onClick={props.onClick} className={props.className} style={props.style}>
|
|
91
|
+
{props.children}
|
|
92
|
+
</a>
|
|
93
|
+
) : (
|
|
94
|
+
<Link
|
|
95
|
+
{...props}
|
|
96
|
+
to={props.to}
|
|
97
|
+
state={{ previousPath: useLocation()?.pathname, ...props.state }}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
});
|
package/src/ui/index.tsx
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export * from '@theme/ui/Tiles';
|
|
4
|
+
export * from '@theme/ui/AlertIcon';
|
|
5
|
+
export * from '@theme/ui/Arrow';
|
|
6
|
+
export * from '@theme/ui/Background';
|
|
7
|
+
export * from '@theme/ui/Box';
|
|
8
|
+
export * from '@theme/ui/Button';
|
|
9
|
+
export * from '@theme/ui/Dropdown';
|
|
10
|
+
export * from '@theme/ui/Flex';
|
|
11
|
+
export * from '@theme/ui/Jumbotron';
|
|
12
|
+
export * from '@theme/ui/Typography';
|
|
13
|
+
export * from '@theme/ui/UniversalLink';
|
|
14
|
+
|
|
15
|
+
export const LandingLayout = ({ children }: React.PropsWithChildren<object>): React.ReactNode =>
|
|
16
|
+
children;
|
|
17
|
+
export const EmptyLayout = LandingLayout;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getTypographyCssRulesByComponentName } from '
|
|
1
|
+
import { getTypographyCssRulesByComponentName } from '@theme/utils';
|
|
2
2
|
|
|
3
3
|
describe('getTypographyCssRulesByComponentName', () => {
|
|
4
4
|
it('should return object with defined css variable for component', () => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function getNavbarElement(): HTMLElement | null {
|
|
2
|
+
const navElements = (typeof document !== 'undefined' && document.querySelectorAll('nav')) || [];
|
|
3
|
+
// there can be multiple nav elements (e.g. mobile and non-mobile), let's use the first one with non-zero height
|
|
4
|
+
for (let i = 0; i < navElements.length; i++) {
|
|
5
|
+
if (navElements[i].getBoundingClientRect().height > 1) {
|
|
6
|
+
return navElements[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return navElements[0] || null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RegExps.
|
|
3
|
+
* A URL must match #1 and then at least one of #2/#3.
|
|
4
|
+
* Use two levels of REs to avoid REDOS.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/;
|
|
8
|
+
|
|
9
|
+
const localhostDomainRE = /^localhost[:?\d]*(?:[^:?\d]\S*)?$/;
|
|
10
|
+
const nonLocalhostDomainRE = /^[^\s.]+\.\S{2,}$/;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Loosely validate a URL `string`.
|
|
14
|
+
*
|
|
15
|
+
* @param {String} string
|
|
16
|
+
* @return {Boolean}
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export function isUrl(string: string): boolean {
|
|
20
|
+
if (typeof string !== 'string') {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const match = string.match(protocolAndDomainRE);
|
|
25
|
+
if (!match) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const everythingAfterProtocol = match[1];
|
|
30
|
+
if (!everythingAfterProtocol) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (
|
|
35
|
+
localhostDomainRE.test(everythingAfterProtocol) ||
|
|
36
|
+
nonLocalhostDomainRE.test(everythingAfterProtocol)
|
|
37
|
+
) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IconProps {
|
|
3
|
+
type: 'warning' | 'success' | 'danger' | 'attention' | 'info';
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function Icon({ type, className }: IconProps): JSX.Element;
|
|
7
|
+
export declare const AlertIcon: import("styled-components").StyledComponent<typeof Icon, any, {
|
|
8
|
+
'data-component-name': string;
|
|
9
|
+
}, "data-component-name">;
|
|
10
|
+
export {};
|
package/ui/AlertIcon.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.AlertIcon = void 0;
|
|
22
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
24
|
+
function Icon(_a) {
|
|
25
|
+
var type = _a.type, className = _a.className;
|
|
26
|
+
switch (type) {
|
|
27
|
+
case 'warning':
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("svg", __assign({ className: className, xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0", y: "0", viewBox: "0 0 500.6 500.6", enableBackground: "new 0 0 500.6 500.6" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M250.3 15.1c-132.5 0-239.8 107.2-239.8 239.8 0 132.5 107.2 239.8 239.8 239.8 132.5 0 239.8-107.2 239.8-239.8C490.1 122.3 382.8 15.1 250.3 15.1zM250.3 457.1C138.5 457.1 48 366.7 48 254.8 48 143 138.5 52.5 250.3 52.5c111.8 0 202.3 90.5 202.3 202.3C452.6 366.7 362.1 457.1 250.3 457.1z" }), (0, jsx_runtime_1.jsx)("path", { d: "M250.3 135.8c-10.3 0-18.7 8.4-18.7 18.7v120.6c0 10.3 8.4 18.7 18.7 18.7s18.7-8.4 18.7-18.7V154.5C269 144.2 260.7 135.8 250.3 135.8z" }), (0, jsx_runtime_1.jsx)("circle", { cx: "250.3", cy: "342.1", r: "25.3" })] })));
|
|
29
|
+
case 'success':
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)("svg", __assign({ className: className, xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0", y: "0", viewBox: "0 0 500.6 500.6", enableBackground: "new 0 0 500.6 500.6" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M250.3 490.1c132.5 0 239.8-107.2 239.8-239.8 0-132.5-107.2-239.8-239.8-239.8 -132.5 0-239.8 107.2-239.8 239.8C10.6 382.8 117.8 490.1 250.3 490.1zM250.3 48c111.8 0 202.3 90.5 202.3 202.3 0 111.8-90.5 202.3-202.3 202.3C138.5 452.6 48 362.1 48 250.3 48 138.5 138.5 48 250.3 48z" }), (0, jsx_runtime_1.jsx)("path", { d: "M224.7 349.6c8.5 5.9 20.2 3.8 26.1-4.6L355 195.7c5.9-8.5 3.8-20.2-4.6-26.1s-20.2-3.8-26.1 4.6L220 323.5C214.1 332 216.2 343.7 224.7 349.6z" }), (0, jsx_runtime_1.jsx)("path", { d: "M247.1 346.2c7.3-7.3 7.3-19.2 0-26.5l-55.9-55.9c-7.3-7.3-19.2-7.3-26.5 0s-7.3 19.2 0 26.5l55.9 55.9C228 353.5 239.8 353.5 247.1 346.2z" })] })));
|
|
31
|
+
case 'danger':
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("svg", __assign({ className: className, xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0", y: "0", viewBox: "0 0 500.6 500.6", enableBackground: "new 0 0 500.6 500.6" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M250.3 490.1c132.5 0 239.8-107.2 239.8-239.8 0-132.5-107.2-239.8-239.8-239.8 -132.5 0-239.8 107.2-239.8 239.8C10.6 382.8 117.8 490.1 250.3 490.1zM250.3 48c111.8 0 202.3 90.5 202.3 202.3 0 111.8-90.5 202.3-202.3 202.3C138.5 452.6 48 362.1 48 250.3 48 138.5 138.5 48 250.3 48z" }), (0, jsx_runtime_1.jsx)("path", { d: "M168.4 332.2c7.3 7.3 19.2 7.3 26.5 0l137.3-137.3c7.3-7.3 7.3-19.2 0-26.5 -7.3-7.3-19.2-7.3-26.5 0L168.4 305.7C161.1 313 161.1 324.9 168.4 332.2z" }), (0, jsx_runtime_1.jsx)("path", { d: "M168.4 168.4c-7.3 7.3-7.3 19.2 0 26.5l137.3 137.3c7.3 7.3 19.2 7.3 26.5 0 7.3-7.3 7.3-19.2 0-26.5L194.9 168.4C187.6 161.1 175.7 161.1 168.4 168.4z" })] })));
|
|
33
|
+
case 'attention':
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)("svg", __assign({ className: className, xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0", y: "0", viewBox: "0 0 500.6 500.6", enableBackground: "new 0 0 500.6 500.6" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M250.3 301.8c-8.3 0-15-6.7-15-15V181.9c0-8.3 6.7-15 15-15 8.3 0 15 6.7 15 15v104.9C265.3 295.1 258.6 301.8 250.3 301.8zM483.7 377L297.2 66.1c-21.2-35.3-72.6-35.4-93.8 0L16.9 377c-17.6 29.4 3.6 67.1 38 67.1h390.8C480.1 444.1 501.4 406.4 483.7 377L483.7 377zM445.7 414.1H54.9c-11.2 0-18-12.2-12.3-21.7L229.1 81.5c9.6-16 32.8-16 42.4 0L458 392.4C463.7 401.9 456.9 414.1 445.7 414.1z" }), (0, jsx_runtime_1.jsx)("circle", { cx: "250.3", cy: "339.2", r: "22.5" })] })));
|
|
35
|
+
default:
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("svg", __assign({ className: className, xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0", y: "0", viewBox: "0 0 500.6 500.6", enableBackground: "new 0 0 500.6 500.6" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M250.3 490.7c132.5 0 239.8-107.2 239.8-239.8 0-132.5-107.2-239.8-239.8-239.8 -132.5 0-239.8 107.2-239.8 239.8C10.6 383.5 117.8 490.7 250.3 490.7zM250.3 48.6c111.8 0 202.3 90.5 202.3 202.3 0 111.8-90.5 202.3-202.3 202.3C138.5 453.2 48 362.7 48 250.9 48 139.1 138.5 48.6 250.3 48.6z" }), (0, jsx_runtime_1.jsx)("path", { d: "M250.3 370c10.3 0 18.7-8.4 18.7-18.7V230.6c0-10.3-8.4-18.7-18.7-18.7 -10.3 0-18.7 8.4-18.7 18.7v120.6C231.6 361.6 240 370 250.3 370z" }), (0, jsx_runtime_1.jsx)("circle", { cx: "250.3", cy: "163.7", r: "25.3" })] })));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.AlertIcon = (0, styled_components_1.default)(Icon).attrs(function () { return ({
|
|
40
|
+
'data-component-name': 'ui/AlertIcon',
|
|
41
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: var(--admonition-padding-horizontal);\n top: 50%;\n transform: translateY(-50%);\n width: var(--admonition-icon-size);\n height: var(--admonition-icon-size);\n margin-right: var(--admonition-padding-horizontal);\n flex-shrink: 0;\n\n fill: ", ";\n"], ["\n position: absolute;\n left: var(--admonition-padding-horizontal);\n top: 50%;\n transform: translateY(-50%);\n width: var(--admonition-icon-size);\n height: var(--admonition-icon-size);\n margin-right: var(--admonition-padding-horizontal);\n flex-shrink: 0;\n\n fill: ", ";\n"])), function (_a) {
|
|
42
|
+
var type = _a.type;
|
|
43
|
+
return "var(--admonition-".concat(type, "-icon-color)");
|
|
44
|
+
});
|
|
45
|
+
var templateObject_1;
|
package/ui/Arrow.d.ts
ADDED
package/ui/Arrow.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Arrow = void 0;
|
|
22
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
24
|
+
function directionToTransform(_a) {
|
|
25
|
+
var direction = _a.direction;
|
|
26
|
+
switch (direction) {
|
|
27
|
+
case 'up':
|
|
28
|
+
return 180;
|
|
29
|
+
case 'right':
|
|
30
|
+
return -90;
|
|
31
|
+
case 'left':
|
|
32
|
+
return 90;
|
|
33
|
+
default:
|
|
34
|
+
return 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
var Icon = function (_a) {
|
|
38
|
+
var className = _a.className;
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)("span", __assign({ "data-component-name": "ui/Arrow/Arrow" }, { children: (0, jsx_runtime_1.jsx)("svg", __assign({ fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 7 5", className: className }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M3.5 2.51L5.806.205a.7.7 0 01.99.99l-2.8 2.8a.698.698 0 01-.99 0l-2.8-2.8a.7.7 0 11.99-.99L3.5 2.51z" }) })) })));
|
|
40
|
+
};
|
|
41
|
+
exports.Arrow = (0, styled_components_1.default)(Icon)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: var(--sidebar-chevron-size);\n height: var(--sidebar-chevron-size);\n fill: var(--sidebar-chevron-color);\n transform: rotate(", "deg);\n\n vertical-align: middle;\n"], ["\n width: var(--sidebar-chevron-size);\n height: var(--sidebar-chevron-size);\n fill: var(--sidebar-chevron-color);\n transform: rotate(", "deg);\n\n vertical-align: middle;\n"])), directionToTransform);
|
|
42
|
+
var templateObject_1;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const Background: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
'data-component-name': string;
|
|
3
|
+
} & import("./Box").BoxProps & {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & import("../ui/Flex").FlexProps & {
|
|
6
|
+
'data-component-name': string;
|
|
7
|
+
}, "data-component-name">;
|
package/ui/Background.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.Background = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
var Flex_1 = require("../ui/Flex");
|
|
13
|
+
exports.Background = (0, styled_components_1.default)(Flex_1.Flex).attrs(function () { return ({
|
|
14
|
+
'data-component-name': 'ui/Background',
|
|
15
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: var(--navbar-background-color);\n color: var(--navbar-text-color);\n font-family: var(--h-font-family);\n\n a:not([role='button']),\n a:not([role='button']):hover {\n color: var(--navbar-text-color);\n }\n"], ["\n background: var(--navbar-background-color);\n color: var(--navbar-text-color);\n font-family: var(--h-font-family);\n\n a:not([role='button']),\n a:not([role='button']):hover {\n color: var(--navbar-text-color);\n }\n"])));
|
|
16
|
+
var templateObject_1;
|
package/ui/Box.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SpaceProps, LayoutProps, TextAlignProps, ColorProps, PositionProps, FlexProps, BordersProps } from 'styled-system';
|
|
2
|
+
export interface BoxProps extends SpaceProps, LayoutProps, PositionProps, FlexProps, TextAlignProps, ColorProps, BordersProps {
|
|
3
|
+
}
|
|
4
|
+
export declare const Box: import("styled-components").StyledComponent<"div", any, {
|
|
5
|
+
'data-component-name': string;
|
|
6
|
+
} & BoxProps, "data-component-name">;
|
package/ui/Box.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.Box = void 0;
|
|
11
|
+
var styled_system_1 = require("styled-system");
|
|
12
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
|
+
exports.Box = styled_components_1.default.div.attrs(function () { return ({
|
|
14
|
+
'data-component-name': 'ui/Box',
|
|
15
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: 100%;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n max-width: 100%;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), styled_system_1.space, styled_system_1.layout, styled_system_1.position, styled_system_1.flex, styled_system_1.textAlign, styled_system_1.color, styled_system_1.border);
|
|
16
|
+
var templateObject_1;
|
package/ui/Button.d.ts
ADDED
package/ui/Button.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Button = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var Button_1 = require("../Button");
|
|
17
|
+
var Link_1 = require("../mocks/Link");
|
|
18
|
+
var StyledButtonAsLink = Button_1.Button.withComponent(Link_1.Link);
|
|
19
|
+
function Button(props) {
|
|
20
|
+
if (props.to) {
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(StyledButtonAsLink, __assign({}, props, { role: "button", "data-component-name": "ui/Button" }));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(Button_1.Button, __assign({}, props, { role: "button", "data-component-name": "ui/Button" })));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.Button = Button;
|
package/ui/Dropdown.d.ts
ADDED
package/ui/Dropdown.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Dropdown = void 0;
|
|
22
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
var react_1 = require("react");
|
|
24
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
25
|
+
var Link_1 = require("../mocks/Link");
|
|
26
|
+
var Icon = function () { return ((0, jsx_runtime_1.jsx)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, { children: (0, jsx_runtime_1.jsx)("polyline", { points: "6 9 12 15 18 9" }) }))); };
|
|
27
|
+
var DropDownContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);\n"], ["\n position: relative;\n padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);\n"])));
|
|
28
|
+
var DropDownHeader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: #fff;\n padding: 8px 10px;\n border-radius: 4px;\n border: 1px solid #e4e7eb;\n font-weight: 600;\n color: var(--color-content);\n background: var(--color-secondary-300);\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: #fff;\n padding: 8px 10px;\n border-radius: 4px;\n border: 1px solid #e4e7eb;\n font-weight: 600;\n color: var(--color-content);\n background: var(--color-secondary-300);\n"])));
|
|
29
|
+
var DropDownList = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n background: var(--color-secondary-300);\n margin: 2px 20px 0 20px;\n padding: 0;\n border-radius: 4px;\n border: 1px solid rgba(38, 50, 56, 0.2);\n z-index: 9999;\n left: 0;\n right: 0;\n"], ["\n position: absolute;\n background: var(--color-secondary-300);\n margin: 2px 20px 0 20px;\n padding: 0;\n border-radius: 4px;\n border: 1px solid rgba(38, 50, 56, 0.2);\n z-index: 9999;\n left: 0;\n right: 0;\n"])));
|
|
30
|
+
var IconWrapper = styled_components_1.default.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n transition: transform 0.2s;\n display: inline-block;\n font-size: 0;\n &.active {\n transform: rotate(-180deg);\n }\n"], ["\n transition: transform 0.2s;\n display: inline-block;\n font-size: 0;\n &.active {\n transform: rotate(-180deg);\n }\n"])));
|
|
31
|
+
var ListItem = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: #fff;\n padding: 0.4em 10px;\n font-size: 1em;\n color: var(--color-content);\n cursor: pointer;\n &:hover {\n background-color: rgba(38, 50, 56, 0.12);\n }\n &.active {\n background-color: rgba(0, 0, 0, 0.05);\n }\n"], ["\n background-color: #fff;\n padding: 0.4em 10px;\n font-size: 1em;\n color: var(--color-content);\n cursor: pointer;\n &:hover {\n background-color: rgba(38, 50, 56, 0.12);\n }\n &.active {\n background-color: rgba(0, 0, 0, 0.05);\n }\n"])));
|
|
32
|
+
var DropDownLink = (0, styled_components_1.default)(Link_1.Link)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: block;\n text-decoration: none;\n color: var(--color-content);\n"], ["\n display: block;\n text-decoration: none;\n color: var(--color-content);\n"])));
|
|
33
|
+
function Dropdown(_a) {
|
|
34
|
+
var items = _a.items, activeItem = _a.activeItem;
|
|
35
|
+
var ref = (0, react_1.useRef)(null);
|
|
36
|
+
var _b = (0, react_1.useState)(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
37
|
+
var toggling = function () { return setIsOpen(!isOpen); };
|
|
38
|
+
(0, react_1.useEffect)(function () {
|
|
39
|
+
var checkIfClickedOutside = function (e) {
|
|
40
|
+
if (!(e.target instanceof HTMLElement)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (isOpen && ref.current && !ref.current.contains(e.target)) {
|
|
44
|
+
setIsOpen(false);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
document.addEventListener('mousedown', checkIfClickedOutside);
|
|
48
|
+
return function () {
|
|
49
|
+
document.removeEventListener('mousedown', checkIfClickedOutside);
|
|
50
|
+
};
|
|
51
|
+
}, [isOpen]);
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(DropDownContainer, __assign({ ref: ref, "data-component-name": "ui/Dropdown" }, { children: [(0, jsx_runtime_1.jsxs)(DropDownHeader, __assign({ onClick: toggling }, { children: [(activeItem === null || activeItem === void 0 ? void 0 : activeItem.label) || activeItem.version, (0, jsx_runtime_1.jsx)(IconWrapper, __assign({ className: isOpen ? 'active' : '' }, { children: (0, jsx_runtime_1.jsx)(Icon, {}) }))] })), isOpen && ((0, jsx_runtime_1.jsx)(DropDownList, { children: items.map(function (item) { return ((0, jsx_runtime_1.jsx)(ListItem, __assign({ className: activeItem.version === item.version ? 'active' : '', onClick: toggling }, { children: (0, jsx_runtime_1.jsx)(DropDownLink, __assign({ to: (item === null || item === void 0 ? void 0 : item.link) || '#' }, { children: (item === null || item === void 0 ? void 0 : item.label) || item.version })) }), (item === null || item === void 0 ? void 0 : item.link) + (item === null || item === void 0 ? void 0 : item.version))); }) }))] })));
|
|
53
|
+
}
|
|
54
|
+
exports.Dropdown = Dropdown;
|
|
55
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
package/ui/Flex.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlexboxProps, WidthProps } from 'styled-system';
|
|
3
|
+
export interface FlexProps extends FlexboxProps, WidthProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const Flex: import("styled-components").StyledComponent<"div", any, {
|
|
6
|
+
'data-component-name': string;
|
|
7
|
+
} & import("../ui/Box").BoxProps & {
|
|
8
|
+
'data-component-name': string;
|
|
9
|
+
} & FlexProps, "data-component-name">;
|
|
10
|
+
export declare function FlexSection(props: React.PropsWithChildren<FlexProps>): JSX.Element;
|
package/ui/Flex.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.FlexSection = exports.Flex = void 0;
|
|
22
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
24
|
+
var styled_system_1 = require("styled-system");
|
|
25
|
+
var Box_1 = require("../ui/Box");
|
|
26
|
+
exports.Flex = (0, styled_components_1.default)(Box_1.Box).attrs({ 'data-component-name': 'ui/Flex' })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n ", "\n ", "\n"], ["\n display: flex;\n ", "\n ", "\n"])), styled_system_1.flexbox, styled_system_1.width);
|
|
27
|
+
function FlexSection(props) {
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(exports.Flex, __assign({}, props, { width: props.width || { xs: '90%', large: 910 } }, { children: props.children })));
|
|
29
|
+
}
|
|
30
|
+
exports.FlexSection = FlexSection;
|
|
31
|
+
var templateObject_1;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const Jumbotron: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
'data-component-name': string;
|
|
3
|
+
} & import("./Box").BoxProps & {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & import("./Flex").FlexProps & {
|
|
6
|
+
'data-component-name': string;
|
|
7
|
+
} & {
|
|
8
|
+
'data-component-name': string;
|
|
9
|
+
} & {
|
|
10
|
+
pt?: string | undefined;
|
|
11
|
+
pb?: string | undefined;
|
|
12
|
+
pl?: string | undefined;
|
|
13
|
+
pr?: string | undefined;
|
|
14
|
+
bgImage?: string | undefined;
|
|
15
|
+
bgColor?: string | undefined;
|
|
16
|
+
parallaxEffect?: boolean | undefined;
|
|
17
|
+
textColor?: string | undefined;
|
|
18
|
+
}, "data-component-name">;
|
package/ui/Jumbotron.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.Jumbotron = void 0;
|
|
11
|
+
var styled_system_1 = require("styled-system");
|
|
12
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
|
+
var Typography_1 = require("../ui/Typography");
|
|
14
|
+
var Background_1 = require("../ui/Background");
|
|
15
|
+
exports.Jumbotron = (0, styled_components_1.default)(Background_1.Background).attrs(function () { return ({
|
|
16
|
+
'data-component-name': 'ui/Jumbotron',
|
|
17
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n ", ";\n ", ";\n ", ";\n ", "\n ", ", ", " {\n color: ", ";\n text-align: center;\n padding: 0;\n }\n h1 {\n font-size: 3.5em;\n line-height: 1.2;\n font-weight: var(--font-weight-bold);\n margin: 1.75em 0 0.5em 0;\n }\n h2 {\n font-size: 1.875em;\n line-height: 1;\n font-weight: var(--font-weight-regular);\n margin: 0;\n margin-bottom: 2em;\n }\n"], ["\n flex-direction: column;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n ", ";\n ", ";\n ", ";\n ", "\n ", ", ", " {\n color: ", ";\n text-align: center;\n padding: 0;\n }\n h1 {\n font-size: 3.5em;\n line-height: 1.2;\n font-weight: var(--font-weight-bold);\n margin: 1.75em 0 0.5em 0;\n }\n h2 {\n font-size: 1.875em;\n line-height: 1;\n font-weight: var(--font-weight-regular);\n margin: 0;\n margin-bottom: 2em;\n }\n"])), function (_a) {
|
|
18
|
+
var pt = _a.pt;
|
|
19
|
+
return pt || '0';
|
|
20
|
+
}, function (_a) {
|
|
21
|
+
var pb = _a.pb;
|
|
22
|
+
return pb || '8em';
|
|
23
|
+
}, function (_a) {
|
|
24
|
+
var pl = _a.pl;
|
|
25
|
+
return pl || '0';
|
|
26
|
+
}, function (_a) {
|
|
27
|
+
var pr = _a.pr;
|
|
28
|
+
return pr || '0';
|
|
29
|
+
}, function (_a) {
|
|
30
|
+
var bgColor = _a.bgColor;
|
|
31
|
+
return bgColor && "background: ".concat(bgColor);
|
|
32
|
+
}, function (_a) {
|
|
33
|
+
var bgImage = _a.bgImage, bgColor = _a.bgColor;
|
|
34
|
+
return bgImage &&
|
|
35
|
+
"\n background: ".concat(bgColor || 'var(--color-content)', " url(").concat(bgImage, ");\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ");
|
|
36
|
+
}, function (_a) {
|
|
37
|
+
var parallaxEffect = _a.parallaxEffect;
|
|
38
|
+
return parallaxEffect &&
|
|
39
|
+
"\n background-attachment: scroll, fixed;\n ";
|
|
40
|
+
}, styled_system_1.space, Typography_1.H1, Typography_1.H2, function (_a) {
|
|
41
|
+
var textColor = _a.textColor;
|
|
42
|
+
return textColor || 'var(--navbar-text-color)';
|
|
43
|
+
});
|
|
44
|
+
var templateObject_1;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component, CSSProperties } from 'react';
|
|
2
|
+
declare type TextAlign = 'left' | 'right' | 'center' | 'justify';
|
|
3
|
+
export interface TileProps {
|
|
4
|
+
header?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
children?: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
target?: string;
|
|
9
|
+
headerAlign?: TextAlign;
|
|
10
|
+
textAlign?: TextAlign;
|
|
11
|
+
bgColor?: string;
|
|
12
|
+
bgImage?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
maxWidth?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class ThinTile extends Component<TileProps> {
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export {};
|