@redocly/theme 0.1.10 → 0.1.11

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.
Files changed (37) hide show
  1. package/Navbar/NavbarMenu.js +1 -1
  2. package/Search/ClearIcon.js +1 -1
  3. package/Search/SearchIcon.js +1 -1
  4. package/TableOfContent/TableOfContent.js +5 -6
  5. package/globalStyle.d.ts +1 -0
  6. package/globalStyle.js +7 -3
  7. package/mocks/Link.js +4 -1
  8. package/mocks/hooks/usePageData.js +4 -1
  9. package/package.json +1 -1
  10. package/src/DesignTokens/borders.stories.mdx +20 -0
  11. package/src/DesignTokens/colors.stories.mdx +24 -0
  12. package/src/DesignTokens/page-layout.stories.mdx +12 -0
  13. package/src/DesignTokens/tokens-generated.scss +610 -0
  14. package/src/DesignTokens/typography.stories.mdx +36 -0
  15. package/src/Navbar/Navbar.stories.tsx +1 -1
  16. package/src/Navbar/NavbarMenu.tsx +1 -1
  17. package/src/Navbar/__tests__/Navbar.test.tsx +55 -0
  18. package/src/Navbar/__tests__/__snapshots__/Navbar.test.tsx.snap +256 -0
  19. package/src/NavbarLogo/NavbarLogo.stories.tsx +1 -1
  20. package/src/PageNavigation/PageNavigation.stories.tsx +21 -0
  21. package/src/PageNavigation/__tests__/NextPageLink.test.tsx +29 -0
  22. package/src/PageNavigation/__tests__/PageNavigation.test.tsx +54 -0
  23. package/src/PageNavigation/__tests__/PreviousPageLink.test.tsx +29 -0
  24. package/src/PageNavigation/__tests__/__snapshots__/NextPageLink.test.tsx.snap +67 -0
  25. package/src/PageNavigation/__tests__/__snapshots__/PageNavigation.test.tsx.snap +275 -0
  26. package/src/PageNavigation/__tests__/__snapshots__/PreviousPageLink.test.tsx.snap +67 -0
  27. package/src/Search/ClearIcon.tsx +11 -12
  28. package/src/Search/SearchIcon.tsx +11 -12
  29. package/src/Search/__tests__/Input.test.tsx +13 -0
  30. package/src/Search/__tests__/__snapshots__/Input.test.tsx.snap +36 -0
  31. package/src/TableOfContent/TableOfContent.stories.tsx +5 -7
  32. package/src/TableOfContent/TableOfContent.tsx +6 -4
  33. package/src/TableOfContent/__tests__/TableOfContent.test.tsx +61 -0
  34. package/src/TableOfContent/__tests__/__snapshots__/TableOfContent.test.tsx.snap +153 -0
  35. package/src/globalStyle.ts +232 -138
  36. package/src/mocks/Link.tsx +5 -2
  37. package/src/mocks/hooks/usePageData.ts +4 -1
