@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
|
@@ -5,13 +5,13 @@ import { CodeBlock } from '@redocly/theme/components/CodeBlock/CodeBlock';
|
|
|
5
5
|
|
|
6
6
|
import { JsonValue } from './helpers';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export type JsonProps = {
|
|
9
9
|
data: any;
|
|
10
10
|
className?: string;
|
|
11
11
|
expandLevel: number;
|
|
12
12
|
startLineNumber?: number;
|
|
13
13
|
onCopyClick?: () => void;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
|
|
16
16
|
function JsonComponent({ data, expandLevel = 1, className, onCopyClick }: JsonProps): JSX.Element {
|
|
17
17
|
const showFoldingButtons =
|
|
@@ -9,7 +9,7 @@ import { Button } from '@redocly/theme/components/Button/Button';
|
|
|
9
9
|
import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
|
|
10
10
|
import { CheckmarkIcon } from '@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon';
|
|
11
11
|
|
|
12
|
-
type LanguagePickerProps = {
|
|
12
|
+
export type LanguagePickerProps = {
|
|
13
13
|
onChangeLanguage: (newLang: string) => void;
|
|
14
14
|
onlyIcon?: boolean;
|
|
15
15
|
placement?: 'top' | 'bottom';
|
|
@@ -67,7 +67,7 @@ const LanguageDropdown = styled(Dropdown).attrs(() => ({
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
--dropdown-menu-item-justify-content: space-between;
|
|
70
|
-
|
|
70
|
+
--dropdown-menu-item-gap: var(--spacing-xxs);
|
|
71
71
|
--dropdown-menu-font-size: var(--language-picker-dropdown-font-size);
|
|
72
72
|
--dropdown-menu-font-weight: var(--language-picker-dropdown-font-weight);
|
|
73
73
|
--dropdown-menu-line-height: var(--language-picker-dropdown-line-height);
|
|
@@ -78,7 +78,6 @@ const LanguageDropdown = styled(Dropdown).attrs(() => ({
|
|
|
78
78
|
--dropdown-menu-padding: var(--language-picker-dropdown-padding);
|
|
79
79
|
--dropdown-menu-border-radius: var(--language-picker-dropdown-border-radius);
|
|
80
80
|
--dropdown-menu-box-shadow: var(--language-picker-dropdown-box-shadow);
|
|
81
|
-
--dropdown-menu-color-disabled: var(--language-picker-dropdown-color-disabled);
|
|
82
81
|
--dropdown-menu-border-color: var(--language-picker-dropdown-border-color);
|
|
83
82
|
--dropdown-menu-bg-color: var(--language-picker-dropdown-bg-color);
|
|
84
83
|
--dropdown-menu-item-padding-horizontal: var(--language-picker-dropdown-item-padding-horizontal);
|
|
@@ -92,8 +91,12 @@ const LanguageDropdown = styled(Dropdown).attrs(() => ({
|
|
|
92
91
|
--dropdown-menu-item-border-radius: var(--language-picker-dropdown-item-border-radius);
|
|
93
92
|
--dropdown-menu-item-bg-color-active: var(--language-picker-dropdown-item-bg-color-active);
|
|
94
93
|
--dropdown-menu-item-bg-color-hover: var(--language-picker-dropdown-item-bg-color-hover);
|
|
94
|
+
--dropdown-menu-item-bg-color-disabled: var(--language-picker-dropdown-item-bg-color-disabled);
|
|
95
95
|
--dropdown-menu-item-separator-border-color: var(
|
|
96
96
|
--language-picker-dropdown-item-separator-border-color
|
|
97
97
|
);
|
|
98
98
|
--dropdown-menu-item-color-dangerous: var(--language-picker-dropdown-item-color-dangerous);
|
|
99
|
+
--dropdown-menu-item-color-disabled: var(--language-picker-dropdown-item-color-disabled);
|
|
100
|
+
--dropdown-menu-item-color-active: var(--language-picker-dropdown-item-color-active);
|
|
101
|
+
--dropdown-menu-item-color-hover: var(--language-picker-dropdown-item-color-hover);
|
|
99
102
|
`;
|
|
@@ -15,7 +15,6 @@ export const languagePicker = css`
|
|
|
15
15
|
--language-picker-dropdown-padding: var(--dropdown-menu-padding ); // @presenter Spacing
|
|
16
16
|
--language-picker-dropdown-border-radius: var(--dropdown-menu-border-radius); // @presenter BorderRadius
|
|
17
17
|
--language-picker-dropdown-box-shadow: var(--dropdown-menu-box-shadow); // @presenter Shadow
|
|
18
|
-
--language-picker-dropdown-color-disabled: var(--dropdown-menu-color-disabled); // @presenter Color
|
|
19
18
|
--language-picker-dropdown-border-color: var(--dropdown-menu-border-color); // @presenter Color
|
|
20
19
|
--language-picker-dropdown-bg-color: var(--dropdown-menu-bg-color); // @presenter Color
|
|
21
20
|
|
|
@@ -26,8 +25,12 @@ export const languagePicker = css`
|
|
|
26
25
|
--language-picker-dropdown-item-border-radius: var(--dropdown-menu-item-border-radius ); // @presenter BorderRadius
|
|
27
26
|
--language-picker-dropdown-item-bg-color-active: var(--dropdown-menu-item-bg-color-active); // @presenter Color
|
|
28
27
|
--language-picker-dropdown-item-bg-color-hover: var(--dropdown-menu-item-bg-color-hover); // @presenter Color
|
|
28
|
+
--language-picker-dropdown-item-bg-color-disabled: var(--dropdown-menu-item-bg-color-disabled); // @presenter Color
|
|
29
29
|
--language-picker-dropdown-item-separator-border-color: var(--dropdown-menu-item-separator-border-color); // @presenter Color
|
|
30
30
|
--language-picker-dropdown-item-color-dangerous: var(--dropdown-menu-item-color-dangerous);
|
|
31
|
+
--language-picker-dropdown-item-color-disabled: var(--dropdown-menu-item-color-disabled);
|
|
32
|
+
--language-picker-dropdown-item-color-active: var(--dropdown-menu-item-color-active);
|
|
33
|
+
--language-picker-dropdown-item-color-hover: var(--dropdown-menu-item-color-hover);
|
|
31
34
|
--language-picker-dropdown-item-border-color-focused: var(--dropdown-menu-item-border-color-focused);
|
|
32
35
|
|
|
33
36
|
// @tokens End
|
|
@@ -16,7 +16,7 @@ export type LinkProps = {
|
|
|
16
16
|
[key: string]: unknown;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export function Link(props: React.PropsWithChildren<LinkProps>) {
|
|
19
|
+
export function Link(props: React.PropsWithChildren<LinkProps>): JSX.Element {
|
|
20
20
|
const context = useContext(ThemeDataContext);
|
|
21
21
|
|
|
22
22
|
if (context) {
|
|
@@ -13,9 +13,9 @@ const LoadingMessage = styled.div<{ color: string }>`
|
|
|
13
13
|
color: ${({ color }) => getCssColorVariable(color)};
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
|
-
export
|
|
16
|
+
export type LoadingProps = {
|
|
17
17
|
color: string;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
|
|
20
20
|
export function Loading({ color }: LoadingProps): JSX.Element {
|
|
21
21
|
return (
|
|
@@ -7,7 +7,7 @@ import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
|
7
7
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
8
8
|
import { Image } from '@redocly/theme/components/Image/Image';
|
|
9
9
|
|
|
10
|
-
type LogoProps = {
|
|
10
|
+
export type LogoProps = {
|
|
11
11
|
config: LogoConfig;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
|
|
3
|
+
import type { PropsWithChildren } from 'react';
|
|
4
|
+
|
|
3
5
|
import { typography } from '@redocly/theme/core/utils/theme-helpers';
|
|
4
6
|
import { markdownBaseTableCss } from '@redocly/theme/components/Markdown/styles/baseTable';
|
|
5
7
|
import { markdownLinksCss } from '@redocly/theme/components/Markdown/styles/links';
|
|
6
8
|
import { headingAnchorCss } from '@redocly/theme/components/Markdown/styles/headingAnchor';
|
|
7
9
|
|
|
10
|
+
export type MarkdownProps = PropsWithChildren<{
|
|
11
|
+
className?: string;
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
inline?: boolean;
|
|
14
|
+
base?: boolean;
|
|
15
|
+
ref?: (node: HTMLDivElement) => void;
|
|
16
|
+
}>;
|
|
17
|
+
|
|
8
18
|
export const Markdown = styled.main.attrs<{
|
|
9
19
|
className?: string;
|
|
10
20
|
}>(({ className }) => ({
|
|
11
21
|
'data-component-name': 'Markdown/Markdown',
|
|
12
22
|
className,
|
|
13
|
-
}))<
|
|
14
|
-
font-
|
|
23
|
+
}))<MarkdownProps>`
|
|
24
|
+
font-size: var(--md-content-font-size);
|
|
25
|
+
font-family: var(--md-content-font-family);
|
|
26
|
+
font-weight: var(--md-content-font-weight);
|
|
27
|
+
line-height: var(--md-content-line-height);
|
|
28
|
+
color: var(--md-content-text-color);
|
|
15
29
|
padding: 0;
|
|
16
30
|
|
|
17
|
-
color: var(--text-color-secondary);
|
|
18
|
-
font-size: var(--font-size-base);
|
|
19
|
-
font-family: var(--font-family-base);
|
|
20
|
-
line-height: var(--line-height-base);
|
|
21
|
-
|
|
22
31
|
${({ compact }) =>
|
|
23
32
|
compact &&
|
|
24
33
|
css`
|
|
@@ -34,7 +43,7 @@ export const Markdown = styled.main.attrs<{
|
|
|
34
43
|
base &&
|
|
35
44
|
css`
|
|
36
45
|
p {
|
|
37
|
-
font-size: var(--font-size
|
|
46
|
+
font-size: var(--md-content-font-size);
|
|
38
47
|
}
|
|
39
48
|
`}
|
|
40
49
|
|
|
@@ -103,37 +112,37 @@ export const Markdown = styled.main.attrs<{
|
|
|
103
112
|
}
|
|
104
113
|
|
|
105
114
|
h1.md {
|
|
106
|
-
${typography('h1'
|
|
115
|
+
${typography('h1')};
|
|
107
116
|
margin: var(--h1-margin-top) 0 var(--h1-margin-bottom) 0;
|
|
108
117
|
${headingAnchorCss()};
|
|
109
118
|
}
|
|
110
119
|
|
|
111
120
|
h2.md {
|
|
112
|
-
${typography('h2'
|
|
121
|
+
${typography('h2')};
|
|
113
122
|
margin: var(--h2-margin-top) 0 var(--h2-margin-bottom) 0;
|
|
114
123
|
${headingAnchorCss()};
|
|
115
124
|
}
|
|
116
125
|
|
|
117
126
|
h3.md {
|
|
118
|
-
${typography('h3'
|
|
127
|
+
${typography('h3')};
|
|
119
128
|
margin: var(--h3-margin-top) 0 var(--h3-margin-bottom) 0;
|
|
120
129
|
${headingAnchorCss()};
|
|
121
130
|
}
|
|
122
131
|
|
|
123
132
|
h4.md {
|
|
124
|
-
${typography('h4'
|
|
133
|
+
${typography('h4')};
|
|
125
134
|
margin: var(--h4-margin-top) 0 var(--h4-margin-bottom) 0;
|
|
126
135
|
${headingAnchorCss()};
|
|
127
136
|
}
|
|
128
137
|
|
|
129
138
|
h5.md {
|
|
130
|
-
${typography('h5'
|
|
139
|
+
${typography('h5')};
|
|
131
140
|
margin: var(--h5-margin-top) 0 var(--h5-margin-bottom) 0;
|
|
132
141
|
${headingAnchorCss()};
|
|
133
142
|
}
|
|
134
143
|
|
|
135
144
|
h6.md {
|
|
136
|
-
${typography('h6'
|
|
145
|
+
${typography('h6')};
|
|
137
146
|
margin: var(--h6-margin-top) 0 var(--h6-margin-bottom) 0;
|
|
138
147
|
${headingAnchorCss()};
|
|
139
148
|
}
|
|
@@ -7,6 +7,11 @@ export const markdown = css`
|
|
|
7
7
|
|
|
8
8
|
--md-content-max-width: 910px;
|
|
9
9
|
--md-content-padding: 25px 0px 25px 0px; // @presenter Spacing
|
|
10
|
+
--md-content-font-size: var(--font-size-base); // @presenter FontSize
|
|
11
|
+
--md-content-font-family: var(--font-family-base); // @presenter FontFamily
|
|
12
|
+
--md-content-line-height: var(--line-height-base); // @presenter LineHeight
|
|
13
|
+
--md-content-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
14
|
+
--md-content-text-color: var(--text-color-secondary); // @presenter Color
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* @tokens Markdown Blockquote
|
|
@@ -31,7 +36,7 @@ export const markdown = css`
|
|
|
31
36
|
* @tokens Markdown Table
|
|
32
37
|
*/
|
|
33
38
|
|
|
34
|
-
--md-table-font-size: var(--font-size
|
|
39
|
+
--md-table-font-size: var(--md-content-font-size); // @presenter FontSize
|
|
35
40
|
--md-table-line-height: var(--line-height-md); // @presenter FontSize
|
|
36
41
|
--md-table-margin-vertical: 20px; // @presenter Spacing
|
|
37
42
|
--md-table-bg-color: transparent; // @presenter Color
|
|
@@ -81,10 +86,10 @@ export const markdown = css`
|
|
|
81
86
|
|
|
82
87
|
--md-numbered-list-number-display: none;
|
|
83
88
|
--md-numbered-list-item-style: var(--md-list-item-style);
|
|
84
|
-
--md-numbered-list-number-text-color: var(--text-color
|
|
85
|
-
--md-numbered-list-number-font-size: var(--font-size
|
|
86
|
-
--md-numbered-list-number-font-family: var(--font-
|
|
87
|
-
--md-numbered-list-number-font-weight: var(--font-weight
|
|
89
|
+
--md-numbered-list-number-text-color: var(--md-content-text-color); // @presenter Color
|
|
90
|
+
--md-numbered-list-number-font-size: var(--md-content-font-size); // @presenter FontSize
|
|
91
|
+
--md-numbered-list-number-font-family: var(--md-content-font-family); // @presenter FontFamily
|
|
92
|
+
--md-numbered-list-number-font-weight: var(--md-content-font-weight); // @presenter FontWeight
|
|
88
93
|
--md-numbered-list-number-bg-color: var(--bg-color-active); // @presenter Color
|
|
89
94
|
--md-numbered-list-number-border-radius: 10px; // @presenter BorderRadius
|
|
90
95
|
--md-numbered-list-number-margin-right: 5px; // @presenter Spacing
|
|
@@ -7,7 +7,7 @@ import { MenuItem } from '@redocly/theme/components/Menu/MenuItem';
|
|
|
7
7
|
import { MenuItemType } from '@redocly/theme/core/constants';
|
|
8
8
|
import { getMenuItemType } from '@redocly/theme/core/utils';
|
|
9
9
|
|
|
10
|
-
type MenuListProps = {
|
|
10
|
+
export type MenuListProps = {
|
|
11
11
|
items: ItemState[];
|
|
12
12
|
depth?: number;
|
|
13
13
|
isMobile?: boolean;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
1
2
|
import styled, { keyframes } from 'styled-components';
|
|
2
3
|
|
|
3
4
|
import type { MenuItemsAnimation } from '@redocly/theme/core/types';
|
|
4
5
|
|
|
5
|
-
type MenuContainerProps = {
|
|
6
|
+
export type MenuContainerProps = PropsWithChildren<{
|
|
6
7
|
growContent?: boolean;
|
|
7
8
|
className?: string;
|
|
8
9
|
hidden?: boolean;
|
|
9
10
|
animation?: MenuItemsAnimation;
|
|
10
|
-
}
|
|
11
|
+
}>;
|
|
12
|
+
|
|
13
|
+
export function MenuContainer(props: MenuContainerProps): JSX.Element {
|
|
14
|
+
return <MenuContainerComponent {...props} data-component-name="Menu/MenuContainer" />;
|
|
15
|
+
}
|
|
11
16
|
|
|
12
17
|
const slideInRightAnimation = keyframes`
|
|
13
18
|
0% {
|
|
@@ -27,9 +32,8 @@ const slideInLeftAnimation = keyframes`
|
|
|
27
32
|
}
|
|
28
33
|
`;
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
const MenuContainerComponent = styled.div.attrs<MenuContainerProps>(
|
|
31
36
|
({ growContent, className, animation }) => ({
|
|
32
|
-
'data-component-name': 'Menu/MenuContainer',
|
|
33
37
|
growContent: growContent === undefined ? true : growContent,
|
|
34
38
|
className,
|
|
35
39
|
animation,
|
|
@@ -47,7 +51,7 @@ export const MenuContainer = styled.div.attrs<MenuContainerProps>(
|
|
|
47
51
|
position: relative;
|
|
48
52
|
overflow-y: auto;
|
|
49
53
|
flex-grow: ${({ growContent }) => (growContent ? 1 : 0)};
|
|
50
|
-
padding-top: var(--
|
|
54
|
+
padding-top: var(--menu-container-padding-top);
|
|
51
55
|
display: ${({ hidden }) => (hidden ? 'none' : 'block')};
|
|
52
56
|
overscroll-behavior: contain;
|
|
53
57
|
`;
|
|
@@ -13,7 +13,7 @@ import { ArrowLeftIcon } from '@redocly/theme/icons/ArrowLeftIcon/ArrowLeftIcon'
|
|
|
13
13
|
import { UserMenuMobile } from '@redocly/theme/components/UserMenu/UserMenuMobile';
|
|
14
14
|
import { Product } from '@redocly/theme/components/Product/Product';
|
|
15
15
|
|
|
16
|
-
type MobileMenuProps = {
|
|
16
|
+
export type MobileMenuProps = {
|
|
17
17
|
className?: string;
|
|
18
18
|
hideUserProfile?: boolean;
|
|
19
19
|
};
|
|
@@ -16,6 +16,7 @@ import { ProductPicker } from '@redocly/theme/components/Product/ProductPicker';
|
|
|
16
16
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
17
17
|
import { MenuIcon } from '@redocly/theme/icons/MenuIcon/MenuIcon';
|
|
18
18
|
import { CloseIcon } from '@redocly/theme/icons/CloseIcon/CloseIcon';
|
|
19
|
+
|
|
19
20
|
export type NavbarProps = {
|
|
20
21
|
className?: string;
|
|
21
22
|
};
|
|
@@ -13,7 +13,7 @@ import { LaunchIcon } from '@redocly/theme/icons/LaunchIcon/LaunchIcon';
|
|
|
13
13
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
14
14
|
import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
|
|
15
15
|
|
|
16
|
-
type NavbarItemProps = {
|
|
16
|
+
export type NavbarItemProps = {
|
|
17
17
|
navItem: ResolvedNavItem;
|
|
18
18
|
className?: string;
|
|
19
19
|
};
|
|
@@ -84,7 +84,7 @@ export function NavbarItem({ navItem, className }: NavbarItemProps): JSX.Element
|
|
|
84
84
|
const NavbarMenuItemDropdown = styled(Dropdown)`
|
|
85
85
|
--dropdown-menu-item-separator-font-size: var(--navbar-separator-font-size);
|
|
86
86
|
--dropdown-menu-item-separator-text-color: var(--navbar-separator-text-color);
|
|
87
|
-
--dropdown-menu-item-separator-
|
|
87
|
+
--dropdown-menu-item-separator-line-height: var(--navbar-separator-line-height);
|
|
88
88
|
`;
|
|
89
89
|
|
|
90
90
|
const NavbarMenuItem = styled.li<LinkProps & { active?: boolean }>`
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
|
|
4
|
+
import type { LogoProps } from '@redocly/theme/components/Logo/Logo';
|
|
5
|
+
|
|
3
6
|
import { Logo } from '@redocly/theme/components/Logo/Logo';
|
|
4
7
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
+
export function NavbarLogo(props: LogoProps) {
|
|
9
|
+
return <NavbarLogoComponent {...props} data-component-name="Navbar/NavbarLogo" />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const NavbarLogoComponent = styled(Logo)<LogoProps>`
|
|
8
13
|
--logo-height: var(--navbar-logo-height);
|
|
9
14
|
--logo-width: var(--navbar-logo-width);
|
|
10
15
|
--logo-margin: var(--navbar-logo-margin);
|
|
@@ -6,7 +6,7 @@ import type { ResolvedConfigLinks, ResolvedNavItem } from '@redocly/config';
|
|
|
6
6
|
import { breakpoints, isPrimitive } from '@redocly/theme/core/utils';
|
|
7
7
|
import { NavbarItem } from '@redocly/theme/components/Navbar/NavbarItem';
|
|
8
8
|
|
|
9
|
-
type NavbarMenuProps = {
|
|
9
|
+
export type NavbarMenuProps = {
|
|
10
10
|
menuItems: ResolvedConfigLinks;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
@@ -7,7 +7,7 @@ import { useThemeHooks, useThemeConfig } from '@redocly/theme/core/hooks';
|
|
|
7
7
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
8
8
|
import { ArrowRightIcon } from '@redocly/theme/icons/ArrowRightIcon/ArrowRightIcon';
|
|
9
9
|
|
|
10
|
-
type NextPageType = {
|
|
10
|
+
export type NextPageType = {
|
|
11
11
|
nextPage?: ResolvedNavItemWithLink | null;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
@@ -7,7 +7,7 @@ import { useThemeConfig } from '@redocly/theme/core/hooks';
|
|
|
7
7
|
import { PreviousButton } from '@redocly/theme/components/PageNavigation/PreviousButton';
|
|
8
8
|
import { NextButton } from '@redocly/theme/components/PageNavigation/NextButton';
|
|
9
9
|
|
|
10
|
-
type PageNavigationType = {
|
|
10
|
+
export type PageNavigationType = {
|
|
11
11
|
nextPage?: ResolvedNavItemWithLink | null;
|
|
12
12
|
prevPage?: ResolvedNavItemWithLink | null;
|
|
13
13
|
className?: string;
|
|
@@ -7,7 +7,7 @@ import { useThemeHooks, useThemeConfig } from '@redocly/theme/core/hooks';
|
|
|
7
7
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
8
8
|
import { ArrowLeftIcon } from '@redocly/theme/icons/ArrowLeftIcon/ArrowLeftIcon';
|
|
9
9
|
|
|
10
|
-
type PreviousPageType = {
|
|
10
|
+
export type PreviousPageType = {
|
|
11
11
|
prevPage?: ResolvedNavItemWithLink | null;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
@@ -10,7 +10,7 @@ import { PanelHeaderTitle } from '@redocly/theme/components/Panel/PanelHeaderTit
|
|
|
10
10
|
import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
|
|
11
11
|
import { ChevronRightIcon } from '@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon';
|
|
12
12
|
|
|
13
|
-
type PanelProps = {
|
|
13
|
+
export type PanelProps = {
|
|
14
14
|
expanded?: boolean;
|
|
15
15
|
isExpandable?: boolean;
|
|
16
16
|
className?: string;
|
|
@@ -13,10 +13,10 @@ const showPanelAnimation = css`
|
|
|
13
13
|
animation: ${showPanel} 0.2s;
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
export type PanelBodyProps = {
|
|
17
17
|
animate?: boolean;
|
|
18
18
|
hidden?: boolean;
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
|
|
21
21
|
export const PanelBody = styled.div.attrs<{ className?: string }>(({ className }) => ({
|
|
22
22
|
'data-component-name': 'Panel/PanelBody',
|
|
@@ -5,11 +5,14 @@ import type { PropsWithChildren } from 'react';
|
|
|
5
5
|
|
|
6
6
|
import { IS_BROWSER } from '@redocly/theme/core/utils';
|
|
7
7
|
|
|
8
|
-
type PortalProps = {
|
|
8
|
+
export type PortalProps = {
|
|
9
9
|
mountId?: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export
|
|
12
|
+
export function Portal({
|
|
13
|
+
children,
|
|
14
|
+
mountId = 'root',
|
|
15
|
+
}: PropsWithChildren<PortalProps>): React.ReactPortal | JSX.Element {
|
|
13
16
|
const mount = IS_BROWSER ? document.getElementById(mountId) || document.body : null;
|
|
14
17
|
|
|
15
18
|
if (!mount) {
|
|
@@ -17,4 +20,4 @@ export const Portal = ({ children, mountId = 'root' }: PropsWithChildren<PortalP
|
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
return createPortal(children, mount);
|
|
20
|
-
}
|
|
23
|
+
}
|
|
@@ -66,7 +66,6 @@ const ProductDropdown = styled(Dropdown).attrs(() => ({
|
|
|
66
66
|
--dropdown-menu-padding: var(--product-picker-dropdown-padding);
|
|
67
67
|
--dropdown-menu-border-radius: var(--product-picker-dropdown-border-radius);
|
|
68
68
|
--dropdown-menu-box-shadow: var(--product-picker-dropdown-box-shadow);
|
|
69
|
-
--dropdown-menu-color-disabled: var(--product-picker-dropdown-color-disabled);
|
|
70
69
|
--dropdown-menu-border-color: var(--product-picker-dropdow--border-color);
|
|
71
70
|
--dropdown-menu-bg-color: var(--product-picker-dropdown-bg-color);
|
|
72
71
|
--dropdown-menu-item-padding-horizontal: var(--product-picker-dropdown-item-padding-horizontal);
|
|
@@ -80,8 +79,12 @@ const ProductDropdown = styled(Dropdown).attrs(() => ({
|
|
|
80
79
|
--dropdown-menu-item-border-radius: var(--product-picker-dropdown-item-border-radius);
|
|
81
80
|
--dropdown-menu-item-bg-color-active: var(--product-picker-dropdown-item-bg-color-active);
|
|
82
81
|
--dropdown-menu-item-bg-color-hover: var(--product-picker-dropdown-item-bg-color-hover);
|
|
82
|
+
--dropdown-menu-item-bg-color-disabled: var(--product-picker-dropdown-item-bg-color-disabled);
|
|
83
83
|
--dropdown-menu-item-separator-border-color: var(
|
|
84
84
|
--product-picker-dropdown-item-separator-border-color
|
|
85
85
|
);
|
|
86
86
|
--dropdown-menu-item-color-dangerous: var(--product-picker-dropdown-item-color-dangerous);
|
|
87
|
+
--dropdown-menu-item-color-disabled: var(--product-picker-dropdown-item-color-disabled);
|
|
88
|
+
--dropdown-menu-item-color-active: var(--product-picker-dropdown-item-color-active);
|
|
89
|
+
--dropdown-menu-item-color-hover: var(--product-picker-dropdown-item-color-hover);
|
|
87
90
|
`;
|
|
@@ -18,7 +18,6 @@ export const productPicker = css`
|
|
|
18
18
|
--product-picker-dropdown-padding: var(--dropdown-menu-padding ); // @presenter Spacing
|
|
19
19
|
--product-picker-dropdown-border-radius: var(--dropdown-menu-border-radius); // @presenter BorderRadius
|
|
20
20
|
--product-picker-dropdown-box-shadow: var(--dropdown-menu-box-shadow); // @presenter Shadow
|
|
21
|
-
--product-picker-dropdown-color-disabled: var(--dropdown-menu-color-disabled); // @presenter Color
|
|
22
21
|
--product-picker-dropdown-border-color: var(--dropdown-menu-border-color); // @presenter Color
|
|
23
22
|
--product-picker-dropdown-bg-color: var(--dropdown-menu-bg-color); // @presenter Color
|
|
24
23
|
|
|
@@ -29,8 +28,12 @@ export const productPicker = css`
|
|
|
29
28
|
--product-picker-dropdown-item-border-radius: var(--dropdown-menu-item-border-radius ); // @presenter BorderRadius
|
|
30
29
|
--product-picker-dropdown-item-bg-color-active: var(--dropdown-menu-item-bg-color-active); // @presenter Color
|
|
31
30
|
--product-picker-dropdown-item-bg-color-hover: var(--dropdown-menu-item-bg-color-hover); // @presenter Color
|
|
31
|
+
--product-picker-dropdown-item-bg-color-disabled: var(--dropdown-menu-item-bg-color-disabled); // @presenter Color
|
|
32
32
|
--product-picker-dropdown-item-separator-border-color: var(--dropdown-menu-item-separator-border-color); // @presenter Color
|
|
33
33
|
--product-picker-dropdown-item-color-dangerous: var(--dropdown-menu-item-color-dangerous);
|
|
34
|
+
--product-picker-dropdown-item-color-disabled: var(--dropdown-menu-item-color-disabled);
|
|
35
|
+
--product-picker-dropdown-item-color-active: var(--dropdown-menu-item-color-active);
|
|
36
|
+
--product-picker-dropdown-item-color-hover: var(--dropdown-menu-item-color-hover);
|
|
34
37
|
--product-picker-dropdown-item-border-color-focused: var(--dropdown-menu-item-border-color-focused);
|
|
35
38
|
|
|
36
39
|
`;
|
|
@@ -5,7 +5,7 @@ import { SearchTrigger } from '@redocly/theme/components/Search/SearchTrigger';
|
|
|
5
5
|
import { SearchDialog } from '@redocly/theme/components/Search/SearchDialog';
|
|
6
6
|
import { useSearch } from '@redocly/theme/core/hooks';
|
|
7
7
|
|
|
8
|
-
type SearchProps = {
|
|
8
|
+
export type SearchProps = {
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ import { useThemeHooks, useDialogHotKeys } from '@redocly/theme/core/hooks';
|
|
|
15
15
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
16
16
|
import { CloseIcon } from '@redocly/theme/icons/CloseIcon/CloseIcon';
|
|
17
17
|
|
|
18
|
-
type SearchDialogProps = {
|
|
18
|
+
export type SearchDialogProps = {
|
|
19
19
|
onClose: () => void;
|
|
20
20
|
className?: string;
|
|
21
21
|
};
|
|
@@ -9,7 +9,7 @@ import { CloseIcon } from '@redocly/theme/icons/CloseIcon/CloseIcon';
|
|
|
9
9
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
10
10
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
11
11
|
|
|
12
|
-
type SearchInputProps = {
|
|
12
|
+
export type SearchInputProps = {
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
value: string;
|
|
15
15
|
onChange(value: string): void;
|
|
@@ -9,7 +9,7 @@ import { Image } from '@redocly/theme/components/Image/Image';
|
|
|
9
9
|
import { highlight } from '@redocly/theme/components/Search/SearchHighlight';
|
|
10
10
|
|
|
11
11
|
type ActiveItem<T> = T & { active?: boolean };
|
|
12
|
-
type SearchItemProps = {
|
|
12
|
+
export type SearchItemProps = {
|
|
13
13
|
item: ActiveItem<SearchDocument>;
|
|
14
14
|
product?: {
|
|
15
15
|
name: string;
|
|
@@ -7,7 +7,7 @@ import { CloseIcon } from '@redocly/theme/icons/CloseIcon/CloseIcon';
|
|
|
7
7
|
import { RecentlyViewedIcon } from '@redocly/theme/icons/RecentlyViewedIcon/RecentlyViewedIcon';
|
|
8
8
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
9
9
|
|
|
10
|
-
type SearchRecentProps = {
|
|
10
|
+
export type SearchRecentProps = {
|
|
11
11
|
onSelect: (value: string) => void;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
@@ -5,7 +5,7 @@ import { useThemeHooks, useSuggestedPages } from '@redocly/theme/core/hooks';
|
|
|
5
5
|
import { RecentlyViewedIcon } from '@redocly/theme/icons/RecentlyViewedIcon/RecentlyViewedIcon';
|
|
6
6
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
7
7
|
|
|
8
|
-
type SearchSuggestedPagesProps = {
|
|
8
|
+
export type SearchSuggestedPagesProps = {
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -6,7 +6,7 @@ import { Button } from '@redocly/theme/components/Button/Button';
|
|
|
6
6
|
import { SearchIcon } from '@redocly/theme/icons/SearchIcon/SearchIcon';
|
|
7
7
|
import { breakpoints } from '@redocly/theme/core/utils';
|
|
8
8
|
|
|
9
|
-
type SearchTriggerProps = {
|
|
9
|
+
export type SearchTriggerProps = {
|
|
10
10
|
onClick: () => void;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
@@ -49,7 +49,7 @@ export const search = css`
|
|
|
49
49
|
--search-recent-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
50
50
|
--search-recent-item-padding: var(--spacing-xs) var(--spacing-lg);
|
|
51
51
|
--search-recent-item-text-color: var(--search-item-text-color); // @presenter Color
|
|
52
|
-
--search-recent-item-text-color-hover: var(--search-item-text-color-
|
|
52
|
+
--search-recent-item-text-color-hover: var(--search-item-text-color-hover); // @presenter Color
|
|
53
53
|
--search-recent-item-bg-color-hover: var(--search-item-bg-color-hover); // @presenter Color
|
|
54
54
|
--search-recent-item-title-font-size: var(--font-size-base); // @presenter FontSize
|
|
55
55
|
--search-recent-item-title-font-weight: var(--font-weight-semibold); // @presenter FontWeight
|
|
@@ -64,7 +64,7 @@ export const search = css`
|
|
|
64
64
|
--search-suggested-item-line-height: var(--line-height-base); // @presenter LineHeight
|
|
65
65
|
--search-suggested-item-padding: var(--spacing-xs) var(--spacing-lg);
|
|
66
66
|
--search-suggested-item-text-color: var(--search-item-text-color); // @presenter Color
|
|
67
|
-
--search-suggested-item-text-color-hover: var(--search-item-text-color-
|
|
67
|
+
--search-suggested-item-text-color-hover: var(--search-item-text-color-hover); // @presenter Color
|
|
68
68
|
--search-suggested-item-bg-color-hover: var(--search-item-bg-color-hover); // @presenter Color
|
|
69
69
|
--search-suggested-item-title-font-size: var(--font-size-base); // @presenter FontSize
|
|
70
70
|
--search-suggested-item-title-font-weight: var(--font-weight-semibold); // @presenter FontWeight
|
|
@@ -6,7 +6,7 @@ import type { SelectOption } from '@redocly/theme/core/types/select-option';
|
|
|
6
6
|
|
|
7
7
|
import { typedMemo } from '@redocly/theme/core/hoc/typedMemo';
|
|
8
8
|
|
|
9
|
-
type SegmentedProps<T> = {
|
|
9
|
+
export type SegmentedProps<T> = {
|
|
10
10
|
options: SelectOption<T>[];
|
|
11
11
|
value: T;
|
|
12
12
|
onChange: ({ label, value }: { label: string; value: T }) => void;
|