@redocly/theme 0.18.3-patch.0 → 0.18.3-patch.2

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 (146) hide show
  1. package/lib/components/Breadcrumbs/Breadcrumb.d.ts +1 -0
  2. package/lib/components/Breadcrumbs/Breadcrumb.js +2 -2
  3. package/lib/components/Breadcrumbs/Breadcrumbs.js +8 -1
  4. package/lib/components/Button/Button.js +6 -4
  5. package/lib/components/Button/styledVariables.js +25 -12
  6. package/lib/components/Catalog/Catalog.js +4 -4
  7. package/lib/components/Catalog/CatalogCard.js +15 -5
  8. package/lib/components/Catalog/styledVariables.js +5 -3
  9. package/lib/components/Catalog/useCatalog.js +12 -1
  10. package/lib/components/CodeBlock/CodeBlockContainer.js +3 -2
  11. package/lib/components/CodeBlock/CodeBlockControls.js +6 -2
  12. package/lib/components/CodeBlock/styledVariables.js +6 -4
  13. package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +2 -0
  14. package/lib/components/Dropdown/Dropdown.d.ts +3 -2
  15. package/lib/components/Dropdown/Dropdown.js +2 -1
  16. package/lib/components/EditPageButton/EditPageButton.js +7 -2
  17. package/lib/components/Feedback/Comment.js +5 -0
  18. package/lib/components/Feedback/Feedback.js +13 -3
  19. package/lib/components/Feedback/Rating.js +5 -1
  20. package/lib/components/Feedback/Reasons.js +5 -0
  21. package/lib/components/Feedback/Sentiment.js +11 -2
  22. package/lib/components/Feedback/Thumbs.js +4 -4
  23. package/lib/components/Filter/Filter.d.ts +2 -1
  24. package/lib/components/Filter/Filter.js +14 -5
  25. package/lib/components/Filter/FilterContent.d.ts +2 -1
  26. package/lib/components/Filter/FilterContent.js +12 -3
  27. package/lib/components/Filter/FilterPopover.d.ts +4 -4
  28. package/lib/components/Filter/FilterPopover.js +14 -4
  29. package/lib/components/Filter/FilterTag.js +1 -1
  30. package/lib/components/Footer/FooterColumn.js +2 -1
  31. package/lib/components/LastUpdated/index.d.ts +1 -0
  32. package/lib/components/LastUpdated/index.js +18 -0
  33. package/lib/components/LastUpdated/styledVariables.d.ts +1 -0
  34. package/lib/components/LastUpdated/styledVariables.js +11 -0
  35. package/lib/components/Menu/MenuItemLabel.js +2 -0
  36. package/lib/components/Menu/MenuLinkItem.js +2 -1
  37. package/lib/components/Menu/MobileMenu.js +5 -5
  38. package/lib/components/Menu/styledVariables.js +18 -7
  39. package/lib/components/Navbar/NavbarItem.d.ts +1 -1
  40. package/lib/components/Navbar/NavbarItem.js +9 -3
  41. package/lib/components/Navbar/styledVariables.js +5 -2
  42. package/lib/components/NavbarLogo/NavbarLogo.js +2 -1
  43. package/lib/components/NavbarLogo/index.d.ts +1 -0
  44. package/lib/components/NavbarLogo/index.js +1 -0
  45. package/lib/components/NavbarLogo/styledVariables.d.ts +1 -0
  46. package/lib/components/NavbarLogo/styledVariables.js +18 -0
  47. package/lib/components/Panel/styledVariables.js +3 -11
  48. package/lib/components/Profile/LoginLink.js +4 -1
  49. package/lib/components/Profile/MobileUserProfile.js +16 -5
  50. package/lib/components/Profile/UserProfile.js +5 -1
  51. package/lib/components/Search/ProductTag.js +1 -1
  52. package/lib/components/Select/Select.d.ts +1 -3
  53. package/lib/components/Select/Select.js +5 -2
  54. package/lib/components/Separator/Separator.js +11 -3
  55. package/lib/components/Separator/SeparatorItem.js +1 -7
  56. package/lib/components/Separator/SeparatorLine.js +7 -3
  57. package/lib/components/Sidebar/ApiCallItem.js +5 -3
  58. package/lib/components/Sidebar/SidebarLayout.js +2 -1
  59. package/lib/components/Sidebar/styledVariables.js +12 -7
  60. package/lib/components/Sidebar/types.d.ts +1 -0
  61. package/lib/components/SidebarActions/CollapseSidebarButton.js +4 -0
  62. package/lib/components/SidebarActions/SidebarActions.js +15 -3
  63. package/lib/components/SidebarActions/styled.js +14 -8
  64. package/lib/components/TableOfContent/TableOfContent.js +2 -1
  65. package/lib/components/Tag/Tag.d.ts +3 -1
  66. package/lib/components/Tag/Tag.js +10 -4
  67. package/lib/components/Tag/styledVariables.js +35 -30
  68. package/lib/components/Tiles/ThinTile.js +7 -5
  69. package/lib/components/Tiles/WideTile.js +10 -8
  70. package/lib/components/Typography/SectionHeader.js +2 -2
  71. package/lib/config.d.ts +84 -0
  72. package/lib/config.js +15 -1
  73. package/lib/globalStyle.js +43 -56
  74. package/lib/icons/PlusIcon/PlusIcon.js +1 -1
  75. package/lib/ui/ArrowBack.js +0 -1
  76. package/lib/ui/darkColors.js +5 -4
  77. package/lib/utils/index.d.ts +1 -0
  78. package/lib/utils/index.js +1 -0
  79. package/lib/utils/tags-parser.d.ts +1 -0
  80. package/lib/utils/tags-parser.js +10 -0
  81. package/package.json +2 -2
  82. package/src/components/Breadcrumbs/Breadcrumb.tsx +8 -2
  83. package/src/components/Breadcrumbs/Breadcrumbs.tsx +13 -1
  84. package/src/components/Button/Button.tsx +6 -4
  85. package/src/components/Button/styledVariables.ts +25 -12
  86. package/src/components/Catalog/Catalog.tsx +4 -8
  87. package/src/components/Catalog/CatalogCard.tsx +17 -6
  88. package/src/components/Catalog/styledVariables.ts +5 -3
  89. package/src/components/Catalog/useCatalog.ts +13 -1
  90. package/src/components/CodeBlock/CodeBlockContainer.tsx +3 -2
  91. package/src/components/CodeBlock/CodeBlockControls.tsx +6 -1
  92. package/src/components/CodeBlock/styledVariables.ts +6 -4
  93. package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +3 -0
  94. package/src/components/Dropdown/Dropdown.tsx +4 -1
  95. package/src/components/EditPageButton/EditPageButton.tsx +7 -2
  96. package/src/components/Feedback/Comment.tsx +5 -0
  97. package/src/components/Feedback/Feedback.tsx +13 -3
  98. package/src/components/Feedback/Rating.tsx +5 -1
  99. package/src/components/Feedback/Reasons.tsx +5 -0
  100. package/src/components/Feedback/Sentiment.tsx +15 -2
  101. package/src/components/Feedback/Thumbs.tsx +4 -4
  102. package/src/components/Filter/Filter.tsx +25 -4
  103. package/src/components/Filter/FilterContent.tsx +21 -4
  104. package/src/components/Filter/FilterPopover.tsx +19 -11
  105. package/src/components/Filter/FilterTag.tsx +1 -1
  106. package/src/components/Footer/FooterColumn.tsx +2 -0
  107. package/src/components/LastUpdated/index.ts +1 -0
  108. package/src/components/LastUpdated/styledVariables.ts +8 -0
  109. package/src/components/Menu/MenuItemLabel.tsx +2 -0
  110. package/src/components/Menu/MenuLinkItem.tsx +6 -1
  111. package/src/components/Menu/MobileMenu.tsx +5 -5
  112. package/src/components/Menu/styledVariables.ts +18 -7
  113. package/src/components/Navbar/NavbarItem.tsx +10 -1
  114. package/src/components/Navbar/styledVariables.ts +5 -2
  115. package/src/components/NavbarLogo/NavbarLogo.tsx +12 -1
  116. package/src/components/NavbarLogo/index.ts +1 -0
  117. package/src/components/NavbarLogo/styledVariables.ts +15 -0
  118. package/src/components/Panel/styledVariables.ts +3 -11
  119. package/src/components/Profile/LoginLink.tsx +8 -1
  120. package/src/components/Profile/MobileUserProfile.tsx +22 -5
  121. package/src/components/Profile/UserProfile.tsx +5 -1
  122. package/src/components/Search/ProductTag.tsx +1 -1
  123. package/src/components/Select/Select.tsx +6 -5
  124. package/src/components/Separator/Separator.tsx +17 -3
  125. package/src/components/Separator/SeparatorItem.tsx +1 -7
  126. package/src/components/Separator/SeparatorLine.tsx +7 -3
  127. package/src/components/Sidebar/ApiCallItem.tsx +4 -2
  128. package/src/components/Sidebar/SidebarLayout.tsx +6 -1
  129. package/src/components/Sidebar/styledVariables.ts +12 -7
  130. package/src/components/Sidebar/types.ts +1 -0
  131. package/src/components/SidebarActions/CollapseSidebarButton.tsx +4 -0
  132. package/src/components/SidebarActions/SidebarActions.tsx +18 -3
  133. package/src/components/SidebarActions/styled.tsx +14 -8
  134. package/src/components/TableOfContent/TableOfContent.tsx +2 -0
  135. package/src/components/Tag/Tag.tsx +13 -4
  136. package/src/components/Tag/styledVariables.ts +35 -30
  137. package/src/components/Tiles/ThinTile.tsx +7 -5
  138. package/src/components/Tiles/WideTile.tsx +10 -8
  139. package/src/components/Typography/SectionHeader.ts +2 -2
  140. package/src/config.ts +19 -1
  141. package/src/globalStyle.ts +41 -57
  142. package/src/icons/PlusIcon/PlusIcon.tsx +7 -1
  143. package/src/ui/ArrowBack.tsx +0 -1
  144. package/src/ui/darkColors.tsx +5 -4
  145. package/src/utils/index.ts +1 -0
  146. package/src/utils/tags-parser.ts +8 -0
