@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
package/ui/Tiles/TileHeader.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.TileHeader = void 0;
|
|
11
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.TileHeader = styled_components_1.default.h3.attrs(function () { return ({
|
|
13
|
-
'data-component-name': 'ui/Tiles/TileHeader',
|
|
14
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-weight: var(--h3-font-weight);\n line-height: var(--h3-line-height);\n color: ", ";\n font-family: var(--h3-font-family);\n && {\n margin: var(--h3-margin-top) 0 var(--h3-margin-bottom);\n }\n"], ["\n font-weight: var(--h3-font-weight);\n line-height: var(--h3-line-height);\n color: ", ";\n font-family: var(--h3-font-family);\n && {\n margin: var(--h3-margin-top) 0 var(--h3-margin-bottom);\n }\n"])), function (props) { return props.color || 'var(--h3-color)'; });
|
|
15
|
-
var templateObject_1;
|
package/ui/Tiles/TileText.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.TileText = void 0;
|
|
11
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.TileText = styled_components_1.default.span.attrs(function () { return ({
|
|
13
|
-
'data-component-name': 'ui/Tiles/TileText',
|
|
14
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n font-weight: var(--font-weight-regular);\n overflow: hidden;\n color: ", ";\n line-height: 1.25;\n font-family: var(--font-family-base);\n"], ["\n display: inline-block;\n font-weight: var(--font-weight-regular);\n overflow: hidden;\n color: ", ";\n line-height: 1.25;\n font-family: var(--font-family-base);\n"])), function (props) { return props.color || 'var(--text-color)'; });
|
|
15
|
-
var templateObject_1;
|
package/ui/Tiles/WideTile.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __extends = (this && this.__extends) || (function () {
|
|
7
|
-
var extendStatics = function (d, b) {
|
|
8
|
-
extendStatics = Object.setPrototypeOf ||
|
|
9
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
10
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
11
|
-
return extendStatics(d, b);
|
|
12
|
-
};
|
|
13
|
-
return function (d, b) {
|
|
14
|
-
if (typeof b !== "function" && b !== null)
|
|
15
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16
|
-
extendStatics(d, b);
|
|
17
|
-
function __() { this.constructor = d; }
|
|
18
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
26
|
-
}
|
|
27
|
-
Object.defineProperty(o, k2, desc);
|
|
28
|
-
}) : (function(o, m, k, k2) {
|
|
29
|
-
if (k2 === undefined) k2 = k;
|
|
30
|
-
o[k2] = m[k];
|
|
31
|
-
}));
|
|
32
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
33
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
34
|
-
}) : function(o, v) {
|
|
35
|
-
o["default"] = v;
|
|
36
|
-
});
|
|
37
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.WideTile = void 0;
|
|
49
|
-
var react_1 = __importStar(require("react"));
|
|
50
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
51
|
-
var Link_1 = require("../../mocks/Link");
|
|
52
|
-
var TileText_1 = require("../../ui/Tiles/TileText");
|
|
53
|
-
var TileHeader_1 = require("../../ui/Tiles/TileHeader");
|
|
54
|
-
// prettier-ignore
|
|
55
|
-
var WideTileWrapper = (0, styled_components_1.default)(Link_1.Link)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: ", ";\n border-radius: 10px;\n box-shadow: 0 10px 30px 0 rgba(35, 35, 35, 0.1);\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n padding: 24px;\n padding-right: ", ";\n margin-bottom: 32px;\n box-sizing: border-box;\n position: relative;\n text-decoration: none;\n width: 100%;\n transition: box-shadow 0.25s ease;\n :hover {\n box-shadow: 0 10px 30px 0 rgba(35, 35, 35, 0.2);\n }\n :before {\n content: ", ";\n display: inline-block;\n width: 9px;\n min-height: 18px;\n background-size: 9px 18px;\n background-repeat: no-repeat;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 30px;\n }\n &.external-url::after {\n content: none;\n }\n \n ", " {\n width: calc(50% - 2em);\n padding: 32px;\n padding-right: ", ";\n flex-direction: row;\n max-width: ", ";\n }\n"], ["\n display: inline-flex;\n flex-direction: ", ";\n border-radius: 10px;\n box-shadow: 0 10px 30px 0 rgba(35, 35, 35, 0.1);\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n padding: 24px;\n padding-right: ", ";\n margin-bottom: 32px;\n box-sizing: border-box;\n position: relative;\n text-decoration: none;\n width: 100%;\n transition: box-shadow 0.25s ease;\n :hover {\n box-shadow: 0 10px 30px 0 rgba(35, 35, 35, 0.2);\n }\n :before {\n content: ", ";\n display: inline-block;\n width: 9px;\n min-height: 18px;\n background-size: 9px 18px;\n background-repeat: no-repeat;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 30px;\n }\n &.external-url::after {\n content: none;\n }\n \n ", " {\n width: calc(50% - 2em);\n padding: 32px;\n padding-right: ", ";\n flex-direction: row;\n max-width: ", ";\n }\n"])), function (_a) {
|
|
56
|
-
var withIcon = _a.withIcon;
|
|
57
|
-
return (withIcon ? 'column' : 'row');
|
|
58
|
-
}, function (_a) {
|
|
59
|
-
var bgColor = _a.bgColor;
|
|
60
|
-
return bgColor || 'var(--wide-tile-background-color)';
|
|
61
|
-
}, function (_a) {
|
|
62
|
-
var bgImage = _a.bgImage;
|
|
63
|
-
return (bgImage ? "url(".concat(bgImage, ")") : 'none');
|
|
64
|
-
}, function (_a) {
|
|
65
|
-
var disableArrow = _a.disableArrow;
|
|
66
|
-
return (disableArrow ? '24px' : '56px');
|
|
67
|
-
}, function (_a) {
|
|
68
|
-
var disableArrow = _a.disableArrow;
|
|
69
|
-
return (disableArrow ? 'none' : '""');
|
|
70
|
-
}, function (_a) {
|
|
71
|
-
var theme = _a.theme;
|
|
72
|
-
return theme.mediaQueries.medium;
|
|
73
|
-
}, function (_a) {
|
|
74
|
-
var disableArrow = _a.disableArrow;
|
|
75
|
-
return (disableArrow ? '32px' : '64px');
|
|
76
|
-
}, function (_a) {
|
|
77
|
-
var maxWidth = _a.maxWidth;
|
|
78
|
-
return maxWidth;
|
|
79
|
-
});
|
|
80
|
-
var WideTileHeader = (0, styled_components_1.default)(TileHeader_1.TileHeader)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 24px;\n text-align: ", ";\n"], ["\n font-size: 24px;\n text-align: ", ";\n"])), function (_a) {
|
|
81
|
-
var align = _a.align;
|
|
82
|
-
return align || 'left';
|
|
83
|
-
});
|
|
84
|
-
var WideTileText = (0, styled_components_1.default)(TileText_1.TileText)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 18px;\n text-align: ", ";\n"], ["\n font-size: 18px;\n text-align: ", ";\n"])), function (_a) {
|
|
85
|
-
var align = _a.align;
|
|
86
|
-
return align || 'left';
|
|
87
|
-
});
|
|
88
|
-
var WideTileIcon = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: 24px;\n flex-shrink: 0;\n width: 70px;\n img {\n display: block;\n height: auto;\n max-width: 100%;\n }\n\n ", " {\n margin-right: 24px;\n margin-bottom: 0;\n }\n"], ["\n margin-bottom: 24px;\n flex-shrink: 0;\n width: 70px;\n img {\n display: block;\n height: auto;\n max-width: 100%;\n }\n\n ", " {\n margin-right: 24px;\n margin-bottom: 0;\n }\n"])), function (_a) {
|
|
89
|
-
var theme = _a.theme;
|
|
90
|
-
return theme.mediaQueries.medium;
|
|
91
|
-
});
|
|
92
|
-
var WideTile = /** @class */ (function (_super) {
|
|
93
|
-
__extends(WideTile, _super);
|
|
94
|
-
function WideTile() {
|
|
95
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
96
|
-
}
|
|
97
|
-
WideTile.prototype.render = function () {
|
|
98
|
-
var _a = this.props, to = _a.to, header = _a.header, children = _a.children, target = _a.target, disableArrow = _a.disableArrow, textAlign = _a.textAlign, headerAlign = _a.headerAlign, icon = _a.icon, bgColor = _a.bgColor, bgImage = _a.bgImage, color = _a.color, className = _a.className, style = _a.style, maxWidth = _a.maxWidth;
|
|
99
|
-
return (react_1.default.createElement(WideTileWrapper, { to: to, target: target, disableArrow: disableArrow, withIcon: !!icon, bgColor: bgColor, bgImage: bgImage, color: color, className: className, style: style, maxWidth: maxWidth, "data-component-name": "ui/Tiles/WideTile" },
|
|
100
|
-
icon && (react_1.default.createElement(WideTileIcon, null,
|
|
101
|
-
react_1.default.createElement("img", { src: icon, alt: "" }))),
|
|
102
|
-
react_1.default.createElement("div", null,
|
|
103
|
-
header && (react_1.default.createElement(WideTileHeader, { align: textAlign, color: color, "data-cy": "Wide-".concat(header) }, header)),
|
|
104
|
-
children && (react_1.default.createElement(WideTileText, { align: headerAlign, color: color }, children)))));
|
|
105
|
-
};
|
|
106
|
-
return WideTile;
|
|
107
|
-
}(react_1.Component));
|
|
108
|
-
exports.WideTile = WideTile;
|
|
109
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
package/ui/UniversalLink.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
41
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
42
|
-
if (!m) return o;
|
|
43
|
-
var i = m.call(o), r, ar = [], e;
|
|
44
|
-
try {
|
|
45
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
46
|
-
}
|
|
47
|
-
catch (error) { e = { error: error }; }
|
|
48
|
-
finally {
|
|
49
|
-
try {
|
|
50
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
51
|
-
}
|
|
52
|
-
finally { if (e) throw e.error; }
|
|
53
|
-
}
|
|
54
|
-
return ar;
|
|
55
|
-
};
|
|
56
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
57
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.UniversalLink = exports.withPropsFilter = void 0;
|
|
61
|
-
var React = __importStar(require("react"));
|
|
62
|
-
var react_router_dom_1 = require("react-router-dom");
|
|
63
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
64
|
-
var isUrl_1 = require("../utils/isUrl");
|
|
65
|
-
var Link_1 = require("../mocks/Link");
|
|
66
|
-
var StyledExternalLink = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background: var(--text-color);\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E\");\n mask-repeat: no-repeat;\n width: 10px;\n height: 10px;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"], ["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background: var(--text-color);\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E\");\n mask-repeat: no-repeat;\n width: 10px;\n height: 10px;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"])));
|
|
67
|
-
// TODO: We're using our own Link component so probably filtering is not necessary here.
|
|
68
|
-
// filter out unnecessary props
|
|
69
|
-
var propsList = [
|
|
70
|
-
'color',
|
|
71
|
-
'size',
|
|
72
|
-
'variant',
|
|
73
|
-
'bgColor',
|
|
74
|
-
'bgImage',
|
|
75
|
-
'disableArrow',
|
|
76
|
-
'withIcon',
|
|
77
|
-
'maxWidth',
|
|
78
|
-
'inversed',
|
|
79
|
-
'transparent',
|
|
80
|
-
'large',
|
|
81
|
-
];
|
|
82
|
-
var withPropsFilter = function (filterList) { return function (WrappedComponent) {
|
|
83
|
-
return function WithPropsFilter(props) {
|
|
84
|
-
var filteredProps = Object.fromEntries(Object.entries(props).filter(function (_a) {
|
|
85
|
-
var _b = __read(_a, 1), key = _b[0];
|
|
86
|
-
return !filterList.includes(key);
|
|
87
|
-
}));
|
|
88
|
-
return React.createElement(WrappedComponent, __assign({}, filteredProps));
|
|
89
|
-
};
|
|
90
|
-
}; };
|
|
91
|
-
exports.withPropsFilter = withPropsFilter;
|
|
92
|
-
exports.UniversalLink = (0, exports.withPropsFilter)(propsList)(function (props) {
|
|
93
|
-
var _a;
|
|
94
|
-
return (typeof props.to === 'string' && ((0, isUrl_1.isUrl)(props.to) || props.to.startsWith('mailto:'))) ||
|
|
95
|
-
props.external ? (React.createElement(StyledExternalLink, { style: props.style, href: props.to, target: props.target || (props.external && '_blank') || '_self', className: "".concat(props.external ? 'external-url' : '', " ").concat(props.className), rel: props.rel, "data-cy": "universalLink-".concat(typeof props.children === 'string' ? props.children : 'with-nested-jsx') }, props.children)) : props.to == null ? (React.createElement("a", { onClick: props.onClick, className: props.className, style: props.style }, props.children)) : (React.createElement(Link_1.Link, __assign({}, props, { to: props.to, state: __assign({ previousPath: (_a = (0, react_router_dom_1.useLocation)()) === null || _a === void 0 ? void 0 : _a.pathname }, props.state) })));
|
|
96
|
-
});
|
|
97
|
-
var templateObject_1;
|
package/ui/darkColors.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.darkMode = void 0;
|
|
8
|
-
var styled_components_1 = require("styled-components");
|
|
9
|
-
exports.darkMode = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /**\n * @tokens Dark Colors\n * @presenter Color\n */\n --background-color: #0d1117;\n --footer-background-color: #16202e;\n --navbar-background-color: #16202e;\n --color-primary-500: #57a5fd;\n --color-primary-300: #15396e;\n --color-secondary-300: #22262e;\n --colors-translucent: rgb(50 63 75 / 40%);\n --inline-code-text-color: #f76663;\n --color-emphasis-400: #fff;\n --link-hover-text-color: #57a5fd;\n --link-text-color: #57a5fd;\n --code-block-background-color: #1e2633;\n --admonition-attention-background-color: var(--color-primary-300);\n --admonition-attention-icon-color: var(--color-emphasis-700);\n --admonition-warning-background-color: #614b17;\n --admonition-warning-icon-color: #4c3b12;\n --admonition-success-background-color: #267e74;\n --admonition-success-icon-color: #38b9a5;\n --admonition-danger-background-color: #d6524c;\n --admonition-danger-icon-color: #d13e37;\n --admonition-info-background-color: #696969;\n --admonition-info-icon-color: #505050;\n --inline-code-background-color: #1e2633;\n --toc-item-active-background-color: #1e2633;\n --sidebar-item-active-background-color: #1e2633;\n --panel-response-success-heading-background-color: #38b9a5;\n --panel-response-success-border-color: #38b9a5;\n --panel-response-error-heading-background-color: #d6524c;\n --panel-response-error-border-color: #d6524c;\n --panel-samples-heading-background-color: #1e2633;\n --panel-samples-body-background-color: #263041;\n --panel-samples-tabs-hover-background-color: #1e2633;\n --panel-samples-tabs-hover-border-color: #3f4f68;\n --panel-try-it-action-button-hover-border-color: #2b4cc4;\n --panel-try-it-action-button-hover-background-color: #2b4cc4;\n --panel-try-it-action-button-background-color: #0065fb;\n --button-background-color: #0065fb;\n --button-border-color: #0065fb;\n --button-hover-background-color: #2b4cc4;\n --button-hover-border-color: #2b4cc4;\n --search-popover-background-color: #1b2738;\n --search-highlight-text-color: #57a5fd;\n --search-item-active-background-color: #1f3559;\n --panel-try-it-nested-body-background-color: #263041;\n --panel-try-it-tabs-active-background-color: #11151d;\n --panel-try-it-tabs-hover-background-color: #141a26;\n --color-emphasis-100: #0065fb;\n --color-secondary-400: #696969;\n --color-emphasis-700: #fff;\n --color-emphasis-800: #fff;\n --copy-button-tooltip-text-color: #fff;\n --copy-button-tooltip-background-color: var(--tooltip-background-color);\n --tooltip-text-color: #fff;\n --md-table-head-background-color: var(--color-secondary-300);\n --wide-tile-background-color: #000000;\n --thin-tile-background-color: #000000;\n\n background-color: var(--background-color);\n color: var(--text-color);\n"], ["\n /**\n * @tokens Dark Colors\n * @presenter Color\n */\n --background-color: #0d1117;\n --footer-background-color: #16202e;\n --navbar-background-color: #16202e;\n --color-primary-500: #57a5fd;\n --color-primary-300: #15396e;\n --color-secondary-300: #22262e;\n --colors-translucent: rgb(50 63 75 / 40%);\n --inline-code-text-color: #f76663;\n --color-emphasis-400: #fff;\n --link-hover-text-color: #57a5fd;\n --link-text-color: #57a5fd;\n --code-block-background-color: #1e2633;\n --admonition-attention-background-color: var(--color-primary-300);\n --admonition-attention-icon-color: var(--color-emphasis-700);\n --admonition-warning-background-color: #614b17;\n --admonition-warning-icon-color: #4c3b12;\n --admonition-success-background-color: #267e74;\n --admonition-success-icon-color: #38b9a5;\n --admonition-danger-background-color: #d6524c;\n --admonition-danger-icon-color: #d13e37;\n --admonition-info-background-color: #696969;\n --admonition-info-icon-color: #505050;\n --inline-code-background-color: #1e2633;\n --toc-item-active-background-color: #1e2633;\n --sidebar-item-active-background-color: #1e2633;\n --panel-response-success-heading-background-color: #38b9a5;\n --panel-response-success-border-color: #38b9a5;\n --panel-response-error-heading-background-color: #d6524c;\n --panel-response-error-border-color: #d6524c;\n --panel-samples-heading-background-color: #1e2633;\n --panel-samples-body-background-color: #263041;\n --panel-samples-tabs-hover-background-color: #1e2633;\n --panel-samples-tabs-hover-border-color: #3f4f68;\n --panel-try-it-action-button-hover-border-color: #2b4cc4;\n --panel-try-it-action-button-hover-background-color: #2b4cc4;\n --panel-try-it-action-button-background-color: #0065fb;\n --button-background-color: #0065fb;\n --button-border-color: #0065fb;\n --button-hover-background-color: #2b4cc4;\n --button-hover-border-color: #2b4cc4;\n --search-popover-background-color: #1b2738;\n --search-highlight-text-color: #57a5fd;\n --search-item-active-background-color: #1f3559;\n --panel-try-it-nested-body-background-color: #263041;\n --panel-try-it-tabs-active-background-color: #11151d;\n --panel-try-it-tabs-hover-background-color: #141a26;\n --color-emphasis-100: #0065fb;\n --color-secondary-400: #696969;\n --color-emphasis-700: #fff;\n --color-emphasis-800: #fff;\n --copy-button-tooltip-text-color: #fff;\n --copy-button-tooltip-background-color: var(--tooltip-background-color);\n --tooltip-text-color: #fff;\n --md-table-head-background-color: var(--color-secondary-300);\n --wide-tile-background-color: #000000;\n --thin-tile-background-color: #000000;\n\n background-color: var(--background-color);\n color: var(--text-color);\n"])));
|
|
10
|
-
var templateObject_1;
|
package/utils/class-names.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.concatClassNames = void 0;
|
|
4
|
-
var SPACE_DELIMITER = ' ';
|
|
5
|
-
function concatClassNames() {
|
|
6
|
-
var args = [];
|
|
7
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8
|
-
args[_i] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return args
|
|
11
|
-
.map(function (className) { return (className ? className.trim() : className); })
|
|
12
|
-
.filter(Boolean)
|
|
13
|
-
.join(SPACE_DELIMITER);
|
|
14
|
-
}
|
|
15
|
-
exports.concatClassNames = concatClassNames;
|
package/utils/css-variables.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCssColorVariable = void 0;
|
|
4
|
-
var getCssColorVariable = function (color, defaultValue) {
|
|
5
|
-
if (defaultValue === void 0) { defaultValue = 'inherit'; }
|
|
6
|
-
return (color === null || color === void 0 ? void 0 : color.startsWith('--')) ? "var(".concat(color, ")") : color || defaultValue;
|
|
7
|
-
};
|
|
8
|
-
exports.getCssColorVariable = getCssColorVariable;
|
package/utils/jsonToHtml.js
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
3
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
4
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
5
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
6
|
-
function step(op) {
|
|
7
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
8
|
-
while (_) try {
|
|
9
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
10
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
11
|
-
switch (op[0]) {
|
|
12
|
-
case 0: case 1: t = op; break;
|
|
13
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
14
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
15
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
16
|
-
default:
|
|
17
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
18
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
19
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
20
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
21
|
-
if (t[2]) _.ops.pop();
|
|
22
|
-
_.trys.pop(); continue;
|
|
23
|
-
}
|
|
24
|
-
op = body.call(thisArg, _);
|
|
25
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
26
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var __values = (this && this.__values) || function(o) {
|
|
30
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
31
|
-
if (m) return m.call(o);
|
|
32
|
-
if (o && typeof o.length === "number") return {
|
|
33
|
-
next: function () {
|
|
34
|
-
if (o && i >= o.length) o = void 0;
|
|
35
|
-
return { value: o && o[i++], done: !o };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.getLines = exports.jsonToHTML = void 0;
|
|
42
|
-
// Moved from reference-docs
|
|
43
|
-
var level = 0;
|
|
44
|
-
var line = 1;
|
|
45
|
-
var ellipsis = '<span class="ellipsis"></span>';
|
|
46
|
-
var colon = '<span class="colon">: </span>';
|
|
47
|
-
function jsonToHTML(json, maxExpandLevel, startLine) {
|
|
48
|
-
if (startLine === void 0) { startLine = 1; }
|
|
49
|
-
level = 0;
|
|
50
|
-
line = startLine;
|
|
51
|
-
var output = '';
|
|
52
|
-
output += '<div data-cy="json-sample" class="redoc-json">';
|
|
53
|
-
output += '<code>';
|
|
54
|
-
output += getLines(json, maxExpandLevel);
|
|
55
|
-
output += '</code>';
|
|
56
|
-
output += '</div>';
|
|
57
|
-
return output;
|
|
58
|
-
}
|
|
59
|
-
exports.jsonToHTML = jsonToHTML;
|
|
60
|
-
function htmlEncode(t) {
|
|
61
|
-
return t !== undefined
|
|
62
|
-
? t
|
|
63
|
-
.toString()
|
|
64
|
-
.replace(/&/g, '&')
|
|
65
|
-
.replace(/"/g, '"')
|
|
66
|
-
.replace(/</g, '<')
|
|
67
|
-
.replace(/>/g, '>')
|
|
68
|
-
: '';
|
|
69
|
-
}
|
|
70
|
-
function stringifyStringLiteral(str) {
|
|
71
|
-
return JSON.stringify(str).slice(1, -1);
|
|
72
|
-
}
|
|
73
|
-
function decorateWithSpan(value, className) {
|
|
74
|
-
return '<span class="' + className + '">' + htmlEncode(value) + '</span>';
|
|
75
|
-
}
|
|
76
|
-
function punctuation(val) {
|
|
77
|
-
return '<span class="token punctuation">' + val + '</span>';
|
|
78
|
-
}
|
|
79
|
-
function collapser(maxExpandLevel) {
|
|
80
|
-
var collapsed = level > maxExpandLevel ? 'expand' : 'collapse';
|
|
81
|
-
return "<button class=\"collapser\" aria-label=\"".concat(collapsed, "\"></button>");
|
|
82
|
-
}
|
|
83
|
-
function getLines(json, maxExpandLevel) {
|
|
84
|
-
var collapsibleLines = [];
|
|
85
|
-
var lines = valueToHTML(json, maxExpandLevel, 'root');
|
|
86
|
-
var nextLine = lines.next();
|
|
87
|
-
while (!nextLine.done) {
|
|
88
|
-
collapsibleLines.push(nextLine.value);
|
|
89
|
-
nextLine = lines.next();
|
|
90
|
-
}
|
|
91
|
-
collapsibleLines.push(nextLine.value);
|
|
92
|
-
return collapsibleLines.join('\n');
|
|
93
|
-
}
|
|
94
|
-
exports.getLines = getLines;
|
|
95
|
-
function valueToHTML(value, maxExpandLevel, context) {
|
|
96
|
-
var valueType, length_1, _a, _b, line_1, e_1_1, keys, _c, _d, line_2, e_2_1;
|
|
97
|
-
var e_1, _e, e_2, _f;
|
|
98
|
-
return __generator(this, function (_g) {
|
|
99
|
-
switch (_g.label) {
|
|
100
|
-
case 0:
|
|
101
|
-
valueType = typeof value;
|
|
102
|
-
if (!(value === undefined || value === null)) return [3 /*break*/, 1];
|
|
103
|
-
return [2 /*return*/, decorateWithSpan('null', 'token keyword')];
|
|
104
|
-
case 1:
|
|
105
|
-
if (!(value && value.constructor === Array)) return [3 /*break*/, 11];
|
|
106
|
-
length_1 = typeof value.length === 'number' ? value.length : 0;
|
|
107
|
-
if (!length_1) {
|
|
108
|
-
return [2 /*return*/, punctuation('[ ]')];
|
|
109
|
-
}
|
|
110
|
-
level++;
|
|
111
|
-
return [4 /*yield*/, context === 'root'
|
|
112
|
-
? "<span data-line=\"".concat(line++, "\">").concat(punctuation('['), "</span>")
|
|
113
|
-
: punctuation('[')];
|
|
114
|
-
case 2:
|
|
115
|
-
_g.sent();
|
|
116
|
-
_g.label = 3;
|
|
117
|
-
case 3:
|
|
118
|
-
_g.trys.push([3, 8, 9, 10]);
|
|
119
|
-
_a = __values(arrayToHTML(value, length_1, maxExpandLevel)), _b = _a.next();
|
|
120
|
-
_g.label = 4;
|
|
121
|
-
case 4:
|
|
122
|
-
if (!!_b.done) return [3 /*break*/, 7];
|
|
123
|
-
line_1 = _b.value;
|
|
124
|
-
return [4 /*yield*/, line_1];
|
|
125
|
-
case 5:
|
|
126
|
-
_g.sent();
|
|
127
|
-
_g.label = 6;
|
|
128
|
-
case 6:
|
|
129
|
-
_b = _a.next();
|
|
130
|
-
return [3 /*break*/, 4];
|
|
131
|
-
case 7: return [3 /*break*/, 10];
|
|
132
|
-
case 8:
|
|
133
|
-
e_1_1 = _g.sent();
|
|
134
|
-
e_1 = { error: e_1_1 };
|
|
135
|
-
return [3 /*break*/, 10];
|
|
136
|
-
case 9:
|
|
137
|
-
try {
|
|
138
|
-
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
139
|
-
}
|
|
140
|
-
finally { if (e_1) throw e_1.error; }
|
|
141
|
-
return [7 /*endfinally*/];
|
|
142
|
-
case 10:
|
|
143
|
-
level--;
|
|
144
|
-
return [2 /*return*/, "<span data-line=\"".concat(line++, "\">").concat(punctuation(']'), "</span>")];
|
|
145
|
-
case 11:
|
|
146
|
-
if (!(value && value.constructor === Date)) return [3 /*break*/, 12];
|
|
147
|
-
return [2 /*return*/, decorateWithSpan('"' + value.toISOString() + '"', 'token string')];
|
|
148
|
-
case 12:
|
|
149
|
-
if (!(valueType === 'object')) return [3 /*break*/, 22];
|
|
150
|
-
keys = Object.keys(value);
|
|
151
|
-
if (!keys.length) {
|
|
152
|
-
return [2 /*return*/, punctuation('{ }')];
|
|
153
|
-
}
|
|
154
|
-
level++;
|
|
155
|
-
return [4 /*yield*/, context === 'root'
|
|
156
|
-
? "<span data-line=\"".concat(line++, "\">").concat(punctuation('{'), "</span>")
|
|
157
|
-
: punctuation('{')];
|
|
158
|
-
case 13:
|
|
159
|
-
_g.sent();
|
|
160
|
-
_g.label = 14;
|
|
161
|
-
case 14:
|
|
162
|
-
_g.trys.push([14, 19, 20, 21]);
|
|
163
|
-
_c = __values(objectToHTML(value, keys, maxExpandLevel)), _d = _c.next();
|
|
164
|
-
_g.label = 15;
|
|
165
|
-
case 15:
|
|
166
|
-
if (!!_d.done) return [3 /*break*/, 18];
|
|
167
|
-
line_2 = _d.value;
|
|
168
|
-
return [4 /*yield*/, line_2];
|
|
169
|
-
case 16:
|
|
170
|
-
_g.sent();
|
|
171
|
-
_g.label = 17;
|
|
172
|
-
case 17:
|
|
173
|
-
_d = _c.next();
|
|
174
|
-
return [3 /*break*/, 15];
|
|
175
|
-
case 18: return [3 /*break*/, 21];
|
|
176
|
-
case 19:
|
|
177
|
-
e_2_1 = _g.sent();
|
|
178
|
-
e_2 = { error: e_2_1 };
|
|
179
|
-
return [3 /*break*/, 21];
|
|
180
|
-
case 20:
|
|
181
|
-
try {
|
|
182
|
-
if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
|
|
183
|
-
}
|
|
184
|
-
finally { if (e_2) throw e_2.error; }
|
|
185
|
-
return [7 /*endfinally*/];
|
|
186
|
-
case 21:
|
|
187
|
-
level--;
|
|
188
|
-
return [2 /*return*/, "<span data-line=\"".concat(line++, "\">").concat(punctuation('}'), "</span>")];
|
|
189
|
-
case 22:
|
|
190
|
-
if (valueType === 'number') {
|
|
191
|
-
return [2 /*return*/, decorateWithSpan(value, 'token number')];
|
|
192
|
-
}
|
|
193
|
-
else if (valueType === 'string') {
|
|
194
|
-
if (/^(http|https):\/\/[^\s]+$/.test(value)) {
|
|
195
|
-
return [2 /*return*/, (decorateWithSpan('"', 'token string') +
|
|
196
|
-
"<a href=\"".concat(encodeURI(value), "\">") +
|
|
197
|
-
htmlEncode(stringifyStringLiteral(value)) +
|
|
198
|
-
'</a>' +
|
|
199
|
-
decorateWithSpan('"', 'token string'))];
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
return [2 /*return*/, decorateWithSpan('"' + stringifyStringLiteral(value) + '"', 'token string')];
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
else if (valueType === 'boolean') {
|
|
206
|
-
return [2 /*return*/, decorateWithSpan(value, 'token boolean')];
|
|
207
|
-
}
|
|
208
|
-
_g.label = 23;
|
|
209
|
-
case 23: return [2 /*return*/];
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
function getLineTemplate(_a) {
|
|
214
|
-
var isFirstKey = _a.isFirstKey, isLastKey = _a.isLastKey, nextLine = _a.nextLine, context = _a.context, lineTemplate = _a.lineTemplate, maxExpandLevel = _a.maxExpandLevel;
|
|
215
|
-
var lineValue = isFirstKey ? "".concat(ellipsis, "<span class=\"").concat(context, " collapsible\">") : '';
|
|
216
|
-
// Create hoverable
|
|
217
|
-
lineValue += "<span data-line=\"".concat(line++, "\" class=\"").concat(level > maxExpandLevel ? 'hoverable collapsed' : 'hoverable', "\">");
|
|
218
|
-
// Add collapser button if item has nested lines
|
|
219
|
-
lineValue += (!nextLine.done && collapser(maxExpandLevel)) || '';
|
|
220
|
-
lineValue += lineTemplate;
|
|
221
|
-
lineValue += nextLine.value;
|
|
222
|
-
// Add punctuation in case we dont have more nested lines and it is not last item
|
|
223
|
-
lineValue += nextLine.done && !isLastKey ? punctuation(',') : '';
|
|
224
|
-
// Close hoverable if we dont have nested lines
|
|
225
|
-
lineValue += nextLine.done ? '</span>' : '';
|
|
226
|
-
// Close collapsible if value is single line and we are on last item
|
|
227
|
-
lineValue += nextLine.done && isLastKey ? '</span>' : '';
|
|
228
|
-
return lineValue;
|
|
229
|
-
}
|
|
230
|
-
function arrayToHTML(array, arrayLength, maxExpandLevel) {
|
|
231
|
-
var i, lines, isFirstKey, isLastKey, nextLine;
|
|
232
|
-
return __generator(this, function (_a) {
|
|
233
|
-
switch (_a.label) {
|
|
234
|
-
case 0:
|
|
235
|
-
i = 0;
|
|
236
|
-
_a.label = 1;
|
|
237
|
-
case 1:
|
|
238
|
-
if (!(i < arrayLength)) return [3 /*break*/, 8];
|
|
239
|
-
lines = valueToHTML(array[i], maxExpandLevel, 'array');
|
|
240
|
-
isFirstKey = i === 0;
|
|
241
|
-
isLastKey = i === arrayLength - 1;
|
|
242
|
-
nextLine = lines.next();
|
|
243
|
-
return [4 /*yield*/, getLineTemplate({
|
|
244
|
-
context: 'array',
|
|
245
|
-
isFirstKey: isFirstKey,
|
|
246
|
-
isLastKey: isLastKey,
|
|
247
|
-
nextLine: nextLine,
|
|
248
|
-
lineTemplate: '',
|
|
249
|
-
maxExpandLevel: maxExpandLevel,
|
|
250
|
-
})];
|
|
251
|
-
case 2:
|
|
252
|
-
_a.sent();
|
|
253
|
-
nextLine = lines.next();
|
|
254
|
-
_a.label = 3;
|
|
255
|
-
case 3:
|
|
256
|
-
if (!!nextLine.done) return [3 /*break*/, 5];
|
|
257
|
-
return [4 /*yield*/, nextLine.value];
|
|
258
|
-
case 4:
|
|
259
|
-
_a.sent();
|
|
260
|
-
nextLine = lines.next();
|
|
261
|
-
return [3 /*break*/, 3];
|
|
262
|
-
case 5:
|
|
263
|
-
if (!nextLine.value) return [3 /*break*/, 7];
|
|
264
|
-
// Close hoverable and collapsible (if last array item)
|
|
265
|
-
return [4 /*yield*/, "".concat(nextLine.value).concat(i < arrayLength - 1 ? punctuation(',') : '</span>', "</span>")];
|
|
266
|
-
case 6:
|
|
267
|
-
// Close hoverable and collapsible (if last array item)
|
|
268
|
-
_a.sent();
|
|
269
|
-
_a.label = 7;
|
|
270
|
-
case 7:
|
|
271
|
-
i++;
|
|
272
|
-
return [3 /*break*/, 1];
|
|
273
|
-
case 8: return [2 /*return*/];
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
function objectToHTML(object, keys, maxExpandLevel) {
|
|
278
|
-
var i, key, lines, isFirstKey, isLastKey, nextLine;
|
|
279
|
-
return __generator(this, function (_a) {
|
|
280
|
-
switch (_a.label) {
|
|
281
|
-
case 0:
|
|
282
|
-
i = 0;
|
|
283
|
-
_a.label = 1;
|
|
284
|
-
case 1:
|
|
285
|
-
if (!(i < keys.length)) return [3 /*break*/, 8];
|
|
286
|
-
key = keys[i];
|
|
287
|
-
lines = valueToHTML(object[key], maxExpandLevel, 'object');
|
|
288
|
-
isFirstKey = i === 0;
|
|
289
|
-
isLastKey = i === keys.length - 1;
|
|
290
|
-
nextLine = lines.next();
|
|
291
|
-
return [4 /*yield*/, getLineTemplate({
|
|
292
|
-
context: 'obj',
|
|
293
|
-
isFirstKey: isFirstKey,
|
|
294
|
-
isLastKey: isLastKey,
|
|
295
|
-
nextLine: nextLine,
|
|
296
|
-
lineTemplate: "<span class=\"property token string\">\"".concat(htmlEncode(key), "\"</span>").concat(colon),
|
|
297
|
-
maxExpandLevel: maxExpandLevel,
|
|
298
|
-
})];
|
|
299
|
-
case 2:
|
|
300
|
-
_a.sent();
|
|
301
|
-
nextLine = lines.next();
|
|
302
|
-
_a.label = 3;
|
|
303
|
-
case 3:
|
|
304
|
-
if (!!nextLine.done) return [3 /*break*/, 5];
|
|
305
|
-
return [4 /*yield*/, nextLine.value];
|
|
306
|
-
case 4:
|
|
307
|
-
_a.sent();
|
|
308
|
-
nextLine = lines.next();
|
|
309
|
-
return [3 /*break*/, 3];
|
|
310
|
-
case 5:
|
|
311
|
-
if (!nextLine.value) return [3 /*break*/, 7];
|
|
312
|
-
// Close hoverable and collapsible (if last field)
|
|
313
|
-
return [4 /*yield*/, "".concat(nextLine.value).concat(isLastKey ? '</span>' : punctuation(','), "</span>")];
|
|
314
|
-
case 6:
|
|
315
|
-
// Close hoverable and collapsible (if last field)
|
|
316
|
-
_a.sent();
|
|
317
|
-
_a.label = 7;
|
|
318
|
-
case 7:
|
|
319
|
-
i++;
|
|
320
|
-
return [3 /*break*/, 1];
|
|
321
|
-
case 8: return [2 /*return*/];
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
}
|