@redocly/theme 0.18.3 → 0.18.4-patch.1
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/components/Breadcrumbs/Breadcrumb.js +2 -5
- package/lib/components/Breadcrumbs/Breadcrumbs.js +6 -2
- package/lib/components/Breadcrumbs/index.d.ts +1 -0
- package/lib/components/Breadcrumbs/index.js +1 -0
- package/lib/components/Breadcrumbs/styledVariables.d.ts +1 -0
- package/lib/components/Breadcrumbs/styledVariables.js +20 -0
- package/lib/components/Button/Button.d.ts +6 -3
- package/lib/components/Button/Button.js +41 -41
- package/lib/components/Button/index.d.ts +1 -0
- package/lib/components/Button/index.js +1 -0
- package/lib/components/Button/styledVariables.d.ts +1 -0
- package/lib/components/Button/styledVariables.js +107 -0
- package/lib/components/Catalog/Catalog.d.ts +6 -0
- package/lib/components/Catalog/Catalog.js +112 -102
- package/lib/components/Catalog/CatalogCard.js +91 -58
- package/lib/components/Catalog/index.d.ts +4 -3
- package/lib/components/Catalog/index.js +4 -3
- package/lib/components/Catalog/styledVariables.d.ts +1 -0
- package/lib/components/Catalog/styledVariables.js +95 -0
- package/lib/components/CodeBlock/CodeBlockContainer.js +38 -10
- package/lib/components/CodeBlock/CodeBlockControlButton.d.ts +3 -4
- package/lib/components/CodeBlock/CodeBlockControlButton.js +5 -19
- package/lib/components/CodeBlock/CodeBlockControls.js +8 -5
- package/lib/components/CodeBlock/index.d.ts +1 -0
- package/lib/components/CodeBlock/index.js +1 -0
- package/lib/components/CodeBlock/styledVariables.d.ts +1 -0
- package/lib/components/CodeBlock/styledVariables.js +92 -0
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +0 -1
- package/lib/components/Dropdown/Dropdown.d.ts +9 -3
- package/lib/components/Dropdown/Dropdown.js +7 -4
- package/lib/components/Dropdown/index.d.ts +1 -0
- package/lib/components/Dropdown/index.js +1 -0
- package/lib/components/Dropdown/styledVariables.d.ts +1 -0
- package/lib/components/Dropdown/styledVariables.js +30 -0
- package/lib/components/EditPageButton/EditPageButton.d.ts +1 -3
- package/lib/components/EditPageButton/EditPageButton.js +17 -8
- package/lib/components/Feedback/Comment.js +5 -0
- package/lib/components/Feedback/Rating.js +5 -1
- package/lib/components/Feedback/Reasons.js +6 -1
- package/lib/components/Feedback/Sentiment.js +5 -0
- package/lib/components/Feedback/Thumbs.js +4 -4
- package/lib/components/Filter/Filter.d.ts +3 -1
- package/lib/components/Filter/Filter.js +113 -80
- package/lib/components/Filter/FilterContent.d.ts +13 -0
- package/lib/components/Filter/FilterContent.js +60 -0
- package/lib/components/Filter/FilterPopover.d.ts +13 -0
- package/lib/components/Filter/FilterPopover.js +109 -0
- package/lib/components/Filter/FilterTag.d.ts +7 -0
- package/lib/components/Filter/FilterTag.js +33 -0
- package/lib/components/Filter/FilterTags.d.ts +7 -0
- package/lib/components/Filter/FilterTags.js +29 -0
- package/lib/components/Filter/index.d.ts +2 -0
- package/lib/components/Filter/index.js +2 -0
- package/lib/components/Filter/styledVariables.d.ts +1 -0
- package/lib/components/Filter/styledVariables.js +112 -0
- package/lib/components/Footer/CustomFooterNavItem.js +1 -1
- package/lib/components/Footer/Footer.d.ts +4 -3
- package/lib/components/Footer/Footer.js +28 -10
- package/lib/components/Footer/FooterColumn.d.ts +3 -3
- package/lib/components/Footer/FooterColumn.js +57 -63
- package/lib/components/Footer/FooterColumns.js +6 -4
- package/lib/components/Footer/FooterCopyright.js +11 -6
- package/lib/components/Footer/index.d.ts +1 -0
- package/lib/components/Footer/index.js +1 -0
- package/lib/components/Footer/styledVariables.d.ts +1 -0
- package/lib/components/Footer/styledVariables.js +61 -0
- package/lib/components/Image/Image.d.ts +9 -0
- package/lib/components/Image/Image.js +31 -0
- package/lib/components/Image/index.d.ts +1 -0
- package/lib/components/{Tags → Image}/index.js +1 -1
- package/lib/components/JsonViewer/JsonViewer.js +2 -2
- package/lib/components/LastUpdated/LastUpdated.js +1 -0
- package/lib/components/LastUpdated/index.d.ts +1 -0
- package/lib/components/{OperationBadge → LastUpdated}/index.js +1 -1
- package/lib/components/LastUpdated/styledVariables.d.ts +1 -0
- package/lib/components/LastUpdated/styledVariables.js +11 -0
- package/lib/components/Markdown/Admonition.js +12 -9
- package/lib/components/Markdown/MarkdownLayout.d.ts +0 -2
- package/lib/components/Markdown/MarkdownLayout.js +1 -6
- package/lib/components/Markdown/MarkdownWrapper.js +2 -4
- package/lib/components/Markdown/Mermaid.js +4 -1
- package/lib/components/Markdown/index.d.ts +1 -0
- package/lib/components/Markdown/index.js +1 -0
- package/lib/components/Markdown/styledVariables.d.ts +3 -0
- package/lib/components/Markdown/styledVariables.js +231 -0
- package/lib/components/Menu/Menu.js +5 -7
- package/lib/components/Menu/MenuGroup.js +12 -7
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/Menu/MenuItemLabel.js +9 -13
- package/lib/components/Menu/MobileMenu.js +20 -25
- package/lib/components/Menu/MobileMenuGroup.js +1 -1
- package/lib/components/Menu/index.d.ts +1 -0
- package/lib/components/Menu/index.js +1 -0
- package/lib/components/Menu/styledVariables.d.ts +2 -0
- package/lib/components/Menu/styledVariables.js +101 -0
- package/lib/components/Navbar/Navbar.js +20 -13
- package/lib/components/Navbar/NavbarItem.d.ts +1 -1
- package/lib/components/Navbar/NavbarItem.js +18 -6
- package/lib/components/Navbar/NavbarMenu.js +2 -2
- package/lib/components/Navbar/index.d.ts +1 -0
- package/lib/components/Navbar/index.js +1 -0
- package/lib/components/Navbar/styledVariables.d.ts +1 -0
- package/lib/components/Navbar/styledVariables.js +42 -0
- package/lib/components/NavbarLogo/NavbarLogo.d.ts +4 -1
- package/lib/components/NavbarLogo/NavbarLogo.js +13 -5
- package/lib/components/NavbarLogo/index.d.ts +1 -0
- package/lib/components/NavbarLogo/index.js +1 -0
- package/lib/components/NavbarLogo/styledVariables.d.ts +1 -0
- package/lib/components/NavbarLogo/styledVariables.js +18 -0
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.js +2 -2
- package/lib/components/OpenApiDocs/Dropdown.js +3 -3
- package/lib/components/PageNavigation/NextButton.js +1 -1
- package/lib/components/PageNavigation/PreviousButton.js +1 -1
- package/lib/components/Panel/PanelHeader.js +2 -0
- package/lib/components/Panel/PanelHeaderTitle.js +0 -4
- package/lib/components/Panel/index.d.ts +1 -0
- package/lib/components/Panel/index.js +1 -0
- package/lib/components/Panel/styledVariables.d.ts +2 -0
- package/lib/components/Panel/styledVariables.js +481 -0
- package/lib/components/Product/ProductPicker.js +22 -9
- package/lib/components/Product/index.d.ts +1 -0
- package/lib/components/Product/index.js +1 -0
- package/lib/components/Product/styledVariables.d.ts +2 -0
- package/lib/components/Product/styledVariables.js +42 -0
- package/lib/components/Profile/LoginLink.js +1 -2
- package/lib/components/{Navbar → Profile}/MobileUserProfile.js +12 -24
- package/lib/components/Profile/Profile.js +3 -22
- package/lib/components/Profile/UserProfile.js +21 -9
- package/lib/components/Profile/UserProfileData.d.ts +9 -0
- package/lib/components/Profile/UserProfileData.js +35 -0
- package/lib/components/Profile/index.d.ts +1 -0
- package/lib/components/Profile/index.js +15 -0
- package/lib/components/Profile/styledVariables.d.ts +2 -0
- package/lib/components/Profile/styledVariables.js +55 -0
- package/lib/components/Search/CancelSearch.js +2 -14
- package/lib/components/Search/ProductTag.js +8 -8
- package/lib/components/Search/RecentSearches.js +5 -5
- package/lib/components/Search/Search.js +0 -2
- package/lib/components/Search/SearchIcon.js +2 -2
- package/lib/components/Search/SearchItem.js +4 -4
- package/lib/components/Search/SearchTrigger.js +4 -5
- package/lib/components/Search/ShortcutKey.js +1 -5
- package/lib/components/Search/SuggestedPages.js +3 -3
- package/lib/components/Search/index.d.ts +1 -0
- package/lib/components/Search/index.js +1 -0
- package/lib/components/Search/styledVariables.d.ts +1 -0
- package/lib/components/Search/styledVariables.js +98 -0
- package/lib/components/Select/Select.d.ts +21 -9
- package/lib/components/Select/Select.js +27 -17
- package/lib/components/Select/index.d.ts +1 -0
- package/lib/components/Select/index.js +1 -0
- package/lib/components/Select/styledVariables.d.ts +1 -0
- package/lib/components/Select/styledVariables.js +34 -0
- package/lib/components/Separator/Separator.js +11 -3
- package/lib/components/Separator/SeparatorItem.js +6 -9
- package/lib/components/Separator/SeparatorLine.js +7 -3
- package/lib/components/Sidebar/ApiCallItem.d.ts +2 -6
- package/lib/components/Sidebar/ApiCallItem.js +17 -13
- package/lib/components/Sidebar/FooterWrapper.js +3 -4
- package/lib/components/Sidebar/HeaderWrapper.js +3 -3
- package/lib/components/Sidebar/VersionPicker.d.ts +3 -3
- package/lib/components/Sidebar/VersionPicker.js +6 -4
- package/lib/components/Sidebar/index.d.ts +1 -0
- package/lib/components/Sidebar/index.js +1 -0
- package/lib/components/Sidebar/styledVariables.d.ts +2 -0
- package/lib/components/Sidebar/styledVariables.js +216 -0
- package/lib/components/Sidebar/types.d.ts +1 -0
- package/lib/components/SidebarActions/CollapseSidebarButton.js +41 -1
- package/lib/components/SidebarActions/styled.js +29 -21
- package/lib/components/TableOfContent/TableOfContent.js +3 -2
- package/lib/components/TableOfContent/index.d.ts +1 -0
- package/lib/components/TableOfContent/index.js +1 -0
- package/lib/components/TableOfContent/styledVariables.d.ts +1 -0
- package/lib/components/TableOfContent/styledVariables.js +47 -0
- package/lib/components/Tabs/Tab.js +1 -1
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tag/Tag.d.ts +18 -0
- package/lib/components/Tag/Tag.js +45 -0
- package/lib/components/Tag/index.d.ts +2 -0
- package/lib/components/Tag/index.js +19 -0
- package/lib/components/Tag/styledVariables.d.ts +1 -0
- package/lib/components/Tag/styledVariables.js +140 -0
- package/lib/components/Tiles/ThinTile.js +7 -5
- package/lib/components/Tiles/TileHeader.js +1 -1
- package/lib/components/Tiles/TileText.js +1 -1
- package/lib/components/Tiles/WideTile.js +10 -8
- package/lib/components/Tooltip/index.d.ts +1 -0
- package/lib/components/Tooltip/index.js +1 -0
- package/lib/components/Tooltip/styledVariables.d.ts +1 -0
- package/lib/components/Tooltip/styledVariables.js +21 -0
- package/lib/components/Typography/SectionHeader.js +2 -2
- package/lib/components/Typography/Typography.js +1 -1
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +1 -2
- package/lib/config.d.ts +155 -154
- package/lib/config.js +39 -28
- package/lib/globalStyle.js +602 -1983
- package/lib/hooks/useMobileMenu.js +5 -6
- package/lib/hooks/useModalScrollLock.d.ts +1 -0
- package/lib/hooks/useModalScrollLock.js +16 -0
- package/lib/i18n/LanguagePicker.d.ts +9 -0
- package/lib/{I18n → i18n}/LanguagePicker.js +27 -12
- package/lib/i18n/index.d.ts +2 -0
- package/lib/i18n/index.js +21 -0
- package/lib/i18n/styledVariables.d.ts +1 -0
- package/lib/i18n/styledVariables.js +40 -0
- package/lib/icons/AlertIcon/AlertIcon.js +0 -5
- package/lib/icons/ArrowIcon/ArrowIcon.js +1 -1
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +6 -0
- package/lib/icons/CheckboxIcon/CheckboxIcon.js +28 -0
- package/lib/icons/CheckboxIcon/index.d.ts +1 -0
- package/lib/icons/CheckboxIcon/index.js +6 -0
- 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 +1 -2
- 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/EditIcon/EditIcon.d.ts +6 -0
- package/lib/icons/EditIcon/EditIcon.js +18 -0
- package/lib/icons/EditIcon/index.d.ts +1 -0
- package/lib/icons/EditIcon/index.js +18 -0
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +4 -0
- package/lib/icons/ErrorIcon/ErrorIcon.js +14 -0
- package/lib/icons/ErrorIcon/index.d.ts +1 -0
- package/lib/icons/ErrorIcon/index.js +18 -0
- package/lib/icons/ExpandIcon/ExpandIcon.d.ts +1 -2
- package/lib/icons/ExpandIcon/ExpandIcon.js +5 -5
- package/lib/icons/ExternalIcon/ExternalIcon.js +3 -3
- package/lib/icons/FileIcon/FileIcon.d.ts +1 -2
- package/lib/icons/FileIcon/FileIcon.js +2 -2
- package/lib/icons/LanguageIcon/LanguageIcon.d.ts +4 -0
- package/lib/icons/LanguageIcon/LanguageIcon.js +14 -0
- package/lib/icons/LanguageIcon/index.d.ts +1 -0
- package/lib/icons/LanguageIcon/index.js +18 -0
- package/lib/icons/PlusIcon/PlusIcon.d.ts +5 -0
- package/lib/icons/PlusIcon/PlusIcon.js +16 -0
- package/lib/icons/PlusIcon/index.d.ts +1 -0
- package/lib/icons/PlusIcon/index.js +18 -0
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.d.ts +4 -0
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.js +15 -0
- package/lib/icons/PointingArrowIcon/index.d.ts +1 -0
- package/lib/icons/PointingArrowIcon/index.js +18 -0
- package/lib/icons/ReportIcon/ReportIcon.d.ts +1 -2
- package/lib/icons/ReportIcon/ReportIcon.js +3 -3
- package/lib/icons/RocketIcon/RocketIcon.d.ts +7 -0
- package/lib/icons/RocketIcon/RocketIcon.js +15 -0
- package/lib/icons/RocketIcon/index.d.ts +1 -0
- package/lib/icons/RocketIcon/index.js +18 -0
- package/lib/icons/SelectIcon/SelectIcon.d.ts +1 -2
- package/lib/icons/SelectIcon/SelectIcon.js +5 -5
- package/lib/icons/index.d.ts +6 -0
- package/lib/icons/index.js +6 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/layouts/Forbidden.js +4 -0
- package/lib/layouts/NotFound.js +4 -0
- package/lib/mocks/hooks/index.js +0 -1
- package/lib/types/portal/src/shared/types/catalog.d.ts +5 -1
- package/lib/types/portal/src/shared/types/nav.d.ts +5 -0
- package/lib/ui/ArrowBack.js +0 -1
- package/lib/ui/Burger.js +1 -1
- package/lib/ui/Dropdown.js +7 -7
- package/lib/ui/Highlight.d.ts +1 -1
- package/lib/ui/Highlight.js +1 -1
- package/lib/ui/Jumbotron.js +1 -1
- package/lib/ui/darkColors.js +217 -84
- package/lib/utils/css-variables.js +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/tags-parser.d.ts +1 -0
- package/lib/utils/tags-parser.js +10 -0
- package/package.json +1 -1
- package/src/components/Breadcrumbs/Breadcrumb.tsx +2 -5
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +6 -2
- package/src/components/Breadcrumbs/index.ts +1 -0
- package/src/components/Breadcrumbs/styledVariables.ts +17 -0
- package/src/components/Button/Button.tsx +53 -47
- package/src/components/Button/index.ts +1 -0
- package/src/components/Button/styledVariables.ts +104 -0
- package/src/components/Catalog/Catalog.tsx +140 -120
- package/src/components/Catalog/CatalogCard.tsx +108 -58
- package/src/components/Catalog/index.ts +4 -0
- package/src/components/Catalog/styledVariables.ts +92 -0
- package/src/components/CodeBlock/CodeBlockContainer.tsx +17 -9
- package/src/components/CodeBlock/CodeBlockControlButton.tsx +6 -19
- package/src/components/CodeBlock/CodeBlockControls.tsx +8 -5
- package/src/components/CodeBlock/index.ts +1 -0
- package/src/components/CodeBlock/styledVariables.ts +89 -0
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +0 -1
- package/src/components/Dropdown/Dropdown.tsx +14 -5
- package/src/components/Dropdown/index.ts +1 -0
- package/src/components/Dropdown/styledVariables.ts +27 -0
- package/src/components/EditPageButton/EditPageButton.tsx +24 -10
- package/src/components/Feedback/Comment.tsx +5 -0
- package/src/components/Feedback/Rating.tsx +5 -1
- package/src/components/Feedback/Reasons.tsx +6 -1
- package/src/components/Feedback/Sentiment.tsx +5 -0
- package/src/components/Feedback/Thumbs.tsx +4 -4
- package/src/components/Filter/Filter.tsx +150 -94
- package/src/components/Filter/FilterContent.tsx +95 -0
- package/src/components/Filter/FilterPopover.tsx +150 -0
- package/src/components/Filter/FilterTag.tsx +37 -0
- package/src/components/Filter/FilterTags.tsx +39 -0
- package/src/components/Filter/index.ts +2 -0
- package/src/components/Filter/styledVariables.ts +109 -0
- package/src/components/Footer/CustomFooterNavItem.tsx +1 -1
- package/src/components/Footer/Footer.tsx +32 -10
- package/src/components/Footer/FooterColumn.tsx +84 -63
- package/src/components/Footer/FooterColumns.tsx +6 -4
- package/src/components/Footer/FooterCopyright.tsx +13 -7
- package/src/components/Footer/index.ts +1 -0
- package/src/components/Footer/styledVariables.ts +58 -0
- package/src/components/Image/Image.tsx +47 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/JsonViewer/JsonViewer.tsx +2 -2
- package/src/components/LastUpdated/LastUpdated.tsx +1 -2
- package/src/components/LastUpdated/index.ts +1 -0
- package/src/components/LastUpdated/styledVariables.ts +8 -0
- package/src/components/Markdown/Admonition.tsx +13 -8
- package/src/components/Markdown/MarkdownLayout.tsx +2 -15
- package/src/components/Markdown/MarkdownWrapper.tsx +2 -4
- package/src/components/Markdown/Mermaid.tsx +4 -1
- package/src/components/Markdown/index.ts +1 -0
- package/src/components/Markdown/styledVariables.ts +230 -0
- package/src/components/Menu/Menu.tsx +5 -7
- package/src/components/Menu/MenuGroup.tsx +15 -7
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/Menu/MenuItemLabel.tsx +9 -13
- package/src/components/Menu/MobileMenu.tsx +20 -25
- package/src/components/Menu/MobileMenuGroup.tsx +1 -1
- package/src/components/Menu/index.ts +1 -0
- package/src/components/Menu/styledVariables.ts +99 -0
- package/src/components/Navbar/Navbar.tsx +20 -13
- package/src/components/Navbar/NavbarItem.tsx +18 -4
- package/src/components/Navbar/NavbarMenu.tsx +2 -2
- package/src/components/Navbar/index.ts +1 -0
- package/src/components/Navbar/styledVariables.ts +39 -0
- package/src/components/NavbarLogo/NavbarLogo.tsx +24 -11
- package/src/components/NavbarLogo/index.ts +1 -0
- package/src/components/NavbarLogo/styledVariables.ts +15 -0
- package/src/components/OpenApiDocs/DevOnboardingTryItSecurity.tsx +1 -2
- package/src/components/OpenApiDocs/Dropdown.tsx +3 -3
- package/src/components/PageNavigation/NextButton.tsx +0 -1
- package/src/components/PageNavigation/PreviousButton.tsx +0 -1
- package/src/components/Panel/PanelHeader.ts +2 -0
- package/src/components/Panel/PanelHeaderTitle.ts +0 -4
- package/src/components/Panel/index.ts +1 -0
- package/src/components/Panel/styledVariables.ts +479 -0
- package/src/components/Product/ProductPicker.tsx +23 -17
- package/src/components/Product/index.ts +1 -0
- package/src/components/Product/styledVariables.ts +40 -0
- package/src/components/Profile/LoginLink.tsx +1 -2
- package/src/components/{Navbar → Profile}/MobileUserProfile.tsx +12 -29
- package/src/components/Profile/Profile.tsx +1 -24
- package/src/components/Profile/UserProfile.tsx +20 -8
- package/src/components/Profile/UserProfileData.tsx +40 -0
- package/src/components/Profile/index.ts +1 -0
- package/src/components/Profile/styledVariables.ts +53 -0
- package/src/components/Search/CancelSearch.tsx +2 -15
- package/src/components/Search/ProductTag.tsx +8 -8
- package/src/components/Search/RecentSearches.tsx +5 -5
- package/src/components/Search/Search.tsx +0 -2
- package/src/components/Search/SearchIcon.tsx +10 -5
- package/src/components/Search/SearchItem.tsx +4 -4
- package/src/components/Search/SearchTrigger.tsx +4 -5
- package/src/components/Search/ShortcutKey.tsx +1 -5
- package/src/components/Search/SuggestedPages.tsx +3 -3
- package/src/components/Search/index.ts +1 -0
- package/src/components/Search/styledVariables.ts +95 -0
- package/src/components/Select/Select.tsx +65 -31
- package/src/components/Select/index.ts +1 -0
- package/src/components/Select/styledVariables.ts +31 -0
- package/src/components/Separator/Separator.tsx +17 -3
- package/src/components/Separator/SeparatorItem.tsx +6 -9
- package/src/components/Separator/SeparatorLine.tsx +7 -3
- package/src/components/Sidebar/ApiCallItem.tsx +17 -13
- package/src/components/Sidebar/FooterWrapper.tsx +3 -4
- package/src/components/Sidebar/HeaderWrapper.tsx +3 -3
- package/src/components/Sidebar/VersionPicker.tsx +6 -4
- package/src/components/Sidebar/index.ts +1 -0
- package/src/components/Sidebar/styledVariables.ts +214 -0
- package/src/components/Sidebar/types.ts +1 -0
- package/src/components/SidebarActions/CollapseSidebarButton.tsx +22 -2
- package/src/components/SidebarActions/styled.tsx +29 -30
- package/src/components/TableOfContent/TableOfContent.tsx +3 -2
- package/src/components/TableOfContent/index.ts +1 -0
- package/src/components/TableOfContent/styledVariables.ts +44 -0
- package/src/components/Tabs/Tab.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +1 -1
- package/src/components/Tag/Tag.tsx +71 -0
- package/src/components/Tag/index.ts +2 -0
- package/src/components/Tag/styledVariables.ts +137 -0
- package/src/components/Tiles/ThinTile.tsx +7 -5
- package/src/components/Tiles/TileHeader.ts +1 -1
- package/src/components/Tiles/TileText.tsx +1 -1
- package/src/components/Tiles/WideTile.tsx +10 -8
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/Tooltip/styledVariables.ts +18 -0
- package/src/components/Typography/SectionHeader.ts +2 -2
- package/src/components/Typography/Typography.ts +1 -1
- package/src/components/index.ts +1 -2
- package/src/config.ts +44 -29
- package/src/globalStyle.ts +597 -1999
- package/src/hooks/useMobileMenu.ts +3 -4
- package/src/hooks/useModalScrollLock.ts +12 -0
- package/src/{I18n → i18n}/LanguagePicker.tsx +48 -21
- package/src/i18n/index.ts +2 -0
- package/src/i18n/styledVariables.ts +37 -0
- package/src/icons/AlertIcon/AlertIcon.tsx +0 -5
- package/src/icons/ArrowIcon/ArrowIcon.tsx +1 -1
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +64 -0
- package/src/icons/CheckboxIcon/index.ts +1 -0
- package/src/icons/CollapseIcon/CollapseIcon.tsx +5 -5
- package/src/icons/ColorModeIcon/ColorModeIcon.tsx +1 -1
- package/src/icons/CopyIcon/CopyIcon.tsx +4 -5
- package/src/icons/DeselectIcon/DeselectIcon.tsx +5 -5
- package/src/icons/EditIcon/EditIcon.tsx +30 -0
- package/src/icons/EditIcon/index.ts +1 -0
- package/src/icons/ErrorIcon/ErrorIcon.tsx +15 -0
- package/src/icons/ErrorIcon/index.ts +1 -0
- package/src/icons/ExpandIcon/ExpandIcon.tsx +5 -6
- package/src/icons/ExternalIcon/ExternalIcon.tsx +4 -4
- package/src/icons/FileIcon/FileIcon.tsx +2 -3
- package/src/icons/LanguageIcon/LanguageIcon.tsx +15 -0
- package/src/icons/LanguageIcon/index.ts +1 -0
- package/src/icons/PlusIcon/PlusIcon.tsx +25 -0
- package/src/icons/PlusIcon/index.ts +1 -0
- package/src/icons/PointingArrowIcon/PointingArrowIcon.tsx +16 -0
- package/src/icons/PointingArrowIcon/index.ts +1 -0
- package/src/icons/ReportIcon/ReportIcon.tsx +3 -4
- package/src/icons/RocketIcon/RocketIcon.tsx +32 -0
- package/src/icons/RocketIcon/index.tsx +1 -0
- package/src/icons/SelectIcon/SelectIcon.tsx +5 -6
- package/src/icons/index.ts +6 -0
- package/src/index.ts +1 -1
- package/src/layouts/Forbidden.tsx +4 -0
- package/src/layouts/NotFound.tsx +4 -0
- package/src/mocks/hooks/index.ts +0 -1
- package/src/types/portal/src/shared/types/catalog.ts +7 -1
- package/src/types/portal/src/shared/types/nav.ts +5 -0
- package/src/ui/ArrowBack.tsx +0 -1
- package/src/ui/Burger.tsx +1 -1
- package/src/ui/Dropdown.tsx +7 -7
- package/src/ui/Highlight.tsx +2 -2
- package/src/ui/Jumbotron.tsx +1 -1
- package/src/ui/darkColors.tsx +217 -84
- package/src/utils/css-variables.ts +4 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/tags-parser.ts +8 -0
- package/lib/I18n/LanguagePicker.d.ts +0 -4
- package/lib/I18n/index.d.ts +0 -1
- package/lib/I18n/index.js +0 -6
- package/lib/components/OperationBadge/OperationBadge.d.ts +0 -6
- package/lib/components/OperationBadge/OperationBadge.js +0 -68
- package/lib/components/OperationBadge/index.d.ts +0 -1
- package/lib/components/Tags/Tags.d.ts +0 -5
- package/lib/components/Tags/Tags.js +0 -32
- package/lib/components/Tags/index.d.ts +0 -1
- package/src/I18n/index.ts +0 -1
- package/src/components/Catalog/index.tsx +0 -3
- package/src/components/OperationBadge/OperationBadge.ts +0 -62
- package/src/components/OperationBadge/index.ts +0 -1
- package/src/components/Tags/Tags.tsx +0 -36
- package/src/components/Tags/index.ts +0 -1
- /package/lib/components/{Navbar → Profile}/MobileUserProfile.d.ts +0 -0
|
@@ -1,32 +1,46 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { ArrowIcon } from '@theme/icons';
|
|
5
5
|
import { useOutsideClick } from '@theme/hooks';
|
|
6
6
|
|
|
7
|
-
export interface SelectProps {
|
|
8
|
-
|
|
9
|
-
options:
|
|
7
|
+
export interface SelectProps<T = any> {
|
|
8
|
+
value: T;
|
|
9
|
+
options: {
|
|
10
|
+
element: React.ReactNode | string;
|
|
11
|
+
value: T;
|
|
12
|
+
label?: string;
|
|
13
|
+
}[];
|
|
10
14
|
dataAttributes?: Record<string, string>;
|
|
11
15
|
className?: string;
|
|
12
16
|
withArrow?: boolean;
|
|
13
17
|
triggerEvent?: 'click' | 'hover';
|
|
14
|
-
onChange?: (value:
|
|
18
|
+
onChange?: (value: any) => void;
|
|
19
|
+
placement?: 'top' | 'bottom';
|
|
20
|
+
alignment?: 'start' | 'end';
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
onlyIcon?: boolean;
|
|
23
|
+
placeholder?: string;
|
|
15
24
|
}
|
|
16
25
|
|
|
17
|
-
export
|
|
26
|
+
export function Select<T>({
|
|
18
27
|
className,
|
|
19
|
-
|
|
28
|
+
value,
|
|
20
29
|
options,
|
|
21
30
|
dataAttributes,
|
|
22
|
-
withArrow,
|
|
31
|
+
withArrow = true,
|
|
23
32
|
triggerEvent = 'click',
|
|
24
33
|
onChange,
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
placement,
|
|
35
|
+
alignment,
|
|
36
|
+
icon,
|
|
37
|
+
onlyIcon,
|
|
38
|
+
placeholder,
|
|
39
|
+
}: SelectProps<T>) {
|
|
40
|
+
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
27
41
|
|
|
28
42
|
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
29
|
-
const [
|
|
43
|
+
// const [selectedIdx, setSelectedIdx] = useState<React.ReactNode | string>(selected);
|
|
30
44
|
|
|
31
45
|
const handleOpen = () => {
|
|
32
46
|
setIsOpen(true);
|
|
@@ -40,45 +54,56 @@ export const Select = ({
|
|
|
40
54
|
setIsOpen(!isOpen);
|
|
41
55
|
};
|
|
42
56
|
|
|
43
|
-
const handleSelect = (value:
|
|
44
|
-
|
|
57
|
+
const handleSelect = (value: T) => {
|
|
58
|
+
// setSelectedIdx(options.findIndex(o => o.value === value));
|
|
45
59
|
setIsOpen(false);
|
|
46
60
|
onChange?.(value);
|
|
47
61
|
};
|
|
48
62
|
|
|
49
|
-
useOutsideClick(
|
|
63
|
+
useOutsideClick(containerRef, handleClose);
|
|
50
64
|
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, [selected]);
|
|
65
|
+
// useEffect(() => {
|
|
66
|
+
// handleSelect(selected);
|
|
67
|
+
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
+
// }, [selected]);
|
|
69
|
+
|
|
70
|
+
const selectedOption = options.find((option) => option.value === value);
|
|
55
71
|
|
|
56
72
|
return (
|
|
57
73
|
<SelectContainer
|
|
58
74
|
{...dataAttributes}
|
|
59
75
|
data-testid="select"
|
|
60
76
|
className={className}
|
|
61
|
-
ref={
|
|
77
|
+
ref={containerRef}
|
|
62
78
|
onPointerEnter={triggerEvent === 'hover' ? handleOpen : undefined}
|
|
63
79
|
onPointerLeave={triggerEvent === 'hover' ? handleClose : undefined}
|
|
64
80
|
onClick={triggerEvent === 'click' ? handleToggle : undefined}
|
|
65
81
|
>
|
|
66
82
|
<SelectInput>
|
|
67
|
-
|
|
83
|
+
{!onlyIcon && (
|
|
84
|
+
<SelectInputValue>
|
|
85
|
+
{selectedOption?.label || selectedOption?.element || placeholder}
|
|
86
|
+
</SelectInputValue>
|
|
87
|
+
)}
|
|
88
|
+
{icon}
|
|
68
89
|
{withArrow ? isOpen ? <ArrowIcon direction="up" /> : <ArrowIcon direction="down" /> : null}
|
|
69
90
|
</SelectInput>
|
|
70
91
|
{isOpen && (
|
|
71
|
-
<SelectList>
|
|
92
|
+
<SelectList placement={placement} alignment={alignment}>
|
|
72
93
|
{options.map((option, index) => (
|
|
73
|
-
<SelectListItem
|
|
74
|
-
{
|
|
94
|
+
<SelectListItem
|
|
95
|
+
key={index}
|
|
96
|
+
onClick={() => handleSelect(option.value)}
|
|
97
|
+
selected={option.value === value}
|
|
98
|
+
>
|
|
99
|
+
{typeof option.element === 'string' ? <div>{option.element}</div> : option.element}
|
|
75
100
|
</SelectListItem>
|
|
76
101
|
))}
|
|
77
102
|
</SelectList>
|
|
78
103
|
)}
|
|
79
104
|
</SelectContainer>
|
|
80
105
|
);
|
|
81
|
-
}
|
|
106
|
+
}
|
|
82
107
|
|
|
83
108
|
export const SelectContainer = styled.div`
|
|
84
109
|
position: relative;
|
|
@@ -102,17 +127,20 @@ export const SelectInput = styled.div`
|
|
|
102
127
|
border-radius: var(--select-input-border-radius);
|
|
103
128
|
padding: var(--select-input-padding-vertical) var(--select-input-padding-horizontal);
|
|
104
129
|
cursor: pointer;
|
|
130
|
+
gap: 8px;
|
|
105
131
|
`;
|
|
106
132
|
|
|
107
|
-
export const SelectInputValue = styled.div
|
|
133
|
+
export const SelectInputValue = styled.div`
|
|
108
134
|
pointer-events: none;
|
|
109
|
-
|
|
135
|
+
min-width: 0;
|
|
110
136
|
`;
|
|
111
137
|
|
|
112
|
-
export const SelectList = styled.ul
|
|
138
|
+
export const SelectList = styled.ul<{ placement?: string; alignment?: string }>`
|
|
113
139
|
position: absolute;
|
|
114
|
-
top: 100
|
|
115
|
-
|
|
140
|
+
top: ${({ placement }) => (placement === 'top' ? 'auto' : '100%')};
|
|
141
|
+
bottom: ${({ placement }) => (placement === 'top' ? '100%' : 'auto')};
|
|
142
|
+
left: ${({ alignment }) => (alignment === 'start' ? '0' : 'auto')};
|
|
143
|
+
right: ${({ alignment }) => (alignment === 'end' ? '0' : 'auto')};
|
|
116
144
|
margin: 0;
|
|
117
145
|
min-width: var(--select-list-min-width);
|
|
118
146
|
max-width: var(--select-list-max-width);
|
|
@@ -127,7 +155,7 @@ export const SelectList = styled.ul`
|
|
|
127
155
|
z-index: 1;
|
|
128
156
|
`;
|
|
129
157
|
|
|
130
|
-
export const SelectListItem = styled.li
|
|
158
|
+
export const SelectListItem = styled.li<{ selected: boolean }>`
|
|
131
159
|
border-radius: var(--select-list-item-border-radius);
|
|
132
160
|
|
|
133
161
|
& > * {
|
|
@@ -135,6 +163,12 @@ export const SelectListItem = styled.li`
|
|
|
135
163
|
}
|
|
136
164
|
|
|
137
165
|
:hover {
|
|
138
|
-
background-color: var(--select-list-item-
|
|
166
|
+
background-color: var(--select-list-item-hover-background-color);
|
|
139
167
|
}
|
|
168
|
+
|
|
169
|
+
${({ selected }) =>
|
|
170
|
+
selected &&
|
|
171
|
+
`
|
|
172
|
+
&, &:hover { background-color: var(--select-list-item-active-background-color); }
|
|
173
|
+
`}
|
|
140
174
|
`;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const select = css`
|
|
4
|
+
/**
|
|
5
|
+
* @tokens Select
|
|
6
|
+
* */
|
|
7
|
+
--select-font-size: var(--font-size-base); // @presenter FontSize
|
|
8
|
+
--select-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
9
|
+
--select-line-height: var(--line-height-base); // @presenter LineHeight
|
|
10
|
+
--select-text-color: var(--text-secondary); // @presenter Color
|
|
11
|
+
--select-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
12
|
+
|
|
13
|
+
--select-input-padding-horizontal: 16px; // @presenter Spacing
|
|
14
|
+
--select-input-padding-vertical: 6px; // @presenter Spacing
|
|
15
|
+
--select-input-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
16
|
+
|
|
17
|
+
--select-list-min-width: 100px;
|
|
18
|
+
--select-list-max-width: 300px;
|
|
19
|
+
--select-list-padding: var(--spacing-xxs); // @presenter Spacing
|
|
20
|
+
--select-list-border-radius: var(--border-radius-lg); // @presenter BorderRadius
|
|
21
|
+
--select-list-background-color: var(--background-color); // @presenter Color
|
|
22
|
+
--select-list-box-shadow: var(--bg-raised-shadow); // @presenter Shadow
|
|
23
|
+
|
|
24
|
+
--select-list-item-horizontal-padding: var(--spacing-base); // @presenter Spacing
|
|
25
|
+
--select-list-item-vertical-padding: var(--spacing-xs); // @presenter Spacing
|
|
26
|
+
--select-list-item-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
27
|
+
--select-list-item-active-background-color: var(--bg-overlay); // @presenter Color
|
|
28
|
+
--select-list-item-hover-background-color: var(--bg-raised); // @presenter Color
|
|
29
|
+
|
|
30
|
+
// @tokens End
|
|
31
|
+
`;
|
|
@@ -5,16 +5,30 @@ import { SeparatorLine } from '@theme/components/Separator/SeparatorLine';
|
|
|
5
5
|
import { SeparatorItem } from '@theme/components/Separator/SeparatorItem';
|
|
6
6
|
import type { MenuItemProps } from '@theme/components/Sidebar/types';
|
|
7
7
|
import { useTranslate } from '@portal/hooks';
|
|
8
|
+
import { useThemeConfig } from '@theme/hooks';
|
|
8
9
|
|
|
9
10
|
export function Separator({ item, className }: MenuItemProps): JSX.Element {
|
|
10
11
|
const { translate } = useTranslate();
|
|
12
|
+
const { sidebar } = useThemeConfig();
|
|
13
|
+
|
|
14
|
+
const separatorLine = item.separatorLine || sidebar?.separatorLine;
|
|
15
|
+
const linePosition = item.linePosition || sidebar?.linePosition || 'bottom';
|
|
11
16
|
|
|
12
17
|
return (
|
|
13
|
-
<Wrapper
|
|
18
|
+
<Wrapper
|
|
19
|
+
data-component-name="Sidebar/Separator"
|
|
20
|
+
className={className}
|
|
21
|
+
linePosition={linePosition}
|
|
22
|
+
withLabel={!!item.label}
|
|
23
|
+
>
|
|
14
24
|
<SeparatorItem>{translate(item.labelTranslationKey, item.label)}</SeparatorItem>
|
|
15
|
-
{
|
|
25
|
+
{separatorLine ? <SeparatorLine /> : null}
|
|
16
26
|
</Wrapper>
|
|
17
27
|
);
|
|
18
28
|
}
|
|
19
29
|
|
|
20
|
-
const Wrapper = styled.div
|
|
30
|
+
const Wrapper = styled.div<{ linePosition: 'top' | 'bottom'; withLabel?: boolean }>`
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: ${({ linePosition }) => (linePosition === 'top' ? 'column-reverse' : 'column')};
|
|
33
|
+
margin-top: ${({ withLabel }) => (withLabel ? 'var(--sidebar-item-separator-offset)' : '0')};
|
|
34
|
+
`;
|
|
@@ -9,23 +9,20 @@ export const SeparatorItem = styled(MenuItemLabel).attrs<{ className?: string }>
|
|
|
9
9
|
}),
|
|
10
10
|
)`
|
|
11
11
|
cursor: default;
|
|
12
|
-
font-weight: var(--font-weight
|
|
13
|
-
color: var(--sidebar-separator-
|
|
14
|
-
font-family: var(--sidebar-item-separator-font-family);
|
|
12
|
+
font-weight: var(--sidebar-item-separator-font-weight);
|
|
13
|
+
color: var(--sidebar-item-separator-text-color);
|
|
15
14
|
font-size: var(--sidebar-item-separator-font-size);
|
|
16
15
|
text-transform: var(--sidebar-item-separator-text-transform);
|
|
17
16
|
background: var(--mobile-menu-background);
|
|
17
|
+
border-radius: 0;
|
|
18
|
+
padding: var(--sidebar-item-separator-padding);
|
|
18
19
|
|
|
19
20
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
20
21
|
background: var(--sidebar-item-separator-background-color);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
*:not(:first-child) > & {
|
|
24
|
-
margin-top: var(--sidebar-item-separator-offset);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
24
|
:hover {
|
|
28
|
-
color:
|
|
29
|
-
background
|
|
25
|
+
color: var(--sidebar-item-separator-text-color);
|
|
26
|
+
background: none;
|
|
30
27
|
}
|
|
31
28
|
`;
|
|
@@ -4,7 +4,11 @@ export const SeparatorLine = styled.div.attrs<{ className?: string }>(({ classNa
|
|
|
4
4
|
'data-component-name': 'Sidebar/SeparatorLine',
|
|
5
5
|
className,
|
|
6
6
|
}))`
|
|
7
|
-
height:
|
|
8
|
-
background-color: var(--sidebar-item-separator-
|
|
9
|
-
margin: var(--sidebar-item-separator-offset)
|
|
7
|
+
height: var(--sidebar-item-separator-border-width);
|
|
8
|
+
background-color: var(--sidebar-item-separator-border-color);
|
|
9
|
+
margin: var(--mobile-sidebar-item-separator-line-offset);
|
|
10
|
+
|
|
11
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
12
|
+
margin: var(--sidebar-item-separator-line-offset);
|
|
13
|
+
}
|
|
10
14
|
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Tag } from '@theme/components/Tag';
|
|
5
5
|
import { MenuLinkItem } from '@theme/components/Menu/MenuLinkItem';
|
|
6
6
|
import { SeparatorLine } from '@theme/components/Separator/SeparatorLine';
|
|
7
7
|
import { MenuItemLabel } from '@theme/components/Menu/MenuItemLabel';
|
|
@@ -12,10 +12,10 @@ export function ApiCallItem({ item, className }: MenuItemProps): JSX.Element {
|
|
|
12
12
|
<Wrapper data-component-name="Sidebar/ApiCallItem" className={className}>
|
|
13
13
|
<MenuLinkItem item={item}>
|
|
14
14
|
<Label active={item.active}>
|
|
15
|
-
<Badge type={item.httpVerb || ''}>
|
|
16
|
-
{item.httpVerb === 'hook' ? 'event' : item.httpVerb}
|
|
17
|
-
</Badge>
|
|
18
15
|
{item.label}
|
|
16
|
+
<HttpTag color={item.httpVerb || ''}>
|
|
17
|
+
{item.httpVerb === 'hook' ? 'event' : item.httpVerb}
|
|
18
|
+
</HttpTag>
|
|
19
19
|
</Label>
|
|
20
20
|
</MenuLinkItem>
|
|
21
21
|
|
|
@@ -25,6 +25,8 @@ export function ApiCallItem({ item, className }: MenuItemProps): JSX.Element {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const Label = styled(MenuItemLabel)`
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: space-between;
|
|
28
30
|
color: var(--mobile-menu-item-text-color);
|
|
29
31
|
|
|
30
32
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
@@ -34,14 +36,16 @@ const Label = styled(MenuItemLabel)`
|
|
|
34
36
|
|
|
35
37
|
const Wrapper = styled.div``;
|
|
36
38
|
|
|
37
|
-
export const
|
|
39
|
+
export const HttpTag = styled(Tag)`
|
|
38
40
|
flex-shrink: 0;
|
|
39
|
-
margin
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
margin: var(--sidebar-item-http-tag-margin);
|
|
42
|
+
text-transform: uppercase;
|
|
43
|
+
|
|
44
|
+
width: var(--sidebar-item-http-tag-width);
|
|
45
|
+
height: var(--sidebar-item-http-tag-height);
|
|
46
|
+
|
|
47
|
+
font-size: var(--sidebar-item-http-tag-font-size);
|
|
48
|
+
font-family: var(--sidebar-item-http-tag-font-family);
|
|
49
|
+
font-weight: var(--sidebar-item-http-tag-font-weight);
|
|
50
|
+
border-radius: var(--sidebar-item-http-tag-border-radius);
|
|
47
51
|
`;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export const FooterWrapper = styled.div<{ collapsed?: boolean }>`
|
|
3
|
+
padding: var(--sidebar-footer-padding-vertical) var(--sidebar-footer-padding-horizontal);
|
|
4
|
+
|
|
3
5
|
${({ collapsed }) =>
|
|
4
6
|
collapsed &&
|
|
5
7
|
`
|
|
6
8
|
position: sticky;
|
|
7
9
|
bottom: 0;
|
|
10
|
+
padding: 0;
|
|
8
11
|
`}
|
|
9
|
-
margin: var(--sidebar-offset-top) 0 var(--sidebar-spacing-unit) var(--sidebar-offset-left);
|
|
10
|
-
padding-top: var(--sidebar-spacing-unit);
|
|
11
|
-
padding-right: var(--sidebar-spacing-unit);
|
|
12
|
-
border-top: solid 1px var(--border-color);
|
|
13
12
|
|
|
14
13
|
button {
|
|
15
14
|
margin: 0;
|
|
@@ -4,7 +4,7 @@ export const HeaderWrapper = styled.div.attrs<{ className?: string }>(({ classNa
|
|
|
4
4
|
'data-component-name': 'Sidebar/HeaderWrapper',
|
|
5
5
|
className,
|
|
6
6
|
}))`
|
|
7
|
-
margin: var(--sidebar-offset-top) 0 0
|
|
8
|
-
padding-bottom
|
|
9
|
-
border-bottom: solid 1px var(--border-
|
|
7
|
+
margin: var(--sidebar-offset-top) 0 0 0;
|
|
8
|
+
padding: 0 0 var(--sidebar-header-padding-bottom) var(--sidebar-offset-left);
|
|
9
|
+
border-bottom: solid 1px var(--border-primary);
|
|
10
10
|
`;
|
|
@@ -9,6 +9,11 @@ export const VersionPicker = styled(Select).attrs(() => ({
|
|
|
9
9
|
'data-component-name': 'Sidebar/VersionPicker',
|
|
10
10
|
},
|
|
11
11
|
}))<SelectProps>`
|
|
12
|
+
--select-list-item-active-background-color: var(
|
|
13
|
+
--version-picker-list-item-active-background-color
|
|
14
|
+
);
|
|
15
|
+
--select-list-item-hover-background-color: var(--version-picker-list-item-hover-background-color);
|
|
16
|
+
|
|
12
17
|
font-size: var(--version-picker-font-size);
|
|
13
18
|
font-weight: var(--version-picker-font-weight);
|
|
14
19
|
border-radius: var(--version-picker-border-radius);
|
|
@@ -25,6 +30,7 @@ export const VersionPicker = styled(Select).attrs(() => ({
|
|
|
25
30
|
|
|
26
31
|
${SelectList} {
|
|
27
32
|
right: 0;
|
|
33
|
+
width: 100%;
|
|
28
34
|
min-width: var(--version-picker-list-min-width);
|
|
29
35
|
max-width: var(--version-picker-list-max-width);
|
|
30
36
|
padding: var(--version-picker-list-padding);
|
|
@@ -40,9 +46,5 @@ export const VersionPicker = styled(Select).attrs(() => ({
|
|
|
40
46
|
padding: var(--version-picker-list-item-vertical-padding)
|
|
41
47
|
var(--version-picker-list-item-horizontal-padding);
|
|
42
48
|
}
|
|
43
|
-
|
|
44
|
-
:hover {
|
|
45
|
-
background-color: var(--version-picker-list-item-active-background-color);
|
|
46
|
-
}
|
|
47
49
|
}
|
|
48
50
|
`;
|
|
@@ -11,3 +11,4 @@ export * from '@theme/components/Sidebar/FooterWrapper';
|
|
|
11
11
|
export * from '@theme/components/Sidebar/HeaderWrapper';
|
|
12
12
|
export * from '@theme/components/Sidebar/SidebarItemIcon';
|
|
13
13
|
export * from '@theme/components/Sidebar/VersionPicker';
|
|
14
|
+
export * from '@theme/components/Sidebar/styledVariables';
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const sidebar = css`
|
|
4
|
+
/* === Sidebar === */
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @tokens Sidebar logo
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
--sidebar-logo-max-height: 285px; // @presenter Spacing
|
|
11
|
+
--sidebar-logo-max-width: 285px; // @presenter Spacing
|
|
12
|
+
--sidebar-logo-padding: 2px; // @presenter Spacing
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @tokens Sidebar typography
|
|
16
|
+
*/
|
|
17
|
+
--sidebar-word-break: inherit; // @presenter WordBreak
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @tokens Sidebar colors
|
|
21
|
+
* @presenter Color
|
|
22
|
+
*/
|
|
23
|
+
--sidebar-background-color: var(--bg-base); // @presenter Color
|
|
24
|
+
--sidebar-border-color: var(--border-secondary); // @presenter Color
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @tokens Sidebar spacing
|
|
28
|
+
* @presenter Spacing
|
|
29
|
+
*/
|
|
30
|
+
--sidebar-spacing-unit: var(--spacing-base); // @presenter Spacing
|
|
31
|
+
--sidebar-width: 285px; // @presenter Spacing
|
|
32
|
+
|
|
33
|
+
--sidebar-offset-top: var(--sidebar-spacing-unit); // @presenter Spacing
|
|
34
|
+
--sidebar-offset-left: var(--sidebar-spacing-unit); // @presenter Spacing
|
|
35
|
+
|
|
36
|
+
--sidebar-header-padding-bottom: var(--sidebar-spacing-unit); // @presenter Spacing
|
|
37
|
+
|
|
38
|
+
--sidebar-chevron-size: var(--spacing-xs); // @presenter Spacing
|
|
39
|
+
|
|
40
|
+
/* === Sidebar Item === */
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @tokens Sidebar item typography
|
|
44
|
+
*/
|
|
45
|
+
--sidebar-item-font-family: var(--font-family-base); // @presenter FontFamily
|
|
46
|
+
--sidebar-item-font-size: var(--font-size-base); // @presenter FontSize
|
|
47
|
+
--sidebar-item-font-weight: var(--font-weight-regular); // @presenter FontSize
|
|
48
|
+
--sidebar-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @tokens Sidebar item colors
|
|
52
|
+
* @presenter Color
|
|
53
|
+
*/
|
|
54
|
+
--sidebar-item-text-color: var(--text-secondary); // @presenter Color
|
|
55
|
+
--sidebar-item-background-color: transparent; // @presenter Color
|
|
56
|
+
|
|
57
|
+
--sidebar-item-active-color: var(--text-primary); // @presenter Color
|
|
58
|
+
--sidebar-item-active-background-color: var(--bg-overlay); // @presenter Color
|
|
59
|
+
|
|
60
|
+
--sidebar-item-hover-background-color: var(--bg-raised); // @presenter Color
|
|
61
|
+
--sidebar-item-hover-color: var(--text-primary); // @presenter Color
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @tokens Sidebar item spacing
|
|
65
|
+
* @presenter Spacing
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
--sidebar-item-nested-offset: var(--spacing-xs); // @presenter Spacing
|
|
69
|
+
--sidebar-margin-horizontal: var(--spacing-base); // @presenter Spacing
|
|
70
|
+
--sidebar-item-padding-vertical: var(--spacing-xs); // @presenter Spacing
|
|
71
|
+
--sidebar-item-padding-horizontal: var(--spacing-xs); // @presenter Spacing
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @tokens Sidebar item border
|
|
75
|
+
*/
|
|
76
|
+
--sidebar-item-border-radius: 6px; // @presenter BorderRadius
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @tokens Sidebar item icon
|
|
80
|
+
*/
|
|
81
|
+
--sidebar-item-icon-size: var(--spacing-xl);
|
|
82
|
+
--sidebar-item-icon-border-radius: 100%;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @tokens Sidebar item sublabel
|
|
86
|
+
*/
|
|
87
|
+
--sidebar-item-sublabel-font-family: inherit; // sublabel is for drilldown only but I would like to support it in general
|
|
88
|
+
--sidebar-item-sublabel-font-size: var(--font-size-base); // @presenter FontSize
|
|
89
|
+
--sidebar-item-sublabel-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
90
|
+
--sidebar-item-sublabel-text-color: var(--sidebar-item-text-color); // @presenter Color
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @tokens Sidebar item drilldown
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
--sidebar-item-drilldown-font-family: var(--sidebar-item-font-family);
|
|
97
|
+
--sidebar-item-drilldown-font-size: var(--sidebar-item-font-size); // @presenter FontSize
|
|
98
|
+
--sidebar-text-drilldown-transform: inherit; // @presenter TextTransform
|
|
99
|
+
--sidebar-item-drilldown-text-color: var(--sidebar-item-text-color); // @presenter Color
|
|
100
|
+
--sidebar-item-drilldown-background-color: var(--sidebar-background-color); // @presenter Color
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @tokens Sidebar item group
|
|
104
|
+
*/
|
|
105
|
+
--sidebar-item-group-font-family: var(--sidebar-item-font-family);
|
|
106
|
+
--sidebar-item-group-font-size: var(--sidebar-item-font-size); // @presenter FontSize
|
|
107
|
+
--sidebar-text-group-transform: inherit;
|
|
108
|
+
--sidebar-item-group-text-color: var(--sidebar-item-text-color); // @presenter Color
|
|
109
|
+
--sidebar-item-group-background-color: var(--sidebar-background-color); // @presenter Color
|
|
110
|
+
--sidebar-item-group-active-text-color: var(--sidebar-item-active-color); // @presenter Color
|
|
111
|
+
--sidebar-item-group-active-background-color: var(--sidebar-item-active-background-color);
|
|
112
|
+
|
|
113
|
+
// we need a theme config for chevron-location: left (default), right-compact, right, none
|
|
114
|
+
// we need another theme config for chevron-style: up-down, down-up, right-down, down-right
|
|
115
|
+
|
|
116
|
+
--sidebar-group-item-chevron-size: var(--spacing-xs); // @presenter Spacing
|
|
117
|
+
--sidebar-group-item-chevron-color: var(--sidebar-item-text-color); // @presenter Color
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @tokens Sidebar item separator
|
|
121
|
+
*/
|
|
122
|
+
--sidebar-item-separator-font-family: var(--sidebar-item-font-family);
|
|
123
|
+
--sidebar-item-separator-font-size: var(--sidebar-item-font-size); // @presenter FontSize
|
|
124
|
+
--sidebar-item-separator-font-weight: var(--sidebar-item-font-weight); // @presenter FontWeight
|
|
125
|
+
--sidebar-item-separator-text-transform: inherit; // @presenter TextTransform
|
|
126
|
+
--sidebar-item-separator-text-color: var(--text-placeholder); // @presenter Color
|
|
127
|
+
|
|
128
|
+
--sidebar-item-separator-background-color: var(--sidebar-background-color); // @presenter Color
|
|
129
|
+
--sidebar-item-separator-line-color: var(--border-primary); // @presenter Color
|
|
130
|
+
--sidebar-item-separator-offset: var(--spacing-sm); // @presenter Spacing
|
|
131
|
+
--sidebar-item-separator-line-offset: var(--spacing-xxs) var(--sidebar-margin-horizontal); // @presenter Spacing
|
|
132
|
+
--mobile-sidebar-item-separator-line-offset: var(--spacing-xxs) var(--spacing-xs); // @presenter Spacing
|
|
133
|
+
--sidebar-item-separator-border-width: 1px; // @presenter Spacing
|
|
134
|
+
--sidebar-item-separator-border-color: var(--border-primary); // @presenter Color
|
|
135
|
+
--sidebar-item-separator-padding: var(--spacing-xxs) var(--sidebar-item-padding-horizontal); // @presenter Spacing
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @tokens Sidebar item http tag
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
--sidebar-item-http-tag-width: auto;
|
|
142
|
+
--sidebar-item-http-tag-height: 20px;
|
|
143
|
+
--sidebar-item-http-tag-font-family: var(--code-font-family); // @presenter FontFamily
|
|
144
|
+
--sidebar-item-http-tag-font-size: var(--font-size-sm); // @presenter FontSize
|
|
145
|
+
--sidebar-item-http-tag-font-weight: normal; //@presenter FontWeight
|
|
146
|
+
--sidebar-item-http-tag-border-radius: var(--border-radius-xlg); // @presenter BorderRadius
|
|
147
|
+
--sidebar-item-http-tag-margin: 0 0 0 5px;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @tokens Sidebar back button
|
|
151
|
+
*/
|
|
152
|
+
--sidebar-back-button-font-family: var(--sidebar-item-font-family);
|
|
153
|
+
--sidebar-back-button-font-size: var(--sidebar-item-font-size); // @presenter FontSize
|
|
154
|
+
--sidebar-back-button-transform: inherit; // @presenter TextTransform
|
|
155
|
+
--sidebar-back-button-text-color: var(--sidebar-item-text-color); // @presenter Color
|
|
156
|
+
--sidebar-back-button-background-color: transparent; // @presenter Color
|
|
157
|
+
--sidebar-back-button-hover-text-color: var(--sidebar-item-active-color); // @presenter Color
|
|
158
|
+
--sidebar-back-button-hover-background-color: transparent; // @presenter Color
|
|
159
|
+
--sidebar-back-button-icon-color: var(--sidebar-item-text-color); // @presenter Color
|
|
160
|
+
--sidebar-back-button-margin: 0 0 var(--spacing-lg) 0; // @presenter Spacing
|
|
161
|
+
--sidebar-back-padding-left: var(--spacing-xs); // @presenter Spacing
|
|
162
|
+
--sidebar-back-button-icon: none;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @tokens Sidebar footer
|
|
166
|
+
*/
|
|
167
|
+
--sidebar-footer-padding-vertical: var(--spacing-sm); // @presenter Spacing
|
|
168
|
+
--sidebar-footer-padding-horizontal: var(--spacing-lg); // @presenter Spacing
|
|
169
|
+
--sidebar-collapse-button-background-color: var(--bg-overlay); // @presenter Color
|
|
170
|
+
--sidebar-collapse-button-icon-color: var(--text-primary); // @presenter Color
|
|
171
|
+
--sidebar-collapse-button-border-color: var(--border-primary); // @presenter Color
|
|
172
|
+
--sidebar-collapse-button-active-background-color: unset; // @presenter Color
|
|
173
|
+
--sidebar-collapse-button-active-border-color: 0; // @presenter Color
|
|
174
|
+
|
|
175
|
+
--sidebar-controls-collapsed-gap: var(--spacing-xs); // @presenter Spacing
|
|
176
|
+
--sidebar-controls-collapsed-padding-vertical: var(--spacing-xs); // @presenter Spacing
|
|
177
|
+
--sidebar-controls-collapsed-padding-horizontal: var(--spacing-xxs); // @presenter Spacing
|
|
178
|
+
|
|
179
|
+
// @tokens End
|
|
180
|
+
`;
|
|
181
|
+
|
|
182
|
+
export const versionPicker = css`
|
|
183
|
+
/**
|
|
184
|
+
* @tokens Version picker
|
|
185
|
+
* */
|
|
186
|
+
|
|
187
|
+
--version-picker-font-size: var(--font-size-base); // @presenter FontSize
|
|
188
|
+
--version-picker-font-weight: var(--select-font-weight); // @presenter FontWeight
|
|
189
|
+
--version-picker-line-height: var(--select-line-height); // @presenter LineHeight
|
|
190
|
+
--version-picker-text-color: var(--select-text-color); // @presenter Color
|
|
191
|
+
--version-picker-border-radius: var(--select-border-radius); // @presenter BorderRadius
|
|
192
|
+
--version-picker-margin-vertical: 10px; // @presenter Spacing
|
|
193
|
+
--version-picker-margin-horizontal: 15px; // @presenter Spacing
|
|
194
|
+
|
|
195
|
+
--version-picker-input-padding-horizontal: var(--select-input-padding-horizontal); // @presenter Spacing
|
|
196
|
+
--version-picker-input-padding-vertical: var(--select-input-padding-vertical); // @presenter Spacing
|
|
197
|
+
--version-picker-input-border: 1px solid var(--border-primary); // @presenter Border
|
|
198
|
+
--version-picker-input-border-radius: var(--select-input-border-radius); // @presenter BorderRadius
|
|
199
|
+
|
|
200
|
+
--version-picker-list-min-width: var(--select-list-min-width);
|
|
201
|
+
--version-picker-list-max-width: var(--select-list-max-width);
|
|
202
|
+
--version-picker-list-padding: var(--select-list-padding); // @presenter Spacing
|
|
203
|
+
--version-picker-list-border-radius: var(--select-list-border-radius); // @presenter BorderRadius
|
|
204
|
+
--version-picker-list-background-color: var(--select-list-background-color); // @presenter Color
|
|
205
|
+
--version-picker-list-box-shadow: var(--select-list-box-shadow); // @presenter Shadow
|
|
206
|
+
|
|
207
|
+
--version-picker-list-item-horizontal-padding: var(--select-list-item-horizontal-padding); // @presenter Spacing
|
|
208
|
+
--version-picker-list-item-vertical-padding: var(--select-list-item-vertical-padding); // @presenter Spacing
|
|
209
|
+
--version-picker-list-item-border-radius: var(--select-list-item-border-radius); // @presenter BorderRadius
|
|
210
|
+
--version-picker-list-item-active-background-color: var(--select-list-item-active-background-color); // @presenter Color
|
|
211
|
+
--version-picker-list-item-hover-background-color: var(--select-list-item-hover-background-color); // @presenter Color
|
|
212
|
+
|
|
213
|
+
// @tokens End
|
|
214
|
+
`;
|