@redocly/theme 0.1.11 → 0.1.12
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/Search/ClearIcon.js +1 -1
- package/Search/Input.js +1 -1
- package/Search/Popover.js +1 -1
- package/Search/SearchIcon.js +1 -1
- package/Sidebar/ApiCallItem.js +1 -1
- package/globalStyle.js +24 -6
- package/mocks/Link.js +1 -1
- package/package.json +1 -1
- package/src/Search/ClearIcon.tsx +1 -1
- package/src/Search/Input.tsx +7 -7
- package/src/Search/Popover.tsx +2 -2
- package/src/Search/SearchIcon.tsx +1 -1
- package/src/Sidebar/ApiCallItem.tsx +1 -2
- package/src/globalStyle.ts +624 -461
- package/src/mocks/Link.tsx +1 -1
- package/src/ui/Typography.tsx +8 -8
- package/src/ui/UniversalLink.tsx +3 -8
- package/src/utils/isUrl.ts +4 -4
- package/ui/Typography.js +8 -8
- package/ui/UniversalLink.js +1 -5
- package/utils/isUrl.d.ts +2 -2
- package/utils/isUrl.js +4 -4
- 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/DesignTokens/borders.stories.mdx +0 -20
- package/src/DesignTokens/colors.stories.mdx +0 -24
- package/src/DesignTokens/page-layout.stories.mdx +0 -12
- package/src/DesignTokens/tokens-generated.scss +0 -610
- package/src/DesignTokens/typography.stories.mdx +0 -36
- 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/Navbar/Navbar.stories.tsx +0 -32
- package/src/Navbar/__tests__/Navbar.test.tsx +0 -55
- package/src/Navbar/__tests__/__snapshots__/Navbar.test.tsx.snap +0 -256
- 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/PageNavigation/PageNavigation.stories.tsx +0 -21
- package/src/PageNavigation/__tests__/NextPageLink.test.tsx +0 -29
- package/src/PageNavigation/__tests__/PageNavigation.test.tsx +0 -54
- package/src/PageNavigation/__tests__/PreviousPageLink.test.tsx +0 -29
- package/src/PageNavigation/__tests__/__snapshots__/NextPageLink.test.tsx.snap +0 -67
- package/src/PageNavigation/__tests__/__snapshots__/PageNavigation.test.tsx.snap +0 -275
- package/src/PageNavigation/__tests__/__snapshots__/PreviousPageLink.test.tsx.snap +0 -67
- 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/Search/__tests__/Input.test.tsx +0 -13
- package/src/Search/__tests__/__snapshots__/Input.test.tsx.snap +0 -36
- 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 -37
- package/src/TableOfContent/__tests__/TableOfContent.test.tsx +0 -61
- package/src/TableOfContent/__tests__/__snapshots__/TableOfContent.test.tsx.snap +0 -153
- 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
package/src/globalStyle.ts
CHANGED
|
@@ -77,7 +77,49 @@ const baseColors = css`
|
|
|
77
77
|
--color-error-800: #ff1414;
|
|
78
78
|
--color-error-900: #ff0000;
|
|
79
79
|
|
|
80
|
-
// @tokens
|
|
80
|
+
// @tokens End
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
const httpColors = css`
|
|
84
|
+
/**
|
|
85
|
+
* @tokens HTTP Colors
|
|
86
|
+
* @presenter Color
|
|
87
|
+
*/
|
|
88
|
+
--color-http-get: #3a9601;
|
|
89
|
+
--color-http-post: #0065fb;
|
|
90
|
+
--color-http-put: #93527b;
|
|
91
|
+
--color-http-options: #947014;
|
|
92
|
+
--color-http-patch: #bf581d;
|
|
93
|
+
--color-http-delete: #c83637;
|
|
94
|
+
--color-http-basic: #707070;
|
|
95
|
+
--color-http-link: #07818f;
|
|
96
|
+
--color-http-head: #a23dad;
|
|
97
|
+
--color-http-hook: var(--color-http-post);
|
|
98
|
+
// @tokens End
|
|
99
|
+
`;
|
|
100
|
+
|
|
101
|
+
const responseColors = css`
|
|
102
|
+
/**
|
|
103
|
+
* @tokens Response colors
|
|
104
|
+
* @presenter Color
|
|
105
|
+
*/
|
|
106
|
+
--response-success-border-color: #b1e996;
|
|
107
|
+
--response-success-background-color: #f6fff4;
|
|
108
|
+
--response-success-text-color: var(--response-success-border-color);
|
|
109
|
+
|
|
110
|
+
--response-error-border-color: #ffc9c9;
|
|
111
|
+
--response-error-background-color: #fff4f4;
|
|
112
|
+
--response-error-text-color: var(--response-error-border-color);
|
|
113
|
+
|
|
114
|
+
--response-redirect-border-color: var(--color-warning-500);
|
|
115
|
+
--response-redirect-background-color: #ffa5001a;
|
|
116
|
+
--response-redirect-text-color: var(--response-redirect-border-color);
|
|
117
|
+
|
|
118
|
+
--response-info-border-color: #87ceeb;
|
|
119
|
+
--response-info-background-color: #87ceeb1a;
|
|
120
|
+
--response-info-text-color: var(--response-info-border-color);
|
|
121
|
+
|
|
122
|
+
// @tokens End
|
|
81
123
|
`;
|
|
82
124
|
|
|
83
125
|
const typography = css`
|
|
@@ -125,6 +167,7 @@ const typography = css`
|
|
|
125
167
|
--smoothing: antialiased; // text-smoothing
|
|
126
168
|
--text-rendering: optimizeSpeed; // text-rendering
|
|
127
169
|
|
|
170
|
+
// TODO: Not sure if Spacing should be in typography
|
|
128
171
|
/**
|
|
129
172
|
* @tokens Spacings
|
|
130
173
|
* @presenter Spacing
|
|
@@ -133,7 +176,58 @@ const typography = css`
|
|
|
133
176
|
--spacing-horizontal: calc(var(--spacing-unit) * 8);
|
|
134
177
|
--spacing-vertical: calc(var(--spacing-unit) * 4);
|
|
135
178
|
|
|
136
|
-
// @tokens
|
|
179
|
+
// @tokens End
|
|
180
|
+
`;
|
|
181
|
+
|
|
182
|
+
const headingsTypography = css`
|
|
183
|
+
// --h-{css-property-name} is fallback for h1...h6
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @tokens Typography headings font
|
|
187
|
+
*/
|
|
188
|
+
--h-font-family: Source Sans Pro, sans-serif; // @presenter FontFamily
|
|
189
|
+
--h-font-weight: var(--font-weight-bolder); // @presenter FontWeight
|
|
190
|
+
--h2-font-weight: var(--font-weight-bold); // @presenter FontWeight
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @tokens Typography headings color
|
|
194
|
+
* @presenter Color
|
|
195
|
+
*/
|
|
196
|
+
--h-color: var(--color-content);
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @tokens Typography headings font size
|
|
200
|
+
* @presenter FontSize
|
|
201
|
+
*/
|
|
202
|
+
--h1-font-size: 36px;
|
|
203
|
+
--h2-font-size: 28px;
|
|
204
|
+
--h3-font-size: 18px;
|
|
205
|
+
--h4-font-size: 16px;
|
|
206
|
+
--h5-font-size: 14px;
|
|
207
|
+
--h6-font-size: 12px;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @tokens Typography headings line height
|
|
211
|
+
* @presenter LineHeight
|
|
212
|
+
*/
|
|
213
|
+
--h1-line-height: 36px;
|
|
214
|
+
--h2-line-height: 28px;
|
|
215
|
+
--h3-line-height: 18px;
|
|
216
|
+
--h4-line-height: 16px;
|
|
217
|
+
--h5-line-height: 14px;
|
|
218
|
+
--h6-line-height: 12px;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @tokens Typography headings margin
|
|
222
|
+
* @presenter Spacing
|
|
223
|
+
*/
|
|
224
|
+
--h1-margin-top: 1.35em;
|
|
225
|
+
--h1-margin-bottom: 0.9em;
|
|
226
|
+
--h2-margin-top: 1.25em;
|
|
227
|
+
--h2-margin-bottom: 0.8em;
|
|
228
|
+
--h3-margin-top: 1.25em;
|
|
229
|
+
--h3-margin-bottom: 0.8em;
|
|
230
|
+
// @tokens End
|
|
137
231
|
`;
|
|
138
232
|
|
|
139
233
|
const borders = css`
|
|
@@ -157,479 +251,548 @@ const borders = css`
|
|
|
157
251
|
--global-border-color-secondary: #616e7c;
|
|
158
252
|
--global-background-color: transparent;
|
|
159
253
|
|
|
160
|
-
// @tokens
|
|
254
|
+
// @tokens End
|
|
161
255
|
`;
|
|
162
256
|
|
|
163
|
-
|
|
257
|
+
const buttons = css`
|
|
164
258
|
/*
|
|
165
259
|
* Static classnames that can be used to override styles for components:
|
|
166
260
|
* download-specification-button, next-section-button, button-base
|
|
167
261
|
*/
|
|
168
|
-
:root {
|
|
169
|
-
${baseColors}
|
|
170
|
-
${typography}
|
|
171
|
-
${borders}
|
|
172
262
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
/* === Navbar === */
|
|
176
|
-
//--navbar-height:
|
|
177
|
-
//TBD
|
|
178
|
-
|
|
179
|
-
/* === Menu (sidebar) === */
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* @tokens Sidebar
|
|
183
|
-
*/
|
|
184
|
-
--sidebar-width: 285px;
|
|
185
|
-
--sidebar-background-color: #fff; // @presenter Color
|
|
186
|
-
--sidebar-right-line-color: var(--global-border-color); // @presenter Color
|
|
187
|
-
--sidebar-spacing-unit: 8px; // @presenter Spacing
|
|
188
|
-
--sidebar-spacing-horizontal: var(--sidebar-spacing-unit); // @presenter Spacing
|
|
189
|
-
--sidebar-spacing-vertical: var(--sidebar-spacing-unit); // @presenter Spacing
|
|
190
|
-
|
|
191
|
-
--sidebar-margin-left: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
|
|
192
|
-
--sidebar-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
|
|
193
|
-
--sidebar-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
|
|
194
|
-
--sidebar-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
|
|
195
|
-
|
|
196
|
-
--sidebar-word-break: 'inherit';
|
|
197
|
-
--sidebar-separator-label-color: var(--sidebar-item-color); // @presenter Color
|
|
198
|
-
--sidebar-separator-line-color: #dadada; // @presenter Color
|
|
199
|
-
--sidebar-chevron-color: var(--sidebar-item-color); // @presenter Color
|
|
200
|
-
--sidebar-chevron-size: var(--sidebar-spacing-unit); // @presenter Spacing
|
|
201
|
-
|
|
202
|
-
--sidebar-item-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
|
|
203
|
-
--sidebar-item-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
|
|
204
|
-
--sidebar-item-spacing-offset-nesting: calc(
|
|
205
|
-
var(--sidebar-spacing-unit) * 2
|
|
206
|
-
); // @presenter Spacing
|
|
207
|
-
--sidebar-item-border-radius: 4px; // @presenter BorderRadius
|
|
208
|
-
--sidebar-item-font-family: var(--font-family-base); // @presenter FontFamily
|
|
209
|
-
--sidebar-item-font-size: var(--font-size-base); // @presenter FontSize
|
|
210
|
-
--sidebar-item-color: var(--color-content); // @presenter Color
|
|
211
|
-
--sidebar-item-active-color: var(--color-content); // @presenter Color
|
|
212
|
-
--sidebar-item-background-color: #fff; // @presenter Color
|
|
213
|
-
--sidebar-item-active-background-color: var(--global-border-color); // @presenter Color
|
|
214
|
-
|
|
215
|
-
//TBD
|
|
216
|
-
/* === Footer === */
|
|
217
|
-
//TBD
|
|
218
|
-
/* === Table of contents === */
|
|
219
|
-
//TBD
|
|
220
|
-
|
|
221
|
-
// @tokens Other
|
|
222
|
-
|
|
223
|
-
/* === Various components: buttons, inputs, alerts, tooltip === */
|
|
224
|
-
|
|
225
|
-
/*
|
|
226
|
-
* Buttons
|
|
227
|
-
*/
|
|
228
|
-
--button-color: white;
|
|
229
|
-
--button-background-color: var(--color-emphasis-500);
|
|
230
|
-
--button-hover-background-color: var(--color-emphasis-600);
|
|
231
|
-
--button-active-background-color: var(--color-emphasis-700);
|
|
232
|
-
--button-outlined-active-border-color: var(--color-emphasis-800);
|
|
233
|
-
--button-border-radius: var(--global-border-radius);
|
|
234
|
-
--button-font-family: inherit;
|
|
235
|
-
--button-font-weight: var(--font-weight-bold);
|
|
236
|
-
--button-box-shadow: none;
|
|
237
|
-
--button-active-box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
|
|
238
|
-
|
|
239
|
-
.button-color-primary {
|
|
240
|
-
--button-color: white;
|
|
241
|
-
--button-background-color: var(--color-primary-500);
|
|
242
|
-
--button-hover-background-color: var(--color-primary-600);
|
|
243
|
-
--button-active-background-color: var(--color-primary-700);
|
|
244
|
-
--button-outlined-active-border-color: var(--color-primary-800);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.button-color-secondary {
|
|
248
|
-
--button-color: var(--color-emphasis-800);
|
|
249
|
-
--button-background-color: var(--color-secondary-400);
|
|
250
|
-
--button-hover-background-color: var(--color-secondary-500);
|
|
251
|
-
--button-active-background-color: var(--color-secondary-600);
|
|
252
|
-
--button-outlined-active-border-color: var(--color-secondary-700);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
--button-small-font-size: 12px;
|
|
256
|
-
--button-small-padding: 8px 10px;
|
|
257
|
-
--button-small-min-width: 90px;
|
|
258
|
-
--button-medium-font-size: 14px;
|
|
259
|
-
--button-medium-padding: 8px 20px;
|
|
260
|
-
--button-medium-min-width: 120px;
|
|
261
|
-
--button-large-font-size: 14px;
|
|
262
|
-
--button-large-padding: 12px 24px;
|
|
263
|
-
--button-large-min-width: 150px;
|
|
264
|
-
--button-xlarge-font-size: 16px;
|
|
265
|
-
--button-xlarge-padding: 20px 24px;
|
|
266
|
-
--button-xlarge-min-width: 200px;
|
|
267
|
-
|
|
268
|
-
/*
|
|
269
|
-
* Tooltip
|
|
270
|
-
*/
|
|
271
|
-
--tooltip-color: var(--color-secondary-300);
|
|
272
|
-
--tooltip-background-color: #52606d;
|
|
273
|
-
|
|
274
|
-
.tooltip-copy-button {
|
|
275
|
-
--tooltip-color: #000;
|
|
276
|
-
--tooltip-background-color: #fff;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/* === Markdown/Page content (tables, inline code, blockquotes) === */
|
|
280
|
-
|
|
281
|
-
/*
|
|
282
|
-
* Headings
|
|
283
|
-
* --h-{css-property-name} is fallback for h1...h6
|
|
284
|
-
*/
|
|
285
|
-
--h-font-family: Source Sans Pro, sans-serif;
|
|
286
|
-
--h-font-weight: var(--font-weight-bolder);
|
|
287
|
-
--h-color: var(--color-content);
|
|
288
|
-
|
|
289
|
-
--h1-font-size: 36px;
|
|
290
|
-
--h2-font-size: 28px;
|
|
291
|
-
--h3-font-size: 18px;
|
|
292
|
-
--h4-font-size: 16px;
|
|
293
|
-
--h5-font-size: 14px;
|
|
294
|
-
--h6-font-size: 12px;
|
|
295
|
-
|
|
296
|
-
--h1-line-height: 36px;
|
|
297
|
-
--h2-line-height: 28px;
|
|
298
|
-
--h3-line-height: 18px;
|
|
299
|
-
--h4-line-height: 16px;
|
|
300
|
-
--h5-line-height: 14px;
|
|
301
|
-
--h6-line-height: 12px;
|
|
302
|
-
|
|
303
|
-
--code-font-size: 13px;
|
|
304
|
-
--code-font-family: var(--font-family-monospaced);
|
|
305
|
-
--code-font-weight: 400;
|
|
306
|
-
--code-wrap: pre;
|
|
307
|
-
|
|
308
|
-
--inline-code-font-size: var(--code-font-size);
|
|
309
|
-
--inline-code-font-family: var(--code-font-family);
|
|
310
|
-
--inline-code-color: #e53935;
|
|
311
|
-
--inline-code-background-color: var(--color-secondary-200);
|
|
312
|
-
--inline-code-border-color: var(--global-border-color);
|
|
313
|
-
--inline-code-border-radius: var(--global-border-radius);
|
|
314
|
-
|
|
315
|
-
--code-block-font-size: var(--code-font-size);
|
|
316
|
-
--code-block-font-family: var(--code-font-family);
|
|
317
|
-
--code-block-color: #f1928f;
|
|
318
|
-
--code-block-background-color: rgba(217, 205, 199, 0.05);
|
|
319
|
-
--code-block-border-color: var(--global-border-color);
|
|
320
|
-
--code-block-border-radius: 8px;
|
|
321
|
-
--code-block-max-height: 600px;
|
|
322
|
-
--code-block-word-break: initial;
|
|
323
|
-
--code-block-preformatted-background-color: #323f4b;
|
|
324
|
-
|
|
325
|
-
/*
|
|
326
|
-
* Links
|
|
327
|
-
*/
|
|
328
|
-
--link-color: var(--color-primary-500);
|
|
329
|
-
--link-decoration: none;
|
|
330
|
-
--link-hover-color: var(--color-primary-100);
|
|
331
|
-
--link-hover-decoration: underline;
|
|
332
|
-
|
|
333
|
-
/* === ref docs and graphql docs specific === */
|
|
334
|
-
/*
|
|
335
|
-
* Logo
|
|
336
|
-
*/
|
|
337
|
-
--logo-max-height: 285px;
|
|
338
|
-
--logo-max-width: 285px;
|
|
339
|
-
--logo-padding: 2px;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* @tokens HTTP Colors
|
|
343
|
-
* @presenter Color
|
|
263
|
+
/**
|
|
264
|
+
* @tokens Button default colors
|
|
344
265
|
*/
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
266
|
+
--button-color: white; // @presenter Color
|
|
267
|
+
--button-background-color: var(--color-emphasis-500); // @presenter Color
|
|
268
|
+
--button-hover-background-color: var(--color-emphasis-600); // @presenter Color
|
|
269
|
+
--button-active-background-color: var(--color-emphasis-700); // @presenter Color
|
|
270
|
+
--button-outlined-active-border-color: var(--color-emphasis-800); // @presenter Color
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @tokens Button primary colors
|
|
274
|
+
*/
|
|
275
|
+
.button-color-primary {
|
|
276
|
+
--button-color: white; // @presenter Color
|
|
277
|
+
--button-background-color: var(--color-primary-500); // @presenter Color
|
|
278
|
+
--button-hover-background-color: var(--color-primary-600); // @presenter Color
|
|
279
|
+
--button-active-background-color: var(--color-primary-700); // @presenter Color
|
|
280
|
+
--button-outlined-active-border-color: var(--color-primary-800); // @presenter Color
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @tokens Button secondary colors
|
|
285
|
+
*/
|
|
286
|
+
.button-color-secondary {
|
|
287
|
+
--button-color: var(--color-emphasis-800); // @presenter Color
|
|
288
|
+
--button-background-color: var(--color-secondary-400); // @presenter Color
|
|
289
|
+
--button-hover-background-color: var(--color-secondary-500); // @presenter Color
|
|
290
|
+
--button-active-background-color: var(--color-secondary-600); // @presenter Color
|
|
291
|
+
--button-outlined-active-border-color: var(--color-secondary-700); // @presenter Color
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @tokens Button borders
|
|
296
|
+
*/
|
|
297
|
+
--button-border-radius: var(--global-border-radius); // @presenter BorderRadius
|
|
298
|
+
--button-box-shadow: none; // @presenter Shadow
|
|
299
|
+
--button-active-box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1); // @presenter Shadow
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @tokens Button typography
|
|
303
|
+
*/
|
|
304
|
+
--button-font-family: inherit; // @presenter FontFamily
|
|
305
|
+
--button-font-weight: var(--font-weight-bold); // @presenter FontWeight
|
|
306
|
+
--button-small-font-size: 12px; // @presenter FontSize
|
|
307
|
+
--button-small-padding: 8px 10px;
|
|
308
|
+
--button-small-min-width: 90px; // @presenter Spacing
|
|
309
|
+
--button-medium-font-size: 14px; // @presenter FontSize
|
|
310
|
+
--button-medium-padding: 8px 20px;
|
|
311
|
+
--button-medium-min-width: 120px; // @presenter Spacing
|
|
312
|
+
--button-large-font-size: 14px; // @presenter FontSize
|
|
313
|
+
--button-large-padding: 12px 24px;
|
|
314
|
+
--button-large-min-width: 150px; // @presenter Spacing
|
|
315
|
+
--button-xlarge-font-size: 16px; // @presenter FontSize
|
|
316
|
+
--button-xlarge-padding: 20px 24px;
|
|
317
|
+
--button-xlarge-min-width: 200px; // @presenter Spacing
|
|
318
|
+
|
|
319
|
+
// @tokens End
|
|
320
|
+
`;
|
|
321
|
+
|
|
322
|
+
const sidebar = css`
|
|
323
|
+
/* === Sidebar === */
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* @tokens Sidebar typography
|
|
327
|
+
*/
|
|
328
|
+
--sidebar-font-size: var(--font-size-base);
|
|
329
|
+
--sidebar-font-family: var(--font-family-base);
|
|
330
|
+
--sidebar-word-break: 'inherit';
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @tokens Sidebar colors
|
|
358
334
|
* @presenter Color
|
|
359
335
|
*/
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
* Schema
|
|
428
|
-
*/
|
|
429
|
-
--schema-lines-color: var(--global-border-color);
|
|
430
|
-
--schema-default-details-width: 70%;
|
|
431
|
-
--schema-type-name-color: var(--color-content-secondary);
|
|
432
|
-
--schema-type-title-color: var(--color-content-secondary);
|
|
433
|
-
--schema-require-label-color: var(--color-error-900);
|
|
434
|
-
--schema-labels-text-size: 0.9em;
|
|
435
|
-
--schema-nesting-spacing: 1em;
|
|
436
|
-
--schema-nested-background-color: var(--color-secondary-200);
|
|
437
|
-
--schema-chevron-color: var(--color-content);
|
|
438
|
-
--schema-chevron-size: 9px;
|
|
439
|
-
|
|
440
|
-
--schema-controls-color: var(--color-emphasis-800);
|
|
441
|
-
--schema-controls-background-color: var(--color-secondary-400);
|
|
442
|
-
--schema-controls-hover-background-color: var(--color-secondary-500);
|
|
443
|
-
--schema-controls-border-color: var(--color-secondary-600);
|
|
444
|
-
|
|
445
|
-
--field-name-font-size: var(--code-font-size);
|
|
446
|
-
--field-name-font-family: var(--code-font-family);
|
|
447
|
-
--field-example-color: var(--color-content);
|
|
448
|
-
--field-example-background-color: var(--inline-code-background-color);
|
|
449
|
-
--field-constraint-color: var(--color-content);
|
|
450
|
-
--field-constraint-background-color: var(--inline-code-background-color);
|
|
451
|
-
|
|
452
|
-
/*
|
|
453
|
-
* Search
|
|
454
|
-
*/
|
|
455
|
-
--search-input-border-bottom: #e6e6e6;
|
|
456
|
-
--search-results-background-color: #f2f2f2;
|
|
457
|
-
--search-results-active-item-background-color: #e6e6e6;
|
|
458
|
-
--search-marked-background-color: #ffff03;
|
|
459
|
-
--search-popup-header-background-color: var(--color-secondary-200);
|
|
460
|
-
--search-clear-button-background-color: var(--color-secondary-400);
|
|
461
|
-
--search-clear-button-hover-background-color: var(--color-secondary-600);
|
|
462
|
-
|
|
463
|
-
/*
|
|
464
|
-
* Other
|
|
465
|
-
*/
|
|
466
|
-
--badge-color: var(--color-emphasis-100);
|
|
467
|
-
--badge-background-color: var(--color-primary-500);
|
|
468
|
-
--deprecated-badge-color: var(--color-emphasis-100);
|
|
469
|
-
--deprecated-badge-background-color: var(--color-warning-500);
|
|
470
|
-
|
|
471
|
-
--recursive-label-color: var(--color-warning-500);
|
|
472
|
-
|
|
473
|
-
--http-badge-font-size: 12px;
|
|
474
|
-
--http-badge-line-height: 20px;
|
|
475
|
-
--http-badge-font-family: var(--code-font-family);
|
|
476
|
-
--http-badge-font-weight: var(--font-weight-bold);
|
|
477
|
-
--http-badge-border-radius: 16px;
|
|
478
|
-
--http-badge-color: var(--color-content-inverse);
|
|
479
|
-
|
|
480
|
-
--http-badge-menu-font-size: 8px;
|
|
481
|
-
--http-badge-menu-line-height: 14px;
|
|
482
|
-
|
|
483
|
-
--spinner-color: var(--color-primary-500);
|
|
484
|
-
|
|
485
|
-
--linear-progress-color: var(--color-accent-500);
|
|
486
|
-
--linear-progress-background-color: var(--color-accent-100);
|
|
487
|
-
|
|
488
|
-
/* Floating action button */
|
|
489
|
-
--fab-color: #0065fb;
|
|
490
|
-
--fab-background-color: #f2f2f2;
|
|
491
|
-
|
|
492
|
-
//* PORTAL settings *//
|
|
493
|
-
/**
|
|
494
|
-
* Headings
|
|
495
|
-
* */
|
|
496
|
-
--h2-font-weight: var(--font-weight-bold);
|
|
497
|
-
|
|
498
|
-
--h1-margin-top: 1.35em;
|
|
499
|
-
--h1-margin-bottom: 0.9em;
|
|
500
|
-
--h2-margin-top: 1.25em;
|
|
501
|
-
--h2-margin-bottom: 0.8em;
|
|
502
|
-
--h3-margin-top: 1.25em;
|
|
503
|
-
--h3-margin-bottom: 0.8em;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Footer
|
|
507
|
-
* */
|
|
508
|
-
--footer-background-color: var(--color-primary-500);
|
|
509
|
-
--footer-text-color: #fff;
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Sidebar
|
|
513
|
-
* */
|
|
514
|
-
--sidebar-padding-horizontal: var(--sidebar-spacing-unit);
|
|
515
|
-
--sidebar-padding-vertical: var(--sidebar-spacing-unit);
|
|
516
|
-
|
|
517
|
-
--sidebar-spacing-padding-vertical: var(--sidebar-spacing-unit);
|
|
518
|
-
--sidebar-spacing-padding-horizontal: var(--sidebar-spacing-unit);
|
|
519
|
-
|
|
520
|
-
--sidebar-border-radius: 4px;
|
|
521
|
-
--sidebar-font-size: var(--font-size-base);
|
|
522
|
-
--sidebar-font-family: var(--font-family-base);
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Logo
|
|
526
|
-
* */
|
|
527
|
-
--logo-height: 2rem;
|
|
528
|
-
--logo-margin: var(--sidebar-margin-left);
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* Navbar
|
|
532
|
-
* */
|
|
533
|
-
--navbar-height: 60px;
|
|
534
|
-
--navbar-text-color: #fff;
|
|
535
|
-
--navbar-background-color: var(--color-primary-500);
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* Navbar Item
|
|
539
|
-
* */
|
|
540
|
-
--navbar-item-font-size: 16px;
|
|
541
|
-
--navbar-item-margin-horizontal: 0;
|
|
542
|
-
--navbar-item-margin-vertical: 0;
|
|
543
|
-
--navbar-item-border-radius: 10px;
|
|
544
|
-
--navbar-item-font-weight: var(--font-weight-bold);
|
|
545
|
-
--navbar-item-active-background-color: #1b75fa;
|
|
546
|
-
--navbar-item-active-text-color: var(--navbar-text-color);
|
|
547
|
-
--navbar-item-active-text-decoration: none;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* TOC
|
|
551
|
-
* */
|
|
552
|
-
--toc-width: 240px;
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* Markdown
|
|
556
|
-
* */
|
|
557
|
-
--content-wrapper-max-width: 910px;
|
|
558
|
-
--content-wrapper-padding-vertical: 25px;
|
|
559
|
-
--content-wrapper-padding-horizontal: 0px;
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* Bloquote
|
|
563
|
-
* */
|
|
564
|
-
--bloquote-margin-vertical: 1.5em;
|
|
565
|
-
--bloquote-margin-horizontal: 0;
|
|
566
|
-
--bloquote-padding-vertical: 0;
|
|
567
|
-
--bloquote-padding-horizontal: calc(var(--spacing-unit) * 4);
|
|
568
|
-
--bloquote-background-color: transparent;
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* Admonition
|
|
572
|
-
* */
|
|
573
|
-
--admonition-margin-horizontal: 0;
|
|
574
|
-
--admonition-margin-vertical: calc(var(--spacing-unit) * 2);
|
|
575
|
-
--admonition-padding-horizontal: calc(var(--spacing-unit) * 4);
|
|
576
|
-
--admonition-padding-vertical: calc(var(--spacing-unit) * 4);
|
|
577
|
-
--admonition-icon-size: 25px;
|
|
578
|
-
--admonition-border-radius: 8px;
|
|
579
|
-
--admonition-font-size: 16px;
|
|
580
|
-
--admonition-font-weight: normal;
|
|
581
|
-
--admonition-line-height: 1.5em;
|
|
582
|
-
--admonition-heading-font-size: 16px;
|
|
583
|
-
--admonition-heading-font-weight: var(--font-weight-bold);
|
|
584
|
-
--admonition-heading-letter-spacing: 0.3px;
|
|
585
|
-
--admonition-heading-transform: uppercase;
|
|
586
|
-
|
|
587
|
-
/**
|
|
336
|
+
--sidebar-background-color: #fff;
|
|
337
|
+
--sidebar-right-line-color: var(--global-border-color);
|
|
338
|
+
--sidebar-separator-label-color: var(--sidebar-item-color);
|
|
339
|
+
--sidebar-separator-line-color: #dadada;
|
|
340
|
+
--sidebar-chevron-color: var(--sidebar-item-color);
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @tokens Sidebar spacing
|
|
344
|
+
* @presenter Spacing
|
|
345
|
+
*/
|
|
346
|
+
--sidebar-width: 285px; // @presenter NO
|
|
347
|
+
|
|
348
|
+
--sidebar-spacing-unit: 8px;
|
|
349
|
+
--sidebar-spacing-horizontal: var(--sidebar-spacing-unit);
|
|
350
|
+
--sidebar-spacing-vertical: var(--sidebar-spacing-unit);
|
|
351
|
+
--sidebar-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2);
|
|
352
|
+
--sidebar-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2);
|
|
353
|
+
--sidebar-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2);
|
|
354
|
+
|
|
355
|
+
--sidebar-margin-left: calc(var(--sidebar-spacing-unit) * 2);
|
|
356
|
+
--sidebar-padding-horizontal: var(--sidebar-spacing-unit);
|
|
357
|
+
--sidebar-padding-vertical: var(--sidebar-spacing-unit);
|
|
358
|
+
--sidebar-spacing-padding-vertical: var(--sidebar-spacing-unit); // TODO: seems like duplicated
|
|
359
|
+
--sidebar-spacing-padding-horizontal: var(--sidebar-spacing-unit); // TODO: seems like duplicated
|
|
360
|
+
|
|
361
|
+
--sidebar-chevron-size: var(--sidebar-spacing-unit);
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* @tokens Sidebar border
|
|
365
|
+
*/
|
|
366
|
+
--sidebar-border-radius: 4px; // @presenter BorderRadius
|
|
367
|
+
|
|
368
|
+
/* === Sidebar Item === */
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* @tokens Sidebar item typography
|
|
372
|
+
*/
|
|
373
|
+
--sidebar-item-font-family: var(--font-family-base); // @presenter FontFamily
|
|
374
|
+
--sidebar-item-font-size: var(--font-size-base); // @presenter FontSize
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* @tokens Sidebar item colors
|
|
378
|
+
* @presenter Color
|
|
379
|
+
*/
|
|
380
|
+
--sidebar-item-color: var(--color-content);
|
|
381
|
+
--sidebar-item-active-color: var(--color-content);
|
|
382
|
+
--sidebar-item-background-color: #fff;
|
|
383
|
+
--sidebar-item-active-background-color: var(--global-border-color);
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* @tokens Sidebar item spacing
|
|
387
|
+
* @presenter Spacing
|
|
388
|
+
*/
|
|
389
|
+
--sidebar-item-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2);
|
|
390
|
+
--sidebar-item-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2);
|
|
391
|
+
--sidebar-item-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2);
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @tokens Sidebar item border
|
|
395
|
+
*/
|
|
396
|
+
--sidebar-item-border-radius: 4px; // @presenter BorderRadius
|
|
397
|
+
|
|
398
|
+
// @tokens End
|
|
399
|
+
`;
|
|
400
|
+
|
|
401
|
+
const admonition = css`
|
|
402
|
+
/**
|
|
588
403
|
* @tokens Admonition colors
|
|
589
404
|
* @presenter Color
|
|
590
405
|
*/
|
|
591
406
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
*
|
|
619
|
-
*/
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
407
|
+
/* info */
|
|
408
|
+
--admonition-info-background-color: #ebedf0;
|
|
409
|
+
--admonition-info-text-color: var(--color-content);
|
|
410
|
+
--admonition-info-icon-color: #4782cb;
|
|
411
|
+
|
|
412
|
+
/* attention */
|
|
413
|
+
--admonition-attention-background-color: #e6eef8;
|
|
414
|
+
--admonition-attention-text-color: var(--color-content);
|
|
415
|
+
--admonition-attention-icon-color: #4782cb;
|
|
416
|
+
|
|
417
|
+
/* warning */
|
|
418
|
+
--admonition-warning-background-color: #feeda5;
|
|
419
|
+
--admonition-warning-text-color: var(--color-content);
|
|
420
|
+
--admonition-warning-icon-color: #d4ad03;
|
|
421
|
+
|
|
422
|
+
/* danger */
|
|
423
|
+
--admonition-danger-background-color: #fceaea;
|
|
424
|
+
--admonition-danger-text-color: var(--color-content);
|
|
425
|
+
--admonition-danger-icon-color: #e53935;
|
|
426
|
+
|
|
427
|
+
/* success */
|
|
428
|
+
--admonition-success-background-color: #ddffe1;
|
|
429
|
+
--admonition-success-text-color: var(--color-content);
|
|
430
|
+
--admonition-success-icon-color: #00aa13;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* @tokens Admonition typography
|
|
434
|
+
*/
|
|
435
|
+
--admonition-font-size: 16px; // @presenter FontSize
|
|
436
|
+
--admonition-font-weight: normal; // @presenter FontWeight
|
|
437
|
+
--admonition-line-height: 1.5em; // @presenter LineHeight
|
|
438
|
+
--admonition-heading-font-size: 16px; // @presenter FontSize
|
|
439
|
+
--admonition-heading-font-weight: var(--font-weight-bold); // @presenter FontWeight
|
|
440
|
+
--admonition-heading-letter-spacing: 0.3px; // @presenter LetterSpacing
|
|
441
|
+
--admonition-heading-transform: uppercase;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* @tokens Admonition spacing
|
|
445
|
+
* @presenter Spacing
|
|
446
|
+
*/
|
|
447
|
+
--admonition-margin-horizontal: 0;
|
|
448
|
+
--admonition-margin-vertical: calc(var(--spacing-unit) * 2);
|
|
449
|
+
--admonition-padding-horizontal: calc(var(--spacing-unit) * 4);
|
|
450
|
+
--admonition-padding-vertical: calc(var(--spacing-unit) * 4);
|
|
451
|
+
--admonition-icon-size: 25px;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* @tokens Admonition border
|
|
455
|
+
*/
|
|
456
|
+
--admonition-border-radius: 8px; // @presenter BorderRadius
|
|
457
|
+
|
|
458
|
+
// @tokens End
|
|
459
|
+
`;
|
|
460
|
+
|
|
461
|
+
const panels = css`
|
|
462
|
+
/**
|
|
463
|
+
* @tokens Panel border
|
|
464
|
+
*/
|
|
465
|
+
--panels-border-radius: 8px; // @presenter BorderRadius
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @tokens Samples panel
|
|
469
|
+
* @presenter Color
|
|
470
|
+
*/
|
|
471
|
+
--samples-panel-gap: 20px;
|
|
472
|
+
--samples-panel-width: 50%;
|
|
473
|
+
|
|
474
|
+
--panels-background-color: #fff;
|
|
475
|
+
--samples-panel-block-background-color: #fff;
|
|
476
|
+
--samples-panel-background-color: #52606d;
|
|
477
|
+
--samples-panel-callback-background-color: var(--color-secondary-300);
|
|
478
|
+
--samples-panel-controls-background-color: #323f4b;
|
|
479
|
+
--samples-panel-controls-hover-background-color: #3c4c5a;
|
|
480
|
+
--samples-panel-controls-active-border-color: var(--color-accent-500);
|
|
481
|
+
--samples-panel-text-color: #fff;
|
|
482
|
+
--samples-panel-heading-color: #fff;
|
|
483
|
+
|
|
484
|
+
--samples-panel-markdown-background-color: #3c4c5a;
|
|
485
|
+
--samples-panel-markdown-border-color: #46596a;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* @tokens Try It panel
|
|
489
|
+
* @presenter Color
|
|
490
|
+
*/
|
|
491
|
+
|
|
492
|
+
--try-it-panel-tab-background-color: var(--samples-panel-background-color);
|
|
493
|
+
--try-it-panel-active-tab-background-color: #47535e;
|
|
494
|
+
--try-it-panel-active-tab-border-color: var(--color-accent-500);
|
|
495
|
+
--try-it-panel-disabled-tab-color: rgba(245, 247, 250, 0.7);
|
|
496
|
+
--try-it-panel-controls-background-color: var(--samples-panel-controls-background-color);
|
|
497
|
+
--try-it-panel-action-button-width: auto;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* @tokens Request and Response panel
|
|
501
|
+
* @presenter Color
|
|
502
|
+
*/
|
|
503
|
+
--request-and-response-panel-background-color: #fff;
|
|
504
|
+
|
|
505
|
+
// @tokens End
|
|
506
|
+
`;
|
|
507
|
+
|
|
508
|
+
const tooltip = css`
|
|
509
|
+
/**
|
|
510
|
+
* @tokens Tooltip Base
|
|
511
|
+
* @presenter Color
|
|
512
|
+
*/
|
|
513
|
+
--tooltip-color: var(--color-secondary-300);
|
|
514
|
+
--tooltip-background-color: #52606d;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* @tokens Tooltip Copy Button
|
|
518
|
+
* @presenter Color
|
|
519
|
+
*/
|
|
520
|
+
.tooltip-copy-button {
|
|
521
|
+
--tooltip-color: #000;
|
|
522
|
+
--tooltip-background-color: #fff;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// @tokens End
|
|
526
|
+
`;
|
|
527
|
+
|
|
528
|
+
const code = css`
|
|
529
|
+
/**
|
|
530
|
+
* @tokens Code base styles
|
|
531
|
+
*/
|
|
532
|
+
--code-font-size: 13px; // @presenter FontSize
|
|
533
|
+
--code-font-family: var(--font-family-monospaced); // @presenter FontFamily
|
|
534
|
+
--code-font-weight: 400; // @presenter FontWeight
|
|
535
|
+
--code-wrap: pre;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* @tokens Inline Code
|
|
539
|
+
*/
|
|
540
|
+
--inline-code-font-size: var(--code-font-size); // @presenter FontSize
|
|
541
|
+
--inline-code-font-family: var(--code-font-family); // @presenter FontFamily
|
|
542
|
+
--inline-code-color: #e53935; // @presenter Color
|
|
543
|
+
--inline-code-background-color: var(--color-secondary-200); // @presenter Color
|
|
544
|
+
--inline-code-border-color: var(--global-border-color); // @presenter Color
|
|
545
|
+
--inline-code-border-radius: var(--global-border-radius); // @presenter BorderRadius
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @tokens Code Block
|
|
549
|
+
*/
|
|
550
|
+
--code-block-font-size: var(--code-font-size); // @presenter FontSize
|
|
551
|
+
--code-block-font-family: var(--code-font-family); // @presenter FontFamily
|
|
552
|
+
--code-block-color: #f1928f; // @presenter Color
|
|
553
|
+
--code-block-background-color: rgba(217, 205, 199, 0.05); // @presenter Color
|
|
554
|
+
--code-block-border-color: var(--global-border-color); // @presenter Color
|
|
555
|
+
--code-block-border-radius: 8px; // @presenter BorderRadius
|
|
556
|
+
--code-block-max-height: 600px;
|
|
557
|
+
--code-block-word-break: initial;
|
|
558
|
+
--code-block-preformatted-background-color: #323f4b; // @presenter Color
|
|
559
|
+
|
|
560
|
+
// @tokens End
|
|
561
|
+
`;
|
|
562
|
+
|
|
563
|
+
const links = css`
|
|
564
|
+
/**
|
|
565
|
+
* @tokens Links
|
|
566
|
+
*/
|
|
567
|
+
--link-color: var(--color-primary-500); // @presenter Color
|
|
568
|
+
--link-decoration: none;
|
|
569
|
+
--link-hover-color: var(--color-primary-100); // @presenter Color
|
|
570
|
+
--link-hover-decoration: underline;
|
|
571
|
+
|
|
572
|
+
// @tokens End
|
|
573
|
+
`;
|
|
574
|
+
|
|
575
|
+
const openapiAndGraphqlDocs = css`
|
|
576
|
+
/* === ref docs and graphql docs specific === */
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* @tokens OpenAPI-GraphQL Logo
|
|
580
|
+
*/
|
|
581
|
+
--logo-max-height: 285px;
|
|
582
|
+
--logo-max-width: 285px;
|
|
583
|
+
--logo-padding: 2px;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* @tokens OpenAPI-GraphQL Layout
|
|
587
|
+
*/
|
|
588
|
+
--layout-buttons-top-offset: 20px; // @presenter Spacing
|
|
589
|
+
--layout-buttons-height: 36px; // @presenter Spacing
|
|
590
|
+
--layout-buttons-width: 36px; // @presenter Spacing
|
|
591
|
+
|
|
592
|
+
--layout-stacked-small-max-width: 90%;
|
|
593
|
+
--layout-stacked-medium-max-width: 75%;
|
|
594
|
+
--layout-stacked-large-max-width: 1200px;
|
|
595
|
+
|
|
596
|
+
--layout-three-panel-small-max-width: 100%;
|
|
597
|
+
--layout-three-panel-medium-max-width: 100%;
|
|
598
|
+
--layout-three-panel-large-max-width: 1800px;
|
|
599
|
+
|
|
600
|
+
--layout-middle-panel-small-max-width: none;
|
|
601
|
+
--layout-middle-panel-medium-max-width: none;
|
|
602
|
+
--layout-middle-panel-large-max-width: none;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* @tokens OpenAPI-GraphQL Schema
|
|
606
|
+
*/
|
|
607
|
+
--schema-lines-color: var(--global-border-color); // @presenter Color
|
|
608
|
+
--schema-default-details-width: 70%;
|
|
609
|
+
--schema-type-name-color: var(--color-content-secondary); // @presenter Color
|
|
610
|
+
--schema-type-title-color: var(--color-content-secondary); // @presenter Color
|
|
611
|
+
--schema-require-label-color: var(--color-error-900); // @presenter Color
|
|
612
|
+
--schema-labels-text-size: 0.9em; // @presenter Spacing
|
|
613
|
+
--schema-nesting-spacing: 1em; // @presenter Spacing
|
|
614
|
+
--schema-nested-background-color: var(--color-secondary-200); // @presenter Color
|
|
615
|
+
--schema-chevron-color: var(--color-content); // @presenter Color
|
|
616
|
+
--schema-chevron-size: 9px; // @presenter Spacing
|
|
617
|
+
|
|
618
|
+
--schema-controls-color: var(--color-emphasis-800); // @presenter Color
|
|
619
|
+
--schema-controls-background-color: var(--color-secondary-400); // @presenter Color
|
|
620
|
+
--schema-controls-hover-background-color: var(--color-secondary-500); // @presenter Color
|
|
621
|
+
--schema-controls-border-color: var(--color-secondary-600); // @presenter Color
|
|
622
|
+
|
|
623
|
+
--field-name-font-size: var(--code-font-size); // @presenter FontSize
|
|
624
|
+
--field-name-font-family: var(--code-font-family); // @presenter FontFamily
|
|
625
|
+
--field-example-color: var(--color-content); // @presenter Color
|
|
626
|
+
--field-example-background-color: var(--inline-code-background-color); // @presenter Color
|
|
627
|
+
--field-constraint-color: var(--color-content); // @presenter Color
|
|
628
|
+
--field-constraint-background-color: var(--inline-code-background-color); // @presenter Color
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* @tokens OpenAPI-GraphQL Search
|
|
632
|
+
* @presenter Color
|
|
633
|
+
*/
|
|
634
|
+
--search-input-border-bottom: #e6e6e6;
|
|
635
|
+
--search-results-background-color: #f2f2f2;
|
|
636
|
+
--search-results-active-item-background-color: #e6e6e6;
|
|
637
|
+
--search-marked-background-color: #ffff03;
|
|
638
|
+
--search-popup-header-background-color: var(--color-secondary-200);
|
|
639
|
+
--search-clear-button-background-color: var(--color-secondary-400);
|
|
640
|
+
--search-clear-button-hover-background-color: var(--color-secondary-600);
|
|
641
|
+
|
|
642
|
+
/*
|
|
643
|
+
* @tokens OpenAPI-GraphQL Badge
|
|
644
|
+
*/
|
|
645
|
+
--badge-color: var(--color-emphasis-100); // @presenter Color
|
|
646
|
+
--badge-background-color: var(--color-primary-500); // @presenter Color
|
|
647
|
+
--deprecated-badge-color: var(--color-emphasis-100); // @presenter Color
|
|
648
|
+
--deprecated-badge-background-color: var(--color-warning-500); // @presenter Color
|
|
649
|
+
|
|
650
|
+
--http-badge-font-size: 12px; // @presenter FontSize
|
|
651
|
+
--http-badge-line-height: 20px; // @presenter LineHeight
|
|
652
|
+
--http-badge-font-family: var(--code-font-family); // @presenter FontFamily
|
|
653
|
+
--http-badge-font-weight: var(--font-weight-bold); // @presenter FontWeight
|
|
654
|
+
--http-badge-border-radius: 16px; // @presenter BorderRadius
|
|
655
|
+
--http-badge-color: var(--color-content-inverse); // @presenter Color
|
|
656
|
+
|
|
657
|
+
--http-badge-menu-font-size: 8px; // @presenter FontSize
|
|
658
|
+
--http-badge-menu-line-height: 14px; // @presenter FontSize
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* @tokens OpenAPI-GraphQL Other
|
|
662
|
+
*/
|
|
663
|
+
--recursive-label-color: var(--color-warning-500); // @presenter Color
|
|
664
|
+
--spinner-color: var(--color-primary-500); // @presenter Color
|
|
665
|
+
--linear-progress-color: var(--color-accent-500); // @presenter Color
|
|
666
|
+
--linear-progress-background-color: var(--color-accent-100); // @presenter Color
|
|
667
|
+
|
|
668
|
+
/* Floating action button */
|
|
669
|
+
--fab-color: #0065fb; // @presenter Color
|
|
670
|
+
--fab-background-color: #f2f2f2; // @presenter Color
|
|
671
|
+
|
|
672
|
+
// @tokens End
|
|
673
|
+
`;
|
|
674
|
+
|
|
675
|
+
const footer = css`
|
|
676
|
+
/**
|
|
677
|
+
* @tokens Footer
|
|
678
|
+
*/
|
|
679
|
+
--footer-background-color: var(--color-primary-500); // @presenter Color
|
|
680
|
+
--footer-text-color: #fff; // @presenter Color
|
|
681
|
+
|
|
682
|
+
// @tokens End
|
|
683
|
+
`;
|
|
684
|
+
|
|
685
|
+
const logo = css`
|
|
686
|
+
/**
|
|
687
|
+
* @tokens Logo
|
|
688
|
+
*/
|
|
689
|
+
--logo-height: 2rem; // @presenter Spacing
|
|
690
|
+
--logo-margin: var(--sidebar-margin-left); // @presenter Spacing
|
|
691
|
+
|
|
692
|
+
// @tokens End
|
|
693
|
+
`;
|
|
694
|
+
|
|
695
|
+
const navbar = css`
|
|
696
|
+
/**
|
|
697
|
+
* @tokens Navbar
|
|
698
|
+
*/
|
|
699
|
+
--navbar-height: 60px; // @presenter Spacing
|
|
700
|
+
--navbar-text-color: #fff; // @presenter Color
|
|
701
|
+
--navbar-background-color: var(--color-primary-500); // @presenter Color
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @tokens Navbar Item
|
|
705
|
+
* */
|
|
706
|
+
--navbar-item-font-size: 16px; // @presenter FontSize
|
|
707
|
+
--navbar-item-margin-horizontal: 0; // @presenter Spacing
|
|
708
|
+
--navbar-item-margin-vertical: 0; // @presenter Spacing
|
|
709
|
+
--navbar-item-border-radius: 10px; // @presenter BorderRadius
|
|
710
|
+
--navbar-item-font-weight: var(--font-weight-bold); // @presenter FontWeight
|
|
711
|
+
--navbar-item-active-background-color: #1b75fa; // @presenter Color
|
|
712
|
+
--navbar-item-active-text-color: var(--navbar-text-color); // @presenter Color
|
|
713
|
+
--navbar-item-active-text-decoration: none;
|
|
714
|
+
|
|
715
|
+
// @tokens End
|
|
716
|
+
`;
|
|
717
|
+
|
|
718
|
+
const toc = css`
|
|
719
|
+
/**
|
|
720
|
+
* @tokens TOC
|
|
721
|
+
* */
|
|
722
|
+
--toc-width: 240px;
|
|
723
|
+
|
|
724
|
+
// @tokens End
|
|
725
|
+
`;
|
|
726
|
+
|
|
727
|
+
const markdown = css`
|
|
728
|
+
/**
|
|
729
|
+
* @tokens Markdown
|
|
730
|
+
* */
|
|
731
|
+
--content-wrapper-max-width: 910px;
|
|
732
|
+
--content-wrapper-padding-vertical: 25px; // @presenter Spacing
|
|
733
|
+
--content-wrapper-padding-horizontal: 0px; // @presenter Spacing
|
|
734
|
+
|
|
735
|
+
// @tokens End
|
|
736
|
+
`;
|
|
737
|
+
|
|
738
|
+
const blockquote = css`
|
|
739
|
+
/**
|
|
740
|
+
* @tokens Blockquote
|
|
741
|
+
* */
|
|
742
|
+
// TODO: fix typo
|
|
743
|
+
--bloquote-margin-vertical: 1.5em; // @presenter Spacing
|
|
744
|
+
--bloquote-margin-horizontal: 0; // @presenter Spacing
|
|
745
|
+
--bloquote-padding-vertical: 0; // @presenter Spacing
|
|
746
|
+
--bloquote-padding-horizontal: calc(var(--spacing-unit) * 4); // @presenter Spacing
|
|
747
|
+
--bloquote-background-color: transparent; // @presenter Color
|
|
748
|
+
|
|
749
|
+
// @tokens End
|
|
750
|
+
`;
|
|
751
|
+
|
|
752
|
+
const portalSearch = css`
|
|
753
|
+
/**
|
|
754
|
+
* @tokens Portal Search
|
|
755
|
+
*/
|
|
756
|
+
--search-input-background-color: rgba(255, 255, 255, 0.1); // @presenter Color
|
|
757
|
+
--search-input-text-color: #fff; // @presenter Color
|
|
758
|
+
--search-input-border-radius: var(--global-border-radius); // @presenter BorderRadius
|
|
759
|
+
--search-input-font-size: var(--navbar-item-font-size); // @presenter FontSize
|
|
760
|
+
--search-input-font-family: var(--font-family-base); // @presenter FontFamily
|
|
761
|
+
--search-input-line-height: 1.15em; // @presenter LineHeight
|
|
762
|
+
// TODO: fix typo
|
|
763
|
+
--search-popover-backgrond-color: #fff; // @presenter Color
|
|
764
|
+
--search-popover-border-radius: var(--search-input-border-radius); // @presenter BorderRadius
|
|
765
|
+
--search-item-text-color: var(--color-content-secondary); // @presenter Color
|
|
766
|
+
--search-item-title-text-color: var(--color-content); // @presenter Color
|
|
767
|
+
--search-item-active-background-color: rgba(0, 68, 212, 0.1); // @presenter Color
|
|
768
|
+
|
|
769
|
+
// @tokens End
|
|
770
|
+
`;
|
|
771
|
+
|
|
772
|
+
export const styles = css`
|
|
773
|
+
:root {
|
|
774
|
+
${baseColors}
|
|
775
|
+
${httpColors}
|
|
776
|
+
${responseColors}
|
|
777
|
+
${typography}
|
|
778
|
+
${headingsTypography}
|
|
779
|
+
${borders}
|
|
780
|
+
${admonition}
|
|
781
|
+
${buttons}
|
|
782
|
+
${sidebar}
|
|
783
|
+
${panels}
|
|
784
|
+
${navbar}
|
|
785
|
+
${footer}
|
|
786
|
+
${logo}
|
|
787
|
+
${toc}
|
|
788
|
+
${tooltip}
|
|
789
|
+
${code}
|
|
790
|
+
${links}
|
|
791
|
+
${markdown}
|
|
792
|
+
${blockquote}
|
|
793
|
+
${portalSearch}
|
|
794
|
+
|
|
795
|
+
${openapiAndGraphqlDocs}
|
|
633
796
|
}
|
|
634
797
|
`;
|
|
635
798
|
|