@redocly/theme 0.4.14 → 0.4.16
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/{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 +32 -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 +53 -0
- package/{Markdown → lib/Markdown}/CodeSample/CodeSample.d.ts +0 -0
- package/lib/Markdown/CodeSample/CodeSample.js +211 -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 +2 -3
- 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/lib/PageNavigation/PageNavigation.d.ts +2 -0
- package/lib/PageNavigation/PageNavigation.js +27 -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/{Sidebar → lib/Sidebar}/MenuLink.d.ts +0 -0
- package/lib/Sidebar/MenuLink.js +19 -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 +17 -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 +3 -2
- 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}/UniversalLink.d.ts +0 -0
- package/lib/ui/UniversalLink.js +79 -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 -0
- package/{ui → lib/ui}/index.js +2 -4
- 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 +111 -4
- package/{src/settings.yaml → settings.yaml} +1 -1
- package/src/Button/Button.tsx +2 -1
- package/src/Cards/Card.tsx +1 -2
- package/src/CopyButton/CopyButtonWrapper.tsx +1 -2
- 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 +1 -2
- package/src/Footer/FooterColumns.tsx +1 -2
- package/src/JsonViewer/JsonViewer.tsx +2 -1
- package/src/LastUpdated/LastUpdated.tsx +41 -5
- package/src/Markdown/Heading.tsx +2 -1
- package/src/Markdown/MarkdownLayout.tsx +3 -6
- 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 +3 -4
- 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 +3 -11
- package/src/PageNavigation/PreviousPageLink.tsx +3 -4
- 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 +1 -2
- 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/hooks/index.ts +2 -2
- package/src/mocks/types.ts +8 -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 +116 -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/UniversalLink.tsx +2 -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.d.ts +0 -7
- package/PageNavigation/PageNavigation.js +0 -28
- 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.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/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.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
|
File without changes
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MockIntersectionObserver = void 0;
|
|
4
|
+
class MockIntersectionObserver {
|
|
5
|
+
constructor(callback, options) {
|
|
6
|
+
Object.defineProperty(this, "root", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: void 0
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "rootMargin", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "thresholds", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: void 0
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "viewPort", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: void 0
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "entries", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: void 0
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "callback", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: void 0
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "intersect", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: () => {
|
|
47
|
+
this.entries.map((entry) => {
|
|
48
|
+
entry.isIntersecting = this.isInViewPort(entry.target);
|
|
49
|
+
});
|
|
50
|
+
this.callback(this.entries, this);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
this.viewPort = (options === null || options === void 0 ? void 0 : options.root) ? options.root : window;
|
|
54
|
+
this.entries = [];
|
|
55
|
+
this.root = null;
|
|
56
|
+
this.rootMargin = '0px';
|
|
57
|
+
this.thresholds = [1];
|
|
58
|
+
this.callback = callback;
|
|
59
|
+
this.viewPort.addEventListener('scroll', this.intersect);
|
|
60
|
+
}
|
|
61
|
+
isInViewPort(target) {
|
|
62
|
+
return target.id !== 'toc-0';
|
|
63
|
+
}
|
|
64
|
+
observe(target) {
|
|
65
|
+
this.entries.push({ isIntersecting: false, target });
|
|
66
|
+
}
|
|
67
|
+
unobserve(target) {
|
|
68
|
+
this.entries = this.entries.filter((ob) => ob.target !== target);
|
|
69
|
+
}
|
|
70
|
+
disconnect() {
|
|
71
|
+
this.viewPort.removeEventListener('scroll', this.intersect);
|
|
72
|
+
this.entries = [];
|
|
73
|
+
}
|
|
74
|
+
takeRecords() {
|
|
75
|
+
return this.entries;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.MockIntersectionObserver = MockIntersectionObserver;
|
|
79
|
+
//# sourceMappingURL=MockIntersectionObserver.js.map
|
|
File without changes
|
|
@@ -22,3 +22,4 @@ __exportStar(require("../hooks/useActiveSectionId"), exports);
|
|
|
22
22
|
__exportStar(require("../hooks/useFullHeight"), exports);
|
|
23
23
|
__exportStar(require("../hooks/useNavbarHeight"), exports);
|
|
24
24
|
__exportStar(require("../hooks/useOutsideClick"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
File without changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useActiveHeading = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
6
|
+
function useActiveHeading(contentElement, displayedHeaders) {
|
|
7
|
+
const [heading, setHeading] = (0, react_1.useState)(undefined);
|
|
8
|
+
const [headingElements, setHeadingElements] = (0, react_1.useState)([]);
|
|
9
|
+
const headingElementsRef = (0, react_1.useRef)({});
|
|
10
|
+
const history = (0, react_router_dom_1.useHistory)();
|
|
11
|
+
const getVisibleHeadings = () => {
|
|
12
|
+
const visibleHeadings = [];
|
|
13
|
+
for (const key in headingElementsRef.current) {
|
|
14
|
+
const headingElement = headingElementsRef.current[key];
|
|
15
|
+
if (headingElement.isIntersecting) {
|
|
16
|
+
visibleHeadings.push(headingElement);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return visibleHeadings;
|
|
20
|
+
};
|
|
21
|
+
const getIndexFromId = (0, react_1.useCallback)((id) => {
|
|
22
|
+
return headingElements.findIndex((item) => item.id === id);
|
|
23
|
+
}, [headingElements]);
|
|
24
|
+
const findHeaders = (allContent) => {
|
|
25
|
+
const allHeaders = allContent.querySelectorAll('.heading-anchor');
|
|
26
|
+
return Array.from(allHeaders);
|
|
27
|
+
};
|
|
28
|
+
const intersectionCallback = (0, react_1.useCallback)((headings) => {
|
|
29
|
+
var _a;
|
|
30
|
+
headingElementsRef.current = headings.reduce((map, headingElement) => {
|
|
31
|
+
map[headingElement.target.id] = headingElement;
|
|
32
|
+
return map;
|
|
33
|
+
}, headingElementsRef.current);
|
|
34
|
+
const totalHeight = window.scrollY + window.innerHeight;
|
|
35
|
+
// handle bottom of the page
|
|
36
|
+
if (totalHeight >= document.body.scrollHeight) {
|
|
37
|
+
const newHeading = ((_a = headingElements[(headingElements === null || headingElements === void 0 ? void 0 : headingElements.length) - 1]) === null || _a === void 0 ? void 0 : _a.id) || undefined;
|
|
38
|
+
setHeading(newHeading);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const visibleHeadings = getVisibleHeadings();
|
|
42
|
+
if (!visibleHeadings.length) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (visibleHeadings.length === 1) {
|
|
46
|
+
setHeading(visibleHeadings[0].target.id);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
visibleHeadings.sort((a, b) => {
|
|
50
|
+
return getIndexFromId(a.target.id) - getIndexFromId(b.target.id);
|
|
51
|
+
});
|
|
52
|
+
setHeading(visibleHeadings[0].target.id);
|
|
53
|
+
}, [getIndexFromId, headingElements]);
|
|
54
|
+
(0, react_1.useEffect)(() => {
|
|
55
|
+
if (!contentElement) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
setHeadingElements(findHeaders(contentElement));
|
|
59
|
+
const unlisten = history.listen(() => {
|
|
60
|
+
setHeadingElements(findHeaders(contentElement));
|
|
61
|
+
});
|
|
62
|
+
return () => unlisten();
|
|
63
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
+
}, [contentElement]);
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
if (!(headingElements === null || headingElements === void 0 ? void 0 : headingElements.length)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
headingElementsRef.current = {};
|
|
70
|
+
// Bottom rootMargin -30% changes part of the view where IntersectionObserver starts to detect headers
|
|
71
|
+
const observer = new IntersectionObserver(intersectionCallback, {
|
|
72
|
+
rootMargin: '0px 0px -30% 0px',
|
|
73
|
+
threshold: 1,
|
|
74
|
+
});
|
|
75
|
+
headingElements === null || headingElements === void 0 ? void 0 : headingElements.forEach((element) => {
|
|
76
|
+
if (displayedHeaders.includes(element.id)) {
|
|
77
|
+
observer.observe(element);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return () => observer.disconnect();
|
|
81
|
+
}, [headingElements, displayedHeaders, intersectionCallback]);
|
|
82
|
+
return heading;
|
|
83
|
+
}
|
|
84
|
+
exports.useActiveHeading = useActiveHeading;
|
|
85
|
+
//# sourceMappingURL=useActiveHeading.js.map
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useActiveSectionId = void 0;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const lodash_throttle_1 = __importDefault(require("lodash.throttle"));
|
|
9
|
+
const useNavbarHeight_1 = require("../hooks/useNavbarHeight");
|
|
10
|
+
function useActiveSectionId(location, hasOverviewPage = false) {
|
|
11
|
+
const [itemId, setItemId] = (0, react_1.useState)('');
|
|
12
|
+
const navbarHeight = (0, useNavbarHeight_1.useNavbarHeight)(location);
|
|
13
|
+
const scrollListener = (0, react_1.useMemo)(() => (0, lodash_throttle_1.default)(() => {
|
|
14
|
+
const sections = document.querySelectorAll('[data-section-id]');
|
|
15
|
+
if (sections.length < 2) {
|
|
16
|
+
setItemId('');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
for (let i = 0; i < sections.length; i++) {
|
|
20
|
+
const section = sections[i];
|
|
21
|
+
const rect = section.getBoundingClientRect();
|
|
22
|
+
if (rect.y < navbarHeight + 5 && rect.bottom > navbarHeight + 5) {
|
|
23
|
+
// use small padding 5px to account for rounding
|
|
24
|
+
setItemId(section.getAttribute('data-section-id') || '');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (hasOverviewPage) {
|
|
29
|
+
setItemId('');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
setItemId((sections[0] && sections[0].getAttribute('data-section-id')) || '');
|
|
33
|
+
}
|
|
34
|
+
}, 150), [navbarHeight, hasOverviewPage]);
|
|
35
|
+
(0, react_1.useEffect)(() => {
|
|
36
|
+
window.addEventListener('scroll', scrollListener, { capture: false });
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
scrollListener();
|
|
39
|
+
}, 0);
|
|
40
|
+
return () => {
|
|
41
|
+
window.removeEventListener('scroll', scrollListener); // TODO: add throttle
|
|
42
|
+
};
|
|
43
|
+
}, [location, navbarHeight, scrollListener]);
|
|
44
|
+
return itemId;
|
|
45
|
+
}
|
|
46
|
+
exports.useActiveSectionId = useActiveSectionId;
|
|
47
|
+
//# sourceMappingURL=useActiveSectionId.js.map
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useControl = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useControl = (initialVal = false) => {
|
|
6
|
+
const [isOpened, setIsOpened] = (0, react_1.useState)(initialVal);
|
|
7
|
+
const handleOpen = (0, react_1.useCallback)(() => setIsOpened(true), []);
|
|
8
|
+
const handleClose = (0, react_1.useCallback)(() => setIsOpened(false), []);
|
|
9
|
+
return {
|
|
10
|
+
isOpened,
|
|
11
|
+
handleOpen,
|
|
12
|
+
handleClose,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.useControl = useControl;
|
|
16
|
+
//# sourceMappingURL=useControl.js.map
|
|
File without changes
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useDefaultThemeSettings = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const hooks_1 = require("../mocks/hooks");
|
|
5
|
+
const constants_1 = require("../mocks/constants");
|
|
6
6
|
function useDefaultThemeSettings() {
|
|
7
7
|
return (0, hooks_1.useThemeSettings)(constants_1.DEFAULT_THEME_NAME);
|
|
8
8
|
}
|
|
9
9
|
exports.useDefaultThemeSettings = useDefaultThemeSettings;
|
|
10
|
+
//# sourceMappingURL=useDefaultThemeSettings.js.map
|
|
File without changes
|
|
@@ -4,30 +4,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useFullHeight = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const lodash_throttle_1 = __importDefault(require("lodash.throttle"));
|
|
9
9
|
function useFullHeight(element) {
|
|
10
|
-
|
|
10
|
+
const handler = (0, react_1.useCallback)(() => {
|
|
11
11
|
if (!element.current) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
const footer = document.querySelector('footer');
|
|
15
15
|
if (!footer) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const elementTop = element.current.getBoundingClientRect().top;
|
|
19
|
+
const footerOffset = footer.offsetTop - window.scrollY - elementTop;
|
|
20
20
|
if (footerOffset > window.innerHeight) {
|
|
21
|
-
element.current.style.maxHeight =
|
|
21
|
+
element.current.style.maxHeight = `${window.innerHeight - elementTop}px`;
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
element.current.style.maxHeight =
|
|
24
|
+
element.current.style.maxHeight = `${footerOffset}px`;
|
|
25
25
|
}
|
|
26
26
|
}, [element]);
|
|
27
|
-
|
|
28
|
-
(0, react_1.useEffect)(
|
|
27
|
+
const throttledHandler = (0, react_1.useMemo)(() => (0, lodash_throttle_1.default)(handler, 150), [handler]);
|
|
28
|
+
(0, react_1.useEffect)(() => {
|
|
29
29
|
if (typeof window === 'undefined' || !element.current) {
|
|
30
|
-
return
|
|
30
|
+
return () => {
|
|
31
31
|
// nope
|
|
32
32
|
};
|
|
33
33
|
}
|
|
@@ -38,10 +38,11 @@ function useFullHeight(element) {
|
|
|
38
38
|
capture: false,
|
|
39
39
|
});
|
|
40
40
|
handler();
|
|
41
|
-
return
|
|
41
|
+
return () => {
|
|
42
42
|
window.removeEventListener('scroll', throttledHandler);
|
|
43
43
|
window.removeEventListener('resize', throttledHandler);
|
|
44
44
|
};
|
|
45
45
|
}, [throttledHandler, element, handler]);
|
|
46
46
|
}
|
|
47
47
|
exports.useFullHeight = useFullHeight;
|
|
48
|
+
//# sourceMappingURL=useFullHeight.js.map
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMobileMenu = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
6
|
+
function useMobileMenu(initialState = false) {
|
|
7
|
+
const { location } = (0, react_router_dom_1.useHistory)();
|
|
8
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(initialState);
|
|
9
|
+
(0, react_1.useEffect)(() => setIsOpen(false), [location.pathname]);
|
|
10
|
+
return [isOpen, setIsOpen];
|
|
11
|
+
}
|
|
12
|
+
exports.useMobileMenu = useMobileMenu;
|
|
13
|
+
//# sourceMappingURL=useMobileMenu.js.map
|
|
File without changes
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useMount = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(0, react_1.useEffect)(
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useMount = (callback) => {
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
7
|
callback();
|
|
8
8
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9
9
|
}, []);
|
|
10
10
|
};
|
|
11
11
|
exports.useMount = useMount;
|
|
12
|
+
//# sourceMappingURL=useMount.js.map
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useNavbarHeight = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const getNavbarElement_1 = require("../utils/getNavbarElement");
|
|
6
|
+
function useNavbarHeight(location) {
|
|
7
|
+
const [height, setHeight] = (0, react_1.useState)(0);
|
|
8
|
+
(0, react_1.useEffect)(() => {
|
|
9
|
+
const navbar = (0, getNavbarElement_1.getNavbarElement)();
|
|
10
|
+
setHeight((navbar && navbar.clientHeight) || 0);
|
|
11
|
+
}, [location.pathname]);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
window.requestAnimationFrame(() => {
|
|
14
|
+
const navbar = (0, getNavbarElement_1.getNavbarElement)();
|
|
15
|
+
setHeight((navbar && navbar.clientHeight) || 0);
|
|
16
|
+
});
|
|
17
|
+
}, []);
|
|
18
|
+
return height;
|
|
19
|
+
}
|
|
20
|
+
exports.useNavbarHeight = useNavbarHeight;
|
|
21
|
+
//# sourceMappingURL=useNavbarHeight.js.map
|
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useOutsideClick = void 0;
|
|
4
|
-
|
|
4
|
+
const react_1 = require("react");
|
|
5
5
|
function useOutsideClick(ref, handler) {
|
|
6
|
-
(0, react_1.useEffect)(
|
|
7
|
-
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
const listener = (event) => {
|
|
8
8
|
if (!ref.current || ref.current.contains(event.target)) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
@@ -12,10 +12,11 @@ function useOutsideClick(ref, handler) {
|
|
|
12
12
|
};
|
|
13
13
|
document.addEventListener('mousedown', listener);
|
|
14
14
|
document.addEventListener('touchstart', listener);
|
|
15
|
-
return
|
|
15
|
+
return () => {
|
|
16
16
|
document.removeEventListener('mousedown', listener);
|
|
17
17
|
document.removeEventListener('touchstart', listener);
|
|
18
18
|
};
|
|
19
19
|
}, [ref, handler]);
|
|
20
20
|
}
|
|
21
21
|
exports.useOutsideClick = useOutsideClick;
|
|
22
|
+
//# sourceMappingURL=useOutsideClick.js.map
|
|
File without changes
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useUnmount = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(0, react_1.useEffect)(
|
|
7
|
-
return
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useUnmount = (callback) => {
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
return () => {
|
|
8
8
|
callback();
|
|
9
9
|
};
|
|
10
10
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11
11
|
}, []);
|
|
12
12
|
};
|
|
13
13
|
exports.useUnmount = useUnmount;
|
|
14
|
+
//# sourceMappingURL=useUnmount.js.map
|
|
File without changes
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
4
|
};
|
|
9
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
6
|
exports.AlertIcon = void 0;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function Icon(
|
|
14
|
-
var type = _a.type, className = _a.className;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
function Icon({ type, className }) {
|
|
15
10
|
switch (type) {
|
|
16
11
|
case 'warning':
|
|
17
12
|
return (react_1.default.createElement("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", version: "1.1", id: "Layer_1", x: "0", y: "0", viewBox: "0 0 500.6 500.6", enableBackground: "new 0 0 500.6 500.6" },
|
|
@@ -39,13 +34,23 @@ function Icon(_a) {
|
|
|
39
34
|
react_1.default.createElement("circle", { cx: "250.3", cy: "163.7", r: "25.3" })));
|
|
40
35
|
}
|
|
41
36
|
}
|
|
42
|
-
exports.AlertIcon = (0, styled_components_1.default)(Icon).attrs(
|
|
37
|
+
exports.AlertIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
43
38
|
'data-component-name': 'icons/AlertIcon/AlertIcon',
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var
|
|
39
|
+
})) `
|
|
40
|
+
position: absolute;
|
|
41
|
+
left: var(--admonition-padding-horizontal);
|
|
42
|
+
top: 50%;
|
|
43
|
+
transform: translateY(-50%);
|
|
44
|
+
width: var(--admonition-icon-size);
|
|
45
|
+
height: var(--admonition-icon-size);
|
|
46
|
+
margin-right: var(--admonition-padding-horizontal);
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
|
|
49
|
+
fill: ${({ type }) => `var(--admonition-${type}-icon-color)`};
|
|
50
|
+
|
|
51
|
+
background-image: ${({ type }) => `var(--admonition-${type}-icon)`};
|
|
52
|
+
background-repeat: no-repeat;
|
|
53
|
+
background-position: center;
|
|
54
|
+
background-size: contain;
|
|
55
|
+
`;
|
|
56
|
+
//# sourceMappingURL=AlertIcon.js.map
|
|
File without changes
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AlertIcon = void 0;
|
|
4
4
|
var AlertIcon_1 = require("../../icons/AlertIcon/AlertIcon");
|
|
5
5
|
Object.defineProperty(exports, "AlertIcon", { enumerable: true, get: function () { return AlertIcon_1.AlertIcon; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ArrowIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
function directionToTransform({ direction }) {
|
|
10
|
+
switch (direction) {
|
|
11
|
+
case 'up':
|
|
12
|
+
return 180;
|
|
13
|
+
case 'right':
|
|
14
|
+
return -90;
|
|
15
|
+
case 'left':
|
|
16
|
+
return 90;
|
|
17
|
+
default:
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const Icon = ({ className }) => (react_1.default.createElement("span", { "data-component-name": "icons/ArrowIcon/ArrowIcon" },
|
|
22
|
+
react_1.default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 7 5", className: className },
|
|
23
|
+
react_1.default.createElement("path", { d: "M3.5 2.51L5.806.205a.7.7 0 01.99.99l-2.8 2.8a.698.698 0 01-.99 0l-2.8-2.8a.7.7 0 11.99-.99L3.5 2.51z" }))));
|
|
24
|
+
exports.ArrowIcon = (0, styled_components_1.default)(Icon) `
|
|
25
|
+
width: var(--sidebar-group-item-chevron-size);
|
|
26
|
+
height: var(--sidebar-group-item-chevron-size);
|
|
27
|
+
fill: var(--sidebar-group-item-chevron-color);
|
|
28
|
+
transform: rotate(${directionToTransform}deg);
|
|
29
|
+
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
`;
|
|
32
|
+
//# sourceMappingURL=ArrowIcon.js.map
|
|
File without changes
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ArrowIcon = void 0;
|
|
4
4
|
var ArrowIcon_1 = require("../../icons/ArrowIcon/ArrowIcon");
|
|
5
5
|
Object.defineProperty(exports, "ArrowIcon", { enumerable: true, get: function () { return ArrowIcon_1.ArrowIcon; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
File without changes
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
4
|
};
|
|
9
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
6
|
exports.ColorModeIcon = void 0;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function Icon(
|
|
14
|
-
var mode = _a.mode, className = _a.className;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
function Icon({ mode, className }) {
|
|
15
10
|
switch (mode) {
|
|
16
11
|
case 'dark':
|
|
17
12
|
return (react_1.default.createElement("svg", { className: className, "data-testid": "dark", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -24,7 +19,11 @@ function Icon(_a) {
|
|
|
24
19
|
react_1.default.createElement("path", { d: "M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm0 13V2a6 6 0 1 1 0 12z" })));
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
|
-
exports.ColorModeIcon = (0, styled_components_1.default)(Icon).attrs(
|
|
22
|
+
exports.ColorModeIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
28
23
|
'data-component-name': 'icons/ColorModeIcon/ColorModeIcon',
|
|
29
|
-
})
|
|
30
|
-
var
|
|
24
|
+
})) `
|
|
25
|
+
width: var(--navbar-item-font-size);
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
fill: var(--navbar-text-color);
|
|
28
|
+
`;
|
|
29
|
+
//# sourceMappingURL=ColorModeIcon.js.map
|
|
File without changes
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ColorModeIcon = void 0;
|
|
4
4
|
var ColorModeIcon_1 = require("../../icons/ColorModeIcon/ColorModeIcon");
|
|
5
5
|
Object.defineProperty(exports, "ColorModeIcon", { enumerable: true, get: function () { return ColorModeIcon_1.ColorModeIcon; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
File without changes
|