package/lib/config.d.ts CHANGED
@@ -458,6 +458,10 @@ declare const catalogSchema: {
458
458
  readonly groupByFirstFilter: {
459
459
  readonly type: "boolean";
460
460
  };
461
+ readonly filterValuesCasing: {
462
+ readonly type: "string";
463
+ readonly enum: readonly ["sentence"];
464
+ };
461
465
  readonly items: {
462
466
  readonly type: "array";
463
467
  readonly items: {
@@ -485,6 +489,11 @@ declare const catalogSchema: {
485
489
  readonly separatorLine: {
486
490
  readonly type: "boolean";
487
491
  };
492
+ readonly linePosition: {
493
+ readonly type: "string";
494
+ readonly enum: readonly ["top", "bottom"];
495
+ readonly default: "top";
496
+ };
488
497
  readonly version: {
489
498
  readonly type: "string";
490
499
  };
@@ -529,6 +538,11 @@ declare const catalogSchema: {
529
538
  readonly separatorLine: {
530
539
  readonly type: "boolean";
531
540
  };
541
+ readonly linePosition: {
542
+ readonly type: "string";
543
+ readonly enum: readonly ["top", "bottom"];
544
+ readonly default: "top";
545
+ };
532
546
  readonly version: {
533
547
  readonly type: "string";
534
548
  };
@@ -640,6 +654,11 @@ export declare const themeConfigSchema: {
640
654
  readonly separatorLine: {
641
655
  readonly type: "boolean";
642
656
  };
657
+ readonly linePosition: {
658
+ readonly type: "string";
659
+ readonly enum: readonly ["top", "bottom"];
660
+ readonly default: "top";
661
+ };
643
662
  readonly version: {
644
663
  readonly type: "string";
645
664
  };
@@ -684,6 +703,11 @@ export declare const themeConfigSchema: {
684
703
  readonly separatorLine: {
685
704
  readonly type: "boolean";
686
705
  };
706
+ readonly linePosition: {
707
+ readonly type: "string";
708
+ readonly enum: readonly ["top", "bottom"];
709
+ readonly default: "top";
710
+ };
687
711
  readonly version: {
688
712
  readonly type: "string";
689
713
  };
@@ -766,6 +790,11 @@ export declare const themeConfigSchema: {
766
790
  readonly separatorLine: {
767
791
  readonly type: "boolean";
768
792
  };
793
+ readonly linePosition: {
794
+ readonly type: "string";
795
+ readonly enum: readonly ["top", "bottom"];
796
+ readonly default: "top";
797
+ };
769
798
  readonly version: {
770
799
  readonly type: "string";
771
800
  };
@@ -810,6 +839,11 @@ export declare const themeConfigSchema: {
810
839
  readonly separatorLine: {
811
840
  readonly type: "boolean";
812
841
  };
842
+ readonly linePosition: {
843
+ readonly type: "string";
844
+ readonly enum: readonly ["top", "bottom"];
845
+ readonly default: "top";
846
+ };
813
847
  readonly version: {
814
848
  readonly type: "string";
815
849
  };
@@ -849,6 +883,14 @@ export declare const themeConfigSchema: {
849
883
  readonly hide: {
850
884
  readonly type: "boolean";
851
885
  };
886
+ readonly separatorLine: {
887
+ readonly type: "boolean";
888
+ };
889
+ readonly linePosition: {
890
+ readonly type: "string";
891
+ readonly enum: readonly ["top", "bottom"];
892
+ readonly default: "bottom";
893
+ };
852
894
  };
853
895
  readonly additionalProperties: false;
854
896
  };
@@ -1711,6 +1753,10 @@ export declare const themeConfigSchema: {
1711
1753
  readonly groupByFirstFilter: {
1712
1754
  readonly type: "boolean";
1713
1755
  };
1756
+ readonly filterValuesCasing: {
1757
+ readonly type: "string";
1758
+ readonly enum: readonly ["sentence"];
1759
+ };
1714
1760
  readonly items: {
1715
1761
  readonly type: "array";
1716
1762
  readonly items: {
@@ -1738,6 +1784,11 @@ export declare const themeConfigSchema: {
1738
1784
  readonly separatorLine: {
1739
1785
  readonly type: "boolean";
1740
1786
  };
1787
+ readonly linePosition: {
1788
+ readonly type: "string";
1789
+ readonly enum: readonly ["top", "bottom"];
1790
+ readonly default: "top";
1791
+ };
1741
1792
  readonly version: {
1742
1793
  readonly type: "string";
1743
1794
  };
@@ -1782,6 +1833,11 @@ export declare const themeConfigSchema: {
1782
1833
  readonly separatorLine: {
1783
1834
  readonly type: "boolean";
1784
1835
  };
1836
+ readonly linePosition: {
1837
+ readonly type: "string";
1838
+ readonly enum: readonly ["top", "bottom"];
1839
+ readonly default: "top";
1840
+ };
1785
1841
  readonly version: {
1786
1842
  readonly type: "string";
1787
1843
  };
@@ -1954,6 +2010,11 @@ export declare const productThemeOverrideSchema: {
1954
2010
  readonly separatorLine: {
1955
2011
  readonly type: "boolean";
1956
2012
  };
2013
+ readonly linePosition: {
2014
+ readonly type: "string";
2015
+ readonly enum: readonly ["top", "bottom"];
2016
+ readonly default: "top";
2017
+ };
1957
2018
  readonly version: {
1958
2019
  readonly type: "string";
1959
2020
  };
@@ -1998,6 +2059,11 @@ export declare const productThemeOverrideSchema: {
1998
2059
  readonly separatorLine: {
1999
2060
  readonly type: "boolean";
2000
2061
  };
2062
+ readonly linePosition: {
2063
+ readonly type: "string";
2064
+ readonly enum: readonly ["top", "bottom"];
2065
+ readonly default: "top";
2066
+ };
2001
2067
  readonly version: {
2002
2068
  readonly type: "string";
2003
2069
  };
@@ -2061,6 +2127,11 @@ export declare const productThemeOverrideSchema: {
2061
2127
  readonly separatorLine: {
2062
2128
  readonly type: "boolean";
2063
2129
  };
2130
+ readonly linePosition: {
2131
+ readonly type: "string";
2132
+ readonly enum: readonly ["top", "bottom"];
2133
+ readonly default: "top";
2134
+ };
2064
2135
  readonly version: {
2065
2136
  readonly type: "string";
2066
2137
  };
@@ -2105,6 +2176,11 @@ export declare const productThemeOverrideSchema: {
2105
2176
  readonly separatorLine: {
2106
2177
  readonly type: "boolean";
2107
2178
  };
2179
+ readonly linePosition: {
2180
+ readonly type: "string";
2181
+ readonly enum: readonly ["top", "bottom"];
2182
+ readonly default: "top";
2183
+ };
2108
2184
  readonly version: {
2109
2185
  readonly type: "string";
2110
2186
  };
@@ -2144,6 +2220,14 @@ export declare const productThemeOverrideSchema: {
2144
2220
  readonly hide: {
2145
2221
  readonly type: "boolean";
2146
2222
  };
2223
+ readonly separatorLine: {
2224
+ readonly type: "boolean";
2225
+ };
2226
+ readonly linePosition: {
2227
+ readonly type: "string";
2228
+ readonly enum: readonly ["top", "bottom"];
2229
+ readonly default: "bottom";
2230
+ };
2147
2231
  };
2148
2232
  readonly additionalProperties: false;
2149
2233
  };
package/lib/config.js CHANGED
@@ -225,6 +225,11 @@ const navItemSchema = {
225
225
  label: { type: 'string' },
226
226
  separator: { type: 'string' },
227
227
  separatorLine: { type: 'boolean' },
228
+ linePosition: {
229
+ type: 'string',
230
+ enum: ['top', 'bottom'],
231
+ default: 'top',
232
+ },
228
233
  version: { type: 'string' },
229
234
  menuStyle: { type: 'string', enum: ['drilldown'] },
230
235
  expanded: { type: 'string', const: 'always' },
@@ -327,6 +332,7 @@ const catalogSchema = {
327
332
  slug: { type: 'string' },
328
333
  filters: { type: 'array', items: catalogFilterSchema },
329
334
  groupByFirstFilter: { type: 'boolean' },
335
+ filterValuesCasing: { type: 'string', enum: ['sentence'] },
330
336
  items: navItemsSchema,
331
337
  requiredPermission: { type: 'string' },
332
338
  separateVersions: { type: 'boolean' },
@@ -365,7 +371,15 @@ exports.themeConfigSchema = {
365
371
  properties: Object.assign({ items: navItemsSchema, copyrightText: { type: 'string' } }, hideConfigSchema.properties),
366
372
  additionalProperties: false,
367
373
  },
368
- sidebar: hideConfigSchema,
374
+ sidebar: {
375
+ type: 'object',
376
+ properties: Object.assign({ separatorLine: { type: 'boolean' }, linePosition: {
377
+ type: 'string',
378
+ enum: ['top', 'bottom'],
379
+ default: 'bottom',
380
+ } }, hideConfigSchema.properties),
381
+ additionalProperties: false,
382
+ },
369
383
  scripts: {
370
384
  type: 'object',
371
385
  properties: {
@@ -24,6 +24,8 @@ const Profile_1 = require("./components/Profile");
24
24
  const Dropdown_1 = require("./components/Dropdown");
25
25
  const Markdown_1 = require("./components/Markdown");
26
26
  const Tooltip_1 = require("./components/Tooltip");
27
+ const LastUpdated_1 = require("./components/LastUpdated");
28
+ const NavbarLogo_1 = require("./components/NavbarLogo");
27
29
  const themeColors = (0, styled_components_1.css) `
28
30
  /* === Palette === */
29
31
  /**
@@ -206,16 +208,17 @@ const themeColors = (0, styled_components_1.css) `
206
208
  --color-warning: var(--color-warning-base);
207
209
  --color-success: var(--color-success-base);
208
210
  --color-info: var(--color-info-base);
209
-
211
+
210
212
  /**
211
213
  * @tokens Elevation Colors
212
214
  * @presenter Color
213
215
  */
214
216
 
215
- --bg-sunken: #F1F1F1; // Sunken is the lowest elevation available.
216
217
  --bg-base: #ffffff; // The default elevation is the baseline with respect to all other layers.
218
+ --bg-sunken: #f1f1f1; // Sunken is the lowest elevation available.
217
219
  --bg-raised: #fafafa; // Cards, elements, inputs
218
220
  --bg-overlay: #f2f2f2; // Overlay is the highest elevation available. Use for hovers
221
+ --bg-modal-overlay: #f2f2f2c2; // Overlay is the highest elevation available. Use for hovers
219
222
 
220
223
  --bg-base-shadow: 0px 3px 5px rgba(51, 51, 51, 0.2), 0px 0px 1px rgba(51, 51, 51, 0.31); // Elements
221
224
  --bg-raised-shadow: 0px 8px 12px rgba(51, 51, 51, 0.15), 0px 0px 1px rgba(51, 51, 51, 0.31); // Hovers for base. Menu
@@ -248,7 +251,7 @@ const typography = (0, styled_components_1.css) `
248
251
  --text-description: #8d8d8d; // Caption, Description, Icon
249
252
  --text-placeholder: #a8a8a8; // Placeholder text, Disabled text
250
253
  --text-link: var(--color-blue-6);
251
-
254
+
252
255
  /**
253
256
  * @tokens Font Weights
254
257
  * @presenter FontWeight
@@ -258,7 +261,7 @@ const typography = (0, styled_components_1.css) `
258
261
  --font-weight-bold: 600; // All strong weights in the entire system.
259
262
  --font-weight-bolder: 700;
260
263
  --font-weight-italic: 'Regular Italic'; // All italic weights in the entire system.
261
-
264
+
262
265
  /**
263
266
  * @tokens Line Heights
264
267
  * @presenter LineHeight
@@ -277,15 +280,10 @@ const typography = (0, styled_components_1.css) `
277
280
  * @presenter FontSize
278
281
  */
279
282
 
280
- --font-size-base: 14px; // Base font size of the entire system.
281
- --font-size-sm: 12px;
282
- --font-size-lg: 16px;
283
- --font-size-xl: 20px;
284
- --font-size-heading-1: 38px;
285
- --font-size-heading-2: 30px;
286
- --font-size-heading-3: 24px;
287
- --font-size-heading-4: 20px;
288
- --font-size-heading-5: 16px;
283
+ --font-size-base: 16px; // Base font size of the entire system.
284
+ --font-size-sm: 14px;
285
+ --font-size-lg: 18px;
286
+ --font-size-xl: 22px;
289
287
 
290
288
  /**
291
289
  * @tokens Font Rendering
@@ -298,7 +296,7 @@ const typography = (0, styled_components_1.css) `
298
296
  `;
299
297
  const sizeAndSpace = (0, styled_components_1.css) `
300
298
  /* === Size & Space === */
301
-
299
+
302
300
  /**
303
301
  * @tokens Size
304
302
  * @presenter Spacing
@@ -312,7 +310,7 @@ const sizeAndSpace = (0, styled_components_1.css) `
312
310
  */
313
311
 
314
312
  --spacing-unit: 4px;
315
-
313
+
316
314
  --spacing-base: calc(var(--spacing-unit) * 4);
317
315
  --spacing-xxs: var(--spacing-unit);
318
316
  --spacing-xs: calc(var(--spacing-unit) * 2);
@@ -324,7 +322,7 @@ const sizeAndSpace = (0, styled_components_1.css) `
324
322
 
325
323
  --spacing-horizontal: var(--spacing-xl);
326
324
  --spacing-vertical: var(--spacing-base);
327
-
325
+
328
326
  /**
329
327
  * @tokens Height
330
328
  * @presenter Spacing
@@ -427,26 +425,37 @@ const headingsTypography = (0, styled_components_1.css) `
427
425
  * @tokens Heading level 4
428
426
  */
429
427
 
428
+ --h4-font-family: var(--heading-font-family); // @presenter FontFamily
430
429
  --h4-font-weight: var(--heading-font-weight); // @presenter FontWeight
431
430
  --h4-font-size: 16px; // @presenter FontSize
432
- --h4-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
431
+ --h4-line-height: 16px; // @presenter LineHeight
433
432
  --h4-margin-top: var(--heading-margin-top); // @presenter Spacing
433
+ --h4-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
434
+ --h4-text-color: var(--heading-text-color); // @presenter Color
434
435
 
435
436
  /**
436
437
  * @tokens Heading level 5
437
438
  */
438
439
 
440
+ --h5-font-family: var(--heading-font-family); // @presenter FontFamily
441
+ --h5-font-weight: var(--heading-font-weight); // @presenter FontWeight
439
442
  --h5-font-size: 14px; // @presenter FontSize
440
- --h5-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
443
+ --h5-line-height: 14px; // @presenter LineHeight
441
444
  --h5-margin-top: var(--heading-margin-top); // @presenter Spacing
445
+ --h5-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
446
+ --h5-text-color: var(--heading-text-color); // @presenter Color
442
447
 
443
448
  /**
444
449
  * @tokens Heading level 6
445
450
  */
446
451
 
452
+ --h6-font-family: var(--heading-font-family); // @presenter FontFamily
453
+ --h6-font-weight: var(--heading-font-weight); // @presenter FontWeight
447
454
  --h6-font-size: 12px; // @presenter FontSize
455
+ --h6-line-height: 12px; // @presenter LineHeight
448
456
  --h6-margin-top: var(--heading-margin-top); // @presenter Spacing
449
457
  --h6-margin-bottom: var(--heading-margin-bottom); // @presenter Spacing
458
+ --h6-text-color: var(--heading-text-color); // @presenter Color
450
459
 
451
460
  // @tokens End
452
461
  `;
@@ -500,7 +509,7 @@ const apiReferenceDocs = (0, styled_components_1.css) `
500
509
  --schemas-mime-type-dropdown-padding: 0px 26px 0px 4px;
501
510
  --schemas-mime-type-dropdown-border: var(--docs-dropdown-border); // @presenter Border
502
511
  --schemas-mime-type-dropdown-font-size: var(--docs-dropdown-font-size); // @presenter FontSize
503
- --schemas-mime-type-dropdown-text-color: var(--docs-dropdown-font-size); // @presenter Color
512
+ --schemas-mime-type-dropdown-text-color: var(--docs-dropdown-text-color); // @presenter Color
504
513
 
505
514
  /**
506
515
  * @tokens API Reference Schemas Discriminator Dropdown
@@ -579,9 +588,9 @@ const apiReferenceDocs = (0, styled_components_1.css) `
579
588
  * @presenter Color
580
589
  */
581
590
 
582
- --schema-recursive-text-color: var(--color-warning);
583
- --schema-recursive-background-color: var(--schema-inline-background-color);
584
- --schema-recursive-border-color: var(--schema-inline-border-color);
591
+ --schema-recursive-text-color: var(--color-warning); // @presenter Color
592
+ --schema-recursive-background-color: var(--color-warning-bg); // @presenter Color
593
+ --schema-recursive-border-color: var(--color-warning-border); // @presenter Color
585
594
 
586
595
  /**
587
596
  * @tokens GraphQL Docs Reference Schema Non null label
@@ -591,7 +600,7 @@ const apiReferenceDocs = (0, styled_components_1.css) `
591
600
  --schema-non-null-text-color: var(--schema-inline-code-text-color);
592
601
  --schema-non-null-background-color: var(--schema-inline-background-color);
593
602
  --schema-non-null-border-color: var(--schema-inline-border-color);
594
-
603
+
595
604
  /**
596
605
  * @tokens API Reference Schema Nested styles
597
606
  */
@@ -693,19 +702,6 @@ const badges = (0, styled_components_1.css) `
693
702
  --badge-deprecated-border-radius: var(--border-radius); // @presenter BorderRadius
694
703
 
695
704
 
696
- // @tokens End
697
- `;
698
- const logo = (0, styled_components_1.css) `
699
- /**
700
- * @tokens Logo
701
- */
702
-
703
- --navbar-logo-height: 2rem; // @presenter Spacing
704
- --navbar-logo-width: auto;
705
- --navbar-logo-margin: 16px; // @presenter Spacing
706
- --navbar-logo-max-width: 285px; // @presenter Spacing
707
- --navbar-logo-max-height: 285px; // @presenter Spacing
708
-
709
705
  // @tokens End
710
706
  `;
711
707
  const loadProgressBar = (0, styled_components_1.css) `
@@ -788,18 +784,12 @@ const docsDropdown = (0, styled_components_1.css) `
788
784
  --docs-dropdown-font-size: var(--font-size-base);
789
785
  --docs-dropdown-text-color: var(--text-secondary);
790
786
 
791
- --docs-dropdown-padding-vertical: 0;
787
+ --docs-dropdown-padding-vertical: 6px;
792
788
  --docs-dropdown-padding-left: 10px;
793
789
  --docs-dropdown-padding-right: 26px;
794
790
  --docs-dropdown-padding: var(--docs-dropdown-padding-vertical) var(--docs-dropdown-padding-right) var(--docs-dropdown-padding-vertical) var(--docs-dropdown-padding-left);
795
791
  --docs-dropdown-border: 1px solid var(--border-primary);
796
792
  `;
797
- const lastUpdated = (0, styled_components_1.css) `
798
- --last-updated-text-color: var(--text-secondary);
799
- --last-updated-font-size: var(--font-size-sm);
800
- --last-updated-font-family: var(--font-family-base);
801
- --last-updated-line-height: var(--line-height-base);
802
- `;
803
793
  const tile = (0, styled_components_1.css) `
804
794
  --wide-tile-background-color: var(--bg-raised);
805
795
  --thin-tile-background-color: var(--bg-raised);
@@ -861,18 +851,18 @@ const error = (0, styled_components_1.css) `
861
851
  --error-bubble-gap: var(--spacing-base);
862
852
  --error-bubble-font-family: var(--font-family-base);
863
853
  --error-bubble-z-index: var(--z-index-popover);
864
-
854
+
865
855
  --error-card-border-radius: calc(var(--spacing-xxs) * 1.5);
866
856
  --error-card-background: var(--bg-raised);
867
857
  --error-card-padding: var(--spacing-xs) var(--spacing-base);
868
858
  --error-card-text-color: var(--text-primary);
869
859
  --error-card-font-size: var(--font-size-base);
870
860
  --error-card-font-style: normal;
871
- --error-card-font-weight: var(--font-weight-normal);
861
+ --error-card-font-weight: var(--font-weight-regular);
872
862
  --error-card-line-height: var(--line-height-base);
873
863
  --error-card-box-shadow: var(--bg-raised-shadow);
874
864
  --error-card-icon-margin: 0 var(--spacing-xs) 0 0;
875
-
865
+
876
866
  --detailed-error-overlay-background: #4f4f4f;
877
867
  --detailed-error-overlay-opacity: 0.9;
878
868
  --detailed-error-overlay-z-index: var(--z-index-raised);
@@ -889,13 +879,13 @@ const error = (0, styled_components_1.css) `
889
879
  --detailed-error-modal-font-family: var(--font-family-base);
890
880
  --detailed-error-modal-padding: var(--spacing-md);
891
881
  --detailed-error-modal-wapper-text-align: right;
892
-
882
+
893
883
  --detailed-error-content-margin-top: var(--spacing-md);
894
884
  --detailed-error-content-height: 100%;
895
-
885
+
896
886
  --detailed-error-close-button-color: var(--text-description);
897
887
  --detailed-error-close-button-text-transform: uppercase;
898
-
888
+
899
889
  --detailed-error-message-margin: var(--spacing-base) auto var(--spacing-lg);
900
890
  --detailed-error-message-padding: var(--spacing-base);
901
891
  --detailed-error-message-border-radius: var(--border-radius);
@@ -910,8 +900,8 @@ const modal = (0, styled_components_1.css) `
910
900
  overflow: hidden;
911
901
  }
912
902
 
913
- --modal-box-shadow: 0px 8px 12px rgba(51, 51, 51, 0.15), 0px 0px 1px rgba(51, 51, 51, 0.31);
914
- --modal-overlay-background-color: rgba(206, 206, 206, 0.49);
903
+ --modal-box-shadow: var(--bg-overlay-shadow);
904
+ --modal-overlay-background-color: var(--bg-modal-overlay);
915
905
  --modal-background-color: var(--bg-base);
916
906
  `;
917
907
  const zIndexDepth = (0, styled_components_1.css) `
@@ -939,10 +929,10 @@ exports.styles = (0, styled_components_1.css) `
939
929
  ${headingsTypography}
940
930
  ${inputs}
941
931
  ${I18n_1.languagePicker}
942
- ${lastUpdated}
932
+ ${LastUpdated_1.lastUpdated}
943
933
  ${links}
944
934
  ${loadProgressBar}
945
- ${logo}
935
+ ${NavbarLogo_1.logo}
946
936
  ${Markdown_1.markdown}
947
937
  ${Menu_1.menu}
948
938
  ${Menu_1.mobileMenu}
@@ -967,7 +957,6 @@ exports.styles = (0, styled_components_1.css) `
967
957
  ${Sidebar_1.versionPicker}
968
958
  ${zIndexDepth}
969
959
 
970
- --api-onboarding-table-text-color: #4e5356;
971
960
  --api-catalog-card-min-width: 250px;
972
961
 
973
962
  background-color: var(--bg-base);
@@ -977,8 +966,6 @@ exports.styles = (0, styled_components_1.css) `
977
966
 
978
967
  :root.dark {
979
968
  ${darkColors_1.darkMode};
980
-
981
- --api-onboarding-table-text-color: #ffffff;
982
969
  }
983
970
 
984
971
  :root.notransition * {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PlusIcon = exports.Icon = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
- const Icon = () => (react_1.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "black", xmlns: "http://www.w3.org/2000/svg" },
9
+ const Icon = () => (react_1.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" },
10
10
  react_1.default.createElement("path", { d: "M7.53125 2.375H8.46875C8.55208 2.375 8.59375 2.41667 8.59375 2.5V13.5C8.59375 13.5833 8.55208 13.625 8.46875 13.625H7.53125C7.44792 13.625 7.40625 13.5833 7.40625 13.5V2.5C7.40625 2.41667 7.44792 2.375 7.53125 2.375Z", fill: "inherit" }),
11
11
  react_1.default.createElement("path", { d: "M2.75 7.40625H13.25C13.3333 7.40625 13.375 7.44792 13.375 7.53125V8.46875C13.375 8.55208 13.3333 8.59375 13.25 8.59375H2.75C2.66667 8.59375 2.625 8.55208 2.625 8.46875V7.53125C2.625 7.44792 2.66667 7.40625 2.75 7.40625Z", fill: "inherit" })));
12
12
  exports.Icon = Icon;
@@ -12,7 +12,6 @@ const Arrow = ({ className, dataComponentName, }) => (react_1.default.createElem
12
12
  react_1.default.createElement("path", { d: "M2 5a1 1 0 011-1h8a1 1 0 110 2H3a1 1 0 01-1-1z" }))));
13
13
  exports.ArrowBack = (0, styled_components_1.default)(Arrow) `
14
14
  fill: var(--sidebar-back-button-icon-color);
15
- margin-right: calc(var(--sidebar-spacing-unit));
16
15
 
17
16
  background-image: var(--sidebar-back-button-icon);
18
17
  background-repeat: no-repeat;
@@ -192,10 +192,10 @@ exports.darkMode = (0, styled_components_1.css) `
192
192
  */
193
193
  --text-base: #ffffff; // The base color of the typography color tokens.
194
194
  --text-light-solid: #ffffff; // The color of the objects that need to be white no matter what theme is enabled.
195
- --text-primary: #e3e3e3; // Headers, Icon hover
196
- --text-secondary: #b3b3b3; // Body text
197
- --text-description: #8e8e8e; // Caption, Description, Icon
198
- --text-placeholder: #7b7b7b; // Placeholder text, Disabled text
195
+ --text-primary: #ffffffde; // Headers, Icon hover
196
+ --text-secondary: #ffffff99; // Body text
197
+ --text-description: #ffffff61; // Caption, Description, Icon
198
+ --text-placeholder: #ffffff61; // Placeholder text, Disabled text
199
199
  --text-link: var(--color-blue-6);
200
200
 
201
201
  /**
@@ -207,6 +207,7 @@ exports.darkMode = (0, styled_components_1.css) `
207
207
  --bg-base: #141414; // The default elevation is the baseline with respect to all other layers.
208
208
  --bg-raised: #1f1f1f; // Cards, elements, inputs
209
209
  --bg-overlay: #282828; // Overlay is the highest elevation available. Use for hovers
210
+ --bg-modal-overlay: #282828c2;
210
211
 
211
212
  --bg-base-shadow: 0px 3px 5px rgba(0, 0, 0, 0.4), 0px 1px 4px rgba(0, 0, 0, 0.5); // Elements
212
213
  --bg-raised-shadow: 0px 8px 12px rgba(0, 0, 0, 0.4), 0px 1px 4px rgba(0, 0, 0, 0.5); // Hovers for base. Menu
@@ -9,3 +9,4 @@ export * from './args-typecheck';
9
9
  export * from './color';
10
10
  export * from './urls';
11
11
  export * from './jsUtils';
12
+ export * from './tags-parser';
@@ -25,4 +25,5 @@ __exportStar(require("./args-typecheck"), exports);
25
25
  __exportStar(require("./color"), exports);
26
26
  __exportStar(require("./urls"), exports);
27
27
  __exportStar(require("./jsUtils"), exports);
28
+ __exportStar(require("./tags-parser"), exports);
28
29
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ export declare const slug: (value: string) => string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.slug = void 0;
4
+ const slug = (value) => {
5
+ const matches = value.match(/[a-zA-Z0-9_-]*/g);
6
+ const result = matches === null || matches === void 0 ? void 0 : matches.filter((value) => value !== '').join('-').toLowerCase();
7
+ return result !== null && result !== void 0 ? result : value;
8
+ };
9
+ exports.slug = slug;
10
+ //# sourceMappingURL=tags-parser.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.18.3-patch.0",
3
+ "version": "0.18.3-patch.2",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -81,7 +81,7 @@
81
81
  "tsconfig-paths-webpack-plugin": "^3.5.2",
82
82
  "typescript": "^4.8.4",
83
83
  "webpack": "^5.72.0",
84
- "@redocly/portal-types": "1.0.1"
84
+ "@redocly/portal-types": "1.0.2"
85
85
  },
86
86
  "dependencies": {
87
87
  "@redocly/ajv": "^8.11.0",
@@ -3,14 +3,20 @@ import styled from 'styled-components';
3
3
 
4
4
  import { Link } from '@portal/Link';
5
5
 
6
- export const Breadcrumb = (props: { label: string; link?: string; isActive: boolean }) => {
7
- const { label, link, isActive } = props;
6
+ export const Breadcrumb = (props: {
7
+ label: string;
8
+ link?: string;
9
+ isActive: boolean;
10
+ onClick?: () => void;
11
+ }) => {
12
+ const { label, link, isActive, onClick } = props;
8
13
 
9
14
  return (
10
15
  <BreadcrumbWrapper
11
16
  data-component-name="Breadcrumbs/Breadcrumb"
12
17
  isLink={link != null}
13
18
  isActive={isActive}
19
+ onClick={onClick}
14
20
  >
15
21
  {link ? (
16
22
  <BreadcrumbLink to={link}>{label}</BreadcrumbLink>
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import { useBreadcrumbs } from '@portal/Sidebar/useBreadcrumbs';
5
+ import { telemetry } from '@portal/telemetry';
5
6
 
6
7
  import { Breadcrumb } from './Breadcrumb';
7
8
 
@@ -18,7 +19,18 @@ export const Breadcrumbs = (props: { className?: string }) => {
18
19
  const isLast = idx === breadcrumbs.length - 1;
19
20
  return (
20
21
  <React.Fragment key={idx}>
21
- <Breadcrumb link={breadcrumb.link} label={breadcrumb.label} isActive={isLast} />
22
+ <Breadcrumb
23
+ link={breadcrumb.link}
24
+ label={breadcrumb.label}
25
+ isActive={isLast}
26
+ onClick={() => {
27
+ telemetry.send('breadcrumb_clicked', {
28
+ link: breadcrumb.link,
29
+ position: idx + 1,
30
+ total_breadcrumbs: breadcrumbs.length,
31
+ });
32
+ }}
33
+ />
22
34
  {isLast ? null : <div>/</div>}
23
35
  </React.Fragment>
24
36
  );
@@ -102,12 +102,14 @@ const StyledButton = styled.button.attrs(
102
102
  `
103
103
  : variant === 'text'
104
104
  ? css`
105
- border-color: transparent;
106
- background-color: transparent;
105
+ color: var(--button-color);
106
+ border-color: var(--button-border-color);
107
+ background-color: var(--button-background-color);
107
108
 
108
109
  &:hover {
109
- border-color: transparent;
110
- background-color: transparent;
110
+ color: var(--button-hover-color);
111
+ border-color: var(--button-hover-border-color);
112
+ background-color: var(--button-hover-background-color);
111
113
  box-shadow: none;
112
114
  }
113
115
  `