@redocly/theme 0.1.9 → 0.1.10
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 +1 -1
- package/Footer/FooterColumn.js +6 -6
- package/Footer/FooterColumns.d.ts +3 -3
- package/Footer/FooterCopyright.d.ts +3 -3
- package/Footer/FooterCopyright.js +1 -1
- package/Footer/index.d.ts +4 -4
- package/Footer/index.js +4 -4
- 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/index.d.ts +2 -2
- package/Layout/index.js +2 -2
- package/Markdown/Admonition.js +4 -4
- package/Markdown/CodeSample/index.d.ts +3 -3
- package/Markdown/CodeSample/index.js +3 -3
- package/Markdown/Heading.js +1 -1
- package/Markdown/MarkdownLayout.d.ts +2 -2
- package/Markdown/StyledMarkdown.js +2 -2
- package/Markdown/Tabs/index.d.ts +2 -2
- package/Markdown/Tabs/index.js +2 -2
- package/Markdown/index.d.ts +9 -9
- package/Markdown/index.js +9 -9
- package/Navbar/Navbar.d.ts +0 -1
- package/Navbar/Navbar.js +1 -1
- package/Navbar/NavbarItem.js +1 -1
- 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/{Logo → NavbarLogo}/index.js +1 -1
- 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/Parameters.js +2 -2
- package/Search/SearchItem.js +2 -2
- package/Search/index.d.ts +9 -9
- package/Search/index.js +9 -9
- package/Search/utils.js +1 -1
- package/Sidebar/BackButton.js +1 -1
- package/Sidebar/DrilldownMenuItem.js +3 -3
- package/Sidebar/Menu.js +1 -1
- package/Sidebar/MenuItemLabel.js +2 -2
- package/Sidebar/MenuLink.js +1 -1
- package/Sidebar/MobileSidebarButton.js +1 -1
- package/Sidebar/Sidebar.js +1 -1
- package/Sidebar/index.d.ts +19 -19
- package/Sidebar/index.js +19 -19
- package/Sidebar/types/index.d.ts +5 -5
- package/Sidebar/types/index.js +5 -5
- 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.js +3 -3
- package/TableOfContent/index.d.ts +1 -1
- package/TableOfContent/index.js +1 -1
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/index.js +1 -1
- package/globalStyle.js +1 -1
- 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/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/Footer/Footer.stories.tsx +57 -0
- package/src/Footer/Footer.tsx +5 -8
- package/src/Footer/FooterColumn.tsx +7 -7
- package/src/Footer/FooterColumns.tsx +3 -1
- package/src/Footer/FooterCopyright.tsx +5 -3
- 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 -4
- 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/__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 -2
- package/src/Markdown/Admonition.tsx +15 -15
- package/src/Markdown/CodeSample/index.ts +3 -3
- package/src/Markdown/Heading.tsx +4 -1
- package/src/Markdown/MarkdownLayout.tsx +2 -2
- package/src/Markdown/StyledMarkdown.tsx +27 -27
- package/src/Markdown/Tabs/index.ts +2 -2
- package/src/Markdown/index.ts +9 -9
- package/src/Navbar/Navbar.stories.tsx +7 -3
- package/src/Navbar/Navbar.tsx +2 -3
- package/src/Navbar/NavbarItem.tsx +1 -1
- 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/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/Parameters.tsx +2 -2
- package/src/Search/SearchItem.tsx +2 -2
- package/src/Search/index.ts +9 -9
- package/src/Search/utils.tsx +1 -1
- package/src/Sidebar/BackButton.tsx +2 -2
- package/src/Sidebar/DrilldownMenuItem.tsx +4 -4
- package/src/Sidebar/Menu.tsx +1 -1
- package/src/Sidebar/MenuItemLabel.tsx +4 -4
- package/src/Sidebar/MenuLink.tsx +1 -1
- package/src/Sidebar/MobileSidebarButton.tsx +2 -2
- package/src/Sidebar/Sidebar.tsx +1 -1
- package/src/Sidebar/index.ts +19 -19
- package/src/Sidebar/types/index.ts +5 -5
- 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.tsx +6 -6
- package/src/TableOfContent/index.ts +1 -1
- 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 +102 -7
- 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/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/Background.tsx +3 -3
- package/src/ui/Dropdown.tsx +4 -4
- 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 -4
- package/src/ui/Typography.tsx +22 -22
- package/ui/AlertIcon.d.ts +3 -2
- package/ui/AlertIcon.js +2 -2
- package/ui/Background.js +1 -1
- package/ui/Dropdown.js +3 -3
- 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 -4
- package/ui/Tiles/index.js +4 -4
- package/ui/Typography.js +20 -20
- package/Logo/Logo.d.ts +0 -5
- package/Logo/index.d.ts +0 -1
- package/src/Introduction.stories.mdx +0 -7
- package/src/Logo/Logo.tsx +0 -17
- package/src/Logo/index.ts +0 -1
- 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
|
@@ -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
|
`;
|
|
@@ -9,7 +9,7 @@ export function DrilldownMenuItem({ item }: MenuItemProps): JSX.Element {
|
|
|
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 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
|
@@ -25,14 +25,14 @@ export const MenuItemLabel = 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
|
@@ -6,7 +6,7 @@ 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;
|
|
@@ -12,7 +12,7 @@ export const MobileSidebarButton = 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 const MobileSidebarButton = 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")
|
package/src/Sidebar/Sidebar.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export const Sidebar = 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;
|
package/src/Sidebar/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
9
|
-
export * from '
|
|
10
|
-
export * from '
|
|
11
|
-
export * from '
|
|
12
|
-
export * from '
|
|
13
|
-
export * from '
|
|
14
|
-
export * from '
|
|
15
|
-
export * from '
|
|
16
|
-
export * from '
|
|
17
|
-
export * from '
|
|
18
|
-
export * from '
|
|
19
|
-
export * from '
|
|
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,5 +1,5 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
1
|
+
export * from '@theme/Sidebar/types/DrilldownMenuProps';
|
|
2
|
+
export * from '@theme/Sidebar/types/ItemState';
|
|
3
|
+
export * from '@theme/Sidebar/types/MenuItemProps';
|
|
4
|
+
export * from '@theme/Sidebar/types/MenuStyle';
|
|
5
|
+
export * from '@theme/Sidebar/types/NavItem';
|
|
@@ -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';
|
|
@@ -70,7 +70,7 @@ const TocHeader = styled.div`
|
|
|
70
70
|
|
|
71
71
|
const MenuItem = styled.a<{ depth: number }>`
|
|
72
72
|
display: block;
|
|
73
|
-
color: var(--color-
|
|
73
|
+
color: var(--color-content);
|
|
74
74
|
cursor: pointer;
|
|
75
75
|
font-size: 0.8em;
|
|
76
76
|
padding: 10px 15px;
|
|
@@ -78,11 +78,11 @@ const MenuItem = styled.a<{ depth: number }>`
|
|
|
78
78
|
transition: background-color 0.3s, color 0.3s;
|
|
79
79
|
text-decoration: none;
|
|
80
80
|
word-break: break-word;
|
|
81
|
-
font-family: var(--font-family
|
|
81
|
+
font-family: var(--h-font-family);
|
|
82
82
|
:hover,
|
|
83
83
|
&.active {
|
|
84
|
-
color: var(--sidebar-
|
|
85
|
-
background-color: var(--sidebar-
|
|
84
|
+
color: var(--sidebar-item-active-color);
|
|
85
|
+
background-color: var(--sidebar-item-active-background-color);
|
|
86
86
|
}
|
|
87
87
|
:empty {
|
|
88
88
|
padding: 0;
|
|
@@ -94,7 +94,7 @@ const TableOfContentMenu = styled.aside`
|
|
|
94
94
|
background-color: transparent;
|
|
95
95
|
flex-shrink: 0;
|
|
96
96
|
display: none !important;
|
|
97
|
-
font-family: var(--font-family-
|
|
97
|
+
font-family: var(--font-family-base);
|
|
98
98
|
|
|
99
99
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
100
100
|
width: var(--toc-width);
|
|
@@ -106,7 +106,7 @@ const TableOfContentItems = styled.div`
|
|
|
106
106
|
position: sticky;
|
|
107
107
|
top: calc(var(--navbar-height) + 20px);
|
|
108
108
|
max-height: calc(100vh - var(--navbar-height) - 20px);
|
|
109
|
-
border-left: 1px solid var(--
|
|
109
|
+
border-left: 1px solid var(--global-border-color);
|
|
110
110
|
overflow-y: auto;
|
|
111
111
|
width: var(--toc-width); ;
|
|
112
112
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@theme/TableOfContent/TableOfContent';
|
package/src/Tooltip/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@theme/Tooltip/Tooltip';
|
package/src/globalStyle.ts
CHANGED
|
@@ -317,7 +317,7 @@ export const GlobalStyle = createGlobalStyle`
|
|
|
317
317
|
--samples-panel-width: 50%;
|
|
318
318
|
--samples-panel-block-background-color: #fff;
|
|
319
319
|
--samples-panel-background-color: #52606d;
|
|
320
|
-
--samples-panel-callback-background-color: var(--
|
|
320
|
+
--samples-panel-callback-background-color: var(--color-secondary-300);
|
|
321
321
|
--samples-panel-controls-background-color: #323f4b;
|
|
322
322
|
--samples-panel-controls-hover-background-color: #3c4c5a;
|
|
323
323
|
--samples-panel-controls-active-border-color: var(--color-accent-500);
|
|
@@ -421,21 +421,53 @@ export const GlobalStyle = createGlobalStyle`
|
|
|
421
421
|
--fab-color: #0065FB;
|
|
422
422
|
--fab-background-color: #f2f2f2;
|
|
423
423
|
|
|
424
|
+
//* PORTAL settings *//
|
|
424
425
|
/**
|
|
425
|
-
*
|
|
426
|
+
* Headings
|
|
427
|
+
* */
|
|
428
|
+
--h2-font-weight: var(--font-weight-bold);
|
|
429
|
+
|
|
430
|
+
--h1-margin-top: 1.35em;
|
|
431
|
+
--h1-margin-bottom: 0.9em;
|
|
432
|
+
--h2-margin-top: 1.25em;
|
|
433
|
+
--h2-margin-bottom: 0.8em;
|
|
434
|
+
--h3-margin-top: 1.25em;
|
|
435
|
+
--h3-margin-bottom: 0.8em;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Footer
|
|
439
|
+
* */
|
|
440
|
+
--footer-background-color: var(--color-primary-500);
|
|
441
|
+
--footer-text-color: #fff;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Sidebar
|
|
445
|
+
* */
|
|
446
|
+
--sidebar-padding-horizontal: var(--sidebar-spacing-unit);
|
|
447
|
+
--sidebar-padding-vertical: var(--sidebar-spacing-unit);
|
|
448
|
+
|
|
449
|
+
--sidebar-spacing-padding-vertical: var(--sidebar-spacing-unit);
|
|
450
|
+
--sidebar-spacing-padding-horizontal: var(--sidebar-spacing-unit);
|
|
451
|
+
|
|
452
|
+
--sidebar-border-radius: 4px;
|
|
453
|
+
--sidebar-font-size: var(--font-size-base);
|
|
454
|
+
--sidebar-font-family: var(--font-family-base);
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Logo
|
|
426
458
|
* */
|
|
427
459
|
--logo-height: 2rem;
|
|
428
460
|
--logo-margin: var(--sidebar-margin-left);
|
|
429
461
|
|
|
430
462
|
/**
|
|
431
|
-
*
|
|
463
|
+
* Navbar
|
|
432
464
|
* */
|
|
433
465
|
--navbar-height: 60px;
|
|
434
|
-
--navbar-color
|
|
435
|
-
--navbar-color
|
|
466
|
+
--navbar-text-color: #fff;
|
|
467
|
+
--navbar-background-color: var(--color-primary-500);
|
|
436
468
|
|
|
437
469
|
/**
|
|
438
|
-
*
|
|
470
|
+
* Navbar Item
|
|
439
471
|
* */
|
|
440
472
|
--navbar-item-font-size: 16px;
|
|
441
473
|
--navbar-item-margin-horizontal: 0;
|
|
@@ -443,7 +475,70 @@ export const GlobalStyle = createGlobalStyle`
|
|
|
443
475
|
--navbar-item-border-radius: 10px;
|
|
444
476
|
--navbar-item-font-weight: var(--font-weight-bold);
|
|
445
477
|
--navbar-item-active-background-color: #1b75fa;
|
|
446
|
-
--navbar-item-active-text-color: var(--
|
|
478
|
+
--navbar-item-active-text-color: var(--navbar-text-color);
|
|
447
479
|
--navbar-item-active-text-decoration: none;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* TOC
|
|
483
|
+
* */
|
|
484
|
+
--toc-width: 240px;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Markdown
|
|
488
|
+
* */
|
|
489
|
+
--content-wrapper-max-width: 910px;
|
|
490
|
+
--content-wrapper-padding-vertical: 25px;
|
|
491
|
+
--content-wrapper-padding-horizontal: 0px;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Bloquote
|
|
495
|
+
* */
|
|
496
|
+
--bloquote-margin-vertical: 1.5em;
|
|
497
|
+
--bloquote-margin-horizontal: 0;
|
|
498
|
+
--bloquote-padding-vertical: 0;
|
|
499
|
+
--bloquote-padding-horizontal: calc(var(--spacing-unit) * 4);
|
|
500
|
+
--bloquote-background-color: transparent;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Admonition
|
|
504
|
+
* */
|
|
505
|
+
--admonition-margin-horizontal: 0;
|
|
506
|
+
--admonition-margin-vertical: calc(var(--spacing-unit) * 2);
|
|
507
|
+
--admonition-padding-horizontal: calc(var(--spacing-unit) * 4);
|
|
508
|
+
--admonition-padding-vertical: calc(var(--spacing-unit) * 4);
|
|
509
|
+
--admonition-icon-size: 25px;
|
|
510
|
+
--admonition-border-radius: 8px;
|
|
511
|
+
--admonition-font-size: 16px;
|
|
512
|
+
--admonition-font-weight: normal;
|
|
513
|
+
--admonition-line-height: 1.5em;
|
|
514
|
+
--admonition-heading-font-size: 16px;
|
|
515
|
+
--admonition-heading-font-weight: var(--font-weight-bold);
|
|
516
|
+
--admonition-heading-letter-spacing: 0.3px;
|
|
517
|
+
--admonition-heading-transform: uppercase;
|
|
518
|
+
|
|
519
|
+
/* info */
|
|
520
|
+
--admonition-info-background-color: #ebedf0;
|
|
521
|
+
--admonition-info-text-color: var(--color-content);
|
|
522
|
+
--admonition-info-icon-color: #4782cb;
|
|
523
|
+
|
|
524
|
+
/* attention */
|
|
525
|
+
--admonition-attention-background-color: #e6eef8;
|
|
526
|
+
--admonition-attention-text-color: var(--color-content);
|
|
527
|
+
--admonition-attention-icon-color: #4782cb;
|
|
528
|
+
|
|
529
|
+
/* warning */
|
|
530
|
+
--admonition-warning-background-color: #feeda5;
|
|
531
|
+
--admonition-warning-text-color: var(--color-content);
|
|
532
|
+
--admonition-warning-icon-color: #d4ad03;
|
|
533
|
+
|
|
534
|
+
/* danger */
|
|
535
|
+
--admonition-danger-background-color: #fceaea;
|
|
536
|
+
--admonition-danger-text-color: var(--color-content);
|
|
537
|
+
--admonition-danger-icon-color: #e53935;
|
|
538
|
+
|
|
539
|
+
/* success */
|
|
540
|
+
--admonition-success-background-color: #ddffe1;
|
|
541
|
+
--admonition-success-text-color: var(--color-content);
|
|
542
|
+
--admonition-success-icon-color: #00aa13;
|
|
448
543
|
}
|
|
449
544
|
`;
|
package/src/hooks/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
1
|
+
export * from '@theme/hooks/useControl';
|
|
2
|
+
export * from '@theme/hooks/useMount';
|
|
3
|
+
export * from '@theme/hooks/useUnmount';
|
|
4
|
+
export * from '@theme/hooks/useActiveHeading';
|
|
5
|
+
export * from '@theme/hooks/useActiveSectionId';
|
|
6
|
+
export * from '@theme/hooks/useFullHeight';
|
|
7
|
+
export * from '@theme/hooks/useNavbarHeight';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { Location } from 'history';
|
|
1
2
|
import { useEffect, useState, useMemo } from 'react';
|
|
2
3
|
import throttle from 'lodash.throttle';
|
|
3
4
|
|
|
4
5
|
import { useNavbarHeight } from '@theme/hooks/useNavbarHeight';
|
|
5
|
-
import type { MenuProps } from '@theme/types/portal';
|
|
6
6
|
|
|
7
7
|
export type UseActiveSectionIdReturnType = string;
|
|
8
8
|
|
|
9
9
|
export function useActiveSectionId(
|
|
10
|
-
location:
|
|
11
|
-
hasOverviewPage
|
|
10
|
+
location: Location,
|
|
11
|
+
hasOverviewPage = false,
|
|
12
12
|
): UseActiveSectionIdReturnType {
|
|
13
13
|
const [itemId, setItemId] = useState<string>('');
|
|
14
14
|
const navbarHeight = useNavbarHeight(location);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ShelfIcon } from '
|
|
2
|
-
export type { ShelfIconProps } from '
|
|
1
|
+
export { ShelfIcon } from '@theme/icons/ShelfIcon/ShelfIcon';
|
|
2
|
+
export type { ShelfIconProps } from '@theme/icons/ShelfIcon/ShelfIcon';
|
package/src/icons/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@theme/icons/ShelfIcon';
|
|
@@ -2,5 +2,4 @@ export * from './src/client/styling';
|
|
|
2
2
|
export * from './src/client/app/Sidebar/types';
|
|
3
3
|
export * from './src/server/plugins/portal-config/types';
|
|
4
4
|
export * from './src/shared/types';
|
|
5
|
-
export * from './src/server/plugins/versions/types';
|
|
6
5
|
export type { MdHeading } from './src/server/plugins/markdown/types';
|
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
import { Location } from 'history';
|
|
2
1
|
import { MenuStyle } from '../../../shared/types';
|
|
3
|
-
import type { Version } from '../../../server/plugins/versions/types';
|
|
4
2
|
export interface SidebarNavItem {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
default?: boolean;
|
|
3
|
+
label?: string;
|
|
4
|
+
sublabel?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
link?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
httpVerb?: string;
|
|
9
|
+
expanded?: string;
|
|
10
|
+
selectFirstItemOnExpand?: boolean;
|
|
11
|
+
pageId?: string;
|
|
12
|
+
redocPrevLink?: string;
|
|
13
|
+
redocPrevLabel?: string;
|
|
14
|
+
redocNextLink?: string;
|
|
15
|
+
redocNextLabel?: string;
|
|
16
|
+
redocFakePage?: boolean;
|
|
17
|
+
redocInfoPageId?: string;
|
|
18
|
+
target?: string;
|
|
19
|
+
external?: boolean;
|
|
20
|
+
items?: SidebarNavItem[];
|
|
21
|
+
permission?: string;
|
|
22
|
+
menuStyle?: MenuStyle;
|
|
23
|
+
separatorLine?: boolean;
|
|
24
|
+
version?: string;
|
|
28
25
|
}
|
|
29
26
|
export interface ItemState extends SidebarNavItem {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
export interface MenuProps {
|
|
36
|
-
items: SidebarNavItem[];
|
|
37
|
-
location: Location;
|
|
38
|
-
pageId: string;
|
|
39
|
-
versions?: Version[];
|
|
27
|
+
items: ItemState[];
|
|
28
|
+
active: boolean;
|
|
29
|
+
hasActiveSubItem: boolean;
|
|
30
|
+
menuStyle?: MenuStyle | null;
|
|
40
31
|
}
|
|
41
32
|
export declare enum MenuType {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
Separator = "separator",
|
|
34
|
+
DrillDown = "drilldown",
|
|
35
|
+
Group = "group",
|
|
36
|
+
Operation = "operation"
|
|
46
37
|
}
|
|
47
38
|
export interface MenuItemProps {
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
item: ItemState;
|
|
40
|
+
activeItem?: ItemState;
|
|
50
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const breakpoints: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
small: string;
|
|
3
|
+
medium: string;
|
|
4
|
+
large: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const mediaQueries: import(
|
|
6
|
+
export declare const mediaQueries: import("@theme/utils/media-css").MediaQueries;
|
|
7
7
|
export type { MediaQueries } from '@theme/utils/media-css';
|