@redocly/theme 0.82.2-rc.3 → 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/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/CatalogHighlight.d.ts +1 -2
- package/lib/components/Catalog/CatalogInfoBlock.d.ts +1 -2
- 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/DropdownMenu.d.ts +1 -2
- package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -2
- package/lib/components/Feedback/Comment.d.ts +2 -1
- package/lib/components/Feedback/Comment.js +3 -3
- package/lib/components/Feedback/ReportDialog.js +1 -1
- package/lib/components/Filter/FilterContent.d.ts +1 -3
- package/lib/components/Filter/FilterContent.js +3 -3
- 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/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 +6 -7
- 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/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/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/UserMenuMobile.d.ts +1 -2
- package/lib/components/VersionPicker/VersionPicker.d.ts +1 -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/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 +3 -1
- package/src/components/Catalog/CatalogHighlight.tsx +1 -1
- package/src/components/Catalog/CatalogInfoBlock.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 +2 -2
- package/src/components/Dropdown/DropdownMenu.tsx +1 -1
- package/src/components/Dropdown/DropdownMenuItem.tsx +1 -1
- package/src/components/Feedback/Comment.tsx +4 -2
- package/src/components/Feedback/ReportDialog.tsx +1 -0
- package/src/components/Filter/FilterContent.tsx +2 -2
- 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 +1 -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 +17 -8
- 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/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/UserMenu/UserAvatar.tsx +1 -1
- package/src/components/UserMenu/UserInfoMenuItem.tsx +1 -1
- package/src/components/UserMenu/UserMenu.tsx +1 -1
- package/src/components/UserMenu/UserMenuMobile.tsx +1 -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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type SearchRecentProps = {
|
|
2
|
+
export type SearchRecentProps = {
|
|
3
3
|
onSelect: (value: string) => void;
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
6
6
|
export declare function SearchRecent({ onSelect, className }: SearchRecentProps): JSX.Element | null;
|
|
7
|
-
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type SearchShortcutProps = {
|
|
2
|
+
export type SearchShortcutProps = {
|
|
3
3
|
combination: string;
|
|
4
4
|
text: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare function SearchShortcut({ combination, text, className }: SearchShortcutProps): JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -51,7 +51,7 @@ exports.search = (0, styled_components_1.css) `
|
|
|
51
51
|
--search-recent-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
52
52
|
--search-recent-item-padding: var(--spacing-xs) var(--spacing-lg);
|
|
53
53
|
--search-recent-item-text-color: var(--search-item-text-color); // @presenter Color
|
|
54
|
-
--search-recent-item-text-color-hover: var(--search-item-text-color-
|
|
54
|
+
--search-recent-item-text-color-hover: var(--search-item-text-color-hover); // @presenter Color
|
|
55
55
|
--search-recent-item-bg-color-hover: var(--search-item-bg-color-hover); // @presenter Color
|
|
56
56
|
--search-recent-item-title-font-size: var(--font-size-base); // @presenter FontSize
|
|
57
57
|
--search-recent-item-title-font-weight: var(--font-weight-semibold); // @presenter FontWeight
|
|
@@ -66,7 +66,7 @@ exports.search = (0, styled_components_1.css) `
|
|
|
66
66
|
--search-suggested-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
67
67
|
--search-suggested-item-padding: var(--spacing-xs) var(--spacing-lg);
|
|
68
68
|
--search-suggested-item-text-color: var(--search-item-text-color); // @presenter Color
|
|
69
|
-
--search-suggested-item-text-color-hover: var(--search-item-text-color-
|
|
69
|
+
--search-suggested-item-text-color-hover: var(--search-item-text-color-hover); // @presenter Color
|
|
70
70
|
--search-suggested-item-bg-color-hover: var(--search-item-bg-color-hover); // @presenter Color
|
|
71
71
|
--search-suggested-item-title-font-size: var(--font-size-base); // @presenter FontSize
|
|
72
72
|
--search-suggested-item-title-font-weight: var(--font-weight-semibold); // @presenter FontWeight
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type SelectProps<T = any> = {
|
|
3
3
|
value: T;
|
|
4
4
|
options: {
|
|
5
5
|
element: React.ReactNode | JSX.Element | string;
|
|
@@ -20,8 +20,8 @@ export interface SelectProps<T = any> {
|
|
|
20
20
|
renderInput?: (props: {
|
|
21
21
|
isOpen: boolean;
|
|
22
22
|
}) => React.ReactElement;
|
|
23
|
-
}
|
|
24
|
-
export declare function Select<T>(props: SelectProps<T>):
|
|
23
|
+
};
|
|
24
|
+
export declare function Select<T>(props: SelectProps<T>): JSX.Element;
|
|
25
25
|
export declare const SelectContainer: import("styled-components").StyledComponent<"div", any, {
|
|
26
26
|
disabled?: boolean | undefined;
|
|
27
27
|
}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MenuItemsAnimation } from '../../core/types';
|
|
3
|
-
type SidebarProps = {
|
|
3
|
+
export type SidebarProps = {
|
|
4
4
|
versions?: React.ReactNode;
|
|
5
5
|
menu?: React.ReactNode;
|
|
6
6
|
backLink?: {
|
|
@@ -17,4 +17,3 @@ type SidebarProps = {
|
|
|
17
17
|
menuItemsAnimation?: MenuItemsAnimation;
|
|
18
18
|
};
|
|
19
19
|
export declare function Sidebar({ versions, menu, footer, header, growContent, collapsed, className, menuItemsAnimation, }: SidebarProps): JSX.Element | null;
|
|
20
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LayoutVariant } from '../../components/SidebarActions/SidebarActions';
|
|
3
|
-
|
|
3
|
+
export type ChangeViewButtonProps = {
|
|
4
4
|
layout: LayoutVariant;
|
|
5
5
|
collapsedSidebar: boolean;
|
|
6
6
|
onClick: () => void;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export declare const ChangeViewButton: ({ layout, onClick, collapsedSidebar, }: ChangeViewButtonProps) => JSX.Element | null;
|
|
9
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LayoutVariant } from '@redocly/config';
|
|
3
3
|
export { LayoutVariant };
|
|
4
|
-
|
|
4
|
+
export type SidebarActionsProps = {
|
|
5
5
|
layout: LayoutVariant;
|
|
6
6
|
collapsedSidebar: boolean;
|
|
7
7
|
isOpenapiDocs: boolean;
|
|
@@ -10,5 +10,5 @@ interface SidebarActionsProps {
|
|
|
10
10
|
onChangeCollapseSidebarClick: () => void;
|
|
11
11
|
requestAccessButton?: React.ReactElement | null;
|
|
12
12
|
className?: string;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
export declare const SidebarActions: ({ layout, hideCollapseSidebarButton, collapsedSidebar, isOpenapiDocs, onChangeViewClick, onChangeCollapseSidebarClick, requestAccessButton, className, }: SidebarActionsProps) => React.JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type SidebarLogoProps = {
|
|
3
3
|
imageUrl?: string;
|
|
4
4
|
href?: string;
|
|
5
5
|
altText?: string;
|
|
6
6
|
dataTestId?: string;
|
|
7
7
|
backgroundColor?: string;
|
|
8
8
|
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function SidebarLogo({ imageUrl, href, altText, backgroundColor, dataTestId, className, }?:
|
|
9
|
+
};
|
|
10
|
+
export declare function SidebarLogo({ imageUrl, href, altText, backgroundColor, dataTestId, className, }?: SidebarLogoProps): JSX.Element | null;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { MdHeading } from '../../core/types';
|
|
3
|
-
type TableOfContentProps = {
|
|
3
|
+
export type TableOfContentProps = {
|
|
4
4
|
headings?: Array<MdHeading | null> | null | undefined;
|
|
5
5
|
contentWrapper: HTMLDivElement | null;
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
8
|
export declare function TableOfContent(props: TableOfContentProps): JSX.Element | null;
|
|
9
|
-
export {};
|
|
@@ -5,7 +5,7 @@ type SubjectStatusColor = 'active' | 'draft' | 'deprecated' | 'product';
|
|
|
5
5
|
type HttpColor = 'get' | 'post' | 'put' | 'delete' | 'option' | 'patch' | 'head' | 'hook' | 'link';
|
|
6
6
|
type StatusColor = DefaultStatusColor | ActionStatusColor | SubjectStatusColor | HttpColor;
|
|
7
7
|
type Color = 'red' | 'green' | 'blue' | 'grey' | 'gold' | 'cyan' | 'magenta' | 'purple' | 'lime' | 'geekblue' | 'yellow';
|
|
8
|
-
type TagProps = {
|
|
8
|
+
export type TagProps = {
|
|
9
9
|
className?: string;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
closable?: boolean;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type UserAvatarProps = {
|
|
2
|
+
export type UserAvatarProps = {
|
|
3
3
|
picture?: string;
|
|
4
4
|
className?: string;
|
|
5
5
|
height?: `var(${string})` | `${number}px`;
|
|
6
6
|
width?: `var(${string})` | `${number}px`;
|
|
7
7
|
};
|
|
8
8
|
export declare function UserAvatar({ picture, className, height, width, }: UserAvatarProps): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type UserInfoMenuItemProps = {
|
|
2
|
+
export type UserInfoMenuItemProps = {
|
|
3
3
|
name: string;
|
|
4
4
|
email?: string;
|
|
5
5
|
picture?: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
8
|
export declare function UserInfoMenuItem({ name, picture, email, className, }: UserInfoMenuItemProps): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -7,4 +7,4 @@ export declare function VersionPicker(props: {
|
|
|
7
7
|
versions?: Version[];
|
|
8
8
|
onChange: (v: Version) => void;
|
|
9
9
|
}): React.JSX.Element | null;
|
|
10
|
-
export declare const VersionPickerSelect: import("styled-components").StyledComponent<typeof Select, any, SelectProps
|
|
10
|
+
export declare const VersionPickerSelect: import("styled-components").StyledComponent<typeof Select, any, SelectProps, never>;
|
|
@@ -35,6 +35,13 @@ const LayoutWrapper = styled_components_1.default.div.attrs(({ className }) => (
|
|
|
35
35
|
width: 100%;
|
|
36
36
|
`;
|
|
37
37
|
const ContentWrapper = styled_components_1.default.section `
|
|
38
|
+
--md-content-font-size: var(--font-size-lg);
|
|
39
|
+
--md-content-line-height: var(--line-height-lg);
|
|
40
|
+
--md-table-font-size: var(--md-content-font-size);
|
|
41
|
+
--md-table-line-height: var(--md-content-line-height);
|
|
42
|
+
--md-tabs-content-font-size: var(--md-content-font-size);
|
|
43
|
+
--md-tabs-content-line-height: var(--md-content-line-height);
|
|
44
|
+
|
|
38
45
|
max-width: var(--md-content-max-width);
|
|
39
46
|
width: 90%;
|
|
40
47
|
margin: 0 auto;
|
package/lib/layouts/NotFound.js
CHANGED
|
@@ -12,14 +12,14 @@ const ArrowLeftIcon_1 = require("../icons/ArrowLeftIcon/ArrowLeftIcon");
|
|
|
12
12
|
function NotFound() {
|
|
13
13
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
14
14
|
const { translate } = useTranslate();
|
|
15
|
-
return (react_1.default.createElement(
|
|
15
|
+
return (react_1.default.createElement(NotFoundWrapper, { "data-component-name": "Pages/NotFound" },
|
|
16
16
|
react_1.default.createElement(StatusText, null, "404"),
|
|
17
17
|
react_1.default.createElement(Title, { "data-translation-key": "theme.page.notFound.title" }, translate('theme.page.notFound.title', 'Something went missing...')),
|
|
18
18
|
react_1.default.createElement(Description, { "data-translation-key": "theme.page.notFound.description" }, translate('theme.page.notFound.description', "The page you were trying to reach doesn't exist or may have been moved. You can go back to the previous page, return to the homepage, or use the search bar to find what you're looking for.")),
|
|
19
19
|
react_1.default.createElement(Button_1.Button, { variant: "primary", size: "large", to: "/", "data-translation-key": "theme.page.homeButton", icon: react_1.default.createElement(ArrowLeftIcon_1.ArrowLeftIcon, null) }, translate('theme.page.homeButton', 'Go home'))));
|
|
20
20
|
}
|
|
21
21
|
exports.NotFound = NotFound;
|
|
22
|
-
const
|
|
22
|
+
const NotFoundWrapper = styled_components_1.default.div `
|
|
23
23
|
height: 100%;
|
|
24
24
|
max-width: var(--page-404-max-width);
|
|
25
25
|
display: flex;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.InlineSvg = void 0;
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
|
-
function InlineSvg({ fileRawContent }) {
|
|
29
|
-
return (React.createElement("span", { "data-component-name": "Markdoc/InlineSvg/InlineSvg", dangerouslySetInnerHTML: { __html: fileRawContent } }));
|
|
28
|
+
function InlineSvg({ fileRawContent, className, }) {
|
|
29
|
+
return (React.createElement("span", { className: className, "data-component-name": "Markdoc/InlineSvg/InlineSvg", dangerouslySetInnerHTML: { __html: fileRawContent } }));
|
|
30
30
|
}
|
|
31
31
|
exports.InlineSvg = InlineSvg;
|
|
32
32
|
//# sourceMappingURL=InlineSvg.js.map
|
|
@@ -8,8 +8,8 @@ exports.markdownTabs = (0, styled_components_1.css) `
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
--md-tabs-container-text-color: inherit; // @presenter Color
|
|
11
|
-
--md-tabs-container-font-size: var(--font-size
|
|
12
|
-
--md-tabs-container-font-family: var(--font-
|
|
11
|
+
--md-tabs-container-font-size: var(--md-content-font-size); // @presenter FontSize
|
|
12
|
+
--md-tabs-container-font-family: var(--md-content-font-family); // @presenter FontFamily
|
|
13
13
|
--md-tabs-container-font-style: normal; // @presenter FontStyle
|
|
14
14
|
--md-tabs-container-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
15
15
|
--md-tabs-container-bg-color: inherit; // @presenter Color
|
|
@@ -22,8 +22,8 @@ exports.markdownTabs = (0, styled_components_1.css) `
|
|
|
22
22
|
--md-tabs-padding: 0; // @presenter Spacing
|
|
23
23
|
|
|
24
24
|
--md-tabs-content-text-color: inherit; // @presenter Color
|
|
25
|
-
--md-tabs-content-font-size: var(--font-size
|
|
26
|
-
--md-tabs-content-font-family: var(--font-
|
|
25
|
+
--md-tabs-content-font-size: var(--md-content-font-size); // @presenter FontSize
|
|
26
|
+
--md-tabs-content-font-family: var(--md-content-font-family); // @presenter FontFamily
|
|
27
27
|
--md-tabs-content-font-style: normal; // @presenter FontStyle
|
|
28
28
|
--md-tabs-content-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
29
29
|
--md-tabs-content-bg-color: inherit; // @presenter Color
|
|
@@ -33,7 +33,7 @@ exports.markdownTabs = (0, styled_components_1.css) `
|
|
|
33
33
|
|
|
34
34
|
--md-tabs-tab-text-color: var(--text-color-primary); // @presenter Color
|
|
35
35
|
--md-tabs-tab-font-size: var(--font-size-lg); // @presenter FontSize
|
|
36
|
-
--md-tabs-tab-font-family: var(--font-
|
|
36
|
+
--md-tabs-tab-font-family: var(--md-content-font-family); // @presenter FontFamily
|
|
37
37
|
--md-tabs-tab-font-style: normal; // @presenter FontStyle
|
|
38
38
|
--md-tabs-tab-font-weight: var(--font-weight-bold); // @presenter FontWeight
|
|
39
39
|
--md-tabs-tab-bg-color: none; // @presenter Color
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.4-rc.1",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"json-schema-to-ts": "2.7.2",
|
|
73
73
|
"lodash.throttle": "4.1.1",
|
|
74
74
|
"npm-run-all2": "5.0.2",
|
|
75
|
-
"react-refresh": "0.14.
|
|
75
|
+
"react-refresh": "0.14.2",
|
|
76
76
|
"react-router-dom": "6.21.1",
|
|
77
77
|
"rimraf": "5.0.5",
|
|
78
78
|
"storybook": "7.6.4",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"tsconfig-paths": "4.2.0",
|
|
88
88
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
89
89
|
"typescript": "5.2.2",
|
|
90
|
-
"webpack": "5.
|
|
90
|
+
"webpack": "5.91.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"timeago.js": "^4.0.2",
|
|
99
99
|
"i18next": "^22.4.12",
|
|
100
100
|
"nprogress": "^0.2.0",
|
|
101
|
-
"@redocly/config": "0.82.
|
|
101
|
+
"@redocly/config": "0.82.4-rc.1"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"start": "npm-run-all --parallel storybook storybook:tokens:watch",
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
1
2
|
import styled, { css } from 'styled-components';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export type BadgeProps = PropsWithChildren<{
|
|
5
|
+
deprecated?: boolean;
|
|
6
|
+
color?: string;
|
|
7
|
+
key?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
export function Badge(props: BadgeProps): JSX.Element {
|
|
12
|
+
return <BadgeComponent {...props} data-component-name="Badge/Badge" />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const BadgeComponent = styled.span<BadgeProps>`
|
|
6
16
|
display: inline-block;
|
|
7
17
|
padding: 0 var(--spacing-xs);
|
|
8
18
|
vertical-align: middle;
|
|
@@ -10,7 +10,7 @@ type BreadcrumbProps = {
|
|
|
10
10
|
onClick?: () => void;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export function Breadcrumb({ label, link, isActive, onClick }: BreadcrumbProps): JSX.Element {
|
|
14
14
|
return (
|
|
15
15
|
<BreadcrumbWrapper
|
|
16
16
|
data-component-name="Breadcrumbs/Breadcrumb"
|
|
@@ -25,7 +25,7 @@ export const Breadcrumb = ({ label, link, isActive, onClick }: BreadcrumbProps):
|
|
|
25
25
|
)}
|
|
26
26
|
</BreadcrumbWrapper>
|
|
27
27
|
);
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
|
|
30
30
|
const BreadcrumbText = styled.div`
|
|
31
31
|
cursor: default;
|
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
5
5
|
import { Breadcrumb } from '@redocly/theme/components/Breadcrumbs/Breadcrumb';
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export function Breadcrumbs(props: { className?: string }): JSX.Element | null {
|
|
8
8
|
const { useBreadcrumbs, useTelemetry } = useThemeHooks();
|
|
9
9
|
const telemetry = useTelemetry();
|
|
10
10
|
const breadcrumbs = useBreadcrumbs();
|
|
@@ -37,7 +37,7 @@ export const Breadcrumbs = (props: { className?: string }) => {
|
|
|
37
37
|
})}
|
|
38
38
|
</BreadcrumbsWrapper>
|
|
39
39
|
);
|
|
40
|
-
}
|
|
40
|
+
}
|
|
41
41
|
|
|
42
42
|
const BreadcrumbsWrapper = styled.div`
|
|
43
43
|
display: flex;
|
|
@@ -9,7 +9,7 @@ import { Button } from '@redocly/theme/components/Button/Button';
|
|
|
9
9
|
import { CopyIcon } from '@redocly/theme/icons/CopyIcon/CopyIcon';
|
|
10
10
|
import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
11
11
|
|
|
12
|
-
type CopyButtonProps = {
|
|
12
|
+
export type CopyButtonProps = {
|
|
13
13
|
data: unknown;
|
|
14
14
|
type?: ControlItemType;
|
|
15
15
|
toasterPlacement?: TooltipProps['placement'];
|
|
@@ -19,9 +19,10 @@ type CopyButtonProps = {
|
|
|
19
19
|
onCopyClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
20
20
|
dataTestId?: string;
|
|
21
21
|
className?: string;
|
|
22
|
+
variant?: string;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
function CopyButtonComponent({
|
|
25
26
|
data,
|
|
26
27
|
type = 'icon',
|
|
27
28
|
toasterPlacement = 'top',
|
|
@@ -31,7 +32,8 @@ const CopyButtonComponent = ({
|
|
|
31
32
|
onCopyClick,
|
|
32
33
|
dataTestId = 'copy-button',
|
|
33
34
|
className,
|
|
34
|
-
|
|
35
|
+
variant = 'text',
|
|
36
|
+
}: CopyButtonProps): JSX.Element {
|
|
35
37
|
const { useTranslate } = useThemeHooks();
|
|
36
38
|
const tooltip = useControl();
|
|
37
39
|
const { translate } = useTranslate();
|
|
@@ -64,12 +66,12 @@ const CopyButtonComponent = ({
|
|
|
64
66
|
data-testid={dataTestId}
|
|
65
67
|
icon={type === 'icon' ? <CopyIcon /> : undefined}
|
|
66
68
|
size="small"
|
|
67
|
-
variant=
|
|
69
|
+
variant={variant}
|
|
68
70
|
>
|
|
69
71
|
{type !== 'icon' && translate('theme.codeSnippet.copy.toasterText', buttonText || 'Copy')}
|
|
70
72
|
</Button>
|
|
71
73
|
</Tooltip>
|
|
72
74
|
);
|
|
73
|
-
}
|
|
75
|
+
}
|
|
74
76
|
|
|
75
77
|
export const CopyButton = memo<CopyButtonProps>(CopyButtonComponent);
|
|
@@ -5,11 +5,11 @@ import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
|
5
5
|
import { EditIcon } from '@redocly/theme/icons/EditIcon/EditIcon';
|
|
6
6
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
7
7
|
|
|
8
|
-
type EditPageButtonProps = {
|
|
8
|
+
export type EditPageButtonProps = {
|
|
9
9
|
to: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export
|
|
12
|
+
export function EditPageButton({ to }: EditPageButtonProps): JSX.Element {
|
|
13
13
|
const { useTranslate, useTelemetry } = useThemeHooks();
|
|
14
14
|
const { translate } = useTranslate();
|
|
15
15
|
const telemetry = useTelemetry();
|
|
@@ -26,7 +26,7 @@ export const EditPageButton = ({ to }: EditPageButtonProps): JSX.Element => {
|
|
|
26
26
|
</ButtonText>
|
|
27
27
|
</EditPageButtonWrapper>
|
|
28
28
|
);
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
const EditPageButtonWrapper = styled(Link)`
|
|
32
32
|
height: fit-content;
|
|
@@ -3,12 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
4
4
|
import { EmailIcon } from '@redocly/theme/icons/EmailIcon/EmailIcon';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export type EmailButtonProps = {
|
|
7
7
|
data: string;
|
|
8
8
|
dataTestId?: string;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
|
|
11
|
-
export
|
|
11
|
+
export function EmailButton({ data, dataTestId = 'email-button' }: EmailButtonProps): JSX.Element {
|
|
12
12
|
const onClick = () => {
|
|
13
13
|
window.location.href = `mailto:${data}`;
|
|
14
14
|
};
|
|
@@ -25,4 +25,4 @@ export const EmailButton = ({ data, dataTestId = 'email-button' }: EmailButtonPr
|
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
27
|
);
|
|
28
|
-
}
|
|
28
|
+
}
|
|
@@ -3,12 +3,15 @@ import React from 'react';
|
|
|
3
3
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
4
4
|
import { ArrowUpRightIcon } from '@redocly/theme/icons/ArrowUpRightIcon/ArrowUpRightIcon';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export type NewTabButtonProps = {
|
|
7
7
|
data: string;
|
|
8
8
|
dataTestId?: string;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
|
|
11
|
-
export
|
|
11
|
+
export function NewTabButton({
|
|
12
|
+
data,
|
|
13
|
+
dataTestId = 'new-tab-button',
|
|
14
|
+
}: NewTabButtonProps): JSX.Element {
|
|
12
15
|
const onClick = () => {
|
|
13
16
|
window.open(data, '_blank');
|
|
14
17
|
};
|
|
@@ -25,4 +28,4 @@ export const NewTabButton = ({ data, dataTestId = 'new-tab-button' }: NewTabButt
|
|
|
25
28
|
/>
|
|
26
29
|
</div>
|
|
27
30
|
);
|
|
28
|
-
}
|
|
31
|
+
}
|
|
@@ -12,15 +12,16 @@ import { FilterPopover } from '@redocly/theme/components/Filter/FilterPopover';
|
|
|
12
12
|
import { HighlightContext } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
|
13
13
|
import { CatalogActions } from '@redocly/theme/components/Catalog/CatalogActions';
|
|
14
14
|
import { Sidebar } from '@redocly/theme/components/Sidebar/Sidebar';
|
|
15
|
-
import { MenuContainer } from '@redocly/theme/components/Menu/MenuContainer';
|
|
16
15
|
import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
|
|
17
16
|
|
|
18
|
-
export
|
|
17
|
+
export type CatalogProps = {
|
|
19
18
|
pageProps: {
|
|
20
19
|
catalogId: string;
|
|
21
20
|
catalogConfig: CatalogConfig;
|
|
22
21
|
};
|
|
23
|
-
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default function Catalog(props: CatalogProps): JSX.Element {
|
|
24
25
|
const { catalogConfig } = props.pageProps;
|
|
25
26
|
const { useTranslate, useCatalog } = useThemeHooks();
|
|
26
27
|
|
|
@@ -184,8 +185,5 @@ const FiltersSidebar = styled(Sidebar)`
|
|
|
184
185
|
@media screen and (min-width: ${breakpoints.medium}) {
|
|
185
186
|
display: flex;
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
-
${MenuContainer} {
|
|
189
|
-
padding: 0;
|
|
190
|
-
}
|
|
188
|
+
--menu-container-padding-top: 0;
|
|
191
189
|
`;
|
|
@@ -9,7 +9,7 @@ import { Button } from '@redocly/theme/components/Button/Button';
|
|
|
9
9
|
import { FilterIcon } from '@redocly/theme/icons/FilterIcon/FilterIcon';
|
|
10
10
|
import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
|
|
11
11
|
|
|
12
|
-
type CatalogActionsProps = {
|
|
12
|
+
export type CatalogActionsProps = {
|
|
13
13
|
onOpenFilter: () => void;
|
|
14
14
|
filters: ResolvedFilter[];
|
|
15
15
|
filterTerm: string;
|
|
@@ -11,7 +11,9 @@ import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
|
11
11
|
import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
|
12
12
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
13
13
|
|
|
14
|
-
type CatalogCardProps = {
|
|
14
|
+
export type CatalogCardProps = {
|
|
15
|
+
item: CatalogItem;
|
|
16
|
+
};
|
|
15
17
|
|
|
16
18
|
export function CatalogCard({ item }: CatalogCardProps): JSX.Element {
|
|
17
19
|
const { useTelemetry } = useThemeHooks();
|
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
|
|
5
5
|
export const HighlightContext = React.createContext<string[]>([]);
|
|
6
6
|
|
|
7
|
-
type CatalogHighlightProps = React.PropsWithChildren;
|
|
7
|
+
export type CatalogHighlightProps = React.PropsWithChildren;
|
|
8
8
|
|
|
9
9
|
export function CatalogHighlight(props: CatalogHighlightProps): JSX.Element | null {
|
|
10
10
|
const { children } = props;
|
|
@@ -6,7 +6,7 @@ import { getScorecardColorVariable } from '@redocly/theme/core/utils';
|
|
|
6
6
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
7
7
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
8
8
|
|
|
9
|
-
type CatalogInfoBlockProps = {
|
|
9
|
+
export type CatalogInfoBlockProps = {
|
|
10
10
|
metadata?: {
|
|
11
11
|
scorecardLevel?: string;
|
|
12
12
|
scoreCardSlug?: string;
|
|
@@ -1,15 +1,28 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
1
2
|
import styled, { css } from 'styled-components';
|
|
2
3
|
|
|
3
4
|
import { generateCodeBlockTokens } from '@redocly/theme/core/utils';
|
|
4
5
|
|
|
5
|
-
export
|
|
6
|
-
'data-component-name': 'CodeBlock/CodeBlockContainer',
|
|
7
|
-
className,
|
|
8
|
-
}))<{
|
|
9
|
-
maxHeight?: string;
|
|
6
|
+
export type CodeBlockContainerProps = PropsWithChildren<{
|
|
10
7
|
hideCodeColors?: boolean;
|
|
8
|
+
maxHeight?: string;
|
|
11
9
|
wrapContents?: boolean;
|
|
12
|
-
|
|
10
|
+
ref?: (instance: HTMLPreElement | null) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
dangerouslySetInnerHTML?: {
|
|
13
|
+
__html: string;
|
|
14
|
+
};
|
|
15
|
+
suppressHydrationWarning?: boolean;
|
|
16
|
+
tabIndex?: number;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
export function CodeBlockContainer(props: CodeBlockContainerProps): JSX.Element {
|
|
20
|
+
return (
|
|
21
|
+
<CodeBlockContainerComponent {...props} data-component-name="CodeBlock/CodeBlockContainer" />
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const CodeBlockContainerComponent = styled.pre<CodeBlockContainerProps>`
|
|
13
26
|
&& {
|
|
14
27
|
overflow-x: auto;
|
|
15
28
|
font-family: var(--code-block-font-family);
|