@@ -0,0 +1,610 @@
1
+ // WARNING! This file was automatically generated and should not be edited!
2
+
3
+ /*
4
+ * Static classnames that can be used to override styles for components:
5
+ * download-specification-button, next-section-button, button-base
6
+ */
7
+ :root {
8
+
9
+ /* === Palette === */
10
+
11
+ /**
12
+ * @tokens Base Colors
13
+ * @presenter Color
14
+ */
15
+ --color-primary-100: #62a1ff;
16
+ --color-primary-200: #4892ff;
17
+ --color-primary-300: #2f83ff;
18
+ --color-primary-400: #1573ff;
19
+ --color-primary-500: #0065fb;
20
+ --color-primary-600: #005be2;
21
+ --color-primary-700: #0050c8;
22
+ --color-primary-800: #0046af;
23
+ --color-primary-900: #003c95;
24
+
25
+ --color-secondary-100: #ffffff;
26
+ --color-secondary-200: #f5f7fa;
27
+ --color-secondary-300: #f3f4f6;
28
+ --color-secondary-400: #e4e7eb;
29
+ --color-secondary-500: #d5dae0;
30
+ --color-secondary-600: #c7cdd5;
31
+ --color-secondary-700: #b8c0ca;
32
+ --color-secondary-800: #a9b3c0;
33
+ --color-secondary-900: #9ba6b5;
34
+
35
+ --color-emphasis-100: #ffffff;
36
+ --color-emphasis-200: #e9eaec;
37
+ --color-emphasis-300: #cdd0d5;
38
+ --color-emphasis-400: #b2b6bd;
39
+ --color-emphasis-500: #969ca6;
40
+ --color-emphasis-600: #7a828f;
41
+ --color-emphasis-700: #626974;
42
+ --color-emphasis-800: #4b5058;
43
+ --color-emphasis-900: #1c1e21;
44
+
45
+ --color-accent-100: #b3dcf3;
46
+ --color-accent-200: #a6dfff;
47
+ --color-accent-300: #8cd5ff;
48
+ --color-accent-400: #73ccff;
49
+ --color-accent-500: #59c3ff;
50
+ --color-accent-600: #40baff;
51
+ --color-accent-700: #26b1ff;
52
+ --color-accent-800: #0da7ff;
53
+ --color-accent-900: #009bf2;
54
+
55
+ --color-success-100: #98eda0;
56
+ --color-success-200: #82e98c;
57
+ --color-success-300: #6ce678;
58
+ --color-success-400: #57e264;
59
+ --color-success-500: #41de50;
60
+ --color-success-600: #2bda3c;
61
+ --color-success-700: #23c933;
62
+ --color-success-800: #1fb32d;
63
+ --color-success-900: #1b9e28;
64
+
65
+ --color-warning-100: #ffc966;
66
+ --color-warning-200: #ffc04d;
67
+ --color-warning-300: #ffb733;
68
+ --color-warning-400: #ffae1a;
69
+ --color-warning-500: #ffa500;
70
+ --color-warning-600: #e69400;
71
+ --color-warning-700: #cc8400;
72
+ --color-warning-800: #b37300;
73
+ --color-warning-900: #996300;
74
+
75
+ --color-error-100: #ffc7c7;
76
+ --color-error-200: #ffaeae;
77
+ --color-error-300: #ff9494;
78
+ --color-error-400: #ff7b7b;
79
+ --color-error-500: #ff6161;
80
+ --color-error-600: #ff4747;
81
+ --color-error-700: #ff2e2e;
82
+ --color-error-800: #ff1414;
83
+ --color-error-900: #ff0000;
84
+
85
+ // @tokens Other
86
+
87
+
88
+ /* === Typography === */
89
+
90
+ /**
91
+ * @tokens Typography Colors
92
+ * @presenter Color
93
+ */
94
+ --color-content: #1f2933;
95
+ --color-content-inverse: var(--color-secondary-200);
96
+ --color-content-secondary: #7b8794;
97
+
98
+ /**
99
+ * @tokens Font Sizes
100
+ * @presenter FontSize
101
+ */
102
+ --font-size-base: 14px;
103
+
104
+ /**
105
+ * @tokens Line Heights
106
+ * @presenter LineHeight
107
+ */
108
+ --line-height-base: 1.5em;
109
+
110
+ /**
111
+ * @tokens Font Weights
112
+ * @presenter FontWeight
113
+ */
114
+ --font-weight-regular: 400;
115
+ --font-weight-bold: 600;
116
+ --font-weight-bolder: 700;
117
+
118
+ /**
119
+ * @tokens Font Families
120
+ * @presenter FontFamily
121
+ */
122
+ --font-family-base: Source Sans Pro, sans-serif;
123
+ --font-family-monospaced: Source Code Pro, monospace;
124
+
125
+ /**
126
+ * @tokens Rendering
127
+ */
128
+ --smoothing: antialiased; // text-smoothing
129
+ --text-rendering: optimizeSpeed; // text-rendering
130
+
131
+ /**
132
+ * @tokens Spacings
133
+ * @presenter Spacing
134
+ */
135
+ --spacing-unit: 5px;
136
+ --spacing-horizontal: calc(var(--spacing-unit) * 8);
137
+ --spacing-vertical: calc(var(--spacing-unit) * 4);
138
+
139
+ // @tokens Other
140
+
141
+
142
+ /**
143
+ * @tokens Borders
144
+ * @presenter Border
145
+ */
146
+ --global-border-width: 1px;
147
+
148
+ /**
149
+ * @tokens Border Radius
150
+ * @presenter BorderRadius
151
+ */
152
+ --global-border-radius: 4px;
153
+
154
+ /**
155
+ * @tokens Border Colors
156
+ * @presenter Color
157
+ */
158
+ --global-border-color: var(--color-secondary-400);
159
+ --global-border-color-secondary: #616e7c;
160
+ --global-background-color: transparent;
161
+
162
+ // @tokens Other
163
+
164
+
165
+ /* === Page layout === */
166
+ //TBD
167
+ /* === Navbar === */
168
+ //--navbar-height:
169
+ //TBD
170
+
171
+ /* === Menu (sidebar) === */
172
+
173
+ /**
174
+ * @tokens Sidebar
175
+ */
176
+ --sidebar-width: 285px;
177
+ --sidebar-background-color: #fff; // @presenter Color
178
+ --sidebar-right-line-color: var(--global-border-color); // @presenter Color
179
+ --sidebar-spacing-unit: 8px; // @presenter Spacing
180
+ --sidebar-spacing-horizontal: var(--sidebar-spacing-unit); // @presenter Spacing
181
+ --sidebar-spacing-vertical: var(--sidebar-spacing-unit); // @presenter Spacing
182
+
183
+ --sidebar-margin-left: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
184
+ --sidebar-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
185
+ --sidebar-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
186
+ --sidebar-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
187
+
188
+ --sidebar-word-break: 'inherit';
189
+ --sidebar-separator-label-color: var(--sidebar-item-color); // @presenter Color
190
+ --sidebar-separator-line-color: #dadada; // @presenter Color
191
+ --sidebar-chevron-color: var(--sidebar-item-color); // @presenter Color
192
+ --sidebar-chevron-size: var(--sidebar-spacing-unit); // @presenter Spacing
193
+
194
+ --sidebar-item-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
195
+ --sidebar-item-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2); // @presenter Spacing
196
+ --sidebar-item-spacing-offset-nesting: calc(
197
+ var(--sidebar-spacing-unit) * 2
198
+ ); // @presenter Spacing
199
+ --sidebar-item-border-radius: 4px; // @presenter BorderRadius
200
+ --sidebar-item-font-family: var(--font-family-base); // @presenter FontFamily
201
+ --sidebar-item-font-size: var(--font-size-base); // @presenter FontSize
202
+ --sidebar-item-color: var(--color-content); // @presenter Color
203
+ --sidebar-item-active-color: var(--color-content); // @presenter Color
204
+ --sidebar-item-background-color: #fff; // @presenter Color
205
+ --sidebar-item-active-background-color: var(--global-border-color); // @presenter Color
206
+
207
+ //TBD
208
+ /* === Footer === */
209
+ //TBD
210
+ /* === Table of contents === */
211
+ //TBD
212
+
213
+ // @tokens Other
214
+
215
+ /* === Various components: buttons, inputs, alerts, tooltip === */
216
+
217
+ /*
218
+ * Buttons
219
+ */
220
+ --button-color: white;
221
+ --button-background-color: var(--color-emphasis-500);
222
+ --button-hover-background-color: var(--color-emphasis-600);
223
+ --button-active-background-color: var(--color-emphasis-700);
224
+ --button-outlined-active-border-color: var(--color-emphasis-800);
225
+ --button-border-radius: var(--global-border-radius);
226
+ --button-font-family: inherit;
227
+ --button-font-weight: var(--font-weight-bold);
228
+ --button-box-shadow: none;
229
+ --button-active-box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
230
+
231
+ .button-color-primary {
232
+ --button-color: white;
233
+ --button-background-color: var(--color-primary-500);
234
+ --button-hover-background-color: var(--color-primary-600);
235
+ --button-active-background-color: var(--color-primary-700);
236
+ --button-outlined-active-border-color: var(--color-primary-800);
237
+ }
238
+
239
+ .button-color-secondary {
240
+ --button-color: var(--color-emphasis-800);
241
+ --button-background-color: var(--color-secondary-400);
242
+ --button-hover-background-color: var(--color-secondary-500);
243
+ --button-active-background-color: var(--color-secondary-600);
244
+ --button-outlined-active-border-color: var(--color-secondary-700);
245
+ }
246
+
247
+ --button-small-font-size: 12px;
248
+ --button-small-padding: 8px 10px;
249
+ --button-small-min-width: 90px;
250
+ --button-medium-font-size: 14px;
251
+ --button-medium-padding: 8px 20px;
252
+ --button-medium-min-width: 120px;
253
+ --button-large-font-size: 14px;
254
+ --button-large-padding: 12px 24px;
255
+ --button-large-min-width: 150px;
256
+ --button-xlarge-font-size: 16px;
257
+ --button-xlarge-padding: 20px 24px;
258
+ --button-xlarge-min-width: 200px;
259
+
260
+ /*
261
+ * Tooltip
262
+ */
263
+ --tooltip-color: var(--color-secondary-300);
264
+ --tooltip-background-color: #52606d;
265
+
266
+ .tooltip-copy-button {
267
+ --tooltip-color: #000;
268
+ --tooltip-background-color: #fff;
269
+ }
270
+
271
+ /* === Markdown/Page content (tables, inline code, blockquotes) === */
272
+
273
+ /*
274
+ * Headings
275
+ * --h-{css-property-name} is fallback for h1...h6
276
+ */
277
+ --h-font-family: Source Sans Pro, sans-serif;
278
+ --h-font-weight: var(--font-weight-bolder);
279
+ --h-color: var(--color-content);
280
+
281
+ --h1-font-size: 36px;
282
+ --h2-font-size: 28px;
283
+ --h3-font-size: 18px;
284
+ --h4-font-size: 16px;
285
+ --h5-font-size: 14px;
286
+ --h6-font-size: 12px;
287
+
288
+ --h1-line-height: 36px;
289
+ --h2-line-height: 28px;
290
+ --h3-line-height: 18px;
291
+ --h4-line-height: 16px;
292
+ --h5-line-height: 14px;
293
+ --h6-line-height: 12px;
294
+
295
+ --code-font-size: 13px;
296
+ --code-font-family: var(--font-family-monospaced);
297
+ --code-font-weight: 400;
298
+ --code-wrap: pre;
299
+
300
+ --inline-code-font-size: var(--code-font-size);
301
+ --inline-code-font-family: var(--code-font-family);
302
+ --inline-code-color: #e53935;
303
+ --inline-code-background-color: var(--color-secondary-200);
304
+ --inline-code-border-color: var(--global-border-color);
305
+ --inline-code-border-radius: var(--global-border-radius);
306
+
307
+ --code-block-font-size: var(--code-font-size);
308
+ --code-block-font-family: var(--code-font-family);
309
+ --code-block-color: #f1928f;
310
+ --code-block-background-color: rgba(217, 205, 199, 0.05);
311
+ --code-block-border-color: var(--global-border-color);
312
+ --code-block-border-radius: 8px;
313
+ --code-block-max-height: 600px;
314
+ --code-block-word-break: initial;
315
+ --code-block-preformatted-background-color: #323f4b;
316
+
317
+ /*
318
+ * Links
319
+ */
320
+ --link-color: var(--color-primary-500);
321
+ --link-decoration: none;
322
+ --link-hover-color: var(--color-primary-100);
323
+ --link-hover-decoration: underline;
324
+
325
+ /* === ref docs and graphql docs specific === */
326
+ /*
327
+ * Logo
328
+ */
329
+ --logo-max-height: 285px;
330
+ --logo-max-width: 285px;
331
+ --logo-padding: 2px;
332
+
333
+ /**
334
+ * @tokens HTTP Colors
335
+ * @presenter Color
336
+ */
337
+ --color-http-get: #3a9601;
338
+ --color-http-post: #0065fb;
339
+ --color-http-put: #93527b;
340
+ --color-http-options: #947014;
341
+ --color-http-patch: #bf581d;
342
+ --color-http-delete: #c83637;
343
+ --color-http-basic: #707070;
344
+ --color-http-link: #07818f;
345
+ --color-http-head: #a23dad;
346
+ --color-http-hook: var(--color-http-post);
347
+
348
+ /**
349
+ * @tokens Response colors
350
+ * @presenter Color
351
+ */
352
+ --response-success-border-color: #b1e996;
353
+ --response-success-background-color: #f6fff4;
354
+ --response-success-text-color: var(--response-success-border-color);
355
+
356
+ --response-error-border-color: #ffc9c9;
357
+ --response-error-background-color: #fff4f4;
358
+ --response-error-text-color: var(--response-error-border-color);
359
+
360
+ --response-redirect-border-color: var(--color-warning-500);
361
+ --response-redirect-background-color: #ffa5001a;
362
+ --response-redirect-text-color: var(--response-redirect-border-color);
363
+
364
+ --response-info-border-color: #87ceeb;
365
+ --response-info-background-color: #87ceeb1a;
366
+ --response-info-text-color: var(--response-info-border-color);
367
+
368
+ // @tokens Other
369
+
370
+ /*
371
+ * Panels
372
+ */
373
+ --panels-border-radius: 8px;
374
+ --panels-background-color: #fff;
375
+
376
+ --samples-panel-gap: 20px;
377
+ --samples-panel-width: 50%;
378
+ --samples-panel-block-background-color: #fff;
379
+ --samples-panel-background-color: #52606d;
380
+ --samples-panel-callback-background-color: var(--color-secondary-300);
381
+ --samples-panel-controls-background-color: #323f4b;
382
+ --samples-panel-controls-hover-background-color: #3c4c5a;
383
+ --samples-panel-controls-active-border-color: var(--color-accent-500);
384
+ --samples-panel-text-color: #fff;
385
+ --samples-panel-heading-color: #fff;
386
+
387
+ --samples-panel-markdown-background-color: #3c4c5a;
388
+ --samples-panel-markdown-border-color: #46596a;
389
+
390
+ --try-it-panel-tab-background-color: var(--samples-panel-background-color);
391
+ --try-it-panel-active-tab-background-color: #47535e;
392
+ --try-it-panel-active-tab-border-color: var(--color-accent-500);
393
+ --try-it-panel-disabled-tab-color: rgba(245, 247, 250, 0.7);
394
+ --try-it-panel-controls-background-color: var(--samples-panel-controls-background-color);
395
+ --try-it-panel-action-button-width: auto;
396
+
397
+ --request-and-response-panel-background-color: #fff;
398
+
399
+ /*
400
+ * Layout
401
+ */
402
+ --layout-buttons-top-offset: 20px;
403
+ --layout-buttons-height: 36px;
404
+ --layout-buttons-width: 36px;
405
+
406
+ --layout-stacked-small-max-width: 90%;
407
+ --layout-stacked-medium-max-width: 75%;
408
+ --layout-stacked-large-max-width: 1200px;
409
+
410
+ --layout-three-panel-small-max-width: 100%;
411
+ --layout-three-panel-medium-max-width: 100%;
412
+ --layout-three-panel-large-max-width: 1800px;
413
+
414
+ --layout-middle-panel-small-max-width: none;
415
+ --layout-middle-panel-medium-max-width: none;
416
+ --layout-middle-panel-large-max-width: none;
417
+
418
+ /*
419
+ * Schema
420
+ */
421
+ --schema-lines-color: var(--global-border-color);
422
+ --schema-default-details-width: 70%;
423
+ --schema-type-name-color: var(--color-content-secondary);
424
+ --schema-type-title-color: var(--color-content-secondary);
425
+ --schema-require-label-color: var(--color-error-900);
426
+ --schema-labels-text-size: 0.9em;
427
+ --schema-nesting-spacing: 1em;
428
+ --schema-nested-background-color: var(--color-secondary-200);
429
+ --schema-chevron-color: var(--color-content);
430
+ --schema-chevron-size: 9px;
431
+
432
+ --schema-controls-color: var(--color-emphasis-800);
433
+ --schema-controls-background-color: var(--color-secondary-400);
434
+ --schema-controls-hover-background-color: var(--color-secondary-500);
435
+ --schema-controls-border-color: var(--color-secondary-600);
436
+
437
+ --field-name-font-size: var(--code-font-size);
438
+ --field-name-font-family: var(--code-font-family);
439
+ --field-example-color: var(--color-content);
440
+ --field-example-background-color: var(--inline-code-background-color);
441
+ --field-constraint-color: var(--color-content);
442
+ --field-constraint-background-color: var(--inline-code-background-color);
443
+
444
+ /*
445
+ * Search
446
+ */
447
+ --search-input-border-bottom: #e6e6e6;
448
+ --search-results-background-color: #f2f2f2;
449
+ --search-results-active-item-background-color: #e6e6e6;
450
+ --search-marked-background-color: #ffff03;
451
+ --search-popup-header-background-color: var(--color-secondary-200);
452
+ --search-clear-button-background-color: var(--color-secondary-400);
453
+ --search-clear-button-hover-background-color: var(--color-secondary-600);
454
+
455
+ /*
456
+ * Other
457
+ */
458
+ --badge-color: var(--color-emphasis-100);
459
+ --badge-background-color: var(--color-primary-500);
460
+ --deprecated-badge-color: var(--color-emphasis-100);
461
+ --deprecated-badge-background-color: var(--color-warning-500);
462
+
463
+ --recursive-label-color: var(--color-warning-500);
464
+
465
+ --http-badge-font-size: 12px;
466
+ --http-badge-line-height: 20px;
467
+ --http-badge-font-family: var(--code-font-family);
468
+ --http-badge-font-weight: var(--font-weight-bold);
469
+ --http-badge-border-radius: 16px;
470
+ --http-badge-color: var(--color-content-inverse);
471
+
472
+ --http-badge-menu-font-size: 8px;
473
+ --http-badge-menu-line-height: 14px;
474
+
475
+ --spinner-color: var(--color-primary-500);
476
+
477
+ --linear-progress-color: var(--color-accent-500);
478
+ --linear-progress-background-color: var(--color-accent-100);
479
+
480
+ /* Floating action button */
481
+ --fab-color: #0065fb;
482
+ --fab-background-color: #f2f2f2;
483
+
484
+ //* PORTAL settings *//
485
+ /**
486
+ * Headings
487
+ * */
488
+ --h2-font-weight: var(--font-weight-bold);
489
+
490
+ --h1-margin-top: 1.35em;
491
+ --h1-margin-bottom: 0.9em;
492
+ --h2-margin-top: 1.25em;
493
+ --h2-margin-bottom: 0.8em;
494
+ --h3-margin-top: 1.25em;
495
+ --h3-margin-bottom: 0.8em;
496
+
497
+ /**
498
+ * Footer
499
+ * */
500
+ --footer-background-color: var(--color-primary-500);
501
+ --footer-text-color: #fff;
502
+
503
+ /**
504
+ * Sidebar
505
+ * */
506
+ --sidebar-padding-horizontal: var(--sidebar-spacing-unit);
507
+ --sidebar-padding-vertical: var(--sidebar-spacing-unit);
508
+
509
+ --sidebar-spacing-padding-vertical: var(--sidebar-spacing-unit);
510
+ --sidebar-spacing-padding-horizontal: var(--sidebar-spacing-unit);
511
+
512
+ --sidebar-border-radius: 4px;
513
+ --sidebar-font-size: var(--font-size-base);
514
+ --sidebar-font-family: var(--font-family-base);
515
+
516
+ /**
517
+ * Logo
518
+ * */
519
+ --logo-height: 2rem;
520
+ --logo-margin: var(--sidebar-margin-left);
521
+
522
+ /**
523
+ * Navbar
524
+ * */
525
+ --navbar-height: 60px;
526
+ --navbar-text-color: #fff;
527
+ --navbar-background-color: var(--color-primary-500);
528
+
529
+ /**
530
+ * Navbar Item
531
+ * */
532
+ --navbar-item-font-size: 16px;
533
+ --navbar-item-margin-horizontal: 0;
534
+ --navbar-item-margin-vertical: 0;
535
+ --navbar-item-border-radius: 10px;
536
+ --navbar-item-font-weight: var(--font-weight-bold);
537
+ --navbar-item-active-background-color: #1b75fa;
538
+ --navbar-item-active-text-color: var(--navbar-text-color);
539
+ --navbar-item-active-text-decoration: none;
540
+
541
+ /**
542
+ * TOC
543
+ * */
544
+ --toc-width: 240px;
545
+
546
+ /**
547
+ * Markdown
548
+ * */
549
+ --content-wrapper-max-width: 910px;
550
+ --content-wrapper-padding-vertical: 25px;
551
+ --content-wrapper-padding-horizontal: 0px;
552
+
553
+ /**
554
+ * Bloquote
555
+ * */
556
+ --bloquote-margin-vertical: 1.5em;
557
+ --bloquote-margin-horizontal: 0;
558
+ --bloquote-padding-vertical: 0;
559
+ --bloquote-padding-horizontal: calc(var(--spacing-unit) * 4);
560
+ --bloquote-background-color: transparent;
561
+
562
+ /**
563
+ * Admonition
564
+ * */
565
+ --admonition-margin-horizontal: 0;
566
+ --admonition-margin-vertical: calc(var(--spacing-unit) * 2);
567
+ --admonition-padding-horizontal: calc(var(--spacing-unit) * 4);
568
+ --admonition-padding-vertical: calc(var(--spacing-unit) * 4);
569
+ --admonition-icon-size: 25px;
570
+ --admonition-border-radius: 8px;
571
+ --admonition-font-size: 16px;
572
+ --admonition-font-weight: normal;
573
+ --admonition-line-height: 1.5em;
574
+ --admonition-heading-font-size: 16px;
575
+ --admonition-heading-font-weight: var(--font-weight-bold);
576
+ --admonition-heading-letter-spacing: 0.3px;
577
+ --admonition-heading-transform: uppercase;
578
+
579
+ /**
580
+ * @tokens Admonition colors
581
+ * @presenter Color
582
+ */
583
+
584
+ /* info */
585
+ --admonition-info-background-color: #ebedf0;
586
+ --admonition-info-text-color: var(--color-content);
587
+ --admonition-info-icon-color: #4782cb;
588
+
589
+ /* attention */
590
+ --admonition-attention-background-color: #e6eef8;
591
+ --admonition-attention-text-color: var(--color-content);
592
+ --admonition-attention-icon-color: #4782cb;
593
+
594
+ /* warning */
595
+ --admonition-warning-background-color: #feeda5;
596
+ --admonition-warning-text-color: var(--color-content);
597
+ --admonition-warning-icon-color: #d4ad03;
598
+
599
+ /* danger */
600
+ --admonition-danger-background-color: #fceaea;
601
+ --admonition-danger-text-color: var(--color-content);
602
+ --admonition-danger-icon-color: #e53935;
603
+
604
+ /* success */
605
+ --admonition-success-background-color: #ddffe1;
606
+ --admonition-success-text-color: var(--color-content);
607
+ --admonition-success-icon-color: #00aa13;
608
+
609
+ // @tokens Other
610
+ }
@@ -0,0 +1,36 @@
1
+ import { Meta, Story, Canvas } from '@storybook/addon-docs';
2
+ import { DesignTokenDocBlock } from 'storybook-design-token/dist/doc-blocks';
3
+
4
+ <Meta title="Design Tokens/Typography" />
5
+
6
+ # Typography
7
+
8
+ <br />
9
+
10
+ ## Font Families
11
+
12
+ <DesignTokenDocBlock categoryName="Font Families" viewType="card" />
13
+
14
+ ## Font Sizes
15
+
16
+ <DesignTokenDocBlock categoryName="Font Sizes" />
17
+
18
+ ## Font Weights
19
+
20
+ <DesignTokenDocBlock categoryName="Font Weights" />
21
+
22
+ ## Line Heights
23
+
24
+ <DesignTokenDocBlock categoryName="Line Heights" />
25
+
26
+ ## Typography Colors
27
+
28
+ <DesignTokenDocBlock categoryName="Typography Colors" />
29
+
30
+ ## Rendering
31
+
32
+ <DesignTokenDocBlock categoryName="Rendering" />
33
+
34
+ ## Spacings
35
+
36
+ <DesignTokenDocBlock categoryName="Spacings" />
@@ -11,7 +11,7 @@ export default {
11
11
  component: Navbar,
12
12
  } as ComponentMeta<typeof Navbar>;
13
13
 
14
- const Template: ComponentStory<typeof Navbar> = (args) => <Navbar {...args}>Click</Navbar>;
14
+ const Template: ComponentStory<typeof Navbar> = (args) => <Navbar {...args} />;
15
15
 
16
16
  export const Main = Template.bind({});
17
17
  Main.args = {
@@ -4,7 +4,7 @@ import styled from 'styled-components';
4
4
  import { NavbarItem } from '@theme/Navbar/NavbarItem';
5
5
 
6
6
  export function NavbarMenu({ menuItems }: { menuItems: any[] }): JSX.Element | null {
7
- if (!menuItems || !menuItems.length) {
7
+ if (!menuItems?.length) {
8
8
  return null;
9
9
  }
10
10