@redocly/theme 0.1.8 → 0.1.11
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/Button/index.d.ts +1 -1
- package/Button/index.js +1 -1
- package/CodeBlock/index.d.ts +1 -1
- package/CodeBlock/index.js +1 -1
- package/CopyButton/index.d.ts +2 -2
- package/CopyButton/index.js +2 -2
- package/Footer/Footer.d.ts +2 -2
- package/Footer/Footer.js +6 -5
- package/Footer/FooterColumn.d.ts +1 -1
- package/Footer/FooterColumn.js +8 -7
- package/Footer/FooterColumns.d.ts +3 -3
- package/Footer/FooterColumns.js +4 -4
- package/Footer/FooterCopyright.d.ts +3 -3
- package/Footer/FooterCopyright.js +3 -2
- package/Footer/index.d.ts +4 -4
- package/Footer/index.js +17 -11
- package/Headings/index.d.ts +1 -1
- package/Headings/index.js +1 -1
- package/JsonViewer/index.d.ts +2 -2
- package/JsonViewer/index.js +2 -2
- package/Layout/PageLayout.d.ts +1 -1
- package/Layout/PageLayout.js +2 -1
- package/Layout/RootLayout.d.ts +1 -1
- package/Layout/RootLayout.js +2 -1
- package/Layout/index.d.ts +2 -2
- package/Layout/index.js +15 -7
- package/Markdown/{Admonition/Admonition.d.ts → Admonition.d.ts} +0 -0
- package/Markdown/{Admonition/Admonition.js → Admonition.js} +5 -5
- package/Markdown/CodeSample/index.d.ts +3 -0
- package/Markdown/CodeSample/index.js +19 -0
- package/Markdown/{Heading/Heading.d.ts → Heading.d.ts} +0 -0
- package/Markdown/{Heading/Heading.js → Heading.js} +1 -1
- package/Markdown/MarkdownLayout.d.ts +2 -2
- package/Markdown/{Mermaid/Mermaid.d.ts → Mermaid.d.ts} +0 -0
- package/Markdown/{Mermaid/Mermaid.js → Mermaid.js} +0 -0
- package/Markdown/StyledMarkdown.js +2 -2
- package/Markdown/Tabs/index.d.ts +2 -0
- package/Markdown/Tabs/index.js +18 -0
- package/Markdown/index.d.ts +9 -0
- package/Markdown/index.js +25 -0
- package/Navbar/Navbar.d.ts +1 -2
- package/Navbar/Navbar.js +3 -3
- package/Navbar/NavbarItem.d.ts +1 -1
- package/Navbar/NavbarItem.js +3 -3
- package/Navbar/NavbarMenu.d.ts +1 -1
- package/Navbar/NavbarMenu.js +5 -4
- package/Navbar/index.d.ts +3 -0
- package/Navbar/index.js +19 -0
- package/NavbarLogo/NavbarLogo.d.ts +6 -0
- package/{Logo/Logo.js → NavbarLogo/NavbarLogo.js} +8 -5
- package/NavbarLogo/index.d.ts +1 -0
- package/NavbarLogo/index.js +17 -0
- package/OperationBadge/index.d.ts +1 -1
- package/OperationBadge/index.js +1 -1
- package/PageNavigation/index.d.ts +3 -0
- package/PageNavigation/index.js +19 -0
- package/Panel/index.d.ts +8 -8
- package/Panel/index.js +8 -8
- package/REAMDE.md +1 -0
- package/SamplesPanelControls/index.d.ts +1 -1
- package/SamplesPanelControls/index.js +1 -1
- package/Search/Autocomplete.js +1 -1
- package/Search/ClearIcon.js +1 -1
- package/Search/Parameters.js +2 -2
- package/Search/SearchIcon.js +1 -1
- package/Search/SearchItem.js +2 -2
- package/Search/index.d.ts +9 -0
- package/Search/index.js +25 -0
- package/Search/utils.js +1 -1
- package/Sidebar/ApiCallItem.d.ts +2 -2
- package/Sidebar/ApiCallItem.js +6 -6
- package/Sidebar/ArrowBack.d.ts +1 -2
- package/Sidebar/ArrowBack.js +2 -1
- package/Sidebar/BackButton.d.ts +1 -1
- package/Sidebar/BackButton.js +5 -4
- package/Sidebar/Drilldown.d.ts +2 -2
- package/Sidebar/Drilldown.js +8 -7
- package/Sidebar/DrilldownMenu.d.ts +2 -2
- package/Sidebar/DrilldownMenu.js +5 -7
- package/Sidebar/DrilldownMenuItem.d.ts +2 -2
- package/Sidebar/DrilldownMenuItem.js +5 -4
- package/Sidebar/ExternalIcon.d.ts +1 -2
- package/Sidebar/ExternalIcon.js +2 -1
- package/Sidebar/Menu.d.ts +1 -2
- package/Sidebar/Menu.js +3 -2
- package/Sidebar/MenuContainer.d.ts +1 -2
- package/Sidebar/MenuContainer.js +2 -1
- package/Sidebar/MenuGroup.d.ts +1 -1
- package/Sidebar/MenuGroup.js +6 -6
- package/Sidebar/MenuItem.d.ts +2 -2
- package/Sidebar/MenuItem.js +7 -6
- package/Sidebar/MenuItemLabel.d.ts +1 -2
- package/Sidebar/MenuItemLabel.js +4 -3
- package/Sidebar/MenuLink.d.ts +1 -2
- package/Sidebar/MenuLink.js +3 -2
- package/Sidebar/MenuLinkItem.d.ts +2 -2
- package/Sidebar/MenuLinkItem.js +4 -3
- package/Sidebar/MobileSidebarButton.d.ts +1 -2
- package/Sidebar/MobileSidebarButton.js +3 -2
- package/Sidebar/Separator.d.ts +2 -2
- package/Sidebar/Separator.js +5 -4
- package/Sidebar/SeparatorItem.d.ts +1 -2
- package/Sidebar/SeparatorItem.js +3 -2
- package/Sidebar/SeparatorLine.d.ts +1 -2
- package/Sidebar/SeparatorLine.js +2 -1
- package/Sidebar/Sidebar.d.ts +2 -2
- package/Sidebar/Sidebar.js +3 -2
- package/Sidebar/SidebarLayout.d.ts +1 -1
- package/Sidebar/SidebarLayout.js +6 -5
- package/Sidebar/index.d.ts +19 -0
- package/Sidebar/index.js +35 -0
- package/Sidebar/types/DrilldownMenuProps.d.ts +2 -2
- package/Sidebar/types/ItemState.d.ts +2 -3
- package/Sidebar/types/MenuItemProps.d.ts +2 -2
- package/Sidebar/types/NavItem.d.ts +1 -1
- package/Sidebar/types/index.d.ts +5 -0
- package/Sidebar/types/index.js +21 -0
- package/SidebarLogo/index.d.ts +1 -1
- package/SidebarLogo/index.js +1 -1
- package/SourceCode/index.d.ts +1 -1
- package/SourceCode/index.js +1 -1
- package/TableOfContent/TableOfContent.d.ts +1 -1
- package/TableOfContent/TableOfContent.js +9 -9
- package/TableOfContent/index.d.ts +1 -0
- package/TableOfContent/index.js +17 -0
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/index.js +1 -1
- package/globalStyle.d.ts +1 -0
- package/globalStyle.js +7 -3
- package/hooks/index.d.ts +7 -7
- package/hooks/index.js +7 -7
- package/hooks/useActiveSectionId.d.ts +2 -2
- package/hooks/useActiveSectionId.js +1 -0
- package/icons/ShelfIcon/index.d.ts +2 -2
- package/icons/ShelfIcon/index.js +1 -1
- package/icons/index.d.ts +1 -1
- package/icons/index.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/mocks/Link.js +4 -1
- package/mocks/hooks/usePageData.js +4 -1
- package/package.json +1 -1
- package/src/Button/Button.stories.tsx +1 -1
- package/src/Button/index.ts +1 -1
- package/src/CodeBlock/index.ts +1 -1
- package/src/CopyButton/CopyButton.stories.tsx +1 -1
- package/src/CopyButton/index.ts +2 -2
- package/src/DesignTokens/borders.stories.mdx +20 -0
- package/src/DesignTokens/colors.stories.mdx +24 -0
- package/src/DesignTokens/page-layout.stories.mdx +12 -0
- package/src/DesignTokens/tokens-generated.scss +610 -0
- package/src/DesignTokens/typography.stories.mdx +36 -0
- package/src/Footer/Footer.stories.tsx +57 -0
- package/src/Footer/Footer.tsx +7 -10
- package/src/Footer/FooterColumn.tsx +8 -8
- package/src/Footer/FooterColumns.tsx +5 -3
- package/src/Footer/FooterCopyright.tsx +6 -4
- package/src/Footer/__tests__/Footer.test.tsx +55 -0
- package/src/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +253 -0
- package/src/Footer/index.ts +4 -0
- package/src/Headings/index.ts +1 -1
- package/src/JsonViewer/JsonViewer.stories.tsx +1 -1
- package/src/JsonViewer/index.ts +2 -2
- package/src/Layout/PageLayout.tsx +1 -1
- package/src/Layout/RootLayout.tsx +1 -1
- package/src/Layout/__tests__/PageLayout.test.tsx +17 -0
- package/src/Layout/__tests__/RootLayout.test.tsx +17 -0
- package/src/Layout/__tests__/__snapshots__/PageLayout.test.tsx.snap +38 -0
- package/src/Layout/__tests__/__snapshots__/RootLayout.test.tsx.snap +18 -0
- package/src/Layout/index.ts +2 -0
- package/src/Markdown/{Admonition/Admonition.tsx → Admonition.tsx} +15 -15
- package/src/Markdown/CodeSample/index.ts +3 -0
- package/src/Markdown/{Heading/Heading.tsx → Heading.tsx} +4 -1
- package/src/Markdown/MarkdownLayout.tsx +2 -2
- package/src/Markdown/{Mermaid/Mermaid.tsx → Mermaid.tsx} +0 -0
- package/src/Markdown/StyledMarkdown.tsx +27 -27
- package/src/Markdown/Tabs/index.ts +2 -0
- package/src/Markdown/index.ts +9 -0
- package/src/Navbar/Navbar.stories.tsx +10 -6
- package/src/Navbar/Navbar.tsx +3 -4
- package/src/Navbar/NavbarItem.tsx +2 -2
- package/src/Navbar/NavbarMenu.tsx +3 -3
- package/src/Navbar/__tests__/Navbar.test.tsx +55 -0
- package/src/Navbar/__tests__/__snapshots__/Navbar.test.tsx.snap +256 -0
- package/src/Navbar/index.ts +3 -0
- package/src/NavbarLogo/NavbarLogo.stories.tsx +20 -0
- package/src/NavbarLogo/NavbarLogo.tsx +24 -0
- package/src/NavbarLogo/__tests__/NavbarLogo.test.tsx +47 -0
- package/src/NavbarLogo/__tests__/__snapshots__/NavbarLogo.test.tsx.snap +38 -0
- package/src/NavbarLogo/index.ts +1 -0
- package/src/OperationBadge/OperationBadge.stories.tsx +1 -1
- package/src/OperationBadge/index.ts +1 -1
- package/src/PageNavigation/PageNavigation.stories.tsx +21 -0
- package/src/PageNavigation/__tests__/NextPageLink.test.tsx +29 -0
- package/src/PageNavigation/__tests__/PageNavigation.test.tsx +54 -0
- package/src/PageNavigation/__tests__/PreviousPageLink.test.tsx +29 -0
- package/src/PageNavigation/__tests__/__snapshots__/NextPageLink.test.tsx.snap +67 -0
- package/src/PageNavigation/__tests__/__snapshots__/PageNavigation.test.tsx.snap +275 -0
- package/src/PageNavigation/__tests__/__snapshots__/PreviousPageLink.test.tsx.snap +67 -0
- package/src/PageNavigation/index.ts +3 -0
- package/src/Panel/index.ts +8 -8
- package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +1 -1
- package/src/SamplesPanelControls/index.ts +1 -1
- package/src/Search/Autocomplete.tsx +1 -1
- package/src/Search/ClearIcon.tsx +11 -12
- package/src/Search/Parameters.tsx +2 -2
- package/src/Search/SearchIcon.tsx +11 -12
- package/src/Search/SearchItem.tsx +2 -2
- package/src/Search/__tests__/Input.test.tsx +13 -0
- package/src/Search/__tests__/__snapshots__/Input.test.tsx.snap +36 -0
- package/src/Search/index.ts +9 -0
- package/src/Search/utils.tsx +1 -1
- package/src/Sidebar/ApiCallItem.tsx +5 -5
- package/src/Sidebar/ArrowBack.tsx +1 -1
- package/src/Sidebar/BackButton.tsx +4 -4
- package/src/Sidebar/Drilldown.tsx +6 -6
- package/src/Sidebar/DrilldownMenu.tsx +4 -4
- package/src/Sidebar/DrilldownMenuItem.tsx +6 -6
- package/src/Sidebar/ExternalIcon.tsx +1 -1
- package/src/Sidebar/Menu.tsx +2 -2
- package/src/Sidebar/MenuContainer.tsx +1 -1
- package/src/Sidebar/MenuGroup.tsx +5 -5
- package/src/Sidebar/MenuItem.tsx +6 -6
- package/src/Sidebar/MenuItemLabel.tsx +5 -5
- package/src/Sidebar/MenuLink.tsx +2 -2
- package/src/Sidebar/MenuLinkItem.tsx +3 -3
- package/src/Sidebar/MobileSidebarButton.tsx +3 -3
- package/src/Sidebar/Separator.tsx +4 -4
- package/src/Sidebar/SeparatorItem.tsx +2 -2
- package/src/Sidebar/SeparatorLine.tsx +1 -1
- package/src/Sidebar/Sidebar.tsx +2 -2
- package/src/Sidebar/SidebarLayout.tsx +4 -4
- package/src/Sidebar/index.ts +19 -0
- package/src/Sidebar/types/DrilldownMenuProps.ts +2 -2
- package/src/Sidebar/types/ItemState.ts +2 -4
- package/src/Sidebar/types/MenuItemProps.ts +2 -2
- package/src/Sidebar/types/NavItem.ts +1 -1
- package/src/Sidebar/types/index.ts +5 -0
- package/src/SidebarLogo/SidebarLogo.stories.tsx +1 -1
- package/src/SidebarLogo/index.ts +1 -1
- package/src/SourceCode/SourceCode.stories.tsx +1 -1
- package/src/SourceCode/index.ts +1 -1
- package/src/TableOfContent/TableOfContent.stories.tsx +37 -0
- package/src/TableOfContent/TableOfContent.tsx +13 -11
- package/src/TableOfContent/__tests__/TableOfContent.test.tsx +61 -0
- package/src/TableOfContent/__tests__/__snapshots__/TableOfContent.test.tsx.snap +153 -0
- package/src/TableOfContent/index.ts +1 -0
- package/src/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Tooltip/index.ts +1 -1
- package/src/Welcome.stories.mdx +7 -0
- package/src/globalStyle.ts +333 -144
- package/src/hooks/index.ts +7 -7
- package/src/hooks/useActiveSectionId.ts +3 -3
- package/src/icons/ShelfIcon/index.ts +2 -2
- package/src/icons/index.ts +1 -1
- package/src/index.ts +1 -0
- package/src/mocks/Link.tsx +5 -2
- package/src/mocks/hooks/usePageData.ts +4 -1
- package/src/types/portal/index.d.ts +0 -1
- package/src/types/portal/src/client/app/Sidebar/types.d.ts +32 -41
- package/src/types/portal/src/client/app/media-css.d.ts +4 -4
- package/src/types/portal/src/client/styling/default.d.ts +585 -391
- package/src/types/portal/src/client/styling/index.d.ts +2 -6
- package/src/types/portal/src/server/constants.d.ts +5 -9
- package/src/types/portal/src/server/plugins/markdown/types.d.ts +14 -19
- package/src/types/portal/src/server/plugins/portal-config/types.d.ts +12 -12
- package/src/types/portal/src/server/plugins/types.d.ts +55 -0
- package/src/types/portal/src/server/store.d.ts +49 -97
- package/src/types/portal/src/server/utils/async.d.ts +1 -5
- package/src/types/portal/src/server/utils/content-provider.d.ts +51 -0
- package/src/types/portal/src/server/utils/index.d.ts +1 -1
- package/src/types/portal/src/server/utils/paths.d.ts +10 -13
- package/src/types/portal/src/server/utils/reporter/formatter.d.ts +8 -8
- package/src/types/portal/src/server/utils/reporter/reporter.d.ts +15 -15
- package/src/types/portal/src/server/version-store.d.ts +35 -0
- package/src/types/portal/src/shared/constants.d.ts +6 -6
- package/src/types/portal/src/shared/types.d.ts +97 -58
- package/src/types/portal/src/shared/urls.d.ts +2 -1
- package/src/ui/AlertIcon.tsx +8 -7
- package/src/ui/{Arrow/Arrow.tsx → Arrow.tsx} +0 -0
- package/src/ui/Background.tsx +3 -3
- package/src/ui/Dropdown.tsx +5 -5
- package/src/ui/Jumbotron.tsx +3 -3
- package/src/ui/Tiles/TileHeader.ts +1 -1
- package/src/ui/Tiles/TileText.tsx +2 -2
- package/src/ui/Tiles/index.ts +4 -0
- package/src/ui/Typography.tsx +22 -22
- package/src/ui/UniversalLink.tsx +2 -2
- package/src/ui/index.tsx +8 -3
- package/src/utils/isUrl.ts +1 -1
- package/src/utils/replaceHashInColor.ts +1 -1
- package/ui/AlertIcon.d.ts +3 -2
- package/ui/AlertIcon.js +2 -2
- package/ui/{Arrow/Arrow.d.ts → Arrow.d.ts} +0 -0
- package/ui/{Arrow/Arrow.js → Arrow.js} +0 -0
- package/ui/Background.js +1 -1
- package/ui/Dropdown.d.ts +1 -1
- package/ui/Dropdown.js +5 -4
- package/ui/Jumbotron.js +3 -3
- package/ui/Tiles/TileHeader.js +1 -1
- package/ui/Tiles/TileText.js +1 -1
- package/ui/Tiles/index.d.ts +4 -0
- package/ui/Tiles/index.js +20 -0
- package/ui/Typography.js +20 -20
- package/ui/UniversalLink.js +4 -4
- package/ui/index.d.ts +7 -3
- package/ui/index.js +7 -3
- package/utils/isUrl.d.ts +1 -1
- package/utils/isUrl.js +2 -1
- package/utils/replaceHashInColor.d.ts +1 -1
- package/utils/replaceHashInColor.js +2 -1
- package/Logo/Logo.d.ts +0 -5
- package/src/Footer/index.tsx +0 -4
- package/src/Introduction.stories.mdx +0 -7
- package/src/Layout/index.tsx +0 -2
- package/src/Logo/Logo.tsx +0 -17
- package/src/types/portal/src/server/plugins/nav-utils.d.ts +0 -19
- package/src/types/portal/src/server/plugins/sidebars/index.d.ts +0 -16
- package/src/types/portal/src/server/plugins/versions/index.d.ts +0 -15
- package/src/types/portal/src/server/plugins/versions/types.d.ts +0 -23
- package/src/types/portal/src/server/plugins/versions/utils.d.ts +0 -10
- package/src/types/portal/src/server/utils/watcher.d.ts +0 -16
|
@@ -38,7 +38,7 @@ export function Parameters({ parameters = [] }: ParametersProps): JSX.Element {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const Wrapper = styled.div`
|
|
41
|
-
border-left: 1px solid var(--
|
|
41
|
+
border-left: 1px solid var(--global-border-color);
|
|
42
42
|
padding: 0 12px;
|
|
43
43
|
margin-top: 8px;
|
|
44
44
|
margin-bottom: 4px;
|
|
@@ -57,6 +57,6 @@ const Place = styled.div`
|
|
|
57
57
|
|
|
58
58
|
const MoreText = styled.div`
|
|
59
59
|
font-size: var(--font-size-small);
|
|
60
|
-
font-weight: var(--font-weight-
|
|
60
|
+
font-weight: var(--font-weight-regular);
|
|
61
61
|
padding-top: 4px;
|
|
62
62
|
`;
|
|
@@ -2,18 +2,17 @@ import React, { SVGProps } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
const Icon = (props: SVGProps<SVGSVGElement>) => (
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</span>
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
version="1.1"
|
|
8
|
+
x="0"
|
|
9
|
+
y="0"
|
|
10
|
+
viewBox="0 0 490 490"
|
|
11
|
+
data-component-name="Search/SearchIcon"
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<path d="M484 455.2L366.2 337.4c29.2-35.6 46.8-81.2 46.8-130.9C413 92.5 320.5 0 206.5 0 92.4 0 0 92.5 0 206.5S92.4 413 206.5 413c49.7 0 95.2-17.5 130.8-46.7L455.1 484c8 8 20.9 8 28.9 0C492 476.1 492 463.1 484 455.2zM206.5 371.9C115.2 371.9 41 297.7 41 206.5S115.2 41 206.5 41C297.7 41 372 115.3 372 206.5S297.7 371.9 206.5 371.9z" />
|
|
15
|
+
</svg>
|
|
17
16
|
);
|
|
18
17
|
|
|
19
18
|
export const SearchIcon = styled(Icon)`
|
|
@@ -56,7 +56,7 @@ const SearchLink = styled(Link)`
|
|
|
56
56
|
`;
|
|
57
57
|
|
|
58
58
|
const Operation = styled.div`
|
|
59
|
-
font-weight: var(--font-weight-
|
|
59
|
+
font-weight: var(--font-weight-regular);
|
|
60
60
|
font-size: var(--font-size-small);
|
|
61
61
|
color: var(--search-item-title-text-color);
|
|
62
62
|
overflow: hidden;
|
|
@@ -68,7 +68,7 @@ const Title = styled.div`
|
|
|
68
68
|
color: var(--search-item-title-text-color);
|
|
69
69
|
overflow: hidden;
|
|
70
70
|
text-overflow: ellipsis;
|
|
71
|
-
line-height: var(--line-height-
|
|
71
|
+
line-height: var(--line-height-base);
|
|
72
72
|
`;
|
|
73
73
|
|
|
74
74
|
const Description = styled.div`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { renderWithTheme } from '../../../tests/utils';
|
|
4
|
+
|
|
5
|
+
import { FormInput } from '@theme/Search/Input';
|
|
6
|
+
|
|
7
|
+
describe('FormInput', () => {
|
|
8
|
+
it('renders', () => {
|
|
9
|
+
const { container } = renderWithTheme(<FormInput />);
|
|
10
|
+
|
|
11
|
+
expect(container.firstChild).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`FormInput renders 1`] = `
|
|
4
|
+
.c0 {
|
|
5
|
+
padding: 1em 2.5em 1em 1em;
|
|
6
|
+
background-color: var(--input-background-color);
|
|
7
|
+
border-radius: var(--input-border-radius);
|
|
8
|
+
border: none;
|
|
9
|
+
outline: none;
|
|
10
|
+
color: var(--input-text-color);
|
|
11
|
+
font-size: var(--input-font-size);
|
|
12
|
+
font-family: var(--input-font-family);
|
|
13
|
+
line-height: var(--input-line-height);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.c0::-webkit-input-placeholder {
|
|
17
|
+
color: var(--input-text-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.c0::-moz-placeholder {
|
|
21
|
+
color: var(--input-text-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.c0:-ms-input-placeholder {
|
|
25
|
+
color: var(--input-text-color);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.c0::placeholder {
|
|
29
|
+
color: var(--input-text-color);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
<input
|
|
33
|
+
class="c0"
|
|
34
|
+
data-component-name="Search/Input"
|
|
35
|
+
/>
|
|
36
|
+
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from '@theme/Search/Autocomplete';
|
|
2
|
+
export * from '@theme/Search/ClearIcon';
|
|
3
|
+
export * from '@theme/Search/Input';
|
|
4
|
+
export * from '@theme/Search/Parameters';
|
|
5
|
+
export * from '@theme/Search/Popover';
|
|
6
|
+
export * from '@theme/Search/Search';
|
|
7
|
+
export * from '@theme/Search/SearchIcon';
|
|
8
|
+
export * from '@theme/Search/SearchItem';
|
|
9
|
+
export * from '@theme/Search/utils';
|
package/src/Search/utils.tsx
CHANGED
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { OperationBadge } from '@theme/OperationBadge';
|
|
5
|
-
import MenuItemProps from '@theme/Sidebar/types/MenuItemProps';
|
|
6
|
-
import MenuLinkItem from '@theme/Sidebar/MenuLinkItem';
|
|
7
|
-
import SeparatorLine from '@theme/Sidebar/SeparatorLine';
|
|
8
|
-
import MenuItemLabel from '@theme/Sidebar/MenuItemLabel';
|
|
5
|
+
import { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
6
|
+
import { MenuLinkItem } from '@theme/Sidebar/MenuLinkItem';
|
|
7
|
+
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
8
|
+
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export function ApiCallItem({ item }: MenuItemProps): JSX.Element {
|
|
11
11
|
return (
|
|
12
12
|
<Wrapper data-component-name="Sidebar/ApiCallItem">
|
|
13
13
|
<MenuLinkItem item={item}>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import ArrowBack from '@theme/Sidebar/ArrowBack';
|
|
4
|
+
import { ArrowBack } from '@theme/Sidebar/ArrowBack';
|
|
5
5
|
|
|
6
6
|
interface BackButtonProps {
|
|
7
7
|
back: () => void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export function BackButton({
|
|
11
11
|
children,
|
|
12
12
|
back,
|
|
13
13
|
}: React.PropsWithChildren<BackButtonProps>): JSX.Element {
|
|
@@ -25,7 +25,7 @@ const Button = styled.button`
|
|
|
25
25
|
padding: 0;
|
|
26
26
|
border: 0;
|
|
27
27
|
outline: 0;
|
|
28
|
-
color: var(--color-
|
|
28
|
+
color: var(--color-content);
|
|
29
29
|
display: flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
cursor: pointer;
|
|
@@ -39,6 +39,6 @@ const Button = styled.button`
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
&:hover {
|
|
42
|
-
color: var(--sidebar-
|
|
42
|
+
color: var(--sidebar-item-color);
|
|
43
43
|
}
|
|
44
44
|
`;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import MenuItemLabel from '@theme/Sidebar/MenuItemLabel';
|
|
5
|
-
import SeparatorLine from '@theme/Sidebar/SeparatorLine';
|
|
6
|
-
import DrilldownMenuItem from '@theme/Sidebar/DrilldownMenuItem';
|
|
7
|
-
import DrilldownMenu from '@theme/Sidebar/DrilldownMenu';
|
|
8
|
-
import DrilldownMenuProps from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
4
|
+
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
5
|
+
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
6
|
+
import { DrilldownMenuItem } from '@theme/Sidebar/DrilldownMenuItem';
|
|
7
|
+
import { DrilldownMenu } from '@theme/Sidebar/DrilldownMenu';
|
|
8
|
+
import { DrilldownMenuProps } from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
9
9
|
|
|
10
10
|
interface DrilldownProps extends DrilldownMenuProps {
|
|
11
11
|
isExpanded: boolean;
|
|
12
12
|
expand: () => void;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export function Drilldown({
|
|
16
16
|
isExpanded,
|
|
17
17
|
item,
|
|
18
18
|
expand,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled, { keyframes } from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import DrilldownMenuProps from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
5
|
-
import BackButton from '@theme/Sidebar/BackButton';
|
|
6
|
-
import DrilldownMenuItem from '@theme/Sidebar/DrilldownMenuItem';
|
|
4
|
+
import { DrilldownMenuProps } from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
5
|
+
import { BackButton } from '@theme/Sidebar/BackButton';
|
|
6
|
+
import { DrilldownMenuItem } from '@theme/Sidebar/DrilldownMenuItem';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export function DrilldownMenu({
|
|
9
9
|
item,
|
|
10
10
|
back,
|
|
11
11
|
prevActiveItem,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import MenuItemProps from '@theme/Sidebar/types/MenuItemProps';
|
|
4
|
+
import { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export function DrilldownMenuItem({ item }: MenuItemProps): JSX.Element {
|
|
7
7
|
return (
|
|
8
8
|
<Container data-component-name="Sidebar/DrilldownMenuItem">
|
|
9
9
|
{item.icon ? <Icon src={item.icon} /> : null}
|
|
10
10
|
<div>
|
|
11
11
|
{item.label}
|
|
12
|
-
{item.sublabel ? <
|
|
12
|
+
{item.sublabel ? <SubLabel>{item.sublabel}</SubLabel> : null}
|
|
13
13
|
</div>
|
|
14
14
|
</Container>
|
|
15
15
|
);
|
|
@@ -18,7 +18,7 @@ export default function DrilldownMenuItem({ item }: MenuItemProps): JSX.Element
|
|
|
18
18
|
const Container = styled.div`
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
color: var(--sidebar-
|
|
21
|
+
color: var(--sidebar-item-color);
|
|
22
22
|
font-size: var(--sidebar-font-size);
|
|
23
23
|
font-weight: var(--font-weight-bold);
|
|
24
24
|
`;
|
|
@@ -32,9 +32,9 @@ const Icon = styled.img`
|
|
|
32
32
|
overflow: hidden;
|
|
33
33
|
`;
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const SubLabel = styled.div`
|
|
36
36
|
margin-top: 2px;
|
|
37
37
|
font-size: 0.85rem;
|
|
38
|
-
color: var(--color-
|
|
38
|
+
color: var(--color-content);
|
|
39
39
|
font-weight: var(--font-weight-regular);
|
|
40
40
|
`;
|
package/src/Sidebar/Menu.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export const Menu = styled.ul.attrs(() => ({
|
|
4
4
|
'data-component-name': 'Sidebar/Menu',
|
|
5
5
|
}))`
|
|
6
6
|
padding: 0;
|
|
7
7
|
margin: 0;
|
|
8
8
|
list-style: none;
|
|
9
|
-
color: var(--sidebar-
|
|
9
|
+
color: var(--sidebar-item-color);
|
|
10
10
|
position: relative;
|
|
11
11
|
`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import { Arrow } from '@theme/ui/Arrow
|
|
5
|
-
import ItemState from '@theme/Sidebar/types/ItemState';
|
|
6
|
-
import MenuLinkItem from '@theme/Sidebar/MenuLinkItem';
|
|
7
|
-
import MenuItemLabel from '@theme/Sidebar/MenuItemLabel';
|
|
8
|
-
import SeparatorLine from '@theme/Sidebar/SeparatorLine';
|
|
4
|
+
import { Arrow } from '@theme/ui/Arrow';
|
|
5
|
+
import { ItemState } from '@theme/Sidebar/types/ItemState';
|
|
6
|
+
import { MenuLinkItem } from '@theme/Sidebar/MenuLinkItem';
|
|
7
|
+
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
8
|
+
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
9
9
|
|
|
10
10
|
interface MenuGroupProps {
|
|
11
11
|
item: ItemState;
|
package/src/Sidebar/MenuItem.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import MenuItemProps from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
-
import MenuLinkItem from '@theme/Sidebar/MenuLinkItem';
|
|
6
|
-
import ExternalIcon from '@theme/Sidebar/ExternalIcon';
|
|
7
|
-
import MenuItemLabel from '@theme/Sidebar/MenuItemLabel';
|
|
8
|
-
import SeparatorLine from '@theme/Sidebar/SeparatorLine';
|
|
4
|
+
import { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
+
import { MenuLinkItem } from '@theme/Sidebar/MenuLinkItem';
|
|
6
|
+
import { ExternalIcon } from '@theme/Sidebar/ExternalIcon';
|
|
7
|
+
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
8
|
+
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export function MenuItem({ item }: MenuItemProps): JSX.Element {
|
|
11
11
|
return (
|
|
12
12
|
<Wrapper data-component-name="Sidebar/MenuItem">
|
|
13
13
|
<MenuLinkItem item={item}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export const MenuItemLabel = styled.li.attrs(() => ({
|
|
4
4
|
'data-component-name': 'Sidebar/MenuItemLabel',
|
|
5
5
|
}))<{ active?: boolean }>`
|
|
6
6
|
display: flex;
|
|
@@ -25,14 +25,14 @@ export default styled.li.attrs(() => ({
|
|
|
25
25
|
${(props) =>
|
|
26
26
|
props.active
|
|
27
27
|
? `
|
|
28
|
-
color: var(--sidebar-
|
|
29
|
-
background-color: var(--sidebar-
|
|
28
|
+
color: var(--sidebar-item-active-color);
|
|
29
|
+
background-color: var(--sidebar-item-active-background-color);
|
|
30
30
|
`
|
|
31
31
|
: null};
|
|
32
32
|
|
|
33
33
|
:hover {
|
|
34
|
-
color: var(--sidebar-
|
|
35
|
-
background-color: var(--sidebar-
|
|
34
|
+
color: var(--sidebar-item-active-color);
|
|
35
|
+
background-color: var(--sidebar-item-active-background-color);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
:empty {
|
package/src/Sidebar/MenuLink.tsx
CHANGED
|
@@ -2,11 +2,11 @@ import styled from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
import { UniversalLink, UniversalLinkProps } from '@theme/ui/UniversalLink';
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export const MenuLink = styled(UniversalLink).attrs(() => ({
|
|
6
6
|
'data-component-name': 'Sidebar/MenuLink',
|
|
7
7
|
}))<UniversalLinkProps>`
|
|
8
8
|
text-decoration: none;
|
|
9
|
-
color: var(--sidebar-
|
|
9
|
+
color: var(--sidebar-item-color);
|
|
10
10
|
|
|
11
11
|
&&.external-url:after {
|
|
12
12
|
content: none;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import MenuLink from '@theme/Sidebar/MenuLink';
|
|
5
|
-
import MenuItemProps from '@theme/Sidebar/types/MenuItemProps';
|
|
4
|
+
import { MenuLink } from '@theme/Sidebar/MenuLink';
|
|
5
|
+
import { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export function MenuLinkItem({
|
|
8
8
|
item,
|
|
9
9
|
children,
|
|
10
10
|
}: React.PropsWithChildren<MenuItemProps>): JSX.Element {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export const MobileSidebarButton = styled.span.attrs(() => ({
|
|
4
4
|
'data-component-name': 'Sidebar/MobileSidebarButton',
|
|
5
5
|
}))<{ opened?: boolean }>`
|
|
6
6
|
background-color: var(--color-primary-500);
|
|
@@ -12,7 +12,7 @@ export default styled.span.attrs(() => ({
|
|
|
12
12
|
position: fixed;
|
|
13
13
|
right: 20px;
|
|
14
14
|
z-index: 3;
|
|
15
|
-
box-shadow: rgba(0, 0, 0, 0.3)
|
|
15
|
+
box-shadow: rgba(0, 0, 0, 0.3) 0 0 20px;
|
|
16
16
|
border-radius: 50%;
|
|
17
17
|
transform: ${(props) => (props.opened ? 'rotate(180deg)' : 'rotate(0deg)')};
|
|
18
18
|
transition: transform 0.75s;
|
|
@@ -35,7 +35,7 @@ export default styled.span.attrs(() => ({
|
|
|
35
35
|
left: 50%;
|
|
36
36
|
width: 25px;
|
|
37
37
|
height: 25px;
|
|
38
|
-
background-color:
|
|
38
|
+
background-color: #fff;
|
|
39
39
|
-webkit-mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='iso-8859-1'%3F%3E%3C!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 294.842 294.842' style='enable-background:new 0 0 294.842 294.842;' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23fff' d='M292.128,214.846c-2.342-2.344-6.143-2.344-8.484,0l-59.512,59.511V6c0-3.313-2.687-6-6-6s-6,2.687-6,6v268.356 l-59.513-59.512c-2.342-2.342-6.142-2.343-8.485,0.001c-2.343,2.343-2.343,6.142,0.001,8.485l69.755,69.754 c1.171,1.171,2.707,1.757,4.242,1.757s3.071-0.586,4.242-1.758l69.754-69.754C294.472,220.987,294.472,217.188,292.128,214.846z'/%3E%3Cpath fill='%23fff' d='M6.956,12h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,12,6.956,12z'/%3E%3Cpath fill='%23fff' d='M6.956,82.228h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,82.228,6.956,82.228z'/%3E%3Cpath fill='%23fff' d='M6.956,152.456h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,152.456,6.956,152.456z'/%3E%3Cpath fill='%23fff' d='M124.438,210.685H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,210.685,124.438,210.685z' /%3E%3Cpath fill='%23fff' d='M124.438,280.912H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,280.912,124.438,280.912z' /%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3C/svg%3E%0A")
|
|
40
40
|
no-repeat 50% 50%;
|
|
41
41
|
mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='iso-8859-1'%3F%3E%3C!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 294.842 294.842' style='enable-background:new 0 0 294.842 294.842;' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23fff' d='M292.128,214.846c-2.342-2.344-6.143-2.344-8.484,0l-59.512,59.511V6c0-3.313-2.687-6-6-6s-6,2.687-6,6v268.356 l-59.513-59.512c-2.342-2.342-6.142-2.343-8.485,0.001c-2.343,2.343-2.343,6.142,0.001,8.485l69.755,69.754 c1.171,1.171,2.707,1.757,4.242,1.757s3.071-0.586,4.242-1.758l69.754-69.754C294.472,220.987,294.472,217.188,292.128,214.846z'/%3E%3Cpath fill='%23fff' d='M6.956,12h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,12,6.956,12z'/%3E%3Cpath fill='%23fff' d='M6.956,82.228h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,82.228,6.956,82.228z'/%3E%3Cpath fill='%23fff' d='M6.956,152.456h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,152.456,6.956,152.456z'/%3E%3Cpath fill='%23fff' d='M124.438,210.685H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,210.685,124.438,210.685z' /%3E%3Cpath fill='%23fff' d='M124.438,280.912H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,280.912,124.438,280.912z' /%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3C/svg%3E%0A")
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import MenuItemProps from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
-
import SeparatorLine from '@theme/Sidebar/SeparatorLine';
|
|
6
|
-
import SeparatorItem from '@theme/Sidebar/SeparatorItem';
|
|
4
|
+
import { MenuItemProps } from '@theme/Sidebar/types/MenuItemProps';
|
|
5
|
+
import { SeparatorLine } from '@theme/Sidebar/SeparatorLine';
|
|
6
|
+
import { SeparatorItem } from '@theme/Sidebar/SeparatorItem';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export function Separator({ item }: MenuItemProps): JSX.Element {
|
|
9
9
|
return (
|
|
10
10
|
<Wrapper data-component-name="Sidebar/Separator">
|
|
11
11
|
<SeparatorItem>{item.label}</SeparatorItem>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
import MenuItemLabel from '@theme/Sidebar/MenuItemLabel';
|
|
3
|
+
import { MenuItemLabel } from '@theme/Sidebar/MenuItemLabel';
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export const SeparatorItem = styled(MenuItemLabel)`
|
|
6
6
|
cursor: default;
|
|
7
7
|
font-weight: var(--font-weight-bold);
|
|
8
8
|
color: var(--sidebar-separator-label-color);
|
package/src/Sidebar/Sidebar.tsx
CHANGED
|
@@ -5,7 +5,7 @@ interface SidebarProps {
|
|
|
5
5
|
animate?: boolean;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export const Sidebar = styled.aside.attrs(() => ({
|
|
9
9
|
'data-component-name': 'Sidebar/Sidebar',
|
|
10
10
|
}))<SidebarProps>`
|
|
11
11
|
border-right: 1px solid var(--sidebar-right-line-color);
|
|
@@ -17,7 +17,7 @@ export default styled.aside.attrs(() => ({
|
|
|
17
17
|
background: var(--sidebar-background-color);
|
|
18
18
|
font-size: var(--sidebar-font-size);
|
|
19
19
|
font-family: var(--sidebar-font-family);
|
|
20
|
-
color: var(--sidebar-
|
|
20
|
+
color: var(--sidebar-item-color);
|
|
21
21
|
top: var(--navbar-height);
|
|
22
22
|
height: calc(100vh - var(--navbar-height));
|
|
23
23
|
display: flex;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import Sidebar from '@theme/Sidebar/Sidebar';
|
|
4
|
+
import { Sidebar } from '@theme/Sidebar/Sidebar';
|
|
5
5
|
import { useMobileMenu } from '@theme/hooks/useMobileMenu';
|
|
6
|
-
import MobileSidebarButton from '@theme/Sidebar/MobileSidebarButton';
|
|
7
|
-
import MenuContainer from '@theme/Sidebar/MenuContainer';
|
|
6
|
+
import { MobileSidebarButton } from '@theme/Sidebar/MobileSidebarButton';
|
|
7
|
+
import { MenuContainer } from '@theme/Sidebar/MenuContainer';
|
|
8
8
|
|
|
9
9
|
interface SidebarLayoutProps {
|
|
10
10
|
versions: React.ReactNode;
|
|
11
11
|
menu: React.ReactNode;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export
|
|
14
|
+
export function SidebarLayout({ versions, menu }: SidebarLayoutProps): JSX.Element {
|
|
15
15
|
const [isOpen, setIsOpen] = useMobileMenu();
|
|
16
16
|
const toggleMenu = () => setIsOpen(!isOpen);
|
|
17
17
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from '@theme/Sidebar/ApiCallItem';
|
|
2
|
+
export * from '@theme/Sidebar/ArrowBack';
|
|
3
|
+
export * from '@theme/Sidebar/BackButton';
|
|
4
|
+
export * from '@theme/Sidebar/Drilldown';
|
|
5
|
+
export * from '@theme/Sidebar/DrilldownMenu';
|
|
6
|
+
export * from '@theme/Sidebar/DrilldownMenuItem';
|
|
7
|
+
export * from '@theme/Sidebar/ExternalIcon';
|
|
8
|
+
export * from '@theme/Sidebar/Menu';
|
|
9
|
+
export * from '@theme/Sidebar/MenuContainer';
|
|
10
|
+
export * from '@theme/Sidebar/MenuGroup';
|
|
11
|
+
export * from '@theme/Sidebar/MenuItem';
|
|
12
|
+
export * from '@theme/Sidebar/MenuItemLabel';
|
|
13
|
+
export * from '@theme/Sidebar/MenuLink';
|
|
14
|
+
export * from '@theme/Sidebar/MenuLinkItem';
|
|
15
|
+
export * from '@theme/Sidebar/MobileSidebarButton';
|
|
16
|
+
export * from '@theme/Sidebar/Separator';
|
|
17
|
+
export * from '@theme/Sidebar/SeparatorItem';
|
|
18
|
+
export * from '@theme/Sidebar/Sidebar';
|
|
19
|
+
export * from '@theme/Sidebar/SidebarLayout';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ItemState from '@theme/Sidebar/types/ItemState';
|
|
1
|
+
import { ItemState } from '@theme/Sidebar/types/ItemState';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface DrilldownMenuProps {
|
|
4
4
|
back: () => void;
|
|
5
5
|
item: ItemState;
|
|
6
6
|
prevActiveItem?: ItemState;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import NavItem from '@theme/Sidebar/types/NavItem';
|
|
1
|
+
import { NavItem } from '@theme/Sidebar/types/NavItem';
|
|
2
2
|
import { MenuStyle } from '@theme/Sidebar/types/MenuStyle';
|
|
3
3
|
|
|
4
|
-
interface ItemState extends NavItem {
|
|
4
|
+
export interface ItemState extends NavItem {
|
|
5
5
|
items: ItemState[];
|
|
6
6
|
active: boolean;
|
|
7
7
|
hasActiveSubItem: boolean;
|
|
8
8
|
menuStyle?: MenuStyle;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
export default ItemState;
|
|
@@ -4,7 +4,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
|
4
4
|
import { SidebarLogo } from '@theme/SidebarLogo';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'SidebarLogo',
|
|
7
|
+
title: 'Components/SidebarLogo',
|
|
8
8
|
component: SidebarLogo,
|
|
9
9
|
argTypes: {
|
|
10
10
|
backgroundColor: { control: 'color' },
|
package/src/SidebarLogo/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@theme/SidebarLogo/SidebarLogo';
|
package/src/SourceCode/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@theme/SourceCode/SourceCode';
|