@redocly/theme 0.18.3-patch.0 → 0.18.3
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.d.ts +2 -7
- package/lib/I18n/LanguagePicker.js +3 -11
- package/lib/I18n/index.d.ts +0 -1
- package/lib/I18n/index.js +0 -15
- package/lib/components/Breadcrumbs/Breadcrumb.d.ts +1 -0
- package/lib/components/Breadcrumbs/Breadcrumb.js +3 -4
- package/lib/components/Breadcrumbs/Breadcrumbs.js +9 -2
- package/lib/components/Breadcrumbs/index.d.ts +0 -1
- package/lib/components/Breadcrumbs/index.js +0 -1
- package/lib/components/Button/Button.d.ts +3 -6
- package/lib/components/Button/Button.js +42 -40
- package/lib/components/Button/index.d.ts +0 -1
- package/lib/components/Button/index.js +0 -1
- package/lib/components/Catalog/Catalog.d.ts +0 -1
- package/lib/components/Catalog/Catalog.js +96 -99
- package/lib/components/Catalog/CatalogCard.js +58 -62
- package/lib/components/Catalog/index.d.ts +3 -4
- package/lib/components/Catalog/index.js +3 -4
- package/lib/components/Catalog/useCatalog.js +12 -1
- package/lib/components/CodeBlock/CodeBlockContainer.js +8 -35
- package/lib/components/CodeBlock/CodeBlockControlButton.d.ts +4 -3
- package/lib/components/CodeBlock/CodeBlockControlButton.js +19 -5
- package/lib/components/CodeBlock/CodeBlockControls.js +11 -10
- package/lib/components/CodeBlock/index.d.ts +0 -1
- package/lib/components/CodeBlock/index.js +0 -1
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +3 -0
- package/lib/components/Dropdown/Dropdown.d.ts +2 -7
- package/lib/components/Dropdown/Dropdown.js +4 -6
- package/lib/components/Dropdown/index.d.ts +0 -1
- package/lib/components/Dropdown/index.js +0 -1
- package/lib/components/EditPageButton/EditPageButton.js +2 -1
- package/lib/components/Feedback/Feedback.js +13 -3
- package/lib/components/Feedback/Reasons.js +1 -1
- package/lib/components/Feedback/Sentiment.js +6 -2
- package/lib/components/Feedback/Thumbs.js +4 -4
- package/lib/components/Filter/Filter.js +78 -101
- package/lib/components/Filter/index.d.ts +0 -2
- package/lib/components/Filter/index.js +0 -2
- package/lib/components/Footer/CustomFooterNavItem.js +1 -1
- package/lib/components/Footer/Footer.d.ts +3 -4
- package/lib/components/Footer/Footer.js +10 -27
- package/lib/components/Footer/FooterColumn.d.ts +3 -3
- package/lib/components/Footer/FooterColumn.js +64 -53
- package/lib/components/Footer/FooterColumns.js +4 -6
- package/lib/components/Footer/FooterCopyright.js +6 -11
- package/lib/components/Footer/index.d.ts +0 -1
- package/lib/components/Footer/index.js +0 -1
- package/lib/components/JsonViewer/JsonViewer.js +2 -2
- package/lib/components/Markdown/MarkdownWrapper.js +4 -2
- package/lib/components/Markdown/Mermaid.js +1 -1
- package/lib/components/Markdown/index.d.ts +0 -1
- package/lib/components/Markdown/index.js +0 -1
- package/lib/components/Menu/Menu.js +7 -5
- package/lib/components/Menu/MenuGroup.js +7 -12
- package/lib/components/Menu/MenuItemLabel.js +13 -7
- package/lib/components/Menu/MenuLinkItem.js +2 -1
- package/lib/components/Menu/MobileMenu.js +25 -20
- package/lib/components/Menu/MobileMenuGroup.js +1 -1
- package/lib/components/Menu/index.d.ts +0 -1
- package/lib/components/Menu/index.js +0 -1
- package/lib/components/{Profile → Navbar}/MobileUserProfile.js +28 -5
- package/lib/components/Navbar/Navbar.js +11 -10
- package/lib/components/Navbar/NavbarItem.d.ts +1 -1
- package/lib/components/Navbar/NavbarItem.js +6 -7
- package/lib/components/Navbar/NavbarMenu.js +2 -2
- package/lib/components/Navbar/index.d.ts +0 -1
- package/lib/components/Navbar/index.js +0 -1
- package/lib/components/NavbarLogo/NavbarLogo.d.ts +1 -4
- package/lib/components/NavbarLogo/NavbarLogo.js +6 -13
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.js +2 -2
- package/lib/components/OpenApiDocs/Dropdown.js +3 -3
- package/lib/components/OperationBadge/OperationBadge.d.ts +6 -0
- package/lib/components/OperationBadge/OperationBadge.js +68 -0
- package/lib/components/OperationBadge/index.d.ts +1 -0
- package/lib/{icons/ErrorIcon → components/OperationBadge}/index.js +1 -1
- package/lib/components/Panel/PanelHeader.js +0 -1
- package/lib/components/Panel/PanelHeaderTitle.js +4 -0
- package/lib/components/Panel/index.d.ts +0 -1
- package/lib/components/Panel/index.js +0 -1
- package/lib/components/Product/index.d.ts +0 -1
- package/lib/components/Product/index.js +0 -1
- package/lib/components/Profile/LoginLink.js +6 -2
- package/lib/components/Profile/Profile.js +22 -3
- package/lib/components/Profile/UserProfile.js +13 -21
- package/lib/components/Profile/index.d.ts +0 -1
- package/lib/components/Profile/index.js +0 -15
- package/lib/components/Search/CancelSearch.js +14 -2
- package/lib/components/Search/ProductTag.js +7 -7
- package/lib/components/Search/RecentSearches.js +5 -5
- package/lib/components/Search/Search.js +2 -0
- package/lib/components/Search/SearchIcon.js +2 -2
- package/lib/components/Search/SearchItem.js +4 -4
- package/lib/components/Search/SearchTrigger.js +5 -4
- package/lib/components/Search/ShortcutKey.js +5 -1
- package/lib/components/Search/SuggestedPages.js +3 -3
- package/lib/components/Search/index.d.ts +0 -1
- package/lib/components/Search/index.js +0 -1
- package/lib/components/Select/Select.d.ts +3 -10
- package/lib/components/Select/Select.js +6 -9
- package/lib/components/Select/index.d.ts +0 -1
- package/lib/components/Select/index.js +0 -1
- package/lib/components/Separator/SeparatorItem.js +5 -7
- package/lib/components/Sidebar/ApiCallItem.d.ts +6 -2
- package/lib/components/Sidebar/ApiCallItem.js +11 -13
- package/lib/components/Sidebar/FooterWrapper.js +4 -3
- package/lib/components/Sidebar/HeaderWrapper.js +2 -2
- package/lib/components/Sidebar/SidebarLayout.js +2 -1
- package/lib/components/Sidebar/VersionPicker.d.ts +1 -1
- package/lib/components/Sidebar/index.d.ts +0 -1
- package/lib/components/Sidebar/index.js +0 -1
- package/lib/components/SidebarActions/CollapseSidebarButton.js +1 -37
- package/lib/components/SidebarActions/SidebarActions.js +15 -3
- package/lib/components/SidebarActions/styled.js +14 -16
- package/lib/components/TableOfContent/TableOfContent.js +5 -3
- package/lib/components/TableOfContent/index.d.ts +0 -1
- package/lib/components/TableOfContent/index.js +0 -1
- package/lib/components/Tabs/Tab.js +1 -1
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tags/Tags.d.ts +5 -0
- package/lib/components/Tags/Tags.js +32 -0
- package/lib/components/Tags/index.d.ts +1 -0
- package/lib/components/{Image → Tags}/index.js +1 -1
- package/lib/components/Tiles/TileText.js +1 -1
- package/lib/components/Tooltip/index.d.ts +0 -1
- package/lib/components/Tooltip/index.js +0 -1
- package/lib/components/Typography/Typography.js +1 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +2 -1
- package/lib/config.d.ts +0 -6
- package/lib/config.js +0 -1
- package/lib/globalStyle.js +1967 -597
- package/lib/icons/ArrowIcon/ArrowIcon.js +1 -1
- package/lib/icons/CollapseIcon/CollapseIcon.d.ts +1 -1
- package/lib/icons/CollapseIcon/CollapseIcon.js +5 -5
- package/lib/icons/ColorModeIcon/ColorModeIcon.js +1 -1
- package/lib/icons/CopyIcon/CopyIcon.d.ts +2 -1
- package/lib/icons/CopyIcon/CopyIcon.js +4 -4
- package/lib/icons/DeselectIcon/DeselectIcon.d.ts +1 -1
- package/lib/icons/DeselectIcon/DeselectIcon.js +5 -5
- package/lib/icons/ExpandIcon/ExpandIcon.d.ts +2 -1
- package/lib/icons/ExpandIcon/ExpandIcon.js +5 -5
- package/lib/icons/FileIcon/FileIcon.d.ts +2 -1
- package/lib/icons/FileIcon/FileIcon.js +2 -2
- package/lib/icons/ReportIcon/ReportIcon.d.ts +2 -1
- package/lib/icons/ReportIcon/ReportIcon.js +3 -3
- package/lib/icons/SelectIcon/SelectIcon.d.ts +2 -1
- package/lib/icons/SelectIcon/SelectIcon.js +5 -5
- package/lib/icons/index.d.ts +0 -4
- package/lib/icons/index.js +0 -4
- package/lib/layouts/Forbidden.js +0 -4
- package/lib/layouts/NotFound.js +0 -4
- package/lib/types/portal/src/shared/types/nav.d.ts +0 -5
- package/lib/ui/Burger.js +1 -1
- package/lib/ui/Dropdown.js +7 -7
- package/lib/ui/Jumbotron.js +1 -1
- package/lib/ui/darkColors.js +84 -216
- package/package.json +2 -2
- package/src/I18n/LanguagePicker.tsx +4 -29
- package/src/I18n/index.ts +0 -1
- package/src/components/Breadcrumbs/Breadcrumb.tsx +9 -4
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +14 -2
- package/src/components/Breadcrumbs/index.ts +0 -1
- package/src/components/Button/Button.tsx +48 -52
- package/src/components/Button/index.ts +0 -1
- package/src/components/Catalog/Catalog.tsx +115 -127
- package/src/components/Catalog/CatalogCard.tsx +61 -75
- package/src/components/Catalog/index.tsx +3 -0
- package/src/components/Catalog/useCatalog.ts +13 -1
- package/src/components/CodeBlock/CodeBlockContainer.tsx +7 -14
- package/src/components/CodeBlock/CodeBlockControlButton.tsx +19 -6
- package/src/components/CodeBlock/CodeBlockControls.tsx +11 -9
- package/src/components/CodeBlock/index.ts +0 -1
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +4 -0
- package/src/components/Dropdown/Dropdown.tsx +4 -10
- package/src/components/Dropdown/index.ts +0 -1
- package/src/components/EditPageButton/EditPageButton.tsx +2 -1
- package/src/components/Feedback/Feedback.tsx +13 -3
- package/src/components/Feedback/Reasons.tsx +1 -1
- package/src/components/Feedback/Sentiment.tsx +10 -2
- package/src/components/Feedback/Thumbs.tsx +4 -4
- package/src/components/Filter/Filter.tsx +94 -127
- package/src/components/Filter/index.ts +0 -2
- package/src/components/Footer/CustomFooterNavItem.tsx +1 -1
- package/src/components/Footer/Footer.tsx +10 -32
- package/src/components/Footer/FooterColumn.tsx +64 -79
- package/src/components/Footer/FooterColumns.tsx +4 -6
- package/src/components/Footer/FooterCopyright.tsx +7 -13
- package/src/components/Footer/index.ts +0 -1
- package/src/components/JsonViewer/JsonViewer.tsx +2 -2
- package/src/components/Markdown/MarkdownWrapper.tsx +4 -2
- package/src/components/Markdown/Mermaid.tsx +1 -1
- package/src/components/Markdown/index.ts +0 -1
- package/src/components/Menu/Menu.tsx +7 -5
- package/src/components/Menu/MenuGroup.tsx +7 -15
- package/src/components/Menu/MenuItemLabel.tsx +13 -7
- package/src/components/Menu/MenuLinkItem.tsx +6 -1
- package/src/components/Menu/MobileMenu.tsx +25 -20
- package/src/components/Menu/MobileMenuGroup.tsx +1 -1
- package/src/components/Menu/index.ts +0 -1
- package/src/components/{Profile → Navbar}/MobileUserProfile.tsx +39 -5
- package/src/components/Navbar/Navbar.tsx +11 -10
- package/src/components/Navbar/NavbarItem.tsx +6 -6
- package/src/components/Navbar/NavbarMenu.tsx +2 -2
- package/src/components/Navbar/index.ts +0 -1
- package/src/components/NavbarLogo/NavbarLogo.tsx +12 -14
- package/src/components/OpenApiDocs/DevOnboardingTryItSecurity.tsx +2 -1
- package/src/components/OpenApiDocs/Dropdown.tsx +3 -3
- package/src/components/OperationBadge/OperationBadge.ts +62 -0
- package/src/components/OperationBadge/index.ts +1 -0
- package/src/components/Panel/PanelHeader.ts +0 -1
- package/src/components/Panel/PanelHeaderTitle.ts +4 -0
- package/src/components/Panel/index.ts +0 -1
- package/src/components/Product/index.ts +0 -1
- package/src/components/Profile/LoginLink.tsx +10 -2
- package/src/components/Profile/Profile.tsx +24 -1
- package/src/components/Profile/UserProfile.tsx +13 -21
- package/src/components/Profile/index.ts +0 -1
- package/src/components/Search/CancelSearch.tsx +15 -2
- package/src/components/Search/ProductTag.tsx +7 -7
- package/src/components/Search/RecentSearches.tsx +5 -5
- package/src/components/Search/Search.tsx +2 -0
- package/src/components/Search/SearchIcon.tsx +5 -10
- package/src/components/Search/SearchItem.tsx +4 -4
- package/src/components/Search/SearchTrigger.tsx +5 -4
- package/src/components/Search/ShortcutKey.tsx +5 -1
- package/src/components/Search/SuggestedPages.tsx +3 -3
- package/src/components/Search/index.ts +0 -1
- package/src/components/Select/Select.tsx +7 -20
- package/src/components/Select/index.ts +0 -1
- package/src/components/Separator/SeparatorItem.tsx +5 -7
- package/src/components/Sidebar/ApiCallItem.tsx +11 -13
- package/src/components/Sidebar/FooterWrapper.tsx +4 -3
- package/src/components/Sidebar/HeaderWrapper.tsx +2 -2
- package/src/components/Sidebar/SidebarLayout.tsx +6 -1
- package/src/components/Sidebar/index.ts +0 -1
- package/src/components/SidebarActions/CollapseSidebarButton.tsx +2 -18
- package/src/components/SidebarActions/SidebarActions.tsx +18 -3
- package/src/components/SidebarActions/styled.tsx +23 -16
- package/src/components/TableOfContent/TableOfContent.tsx +5 -2
- package/src/components/TableOfContent/index.ts +0 -1
- package/src/components/Tabs/Tab.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +1 -1
- package/src/components/Tags/Tags.tsx +36 -0
- package/src/components/Tags/index.ts +1 -0
- package/src/components/Tiles/TileText.tsx +1 -1
- package/src/components/Tooltip/index.ts +0 -1
- package/src/components/Typography/Typography.ts +1 -1
- package/src/components/index.ts +2 -1
- package/src/config.ts +0 -1
- package/src/globalStyle.ts +1976 -588
- package/src/icons/ArrowIcon/ArrowIcon.tsx +1 -1
- package/src/icons/CollapseIcon/CollapseIcon.tsx +5 -5
- package/src/icons/ColorModeIcon/ColorModeIcon.tsx +1 -1
- package/src/icons/CopyIcon/CopyIcon.tsx +5 -4
- package/src/icons/DeselectIcon/DeselectIcon.tsx +5 -5
- package/src/icons/ExpandIcon/ExpandIcon.tsx +6 -5
- package/src/icons/FileIcon/FileIcon.tsx +3 -2
- package/src/icons/ReportIcon/ReportIcon.tsx +4 -3
- package/src/icons/SelectIcon/SelectIcon.tsx +6 -5
- package/src/icons/index.ts +0 -4
- package/src/layouts/Forbidden.tsx +0 -4
- package/src/layouts/NotFound.tsx +0 -4
- package/src/types/portal/src/shared/types/nav.ts +0 -5
- package/src/ui/Burger.tsx +1 -1
- package/src/ui/Dropdown.tsx +7 -7
- package/src/ui/Jumbotron.tsx +1 -1
- package/src/ui/darkColors.tsx +84 -216
- package/lib/I18n/styledVariables.d.ts +0 -1
- package/lib/I18n/styledVariables.js +0 -39
- package/lib/components/Breadcrumbs/styledVariables.d.ts +0 -1
- package/lib/components/Breadcrumbs/styledVariables.js +0 -19
- package/lib/components/Button/styledVariables.d.ts +0 -1
- package/lib/components/Button/styledVariables.js +0 -94
- package/lib/components/Catalog/styledVariables.d.ts +0 -1
- package/lib/components/Catalog/styledVariables.js +0 -94
- package/lib/components/CodeBlock/styledVariables.d.ts +0 -1
- package/lib/components/CodeBlock/styledVariables.js +0 -90
- package/lib/components/Dropdown/styledVariables.d.ts +0 -1
- package/lib/components/Dropdown/styledVariables.js +0 -30
- package/lib/components/Filter/FilterContent.d.ts +0 -11
- package/lib/components/Filter/FilterContent.js +0 -50
- package/lib/components/Filter/FilterPopover.d.ts +0 -11
- package/lib/components/Filter/FilterPopover.js +0 -99
- package/lib/components/Filter/FilterTag.d.ts +0 -7
- package/lib/components/Filter/FilterTag.js +0 -33
- package/lib/components/Filter/FilterTags.d.ts +0 -7
- package/lib/components/Filter/FilterTags.js +0 -29
- package/lib/components/Filter/styledVariables.d.ts +0 -1
- package/lib/components/Filter/styledVariables.js +0 -112
- package/lib/components/Footer/styledVariables.d.ts +0 -1
- package/lib/components/Footer/styledVariables.js +0 -61
- package/lib/components/Image/Image.d.ts +0 -9
- package/lib/components/Image/Image.js +0 -31
- package/lib/components/Image/index.d.ts +0 -1
- package/lib/components/Markdown/styledVariables.d.ts +0 -2
- package/lib/components/Markdown/styledVariables.js +0 -221
- package/lib/components/Menu/styledVariables.d.ts +0 -2
- package/lib/components/Menu/styledVariables.js +0 -90
- package/lib/components/Navbar/styledVariables.d.ts +0 -1
- package/lib/components/Navbar/styledVariables.js +0 -40
- package/lib/components/Panel/styledVariables.d.ts +0 -2
- package/lib/components/Panel/styledVariables.js +0 -489
- package/lib/components/Product/styledVariables.d.ts +0 -2
- package/lib/components/Product/styledVariables.js +0 -41
- package/lib/components/Profile/UserProfileData.d.ts +0 -9
- package/lib/components/Profile/UserProfileData.js +0 -35
- package/lib/components/Profile/styledVariables.d.ts +0 -2
- package/lib/components/Profile/styledVariables.js +0 -55
- package/lib/components/Search/styledVariables.d.ts +0 -1
- package/lib/components/Search/styledVariables.js +0 -98
- package/lib/components/Select/styledVariables.d.ts +0 -1
- package/lib/components/Select/styledVariables.js +0 -33
- package/lib/components/Sidebar/styledVariables.d.ts +0 -2
- package/lib/components/Sidebar/styledVariables.js +0 -210
- package/lib/components/TableOfContent/styledVariables.d.ts +0 -1
- package/lib/components/TableOfContent/styledVariables.js +0 -46
- package/lib/components/Tag/Tag.d.ts +0 -16
- package/lib/components/Tag/Tag.js +0 -39
- package/lib/components/Tag/index.d.ts +0 -2
- package/lib/components/Tag/index.js +0 -19
- package/lib/components/Tag/styledVariables.d.ts +0 -1
- package/lib/components/Tag/styledVariables.js +0 -130
- package/lib/components/Tooltip/styledVariables.d.ts +0 -1
- package/lib/components/Tooltip/styledVariables.js +0 -21
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +0 -6
- package/lib/icons/CheckboxIcon/CheckboxIcon.js +0 -28
- package/lib/icons/CheckboxIcon/index.d.ts +0 -1
- package/lib/icons/CheckboxIcon/index.js +0 -6
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +0 -4
- package/lib/icons/ErrorIcon/ErrorIcon.js +0 -14
- package/lib/icons/ErrorIcon/index.d.ts +0 -1
- package/lib/icons/LanguageIcon/LanguageIcon.d.ts +0 -4
- package/lib/icons/LanguageIcon/LanguageIcon.js +0 -14
- package/lib/icons/LanguageIcon/index.d.ts +0 -1
- package/lib/icons/LanguageIcon/index.js +0 -18
- package/lib/icons/PlusIcon/PlusIcon.d.ts +0 -5
- package/lib/icons/PlusIcon/PlusIcon.js +0 -16
- package/lib/icons/PlusIcon/index.d.ts +0 -1
- package/lib/icons/PlusIcon/index.js +0 -18
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.d.ts +0 -4
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.js +0 -15
- package/lib/icons/PointingArrowIcon/index.d.ts +0 -1
- package/lib/icons/PointingArrowIcon/index.js +0 -18
- package/src/I18n/styledVariables.ts +0 -36
- package/src/components/Breadcrumbs/styledVariables.ts +0 -16
- package/src/components/Button/styledVariables.ts +0 -91
- package/src/components/Catalog/index.ts +0 -4
- package/src/components/Catalog/styledVariables.ts +0 -91
- package/src/components/CodeBlock/styledVariables.ts +0 -87
- package/src/components/Dropdown/styledVariables.ts +0 -27
- package/src/components/Filter/FilterContent.tsx +0 -75
- package/src/components/Filter/FilterPopover.tsx +0 -132
- package/src/components/Filter/FilterTag.tsx +0 -37
- package/src/components/Filter/FilterTags.tsx +0 -39
- package/src/components/Filter/styledVariables.ts +0 -109
- package/src/components/Footer/styledVariables.ts +0 -58
- package/src/components/Image/Image.tsx +0 -47
- package/src/components/Image/index.ts +0 -1
- package/src/components/Markdown/styledVariables.ts +0 -219
- package/src/components/Menu/styledVariables.ts +0 -88
- package/src/components/Navbar/styledVariables.ts +0 -37
- package/src/components/Panel/styledVariables.ts +0 -487
- package/src/components/Product/styledVariables.ts +0 -39
- package/src/components/Profile/UserProfileData.tsx +0 -40
- package/src/components/Profile/styledVariables.ts +0 -53
- package/src/components/Search/styledVariables.ts +0 -95
- package/src/components/Select/styledVariables.ts +0 -30
- package/src/components/Sidebar/styledVariables.ts +0 -208
- package/src/components/TableOfContent/styledVariables.ts +0 -43
- package/src/components/Tag/Tag.tsx +0 -62
- package/src/components/Tag/index.ts +0 -2
- package/src/components/Tag/styledVariables.ts +0 -127
- package/src/components/Tooltip/styledVariables.ts +0 -18
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +0 -64
- package/src/icons/CheckboxIcon/index.ts +0 -1
- package/src/icons/ErrorIcon/ErrorIcon.tsx +0 -15
- package/src/icons/ErrorIcon/index.ts +0 -1
- package/src/icons/LanguageIcon/LanguageIcon.tsx +0 -15
- package/src/icons/LanguageIcon/index.ts +0 -1
- package/src/icons/PlusIcon/PlusIcon.tsx +0 -19
- package/src/icons/PlusIcon/index.ts +0 -1
- package/src/icons/PointingArrowIcon/PointingArrowIcon.tsx +0 -16
- package/src/icons/PointingArrowIcon/index.ts +0 -1
- /package/lib/components/{Profile → Navbar}/MobileUserProfile.d.ts +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { Link } from '@portal/Link';
|
|
5
5
|
import type { ResolvedNavItem } from '@theme/types/portal';
|
|
6
6
|
import { useTranslate } from '@portal/hooks';
|
|
7
|
-
import {
|
|
7
|
+
import { telemetry } from '@portal/telemetry';
|
|
8
8
|
|
|
9
9
|
interface FooterColumnProps {
|
|
10
10
|
column: ResolvedNavItem;
|
|
@@ -13,57 +13,52 @@ interface FooterColumnProps {
|
|
|
13
13
|
|
|
14
14
|
export function FooterColumn({ column, className }: FooterColumnProps): JSX.Element {
|
|
15
15
|
const { translate } = useTranslate();
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const iconsOnly = items.every((item) => item.label === item.link && (item.icon || item.srcSet));
|
|
16
|
+
const hasIcon = column.items ? column.items.some((item) => !!item.icon) : false;
|
|
19
17
|
|
|
20
18
|
return (
|
|
21
19
|
<FooterColumnContainer data-component-name="Footer/FooterColumn" className={className}>
|
|
22
|
-
<FooterColumnTitle
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</FooterLink>
|
|
49
|
-
);
|
|
50
|
-
})}
|
|
51
|
-
</FooterColumnItems>
|
|
20
|
+
<FooterColumnTitle withIconPadding={hasIcon}>
|
|
21
|
+
{translate(column.labelTranslationKey, column.label)}
|
|
22
|
+
</FooterColumnTitle>
|
|
23
|
+
{column?.items?.map((columnItem, columnItemIndex) => {
|
|
24
|
+
if (columnItem.type === 'error') {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return columnItem.type === 'separator' ? (
|
|
29
|
+
<FooterSeparator key={columnItem.label + '_' + columnItemIndex}>
|
|
30
|
+
{translate(columnItem.labelTranslationKey, columnItem.label)}
|
|
31
|
+
</FooterSeparator>
|
|
32
|
+
) : (
|
|
33
|
+
<FooterLink
|
|
34
|
+
key={columnItemIndex}
|
|
35
|
+
to={columnItem.link}
|
|
36
|
+
external={columnItem.external}
|
|
37
|
+
target={columnItem.target}
|
|
38
|
+
data-cy={columnItem.label}
|
|
39
|
+
onClick={() => telemetry.send('footer_item_clicked', {})}
|
|
40
|
+
>
|
|
41
|
+
<FooterLinkIcon url={columnItem.icon} withIconPadding={hasIcon} />
|
|
42
|
+
{translate(columnItem.labelTranslationKey, columnItem.label)}
|
|
43
|
+
</FooterLink>
|
|
44
|
+
);
|
|
45
|
+
})}
|
|
52
46
|
</FooterColumnContainer>
|
|
53
47
|
);
|
|
54
48
|
}
|
|
55
49
|
|
|
56
|
-
const FooterColumnTitle = styled.p
|
|
50
|
+
const FooterColumnTitle = styled.p<{ withIconPadding: boolean }>`
|
|
57
51
|
display: inline-block;
|
|
58
52
|
font-weight: var(--footer-title-font-weight);
|
|
59
53
|
font-size: var(--footer-title-font-size);
|
|
60
|
-
margin-
|
|
61
|
-
|
|
54
|
+
margin-bottom: var(--footer-title-margin-vertical);
|
|
55
|
+
${({ withIconPadding }) =>
|
|
56
|
+
withIconPadding &&
|
|
57
|
+
css`
|
|
58
|
+
padding-left: calc(var(--footer-item-icon-width) + var(--footer-item-icon-margin-right));
|
|
59
|
+
`}
|
|
60
|
+
font-family: var(--footer-font-family);
|
|
62
61
|
color: var(--footer-title-text-color);
|
|
63
|
-
|
|
64
|
-
${({ theme }) => theme.mediaQueries.small} {
|
|
65
|
-
margin-bottom: var(--footer-title-margin-bottom);
|
|
66
|
-
}
|
|
67
62
|
`;
|
|
68
63
|
|
|
69
64
|
const FooterSeparator = styled.div`
|
|
@@ -71,56 +66,46 @@ const FooterSeparator = styled.div`
|
|
|
71
66
|
margin: 10px 0 5px 0;
|
|
72
67
|
font-size: 0.75em;
|
|
73
68
|
text-transform: uppercase;
|
|
69
|
+
font-family: var(--footer-font-family);
|
|
74
70
|
`;
|
|
75
71
|
|
|
76
72
|
const FooterColumnContainer = styled.div`
|
|
77
73
|
display: flex;
|
|
78
74
|
flex-direction: column;
|
|
79
|
-
text-align:
|
|
75
|
+
text-align: left;
|
|
76
|
+
margin: var(--footer-column-margin-horizontal) var(--footer-column-margin-vertical);
|
|
77
|
+
width: var(--footer-column-width);
|
|
80
78
|
word-break: break-word;
|
|
81
|
-
flex: 1;
|
|
82
|
-
margin: 0 0 var(--mobile-footer-column-margin-bottom) 0;
|
|
83
|
-
min-width: var(--footer-column-min-width);
|
|
84
|
-
|
|
85
|
-
${({ theme }) => theme.mediaQueries.small} {
|
|
86
|
-
text-align: left;
|
|
87
|
-
margin: 0 var(--footer-column-margin-horizontal);
|
|
88
|
-
border-right: 1px solid var(--footer-dividing-border-color);
|
|
89
|
-
margin-bottom: var(--footer-column-margin-bottom);
|
|
90
|
-
}
|
|
91
79
|
`;
|
|
92
80
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
height: var(--footer-item-icon-height);
|
|
97
|
-
margin-right: var(--footer-item-icon-margin-right);
|
|
98
|
-
vertical-align: middle;
|
|
99
|
-
border: 1px solid var(--footer-item-icon-border-color);
|
|
100
|
-
border-radius: var(--footer-item-icon-border-radius);
|
|
101
|
-
padding: var(--footer-item-icon-padding);
|
|
102
|
-
`;
|
|
103
|
-
|
|
104
|
-
const FooterLink = styled(Link)<{ iconsOnly: boolean }>`
|
|
105
|
-
padding: var(--footer-link-padding-vertical) var(--footer-link-padding-horizontal);
|
|
81
|
+
const FooterLink = styled(Link)`
|
|
82
|
+
font-weight: var(--font-weight-bold);
|
|
83
|
+
padding: var(--footer-item-padding-vertical) var(--footer-item-padding-horizontal);
|
|
106
84
|
color: var(--footer-link-text-color);
|
|
107
85
|
text-decoration: none;
|
|
108
86
|
&:hover {
|
|
109
87
|
color: var(--footer-link-hover-color);
|
|
110
88
|
}
|
|
111
|
-
|
|
112
|
-
&:last-child ${FooterLinkIcon} {
|
|
113
|
-
margin-right: ${({ iconsOnly }) => (iconsOnly ? '0' : 'var(--footer-item-icon-margin-right)')};
|
|
114
|
-
}
|
|
115
89
|
`;
|
|
116
90
|
|
|
117
|
-
export const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
91
|
+
export const FooterLinkIcon = styled.i<{ url?: string; withIconPadding: boolean }>`
|
|
92
|
+
${({ withIconPadding, url }) =>
|
|
93
|
+
withIconPadding &&
|
|
94
|
+
!url &&
|
|
95
|
+
css`
|
|
96
|
+
padding-left: calc(var(--footer-item-icon-width) + var(--footer-item-icon-margin-right));
|
|
97
|
+
`}
|
|
98
|
+
${({ url }) =>
|
|
99
|
+
url &&
|
|
100
|
+
css`
|
|
101
|
+
background-image: url('${url}');
|
|
102
|
+
background-size: contain;
|
|
103
|
+
background-position: center;
|
|
104
|
+
background-repeat: no-repeat;
|
|
105
|
+
width: var(--footer-item-icon-width);
|
|
106
|
+
height: var(--footer-item-icon-height);
|
|
107
|
+
display: inline-block;
|
|
108
|
+
margin-right: var(--footer-item-icon-margin-right);
|
|
109
|
+
vertical-align: middle;
|
|
110
|
+
`}
|
|
126
111
|
`;
|
|
@@ -26,15 +26,15 @@ export function FooterColumns({ columns, className }: FooterColumnsProps): JSX.E
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export const FooterColumnsContainer = styled.div`
|
|
29
|
+
padding: var(--footer-padding-vertical) var(--footer-padding-horizontal);
|
|
29
30
|
display: flex;
|
|
30
31
|
flex-direction: column;
|
|
31
32
|
justify-content: center;
|
|
32
33
|
max-width: var(--footer-container-max-width);
|
|
33
|
-
margin: 0;
|
|
34
|
-
flex: 1;
|
|
34
|
+
margin: 0 auto;
|
|
35
35
|
|
|
36
36
|
${({ theme }) => theme.mediaQueries.small} {
|
|
37
|
-
|
|
37
|
+
padding: 5.625em 20px 3.9375em 20px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
${({ theme }) => theme.mediaQueries.print} {
|
|
@@ -47,10 +47,8 @@ export const FooterRow = styled.div`
|
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-wrap: wrap;
|
|
49
49
|
justify-content: flex-start;
|
|
50
|
-
flex-direction: column;
|
|
51
50
|
|
|
52
51
|
${({ theme }) => theme.mediaQueries.small} {
|
|
53
|
-
justify-content: space-
|
|
54
|
-
flex-direction: row;
|
|
52
|
+
justify-content: space-evenly;
|
|
55
53
|
}
|
|
56
54
|
`;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { LanguagePicker } from '@theme';
|
|
4
3
|
|
|
5
|
-
import {
|
|
4
|
+
import { useTranslate } from '@portal/hooks';
|
|
6
5
|
|
|
7
6
|
interface FooterCopyrightProps {
|
|
8
7
|
copyrightText: string;
|
|
@@ -14,8 +13,6 @@ export function FooterCopyright({
|
|
|
14
13
|
className,
|
|
15
14
|
}: FooterCopyrightProps): JSX.Element | null {
|
|
16
15
|
const { translate } = useTranslate();
|
|
17
|
-
const { changeLanguage } = useI18n();
|
|
18
|
-
|
|
19
16
|
const translationKeys = {
|
|
20
17
|
copyrightText: 'theme.footer.copyrightText',
|
|
21
18
|
};
|
|
@@ -25,24 +22,21 @@ export function FooterCopyright({
|
|
|
25
22
|
data-component-name="Footer/FooterCopyright"
|
|
26
23
|
data-translation-key={translationKeys.copyrightText}
|
|
27
24
|
>
|
|
28
|
-
|
|
29
|
-
<LanguagePicker onChangeLanguage={changeLanguage} placement="top" alignment="end" />
|
|
25
|
+
{translate(translationKeys.copyrightText, copyrightText)}
|
|
30
26
|
</Wrapper>
|
|
31
27
|
) : null;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
const Wrapper = styled.section`
|
|
35
31
|
display: flex;
|
|
36
|
-
justify-content:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
justify-content: center;
|
|
33
|
+
font-size: 0.875em;
|
|
34
|
+
padding: 1.5em 3em;
|
|
35
|
+
font-weight: var(--font-weight-bold);
|
|
40
36
|
background-color: var(--footer-background-color);
|
|
41
37
|
color: var(--footer-text-color);
|
|
42
|
-
text-align:
|
|
38
|
+
text-align: center;
|
|
43
39
|
span {
|
|
44
40
|
max-width: var(--footer-container-max-width);
|
|
45
41
|
}
|
|
46
42
|
`;
|
|
47
|
-
|
|
48
|
-
const Label = styled.div``;
|
|
@@ -2,4 +2,3 @@ export * from '@theme/components/Footer/Footer';
|
|
|
2
2
|
export * from '@theme/components/Footer/FooterColumn';
|
|
3
3
|
export * from '@theme/components/Footer/FooterColumns';
|
|
4
4
|
export * from '@theme/components/Footer/FooterCopyright';
|
|
5
|
-
export * from '@theme/components/Footer/styledVariables';
|
|
@@ -108,7 +108,7 @@ export const JsonViewer = styled(Json).attrs(() => ({
|
|
|
108
108
|
}))<JsonProps>`
|
|
109
109
|
.redoc-json code {
|
|
110
110
|
background-color: var(--panel-samples-code-block-background-color);
|
|
111
|
-
color: var(--text-
|
|
111
|
+
color: var(--text-color-inverse);
|
|
112
112
|
padding: inherit;
|
|
113
113
|
border: none;
|
|
114
114
|
}
|
|
@@ -175,7 +175,7 @@ export const JsonViewer = styled(Json).attrs(() => ({
|
|
|
175
175
|
background-color: transparent;
|
|
176
176
|
border: 0;
|
|
177
177
|
padding: 1px;
|
|
178
|
-
color:
|
|
178
|
+
color: #fff;
|
|
179
179
|
width: var(--size);
|
|
180
180
|
height: var(--size);
|
|
181
181
|
margin-left: calc((var(--size) + var(--margin-right)) * -1);
|
|
@@ -149,7 +149,7 @@ export const MarkdownWrapper = styled.main.attrs<{
|
|
|
149
149
|
font-weight: var(--font-weight-regular);
|
|
150
150
|
padding: 0;
|
|
151
151
|
|
|
152
|
-
color: var(--text-
|
|
152
|
+
color: var(--text-color);
|
|
153
153
|
font-size: var(--font-size-base);
|
|
154
154
|
font-family: var(--font-family-base);
|
|
155
155
|
line-height: var(--line-height-base);
|
|
@@ -207,7 +207,7 @@ export const MarkdownWrapper = styled.main.attrs<{
|
|
|
207
207
|
margin: 1.125em 0;
|
|
208
208
|
|
|
209
209
|
summary {
|
|
210
|
-
color: var(--text-
|
|
210
|
+
color: var(--text-color);
|
|
211
211
|
font-weight: var(--font-weight-regular);
|
|
212
212
|
outline: 0;
|
|
213
213
|
padding: 0;
|
|
@@ -317,6 +317,8 @@ export const MarkdownWrapper = styled.main.attrs<{
|
|
|
317
317
|
padding: calc(var(--spacing-unit) * 2);
|
|
318
318
|
overflow-x: auto;
|
|
319
319
|
line-height: normal;
|
|
320
|
+
border-radius: var(--code-block-border-radius);
|
|
321
|
+
border: 1px solid var(--code-block-border-color);
|
|
320
322
|
|
|
321
323
|
code {
|
|
322
324
|
background-color: transparent;
|
|
@@ -7,4 +7,3 @@ export * from '@theme/components/Markdown/MarkdownWrapper';
|
|
|
7
7
|
export * from '@theme/components/Markdown/Mermaid';
|
|
8
8
|
export * from '@theme/components/Markdown/PageWrapper';
|
|
9
9
|
export * from '@theme/components/Markdown/Sup';
|
|
10
|
-
export * from '@theme/components/Markdown/styledVariables';
|
|
@@ -39,9 +39,11 @@ export function Menu({ depth = 0, items, className, isMobile }: MenuListProps) {
|
|
|
39
39
|
export const ThemeMenu = styled.ul.attrs(() => ({
|
|
40
40
|
'data-component-name': 'Menu/Menu',
|
|
41
41
|
}))`
|
|
42
|
-
padding:
|
|
43
|
-
margin:
|
|
44
|
-
list-style:
|
|
45
|
-
color: var(--
|
|
46
|
-
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin: 0;
|
|
44
|
+
list-style: none;
|
|
45
|
+
color: var(--sidebar-item-text-color);
|
|
46
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
47
49
|
`;
|
|
@@ -49,13 +49,10 @@ export function MenuGroup({
|
|
|
49
49
|
isAlwaysExpanded={item.expanded === 'always'}
|
|
50
50
|
active={item.active}
|
|
51
51
|
role={!item.link ? 'link' : 'none'}
|
|
52
|
-
expanded={isExpanded}
|
|
53
52
|
>
|
|
53
|
+
{!!item.items.length && <MenuGroupArrow direction={isExpanded ? 'down' : 'right'} />}
|
|
54
54
|
{item.icon ? <SidebarItemIcon src={item.icon} /> : null}
|
|
55
55
|
{translate(item.labelTranslationKey, item.label)}
|
|
56
|
-
{!!item.items.length && (
|
|
57
|
-
<ArrowIcon direction={isExpanded ? 'down' : 'right'} weight="thin" />
|
|
58
|
-
)}
|
|
59
56
|
</MenuGroupLabel>
|
|
60
57
|
</MenuLinkItem>
|
|
61
58
|
|
|
@@ -79,7 +76,7 @@ const MenuWrapper = styled.div<{ isExpanded?: boolean }>`
|
|
|
79
76
|
transition: max-height .8s cubic-bezier(0, 1, 0, 1) -.1s;`};
|
|
80
77
|
`;
|
|
81
78
|
|
|
82
|
-
const MenuGroupLabel = styled(MenuItemLabel)<{ isAlwaysExpanded?: boolean
|
|
79
|
+
const MenuGroupLabel = styled(MenuItemLabel)<{ isAlwaysExpanded?: boolean }>`
|
|
83
80
|
padding-left: var(--sidebar-item-padding-horizontal);
|
|
84
81
|
cursor: ${(props) => (props.isAlwaysExpanded ? 'default' : 'pointer')};
|
|
85
82
|
font-family: var(--sidebar-item-group-font-family);
|
|
@@ -87,18 +84,13 @@ const MenuGroupLabel = styled(MenuItemLabel)<{ isAlwaysExpanded?: boolean; expan
|
|
|
87
84
|
text-transform: var(--sidebar-text-group-transform);
|
|
88
85
|
color: var(--sidebar-item-group-text-color);
|
|
89
86
|
background: var(--sidebar-item-group-background-color);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
${({ active }) =>
|
|
94
|
-
active
|
|
87
|
+
${(props) =>
|
|
88
|
+
props.active
|
|
95
89
|
? `color: var(--sidebar-item-group-active-text-color);
|
|
96
90
|
background-color: var(--sidebar-item-group-active-background-color);`
|
|
97
91
|
: null};
|
|
92
|
+
`;
|
|
98
93
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
`
|
|
102
|
-
color: var(--sidebar-item-group-active-text-color);
|
|
103
|
-
`}
|
|
94
|
+
const MenuGroupArrow = styled(ArrowIcon)`
|
|
95
|
+
margin-right: calc(var(--sidebar-spacing-unit) / 2);
|
|
104
96
|
`;
|
|
@@ -5,24 +5,29 @@ export const MenuItemLabel = styled.li.attrs<{ className?: string }>(({ classNam
|
|
|
5
5
|
className,
|
|
6
6
|
}))<{ active?: boolean }>`
|
|
7
7
|
display: flex;
|
|
8
|
-
align-items:
|
|
8
|
+
align-items: center;
|
|
9
9
|
cursor: pointer;
|
|
10
|
-
transition:
|
|
11
|
-
word-break:
|
|
10
|
+
transition: background-color 0.3s, color 0.3s;
|
|
11
|
+
word-break: break-word;
|
|
12
|
+
margin-bottom: 1px;
|
|
12
13
|
|
|
13
14
|
background-color: var(--sidebar-item-background-color);
|
|
14
15
|
font-family: var(--sidebar-item-font-family);
|
|
15
16
|
font-size: var(--sidebar-item-font-size);
|
|
16
|
-
font-weight: var(--
|
|
17
|
-
margin: var(--
|
|
18
|
-
padding: var(--
|
|
17
|
+
font-weight: var(--font-weight-regular);
|
|
18
|
+
margin-left: var(--sidebar-offset-left);
|
|
19
|
+
padding: var(--sidebar-item-padding-vertical) var(--sidebar-item-padding-horizontal);
|
|
20
|
+
padding-left: calc(
|
|
21
|
+
var(--sidebar-item-padding-horizontal) + var(--sidebar-group-item-chevron-size) +
|
|
22
|
+
var(--sidebar-spacing-unit) * 0.5
|
|
23
|
+
);
|
|
19
24
|
border-radius: var(--sidebar-item-border-radius);
|
|
20
25
|
|
|
21
26
|
${({ active, theme }) =>
|
|
22
27
|
active &&
|
|
23
28
|
`
|
|
24
29
|
color: var(--mobile-menu-item-active-text-color);
|
|
25
|
-
background-color: var(--mobile-menu-item-active-
|
|
30
|
+
background-color: var(--mobile-menu-item-active-color);
|
|
26
31
|
|
|
27
32
|
${theme.mediaQueries.medium} {
|
|
28
33
|
color: var(--sidebar-item-active-color);
|
|
@@ -35,6 +40,7 @@ export const MenuItemLabel = styled.li.attrs<{ className?: string }>(({ classNam
|
|
|
35
40
|
|
|
36
41
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
37
42
|
color: var(--sidebar-item-hover-color);
|
|
43
|
+
background-color: var(--sidebar-item-hover-background-color);
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
|
|
@@ -3,6 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { MenuLink } from '@theme/components/Menu/MenuLink';
|
|
5
5
|
import type { MenuItemProps } from '@theme/components/Sidebar/types';
|
|
6
|
+
import { telemetry } from '@portal/telemetry';
|
|
6
7
|
|
|
7
8
|
export function MenuLinkItem({
|
|
8
9
|
item,
|
|
@@ -10,7 +11,11 @@ export function MenuLinkItem({
|
|
|
10
11
|
className,
|
|
11
12
|
}: React.PropsWithChildren<MenuItemProps>): JSX.Element {
|
|
12
13
|
return (
|
|
13
|
-
<Wrapper
|
|
14
|
+
<Wrapper
|
|
15
|
+
data-component-name="Sidebar/MenuLinkItem"
|
|
16
|
+
className={className}
|
|
17
|
+
onClick={() => telemetry.send('sidebar_item_clicked', { label: item.label, type: item.type })}
|
|
18
|
+
>
|
|
14
19
|
{item.link ? (
|
|
15
20
|
<MenuLink to={item.link} {...item}>
|
|
16
21
|
{children}
|
|
@@ -5,7 +5,7 @@ import styled from 'styled-components';
|
|
|
5
5
|
import type { MobileMenuProps } from '@theme/components/Menu/types';
|
|
6
6
|
import { MenuType } from '@theme/components/Menu/constants';
|
|
7
7
|
import { Menu, MenuItemLabel } from '@theme/components/Menu/index';
|
|
8
|
-
import { MobileUserProfile } from '@theme/components/
|
|
8
|
+
import { MobileUserProfile } from '@theme/components/Navbar/MobileUserProfile';
|
|
9
9
|
import { useCurrentProduct } from '@portal/hooks';
|
|
10
10
|
import { ArrowIcon } from '@theme/icons';
|
|
11
11
|
import { Product } from '@theme/components/Product/Product';
|
|
@@ -71,17 +71,17 @@ export function MobileMenu({ className }: MobileMenuProps): JSX.Element | null {
|
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
const MobileMenuWrapper = styled.div`
|
|
74
|
-
height: var(--
|
|
75
|
-
width:
|
|
74
|
+
height: calc(100vh - var(--navbar-height));
|
|
75
|
+
width: 100%;
|
|
76
76
|
position: fixed;
|
|
77
|
-
z-index: var(--
|
|
78
|
-
left:
|
|
79
|
-
top: var(--
|
|
77
|
+
z-index: var(--z-index-raised);
|
|
78
|
+
left: 0;
|
|
79
|
+
top: var(--navbar-height);
|
|
80
80
|
overflow-x: hidden;
|
|
81
|
-
transition:
|
|
81
|
+
transition: 0.5s;
|
|
82
82
|
display: flex;
|
|
83
83
|
flex-direction: column;
|
|
84
|
-
background: var(--mobile-menu-
|
|
84
|
+
background: var(--mobile-menu-background);
|
|
85
85
|
|
|
86
86
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
87
87
|
display: none;
|
|
@@ -102,23 +102,27 @@ const ScrollableArea = styled.div`
|
|
|
102
102
|
`;
|
|
103
103
|
|
|
104
104
|
const MenuWrapper = styled.div`
|
|
105
|
-
margin: var(--mobile-menu-margin);
|
|
106
|
-
|
|
105
|
+
margin: 0 var(--mobile-menu-horizontal-margin);
|
|
106
|
+
margin-top: var(--mobile-menu-items-margin-top);
|
|
107
|
+
line-height: 22px;
|
|
107
108
|
background: var(--mobile-menu-background);
|
|
108
109
|
|
|
109
110
|
${MenuItemLabel} {
|
|
110
|
-
margin:
|
|
111
|
+
margin: 0;
|
|
111
112
|
border-radius: var(--mobile-menu-item-radius);
|
|
113
|
+
padding-left: var(--sidebar-item-padding-horizontal);
|
|
112
114
|
}
|
|
113
115
|
`;
|
|
114
116
|
|
|
115
117
|
export const ControlButton = styled.li`
|
|
116
118
|
display: inline-block;
|
|
117
|
-
padding: var(--mobile-menu-control-button-padding)
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
padding: var(--mobile-menu-control-button-padding-vertical)
|
|
120
|
+
var(--mobile-menu-control-button-padding-horizontal);
|
|
121
|
+
margin: var(--mobile-menu-control-button-margin-vertical)
|
|
122
|
+
var(--mobile-menu-control-button-margin-horizontal);
|
|
123
|
+
text-align: center;
|
|
120
124
|
font-size: var(--mobile-menu-control-button-font-size);
|
|
121
|
-
line-height:
|
|
125
|
+
line-height: 22px;
|
|
122
126
|
font-weight: var(--mobile-menu-control-button-weight);
|
|
123
127
|
color: var(--mobile-menu-control-button-color);
|
|
124
128
|
cursor: pointer;
|
|
@@ -143,9 +147,10 @@ const ControlButtonLabel = styled.span<{ paddingDirection: 'right' | 'left' }>`
|
|
|
143
147
|
`;
|
|
144
148
|
|
|
145
149
|
const ProductNameWrapper = styled.div`
|
|
146
|
-
color: var(--menu-
|
|
147
|
-
border-radius: var(--menu-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
color: var(--mobile-menu-item-text-color);
|
|
151
|
+
border-radius: var(--mobile-menu-item-radius);
|
|
152
|
+
padding-left: var(--sidebar-item-padding-horizontal);
|
|
153
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
154
|
+
padding: 8px 7px;
|
|
155
|
+
margin: 12px 8px 0 8px;
|
|
151
156
|
`;
|
|
@@ -66,7 +66,7 @@ const MenuGroupLabel = styled(MenuItemLabel)<{ active?: boolean; expanded?: bool
|
|
|
66
66
|
active &&
|
|
67
67
|
`
|
|
68
68
|
color: var(--mobile-menu-item-active-text-color);
|
|
69
|
-
background-color: var(--mobile-menu-item-active-
|
|
69
|
+
background-color: var(--mobile-menu-item-active-color);
|
|
70
70
|
`}
|
|
71
71
|
|
|
72
72
|
${({ expanded }) =>
|
|
@@ -3,9 +3,10 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { useProfileProps } from '@portal/Profile/useProfileProps';
|
|
5
5
|
import { LogoutIcon } from '@theme/icons/LogoutIcon';
|
|
6
|
+
import { AvatarWrapper, ProfileWrapper, Profile } from '@theme/components/Profile/Profile';
|
|
6
7
|
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
7
8
|
import { useTranslate } from '@portal/hooks';
|
|
8
|
-
import {
|
|
9
|
+
import { telemetry } from '@portal/telemetry';
|
|
9
10
|
|
|
10
11
|
export function MobileUserProfile() {
|
|
11
12
|
const { userProfile } = useThemeConfig();
|
|
@@ -20,13 +21,27 @@ export function MobileUserProfile() {
|
|
|
20
21
|
return (
|
|
21
22
|
<MobileProfileWrapper data-component-name="Navbar/MobileUserProfile">
|
|
22
23
|
{!userData?.isAuthenticated ? (
|
|
23
|
-
<LoginButton
|
|
24
|
+
<LoginButton
|
|
25
|
+
href={loginUrl}
|
|
26
|
+
data-cy="login-btn"
|
|
27
|
+
onClick={() => telemetry.send('login_button_clicked', {})}
|
|
28
|
+
>
|
|
24
29
|
{translate(translationKeys.login, userProfile?.loginLabel || 'Login')}
|
|
25
30
|
</LoginButton>
|
|
26
31
|
) : (
|
|
27
32
|
<>
|
|
28
|
-
<
|
|
29
|
-
|
|
33
|
+
<UserDataWrapper>
|
|
34
|
+
<ProfilePicture>
|
|
35
|
+
<Profile name={userData.name} imageUrl={userData.picture} />
|
|
36
|
+
</ProfilePicture>
|
|
37
|
+
<UserName>{userData.name}</UserName>
|
|
38
|
+
</UserDataWrapper>
|
|
39
|
+
<LogoutButton
|
|
40
|
+
onClick={() => {
|
|
41
|
+
handleLogout();
|
|
42
|
+
telemetry.send('logout_menu_item_clicked', {});
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
30
45
|
<LogoutIcon />
|
|
31
46
|
</LogoutButton>
|
|
32
47
|
</>
|
|
@@ -41,7 +56,7 @@ const LoginButton = styled.a`
|
|
|
41
56
|
margin: 0;
|
|
42
57
|
padding: 5px 0;
|
|
43
58
|
color: var(--mobile-menu-login-button-color);
|
|
44
|
-
font-size:
|
|
59
|
+
font-size: 14px;
|
|
45
60
|
text-align: center;
|
|
46
61
|
line-height: 22px;
|
|
47
62
|
cursor: pointer;
|
|
@@ -59,6 +74,25 @@ const MobileProfileWrapper = styled.div`
|
|
|
59
74
|
background: var(--mobile-menu-profile-background);
|
|
60
75
|
`;
|
|
61
76
|
|
|
77
|
+
const UserDataWrapper = styled.div`
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
const ProfilePicture = styled.div`
|
|
83
|
+
margin-right: 16px;
|
|
84
|
+
|
|
85
|
+
${AvatarWrapper} {
|
|
86
|
+
margin: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
${ProfileWrapper} {
|
|
90
|
+
padding: 0;
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
93
|
+
|
|
94
|
+
const UserName = styled.div``;
|
|
95
|
+
|
|
62
96
|
const LogoutButton = styled.div`
|
|
63
97
|
cursor: pointer;
|
|
64
98
|
user-select: none;
|