@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
|
@@ -3,9 +3,9 @@ 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';
|
|
7
6
|
import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
8
7
|
import { useTranslate } from '@portal/hooks';
|
|
8
|
+
import { UserProfileData } from '@theme/components/Profile/UserProfileData';
|
|
9
9
|
import { telemetry } from '@portal/telemetry';
|
|
10
10
|
|
|
11
11
|
export function MobileUserProfile() {
|
|
@@ -30,12 +30,7 @@ export function MobileUserProfile() {
|
|
|
30
30
|
</LoginButton>
|
|
31
31
|
) : (
|
|
32
32
|
<>
|
|
33
|
-
<
|
|
34
|
-
<ProfilePicture>
|
|
35
|
-
<Profile name={userData.name} imageUrl={userData.picture} />
|
|
36
|
-
</ProfilePicture>
|
|
37
|
-
<UserName>{userData.name}</UserName>
|
|
38
|
-
</UserDataWrapper>
|
|
33
|
+
<UserProfileData userData={userData} />
|
|
39
34
|
<LogoutButton
|
|
40
35
|
onClick={() => {
|
|
41
36
|
handleLogout();
|
|
@@ -51,16 +46,23 @@ export function MobileUserProfile() {
|
|
|
51
46
|
}
|
|
52
47
|
const LoginButton = styled.a`
|
|
53
48
|
background: var(--mobile-menu-login-button-background);
|
|
54
|
-
border-radius:
|
|
49
|
+
border-radius: var(--mobile-menu-login-button-border-radius);
|
|
55
50
|
width: 100%;
|
|
56
51
|
margin: 0;
|
|
57
52
|
padding: 5px 0;
|
|
58
53
|
color: var(--mobile-menu-login-button-color);
|
|
59
|
-
|
|
54
|
+
border: 1px solid var(--mobile-menu-login-button-border-color);
|
|
55
|
+
font-size: var(--mobile-menu-login-button-font-size);
|
|
56
|
+
font-family: var(--mobile-menu-login-button-font-family);
|
|
57
|
+
font-weight: var(--mobile-menu-login-button-font-weight);
|
|
60
58
|
text-align: center;
|
|
61
|
-
line-height:
|
|
59
|
+
line-height: var(--mobile-menu-login-button-line-height);
|
|
62
60
|
cursor: pointer;
|
|
63
61
|
text-decoration: none;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
color: var(--mobile-menu-login-button-hover-color);
|
|
65
|
+
}
|
|
64
66
|
`;
|
|
65
67
|
|
|
66
68
|
const MobileProfileWrapper = styled.div`
|
|
@@ -74,25 +76,6 @@ const MobileProfileWrapper = styled.div`
|
|
|
74
76
|
background: var(--mobile-menu-profile-background);
|
|
75
77
|
`;
|
|
76
78
|
|
|
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
|
-
|
|
96
79
|
const LogoutButton = styled.div`
|
|
97
80
|
cursor: pointer;
|
|
98
81
|
user-select: none;
|
|
@@ -10,13 +10,10 @@ export interface ProfileProps {
|
|
|
10
10
|
onClick?: () => void;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function ProfileComponent({ name = 'User', imageUrl, onClick
|
|
13
|
+
function ProfileComponent({ name = 'User', imageUrl, onClick }: ProfileProps): JSX.Element {
|
|
14
14
|
if (imageUrl) {
|
|
15
15
|
return (
|
|
16
16
|
<ProfileWrapper onClick={onClick} role="link">
|
|
17
|
-
<StyledUserName data-cy="user-name" color={color}>
|
|
18
|
-
{name}
|
|
19
|
-
</StyledUserName>
|
|
20
17
|
{imageUrl && (
|
|
21
18
|
<AvatarWrapper>
|
|
22
19
|
<img data-cy="user-avatar" src={imageUrl} alt="profile" />
|
|
@@ -32,9 +29,6 @@ function ProfileComponent({ name = 'User', imageUrl, onClick, color }: ProfilePr
|
|
|
32
29
|
|
|
33
30
|
return (
|
|
34
31
|
<ProfileWrapper onClick={onClick} role="link">
|
|
35
|
-
<StyledUserName data-cy="user-name" color={color}>
|
|
36
|
-
{name}
|
|
37
|
-
</StyledUserName>
|
|
38
32
|
<AvatarWrapper background={stringToHslColor(name)}>
|
|
39
33
|
<span>{avatarLetters}</span>
|
|
40
34
|
</AvatarWrapper>
|
|
@@ -51,22 +45,6 @@ export const ProfileWrapper = styled.div.attrs(() => ({
|
|
|
51
45
|
align-items: center;
|
|
52
46
|
cursor: pointer;
|
|
53
47
|
width: auto;
|
|
54
|
-
padding: 0 var(--navbar-item-padding-horizontal);
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
const StyledUserName = styled.span`
|
|
58
|
-
font-family: var(--profile-name-font-family);
|
|
59
|
-
font-size: var(--profile-name-font-size);
|
|
60
|
-
font-weight: var(--profile-name-font-weight);
|
|
61
|
-
color: var(--profile-name-text-color);
|
|
62
|
-
padding: var(--profile-name-padding-vertical) var(--profile-name-padding-horizontal);
|
|
63
|
-
margin: 0 var(--profile-name-margin-horizontal);
|
|
64
|
-
|
|
65
|
-
display: none;
|
|
66
|
-
|
|
67
|
-
${({ theme }) => theme.mediaQueries?.medium} {
|
|
68
|
-
display: block;
|
|
69
|
-
}
|
|
70
48
|
`;
|
|
71
49
|
|
|
72
50
|
export const AvatarWrapper = styled.div<{ background?: string }>`
|
|
@@ -86,7 +64,6 @@ export const AvatarWrapper = styled.div<{ background?: string }>`
|
|
|
86
64
|
font-weight: var(--profile-avatar-font-weight);
|
|
87
65
|
|
|
88
66
|
border-radius: var(--profile-avatar-border-radius);
|
|
89
|
-
margin-left: var(--profile-avatar-margin-left);
|
|
90
67
|
|
|
91
68
|
${({ background }) => css`
|
|
92
69
|
background-color: ${background};
|
|
@@ -9,6 +9,8 @@ import { useThemeConfig } from '@theme/hooks/useThemeConfig';
|
|
|
9
9
|
import { useTranslate } from '@portal/hooks';
|
|
10
10
|
import { telemetry } from '@portal/telemetry';
|
|
11
11
|
import { Dropdown, DropdownList, DropdownListItem } from '@theme/components/Dropdown';
|
|
12
|
+
import { UserProfileData } from '@theme/components/Profile/UserProfileData';
|
|
13
|
+
import { LogoutIcon } from '@theme/icons';
|
|
12
14
|
|
|
13
15
|
export function UserProfile({
|
|
14
16
|
userData,
|
|
@@ -23,7 +25,7 @@ export function UserProfile({
|
|
|
23
25
|
};
|
|
24
26
|
const [isOpened, setIsOpened] = useState<boolean>(false);
|
|
25
27
|
|
|
26
|
-
const menuItems: JSX.Element[] = [];
|
|
28
|
+
const menuItems: JSX.Element[] = [<UserProfileData key={userData.name} userData={userData} />];
|
|
27
29
|
|
|
28
30
|
if (hasDeveloperOnboarding) {
|
|
29
31
|
menuItems.push(
|
|
@@ -57,12 +59,13 @@ export function UserProfile({
|
|
|
57
59
|
data-translation-key={translationKeys.logout}
|
|
58
60
|
role="link"
|
|
59
61
|
>
|
|
62
|
+
<LogoutIcon />
|
|
60
63
|
{translate(translationKeys.logout, userProfile?.logoutLabel || 'Log out')}
|
|
61
64
|
</Logout>,
|
|
62
65
|
);
|
|
63
66
|
|
|
64
67
|
return (
|
|
65
|
-
<ProfileDropdown items={menuItems}>
|
|
68
|
+
<ProfileDropdown items={menuItems} alignment="end">
|
|
66
69
|
<Profile
|
|
67
70
|
name={userData.name}
|
|
68
71
|
imageUrl={userData.picture}
|
|
@@ -96,14 +99,23 @@ const ProfileDropdown = styled(Dropdown).attrs(() => ({
|
|
|
96
99
|
${DropdownListItem} {
|
|
97
100
|
border-radius: var(--profile-dropdown-list-item-border-radius);
|
|
98
101
|
|
|
99
|
-
& > * {
|
|
100
|
-
padding: var(--profile-dropdown-list-item-vertical-padding)
|
|
101
|
-
var(--profile-dropdown-list-item-horizontal-padding);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
102
|
:hover {
|
|
105
103
|
background-color: var(--profile-dropdown-list-item-active-background-color);
|
|
106
104
|
}
|
|
105
|
+
|
|
106
|
+
:first-child {
|
|
107
|
+
cursor: default;
|
|
108
|
+
background-color: var(--profile-dropdown-list-background-color);
|
|
109
|
+
}
|
|
107
110
|
}
|
|
108
111
|
`;
|
|
109
|
-
|
|
112
|
+
|
|
113
|
+
const Logout = styled.div`
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
color: var(--profile-dropdown-logout-color);
|
|
118
|
+
fill: var(--profile-dropdown-logout-color);
|
|
119
|
+
border-top: 1px solid var(--profile-dropdown-logout-border-color);
|
|
120
|
+
padding: var(--profile-dropdown-logout-padding);
|
|
121
|
+
`;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Profile } from '@theme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
|
|
5
|
+
import { AvatarWrapper, ProfileWrapper } from '@theme/components/Profile/Profile';
|
|
6
|
+
|
|
7
|
+
interface UserProfileDataProps {
|
|
8
|
+
userData: { name: string; picture: string };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function UserProfileData(props: UserProfileDataProps) {
|
|
12
|
+
const { userData } = props;
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<UserProfileDataWrapper>
|
|
16
|
+
<ProfilePicture>
|
|
17
|
+
<Profile name={userData.name} imageUrl={userData.picture} />
|
|
18
|
+
</ProfilePicture>
|
|
19
|
+
<UserName>{userData.name}</UserName>
|
|
20
|
+
</UserProfileDataWrapper>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const UserProfileDataWrapper = styled.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
`;
|
|
28
|
+
const ProfilePicture = styled.div`
|
|
29
|
+
margin-right: 16px;
|
|
30
|
+
|
|
31
|
+
${AvatarWrapper} {
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
${ProfileWrapper} {
|
|
36
|
+
padding: 0;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
const UserName = styled.div``;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const userProfile = css`
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @tokens User Profile
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
--profile-avatar-width: var(--control-height-base); // @presenter Spacing
|
|
10
|
+
--profile-avatar-height: var(--control-height-base); // @presenter Spacing
|
|
11
|
+
--profile-avatar-border-radius: 50%; // @presenter BorderRadius
|
|
12
|
+
|
|
13
|
+
--profile-avatar-font-family: var(--navbar-item-font-family); // @presenter FontFamily
|
|
14
|
+
--profile-avatar-font-size: var(--navbar-item-font-size); // @presenter FontSize
|
|
15
|
+
--profile-avatar-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
16
|
+
--profile-avatar-line-height: var(--line-height-base); // @presenter LineHeight
|
|
17
|
+
|
|
18
|
+
--profile-avatar-padding-vertical: var(--spacing-base); // @presenter Spacing
|
|
19
|
+
--profile-avatar-padding-horizontal: var(--spacing-base); // @presenter Spacing
|
|
20
|
+
|
|
21
|
+
// @tokens End
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const userProfileDropdown = css`
|
|
25
|
+
/**
|
|
26
|
+
* @tokens User profile menu dropdown
|
|
27
|
+
* */
|
|
28
|
+
|
|
29
|
+
--profile-dropdown-font-size: var(--dropdown-font-size); // @presenter FontSize
|
|
30
|
+
--profile-dropdown-font-weight: var(--dropdown-font-weight); // @presenter FontWeight
|
|
31
|
+
--profile-dropdown-line-height: var(--dropdown-line-height); // @presenter LineHeight
|
|
32
|
+
--profile-dropdown-text-color: var(--dropdown-text-color); // @presenter Color
|
|
33
|
+
--profile-dropdown-border-radius: var(--dropdown-border-radius); // @presenter BorderRadius
|
|
34
|
+
|
|
35
|
+
--profile-dropdown-list-min-width: var(--dropdown-list-min-width);
|
|
36
|
+
--profile-dropdown-list-max-width: var(--dropdown-list-max-width);
|
|
37
|
+
--profile-dropdown-list-padding: var(--dropdown-list-padding); // @presenter Spacing
|
|
38
|
+
--profile-dropdown-list-border-radius: var(--dropdown-list-border-radius); // @presenter BorderRadius
|
|
39
|
+
--profile-dropdown-list-background-color: var(--dropdown-list-background-color); // @presenter Color
|
|
40
|
+
--profile-dropdown-list-box-shadow: var(--dropdown-list-box-shadow); // @presenter Shadow
|
|
41
|
+
|
|
42
|
+
--profile-dropdown-list-item-horizontal-padding: var(--dropdown-list-item-horizontal-padding); // @presenter Spacing
|
|
43
|
+
--profile-dropdown-list-item-vertical-padding: var(--dropdown-list-item-vertical-padding); // @presenter Spacing
|
|
44
|
+
--profile-dropdown-list-item-border-radius: var(--dropdown-list-item-border-radius); // @presenter BorderRadius
|
|
45
|
+
--profile-dropdown-list-item-active-background-color: var(--dropdown-list-item-active-background-color); // @presenter Color
|
|
46
|
+
--profile-dropdown-list-item-separator-color: var(--dropdown-list-item-separator-color); // @presenter Color
|
|
47
|
+
|
|
48
|
+
--profile-dropdown-logout-color: var(--color-error-base);
|
|
49
|
+
--profile-dropdown-logout-border-color: var(--border-secondary);
|
|
50
|
+
--profile-dropdown-logout-padding: 0 0 0 var(--spacing-xxs);
|
|
51
|
+
|
|
52
|
+
// @tokens End
|
|
53
|
+
`
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { useTranslate } from '@theme/mocks/hooks';
|
|
5
|
+
import { Button } from '@theme/components/Button';
|
|
5
6
|
|
|
6
7
|
export function CancelSearch({
|
|
7
8
|
onClick,
|
|
@@ -17,27 +18,13 @@ export function CancelSearch({
|
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
20
|
<Wrapper data-component-name="Search/CancelSearch" onClick={onClick} className={className}>
|
|
20
|
-
<Button data-translation-keys={translationKeys.cancel}>
|
|
21
|
+
<Button data-translation-keys={translationKeys.cancel} fullWidth variant="outlined">
|
|
21
22
|
{translate(translationKeys.cancel, 'Cancel')}
|
|
22
23
|
</Button>
|
|
23
24
|
</Wrapper>
|
|
24
25
|
);
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
const Button = styled.div`
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
align-items: center;
|
|
32
|
-
flex-grow: 1;
|
|
33
|
-
padding: 4px 16px;
|
|
34
|
-
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
35
|
-
border-radius: 6px;
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
line-height: 22px;
|
|
38
|
-
height: 32px;
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
28
|
const Wrapper = styled.div`
|
|
42
29
|
display: flex;
|
|
43
30
|
padding: 12px 16px 16px;
|
|
@@ -26,17 +26,17 @@ const Wrapper = styled.div`
|
|
|
26
26
|
align-items: center;
|
|
27
27
|
padding: 1px 8px;
|
|
28
28
|
gap: 4px;
|
|
29
|
-
background:
|
|
30
|
-
border: 1px solid
|
|
31
|
-
border-radius:
|
|
32
|
-
margin-right:
|
|
29
|
+
background: var(--bg-overlay);
|
|
30
|
+
border: 1px solid var(--border-secondary);
|
|
31
|
+
border-radius: var(--border-radius-xlg);
|
|
32
|
+
margin-right: var(--spacing-base);
|
|
33
33
|
`;
|
|
34
34
|
|
|
35
35
|
const Label = styled.span`
|
|
36
|
-
color:
|
|
37
|
-
font-weight:
|
|
38
|
-
font-size:
|
|
39
|
-
line-height:
|
|
36
|
+
color: var(--text-secondary);
|
|
37
|
+
font-weight: var(--font-weight-regular);
|
|
38
|
+
font-size: var(--font-size-sm);
|
|
39
|
+
line-height: var(--line-height-sm);
|
|
40
40
|
`;
|
|
41
41
|
|
|
42
42
|
const ClearIcon = styled(ThemeClearIcon)`
|
|
@@ -65,9 +65,9 @@ const Wrapper = styled.div`
|
|
|
65
65
|
|
|
66
66
|
const Title = styled.div`
|
|
67
67
|
color: var(--search-item-title-text-color);
|
|
68
|
-
font-weight:
|
|
69
|
-
font-size: var(--font-size-
|
|
70
|
-
line-height:
|
|
68
|
+
font-weight: var(--font-weight-bold);
|
|
69
|
+
font-size: var(--font-size-sm);
|
|
70
|
+
line-height: var(--line-height-sm);
|
|
71
71
|
padding: 8px 24px;
|
|
72
72
|
`;
|
|
73
73
|
|
|
@@ -81,7 +81,7 @@ const RecentItems = styled.div`
|
|
|
81
81
|
const ClockBackwardsIcon = styled(ThemeClockBackwardsIcon)`
|
|
82
82
|
width: 16px;
|
|
83
83
|
height: 16px;
|
|
84
|
-
fill:
|
|
84
|
+
fill: var(--text-description);
|
|
85
85
|
`;
|
|
86
86
|
|
|
87
87
|
const ClearIcon = styled(ThemeClearIcon)`
|
|
@@ -115,7 +115,7 @@ const Item = styled.div`
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
:focus-visible {
|
|
118
|
-
outline: 2px solid var(--color-primary
|
|
118
|
+
outline: 2px solid var(--color-primary);
|
|
119
119
|
border-radius: 2px;
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -5,15 +5,20 @@ import type { SVGProps } from 'react';
|
|
|
5
5
|
|
|
6
6
|
const Icon = (props: SVGProps<SVGSVGElement>) => (
|
|
7
7
|
<svg
|
|
8
|
+
width="16"
|
|
9
|
+
height="16"
|
|
10
|
+
viewBox="0 0 16 16"
|
|
11
|
+
fill="none"
|
|
8
12
|
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
version="1.1"
|
|
10
|
-
x="0"
|
|
11
|
-
y="0"
|
|
12
|
-
viewBox="0 0 490 490"
|
|
13
13
|
data-component-name="Search/SearchIcon"
|
|
14
14
|
{...props}
|
|
15
15
|
>
|
|
16
|
-
<path
|
|
16
|
+
<path
|
|
17
|
+
fillRule="evenodd"
|
|
18
|
+
clipRule="evenodd"
|
|
19
|
+
d="M6.66667 2.5C5.84258 2.5 5.037 2.74437 4.35179 3.20221C3.66659 3.66005 3.13254 4.31079 2.81717 5.07215C2.50181 5.83351 2.41929 6.67129 2.58006 7.47954C2.74084 8.2878 3.13767 9.03023 3.72039 9.61295C4.30311 10.1957 5.04554 10.5925 5.85379 10.7533C6.66205 10.914 7.49982 10.8315 8.26118 10.5162C9.02254 10.2008 9.67329 9.66675 10.1311 8.98154C10.589 8.29634 10.8333 7.49076 10.8333 6.66667C10.8333 5.5616 10.3943 4.50179 9.61295 3.72039C8.83155 2.93899 7.77174 2.5 6.66667 2.5ZM3.79622 2.37074C4.64588 1.80302 5.6448 1.5 6.66667 1.5C8.03695 1.5 9.35112 2.04434 10.3201 3.01328C11.289 3.98222 11.8333 5.29638 11.8333 6.66667C11.8333 7.68854 11.5303 8.68746 10.9626 9.53711C10.8672 9.67996 10.7649 9.8175 10.6565 9.94935L14.3536 13.6464C14.5488 13.8417 14.5488 14.1583 14.3536 14.3536C14.1583 14.5488 13.8417 14.5488 13.6464 14.3536L9.94935 10.6565C9.55739 10.979 9.11792 11.2437 8.64387 11.44C7.69978 11.8311 6.66094 11.9334 5.6587 11.7341C4.65647 11.5347 3.73586 11.0426 3.01328 10.3201C2.29071 9.59748 1.79864 8.67687 1.59928 7.67463C1.39992 6.6724 1.50224 5.63355 1.89329 4.68947C2.28434 3.74538 2.94657 2.93846 3.79622 2.37074Z"
|
|
20
|
+
fill="#A8A8A8"
|
|
21
|
+
/>
|
|
17
22
|
</svg>
|
|
18
23
|
);
|
|
19
24
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Tag } from '@theme/components/Tag';
|
|
5
5
|
import { Link } from '@portal/Link';
|
|
6
6
|
import { highlight } from '@theme/components/Search/utils';
|
|
7
7
|
import type { ActiveItem } from '@theme/types/portal/src/shared/types/activeItem';
|
|
@@ -28,7 +28,7 @@ export function SearchItem({ item, className, product }: SearchItemProps): JSX.E
|
|
|
28
28
|
{product && <ProductTag label={product} />}
|
|
29
29
|
{item.httpVerb ? (
|
|
30
30
|
<Operation>
|
|
31
|
-
<
|
|
31
|
+
<Tag color={item.httpVerb}>{item.httpVerb.toUpperCase()}</Tag>
|
|
32
32
|
{item.pathName ? highlight(item.pathName) : null}
|
|
33
33
|
</Operation>
|
|
34
34
|
) : null}
|
|
@@ -125,7 +125,7 @@ const Description = styled.div`
|
|
|
125
125
|
`;
|
|
126
126
|
|
|
127
127
|
const Path = styled.div`
|
|
128
|
-
font-size: var(--font-size-
|
|
128
|
+
font-size: var(--font-size-sm);
|
|
129
129
|
overflow: hidden;
|
|
130
130
|
text-overflow: ellipsis;
|
|
131
131
|
line-height: 22px;
|
|
@@ -135,7 +135,7 @@ const Place = styled.div`
|
|
|
135
135
|
display: flex;
|
|
136
136
|
flex-direction: column;
|
|
137
137
|
gap: 5px;
|
|
138
|
-
font-size: var(--font-size-
|
|
138
|
+
font-size: var(--font-size-sm);
|
|
139
139
|
overflow: hidden;
|
|
140
140
|
text-overflow: ellipsis;
|
|
141
141
|
|
|
@@ -39,8 +39,9 @@ const Wrapper = styled.div`
|
|
|
39
39
|
background-color: var(--search-trigger-background-color);
|
|
40
40
|
border: var(--search-trigger-border);
|
|
41
41
|
border-radius: var(--search-trigger-border-radius);
|
|
42
|
-
padding:
|
|
42
|
+
padding: var(--search-trigger-padding);
|
|
43
43
|
user-select: none;
|
|
44
|
+
gap: var(--search-trigger-gap);
|
|
44
45
|
|
|
45
46
|
:hover {
|
|
46
47
|
background-color: var(--search-trigger-hover-background-color);
|
|
@@ -56,13 +57,11 @@ const Wrapper = styled.div`
|
|
|
56
57
|
`;
|
|
57
58
|
|
|
58
59
|
const Label = styled.span`
|
|
59
|
-
padding-left: 10px;
|
|
60
|
-
padding-right: 16px;
|
|
61
60
|
font-size: var(--search-trigger-font-size);
|
|
62
61
|
`;
|
|
63
62
|
|
|
64
63
|
const SearchIconSmall = styled(SearchIcon)`
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
64
|
+
width: var(--search-trigger-icon-size);
|
|
65
|
+
height: var(--search-trigger-icon-size);
|
|
67
66
|
fill: var(--search-trigger-text-color);
|
|
68
67
|
`;
|
|
@@ -23,9 +23,5 @@ export function ShortcutKey(props: ShortcutKeyProps): JSX.Element {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export const Wrapper = styled.div`
|
|
26
|
-
|
|
27
|
-
font-size: 0.75em;
|
|
28
|
-
right: 1em;
|
|
29
|
-
color: var(--search-trigger-shortcut-text-color);
|
|
30
|
-
opacity: 0.5;
|
|
26
|
+
font-size: var(--search-trigger-shortcut-font-size);
|
|
31
27
|
`;
|
|
@@ -47,8 +47,8 @@ const Wrapper = styled.div`
|
|
|
47
47
|
const Title = styled.div`
|
|
48
48
|
color: var(--search-item-title-text-color);
|
|
49
49
|
font-weight: var(--font-weight-bold);
|
|
50
|
-
font-size: var(--font-size-
|
|
51
|
-
line-height:
|
|
50
|
+
font-size: var(--font-size-sm);
|
|
51
|
+
line-height: var(--line-height-sm);
|
|
52
52
|
padding: 8px 24px;
|
|
53
53
|
`;
|
|
54
54
|
|
|
@@ -89,7 +89,7 @@ const PageLink = styled(Link)`
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
:focus-visible {
|
|
92
|
-
outline: 2px solid var(--color-primary
|
|
92
|
+
outline: 2px solid var(--color-primary);
|
|
93
93
|
border-radius: 2px;
|
|
94
94
|
}
|
|
95
95
|
`;
|
|
@@ -14,3 +14,4 @@ export * from '@theme/components/Search/MobileSearchTrigger';
|
|
|
14
14
|
export * from '@theme/components/Search/CancelSearch';
|
|
15
15
|
export * from '@theme/components/Search/ProductTag';
|
|
16
16
|
export * from '@theme/components/Search/utils';
|
|
17
|
+
export * from '@theme/components/Search/styledVariables';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const search = css`
|
|
4
|
+
/**
|
|
5
|
+
* @tokens Search
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
--search-highlight-background-color: none; // @presenter Color
|
|
9
|
+
--search-highlight-text-color: var(--color-info); // @presenter Color
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @tokens Portal Search
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
--search-input-background-color: var(--bg-raised); // @presenter Color
|
|
16
|
+
--search-input-text-color: var(--text-primary); // @presenter Color
|
|
17
|
+
|
|
18
|
+
--search-input-border: none;
|
|
19
|
+
--search-input-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
20
|
+
--search-input-font-size: var(--font-size-base); // @presenter FontSize
|
|
21
|
+
--search-input-font-family: var(--font-family-base); // @presenter FontFamily
|
|
22
|
+
--search-input-line-height: 1.15em; // @presenter LineHeight
|
|
23
|
+
|
|
24
|
+
--search-input-hover-background-color: var(--bg-raised); // @presenter Color
|
|
25
|
+
--search-input-hover-border: none; // @presenter Color
|
|
26
|
+
--search-input-placeholder-color: var(--text-placeholder);
|
|
27
|
+
--search-input-icons-color: var(--text-placeholder);
|
|
28
|
+
|
|
29
|
+
--search-popover-background-color: var(--bg-base); // @presenter Color
|
|
30
|
+
--search-popover-border-radius: var(--search-input-border-radius); // @presenter BorderRadius
|
|
31
|
+
--search-popover-shadow: var(--bg-base-shadow); // @presenter BoxShadow
|
|
32
|
+
--search-popover-border: none;
|
|
33
|
+
|
|
34
|
+
--search-item-padding: 8px 24px;
|
|
35
|
+
--search-item-text-color: var(--text-secondary); // @presenter Color
|
|
36
|
+
--search-item-title-text-color: var(--text-primary); // @presenter Color
|
|
37
|
+
--search-item-path-text-color: var(--text-description); // @presenter Color
|
|
38
|
+
--search-item-background-color: transparent; // @presenter Color
|
|
39
|
+
--search-item-active-text-color: var(--text-primary); // @presenter Color
|
|
40
|
+
--search-item-active-title-text-color: var(--text-primary); // @presenter Color
|
|
41
|
+
--search-item-active-background-color: var(--bg-raised); // @presenter Color
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @tokens Sidebar Search
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
--sidebar-search-button-background-color: transparent; // @presenter Color
|
|
48
|
+
--sidebar-search-button-text-color: var(--text-secondary); // @presenter Color
|
|
49
|
+
--sidebar-search-button-border: var(--border-primary);
|
|
50
|
+
--sidebar-search-button-border-radius: none; // @presenter BorderRadius
|
|
51
|
+
--sidebar-search-button-font-size: var(--font-size-sm); // @presenter FontSize
|
|
52
|
+
--sidebar-search-button-font-family: var(--font-family-base); // @presenter FontFamily
|
|
53
|
+
--sidebar-search-button-line-height: 1.15em; // @presenter LineHeight
|
|
54
|
+
--sidebar-search-button-hover-background-color: transparent; // @presenter Color
|
|
55
|
+
--sidebar-search-button-hover-border: var(--border-primary); // @presenter Color
|
|
56
|
+
--sidebar-search-button-active-background-color: transparent; // @presenter Color
|
|
57
|
+
--sidebar-search-button-active-border: var(--border-primary); // @presenter Color
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @tokens Search results modal
|
|
61
|
+
* @presenter Color
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
--search-modal-background: var(--bg-base);
|
|
65
|
+
--search-modal-text-color: var(--text-primary);
|
|
66
|
+
--search-modal-border: none;
|
|
67
|
+
--search-modal-box-shadow: none;
|
|
68
|
+
|
|
69
|
+
--search-modal-header-border-radius: var(--border-radius-lg);
|
|
70
|
+
--search-modal-header-background-color: var(--bg-raised);
|
|
71
|
+
--search-modal-clear-button-background-color: var(--bg-overlay);
|
|
72
|
+
--search-modal-clear-button-border: 1px solid var(--bg-overlay);
|
|
73
|
+
--search-modal-clear-button-hover-background-color: var(--bg-overlay);
|
|
74
|
+
--search-modal-clear-button-hover-border: 1px solid var(--border-primary);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @tokens Sidebar Trigger
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
--search-trigger-padding-horizontal: var(--spacing-sm);
|
|
81
|
+
--search-trigger-padding-vertical: calc(var(--spacing-unit) * 1.5);
|
|
82
|
+
--search-trigger-padding: var(--search-trigger-padding-vertical)
|
|
83
|
+
var(--search-trigger-padding-horizontal);
|
|
84
|
+
--search-trigger-text-color: var(--text-placeholder);
|
|
85
|
+
--search-trigger-background-color: var(--bg-base);
|
|
86
|
+
--search-trigger-border: 1px solid var(--border-primary);
|
|
87
|
+
--search-trigger-border-radius: var(--border-radius-md);
|
|
88
|
+
--search-trigger-hover-background-color: var(--navbar-item-hover-background-color);
|
|
89
|
+
--search-trigger-gap: var(--spacing-sm);
|
|
90
|
+
--search-trigger-font-size: var(--font-size-base);
|
|
91
|
+
--search-trigger-shortcut-font-size: var(--font-size-sm);
|
|
92
|
+
--search-trigger-icon-size: 16px;
|
|
93
|
+
|
|
94
|
+
// @tokens End
|
|
95
|
+
`;
|