@redocly/theme 0.1.10 → 0.1.13
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/CodeBlock/CodeBlock.js +2 -1
- package/Markdown/StyledMarkdown.d.ts +0 -2
- package/Markdown/StyledMarkdown.js +5 -16
- package/Markdown/index.d.ts +0 -1
- package/Markdown/index.js +0 -1
- package/Navbar/NavbarMenu.js +1 -1
- package/OperationBadge/OperationBadge.js +1 -1
- package/Search/ClearIcon.js +2 -2
- package/Search/Input.js +1 -1
- package/Search/Popover.js +1 -1
- package/Search/SearchIcon.js +2 -2
- package/Sidebar/ApiCallItem.js +1 -1
- package/TableOfContent/TableOfContent.js +5 -6
- package/globalStyle.d.ts +1 -0
- package/globalStyle.js +25 -3
- package/mocks/Link.js +4 -1
- package/mocks/hooks/usePageData.js +4 -1
- package/package.json +1 -1
- package/src/CodeBlock/CodeBlock.ts +3 -42
- package/src/Markdown/StyledMarkdown.tsx +14 -28
- package/src/Markdown/index.ts +0 -1
- package/src/Navbar/NavbarMenu.tsx +1 -1
- package/src/OperationBadge/OperationBadge.ts +5 -2
- package/src/Search/ClearIcon.tsx +12 -13
- package/src/Search/Input.tsx +7 -7
- package/src/Search/Popover.tsx +2 -2
- package/src/Search/SearchIcon.tsx +12 -13
- package/src/Sidebar/ApiCallItem.tsx +1 -2
- package/src/TableOfContent/TableOfContent.tsx +6 -4
- package/src/globalStyle.ts +829 -536
- package/src/mocks/Link.tsx +5 -2
- package/src/mocks/hooks/usePageData.ts +4 -1
- package/src/ui/Typography.tsx +12 -89
- package/src/ui/UniversalLink.tsx +3 -8
- package/src/utils/ClipboardService.ts +3 -86
- package/src/utils/isUrl.ts +4 -4
- package/src/utils/theme-helpers.ts +46 -0
- package/ui/Typography.d.ts +2 -71
- package/ui/Typography.js +15 -93
- package/ui/UniversalLink.js +1 -5
- package/utils/ClipboardService.d.ts +1 -5
- package/utils/ClipboardService.js +2 -73
- package/utils/isUrl.d.ts +2 -2
- package/utils/isUrl.js +4 -4
- package/utils/theme-helpers.d.ts +1 -0
- package/utils/theme-helpers.js +42 -2
- package/Markdown/CodeSample/CodeSample.d.ts +0 -8
- package/Markdown/CodeSample/CodeSample.js +0 -30
- package/Markdown/CodeSample/index.d.ts +0 -3
- package/Markdown/CodeSample/index.js +0 -19
- package/Markdown/CodeSample/styled.d.ts +0 -5
- package/Markdown/CodeSample/styled.js +0 -109
- package/Markdown/CodeSample/types.d.ts +0 -9
- package/Markdown/CodeSample/types.js +0 -2
- package/src/Button/Button.stories.tsx +0 -74
- package/src/Button/__tests__/Button.test.tsx +0 -42
- package/src/Button/__tests__/__snapshots__/Button.test.tsx.snap +0 -274
- package/src/CodeBlock/__tests__/CodeBlock.test.tsx +0 -12
- package/src/CodeBlock/__tests__/__snapshots__/CodeBlock.test.tsx.snap +0 -140
- package/src/CopyButton/CopyButton.stories.tsx +0 -18
- package/src/CopyButton/__tests__/CopyButton.test.tsx +0 -35
- package/src/CopyButton/__tests__/CopyButtonWrapper.test.tsx +0 -17
- package/src/CopyButton/__tests__/__snapshots__/CopyButton.test.tsx.snap +0 -55
- package/src/CopyButton/__tests__/__snapshots__/CopyButtonWrapper.test.tsx.snap +0 -46
- package/src/Footer/Footer.stories.tsx +0 -57
- package/src/Footer/__tests__/Footer.test.tsx +0 -55
- package/src/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +0 -253
- package/src/Headings/Headings.stories.tsx +0 -36
- package/src/Headings/__tests__/Headings.test.tsx +0 -24
- package/src/Headings/__tests__/__snapshots__/Headings.test.tsx.snap +0 -57
- package/src/JsonViewer/JsonViewer.stories.tsx +0 -57
- package/src/JsonViewer/__tests__/JsonViewer.test.tsx +0 -83
- package/src/JsonViewer/__tests__/__snapshots__/JsonViewer.test.tsx.snap +0 -2728
- package/src/Layout/__tests__/PageLayout.test.tsx +0 -17
- package/src/Layout/__tests__/RootLayout.test.tsx +0 -17
- package/src/Layout/__tests__/__snapshots__/PageLayout.test.tsx.snap +0 -38
- package/src/Layout/__tests__/__snapshots__/RootLayout.test.tsx.snap +0 -18
- package/src/Markdown/CodeSample/CodeSample.tsx +0 -39
- package/src/Markdown/CodeSample/index.ts +0 -3
- package/src/Markdown/CodeSample/styled.ts +0 -289
- package/src/Markdown/CodeSample/types.ts +0 -40
- package/src/Navbar/Navbar.stories.tsx +0 -32
- package/src/NavbarLogo/NavbarLogo.stories.tsx +0 -20
- package/src/NavbarLogo/__tests__/NavbarLogo.test.tsx +0 -47
- package/src/NavbarLogo/__tests__/__snapshots__/NavbarLogo.test.tsx.snap +0 -38
- package/src/OperationBadge/OperationBadge.stories.tsx +0 -35
- package/src/OperationBadge/__tests__/OperationBadge.test.tsx +0 -59
- package/src/OperationBadge/__tests__/__snapshots__/OperationBadge.test.tsx.snap +0 -651
- package/src/Panel/CodePanel.stories.tsx +0 -26
- package/src/Panel/ContentPanel.stories.tsx +0 -26
- package/src/Panel/Panel.stories.tsx +0 -56
- package/src/Panel/__tests__/CodePanel.test.tsx +0 -26
- package/src/Panel/__tests__/ContentPanel.test.tsx +0 -26
- package/src/Panel/__tests__/Panel.test.tsx +0 -53
- package/src/Panel/__tests__/__snapshots__/CodePanel.test.tsx.snap +0 -258
- package/src/Panel/__tests__/__snapshots__/ContentPanel.test.tsx.snap +0 -278
- package/src/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +0 -398
- package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +0 -18
- package/src/SamplesPanelControls/__tests__/SamplesPanelControls.test.tsx +0 -36
- package/src/SamplesPanelControls/__tests__/__snapshots__/SamplesPanelControls.test.tsx.snap +0 -228
- package/src/SidebarLogo/SidebarLogo.stories.tsx +0 -21
- package/src/SidebarLogo/__tests__/SidebarLogo.test.tsx +0 -32
- package/src/SidebarLogo/__tests__/__snapshots__/SidebarLogo.test.tsx.snap +0 -62
- package/src/SourceCode/SourceCode.stories.tsx +0 -29
- package/src/SourceCode/__tests__/SourceCode.test.tsx +0 -48
- package/src/SourceCode/__tests__/__snapshots__/SourceCode.test.tsx.snap +0 -786
- package/src/TableOfContent/TableOfContent.stories.tsx +0 -39
- package/src/Tooltip/Tooltip.stories.tsx +0 -27
- package/src/Tooltip/__tests__/Tooltip.test.tsx +0 -41
- package/src/Tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +0 -83
- package/src/Welcome.stories.mdx +0 -7
- package/src/icons/ShelfIcon/ShelfIcon.stories.tsx +0 -36
- package/src/icons/ShelfIcon/__tests__/ShelfIcon.test.tsx +0 -54
- package/src/icons/ShelfIcon/__tests__/__snapshots__/ShelfIcon.test.tsx.snap +0 -235
- package/src/utils/__tests__/ClipboardService.test.ts +0 -24
- package/src/utils/__tests__/__snapshots__/highlight.test.ts.snap +0 -5
- package/src/utils/__tests__/__snapshots__/jsonToHtml.test.ts.snap +0 -5
- package/src/utils/__tests__/css-variables.test.ts +0 -20
- package/src/utils/__tests__/highlight.test.ts +0 -51
- package/src/utils/__tests__/jsonToHtml.test.ts +0 -40
- package/src/utils/__tests__/media-css.test.ts +0 -20
- package/src/utils/__tests__/theme-helpers.test.ts +0 -25
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React, { JSXElementConstructor } from 'react';
|
|
2
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
import { within, userEvent } from '@storybook/testing-library';
|
|
4
|
-
|
|
5
|
-
import { Panel, PanelHeaderProps, PanelComponentProps } from '@theme/Panel';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Components/Panels/Panel (base)',
|
|
9
|
-
component: Panel,
|
|
10
|
-
} as ComponentMeta<typeof Panel>;
|
|
11
|
-
|
|
12
|
-
const Template: ComponentStory<JSXElementConstructor<PanelComponentProps>> = (args) => (
|
|
13
|
-
<Panel {...args}>Panel body</Panel>
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const Default = Template.bind({});
|
|
17
|
-
Default.args = {
|
|
18
|
-
header: 'Panel header',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Collapsed = Template.bind({});
|
|
22
|
-
Collapsed.args = {
|
|
23
|
-
header: 'Panel header (click me)',
|
|
24
|
-
expanded: false,
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const Expanded = Template.bind({});
|
|
28
|
-
Expanded.args = {
|
|
29
|
-
header: 'Panel header (click me)',
|
|
30
|
-
expanded: true,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const HeaderAsFunction = Template.bind({});
|
|
34
|
-
HeaderAsFunction.args = {
|
|
35
|
-
header: (props: PanelHeaderProps) => <div>Custom Header component: {JSON.stringify(props)}</div>,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const HeaderAsComponent = Template.bind({});
|
|
39
|
-
HeaderAsComponent.args = {
|
|
40
|
-
header: <i>Header component</i>,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const WithoutHeader = Template.bind({});
|
|
44
|
-
WithoutHeader.args = {};
|
|
45
|
-
|
|
46
|
-
// TODO: change to normal name after fixing problem with stories order!
|
|
47
|
-
export const WithDemoAnimation = Template.bind({});
|
|
48
|
-
WithDemoAnimation.args = {
|
|
49
|
-
expanded: false,
|
|
50
|
-
header: 'Panel header',
|
|
51
|
-
};
|
|
52
|
-
WithDemoAnimation.play = async ({ canvasElement }) => {
|
|
53
|
-
const canvas = within(canvasElement);
|
|
54
|
-
|
|
55
|
-
await userEvent.click(canvas.getByTestId('panel-header'));
|
|
56
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import { CodePanel } from '@theme/Panel';
|
|
5
|
-
|
|
6
|
-
describe('CodePanel', () => {
|
|
7
|
-
it('renders collapsed', () => {
|
|
8
|
-
const { container } = render(
|
|
9
|
-
<CodePanel header={'CodePanel header'} expanded={false}>
|
|
10
|
-
CodePanel body
|
|
11
|
-
</CodePanel>,
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('renders expanded', () => {
|
|
18
|
-
const { container } = render(
|
|
19
|
-
<CodePanel header={'CodePanel header'} expanded={true}>
|
|
20
|
-
CodePanel body
|
|
21
|
-
</CodePanel>,
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import { ContentPanel } from '@theme/Panel';
|
|
5
|
-
|
|
6
|
-
describe('ContentPanel', () => {
|
|
7
|
-
it('renders collapsed', () => {
|
|
8
|
-
const { container } = render(
|
|
9
|
-
<ContentPanel header={'ContentPanel header'} expanded={false}>
|
|
10
|
-
ContentPanel body
|
|
11
|
-
</ContentPanel>,
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('renders expanded', () => {
|
|
18
|
-
const { container } = render(
|
|
19
|
-
<ContentPanel header={'ContentPanel header'} expanded={true}>
|
|
20
|
-
ContentPanel body
|
|
21
|
-
</ContentPanel>,
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import { Panel, PanelHeaderProps } from '@theme/Panel';
|
|
5
|
-
|
|
6
|
-
describe('Panel', () => {
|
|
7
|
-
it('renders without header', () => {
|
|
8
|
-
const { container } = render(<Panel>Panel body</Panel>);
|
|
9
|
-
|
|
10
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('renders with header', () => {
|
|
14
|
-
const { container } = render(<Panel header={'Panel header'}>Panel body</Panel>);
|
|
15
|
-
|
|
16
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('renders collapsed', () => {
|
|
20
|
-
const { container } = render(
|
|
21
|
-
<Panel header={'Panel header'} expanded={false}>
|
|
22
|
-
Panel body
|
|
23
|
-
</Panel>,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('renders expanded', () => {
|
|
30
|
-
const { container } = render(
|
|
31
|
-
<Panel header={'Panel header'} expanded={true}>
|
|
32
|
-
Panel body
|
|
33
|
-
</Panel>,
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('renders with header as function', () => {
|
|
40
|
-
const { container } = render(
|
|
41
|
-
<Panel
|
|
42
|
-
header={(props: PanelHeaderProps) => (
|
|
43
|
-
<div>Custom Header component: {JSON.stringify(props)}</div>
|
|
44
|
-
)}
|
|
45
|
-
expanded={true}
|
|
46
|
-
>
|
|
47
|
-
Panel body
|
|
48
|
-
</Panel>,
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`CodePanel renders collapsed 1`] = `
|
|
4
|
-
.c8 {
|
|
5
|
-
height: 9px;
|
|
6
|
-
width: 9px;
|
|
7
|
-
-webkit-transform: rotateZ(0deg);
|
|
8
|
-
-ms-transform: rotateZ(0deg);
|
|
9
|
-
transform: rotateZ(0deg);
|
|
10
|
-
fill: inherit;
|
|
11
|
-
vertical-align: middle;
|
|
12
|
-
-webkit-transition: -webkit-transform 0.2s ease-out;
|
|
13
|
-
-webkit-transition: transform 0.2s ease-out;
|
|
14
|
-
transition: transform 0.2s ease-out;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.c3 {
|
|
18
|
-
position: relative;
|
|
19
|
-
z-index: 1;
|
|
20
|
-
display: -webkit-box;
|
|
21
|
-
display: -webkit-flex;
|
|
22
|
-
display: -ms-flexbox;
|
|
23
|
-
display: flex;
|
|
24
|
-
-webkit-align-items: center;
|
|
25
|
-
-webkit-box-align: center;
|
|
26
|
-
-ms-flex-align: center;
|
|
27
|
-
align-items: center;
|
|
28
|
-
-webkit-box-pack: justify;
|
|
29
|
-
-webkit-justify-content: space-between;
|
|
30
|
-
-ms-flex-pack: justify;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
white-space: nowrap;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
border-top-left-radius: var(--panels-border-radius);
|
|
35
|
-
border-top-right-radius: var(--panels-border-radius);
|
|
36
|
-
border-bottom-right-radius: var(--panels-border-radius);
|
|
37
|
-
border-bottom-left-radius: var(--panels-border-radius);
|
|
38
|
-
pointer-events: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.c6 {
|
|
42
|
-
line-height: 1;
|
|
43
|
-
margin-right: 5px;
|
|
44
|
-
font-weight: 700;
|
|
45
|
-
color: var(--color-content);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.c4 {
|
|
49
|
-
display: -webkit-inline-box;
|
|
50
|
-
display: -webkit-inline-flex;
|
|
51
|
-
display: -ms-inline-flexbox;
|
|
52
|
-
display: inline-flex;
|
|
53
|
-
-webkit-align-items: center;
|
|
54
|
-
-webkit-box-align: center;
|
|
55
|
-
-ms-flex-align: center;
|
|
56
|
-
align-items: center;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.c0 {
|
|
60
|
-
border-radius: var(--panels-border-radius);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.c0:not(:last-child) {
|
|
64
|
-
margin-bottom: 10px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.c1 > .c2 {
|
|
68
|
-
padding: 10px 20px;
|
|
69
|
-
line-height: 30px;
|
|
70
|
-
z-index: 0;
|
|
71
|
-
background-color: var(--samples-panel-controls-background-color);
|
|
72
|
-
min-height: 50px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.c1 > .c2 .c7 {
|
|
76
|
-
fill: var(--color-content-inverse);
|
|
77
|
-
position: relative;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.c1 > .c2 .c5 {
|
|
81
|
-
color: var(--color-content-inverse);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
<div
|
|
85
|
-
class="c0 c1"
|
|
86
|
-
data-cy="panel-codepanel-header"
|
|
87
|
-
>
|
|
88
|
-
<div
|
|
89
|
-
class="c2 c3"
|
|
90
|
-
data-cy="panel-header"
|
|
91
|
-
>
|
|
92
|
-
<div
|
|
93
|
-
class="c4"
|
|
94
|
-
>
|
|
95
|
-
<span
|
|
96
|
-
class="c5 c6"
|
|
97
|
-
data-cy="title"
|
|
98
|
-
>
|
|
99
|
-
CodePanel header
|
|
100
|
-
</span>
|
|
101
|
-
<svg
|
|
102
|
-
aria-hidden="true"
|
|
103
|
-
class="c7 c8"
|
|
104
|
-
viewBox="0 0 4.25 7"
|
|
105
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
106
|
-
>
|
|
107
|
-
<path
|
|
108
|
-
d="M0.205025 1.19467L3.00503 3.99467C3.27839 4.26804 3.72161 4.26804 3.99497 3.99467C4.26834 3.7213 4.26834 3.27809 3.99497 3.00472L1.19497 0.20472C0.921608 -0.0686469 0.478392 -0.0686469 0.205025 0.20472C-0.0683418 0.478087 -0.0683417 0.921303 0.205025 1.19467Z"
|
|
109
|
-
/>
|
|
110
|
-
<path
|
|
111
|
-
d="M3.00503 3.00501L0.205025 5.80501C-0.0683417 6.07838 -0.0683417 6.5216 0.205025 6.79496C0.478392 7.06833 0.921608 7.06833 1.19497 6.79496L3.99497 3.99496C4.26834 3.7216 4.26834 3.27838 3.99497 3.00501C3.72161 2.73165 3.27839 2.73165 3.00503 3.00501Z"
|
|
112
|
-
/>
|
|
113
|
-
</svg>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
exports[`CodePanel renders expanded 1`] = `
|
|
120
|
-
.c8 {
|
|
121
|
-
height: 9px;
|
|
122
|
-
width: 9px;
|
|
123
|
-
-webkit-transform: rotateZ(90deg);
|
|
124
|
-
-ms-transform: rotateZ(90deg);
|
|
125
|
-
transform: rotateZ(90deg);
|
|
126
|
-
fill: inherit;
|
|
127
|
-
vertical-align: middle;
|
|
128
|
-
-webkit-transition: -webkit-transform 0.2s ease-out;
|
|
129
|
-
-webkit-transition: transform 0.2s ease-out;
|
|
130
|
-
transition: transform 0.2s ease-out;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.c3 {
|
|
134
|
-
position: relative;
|
|
135
|
-
z-index: 1;
|
|
136
|
-
display: -webkit-box;
|
|
137
|
-
display: -webkit-flex;
|
|
138
|
-
display: -ms-flexbox;
|
|
139
|
-
display: flex;
|
|
140
|
-
-webkit-align-items: center;
|
|
141
|
-
-webkit-box-align: center;
|
|
142
|
-
-ms-flex-align: center;
|
|
143
|
-
align-items: center;
|
|
144
|
-
-webkit-box-pack: justify;
|
|
145
|
-
-webkit-justify-content: space-between;
|
|
146
|
-
-ms-flex-pack: justify;
|
|
147
|
-
justify-content: space-between;
|
|
148
|
-
white-space: nowrap;
|
|
149
|
-
cursor: pointer;
|
|
150
|
-
border-top-left-radius: var(--panels-border-radius);
|
|
151
|
-
border-top-right-radius: var(--panels-border-radius);
|
|
152
|
-
border-bottom-right-radius: 0;
|
|
153
|
-
border-bottom-left-radius: 0;
|
|
154
|
-
pointer-events: auto;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.c10 {
|
|
158
|
-
border-top-left-radius: var(--panels-border-radius);
|
|
159
|
-
border-top-right-radius: var(--panels-border-radius);
|
|
160
|
-
border-bottom-right-radius: var(--panels-border-radius);
|
|
161
|
-
border-bottom-left-radius: var(--panels-border-radius);
|
|
162
|
-
background-color: var(--panels-background-color);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.c6 {
|
|
166
|
-
line-height: 1;
|
|
167
|
-
margin-right: 5px;
|
|
168
|
-
font-weight: 700;
|
|
169
|
-
color: var(--color-content);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.c4 {
|
|
173
|
-
display: -webkit-inline-box;
|
|
174
|
-
display: -webkit-inline-flex;
|
|
175
|
-
display: -ms-inline-flexbox;
|
|
176
|
-
display: inline-flex;
|
|
177
|
-
-webkit-align-items: center;
|
|
178
|
-
-webkit-box-align: center;
|
|
179
|
-
-ms-flex-align: center;
|
|
180
|
-
align-items: center;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.c0 {
|
|
184
|
-
border-radius: var(--panels-border-radius);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.c0 .c2 + .c9 {
|
|
188
|
-
border-top-left-radius: 0;
|
|
189
|
-
border-top-right-radius: 0;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.c0:not(:last-child) {
|
|
193
|
-
margin-bottom: 10px;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.c1 > .c2 {
|
|
197
|
-
padding: 10px 20px;
|
|
198
|
-
line-height: 30px;
|
|
199
|
-
z-index: 0;
|
|
200
|
-
background-color: var(--samples-panel-controls-background-color);
|
|
201
|
-
min-height: 50px;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.c1 > .c2 .c7 {
|
|
205
|
-
fill: var(--color-content-inverse);
|
|
206
|
-
position: relative;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.c1 > .c2 .c5 {
|
|
210
|
-
color: var(--color-content-inverse);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.c1.c1 .c9 {
|
|
214
|
-
padding: 10px 20px 20px;
|
|
215
|
-
background-color: var(--samples-panel-background-color);
|
|
216
|
-
color: var(--color-content-inverse);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
<div
|
|
220
|
-
class="c0 c1"
|
|
221
|
-
data-cy="panel-codepanel-header"
|
|
222
|
-
>
|
|
223
|
-
<div
|
|
224
|
-
class="c2 c3"
|
|
225
|
-
data-cy="panel-header"
|
|
226
|
-
>
|
|
227
|
-
<div
|
|
228
|
-
class="c4"
|
|
229
|
-
>
|
|
230
|
-
<span
|
|
231
|
-
class="c5 c6"
|
|
232
|
-
data-cy="title"
|
|
233
|
-
>
|
|
234
|
-
CodePanel header
|
|
235
|
-
</span>
|
|
236
|
-
<svg
|
|
237
|
-
aria-hidden="true"
|
|
238
|
-
class="c7 c8"
|
|
239
|
-
viewBox="0 0 4.25 7"
|
|
240
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
241
|
-
>
|
|
242
|
-
<path
|
|
243
|
-
d="M0.205025 1.19467L3.00503 3.99467C3.27839 4.26804 3.72161 4.26804 3.99497 3.99467C4.26834 3.7213 4.26834 3.27809 3.99497 3.00472L1.19497 0.20472C0.921608 -0.0686469 0.478392 -0.0686469 0.205025 0.20472C-0.0683418 0.478087 -0.0683417 0.921303 0.205025 1.19467Z"
|
|
244
|
-
/>
|
|
245
|
-
<path
|
|
246
|
-
d="M3.00503 3.00501L0.205025 5.80501C-0.0683417 6.07838 -0.0683417 6.5216 0.205025 6.79496C0.478392 7.06833 0.921608 7.06833 1.19497 6.79496L3.99497 3.99496C4.26834 3.7216 4.26834 3.27838 3.99497 3.00501C3.72161 2.73165 3.27839 2.73165 3.00503 3.00501Z"
|
|
247
|
-
/>
|
|
248
|
-
</svg>
|
|
249
|
-
</div>
|
|
250
|
-
</div>
|
|
251
|
-
<div
|
|
252
|
-
class="c9 c10"
|
|
253
|
-
data-cy="panel-body"
|
|
254
|
-
>
|
|
255
|
-
CodePanel body
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
`;
|
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`ContentPanel renders collapsed 1`] = `
|
|
4
|
-
.c8 {
|
|
5
|
-
height: 9px;
|
|
6
|
-
width: 9px;
|
|
7
|
-
-webkit-transform: rotateZ(0deg);
|
|
8
|
-
-ms-transform: rotateZ(0deg);
|
|
9
|
-
transform: rotateZ(0deg);
|
|
10
|
-
fill: inherit;
|
|
11
|
-
vertical-align: middle;
|
|
12
|
-
-webkit-transition: -webkit-transform 0.2s ease-out;
|
|
13
|
-
-webkit-transition: transform 0.2s ease-out;
|
|
14
|
-
transition: transform 0.2s ease-out;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.c3 {
|
|
18
|
-
position: relative;
|
|
19
|
-
z-index: 1;
|
|
20
|
-
display: -webkit-box;
|
|
21
|
-
display: -webkit-flex;
|
|
22
|
-
display: -ms-flexbox;
|
|
23
|
-
display: flex;
|
|
24
|
-
-webkit-align-items: center;
|
|
25
|
-
-webkit-box-align: center;
|
|
26
|
-
-ms-flex-align: center;
|
|
27
|
-
align-items: center;
|
|
28
|
-
-webkit-box-pack: justify;
|
|
29
|
-
-webkit-justify-content: space-between;
|
|
30
|
-
-ms-flex-pack: justify;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
white-space: nowrap;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
border-top-left-radius: var(--panels-border-radius);
|
|
35
|
-
border-top-right-radius: var(--panels-border-radius);
|
|
36
|
-
border-bottom-right-radius: var(--panels-border-radius);
|
|
37
|
-
border-bottom-left-radius: var(--panels-border-radius);
|
|
38
|
-
pointer-events: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.c6 {
|
|
42
|
-
line-height: 1;
|
|
43
|
-
margin-right: 5px;
|
|
44
|
-
font-weight: 700;
|
|
45
|
-
color: var(--color-content);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.c4 {
|
|
49
|
-
display: -webkit-inline-box;
|
|
50
|
-
display: -webkit-inline-flex;
|
|
51
|
-
display: -ms-inline-flexbox;
|
|
52
|
-
display: inline-flex;
|
|
53
|
-
-webkit-align-items: center;
|
|
54
|
-
-webkit-box-align: center;
|
|
55
|
-
-ms-flex-align: center;
|
|
56
|
-
align-items: center;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.c0 {
|
|
60
|
-
border-radius: var(--panels-border-radius);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.c0:not(:last-child) {
|
|
64
|
-
margin-bottom: 10px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.c1 {
|
|
68
|
-
border: 1px solid var(--global-border-color);
|
|
69
|
-
font-size: var(--font-size-base);
|
|
70
|
-
font-weight: var(--font-weight-regular);
|
|
71
|
-
line-height: var(--line-height-base);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.c1:not(:last-child) {
|
|
75
|
-
margin-bottom: 20px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.c1 > .c2 {
|
|
79
|
-
padding: calc(var(--spacing-unit) * 4);
|
|
80
|
-
font-size: 18px;
|
|
81
|
-
font-weight: var(--font-weight-bold);
|
|
82
|
-
background-color: var(--panels-background-color);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.c1 > .c2 .c5 {
|
|
86
|
-
color: var(--color-content);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.c1 > .c2 .c7 {
|
|
90
|
-
fill: var(--color-content);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
<div
|
|
94
|
-
class="c0 c1"
|
|
95
|
-
data-cy="panel-contentpanel-header"
|
|
96
|
-
>
|
|
97
|
-
<div
|
|
98
|
-
class="c2 c3"
|
|
99
|
-
data-cy="panel-header"
|
|
100
|
-
>
|
|
101
|
-
<div
|
|
102
|
-
class="c4"
|
|
103
|
-
>
|
|
104
|
-
<span
|
|
105
|
-
class="c5 c6"
|
|
106
|
-
data-cy="title"
|
|
107
|
-
>
|
|
108
|
-
ContentPanel header
|
|
109
|
-
</span>
|
|
110
|
-
<svg
|
|
111
|
-
aria-hidden="true"
|
|
112
|
-
class="c7 c8"
|
|
113
|
-
viewBox="0 0 4.25 7"
|
|
114
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
115
|
-
>
|
|
116
|
-
<path
|
|
117
|
-
d="M0.205025 1.19467L3.00503 3.99467C3.27839 4.26804 3.72161 4.26804 3.99497 3.99467C4.26834 3.7213 4.26834 3.27809 3.99497 3.00472L1.19497 0.20472C0.921608 -0.0686469 0.478392 -0.0686469 0.205025 0.20472C-0.0683418 0.478087 -0.0683417 0.921303 0.205025 1.19467Z"
|
|
118
|
-
/>
|
|
119
|
-
<path
|
|
120
|
-
d="M3.00503 3.00501L0.205025 5.80501C-0.0683417 6.07838 -0.0683417 6.5216 0.205025 6.79496C0.478392 7.06833 0.921608 7.06833 1.19497 6.79496L3.99497 3.99496C4.26834 3.7216 4.26834 3.27838 3.99497 3.00501C3.72161 2.73165 3.27839 2.73165 3.00503 3.00501Z"
|
|
121
|
-
/>
|
|
122
|
-
</svg>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
`;
|
|
127
|
-
|
|
128
|
-
exports[`ContentPanel renders expanded 1`] = `
|
|
129
|
-
.c8 {
|
|
130
|
-
height: 9px;
|
|
131
|
-
width: 9px;
|
|
132
|
-
-webkit-transform: rotateZ(90deg);
|
|
133
|
-
-ms-transform: rotateZ(90deg);
|
|
134
|
-
transform: rotateZ(90deg);
|
|
135
|
-
fill: inherit;
|
|
136
|
-
vertical-align: middle;
|
|
137
|
-
-webkit-transition: -webkit-transform 0.2s ease-out;
|
|
138
|
-
-webkit-transition: transform 0.2s ease-out;
|
|
139
|
-
transition: transform 0.2s ease-out;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.c3 {
|
|
143
|
-
position: relative;
|
|
144
|
-
z-index: 1;
|
|
145
|
-
display: -webkit-box;
|
|
146
|
-
display: -webkit-flex;
|
|
147
|
-
display: -ms-flexbox;
|
|
148
|
-
display: flex;
|
|
149
|
-
-webkit-align-items: center;
|
|
150
|
-
-webkit-box-align: center;
|
|
151
|
-
-ms-flex-align: center;
|
|
152
|
-
align-items: center;
|
|
153
|
-
-webkit-box-pack: justify;
|
|
154
|
-
-webkit-justify-content: space-between;
|
|
155
|
-
-ms-flex-pack: justify;
|
|
156
|
-
justify-content: space-between;
|
|
157
|
-
white-space: nowrap;
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
border-top-left-radius: var(--panels-border-radius);
|
|
160
|
-
border-top-right-radius: var(--panels-border-radius);
|
|
161
|
-
border-bottom-right-radius: 0;
|
|
162
|
-
border-bottom-left-radius: 0;
|
|
163
|
-
pointer-events: auto;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.c10 {
|
|
167
|
-
border-top-left-radius: var(--panels-border-radius);
|
|
168
|
-
border-top-right-radius: var(--panels-border-radius);
|
|
169
|
-
border-bottom-right-radius: var(--panels-border-radius);
|
|
170
|
-
border-bottom-left-radius: var(--panels-border-radius);
|
|
171
|
-
background-color: var(--panels-background-color);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.c6 {
|
|
175
|
-
line-height: 1;
|
|
176
|
-
margin-right: 5px;
|
|
177
|
-
font-weight: 700;
|
|
178
|
-
color: var(--color-content);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.c4 {
|
|
182
|
-
display: -webkit-inline-box;
|
|
183
|
-
display: -webkit-inline-flex;
|
|
184
|
-
display: -ms-inline-flexbox;
|
|
185
|
-
display: inline-flex;
|
|
186
|
-
-webkit-align-items: center;
|
|
187
|
-
-webkit-box-align: center;
|
|
188
|
-
-ms-flex-align: center;
|
|
189
|
-
align-items: center;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.c0 {
|
|
193
|
-
border-radius: var(--panels-border-radius);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.c0 .c2 + .c9 {
|
|
197
|
-
border-top-left-radius: 0;
|
|
198
|
-
border-top-right-radius: 0;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.c0:not(:last-child) {
|
|
202
|
-
margin-bottom: 10px;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.c1 {
|
|
206
|
-
border: 1px solid var(--global-border-color);
|
|
207
|
-
font-size: var(--font-size-base);
|
|
208
|
-
font-weight: var(--font-weight-regular);
|
|
209
|
-
line-height: var(--line-height-base);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.c1:not(:last-child) {
|
|
213
|
-
margin-bottom: 20px;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.c1 > .c2 {
|
|
217
|
-
padding: calc(var(--spacing-unit) * 4);
|
|
218
|
-
font-size: 18px;
|
|
219
|
-
font-weight: var(--font-weight-bold);
|
|
220
|
-
background-color: var(--panels-background-color);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.c1 > .c2 .c5 {
|
|
224
|
-
color: var(--color-content);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.c1 > .c2 .c7 {
|
|
228
|
-
fill: var(--color-content);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.c1 > .c9 {
|
|
232
|
-
padding: calc(var(--spacing-unit) * 4);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.c1 > .c2 + .c9 {
|
|
236
|
-
padding-top: 1px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
<div
|
|
240
|
-
class="c0 c1"
|
|
241
|
-
data-cy="panel-contentpanel-header"
|
|
242
|
-
>
|
|
243
|
-
<div
|
|
244
|
-
class="c2 c3"
|
|
245
|
-
data-cy="panel-header"
|
|
246
|
-
>
|
|
247
|
-
<div
|
|
248
|
-
class="c4"
|
|
249
|
-
>
|
|
250
|
-
<span
|
|
251
|
-
class="c5 c6"
|
|
252
|
-
data-cy="title"
|
|
253
|
-
>
|
|
254
|
-
ContentPanel header
|
|
255
|
-
</span>
|
|
256
|
-
<svg
|
|
257
|
-
aria-hidden="true"
|
|
258
|
-
class="c7 c8"
|
|
259
|
-
viewBox="0 0 4.25 7"
|
|
260
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
261
|
-
>
|
|
262
|
-
<path
|
|
263
|
-
d="M0.205025 1.19467L3.00503 3.99467C3.27839 4.26804 3.72161 4.26804 3.99497 3.99467C4.26834 3.7213 4.26834 3.27809 3.99497 3.00472L1.19497 0.20472C0.921608 -0.0686469 0.478392 -0.0686469 0.205025 0.20472C-0.0683418 0.478087 -0.0683417 0.921303 0.205025 1.19467Z"
|
|
264
|
-
/>
|
|
265
|
-
<path
|
|
266
|
-
d="M3.00503 3.00501L0.205025 5.80501C-0.0683417 6.07838 -0.0683417 6.5216 0.205025 6.79496C0.478392 7.06833 0.921608 7.06833 1.19497 6.79496L3.99497 3.99496C4.26834 3.7216 4.26834 3.27838 3.99497 3.00501C3.72161 2.73165 3.27839 2.73165 3.00503 3.00501Z"
|
|
267
|
-
/>
|
|
268
|
-
</svg>
|
|
269
|
-
</div>
|
|
270
|
-
</div>
|
|
271
|
-
<div
|
|
272
|
-
class="c9 c10"
|
|
273
|
-
data-cy="panel-body"
|
|
274
|
-
>
|
|
275
|
-
ContentPanel body
|
|
276
|
-
</div>
|
|
277
|
-
</div>
|
|
278
|
-
`;
|