@redocly/theme 0.1.21 → 0.1.24
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/Button.d.ts +2 -2
- package/Button/Button.js +3 -3
- package/CodeBlock/CodeBlock.d.ts +3 -1
- package/CodeBlock/CodeBlock.js +3 -1
- package/CopyButton/CopyButton.js +1 -1
- package/Footer/Footer.js +4 -1
- package/JsonViewer/JsonViewer.d.ts +6 -2
- package/JsonViewer/JsonViewer.js +3 -1
- package/Markdown/{StyledMarkdown.d.ts → MarkdownWrapper.d.ts} +1 -1
- package/Markdown/{StyledMarkdown.js → MarkdownWrapper.js} +3 -3
- package/Markdown/index.d.ts +1 -1
- package/Markdown/index.js +1 -1
- package/Navbar/Navbar.d.ts +1 -1
- package/Navbar/Navbar.js +6 -3
- package/OperationBadge/OperationBadge.d.ts +2 -1
- package/OperationBadge/OperationBadge.js +1 -0
- package/PageNavigation/NextPageLink.js +2 -3
- package/PageNavigation/PreviousPageLink.js +2 -3
- package/Panel/CodePanel.d.ts +5 -1
- package/Panel/CodePanel.js +3 -1
- package/Panel/ContentPanel.d.ts +5 -1
- package/Panel/ContentPanel.js +3 -1
- package/Panel/Panel.d.ts +3 -1
- package/Panel/Panel.js +3 -1
- package/Panel/PanelBody.d.ts +3 -1
- package/Panel/PanelBody.js +3 -1
- package/Panel/PanelComponent.js +1 -1
- package/Panel/PanelHeader.d.ts +3 -1
- package/Panel/PanelHeader.js +3 -1
- package/Panel/PanelHeaderTitle.d.ts +3 -1
- package/Panel/PanelHeaderTitle.js +3 -1
- package/SamplesPanelControls/SamplesPanelControls.d.ts +6 -2
- package/SamplesPanelControls/SamplesPanelControls.js +3 -1
- package/Search/ClearIcon.d.ts +3 -1
- package/Search/ClearIcon.js +3 -1
- package/Search/SearchIcon.d.ts +3 -1
- package/Search/SearchIcon.js +3 -1
- package/Search/SidebarSearch.d.ts +3 -1
- package/Search/SidebarSearch.js +3 -1
- package/Sidebar/ApiCallItem.d.ts +2 -1
- package/Sidebar/MenuContainer.d.ts +3 -1
- package/Sidebar/MenuContainer.js +3 -1
- package/Sidebar/SeparatorItem.d.ts +2 -0
- package/Sidebar/SeparatorItem.js +3 -1
- package/Sidebar/SidebarLayout.d.ts +1 -1
- package/Sidebar/SidebarLayout.js +5 -2
- package/SidebarLogo/SidebarLogo.js +1 -1
- package/SourceCode/SourceCode.js +2 -2
- package/Tooltip/Tooltip.js +1 -1
- package/Typography/H1.js +1 -1
- package/Typography/H2.js +1 -1
- package/Typography/H3.js +1 -1
- package/Typography/SectionHeader.d.ts +3 -1
- package/Typography/SectionHeader.js +3 -1
- package/icons/ShelfIcon/ShelfIcon.d.ts +3 -1
- package/icons/ShelfIcon/ShelfIcon.js +3 -1
- package/mocks/hooks/index.d.ts +9 -0
- package/mocks/hooks/index.js +16 -1
- package/package.json +1 -1
- package/settings.yaml +6 -0
- package/src/Button/Button.tsx +4 -2
- package/src/CodeBlock/CodeBlock.ts +3 -1
- package/src/CopyButton/CopyButton.tsx +6 -1
- package/src/Footer/Footer.tsx +5 -1
- package/src/JsonViewer/JsonViewer.tsx +3 -1
- package/src/Markdown/{StyledMarkdown.tsx → MarkdownWrapper.tsx} +2 -2
- package/src/Markdown/index.ts +1 -1
- package/src/Navbar/Navbar.tsx +8 -4
- package/src/OperationBadge/OperationBadge.ts +1 -0
- package/src/PageNavigation/NextPageLink.tsx +11 -7
- package/src/PageNavigation/PreviousPageLink.tsx +10 -6
- package/src/Panel/CodePanel.ts +3 -1
- package/src/Panel/ContentPanel.ts +3 -1
- package/src/Panel/Panel.ts +3 -1
- package/src/Panel/PanelBody.ts +3 -1
- package/src/Panel/PanelComponent.tsx +1 -0
- package/src/Panel/PanelHeader.ts +3 -1
- package/src/Panel/PanelHeaderTitle.ts +3 -1
- package/src/SamplesPanelControls/SamplesPanelControls.ts +3 -1
- package/src/Search/ClearIcon.tsx +3 -1
- package/src/Search/SearchIcon.tsx +3 -1
- package/src/Search/SidebarSearch.tsx +3 -1
- package/src/Sidebar/MenuContainer.tsx +3 -1
- package/src/Sidebar/SeparatorItem.tsx +3 -1
- package/src/Sidebar/SidebarLayout.tsx +9 -5
- package/src/SidebarLogo/SidebarLogo.tsx +5 -1
- package/src/SourceCode/SourceCode.tsx +9 -2
- package/src/Tooltip/Tooltip.tsx +1 -0
- package/src/Typography/H1.ts +1 -1
- package/src/Typography/H2.ts +1 -1
- package/src/Typography/H3.ts +1 -1
- package/src/Typography/SectionHeader.ts +3 -1
- package/src/icons/ShelfIcon/ShelfIcon.tsx +3 -1
- package/src/mocks/hooks/index.ts +21 -0
package/src/Tooltip/Tooltip.tsx
CHANGED
package/src/Typography/H1.ts
CHANGED
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { typography } from '@theme/utils';
|
|
4
4
|
|
|
5
5
|
export const H1 = styled.h1.attrs(() => ({
|
|
6
|
-
'data-component-name': '
|
|
6
|
+
'data-component-name': 'Typography/H1',
|
|
7
7
|
}))`
|
|
8
8
|
color: var(--color-content);
|
|
9
9
|
margin: 0 0 25px;
|
package/src/Typography/H2.ts
CHANGED
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { typography } from '@theme/utils';
|
|
4
4
|
|
|
5
5
|
export const H2 = styled.h2.attrs(() => ({
|
|
6
|
-
'data-component-name': '
|
|
6
|
+
'data-component-name': 'Typography/H2',
|
|
7
7
|
}))`
|
|
8
8
|
color: var(--color-content);
|
|
9
9
|
margin: 0 0 20px;
|
package/src/Typography/H3.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
export const SectionHeader = styled.h2
|
|
3
|
+
export const SectionHeader = styled.h2.attrs(() => ({
|
|
4
|
+
'data-component-name': 'Typography/SectionHeader',
|
|
5
|
+
}))`
|
|
4
6
|
color: var(--h-color);
|
|
5
7
|
font-size: 1.75em;
|
|
6
8
|
font-weight: var(--font-weight-regular);
|
|
@@ -32,7 +32,9 @@ const IntShelfIcon = ({ className, style }: ShelfIconProps): JSX.Element => (
|
|
|
32
32
|
</svg>
|
|
33
33
|
);
|
|
34
34
|
|
|
35
|
-
export const ShelfIcon = styled(IntShelfIcon)
|
|
35
|
+
export const ShelfIcon = styled(IntShelfIcon).attrs(() => ({
|
|
36
|
+
'data-component-name': 'icons/ShelfIcon/ShelfIcon',
|
|
37
|
+
}))`
|
|
36
38
|
${({ size = '9px', float = '', direction, color }) => css`
|
|
37
39
|
height: ${size};
|
|
38
40
|
width: ${size};
|
package/src/mocks/hooks/index.ts
CHANGED
|
@@ -3,6 +3,12 @@ interface RawTheme {
|
|
|
3
3
|
settings?: any;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
interface PageLink {
|
|
7
|
+
label: string;
|
|
8
|
+
link: string;
|
|
9
|
+
type: 'link';
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
export function useThemeSettings(name: string): RawTheme['settings'] {
|
|
7
13
|
return {
|
|
8
14
|
name,
|
|
@@ -15,3 +21,18 @@ export function useThemeSettings(name: string): RawTheme['settings'] {
|
|
|
15
21
|
},
|
|
16
22
|
};
|
|
17
23
|
}
|
|
24
|
+
|
|
25
|
+
export function useSidebarSiblingsData(): { nextPage: PageLink; prevPage: PageLink } {
|
|
26
|
+
return {
|
|
27
|
+
nextPage: {
|
|
28
|
+
type: 'link',
|
|
29
|
+
label: 'Page',
|
|
30
|
+
link: '#next',
|
|
31
|
+
},
|
|
32
|
+
prevPage: {
|
|
33
|
+
type: 'link',
|
|
34
|
+
label: 'Page',
|
|
35
|
+
link: '#prev',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|