@redocly/theme 0.82.2-rc.2 → 0.82.4-rc.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/Badge/Badge.d.ts +8 -5
- package/lib/components/Badge/Badge.js +9 -3
- package/lib/components/Breadcrumbs/Breadcrumb.d.ts +1 -1
- package/lib/components/Breadcrumbs/Breadcrumb.js +2 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -2
- package/lib/components/Button/Button.js +1 -1
- package/lib/components/Buttons/CopyButton.d.ts +2 -2
- package/lib/components/Buttons/CopyButton.js +3 -3
- package/lib/components/Buttons/EditPageButton.d.ts +2 -3
- package/lib/components/Buttons/EditPageButton.js +2 -2
- package/lib/components/Buttons/EmailButton.d.ts +4 -5
- package/lib/components/Buttons/EmailButton.js +2 -2
- package/lib/components/Buttons/NewTabButton.d.ts +4 -5
- package/lib/components/Buttons/NewTabButton.js +2 -2
- package/lib/components/Catalog/Catalog.d.ts +3 -2
- package/lib/components/Catalog/Catalog.js +1 -5
- package/lib/components/Catalog/CatalogActions.d.ts +1 -2
- package/lib/components/Catalog/CatalogCard.d.ts +1 -2
- package/lib/components/Catalog/CatalogCard.js +4 -5
- package/lib/components/Catalog/CatalogHighlight.d.ts +1 -2
- package/lib/components/Catalog/CatalogInfoBlock.d.ts +1 -2
- package/lib/components/CodeBlock/CodeBlock.js +1 -1
- package/lib/components/CodeBlock/CodeBlockContainer.d.ts +14 -5
- package/lib/components/CodeBlock/CodeBlockContainer.js +9 -4
- package/lib/components/CodeBlock/CodeBlockControls.js +2 -0
- package/lib/components/CodeBlock/CodeBlockTabs.d.ts +1 -2
- package/lib/components/CodeBlock/variables.js +2 -2
- package/lib/components/ColorModeSwitcher/ColorModeIcon.d.ts +4 -8
- package/lib/components/ColorModeSwitcher/ColorModeIcon.js +5 -3
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.d.ts +1 -2
- package/lib/components/DatePicker/DatePicker.d.ts +2 -3
- package/lib/components/Dropdown/Dropdown.d.ts +2 -3
- package/lib/components/Dropdown/Dropdown.js +10 -5
- package/lib/components/Dropdown/DropdownMenu.d.ts +1 -2
- package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -2
- package/lib/components/Dropdown/DropdownMenuItem.js +22 -5
- package/lib/components/Dropdown/variables.js +5 -1
- package/lib/components/Feedback/Comment.d.ts +2 -1
- package/lib/components/Feedback/Comment.js +3 -3
- package/lib/components/Feedback/Mood.js +4 -4
- package/lib/components/Feedback/Rating.js +1 -1
- package/lib/components/Feedback/ReportDialog.js +1 -1
- package/lib/components/Feedback/Scale.js +1 -1
- package/lib/components/Feedback/Sentiment.js +3 -3
- package/lib/components/Filter/FilterContent.d.ts +1 -3
- package/lib/components/Filter/FilterContent.js +4 -4
- package/lib/components/Filter/FilterInput.d.ts +1 -2
- package/lib/components/Filter/FilterOption.d.ts +8 -4
- package/lib/components/Filter/FilterOption.js +7 -4
- package/lib/components/Filter/FilterOptionLabel.d.ts +5 -3
- package/lib/components/Filter/FilterOptionLabel.js +6 -3
- package/lib/components/Filter/FilterOptions.d.ts +5 -3
- package/lib/components/Filter/FilterOptions.js +6 -3
- package/lib/components/Filter/FilterPopover.d.ts +1 -2
- package/lib/components/Filter/FilterSelect.js +1 -4
- package/lib/components/Filter/FilterTitle.d.ts +5 -3
- package/lib/components/Filter/FilterTitle.js +6 -3
- package/lib/components/Filter/variables.js +2 -1
- package/lib/components/Footer/Footer.d.ts +1 -2
- package/lib/components/Footer/FooterColumn.d.ts +1 -2
- package/lib/components/Footer/FooterCopyright.d.ts +1 -2
- package/lib/components/Footer/FooterItem.d.ts +1 -2
- package/lib/components/Footer/FooterLogo.d.ts +3 -4
- package/lib/components/Footer/FooterLogo.js +6 -1
- package/lib/components/Image/Image.d.ts +2 -2
- package/lib/components/JsonViewer/JsonViewer.d.ts +2 -2
- package/lib/components/LanguagePicker/LanguagePicker.d.ts +1 -2
- package/lib/components/LanguagePicker/LanguagePicker.js +5 -2
- package/lib/components/LanguagePicker/variables.js +4 -1
- package/lib/components/LastUpdated/LastUpdated.d.ts +1 -1
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/Loading/Loading.d.ts +2 -2
- package/lib/components/Logo/Logo.d.ts +1 -2
- package/lib/components/Markdown/Markdown.d.ts +12 -0
- package/lib/components/Markdown/Markdown.js +12 -13
- package/lib/components/Markdown/variables.js +10 -5
- package/lib/components/Menu/Menu.d.ts +1 -2
- package/lib/components/Menu/MenuContainer.d.ts +4 -4
- package/lib/components/Menu/MenuContainer.js +10 -3
- package/lib/components/Menu/MenuMobile.d.ts +1 -2
- package/lib/components/Menu/variables.js +2 -0
- package/lib/components/Navbar/NavbarItem.d.ts +1 -2
- package/lib/components/Navbar/NavbarItem.js +1 -1
- package/lib/components/Navbar/NavbarLogo.d.ts +3 -4
- package/lib/components/Navbar/NavbarLogo.js +6 -3
- package/lib/components/Navbar/NavbarMenu.d.ts +1 -2
- package/lib/components/PageNavigation/NextButton.d.ts +1 -2
- package/lib/components/PageNavigation/PageNavigation.d.ts +1 -2
- package/lib/components/PageNavigation/PreviousButton.d.ts +1 -2
- package/lib/components/Panel/Panel.d.ts +1 -2
- package/lib/components/Panel/PanelBody.d.ts +2 -3
- package/lib/components/Portal/Portal.d.ts +2 -3
- package/lib/components/Portal/Portal.js +2 -2
- package/lib/components/Product/Product.d.ts +1 -2
- package/lib/components/Product/ProductPicker.js +4 -1
- package/lib/components/Product/variables.js +4 -1
- package/lib/components/Search/Search.d.ts +1 -2
- package/lib/components/Search/SearchDialog.d.ts +1 -2
- package/lib/components/Search/SearchInput.d.ts +1 -2
- package/lib/components/Search/SearchItem.d.ts +1 -1
- package/lib/components/Search/SearchRecent.d.ts +1 -2
- package/lib/components/Search/SearchShortcut.d.ts +1 -2
- package/lib/components/Search/SearchSuggestedPages.d.ts +1 -2
- package/lib/components/Search/SearchTrigger.d.ts +1 -2
- package/lib/components/Search/variables.js +2 -2
- package/lib/components/Segmented/Segmented.d.ts +1 -1
- package/lib/components/Select/Select.d.ts +3 -3
- package/lib/components/Sidebar/Sidebar.d.ts +1 -2
- package/lib/components/SidebarActions/ChangeViewButton.d.ts +2 -3
- package/lib/components/SidebarActions/SidebarActions.d.ts +2 -2
- package/lib/components/SidebarLogo/SidebarLogo.d.ts +3 -3
- package/lib/components/TableOfContent/TableOfContent.d.ts +1 -2
- package/lib/components/Tag/Tag.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/Tooltip/variables.js +4 -0
- package/lib/components/Typography/H1.js +1 -1
- package/lib/components/Typography/H2.js +1 -1
- package/lib/components/Typography/H3.js +1 -1
- package/lib/components/Typography/H4.js +1 -1
- package/lib/components/UserMenu/UserAvatar.d.ts +1 -2
- package/lib/components/UserMenu/UserInfoMenuItem.d.ts +1 -2
- package/lib/components/UserMenu/UserMenu.d.ts +1 -2
- package/lib/components/UserMenu/UserMenu.js +4 -1
- package/lib/components/UserMenu/UserMenuMobile.d.ts +1 -2
- package/lib/components/UserMenu/variables.js +4 -1
- package/lib/components/VersionPicker/VersionPicker.d.ts +1 -1
- package/lib/core/types/catalog.d.ts +3 -0
- package/lib/core/types/hooks.d.ts +3 -1
- package/lib/layouts/DocumentationLayout.js +7 -0
- package/lib/layouts/NotFound.js +2 -2
- package/lib/layouts/RootLayout.d.ts +2 -3
- package/lib/markdoc/components/InlineSvg/InlineSvg.d.ts +2 -1
- package/lib/markdoc/components/InlineSvg/InlineSvg.js +2 -2
- package/lib/markdoc/components/Tabs/variables.js +5 -5
- package/package.json +4 -4
- package/src/components/Badge/Badge.tsx +13 -3
- package/src/components/Breadcrumbs/Breadcrumb.tsx +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +2 -2
- package/src/components/Button/Button.tsx +5 -1
- package/src/components/Buttons/CopyButton.tsx +7 -5
- package/src/components/Buttons/EditPageButton.tsx +3 -3
- package/src/components/Buttons/EmailButton.tsx +4 -4
- package/src/components/Buttons/NewTabButton.tsx +7 -4
- package/src/components/Catalog/Catalog.tsx +5 -7
- package/src/components/Catalog/CatalogActions.tsx +1 -1
- package/src/components/Catalog/CatalogCard.tsx +23 -24
- package/src/components/Catalog/CatalogHighlight.tsx +1 -1
- package/src/components/Catalog/CatalogInfoBlock.tsx +1 -1
- package/src/components/CodeBlock/CodeBlock.tsx +1 -1
- package/src/components/CodeBlock/CodeBlockContainer.tsx +19 -6
- package/src/components/CodeBlock/CodeBlockControls.tsx +2 -0
- package/src/components/CodeBlock/CodeBlockTabs.tsx +1 -1
- package/src/components/CodeBlock/variables.ts +2 -2
- package/src/components/ColorModeSwitcher/ColorModeIcon.tsx +8 -4
- package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +2 -2
- package/src/components/Dropdown/Dropdown.tsx +14 -8
- package/src/components/Dropdown/DropdownMenu.tsx +1 -1
- package/src/components/Dropdown/DropdownMenuItem.tsx +25 -6
- package/src/components/Dropdown/variables.ts +5 -1
- package/src/components/Feedback/Comment.tsx +4 -2
- package/src/components/Feedback/Mood.tsx +5 -4
- package/src/components/Feedback/Rating.tsx +1 -1
- package/src/components/Feedback/ReportDialog.tsx +1 -0
- package/src/components/Feedback/Scale.tsx +1 -1
- package/src/components/Feedback/Sentiment.tsx +4 -3
- package/src/components/Filter/FilterContent.tsx +3 -3
- package/src/components/Filter/FilterInput.tsx +1 -1
- package/src/components/Filter/FilterOption.tsx +20 -4
- package/src/components/Filter/FilterOptionLabel.tsx +10 -3
- package/src/components/Filter/FilterOptions.tsx +10 -3
- package/src/components/Filter/FilterPopover.tsx +1 -1
- package/src/components/Filter/FilterSelect.tsx +1 -4
- package/src/components/Filter/FilterTitle.tsx +10 -3
- package/src/components/Filter/variables.ts +2 -1
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Footer/FooterColumn.tsx +1 -1
- package/src/components/Footer/FooterCopyright.tsx +1 -1
- package/src/components/Footer/FooterItem.tsx +1 -1
- package/src/components/Footer/FooterLogo.tsx +8 -1
- package/src/components/Image/Image.tsx +1 -1
- package/src/components/JsonViewer/JsonViewer.tsx +2 -2
- package/src/components/LanguagePicker/LanguagePicker.tsx +6 -3
- package/src/components/LanguagePicker/variables.ts +4 -1
- package/src/components/LastUpdated/LastUpdated.tsx +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/Loading/Loading.tsx +2 -2
- package/src/components/Logo/Logo.tsx +1 -1
- package/src/components/Markdown/Markdown.tsx +23 -14
- package/src/components/Markdown/variables.ts +10 -5
- package/src/components/Menu/Menu.tsx +1 -1
- package/src/components/Menu/MenuContainer.tsx +9 -5
- package/src/components/Menu/MenuMobile.tsx +1 -1
- package/src/components/Menu/variables.ts +2 -0
- package/src/components/Navbar/Navbar.tsx +1 -0
- package/src/components/Navbar/NavbarItem.tsx +2 -2
- package/src/components/Navbar/NavbarLogo.tsx +8 -3
- package/src/components/Navbar/NavbarMenu.tsx +1 -1
- package/src/components/PageNavigation/NextButton.tsx +1 -1
- package/src/components/PageNavigation/PageNavigation.tsx +1 -1
- package/src/components/PageNavigation/PreviousButton.tsx +1 -1
- package/src/components/Panel/Panel.tsx +1 -1
- package/src/components/Panel/PanelBody.ts +2 -2
- package/src/components/Portal/Portal.tsx +6 -3
- package/src/components/Product/Product.tsx +1 -1
- package/src/components/Product/ProductPicker.tsx +4 -1
- package/src/components/Product/variables.ts +4 -1
- package/src/components/Search/Search.tsx +1 -1
- package/src/components/Search/SearchDialog.tsx +1 -1
- package/src/components/Search/SearchInput.tsx +1 -1
- package/src/components/Search/SearchItem.tsx +1 -1
- package/src/components/Search/SearchRecent.tsx +1 -1
- package/src/components/Search/SearchShortcut.tsx +1 -1
- package/src/components/Search/SearchSuggestedPages.tsx +1 -1
- package/src/components/Search/SearchTrigger.tsx +1 -1
- package/src/components/Search/variables.ts +2 -2
- package/src/components/Segmented/Segmented.tsx +1 -1
- package/src/components/Select/Select.tsx +3 -3
- package/src/components/Sidebar/Sidebar.tsx +1 -1
- package/src/components/SidebarActions/ChangeViewButton.tsx +2 -2
- package/src/components/SidebarActions/SidebarActions.tsx +2 -2
- package/src/components/SidebarLogo/SidebarLogo.tsx +3 -3
- package/src/components/TableOfContent/TableOfContent.tsx +1 -1
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/variables.ts +4 -0
- package/src/components/Typography/H1.ts +1 -1
- package/src/components/Typography/H2.ts +1 -1
- package/src/components/Typography/H3.ts +1 -1
- package/src/components/Typography/H4.ts +1 -1
- package/src/components/UserMenu/UserAvatar.tsx +1 -1
- package/src/components/UserMenu/UserInfoMenuItem.tsx +1 -1
- package/src/components/UserMenu/UserMenu.tsx +5 -2
- package/src/components/UserMenu/UserMenuMobile.tsx +1 -1
- package/src/components/UserMenu/variables.ts +4 -1
- package/src/core/types/catalog.ts +3 -1
- package/src/core/types/hooks.ts +3 -1
- package/src/layouts/DocumentationLayout.tsx +7 -0
- package/src/layouts/NotFound.tsx +3 -3
- package/src/layouts/RootLayout.tsx +2 -2
- package/src/markdoc/components/InlineSvg/InlineSvg.tsx +8 -1
- package/src/markdoc/components/Tabs/variables.ts +5 -5
|
@@ -6,7 +6,7 @@ import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDow
|
|
|
6
6
|
import { ChevronUpIcon } from '@redocly/theme/icons/ChevronUpIcon/ChevronUpIcon';
|
|
7
7
|
import { CheckmarkIcon } from '@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon';
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export type SelectProps<T = any> = {
|
|
10
10
|
value: T;
|
|
11
11
|
options: {
|
|
12
12
|
element: React.ReactNode | JSX.Element | string;
|
|
@@ -25,9 +25,9 @@ export interface SelectProps<T = any> {
|
|
|
25
25
|
placeholder?: string;
|
|
26
26
|
disabled?: boolean;
|
|
27
27
|
renderInput?: (props: { isOpen: boolean }) => React.ReactElement;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
|
|
30
|
-
export function Select<T>(props: SelectProps<T>) {
|
|
30
|
+
export function Select<T>(props: SelectProps<T>): JSX.Element {
|
|
31
31
|
const {
|
|
32
32
|
className,
|
|
33
33
|
value,
|
|
@@ -7,7 +7,7 @@ import { breakpoints } from '@redocly/theme/core/utils';
|
|
|
7
7
|
import { useThemeConfig, useMobileMenu } from '@redocly/theme/core/hooks';
|
|
8
8
|
import { MenuContainer } from '@redocly/theme/components/Menu/MenuContainer';
|
|
9
9
|
|
|
10
|
-
type SidebarProps = {
|
|
10
|
+
export type SidebarProps = {
|
|
11
11
|
versions?: React.ReactNode;
|
|
12
12
|
menu?: React.ReactNode;
|
|
13
13
|
backLink?: {
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from '@redocly/theme/components/SidebarActions/styled';
|
|
10
10
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
export type ChangeViewButtonProps = {
|
|
13
13
|
layout: LayoutVariant;
|
|
14
14
|
collapsedSidebar: boolean;
|
|
15
15
|
onClick: () => void;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
|
|
18
18
|
export const ChangeViewButton = ({
|
|
19
19
|
layout,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
|
|
14
14
|
export { LayoutVariant };
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
export type SidebarActionsProps = {
|
|
17
17
|
layout: LayoutVariant;
|
|
18
18
|
collapsedSidebar: boolean;
|
|
19
19
|
isOpenapiDocs: boolean;
|
|
@@ -22,7 +22,7 @@ interface SidebarActionsProps {
|
|
|
22
22
|
onChangeCollapseSidebarClick: () => void;
|
|
23
23
|
requestAccessButton?: React.ReactElement | null;
|
|
24
24
|
className?: string;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
|
|
27
27
|
export const SidebarActions = ({
|
|
28
28
|
layout,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export type SidebarLogoProps = {
|
|
5
5
|
imageUrl?: string;
|
|
6
6
|
href?: string;
|
|
7
7
|
altText?: string;
|
|
8
8
|
dataTestId?: string;
|
|
9
9
|
backgroundColor?: string;
|
|
10
10
|
className?: string;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
|
|
13
13
|
export function SidebarLogo({
|
|
14
14
|
imageUrl,
|
|
@@ -17,7 +17,7 @@ export function SidebarLogo({
|
|
|
17
17
|
backgroundColor,
|
|
18
18
|
dataTestId,
|
|
19
19
|
className,
|
|
20
|
-
}:
|
|
20
|
+
}: SidebarLogoProps = {}): JSX.Element | null {
|
|
21
21
|
if (!imageUrl) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getLeastDepth,
|
|
17
17
|
} from '@redocly/theme/core/utils';
|
|
18
18
|
|
|
19
|
-
type TableOfContentProps = {
|
|
19
|
+
export type TableOfContentProps = {
|
|
20
20
|
headings?: Array<MdHeading | null> | null | undefined;
|
|
21
21
|
contentWrapper: HTMLDivElement | null;
|
|
22
22
|
className?: string;
|
|
@@ -168,8 +168,8 @@ const TooltipBody = styled.span<
|
|
|
168
168
|
position: absolute;
|
|
169
169
|
text-align: center;
|
|
170
170
|
|
|
171
|
-
padding:
|
|
172
|
-
max-width:
|
|
171
|
+
padding: var(--tooltip-padding);
|
|
172
|
+
max-width: var(--tooltip-max-width);
|
|
173
173
|
white-space: normal;
|
|
174
174
|
overflow-wrap: break-word;
|
|
175
175
|
|
|
@@ -8,6 +8,10 @@ export const tooltip = css`
|
|
|
8
8
|
|
|
9
9
|
--tooltip-text-color: var(--text-color-secondary);
|
|
10
10
|
--tooltip-bg-color: var(--bg-color-raised);
|
|
11
|
+
--tooltip-padding-vertical: var(--spacing-xs);
|
|
12
|
+
--tooltip-padding-horizontal: var(--spacing-sm);
|
|
13
|
+
--tooltip-padding: var(--tooltip-padding-vertical) var(--tooltip-padding-horizontal);
|
|
14
|
+
--tooltip-max-width: 250px;
|
|
11
15
|
|
|
12
16
|
.tooltip-copy-button {
|
|
13
17
|
--tooltip-text-color: var(--text-color-secondary);
|
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMenuItem';
|
|
5
5
|
import { UserAvatar } from '@redocly/theme/components/UserMenu/UserAvatar';
|
|
6
6
|
|
|
7
|
-
type UserInfoMenuItemProps = {
|
|
7
|
+
export type UserInfoMenuItemProps = {
|
|
8
8
|
name: string;
|
|
9
9
|
email?: string;
|
|
10
10
|
picture?: string;
|
|
@@ -13,7 +13,7 @@ import { UserInfoMenuItem } from '@redocly/theme/components/UserMenu/UserInfoMen
|
|
|
13
13
|
import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
|
|
14
14
|
import { LogoutMenuItem } from '@redocly/theme/components/UserMenu/LogoutMenuItem';
|
|
15
15
|
|
|
16
|
-
type UserMenuProps = {
|
|
16
|
+
export type UserMenuProps = {
|
|
17
17
|
className?: string;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -111,7 +111,6 @@ const StyledDropdown = styled(Dropdown).attrs(() => ({
|
|
|
111
111
|
--dropdown-menu-padding: var(--user-menu-dropdown-padding);
|
|
112
112
|
--dropdown-menu-border-radius: var(--user-menu-dropdown-border-radius);
|
|
113
113
|
--dropdown-menu-box-shadow: var(--user-menu-dropdown-box-shadow);
|
|
114
|
-
--dropdown-menu-color-disabled: var(--user-menu-dropdown-color-disabled);
|
|
115
114
|
--dropdown-menu-border-color: var(--user-menu-dropdown-border-color);
|
|
116
115
|
--dropdown-menu-bg-color: var(--user-menu-dropdown-bg-color);
|
|
117
116
|
--dropdown-menu-item-padding-horizontal: var(--user-menu-dropdown-item-padding-horizontal);
|
|
@@ -123,8 +122,12 @@ const StyledDropdown = styled(Dropdown).attrs(() => ({
|
|
|
123
122
|
--dropdown-menu-item-border-radius: var(--user-menu-dropdown-item-border-radius);
|
|
124
123
|
--dropdown-menu-item-bg-color-active: var(--user-menu-dropdown-item-bg-color-active);
|
|
125
124
|
--dropdown-menu-item-bg-color-hover: var(--user-menu-dropdown-item-bg-color-hover);
|
|
125
|
+
--dropdown-menu-item-bg-color-disabled: var(--user-menu-dropdown-item-bg-color-disabled);
|
|
126
126
|
--dropdown-menu-item-separator-border-color: var(
|
|
127
127
|
--user-menu-dropdown-item-separator-border-color
|
|
128
128
|
);
|
|
129
129
|
--dropdown-menu-item-color-dangerous: var(--user-menu-dropdown-item-color-dangerous);
|
|
130
|
+
--dropdown-menu-item-color-disabled: var(--user-menu-dropdown-item-color-disabled);
|
|
131
|
+
--dropdown-menu-item-color-active: var(--user-menu-dropdown-item-color-active);
|
|
132
|
+
--dropdown-menu-item-color-hover: var(--user-menu-dropdown-item-color-hover);
|
|
130
133
|
`;
|
|
@@ -6,7 +6,7 @@ import { UserAvatar } from '@redocly/theme/components/UserMenu/UserAvatar';
|
|
|
6
6
|
import { LogoutMenuItem } from '@redocly/theme/components/UserMenu/LogoutMenuItem';
|
|
7
7
|
import { LoginButton } from '@redocly/theme/components/UserMenu/LoginButton';
|
|
8
8
|
|
|
9
|
-
type UserMenuMobileProps = {
|
|
9
|
+
export type UserMenuMobileProps = {
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -42,7 +42,6 @@ export const userMenu = css`
|
|
|
42
42
|
--user-menu-dropdown-padding: var(--dropdown-menu-padding ); // @presenter Spacing
|
|
43
43
|
--user-menu-dropdown-border-radius: var(--dropdown-menu-border-radius); // @presenter BorderRadius
|
|
44
44
|
--user-menu-dropdown-box-shadow: var(--dropdown-menu-box-shadow); // @presenter Shadow
|
|
45
|
-
--user-menu-dropdown-color-disabled: var(--dropdown-menu-color-disabled); // @presenter Color
|
|
46
45
|
--user-menu-dropdown-border-color: var(--dropdown-menu-border-color); // @presenter Color
|
|
47
46
|
--user-menu-dropdown-bg-color: var(--dropdown-menu-bg-color); // @presenter Color
|
|
48
47
|
|
|
@@ -53,8 +52,12 @@ export const userMenu = css`
|
|
|
53
52
|
--user-menu-dropdown-item-border-radius: var(--dropdown-menu-item-border-radius ); // @presenter BorderRadius
|
|
54
53
|
--user-menu-dropdown-item-bg-color-active: var(--dropdown-menu-item-bg-color-active); // @presenter Color
|
|
55
54
|
--user-menu-dropdown-item-bg-color-hover: var(--dropdown-menu-item-bg-color-hover); // @presenter Color
|
|
55
|
+
--user-menu-dropdown-item-bg-color-disabled: var(--dropdown-menu-item-bg-color-disabled); // @presenter Color
|
|
56
56
|
--user-menu-dropdown-item-separator-border-color: var(--dropdown-menu-item-separator-border-color); // @presenter Color
|
|
57
57
|
--user-menu-dropdown-item-color-dangerous: var(--dropdown-menu-item-color-dangerous);
|
|
58
|
+
--user-menu-dropdown-item-color-disabled: var(--dropdown-menu-item-color-disabled);
|
|
59
|
+
--user-menu-dropdown-item-color-active: var(--dropdown-menu-item-color-active);
|
|
60
|
+
--user-menu-dropdown-item-color-hover: var(--dropdown-menu-item-color-hover);
|
|
58
61
|
--user-menu-dropdown-item-border-color-focused: var(--dropdown-menu-item-border-color-focused);
|
|
59
62
|
|
|
60
63
|
// @tokens End
|
|
@@ -34,6 +34,8 @@ export type CatalogItem = {
|
|
|
34
34
|
scorecardLevels?: Record<string, { uniqueErrors: number; uniqueWarnings: number }>;
|
|
35
35
|
scoreCardSlug?: string;
|
|
36
36
|
tags?: unknown[];
|
|
37
|
-
|
|
37
|
+
versions?: CatalogItem[];
|
|
38
|
+
version?: string;
|
|
39
|
+
versionFolderId?: string;
|
|
38
40
|
[k: string]: unknown;
|
|
39
41
|
};
|
package/src/core/types/hooks.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResolvedNavItemWithLink, Version } from '@redocly/config';
|
|
1
|
+
import type { PageProps, ResolvedNavItemWithLink, Version } from '@redocly/config';
|
|
2
2
|
import type { Callback, TFunction as TFunc } from 'i18next';
|
|
3
3
|
import type { To, Location } from 'react-router-dom';
|
|
4
4
|
import type { CatalogConfig, ProductUiConfig } from '@redocly/theme/config';
|
|
@@ -62,6 +62,8 @@ export type ThemeHooks = {
|
|
|
62
62
|
| undefined;
|
|
63
63
|
useCatalog: (config: CatalogConfig) => FilteredCatalog;
|
|
64
64
|
useTelemetry: () => { send(action: TelemetryEvent, data: unknown): void };
|
|
65
|
+
useUserTeams: () => string[];
|
|
66
|
+
usePageProps: <T extends Record<string, unknown>>() => PageProps & T;
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
export type I18nConfig = {
|
|
@@ -63,6 +63,13 @@ const LayoutWrapper = styled.div.attrs(({ className }) => ({
|
|
|
63
63
|
`;
|
|
64
64
|
|
|
65
65
|
const ContentWrapper = styled.section<{ withToc: boolean }>`
|
|
66
|
+
--md-content-font-size: var(--font-size-lg);
|
|
67
|
+
--md-content-line-height: var(--line-height-lg);
|
|
68
|
+
--md-table-font-size: var(--md-content-font-size);
|
|
69
|
+
--md-table-line-height: var(--md-content-line-height);
|
|
70
|
+
--md-tabs-content-font-size: var(--md-content-font-size);
|
|
71
|
+
--md-tabs-content-line-height: var(--md-content-line-height);
|
|
72
|
+
|
|
66
73
|
max-width: var(--md-content-max-width);
|
|
67
74
|
width: 90%;
|
|
68
75
|
margin: 0 auto;
|
package/src/layouts/NotFound.tsx
CHANGED
|
@@ -10,7 +10,7 @@ export function NotFound(): JSX.Element {
|
|
|
10
10
|
const { translate } = useTranslate();
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
|
-
<
|
|
13
|
+
<NotFoundWrapper data-component-name="Pages/NotFound">
|
|
14
14
|
<StatusText>404</StatusText>
|
|
15
15
|
<Title data-translation-key="theme.page.notFound.title">
|
|
16
16
|
{translate('theme.page.notFound.title', 'Something went missing...')}
|
|
@@ -30,11 +30,11 @@ export function NotFound(): JSX.Element {
|
|
|
30
30
|
>
|
|
31
31
|
{translate('theme.page.homeButton', 'Go home')}
|
|
32
32
|
</Button>
|
|
33
|
-
</
|
|
33
|
+
</NotFoundWrapper>
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
const
|
|
37
|
+
const NotFoundWrapper = styled.div`
|
|
38
38
|
height: 100%;
|
|
39
39
|
max-width: var(--page-404-max-width);
|
|
40
40
|
display: flex;
|
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { Navbar } from '@redocly/theme/components/Navbar/Navbar';
|
|
4
4
|
import { Footer } from '@redocly/theme/components/Footer/Footer';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export type LayoutConfig = {
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
|
|
10
10
|
export function RootLayout({ children }: LayoutConfig): JSX.Element {
|
|
11
11
|
return (
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
export function InlineSvg({
|
|
3
|
+
export function InlineSvg({
|
|
4
|
+
fileRawContent,
|
|
5
|
+
className,
|
|
6
|
+
}: {
|
|
7
|
+
fileRawContent: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}) {
|
|
4
10
|
return (
|
|
5
11
|
<span
|
|
12
|
+
className={className}
|
|
6
13
|
data-component-name="Markdoc/InlineSvg/InlineSvg"
|
|
7
14
|
dangerouslySetInnerHTML={{ __html: fileRawContent }}
|
|
8
15
|
/>
|
|
@@ -6,8 +6,8 @@ import { css } from "styled-components";
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
--md-tabs-container-text-color: inherit; // @presenter Color
|
|
9
|
-
--md-tabs-container-font-size: var(--font-size
|
|
10
|
-
--md-tabs-container-font-family: var(--font-
|
|
9
|
+
--md-tabs-container-font-size: var(--md-content-font-size); // @presenter FontSize
|
|
10
|
+
--md-tabs-container-font-family: var(--md-content-font-family); // @presenter FontFamily
|
|
11
11
|
--md-tabs-container-font-style: normal; // @presenter FontStyle
|
|
12
12
|
--md-tabs-container-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
13
13
|
--md-tabs-container-bg-color: inherit; // @presenter Color
|
|
@@ -20,8 +20,8 @@ import { css } from "styled-components";
|
|
|
20
20
|
--md-tabs-padding: 0; // @presenter Spacing
|
|
21
21
|
|
|
22
22
|
--md-tabs-content-text-color: inherit; // @presenter Color
|
|
23
|
-
--md-tabs-content-font-size: var(--font-size
|
|
24
|
-
--md-tabs-content-font-family: var(--font-
|
|
23
|
+
--md-tabs-content-font-size: var(--md-content-font-size); // @presenter FontSize
|
|
24
|
+
--md-tabs-content-font-family: var(--md-content-font-family); // @presenter FontFamily
|
|
25
25
|
--md-tabs-content-font-style: normal; // @presenter FontStyle
|
|
26
26
|
--md-tabs-content-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
27
27
|
--md-tabs-content-bg-color: inherit; // @presenter Color
|
|
@@ -31,7 +31,7 @@ import { css } from "styled-components";
|
|
|
31
31
|
|
|
32
32
|
--md-tabs-tab-text-color: var(--text-color-primary); // @presenter Color
|
|
33
33
|
--md-tabs-tab-font-size: var(--font-size-lg); // @presenter FontSize
|
|
34
|
-
--md-tabs-tab-font-family: var(--font-
|
|
34
|
+
--md-tabs-tab-font-family: var(--md-content-font-family); // @presenter FontFamily
|
|
35
35
|
--md-tabs-tab-font-style: normal; // @presenter FontStyle
|
|
36
36
|
--md-tabs-tab-font-weight: var(--font-weight-bold); // @presenter FontWeight
|
|
37
37
|
--md-tabs-tab-bg-color: none; // @presenter Color
|