@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
|
@@ -164,6 +164,8 @@ export function CodeBlockControls({
|
|
|
164
164
|
const ContainerWrapper = styled.div`
|
|
165
165
|
display: grid;
|
|
166
166
|
justify-content: end;
|
|
167
|
+
font-size: var(--code-block-controls-font-size);
|
|
168
|
+
font-family: var(--code-block-controls-font-family);
|
|
167
169
|
background-color: var(--code-block-controls-bg-color);
|
|
168
170
|
padding: var(--code-block-controls-padding);
|
|
169
171
|
border-bottom: var(--code-block-controls-border);
|
|
@@ -9,7 +9,7 @@ import { DocumentBlankIcon } from '@redocly/theme/icons/DocumentBlankIcon/Docume
|
|
|
9
9
|
import { ChevronLeftIcon } from '@redocly/theme/icons/ChevronLeftIcon/ChevronLeftIcon';
|
|
10
10
|
import { ChevronRightIcon } from '@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon';
|
|
11
11
|
|
|
12
|
-
type CodeBlockTabsProps = {
|
|
12
|
+
export type CodeBlockTabsProps = {
|
|
13
13
|
tabs: FileTabs;
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -47,8 +47,8 @@ export const code = css`
|
|
|
47
47
|
--code-block-controls-font-weight: var(--font-weight-medium); // @presenter Color
|
|
48
48
|
--code-block-controls-bg-color: transparent; // @presenter Color
|
|
49
49
|
--code-block-controls-border: 1px solid var(--border-color-secondary); // @presenter Border
|
|
50
|
-
--code-block-icon-controls-
|
|
51
|
-
--code-block-text-controls-
|
|
50
|
+
--code-block-icon-controls-bg-color: var(--code-block-controls-bg-color);
|
|
51
|
+
--code-block-text-controls-bg-color: var(--code-block-controls-bg-color);
|
|
52
52
|
--code-block-controls-padding: var(--spacing-unit) var(--spacing-unit) var(--spacing-unit) var(--spacing-base);
|
|
53
53
|
--code-block-controls-height: 20px;
|
|
54
54
|
--code-block-controls-width: 20px;
|
|
@@ -5,9 +5,15 @@ import { ContrastIcon } from '@redocly/theme/icons/ContrastIcon/ContrastIcon';
|
|
|
5
5
|
import { MoonIcon } from '@redocly/theme/icons/MoonIcon/MoonIcon';
|
|
6
6
|
import { SunIcon } from '@redocly/theme/icons/SunIcon/SunIcon';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export type ColorModeIconProps = {
|
|
9
9
|
mode?: 'dark' | 'light' | string;
|
|
10
10
|
className?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function ColorModeIcon(props: ColorModeIconProps): JSX.Element {
|
|
14
|
+
return (
|
|
15
|
+
<ColorModeIconComponent {...props} data-component-name="ColorModeSwitcher/ColorModeIcon" />
|
|
16
|
+
);
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
function Icon({ mode, className }: ColorModeIconProps) {
|
|
@@ -21,8 +27,6 @@ function Icon({ mode, className }: ColorModeIconProps) {
|
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
'data-component-name': 'ColorModeSwitcher/ColorModeIcon',
|
|
26
|
-
}))`
|
|
30
|
+
const ColorModeIconComponent = styled(Icon)`
|
|
27
31
|
box-sizing: border-box;
|
|
28
32
|
`;
|
|
@@ -4,7 +4,7 @@ import { useMount, useColorSwitcher } from '@redocly/theme/core/hooks';
|
|
|
4
4
|
import { ColorModeIcon } from '@redocly/theme/components/ColorModeSwitcher/ColorModeIcon';
|
|
5
5
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
6
6
|
|
|
7
|
-
type ColorModeSwitcherProps = {
|
|
7
|
+
export type ColorModeSwitcherProps = {
|
|
8
8
|
className?: string;
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { DatePicker as DatePickerComponent } from 'react-date-picker';
|
|
4
4
|
|
|
5
|
-
type
|
|
5
|
+
export type DatePickerProps = React.ComponentProps<typeof DatePickerComponent>;
|
|
6
6
|
|
|
7
|
-
export const DatePicker = (props:
|
|
7
|
+
export const DatePicker = (props: DatePickerProps) => {
|
|
8
8
|
return (
|
|
9
9
|
<DatePickerWrapper data-component-name="DatePicker/DatePicker">
|
|
10
10
|
<DatePickerComponent {...props} />
|
|
@@ -7,7 +7,7 @@ import { useOutsideClick, useControlledState } from '@redocly/theme/core/hooks';
|
|
|
7
7
|
import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
|
|
8
8
|
import { ChevronUpIcon } from '@redocly/theme/icons/ChevronUpIcon/ChevronUpIcon';
|
|
9
9
|
|
|
10
|
-
type DropdownProps = PropsWithChildren<{
|
|
10
|
+
export type DropdownProps = PropsWithChildren<{
|
|
11
11
|
trigger: React.ReactNode;
|
|
12
12
|
triggerEvent?: 'click' | 'hover';
|
|
13
13
|
placement?: 'top' | 'bottom';
|
|
@@ -32,7 +32,7 @@ export function Dropdown({
|
|
|
32
32
|
dataAttributes,
|
|
33
33
|
placement,
|
|
34
34
|
alignment,
|
|
35
|
-
}: DropdownProps) {
|
|
35
|
+
}: DropdownProps): JSX.Element {
|
|
36
36
|
const dropdownRef = useRef<HTMLDivElement | null>(null);
|
|
37
37
|
const [isOpen, setIsOpen] = useControlledState<boolean>(false, active);
|
|
38
38
|
|
|
@@ -14,7 +14,7 @@ export type DropdownMenuProps =
|
|
|
14
14
|
| { children?: ReactNode }
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
export function DropdownMenu(props: DropdownMenuProps) {
|
|
17
|
+
export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
|
|
18
18
|
let content: React.ReactNode = null;
|
|
19
19
|
|
|
20
20
|
if ('children' in props) {
|
|
@@ -13,6 +13,7 @@ export type CommentProps = {
|
|
|
13
13
|
submitText?: string;
|
|
14
14
|
};
|
|
15
15
|
standAlone?: boolean;
|
|
16
|
+
isDialog?: boolean;
|
|
16
17
|
className?: string;
|
|
17
18
|
};
|
|
18
19
|
|
|
@@ -22,6 +23,7 @@ export function Comment({
|
|
|
22
23
|
onCancel,
|
|
23
24
|
className,
|
|
24
25
|
standAlone = true,
|
|
26
|
+
isDialog = false,
|
|
25
27
|
}: CommentProps): JSX.Element {
|
|
26
28
|
const { useTranslate } = useThemeHooks();
|
|
27
29
|
const { translate } = useTranslate();
|
|
@@ -93,7 +95,7 @@ export function Comment({
|
|
|
93
95
|
<Button
|
|
94
96
|
data-translation-key="theme.feedback.settings.comment.send"
|
|
95
97
|
onClick={send}
|
|
96
|
-
variant=
|
|
98
|
+
variant={isDialog ? 'primary' : 'secondary'}
|
|
97
99
|
size="small"
|
|
98
100
|
>
|
|
99
101
|
{translate('theme.feedback.settings.comment.send', 'Send')}
|
|
@@ -121,7 +123,7 @@ const CommentWrapper = styled.div`
|
|
|
121
123
|
flex-direction: column;
|
|
122
124
|
justify-content: space-between;
|
|
123
125
|
border-radius: var(--border-radius-lg);
|
|
124
|
-
background: var(--feedback-
|
|
126
|
+
background: var(--feedback-bg-color);
|
|
125
127
|
gap: var(--spacing-xxs);
|
|
126
128
|
|
|
127
129
|
max-width: var(--feedback-report-dialog-max-width);
|
|
@@ -9,7 +9,7 @@ import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
|
9
9
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
10
10
|
import { Filter } from '@redocly/theme/components/Filter/Filter';
|
|
11
11
|
|
|
12
|
-
type FilterContentProps = {
|
|
12
|
+
export type FilterContentProps = {
|
|
13
13
|
setFilterTerm: (value: string) => void;
|
|
14
14
|
filters: ResolvedFilter[];
|
|
15
15
|
filterTerm: string;
|
|
@@ -85,7 +85,7 @@ const FiltersTitle = styled.div`
|
|
|
85
85
|
line-height: var(--filter-content-title-line-height);
|
|
86
86
|
`;
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
const FilterItems = styled.div`
|
|
89
89
|
padding: var(--filter-content-items-padding);
|
|
90
90
|
height: 100%;
|
|
91
91
|
display: flex;
|
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
5
5
|
import { SearchIcon } from '@redocly/theme/icons/SearchIcon/SearchIcon';
|
|
6
6
|
|
|
7
|
-
type FilterInputProps = {
|
|
7
|
+
export type FilterInputProps = {
|
|
8
8
|
value: string;
|
|
9
9
|
onChange: (newValue: string) => void;
|
|
10
10
|
};
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export type FilterOptionProps = PropsWithChildren<{
|
|
5
|
+
role?: string;
|
|
6
|
+
key?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
export function FilterOption(props: FilterOptionProps): JSX.Element {
|
|
12
|
+
return (
|
|
13
|
+
<FilterOptionComponent
|
|
14
|
+
{...props}
|
|
15
|
+
data-component-name="Filter/FilterOption"
|
|
16
|
+
data-testid="Filter/FilterOption"
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const FilterOptionComponent = styled.label`
|
|
7
22
|
display: flex;
|
|
8
23
|
gap: var(--filter-option-gap);
|
|
9
24
|
align-items: center;
|
|
@@ -13,4 +28,5 @@ export const FilterOption = styled.label.attrs({
|
|
|
13
28
|
input {
|
|
14
29
|
cursor: pointer;
|
|
15
30
|
}
|
|
31
|
+
margin: var(--filter-option-margin);
|
|
16
32
|
`;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
4
|
+
export type FilterOptionLabelProps = PropsWithChildren<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
|
|
8
|
+
export function FilterOptionLabel(props: FilterOptionLabelProps): JSX.Element {
|
|
9
|
+
return <FilterOptionLabelComponent {...props} data-component-name="Filter/FilterOptionLabel" />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const FilterOptionLabelComponent = styled.label`
|
|
6
13
|
cursor: pointer;
|
|
7
14
|
font-size: var(--filter-option-label-font-size);
|
|
8
15
|
color: var(--filter-option-label-color);
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
4
|
+
export type FilterOptionsProps = PropsWithChildren<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
|
|
8
|
+
export function FilterOptions(props: FilterOptionsProps): JSX.Element {
|
|
9
|
+
return <FilterOptionsComponent {...props} data-component-name="Filter/FilterOptions" />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const FilterOptionsComponent = styled.div`
|
|
6
13
|
padding: var(--filter-options-padding-vertical) var(--filter-options-padding-horizontal);
|
|
7
14
|
display: flex;
|
|
8
15
|
flex-direction: column;
|
|
@@ -8,7 +8,7 @@ import { breakpoints } from '@redocly/theme/core/utils';
|
|
|
8
8
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
9
|
import { FilterContent } from '@redocly/theme/components/Filter/FilterContent';
|
|
10
10
|
|
|
11
|
-
type FilterPopoverProps = {
|
|
11
|
+
export type FilterPopoverProps = {
|
|
12
12
|
onClose: () => void;
|
|
13
13
|
filters: ResolvedFilter[];
|
|
14
14
|
filterValuesCasing?: NonNullable<ThemeConfig['catalog']>[string]['filterValuesCasing'];
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
4
|
+
export type FilterTitleProps = PropsWithChildren<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
|
|
8
|
+
export function FilterTitle(props: FilterTitleProps): JSX.Element {
|
|
9
|
+
return <FilterTitleComponent {...props} data-component-name="Filter/FilterTitle" />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const FilterTitleComponent = styled.div`
|
|
6
13
|
font-weight: var(--filter-title-font-weight);
|
|
7
14
|
font-size: var(--filter-title-font-size);
|
|
8
15
|
line-height: var(--filter-title-line-height);
|
|
@@ -17,7 +17,8 @@ export const filter = css`
|
|
|
17
17
|
--filter-options-gap: var(--spacing-sm);
|
|
18
18
|
|
|
19
19
|
--filter-option-font-size: var(--font-size-base);
|
|
20
|
-
--filter-option-gap: var(--spacing-xs);
|
|
20
|
+
--filter-option-gap: var(--spacing-xs);
|
|
21
|
+
--filter-option-margin: 0;
|
|
21
22
|
|
|
22
23
|
--filter-option-label-font-size: var(--font-size-base);
|
|
23
24
|
--filter-option-label-color: var(--text-color-secondary);
|
|
@@ -10,7 +10,7 @@ import { FooterCopyright } from '@redocly/theme/components/Footer/FooterCopyrigh
|
|
|
10
10
|
import { FooterLogo } from '@redocly/theme/components/Footer/FooterLogo';
|
|
11
11
|
import { FooterColumn } from '@redocly/theme/components/Footer/FooterColumn';
|
|
12
12
|
|
|
13
|
-
type FooterProps = {
|
|
13
|
+
export type FooterProps = {
|
|
14
14
|
className?: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -8,7 +8,7 @@ import { breakpoints } from '@redocly/theme/core/utils';
|
|
|
8
8
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
9
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
10
10
|
|
|
11
|
-
type FooterColumnProps = {
|
|
11
|
+
export type FooterColumnProps = {
|
|
12
12
|
column: ResolvedNavItem;
|
|
13
13
|
className?: string;
|
|
14
14
|
};
|
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
5
5
|
import { LanguagePicker } from '@redocly/theme/components/LanguagePicker/LanguagePicker';
|
|
6
6
|
|
|
7
|
-
type FooterCopyrightProps = {
|
|
7
|
+
export type FooterCopyrightProps = {
|
|
8
8
|
copyrightText: string;
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
@@ -9,7 +9,7 @@ import { Link } from '@redocly/theme/components/Link/Link';
|
|
|
9
9
|
import { Image } from '@redocly/theme/components/Image/Image';
|
|
10
10
|
import { breakpoints } from '@redocly/theme/core/utils';
|
|
11
11
|
|
|
12
|
-
type FooterItemProps = {
|
|
12
|
+
export type FooterItemProps = {
|
|
13
13
|
item: ResolvedNavItem;
|
|
14
14
|
iconsOnly?: boolean;
|
|
15
15
|
};
|
|
@@ -1,8 +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
|
|
8
|
+
export function FooterLogo(props: LogoProps) {
|
|
9
|
+
return <FooterLogoComponent {...props} data-component-name="Footer/FooterLogo" />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const FooterLogoComponent = styled(Logo)<LogoProps>`
|
|
6
13
|
--logo-height: var(--footer-logo-height);
|
|
7
14
|
--logo-width: var(--footer-logo-width);
|
|
8
15
|
--logo-max-width: var(--footer-logo-max-width);
|
|
@@ -10,7 +10,7 @@ export type ImageProps = {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export function Image(props: ImageProps) {
|
|
13
|
+
export function Image(props: ImageProps): JSX.Element {
|
|
14
14
|
const { src, srcSet, alt, className } = props;
|
|
15
15
|
|
|
16
16
|
const parsedSourceSetMap = React.useMemo(() => {
|
|
@@ -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';
|
|
@@ -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
|
|
|
@@ -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 }>`
|