@redocly/theme 0.4.15 → 0.5.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/{REAMDE.md → README.md} +0 -0
- package/lib/ApiOnboarding/AppCustomAttributes.d.ts +5 -0
- package/lib/ApiOnboarding/AppCustomAttributes.js +8 -0
- package/{Button → lib/Button}/Button.d.ts +0 -0
- package/lib/Button/Button.js +156 -0
- package/{Button → lib/Button}/index.d.ts +0 -0
- package/{Button → lib/Button}/index.js +1 -0
- package/{Cards → lib/Cards}/Card.d.ts +0 -0
- package/lib/Cards/Card.js +36 -0
- package/{Cards → lib/Cards}/CardsBlock.d.ts +0 -0
- package/lib/Cards/CardsBlock.js +15 -0
- package/{CodeBlock → lib/CodeBlock}/CodeBlock.d.ts +0 -0
- package/lib/CodeBlock/CodeBlock.js +103 -0
- package/{CodeBlock → lib/CodeBlock}/index.d.ts +0 -0
- package/{CodeBlock → lib/CodeBlock}/index.js +1 -0
- package/{ColorModeSwitcher → lib/ColorModeSwitcher}/ColorModeSwitcher.d.ts +0 -0
- package/{ColorModeSwitcher → lib/ColorModeSwitcher}/ColorModeSwitcher.js +22 -36
- package/{ColorModeSwitcher → lib/ColorModeSwitcher}/index.d.ts +0 -0
- package/{ColorModeSwitcher → lib/ColorModeSwitcher}/index.js +1 -0
- package/{CopyButton → lib/CopyButton}/CopyButton.d.ts +0 -0
- package/lib/CopyButton/CopyButton.js +50 -0
- package/{CopyButton → lib/CopyButton}/CopyButtonWrapper.d.ts +0 -0
- package/{CopyButton → lib/CopyButton}/CopyButtonWrapper.js +14 -15
- package/{CopyButton → lib/CopyButton}/index.d.ts +0 -0
- package/{CopyButton → lib/CopyButton}/index.js +1 -0
- package/{EditPageButton → lib/EditPageButton}/EditPageButton.d.ts +0 -0
- package/lib/EditPageButton/EditPageButton.js +36 -0
- package/{EditPageButton → lib/EditPageButton}/index.d.ts +0 -0
- package/{EditPageButton → lib/EditPageButton}/index.js +1 -0
- package/{Footer → lib/Footer}/CustomFooter.d.ts +0 -0
- package/lib/Footer/CustomFooter.js +35 -0
- package/{Footer → lib/Footer}/CustomFooterNavItem.d.ts +0 -0
- package/lib/Footer/CustomFooterNavItem.js +33 -0
- package/{Footer → lib/Footer}/Footer.d.ts +0 -0
- package/lib/Footer/Footer.js +35 -0
- package/{Footer → lib/Footer}/FooterColumn.d.ts +0 -0
- package/lib/Footer/FooterColumn.js +54 -0
- package/{Footer → lib/Footer}/FooterColumns.d.ts +0 -0
- package/lib/Footer/FooterColumns.js +44 -0
- package/{Footer → lib/Footer}/FooterCopyright.d.ts +0 -0
- package/lib/Footer/FooterCopyright.js +26 -0
- package/{Footer → lib/Footer}/index.d.ts +0 -0
- package/{Footer → lib/Footer}/index.js +1 -0
- package/{JsonViewer → lib/JsonViewer}/JsonViewer.d.ts +0 -0
- package/lib/JsonViewer/JsonViewer.js +240 -0
- package/{JsonViewer → lib/JsonViewer}/index.d.ts +0 -0
- package/{JsonViewer → lib/JsonViewer}/index.js +1 -0
- package/lib/LastUpdated/LastUpdated.d.ts +14 -0
- package/lib/LastUpdated/LastUpdated.js +52 -0
- package/{Layout → lib/Layout}/PageLayout.d.ts +0 -0
- package/lib/Layout/PageLayout.js +29 -0
- package/{Layout → lib/Layout}/RootLayout.d.ts +0 -0
- package/lib/Layout/RootLayout.js +19 -0
- package/{Layout → lib/Layout}/index.d.ts +0 -0
- package/{Layout → lib/Layout}/index.js +1 -0
- package/{Markdown → lib/Markdown}/Admonition.d.ts +0 -0
- package/lib/Markdown/Admonition.js +56 -0
- package/{Markdown → lib/Markdown}/CodeSample/CodeSample.d.ts +0 -0
- package/lib/Markdown/CodeSample/CodeSample.js +219 -0
- package/{Markdown → lib/Markdown}/CodeSample/index.d.ts +0 -0
- package/{Markdown → lib/Markdown}/CodeSample/index.js +1 -0
- package/{Markdown → lib/Markdown}/ContainerWrapper.d.ts +0 -0
- package/lib/Markdown/ContainerWrapper.js +26 -0
- package/{Markdown → lib/Markdown}/Details.d.ts +0 -0
- package/lib/Markdown/Details.js +17 -0
- package/{Markdown → lib/Markdown}/Heading.d.ts +0 -0
- package/{Markdown → lib/Markdown}/Heading.js +9 -9
- package/{Markdown → lib/Markdown}/MarkdownLayout.d.ts +1 -0
- package/lib/Markdown/MarkdownLayout.js +30 -0
- package/{Markdown → lib/Markdown}/MarkdownWrapper.d.ts +0 -0
- package/lib/Markdown/MarkdownWrapper.js +391 -0
- package/{Markdown → lib/Markdown}/Mermaid.d.ts +0 -0
- package/lib/Markdown/Mermaid.js +19 -0
- package/{Markdown → lib/Markdown}/PageWrapper.d.ts +0 -0
- package/lib/Markdown/PageWrapper.js +15 -0
- package/{Markdown → lib/Markdown}/Sup.d.ts +0 -0
- package/lib/Markdown/Sup.js +14 -0
- package/{Markdown → lib/Markdown}/Tabs/Tab.d.ts +0 -0
- package/lib/Markdown/Tabs/Tab.js +28 -0
- package/{Markdown → lib/Markdown}/Tabs/Tabs.d.ts +0 -0
- package/lib/Markdown/Tabs/Tabs.js +62 -0
- package/{Markdown → lib/Markdown}/Tabs/index.d.ts +0 -0
- package/{Markdown → lib/Markdown}/Tabs/index.js +1 -0
- package/{Markdown → lib/Markdown}/index.d.ts +0 -0
- package/{Markdown → lib/Markdown}/index.js +1 -0
- package/{Navbar → lib/Navbar}/MobileNavbarDropdown.d.ts +0 -0
- package/lib/Navbar/MobileNavbarDropdown.js +30 -0
- package/{Navbar → lib/Navbar}/MobileNavbarItem.d.ts +1 -1
- package/lib/Navbar/MobileNavbarItem.js +106 -0
- package/{Navbar → lib/Navbar}/MobileNavbarMenu.d.ts +0 -0
- package/lib/Navbar/MobileNavbarMenu.js +92 -0
- package/{Navbar → lib/Navbar}/MobileNavbarMenuButton.d.ts +0 -0
- package/lib/Navbar/MobileNavbarMenuButton.js +18 -0
- package/{Navbar → lib/Navbar}/Navbar.d.ts +0 -0
- package/lib/Navbar/Navbar.js +75 -0
- package/{Navbar → lib/Navbar}/NavbarDropdown.d.ts +0 -0
- package/lib/Navbar/NavbarDropdown.js +38 -0
- package/{Navbar → lib/Navbar}/NavbarItem.d.ts +1 -1
- package/lib/Navbar/NavbarItem.js +72 -0
- package/{Navbar → lib/Navbar}/NavbarMenu.d.ts +0 -0
- package/lib/Navbar/NavbarMenu.js +34 -0
- package/{Navbar → lib/Navbar}/index.d.ts +0 -0
- package/{Navbar → lib/Navbar}/index.js +1 -0
- package/{NavbarLogo → lib/NavbarLogo}/NavbarLogo.d.ts +0 -0
- package/lib/NavbarLogo/NavbarLogo.js +24 -0
- package/{NavbarLogo → lib/NavbarLogo}/index.d.ts +0 -0
- package/{NavbarLogo → lib/NavbarLogo}/index.js +1 -0
- package/{OperationBadge → lib/OperationBadge}/OperationBadge.d.ts +0 -0
- package/lib/OperationBadge/OperationBadge.js +68 -0
- package/{OperationBadge → lib/OperationBadge}/index.d.ts +0 -0
- package/{OperationBadge → lib/OperationBadge}/index.js +1 -0
- package/{PageNavigation → lib/PageNavigation}/NextPageLink.d.ts +0 -0
- package/lib/PageNavigation/NextPageLink.js +26 -0
- package/{PageNavigation → lib/PageNavigation}/PageNavigation.d.ts +0 -0
- package/lib/PageNavigation/PageNavigation.js +31 -0
- package/{PageNavigation → lib/PageNavigation}/PreviousPageLink.d.ts +0 -0
- package/lib/PageNavigation/PreviousPageLink.js +26 -0
- package/{PageNavigation → lib/PageNavigation}/index.d.ts +0 -0
- package/{PageNavigation → lib/PageNavigation}/index.js +1 -0
- package/{Panel → lib/Panel}/Panel.d.ts +0 -0
- package/lib/Panel/Panel.js +39 -0
- package/{Panel → lib/Panel}/PanelBody.d.ts +0 -0
- package/lib/Panel/PanelBody.js +59 -0
- package/{Panel → lib/Panel}/PanelComponent.d.ts +1 -1
- package/{Panel → lib/Panel}/PanelComponent.js +21 -36
- package/{Panel → lib/Panel}/PanelHeader.d.ts +0 -0
- package/lib/Panel/PanelHeader.js +33 -0
- package/{Panel → lib/Panel}/PanelHeaderTitle.d.ts +0 -0
- package/lib/Panel/PanelHeaderTitle.js +21 -0
- package/{Panel → lib/Panel}/index.d.ts +0 -0
- package/{Panel → lib/Panel}/index.js +1 -0
- package/{Profile → lib/Profile}/Profile.d.ts +0 -0
- package/lib/Profile/Profile.js +87 -0
- package/{Profile → lib/Profile}/index.d.ts +0 -0
- package/{Profile → lib/Profile}/index.js +1 -0
- package/{SamplesPanelControls → lib/SamplesPanelControls}/SamplesPanelControls.d.ts +0 -0
- package/lib/SamplesPanelControls/SamplesPanelControls.js +74 -0
- package/{SamplesPanelControls → lib/SamplesPanelControls}/index.d.ts +0 -0
- package/{SamplesPanelControls → lib/SamplesPanelControls}/index.js +1 -0
- package/{Search → lib/Search}/Autocomplete.d.ts +0 -0
- package/lib/Search/Autocomplete.js +105 -0
- package/{Search → lib/Search}/ClearIcon.d.ts +0 -0
- package/lib/Search/ClearIcon.js +26 -0
- package/{Search → lib/Search}/Input.d.ts +0 -0
- package/lib/Search/Input.js +30 -0
- package/{Search → lib/Search}/Parameters.d.ts +0 -0
- package/lib/Search/Parameters.js +55 -0
- package/{Search → lib/Search}/Popover.d.ts +0 -0
- package/lib/Search/Popover.js +26 -0
- package/{Search → lib/Search}/Search.d.ts +0 -0
- package/lib/Search/Search.js +27 -0
- package/{Search → lib/Search}/SearchIcon.d.ts +0 -0
- package/lib/Search/SearchIcon.js +27 -0
- package/{Search → lib/Search}/SearchItem.d.ts +0 -0
- package/lib/Search/SearchItem.js +98 -0
- package/{Search → lib/Search}/SidebarSearch.d.ts +0 -0
- package/lib/Search/SidebarSearch.js +20 -0
- package/{Search → lib/Search}/index.d.ts +0 -0
- package/{Search → lib/Search}/index.js +1 -0
- package/{Search → lib/Search}/utils.d.ts +0 -0
- package/{Search → lib/Search}/utils.js +8 -26
- package/{Sidebar → lib/Sidebar}/ApiCallItem.d.ts +0 -0
- package/lib/Sidebar/ApiCallItem.js +34 -0
- package/{Sidebar → lib/Sidebar}/ArrowBack.d.ts +0 -0
- package/lib/Sidebar/ArrowBack.js +22 -0
- package/{Sidebar → lib/Sidebar}/BackButton.d.ts +0 -0
- package/lib/Sidebar/BackButton.js +39 -0
- package/{Sidebar → lib/Sidebar}/Drilldown.d.ts +0 -0
- package/lib/Sidebar/Drilldown.js +43 -0
- package/{Sidebar → lib/Sidebar}/DrilldownMenu.d.ts +0 -0
- package/lib/Sidebar/DrilldownMenu.js +71 -0
- package/{Sidebar → lib/Sidebar}/DrilldownMenuItem.d.ts +0 -0
- package/lib/Sidebar/DrilldownMenuItem.js +42 -0
- package/{Sidebar → lib/Sidebar}/ExternalIcon.d.ts +0 -0
- package/lib/Sidebar/ExternalIcon.js +21 -0
- package/{Sidebar → lib/Sidebar}/Menu.d.ts +0 -0
- package/lib/Sidebar/Menu.js +17 -0
- package/{Sidebar → lib/Sidebar}/MenuContainer.d.ts +0 -0
- package/lib/Sidebar/MenuContainer.js +16 -0
- package/{Sidebar → lib/Sidebar}/MenuGroup.d.ts +0 -0
- package/lib/Sidebar/MenuGroup.js +88 -0
- package/{Sidebar → lib/Sidebar}/MenuItem.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/MenuItem.js +9 -14
- package/{Sidebar → lib/Sidebar}/MenuItemLabel.d.ts +0 -0
- package/lib/Sidebar/MenuItemLabel.js +46 -0
- package/lib/Sidebar/MenuLink.d.ts +4 -0
- package/lib/Sidebar/MenuLink.js +15 -0
- package/{Sidebar → lib/Sidebar}/MenuLinkItem.d.ts +0 -0
- package/lib/Sidebar/MenuLinkItem.js +15 -0
- package/{Sidebar → lib/Sidebar}/MobileSidebarButton.d.ts +0 -0
- package/lib/Sidebar/MobileSidebarButton.js +46 -0
- package/{Sidebar → lib/Sidebar}/Separator.d.ts +0 -0
- package/lib/Sidebar/Separator.js +18 -0
- package/{Sidebar → lib/Sidebar}/SeparatorItem.d.ts +0 -0
- package/lib/Sidebar/SeparatorItem.js +25 -0
- package/{Sidebar → lib/Sidebar}/SeparatorLine.d.ts +0 -0
- package/lib/Sidebar/SeparatorLine.js +15 -0
- package/{Sidebar → lib/Sidebar}/Sidebar.d.ts +0 -0
- package/lib/Sidebar/Sidebar.js +55 -0
- package/{Sidebar → lib/Sidebar}/SidebarLayout.d.ts +0 -0
- package/lib/Sidebar/SidebarLayout.js +31 -0
- package/{Sidebar → lib/Sidebar}/index.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/index.js +1 -0
- package/{Sidebar → lib/Sidebar}/types/DrilldownMenuProps.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/types/DrilldownMenuProps.js +1 -0
- package/{Sidebar → lib/Sidebar}/types/ItemState.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/types/ItemState.js +1 -0
- package/{Sidebar → lib/Sidebar}/types/MenuItemProps.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/types/MenuItemProps.js +1 -0
- package/{Sidebar → lib/Sidebar}/types/MenuStyle.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/types/MenuStyle.js +1 -0
- package/{Sidebar → lib/Sidebar}/types/NavItem.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/types/NavItem.js +1 -0
- package/{Sidebar → lib/Sidebar}/types/index.d.ts +0 -0
- package/{Sidebar → lib/Sidebar}/types/index.js +1 -0
- package/{SidebarLogo → lib/SidebarLogo}/SidebarLogo.d.ts +0 -0
- package/lib/SidebarLogo/SidebarLogo.js +31 -0
- package/{SidebarLogo → lib/SidebarLogo}/index.d.ts +0 -0
- package/{SidebarLogo → lib/SidebarLogo}/index.js +1 -0
- package/{SourceCode → lib/SourceCode}/SourceCode.d.ts +0 -0
- package/{SourceCode → lib/SourceCode}/SourceCode.js +14 -34
- package/{SourceCode → lib/SourceCode}/index.d.ts +0 -0
- package/{SourceCode → lib/SourceCode}/index.js +1 -0
- package/{TableOfContent → lib/TableOfContent}/TableOfContent.d.ts +0 -0
- package/lib/TableOfContent/TableOfContent.js +116 -0
- package/{TableOfContent → lib/TableOfContent}/index.d.ts +0 -0
- package/{TableOfContent → lib/TableOfContent}/index.js +1 -0
- package/{TableOfContent → lib/TableOfContent}/utils.d.ts +0 -0
- package/lib/TableOfContent/utils.js +41 -0
- package/{Tooltip → lib/Tooltip}/Tooltip.d.ts +0 -0
- package/lib/Tooltip/Tooltip.js +173 -0
- package/{Tooltip → lib/Tooltip}/index.d.ts +0 -0
- package/{Tooltip → lib/Tooltip}/index.js +1 -0
- package/{Typography → lib/Typography}/CompactTypography.d.ts +0 -0
- package/lib/Typography/CompactTypography.js +14 -0
- package/{Typography → lib/Typography}/Emphasis.d.ts +0 -0
- package/lib/Typography/Emphasis.js +13 -0
- package/{Typography → lib/Typography}/H1.d.ts +0 -0
- package/lib/Typography/H1.js +17 -0
- package/{Typography → lib/Typography}/H2.d.ts +0 -0
- package/lib/Typography/H2.js +17 -0
- package/{Typography → lib/Typography}/H3.d.ts +0 -0
- package/lib/Typography/H3.js +17 -0
- package/{Typography → lib/Typography}/SectionHeader.d.ts +0 -0
- package/lib/Typography/SectionHeader.js +19 -0
- package/{Typography → lib/Typography}/Typography.d.ts +0 -0
- package/lib/Typography/Typography.js +22 -0
- package/{Typography → lib/Typography}/index.d.ts +0 -0
- package/{Typography → lib/Typography}/index.js +1 -0
- package/{globalStyle.d.ts → lib/globalStyle.d.ts} +0 -0
- package/lib/globalStyle.js +1924 -0
- package/{hooks → lib/hooks}/__tests__/mocks/MockIntersectionObserver.d.ts +0 -0
- package/lib/hooks/__tests__/mocks/MockIntersectionObserver.js +79 -0
- package/{hooks → lib/hooks}/index.d.ts +0 -0
- package/{hooks → lib/hooks}/index.js +1 -0
- package/{hooks → lib/hooks}/useActiveHeading.d.ts +0 -0
- package/lib/hooks/useActiveHeading.js +85 -0
- package/{hooks → lib/hooks}/useActiveSectionId.d.ts +0 -0
- package/lib/hooks/useActiveSectionId.js +47 -0
- package/{hooks → lib/hooks}/useControl.d.ts +0 -0
- package/lib/hooks/useControl.js +16 -0
- package/{hooks → lib/hooks}/useDefaultThemeSettings.d.ts +0 -0
- package/{hooks → lib/hooks}/useDefaultThemeSettings.js +3 -2
- package/{hooks → lib/hooks}/useFullHeight.d.ts +0 -0
- package/{hooks → lib/hooks}/useFullHeight.js +13 -12
- package/{hooks → lib/hooks}/useMobileMenu.d.ts +0 -0
- package/lib/hooks/useMobileMenu.js +13 -0
- package/{hooks → lib/hooks}/useMount.d.ts +0 -0
- package/{hooks → lib/hooks}/useMount.js +4 -3
- package/{hooks → lib/hooks}/useNavbarHeight.d.ts +0 -0
- package/lib/hooks/useNavbarHeight.js +21 -0
- package/{hooks → lib/hooks}/useOutsideClick.d.ts +0 -0
- package/{hooks → lib/hooks}/useOutsideClick.js +5 -4
- package/{hooks → lib/hooks}/useUnmount.d.ts +0 -0
- package/{hooks → lib/hooks}/useUnmount.js +5 -4
- package/{icons → lib/icons}/AlertIcon/AlertIcon.d.ts +0 -0
- package/{icons → lib/icons}/AlertIcon/AlertIcon.js +22 -17
- package/{icons → lib/icons}/AlertIcon/index.d.ts +0 -0
- package/{icons → lib/icons}/AlertIcon/index.js +1 -0
- package/{icons → lib/icons}/ArrowIcon/ArrowIcon.d.ts +0 -0
- package/lib/icons/ArrowIcon/ArrowIcon.js +32 -0
- package/{icons → lib/icons}/ArrowIcon/index.d.ts +0 -0
- package/{icons → lib/icons}/ArrowIcon/index.js +1 -0
- package/{icons → lib/icons}/ColorModeIcon/ColorModeIcon.d.ts +0 -0
- package/{icons → lib/icons}/ColorModeIcon/ColorModeIcon.js +10 -11
- package/{icons → lib/icons}/ColorModeIcon/index.d.ts +0 -0
- package/{icons → lib/icons}/ColorModeIcon/index.js +1 -0
- package/{icons → lib/icons}/ShelfIcon/ShelfIcon.d.ts +0 -0
- package/lib/icons/ShelfIcon/ShelfIcon.js +52 -0
- package/{icons → lib/icons}/ShelfIcon/index.d.ts +0 -0
- package/{icons → lib/icons}/ShelfIcon/index.js +1 -0
- package/{icons → lib/icons}/index.d.ts +0 -0
- package/{icons → lib/icons}/index.js +1 -0
- package/{index.d.ts → lib/index.d.ts} +0 -0
- package/{index.js → lib/index.js} +1 -0
- package/{mocks → lib/mocks}/Link.d.ts +0 -0
- package/lib/mocks/Link.js +27 -0
- package/{mocks → lib/mocks}/constants/index.d.ts +0 -0
- package/{mocks → lib/mocks}/constants/index.js +1 -0
- package/{mocks → lib/mocks}/hooks/index.d.ts +0 -0
- package/{mocks → lib/mocks}/hooks/index.js +2 -1
- package/{mocks → lib/mocks}/hooks/usePageData.d.ts +0 -0
- package/{mocks → lib/mocks}/hooks/usePageData.js +1 -0
- package/{mocks → lib/mocks}/search.d.ts +0 -0
- package/{mocks → lib/mocks}/search.js +2 -1
- package/{mocks → lib/mocks}/types/index.d.ts +0 -0
- package/{mocks → lib/mocks}/types/index.js +1 -0
- package/lib/mocks/types.d.ts +14 -0
- package/{mocks → lib/mocks}/types.js +1 -0
- package/{mocks → lib/mocks}/usePreloadHistory.d.ts +0 -0
- package/{mocks → lib/mocks}/usePreloadHistory.js +3 -2
- package/{mocks → lib/mocks}/utils.d.ts +0 -0
- package/{mocks → lib/mocks}/utils.js +3 -2
- package/{ui → lib/ui}/Background.d.ts +0 -0
- package/lib/ui/Background.js +21 -0
- package/{ui → lib/ui}/Box.d.ts +0 -0
- package/lib/ui/Box.js +21 -0
- package/{ui → lib/ui}/Burger.d.ts +0 -0
- package/lib/ui/Burger.js +31 -0
- package/{ui → lib/ui}/Dropdown.d.ts +0 -0
- package/lib/ui/Dropdown.js +115 -0
- package/{ui → lib/ui}/Flex.d.ts +0 -0
- package/lib/ui/Flex.js +21 -0
- package/{ui → lib/ui}/Jumbotron.d.ts +0 -0
- package/lib/ui/Jumbotron.js +51 -0
- package/{ui → lib/ui}/Tiles/ThinTile.d.ts +1 -1
- package/lib/ui/Tiles/ThinTile.js +124 -0
- package/{ui → lib/ui}/Tiles/TileHeader.d.ts +0 -0
- package/lib/ui/Tiles/TileHeader.js +19 -0
- package/{ui → lib/ui}/Tiles/TileText.d.ts +0 -0
- package/lib/ui/Tiles/TileText.js +18 -0
- package/{ui → lib/ui}/Tiles/WideTile.d.ts +0 -0
- package/lib/ui/Tiles/WideTile.js +114 -0
- package/{ui → lib/ui}/Tiles/index.d.ts +0 -0
- package/{ui → lib/ui}/Tiles/index.js +1 -0
- package/{ui → lib/ui}/darkColors.d.ts +0 -0
- package/lib/ui/darkColors.js +70 -0
- package/{ui → lib/ui}/index.d.ts +0 -1
- package/{ui → lib/ui}/index.js +2 -5
- package/{utils → lib/utils}/ClipboardService.d.ts +0 -0
- package/{utils → lib/utils}/ClipboardService.js +11 -13
- package/{utils → lib/utils}/args-typecheck.d.ts +0 -0
- package/{utils → lib/utils}/args-typecheck.js +1 -0
- package/{utils → lib/utils}/class-names.d.ts +0 -0
- package/lib/utils/class-names.js +12 -0
- package/{utils → lib/utils}/color.d.ts +0 -0
- package/{utils → lib/utils}/color.js +7 -6
- package/{utils → lib/utils}/css-variables.d.ts +0 -0
- package/lib/utils/css-variables.js +6 -0
- package/{utils → lib/utils}/getNavbarElement.d.ts +0 -0
- package/{utils → lib/utils}/getNavbarElement.js +3 -2
- package/{utils → lib/utils}/highlight.d.ts +0 -0
- package/{utils → lib/utils}/highlight.js +10 -11
- package/{utils → lib/utils}/index.d.ts +0 -0
- package/{utils → lib/utils}/index.js +1 -0
- package/{utils → lib/utils}/isUrl.d.ts +0 -0
- package/{utils → lib/utils}/isUrl.js +6 -5
- package/{utils → lib/utils}/jsonToHtml.d.ts +0 -0
- package/lib/utils/jsonToHtml.js +180 -0
- package/{utils → lib/utils}/media-css.d.ts +0 -0
- package/lib/utils/media-css.js +13 -0
- package/{utils → lib/utils}/replaceHashInColor.d.ts +0 -0
- package/{utils → lib/utils}/replaceHashInColor.js +1 -0
- package/{utils → lib/utils}/theme-helpers.d.ts +0 -0
- package/lib/utils/theme-helpers.js +75 -0
- package/package.json +104 -5
- package/src/ApiOnboarding/AppCustomAttributes.tsx +6 -0
- package/src/Button/Button.tsx +2 -1
- package/src/Cards/Card.tsx +1 -2
- package/src/CopyButton/CopyButtonWrapper.tsx +1 -2
- package/src/EditPageButton/EditPageButton.tsx +4 -0
- package/src/Footer/CustomFooter.tsx +1 -2
- package/src/Footer/CustomFooterNavItem.tsx +1 -2
- package/src/Footer/Footer.tsx +1 -2
- package/src/Footer/FooterColumn.tsx +8 -3
- package/src/Footer/FooterColumns.tsx +1 -2
- package/src/JsonViewer/JsonViewer.tsx +2 -1
- package/src/LastUpdated/LastUpdated.tsx +41 -5
- package/src/Markdown/Admonition.tsx +3 -0
- package/src/Markdown/CodeSample/CodeSample.tsx +8 -0
- package/src/Markdown/Heading.tsx +2 -1
- package/src/Markdown/MarkdownLayout.tsx +2 -1
- package/src/Markdown/MarkdownWrapper.tsx +2 -1
- package/src/Markdown/Sup.tsx +2 -1
- package/src/Markdown/Tabs/Tabs.tsx +2 -1
- package/src/Navbar/MobileNavbarDropdown.tsx +1 -2
- package/src/Navbar/MobileNavbarItem.tsx +3 -4
- package/src/Navbar/MobileNavbarMenu.tsx +1 -2
- package/src/Navbar/Navbar.tsx +1 -2
- package/src/Navbar/NavbarDropdown.tsx +1 -2
- package/src/Navbar/NavbarItem.tsx +4 -5
- package/src/Navbar/NavbarMenu.tsx +1 -2
- package/src/NavbarLogo/NavbarLogo.tsx +1 -2
- package/src/PageNavigation/NextPageLink.tsx +1 -2
- package/src/PageNavigation/PageNavigation.tsx +4 -0
- package/src/PageNavigation/PreviousPageLink.tsx +1 -2
- package/src/Panel/PanelComponent.tsx +2 -2
- package/src/Panel/PanelHeader.ts +2 -1
- package/src/Search/Autocomplete.tsx +2 -2
- package/src/Search/ClearIcon.tsx +2 -1
- package/src/Search/Parameters.tsx +1 -2
- package/src/Search/SearchIcon.tsx +2 -1
- package/src/Search/SearchItem.tsx +1 -2
- package/src/Sidebar/ApiCallItem.tsx +1 -2
- package/src/Sidebar/Drilldown.tsx +1 -2
- package/src/Sidebar/DrilldownMenu.tsx +1 -2
- package/src/Sidebar/MenuGroup.tsx +1 -2
- package/src/Sidebar/MenuItem.tsx +1 -2
- package/src/Sidebar/MenuLink.tsx +3 -9
- package/src/Sidebar/MenuLinkItem.tsx +1 -2
- package/src/Sidebar/Separator.tsx +1 -2
- package/src/TableOfContent/TableOfContent.tsx +3 -4
- package/src/Tooltip/Tooltip.tsx +1 -0
- package/src/globalStyle.ts +28 -28
- package/src/hooks/__tests__/mocks/MockIntersectionObserver.ts +48 -0
- package/src/hooks/useActiveSectionId.ts +1 -0
- package/src/hooks/useDefaultThemeSettings.ts +1 -2
- package/src/hooks/useFullHeight.ts +2 -1
- package/src/hooks/useMobileMenu.ts +2 -1
- package/src/hooks/useNavbarHeight.ts +1 -0
- package/src/hooks/useOutsideClick.ts +2 -1
- package/src/mocks/Link.tsx +1 -2
- package/src/mocks/hooks/index.ts +1 -1
- package/src/mocks/types.ts +8 -1
- package/src/settings.yaml +1 -1
- package/src/types/portal/src/shared/constants.d.ts +33 -33
- package/src/types/portal/src/shared/types/markdown.d.ts +3 -3
- package/src/types/portal/src/shared/types/nav.d.ts +119 -106
- package/src/ui/Box.tsx +3 -2
- package/src/ui/Burger.tsx +2 -1
- package/src/ui/Dropdown.tsx +1 -2
- package/src/ui/Flex.tsx +2 -1
- package/src/ui/Tiles/ThinTile.tsx +2 -1
- package/src/ui/Tiles/WideTile.tsx +1 -2
- package/src/ui/index.tsx +0 -1
- package/src/utils/theme-helpers.ts +1 -0
- package/Button/Button.js +0 -87
- package/Cards/Card.js +0 -25
- package/Cards/CardsBlock.js +0 -15
- package/CodeBlock/CodeBlock.js +0 -16
- package/CopyButton/CopyButton.js +0 -100
- package/EditPageButton/EditPageButton.js +0 -24
- package/Footer/CustomFooter.js +0 -31
- package/Footer/CustomFooterNavItem.js +0 -25
- package/Footer/Footer.js +0 -29
- package/Footer/FooterColumn.js +0 -31
- package/Footer/FooterColumns.js +0 -34
- package/Footer/FooterCopyright.js +0 -19
- package/JsonViewer/JsonViewer.js +0 -147
- package/LastUpdated/LastUpdated.d.ts +0 -5
- package/LastUpdated/LastUpdated.js +0 -27
- package/Layout/PageLayout.js +0 -22
- package/Layout/RootLayout.js +0 -24
- package/Markdown/Admonition.js +0 -31
- package/Markdown/CodeSample/CodeSample.js +0 -93
- package/Markdown/ContainerWrapper.js +0 -21
- package/Markdown/Details.js +0 -22
- package/Markdown/MarkdownLayout.js +0 -31
- package/Markdown/MarkdownWrapper.js +0 -43
- package/Markdown/Mermaid.js +0 -19
- package/Markdown/PageWrapper.js +0 -15
- package/Markdown/Sup.js +0 -19
- package/Markdown/Tabs/Tab.js +0 -24
- package/Markdown/Tabs/Tabs.js +0 -72
- package/Navbar/MobileNavbarDropdown.js +0 -21
- package/Navbar/MobileNavbarItem.js +0 -102
- package/Navbar/MobileNavbarMenu.js +0 -32
- package/Navbar/MobileNavbarMenuButton.js +0 -19
- package/Navbar/Navbar.js +0 -64
- package/Navbar/NavbarDropdown.js +0 -21
- package/Navbar/NavbarItem.js +0 -53
- package/Navbar/NavbarMenu.js +0 -29
- package/NavbarLogo/NavbarLogo.js +0 -24
- package/OperationBadge/OperationBadge.js +0 -16
- package/PageNavigation/NextPageLink.js +0 -28
- package/PageNavigation/PageNavigation.js +0 -27
- package/PageNavigation/PreviousPageLink.js +0 -28
- package/Panel/Panel.js +0 -23
- package/Panel/PanelBody.js +0 -43
- package/Panel/PanelHeader.js +0 -24
- package/Panel/PanelHeaderTitle.js +0 -15
- package/Profile/Profile.js +0 -59
- package/SamplesPanelControls/SamplesPanelControls.js +0 -27
- package/Search/Autocomplete.js +0 -122
- package/Search/ClearIcon.js +0 -32
- package/Search/Input.js +0 -15
- package/Search/Parameters.js +0 -42
- package/Search/Popover.js +0 -15
- package/Search/Search.js +0 -29
- package/Search/SearchIcon.js +0 -32
- package/Search/SearchItem.js +0 -64
- package/Search/SidebarSearch.js +0 -17
- package/Sidebar/ApiCallItem.js +0 -29
- package/Sidebar/ArrowBack.js +0 -21
- package/Sidebar/BackButton.js +0 -22
- package/Sidebar/Drilldown.js +0 -50
- package/Sidebar/DrilldownMenu.js +0 -52
- package/Sidebar/DrilldownMenuItem.js +0 -25
- package/Sidebar/ExternalIcon.js +0 -23
- package/Sidebar/Menu.js +0 -15
- package/Sidebar/MenuContainer.js +0 -15
- package/Sidebar/MenuGroup.js +0 -95
- package/Sidebar/MenuItemLabel.js +0 -19
- package/Sidebar/MenuLink.d.ts +0 -5
- package/Sidebar/MenuLink.js +0 -16
- package/Sidebar/MenuLinkItem.js +0 -31
- package/Sidebar/MobileSidebarButton.js +0 -25
- package/Sidebar/Separator.js +0 -23
- package/Sidebar/SeparatorItem.js +0 -16
- package/Sidebar/SeparatorLine.js +0 -15
- package/Sidebar/Sidebar.js +0 -24
- package/Sidebar/SidebarLayout.js +0 -52
- package/SidebarLogo/SidebarLogo.js +0 -25
- package/TableOfContent/TableOfContent.js +0 -81
- package/TableOfContent/utils.js +0 -62
- package/Tooltip/Tooltip.js +0 -98
- package/Typography/CompactTypography.js +0 -18
- package/Typography/Emphasis.js +0 -15
- package/Typography/H1.js +0 -16
- package/Typography/H2.js +0 -16
- package/Typography/H3.js +0 -16
- package/Typography/SectionHeader.js +0 -15
- package/Typography/Typography.js +0 -45
- package/globalStyle.js +0 -38
- package/hooks/__tests__/mocks/MockIntersectionObserver.js +0 -39
- package/hooks/useActiveHeading.js +0 -100
- package/hooks/useActiveSectionId.js +0 -65
- package/hooks/useControl.js +0 -32
- package/hooks/useMobileMenu.js +0 -29
- package/hooks/useNavbarHeight.js +0 -36
- package/icons/ArrowIcon/ArrowIcon.js +0 -33
- package/icons/ShelfIcon/ShelfIcon.js +0 -52
- package/mocks/Link.js +0 -27
- package/mocks/types.d.ts +0 -7
- package/src/ui/UniversalLink.tsx +0 -96
- package/ui/Background.js +0 -16
- package/ui/Box.js +0 -16
- package/ui/Burger.js +0 -23
- package/ui/Dropdown.js +0 -89
- package/ui/Flex.js +0 -31
- package/ui/Jumbotron.js +0 -44
- package/ui/Tiles/ThinTile.js +0 -114
- package/ui/Tiles/TileHeader.js +0 -15
- package/ui/Tiles/TileText.js +0 -15
- package/ui/Tiles/WideTile.js +0 -109
- package/ui/UniversalLink.d.ts +0 -17
- package/ui/UniversalLink.js +0 -97
- package/ui/darkColors.js +0 -10
- package/utils/class-names.js +0 -15
- package/utils/css-variables.js +0 -8
- package/utils/jsonToHtml.js +0 -324
- package/utils/media-css.js +0 -50
- package/utils/theme-helpers.js +0 -121
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { ResolvedNavItemWithLink } from '@theme/types/portal';
|
|
5
|
-
|
|
6
4
|
import { useSidebarSiblingsData } from '@portal/hooks';
|
|
7
5
|
import { Button } from '@theme/Button/Button';
|
|
8
6
|
import { useDefaultThemeSettings } from '@theme/hooks/useDefaultThemeSettings';
|
|
7
|
+
import type { ResolvedNavItemWithLink } from '@theme/types/portal';
|
|
9
8
|
|
|
10
9
|
interface NextPageType {
|
|
11
10
|
nextPage?: ResolvedNavItemWithLink | null;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { ResolvedNavItemWithLink } from '@theme/types/portal';
|
|
5
|
-
|
|
6
4
|
import { useSidebarSiblingsData } from '@portal/hooks';
|
|
7
5
|
import { useDefaultThemeSettings } from '@theme/hooks/useDefaultThemeSettings';
|
|
8
6
|
import { Button } from '@theme/Button/Button';
|
|
7
|
+
import type { ResolvedNavItemWithLink } from '@theme/types/portal';
|
|
9
8
|
|
|
10
9
|
interface PreviousPageType {
|
|
11
10
|
prevPage?: ResolvedNavItemWithLink | null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { BaseSyntheticEvent, PropsWithChildren, ReactNode } from 'react';
|
|
2
1
|
import React, { useEffect, useState } from 'react';
|
|
3
2
|
import styled from 'styled-components';
|
|
4
3
|
|
|
5
|
-
import type {
|
|
4
|
+
import type { BaseSyntheticEvent, PropsWithChildren, ReactNode } from 'react';
|
|
6
5
|
|
|
7
6
|
import { ShelfIcon } from '@theme/icons';
|
|
8
7
|
import { PanelBody } from '@theme/Panel/PanelBody';
|
|
9
8
|
import { PanelHeader } from '@theme/Panel/PanelHeader';
|
|
10
9
|
import { PanelHeaderTitle } from '@theme/Panel/PanelHeaderTitle';
|
|
10
|
+
import type { PanelHeaderProps } from '@theme/Panel/PanelHeader';
|
|
11
11
|
|
|
12
12
|
export interface PanelComponentProps {
|
|
13
13
|
expanded?: boolean;
|
package/src/Panel/PanelHeader.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ChangeEvent, KeyboardEvent, ReactNode, SyntheticEvent } from 'react';
|
|
2
1
|
import React, { useEffect, useState } from 'react';
|
|
3
2
|
import { useLocation } from 'react-router-dom';
|
|
4
3
|
import styled from 'styled-components';
|
|
5
4
|
|
|
6
|
-
import type {
|
|
5
|
+
import type { ChangeEvent, KeyboardEvent, ReactNode, SyntheticEvent } from 'react';
|
|
7
6
|
|
|
8
7
|
import { FormInput } from '@theme/Search/Input';
|
|
9
8
|
import { Popover } from '@theme/Search/Popover';
|
|
9
|
+
import type { ActiveItem } from '@portal/types';
|
|
10
10
|
|
|
11
11
|
interface AutocompleteProps<T> {
|
|
12
12
|
placeholder?: string;
|
package/src/Search/ClearIcon.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { OperationParameter } from '@portal/types';
|
|
5
|
-
|
|
6
4
|
import { highlight } from '@theme/Search/utils';
|
|
5
|
+
import type { OperationParameter } from '@portal/types';
|
|
7
6
|
|
|
8
7
|
interface ParametersProps {
|
|
9
8
|
parameters: OperationParameter[];
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { ActiveItem, SearchDocument } from '@portal/types';
|
|
5
|
-
|
|
6
4
|
import { OperationBadge } from '@theme/OperationBadge';
|
|
7
5
|
import { Link } from '@portal/Link';
|
|
8
6
|
import { Parameters } from '@theme/Search/Parameters';
|
|
9
7
|
import { highlight } from '@theme/Search/utils';
|
|
8
|
+
import type { ActiveItem, SearchDocument } from '@portal/types';
|
|
10
9
|
|
|
11
10
|
interface SearchItemProps {
|
|
12
11
|
item: ActiveItem<SearchDocument>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
-
|
|
6
4
|
import { OperationBadge } from '@theme/OperationBadge';
|
|
7
5
|
import { MenuLinkItem } from '@theme/Sidebar/MenuLinkItem';
|
|
8
6
|
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
9
7
|
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
8
|
+
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
10
9
|
|
|
11
10
|
export function ApiCallItem({ item }: MenuItemProps): JSX.Element {
|
|
12
11
|
return (
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { DrilldownMenuProps } from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
5
|
-
|
|
6
4
|
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
7
5
|
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
8
6
|
import { DrilldownMenuItem } from '@theme/Sidebar/DrilldownMenuItem';
|
|
9
7
|
import { DrilldownMenu } from '@theme/Sidebar/DrilldownMenu';
|
|
8
|
+
import type { DrilldownMenuProps } from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
10
9
|
|
|
11
10
|
interface DrilldownProps extends DrilldownMenuProps {
|
|
12
11
|
isExpanded: boolean;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled, { keyframes } from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { DrilldownMenuProps } from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
5
|
-
|
|
6
4
|
import { BackButton } from '@theme/Sidebar/BackButton';
|
|
7
5
|
import { DrilldownMenuItem } from '@theme/Sidebar/DrilldownMenuItem';
|
|
6
|
+
import type { DrilldownMenuProps } from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
8
7
|
|
|
9
8
|
export function DrilldownMenu({
|
|
10
9
|
item,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { ItemState } from '@theme/Sidebar/types/ItemState';
|
|
5
|
-
|
|
6
4
|
import { ArrowIcon } from '@theme/icons/ArrowIcon/ArrowIcon';
|
|
7
5
|
import { MenuLinkItem } from '@theme/Sidebar/MenuLinkItem';
|
|
8
6
|
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
9
7
|
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
8
|
+
import type { ItemState } from '@theme/Sidebar/types/ItemState';
|
|
10
9
|
|
|
11
10
|
interface MenuGroupProps {
|
|
12
11
|
item: ItemState;
|
package/src/Sidebar/MenuItem.tsx
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
-
|
|
6
4
|
import { MenuLinkItem } from '@theme/Sidebar/MenuLinkItem';
|
|
7
5
|
import { ExternalIcon } from '@theme/Sidebar/ExternalIcon';
|
|
8
6
|
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
9
7
|
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
8
|
+
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
10
9
|
|
|
11
10
|
export function MenuItem({ item }: MenuItemProps): JSX.Element {
|
|
12
11
|
return (
|
package/src/Sidebar/MenuLink.tsx
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { Link } from '@portal/Link';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export const MenuLink = styled(UniversalLink).attrs(() => ({
|
|
5
|
+
export const MenuLink = styled(Link).attrs(() => ({
|
|
8
6
|
'data-component-name': 'Sidebar/MenuLink',
|
|
9
|
-
}))
|
|
7
|
+
}))`
|
|
10
8
|
text-decoration: none;
|
|
11
9
|
color: var(--sidebar-item-text-color);
|
|
12
|
-
|
|
13
|
-
&&.external-url:after {
|
|
14
|
-
content: none;
|
|
15
|
-
}
|
|
16
10
|
`;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
-
|
|
6
4
|
import { MenuLink } from '@theme/Sidebar/MenuLink';
|
|
5
|
+
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
7
6
|
|
|
8
7
|
export function MenuLinkItem({
|
|
9
8
|
item,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
-
|
|
6
4
|
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
7
5
|
import { SeparatorItem } from '@theme/Sidebar/SeparatorItem';
|
|
6
|
+
import type { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
8
7
|
|
|
9
8
|
export function Separator({ item }: MenuItemProps): JSX.Element {
|
|
10
9
|
return (
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { MdHeading } from '@theme/types/portal';
|
|
5
|
-
|
|
6
|
-
import { getDisplayedHeadingsIds, getDisplayedHeadings, getLeastDepth } from './utils';
|
|
7
|
-
|
|
8
4
|
import { useFullHeight } from '@theme/hooks/useFullHeight';
|
|
9
5
|
import { useActiveHeading } from '@theme/hooks/useActiveHeading';
|
|
10
6
|
import { useDefaultThemeSettings } from '@theme/hooks/useDefaultThemeSettings';
|
|
7
|
+
import type { MdHeading } from '@theme/types/portal';
|
|
8
|
+
|
|
9
|
+
import { getDisplayedHeadingsIds, getDisplayedHeadings, getLeastDepth } from './utils';
|
|
11
10
|
|
|
12
11
|
interface TableOfContentProps {
|
|
13
12
|
headings?: Array<MdHeading | null> | null | undefined;
|
package/src/Tooltip/Tooltip.tsx
CHANGED
package/src/globalStyle.ts
CHANGED
|
@@ -236,9 +236,7 @@ const headingsTypography = css`
|
|
|
236
236
|
* @tokens Heading level 5
|
|
237
237
|
*/
|
|
238
238
|
|
|
239
|
-
--h5-font-family: var(
|
|
240
|
-
--heading-font-family
|
|
241
|
-
); /* Token Description Example @presenter FontFamily */
|
|
239
|
+
--h5-font-family: var(--heading-font-family); /* Token Description Example @presenter FontFamily */
|
|
242
240
|
--h5-font-weight: var(--heading-font-weight); // @presenter FontWeight
|
|
243
241
|
--h5-font-size: 14px; // @presenter FontSize
|
|
244
242
|
--h5-line-height: 14px; // @presenter LineHeight
|
|
@@ -447,7 +445,7 @@ const sidebar = css`
|
|
|
447
445
|
|
|
448
446
|
--sidebar-item-hover-background-color: var(--border-color);
|
|
449
447
|
--sidebar-item-hover-color: var(--text-color);
|
|
450
|
-
|
|
448
|
+
|
|
451
449
|
/**
|
|
452
450
|
* @tokens Sidebar item spacing
|
|
453
451
|
* @presenter Spacing
|
|
@@ -527,7 +525,7 @@ const sidebar = css`
|
|
|
527
525
|
--sidebar-back-button-icon-color: var(--sidebar-item-text-color);
|
|
528
526
|
--sidebar-back-button-margin: 0 0 calc(var(--sidebar-spacing-unit) * 3) 0;
|
|
529
527
|
--sidebar-back-button-icon: none;
|
|
530
|
-
|
|
528
|
+
|
|
531
529
|
//--sidebar-version-dropdown-* (input settings, see below)
|
|
532
530
|
// @tokens End
|
|
533
531
|
`;
|
|
@@ -587,7 +585,7 @@ const admonition = css`
|
|
|
587
585
|
* @presenter Color
|
|
588
586
|
*/
|
|
589
587
|
|
|
590
|
-
--admonition-attention-background-color: var(--color-accent-50); // @presenter Color
|
|
588
|
+
--admonition-attention-background-color: var(--color-accent-50); // @presenter Color
|
|
591
589
|
--admonition-attention-text-color: var(--text-color); // @presenter Color
|
|
592
590
|
--admonition-attention-heading-text-color: var(--text-color); // @presenter Color
|
|
593
591
|
--admonition-attention-icon-color: var(--color-accent-900); // @presenter Color
|
|
@@ -640,7 +638,8 @@ const admonition = css`
|
|
|
640
638
|
--admonition-success-border-color: inherit; // @presenter Color
|
|
641
639
|
--admonition-success-border-style: var(--admonition-border-style); // @presenter Color
|
|
642
640
|
--admonition-success-border-width: var(--admonition-border-width); // @presenter Color
|
|
643
|
-
--admonition-success-border: var(--admonition-success-border-width)
|
|
641
|
+
--admonition-success-border: var(--admonition-success-border-width)
|
|
642
|
+
var(--admonition-success-border-style) var(--admonition-success-border-color); // @presenter Border
|
|
644
643
|
--admonition-success-icon: none;
|
|
645
644
|
|
|
646
645
|
// @tokens End
|
|
@@ -656,7 +655,7 @@ const responsePanelColors = css`
|
|
|
656
655
|
--panel-response-heading-line-height: 20px;
|
|
657
656
|
--panel-response-heading-font-weight: var(--font-weight-bold);
|
|
658
657
|
--panel-response-heading-text-color: var(--text-color);
|
|
659
|
-
|
|
658
|
+
|
|
660
659
|
--panel-response-body-text-color: var(--text-color);
|
|
661
660
|
|
|
662
661
|
/**
|
|
@@ -783,7 +782,8 @@ const apiReferencePanels = css`
|
|
|
783
782
|
--panel-schemas-body-font-family: var(--panel-body-font-family); // @presenter FontFamily
|
|
784
783
|
--panel-schemas-body-font-size: var(--panel-body-font-size); // @presenter FontSize
|
|
785
784
|
--panel-schemas-body-font-weight: var(--panel-body-font-weight); // @presenter FontWeight
|
|
786
|
-
--panel-schemas-body-padding: 0 var(--panel-body-padding) var(--panel-body-padding)
|
|
785
|
+
--panel-schemas-body-padding: 0 var(--panel-body-padding) var(--panel-body-padding)
|
|
786
|
+
var(--panel-body-padding);
|
|
787
787
|
--panel-schemas-body-background-color: var(--background-color); // @presenter Color
|
|
788
788
|
--panel-schemas-body-border: unset; // @presenter Border
|
|
789
789
|
|
|
@@ -904,7 +904,7 @@ const apiReferencePanels = css`
|
|
|
904
904
|
--panel-body-border-local: var(--panel-samples-body-border);
|
|
905
905
|
|
|
906
906
|
--panel-heading-text-color: var(--panel-samples-heading-text-color); // @presenter Color
|
|
907
|
-
--panel-heading-background-color: var(--panel-samples-heading-background-color); // @presenter Color
|
|
907
|
+
--panel-heading-background-color: var( --panel-samples-heading-background-color); // @presenter Color
|
|
908
908
|
|
|
909
909
|
--panel-heading-font-family-local: var(--panel-samples-heading-font-family);
|
|
910
910
|
--panel-heading-font-size-local: var(--panel-samples-heading-font-size);
|
|
@@ -952,7 +952,7 @@ const apiReferencePanels = css`
|
|
|
952
952
|
--panel-heading-background-color: var(--panel-response-success-heading-background-color);
|
|
953
953
|
--panel-heading-text-color: var(--panel-response-success-heading-text-color);
|
|
954
954
|
|
|
955
|
-
--panel-response-schema-nested-background-color: var(--panel-response-success-schema-nested-background-color);
|
|
955
|
+
--panel-response-schema-nested-background-color: var( --panel-response-success-schema-nested-background-color);
|
|
956
956
|
}
|
|
957
957
|
|
|
958
958
|
/**
|
|
@@ -969,7 +969,7 @@ const apiReferencePanels = css`
|
|
|
969
969
|
--panel-heading-background-color: var(--panel-response-info-heading-background-color);
|
|
970
970
|
--panel-heading-text-color: var(--panel-response-info-heading-text-color);
|
|
971
971
|
|
|
972
|
-
--panel-response-schema-nested-background-color: var(--panel-response-info-schema-nested-background-color);
|
|
972
|
+
--panel-response-schema-nested-background-color: var( --panel-response-info-schema-nested-background-color);
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
/**
|
|
@@ -986,7 +986,7 @@ const apiReferencePanels = css`
|
|
|
986
986
|
--panel-heading-background-color: var(--panel-response-error-heading-background-color);
|
|
987
987
|
--panel-heading-text-color: var(--panel-response-error-heading-text-color);
|
|
988
988
|
|
|
989
|
-
--panel-response-schema-nested-background-color: var(--panel-response-error-schema-nested-background-color);
|
|
989
|
+
--panel-response-schema-nested-background-color: var( --panel-response-error-schema-nested-background-color);
|
|
990
990
|
}
|
|
991
991
|
|
|
992
992
|
/**
|
|
@@ -1002,7 +1002,7 @@ const apiReferencePanels = css`
|
|
|
1002
1002
|
--panel-heading-background-color: var(--panel-response-redirect-heading-background-color);
|
|
1003
1003
|
--panel-heading-text-color: var(--panel-response-redirect-heading-text-color);
|
|
1004
1004
|
|
|
1005
|
-
--panel-response-schema-nested-background-color: var(--panel-response-redirect-schema-nested-background-color);
|
|
1005
|
+
--panel-response-schema-nested-background-color: var( --panel-response-redirect-schema-nested-background-color);
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
1008
|
/**
|
|
@@ -1019,7 +1019,7 @@ const apiReferencePanels = css`
|
|
|
1019
1019
|
--panel-heading-background-color: var(--panel-response-callback-heading-background-color);
|
|
1020
1020
|
--panel-heading-text-color: var(--panel-response-callback-heading-text-color);
|
|
1021
1021
|
|
|
1022
|
-
--panel-response-schema-nested-background-color: var(--panel-response-callback-schema-nested-background-color);
|
|
1022
|
+
--panel-response-schema-nested-background-color: var( --panel-response-callback-schema-nested-background-color);
|
|
1023
1023
|
}
|
|
1024
1024
|
|
|
1025
1025
|
/**
|
|
@@ -1073,7 +1073,7 @@ const apiReferencePanels = css`
|
|
|
1073
1073
|
--panel-samples-tabs-hover-border-color: var(--panel-samples-heading-background-color); // @presenter Color
|
|
1074
1074
|
--panel-samples-tabs-active-border-color: var(--color-accent-500); // @presenter Color
|
|
1075
1075
|
|
|
1076
|
-
--panel-samples-code-block-background-color: var(
|
|
1076
|
+
--panel-samples-code-block-background-color: var(--code-block-background-color); // @presenter Color
|
|
1077
1077
|
|
|
1078
1078
|
/**
|
|
1079
1079
|
* @tokens Panel try-it tabs
|
|
@@ -1648,17 +1648,17 @@ const toc = css`
|
|
|
1648
1648
|
`;
|
|
1649
1649
|
|
|
1650
1650
|
const loadProgressBar = css`
|
|
1651
|
-
|
|
1652
1651
|
/**
|
|
1653
1652
|
* @tokens Load progress bar
|
|
1654
1653
|
*/
|
|
1655
1654
|
|
|
1656
1655
|
--load-progress-bar-color: var(--color-secondary-500); // @presenter Color
|
|
1657
|
-
--load-progress-bar-shadow: 0 0 10px var(--load-progress-bar-color),
|
|
1656
|
+
--load-progress-bar-shadow: 0 0 10px var(--load-progress-bar-color),
|
|
1657
|
+
0 0 5px var(--load-progress-bar-color); // @presenter BoxShadow
|
|
1658
1658
|
--load-progress-bar-height: 2px; // @presenter Height
|
|
1659
1659
|
|
|
1660
1660
|
// @tokens End
|
|
1661
|
-
|
|
1661
|
+
|
|
1662
1662
|
/* Make clicks pass-through */
|
|
1663
1663
|
#nprogress {
|
|
1664
1664
|
pointer-events: none;
|
|
@@ -1683,11 +1683,11 @@ const loadProgressBar = css`
|
|
|
1683
1683
|
width: 100px;
|
|
1684
1684
|
height: 100%;
|
|
1685
1685
|
box-shadow: var(--load-progress-bar-shadow);
|
|
1686
|
-
opacity: 1
|
|
1686
|
+
opacity: 1;
|
|
1687
1687
|
|
|
1688
1688
|
-webkit-transform: rotate(3deg) translate(0px, -4px);
|
|
1689
|
-
|
|
1690
|
-
|
|
1689
|
+
-ms-transform: rotate(3deg) translate(0px, -4px);
|
|
1690
|
+
transform: rotate(3deg) translate(0px, -4px);
|
|
1691
1691
|
}
|
|
1692
1692
|
|
|
1693
1693
|
.nprogress-custom-parent {
|
|
@@ -1698,7 +1698,7 @@ const loadProgressBar = css`
|
|
|
1698
1698
|
.nprogress-custom-parent #nprogress .bar {
|
|
1699
1699
|
position: absolute;
|
|
1700
1700
|
}
|
|
1701
|
-
|
|
1701
|
+
`;
|
|
1702
1702
|
|
|
1703
1703
|
const inputs = css`
|
|
1704
1704
|
/**
|
|
@@ -1744,7 +1744,7 @@ const markdown = css`
|
|
|
1744
1744
|
--md-blockquote-text-color: var(--text-color); // @presenter Color
|
|
1745
1745
|
--md-blockquote-box-shadow: none; // @presenter Shadow
|
|
1746
1746
|
|
|
1747
|
-
/**
|
|
1747
|
+
/**
|
|
1748
1748
|
* @tokens Markdown Paragraph
|
|
1749
1749
|
*/
|
|
1750
1750
|
|
|
@@ -1781,7 +1781,7 @@ const markdown = css`
|
|
|
1781
1781
|
--md-hr-height: unset;
|
|
1782
1782
|
--md-hr-margin-vertical: 20px; // @presenter Spacing
|
|
1783
1783
|
|
|
1784
|
-
/**
|
|
1784
|
+
/**
|
|
1785
1785
|
* @tokens Markdown List
|
|
1786
1786
|
*/
|
|
1787
1787
|
|
|
@@ -1790,7 +1790,7 @@ const markdown = css`
|
|
|
1790
1790
|
--md-list-item-margin: 0.25rem; // @presenter Spacing
|
|
1791
1791
|
--md-list-item-style: inherit;
|
|
1792
1792
|
|
|
1793
|
-
/**
|
|
1793
|
+
/**
|
|
1794
1794
|
* @tokens Markdown Numbered List
|
|
1795
1795
|
*/
|
|
1796
1796
|
|
|
@@ -1903,7 +1903,7 @@ const lastUpdated = css`
|
|
|
1903
1903
|
const tile = css`
|
|
1904
1904
|
--wide-tile-background-color: var(--color-secondary-50);
|
|
1905
1905
|
--thin-tile-background-color: var(--color-secondary-50);
|
|
1906
|
-
|
|
1906
|
+
`;
|
|
1907
1907
|
|
|
1908
1908
|
export const styles = css`
|
|
1909
1909
|
:root {
|
|
@@ -1940,7 +1940,7 @@ export const styles = css`
|
|
|
1940
1940
|
}
|
|
1941
1941
|
|
|
1942
1942
|
:root.notransition * {
|
|
1943
|
-
transition: none !important;
|
|
1943
|
+
transition: none !important;
|
|
1944
1944
|
}
|
|
1945
1945
|
`;
|
|
1946
1946
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export class MockIntersectionObserver {
|
|
2
|
+
public readonly root: Element | Document | null;
|
|
3
|
+
public readonly rootMargin: string;
|
|
4
|
+
public readonly thresholds: ReadonlyArray<number>;
|
|
5
|
+
|
|
6
|
+
private viewPort: any;
|
|
7
|
+
private entries: any[];
|
|
8
|
+
private readonly callback: IntersectionObserverCallback;
|
|
9
|
+
|
|
10
|
+
constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit) {
|
|
11
|
+
this.viewPort = options?.root ? options.root : window;
|
|
12
|
+
this.entries = [];
|
|
13
|
+
this.root = null;
|
|
14
|
+
this.rootMargin = '0px';
|
|
15
|
+
this.thresholds = [1];
|
|
16
|
+
this.callback = callback;
|
|
17
|
+
|
|
18
|
+
this.viewPort.addEventListener('scroll', this.intersect);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private intersect = () => {
|
|
22
|
+
this.entries.map((entry) => {
|
|
23
|
+
entry.isIntersecting = this.isInViewPort(entry.target);
|
|
24
|
+
});
|
|
25
|
+
this.callback(this.entries, this);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
isInViewPort(target: HTMLElement): boolean {
|
|
29
|
+
return target.id !== 'toc-0';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
observe(target: HTMLElement): void {
|
|
33
|
+
this.entries.push({ isIntersecting: false, target });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
unobserve(target: HTMLElement): void {
|
|
37
|
+
this.entries = this.entries.filter((ob) => ob.target !== target);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
disconnect(): void {
|
|
41
|
+
this.viewPort.removeEventListener('scroll', this.intersect);
|
|
42
|
+
this.entries = [];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
takeRecords(): any[] {
|
|
46
|
+
return this.entries;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { RawTheme } from '@portal/types';
|
|
2
|
-
|
|
3
1
|
import { useThemeSettings } from '@portal/hooks';
|
|
4
2
|
import { DEFAULT_THEME_NAME } from '@portal/constants';
|
|
3
|
+
import type { RawTheme } from '@portal/types';
|
|
5
4
|
|
|
6
5
|
export function useDefaultThemeSettings(): RawTheme['settings'] {
|
|
7
6
|
return useThemeSettings(DEFAULT_THEME_NAME);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { MutableRefObject } from 'react';
|
|
2
1
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
3
2
|
import throttle from 'lodash.throttle';
|
|
4
3
|
|
|
4
|
+
import type { MutableRefObject } from 'react';
|
|
5
|
+
|
|
5
6
|
export function useFullHeight(element: MutableRefObject<HTMLElement | null>): void {
|
|
6
7
|
const handler = useCallback(() => {
|
|
7
8
|
if (!element.current) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { useEffect, useState } from 'react';
|
|
3
2
|
import { useHistory } from 'react-router-dom';
|
|
4
3
|
|
|
4
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
5
|
+
|
|
5
6
|
export function useMobileMenu(initialState = false): [boolean, Dispatch<SetStateAction<boolean>>] {
|
|
6
7
|
const { location } = useHistory();
|
|
7
8
|
const [isOpen, setIsOpen] = useState(initialState);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { MutableRefObject } from 'react';
|
|
2
1
|
import { useEffect } from 'react';
|
|
3
2
|
|
|
3
|
+
import type { MutableRefObject } from 'react';
|
|
4
|
+
|
|
4
5
|
export function useOutsideClick(
|
|
5
6
|
ref: MutableRefObject<HTMLElement | null>,
|
|
6
7
|
handler: (event: MouseEvent | TouchEvent) => void,
|
package/src/mocks/Link.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { omit } from 'lodash';
|
|
3
2
|
|
|
4
3
|
// TODO: use real typings here
|
|
5
4
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
6
5
|
export function Link(props: any): JSX.Element {
|
|
6
|
+
const { active: _, httpVerb: _1, hasActiveSubItem: _2, ...filteredProps } = props;
|
|
7
7
|
// We omit "active" property to avoid "Warning: Received `false` for a non-boolean attribute `active`."
|
|
8
|
-
const filteredProps = omit(props, ['active', 'httpVerb', 'hasActiveSubItem']);
|
|
9
8
|
return <a href={filteredProps.to} {...filteredProps} />;
|
|
10
9
|
}
|
package/src/mocks/hooks/index.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface PageLink {
|
|
|
11
11
|
|
|
12
12
|
export function useThemeSettings(_: string): RawTheme['settings'] {
|
|
13
13
|
return {
|
|
14
|
-
toc: { header: 'header', hide: false },
|
|
14
|
+
toc: { header: { label: 'header' }, hide: false },
|
|
15
15
|
navigation: {
|
|
16
16
|
nextPageLink: { label: 'next page theme settings label' },
|
|
17
17
|
prevPageLink: { label: 'prev page theme settings label' },
|
package/src/mocks/types.ts
CHANGED
|
@@ -3,5 +3,12 @@ export type SearchDocument = any;
|
|
|
3
3
|
export type OperationParameter = any;
|
|
4
4
|
export interface RawTheme {
|
|
5
5
|
name: string;
|
|
6
|
-
settings:
|
|
6
|
+
settings: {
|
|
7
|
+
lastUpdatedBlock?: {
|
|
8
|
+
hide?: boolean;
|
|
9
|
+
format?: 'timeago' | 'iso' | 'short' | 'long';
|
|
10
|
+
locale?: string;
|
|
11
|
+
};
|
|
12
|
+
[k: string]: any; // TODO: add missing settings
|
|
13
|
+
};
|
|
7
14
|
}
|