@redocly/theme 0.1.20 → 0.1.21
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 +4 -3
- package/Button/Button.js +28 -1
- package/JsonViewer/JsonViewer.js +1 -2
- package/JsonViewer/index.d.ts +0 -1
- package/JsonViewer/index.js +0 -1
- package/Markdown/Admonition.js +1 -1
- package/Markdown/CodeSample/CodeSample.js +15 -5
- package/Markdown/CodeSample/index.d.ts +0 -1
- package/Markdown/CodeSample/index.js +0 -1
- package/Navbar/Navbar.js +7 -1
- package/PageNavigation/NextPageLink.js +8 -5
- package/PageNavigation/PreviousPageLink.js +8 -5
- package/Search/SidebarSearch.d.ts +2 -0
- package/Search/SidebarSearch.js +15 -0
- package/Sidebar/MenuGroup.js +2 -2
- package/Sidebar/SidebarLayout.js +5 -0
- package/TableOfContent/TableOfContent.js +8 -1
- package/Typography/CompactTypography.d.ts +11 -0
- package/Typography/CompactTypography.js +18 -0
- package/Typography/Emphasis.d.ts +3 -0
- package/Typography/Emphasis.js +15 -0
- package/Typography/H1.d.ts +3 -0
- package/Typography/H1.js +16 -0
- package/Typography/H2.d.ts +3 -0
- package/Typography/H2.js +16 -0
- package/Typography/H3.d.ts +3 -0
- package/Typography/H3.js +16 -0
- package/Typography/SectionHeader.d.ts +1 -0
- package/Typography/SectionHeader.js +13 -0
- package/Typography/Typography.d.ts +8 -0
- package/Typography/Typography.js +22 -0
- package/Typography/index.d.ts +7 -0
- package/{Headings → Typography}/index.js +7 -1
- package/{ui → icons/AlertIcon}/AlertIcon.d.ts +2 -2
- package/{ui → icons/AlertIcon}/AlertIcon.js +1 -1
- package/icons/AlertIcon/index.d.ts +2 -0
- package/icons/AlertIcon/index.js +5 -0
- package/icons/ArrowIcon/ArrowIcon.d.ts +7 -0
- package/{ui/Arrow.js → icons/ArrowIcon/ArrowIcon.js} +3 -3
- package/icons/ArrowIcon/index.d.ts +2 -0
- package/icons/ArrowIcon/index.js +5 -0
- package/icons/index.d.ts +2 -0
- package/icons/index.js +2 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/mocks/constants/index.d.ts +2 -0
- package/mocks/constants/index.js +5 -0
- package/mocks/hooks/index.d.ts +6 -0
- package/mocks/hooks/index.js +16 -0
- package/package.json +1 -1
- package/settings.yaml +9 -0
- package/src/Button/Button.tsx +19 -1
- package/src/JsonViewer/JsonViewer.tsx +106 -2
- package/src/JsonViewer/index.ts +0 -1
- package/src/Markdown/Admonition.tsx +1 -1
- package/src/Markdown/CodeSample/CodeSample.tsx +160 -6
- package/src/Markdown/CodeSample/index.ts +0 -1
- package/src/Navbar/Navbar.tsx +8 -1
- package/src/PageNavigation/NextPageLink.tsx +9 -3
- package/src/PageNavigation/PreviousPageLink.tsx +9 -3
- package/src/Search/SidebarSearch.tsx +13 -0
- package/src/Sidebar/MenuGroup.tsx +2 -2
- package/src/Sidebar/SidebarLayout.tsx +5 -0
- package/src/TableOfContent/TableOfContent.tsx +7 -1
- package/src/Typography/CompactTypography.ts +9 -0
- package/src/Typography/Emphasis.ts +7 -0
- package/src/Typography/H1.ts +12 -0
- package/src/Typography/H2.ts +12 -0
- package/src/Typography/H3.ts +11 -0
- package/src/Typography/SectionHeader.ts +11 -0
- package/src/Typography/Typography.ts +21 -0
- package/src/Typography/index.ts +7 -0
- package/src/{ui → icons/AlertIcon}/AlertIcon.tsx +3 -3
- package/src/icons/AlertIcon/index.ts +2 -0
- package/src/{ui/Arrow.tsx → icons/ArrowIcon/ArrowIcon.tsx} +5 -5
- package/src/icons/ArrowIcon/index.ts +2 -0
- package/src/icons/index.ts +2 -0
- package/src/index.ts +1 -1
- package/src/mocks/constants/index.ts +2 -0
- package/src/mocks/hooks/index.ts +17 -0
- package/src/ui/Jumbotron.tsx +1 -1
- package/src/ui/index.tsx +0 -4
- package/ui/Jumbotron.js +1 -1
- package/ui/index.d.ts +0 -4
- package/ui/index.js +0 -4
- package/Headings/Headings.d.ts +0 -3
- package/Headings/Headings.js +0 -16
- package/Headings/index.d.ts +0 -1
- package/JsonViewer/styled.d.ts +0 -1
- package/JsonViewer/styled.js +0 -10
- package/Markdown/CodeSample/styled.d.ts +0 -4
- package/Markdown/CodeSample/styled.js +0 -85
- package/src/Headings/Headings.ts +0 -23
- package/src/Headings/index.ts +0 -1
- package/src/JsonViewer/styled.ts +0 -110
- package/src/Markdown/CodeSample/styled.ts +0 -209
- package/src/ui/Button.tsx +0 -19
- package/src/ui/Typography.tsx +0 -90
- package/ui/Arrow.d.ts +0 -7
- package/ui/Button.d.ts +0 -7
- package/ui/Button.js +0 -30
- package/ui/Typography.d.ts +0 -41
- package/ui/Typography.js +0 -59
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
import { typography } from '@theme/utils';
|
|
4
|
+
|
|
5
|
+
export const H1 = styled.h1.attrs(() => ({
|
|
6
|
+
'data-component-name': 'Headings/H1',
|
|
7
|
+
}))`
|
|
8
|
+
color: var(--color-content);
|
|
9
|
+
margin: 0 0 25px;
|
|
10
|
+
|
|
11
|
+
${typography('h1', 'h')};
|
|
12
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
import { typography } from '@theme/utils';
|
|
4
|
+
|
|
5
|
+
export const H2 = styled.h2.attrs(() => ({
|
|
6
|
+
'data-component-name': 'Headings/H2',
|
|
7
|
+
}))`
|
|
8
|
+
color: var(--color-content);
|
|
9
|
+
margin: 0 0 20px;
|
|
10
|
+
|
|
11
|
+
${typography('h2', 'h')};
|
|
12
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const SectionHeader = styled.h2`
|
|
4
|
+
color: var(--h-color);
|
|
5
|
+
font-size: 1.75em;
|
|
6
|
+
font-weight: var(--font-weight-regular);
|
|
7
|
+
text-align: center;
|
|
8
|
+
margin: 2.65em 0;
|
|
9
|
+
padding: 0 20px;
|
|
10
|
+
font-family: var(--h-font-family);
|
|
11
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { color, typography as typographySystem, TypographyProps } from 'styled-system';
|
|
3
|
+
|
|
4
|
+
export const Typography = styled.p.attrs(() => ({
|
|
5
|
+
'data-component-name': 'Typography/Typography',
|
|
6
|
+
}))<
|
|
7
|
+
TypographyProps & {
|
|
8
|
+
color?: string;
|
|
9
|
+
mt?: string;
|
|
10
|
+
mb?: string;
|
|
11
|
+
}
|
|
12
|
+
>`
|
|
13
|
+
font-size: var(--font-size-base);
|
|
14
|
+
font-family: var(--font-family-base);
|
|
15
|
+
line-height: var(--line-height-base);
|
|
16
|
+
color: var(--color-content);
|
|
17
|
+
${color};
|
|
18
|
+
margin-top: ${({ mt }) => mt || '1em'};
|
|
19
|
+
margin-bottom: ${({ mb }) => mb || '1em'};
|
|
20
|
+
${typographySystem}
|
|
21
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from '@theme/Typography/H1';
|
|
2
|
+
export * from '@theme/Typography/H2';
|
|
3
|
+
export * from '@theme/Typography/H3';
|
|
4
|
+
export * from '@theme/Typography/Emphasis';
|
|
5
|
+
export * from '@theme/Typography/SectionHeader';
|
|
6
|
+
export * from '@theme/Typography/Typography';
|
|
7
|
+
export * from '@theme/Typography/CompactTypography';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface AlertIconProps {
|
|
5
5
|
type: 'warning' | 'success' | 'danger' | 'attention' | 'info';
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
function Icon({ type, className }:
|
|
9
|
+
function Icon({ type, className }: AlertIconProps) {
|
|
10
10
|
switch (type) {
|
|
11
11
|
case 'warning':
|
|
12
12
|
return (
|
|
@@ -96,7 +96,7 @@ function Icon({ type, className }: IconProps) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export const AlertIcon = styled(Icon).attrs(() => ({
|
|
99
|
-
'data-component-name': '
|
|
99
|
+
'data-component-name': 'icons/AlertIcon/AlertIcon',
|
|
100
100
|
}))`
|
|
101
101
|
position: absolute;
|
|
102
102
|
left: var(--admonition-padding-horizontal);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
export interface
|
|
5
|
-
direction?:
|
|
4
|
+
export interface ArrowIconProps {
|
|
5
|
+
direction?: 'up' | 'right' | 'left' | 'down';
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
function directionToTransform({ direction }:
|
|
8
|
+
function directionToTransform({ direction }: ArrowIconProps) {
|
|
9
9
|
switch (direction) {
|
|
10
10
|
case 'up':
|
|
11
11
|
return 180;
|
|
@@ -19,14 +19,14 @@ function directionToTransform({ direction }: ArrowProps) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const Icon = ({ className }: { className?: string }) => (
|
|
22
|
-
<span data-component-name="
|
|
22
|
+
<span data-component-name="icons/ArrowIcon/ArrowIcon">
|
|
23
23
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 5" className={className}>
|
|
24
24
|
<path d="M3.5 2.51L5.806.205a.7.7 0 01.99.99l-2.8 2.8a.698.698 0 01-.99 0l-2.8-2.8a.7.7 0 11.99-.99L3.5 2.51z" />
|
|
25
25
|
</svg>
|
|
26
26
|
</span>
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
-
export const
|
|
29
|
+
export const ArrowIcon = styled(Icon)`
|
|
30
30
|
width: var(--sidebar-chevron-size);
|
|
31
31
|
height: var(--sidebar-chevron-size);
|
|
32
32
|
fill: var(--sidebar-chevron-color);
|
package/src/icons/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface RawTheme {
|
|
2
|
+
name: string;
|
|
3
|
+
settings?: any;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export function useThemeSettings(name: string): RawTheme['settings'] {
|
|
7
|
+
return {
|
|
8
|
+
name,
|
|
9
|
+
settings: {
|
|
10
|
+
toc: { header: 'header', hide: false },
|
|
11
|
+
navigation: {
|
|
12
|
+
nextPageLink: { label: 'next page' },
|
|
13
|
+
previousPageLink: { label: 'prev page' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
package/src/ui/Jumbotron.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { space } from 'styled-system';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import { H1, H2 } from '@theme/
|
|
4
|
+
import { H1, H2 } from '@theme/Typography';
|
|
5
5
|
import { Background } from '@theme/ui/Background';
|
|
6
6
|
|
|
7
7
|
export const Jumbotron = styled(Background).attrs(() => ({
|
package/src/ui/index.tsx
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
export * from '@theme/ui/Tiles';
|
|
4
|
-
export * from '@theme/ui/AlertIcon';
|
|
5
|
-
export * from '@theme/ui/Arrow';
|
|
6
4
|
export * from '@theme/ui/Background';
|
|
7
5
|
export * from '@theme/ui/Box';
|
|
8
|
-
export * from '@theme/ui/Button';
|
|
9
6
|
export * from '@theme/ui/Dropdown';
|
|
10
7
|
export * from '@theme/ui/Flex';
|
|
11
8
|
export * from '@theme/ui/Jumbotron';
|
|
12
|
-
export * from '@theme/ui/Typography';
|
|
13
9
|
export * from '@theme/ui/UniversalLink';
|
|
14
10
|
|
|
15
11
|
export const LandingLayout = ({ children }: React.PropsWithChildren<object>): React.ReactNode =>
|
package/ui/Jumbotron.js
CHANGED
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.Jumbotron = void 0;
|
|
11
11
|
var styled_system_1 = require("styled-system");
|
|
12
12
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
|
-
var Typography_1 = require("../
|
|
13
|
+
var Typography_1 = require("../Typography");
|
|
14
14
|
var Background_1 = require("../ui/Background");
|
|
15
15
|
exports.Jumbotron = (0, styled_components_1.default)(Background_1.Background).attrs(function () { return ({
|
|
16
16
|
'data-component-name': 'ui/Jumbotron',
|
package/ui/index.d.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export * from '../ui/Tiles';
|
|
3
|
-
export * from '../ui/AlertIcon';
|
|
4
|
-
export * from '../ui/Arrow';
|
|
5
3
|
export * from '../ui/Background';
|
|
6
4
|
export * from '../ui/Box';
|
|
7
|
-
export * from '../ui/Button';
|
|
8
5
|
export * from '../ui/Dropdown';
|
|
9
6
|
export * from '../ui/Flex';
|
|
10
7
|
export * from '../ui/Jumbotron';
|
|
11
|
-
export * from '../ui/Typography';
|
|
12
8
|
export * from '../ui/UniversalLink';
|
|
13
9
|
export declare const LandingLayout: ({ children }: React.PropsWithChildren<object>) => React.ReactNode;
|
|
14
10
|
export declare const EmptyLayout: ({ children }: React.PropsWithChildren<object>) => React.ReactNode;
|
package/ui/index.js
CHANGED
|
@@ -16,15 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.EmptyLayout = exports.LandingLayout = void 0;
|
|
18
18
|
__exportStar(require("../ui/Tiles"), exports);
|
|
19
|
-
__exportStar(require("../ui/AlertIcon"), exports);
|
|
20
|
-
__exportStar(require("../ui/Arrow"), exports);
|
|
21
19
|
__exportStar(require("../ui/Background"), exports);
|
|
22
20
|
__exportStar(require("../ui/Box"), exports);
|
|
23
|
-
__exportStar(require("../ui/Button"), exports);
|
|
24
21
|
__exportStar(require("../ui/Dropdown"), exports);
|
|
25
22
|
__exportStar(require("../ui/Flex"), exports);
|
|
26
23
|
__exportStar(require("../ui/Jumbotron"), exports);
|
|
27
|
-
__exportStar(require("../ui/Typography"), exports);
|
|
28
24
|
__exportStar(require("../ui/UniversalLink"), exports);
|
|
29
25
|
var LandingLayout = function (_a) {
|
|
30
26
|
var children = _a.children;
|
package/Headings/Headings.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const H1: import("styled-components").StyledComponent<"h1", any, {}, never>;
|
|
2
|
-
export declare const H2: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
3
|
-
export declare const H3: import("styled-components").StyledComponent<"h3", any, {}, never>;
|
package/Headings/Headings.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.H3 = exports.H2 = exports.H1 = void 0;
|
|
11
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
var utils_1 = require("../utils");
|
|
13
|
-
exports.H1 = styled_components_1.default.h1(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: var(--color-content);\n margin: 0 0 25px;\n\n ", ";\n"], ["\n color: var(--color-content);\n margin: 0 0 25px;\n\n ", ";\n"])), (0, utils_1.typography)('h1', 'h'));
|
|
14
|
-
exports.H2 = styled_components_1.default.h2(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: var(--color-content);\n margin: 0 0 20px;\n\n ", ";\n"], ["\n color: var(--color-content);\n margin: 0 0 20px;\n\n ", ";\n"])), (0, utils_1.typography)('h2', 'h'));
|
|
15
|
-
exports.H3 = styled_components_1.default.h3(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: var(--color-content);\n\n ", ";\n"], ["\n color: var(--color-content);\n\n ", ";\n"])), (0, utils_1.typography)('h3', 'h'));
|
|
16
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
package/Headings/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../Headings/Headings';
|
package/JsonViewer/styled.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const jsonStyles: import("styled-components").FlattenSimpleInterpolation;
|
package/JsonViewer/styled.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.jsonStyles = void 0;
|
|
8
|
-
var styled_components_1 = require("styled-components");
|
|
9
|
-
exports.jsonStyles = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .redoc-json code {\n background-color: var(--samples-panel-controls-background-color);\n color: var(--color-content-inverse);\n padding: inherit;\n border: none;\n\n & > .collapser {\n display: none;\n pointer-events: none;\n }\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n border-radius: var(--global-border-radius);\n background-color: var(--samples-panel-controls-background-color);\n color: var(--color-content-inverse);\n font-size: var(--code-font-size);\n font-family: var(--code-font-family);\n white-space: var(--code-wrap, pre);\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' \u2026 ';\n }\n\n .collapsible {\n margin-left: 2ch;\n }\n\n .hoverable {\n padding: 1px 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n font-family: var(--code-font-family);\n font-size: var(--code-font-size);\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0;\n margin: 0 0 0 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"], ["\n .redoc-json code {\n background-color: var(--samples-panel-controls-background-color);\n color: var(--color-content-inverse);\n padding: inherit;\n border: none;\n\n & > .collapser {\n display: none;\n pointer-events: none;\n }\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n border-radius: var(--global-border-radius);\n background-color: var(--samples-panel-controls-background-color);\n color: var(--color-content-inverse);\n font-size: var(--code-font-size);\n font-family: var(--code-font-family);\n white-space: var(--code-wrap, pre);\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' \u2026 ';\n }\n\n .collapsible {\n margin-left: 2ch;\n }\n\n .hoverable {\n padding: 1px 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n font-family: var(--code-font-family);\n font-size: var(--code-font-size);\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0;\n margin: 0 0 0 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"])));
|
|
10
|
-
var templateObject_1;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const CodeSampleButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const CopyCodeButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const DoneIndicator: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.Wrapper = exports.DoneIndicator = exports.CopyCodeButton = exports.CodeSampleButtonContainer = void 0;
|
|
31
|
-
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
-
exports.CodeSampleButtonContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 5px;\n"], ["\n position: absolute;\n top: 12px;\n right: 5px;\n"])));
|
|
33
|
-
exports.CopyCodeButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 0 5px;\n border-radius: 4px;\n display: none;\n &:hover {\n cursor: pointer;\n }\n"], ["\n padding: 0 5px;\n border-radius: 4px;\n display: none;\n &:hover {\n cursor: pointer;\n }\n"])));
|
|
34
|
-
exports.DoneIndicator = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 0 5px;\n border-radius: 4px;\n cursor: default;\n"], ["\n padding: 0 5px;\n border-radius: 4px;\n cursor: default;\n"])));
|
|
35
|
-
// const lightStyleTokens = css`
|
|
36
|
-
// .token.comment,
|
|
37
|
-
// .token.prolog,
|
|
38
|
-
// .token.doctype,
|
|
39
|
-
// .token.cdata {
|
|
40
|
-
// color: #999988;
|
|
41
|
-
// font-style: italic;
|
|
42
|
-
// }
|
|
43
|
-
// .token.namespace {
|
|
44
|
-
// opacity: 0.7;
|
|
45
|
-
// }
|
|
46
|
-
// .token.string,
|
|
47
|
-
// .token.attr-value {
|
|
48
|
-
// color: #e3116c;
|
|
49
|
-
// }
|
|
50
|
-
// .token.punctuation,
|
|
51
|
-
// .token.operator {
|
|
52
|
-
// color: #393a34; /* no highlight */
|
|
53
|
-
// }
|
|
54
|
-
// .token.entity,
|
|
55
|
-
// .token.url,
|
|
56
|
-
// .token.symbol,
|
|
57
|
-
// .token.number,
|
|
58
|
-
// .token.boolean,
|
|
59
|
-
// .token.variable,
|
|
60
|
-
// .token.constant,
|
|
61
|
-
// .token.property,
|
|
62
|
-
// .token.regex,
|
|
63
|
-
// .token.inserted {
|
|
64
|
-
// color: #36acaa;
|
|
65
|
-
// }
|
|
66
|
-
// .token.atrule,
|
|
67
|
-
// .token.keyword,
|
|
68
|
-
// .token.attr-name,
|
|
69
|
-
// .language-autohotkey .token.selector {
|
|
70
|
-
// color: #00a4db;
|
|
71
|
-
// }
|
|
72
|
-
// .token.function,
|
|
73
|
-
// .token.deleted,
|
|
74
|
-
// .language-autohotkey .token.tag {
|
|
75
|
-
// color: #9a050f;
|
|
76
|
-
// }
|
|
77
|
-
// .token.tag,
|
|
78
|
-
// .token.selector,
|
|
79
|
-
// .language-autohotkey .token.keyword {
|
|
80
|
-
// color: #00009f;
|
|
81
|
-
// }
|
|
82
|
-
// `;
|
|
83
|
-
var darkStyleTokens = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: hsl(30, 20%, 50%);\n }\n .token.property,\n .token.tag,\n .token.number,\n .token.constant,\n .token.symbol {\n color: #62bff9;\n }\n .token.boolean {\n color: firebrick;\n }\n .token.selector,\n .token.attr-name,\n .token.string,\n .token.char,\n .token.builtin,\n .token.inserted {\n color: #a0fbaa;\n & + a,\n & + a:visited {\n color: #4ed2ba;\n text-decoration: underline;\n }\n }\n .token.operator,\n .token.entity,\n .token.url,\n .token.variable {\n color: hsl(40, 90%, 60%);\n }\n .token.atrule,\n .token.attr-value,\n .token.keyword {\n color: hsl(350, 40%, 70%);\n }\n .token.regex,\n .token.important {\n color: #e90;\n }\n .token.deleted {\n color: red;\n }\n"], ["\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: hsl(30, 20%, 50%);\n }\n .token.property,\n .token.tag,\n .token.number,\n .token.constant,\n .token.symbol {\n color: #62bff9;\n }\n .token.boolean {\n color: firebrick;\n }\n .token.selector,\n .token.attr-name,\n .token.string,\n .token.char,\n .token.builtin,\n .token.inserted {\n color: #a0fbaa;\n & + a,\n & + a:visited {\n color: #4ed2ba;\n text-decoration: underline;\n }\n }\n .token.operator,\n .token.entity,\n .token.url,\n .token.variable {\n color: hsl(40, 90%, 60%);\n }\n .token.atrule,\n .token.attr-value,\n .token.keyword {\n color: hsl(350, 40%, 70%);\n }\n .token.regex,\n .token.important {\n color: #e90;\n }\n .token.deleted {\n color: red;\n }\n"])));
|
|
84
|
-
exports.Wrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n overflow: auto;\n border-radius: 4px;\n position: relative;\n\n ", ",\n ", " {\n color: rgba(255, 255, 255, 0.15);\n }\n ", ":hover {\n color: #fff;\n background-color: rgba(255, 255, 255, 0.15);\n }\n\n &:hover {\n ", " ", " {\n display: block;\n }\n }\n pre {\n white-space: var(--code-wrap);\n color: white;\n padding: 12px 14px 15px 14px;\n overflow-x: auto;\n line-height: normal;\n border-radius: 4px;\n font-family: var(--code-font-family);\n background-color: var(--code-block-preformatted-background-color);\n code {\n background-color: transparent;\n border: 0;\n padding: 0;\n color: white;\n &:before,\n &:after {\n content: none;\n }\n }\n }\n pre[class*='language-'] {\n padding: 1em;\n margin: 0.5em 0;\n overflow: auto;\n border: 0;\n border-radius: var(--global-border-radius);\n }\n code[class='language-text'] {\n line-height: 1.2em;\n display: inline-flex;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n }\n code[class*='language-'],\n pre[class*='language-'] {\n text-align: left;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n word-wrap: normal;\n line-height: 1.5;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n .token.important,\n .token.bold {\n font-weight: bold;\n }\n .token.italic {\n font-style: italic;\n }\n .token.entity {\n cursor: help;\n }\n .token.punctuation {\n opacity: 0.7;\n }\n .namespace {\n opacity: 0.7;\n }\n\n ", ";\n }\n"], ["\n overflow: auto;\n border-radius: 4px;\n position: relative;\n\n ", ",\n ", " {\n color: rgba(255, 255, 255, 0.15);\n }\n ", ":hover {\n color: #fff;\n background-color: rgba(255, 255, 255, 0.15);\n }\n\n &:hover {\n ", " ", " {\n display: block;\n }\n }\n pre {\n white-space: var(--code-wrap);\n color: white;\n padding: 12px 14px 15px 14px;\n overflow-x: auto;\n line-height: normal;\n border-radius: 4px;\n font-family: var(--code-font-family);\n background-color: var(--code-block-preformatted-background-color);\n code {\n background-color: transparent;\n border: 0;\n padding: 0;\n color: white;\n &:before,\n &:after {\n content: none;\n }\n }\n }\n pre[class*='language-'] {\n padding: 1em;\n margin: 0.5em 0;\n overflow: auto;\n border: 0;\n border-radius: var(--global-border-radius);\n }\n code[class='language-text'] {\n line-height: 1.2em;\n display: inline-flex;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n }\n code[class*='language-'],\n pre[class*='language-'] {\n text-align: left;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n word-wrap: normal;\n line-height: 1.5;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n .token.important,\n .token.bold {\n font-weight: bold;\n }\n .token.italic {\n font-style: italic;\n }\n .token.entity {\n cursor: help;\n }\n .token.punctuation {\n opacity: 0.7;\n }\n .namespace {\n opacity: 0.7;\n }\n\n ", ";\n }\n"])), exports.CopyCodeButton, exports.DoneIndicator, exports.CopyCodeButton, exports.CodeSampleButtonContainer, exports.CopyCodeButton, darkStyleTokens);
|
|
85
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
package/src/Headings/Headings.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { typography } from '@theme/utils';
|
|
4
|
-
|
|
5
|
-
export const H1 = styled.h1`
|
|
6
|
-
color: var(--color-content);
|
|
7
|
-
margin: 0 0 25px;
|
|
8
|
-
|
|
9
|
-
${typography('h1', 'h')};
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
export const H2 = styled.h2`
|
|
13
|
-
color: var(--color-content);
|
|
14
|
-
margin: 0 0 20px;
|
|
15
|
-
|
|
16
|
-
${typography('h2', 'h')};
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export const H3 = styled.h3`
|
|
20
|
-
color: var(--color-content);
|
|
21
|
-
|
|
22
|
-
${typography('h3', 'h')};
|
|
23
|
-
`;
|
package/src/Headings/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@theme/Headings/Headings';
|
package/src/JsonViewer/styled.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { css } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
export const jsonStyles = css`
|
|
4
|
-
.redoc-json code {
|
|
5
|
-
background-color: var(--samples-panel-controls-background-color);
|
|
6
|
-
color: var(--color-content-inverse);
|
|
7
|
-
padding: inherit;
|
|
8
|
-
border: none;
|
|
9
|
-
|
|
10
|
-
& > .collapser {
|
|
11
|
-
display: none;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
contain: content;
|
|
17
|
-
overflow-x: auto;
|
|
18
|
-
padding: 10px;
|
|
19
|
-
border-radius: var(--global-border-radius);
|
|
20
|
-
background-color: var(--samples-panel-controls-background-color);
|
|
21
|
-
color: var(--color-content-inverse);
|
|
22
|
-
font-size: var(--code-font-size);
|
|
23
|
-
font-family: var(--code-font-family);
|
|
24
|
-
white-space: var(--code-wrap, pre);
|
|
25
|
-
|
|
26
|
-
.callback-function {
|
|
27
|
-
color: gray;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.collapser:after {
|
|
31
|
-
content: '-';
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.collapsed > .collapser:after {
|
|
36
|
-
content: '+';
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ellipsis:after {
|
|
41
|
-
content: ' … ';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.collapsible {
|
|
45
|
-
margin-left: 2ch;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.hoverable {
|
|
49
|
-
padding: 1px 2px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.hovered {
|
|
53
|
-
background-color: rgba(235, 238, 249, 1);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.collapser {
|
|
57
|
-
background-color: transparent;
|
|
58
|
-
border: 0;
|
|
59
|
-
color: #fff;
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
justify-content: center;
|
|
63
|
-
width: 15px;
|
|
64
|
-
height: 15px;
|
|
65
|
-
position: absolute;
|
|
66
|
-
top: 4px;
|
|
67
|
-
left: -1.5em;
|
|
68
|
-
cursor: default;
|
|
69
|
-
user-select: none;
|
|
70
|
-
-webkit-user-select: none;
|
|
71
|
-
padding: 2px;
|
|
72
|
-
font-family: var(--code-font-family);
|
|
73
|
-
font-size: var(--code-font-size);
|
|
74
|
-
&:focus {
|
|
75
|
-
outline: #fff dotted 1px;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
ul {
|
|
80
|
-
list-style-type: none;
|
|
81
|
-
padding: 0;
|
|
82
|
-
margin: 0 0 0 26px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
li {
|
|
86
|
-
position: relative;
|
|
87
|
-
display: block;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.hoverable {
|
|
91
|
-
display: inline-block;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.selected {
|
|
95
|
-
outline-width: 1px;
|
|
96
|
-
outline-style: dotted;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.collapsed > .collapsible {
|
|
100
|
-
display: none;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.ellipsis {
|
|
104
|
-
display: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.collapsed > .ellipsis {
|
|
108
|
-
display: inherit;
|
|
109
|
-
}
|
|
110
|
-
`;
|