@redocly/theme 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/I18n/LanguagePicker.js +2 -1
- package/lib/components/Breadcrumbs/Breadcrumb.js +0 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.js +6 -0
- package/lib/components/Cards/Card.d.ts +1 -0
- package/lib/components/Cards/Card.js +1 -1
- package/lib/components/Cards/CardsBlock.d.ts +1 -3
- package/lib/components/Cards/CardsBlock.js +2 -1
- package/lib/components/Catalog/Catalog.js +1 -1
- package/lib/components/CodeBlock/CodeBlock.d.ts +1 -3
- package/lib/components/CodeBlock/CodeBlock.js +2 -1
- package/lib/components/CodeSample/CodeSample.d.ts +2 -1
- package/lib/components/CodeSample/CodeSample.js +3 -2
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.d.ts +5 -1
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +3 -2
- package/lib/components/Feedback/Comment.d.ts +1 -1
- package/lib/components/Feedback/Comment.js +3 -3
- package/lib/components/Feedback/Rating.d.ts +1 -1
- package/lib/components/Feedback/Rating.js +2 -2
- package/lib/components/Feedback/Reasons.d.ts +1 -1
- package/lib/components/Feedback/Reasons.js +2 -2
- package/lib/components/Feedback/ReportDialog.js +1 -1
- package/lib/components/Feedback/Sentiment.d.ts +1 -1
- package/lib/components/Feedback/Sentiment.js +2 -2
- package/lib/components/Feedback/types.d.ts +5 -0
- package/lib/components/Footer/CustomFooter.d.ts +2 -1
- package/lib/components/Footer/CustomFooter.js +2 -2
- package/lib/components/Footer/CustomFooterNavItem.d.ts +2 -1
- package/lib/components/Footer/CustomFooterNavItem.js +2 -2
- package/lib/components/Footer/Footer.d.ts +2 -1
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/FooterColumn.d.ts +2 -1
- package/lib/components/Footer/FooterColumn.js +2 -2
- package/lib/components/Footer/FooterColumns.d.ts +2 -1
- package/lib/components/Footer/FooterColumns.js +2 -2
- package/lib/components/Footer/FooterCopyright.d.ts +2 -1
- package/lib/components/Footer/FooterCopyright.js +2 -2
- package/lib/components/JsonViewer/JsonViewer.d.ts +1 -3
- package/lib/components/LastUpdated/LastUpdated.d.ts +1 -0
- package/lib/components/LastUpdated/LastUpdated.js +1 -1
- package/lib/components/Markdown/ContainerWrapper.d.ts +1 -3
- package/lib/components/Markdown/ContainerWrapper.js +5 -4
- package/lib/components/Markdown/Heading.d.ts +2 -1
- package/lib/components/Markdown/Heading.js +2 -2
- package/lib/components/Markdown/MarkdownLayout.d.ts +2 -1
- package/lib/components/Markdown/MarkdownLayout.js +2 -2
- package/lib/components/Markdown/MarkdownWrapper.d.ts +1 -3
- package/lib/components/Markdown/MarkdownWrapper.js +11 -5
- package/lib/components/Markdown/Mermaid.d.ts +2 -1
- package/lib/components/Markdown/Mermaid.js +3 -2
- package/lib/components/Markdown/PageWrapper.d.ts +1 -3
- package/lib/components/Markdown/PageWrapper.js +2 -1
- package/lib/components/Markdown/Sup.d.ts +3 -1
- package/lib/components/Markdown/Sup.js +2 -2
- package/lib/components/Menu/Menu.d.ts +3 -1
- package/lib/components/Menu/Menu.js +6 -4
- package/lib/components/Menu/MenuContainer.d.ts +1 -0
- package/lib/components/Menu/MenuContainer.js +2 -1
- package/lib/components/Menu/MenuGroup.d.ts +2 -1
- package/lib/components/Menu/MenuGroup.js +3 -3
- package/lib/components/Menu/MenuItem.d.ts +1 -1
- package/lib/components/Menu/MenuItem.js +19 -3
- package/lib/components/Menu/MenuItemLabel.d.ts +1 -3
- package/lib/components/Menu/MenuItemLabel.js +18 -9
- package/lib/components/Menu/MenuItemSwitch.js +4 -2
- package/lib/components/Menu/MenuLink.d.ts +1 -3
- package/lib/components/Menu/MenuLink.js +2 -1
- package/lib/components/Menu/MenuLinkItem.d.ts +1 -1
- package/lib/components/Menu/MenuLinkItem.js +2 -2
- package/lib/components/Menu/MobileMenu.d.ts +11 -0
- package/lib/components/Menu/MobileMenu.js +179 -0
- package/lib/components/Menu/MobileMenuGroup.d.ts +9 -0
- package/lib/components/Menu/MobileMenuGroup.js +53 -0
- package/lib/components/Menu/index.d.ts +1 -0
- package/lib/components/Menu/index.js +1 -0
- package/lib/components/Navbar/BurgerButton.d.ts +5 -0
- package/lib/components/Navbar/BurgerButton.js +29 -0
- package/lib/components/Navbar/MobileUserProfile.d.ts +2 -0
- package/lib/components/Navbar/MobileUserProfile.js +78 -0
- package/lib/components/Navbar/Navbar.d.ts +1 -0
- package/lib/components/Navbar/Navbar.js +29 -9
- package/lib/components/Navbar/NavbarDropdown.d.ts +2 -1
- package/lib/components/Navbar/NavbarDropdown.js +2 -2
- package/lib/components/Navbar/NavbarMenu.d.ts +2 -1
- package/lib/components/Navbar/NavbarMenu.js +2 -2
- package/lib/components/NavbarLogo/NavbarLogo.d.ts +2 -1
- package/lib/components/NavbarLogo/NavbarLogo.js +2 -2
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.d.ts +1 -1
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.js +1 -1
- package/lib/components/PageNavigation/NextButton.d.ts +2 -1
- package/lib/components/PageNavigation/NextButton.js +2 -2
- package/lib/components/PageNavigation/PageNavigation.d.ts +2 -1
- package/lib/components/PageNavigation/PageNavigation.js +2 -2
- package/lib/components/PageNavigation/PreviousButton.d.ts +2 -1
- package/lib/components/PageNavigation/PreviousButton.js +2 -2
- package/lib/components/Panel/PanelBody.d.ts +1 -3
- package/lib/components/Panel/PanelBody.js +2 -1
- package/lib/components/Panel/PanelHeader.d.ts +1 -3
- package/lib/components/Panel/PanelHeader.js +2 -1
- package/lib/components/Panel/PanelHeaderTitle.d.ts +1 -3
- package/lib/components/Panel/PanelHeaderTitle.js +2 -1
- package/lib/components/Profile/Profile.d.ts +6 -0
- package/lib/components/Profile/Profile.js +7 -7
- package/lib/components/Profile/types.d.ts +1 -0
- package/lib/components/SamplesPanelControls/SamplesPanelControls.d.ts +2 -6
- package/lib/components/SamplesPanelControls/SamplesPanelControls.js +2 -1
- package/lib/components/Search/CancelSearch.d.ts +2 -1
- package/lib/components/Search/CancelSearch.js +2 -2
- package/lib/components/Search/ClearIcon.d.ts +1 -3
- package/lib/components/Search/ClearIcon.js +2 -1
- package/lib/components/Search/ClockBackwardsIcon.d.ts +1 -4
- package/lib/components/Search/Input.d.ts +1 -3
- package/lib/components/Search/Input.js +2 -1
- package/lib/components/Search/InputWrapper.d.ts +2 -1
- package/lib/components/Search/InputWrapper.js +2 -2
- package/lib/components/Search/MobileSearchTrigger.d.ts +2 -1
- package/lib/components/Search/MobileSearchTrigger.js +6 -5
- package/lib/components/Search/Popover.d.ts +1 -3
- package/lib/components/Search/Popover.js +3 -2
- package/lib/components/Search/RecentSearches.d.ts +2 -1
- package/lib/components/Search/RecentSearches.js +3 -3
- package/lib/components/Search/Search.d.ts +3 -1
- package/lib/components/Search/Search.js +2 -2
- package/lib/components/Search/SearchDialog.d.ts +2 -1
- package/lib/components/Search/SearchDialog.js +4 -3
- package/lib/components/Search/SearchIcon.d.ts +1 -3
- package/lib/components/Search/SearchIcon.js +2 -1
- package/lib/components/Search/SearchItem.d.ts +2 -1
- package/lib/components/Search/SearchItem.js +3 -3
- package/lib/components/Search/SearchTrigger.d.ts +2 -1
- package/lib/components/Search/SearchTrigger.js +2 -2
- package/lib/components/Search/Shortcut.d.ts +2 -1
- package/lib/components/Search/Shortcut.js +2 -2
- package/lib/components/Search/ShortcutKey.d.ts +1 -0
- package/lib/components/Search/ShortcutKey.js +1 -1
- package/lib/components/Search/SidebarSearch.d.ts +1 -3
- package/lib/components/Search/SidebarSearch.js +2 -1
- package/lib/components/Search/SuggestedPages.d.ts +3 -1
- package/lib/components/Search/SuggestedPages.js +2 -2
- package/lib/components/Separator/Separator.d.ts +1 -1
- package/lib/components/Separator/Separator.js +2 -2
- package/lib/components/Separator/SeparatorItem.d.ts +1 -5
- package/lib/components/Separator/SeparatorItem.js +7 -2
- package/lib/components/Separator/SeparatorLine.d.ts +1 -3
- package/lib/components/Separator/SeparatorLine.js +2 -1
- package/lib/components/Sidebar/ApiCallItem.d.ts +1 -1
- package/lib/components/Sidebar/ApiCallItem.js +10 -3
- package/lib/components/Sidebar/BackButton.d.ts +2 -1
- package/lib/components/Sidebar/BackButton.js +2 -2
- package/lib/components/Sidebar/Drilldown.d.ts +2 -1
- package/lib/components/Sidebar/Drilldown.js +2 -2
- package/lib/components/Sidebar/DrilldownMenu.d.ts +1 -1
- package/lib/components/Sidebar/DrilldownMenu.js +3 -3
- package/lib/components/Sidebar/DrilldownMenuItem.d.ts +1 -1
- package/lib/components/Sidebar/DrilldownMenuItem.js +2 -2
- package/lib/components/Sidebar/HeaderWrapper.d.ts +1 -3
- package/lib/components/Sidebar/HeaderWrapper.js +2 -1
- package/lib/components/Sidebar/MobileSidebarButton.d.ts +1 -3
- package/lib/components/Sidebar/MobileSidebarButton.js +3 -2
- package/lib/components/Sidebar/Sidebar.d.ts +1 -3
- package/lib/components/Sidebar/Sidebar.js +2 -1
- package/lib/components/Sidebar/SidebarLayout.d.ts +2 -1
- package/lib/components/Sidebar/SidebarLayout.js +2 -4
- package/lib/components/Sidebar/types.d.ts +3 -0
- package/lib/components/SidebarActions/SidebarActions.d.ts +2 -1
- package/lib/components/SidebarActions/SidebarActions.js +2 -2
- package/lib/components/SidebarLogo/SidebarLogo.d.ts +2 -1
- package/lib/components/SidebarLogo/SidebarLogo.js +2 -2
- package/lib/components/TableOfContent/TableOfContent.d.ts +1 -0
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/components/Tags/Tags.d.ts +2 -1
- package/lib/components/Tags/Tags.js +2 -2
- package/lib/components/Tiles/TileHeader.d.ts +1 -3
- package/lib/components/Tiles/TileHeader.js +2 -1
- package/lib/components/Tiles/TileText.d.ts +1 -3
- package/lib/components/Tiles/TileText.js +2 -1
- package/lib/components/Typography/CompactTypography.d.ts +1 -3
- package/lib/components/Typography/Emphasis.d.ts +1 -3
- package/lib/components/Typography/Emphasis.js +2 -1
- package/lib/components/Typography/H1.d.ts +1 -3
- package/lib/components/Typography/H1.js +2 -1
- package/lib/components/Typography/H2.d.ts +1 -3
- package/lib/components/Typography/H2.js +2 -1
- package/lib/components/Typography/H3.d.ts +1 -3
- package/lib/components/Typography/H3.js +2 -1
- package/lib/components/Typography/SectionHeader.d.ts +1 -3
- package/lib/components/Typography/SectionHeader.js +2 -1
- package/lib/components/Typography/Typography.d.ts +1 -3
- package/lib/components/Typography/Typography.js +2 -1
- package/lib/globalStyle.js +62 -2
- package/lib/hooks/useMobileMenu.js +7 -1
- package/lib/icons/BurgerIcon/BurgerIcon.d.ts +5 -0
- package/lib/icons/BurgerIcon/BurgerIcon.js +15 -0
- package/lib/icons/BurgerIcon/index.d.ts +1 -0
- package/lib/icons/BurgerIcon/index.js +6 -0
- package/lib/icons/CloseIcon/CloseIcon.d.ts +5 -0
- package/lib/icons/CloseIcon/CloseIcon.js +16 -0
- package/lib/icons/CloseIcon/index.d.ts +1 -0
- package/lib/icons/CloseIcon/index.js +6 -0
- package/lib/icons/ColorModeIcon/ColorModeIcon.js +5 -1
- package/lib/icons/ExpandIcon/ExpandIcon.d.ts +8 -0
- package/lib/icons/ExpandIcon/ExpandIcon.js +31 -0
- package/lib/icons/ExpandIcon/index.d.ts +1 -0
- package/lib/icons/ExpandIcon/index.js +6 -0
- package/lib/icons/LogoutIcon/LogoutIcon.d.ts +5 -0
- package/lib/icons/LogoutIcon/LogoutIcon.js +17 -0
- package/lib/icons/LogoutIcon/index.d.ts +1 -0
- package/lib/icons/LogoutIcon/index.js +6 -0
- package/lib/icons/index.d.ts +4 -0
- package/lib/icons/index.js +4 -0
- package/lib/mocks/Sidebar/useSidebarItems.d.ts +3 -0
- package/lib/mocks/Sidebar/useSidebarItems.js +8 -0
- package/lib/mocks/hooks/index.d.ts +4 -1
- package/lib/mocks/hooks/index.js +16 -1
- package/lib/mocks/media-css.d.ts +5 -0
- package/lib/mocks/media-css.js +5 -0
- package/lib/ui/Dropdown.js +1 -1
- package/lib/ui/darkColors.js +11 -3
- package/package.json +6 -4
- package/src/I18n/LanguagePicker.tsx +2 -1
- package/src/components/Breadcrumbs/Breadcrumb.tsx +0 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +6 -0
- package/src/components/Cards/Card.tsx +2 -1
- package/src/components/Cards/CardsBlock.tsx +2 -1
- package/src/components/Catalog/Catalog.tsx +1 -1
- package/src/components/CodeBlock/CodeBlock.ts +2 -1
- package/src/components/CodeSample/CodeSample.tsx +4 -1
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +7 -1
- package/src/components/Feedback/Comment.tsx +3 -3
- package/src/components/Feedback/Rating.tsx +2 -2
- package/src/components/Feedback/Reasons.tsx +6 -2
- package/src/components/Feedback/ReportDialog.tsx +1 -1
- package/src/components/Feedback/Sentiment.tsx +2 -2
- package/src/components/Feedback/types.ts +5 -0
- package/src/components/Footer/CustomFooter.tsx +3 -2
- package/src/components/Footer/CustomFooterNavItem.tsx +3 -2
- package/src/components/Footer/Footer.tsx +3 -1
- package/src/components/Footer/FooterColumn.tsx +3 -2
- package/src/components/Footer/FooterColumns.tsx +3 -2
- package/src/components/Footer/FooterCopyright.tsx +6 -1
- package/src/components/LastUpdated/LastUpdated.tsx +2 -0
- package/src/components/Markdown/ContainerWrapper.tsx +5 -4
- package/src/components/Markdown/Heading.tsx +3 -1
- package/src/components/Markdown/MarkdownLayout.tsx +3 -1
- package/src/components/Markdown/MarkdownWrapper.tsx +11 -5
- package/src/components/Markdown/Mermaid.tsx +5 -1
- package/src/components/Markdown/PageWrapper.tsx +2 -1
- package/src/components/Markdown/Sup.tsx +9 -2
- package/src/components/Menu/Menu.tsx +16 -5
- package/src/components/Menu/MenuContainer.tsx +3 -1
- package/src/components/Menu/MenuGroup.tsx +4 -5
- package/src/components/Menu/MenuItem.tsx +22 -4
- package/src/components/Menu/MenuItemLabel.tsx +19 -10
- package/src/components/Menu/MenuItemSwitch.tsx +7 -5
- package/src/components/Menu/MenuLink.tsx +2 -1
- package/src/components/Menu/MenuLinkItem.tsx +2 -1
- package/src/components/Menu/MobileMenu.tsx +209 -0
- package/src/components/Menu/MobileMenuGroup.tsx +73 -0
- package/src/components/Menu/index.ts +1 -0
- package/src/components/Navbar/BurgerButton.tsx +34 -0
- package/src/components/Navbar/MobileUserProfile.tsx +90 -0
- package/src/components/Navbar/Navbar.tsx +43 -14
- package/src/components/Navbar/NavbarDropdown.tsx +3 -2
- package/src/components/Navbar/NavbarMenu.tsx +8 -2
- package/src/components/NavbarLogo/NavbarLogo.tsx +11 -3
- package/src/components/OpenApiDocs/DevOnboardingTryItSecurity.tsx +2 -4
- package/src/components/PageNavigation/NextButton.tsx +3 -1
- package/src/components/PageNavigation/PageNavigation.tsx +10 -2
- package/src/components/PageNavigation/PreviousButton.tsx +3 -1
- package/src/components/Panel/PanelBody.ts +2 -1
- package/src/components/Panel/PanelHeader.ts +2 -1
- package/src/components/Panel/PanelHeaderTitle.ts +2 -1
- package/src/components/Profile/Profile.tsx +2 -2
- package/src/components/Profile/types.ts +1 -0
- package/src/components/SamplesPanelControls/SamplesPanelControls.ts +6 -3
- package/src/components/Search/CancelSearch.tsx +8 -2
- package/src/components/Search/ClearIcon.tsx +2 -1
- package/src/components/Search/ClockBackwardsIcon.tsx +1 -1
- package/src/components/Search/Input.tsx +2 -1
- package/src/components/Search/InputWrapper.tsx +3 -1
- package/src/components/Search/MobileSearchTrigger.tsx +16 -5
- package/src/components/Search/Popover.tsx +3 -2
- package/src/components/Search/RecentSearches.tsx +9 -3
- package/src/components/Search/Search.tsx +2 -2
- package/src/components/Search/SearchDialog.tsx +10 -3
- package/src/components/Search/SearchIcon.tsx +2 -1
- package/src/components/Search/SearchItem.tsx +4 -1
- package/src/components/Search/SearchTrigger.tsx +8 -2
- package/src/components/Search/Shortcut.tsx +3 -1
- package/src/components/Search/ShortcutKey.tsx +2 -1
- package/src/components/Search/SidebarSearch.tsx +2 -1
- package/src/components/Search/SuggestedPages.tsx +2 -2
- package/src/components/Separator/Separator.tsx +2 -2
- package/src/components/Separator/SeparatorItem.tsx +11 -4
- package/src/components/Separator/SeparatorLine.tsx +2 -1
- package/src/components/Sidebar/ApiCallItem.tsx +12 -4
- package/src/components/Sidebar/BackButton.tsx +3 -1
- package/src/components/Sidebar/Drilldown.tsx +3 -1
- package/src/components/Sidebar/DrilldownMenu.tsx +3 -2
- package/src/components/Sidebar/DrilldownMenuItem.tsx +2 -2
- package/src/components/Sidebar/HeaderWrapper.tsx +2 -1
- package/src/components/Sidebar/MobileSidebarButton.tsx +3 -2
- package/src/components/Sidebar/Sidebar.tsx +2 -1
- package/src/components/Sidebar/SidebarLayout.tsx +3 -4
- package/src/components/Sidebar/types.ts +3 -0
- package/src/components/SidebarActions/SidebarActions.tsx +3 -0
- package/src/components/SidebarLogo/SidebarLogo.tsx +3 -0
- package/src/components/TableOfContent/TableOfContent.tsx +3 -2
- package/src/components/Tags/Tags.tsx +2 -2
- package/src/components/Tiles/TileHeader.ts +2 -1
- package/src/components/Tiles/TileText.tsx +2 -1
- package/src/components/Typography/Emphasis.ts +2 -1
- package/src/components/Typography/H1.ts +2 -1
- package/src/components/Typography/H2.ts +2 -1
- package/src/components/Typography/H3.ts +2 -1
- package/src/components/Typography/SectionHeader.ts +2 -1
- package/src/components/Typography/Typography.ts +2 -1
- package/src/globalStyle.ts +66 -3
- package/src/hooks/useMobileMenu.ts +5 -1
- package/src/icons/BurgerIcon/BurgerIcon.tsx +12 -0
- package/src/icons/BurgerIcon/index.ts +1 -0
- package/src/icons/CloseIcon/CloseIcon.tsx +13 -0
- package/src/icons/CloseIcon/index.ts +1 -0
- package/src/icons/ColorModeIcon/ColorModeIcon.tsx +5 -1
- package/src/icons/ExpandIcon/ExpandIcon.tsx +46 -0
- package/src/icons/ExpandIcon/index.ts +1 -0
- package/src/icons/LogoutIcon/LogoutIcon.tsx +20 -0
- package/src/icons/LogoutIcon/index.ts +1 -0
- package/src/icons/index.ts +4 -0
- package/src/mocks/Sidebar/useSidebarItems.tsx +7 -0
- package/src/mocks/hooks/index.ts +16 -1
- package/src/mocks/media-css.ts +1 -0
- package/src/ui/Dropdown.tsx +1 -1
- package/src/ui/darkColors.tsx +11 -3
- package/lib/components/Navbar/MobileNavbarDropdown.d.ts +0 -8
- package/lib/components/Navbar/MobileNavbarDropdown.js +0 -30
- package/lib/components/Navbar/MobileNavbarItem.d.ts +0 -15
- package/lib/components/Navbar/MobileNavbarItem.js +0 -110
- package/lib/components/Navbar/MobileNavbarMenu.d.ts +0 -6
- package/lib/components/Navbar/MobileNavbarMenu.js +0 -92
- package/lib/components/Navbar/MobileNavbarMenuButton.d.ts +0 -4
- package/lib/components/Navbar/MobileNavbarMenuButton.js +0 -18
- package/src/components/Navbar/MobileNavbarDropdown.tsx +0 -37
- package/src/components/Navbar/MobileNavbarItem.tsx +0 -121
- package/src/components/Navbar/MobileNavbarMenu.tsx +0 -111
- package/src/components/Navbar/MobileNavbarMenuButton.tsx +0 -13
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogoutIcon = void 0;
|
|
4
|
+
var LogoutIcon_1 = require("../../icons/LogoutIcon/LogoutIcon");
|
|
5
|
+
Object.defineProperty(exports, "LogoutIcon", { enumerable: true, get: function () { return LogoutIcon_1.LogoutIcon; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -5,3 +5,7 @@ export * from '../icons/ColorModeIcon';
|
|
|
5
5
|
export * from '../icons/AnchorIcon';
|
|
6
6
|
export * from '../icons/ExternalIcon';
|
|
7
7
|
export * from '../icons/SpinnerIcon';
|
|
8
|
+
export * from '../icons/BurgerIcon';
|
|
9
|
+
export * from '../icons/CloseIcon';
|
|
10
|
+
export * from '../icons/LogoutIcon';
|
|
11
|
+
export * from '../icons/ExpandIcon';
|
package/lib/icons/index.js
CHANGED
|
@@ -21,4 +21,8 @@ __exportStar(require("../icons/ColorModeIcon"), exports);
|
|
|
21
21
|
__exportStar(require("../icons/AnchorIcon"), exports);
|
|
22
22
|
__exportStar(require("../icons/ExternalIcon"), exports);
|
|
23
23
|
__exportStar(require("../icons/SpinnerIcon"), exports);
|
|
24
|
+
__exportStar(require("../icons/BurgerIcon"), exports);
|
|
25
|
+
__exportStar(require("../icons/CloseIcon"), exports);
|
|
26
|
+
__exportStar(require("../icons/LogoutIcon"), exports);
|
|
27
|
+
__exportStar(require("../icons/ExpandIcon"), exports);
|
|
24
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ThemeUIConfig } from '../../config';
|
|
2
|
-
import type { ResolvedNavItem, TFunction } from '../../types/portal';
|
|
2
|
+
import type { ResolvedNavItem, TFunction, Version } from '../../types/portal';
|
|
3
3
|
import type { CatalogConfig, FilteredCatalog } from '../../types/portal/src/shared/types/catalog';
|
|
4
4
|
interface PageLink {
|
|
5
5
|
label: string;
|
|
@@ -28,3 +28,6 @@ export declare function useI18nConfig(): {
|
|
|
28
28
|
name: string;
|
|
29
29
|
}[];
|
|
30
30
|
};
|
|
31
|
+
export declare function usePageVersions(): {
|
|
32
|
+
versions: Version[];
|
|
33
|
+
};
|
package/lib/mocks/hooks/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useI18nConfig = exports.useGlobalData = exports.useI18n = exports.useTranslate = exports.useCatalog = exports.usePageSharedData = exports.useSidebarSiblingsData = exports.useThemeConfig = void 0;
|
|
3
|
+
exports.usePageVersions = exports.useI18nConfig = exports.useGlobalData = exports.useI18n = exports.useTranslate = exports.useCatalog = exports.usePageSharedData = exports.useSidebarSiblingsData = exports.useThemeConfig = void 0;
|
|
4
4
|
function useThemeConfig() {
|
|
5
5
|
return {
|
|
6
6
|
search: {
|
|
@@ -89,4 +89,19 @@ function useI18nConfig() {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
exports.useI18nConfig = useI18nConfig;
|
|
92
|
+
function usePageVersions() {
|
|
93
|
+
return {
|
|
94
|
+
versions: [
|
|
95
|
+
{
|
|
96
|
+
version: '1.0',
|
|
97
|
+
label: 'First',
|
|
98
|
+
link: '',
|
|
99
|
+
default: true,
|
|
100
|
+
active: true,
|
|
101
|
+
folderId: 'id',
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
exports.usePageVersions = usePageVersions;
|
|
92
107
|
//# sourceMappingURL=index.js.map
|
package/lib/ui/Dropdown.js
CHANGED
package/lib/ui/darkColors.js
CHANGED
|
@@ -7,9 +7,17 @@ exports.darkMode = (0, styled_components_1.css) `
|
|
|
7
7
|
* @tokens Dark Colors
|
|
8
8
|
* @presenter Color
|
|
9
9
|
*/
|
|
10
|
-
--background-color: #
|
|
11
|
-
--footer-background-color: #
|
|
12
|
-
--navbar-background-color: #
|
|
10
|
+
--background-color: #141414;
|
|
11
|
+
--footer-background-color: #1F1F1F;
|
|
12
|
+
--navbar-background-color: #1F1F1F;
|
|
13
|
+
--mobile-menu-background: #141414;
|
|
14
|
+
--mobile-menu-profile-background: var(--mobile-menu-background);
|
|
15
|
+
--mobile-menu-login-button-background: var(--mobile-menu-profile-background); rgba(255, 255, 255, 0.6);
|
|
16
|
+
--mobile-menu-item-text-color: rgba(255, 255, 255, 0.6);
|
|
17
|
+
--mobile-menu-item-active-color: #1F1F1F;
|
|
18
|
+
--mobile-menu-item-active-text-color: rgba(255, 255, 255, 0.85);
|
|
19
|
+
--mobile-menu-control-button-color: #ffffff;
|
|
20
|
+
--mobile-menu-profile-border-color: #222222;
|
|
13
21
|
--color-primary-500: #57a5fd;
|
|
14
22
|
--color-primary-300: #15396e;
|
|
15
23
|
--color-secondary-300: #22262e;
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Shared UI components library",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"theme"
|
|
6
|
+
"theme",
|
|
7
|
+
"redocly"
|
|
7
8
|
],
|
|
8
9
|
"author": "team@redocly.com",
|
|
9
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
"ts-node": "^10.7.0",
|
|
77
78
|
"ts-node-dev": "^2.0.0",
|
|
78
79
|
"tsc-alias": "^1.8.2",
|
|
80
|
+
"tsconfig-paths": "^4.2.0",
|
|
79
81
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
80
82
|
"typescript": "^4.8.4",
|
|
81
83
|
"webpack": "^5.72.0"
|
|
@@ -84,9 +86,9 @@
|
|
|
84
86
|
"@redocly/ajv": "^8.11.0",
|
|
85
87
|
"copy-to-clipboard": "^3.3.3",
|
|
86
88
|
"highlight-words-core": "^1.2.2",
|
|
87
|
-
"react-date-picker": "10.0.3",
|
|
88
|
-
"react-calendar": "4.2.1",
|
|
89
89
|
"hotkeys-js": "^3.10.1",
|
|
90
|
+
"react-calendar": "4.2.1",
|
|
91
|
+
"react-date-picker": "10.0.3",
|
|
90
92
|
"timeago.js": "^4.0.2"
|
|
91
93
|
},
|
|
92
94
|
"scripts": {
|
|
@@ -70,6 +70,7 @@ const Dropdown = styled.div<{ isOpen: boolean }>`
|
|
|
70
70
|
? `
|
|
71
71
|
${DropdownMenu} {
|
|
72
72
|
display: block;
|
|
73
|
+
z-index: var(--z-index-popover);
|
|
73
74
|
}
|
|
74
75
|
`
|
|
75
76
|
: ``}
|
|
@@ -101,7 +102,7 @@ const DropdownMenu = styled.ul`
|
|
|
101
102
|
overflow: hidden;
|
|
102
103
|
display: none;
|
|
103
104
|
overflow-y: auto;
|
|
104
|
-
z-index:
|
|
105
|
+
z-index: var(--z-index-surface);
|
|
105
106
|
padding: 0;
|
|
106
107
|
list-style: none;
|
|
107
108
|
`;
|
|
@@ -32,6 +32,12 @@ const Container = styled.div`
|
|
|
32
32
|
flex-direction: row;
|
|
33
33
|
align-items: center;
|
|
34
34
|
color: var(--breadcrumbs-text-color);
|
|
35
|
+
font-size: var(--breadcrumbs-font-size);
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
|
|
38
|
+
> div {
|
|
39
|
+
padding-right: var(--breadcrumbs-padding-horizontal);
|
|
40
|
+
}
|
|
35
41
|
|
|
36
42
|
@media print {
|
|
37
43
|
display: none;
|
|
@@ -10,12 +10,13 @@ export interface CardProps {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
icon?: string;
|
|
12
12
|
links: ResolvedNavItem;
|
|
13
|
+
className?: string;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export function Card(props: CardProps): JSX.Element {
|
|
16
17
|
const { translate } = useTranslate();
|
|
17
18
|
return (
|
|
18
|
-
<CardWrapper data-component-name="Cards/Card">
|
|
19
|
+
<CardWrapper data-component-name="Cards/Card" className={props.className}>
|
|
19
20
|
{props.icon && <img src={props?.icon} alt={props?.title} />}
|
|
20
21
|
{props.title && <H3>{props.title}</H3>}
|
|
21
22
|
{props.links.items && (
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
export const CardsBlock = styled.div.attrs(() => ({
|
|
3
|
+
export const CardsBlock = styled.div.attrs<{ className?: string }>(({ className }) => ({
|
|
4
4
|
'data-component-name': 'Cards/CardsBlock',
|
|
5
|
+
className,
|
|
5
6
|
}))`
|
|
6
7
|
display: flex;
|
|
7
8
|
padding: 20px 0;
|
|
@@ -117,7 +117,7 @@ const CatalogPageSidebar = styled.aside<{ isActiveInMobileMode?: boolean }>`
|
|
|
117
117
|
isActiveInMobileMode ? 'padding-bottom: 66px;' : 'height: 76px;'};
|
|
118
118
|
background-color: var(--sidebar-background-color);
|
|
119
119
|
border-bottom: 1px solid var(--sidebar-border-color);
|
|
120
|
-
z-index:
|
|
120
|
+
z-index: var(--z-index-surface);
|
|
121
121
|
|
|
122
122
|
${MobileStickyApplyFilters} {
|
|
123
123
|
display: ${({ isActiveInMobileMode }) => (isActiveInMobileMode ? 'block' : 'none')};
|
|
@@ -2,8 +2,9 @@ import styled from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
import { generateCodeBlockTokens } from '@theme/utils';
|
|
4
4
|
|
|
5
|
-
export const CodeBlock = styled.div.attrs(() => ({
|
|
5
|
+
export const CodeBlock = styled.div.attrs<{ className?: string }>(({ className }) => ({
|
|
6
6
|
'data-component-name': 'CodeBlock/CodeBlock',
|
|
7
|
+
className,
|
|
7
8
|
}))`
|
|
8
9
|
max-height: var(--code-block-max-height, 600px);
|
|
9
10
|
word-break: var(--code-block-word-break, initial);
|
|
@@ -5,6 +5,7 @@ import { ClipboardService } from '@theme/utils/ClipboardService';
|
|
|
5
5
|
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
6
6
|
import { ReportDialog, useReportDialog } from '@theme/components/Feedback';
|
|
7
7
|
import { useTranslate } from '@portal/hooks';
|
|
8
|
+
import { concatClassNames } from '@theme/utils';
|
|
8
9
|
|
|
9
10
|
export type CodeSampleProps = {
|
|
10
11
|
language: string;
|
|
@@ -12,6 +13,7 @@ export type CodeSampleProps = {
|
|
|
12
13
|
rawContent: string;
|
|
13
14
|
'data-source'?: string;
|
|
14
15
|
'data-hash'?: string;
|
|
16
|
+
className?: string;
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
export function CodeSample({
|
|
@@ -20,6 +22,7 @@ export function CodeSample({
|
|
|
20
22
|
language,
|
|
21
23
|
'data-source': dataSource,
|
|
22
24
|
'data-hash': dataHash,
|
|
25
|
+
className = '',
|
|
23
26
|
}: CodeSampleProps): JSX.Element {
|
|
24
27
|
const langClassName = language ? `language-${language}` : '';
|
|
25
28
|
const { codeSnippet: { copy = {}, report = {} } = {} } = useThemeConfig();
|
|
@@ -44,7 +47,7 @@ export function CodeSample({
|
|
|
44
47
|
|
|
45
48
|
return (
|
|
46
49
|
<Wrapper
|
|
47
|
-
className=
|
|
50
|
+
className={concatClassNames('code-sample', className)}
|
|
48
51
|
data-component-name="Markdown/CodeSample/CodeSample"
|
|
49
52
|
data-source={dataSource}
|
|
50
53
|
data-hash={dataHash}
|
|
@@ -4,7 +4,12 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { ColorModeIcon } from '@theme/icons/ColorModeIcon';
|
|
5
5
|
import { useMount, useThemeConfig } from '@theme/hooks';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface ColorModeSwitcherProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function ColorModeSwitcher(props: ColorModeSwitcherProps): JSX.Element | null {
|
|
12
|
+
const { className } = props;
|
|
8
13
|
const themeSettings = useThemeConfig();
|
|
9
14
|
const colorMode = themeSettings.colorMode;
|
|
10
15
|
const [activeColorMode, setActiveColorMode] = useState('');
|
|
@@ -37,6 +42,7 @@ export function ColorModeSwitcher(): JSX.Element | null {
|
|
|
37
42
|
onClick={handelChangeColorMode}
|
|
38
43
|
modes={modes}
|
|
39
44
|
role="link"
|
|
45
|
+
className={className}
|
|
40
46
|
>
|
|
41
47
|
{modes.map((mode) => (
|
|
42
48
|
<ColorModeIcon mode={mode} key={mode} />
|
|
@@ -5,7 +5,7 @@ import { Button } from '@theme/components/Button/Button';
|
|
|
5
5
|
import type { CommentProps } from '@theme/components/Feedback';
|
|
6
6
|
import { useTranslate } from '@portal/hooks';
|
|
7
7
|
|
|
8
|
-
export const Comment = ({ settings, onSubmit, onCancel }: CommentProps): JSX.Element => {
|
|
8
|
+
export const Comment = ({ settings, onSubmit, onCancel, className }: CommentProps): JSX.Element => {
|
|
9
9
|
const { label, submitText } = settings || {};
|
|
10
10
|
const [text, setText] = React.useState('');
|
|
11
11
|
const [submitValue, setSubmitValue] = React.useState('');
|
|
@@ -28,7 +28,7 @@ export const Comment = ({ settings, onSubmit, onCancel }: CommentProps): JSX.Ele
|
|
|
28
28
|
|
|
29
29
|
if (submitValue) {
|
|
30
30
|
return (
|
|
31
|
-
<Wrapper>
|
|
31
|
+
<Wrapper className={className}>
|
|
32
32
|
<Label data-translation-key={translationKeys.submitText}>
|
|
33
33
|
{translate(
|
|
34
34
|
translationKeys.submitText,
|
|
@@ -40,7 +40,7 @@ export const Comment = ({ settings, onSubmit, onCancel }: CommentProps): JSX.Ele
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
|
-
<Wrapper data-component-name="Feedback/Comment">
|
|
43
|
+
<Wrapper data-component-name="Feedback/Comment" className={className}>
|
|
44
44
|
<Label data-translation-key={translationKeys.label}>
|
|
45
45
|
{translate(translationKeys.label, label || 'Please share your feedback with us.')}
|
|
46
46
|
</Label>
|
|
@@ -10,7 +10,7 @@ type StarsProps = {
|
|
|
10
10
|
max: number;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export const Rating = ({ settings, onSubmit }: RatingProps): JSX.Element => {
|
|
13
|
+
export const Rating = ({ settings, onSubmit, className }: RatingProps): JSX.Element => {
|
|
14
14
|
const {
|
|
15
15
|
label,
|
|
16
16
|
max,
|
|
@@ -66,7 +66,7 @@ export const Rating = ({ settings, onSubmit }: RatingProps): JSX.Element => {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return (
|
|
69
|
-
<Wrapper data-component-name="Feedback/Rating">
|
|
69
|
+
<Wrapper data-component-name="Feedback/Rating" className={className}>
|
|
70
70
|
<Label data-translation-key={translationKeys.label}>
|
|
71
71
|
{translate(translationKeys.label, label || 'How helpful was this page?')}
|
|
72
72
|
</Label>
|
|
@@ -5,7 +5,7 @@ import { Button } from '@theme/components/Button/Button';
|
|
|
5
5
|
import type { ReasonsProps } from '@theme/components/Feedback';
|
|
6
6
|
import { useTranslate } from '@portal/hooks';
|
|
7
7
|
|
|
8
|
-
export const Reasons = ({ settings, onSubmit }: ReasonsProps): JSX.Element => {
|
|
8
|
+
export const Reasons = ({ settings, onSubmit, className }: ReasonsProps): JSX.Element => {
|
|
9
9
|
const { label, multi, buttonText, items = [] } = settings;
|
|
10
10
|
const [checkedState, setCheckedState] = React.useState(new Array(items.length).fill(false));
|
|
11
11
|
const { translate } = useTranslate();
|
|
@@ -34,7 +34,11 @@ export const Reasons = ({ settings, onSubmit }: ReasonsProps): JSX.Element => {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
|
-
<Wrapper
|
|
37
|
+
<Wrapper
|
|
38
|
+
data-component-name="Feedback/Reasons"
|
|
39
|
+
data-translation-key={translationKeys.label}
|
|
40
|
+
className={className}
|
|
41
|
+
>
|
|
38
42
|
<Label>
|
|
39
43
|
{translate(
|
|
40
44
|
translationKeys.label,
|
|
@@ -6,7 +6,7 @@ import { Comment, Reasons } from '@theme/components/Feedback';
|
|
|
6
6
|
import { ThumbUp, ThumbDown } from '@theme/components/Feedback/Thumbs';
|
|
7
7
|
import { useTranslate } from '@portal/hooks';
|
|
8
8
|
|
|
9
|
-
export const Sentiment = ({ settings, onSubmit }: SentimentProps): JSX.Element => {
|
|
9
|
+
export const Sentiment = ({ settings, onSubmit, className }: SentimentProps): JSX.Element => {
|
|
10
10
|
const { label, submitText, comment: commentSettings, reasons: reasonsSettings } = settings || {};
|
|
11
11
|
const [score, setScore] = React.useState(0);
|
|
12
12
|
const [comment, setComment] = React.useState('');
|
|
@@ -65,7 +65,7 @@ export const Sentiment = ({ settings, onSubmit }: SentimentProps): JSX.Element =
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
|
-
<Wrapper data-component-name="Feedback/Sentiment">
|
|
68
|
+
<Wrapper data-component-name="Feedback/Sentiment" className={className}>
|
|
69
69
|
<Label data-translation-key={translationKeys.label}>
|
|
70
70
|
{translate(translationKeys.label, label || 'Was this page helpful?')}
|
|
71
71
|
</Label>
|
|
@@ -17,6 +17,7 @@ export type RatingProps = {
|
|
|
17
17
|
items: string[];
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
className?: string;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export type SentimentProps = {
|
|
@@ -36,6 +37,7 @@ export type SentimentProps = {
|
|
|
36
37
|
items: string[];
|
|
37
38
|
};
|
|
38
39
|
};
|
|
40
|
+
className?: string;
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
export type CommentProps = {
|
|
@@ -45,6 +47,7 @@ export type CommentProps = {
|
|
|
45
47
|
label?: string;
|
|
46
48
|
submitText?: string;
|
|
47
49
|
};
|
|
50
|
+
className?: string;
|
|
48
51
|
};
|
|
49
52
|
|
|
50
53
|
export type ReasonsProps = {
|
|
@@ -56,6 +59,7 @@ export type ReasonsProps = {
|
|
|
56
59
|
submitText?: string;
|
|
57
60
|
buttonText?: string;
|
|
58
61
|
};
|
|
62
|
+
className?: string;
|
|
59
63
|
};
|
|
60
64
|
|
|
61
65
|
export type ReportDialogProps = {
|
|
@@ -66,4 +70,5 @@ export type ReportDialogProps = {
|
|
|
66
70
|
label?: string;
|
|
67
71
|
};
|
|
68
72
|
submitFeedback: ({ type, values, path }: SubmitFeedbackParams) => Promise<void>;
|
|
73
|
+
className?: string;
|
|
69
74
|
};
|
|
@@ -7,15 +7,16 @@ import type { NavGroupRecord, ResolvedNavItem } from '@theme/types/portal';
|
|
|
7
7
|
|
|
8
8
|
interface FooterProps {
|
|
9
9
|
data: NavGroupRecord;
|
|
10
|
+
className?: string;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export function CustomFooter({ data }: FooterProps): JSX.Element | null {
|
|
13
|
+
export function CustomFooter({ data, className }: FooterProps): JSX.Element | null {
|
|
13
14
|
if (!data) {
|
|
14
15
|
return null;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
return (
|
|
18
|
-
<FooterContainer data-component-name="Footer/CustomFooter">
|
|
19
|
+
<FooterContainer data-component-name="Footer/CustomFooter" className={className}>
|
|
19
20
|
{(data.links as ResolvedNavItem[]).map((navItem, index) => {
|
|
20
21
|
return (
|
|
21
22
|
<CustomFooterNavItem
|
|
@@ -6,13 +6,14 @@ import type { ResolvedNavItem, ResolvedNavLinkItem } from '@theme/types/portal';
|
|
|
6
6
|
|
|
7
7
|
interface CustomFooterNavItemProps {
|
|
8
8
|
navItem: ResolvedNavItem;
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export function CustomFooterNavItem({ navItem }: CustomFooterNavItemProps): JSX.Element {
|
|
12
|
+
export function CustomFooterNavItem({ navItem, className }: CustomFooterNavItemProps): JSX.Element {
|
|
12
13
|
const item = navItem as ResolvedNavLinkItem;
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
|
-
<FooterItem data-component-name="Navbar/NavbarItem">
|
|
16
|
+
<FooterItem data-component-name="Navbar/NavbarItem" className={className}>
|
|
16
17
|
<FooterLink to={item.link}>
|
|
17
18
|
<FooterLabel>{item.label}</FooterLabel>
|
|
18
19
|
</FooterLink>
|
|
@@ -26,14 +26,16 @@ export function Footer(): JSX.Element | null {
|
|
|
26
26
|
interface FooterPresentationalComponentProps {
|
|
27
27
|
items: ResolvedNavItem[];
|
|
28
28
|
copyrightText: string;
|
|
29
|
+
className?: string;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export function FooterPresentationalComponent({
|
|
32
33
|
items,
|
|
33
34
|
copyrightText,
|
|
35
|
+
className,
|
|
34
36
|
}: FooterPresentationalComponentProps): JSX.Element | null {
|
|
35
37
|
return (
|
|
36
|
-
<FooterContainer data-component-name="Footer/Footer">
|
|
38
|
+
<FooterContainer data-component-name="Footer/Footer" className={className}>
|
|
37
39
|
<FooterColumns columns={items as ResolvedNavItem[]} />
|
|
38
40
|
<FooterCopyright copyrightText={copyrightText} />
|
|
39
41
|
</FooterContainer>
|
|
@@ -7,14 +7,15 @@ import { useTranslate } from '@portal/hooks';
|
|
|
7
7
|
|
|
8
8
|
interface FooterColumnProps {
|
|
9
9
|
column: ResolvedNavItem;
|
|
10
|
+
className?: string;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export function FooterColumn({ column }: FooterColumnProps): JSX.Element {
|
|
13
|
+
export function FooterColumn({ column, className }: FooterColumnProps): JSX.Element {
|
|
13
14
|
const { translate } = useTranslate();
|
|
14
15
|
const hasIcon = column.items ? column.items.some((item) => !!item.icon) : false;
|
|
15
16
|
|
|
16
17
|
return (
|
|
17
|
-
<FooterColumnContainer data-component-name="Footer/FooterColumn">
|
|
18
|
+
<FooterColumnContainer data-component-name="Footer/FooterColumn" className={className}>
|
|
18
19
|
<FooterColumnTitle withIconPadding={hasIcon}>
|
|
19
20
|
{translate(column.labelTranslationKey, column.label)}
|
|
20
21
|
</FooterColumnTitle>
|
|
@@ -6,15 +6,16 @@ import type { ResolvedNavItem } from '@theme/types/portal';
|
|
|
6
6
|
|
|
7
7
|
interface FooterColumnsProps {
|
|
8
8
|
columns: ResolvedNavItem[];
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export function FooterColumns({ columns }: FooterColumnsProps): JSX.Element | null {
|
|
12
|
+
export function FooterColumns({ columns, className }: FooterColumnsProps): JSX.Element | null {
|
|
12
13
|
if (!columns?.length) {
|
|
13
14
|
return null;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
return (
|
|
17
|
-
<FooterColumnsContainer data-component-name="Footer/FooterColumns">
|
|
18
|
+
<FooterColumnsContainer data-component-name="Footer/FooterColumns" className={className}>
|
|
18
19
|
<FooterRow>
|
|
19
20
|
{columns.map((column, index) => (
|
|
20
21
|
<FooterColumn key={`${column.label}_${index}`} column={column} />
|
|
@@ -5,15 +5,20 @@ import { useTranslate } from '@portal/hooks';
|
|
|
5
5
|
|
|
6
6
|
interface FooterCopyrightProps {
|
|
7
7
|
copyrightText: string;
|
|
8
|
+
className?: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
export function FooterCopyright({
|
|
11
|
+
export function FooterCopyright({
|
|
12
|
+
copyrightText = '',
|
|
13
|
+
className,
|
|
14
|
+
}: FooterCopyrightProps): JSX.Element | null {
|
|
11
15
|
const { translate } = useTranslate();
|
|
12
16
|
const translationKeys = {
|
|
13
17
|
copyrightText: 'theme.footer.copyrightText',
|
|
14
18
|
};
|
|
15
19
|
return copyrightText ? (
|
|
16
20
|
<Wrapper
|
|
21
|
+
className={className}
|
|
17
22
|
data-component-name="Footer/FooterCopyright"
|
|
18
23
|
data-translation-key={translationKeys.copyrightText}
|
|
19
24
|
>
|
|
@@ -18,6 +18,7 @@ export interface LastUpdatedProps {
|
|
|
18
18
|
lastModified: Date;
|
|
19
19
|
format?: keyof typeof FORMATS;
|
|
20
20
|
locale?: string;
|
|
21
|
+
className?: string;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export function LastUpdated(props: LastUpdatedProps): JSX.Element | null {
|
|
@@ -44,6 +45,7 @@ export function LastUpdated(props: LastUpdatedProps): JSX.Element | null {
|
|
|
44
45
|
|
|
45
46
|
return (
|
|
46
47
|
<Wrapper
|
|
48
|
+
className={props.className}
|
|
47
49
|
data-component-name="LastUpdated/LastUpdated"
|
|
48
50
|
rawOnPrint={format === 'timeago'}
|
|
49
51
|
data-print-datetime={isoDate}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
export const ContainerWrapper = styled.section.attrs(() => ({
|
|
3
|
+
export const ContainerWrapper = styled.section.attrs<{ className?: string }>(({ className }) => ({
|
|
4
4
|
'data-component-name': 'Markdown/ContainerWrapper',
|
|
5
|
+
className,
|
|
5
6
|
}))<{ withToc: boolean }>`
|
|
6
7
|
max-width: var(--md-container-max-width);
|
|
7
8
|
width: 90%;
|
|
@@ -9,9 +10,9 @@ export const ContainerWrapper = styled.section.attrs(() => ({
|
|
|
9
10
|
|
|
10
11
|
padding: var(--md-container-padding-vertical) var(--md-container-padding-horizontal);
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
// disable margin top for h1 on the title heading
|
|
14
|
-
|
|
13
|
+
article:first-child > h1:first-child {
|
|
14
|
+
// disable margin top for h1 on the title heading
|
|
15
|
+
margin-top: 0;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
@@ -16,11 +16,13 @@ export function Heading({
|
|
|
16
16
|
children,
|
|
17
17
|
'data-source': dataSource,
|
|
18
18
|
'data-hash': dataHash,
|
|
19
|
+
className,
|
|
19
20
|
}: PropsWithChildren<{
|
|
20
21
|
level: number;
|
|
21
22
|
id: string;
|
|
22
23
|
'data-source'?: string;
|
|
23
24
|
'data-hash'?: string;
|
|
25
|
+
className?: string;
|
|
24
26
|
}>): JSX.Element {
|
|
25
27
|
const linkEl = (
|
|
26
28
|
<a href={`#${id}`} className={concatClassNames('anchor', 'before')}>
|
|
@@ -32,7 +34,7 @@ export function Heading({
|
|
|
32
34
|
`h${level}`,
|
|
33
35
|
{
|
|
34
36
|
id,
|
|
35
|
-
className: concatClassNames('heading-anchor', mdClassName),
|
|
37
|
+
className: concatClassNames('heading-anchor', mdClassName, className),
|
|
36
38
|
'data-component-name': 'Markdown/Heading',
|
|
37
39
|
'data-source': dataSource,
|
|
38
40
|
'data-hash': dataHash,
|
|
@@ -24,6 +24,7 @@ type MarkdownLayoutProps = {
|
|
|
24
24
|
lastModified?: string | null;
|
|
25
25
|
nextPage?: ResolvedNavItemWithLink | null;
|
|
26
26
|
prevPage?: ResolvedNavItemWithLink | null;
|
|
27
|
+
className?: string;
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
export function MarkdownLayout({
|
|
@@ -34,6 +35,7 @@ export function MarkdownLayout({
|
|
|
34
35
|
lastModified,
|
|
35
36
|
nextPage,
|
|
36
37
|
prevPage,
|
|
38
|
+
className,
|
|
37
39
|
}: MarkdownLayoutProps): JSX.Element {
|
|
38
40
|
const { markdown } = useThemeConfig();
|
|
39
41
|
const { translate } = useTranslate();
|
|
@@ -45,7 +47,7 @@ export function MarkdownLayout({
|
|
|
45
47
|
const mergedConf = editPage ? { ...themeEditPage, ...editPage } : undefined;
|
|
46
48
|
|
|
47
49
|
return (
|
|
48
|
-
<PageWrapper data-component-name="Markdown/MarkdownLayout">
|
|
50
|
+
<PageWrapper data-component-name="Markdown/MarkdownLayout" className={className}>
|
|
49
51
|
<ContainerWrapper withToc={true}>
|
|
50
52
|
<Breadcrumbs />
|
|
51
53
|
<LayoutTop>
|