@redocly/theme 0.0.0-react18-20231120182601
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/LICENSE +1 -0
- package/README.md +1 -0
- package/lib/components/ApiOnboarding/AppCustomAttributes.d.ts +5 -0
- package/lib/components/ApiOnboarding/AppCustomAttributes.js +10 -0
- package/lib/components/Breadcrumbs/Breadcrumb.d.ts +7 -0
- package/lib/components/Breadcrumbs/Breadcrumb.js +41 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.js +51 -0
- package/lib/components/Breadcrumbs/index.d.ts +3 -0
- package/lib/components/Breadcrumbs/index.js +20 -0
- package/lib/components/Breadcrumbs/styledVariables.d.ts +1 -0
- package/lib/components/Breadcrumbs/styledVariables.js +20 -0
- package/lib/components/Button/Button.d.ts +22 -0
- package/lib/components/Button/Button.js +158 -0
- package/lib/components/Button/index.d.ts +2 -0
- package/lib/components/Button/index.js +19 -0
- package/lib/components/Button/styledVariables.d.ts +1 -0
- package/lib/components/Button/styledVariables.js +118 -0
- package/lib/components/Cards/Card.d.ts +9 -0
- package/lib/components/Cards/Card.js +38 -0
- package/lib/components/Cards/CardsBlock.d.ts +1 -0
- package/lib/components/Cards/CardsBlock.js +16 -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 +16 -0
- package/lib/components/Catalog/Catalog.js +178 -0
- package/lib/components/Catalog/CatalogCard.d.ts +5 -0
- package/lib/components/Catalog/CatalogCard.js +167 -0
- package/lib/components/Catalog/index.d.ts +4 -0
- package/lib/components/Catalog/index.js +21 -0
- package/lib/components/Catalog/styledVariables.d.ts +1 -0
- package/lib/components/Catalog/styledVariables.js +97 -0
- package/lib/components/Catalog/useCatalog.d.ts +4 -0
- package/lib/components/Catalog/useCatalog.js +317 -0
- package/lib/components/CodeBlock/CodeBlock.d.ts +29 -0
- package/lib/components/CodeBlock/CodeBlock.js +66 -0
- package/lib/components/CodeBlock/CodeBlockContainer.d.ts +3 -0
- package/lib/components/CodeBlock/CodeBlockContainer.js +148 -0
- package/lib/components/CodeBlock/CodeBlockControlButton.d.ts +4 -0
- package/lib/components/CodeBlock/CodeBlockControlButton.js +52 -0
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +33 -0
- package/lib/components/CodeBlock/CodeBlockControls.js +63 -0
- package/lib/components/CodeBlock/index.d.ts +5 -0
- package/lib/components/CodeBlock/index.js +22 -0
- package/lib/components/CodeBlock/styledVariables.d.ts +1 -0
- package/lib/components/CodeBlock/styledVariables.js +92 -0
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.d.ts +6 -0
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +83 -0
- package/lib/components/ColorModeSwitcher/index.d.ts +1 -0
- package/lib/components/ColorModeSwitcher/index.js +18 -0
- package/lib/components/CopyButton/CopyButton.d.ts +15 -0
- package/lib/components/CopyButton/CopyButton.js +53 -0
- package/lib/components/CopyButton/index.d.ts +1 -0
- package/lib/components/CopyButton/index.js +18 -0
- package/lib/components/Dropdown/Dropdown.d.ts +22 -0
- package/lib/components/Dropdown/Dropdown.js +116 -0
- package/lib/components/Dropdown/index.d.ts +2 -0
- package/lib/components/Dropdown/index.js +19 -0
- package/lib/components/Dropdown/styledVariables.d.ts +1 -0
- package/lib/components/Dropdown/styledVariables.js +30 -0
- package/lib/components/EditPageButton/EditPageButton.d.ts +5 -0
- package/lib/components/EditPageButton/EditPageButton.js +43 -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 +123 -0
- package/lib/components/Feedback/Emotions.d.ts +4 -0
- package/lib/components/Feedback/Emotions.js +57 -0
- package/lib/components/Feedback/Feedback.d.ts +5 -0
- package/lib/components/Feedback/Feedback.js +88 -0
- package/lib/components/Feedback/Mood.d.ts +8 -0
- package/lib/components/Feedback/Mood.js +197 -0
- package/lib/components/Feedback/Rating.d.ts +4 -0
- package/lib/components/Feedback/Rating.js +134 -0
- package/lib/components/Feedback/Reasons.d.ts +3 -0
- package/lib/components/Feedback/Reasons.js +82 -0
- package/lib/components/Feedback/ReportDialog.d.ts +3 -0
- package/lib/components/Feedback/ReportDialog.js +77 -0
- package/lib/components/Feedback/Scale.d.ts +4 -0
- package/lib/components/Feedback/Scale.js +180 -0
- package/lib/components/Feedback/Sentiment.d.ts +3 -0
- package/lib/components/Feedback/Sentiment.js +167 -0
- package/lib/components/Feedback/Stars.d.ts +8 -0
- package/lib/components/Feedback/Stars.js +54 -0
- package/lib/components/Feedback/Thumbs.d.ts +3 -0
- package/lib/components/Feedback/Thumbs.js +49 -0
- package/lib/components/Feedback/index.d.ts +10 -0
- package/lib/components/Feedback/index.js +37 -0
- package/lib/components/Feedback/types.d.ts +128 -0
- package/lib/components/Feedback/types.js +3 -0
- package/lib/components/Feedback/useReportDialog.d.ts +13 -0
- package/lib/components/Feedback/useReportDialog.js +46 -0
- package/lib/components/Filter/Filter.d.ts +9 -0
- package/lib/components/Filter/Filter.js +199 -0
- package/lib/components/Filter/FilterContent.d.ts +13 -0
- package/lib/components/Filter/FilterContent.js +69 -0
- package/lib/components/Filter/FilterPopover.d.ts +13 -0
- package/lib/components/Filter/FilterPopover.js +106 -0
- package/lib/components/Filter/FilterTag.d.ts +7 -0
- package/lib/components/Filter/FilterTag.js +33 -0
- package/lib/components/Filter/FilterTags.d.ts +7 -0
- package/lib/components/Filter/FilterTags.js +29 -0
- package/lib/components/Filter/index.d.ts +6 -0
- package/lib/components/Filter/index.js +23 -0
- package/lib/components/Filter/styledVariables.d.ts +1 -0
- package/lib/components/Filter/styledVariables.js +111 -0
- package/lib/components/Footer/CustomFooter.d.ts +8 -0
- package/lib/components/Footer/CustomFooter.js +35 -0
- package/lib/components/Footer/CustomFooterNavItem.d.ts +8 -0
- package/lib/components/Footer/CustomFooterNavItem.js +33 -0
- package/lib/components/Footer/Footer.d.ts +11 -0
- package/lib/components/Footer/Footer.js +58 -0
- package/lib/components/Footer/FooterColumn.d.ts +12 -0
- package/lib/components/Footer/FooterColumn.js +111 -0
- package/lib/components/Footer/FooterColumns.d.ts +10 -0
- package/lib/components/Footer/FooterColumns.js +46 -0
- package/lib/components/Footer/FooterCopyright.d.ts +7 -0
- package/lib/components/Footer/FooterCopyright.js +33 -0
- package/lib/components/Footer/index.d.ts +5 -0
- package/lib/components/Footer/index.js +22 -0
- package/lib/components/Footer/styledVariables.d.ts +1 -0
- package/lib/components/Footer/styledVariables.js +61 -0
- package/lib/components/Image/Image.d.ts +9 -0
- package/lib/components/Image/Image.js +31 -0
- package/lib/components/Image/index.d.ts +1 -0
- package/lib/components/Image/index.js +18 -0
- package/lib/components/JsonViewer/JsonViewer.d.ts +14 -0
- package/lib/components/JsonViewer/JsonViewer.js +221 -0
- package/lib/components/JsonViewer/index.d.ts +1 -0
- package/lib/components/JsonViewer/index.js +18 -0
- package/lib/components/LastUpdated/LastUpdated.d.ts +15 -0
- package/lib/components/LastUpdated/LastUpdated.js +84 -0
- package/lib/components/LastUpdated/index.d.ts +2 -0
- package/lib/components/LastUpdated/index.js +19 -0
- package/lib/components/LastUpdated/styledVariables.d.ts +1 -0
- package/lib/components/LastUpdated/styledVariables.js +11 -0
- package/lib/components/Markdown/Admonition.d.ts +12 -0
- package/lib/components/Markdown/Admonition.js +59 -0
- package/lib/components/Markdown/ContainerWrapper.d.ts +3 -0
- package/lib/components/Markdown/ContainerWrapper.js +27 -0
- package/lib/components/Markdown/Details.d.ts +7 -0
- package/lib/components/Markdown/Details.js +17 -0
- package/lib/components/Markdown/Heading.d.ts +8 -0
- package/lib/components/Markdown/Heading.js +48 -0
- package/lib/components/Markdown/MarkdownLayout.d.ts +17 -0
- package/lib/components/Markdown/MarkdownLayout.js +47 -0
- package/lib/components/Markdown/MarkdownWrapper.d.ts +8 -0
- package/lib/components/Markdown/MarkdownWrapper.js +415 -0
- package/lib/components/Markdown/Mermaid.d.ts +9 -0
- package/lib/components/Markdown/Mermaid.js +23 -0
- package/lib/components/Markdown/PageWrapper.d.ts +1 -0
- package/lib/components/Markdown/PageWrapper.js +16 -0
- package/lib/components/Markdown/Sup.d.ts +4 -0
- package/lib/components/Markdown/Sup.js +14 -0
- package/lib/components/Markdown/index.d.ts +10 -0
- package/lib/components/Markdown/index.js +27 -0
- package/lib/components/Markdown/styledVariables.d.ts +3 -0
- package/lib/components/Markdown/styledVariables.js +285 -0
- package/lib/components/Menu/Menu.d.ts +12 -0
- package/lib/components/Menu/Menu.js +28 -0
- package/lib/components/Menu/MenuContainer.d.ts +6 -0
- package/lib/components/Menu/MenuContainer.js +18 -0
- package/lib/components/Menu/MenuGroup.d.ts +10 -0
- package/lib/components/Menu/MenuGroup.js +107 -0
- package/lib/components/Menu/MenuItem.d.ts +3 -0
- package/lib/components/Menu/MenuItem.js +44 -0
- package/lib/components/Menu/MenuItemLabel.d.ts +3 -0
- package/lib/components/Menu/MenuItemLabel.js +51 -0
- package/lib/components/Menu/MenuItemSwitch.d.ts +4 -0
- package/lib/components/Menu/MenuItemSwitch.js +40 -0
- package/lib/components/Menu/MenuLink.d.ts +2 -0
- package/lib/components/Menu/MenuLink.js +16 -0
- package/lib/components/Menu/MenuLinkItem.d.ts +3 -0
- package/lib/components/Menu/MenuLinkItem.js +16 -0
- package/lib/components/Menu/MobileMenu.d.ts +4 -0
- package/lib/components/Menu/MobileMenu.js +144 -0
- package/lib/components/Menu/MobileMenuGroup.d.ts +9 -0
- package/lib/components/Menu/MobileMenuGroup.js +61 -0
- package/lib/components/Menu/constants.d.ts +5 -0
- package/lib/components/Menu/constants.js +10 -0
- package/lib/components/Menu/hooks/use-mobile-menu-items.d.ts +2 -0
- package/lib/components/Menu/hooks/use-mobile-menu-items.js +80 -0
- package/lib/components/Menu/hooks/use-mobile-menu-levels.d.ts +5 -0
- package/lib/components/Menu/hooks/use-mobile-menu-levels.js +46 -0
- package/lib/components/Menu/index.d.ts +13 -0
- package/lib/components/Menu/index.js +30 -0
- package/lib/components/Menu/styledVariables.d.ts +2 -0
- package/lib/components/Menu/styledVariables.js +103 -0
- package/lib/components/Menu/types.d.ts +4 -0
- package/lib/components/Menu/types.js +3 -0
- package/lib/components/Menu/utils.d.ts +8 -0
- package/lib/components/Menu/utils.js +76 -0
- package/lib/components/Navbar/BurgerButton.d.ts +5 -0
- package/lib/components/Navbar/BurgerButton.js +29 -0
- package/lib/components/Navbar/Navbar.d.ts +16 -0
- package/lib/components/Navbar/Navbar.js +159 -0
- package/lib/components/Navbar/NavbarItem.d.ts +20 -0
- package/lib/components/Navbar/NavbarItem.js +128 -0
- package/lib/components/Navbar/NavbarMenu.d.ts +6 -0
- package/lib/components/Navbar/NavbarMenu.js +34 -0
- package/lib/components/Navbar/index.d.ts +5 -0
- package/lib/components/Navbar/index.js +22 -0
- package/lib/components/Navbar/styledVariables.d.ts +1 -0
- package/lib/components/Navbar/styledVariables.js +42 -0
- package/lib/components/NavbarLogo/NavbarLogo.d.ts +10 -0
- package/lib/components/NavbarLogo/NavbarLogo.js +34 -0
- package/lib/components/NavbarLogo/index.d.ts +2 -0
- package/lib/components/NavbarLogo/index.js +19 -0
- package/lib/components/NavbarLogo/styledVariables.d.ts +1 -0
- package/lib/components/NavbarLogo/styledVariables.js +17 -0
- package/lib/components/OpenApiDocs/ClearButton.d.ts +8 -0
- package/lib/components/OpenApiDocs/ClearButton.js +48 -0
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.d.ts +3 -0
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.js +178 -0
- package/lib/components/OpenApiDocs/Dropdown.d.ts +28 -0
- package/lib/components/OpenApiDocs/Dropdown.js +150 -0
- package/lib/components/OpenApiDocs/ScorecardBadges.d.ts +11 -0
- package/lib/components/OpenApiDocs/ScorecardBadges.js +58 -0
- package/lib/components/OpenApiDocs/TryItSecurityApps.d.ts +7 -0
- package/lib/components/OpenApiDocs/TryItSecurityApps.js +15 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiOperation.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiOperation.js +11 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiOperationSummary.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiOperationSummary.js +11 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiTitle.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiTitle.js +11 -0
- package/lib/components/OpenApiDocs/hooks/BeforeOpenApiOperation.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/BeforeOpenApiOperation.js +11 -0
- package/lib/components/OpenApiDocs/hooks/BeforeOpenApiOperationSummary.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/BeforeOpenApiOperationSummary.js +11 -0
- package/lib/components/OpenApiDocs/hooks/OpenApiFooter.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/OpenApiFooter.js +8 -0
- package/lib/components/OpenApiDocs/hooks/OpenApiHeader.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/OpenApiHeader.js +8 -0
- package/lib/components/OpenApiDocs/hooks/OpenApiTryItSecurityPanel.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/OpenApiTryItSecurityPanel.js +14 -0
- package/lib/components/OpenApiDocs/index.d.ts +10 -0
- package/lib/components/OpenApiDocs/index.js +27 -0
- package/lib/components/PageNavigation/NextButton.d.ts +8 -0
- package/lib/components/PageNavigation/NextButton.js +53 -0
- package/lib/components/PageNavigation/PageNavigation.d.ts +9 -0
- package/lib/components/PageNavigation/PageNavigation.js +33 -0
- package/lib/components/PageNavigation/PreviousButton.d.ts +8 -0
- package/lib/components/PageNavigation/PreviousButton.js +33 -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/PanelBody.d.ts +6 -0
- package/lib/components/Panel/PanelBody.js +62 -0
- package/lib/components/Panel/PanelComponent.d.ts +13 -0
- package/lib/components/Panel/PanelComponent.js +65 -0
- package/lib/components/Panel/PanelHeader.d.ts +7 -0
- package/lib/components/Panel/PanelHeader.js +35 -0
- package/lib/components/Panel/PanelHeaderTitle.d.ts +1 -0
- package/lib/components/Panel/PanelHeaderTitle.js +18 -0
- package/lib/components/Panel/index.d.ts +6 -0
- package/lib/components/Panel/index.js +23 -0
- package/lib/components/Panel/styledVariables.d.ts +2 -0
- package/lib/components/Panel/styledVariables.js +482 -0
- package/lib/components/Product/Product.d.ts +7 -0
- package/lib/components/Product/Product.js +23 -0
- package/lib/components/Product/ProductPicker.d.ts +2 -0
- package/lib/components/Product/ProductPicker.js +90 -0
- package/lib/components/Product/index.d.ts +3 -0
- package/lib/components/Product/index.js +20 -0
- package/lib/components/Product/styledVariables.d.ts +2 -0
- package/lib/components/Product/styledVariables.js +42 -0
- package/lib/components/Profile/AuthUserProfile.d.ts +2 -0
- package/lib/components/Profile/AuthUserProfile.js +22 -0
- package/lib/components/Profile/LoginLink.d.ts +5 -0
- package/lib/components/Profile/LoginLink.js +34 -0
- package/lib/components/Profile/MobileUserProfile.d.ts +2 -0
- package/lib/components/Profile/MobileUserProfile.js +64 -0
- package/lib/components/Profile/Profile.d.ts +15 -0
- package/lib/components/Profile/Profile.js +86 -0
- package/lib/components/Profile/UserProfile.d.ts +3 -0
- package/lib/components/Profile/UserProfile.js +107 -0
- package/lib/components/Profile/UserProfileData.d.ts +9 -0
- package/lib/components/Profile/UserProfileData.js +35 -0
- package/lib/components/Profile/index.d.ts +10 -0
- package/lib/components/Profile/index.js +28 -0
- package/lib/components/Profile/styledVariables.d.ts +2 -0
- package/lib/components/Profile/styledVariables.js +55 -0
- package/lib/components/Profile/types.d.ts +12 -0
- package/lib/components/Profile/types.js +3 -0
- package/lib/components/Scorecard/Card.d.ts +5 -0
- package/lib/components/Scorecard/Card.js +37 -0
- package/lib/components/Scorecard/Gauge.d.ts +11 -0
- package/lib/components/Scorecard/Gauge.js +61 -0
- package/lib/components/Scorecard/StatusByLevelWidget.d.ts +12 -0
- package/lib/components/Scorecard/StatusByLevelWidget.js +83 -0
- package/lib/components/Search/CancelSearch.d.ts +5 -0
- package/lib/components/Search/CancelSearch.js +48 -0
- package/lib/components/Search/ClearIcon.d.ts +3 -0
- package/lib/components/Search/ClearIcon.js +26 -0
- package/lib/components/Search/ClockBackwardsIcon.d.ts +3 -0
- package/lib/components/Search/ClockBackwardsIcon.js +26 -0
- package/lib/components/Search/Input.d.ts +1 -0
- package/lib/components/Search/Input.js +27 -0
- package/lib/components/Search/InputWrapper.d.ts +11 -0
- package/lib/components/Search/InputWrapper.js +80 -0
- package/lib/components/Search/MobileSearchTrigger.d.ts +5 -0
- package/lib/components/Search/MobileSearchTrigger.js +52 -0
- package/lib/components/Search/Popover.d.ts +1 -0
- package/lib/components/Search/Popover.js +35 -0
- package/lib/components/Search/ProductTag.d.ts +6 -0
- package/lib/components/Search/ProductTag.js +61 -0
- package/lib/components/Search/RecentSearches.d.ts +5 -0
- package/lib/components/Search/RecentSearches.js +126 -0
- package/lib/components/Search/Search.d.ts +4 -0
- package/lib/components/Search/Search.js +75 -0
- package/lib/components/Search/SearchDialog.d.ts +5 -0
- package/lib/components/Search/SearchDialog.js +146 -0
- package/lib/components/Search/SearchIcon.d.ts +3 -0
- package/lib/components/Search/SearchIcon.js +26 -0
- package/lib/components/Search/SearchItem.d.ts +10 -0
- package/lib/components/Search/SearchItem.js +130 -0
- package/lib/components/Search/SearchTrigger.d.ts +5 -0
- package/lib/components/Search/SearchTrigger.js +76 -0
- package/lib/components/Search/Shortcut.d.ts +6 -0
- package/lib/components/Search/Shortcut.js +51 -0
- package/lib/components/Search/ShortcutKey.d.ts +8 -0
- package/lib/components/Search/ShortcutKey.js +26 -0
- package/lib/components/Search/SuggestedPages.d.ts +4 -0
- package/lib/components/Search/SuggestedPages.js +104 -0
- package/lib/components/Search/index.d.ts +19 -0
- package/lib/components/Search/index.js +36 -0
- package/lib/components/Search/styledVariables.d.ts +1 -0
- package/lib/components/Search/styledVariables.js +98 -0
- package/lib/components/Search/utils.d.ts +2 -0
- package/lib/components/Search/utils.js +46 -0
- package/lib/components/Select/Select.d.ts +33 -0
- package/lib/components/Select/Select.js +139 -0
- package/lib/components/Select/index.d.ts +2 -0
- package/lib/components/Select/index.js +19 -0
- package/lib/components/Select/styledVariables.d.ts +1 -0
- package/lib/components/Select/styledVariables.js +34 -0
- package/lib/components/Separator/Separator.d.ts +3 -0
- package/lib/components/Separator/Separator.js +28 -0
- package/lib/components/Separator/SeparatorItem.d.ts +3 -0
- package/lib/components/Separator/SeparatorItem.js +31 -0
- package/lib/components/Separator/SeparatorLine.d.ts +1 -0
- package/lib/components/Separator/SeparatorLine.js +20 -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 +7 -0
- package/lib/components/Sidebar/ApiCallItem.js +47 -0
- package/lib/components/Sidebar/BackButton.d.ts +7 -0
- package/lib/components/Sidebar/BackButton.js +42 -0
- package/lib/components/Sidebar/Drilldown.d.ts +9 -0
- package/lib/components/Sidebar/Drilldown.js +45 -0
- package/lib/components/Sidebar/DrilldownMenu.d.ts +3 -0
- package/lib/components/Sidebar/DrilldownMenu.js +75 -0
- package/lib/components/Sidebar/DrilldownMenuItem.d.ts +3 -0
- package/lib/components/Sidebar/DrilldownMenuItem.js +37 -0
- package/lib/components/Sidebar/FooterWrapper.d.ts +3 -0
- package/lib/components/Sidebar/FooterWrapper.js +22 -0
- package/lib/components/Sidebar/HeaderWrapper.d.ts +1 -0
- package/lib/components/Sidebar/HeaderWrapper.js +16 -0
- package/lib/components/Sidebar/MobileSidebarButton.d.ts +3 -0
- package/lib/components/Sidebar/MobileSidebarButton.js +46 -0
- package/lib/components/Sidebar/MobileSidebarIcon.d.ts +4 -0
- package/lib/components/Sidebar/MobileSidebarIcon.js +16 -0
- package/lib/components/Sidebar/Sidebar.d.ts +6 -0
- package/lib/components/Sidebar/Sidebar.js +56 -0
- package/lib/components/Sidebar/SidebarItemIcon.d.ts +1 -0
- package/lib/components/Sidebar/SidebarItemIcon.js +16 -0
- package/lib/components/Sidebar/SidebarLayout.d.ts +18 -0
- package/lib/components/Sidebar/SidebarLayout.js +82 -0
- package/lib/components/Sidebar/VersionPicker.d.ts +11 -0
- package/lib/components/Sidebar/VersionPicker.js +117 -0
- package/lib/components/Sidebar/index.d.ts +15 -0
- package/lib/components/Sidebar/index.js +32 -0
- package/lib/components/Sidebar/styledVariables.d.ts +2 -0
- package/lib/components/Sidebar/styledVariables.js +222 -0
- package/lib/components/Sidebar/types.d.ts +48 -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.d.ts +7 -0
- package/lib/components/SidebarActions/CollapseSidebarButton.js +53 -0
- package/lib/components/SidebarActions/SidebarActions.d.ts +21 -0
- package/lib/components/SidebarActions/SidebarActions.js +38 -0
- package/lib/components/SidebarActions/ToggleRightPanelButton.d.ts +7 -0
- package/lib/components/SidebarActions/ToggleRightPanelButton.js +13 -0
- package/lib/components/SidebarActions/index.d.ts +4 -0
- package/lib/components/SidebarActions/index.js +24 -0
- package/lib/components/SidebarActions/styled.d.ts +17 -0
- package/lib/components/SidebarActions/styled.js +132 -0
- package/lib/components/SidebarLogo/SidebarLogo.d.ts +10 -0
- package/lib/components/SidebarLogo/SidebarLogo.js +31 -0
- package/lib/components/SidebarLogo/index.d.ts +1 -0
- package/lib/components/SidebarLogo/index.js +18 -0
- package/lib/components/TableOfContent/TableOfContent.d.ts +9 -0
- package/lib/components/TableOfContent/TableOfContent.js +113 -0
- package/lib/components/TableOfContent/index.d.ts +2 -0
- package/lib/components/TableOfContent/index.js +19 -0
- package/lib/components/TableOfContent/styledVariables.d.ts +1 -0
- package/lib/components/TableOfContent/styledVariables.js +47 -0
- package/lib/components/TableOfContent/utils.d.ts +4 -0
- package/lib/components/TableOfContent/utils.js +41 -0
- package/lib/components/Tabs/Tab.d.ts +9 -0
- package/lib/components/Tabs/Tab.js +58 -0
- package/lib/components/Tabs/Tabs.d.ts +12 -0
- package/lib/components/Tabs/Tabs.js +89 -0
- package/lib/components/Tabs/index.d.ts +2 -0
- package/lib/components/Tabs/index.js +19 -0
- package/lib/components/Tag/Tag.d.ts +18 -0
- package/lib/components/Tag/Tag.js +46 -0
- package/lib/components/Tag/index.d.ts +2 -0
- package/lib/components/Tag/index.js +19 -0
- package/lib/components/Tag/styledVariables.d.ts +1 -0
- package/lib/components/Tag/styledVariables.js +148 -0
- package/lib/components/Tiles/ThinTile.d.ts +5 -0
- package/lib/components/Tiles/ThinTile.js +126 -0
- package/lib/components/Tiles/TileHeader.d.ts +3 -0
- package/lib/components/Tiles/TileHeader.js +20 -0
- package/lib/components/Tiles/TileText.d.ts +3 -0
- package/lib/components/Tiles/TileText.js +19 -0
- package/lib/components/Tiles/WideTile.d.ts +7 -0
- package/lib/components/Tiles/WideTile.js +116 -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.d.ts +13 -0
- package/lib/components/Tooltip/Tooltip.js +175 -0
- package/lib/components/Tooltip/index.d.ts +2 -0
- package/lib/components/Tooltip/index.js +19 -0
- package/lib/components/Tooltip/styledVariables.d.ts +1 -0
- package/lib/components/Tooltip/styledVariables.js +21 -0
- package/lib/components/Typography/CompactTypography.d.ts +5 -0
- package/lib/components/Typography/CompactTypography.js +14 -0
- package/lib/components/Typography/Emphasis.d.ts +1 -0
- package/lib/components/Typography/Emphasis.js +14 -0
- package/lib/components/Typography/H1.d.ts +1 -0
- package/lib/components/Typography/H1.js +18 -0
- package/lib/components/Typography/H2.d.ts +1 -0
- package/lib/components/Typography/H2.js +18 -0
- package/lib/components/Typography/H3.d.ts +1 -0
- package/lib/components/Typography/H3.js +18 -0
- package/lib/components/Typography/SectionHeader.d.ts +1 -0
- package/lib/components/Typography/SectionHeader.js +20 -0
- package/lib/components/Typography/Typography.d.ts +13 -0
- package/lib/components/Typography/Typography.js +23 -0
- package/lib/components/Typography/index.d.ts +7 -0
- package/lib/components/Typography/index.js +24 -0
- package/lib/components/index.d.ts +29 -0
- package/lib/components/index.js +46 -0
- package/lib/config.d.ts +2441 -0
- package/lib/config.js +614 -0
- package/lib/globalStyle.d.ts +2 -0
- package/lib/globalStyle.js +994 -0
- package/lib/hooks/__tests__/mocks/MockIntersectionObserver.d.ts +15 -0
- package/lib/hooks/__tests__/mocks/MockIntersectionObserver.js +79 -0
- package/lib/hooks/index.d.ts +9 -0
- package/lib/hooks/index.js +26 -0
- package/lib/hooks/useActiveHeading.d.ts +2 -0
- package/lib/hooks/useActiveHeading.js +80 -0
- package/lib/hooks/useActiveSectionId.d.ts +3 -0
- package/lib/hooks/useActiveSectionId.js +44 -0
- package/lib/hooks/useControl.d.ts +6 -0
- package/lib/hooks/useControl.js +16 -0
- package/lib/hooks/useDialogHotKeys.d.ts +2 -0
- package/lib/hooks/useDialogHotKeys.js +45 -0
- package/lib/hooks/useFullHeight.d.ts +2 -0
- package/lib/hooks/useFullHeight.js +48 -0
- package/lib/hooks/useMobileMenu.d.ts +2 -0
- package/lib/hooks/useMobileMenu.js +18 -0
- package/lib/hooks/useModalScrollLock.d.ts +1 -0
- package/lib/hooks/useModalScrollLock.js +16 -0
- package/lib/hooks/useMount.d.ts +1 -0
- package/lib/hooks/useMount.js +12 -0
- package/lib/hooks/useNavbarHeight.d.ts +3 -0
- package/lib/hooks/useNavbarHeight.js +21 -0
- package/lib/hooks/useOutsideClick.d.ts +2 -0
- package/lib/hooks/useOutsideClick.js +22 -0
- package/lib/hooks/useThemeConfig.d.ts +4 -0
- package/lib/hooks/useThemeConfig.js +15 -0
- package/lib/hooks/useUnmount.d.ts +1 -0
- package/lib/hooks/useUnmount.js +14 -0
- package/lib/i18n/LanguagePicker.d.ts +9 -0
- package/lib/i18n/LanguagePicker.js +99 -0
- package/lib/i18n/index.d.ts +2 -0
- package/lib/i18n/index.js +21 -0
- package/lib/i18n/styledVariables.d.ts +1 -0
- package/lib/i18n/styledVariables.js +40 -0
- package/lib/icons/AlertIcon/AlertIcon.d.ts +10 -0
- package/lib/icons/AlertIcon/AlertIcon.js +51 -0
- package/lib/icons/AlertIcon/index.d.ts +2 -0
- package/lib/icons/AlertIcon/index.js +6 -0
- package/lib/icons/AnchorIcon/AnchorIcon.d.ts +7 -0
- package/lib/icons/AnchorIcon/AnchorIcon.js +23 -0
- package/lib/icons/AnchorIcon/index.d.ts +2 -0
- package/lib/icons/AnchorIcon/index.js +6 -0
- package/lib/icons/ArrowIcon/ArrowIcon.d.ts +8 -0
- package/lib/icons/ArrowIcon/ArrowIcon.js +60 -0
- package/lib/icons/ArrowIcon/index.d.ts +2 -0
- package/lib/icons/ArrowIcon/index.js +6 -0
- package/lib/icons/BurgerIcon/BurgerIcon.d.ts +5 -0
- package/lib/icons/BurgerIcon/BurgerIcon.js +15 -0
- package/lib/icons/BurgerIcon/index.d.ts +1 -0
- package/lib/icons/BurgerIcon/index.js +6 -0
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +6 -0
- package/lib/icons/CheckboxIcon/CheckboxIcon.js +28 -0
- package/lib/icons/CheckboxIcon/index.d.ts +1 -0
- package/lib/icons/CheckboxIcon/index.js +6 -0
- package/lib/icons/CloseIcon/CloseIcon.d.ts +5 -0
- package/lib/icons/CloseIcon/CloseIcon.js +16 -0
- package/lib/icons/CloseIcon/index.d.ts +1 -0
- package/lib/icons/CloseIcon/index.js +6 -0
- package/lib/icons/CollapseIcon/CollapseIcon.d.ts +7 -0
- package/lib/icons/CollapseIcon/CollapseIcon.js +22 -0
- package/lib/icons/CollapseIcon/index.d.ts +1 -0
- package/lib/icons/CollapseIcon/index.js +18 -0
- package/lib/icons/ColorModeIcon/ColorModeIcon.d.ts +10 -0
- package/lib/icons/ColorModeIcon/ColorModeIcon.js +33 -0
- package/lib/icons/ColorModeIcon/index.d.ts +2 -0
- package/lib/icons/ColorModeIcon/index.js +6 -0
- package/lib/icons/CopyIcon/CopyIcon.d.ts +6 -0
- package/lib/icons/CopyIcon/CopyIcon.js +16 -0
- package/lib/icons/CopyIcon/index.d.ts +1 -0
- package/lib/icons/CopyIcon/index.js +18 -0
- package/lib/icons/DeselectIcon/DeselectIcon.d.ts +7 -0
- package/lib/icons/DeselectIcon/DeselectIcon.js +19 -0
- package/lib/icons/DeselectIcon/index.d.ts +1 -0
- package/lib/icons/DeselectIcon/index.js +18 -0
- package/lib/icons/DissatisfiedIcon/DissatisfiedIcon.d.ts +4 -0
- package/lib/icons/DissatisfiedIcon/DissatisfiedIcon.js +18 -0
- package/lib/icons/DissatisfiedIcon/index.d.ts +1 -0
- package/lib/icons/DissatisfiedIcon/index.js +18 -0
- package/lib/icons/EditIcon/EditIcon.d.ts +6 -0
- package/lib/icons/EditIcon/EditIcon.js +18 -0
- package/lib/icons/EditIcon/index.d.ts +1 -0
- package/lib/icons/EditIcon/index.js +18 -0
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +4 -0
- package/lib/icons/ErrorIcon/ErrorIcon.js +14 -0
- package/lib/icons/ErrorIcon/index.d.ts +1 -0
- package/lib/icons/ErrorIcon/index.js +18 -0
- package/lib/icons/ExpandIcon/ExpandIcon.d.ts +6 -0
- package/lib/icons/ExpandIcon/ExpandIcon.js +22 -0
- package/lib/icons/ExpandIcon/index.d.ts +1 -0
- package/lib/icons/ExpandIcon/index.js +6 -0
- 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/FileIcon/FileIcon.d.ts +6 -0
- package/lib/icons/FileIcon/FileIcon.js +17 -0
- package/lib/icons/FileIcon/index.d.ts +1 -0
- package/lib/icons/FileIcon/index.js +18 -0
- package/lib/icons/LanguageIcon/LanguageIcon.d.ts +4 -0
- package/lib/icons/LanguageIcon/LanguageIcon.js +14 -0
- package/lib/icons/LanguageIcon/index.d.ts +1 -0
- package/lib/icons/LanguageIcon/index.js +18 -0
- package/lib/icons/LogoutIcon/LogoutIcon.d.ts +5 -0
- package/lib/icons/LogoutIcon/LogoutIcon.js +17 -0
- package/lib/icons/LogoutIcon/index.d.ts +1 -0
- package/lib/icons/LogoutIcon/index.js +6 -0
- package/lib/icons/NeutralIcon/NeutralIcon.d.ts +4 -0
- package/lib/icons/NeutralIcon/NeutralIcon.js +18 -0
- package/lib/icons/NeutralIcon/index.d.ts +1 -0
- package/lib/icons/NeutralIcon/index.js +18 -0
- package/lib/icons/PlusIcon/PlusIcon.d.ts +5 -0
- package/lib/icons/PlusIcon/PlusIcon.js +16 -0
- package/lib/icons/PlusIcon/index.d.ts +1 -0
- package/lib/icons/PlusIcon/index.js +18 -0
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.d.ts +4 -0
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.js +15 -0
- package/lib/icons/PointingArrowIcon/index.d.ts +1 -0
- package/lib/icons/PointingArrowIcon/index.js +18 -0
- package/lib/icons/RadioCheckButtonIcon/RadioCheckButtonIcon.d.ts +4 -0
- package/lib/icons/RadioCheckButtonIcon/RadioCheckButtonIcon.js +16 -0
- package/lib/icons/RadioCheckButtonIcon/index.d.ts +1 -0
- package/lib/icons/RadioCheckButtonIcon/index.js +18 -0
- package/lib/icons/ReportIcon/ReportIcon.d.ts +6 -0
- package/lib/icons/ReportIcon/ReportIcon.js +19 -0
- package/lib/icons/ReportIcon/index.d.ts +1 -0
- package/lib/icons/ReportIcon/index.js +18 -0
- package/lib/icons/RocketIcon/RocketIcon.d.ts +7 -0
- package/lib/icons/RocketIcon/RocketIcon.js +15 -0
- package/lib/icons/RocketIcon/index.d.ts +1 -0
- package/lib/icons/RocketIcon/index.js +18 -0
- package/lib/icons/SatisfiedIcon/SatisfiedIcon.d.ts +4 -0
- package/lib/icons/SatisfiedIcon/SatisfiedIcon.js +18 -0
- package/lib/icons/SatisfiedIcon/index.d.ts +1 -0
- package/lib/icons/SatisfiedIcon/index.js +18 -0
- package/lib/icons/SelectIcon/SelectIcon.d.ts +6 -0
- package/lib/icons/SelectIcon/SelectIcon.js +19 -0
- package/lib/icons/SelectIcon/index.d.ts +1 -0
- package/lib/icons/SelectIcon/index.js +18 -0
- package/lib/icons/ShelfIcon/ShelfIcon.d.ts +12 -0
- package/lib/icons/ShelfIcon/ShelfIcon.js +52 -0
- package/lib/icons/ShelfIcon/index.d.ts +2 -0
- package/lib/icons/ShelfIcon/index.js +6 -0
- package/lib/icons/SpinnerIcon/SpinnerIcon.d.ts +8 -0
- package/lib/icons/SpinnerIcon/SpinnerIcon.js +30 -0
- package/lib/icons/SpinnerIcon/index.d.ts +1 -0
- package/lib/icons/SpinnerIcon/index.js +6 -0
- package/lib/icons/ThumbDownIcon/ThumbDownIcon.d.ts +4 -0
- package/lib/icons/ThumbDownIcon/ThumbDownIcon.js +14 -0
- package/lib/icons/ThumbDownIcon/index.d.ts +1 -0
- package/lib/icons/ThumbDownIcon/index.js +18 -0
- package/lib/icons/ThumbUpIcon/ThumbUpIcon.d.ts +4 -0
- package/lib/icons/ThumbUpIcon/ThumbUpIcon.js +14 -0
- package/lib/icons/ThumbUpIcon/index.d.ts +1 -0
- package/lib/icons/ThumbUpIcon/index.js +18 -0
- package/lib/icons/index.d.ts +26 -0
- package/lib/icons/index.js +43 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +27 -0
- package/lib/layouts/Forbidden.d.ts +2 -0
- package/lib/layouts/Forbidden.js +45 -0
- package/lib/layouts/NotFound.d.ts +2 -0
- package/lib/layouts/NotFound.js +45 -0
- package/lib/layouts/OIDCForbidden.d.ts +2 -0
- package/lib/layouts/OIDCForbidden.js +92 -0
- package/lib/layouts/PageLayout.d.ts +6 -0
- package/lib/layouts/PageLayout.js +29 -0
- package/lib/layouts/RootLayout.d.ts +6 -0
- package/lib/layouts/RootLayout.js +19 -0
- package/lib/layouts/index.d.ts +5 -0
- package/lib/layouts/index.js +22 -0
- package/lib/mocks/Feedback/useSubmitFeedback.d.ts +1 -0
- package/lib/mocks/Feedback/useSubmitFeedback.js +18 -0
- package/lib/mocks/Link.d.ts +2 -0
- package/lib/mocks/Link.js +27 -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/useBreadcrumbs.d.ts +4 -0
- package/lib/mocks/Sidebar/useBreadcrumbs.js +8 -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/Sidebar/useSidebarItems.d.ts +3 -0
- package/lib/mocks/Sidebar/useSidebarItems.js +8 -0
- package/lib/mocks/constants/index.d.ts +2 -0
- package/lib/mocks/constants/index.js +6 -0
- package/lib/mocks/hooks/index.d.ts +35 -0
- package/lib/mocks/hooks/index.js +109 -0
- package/lib/mocks/hooks/usePageData.d.ts +6 -0
- package/lib/mocks/hooks/usePageData.js +11 -0
- package/lib/mocks/media-css.d.ts +5 -0
- package/lib/mocks/media-css.js +5 -0
- package/lib/mocks/search.d.ts +32 -0
- package/lib/mocks/search.js +46 -0
- package/lib/mocks/telemetry.d.ts +2 -0
- package/lib/mocks/telemetry.js +7 -0
- package/lib/mocks/types/index.d.ts +1 -0
- package/lib/mocks/types/index.js +3 -0
- package/lib/mocks/types.d.ts +3 -0
- package/lib/mocks/types.js +4 -0
- package/lib/mocks/useGlobalData.d.ts +1 -0
- package/lib/mocks/useGlobalData.js +8 -0
- package/lib/mocks/usePreloadHistory.d.ts +3 -0
- package/lib/mocks/usePreloadHistory.js +13 -0
- package/lib/mocks/utils.d.ts +7 -0
- package/lib/mocks/utils.js +22 -0
- package/lib/types/config.d.ts +5 -0
- package/lib/types/config.js +3 -0
- package/lib/types/portal/index.d.ts +3 -0
- package/lib/types/portal/index.js +19 -0
- package/lib/types/portal/src/shared/constants.d.ts +21 -0
- package/lib/types/portal/src/shared/constants.js +26 -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 +43 -0
- package/lib/types/portal/src/shared/types/catalog.js +3 -0
- package/lib/types/portal/src/shared/types/feedback.d.ts +13 -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 +173 -0
- package/lib/types/portal/src/shared/types/nav.js +8 -0
- package/lib/types/portal/src/shared/types/searchDocument.d.ts +21 -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 +21 -0
- package/lib/ui/Background.d.ts +7 -0
- package/lib/ui/Background.js +21 -0
- package/lib/ui/Box.d.ts +6 -0
- package/lib/ui/Box.js +22 -0
- package/lib/ui/Burger.d.ts +8 -0
- package/lib/ui/Burger.js +32 -0
- package/lib/ui/Checkbox.d.ts +1 -0
- package/lib/ui/Checkbox.js +70 -0
- package/lib/ui/Dropdown.d.ts +8 -0
- package/lib/ui/Dropdown.js +114 -0
- package/lib/ui/Flex.d.ts +10 -0
- package/lib/ui/Flex.js +21 -0
- package/lib/ui/Highlight.d.ts +5 -0
- package/lib/ui/Highlight.js +63 -0
- package/lib/ui/Jumbotron.d.ts +18 -0
- package/lib/ui/Jumbotron.js +51 -0
- package/lib/ui/darkColors.d.ts +1 -0
- package/lib/ui/darkColors.js +225 -0
- package/lib/ui/index.d.ts +9 -0
- package/lib/ui/index.js +27 -0
- package/lib/utils/ClipboardService.d.ts +4 -0
- package/lib/utils/ClipboardService.js +33 -0
- package/lib/utils/args-typecheck.d.ts +2 -0
- package/lib/utils/args-typecheck.js +14 -0
- package/lib/utils/class-names.d.ts +1 -0
- package/lib/utils/class-names.js +12 -0
- package/lib/utils/color.d.ts +1 -0
- package/lib/utils/color.js +15 -0
- package/lib/utils/css-variables.d.ts +1 -0
- package/lib/utils/css-variables.js +6 -0
- package/lib/utils/getNavbarElement.d.ts +1 -0
- package/lib/utils/getNavbarElement.js +15 -0
- package/lib/utils/highlight.d.ts +35 -0
- package/lib/utils/highlight.js +105 -0
- package/lib/utils/index.d.ts +13 -0
- package/lib/utils/index.js +30 -0
- package/lib/utils/isUrl.d.ts +12 -0
- package/lib/utils/isUrl.js +37 -0
- package/lib/utils/jsUtils.d.ts +4 -0
- package/lib/utils/jsUtils.js +21 -0
- package/lib/utils/jsonToHtml.d.ts +4 -0
- package/lib/utils/jsonToHtml.js +180 -0
- package/lib/utils/media-css.d.ts +12 -0
- package/lib/utils/media-css.js +13 -0
- package/lib/utils/replaceHashInColor.d.ts +1 -0
- package/lib/utils/replaceHashInColor.js +8 -0
- package/lib/utils/tags-parser.d.ts +1 -0
- package/lib/utils/tags-parser.js +10 -0
- package/lib/utils/text-transform.d.ts +1 -0
- package/lib/utils/text-transform.js +8 -0
- package/lib/utils/theme-helpers.d.ts +4 -0
- package/lib/utils/theme-helpers.js +75 -0
- package/lib/utils/urls.d.ts +11 -0
- package/lib/utils/urls.js +55 -0
- package/package.json +112 -0
- package/src/components/ApiOnboarding/AppCustomAttributes.tsx +9 -0
- package/src/components/Breadcrumbs/Breadcrumb.tsx +59 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +60 -0
- package/src/components/Breadcrumbs/index.ts +3 -0
- package/src/components/Breadcrumbs/styledVariables.ts +17 -0
- package/src/components/Button/Button.tsx +170 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Button/styledVariables.ts +115 -0
- package/src/components/Cards/Card.tsx +54 -0
- package/src/components/Cards/CardsBlock.tsx +10 -0
- package/src/components/Cards/index.ts +2 -0
- package/src/components/Catalog/Catalog.tsx +234 -0
- package/src/components/Catalog/CatalogCard.tsx +171 -0
- package/src/components/Catalog/index.ts +4 -0
- package/src/components/Catalog/styledVariables.ts +94 -0
- package/src/components/Catalog/useCatalog.ts +373 -0
- package/src/components/CodeBlock/CodeBlock.tsx +104 -0
- package/src/components/CodeBlock/CodeBlockContainer.tsx +124 -0
- package/src/components/CodeBlock/CodeBlockControlButton.tsx +28 -0
- package/src/components/CodeBlock/CodeBlockControls.tsx +188 -0
- package/src/components/CodeBlock/index.ts +5 -0
- package/src/components/CodeBlock/styledVariables.ts +89 -0
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +78 -0
- package/src/components/ColorModeSwitcher/index.ts +1 -0
- package/src/components/CopyButton/CopyButton.tsx +78 -0
- package/src/components/CopyButton/index.ts +1 -0
- package/src/components/Dropdown/Dropdown.tsx +147 -0
- package/src/components/Dropdown/index.ts +2 -0
- package/src/components/Dropdown/styledVariables.ts +27 -0
- package/src/components/EditPageButton/EditPageButton.tsx +54 -0
- package/src/components/EditPageButton/index.ts +1 -0
- package/src/components/Feedback/Comment.tsx +140 -0
- package/src/components/Feedback/Emotions.tsx +38 -0
- package/src/components/Feedback/Feedback.tsx +94 -0
- package/src/components/Feedback/Mood.tsx +236 -0
- package/src/components/Feedback/Rating.tsx +155 -0
- package/src/components/Feedback/Reasons.tsx +90 -0
- package/src/components/Feedback/ReportDialog.tsx +56 -0
- package/src/components/Feedback/Scale.tsx +225 -0
- package/src/components/Feedback/Sentiment.tsx +197 -0
- package/src/components/Feedback/Stars.tsx +51 -0
- package/src/components/Feedback/Thumbs.tsx +27 -0
- package/src/components/Feedback/index.ts +10 -0
- package/src/components/Feedback/types.ts +115 -0
- package/src/components/Feedback/useReportDialog.ts +57 -0
- package/src/components/Filter/Filter.tsx +276 -0
- package/src/components/Filter/FilterContent.tsx +105 -0
- package/src/components/Filter/FilterPopover.tsx +146 -0
- package/src/components/Filter/FilterTag.tsx +37 -0
- package/src/components/Filter/FilterTags.tsx +39 -0
- package/src/components/Filter/index.ts +6 -0
- package/src/components/Filter/styledVariables.ts +108 -0
- package/src/components/Footer/CustomFooter.tsx +46 -0
- package/src/components/Footer/CustomFooterNavItem.tsx +41 -0
- package/src/components/Footer/Footer.tsx +78 -0
- package/src/components/Footer/FooterColumn.tsx +151 -0
- package/src/components/Footer/FooterColumns.tsx +56 -0
- package/src/components/Footer/FooterCopyright.tsx +45 -0
- package/src/components/Footer/index.ts +5 -0
- package/src/components/Footer/styledVariables.ts +58 -0
- package/src/components/Image/Image.tsx +47 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/JsonViewer/JsonViewer.tsx +226 -0
- package/src/components/JsonViewer/index.ts +1 -0
- package/src/components/LastUpdated/LastUpdated.tsx +85 -0
- package/src/components/LastUpdated/index.ts +2 -0
- package/src/components/LastUpdated/styledVariables.ts +8 -0
- package/src/components/Markdown/Admonition.tsx +85 -0
- package/src/components/Markdown/ContainerWrapper.tsx +21 -0
- package/src/components/Markdown/Details.tsx +24 -0
- package/src/components/Markdown/Heading.tsx +47 -0
- package/src/components/Markdown/MarkdownLayout.tsx +75 -0
- package/src/components/Markdown/MarkdownWrapper.tsx +398 -0
- package/src/components/Markdown/Mermaid.tsx +38 -0
- package/src/components/Markdown/PageWrapper.tsx +10 -0
- package/src/components/Markdown/Sup.tsx +17 -0
- package/src/components/Markdown/index.ts +10 -0
- package/src/components/Markdown/styledVariables.ts +284 -0
- package/src/components/Menu/Menu.tsx +46 -0
- package/src/components/Menu/MenuContainer.tsx +17 -0
- package/src/components/Menu/MenuGroup.tsx +122 -0
- package/src/components/Menu/MenuItem.tsx +48 -0
- package/src/components/Menu/MenuItemLabel.tsx +46 -0
- package/src/components/Menu/MenuItemSwitch.tsx +61 -0
- package/src/components/Menu/MenuLink.tsx +11 -0
- package/src/components/Menu/MenuLinkItem.tsx +30 -0
- package/src/components/Menu/MobileMenu.tsx +151 -0
- package/src/components/Menu/MobileMenuGroup.tsx +93 -0
- package/src/components/Menu/constants.ts +5 -0
- package/src/components/Menu/hooks/use-mobile-menu-items.ts +96 -0
- package/src/components/Menu/hooks/use-mobile-menu-levels.ts +50 -0
- package/src/components/Menu/index.ts +13 -0
- package/src/components/Menu/styledVariables.ts +101 -0
- package/src/components/Menu/types.ts +4 -0
- package/src/components/Menu/utils.ts +110 -0
- package/src/components/Navbar/BurgerButton.tsx +34 -0
- package/src/components/Navbar/Navbar.tsx +178 -0
- package/src/components/Navbar/NavbarItem.tsx +148 -0
- package/src/components/Navbar/NavbarMenu.tsx +43 -0
- package/src/components/Navbar/index.ts +5 -0
- package/src/components/Navbar/styledVariables.ts +39 -0
- package/src/components/NavbarLogo/NavbarLogo.tsx +48 -0
- package/src/components/NavbarLogo/index.ts +2 -0
- package/src/components/NavbarLogo/styledVariables.ts +14 -0
- package/src/components/OpenApiDocs/ClearButton.tsx +32 -0
- package/src/components/OpenApiDocs/DevOnboardingTryItSecurity.tsx +176 -0
- package/src/components/OpenApiDocs/Dropdown.tsx +202 -0
- package/src/components/OpenApiDocs/ScorecardBadges.tsx +83 -0
- package/src/components/OpenApiDocs/TryItSecurityApps.tsx +17 -0
- package/src/components/OpenApiDocs/hooks/AfterOpenApiOperation.tsx +9 -0
- package/src/components/OpenApiDocs/hooks/AfterOpenApiOperationSummary.tsx +9 -0
- package/src/components/OpenApiDocs/hooks/AfterOpenApiTitle.tsx +9 -0
- package/src/components/OpenApiDocs/hooks/BeforeOpenApiOperation.tsx +9 -0
- package/src/components/OpenApiDocs/hooks/BeforeOpenApiOperationSummary.tsx +9 -0
- package/src/components/OpenApiDocs/hooks/OpenApiFooter.tsx +5 -0
- package/src/components/OpenApiDocs/hooks/OpenApiHeader.tsx +5 -0
- package/src/components/OpenApiDocs/hooks/OpenApiTryItSecurityPanel.tsx +12 -0
- package/src/components/OpenApiDocs/index.ts +10 -0
- package/src/components/PageNavigation/NextButton.tsx +46 -0
- package/src/components/PageNavigation/PageNavigation.tsx +46 -0
- package/src/components/PageNavigation/PreviousButton.tsx +49 -0
- package/src/components/PageNavigation/index.ts +3 -0
- package/src/components/Panel/Panel.ts +34 -0
- package/src/components/Panel/PanelBody.ts +43 -0
- package/src/components/Panel/PanelComponent.tsx +79 -0
- package/src/components/Panel/PanelHeader.ts +37 -0
- package/src/components/Panel/PanelHeaderTitle.ts +12 -0
- package/src/components/Panel/index.ts +6 -0
- package/src/components/Panel/styledVariables.ts +480 -0
- package/src/components/Product/Product.tsx +28 -0
- package/src/components/Product/ProductPicker.tsx +96 -0
- package/src/components/Product/index.ts +3 -0
- package/src/components/Product/styledVariables.ts +40 -0
- package/src/components/Profile/AuthUserProfile.tsx +25 -0
- package/src/components/Profile/LoginLink.tsx +42 -0
- package/src/components/Profile/MobileUserProfile.tsx +79 -0
- package/src/components/Profile/Profile.tsx +85 -0
- package/src/components/Profile/UserProfile.tsx +118 -0
- package/src/components/Profile/UserProfileData.tsx +40 -0
- package/src/components/Profile/index.ts +10 -0
- package/src/components/Profile/styledVariables.ts +53 -0
- package/src/components/Profile/types.ts +12 -0
- package/src/components/Scorecard/Card.tsx +33 -0
- package/src/components/Scorecard/Gauge.tsx +52 -0
- package/src/components/Scorecard/StatusByLevelWidget.tsx +71 -0
- package/src/components/Search/CancelSearch.tsx +32 -0
- package/src/components/Search/ClearIcon.tsx +34 -0
- package/src/components/Search/ClockBackwardsIcon.tsx +26 -0
- package/src/components/Search/Input.tsx +21 -0
- package/src/components/Search/InputWrapper.tsx +89 -0
- package/src/components/Search/MobileSearchTrigger.tsx +38 -0
- package/src/components/Search/Popover.tsx +29 -0
- package/src/components/Search/ProductTag.tsx +46 -0
- package/src/components/Search/RecentSearches.tsx +130 -0
- package/src/components/Search/Search.tsx +59 -0
- package/src/components/Search/SearchDialog.tsx +178 -0
- package/src/components/Search/SearchIcon.tsx +39 -0
- package/src/components/Search/SearchItem.tsx +152 -0
- package/src/components/Search/SearchTrigger.tsx +65 -0
- package/src/components/Search/Shortcut.tsx +34 -0
- package/src/components/Search/ShortcutKey.tsx +27 -0
- package/src/components/Search/SuggestedPages.tsx +96 -0
- package/src/components/Search/index.ts +19 -0
- package/src/components/Search/styledVariables.ts +95 -0
- package/src/components/Search/utils.tsx +20 -0
- package/src/components/Select/Select.tsx +189 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/Select/styledVariables.ts +31 -0
- package/src/components/Separator/Separator.tsx +34 -0
- package/src/components/Separator/SeparatorItem.tsx +28 -0
- package/src/components/Separator/SeparatorLine.tsx +14 -0
- package/src/components/Separator/index.ts +3 -0
- package/src/components/Sidebar/ApiCallItem.tsx +53 -0
- package/src/components/Sidebar/BackButton.tsx +50 -0
- package/src/components/Sidebar/Drilldown.tsx +49 -0
- package/src/components/Sidebar/DrilldownMenu.tsx +65 -0
- package/src/components/Sidebar/DrilldownMenuItem.tsx +41 -0
- package/src/components/Sidebar/FooterWrapper.tsx +16 -0
- package/src/components/Sidebar/HeaderWrapper.tsx +10 -0
- package/src/components/Sidebar/MobileSidebarButton.tsx +41 -0
- package/src/components/Sidebar/MobileSidebarIcon.tsx +18 -0
- package/src/components/Sidebar/Sidebar.tsx +55 -0
- package/src/components/Sidebar/SidebarItemIcon.tsx +10 -0
- package/src/components/Sidebar/SidebarLayout.tsx +109 -0
- package/src/components/Sidebar/VersionPicker.tsx +112 -0
- package/src/components/Sidebar/index.ts +15 -0
- package/src/components/Sidebar/styledVariables.ts +220 -0
- package/src/components/Sidebar/types.ts +52 -0
- package/src/components/SidebarActions/ChangeViewButton.tsx +24 -0
- package/src/components/SidebarActions/CollapseSidebarButton.tsx +45 -0
- package/src/components/SidebarActions/SidebarActions.tsx +89 -0
- package/src/components/SidebarActions/ToggleRightPanelButton.tsx +25 -0
- package/src/components/SidebarActions/index.tsx +4 -0
- package/src/components/SidebarActions/styled.tsx +156 -0
- package/src/components/SidebarLogo/SidebarLogo.tsx +54 -0
- package/src/components/SidebarLogo/index.ts +1 -0
- package/src/components/TableOfContent/TableOfContent.tsx +127 -0
- package/src/components/TableOfContent/index.ts +2 -0
- package/src/components/TableOfContent/styledVariables.ts +44 -0
- package/src/components/TableOfContent/utils.ts +42 -0
- package/src/components/Tabs/Tab.tsx +69 -0
- package/src/components/Tabs/Tabs.tsx +79 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/Tag/Tag.tsx +72 -0
- package/src/components/Tag/index.ts +2 -0
- package/src/components/Tag/styledVariables.ts +145 -0
- package/src/components/Tiles/ThinTile.tsx +136 -0
- package/src/components/Tiles/TileHeader.ts +14 -0
- package/src/components/Tiles/TileText.tsx +13 -0
- package/src/components/Tiles/WideTile.tsx +140 -0
- package/src/components/Tiles/index.ts +4 -0
- package/src/components/Tiles/types.ts +19 -0
- package/src/components/Tooltip/Tooltip.tsx +202 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/Tooltip/styledVariables.ts +18 -0
- package/src/components/Typography/CompactTypography.ts +9 -0
- package/src/components/Typography/Emphasis.ts +8 -0
- package/src/components/Typography/H1.ts +13 -0
- package/src/components/Typography/H2.ts +13 -0
- package/src/components/Typography/H3.ts +13 -0
- package/src/components/Typography/SectionHeader.ts +14 -0
- package/src/components/Typography/Typography.ts +30 -0
- package/src/components/Typography/index.ts +7 -0
- package/src/components/index.ts +29 -0
- package/src/config.ts +752 -0
- package/src/globalStyle.ts +1010 -0
- package/src/hooks/__tests__/mocks/MockIntersectionObserver.ts +48 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useActiveHeading.ts +110 -0
- package/src/hooks/useActiveSectionId.ts +54 -0
- package/src/hooks/useControl.ts +20 -0
- package/src/hooks/useDialogHotKeys.ts +48 -0
- package/src/hooks/useFullHeight.ts +49 -0
- package/src/hooks/useMobileMenu.ts +16 -0
- package/src/hooks/useModalScrollLock.ts +12 -0
- package/src/hooks/useMount.ts +8 -0
- package/src/hooks/useNavbarHeight.ts +25 -0
- package/src/hooks/useOutsideClick.ts +23 -0
- package/src/hooks/useThemeConfig.ts +24 -0
- package/src/hooks/useUnmount.ts +10 -0
- package/src/i18n/LanguagePicker.tsx +120 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/styledVariables.ts +37 -0
- package/src/icons/AlertIcon/AlertIcon.tsx +111 -0
- package/src/icons/AlertIcon/index.ts +2 -0
- package/src/icons/AnchorIcon/AnchorIcon.tsx +36 -0
- package/src/icons/AnchorIcon/index.ts +2 -0
- package/src/icons/ArrowIcon/ArrowIcon.tsx +61 -0
- package/src/icons/ArrowIcon/index.ts +2 -0
- package/src/icons/BurgerIcon/BurgerIcon.tsx +12 -0
- package/src/icons/BurgerIcon/index.ts +1 -0
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +64 -0
- package/src/icons/CheckboxIcon/index.ts +1 -0
- package/src/icons/CloseIcon/CloseIcon.tsx +13 -0
- package/src/icons/CloseIcon/index.ts +1 -0
- package/src/icons/CollapseIcon/CollapseIcon.tsx +40 -0
- package/src/icons/CollapseIcon/index.tsx +1 -0
- package/src/icons/ColorModeIcon/ColorModeIcon.tsx +57 -0
- package/src/icons/ColorModeIcon/index.ts +2 -0
- package/src/icons/CopyIcon/CopyIcon.tsx +32 -0
- package/src/icons/CopyIcon/index.ts +1 -0
- package/src/icons/DeselectIcon/DeselectIcon.tsx +28 -0
- package/src/icons/DeselectIcon/index.ts +1 -0
- package/src/icons/DissatisfiedIcon/DissatisfiedIcon.tsx +28 -0
- package/src/icons/DissatisfiedIcon/index.ts +1 -0
- package/src/icons/EditIcon/EditIcon.tsx +30 -0
- package/src/icons/EditIcon/index.ts +1 -0
- package/src/icons/ErrorIcon/ErrorIcon.tsx +15 -0
- package/src/icons/ErrorIcon/index.ts +1 -0
- package/src/icons/ExpandIcon/ExpandIcon.tsx +39 -0
- package/src/icons/ExpandIcon/index.ts +1 -0
- package/src/icons/ExternalIcon/ExternalIcon.tsx +44 -0
- package/src/icons/ExternalIcon/index.ts +1 -0
- package/src/icons/FileIcon/FileIcon.tsx +28 -0
- package/src/icons/FileIcon/index.ts +1 -0
- package/src/icons/LanguageIcon/LanguageIcon.tsx +15 -0
- package/src/icons/LanguageIcon/index.ts +1 -0
- package/src/icons/LogoutIcon/LogoutIcon.tsx +20 -0
- package/src/icons/LogoutIcon/index.ts +1 -0
- package/src/icons/NeutralIcon/NeutralIcon.tsx +25 -0
- package/src/icons/NeutralIcon/index.ts +1 -0
- package/src/icons/PlusIcon/PlusIcon.tsx +25 -0
- package/src/icons/PlusIcon/index.ts +1 -0
- package/src/icons/PointingArrowIcon/PointingArrowIcon.tsx +16 -0
- package/src/icons/PointingArrowIcon/index.ts +1 -0
- package/src/icons/RadioCheckButtonIcon/RadioCheckButtonIcon.tsx +19 -0
- package/src/icons/RadioCheckButtonIcon/index.ts +1 -0
- package/src/icons/ReportIcon/ReportIcon.tsx +36 -0
- package/src/icons/ReportIcon/index.ts +1 -0
- package/src/icons/RocketIcon/RocketIcon.tsx +32 -0
- package/src/icons/RocketIcon/index.tsx +1 -0
- package/src/icons/SatisfiedIcon/SatisfiedIcon.tsx +41 -0
- package/src/icons/SatisfiedIcon/index.ts +1 -0
- package/src/icons/SelectIcon/SelectIcon.tsx +30 -0
- package/src/icons/SelectIcon/index.ts +1 -0
- package/src/icons/ShelfIcon/ShelfIcon.tsx +47 -0
- package/src/icons/ShelfIcon/index.ts +2 -0
- package/src/icons/SpinnerIcon/SpinnerIcon.tsx +40 -0
- package/src/icons/SpinnerIcon/index.ts +1 -0
- package/src/icons/ThumbDownIcon/ThumbDownIcon.tsx +15 -0
- package/src/icons/ThumbDownIcon/index.ts +1 -0
- package/src/icons/ThumbUpIcon/ThumbUpIcon.tsx +15 -0
- package/src/icons/ThumbUpIcon/index.ts +1 -0
- package/src/icons/index.ts +26 -0
- package/src/index.ts +10 -0
- package/src/layouts/Forbidden.tsx +51 -0
- package/src/layouts/NotFound.tsx +51 -0
- package/src/layouts/OIDCForbidden.tsx +85 -0
- package/src/layouts/PageLayout.tsx +34 -0
- package/src/layouts/RootLayout.tsx +21 -0
- package/src/layouts/index.ts +5 -0
- package/src/mocks/Feedback/useSubmitFeedback.tsx +4 -0
- package/src/mocks/Link.tsx +17 -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/useBreadcrumbs.ts +3 -0
- package/src/mocks/Sidebar/useDrilldown.tsx +12 -0
- package/src/mocks/Sidebar/useMenuGroup.tsx +10 -0
- package/src/mocks/Sidebar/useSidebarItems.tsx +7 -0
- package/src/mocks/constants/index.ts +2 -0
- package/src/mocks/hooks/index.ts +118 -0
- package/src/mocks/hooks/usePageData.ts +12 -0
- package/src/mocks/media-css.ts +1 -0
- package/src/mocks/search.ts +66 -0
- package/src/mocks/telemetry.ts +5 -0
- package/src/mocks/types/index.ts +1 -0
- package/src/mocks/types.ts +5 -0
- package/src/mocks/useGlobalData.tsx +3 -0
- package/src/mocks/usePreloadHistory.ts +9 -0
- package/src/mocks/utils.ts +22 -0
- package/src/settings.yaml +29 -0
- package/src/types/config.ts +5 -0
- package/src/types/portal/index.ts +3 -0
- package/src/types/portal/src/shared/constants.ts +21 -0
- package/src/types/portal/src/shared/types/activeItem.ts +1 -0
- package/src/types/portal/src/shared/types/catalog.ts +44 -0
- package/src/types/portal/src/shared/types/feedback.ts +22 -0
- package/src/types/portal/src/shared/types/i18n.d.ts +5 -0
- package/src/types/portal/src/shared/types/markdown.ts +6 -0
- package/src/types/portal/src/shared/types/nav.ts +191 -0
- package/src/types/portal/src/shared/types/searchDocument.ts +23 -0
- package/src/ui/ArrowBack.tsx +33 -0
- package/src/ui/Background.tsx +16 -0
- package/src/ui/Box.tsx +37 -0
- package/src/ui/Burger.tsx +39 -0
- package/src/ui/Checkbox.tsx +64 -0
- package/src/ui/Dropdown.tsx +131 -0
- package/src/ui/Flex.tsx +24 -0
- package/src/ui/Highlight.tsx +48 -0
- package/src/ui/Jumbotron.tsx +57 -0
- package/src/ui/darkColors.tsx +222 -0
- package/src/ui/index.tsx +12 -0
- package/src/utils/ClipboardService.ts +25 -0
- package/src/utils/args-typecheck.ts +9 -0
- package/src/utils/class-names.ts +8 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/css-variables.ts +4 -0
- package/src/utils/getNavbarElement.ts +10 -0
- package/src/utils/highlight.ts +94 -0
- package/src/utils/index.ts +13 -0
- package/src/utils/isUrl.ts +42 -0
- package/src/utils/jsUtils.ts +18 -0
- package/src/utils/jsonToHtml.ts +234 -0
- package/src/utils/media-css.ts +16 -0
- package/src/utils/replaceHashInColor.ts +3 -0
- package/src/utils/tags-parser.ts +8 -0
- package/src/utils/text-transform.ts +3 -0
- package/src/utils/theme-helpers.ts +83 -0
- package/src/utils/urls.ts +54 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled, { createGlobalStyle } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { NavbarMenu } from '@theme/components/Navbar';
|
|
5
|
+
import { useMobileMenu } from '@theme/hooks/useMobileMenu';
|
|
6
|
+
import type { NavbarLogoProps } from '@theme/components/NavbarLogo';
|
|
7
|
+
import { NavbarLogo } from '@theme/components/NavbarLogo';
|
|
8
|
+
import { MobileMenu } from '@theme/components/Menu/MobileMenu';
|
|
9
|
+
import { ColorModeSwitcher } from '@theme/components/ColorModeSwitcher/ColorModeSwitcher';
|
|
10
|
+
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
11
|
+
import { Search } from '@theme/components/Search/Search';
|
|
12
|
+
import { AuthUserProfile } from '@theme/components/Profile/AuthUserProfile';
|
|
13
|
+
import type { LogoConfig, ResolvedConfigLinks } from '@theme/types/portal';
|
|
14
|
+
import { useI18n } from '@portal/hooks';
|
|
15
|
+
import { LanguagePicker } from '@theme/i18n/LanguagePicker';
|
|
16
|
+
import { ProductPicker } from '@theme/components/Product';
|
|
17
|
+
import { BurgerButton } from '@theme/components/Navbar/BurgerButton';
|
|
18
|
+
|
|
19
|
+
const EmptyNavbarHack = createGlobalStyle`
|
|
20
|
+
:root {
|
|
21
|
+
--navbar-height: 0px !important;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export function Navbar(): JSX.Element | null {
|
|
26
|
+
const [isOpen, setIsOpen] = useMobileMenu(false);
|
|
27
|
+
const themeConfig = useThemeConfig();
|
|
28
|
+
const { changeLanguage } = useI18n();
|
|
29
|
+
|
|
30
|
+
const menu = themeConfig.navbar?.items;
|
|
31
|
+
const logo = themeConfig.logo;
|
|
32
|
+
|
|
33
|
+
const { search: searchSettings, navbar, userProfile: userProfileSettings } = themeConfig;
|
|
34
|
+
const hideSearch =
|
|
35
|
+
searchSettings?.hide || (searchSettings?.placement && searchSettings?.placement !== 'navbar');
|
|
36
|
+
const hideUserProfile = userProfileSettings?.hide;
|
|
37
|
+
|
|
38
|
+
if (navbar?.hide) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const openMobileMenu = () => setIsOpen(true);
|
|
43
|
+
const closeMobileMenu = () => setIsOpen(false);
|
|
44
|
+
|
|
45
|
+
if (!menu && !logo) {
|
|
46
|
+
return <EmptyNavbarHack />;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<NavbarPresentational
|
|
51
|
+
{...{
|
|
52
|
+
closeMobileMenu,
|
|
53
|
+
openMobileMenu,
|
|
54
|
+
isOpen,
|
|
55
|
+
hideSearch: Boolean(hideSearch),
|
|
56
|
+
logo: logo as Pick<LogoConfig, 'image' | 'link' | 'altText'>,
|
|
57
|
+
hideUserProfile,
|
|
58
|
+
changeLanguage,
|
|
59
|
+
}}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface NavbarPresentationalProps extends NavbarLogoProps {
|
|
65
|
+
closeMobileMenu: () => void;
|
|
66
|
+
openMobileMenu: () => void;
|
|
67
|
+
isOpen: boolean;
|
|
68
|
+
hideSearch: boolean;
|
|
69
|
+
hideUserProfile: boolean | string | undefined;
|
|
70
|
+
changeLanguage: (value: string) => void;
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function NavbarPresentational(props: NavbarPresentationalProps): JSX.Element | null {
|
|
75
|
+
const {
|
|
76
|
+
closeMobileMenu,
|
|
77
|
+
openMobileMenu,
|
|
78
|
+
isOpen,
|
|
79
|
+
hideSearch,
|
|
80
|
+
logo,
|
|
81
|
+
hideUserProfile,
|
|
82
|
+
changeLanguage,
|
|
83
|
+
className,
|
|
84
|
+
} = props;
|
|
85
|
+
|
|
86
|
+
const themeConfig = useThemeConfig();
|
|
87
|
+
|
|
88
|
+
const menu = themeConfig.navbar?.items;
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<NavbarContainer data-component-name="Navbar/Navbar" className={className}>
|
|
92
|
+
{isOpen && <MobileMenu hideUserProfile={!!hideUserProfile} />}
|
|
93
|
+
<NavbarRow>
|
|
94
|
+
<BurgerButton onClick={isOpen ? closeMobileMenu : openMobileMenu} isOpen={isOpen} />
|
|
95
|
+
<NavbarLogo logo={logo} />
|
|
96
|
+
<ProductPicker />
|
|
97
|
+
<NavbarMenu menuItems={menu as ResolvedConfigLinks} />
|
|
98
|
+
{hideSearch ? null : <Search />}
|
|
99
|
+
<LanguagePicker onChangeLanguage={changeLanguage} onlyIcon />
|
|
100
|
+
<ColorModeSwitcherWrapper isVisible={isOpen}>
|
|
101
|
+
<ColorModeSwitcher />
|
|
102
|
+
</ColorModeSwitcherWrapper>
|
|
103
|
+
{hideUserProfile ? null : (
|
|
104
|
+
<AuthUserProfileWrapper>
|
|
105
|
+
<AuthUserProfile />
|
|
106
|
+
</AuthUserProfileWrapper>
|
|
107
|
+
)}
|
|
108
|
+
</NavbarRow>
|
|
109
|
+
</NavbarContainer>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const ColorModeSwitcherWrapper = styled.div<{ isVisible: boolean }>`
|
|
114
|
+
display: ${({ isVisible }) => (isVisible ? 'block' : 'none')};
|
|
115
|
+
|
|
116
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
117
|
+
display: block;
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
const AuthUserProfileWrapper = styled.div`
|
|
122
|
+
display: none;
|
|
123
|
+
|
|
124
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
125
|
+
display: block;
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
export const NavbarContainer = styled.nav`
|
|
130
|
+
border: var(--navbar-border);
|
|
131
|
+
|
|
132
|
+
--text-color: var(--navbar-text-color);
|
|
133
|
+
|
|
134
|
+
height: var(--navbar-height);
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
flex-shrink: 0;
|
|
139
|
+
|
|
140
|
+
font-size: var(--navbar-font-size);
|
|
141
|
+
position: sticky;
|
|
142
|
+
top: 0;
|
|
143
|
+
z-index: var(--z-index-raised);
|
|
144
|
+
padding: 0;
|
|
145
|
+
background: var(--navbar-background-color);
|
|
146
|
+
font-family: var(--navbar-font-family);
|
|
147
|
+
|
|
148
|
+
${({ theme }) => theme.mediaQueries.print} {
|
|
149
|
+
background: transparent;
|
|
150
|
+
display: none;
|
|
151
|
+
> :not(a, img) {
|
|
152
|
+
display: none !important;
|
|
153
|
+
}
|
|
154
|
+
img {
|
|
155
|
+
padding: 0;
|
|
156
|
+
margin: 0;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
161
|
+
padding: var(--navbar-padding);
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
|
|
165
|
+
export const NavbarRow = styled.div`
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: space-between;
|
|
169
|
+
margin: 0 auto;
|
|
170
|
+
width: 90%;
|
|
171
|
+
|
|
172
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
173
|
+
width: 100%;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
gap: var(--navbar-menu-items-gap);
|
|
177
|
+
max-width: var(--navbar-container-max-width);
|
|
178
|
+
`;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { useLocation } from 'react-router-dom';
|
|
4
|
+
|
|
5
|
+
import { Link } from '@portal/Link';
|
|
6
|
+
import { getPathnameForLocale } from '@portal/utils';
|
|
7
|
+
import type {
|
|
8
|
+
ResolvedNavItem,
|
|
9
|
+
ResolvedNavLinkItem,
|
|
10
|
+
ResolvedNavGroupItem,
|
|
11
|
+
} from '@theme/types/portal';
|
|
12
|
+
import { useI18nConfig, useTranslate } from '@portal/hooks';
|
|
13
|
+
import { withPathPrefix } from '@theme/utils';
|
|
14
|
+
import { telemetry } from '@portal/telemetry';
|
|
15
|
+
import { Dropdown } from '@theme/components/Dropdown';
|
|
16
|
+
import { ExternalIcon } from '@theme/icons';
|
|
17
|
+
|
|
18
|
+
export interface NavbarItemProps {
|
|
19
|
+
navItem: ResolvedNavItem;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function NavbarItem({ navItem, className }: NavbarItemProps): JSX.Element | null {
|
|
24
|
+
const { pathname } = useLocation();
|
|
25
|
+
const { translate } = useTranslate();
|
|
26
|
+
const { defaultLocale, currentLocale, locales } = useI18nConfig();
|
|
27
|
+
|
|
28
|
+
if ((navItem as ResolvedNavLinkItem).link) {
|
|
29
|
+
const item = navItem as ResolvedNavLinkItem;
|
|
30
|
+
|
|
31
|
+
const isActive =
|
|
32
|
+
pathname ===
|
|
33
|
+
withPathPrefix(getPathnameForLocale(item.link, defaultLocale, currentLocale, locales));
|
|
34
|
+
return (
|
|
35
|
+
<NavbarMenuItem
|
|
36
|
+
active={isActive}
|
|
37
|
+
data-component-name="Navbar/NavbarItem"
|
|
38
|
+
className={className}
|
|
39
|
+
onClick={() => telemetry.send('navbar_menu_item_clicked', { type: 'link' })}
|
|
40
|
+
>
|
|
41
|
+
<NavbarLink to={item.link} external={item.external} target={item.target} active={isActive}>
|
|
42
|
+
{item.icon ? <NavbarIcon url={item.icon} /> : null}
|
|
43
|
+
<NavbarLabel>{translate(item.labelTranslationKey, item.label)}</NavbarLabel>
|
|
44
|
+
{item.external ? <ExternalIcon /> : null}
|
|
45
|
+
</NavbarLink>
|
|
46
|
+
</NavbarMenuItem>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if ((navItem as ResolvedNavGroupItem).items) {
|
|
51
|
+
const item = navItem as ResolvedNavGroupItem;
|
|
52
|
+
const groupItems = item.items as ResolvedNavLinkItem[];
|
|
53
|
+
const groupItemsComponents = groupItems.map((item, index) => (
|
|
54
|
+
<Link key={`${item.label}_${index}`} to={item.link}>
|
|
55
|
+
{translate(item.labelTranslationKey, item.label)}
|
|
56
|
+
</Link>
|
|
57
|
+
));
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<NavbarMenuItemDropdown items={groupItemsComponents} triggerEvent="hover">
|
|
61
|
+
<NavbarMenuItem
|
|
62
|
+
active={false}
|
|
63
|
+
data-component-name="Navbar/NavbarItem"
|
|
64
|
+
className={className}
|
|
65
|
+
onClick={() => telemetry.send('navbar_menu_item_clicked', { type: 'group' })}
|
|
66
|
+
>
|
|
67
|
+
<NavbarIcon url={item.icon} />
|
|
68
|
+
<NavbarLabel>{translate(item.labelTranslationKey, item.label)}</NavbarLabel>
|
|
69
|
+
{item.external ? <ExternalIcon /> : null}
|
|
70
|
+
</NavbarMenuItem>
|
|
71
|
+
</NavbarMenuItemDropdown>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const NavbarMenuItemDropdown = styled(Dropdown).attrs(() => ({
|
|
79
|
+
dataAttributes: {
|
|
80
|
+
'data-component-name': 'Navbar/NavbarItemDropdown',
|
|
81
|
+
},
|
|
82
|
+
}))`
|
|
83
|
+
:hover {
|
|
84
|
+
text-decoration: var(--navbar-item-hover-text-decoration);
|
|
85
|
+
background: var(--navbar-item-hover-background-color);
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
export const NavbarLink = styled(Link)`
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
color: ${({ active }) =>
|
|
93
|
+
active ? 'var(--navbar-item-active-text-color)' : 'var(--navbar-text-color)'};
|
|
94
|
+
text-decoration: ${({ active }) =>
|
|
95
|
+
active ? 'var(--navbar-item-active-text-decoration)' : 'none'};
|
|
96
|
+
`;
|
|
97
|
+
|
|
98
|
+
export const NavbarMenuItem = styled.li<{ active?: boolean }>`
|
|
99
|
+
display: inline-block;
|
|
100
|
+
padding: var(--navbar-item-padding-vertical) var(--navbar-item-padding-horizontal);
|
|
101
|
+
text-align: center;
|
|
102
|
+
line-height: var(--navbar-item-line-height);
|
|
103
|
+
font-weight: var(--navbar-item-font-weight);
|
|
104
|
+
|
|
105
|
+
border-radius: var(--navbar-item-border-radius);
|
|
106
|
+
border-bottom: ${({ active }) =>
|
|
107
|
+
active ? 'var(--navbar-item-active-bottom-border)' : 'var(--navbar-item-bottom-border)'};
|
|
108
|
+
|
|
109
|
+
background: ${({ active }) => active && 'var(--navbar-item-active-background-color)'};
|
|
110
|
+
color: ${({ active }) =>
|
|
111
|
+
active ? 'var(--navbar-item-active-text-color)' : 'var(--navbar-text-color)'};
|
|
112
|
+
|
|
113
|
+
&:hover {
|
|
114
|
+
color: var(--navbar-item-hover-text-color);
|
|
115
|
+
text-decoration: var(--navbar-item-hover-text-decoration);
|
|
116
|
+
border-bottom: ${({ active }) => !active && 'var(--navbar-item-hover-bottom-border)'};
|
|
117
|
+
background: ${({ active }) =>
|
|
118
|
+
active
|
|
119
|
+
? 'var(--navbar-item-active-background-color)'
|
|
120
|
+
: 'var(--navbar-item-hover-background-color)'};
|
|
121
|
+
|
|
122
|
+
${NavbarLink} {
|
|
123
|
+
color: var(--navbar-item-hover-text-color);
|
|
124
|
+
text-decoration: var(--navbar-item-hover-text-decoration);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
const NavbarLabel = styled.span`
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
vertical-align: middle;
|
|
132
|
+
`;
|
|
133
|
+
|
|
134
|
+
export const NavbarIcon = styled.i<{ url?: string }>`
|
|
135
|
+
${({ url }) =>
|
|
136
|
+
url &&
|
|
137
|
+
css`
|
|
138
|
+
background-image: url('${url}');
|
|
139
|
+
width: var(--navbar-item-icon-width);
|
|
140
|
+
height: var(--navbar-item-icon-height);
|
|
141
|
+
display: inline-block;
|
|
142
|
+
background-size: contain;
|
|
143
|
+
margin-right: var(--navbar-item-icon-margin-right);
|
|
144
|
+
vertical-align: middle;
|
|
145
|
+
background-position: center;
|
|
146
|
+
background-repeat: no-repeat;
|
|
147
|
+
`}
|
|
148
|
+
`;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { NavbarItem } from '@theme/components/Navbar/NavbarItem';
|
|
5
|
+
import { isPrimitive } from '@theme/utils';
|
|
6
|
+
import type { ResolvedConfigLinks, ResolvedNavItem } from '@theme/types/portal';
|
|
7
|
+
|
|
8
|
+
export function NavbarMenu({
|
|
9
|
+
menuItems,
|
|
10
|
+
className,
|
|
11
|
+
}: {
|
|
12
|
+
menuItems: ResolvedConfigLinks;
|
|
13
|
+
className?: string;
|
|
14
|
+
}): JSX.Element | null {
|
|
15
|
+
if (isPrimitive(menuItems)) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<NavItemsContainer data-component-name="Navbar/NavbarMenu" className={className}>
|
|
21
|
+
{(menuItems as ResolvedNavItem[]).map((navItem, index) => {
|
|
22
|
+
return (
|
|
23
|
+
<NavbarItem key={`${navItem.label}_${index}`} data-cy={navItem.label} navItem={navItem} />
|
|
24
|
+
);
|
|
25
|
+
})}
|
|
26
|
+
</NavItemsContainer>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const NavItemsContainer = styled.ul`
|
|
31
|
+
list-style: none;
|
|
32
|
+
padding: 0;
|
|
33
|
+
display: none;
|
|
34
|
+
flex-wrap: nowrap;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: var(--navbar-menu-justify-content);
|
|
37
|
+
flex: 1;
|
|
38
|
+
gap: var(--navbar-menu-items-gap);
|
|
39
|
+
|
|
40
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
41
|
+
display: flex;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from '@theme/components/Navbar/Navbar';
|
|
2
|
+
export * from '@theme/components/Navbar/NavbarItem';
|
|
3
|
+
export * from '@theme/components/Navbar/NavbarMenu';
|
|
4
|
+
export * from '@theme/components/Navbar/BurgerButton';
|
|
5
|
+
export * from '@theme/components/Navbar/styledVariables';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const navbar = css`
|
|
4
|
+
--navbar-background-color: var(--bg-base); // @presenter Color
|
|
5
|
+
--navbar-border-color: var(--border-secondary);
|
|
6
|
+
--navbar-border: 1px solid var(--navbar-border-color);
|
|
7
|
+
|
|
8
|
+
--navbar-text-color: var(--text-secondary); // @presenter Color
|
|
9
|
+
--navbar-height: 64px; // @presenter Spacing
|
|
10
|
+
--navbar-font-size: var(--font-size-base);
|
|
11
|
+
--navbar-padding: 0 var(--spacing-xl); // @presenter Spacing
|
|
12
|
+
--navbar-font-family: var(--font-family-base);
|
|
13
|
+
--navbar-container-max-width: 100%;
|
|
14
|
+
|
|
15
|
+
--navbar-menu-items-gap: var(--spacing-base);
|
|
16
|
+
--navbar-menu-justify-content: flex-start;
|
|
17
|
+
|
|
18
|
+
--navbar-item-font-weight: var(--font-weight-regular);
|
|
19
|
+
|
|
20
|
+
--navbar-item-active-text-color: var(--text-primary);
|
|
21
|
+
--navbar-item-active-text-decoration: none;
|
|
22
|
+
--navbar-item-active-bottom-border: 2px solid var(--navbar-item-active-text-color);
|
|
23
|
+
|
|
24
|
+
--navbar-item-padding-vertical: var(--spacing-xxs);
|
|
25
|
+
--navbar-item-padding-horizontal: var(--spacing-sm);
|
|
26
|
+
--navbar-item-line-height: var(--line-height-base);
|
|
27
|
+
--navbar-item-active-background-color: none;
|
|
28
|
+
--navbar-item-border-radius: 0;
|
|
29
|
+
--navbar-item-bottom-border: 2px solid transparent;
|
|
30
|
+
|
|
31
|
+
--navbar-item-hover-text-color: var(--text-primary);
|
|
32
|
+
--navbar-item-hover-text-decoration: none;
|
|
33
|
+
--navbar-item-hover-background-color: none;
|
|
34
|
+
--navbar-item-hover-bottom-border: 2px solid var(--border-primary);
|
|
35
|
+
|
|
36
|
+
--navbar-item-icon-width: 1.5em; // @presenter Spacing
|
|
37
|
+
--navbar-item-icon-height: 1.5em; // @presenter Spacing
|
|
38
|
+
--navbar-item-icon-margin-right: 0.5em; // @presenter Spacing
|
|
39
|
+
`;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { Link } from '@portal/Link';
|
|
5
|
+
import type { LogoConfig } from '@theme/types/portal';
|
|
6
|
+
import { Image } from '@theme/components/Image/Image';
|
|
7
|
+
import { telemetry } from '@portal/telemetry';
|
|
8
|
+
|
|
9
|
+
export type NavbarLogoProps = {
|
|
10
|
+
logo: Pick<LogoConfig, 'image' | 'link' | 'altText' | 'srcSet'>;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export function NavbarLogo({ logo, className }: NavbarLogoProps): JSX.Element | null {
|
|
15
|
+
if (!logo?.image && !logo?.srcSet) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const img = (
|
|
19
|
+
<Image className={className} src={logo.image} srcSet={logo.srcSet} alt={logo.altText} />
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<LogoContainer>
|
|
24
|
+
{logo.link ? (
|
|
25
|
+
<Link to={logo.link} onClick={() => telemetry.send('logo_clicked', {})}>
|
|
26
|
+
{img}
|
|
27
|
+
</Link>
|
|
28
|
+
) : (
|
|
29
|
+
img
|
|
30
|
+
)}
|
|
31
|
+
</LogoContainer>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const LogoContainer = styled.div.attrs({
|
|
36
|
+
'data-component-name': 'NavbarLogo/NavbarLogo',
|
|
37
|
+
})`
|
|
38
|
+
max-width: var(--navbar-logo-max-width);
|
|
39
|
+
max-height: var(--navbar-logo-max-height);
|
|
40
|
+
height: var(--navbar-logo-height);
|
|
41
|
+
margin: var(--navbar-logo-margin);
|
|
42
|
+
|
|
43
|
+
img {
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
max-height: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const logo = css`
|
|
4
|
+
/**
|
|
5
|
+
* @tokens Logo
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
--navbar-logo-height: 2rem; // @presenter Spacing
|
|
9
|
+
--navbar-logo-width: auto;
|
|
10
|
+
--navbar-logo-margin: 16px; // @presenter Spacing
|
|
11
|
+
--navbar-logo-max-width: 285px; // @presenter Spacing
|
|
12
|
+
--navbar-logo-max-height: 285px; // @presenter Spacing
|
|
13
|
+
// @tokens End
|
|
14
|
+
`;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
// FIXME!!!
|
|
5
|
+
|
|
6
|
+
interface ClearButtonProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
handleClear?: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const ClearButtonComponent = ({ className, style, handleClear }: ClearButtonProps): JSX.Element => (
|
|
13
|
+
<button className={className} style={style} onClick={handleClear}>
|
|
14
|
+
✕
|
|
15
|
+
</button>
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export const ClearButton = styled(memo<ClearButtonProps>(ClearButtonComponent))`
|
|
19
|
+
z-index: 1;
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 24px;
|
|
22
|
+
top: 50%;
|
|
23
|
+
transform: translateY(-50%);
|
|
24
|
+
color: #89949f;
|
|
25
|
+
background: none;
|
|
26
|
+
border: none;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
color: #fff;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import type { TryItSecurityAppsProps } from '@theme/components/OpenApiDocs/TryItSecurityApps';
|
|
5
|
+
import { Button } from '@theme/components/Button/Button';
|
|
6
|
+
import { usePreloadHistory } from '@portal/usePreloadHistory';
|
|
7
|
+
import { usePageData } from '@portal/hooks/usePageData';
|
|
8
|
+
import { Dropdown } from '@theme/components/OpenApiDocs/Dropdown';
|
|
9
|
+
|
|
10
|
+
export function DevOnboardingTryItSecurity(props: TryItSecurityAppsProps) {
|
|
11
|
+
const apiId = (props as any).apiId;
|
|
12
|
+
const history = usePreloadHistory();
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
const { userData } = usePageData('userData') || {};
|
|
15
|
+
|
|
16
|
+
// TODO: handle error
|
|
17
|
+
const [_error, setError] = React.useState<string | undefined>();
|
|
18
|
+
const [apps, setApps] = React.useState<{ id: string; title: string }[] | undefined>();
|
|
19
|
+
const [appId, setAppId] = React.useState<string | undefined>('');
|
|
20
|
+
const [loading, setLoading] = React.useState(true);
|
|
21
|
+
const [appLoading, setAppLoading] = React.useState(false);
|
|
22
|
+
|
|
23
|
+
const [selectedAppSecret, setSelectedAppSecret] = React.useState<string | undefined>();
|
|
24
|
+
|
|
25
|
+
const [acceptValueUpdate, setAcceptValueUpdate] = React.useState(true);
|
|
26
|
+
const initialRender = React.useRef(true);
|
|
27
|
+
|
|
28
|
+
const hasApiAccess = !loading && !!apps?.length;
|
|
29
|
+
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
if (!props.value && initialRender.current) return;
|
|
32
|
+
if (acceptValueUpdate) {
|
|
33
|
+
setAcceptValueUpdate(false);
|
|
34
|
+
} else {
|
|
35
|
+
setAppId('');
|
|
36
|
+
setSelectedAppSecret('');
|
|
37
|
+
}
|
|
38
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
|
+
}, [props.value]);
|
|
40
|
+
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
initialRender.current = false;
|
|
43
|
+
const prevAppId = sessionStorage.getItem('redocly_onboarding:prevAppId');
|
|
44
|
+
if (prevAppId) {
|
|
45
|
+
setAppId(prevAppId);
|
|
46
|
+
}
|
|
47
|
+
if (userData?.isAuthenticated) {
|
|
48
|
+
fetch(`/api/api-keys/api-products/${apiId}/access?expand=1`).then((res) => {
|
|
49
|
+
return res
|
|
50
|
+
.json()
|
|
51
|
+
.then((data: any) => {
|
|
52
|
+
if (res.ok) {
|
|
53
|
+
setApps(data.apps);
|
|
54
|
+
|
|
55
|
+
if (data.apps[0]?.id) {
|
|
56
|
+
setAppId(data.apps[0].id);
|
|
57
|
+
loadAppCredentials(data.apps[0].id);
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
setError(data.message);
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
.catch(() => setError('Something went wrong'))
|
|
64
|
+
.finally(() => setLoading(false));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}, [apiId, userData?.isAuthenticated]);
|
|
68
|
+
|
|
69
|
+
React.useEffect(() => {
|
|
70
|
+
sessionStorage.setItem('redocly_onboarding:prevAppId', appId || '');
|
|
71
|
+
}, [appId]);
|
|
72
|
+
|
|
73
|
+
if (!apiId || !userData?.isAuthenticated) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const loadAppCredentials = (appId: string) => {
|
|
78
|
+
setAppLoading(true);
|
|
79
|
+
fetch(`/api/api-keys/apps/${appId}`).then((res) => {
|
|
80
|
+
return res
|
|
81
|
+
.json()
|
|
82
|
+
.then((data: any) => {
|
|
83
|
+
if (res.ok) {
|
|
84
|
+
const cred = data.credentials.find((cred: any) => cred.status === 'approved');
|
|
85
|
+
setAcceptValueUpdate(true);
|
|
86
|
+
setSelectedAppSecret(cred[cred.valueToUseInHeader] || cred.clientSecret);
|
|
87
|
+
} else {
|
|
88
|
+
setError(data.message);
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
.catch(() => setError('Something went wrong'))
|
|
92
|
+
.finally(() => setAppLoading(false));
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const placeholder = loading
|
|
97
|
+
? 'Loading your apps...'
|
|
98
|
+
: hasApiAccess
|
|
99
|
+
? undefined
|
|
100
|
+
: 'You do not have access to this API';
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<>
|
|
104
|
+
<FormLabel htmlFor="server">Select app: </FormLabel>
|
|
105
|
+
<FormControl>
|
|
106
|
+
<TryItDropdown
|
|
107
|
+
placeholder={placeholder}
|
|
108
|
+
value={appId || placeholder}
|
|
109
|
+
options={apps?.map((app) => ({ title: app.title, value: app.id })) || []}
|
|
110
|
+
fullWidth
|
|
111
|
+
onChange={({ value }: { value: string }) => {
|
|
112
|
+
setAppId(value);
|
|
113
|
+
loadAppCredentials(value);
|
|
114
|
+
}}
|
|
115
|
+
/>
|
|
116
|
+
<UseKeyButton
|
|
117
|
+
disabled={(!selectedAppSecret && hasApiAccess) || appLoading}
|
|
118
|
+
onClick={() => {
|
|
119
|
+
if (selectedAppSecret) {
|
|
120
|
+
props.onChange(selectedAppSecret);
|
|
121
|
+
} else if (!hasApiAccess) {
|
|
122
|
+
history.push('/apps/?createApp&apiId=' + apiId);
|
|
123
|
+
}
|
|
124
|
+
}}
|
|
125
|
+
>
|
|
126
|
+
{appLoading ? 'Loading...' : hasApiAccess ? 'Use key' : 'Request access'}
|
|
127
|
+
</UseKeyButton>
|
|
128
|
+
</FormControl>
|
|
129
|
+
</>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const TryItDropdown = styled(Dropdown)`
|
|
134
|
+
.dropdown-select,
|
|
135
|
+
label {
|
|
136
|
+
background-color: var(--panel-try-it-dropdown-background-color);
|
|
137
|
+
border: var(--panel-try-it-dropdown-border);
|
|
138
|
+
color: var(--panel-try-it-dropdown-color);
|
|
139
|
+
}
|
|
140
|
+
`;
|
|
141
|
+
|
|
142
|
+
const FormControl = styled.div`
|
|
143
|
+
width: 100%;
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
margin-bottom: 10px;
|
|
147
|
+
|
|
148
|
+
&:last-child {
|
|
149
|
+
margin-bottom: 0;
|
|
150
|
+
}
|
|
151
|
+
`;
|
|
152
|
+
|
|
153
|
+
const FormLabel = styled.label<{ required?: boolean }>`
|
|
154
|
+
padding-bottom: 6px;
|
|
155
|
+
display: block;
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
line-height: 1em;
|
|
158
|
+
|
|
159
|
+
${({ required }) =>
|
|
160
|
+
required &&
|
|
161
|
+
`
|
|
162
|
+
&:after {
|
|
163
|
+
display: inline-block;
|
|
164
|
+
content: '*';
|
|
165
|
+
margin-left: 4px;
|
|
166
|
+
color: var(--color-error);
|
|
167
|
+
}
|
|
168
|
+
`}
|
|
169
|
+
`;
|
|
170
|
+
|
|
171
|
+
const UseKeyButton = styled(Button)`
|
|
172
|
+
min-width: 100px;
|
|
173
|
+
align-self: flex-end;
|
|
174
|
+
margin-top: 10px;
|
|
175
|
+
margin-right: 0;
|
|
176
|
+
`;
|