@redocly/theme 0.18.3-patch.8 → 0.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/I18n/LanguagePicker.d.ts +2 -7
- package/lib/I18n/LanguagePicker.js +12 -27
- package/lib/I18n/index.d.ts +0 -1
- package/lib/I18n/index.js +0 -15
- package/lib/components/Breadcrumbs/Breadcrumb.js +5 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -6
- package/lib/components/Breadcrumbs/index.d.ts +0 -1
- package/lib/components/Breadcrumbs/index.js +0 -1
- package/lib/components/Button/Button.d.ts +3 -6
- package/lib/components/Button/Button.js +41 -41
- package/lib/components/Button/index.d.ts +0 -1
- package/lib/components/Button/index.js +0 -1
- package/lib/components/Catalog/Catalog.d.ts +0 -6
- package/lib/components/Catalog/Catalog.js +103 -108
- package/lib/components/Catalog/CatalogCard.js +58 -89
- package/lib/components/Catalog/index.d.ts +3 -4
- package/lib/components/Catalog/index.js +3 -4
- package/lib/components/CodeBlock/CodeBlockContainer.js +10 -38
- package/lib/components/CodeBlock/CodeBlockControlButton.d.ts +4 -3
- package/lib/components/CodeBlock/CodeBlockControlButton.js +19 -5
- package/lib/components/CodeBlock/CodeBlockControls.js +5 -8
- package/lib/components/CodeBlock/index.d.ts +0 -1
- package/lib/components/CodeBlock/index.js +0 -1
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +1 -0
- package/lib/components/Dropdown/Dropdown.d.ts +3 -9
- package/lib/components/Dropdown/Dropdown.js +4 -7
- package/lib/components/Dropdown/index.d.ts +0 -1
- package/lib/components/Dropdown/index.js +0 -1
- package/lib/components/EditPageButton/EditPageButton.js +1 -5
- package/lib/components/Feedback/Comment.js +0 -5
- package/lib/components/Feedback/Rating.js +1 -5
- package/lib/components/Feedback/Reasons.js +1 -6
- package/lib/components/Feedback/Sentiment.js +0 -5
- package/lib/components/Feedback/Thumbs.js +4 -4
- package/lib/components/Filter/Filter.d.ts +1 -3
- package/lib/components/Filter/Filter.js +80 -113
- package/lib/components/Filter/index.d.ts +0 -2
- package/lib/components/Filter/index.js +0 -2
- package/lib/components/Footer/CustomFooterNavItem.js +1 -1
- package/lib/components/Footer/Footer.d.ts +3 -4
- package/lib/components/Footer/Footer.js +10 -28
- package/lib/components/Footer/FooterColumn.d.ts +3 -3
- package/lib/components/Footer/FooterColumn.js +63 -55
- package/lib/components/Footer/FooterColumns.js +4 -6
- package/lib/components/Footer/FooterCopyright.js +6 -11
- package/lib/components/Footer/index.d.ts +0 -1
- package/lib/components/Footer/index.js +0 -1
- package/lib/components/JsonViewer/JsonViewer.js +2 -2
- package/lib/components/LastUpdated/LastUpdated.js +0 -1
- package/lib/components/Markdown/Admonition.js +9 -12
- package/lib/components/Markdown/MarkdownWrapper.js +4 -2
- package/lib/components/Markdown/Mermaid.js +1 -4
- package/lib/components/Markdown/index.d.ts +0 -1
- package/lib/components/Markdown/index.js +0 -1
- package/lib/components/Menu/Menu.js +7 -5
- package/lib/components/Menu/MenuGroup.js +7 -12
- package/lib/components/Menu/MenuItemLabel.js +13 -9
- package/lib/components/Menu/MobileMenu.js +25 -20
- package/lib/components/Menu/MobileMenuGroup.js +1 -1
- package/lib/components/Menu/index.d.ts +0 -1
- package/lib/components/Menu/index.js +0 -1
- package/lib/components/{Profile → Navbar}/MobileUserProfile.js +24 -12
- package/lib/components/Navbar/Navbar.js +11 -10
- package/lib/components/Navbar/NavbarItem.d.ts +1 -1
- package/lib/components/Navbar/NavbarItem.js +4 -11
- package/lib/components/Navbar/NavbarMenu.js +2 -2
- package/lib/components/Navbar/index.d.ts +0 -1
- package/lib/components/Navbar/index.js +0 -1
- package/lib/components/NavbarLogo/NavbarLogo.d.ts +1 -4
- package/lib/components/NavbarLogo/NavbarLogo.js +5 -13
- package/lib/components/NavbarLogo/index.d.ts +0 -1
- package/lib/components/NavbarLogo/index.js +0 -1
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.js +2 -2
- package/lib/components/OpenApiDocs/Dropdown.js +3 -3
- package/lib/components/OperationBadge/OperationBadge.d.ts +6 -0
- package/lib/components/OperationBadge/OperationBadge.js +68 -0
- package/lib/components/OperationBadge/index.d.ts +1 -0
- package/lib/{icons/LanguageIcon → components/OperationBadge}/index.js +1 -1
- package/lib/components/Panel/PanelHeader.js +0 -2
- package/lib/components/Panel/PanelHeaderTitle.js +4 -0
- package/lib/components/Panel/index.d.ts +0 -1
- package/lib/components/Panel/index.js +0 -1
- package/lib/components/Product/ProductPicker.js +5 -17
- package/lib/components/Product/index.d.ts +0 -1
- package/lib/components/Product/index.js +0 -1
- package/lib/components/Profile/LoginLink.js +2 -1
- package/lib/components/Profile/Profile.js +22 -3
- package/lib/components/Profile/UserProfile.js +9 -21
- package/lib/components/Profile/index.d.ts +0 -1
- package/lib/components/Profile/index.js +0 -15
- package/lib/components/Search/CancelSearch.js +14 -2
- package/lib/components/Search/ProductTag.js +8 -8
- package/lib/components/Search/RecentSearches.js +5 -5
- package/lib/components/Search/Search.js +2 -0
- package/lib/components/Search/SearchIcon.js +2 -2
- package/lib/components/Search/SearchItem.js +4 -4
- package/lib/components/Search/SearchTrigger.js +5 -4
- package/lib/components/Search/ShortcutKey.js +5 -1
- package/lib/components/Search/SuggestedPages.js +3 -3
- package/lib/components/Search/index.d.ts +0 -1
- package/lib/components/Search/index.js +0 -1
- package/lib/components/Select/Select.d.ts +9 -21
- package/lib/components/Select/Select.js +17 -28
- package/lib/components/Select/index.d.ts +0 -1
- package/lib/components/Select/index.js +0 -1
- package/lib/components/Separator/Separator.js +3 -11
- package/lib/components/Separator/SeparatorItem.js +9 -6
- package/lib/components/Separator/SeparatorLine.js +3 -7
- package/lib/components/Sidebar/ApiCallItem.d.ts +6 -2
- package/lib/components/Sidebar/ApiCallItem.js +13 -17
- package/lib/components/Sidebar/FooterWrapper.js +4 -3
- package/lib/components/Sidebar/HeaderWrapper.js +3 -3
- package/lib/components/Sidebar/VersionPicker.d.ts +3 -3
- package/lib/components/Sidebar/VersionPicker.js +4 -5
- package/lib/components/Sidebar/index.d.ts +0 -1
- package/lib/components/Sidebar/index.js +0 -1
- package/lib/components/Sidebar/types.d.ts +0 -1
- package/lib/components/SidebarActions/CollapseSidebarButton.js +1 -41
- package/lib/components/SidebarActions/styled.js +21 -29
- package/lib/components/TableOfContent/TableOfContent.js +3 -2
- package/lib/components/TableOfContent/index.d.ts +0 -1
- package/lib/components/TableOfContent/index.js +0 -1
- package/lib/components/Tabs/Tab.js +1 -1
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tags/Tags.d.ts +5 -0
- package/lib/components/Tags/Tags.js +32 -0
- package/lib/components/Tags/index.d.ts +1 -0
- package/lib/components/{Image → Tags}/index.js +1 -1
- package/lib/components/Tiles/ThinTile.js +5 -7
- package/lib/components/Tiles/TileHeader.js +1 -1
- package/lib/components/Tiles/TileText.js +1 -1
- package/lib/components/Tiles/WideTile.js +8 -10
- package/lib/components/Tooltip/index.d.ts +0 -1
- package/lib/components/Tooltip/index.js +0 -1
- package/lib/components/Typography/SectionHeader.js +2 -2
- package/lib/components/Typography/Typography.js +1 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +2 -1
- package/lib/config.d.ts +0 -113
- package/lib/config.js +3 -27
- package/lib/globalStyle.js +1983 -602
- package/lib/hooks/useMobileMenu.js +6 -5
- package/lib/icons/AlertIcon/AlertIcon.js +5 -0
- package/lib/icons/ArrowIcon/ArrowIcon.js +1 -1
- package/lib/icons/CollapseIcon/CollapseIcon.d.ts +1 -1
- package/lib/icons/CollapseIcon/CollapseIcon.js +5 -5
- package/lib/icons/ColorModeIcon/ColorModeIcon.js +1 -1
- package/lib/icons/CopyIcon/CopyIcon.d.ts +2 -1
- package/lib/icons/CopyIcon/CopyIcon.js +4 -4
- package/lib/icons/DeselectIcon/DeselectIcon.d.ts +1 -1
- package/lib/icons/DeselectIcon/DeselectIcon.js +5 -5
- package/lib/icons/ExpandIcon/ExpandIcon.d.ts +2 -1
- package/lib/icons/ExpandIcon/ExpandIcon.js +5 -5
- package/lib/icons/FileIcon/FileIcon.d.ts +2 -1
- package/lib/icons/FileIcon/FileIcon.js +2 -2
- package/lib/icons/ReportIcon/ReportIcon.d.ts +2 -1
- package/lib/icons/ReportIcon/ReportIcon.js +3 -3
- package/lib/icons/SelectIcon/SelectIcon.d.ts +2 -1
- package/lib/icons/SelectIcon/SelectIcon.js +5 -5
- package/lib/icons/index.d.ts +0 -4
- package/lib/icons/index.js +0 -4
- package/lib/layouts/Forbidden.js +0 -4
- package/lib/layouts/NotFound.js +0 -4
- package/lib/types/portal/src/shared/types/catalog.d.ts +1 -5
- package/lib/types/portal/src/shared/types/nav.d.ts +0 -5
- package/lib/ui/ArrowBack.js +1 -0
- 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 +84 -217
- package/lib/utils/css-variables.js +1 -1
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -1
- package/package.json +1 -1
- package/src/I18n/LanguagePicker.tsx +21 -48
- package/src/I18n/index.ts +0 -1
- package/src/components/Breadcrumbs/Breadcrumb.tsx +5 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +2 -6
- package/src/components/Breadcrumbs/index.ts +0 -1
- package/src/components/Button/Button.tsx +47 -53
- package/src/components/Button/index.ts +0 -1
- package/src/components/Catalog/Catalog.tsx +120 -135
- package/src/components/Catalog/CatalogCard.tsx +58 -106
- package/src/components/Catalog/index.tsx +3 -0
- package/src/components/CodeBlock/CodeBlockContainer.tsx +9 -17
- package/src/components/CodeBlock/CodeBlockControlButton.tsx +19 -6
- package/src/components/CodeBlock/CodeBlockControls.tsx +5 -8
- package/src/components/CodeBlock/index.ts +0 -1
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +1 -0
- package/src/components/Dropdown/Dropdown.tsx +5 -14
- package/src/components/Dropdown/index.ts +0 -1
- package/src/components/EditPageButton/EditPageButton.tsx +1 -5
- package/src/components/Feedback/Comment.tsx +0 -5
- package/src/components/Feedback/Rating.tsx +1 -5
- package/src/components/Feedback/Reasons.tsx +1 -6
- package/src/components/Feedback/Sentiment.tsx +0 -5
- package/src/components/Feedback/Thumbs.tsx +4 -4
- package/src/components/Filter/Filter.tsx +94 -150
- package/src/components/Filter/index.ts +0 -2
- package/src/components/Footer/CustomFooterNavItem.tsx +1 -1
- package/src/components/Footer/Footer.tsx +10 -32
- package/src/components/Footer/FooterColumn.tsx +63 -82
- package/src/components/Footer/FooterColumns.tsx +4 -6
- package/src/components/Footer/FooterCopyright.tsx +7 -13
- package/src/components/Footer/index.ts +0 -1
- package/src/components/JsonViewer/JsonViewer.tsx +2 -2
- package/src/components/LastUpdated/LastUpdated.tsx +2 -1
- package/src/components/Markdown/Admonition.tsx +8 -13
- package/src/components/Markdown/MarkdownWrapper.tsx +4 -2
- package/src/components/Markdown/Mermaid.tsx +1 -4
- package/src/components/Markdown/index.ts +0 -1
- package/src/components/Menu/Menu.tsx +7 -5
- package/src/components/Menu/MenuGroup.tsx +7 -15
- package/src/components/Menu/MenuItemLabel.tsx +13 -9
- package/src/components/Menu/MobileMenu.tsx +25 -20
- package/src/components/Menu/MobileMenuGroup.tsx +1 -1
- package/src/components/Menu/index.ts +0 -1
- package/src/components/{Profile → Navbar}/MobileUserProfile.tsx +29 -12
- package/src/components/Navbar/Navbar.tsx +11 -10
- package/src/components/Navbar/NavbarItem.tsx +4 -13
- package/src/components/Navbar/NavbarMenu.tsx +2 -2
- package/src/components/Navbar/index.ts +0 -1
- package/src/components/NavbarLogo/NavbarLogo.tsx +11 -24
- package/src/components/NavbarLogo/index.ts +0 -1
- package/src/components/OpenApiDocs/DevOnboardingTryItSecurity.tsx +2 -1
- package/src/components/OpenApiDocs/Dropdown.tsx +3 -3
- package/src/components/OperationBadge/OperationBadge.ts +62 -0
- package/src/components/OperationBadge/index.ts +1 -0
- package/src/components/Panel/PanelHeader.ts +0 -2
- package/src/components/Panel/PanelHeaderTitle.ts +4 -0
- package/src/components/Panel/index.ts +0 -1
- package/src/components/Product/ProductPicker.tsx +13 -18
- package/src/components/Product/index.ts +0 -1
- package/src/components/Profile/LoginLink.tsx +2 -1
- package/src/components/Profile/Profile.tsx +24 -1
- package/src/components/Profile/UserProfile.tsx +8 -20
- package/src/components/Profile/index.ts +0 -1
- package/src/components/Search/CancelSearch.tsx +15 -2
- package/src/components/Search/ProductTag.tsx +8 -8
- package/src/components/Search/RecentSearches.tsx +5 -5
- package/src/components/Search/Search.tsx +2 -0
- package/src/components/Search/SearchIcon.tsx +5 -10
- package/src/components/Search/SearchItem.tsx +4 -4
- package/src/components/Search/SearchTrigger.tsx +5 -4
- package/src/components/Search/ShortcutKey.tsx +5 -1
- package/src/components/Search/SuggestedPages.tsx +3 -3
- package/src/components/Search/index.ts +0 -1
- package/src/components/Select/Select.tsx +31 -66
- package/src/components/Select/index.ts +0 -1
- package/src/components/Separator/Separator.tsx +3 -17
- package/src/components/Separator/SeparatorItem.tsx +9 -6
- package/src/components/Separator/SeparatorLine.tsx +3 -7
- package/src/components/Sidebar/ApiCallItem.tsx +13 -17
- package/src/components/Sidebar/FooterWrapper.tsx +4 -3
- package/src/components/Sidebar/HeaderWrapper.tsx +3 -3
- package/src/components/Sidebar/VersionPicker.tsx +4 -5
- package/src/components/Sidebar/index.ts +0 -1
- package/src/components/Sidebar/types.ts +0 -1
- package/src/components/SidebarActions/CollapseSidebarButton.tsx +2 -22
- package/src/components/SidebarActions/styled.tsx +30 -29
- package/src/components/TableOfContent/TableOfContent.tsx +3 -2
- package/src/components/TableOfContent/index.ts +0 -1
- package/src/components/Tabs/Tab.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +1 -1
- package/src/components/Tags/Tags.tsx +36 -0
- package/src/components/Tags/index.ts +1 -0
- package/src/components/Tiles/ThinTile.tsx +5 -7
- package/src/components/Tiles/TileHeader.ts +1 -1
- package/src/components/Tiles/TileText.tsx +1 -1
- package/src/components/Tiles/WideTile.tsx +8 -10
- package/src/components/Tooltip/index.ts +0 -1
- package/src/components/Typography/SectionHeader.ts +2 -2
- package/src/components/Typography/Typography.ts +1 -1
- package/src/components/index.ts +2 -1
- package/src/config.ts +1 -30
- package/src/globalStyle.ts +1999 -597
- package/src/hooks/useMobileMenu.ts +4 -3
- package/src/icons/AlertIcon/AlertIcon.tsx +5 -0
- package/src/icons/ArrowIcon/ArrowIcon.tsx +1 -1
- package/src/icons/CollapseIcon/CollapseIcon.tsx +5 -5
- package/src/icons/ColorModeIcon/ColorModeIcon.tsx +1 -1
- package/src/icons/CopyIcon/CopyIcon.tsx +5 -4
- package/src/icons/DeselectIcon/DeselectIcon.tsx +5 -5
- package/src/icons/ExpandIcon/ExpandIcon.tsx +6 -5
- package/src/icons/FileIcon/FileIcon.tsx +3 -2
- package/src/icons/ReportIcon/ReportIcon.tsx +4 -3
- package/src/icons/SelectIcon/SelectIcon.tsx +6 -5
- package/src/icons/index.ts +0 -4
- package/src/layouts/Forbidden.tsx +0 -4
- package/src/layouts/NotFound.tsx +0 -4
- package/src/types/portal/src/shared/types/catalog.ts +1 -7
- package/src/types/portal/src/shared/types/nav.ts +0 -5
- package/src/ui/ArrowBack.tsx +1 -0
- 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 +84 -217
- package/src/utils/css-variables.ts +2 -4
- package/src/utils/index.ts +0 -1
- package/lib/I18n/styledVariables.d.ts +0 -1
- package/lib/I18n/styledVariables.js +0 -40
- package/lib/components/Breadcrumbs/styledVariables.d.ts +0 -1
- package/lib/components/Breadcrumbs/styledVariables.js +0 -20
- package/lib/components/Button/styledVariables.d.ts +0 -1
- package/lib/components/Button/styledVariables.js +0 -107
- package/lib/components/Catalog/styledVariables.d.ts +0 -1
- package/lib/components/Catalog/styledVariables.js +0 -96
- package/lib/components/CodeBlock/styledVariables.d.ts +0 -1
- package/lib/components/CodeBlock/styledVariables.js +0 -92
- package/lib/components/Dropdown/styledVariables.d.ts +0 -1
- package/lib/components/Dropdown/styledVariables.js +0 -30
- package/lib/components/Filter/FilterContent.d.ts +0 -13
- package/lib/components/Filter/FilterContent.js +0 -60
- package/lib/components/Filter/FilterPopover.d.ts +0 -13
- package/lib/components/Filter/FilterPopover.js +0 -109
- package/lib/components/Filter/FilterTag.d.ts +0 -7
- package/lib/components/Filter/FilterTag.js +0 -33
- package/lib/components/Filter/FilterTags.d.ts +0 -7
- package/lib/components/Filter/FilterTags.js +0 -29
- package/lib/components/Filter/styledVariables.d.ts +0 -1
- package/lib/components/Filter/styledVariables.js +0 -112
- package/lib/components/Footer/styledVariables.d.ts +0 -1
- package/lib/components/Footer/styledVariables.js +0 -61
- package/lib/components/Image/Image.d.ts +0 -9
- package/lib/components/Image/Image.js +0 -31
- package/lib/components/Image/index.d.ts +0 -1
- package/lib/components/LastUpdated/index.d.ts +0 -1
- package/lib/components/LastUpdated/index.js +0 -18
- package/lib/components/LastUpdated/styledVariables.d.ts +0 -1
- package/lib/components/LastUpdated/styledVariables.js +0 -11
- package/lib/components/Markdown/styledVariables.d.ts +0 -3
- package/lib/components/Markdown/styledVariables.js +0 -231
- package/lib/components/Menu/styledVariables.d.ts +0 -2
- package/lib/components/Menu/styledVariables.js +0 -101
- package/lib/components/Navbar/styledVariables.d.ts +0 -1
- package/lib/components/Navbar/styledVariables.js +0 -43
- package/lib/components/NavbarLogo/styledVariables.d.ts +0 -1
- package/lib/components/NavbarLogo/styledVariables.js +0 -18
- package/lib/components/Panel/styledVariables.d.ts +0 -2
- package/lib/components/Panel/styledVariables.js +0 -481
- package/lib/components/Product/styledVariables.d.ts +0 -2
- package/lib/components/Product/styledVariables.js +0 -41
- package/lib/components/Profile/UserProfileData.d.ts +0 -9
- package/lib/components/Profile/UserProfileData.js +0 -35
- package/lib/components/Profile/styledVariables.d.ts +0 -2
- package/lib/components/Profile/styledVariables.js +0 -55
- package/lib/components/Search/styledVariables.d.ts +0 -1
- package/lib/components/Search/styledVariables.js +0 -98
- package/lib/components/Select/styledVariables.d.ts +0 -1
- package/lib/components/Select/styledVariables.js +0 -34
- package/lib/components/Sidebar/styledVariables.d.ts +0 -2
- package/lib/components/Sidebar/styledVariables.js +0 -216
- package/lib/components/TableOfContent/styledVariables.d.ts +0 -1
- package/lib/components/TableOfContent/styledVariables.js +0 -46
- package/lib/components/Tag/Tag.d.ts +0 -18
- package/lib/components/Tag/Tag.js +0 -45
- package/lib/components/Tag/index.d.ts +0 -2
- package/lib/components/Tag/index.js +0 -19
- package/lib/components/Tag/styledVariables.d.ts +0 -1
- package/lib/components/Tag/styledVariables.js +0 -136
- package/lib/components/Tooltip/styledVariables.d.ts +0 -1
- package/lib/components/Tooltip/styledVariables.js +0 -21
- package/lib/hooks/useModalScrollLock.d.ts +0 -1
- package/lib/hooks/useModalScrollLock.js +0 -16
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +0 -6
- package/lib/icons/CheckboxIcon/CheckboxIcon.js +0 -28
- package/lib/icons/CheckboxIcon/index.d.ts +0 -1
- package/lib/icons/CheckboxIcon/index.js +0 -6
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +0 -4
- package/lib/icons/ErrorIcon/ErrorIcon.js +0 -14
- package/lib/icons/ErrorIcon/index.d.ts +0 -1
- package/lib/icons/ErrorIcon/index.js +0 -18
- package/lib/icons/LanguageIcon/LanguageIcon.d.ts +0 -4
- package/lib/icons/LanguageIcon/LanguageIcon.js +0 -14
- package/lib/icons/LanguageIcon/index.d.ts +0 -1
- package/lib/icons/PlusIcon/PlusIcon.d.ts +0 -5
- package/lib/icons/PlusIcon/PlusIcon.js +0 -16
- package/lib/icons/PlusIcon/index.d.ts +0 -1
- package/lib/icons/PlusIcon/index.js +0 -18
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.d.ts +0 -4
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.js +0 -15
- package/lib/icons/PointingArrowIcon/index.d.ts +0 -1
- package/lib/icons/PointingArrowIcon/index.js +0 -18
- package/lib/utils/tags-parser.d.ts +0 -1
- package/lib/utils/tags-parser.js +0 -10
- package/src/I18n/styledVariables.ts +0 -37
- package/src/components/Breadcrumbs/styledVariables.ts +0 -17
- package/src/components/Button/styledVariables.ts +0 -104
- package/src/components/Catalog/index.ts +0 -4
- package/src/components/Catalog/styledVariables.ts +0 -93
- package/src/components/CodeBlock/styledVariables.ts +0 -89
- package/src/components/Dropdown/styledVariables.ts +0 -27
- package/src/components/Filter/FilterContent.tsx +0 -95
- package/src/components/Filter/FilterPopover.tsx +0 -150
- package/src/components/Filter/FilterTag.tsx +0 -37
- package/src/components/Filter/FilterTags.tsx +0 -39
- package/src/components/Filter/styledVariables.ts +0 -109
- package/src/components/Footer/styledVariables.ts +0 -58
- package/src/components/Image/Image.tsx +0 -47
- package/src/components/Image/index.ts +0 -1
- package/src/components/LastUpdated/index.ts +0 -1
- package/src/components/LastUpdated/styledVariables.ts +0 -8
- package/src/components/Markdown/styledVariables.ts +0 -230
- package/src/components/Menu/styledVariables.ts +0 -99
- package/src/components/Navbar/styledVariables.ts +0 -40
- package/src/components/NavbarLogo/styledVariables.ts +0 -15
- package/src/components/Panel/styledVariables.ts +0 -479
- package/src/components/Product/styledVariables.ts +0 -39
- package/src/components/Profile/UserProfileData.tsx +0 -40
- package/src/components/Profile/styledVariables.ts +0 -53
- package/src/components/Search/styledVariables.ts +0 -95
- package/src/components/Select/styledVariables.ts +0 -31
- package/src/components/Sidebar/styledVariables.ts +0 -214
- package/src/components/TableOfContent/styledVariables.ts +0 -43
- package/src/components/Tag/Tag.tsx +0 -71
- package/src/components/Tag/index.ts +0 -2
- package/src/components/Tag/styledVariables.ts +0 -133
- package/src/components/Tooltip/styledVariables.ts +0 -18
- package/src/hooks/useModalScrollLock.ts +0 -12
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +0 -64
- package/src/icons/CheckboxIcon/index.ts +0 -1
- package/src/icons/ErrorIcon/ErrorIcon.tsx +0 -15
- package/src/icons/ErrorIcon/index.ts +0 -1
- package/src/icons/LanguageIcon/LanguageIcon.tsx +0 -15
- package/src/icons/LanguageIcon/index.ts +0 -1
- package/src/icons/PlusIcon/PlusIcon.tsx +0 -25
- package/src/icons/PlusIcon/index.ts +0 -1
- package/src/icons/PointingArrowIcon/PointingArrowIcon.tsx +0 -16
- package/src/icons/PointingArrowIcon/index.ts +0 -1
- package/src/utils/tags-parser.ts +0 -8
- /package/lib/components/{Profile → Navbar}/MobileUserProfile.d.ts +0 -0
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
export declare const LanguagePicker: (props: {
|
|
3
3
|
onChangeLanguage: (newLang: string) => void;
|
|
4
|
-
|
|
5
|
-
placement?: 'top' | 'bottom';
|
|
6
|
-
alignment?: 'start' | 'end';
|
|
7
|
-
}
|
|
8
|
-
export declare const LanguagePicker: (props: LanguagePickerProps) => JSX.Element | null;
|
|
9
|
-
export {};
|
|
4
|
+
}) => JSX.Element | null;
|
|
@@ -10,7 +10,6 @@ const utils_1 = require("../mocks/utils");
|
|
|
10
10
|
const usePreloadHistory_1 = require("../mocks/usePreloadHistory");
|
|
11
11
|
const hooks_1 = require("../mocks/hooks");
|
|
12
12
|
const Select_1 = require("../components/Select");
|
|
13
|
-
const icons_1 = require("../icons");
|
|
14
13
|
const LanguagePicker = (props) => {
|
|
15
14
|
const { currentLocale, locales, defaultLocale } = (0, hooks_1.useI18nConfig)();
|
|
16
15
|
const history = (0, usePreloadHistory_1.usePreloadHistory)();
|
|
@@ -21,18 +20,14 @@ const LanguagePicker = (props) => {
|
|
|
21
20
|
if (!locale) {
|
|
22
21
|
return null;
|
|
23
22
|
}
|
|
24
|
-
const
|
|
25
|
-
const languageItems = locales.map((locale) => ({
|
|
26
|
-
|
|
27
|
-
value: locale.code,
|
|
28
|
-
title: locale.name || locale.code || '',
|
|
29
|
-
}));
|
|
30
|
-
return (react_1.default.createElement(LanguageSelect, { value: value, options: languageItems, onChange: (value) => {
|
|
31
|
-
const newLangPathname = (0, utils_1.withPathPrefix)((0, utils_1.getPathnameForLocale)(location.pathname, defaultLocale, value, locales));
|
|
23
|
+
const selected = locale.name || locale.code;
|
|
24
|
+
const languageItems = locales.map((locale) => (react_1.default.createElement(LanguageItem, { onClick: () => {
|
|
25
|
+
const newLangPathname = (0, utils_1.withPathPrefix)((0, utils_1.getPathnameForLocale)(location.pathname, defaultLocale, locale.code, locales));
|
|
32
26
|
const newUrlWithLanguage = `${newLangPathname}${location.search}${location.hash}`;
|
|
33
27
|
history.push(newUrlWithLanguage);
|
|
34
|
-
props.onChangeLanguage(
|
|
35
|
-
},
|
|
28
|
+
props.onChangeLanguage(locale.code);
|
|
29
|
+
}, key: locale.code, role: "link" }, locale.name || locale.code || '')));
|
|
30
|
+
return react_1.default.createElement(LanguageSelect, { selected: selected, options: languageItems, triggerEvent: "hover" });
|
|
36
31
|
};
|
|
37
32
|
exports.LanguagePicker = LanguagePicker;
|
|
38
33
|
const LanguageSelect = (0, styled_components_1.default)(Select_1.Select).attrs(() => ({
|
|
@@ -40,32 +35,18 @@ const LanguageSelect = (0, styled_components_1.default)(Select_1.Select).attrs((
|
|
|
40
35
|
'data-component-name': 'I18n/LanguagePicker',
|
|
41
36
|
},
|
|
42
37
|
})) `
|
|
43
|
-
--select-list-item-active-background-color: var(
|
|
44
|
-
--language-picker-list-item-active-background-color
|
|
45
|
-
);
|
|
46
|
-
--select-list-item-hover-background-color: var(
|
|
47
|
-
--language-picker-list-item-hover-background-color
|
|
48
|
-
);
|
|
49
|
-
|
|
50
38
|
display: none;
|
|
51
39
|
font-size: var(--language-picker-font-size);
|
|
52
40
|
font-weight: var(--language-picker-font-weight);
|
|
53
41
|
line-height: var(--language-picker-line-height);
|
|
54
42
|
border-radius: var(--language-picker-border-radius);
|
|
55
43
|
color: var(--language-picker-text-color);
|
|
56
|
-
background-color: var(--language-picker-background-color);
|
|
57
44
|
|
|
58
45
|
${Select_1.SelectInput} {
|
|
59
|
-
|
|
60
|
-
color: var(--language-picker-text-color);
|
|
61
|
-
border: 1px solid var(--language-picker-border-color);
|
|
46
|
+
color: var(--navbar-text-color);
|
|
62
47
|
border-radius: var(--language-picker-input-border-radius);
|
|
63
48
|
padding: var(--language-picker-input-padding-vertical)
|
|
64
49
|
var(--language-picker-input-padding-horizontal);
|
|
65
|
-
|
|
66
|
-
:hover {
|
|
67
|
-
border-color: var(--language-picker-hover-border-color);
|
|
68
|
-
}
|
|
69
50
|
}
|
|
70
51
|
|
|
71
52
|
${Select_1.SelectList} {
|
|
@@ -84,6 +65,10 @@ const LanguageSelect = (0, styled_components_1.default)(Select_1.Select).attrs((
|
|
|
84
65
|
padding: var(--language-picker-list-item-vertical-padding)
|
|
85
66
|
var(--language-picker-list-item-horizontal-padding);
|
|
86
67
|
}
|
|
68
|
+
|
|
69
|
+
:hover {
|
|
70
|
+
background-color: var(--language-picker-list-item-active-background-color);
|
|
71
|
+
}
|
|
87
72
|
}
|
|
88
73
|
|
|
89
74
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
@@ -92,7 +77,7 @@ const LanguageSelect = (0, styled_components_1.default)(Select_1.Select).attrs((
|
|
|
92
77
|
|
|
93
78
|
:hover {
|
|
94
79
|
text-decoration: var(--navbar-item-hover-text-decoration);
|
|
95
|
-
background: var(--
|
|
80
|
+
background: var(--navbar-item-hover-background-color);
|
|
96
81
|
}
|
|
97
82
|
`;
|
|
98
83
|
const LanguageItem = styled_components_1.default.div ``;
|
package/lib/I18n/index.d.ts
CHANGED
package/lib/I18n/index.js
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.LanguagePicker = void 0;
|
|
18
4
|
var LanguagePicker_1 = require("../I18n/LanguagePicker");
|
|
19
5
|
Object.defineProperty(exports, "LanguagePicker", { enumerable: true, get: function () { return LanguagePicker_1.LanguagePicker; } });
|
|
20
|
-
__exportStar(require("../I18n/styledVariables"), exports);
|
|
21
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -18,6 +18,10 @@ const BreadcrumbText = styled_components_1.default.div `
|
|
|
18
18
|
const BreadcrumbWrapper = styled_components_1.default.div `
|
|
19
19
|
border-radius: var(--border-radius);
|
|
20
20
|
|
|
21
|
+
&:first-child {
|
|
22
|
+
padding-left: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
${(props) => props.isLink &&
|
|
22
26
|
`
|
|
23
27
|
&:hover {
|
|
@@ -32,10 +36,9 @@ const BreadcrumbWrapper = styled_components_1.default.div `
|
|
|
32
36
|
`;
|
|
33
37
|
const BreadcrumbLink = (0, styled_components_1.default)(Link_1.Link) `
|
|
34
38
|
text-decoration: none;
|
|
35
|
-
color: var(--breadcrumbs-text-color);
|
|
36
39
|
|
|
37
40
|
&:visited {
|
|
38
|
-
color:
|
|
41
|
+
color: inherit;
|
|
39
42
|
}
|
|
40
43
|
`;
|
|
41
44
|
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -24,7 +24,7 @@ const Breadcrumbs = (props) => {
|
|
|
24
24
|
total_breadcrumbs: breadcrumbs.length,
|
|
25
25
|
});
|
|
26
26
|
} }),
|
|
27
|
-
isLast ? null : react_1.default.createElement("
|
|
27
|
+
isLast ? null : react_1.default.createElement("div", null, "/")));
|
|
28
28
|
})));
|
|
29
29
|
};
|
|
30
30
|
exports.Breadcrumbs = Breadcrumbs;
|
|
@@ -37,11 +37,7 @@ const Container = styled_components_1.default.div `
|
|
|
37
37
|
flex-wrap: wrap;
|
|
38
38
|
|
|
39
39
|
> div {
|
|
40
|
-
padding: var(--breadcrumbs-padding);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
> span {
|
|
44
|
-
padding: var(--breadcrumbs-gap);
|
|
40
|
+
padding-right: var(--breadcrumbs-padding-horizontal);
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
@media print {
|
|
@@ -16,5 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("../../components/Breadcrumbs/Breadcrumbs"), exports);
|
|
18
18
|
__exportStar(require("../../components/Breadcrumbs/Breadcrumb"), exports);
|
|
19
|
-
__exportStar(require("../../components/Breadcrumbs/styledVariables"), exports);
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FlattenSimpleInterpolation } from 'styled-components';
|
|
3
|
-
export type ButtonSize = '
|
|
4
|
-
export type ButtonColor = '
|
|
5
|
-
export type ButtonVariant = 'outlined' | 'contained'
|
|
3
|
+
export type ButtonSize = 'small' | 'medium' | 'large' | 'xlarge' | string;
|
|
4
|
+
export type ButtonColor = 'primary' | 'secondary' | 'default' | string;
|
|
5
|
+
export type ButtonVariant = 'outlined' | 'contained';
|
|
6
6
|
export interface ButtonProps {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
7
|
color?: ButtonColor;
|
|
9
8
|
disabled?: boolean;
|
|
10
9
|
blinking?: boolean;
|
|
@@ -13,8 +12,6 @@ export interface ButtonProps {
|
|
|
13
12
|
size?: ButtonSize;
|
|
14
13
|
extraClass?: string;
|
|
15
14
|
to?: string;
|
|
16
|
-
icon?: JSX.Element;
|
|
17
|
-
title?: string;
|
|
18
15
|
onClick?: (e?: any) => void;
|
|
19
16
|
}
|
|
20
17
|
export declare const baseButtonStyles: FlattenSimpleInterpolation;
|
|
@@ -45,72 +45,79 @@ const getBlink = () => (0, styled_components_1.keyframes) `
|
|
|
45
45
|
background-color: var(--button-active-background-color);
|
|
46
46
|
}
|
|
47
47
|
`;
|
|
48
|
-
const getSize = (size = '
|
|
48
|
+
const getSize = (size = 'medium') => (0, styled_components_1.css) `
|
|
49
49
|
font-size: var(--button-${size}-font-size);
|
|
50
50
|
padding: var(--button-${size}-padding);
|
|
51
51
|
min-width: var(--button-${size}-min-width);
|
|
52
52
|
`;
|
|
53
53
|
exports.baseButtonStyles = (0, styled_components_1.css) `
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
gap: 5px;
|
|
58
54
|
outline: none;
|
|
55
|
+
border: none;
|
|
56
|
+
border-radius: var(--button-border-radius);
|
|
57
|
+
font-weight: var(--button-font-weight);
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
padding: 2px 20px;
|
|
59
60
|
margin: var(--button-margin);
|
|
60
61
|
cursor: pointer;
|
|
62
|
+
transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
|
|
61
63
|
line-height: 1;
|
|
62
64
|
|
|
63
|
-
color: var(--button-color);
|
|
64
|
-
background-color: var(--button-background-color);
|
|
65
|
-
border: var(--button-border-width) var(--button-border-style) var(--button-border-color);
|
|
66
|
-
border-radius: var(--button-border-radius);
|
|
67
|
-
|
|
68
|
-
font-size: var(--button-font-size);
|
|
69
65
|
font-family: var(--button-font-family);
|
|
70
|
-
font-weight: var(--button-font-weight);
|
|
71
66
|
box-shadow: var(--button-box-shadow);
|
|
72
67
|
|
|
73
68
|
&:hover {
|
|
74
69
|
box-shadow: var(--button-hover-box-shadow);
|
|
75
|
-
background-color: var(--button-hover-background-color);
|
|
76
|
-
border: var(--button-border-width) var(--button-border-style) var(--button-hover-border-color);
|
|
77
70
|
}
|
|
78
71
|
|
|
79
72
|
&:active {
|
|
80
73
|
box-shadow: var(--button-active-box-shadow);
|
|
81
|
-
background-color: var(--button-active-background-color);
|
|
82
|
-
border: var(--button-border-width) var(--button-border-style) var(--button-active-border-color);
|
|
83
74
|
}
|
|
84
75
|
`;
|
|
85
|
-
const StyledButtonLink = (0, styled_components_1.default)(Link_1.Link) `
|
|
86
|
-
text-decoration: none;
|
|
87
|
-
`;
|
|
88
76
|
const StyledButton = styled_components_1.default.button.attrs(({ color = 'default', extraClass, variant }) => ({
|
|
89
|
-
className: `button-${color}${variant ? ` button-${variant}` : ''}${extraClass ? ` ${extraClass}` : ''}`,
|
|
77
|
+
className: `button-color-${color}${variant ? ` button-variant-${variant}` : ''}${extraClass ? ` ${extraClass}` : ''}`,
|
|
90
78
|
'data-component-name': 'Button/Button',
|
|
91
79
|
})) `
|
|
80
|
+
text-decoration: none;
|
|
81
|
+
text-align: center;
|
|
82
|
+
|
|
92
83
|
width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
|
|
93
84
|
|
|
94
85
|
${exports.baseButtonStyles}
|
|
95
86
|
|
|
96
87
|
${({ variant }) => variant === 'outlined'
|
|
97
88
|
? (0, styled_components_1.css) `
|
|
98
|
-
|
|
89
|
+
color: var(--button-background-color);
|
|
90
|
+
border: 2px solid var(--button-border-color);
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
&:hover {
|
|
93
|
+
color: var(--button-hover-background-color);
|
|
94
|
+
border: 2px solid var(--button-hover-border-color);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:active {
|
|
98
|
+
color: var(--button-active-background-color);
|
|
99
|
+
border: 2px solid var(--button-active-border-color);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:disabled {
|
|
103
|
+
color: var(--button-disabled-color);
|
|
104
|
+
background-color: transparent;
|
|
105
|
+
}
|
|
99
106
|
`
|
|
100
|
-
:
|
|
101
|
-
? (0, styled_components_1.css) `
|
|
107
|
+
: (0, styled_components_1.css) `
|
|
102
108
|
color: var(--button-color);
|
|
103
|
-
border
|
|
109
|
+
border: 2px solid var(--button-background-color);
|
|
104
110
|
background-color: var(--button-background-color);
|
|
105
|
-
|
|
106
111
|
&:hover {
|
|
107
|
-
|
|
108
|
-
border-color: var(--button-hover-border-color);
|
|
112
|
+
border: 2px solid var(--button-hover-background-color);
|
|
109
113
|
background-color: var(--button-hover-background-color);
|
|
110
|
-
box-shadow: none;
|
|
111
114
|
}
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
|
|
116
|
+
&:active {
|
|
117
|
+
border: 2px solid var(--button-active-background-color);
|
|
118
|
+
background-color: var(--button-active-background-color);
|
|
119
|
+
}
|
|
120
|
+
`};
|
|
114
121
|
|
|
115
122
|
${({ size }) => getSize(size)}
|
|
116
123
|
|
|
@@ -131,25 +138,18 @@ const StyledButton = styled_components_1.default.button.attrs(({ color = 'defaul
|
|
|
131
138
|
cursor: default;
|
|
132
139
|
color: var(--button-disabled-color);
|
|
133
140
|
background-color: var(--button-disabled-background-color);
|
|
134
|
-
border-color: var(--button-disabled-
|
|
141
|
+
border-color: var(--button-disabled-background-color);
|
|
135
142
|
pointer-events: none;
|
|
136
143
|
}
|
|
137
144
|
`}
|
|
138
145
|
`;
|
|
139
|
-
const StyledIcon = styled_components_1.default.span `
|
|
140
|
-
display: block;
|
|
141
|
-
height: var(--button-icon-height);
|
|
142
|
-
width: var(--button-icon-width);
|
|
143
|
-
`;
|
|
144
146
|
const ButtonComponent = (props) => {
|
|
145
|
-
const button = (react_1.default.createElement(StyledButton, Object.assign({}, props),
|
|
146
|
-
props.icon ? react_1.default.createElement(StyledIcon, null, props.icon) : null,
|
|
147
|
-
props.children));
|
|
148
147
|
if (props.to) {
|
|
149
|
-
return react_1.default.createElement(
|
|
148
|
+
return (react_1.default.createElement(Link_1.Link, { to: props.to },
|
|
149
|
+
react_1.default.createElement(StyledButton, Object.assign({}, props))));
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
|
-
return
|
|
152
|
+
return react_1.default.createElement(StyledButton, Object.assign({}, props));
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
exports.Button = (0, styled_components_1.default)(ButtonComponent) ``;
|
|
@@ -15,5 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("../../components/Button/Button"), exports);
|
|
18
|
-
__exportStar(require("../../components/Button/styledVariables"), exports);
|
|
19
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,9 +6,3 @@ export default function Catalog(props: {
|
|
|
6
6
|
catalogConfig: CatalogConfig;
|
|
7
7
|
};
|
|
8
8
|
}): JSX.Element;
|
|
9
|
-
export declare const FilterControls: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
-
export declare const CatalogPageContent: import("styled-components").StyledComponent<"main", any, {}, never>;
|
|
11
|
-
export declare const CatalogTitle: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
12
|
-
export declare const CatalogDescription: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
13
|
-
export declare const CatalogPageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
-
export declare const CatalogPageDescriptionWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -3,123 +3,116 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CatalogPageDescriptionWrapper = exports.CatalogPageWrapper = exports.CatalogDescription = exports.CatalogTitle = exports.CatalogPageContent = exports.FilterControls = void 0;
|
|
7
6
|
const react_1 = __importDefault(require("react"));
|
|
8
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
8
|
const Highlight_1 = require("../../ui/Highlight");
|
|
9
|
+
const Button_1 = require("../../components/Button");
|
|
10
|
+
const Filter_1 = require("../../components/Filter");
|
|
10
11
|
const H2_1 = require("../../components/Typography/H2");
|
|
12
|
+
const H3_1 = require("../../components/Typography/H3");
|
|
11
13
|
const CatalogCard_1 = require("../../components/Catalog/CatalogCard");
|
|
12
14
|
const index_1 = require("../../mocks/hooks/index");
|
|
13
|
-
const FilterTags_1 = require("../../components/Filter/FilterTags");
|
|
14
|
-
const FilterContent_1 = require("../../components/Filter/FilterContent");
|
|
15
|
-
const FilterPopover_1 = require("../../components/Filter/FilterPopover");
|
|
16
|
-
const Button_1 = require("../../components/Button");
|
|
17
|
-
const PlusIcon_1 = require("../../icons/PlusIcon");
|
|
18
|
-
const useModalScrollLock_1 = __importDefault(require("../../hooks/useModalScrollLock"));
|
|
19
15
|
const useCatalog_1 = require("./useCatalog");
|
|
20
16
|
function Catalog(props) {
|
|
21
17
|
const { catalogConfig } = props.pageProps;
|
|
22
18
|
const items = (0, index_1.usePageSharedData)('catalog');
|
|
23
19
|
const { filterTerm, setFilterTerm, groups, filters } = (0, useCatalog_1.useCatalog)(items, catalogConfig);
|
|
24
|
-
const [
|
|
20
|
+
const [isFilterPanelFocused, setIsFilterPanelFocused] = react_1.default.useState(false);
|
|
21
|
+
const { translate } = (0, index_1.useTranslate)();
|
|
25
22
|
const translationKeys = {
|
|
26
|
-
|
|
23
|
+
placeholder: 'theme.catalog.filters.placeholder',
|
|
24
|
+
applyFilter: 'theme.catalog.filters.apply',
|
|
27
25
|
};
|
|
28
|
-
const { translate } = (0, index_1.useTranslate)();
|
|
29
|
-
(0, useModalScrollLock_1.default)(isAddingFilter);
|
|
30
26
|
return (react_1.default.createElement(Highlight_1.HighlightContext.Provider, { value: [filterTerm] },
|
|
31
|
-
react_1.default.createElement(
|
|
32
|
-
react_1.default.createElement(
|
|
33
|
-
react_1.default.createElement(
|
|
34
|
-
react_1.default.createElement(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
react_1.default.createElement(
|
|
38
|
-
react_1.default.createElement(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
' ')) : null),
|
|
27
|
+
react_1.default.createElement(CatalogPageWrapper, null,
|
|
28
|
+
react_1.default.createElement(CatalogPageSidebar, { isActiveInMobileMode: isFilterPanelFocused },
|
|
29
|
+
react_1.default.createElement(StyledInput, { placeholder: translate(translationKeys.placeholder, 'Filter...'), value: filterTerm, onFocus: () => setIsFilterPanelFocused(true), onChange: (e) => setFilterTerm(e.target.value) }),
|
|
30
|
+
filters.map((filter, idx) => (react_1.default.createElement(Filter_1.Filter, { filter: filter, key: filter.property + '-' + idx }))),
|
|
31
|
+
react_1.default.createElement(MobileStickyApplyFilters, null,
|
|
32
|
+
react_1.default.createElement(Button_1.Button, { "data-translation-key": translationKeys.applyFilter, color: "secondary", onClick: () => setIsFilterPanelFocused(false) }, translate(translationKeys.applyFilter, 'Apply filters')))),
|
|
33
|
+
react_1.default.createElement(CatalogPageContent, null,
|
|
34
|
+
catalogConfig.title ? (react_1.default.createElement(CatalogTitle, null,
|
|
35
|
+
' ',
|
|
36
|
+
translate(catalogConfig.titleTranslationKey, catalogConfig.title),
|
|
37
|
+
' ')) : null,
|
|
38
|
+
catalogConfig.description ? (react_1.default.createElement(CatalogDescription, null,
|
|
39
|
+
' ',
|
|
40
|
+
translate(catalogConfig.descriptionTranslationKey, catalogConfig.description),
|
|
41
|
+
' ')) : null,
|
|
47
42
|
groups.map((group) => (react_1.default.createElement(react_1.default.Fragment, { key: group.title },
|
|
48
|
-
react_1.default.createElement(
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
react_1.default.createElement(H3_1.H3, null,
|
|
44
|
+
group.title,
|
|
45
|
+
" (",
|
|
46
|
+
group.items.length,
|
|
47
|
+
")"),
|
|
51
48
|
react_1.default.createElement(CatalogCards, null, group.items.map((item) => (react_1.default.createElement(CatalogCard_1.CatalogCard, { item: item, key: item.link })))))))))));
|
|
52
49
|
}
|
|
53
50
|
exports.default = Catalog;
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
color: var(--
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const CatalogSeparatorCount = styled_components_1.default.div `
|
|
68
|
-
display: flex;
|
|
69
|
-
height: var(--catalog-separator-count-height);
|
|
70
|
-
padding: var(--catalog-separator-count-padding);
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
align-items: center;
|
|
74
|
-
border-radius: var(--catalog-separator-count-border-radius);
|
|
75
|
-
border: 1px solid var(--catalog-separator-count-border-color);
|
|
76
|
-
background: var(--catalog-separator-count-background);
|
|
77
|
-
`;
|
|
78
|
-
exports.FilterControls = styled_components_1.default.div `
|
|
79
|
-
padding: var(--mobile-catalog-filter-padding-vertical)
|
|
80
|
-
var(--mobile-catalog-filter-padding-horizontal);
|
|
81
|
-
border-bottom: 1px solid var(--border-secondary);
|
|
82
|
-
background: var(--bg-raised);
|
|
51
|
+
const MobileStickyApplyFilters = styled_components_1.default.div `
|
|
52
|
+
position: fixed;
|
|
53
|
+
display: none;
|
|
54
|
+
background-color: var(--sidebar-background-color);
|
|
55
|
+
bottom: 0;
|
|
56
|
+
padding: 16px 30px;
|
|
57
|
+
left: 0px;
|
|
58
|
+
right: 0px;
|
|
59
|
+
|
|
60
|
+
${Button_1.Button} {
|
|
61
|
+
width: 100%;
|
|
62
|
+
margin: 0;
|
|
63
|
+
}
|
|
83
64
|
`;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
const CatalogPageSidebar = styled_components_1.default.aside `
|
|
66
|
+
width: var(--sidebar-width);
|
|
67
|
+
border-right: 1px solid var(--sidebar-border-color);
|
|
68
|
+
padding: 20px 30px;
|
|
69
|
+
position: sticky;
|
|
70
|
+
top: var(--navbar-height);
|
|
71
|
+
height: calc(100vh - var(--navbar-height));
|
|
72
|
+
overflow: auto;
|
|
87
73
|
|
|
88
|
-
|
|
89
|
-
|
|
74
|
+
@media screen and (max-width: 767px) {
|
|
75
|
+
transition: height 0.2s ease-in-out;
|
|
76
|
+
width: 100%;
|
|
77
|
+
${({ isActiveInMobileMode }) => isActiveInMobileMode ? 'padding-bottom: 66px;' : 'height: 76px;'};
|
|
78
|
+
background-color: var(--sidebar-background-color);
|
|
79
|
+
border-bottom: 1px solid var(--sidebar-border-color);
|
|
80
|
+
z-index: var(--z-index-surface);
|
|
81
|
+
|
|
82
|
+
${MobileStickyApplyFilters} {
|
|
83
|
+
display: ${({ isActiveInMobileMode }) => (isActiveInMobileMode ? 'block' : 'none')};
|
|
84
|
+
}
|
|
90
85
|
}
|
|
91
86
|
`;
|
|
87
|
+
const CatalogPageContent = styled_components_1.default.main `
|
|
88
|
+
flex: 1;
|
|
89
|
+
padding: 32px;
|
|
90
|
+
`;
|
|
92
91
|
const CatalogCards = styled_components_1.default.div `
|
|
93
92
|
display: grid;
|
|
94
93
|
grid-template-columns: repeat(auto-fill, minmax(var(--api-catalog-card-min-width), 1fr));
|
|
95
94
|
gap: 32px;
|
|
96
|
-
margin: var(--catalog-cards-group-margin);
|
|
97
95
|
`;
|
|
98
|
-
|
|
99
|
-
color: var(--catalog-title-text-color);
|
|
100
|
-
font-weight: var(--catalog-title-font-weight);
|
|
101
|
-
font-size: var(--catalog-title-font-size);
|
|
102
|
-
|
|
96
|
+
const CatalogTitle = (0, styled_components_1.default)(H2_1.H2) `
|
|
103
97
|
&& {
|
|
104
98
|
margin: 0;
|
|
105
99
|
}
|
|
106
100
|
`;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
font-
|
|
110
|
-
|
|
111
|
-
margin: var(--catalog-description-margin-top) 0 var(--catalog-description-margin-bottom) 0;
|
|
101
|
+
const CatalogDescription = styled_components_1.default.p `
|
|
102
|
+
margin: 16px 0 32px 0;
|
|
103
|
+
font-size: 16px;
|
|
104
|
+
color: var(--text-color-secondary);
|
|
112
105
|
`;
|
|
113
|
-
|
|
114
|
-
--sidebar-width: var(--catalog-sidebar-width,
|
|
106
|
+
const CatalogPageWrapper = styled_components_1.default.div `
|
|
107
|
+
--sidebar-width: var(--catalog-sidebar-width, 300px);
|
|
115
108
|
|
|
116
109
|
display: flex;
|
|
117
|
-
flex-direction:
|
|
110
|
+
flex-direction: row;
|
|
118
111
|
|
|
119
112
|
font-weight: var(--font-weight-regular);
|
|
120
113
|
padding: 0;
|
|
121
114
|
|
|
122
|
-
color: var(--text-
|
|
115
|
+
color: var(--text-color);
|
|
123
116
|
font-size: var(--font-size-base);
|
|
124
117
|
font-family: var(--font-family-base);
|
|
125
118
|
line-height: var(--line-height-base);
|
|
@@ -128,7 +121,7 @@ exports.CatalogPageWrapper = styled_components_1.default.div `
|
|
|
128
121
|
border: 0;
|
|
129
122
|
width: calc(100% + 48px);
|
|
130
123
|
margin: auto -24px 0 -24px;
|
|
131
|
-
border-top: 1px solid var(--border-
|
|
124
|
+
border-top: 1px solid var(--border-color);
|
|
132
125
|
}
|
|
133
126
|
a:not([role='button']) {
|
|
134
127
|
text-decoration: none;
|
|
@@ -136,42 +129,44 @@ exports.CatalogPageWrapper = styled_components_1.default.div `
|
|
|
136
129
|
font-weight: var(--link-font-weight);
|
|
137
130
|
}
|
|
138
131
|
|
|
139
|
-
|
|
140
|
-
flex-direction:
|
|
132
|
+
@media screen and (max-width: 767px) {
|
|
133
|
+
flex-direction: column;
|
|
141
134
|
}
|
|
142
135
|
`;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
// TODO: merge this input with the input from reference docs
|
|
137
|
+
// the on in ref docs is dark, needs separate variables most likely
|
|
138
|
+
const StyledInput = styled_components_1.default.input `
|
|
139
|
+
border: 1px solid rgba(0, 0, 0, 0.23);
|
|
140
|
+
min-width: 200px;
|
|
141
|
+
outline-color: var(--color-primary-500);
|
|
142
|
+
width: 100%;
|
|
147
143
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
outline: none;
|
|
145
|
+
padding: var(--input-padding);
|
|
146
|
+
border-radius: var(--input-border-radius);
|
|
147
|
+
background-color: var(--input-background-color);
|
|
148
|
+
color: var(--text-color);
|
|
149
|
+
font-family: var(--input-font-family);
|
|
150
|
+
font-size: var(--input-font-size);
|
|
151
|
+
line-height: var(--input-line-height);
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
font-weight: var(--filter-add-button-font-weight);
|
|
157
|
-
color: var(--text-secondary);
|
|
158
|
-
display: flex;
|
|
159
|
-
white-space: nowrap;
|
|
153
|
+
&::placeholder {
|
|
154
|
+
opacity: 0.6;
|
|
155
|
+
color: var(--text-color);
|
|
156
|
+
}
|
|
160
157
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
&:hover {
|
|
159
|
+
color: var(--text-color);
|
|
160
|
+
border: 1px solid rgba(0, 0, 0, 0.23);
|
|
161
|
+
}
|
|
164
162
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
&:focus {
|
|
164
|
+
color: var(--text-color);
|
|
165
|
+
border: 1px solid rgba(0, 0, 0, 0.23);
|
|
168
166
|
}
|
|
169
|
-
`;
|
|
170
|
-
exports.CatalogPageDescriptionWrapper = styled_components_1.default.div `
|
|
171
|
-
display: none;
|
|
172
167
|
|
|
173
|
-
|
|
174
|
-
|
|
168
|
+
&:-webkit-autofill {
|
|
169
|
+
background-color: var(--input-background-color);
|
|
175
170
|
}
|
|
176
171
|
`;
|
|
177
172
|
//# sourceMappingURL=Catalog.js.map
|