@redocly/theme 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/ApiOnboarding/AppCustomAttributes.js +10 -0
- package/lib/components/Button/Button.js +156 -0
- package/lib/components/Button/index.d.ts +1 -0
- package/lib/components/Button/index.js +18 -0
- package/lib/components/Cards/Card.d.ts +8 -0
- package/lib/components/Cards/Card.js +36 -0
- package/lib/components/Cards/index.d.ts +2 -0
- package/lib/components/Cards/index.js +19 -0
- package/lib/components/Catalog/Catalog.d.ts +8 -0
- package/lib/components/Catalog/Catalog.js +167 -0
- package/lib/components/Catalog/CatalogCard.d.ts +5 -0
- package/lib/components/Catalog/CatalogCard.js +113 -0
- package/lib/components/Catalog/useCatalog.d.ts +3 -0
- package/lib/components/Catalog/useCatalog.js +241 -0
- package/lib/components/CodeBlock/CodeBlock.js +103 -0
- package/lib/components/CodeBlock/index.d.ts +1 -0
- package/lib/components/CodeBlock/index.js +18 -0
- package/lib/components/CodeSample/CodeSample.js +217 -0
- package/lib/components/CodeSample/index.d.ts +1 -0
- package/lib/components/CodeSample/index.js +18 -0
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +81 -0
- package/lib/components/ColorModeSwitcher/index.d.ts +1 -0
- package/lib/components/ColorModeSwitcher/index.js +18 -0
- package/lib/components/CopyButton/CopyButton.js +54 -0
- package/lib/components/CopyButton/CopyButtonWrapper.d.ts +11 -0
- package/lib/components/CopyButton/CopyButtonWrapper.js +53 -0
- package/lib/components/CopyButton/index.d.ts +2 -0
- package/lib/components/CopyButton/index.js +19 -0
- package/lib/components/EditPageButton/EditPageButton.js +36 -0
- package/lib/components/EditPageButton/index.d.ts +1 -0
- package/lib/components/EditPageButton/index.js +18 -0
- package/lib/components/Feedback/Comment.d.ts +3 -0
- package/lib/components/Feedback/Comment.js +93 -0
- package/lib/components/Feedback/Feedback.d.ts +5 -0
- package/lib/components/Feedback/Feedback.js +54 -0
- package/lib/components/Feedback/Rating.d.ts +3 -0
- package/lib/components/Feedback/Rating.js +82 -0
- package/lib/components/Feedback/Reasons.d.ts +3 -0
- package/lib/components/Feedback/Reasons.js +85 -0
- package/lib/components/Feedback/ReportDialog.d.ts +3 -0
- package/lib/components/Feedback/ReportDialog.js +64 -0
- package/lib/components/Feedback/Sentiment.d.ts +3 -0
- package/lib/components/Feedback/Sentiment.js +79 -0
- package/lib/components/Feedback/index.d.ts +8 -0
- package/lib/components/Feedback/index.js +33 -0
- package/lib/components/Feedback/types.d.ts +76 -0
- package/lib/components/Filter/Filter.d.ts +5 -0
- package/lib/components/Filter/Filter.js +86 -0
- package/lib/components/Filter/index.d.ts +1 -0
- package/lib/components/Filter/index.js +18 -0
- package/lib/components/Footer/CustomFooter.d.ts +7 -0
- package/lib/components/Footer/CustomFooter.js +35 -0
- package/lib/components/Footer/CustomFooterNavItem.d.ts +7 -0
- package/lib/components/Footer/CustomFooterNavItem.js +33 -0
- package/lib/components/Footer/Footer.d.ts +9 -0
- package/lib/components/Footer/Footer.js +40 -0
- package/lib/components/Footer/FooterColumn.d.ts +7 -0
- package/lib/components/Footer/FooterColumn.js +54 -0
- package/lib/components/Footer/FooterColumns.d.ts +9 -0
- package/lib/components/Footer/FooterColumns.js +44 -0
- package/lib/components/Footer/FooterCopyright.d.ts +7 -0
- package/lib/components/Footer/index.d.ts +4 -0
- package/lib/components/Footer/index.js +21 -0
- package/lib/components/JsonViewer/JsonViewer.js +240 -0
- package/lib/components/JsonViewer/index.d.ts +1 -0
- package/lib/components/JsonViewer/index.js +18 -0
- package/lib/components/LastUpdated/LastUpdated.js +75 -0
- package/lib/components/Markdown/Admonition.js +56 -0
- package/lib/components/Markdown/Heading.js +48 -0
- package/lib/components/Markdown/MarkdownLayout.d.ts +18 -0
- package/lib/components/Markdown/MarkdownLayout.js +40 -0
- package/lib/components/Markdown/MarkdownWrapper.js +394 -0
- package/lib/components/Markdown/index.d.ts +9 -0
- package/lib/components/Markdown/index.js +26 -0
- package/lib/components/Menu/Menu.d.ts +10 -0
- package/lib/components/Menu/Menu.js +28 -0
- package/lib/components/Menu/MenuContainer.js +17 -0
- package/lib/components/Menu/MenuGroup.d.ts +9 -0
- package/lib/components/Menu/MenuGroup.js +88 -0
- package/lib/components/Menu/MenuItem.d.ts +3 -0
- package/lib/components/Menu/MenuItem.js +23 -0
- package/lib/components/Menu/MenuItemLabel.js +46 -0
- package/lib/components/Menu/MenuItemSwitch.d.ts +3 -0
- package/lib/components/Menu/MenuItemSwitch.js +39 -0
- package/lib/components/Menu/MenuLink.d.ts +4 -0
- package/lib/components/Menu/MenuLink.js +15 -0
- package/lib/components/Menu/MenuLinkItem.d.ts +3 -0
- package/lib/components/Menu/MenuLinkItem.js +15 -0
- package/lib/components/Menu/index.d.ts +7 -0
- package/lib/components/Menu/index.js +24 -0
- package/lib/components/Navbar/MobileNavbarDropdown.d.ts +8 -0
- package/lib/components/Navbar/MobileNavbarDropdown.js +30 -0
- package/lib/components/Navbar/MobileNavbarItem.d.ts +15 -0
- package/lib/components/Navbar/MobileNavbarItem.js +106 -0
- package/lib/components/Navbar/MobileNavbarMenu.d.ts +7 -0
- package/lib/components/Navbar/MobileNavbarMenu.js +104 -0
- package/lib/components/Navbar/MobileNavbarMenuButton.d.ts +4 -0
- package/lib/components/Navbar/MobileNavbarMenuButton.js +18 -0
- package/lib/components/Navbar/Navbar.d.ts +17 -0
- package/lib/components/Navbar/Navbar.js +132 -0
- package/lib/components/Navbar/NavbarDropdown.d.ts +8 -0
- package/lib/components/Navbar/NavbarDropdown.js +38 -0
- package/lib/components/Navbar/NavbarItem.d.ts +13 -0
- package/lib/components/Navbar/NavbarItem.js +72 -0
- package/lib/components/Navbar/NavbarMenu.d.ts +5 -0
- package/lib/components/Navbar/NavbarMenu.js +34 -0
- package/lib/components/Navbar/index.d.ts +3 -0
- package/lib/components/Navbar/index.js +20 -0
- package/lib/components/NavbarLogo/NavbarLogo.d.ts +6 -0
- package/lib/components/NavbarLogo/NavbarLogo.js +24 -0
- package/lib/components/NavbarLogo/index.d.ts +1 -0
- package/lib/components/NavbarLogo/index.js +18 -0
- package/lib/components/OpenAPIDocs/DevOnboardingTryItSecurity.js +177 -0
- package/lib/components/OpenAPIDocs/TryItSecurityApps.d.ts +8 -0
- package/lib/components/OpenAPIDocs/TryItSecurityApps.js +15 -0
- package/lib/components/OperationBadge/index.d.ts +1 -0
- package/lib/components/OperationBadge/index.js +18 -0
- package/lib/components/PageNavigation/NextButton.d.ts +7 -0
- package/lib/components/PageNavigation/NextButton.js +47 -0
- package/lib/components/PageNavigation/PageNavigation.d.ts +8 -0
- package/lib/components/PageNavigation/PageNavigation.js +32 -0
- package/lib/components/PageNavigation/PreviousButton.d.ts +7 -0
- package/lib/components/PageNavigation/PreviousButton.js +24 -0
- package/lib/components/PageNavigation/index.d.ts +3 -0
- package/lib/components/PageNavigation/index.js +20 -0
- package/lib/components/Panel/Panel.d.ts +5 -0
- package/lib/components/Panel/Panel.js +39 -0
- package/lib/components/Panel/PanelComponent.d.ts +13 -0
- package/lib/components/Panel/PanelComponent.js +65 -0
- package/lib/components/Panel/index.d.ts +5 -0
- package/lib/components/Panel/index.js +22 -0
- package/lib/components/Profile/AuthUserProfile.d.ts +2 -0
- package/lib/components/Profile/AuthUserProfile.js +22 -0
- package/lib/components/Profile/LoginLink.js +30 -0
- package/lib/components/Profile/Profile.js +104 -0
- package/lib/components/Profile/UserProfile.d.ts +3 -0
- package/lib/components/Profile/UserProfile.js +46 -0
- package/lib/components/Profile/UserProfileMenu.js +87 -0
- package/lib/components/Profile/index.d.ts +6 -0
- package/lib/components/Profile/types.d.ts +11 -0
- package/lib/components/Profile/types.js +3 -0
- package/lib/components/SamplesPanelControls/SamplesPanelControls.js +75 -0
- package/lib/components/SamplesPanelControls/index.d.ts +1 -0
- package/lib/components/SamplesPanelControls/index.js +18 -0
- package/lib/components/Search/Autocomplete.d.ts +16 -0
- package/lib/components/Search/Autocomplete.js +122 -0
- package/lib/components/Search/Parameters.d.ts +7 -0
- package/lib/components/Search/Parameters.js +55 -0
- package/lib/components/Search/Search.js +65 -0
- package/lib/components/Search/SearchItem.d.ts +8 -0
- package/lib/components/Search/SearchItem.js +98 -0
- package/lib/components/Search/SidebarSearch.d.ts +4 -0
- package/lib/components/Search/SidebarSearch.js +20 -0
- package/lib/components/Search/index.d.ts +9 -0
- package/lib/components/Search/index.js +26 -0
- package/lib/components/Separator/Separator.d.ts +3 -0
- package/lib/components/Separator/Separator.js +18 -0
- package/lib/components/Separator/SeparatorItem.js +29 -0
- package/lib/components/Separator/index.d.ts +3 -0
- package/lib/components/Separator/index.js +20 -0
- package/lib/components/Sidebar/ApiCallItem.d.ts +9 -0
- package/lib/components/Sidebar/ApiCallItem.js +34 -0
- package/lib/components/Sidebar/BackButton.js +39 -0
- package/lib/components/Sidebar/Drilldown.d.ts +8 -0
- package/lib/components/Sidebar/Drilldown.js +43 -0
- package/lib/components/Sidebar/DrilldownMenu.d.ts +3 -0
- package/lib/components/Sidebar/DrilldownMenu.js +71 -0
- package/lib/components/Sidebar/DrilldownMenuItem.d.ts +3 -0
- package/lib/components/Sidebar/SidebarLayout.js +85 -0
- package/lib/components/Sidebar/index.d.ts +11 -0
- package/lib/components/Sidebar/index.js +28 -0
- package/lib/components/Sidebar/types.d.ts +43 -0
- package/lib/components/Sidebar/types.js +8 -0
- package/lib/components/SidebarActions/ChangeViewButton.d.ts +8 -0
- package/lib/components/SidebarActions/ChangeViewButton.js +14 -0
- package/lib/components/SidebarActions/CollapseSidebarButton.js +13 -0
- package/lib/components/SidebarActions/SidebarActions.js +26 -0
- package/lib/components/SidebarActions/ToggleRightPanelButton.js +13 -0
- package/lib/components/SidebarActions/index.d.ts +1 -0
- package/lib/components/SidebarActions/index.js +7 -0
- package/lib/components/SidebarLogo/index.d.ts +1 -0
- package/lib/components/SidebarLogo/index.js +18 -0
- package/lib/components/SourceCode/SourceCode.js +60 -0
- package/lib/components/SourceCode/index.d.ts +1 -0
- package/lib/components/SourceCode/index.js +18 -0
- package/lib/components/TableOfContent/TableOfContent.d.ts +8 -0
- package/lib/components/TableOfContent/TableOfContent.js +109 -0
- package/lib/components/TableOfContent/index.d.ts +1 -0
- package/lib/components/TableOfContent/index.js +18 -0
- package/lib/components/TableOfContent/utils.d.ts +4 -0
- package/lib/components/Tabs/Tabs.js +73 -0
- package/lib/components/Tabs/index.d.ts +2 -0
- package/lib/components/Tabs/index.js +19 -0
- package/lib/components/Tags/Tags.js +32 -0
- package/lib/components/Tags/index.d.ts +1 -0
- package/lib/components/Tags/index.js +18 -0
- package/lib/components/Tiles/ThinTile.d.ts +5 -0
- package/lib/components/Tiles/ThinTile.js +124 -0
- package/lib/components/Tiles/WideTile.d.ts +7 -0
- package/lib/components/Tiles/WideTile.js +114 -0
- package/lib/components/Tiles/index.d.ts +4 -0
- package/lib/components/Tiles/index.js +21 -0
- package/lib/components/Tiles/types.d.ts +17 -0
- package/lib/components/Tiles/types.js +3 -0
- package/lib/components/Tooltip/Tooltip.js +173 -0
- package/lib/components/Tooltip/index.d.ts +1 -0
- package/lib/components/Tooltip/index.js +18 -0
- package/lib/components/Typography/CompactTypography.d.ts +7 -0
- package/lib/components/Typography/CompactTypography.js +14 -0
- package/lib/components/Typography/H1.js +17 -0
- package/lib/components/Typography/H2.js +17 -0
- package/lib/components/Typography/H3.js +17 -0
- package/lib/components/Typography/index.d.ts +7 -0
- package/lib/components/Typography/index.js +24 -0
- package/lib/components/index.d.ts +28 -0
- package/lib/components/index.js +45 -0
- package/lib/hooks/useThemeConfig.d.ts +4 -1
- package/lib/hooks/useThemeConfig.js +7 -3
- package/lib/icons/ExternalIcon/ExternalIcon.d.ts +5 -0
- package/lib/icons/ExternalIcon/ExternalIcon.js +22 -0
- package/lib/icons/ExternalIcon/index.d.ts +1 -0
- package/lib/icons/ExternalIcon/index.js +18 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/icons/index.js +1 -0
- package/lib/index.d.ts +3 -21
- package/lib/index.js +3 -21
- package/lib/layouts/Forbidden.js +39 -0
- package/lib/layouts/NotFound.js +39 -0
- package/lib/layouts/RootLayout.d.ts +6 -0
- package/lib/layouts/RootLayout.js +19 -0
- package/lib/layouts/index.d.ts +4 -0
- package/lib/layouts/index.js +21 -0
- package/lib/mocks/Profile/useProfileProps.d.ts +1 -0
- package/lib/mocks/Profile/useProfileProps.js +17 -0
- package/lib/mocks/Sidebar/getMenuType.d.ts +2 -0
- package/lib/mocks/Sidebar/getMenuType.js +10 -0
- package/lib/mocks/Sidebar/types.d.ts +11 -0
- package/lib/mocks/Sidebar/types.js +11 -0
- package/lib/mocks/Sidebar/useDrilldown.d.ts +8 -0
- package/lib/mocks/Sidebar/useDrilldown.js +19 -0
- package/lib/mocks/Sidebar/useMenuGroup.d.ts +6 -0
- package/lib/mocks/Sidebar/useMenuGroup.js +17 -0
- package/lib/mocks/hooks/index.d.ts +2 -2
- package/lib/mocks/hooks/usePageData.d.ts +1 -1
- package/lib/types/portal/index.d.ts +2 -0
- package/lib/types/portal/index.js +18 -0
- package/lib/types/portal/src/shared/constants.d.ts +17 -0
- package/lib/types/portal/src/shared/constants.js +22 -0
- package/lib/types/portal/src/shared/types/activeItem.d.ts +3 -0
- package/lib/types/portal/src/shared/types/activeItem.js +3 -0
- package/lib/types/portal/src/shared/types/catalog.d.ts +49 -0
- package/lib/types/portal/src/shared/types/catalog.js +3 -0
- package/lib/types/portal/src/shared/types/feedback.d.ts +11 -0
- package/lib/types/portal/src/shared/types/feedback.js +3 -0
- package/lib/types/portal/src/shared/types/markdown.d.ts +5 -0
- package/lib/types/portal/src/shared/types/markdown.js +3 -0
- package/lib/types/portal/src/shared/types/nav.d.ts +149 -0
- package/lib/types/portal/src/shared/types/nav.js +8 -0
- package/lib/types/portal/src/shared/types/searchDocument.d.ts +19 -0
- package/lib/types/portal/src/shared/types/searchDocument.js +5 -0
- package/lib/ui/ArrowBack.d.ts +5 -0
- package/lib/ui/ArrowBack.js +22 -0
- package/lib/ui/Dropdown.d.ts +1 -1
- package/lib/ui/Jumbotron.js +1 -1
- package/lib/ui/index.d.ts +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +2 -0
- package/lib/utils/jsUtils.d.ts +4 -0
- package/lib/utils/jsUtils.js +21 -0
- package/lib/utils/urls.d.ts +11 -0
- package/lib/utils/urls.js +55 -0
- package/package.json +1 -1
- package/src/components/ApiOnboarding/AppCustomAttributes.tsx +9 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Cards/Card.tsx +49 -0
- package/src/components/Cards/index.ts +2 -0
- package/src/components/Catalog/Catalog.tsx +200 -0
- package/src/components/Catalog/CatalogCard.tsx +95 -0
- package/src/components/Catalog/useCatalog.ts +280 -0
- package/src/components/CodeBlock/index.ts +1 -0
- package/src/components/CodeSample/CodeSample.tsx +236 -0
- package/src/components/CodeSample/index.ts +1 -0
- package/src/components/ColorModeSwitcher/index.ts +1 -0
- package/src/components/CopyButton/CopyButton.tsx +31 -0
- package/src/components/CopyButton/CopyButtonWrapper.tsx +55 -0
- package/src/components/CopyButton/index.ts +2 -0
- package/src/components/EditPageButton/index.ts +1 -0
- package/src/components/Feedback/Comment.tsx +80 -0
- package/src/components/Feedback/Feedback.tsx +47 -0
- package/src/components/Feedback/Rating.tsx +107 -0
- package/src/components/Feedback/Reasons.tsx +81 -0
- package/src/components/Feedback/ReportDialog.tsx +51 -0
- package/src/components/Feedback/Sentiment.tsx +74 -0
- package/src/components/Feedback/index.ts +8 -0
- package/src/components/Feedback/types.ts +69 -0
- package/src/components/Feedback/useReportDialog.ts +34 -0
- package/src/components/Filter/index.ts +1 -0
- package/src/components/Footer/CustomFooter.tsx +45 -0
- package/src/components/Footer/Footer.tsx +54 -0
- package/src/components/Footer/FooterColumns.tsx +53 -0
- package/src/components/Footer/index.ts +4 -0
- package/src/components/JsonViewer/JsonViewer.tsx +256 -0
- package/src/components/JsonViewer/index.ts +1 -0
- package/src/components/Markdown/MarkdownLayout.tsx +69 -0
- package/src/components/Markdown/index.ts +9 -0
- package/src/components/Menu/Menu.tsx +38 -0
- package/src/components/Menu/MenuContainer.tsx +15 -0
- package/src/components/Menu/MenuGroup.tsx +91 -0
- package/src/components/Menu/MenuItem.tsx +25 -0
- package/src/components/Menu/MenuItemLabel.tsx +41 -0
- package/src/components/Menu/MenuItemSwitch.tsx +63 -0
- package/src/components/Menu/MenuLinkItem.tsx +24 -0
- package/src/components/Menu/index.ts +7 -0
- package/src/components/Navbar/MobileNavbarItem.tsx +115 -0
- package/src/components/Navbar/MobileNavbarMenu.tsx +125 -0
- package/src/components/Navbar/Navbar.tsx +149 -0
- package/src/components/Navbar/NavbarItem.tsx +102 -0
- package/src/components/Navbar/NavbarMenu.tsx +37 -0
- package/src/components/Navbar/index.ts +3 -0
- package/src/components/NavbarLogo/index.ts +1 -0
- package/src/components/OpenAPIDocs/DevOnboardingTryItSecurity.tsx +178 -0
- package/src/components/OpenAPIDocs/TryItSecurityApps.tsx +18 -0
- package/src/components/OperationBadge/index.ts +1 -0
- package/src/components/PageNavigation/NextButton.tsx +38 -0
- package/src/components/PageNavigation/PageNavigation.tsx +37 -0
- package/src/components/PageNavigation/PreviousButton.tsx +38 -0
- package/src/components/PageNavigation/index.ts +3 -0
- package/src/components/Panel/Panel.ts +34 -0
- package/src/components/Panel/PanelComponent.tsx +79 -0
- package/src/components/Panel/index.ts +5 -0
- package/src/components/Profile/AuthUserProfile.tsx +25 -0
- package/src/components/Profile/UserProfile.tsx +46 -0
- package/src/components/Profile/index.ts +6 -0
- package/src/components/Profile/types.ts +11 -0
- package/src/components/SamplesPanelControls/SamplesPanelControls.ts +73 -0
- package/src/components/SamplesPanelControls/index.ts +1 -0
- package/src/components/Search/Autocomplete.tsx +148 -0
- package/src/components/Search/Parameters.tsx +61 -0
- package/src/components/Search/Search.tsx +50 -0
- package/src/components/Search/SearchItem.tsx +91 -0
- package/src/components/Search/SidebarSearch.tsx +15 -0
- package/src/components/Search/index.ts +9 -0
- package/src/components/Separator/Separator.tsx +17 -0
- package/src/components/Separator/SeparatorItem.tsx +24 -0
- package/src/components/Separator/index.ts +3 -0
- package/src/components/Sidebar/ApiCallItem.tsx +39 -0
- package/src/components/Sidebar/BackButton.tsx +44 -0
- package/src/components/Sidebar/Drilldown.tsx +44 -0
- package/src/components/Sidebar/DrilldownMenu.tsx +58 -0
- package/src/components/Sidebar/DrilldownMenuItem.tsx +44 -0
- package/src/components/Sidebar/SidebarLayout.tsx +107 -0
- package/src/components/Sidebar/index.ts +11 -0
- package/src/components/Sidebar/types.ts +47 -0
- package/src/components/SidebarActions/ChangeViewButton.tsx +24 -0
- package/src/components/SidebarActions/CollapseSidebarButton.tsx +25 -0
- package/src/components/SidebarActions/SidebarActions.tsx +71 -0
- package/src/components/SidebarActions/ToggleRightPanelButton.tsx +25 -0
- package/src/components/SidebarActions/index.tsx +1 -0
- package/src/components/SidebarLogo/index.ts +1 -0
- package/src/components/SourceCode/SourceCode.tsx +128 -0
- package/src/components/SourceCode/index.ts +1 -0
- package/src/components/TableOfContent/TableOfContent.tsx +116 -0
- package/src/components/TableOfContent/index.ts +1 -0
- package/src/components/Tabs/Tabs.tsx +58 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/Tags/index.ts +1 -0
- package/src/components/Tiles/ThinTile.tsx +134 -0
- package/src/components/Tiles/WideTile.tsx +138 -0
- package/src/components/Tiles/index.ts +4 -0
- package/src/components/Tiles/types.ts +19 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/Typography/CompactTypography.ts +9 -0
- package/src/components/Typography/index.ts +7 -0
- package/src/components/index.ts +28 -0
- package/src/hooks/useThemeConfig.ts +10 -1
- package/src/icons/ExternalIcon/ExternalIcon.tsx +44 -0
- package/src/icons/ExternalIcon/index.ts +1 -0
- package/src/icons/index.ts +1 -0
- package/src/index.ts +3 -21
- package/src/layouts/Forbidden.tsx +41 -0
- package/src/layouts/NotFound.tsx +42 -0
- package/src/layouts/RootLayout.tsx +21 -0
- package/src/layouts/index.ts +4 -0
- package/src/mocks/Profile/useProfileProps.tsx +12 -0
- package/src/mocks/Sidebar/getMenuType.ts +6 -0
- package/src/mocks/Sidebar/types.ts +15 -0
- package/src/mocks/Sidebar/useDrilldown.tsx +12 -0
- package/src/mocks/Sidebar/useMenuGroup.tsx +10 -0
- package/src/types/portal/src/shared/constants.ts +17 -0
- package/src/types/portal/src/shared/types/activeItem.ts +1 -0
- package/src/types/portal/src/shared/types/catalog.ts +51 -0
- package/src/types/portal/src/shared/types/feedback.ts +14 -0
- package/src/types/portal/src/shared/types/markdown.ts +6 -0
- package/src/types/portal/src/shared/types/nav.ts +167 -0
- package/src/types/portal/src/shared/types/searchDocument.ts +20 -0
- package/src/ui/ArrowBack.tsx +34 -0
- package/src/ui/Jumbotron.tsx +1 -1
- package/src/ui/index.tsx +1 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/jsUtils.ts +18 -0
- package/src/utils/urls.ts +54 -0
- package/lib/ApiOnboarding/AppCustomAttributes.js +0 -8
- package/lib/Button/Button.js +0 -156
- package/lib/Button/index.d.ts +0 -1
- package/lib/Button/index.js +0 -18
- package/lib/Cards/Card.d.ts +0 -8
- package/lib/Cards/Card.js +0 -36
- package/lib/Catalog/Catalog.d.ts +0 -8
- package/lib/Catalog/Catalog.js +0 -167
- package/lib/Catalog/CatalogCard.d.ts +0 -5
- package/lib/Catalog/CatalogCard.js +0 -113
- package/lib/Catalog/Filter.d.ts +0 -5
- package/lib/Catalog/Filter.js +0 -86
- package/lib/Catalog/Tags.js +0 -32
- package/lib/CodeBlock/CodeBlock.js +0 -103
- package/lib/CodeBlock/index.d.ts +0 -1
- package/lib/CodeBlock/index.js +0 -18
- package/lib/ColorModeSwitcher/ColorModeSwitcher.js +0 -81
- package/lib/ColorModeSwitcher/index.d.ts +0 -1
- package/lib/ColorModeSwitcher/index.js +0 -18
- package/lib/CopyButton/CopyButton.js +0 -54
- package/lib/CopyButton/CopyButtonWrapper.d.ts +0 -11
- package/lib/CopyButton/CopyButtonWrapper.js +0 -53
- package/lib/CopyButton/index.d.ts +0 -2
- package/lib/CopyButton/index.js +0 -19
- package/lib/EditPageButton/EditPageButton.js +0 -36
- package/lib/EditPageButton/index.d.ts +0 -1
- package/lib/EditPageButton/index.js +0 -18
- package/lib/Feedback/Comment.d.ts +0 -3
- package/lib/Feedback/Comment.js +0 -93
- package/lib/Feedback/Feedback.d.ts +0 -5
- package/lib/Feedback/Feedback.js +0 -50
- package/lib/Feedback/Rating.d.ts +0 -3
- package/lib/Feedback/Rating.js +0 -82
- package/lib/Feedback/Reasons.d.ts +0 -3
- package/lib/Feedback/Reasons.js +0 -85
- package/lib/Feedback/ReportDialog.d.ts +0 -3
- package/lib/Feedback/ReportDialog.js +0 -66
- package/lib/Feedback/Sentiment.d.ts +0 -3
- package/lib/Feedback/Sentiment.js +0 -79
- package/lib/Feedback/index.d.ts +0 -8
- package/lib/Feedback/index.js +0 -33
- package/lib/Feedback/types.d.ts +0 -74
- package/lib/Footer/CustomFooter.d.ts +0 -7
- package/lib/Footer/CustomFooter.js +0 -35
- package/lib/Footer/CustomFooterNavItem.d.ts +0 -7
- package/lib/Footer/CustomFooterNavItem.js +0 -33
- package/lib/Footer/Footer.d.ts +0 -10
- package/lib/Footer/Footer.js +0 -35
- package/lib/Footer/FooterColumn.d.ts +0 -7
- package/lib/Footer/FooterColumn.js +0 -54
- package/lib/Footer/FooterColumns.d.ts +0 -9
- package/lib/Footer/FooterColumns.js +0 -44
- package/lib/Footer/FooterCopyright.d.ts +0 -7
- package/lib/Footer/index.d.ts +0 -4
- package/lib/Footer/index.js +0 -21
- package/lib/JsonViewer/JsonViewer.js +0 -240
- package/lib/JsonViewer/index.d.ts +0 -1
- package/lib/JsonViewer/index.js +0 -18
- package/lib/LastUpdated/LastUpdated.js +0 -75
- package/lib/Layout/RootLayout.d.ts +0 -7
- package/lib/Layout/RootLayout.js +0 -19
- package/lib/Layout/index.d.ts +0 -2
- package/lib/Layout/index.js +0 -19
- package/lib/Markdown/Admonition.js +0 -56
- package/lib/Markdown/CodeSample/CodeSample.js +0 -217
- package/lib/Markdown/CodeSample/index.d.ts +0 -1
- package/lib/Markdown/CodeSample/index.js +0 -18
- package/lib/Markdown/Heading.js +0 -48
- package/lib/Markdown/MarkdownLayout.d.ts +0 -15
- package/lib/Markdown/MarkdownLayout.js +0 -40
- package/lib/Markdown/MarkdownWrapper.js +0 -394
- package/lib/Markdown/Tabs/Tabs.js +0 -73
- package/lib/Markdown/Tabs/index.d.ts +0 -2
- package/lib/Markdown/Tabs/index.js +0 -19
- package/lib/Markdown/index.d.ts +0 -10
- package/lib/Markdown/index.js +0 -27
- package/lib/Navbar/MobileNavbarDropdown.d.ts +0 -8
- package/lib/Navbar/MobileNavbarDropdown.js +0 -30
- package/lib/Navbar/MobileNavbarItem.d.ts +0 -15
- package/lib/Navbar/MobileNavbarItem.js +0 -106
- package/lib/Navbar/MobileNavbarMenu.d.ts +0 -7
- package/lib/Navbar/MobileNavbarMenu.js +0 -104
- package/lib/Navbar/MobileNavbarMenuButton.d.ts +0 -4
- package/lib/Navbar/MobileNavbarMenuButton.js +0 -18
- package/lib/Navbar/Navbar.d.ts +0 -12
- package/lib/Navbar/Navbar.js +0 -80
- package/lib/Navbar/NavbarDropdown.d.ts +0 -8
- package/lib/Navbar/NavbarDropdown.js +0 -38
- package/lib/Navbar/NavbarItem.d.ts +0 -13
- package/lib/Navbar/NavbarItem.js +0 -72
- package/lib/Navbar/NavbarMenu.d.ts +0 -5
- package/lib/Navbar/NavbarMenu.js +0 -34
- package/lib/Navbar/index.d.ts +0 -3
- package/lib/Navbar/index.js +0 -20
- package/lib/NavbarLogo/NavbarLogo.d.ts +0 -6
- package/lib/NavbarLogo/NavbarLogo.js +0 -24
- package/lib/NavbarLogo/index.d.ts +0 -1
- package/lib/NavbarLogo/index.js +0 -18
- package/lib/OperationBadge/index.d.ts +0 -1
- package/lib/OperationBadge/index.js +0 -18
- package/lib/PageNavigation/NextButton.d.ts +0 -2
- package/lib/PageNavigation/NextButton.js +0 -49
- package/lib/PageNavigation/PageNavigation.d.ts +0 -2
- package/lib/PageNavigation/PageNavigation.js +0 -32
- package/lib/PageNavigation/PreviousButton.d.ts +0 -2
- package/lib/PageNavigation/PreviousButton.js +0 -26
- package/lib/PageNavigation/index.d.ts +0 -3
- package/lib/PageNavigation/index.js +0 -20
- package/lib/Pages/Forbidden.js +0 -39
- package/lib/Pages/NotFound.js +0 -39
- package/lib/Pages/index.d.ts +0 -1
- package/lib/Pages/index.js +0 -18
- package/lib/Panel/Panel.d.ts +0 -5
- package/lib/Panel/Panel.js +0 -39
- package/lib/Panel/PanelComponent.d.ts +0 -13
- package/lib/Panel/PanelComponent.js +0 -65
- package/lib/Panel/index.d.ts +0 -5
- package/lib/Panel/index.js +0 -22
- package/lib/Profile/LoginLink.js +0 -30
- package/lib/Profile/Profile.js +0 -104
- package/lib/Profile/UserProfile.d.ts +0 -12
- package/lib/Profile/UserProfile.js +0 -46
- package/lib/Profile/UserProfileMenu.js +0 -87
- package/lib/Profile/index.d.ts +0 -6
- package/lib/ReferenceDocs/DevOnboardingTryItSecurity.js +0 -178
- package/lib/ReferenceDocs/TryItSecurityApps.d.ts +0 -7
- package/lib/ReferenceDocs/TryItSecurityApps.js +0 -15
- package/lib/SamplesPanelControls/SamplesPanelControls.js +0 -75
- package/lib/SamplesPanelControls/index.d.ts +0 -1
- package/lib/SamplesPanelControls/index.js +0 -18
- package/lib/Search/Autocomplete.d.ts +0 -16
- package/lib/Search/Autocomplete.js +0 -122
- package/lib/Search/Parameters.d.ts +0 -7
- package/lib/Search/Parameters.js +0 -55
- package/lib/Search/Search.js +0 -65
- package/lib/Search/SearchItem.d.ts +0 -7
- package/lib/Search/SearchItem.js +0 -98
- package/lib/Search/SidebarSearch.d.ts +0 -4
- package/lib/Search/SidebarSearch.js +0 -20
- package/lib/Search/index.d.ts +0 -9
- package/lib/Search/index.js +0 -26
- package/lib/Sidebar/ApiCallItem.d.ts +0 -9
- package/lib/Sidebar/ApiCallItem.js +0 -34
- package/lib/Sidebar/ArrowBack.d.ts +0 -4
- package/lib/Sidebar/ArrowBack.js +0 -22
- package/lib/Sidebar/BackButton.js +0 -39
- package/lib/Sidebar/Drilldown.d.ts +0 -8
- package/lib/Sidebar/Drilldown.js +0 -43
- package/lib/Sidebar/DrilldownMenu.d.ts +0 -3
- package/lib/Sidebar/DrilldownMenu.js +0 -71
- package/lib/Sidebar/DrilldownMenuItem.d.ts +0 -3
- package/lib/Sidebar/ExternalIcon.d.ts +0 -4
- package/lib/Sidebar/ExternalIcon.js +0 -21
- package/lib/Sidebar/Menu.d.ts +0 -3
- package/lib/Sidebar/Menu.js +0 -17
- package/lib/Sidebar/MenuContainer.js +0 -17
- package/lib/Sidebar/MenuGroup.d.ts +0 -9
- package/lib/Sidebar/MenuGroup.js +0 -88
- package/lib/Sidebar/MenuItem.d.ts +0 -3
- package/lib/Sidebar/MenuItem.js +0 -23
- package/lib/Sidebar/MenuItemLabel.js +0 -46
- package/lib/Sidebar/MenuLink.d.ts +0 -4
- package/lib/Sidebar/MenuLink.js +0 -15
- package/lib/Sidebar/MenuLinkItem.d.ts +0 -3
- package/lib/Sidebar/MenuLinkItem.js +0 -15
- package/lib/Sidebar/Separator.d.ts +0 -3
- package/lib/Sidebar/Separator.js +0 -18
- package/lib/Sidebar/SeparatorItem.js +0 -29
- package/lib/Sidebar/SidebarLayout.js +0 -85
- package/lib/Sidebar/index.d.ts +0 -22
- package/lib/Sidebar/index.js +0 -39
- package/lib/Sidebar/types/DrilldownMenuProps.d.ts +0 -6
- package/lib/Sidebar/types/DrilldownMenuProps.js +0 -3
- package/lib/Sidebar/types/ItemState.d.ts +0 -8
- package/lib/Sidebar/types/ItemState.js +0 -3
- package/lib/Sidebar/types/MenuItemProps.d.ts +0 -5
- package/lib/Sidebar/types/MenuItemProps.js +0 -3
- package/lib/Sidebar/types/MenuStyle.d.ts +0 -3
- package/lib/Sidebar/types/MenuStyle.js +0 -8
- package/lib/Sidebar/types/NavItem.d.ts +0 -26
- package/lib/Sidebar/types/NavItem.js +0 -3
- package/lib/Sidebar/types/index.d.ts +0 -5
- package/lib/Sidebar/types/index.js +0 -22
- package/lib/SidebarActions/ChangeViewButton.d.ts +0 -8
- package/lib/SidebarActions/ChangeViewButton.js +0 -14
- package/lib/SidebarActions/CollapseSidebarButton.js +0 -13
- package/lib/SidebarActions/SidebarActions.js +0 -26
- package/lib/SidebarActions/ToggleRightPanelButton.js +0 -13
- package/lib/SidebarActions/index.d.ts +0 -1
- package/lib/SidebarActions/index.js +0 -7
- package/lib/SidebarLogo/index.d.ts +0 -1
- package/lib/SidebarLogo/index.js +0 -18
- package/lib/SourceCode/SourceCode.js +0 -60
- package/lib/SourceCode/index.d.ts +0 -1
- package/lib/SourceCode/index.js +0 -18
- package/lib/TableOfContent/TableOfContent.d.ts +0 -8
- package/lib/TableOfContent/TableOfContent.js +0 -109
- package/lib/TableOfContent/index.d.ts +0 -1
- package/lib/TableOfContent/index.js +0 -18
- package/lib/TableOfContent/utils.d.ts +0 -4
- package/lib/Tooltip/Tooltip.js +0 -173
- package/lib/Tooltip/index.d.ts +0 -1
- package/lib/Tooltip/index.js +0 -18
- package/lib/Typography/CompactTypography.d.ts +0 -7
- package/lib/Typography/CompactTypography.js +0 -14
- package/lib/Typography/H1.js +0 -17
- package/lib/Typography/H2.js +0 -17
- package/lib/Typography/H3.js +0 -17
- package/lib/Typography/index.d.ts +0 -7
- package/lib/Typography/index.js +0 -24
- package/lib/ui/Tiles/ThinTile.d.ts +0 -22
- package/lib/ui/Tiles/ThinTile.js +0 -124
- package/lib/ui/Tiles/WideTile.d.ts +0 -7
- package/lib/ui/Tiles/WideTile.js +0 -114
- package/lib/ui/Tiles/index.d.ts +0 -4
- package/lib/ui/Tiles/index.js +0 -21
- package/src/ApiOnboarding/AppCustomAttributes.tsx +0 -6
- package/src/Button/index.ts +0 -1
- package/src/Cards/Card.tsx +0 -49
- package/src/Catalog/Catalog.tsx +0 -198
- package/src/Catalog/CatalogCard.tsx +0 -95
- package/src/CodeBlock/index.ts +0 -1
- package/src/ColorModeSwitcher/index.ts +0 -1
- package/src/CopyButton/CopyButton.tsx +0 -32
- package/src/CopyButton/CopyButtonWrapper.tsx +0 -55
- package/src/CopyButton/index.ts +0 -2
- package/src/EditPageButton/index.ts +0 -1
- package/src/Feedback/Comment.tsx +0 -80
- package/src/Feedback/Feedback.tsx +0 -42
- package/src/Feedback/Rating.tsx +0 -107
- package/src/Feedback/Reasons.tsx +0 -81
- package/src/Feedback/ReportDialog.tsx +0 -52
- package/src/Feedback/Sentiment.tsx +0 -74
- package/src/Feedback/index.ts +0 -8
- package/src/Feedback/types.ts +0 -66
- package/src/Feedback/useReportDialog.ts +0 -34
- package/src/Footer/CustomFooter.tsx +0 -45
- package/src/Footer/Footer.tsx +0 -43
- package/src/Footer/FooterColumns.tsx +0 -53
- package/src/Footer/index.ts +0 -4
- package/src/JsonViewer/JsonViewer.tsx +0 -256
- package/src/JsonViewer/index.ts +0 -1
- package/src/Layout/RootLayout.tsx +0 -24
- package/src/Layout/index.ts +0 -2
- package/src/Markdown/CodeSample/CodeSample.tsx +0 -236
- package/src/Markdown/CodeSample/index.ts +0 -1
- package/src/Markdown/MarkdownLayout.tsx +0 -64
- package/src/Markdown/Tabs/Tabs.tsx +0 -58
- package/src/Markdown/Tabs/index.ts +0 -2
- package/src/Markdown/index.ts +0 -10
- package/src/Navbar/MobileNavbarItem.tsx +0 -114
- package/src/Navbar/MobileNavbarMenu.tsx +0 -122
- package/src/Navbar/Navbar.tsx +0 -100
- package/src/Navbar/NavbarItem.tsx +0 -102
- package/src/Navbar/NavbarMenu.tsx +0 -37
- package/src/Navbar/index.ts +0 -3
- package/src/NavbarLogo/index.ts +0 -1
- package/src/OperationBadge/index.ts +0 -1
- package/src/PageNavigation/NextButton.tsx +0 -40
- package/src/PageNavigation/PageNavigation.tsx +0 -31
- package/src/PageNavigation/PreviousButton.tsx +0 -40
- package/src/PageNavigation/index.ts +0 -3
- package/src/Pages/Forbidden.tsx +0 -42
- package/src/Pages/NotFound.tsx +0 -42
- package/src/Pages/index.ts +0 -1
- package/src/Panel/Panel.ts +0 -34
- package/src/Panel/PanelComponent.tsx +0 -79
- package/src/Panel/index.ts +0 -5
- package/src/Profile/UserProfile.tsx +0 -55
- package/src/Profile/index.ts +0 -6
- package/src/ReferenceDocs/DevOnboardingTryItSecurity.tsx +0 -180
- package/src/ReferenceDocs/TryItSecurityApps.tsx +0 -17
- package/src/SamplesPanelControls/SamplesPanelControls.ts +0 -73
- package/src/SamplesPanelControls/index.ts +0 -1
- package/src/Search/Autocomplete.tsx +0 -148
- package/src/Search/Parameters.tsx +0 -62
- package/src/Search/Search.tsx +0 -67
- package/src/Search/SearchItem.tsx +0 -90
- package/src/Search/SidebarSearch.tsx +0 -15
- package/src/Search/index.ts +0 -9
- package/src/Sidebar/ApiCallItem.tsx +0 -39
- package/src/Sidebar/ArrowBack.tsx +0 -28
- package/src/Sidebar/BackButton.tsx +0 -44
- package/src/Sidebar/Drilldown.tsx +0 -44
- package/src/Sidebar/DrilldownMenu.tsx +0 -58
- package/src/Sidebar/DrilldownMenuItem.tsx +0 -44
- package/src/Sidebar/ExternalIcon.tsx +0 -37
- package/src/Sidebar/Menu.tsx +0 -11
- package/src/Sidebar/MenuContainer.tsx +0 -15
- package/src/Sidebar/MenuGroup.tsx +0 -91
- package/src/Sidebar/MenuItem.tsx +0 -25
- package/src/Sidebar/MenuItemLabel.tsx +0 -41
- package/src/Sidebar/MenuLinkItem.tsx +0 -24
- package/src/Sidebar/Separator.tsx +0 -17
- package/src/Sidebar/SeparatorItem.tsx +0 -24
- package/src/Sidebar/SidebarLayout.tsx +0 -107
- package/src/Sidebar/index.ts +0 -22
- package/src/Sidebar/types/DrilldownMenuProps.ts +0 -7
- package/src/Sidebar/types/ItemState.ts +0 -9
- package/src/Sidebar/types/MenuItemProps.ts +0 -6
- package/src/Sidebar/types/MenuStyle.ts +0 -3
- package/src/Sidebar/types/NavItem.ts +0 -27
- package/src/Sidebar/types/index.ts +0 -5
- package/src/SidebarActions/ChangeViewButton.tsx +0 -20
- package/src/SidebarActions/CollapseSidebarButton.tsx +0 -21
- package/src/SidebarActions/SidebarActions.tsx +0 -64
- package/src/SidebarActions/ToggleRightPanelButton.tsx +0 -21
- package/src/SidebarActions/index.tsx +0 -1
- package/src/SidebarLogo/index.ts +0 -1
- package/src/SourceCode/SourceCode.tsx +0 -128
- package/src/SourceCode/index.ts +0 -1
- package/src/TableOfContent/TableOfContent.tsx +0 -113
- package/src/TableOfContent/index.ts +0 -1
- package/src/Tooltip/index.ts +0 -1
- package/src/Typography/CompactTypography.ts +0 -9
- package/src/Typography/index.ts +0 -7
- package/src/types/portal/src/shared/constants.d.ts +0 -46
- package/src/types/portal/src/shared/types/catalog.d.ts +0 -55
- package/src/types/portal/src/shared/types/feedback.d.ts +0 -8
- package/src/types/portal/src/shared/types/markdown.d.ts +0 -5
- package/src/types/portal/src/shared/types/nav.d.ts +0 -158
- package/src/ui/Tiles/ThinTile.tsx +0 -153
- package/src/ui/Tiles/WideTile.tsx +0 -138
- package/src/ui/Tiles/index.ts +0 -4
- /package/lib/{ApiOnboarding → components/ApiOnboarding}/AppCustomAttributes.d.ts +0 -0
- /package/lib/{Button → components/Button}/Button.d.ts +0 -0
- /package/lib/{Cards → components/Cards}/CardsBlock.d.ts +0 -0
- /package/lib/{Cards → components/Cards}/CardsBlock.js +0 -0
- /package/lib/{CodeBlock → components/CodeBlock}/CodeBlock.d.ts +0 -0
- /package/lib/{Markdown → components}/CodeSample/CodeSample.d.ts +0 -0
- /package/lib/{ColorModeSwitcher → components/ColorModeSwitcher}/ColorModeSwitcher.d.ts +0 -0
- /package/lib/{CopyButton → components/CopyButton}/CopyButton.d.ts +0 -0
- /package/lib/{EditPageButton → components/EditPageButton}/EditPageButton.d.ts +0 -0
- /package/lib/{Feedback → components/Feedback}/Thumbs.d.ts +0 -0
- /package/lib/{Feedback → components/Feedback}/Thumbs.js +0 -0
- /package/lib/{Feedback → components/Feedback}/types.js +0 -0
- /package/lib/{Feedback → components/Feedback}/useReportDialog.d.ts +0 -0
- /package/lib/{Feedback → components/Feedback}/useReportDialog.js +0 -0
- /package/lib/{Footer → components/Footer}/FooterCopyright.js +0 -0
- /package/lib/{JsonViewer → components/JsonViewer}/JsonViewer.d.ts +0 -0
- /package/lib/{LastUpdated → components/LastUpdated}/LastUpdated.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/Admonition.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/ContainerWrapper.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/ContainerWrapper.js +0 -0
- /package/lib/{Markdown → components/Markdown}/Details.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/Details.js +0 -0
- /package/lib/{Markdown → components/Markdown}/Heading.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/MarkdownWrapper.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/Mermaid.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/Mermaid.js +0 -0
- /package/lib/{Markdown → components/Markdown}/PageWrapper.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/PageWrapper.js +0 -0
- /package/lib/{Markdown → components/Markdown}/Sup.d.ts +0 -0
- /package/lib/{Markdown → components/Markdown}/Sup.js +0 -0
- /package/lib/{Sidebar → components/Menu}/MenuContainer.d.ts +0 -0
- /package/lib/{Sidebar → components/Menu}/MenuItemLabel.d.ts +0 -0
- /package/lib/{ReferenceDocs → components/OpenAPIDocs}/ClearButton.d.ts +0 -0
- /package/lib/{ReferenceDocs → components/OpenAPIDocs}/ClearButton.js +0 -0
- /package/lib/{ReferenceDocs → components/OpenAPIDocs}/DevOnboardingTryItSecurity.d.ts +0 -0
- /package/lib/{ReferenceDocs → components/OpenAPIDocs}/Dropdown.d.ts +0 -0
- /package/lib/{ReferenceDocs → components/OpenAPIDocs}/Dropdown.js +0 -0
- /package/lib/{ReferenceDocs → components/OpenAPIDocs}/index.d.ts +0 -0
- /package/lib/{ReferenceDocs → components/OpenAPIDocs}/index.js +0 -0
- /package/lib/{OperationBadge → components/OperationBadge}/OperationBadge.d.ts +0 -0
- /package/lib/{OperationBadge → components/OperationBadge}/OperationBadge.js +0 -0
- /package/lib/{Panel → components/Panel}/PanelBody.d.ts +0 -0
- /package/lib/{Panel → components/Panel}/PanelBody.js +0 -0
- /package/lib/{Panel → components/Panel}/PanelHeader.d.ts +0 -0
- /package/lib/{Panel → components/Panel}/PanelHeader.js +0 -0
- /package/lib/{Panel → components/Panel}/PanelHeaderTitle.d.ts +0 -0
- /package/lib/{Panel → components/Panel}/PanelHeaderTitle.js +0 -0
- /package/lib/{Profile → components/Profile}/LoginLink.d.ts +0 -0
- /package/lib/{Profile → components/Profile}/Profile.d.ts +0 -0
- /package/lib/{Profile → components/Profile}/UserProfileMenu.d.ts +0 -0
- /package/lib/{Profile → components/Profile}/index.js +0 -0
- /package/lib/{SamplesPanelControls → components/SamplesPanelControls}/SamplesPanelControls.d.ts +0 -0
- /package/lib/{Search → components/Search}/ClearIcon.d.ts +0 -0
- /package/lib/{Search → components/Search}/ClearIcon.js +0 -0
- /package/lib/{Search → components/Search}/Input.d.ts +0 -0
- /package/lib/{Search → components/Search}/Input.js +0 -0
- /package/lib/{Search → components/Search}/Popover.d.ts +0 -0
- /package/lib/{Search → components/Search}/Popover.js +0 -0
- /package/lib/{Search → components/Search}/Search.d.ts +0 -0
- /package/lib/{Search → components/Search}/SearchIcon.d.ts +0 -0
- /package/lib/{Search → components/Search}/SearchIcon.js +0 -0
- /package/lib/{Search → components/Search}/ShortcutKey.d.ts +0 -0
- /package/lib/{Search → components/Search}/ShortcutKey.js +0 -0
- /package/lib/{Search → components/Search}/utils.d.ts +0 -0
- /package/lib/{Search → components/Search}/utils.js +0 -0
- /package/lib/{Sidebar → components/Separator}/SeparatorItem.d.ts +0 -0
- /package/lib/{Sidebar → components/Separator}/SeparatorLine.d.ts +0 -0
- /package/lib/{Sidebar → components/Separator}/SeparatorLine.js +0 -0
- /package/lib/{Sidebar → components/Sidebar}/BackButton.d.ts +0 -0
- /package/lib/{Sidebar → components/Sidebar}/DrilldownMenuItem.js +0 -0
- /package/lib/{Sidebar → components/Sidebar}/FooterWrapper.d.ts +0 -0
- /package/lib/{Sidebar → components/Sidebar}/FooterWrapper.js +0 -0
- /package/lib/{Sidebar → components/Sidebar}/HeaderWrapper.d.ts +0 -0
- /package/lib/{Sidebar → components/Sidebar}/HeaderWrapper.js +0 -0
- /package/lib/{Sidebar → components/Sidebar}/MobileSidebarButton.d.ts +0 -0
- /package/lib/{Sidebar → components/Sidebar}/MobileSidebarButton.js +0 -0
- /package/lib/{Sidebar → components/Sidebar}/MobileSidebarIcon.d.ts +0 -0
- /package/lib/{Sidebar → components/Sidebar}/MobileSidebarIcon.js +0 -0
- /package/lib/{Sidebar → components/Sidebar}/Sidebar.d.ts +0 -0
- /package/lib/{Sidebar → components/Sidebar}/Sidebar.js +0 -0
- /package/lib/{Sidebar → components/Sidebar}/SidebarLayout.d.ts +0 -0
- /package/lib/{SidebarActions → components/SidebarActions}/CollapseSidebarButton.d.ts +0 -0
- /package/lib/{SidebarActions → components/SidebarActions}/SidebarActions.d.ts +0 -0
- /package/lib/{SidebarActions → components/SidebarActions}/ToggleRightPanelButton.d.ts +0 -0
- /package/lib/{SidebarActions → components/SidebarActions}/styled.d.ts +0 -0
- /package/lib/{SidebarActions → components/SidebarActions}/styled.js +0 -0
- /package/lib/{SidebarLogo → components/SidebarLogo}/SidebarLogo.d.ts +0 -0
- /package/lib/{SidebarLogo → components/SidebarLogo}/SidebarLogo.js +0 -0
- /package/lib/{SourceCode → components/SourceCode}/SourceCode.d.ts +0 -0
- /package/lib/{TableOfContent → components/TableOfContent}/utils.js +0 -0
- /package/lib/{Markdown → components}/Tabs/Tab.d.ts +0 -0
- /package/lib/{Markdown → components}/Tabs/Tab.js +0 -0
- /package/lib/{Markdown → components}/Tabs/Tabs.d.ts +0 -0
- /package/lib/{Catalog → components/Tags}/Tags.d.ts +0 -0
- /package/lib/{ui → components}/Tiles/TileHeader.d.ts +0 -0
- /package/lib/{ui → components}/Tiles/TileHeader.js +0 -0
- /package/lib/{ui → components}/Tiles/TileText.d.ts +0 -0
- /package/lib/{ui → components}/Tiles/TileText.js +0 -0
- /package/lib/{Tooltip → components/Tooltip}/Tooltip.d.ts +0 -0
- /package/lib/{Typography → components/Typography}/Emphasis.d.ts +0 -0
- /package/lib/{Typography → components/Typography}/Emphasis.js +0 -0
- /package/lib/{Typography → components/Typography}/H1.d.ts +0 -0
- /package/lib/{Typography → components/Typography}/H2.d.ts +0 -0
- /package/lib/{Typography → components/Typography}/H3.d.ts +0 -0
- /package/lib/{Typography → components/Typography}/SectionHeader.d.ts +0 -0
- /package/lib/{Typography → components/Typography}/SectionHeader.js +0 -0
- /package/lib/{Typography → components/Typography}/Typography.d.ts +0 -0
- /package/lib/{Typography → components/Typography}/Typography.js +0 -0
- /package/lib/{Pages → layouts}/Forbidden.d.ts +0 -0
- /package/lib/{Pages → layouts}/NotFound.d.ts +0 -0
- /package/lib/{Layout → layouts}/PageLayout.d.ts +0 -0
- /package/lib/{Layout → layouts}/PageLayout.js +0 -0
- /package/src/{Button → components/Button}/Button.tsx +0 -0
- /package/src/{Cards → components/Cards}/CardsBlock.tsx +0 -0
- /package/src/{CodeBlock → components/CodeBlock}/CodeBlock.ts +0 -0
- /package/src/{ColorModeSwitcher → components/ColorModeSwitcher}/ColorModeSwitcher.tsx +0 -0
- /package/src/{EditPageButton → components/EditPageButton}/EditPageButton.tsx +0 -0
- /package/src/{Feedback → components/Feedback}/Thumbs.tsx +0 -0
- /package/src/{Catalog → components/Filter}/Filter.tsx +0 -0
- /package/src/{Footer → components/Footer}/CustomFooterNavItem.tsx +0 -0
- /package/src/{Footer → components/Footer}/FooterColumn.tsx +0 -0
- /package/src/{Footer → components/Footer}/FooterCopyright.tsx +0 -0
- /package/src/{LastUpdated → components/LastUpdated}/LastUpdated.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/Admonition.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/ContainerWrapper.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/Details.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/Heading.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/MarkdownWrapper.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/Mermaid.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/PageWrapper.tsx +0 -0
- /package/src/{Markdown → components/Markdown}/Sup.tsx +0 -0
- /package/src/{Sidebar → components/Menu}/MenuLink.tsx +0 -0
- /package/src/{Navbar → components/Navbar}/MobileNavbarDropdown.tsx +0 -0
- /package/src/{Navbar → components/Navbar}/MobileNavbarMenuButton.tsx +0 -0
- /package/src/{Navbar → components/Navbar}/NavbarDropdown.tsx +0 -0
- /package/src/{NavbarLogo → components/NavbarLogo}/NavbarLogo.tsx +0 -0
- /package/src/{ReferenceDocs → components/OpenAPIDocs}/ClearButton.tsx +0 -0
- /package/src/{ReferenceDocs → components/OpenAPIDocs}/Dropdown.tsx +0 -0
- /package/src/{ReferenceDocs → components/OpenAPIDocs}/index.ts +0 -0
- /package/src/{OperationBadge → components/OperationBadge}/OperationBadge.ts +0 -0
- /package/src/{Panel → components/Panel}/PanelBody.ts +0 -0
- /package/src/{Panel → components/Panel}/PanelHeader.ts +0 -0
- /package/src/{Panel → components/Panel}/PanelHeaderTitle.ts +0 -0
- /package/src/{Profile → components/Profile}/LoginLink.tsx +0 -0
- /package/src/{Profile → components/Profile}/Profile.tsx +0 -0
- /package/src/{Profile → components/Profile}/UserProfileMenu.tsx +0 -0
- /package/src/{Search → components/Search}/ClearIcon.tsx +0 -0
- /package/src/{Search → components/Search}/Input.tsx +0 -0
- /package/src/{Search → components/Search}/Popover.tsx +0 -0
- /package/src/{Search → components/Search}/SearchIcon.tsx +0 -0
- /package/src/{Search → components/Search}/ShortcutKey.tsx +0 -0
- /package/src/{Search → components/Search}/utils.tsx +0 -0
- /package/src/{Sidebar → components/Separator}/SeparatorLine.tsx +0 -0
- /package/src/{Sidebar → components/Sidebar}/FooterWrapper.tsx +0 -0
- /package/src/{Sidebar → components/Sidebar}/HeaderWrapper.tsx +0 -0
- /package/src/{Sidebar → components/Sidebar}/MobileSidebarButton.tsx +0 -0
- /package/src/{Sidebar → components/Sidebar}/MobileSidebarIcon.tsx +0 -0
- /package/src/{Sidebar → components/Sidebar}/Sidebar.tsx +0 -0
- /package/src/{SidebarActions → components/SidebarActions}/styled.tsx +0 -0
- /package/src/{SidebarLogo → components/SidebarLogo}/SidebarLogo.tsx +0 -0
- /package/src/{TableOfContent → components/TableOfContent}/utils.ts +0 -0
- /package/src/{Markdown → components}/Tabs/Tab.tsx +0 -0
- /package/src/{Catalog → components/Tags}/Tags.tsx +0 -0
- /package/src/{ui → components}/Tiles/TileHeader.ts +0 -0
- /package/src/{ui → components}/Tiles/TileText.tsx +0 -0
- /package/src/{Tooltip → components/Tooltip}/Tooltip.tsx +0 -0
- /package/src/{Typography → components/Typography}/Emphasis.ts +0 -0
- /package/src/{Typography → components/Typography}/H1.ts +0 -0
- /package/src/{Typography → components/Typography}/H2.ts +0 -0
- /package/src/{Typography → components/Typography}/H3.ts +0 -0
- /package/src/{Typography → components/Typography}/SectionHeader.ts +0 -0
- /package/src/{Typography → components/Typography}/Typography.ts +0 -0
- /package/src/{Layout → layouts}/PageLayout.tsx +0 -0
- /package/src/types/portal/{index.d.ts → index.ts} +0 -0
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { useLocation } from 'react-router-dom';
|
|
4
|
-
|
|
5
|
-
import { Link } from '@portal/Link';
|
|
6
|
-
import { withPathPrefix } from '@portal/utils';
|
|
7
|
-
import { MobileDropdownWrapper, MobileNavbarDropdown } from '@theme/Navbar/MobileNavbarDropdown';
|
|
8
|
-
import type {
|
|
9
|
-
ResolvedNavItem,
|
|
10
|
-
ResolvedNavLinkItem,
|
|
11
|
-
ResolvedNavGroupItem,
|
|
12
|
-
} from '@theme/types/portal';
|
|
13
|
-
|
|
14
|
-
export interface NavbarItemProps {
|
|
15
|
-
navItem: ResolvedNavItem;
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function MobileNavbarItem({ navItem, className }: NavbarItemProps): JSX.Element | null {
|
|
20
|
-
const { pathname } = useLocation();
|
|
21
|
-
const [expandedDropdown, setExpandedDropdown] = useState(false);
|
|
22
|
-
const toggleDropdown = () => setExpandedDropdown(!expandedDropdown);
|
|
23
|
-
|
|
24
|
-
if ((navItem as ResolvedNavLinkItem).link) {
|
|
25
|
-
const item = navItem as ResolvedNavLinkItem;
|
|
26
|
-
const isActive = pathname === withPathPrefix(item.link);
|
|
27
|
-
return (
|
|
28
|
-
<NavMenuItem
|
|
29
|
-
active={isActive}
|
|
30
|
-
data-component-name="Navbar/MobileNavbarItem"
|
|
31
|
-
className={className}
|
|
32
|
-
>
|
|
33
|
-
<NavLink to={item.link} active={isActive}>
|
|
34
|
-
<NavLabel>{item.label}</NavLabel>
|
|
35
|
-
</NavLink>
|
|
36
|
-
</NavMenuItem>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if ((navItem as ResolvedNavGroupItem).items) {
|
|
41
|
-
const item = navItem as ResolvedNavGroupItem;
|
|
42
|
-
return (
|
|
43
|
-
<NavMenuItemWithDropdownWrapper expanded={expandedDropdown}>
|
|
44
|
-
<NavMenuItem
|
|
45
|
-
active={false}
|
|
46
|
-
onClick={toggleDropdown}
|
|
47
|
-
data-component-name="Navbar/MobileNavbarItem"
|
|
48
|
-
className={className}
|
|
49
|
-
>
|
|
50
|
-
<NavLabel>{item.label}</NavLabel>
|
|
51
|
-
<ExpandedArrow />
|
|
52
|
-
</NavMenuItem>
|
|
53
|
-
<MobileNavbarDropdown items={item.items as ResolvedNavLinkItem[]} />
|
|
54
|
-
</NavMenuItemWithDropdownWrapper>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const ExpandedArrow = styled.div`
|
|
62
|
-
width: 5px;
|
|
63
|
-
height: 5px;
|
|
64
|
-
border: 1px solid;
|
|
65
|
-
border-left: none;
|
|
66
|
-
border-top: none;
|
|
67
|
-
transition: all 0.3s ease-out;
|
|
68
|
-
`;
|
|
69
|
-
|
|
70
|
-
export const NavMenuItem = styled.li<{ active?: boolean }>`
|
|
71
|
-
display: flex;
|
|
72
|
-
justify-content: space-between;
|
|
73
|
-
align-items: center;
|
|
74
|
-
padding: var(--navbar-item-padding-horizontal);
|
|
75
|
-
text-align: left;
|
|
76
|
-
line-height: 1;
|
|
77
|
-
font-size: var(--navbar-item-font-size);
|
|
78
|
-
font-weight: var(--navbar-item-font-weight);
|
|
79
|
-
background: ${({ active }) => (active ? 'var(--navbar-item-active-background-color)' : 'none')};
|
|
80
|
-
&:not(:last-child) {
|
|
81
|
-
border-bottom: 1px solid var(--navbar-item-separator-line-color, #dadada);
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
|
|
85
|
-
export const NavMenuItemWithDropdownWrapper = styled.div<{ expanded: boolean }>`
|
|
86
|
-
display: inline-block;
|
|
87
|
-
position: relative;
|
|
88
|
-
border-bottom: 1px solid var(--navbar-item-separator-line-color, #dadada);
|
|
89
|
-
|
|
90
|
-
${ExpandedArrow} {
|
|
91
|
-
transform: rotate(${({ expanded }) => (expanded ? '' : '-')}45deg);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
${MobileDropdownWrapper} {
|
|
95
|
-
height: ${({ expanded }) => (expanded ? '100%' : '0')};
|
|
96
|
-
opacity: ${({ expanded }) => (expanded ? '1' : '0')};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
${NavMenuItem} {
|
|
100
|
-
border-bottom: none;
|
|
101
|
-
}
|
|
102
|
-
`;
|
|
103
|
-
|
|
104
|
-
export const NavLink = styled(Link)`
|
|
105
|
-
color: ${({ active }) =>
|
|
106
|
-
active ? 'var(--navbar-item-active-text-color)' : 'var(--navbar-text-color)'};
|
|
107
|
-
text-decoration: ${({ active }) =>
|
|
108
|
-
active ? 'var(--navbar-item-active-text-decoration)' : 'none'};
|
|
109
|
-
`;
|
|
110
|
-
|
|
111
|
-
const NavLabel = styled.span`
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
vertical-align: middle;
|
|
114
|
-
`;
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { NavbarMenuItem, NavbarMenuItemWithDropdownWrapper } from '@theme/Navbar/NavbarItem';
|
|
5
|
-
import { MobileNavbarItem } from '@theme/Navbar/MobileNavbarItem';
|
|
6
|
-
import { DropdownWrapper } from '@theme/Navbar/NavbarDropdown';
|
|
7
|
-
import { isPrimitive, isEmptyArray } from '@theme/utils';
|
|
8
|
-
import type { ResolvedConfigLinks, ResolvedNavItem } from '@theme/types/portal';
|
|
9
|
-
|
|
10
|
-
export function MobileNavbarMenu({
|
|
11
|
-
menuItems,
|
|
12
|
-
closeMenu,
|
|
13
|
-
search,
|
|
14
|
-
}: {
|
|
15
|
-
menuItems: ResolvedConfigLinks;
|
|
16
|
-
search: React.ReactNode | undefined;
|
|
17
|
-
closeMenu: () => void;
|
|
18
|
-
}): JSX.Element | null {
|
|
19
|
-
if (isPrimitive(menuItems) || isEmptyArray(menuItems)) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<NavbarItemsWrapper data-component-name="Navbar/MobileNavbarMenu">
|
|
25
|
-
<NavbarItemsContainer>
|
|
26
|
-
<MobileSearchWrapper>{search || null}</MobileSearchWrapper>
|
|
27
|
-
{(menuItems as ResolvedNavItem[]).map((navItem, index) => {
|
|
28
|
-
return (
|
|
29
|
-
<MobileNavbarItem
|
|
30
|
-
key={`${navItem.label}_${index}`}
|
|
31
|
-
data-cy={navItem.label}
|
|
32
|
-
navItem={navItem}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
})}
|
|
36
|
-
</NavbarItemsContainer>
|
|
37
|
-
<NavbarItemsClosableArea onClick={closeMenu} />
|
|
38
|
-
</NavbarItemsWrapper>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const NavbarItemsWrapper = styled.div`
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
position: fixed;
|
|
46
|
-
z-index: 201; //more than Search
|
|
47
|
-
left: 0;
|
|
48
|
-
top: 0;
|
|
49
|
-
overflow-x: hidden;
|
|
50
|
-
transition: 0.5s;
|
|
51
|
-
display: flex;
|
|
52
|
-
${DropdownWrapper} {
|
|
53
|
-
& > div {
|
|
54
|
-
text-align: center;
|
|
55
|
-
padding: 10px 0;
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
a {
|
|
58
|
-
color: var(--navbar-text-color);
|
|
59
|
-
text-decoration: none;
|
|
60
|
-
}
|
|
61
|
-
:hover {
|
|
62
|
-
text-decoration: underline;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
const NavbarItemsClosableArea = styled.div`
|
|
69
|
-
display: flex;
|
|
70
|
-
flex: 1;
|
|
71
|
-
min-width: 50px;
|
|
72
|
-
height: 100%;
|
|
73
|
-
background-color: rgba(255, 255, 255, 0.4);
|
|
74
|
-
`;
|
|
75
|
-
|
|
76
|
-
const NavbarItemsContainer = styled.ul`
|
|
77
|
-
width: 70%;
|
|
78
|
-
list-style: none;
|
|
79
|
-
margin: 0;
|
|
80
|
-
padding: 0;
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
background: var(--navbar-background-color);
|
|
84
|
-
|
|
85
|
-
${NavbarMenuItem} {
|
|
86
|
-
&:not(:last-child) {
|
|
87
|
-
border-bottom: 1px solid var(--navbar-item-separator-line-color, #dadada);
|
|
88
|
-
}
|
|
89
|
-
border-radius: 0;
|
|
90
|
-
padding: 1em 0;
|
|
91
|
-
width: 100%;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
${NavbarMenuItemWithDropdownWrapper} {
|
|
95
|
-
display: block;
|
|
96
|
-
&:not(:last-child) {
|
|
97
|
-
border-bottom: 1px solid var(--navbar-item-separator-line-color, #dadada);
|
|
98
|
-
border-radius: 0;
|
|
99
|
-
}
|
|
100
|
-
${NavbarMenuItem} {
|
|
101
|
-
border-bottom: none;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
${DropdownWrapper} {
|
|
106
|
-
background-color: var(--navbar-background-color);
|
|
107
|
-
width: 100%;
|
|
108
|
-
padding: 0;
|
|
109
|
-
position: relative;
|
|
110
|
-
}
|
|
111
|
-
`;
|
|
112
|
-
|
|
113
|
-
const MobileSearchWrapper = styled.div`
|
|
114
|
-
padding: var(--navbar-item-padding-horizontal);
|
|
115
|
-
> div {
|
|
116
|
-
display: block;
|
|
117
|
-
width: 100%;
|
|
118
|
-
}
|
|
119
|
-
input {
|
|
120
|
-
width: 100%;
|
|
121
|
-
}
|
|
122
|
-
`;
|
package/src/Navbar/Navbar.tsx
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { NavbarMenu } from '@theme/Navbar';
|
|
5
|
-
import { useMobileMenu } from '@theme/hooks/useMobileMenu';
|
|
6
|
-
import { isEmptyArray, isPrimitive } from '@theme/utils';
|
|
7
|
-
import { MobileNavbarMenuButton } from '@theme/Navbar/MobileNavbarMenuButton';
|
|
8
|
-
import { MobileNavbarMenu } from '@theme/Navbar/MobileNavbarMenu';
|
|
9
|
-
import { ColorModeSwitcher } from '@theme/ColorModeSwitcher/ColorModeSwitcher';
|
|
10
|
-
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
11
|
-
import type { ResolvedConfigLinks } from '@theme/types/portal';
|
|
12
|
-
|
|
13
|
-
interface NavbarProps {
|
|
14
|
-
menu: ResolvedConfigLinks;
|
|
15
|
-
logo: React.ReactNode;
|
|
16
|
-
search: React.ReactNode;
|
|
17
|
-
profile?: React.ReactNode;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function Navbar({ menu, logo, search, profile }: NavbarProps): JSX.Element | null {
|
|
21
|
-
const [isOpen, setIsOpen] = useMobileMenu(false);
|
|
22
|
-
const { search: searchSettings, navbar, userProfile: userProfileSettings } = useThemeConfig();
|
|
23
|
-
const hideSearch =
|
|
24
|
-
searchSettings?.hide || (searchSettings?.placement && searchSettings?.placement !== 'navbar');
|
|
25
|
-
const hideUserProfile = userProfileSettings?.hide;
|
|
26
|
-
|
|
27
|
-
if (navbar?.hide) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const openMobileMenu = () => setIsOpen(true);
|
|
32
|
-
const closeMobileMenu = () => setIsOpen(false);
|
|
33
|
-
|
|
34
|
-
const menuItemsExist = !isPrimitive(menu) && !isEmptyArray(menu);
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<NavbarContainer data-component-name="Navbar/Navbar">
|
|
38
|
-
{menuItemsExist && <MobileNavbarMenuButton onClick={openMobileMenu} />}
|
|
39
|
-
|
|
40
|
-
{isOpen && (
|
|
41
|
-
<MobileNavbarMenu
|
|
42
|
-
closeMenu={closeMobileMenu}
|
|
43
|
-
menuItems={menu}
|
|
44
|
-
search={hideSearch ? null : search}
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
<NavbarRow>
|
|
48
|
-
{logo}
|
|
49
|
-
<NavbarMenu menuItems={menu} />
|
|
50
|
-
{hideSearch ? null : search}
|
|
51
|
-
{hideUserProfile ? null : profile}
|
|
52
|
-
<ColorModeSwitcher />
|
|
53
|
-
</NavbarRow>
|
|
54
|
-
</NavbarContainer>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export const NavbarContainer = styled.nav`
|
|
59
|
-
--text-color: var(--navbar-text-color);
|
|
60
|
-
|
|
61
|
-
height: var(--navbar-height);
|
|
62
|
-
box-sizing: border-box;
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
flex-shrink: 0;
|
|
66
|
-
|
|
67
|
-
font-size: 0.875rem;
|
|
68
|
-
position: sticky;
|
|
69
|
-
top: 0;
|
|
70
|
-
z-index: 200;
|
|
71
|
-
padding: var(--navbar-item-paddin-vertical) var(--navbar-item-padding-horizontal);
|
|
72
|
-
background: var(--navbar-background-color);
|
|
73
|
-
font-family: var(--navbar-item-font-family);
|
|
74
|
-
|
|
75
|
-
${({ theme }) => theme.mediaQueries.medium} {
|
|
76
|
-
font-size: 1rem;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
${({ theme }) => theme.mediaQueries.print} {
|
|
80
|
-
background: transparent;
|
|
81
|
-
display: none;
|
|
82
|
-
> :not(a, img) {
|
|
83
|
-
display: none !important;
|
|
84
|
-
}
|
|
85
|
-
img {
|
|
86
|
-
padding: 0;
|
|
87
|
-
margin: 0;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
export const NavbarRow = styled.div`
|
|
93
|
-
display: flex;
|
|
94
|
-
align-items: center;
|
|
95
|
-
justify-content: space-between;
|
|
96
|
-
margin: 0 auto;
|
|
97
|
-
width: 100%;
|
|
98
|
-
|
|
99
|
-
max-width: var(--navbar-container-max-width);
|
|
100
|
-
`;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { useLocation } from 'react-router-dom';
|
|
4
|
-
|
|
5
|
-
import { Link } from '@portal/Link';
|
|
6
|
-
import { withPathPrefix } from '@portal/utils';
|
|
7
|
-
import { NavbarDropdown, DropdownWrapper } from '@theme/Navbar/NavbarDropdown';
|
|
8
|
-
import type {
|
|
9
|
-
ResolvedNavItem,
|
|
10
|
-
ResolvedNavLinkItem,
|
|
11
|
-
ResolvedNavGroupItem,
|
|
12
|
-
} from '@theme/types/portal';
|
|
13
|
-
|
|
14
|
-
export interface NavbarItemProps {
|
|
15
|
-
navItem: ResolvedNavItem;
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function NavbarItem({ navItem, className }: NavbarItemProps): JSX.Element | null {
|
|
20
|
-
const { pathname } = useLocation();
|
|
21
|
-
|
|
22
|
-
if ((navItem as ResolvedNavLinkItem).link) {
|
|
23
|
-
const item = navItem as ResolvedNavLinkItem;
|
|
24
|
-
|
|
25
|
-
const isActive = pathname === withPathPrefix(item.link);
|
|
26
|
-
return (
|
|
27
|
-
<NavbarMenuItem
|
|
28
|
-
active={isActive}
|
|
29
|
-
data-component-name="Navbar/NavbarItem"
|
|
30
|
-
className={className}
|
|
31
|
-
>
|
|
32
|
-
<NavbarLink to={item.link} external={item.external} target={item.target} active={isActive}>
|
|
33
|
-
<NavbarLabel>{item.label}</NavbarLabel>
|
|
34
|
-
</NavbarLink>
|
|
35
|
-
</NavbarMenuItem>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if ((navItem as ResolvedNavGroupItem).items) {
|
|
40
|
-
const item = navItem as ResolvedNavGroupItem;
|
|
41
|
-
return (
|
|
42
|
-
<NavbarMenuItemWithDropdownWrapper>
|
|
43
|
-
<NavbarMenuItem
|
|
44
|
-
active={false}
|
|
45
|
-
data-component-name="Navbar/NavbarItem"
|
|
46
|
-
className={className}
|
|
47
|
-
>
|
|
48
|
-
<NavbarLabel>{item.label}</NavbarLabel>
|
|
49
|
-
</NavbarMenuItem>
|
|
50
|
-
<NavbarDropdown items={item.items as ResolvedNavLinkItem[]} />
|
|
51
|
-
</NavbarMenuItemWithDropdownWrapper>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export const NavbarMenuItemWithDropdownWrapper = styled.div`
|
|
59
|
-
display: inline-block;
|
|
60
|
-
position: relative;
|
|
61
|
-
border-radius: var(--navbar-item-border-radius);
|
|
62
|
-
&:hover {
|
|
63
|
-
background: var(--navbar-item-active-background-color);
|
|
64
|
-
${DropdownWrapper} {
|
|
65
|
-
display: block;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
69
|
-
|
|
70
|
-
export const NavbarLink = styled(Link)`
|
|
71
|
-
color: ${({ active }) =>
|
|
72
|
-
active ? 'var(--navbar-item-active-text-color)' : 'var(--navbar-text-color)'};
|
|
73
|
-
text-decoration: ${({ active }) =>
|
|
74
|
-
active ? 'var(--navbar-item-active-text-decoration)' : 'none'};
|
|
75
|
-
`;
|
|
76
|
-
|
|
77
|
-
export const NavbarMenuItem = styled.li<{ active?: boolean }>`
|
|
78
|
-
display: inline-block;
|
|
79
|
-
padding: var(--navbar-item-paddin-vertical) var(--navbar-item-padding-horizontal);
|
|
80
|
-
margin-left: var(--navbar-item-margin-horizontal);
|
|
81
|
-
text-align: center;
|
|
82
|
-
line-height: 1;
|
|
83
|
-
font-size: var(--navbar-item-font-size);
|
|
84
|
-
border-radius: var(--navbar-item-border-radius);
|
|
85
|
-
font-weight: var(--navbar-item-font-weight);
|
|
86
|
-
background: ${({ active }) => active && 'var(--navbar-item-active-background-color)'};
|
|
87
|
-
color: ${({ active }) => active && 'var(--navbar-item-active-text-color)'};
|
|
88
|
-
&:hover {
|
|
89
|
-
color: var(--navbar-item-hover-text-color);
|
|
90
|
-
text-decoration: var(--navbar-item-hover-text-decoration);
|
|
91
|
-
background: var(--navbar-item-hover-background-color);
|
|
92
|
-
${NavbarLink} {
|
|
93
|
-
color: var(--navbar-item-hover-text-color);
|
|
94
|
-
text-decoration: var(--navbar-item-hover-text-decoration);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
`;
|
|
98
|
-
|
|
99
|
-
const NavbarLabel = styled.span`
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
vertical-align: middle;
|
|
102
|
-
`;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { NavbarItem } from '@theme/Navbar/NavbarItem';
|
|
5
|
-
import { isPrimitive } from '@theme/utils';
|
|
6
|
-
import type { ResolvedConfigLinks, ResolvedNavItem } from '@theme/types/portal';
|
|
7
|
-
|
|
8
|
-
export function NavbarMenu({ menuItems }: { menuItems: ResolvedConfigLinks }): JSX.Element | null {
|
|
9
|
-
if (isPrimitive(menuItems)) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<NavItemsContainer data-component-name="Navbar/NavbarMenu">
|
|
15
|
-
{(menuItems as ResolvedNavItem[]).map((navItem, index) => {
|
|
16
|
-
return (
|
|
17
|
-
<NavbarItem key={`${navItem.label}_${index}`} data-cy={navItem.label} navItem={navItem} />
|
|
18
|
-
);
|
|
19
|
-
})}
|
|
20
|
-
</NavItemsContainer>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const NavItemsContainer = styled.ul`
|
|
25
|
-
list-style: none;
|
|
26
|
-
margin: 0 var(--navbar-item-margin-horizontal);
|
|
27
|
-
padding: 0;
|
|
28
|
-
display: none;
|
|
29
|
-
flex-wrap: nowrap;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: flex-end;
|
|
32
|
-
flex: 1;
|
|
33
|
-
|
|
34
|
-
${({ theme }) => theme.mediaQueries.medium} {
|
|
35
|
-
display: flex;
|
|
36
|
-
}
|
|
37
|
-
`;
|
package/src/Navbar/index.ts
DELETED
package/src/NavbarLogo/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@theme/NavbarLogo/NavbarLogo';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@theme/OperationBadge/OperationBadge';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { useSidebarSiblingsData } from '@portal/hooks';
|
|
5
|
-
import { Button } from '@theme/Button/Button';
|
|
6
|
-
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
7
|
-
import type { ResolvedNavItemWithLink } from '@theme/types/portal';
|
|
8
|
-
|
|
9
|
-
interface NextPageType {
|
|
10
|
-
nextPage?: ResolvedNavItemWithLink | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function NextButton(): JSX.Element {
|
|
14
|
-
const { nextPage }: NextPageType = useSidebarSiblingsData() || {};
|
|
15
|
-
const { navigation } = useThemeConfig();
|
|
16
|
-
|
|
17
|
-
if (!nextPage || navigation?.nextButton?.hide) {
|
|
18
|
-
return <div> </div>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const text = (navigation?.nextButton?.text || 'Next to {label}').replace(
|
|
22
|
-
'{label}',
|
|
23
|
-
nextPage.label || nextPage.routeSlug || '',
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<StyledButton
|
|
28
|
-
variant="outlined"
|
|
29
|
-
size="large"
|
|
30
|
-
to={nextPage.link}
|
|
31
|
-
data-component-name="PageNavigation/NextPageLink"
|
|
32
|
-
>
|
|
33
|
-
{text}
|
|
34
|
-
</StyledButton>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const StyledButton = styled(Button)`
|
|
39
|
-
font-family: var(--font-family-base);
|
|
40
|
-
`;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { PreviousButton } from '@theme/PageNavigation/PreviousButton';
|
|
5
|
-
import { NextButton } from '@theme/PageNavigation/NextButton';
|
|
6
|
-
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
7
|
-
|
|
8
|
-
export function PageNavigation(): JSX.Element | null {
|
|
9
|
-
const { navigation } = useThemeConfig();
|
|
10
|
-
|
|
11
|
-
if (navigation?.previousButton?.hide && navigation?.nextButton?.hide) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<PageNavigationWrapper data-component-name="PageNavigation/PageNavigation">
|
|
17
|
-
<PreviousButton />
|
|
18
|
-
<NextButton />
|
|
19
|
-
</PageNavigationWrapper>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const PageNavigationWrapper = styled.div`
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: space-between;
|
|
26
|
-
margin: 25px 0;
|
|
27
|
-
|
|
28
|
-
@media print {
|
|
29
|
-
display: none;
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { useSidebarSiblingsData } from '@portal/hooks';
|
|
5
|
-
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
6
|
-
import { Button } from '@theme/Button/Button';
|
|
7
|
-
import type { ResolvedNavItemWithLink } from '@theme/types/portal';
|
|
8
|
-
|
|
9
|
-
interface PreviousPageType {
|
|
10
|
-
prevPage?: ResolvedNavItemWithLink | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function PreviousButton(): JSX.Element {
|
|
14
|
-
const { prevPage }: PreviousPageType = useSidebarSiblingsData() || {};
|
|
15
|
-
const { navigation } = useThemeConfig();
|
|
16
|
-
|
|
17
|
-
if (!prevPage || navigation?.previousButton?.hide) {
|
|
18
|
-
return <div> </div>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const text = (navigation?.previousButton?.text || 'Back to {label}').replace(
|
|
22
|
-
'{label}',
|
|
23
|
-
prevPage.label || prevPage.routeSlug || '',
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<StyledButton
|
|
28
|
-
variant="outlined"
|
|
29
|
-
size="large"
|
|
30
|
-
to={prevPage.link}
|
|
31
|
-
data-component-name="PageNavigation/PreviousPageLink"
|
|
32
|
-
>
|
|
33
|
-
{text}
|
|
34
|
-
</StyledButton>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const StyledButton = styled(Button)`
|
|
39
|
-
font-family: var(--font-family-base);
|
|
40
|
-
`;
|
package/src/Pages/Forbidden.tsx
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { Button } from '@theme/Button';
|
|
5
|
-
|
|
6
|
-
export function Forbidden(): JSX.Element {
|
|
7
|
-
return (
|
|
8
|
-
<Wrapper data-component-name="Pages/Forbidden">
|
|
9
|
-
<Header>403</Header>
|
|
10
|
-
<Description>Access forbidden</Description>
|
|
11
|
-
<HomeButton color="primary" size="large" to="/">
|
|
12
|
-
Open Homepage
|
|
13
|
-
</HomeButton>
|
|
14
|
-
</Wrapper>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Wrapper = styled.div`
|
|
19
|
-
margin: 25px auto;
|
|
20
|
-
font-family: var(--page-403-font-family);
|
|
21
|
-
text-align: center;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
const Header = styled.div`
|
|
25
|
-
color: var(--page-403-header-text-color);
|
|
26
|
-
margin: var(--page-403-header-margin);
|
|
27
|
-
font-size: var(--page-403-header-font-size);
|
|
28
|
-
line-height: var(--page-403-header-line-height);
|
|
29
|
-
font-weight: var(--page-403-header-font-weight);
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
|
-
const Description = styled.div`
|
|
33
|
-
color: var(--page-403-description-text-color);
|
|
34
|
-
margin: var(--page-403-description-margin);
|
|
35
|
-
font-size: var(--page-403-description-font-size);
|
|
36
|
-
line-height: var(--page-403-description-line-height);
|
|
37
|
-
font-weight: var(--page-403-description-font-weight);
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
const HomeButton = styled(Button)`
|
|
41
|
-
margin-top: var(--page-403-button-margin);
|
|
42
|
-
`;
|
package/src/Pages/NotFound.tsx
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { Button } from '@theme/Button';
|
|
5
|
-
|
|
6
|
-
export function NotFound(): JSX.Element {
|
|
7
|
-
return (
|
|
8
|
-
<Wrapper data-component-name="Pages/NotFound">
|
|
9
|
-
<Header>404</Header>
|
|
10
|
-
<Description>It looks like you're lost</Description>
|
|
11
|
-
<HomeButton color="primary" size="large" to="/">
|
|
12
|
-
Open Homepage
|
|
13
|
-
</HomeButton>
|
|
14
|
-
</Wrapper>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Wrapper = styled.div`
|
|
19
|
-
margin: 25px auto;
|
|
20
|
-
font-family: var(--page-404-font-family);
|
|
21
|
-
text-align: center;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
const Header = styled.div`
|
|
25
|
-
color: var(--page-404-header-text-color);
|
|
26
|
-
margin: var(--page-404-header-margin);
|
|
27
|
-
font-size: var(--page-404-header-font-size);
|
|
28
|
-
line-height: var(--page-404-header-line-height);
|
|
29
|
-
font-weight: var(--page-404-header-font-weight);
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
|
-
const Description = styled.div`
|
|
33
|
-
color: var(--page-404-description-text-color);
|
|
34
|
-
margin: var(--page-404-description-margin);
|
|
35
|
-
font-size: var(--page-404-description-font-size);
|
|
36
|
-
line-height: var(--page-404-description-line-height);
|
|
37
|
-
font-weight: var(--page-404-description-font-weight);
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
const HomeButton = styled(Button)`
|
|
41
|
-
margin-top: var(--page-404-button-margin);
|
|
42
|
-
`;
|
package/src/Pages/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@theme/Pages/NotFound';
|