@redocly/theme 0.82.2-rc.2 → 0.82.4-rc.1

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 (243) hide show
  1. package/lib/components/Badge/Badge.d.ts +8 -5
  2. package/lib/components/Badge/Badge.js +9 -3
  3. package/lib/components/Breadcrumbs/Breadcrumb.d.ts +1 -1
  4. package/lib/components/Breadcrumbs/Breadcrumb.js +2 -2
  5. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  6. package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -2
  7. package/lib/components/Button/Button.js +1 -1
  8. package/lib/components/Buttons/CopyButton.d.ts +2 -2
  9. package/lib/components/Buttons/CopyButton.js +3 -3
  10. package/lib/components/Buttons/EditPageButton.d.ts +2 -3
  11. package/lib/components/Buttons/EditPageButton.js +2 -2
  12. package/lib/components/Buttons/EmailButton.d.ts +4 -5
  13. package/lib/components/Buttons/EmailButton.js +2 -2
  14. package/lib/components/Buttons/NewTabButton.d.ts +4 -5
  15. package/lib/components/Buttons/NewTabButton.js +2 -2
  16. package/lib/components/Catalog/Catalog.d.ts +3 -2
  17. package/lib/components/Catalog/Catalog.js +1 -5
  18. package/lib/components/Catalog/CatalogActions.d.ts +1 -2
  19. package/lib/components/Catalog/CatalogCard.d.ts +1 -2
  20. package/lib/components/Catalog/CatalogCard.js +4 -5
  21. package/lib/components/Catalog/CatalogHighlight.d.ts +1 -2
  22. package/lib/components/Catalog/CatalogInfoBlock.d.ts +1 -2
  23. package/lib/components/CodeBlock/CodeBlock.js +1 -1
  24. package/lib/components/CodeBlock/CodeBlockContainer.d.ts +14 -5
  25. package/lib/components/CodeBlock/CodeBlockContainer.js +9 -4
  26. package/lib/components/CodeBlock/CodeBlockControls.js +2 -0
  27. package/lib/components/CodeBlock/CodeBlockTabs.d.ts +1 -2
  28. package/lib/components/CodeBlock/variables.js +2 -2
  29. package/lib/components/ColorModeSwitcher/ColorModeIcon.d.ts +4 -8
  30. package/lib/components/ColorModeSwitcher/ColorModeIcon.js +5 -3
  31. package/lib/components/ColorModeSwitcher/ColorModeSwitcher.d.ts +1 -2
  32. package/lib/components/DatePicker/DatePicker.d.ts +2 -3
  33. package/lib/components/Dropdown/Dropdown.d.ts +2 -3
  34. package/lib/components/Dropdown/Dropdown.js +10 -5
  35. package/lib/components/Dropdown/DropdownMenu.d.ts +1 -2
  36. package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -2
  37. package/lib/components/Dropdown/DropdownMenuItem.js +22 -5
  38. package/lib/components/Dropdown/variables.js +5 -1
  39. package/lib/components/Feedback/Comment.d.ts +2 -1
  40. package/lib/components/Feedback/Comment.js +3 -3
  41. package/lib/components/Feedback/Mood.js +4 -4
  42. package/lib/components/Feedback/Rating.js +1 -1
  43. package/lib/components/Feedback/ReportDialog.js +1 -1
  44. package/lib/components/Feedback/Scale.js +1 -1
  45. package/lib/components/Feedback/Sentiment.js +3 -3
  46. package/lib/components/Filter/FilterContent.d.ts +1 -3
  47. package/lib/components/Filter/FilterContent.js +4 -4
  48. package/lib/components/Filter/FilterInput.d.ts +1 -2
  49. package/lib/components/Filter/FilterOption.d.ts +8 -4
  50. package/lib/components/Filter/FilterOption.js +7 -4
  51. package/lib/components/Filter/FilterOptionLabel.d.ts +5 -3
  52. package/lib/components/Filter/FilterOptionLabel.js +6 -3
  53. package/lib/components/Filter/FilterOptions.d.ts +5 -3
  54. package/lib/components/Filter/FilterOptions.js +6 -3
  55. package/lib/components/Filter/FilterPopover.d.ts +1 -2
  56. package/lib/components/Filter/FilterSelect.js +1 -4
  57. package/lib/components/Filter/FilterTitle.d.ts +5 -3
  58. package/lib/components/Filter/FilterTitle.js +6 -3
  59. package/lib/components/Filter/variables.js +2 -1
  60. package/lib/components/Footer/Footer.d.ts +1 -2
  61. package/lib/components/Footer/FooterColumn.d.ts +1 -2
  62. package/lib/components/Footer/FooterCopyright.d.ts +1 -2
  63. package/lib/components/Footer/FooterItem.d.ts +1 -2
  64. package/lib/components/Footer/FooterLogo.d.ts +3 -4
  65. package/lib/components/Footer/FooterLogo.js +6 -1
  66. package/lib/components/Image/Image.d.ts +2 -2
  67. package/lib/components/JsonViewer/JsonViewer.d.ts +2 -2
  68. package/lib/components/LanguagePicker/LanguagePicker.d.ts +1 -2
  69. package/lib/components/LanguagePicker/LanguagePicker.js +5 -2
  70. package/lib/components/LanguagePicker/variables.js +4 -1
  71. package/lib/components/LastUpdated/LastUpdated.d.ts +1 -1
  72. package/lib/components/Link/Link.d.ts +1 -1
  73. package/lib/components/Loading/Loading.d.ts +2 -2
  74. package/lib/components/Logo/Logo.d.ts +1 -2
  75. package/lib/components/Markdown/Markdown.d.ts +12 -0
  76. package/lib/components/Markdown/Markdown.js +12 -13
  77. package/lib/components/Markdown/variables.js +10 -5
  78. package/lib/components/Menu/Menu.d.ts +1 -2
  79. package/lib/components/Menu/MenuContainer.d.ts +4 -4
  80. package/lib/components/Menu/MenuContainer.js +10 -3
  81. package/lib/components/Menu/MenuMobile.d.ts +1 -2
  82. package/lib/components/Menu/variables.js +2 -0
  83. package/lib/components/Navbar/NavbarItem.d.ts +1 -2
  84. package/lib/components/Navbar/NavbarItem.js +1 -1
  85. package/lib/components/Navbar/NavbarLogo.d.ts +3 -4
  86. package/lib/components/Navbar/NavbarLogo.js +6 -3
  87. package/lib/components/Navbar/NavbarMenu.d.ts +1 -2
  88. package/lib/components/PageNavigation/NextButton.d.ts +1 -2
  89. package/lib/components/PageNavigation/PageNavigation.d.ts +1 -2
  90. package/lib/components/PageNavigation/PreviousButton.d.ts +1 -2
  91. package/lib/components/Panel/Panel.d.ts +1 -2
  92. package/lib/components/Panel/PanelBody.d.ts +2 -3
  93. package/lib/components/Portal/Portal.d.ts +2 -3
  94. package/lib/components/Portal/Portal.js +2 -2
  95. package/lib/components/Product/Product.d.ts +1 -2
  96. package/lib/components/Product/ProductPicker.js +4 -1
  97. package/lib/components/Product/variables.js +4 -1
  98. package/lib/components/Search/Search.d.ts +1 -2
  99. package/lib/components/Search/SearchDialog.d.ts +1 -2
  100. package/lib/components/Search/SearchInput.d.ts +1 -2
  101. package/lib/components/Search/SearchItem.d.ts +1 -1
  102. package/lib/components/Search/SearchRecent.d.ts +1 -2
  103. package/lib/components/Search/SearchShortcut.d.ts +1 -2
  104. package/lib/components/Search/SearchSuggestedPages.d.ts +1 -2
  105. package/lib/components/Search/SearchTrigger.d.ts +1 -2
  106. package/lib/components/Search/variables.js +2 -2
  107. package/lib/components/Segmented/Segmented.d.ts +1 -1
  108. package/lib/components/Select/Select.d.ts +3 -3
  109. package/lib/components/Sidebar/Sidebar.d.ts +1 -2
  110. package/lib/components/SidebarActions/ChangeViewButton.d.ts +2 -3
  111. package/lib/components/SidebarActions/SidebarActions.d.ts +2 -2
  112. package/lib/components/SidebarLogo/SidebarLogo.d.ts +3 -3
  113. package/lib/components/TableOfContent/TableOfContent.d.ts +1 -2
  114. package/lib/components/Tag/Tag.d.ts +1 -1
  115. package/lib/components/Tooltip/Tooltip.js +2 -2
  116. package/lib/components/Tooltip/variables.js +4 -0
  117. package/lib/components/Typography/H1.js +1 -1
  118. package/lib/components/Typography/H2.js +1 -1
  119. package/lib/components/Typography/H3.js +1 -1
  120. package/lib/components/Typography/H4.js +1 -1
  121. package/lib/components/UserMenu/UserAvatar.d.ts +1 -2
  122. package/lib/components/UserMenu/UserInfoMenuItem.d.ts +1 -2
  123. package/lib/components/UserMenu/UserMenu.d.ts +1 -2
  124. package/lib/components/UserMenu/UserMenu.js +4 -1
  125. package/lib/components/UserMenu/UserMenuMobile.d.ts +1 -2
  126. package/lib/components/UserMenu/variables.js +4 -1
  127. package/lib/components/VersionPicker/VersionPicker.d.ts +1 -1
  128. package/lib/core/types/catalog.d.ts +3 -0
  129. package/lib/core/types/hooks.d.ts +3 -1
  130. package/lib/layouts/DocumentationLayout.js +7 -0
  131. package/lib/layouts/NotFound.js +2 -2
  132. package/lib/layouts/RootLayout.d.ts +2 -3
  133. package/lib/markdoc/components/InlineSvg/InlineSvg.d.ts +2 -1
  134. package/lib/markdoc/components/InlineSvg/InlineSvg.js +2 -2
  135. package/lib/markdoc/components/Tabs/variables.js +5 -5
  136. package/package.json +4 -4
  137. package/src/components/Badge/Badge.tsx +13 -3
  138. package/src/components/Breadcrumbs/Breadcrumb.tsx +2 -2
  139. package/src/components/Breadcrumbs/Breadcrumbs.tsx +2 -2
  140. package/src/components/Button/Button.tsx +5 -1
  141. package/src/components/Buttons/CopyButton.tsx +7 -5
  142. package/src/components/Buttons/EditPageButton.tsx +3 -3
  143. package/src/components/Buttons/EmailButton.tsx +4 -4
  144. package/src/components/Buttons/NewTabButton.tsx +7 -4
  145. package/src/components/Catalog/Catalog.tsx +5 -7
  146. package/src/components/Catalog/CatalogActions.tsx +1 -1
  147. package/src/components/Catalog/CatalogCard.tsx +23 -24
  148. package/src/components/Catalog/CatalogHighlight.tsx +1 -1
  149. package/src/components/Catalog/CatalogInfoBlock.tsx +1 -1
  150. package/src/components/CodeBlock/CodeBlock.tsx +1 -1
  151. package/src/components/CodeBlock/CodeBlockContainer.tsx +19 -6
  152. package/src/components/CodeBlock/CodeBlockControls.tsx +2 -0
  153. package/src/components/CodeBlock/CodeBlockTabs.tsx +1 -1
  154. package/src/components/CodeBlock/variables.ts +2 -2
  155. package/src/components/ColorModeSwitcher/ColorModeIcon.tsx +8 -4
  156. package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +1 -1
  157. package/src/components/DatePicker/DatePicker.tsx +2 -2
  158. package/src/components/Dropdown/Dropdown.tsx +14 -8
  159. package/src/components/Dropdown/DropdownMenu.tsx +1 -1
  160. package/src/components/Dropdown/DropdownMenuItem.tsx +25 -6
  161. package/src/components/Dropdown/variables.ts +5 -1
  162. package/src/components/Feedback/Comment.tsx +4 -2
  163. package/src/components/Feedback/Mood.tsx +5 -4
  164. package/src/components/Feedback/Rating.tsx +1 -1
  165. package/src/components/Feedback/ReportDialog.tsx +1 -0
  166. package/src/components/Feedback/Scale.tsx +1 -1
  167. package/src/components/Feedback/Sentiment.tsx +4 -3
  168. package/src/components/Filter/FilterContent.tsx +3 -3
  169. package/src/components/Filter/FilterInput.tsx +1 -1
  170. package/src/components/Filter/FilterOption.tsx +20 -4
  171. package/src/components/Filter/FilterOptionLabel.tsx +10 -3
  172. package/src/components/Filter/FilterOptions.tsx +10 -3
  173. package/src/components/Filter/FilterPopover.tsx +1 -1
  174. package/src/components/Filter/FilterSelect.tsx +1 -4
  175. package/src/components/Filter/FilterTitle.tsx +10 -3
  176. package/src/components/Filter/variables.ts +2 -1
  177. package/src/components/Footer/Footer.tsx +1 -1
  178. package/src/components/Footer/FooterColumn.tsx +1 -1
  179. package/src/components/Footer/FooterCopyright.tsx +1 -1
  180. package/src/components/Footer/FooterItem.tsx +1 -1
  181. package/src/components/Footer/FooterLogo.tsx +8 -1
  182. package/src/components/Image/Image.tsx +1 -1
  183. package/src/components/JsonViewer/JsonViewer.tsx +2 -2
  184. package/src/components/LanguagePicker/LanguagePicker.tsx +6 -3
  185. package/src/components/LanguagePicker/variables.ts +4 -1
  186. package/src/components/LastUpdated/LastUpdated.tsx +1 -1
  187. package/src/components/Link/Link.tsx +1 -1
  188. package/src/components/Loading/Loading.tsx +2 -2
  189. package/src/components/Logo/Logo.tsx +1 -1
  190. package/src/components/Markdown/Markdown.tsx +23 -14
  191. package/src/components/Markdown/variables.ts +10 -5
  192. package/src/components/Menu/Menu.tsx +1 -1
  193. package/src/components/Menu/MenuContainer.tsx +9 -5
  194. package/src/components/Menu/MenuMobile.tsx +1 -1
  195. package/src/components/Menu/variables.ts +2 -0
  196. package/src/components/Navbar/Navbar.tsx +1 -0
  197. package/src/components/Navbar/NavbarItem.tsx +2 -2
  198. package/src/components/Navbar/NavbarLogo.tsx +8 -3
  199. package/src/components/Navbar/NavbarMenu.tsx +1 -1
  200. package/src/components/PageNavigation/NextButton.tsx +1 -1
  201. package/src/components/PageNavigation/PageNavigation.tsx +1 -1
  202. package/src/components/PageNavigation/PreviousButton.tsx +1 -1
  203. package/src/components/Panel/Panel.tsx +1 -1
  204. package/src/components/Panel/PanelBody.ts +2 -2
  205. package/src/components/Portal/Portal.tsx +6 -3
  206. package/src/components/Product/Product.tsx +1 -1
  207. package/src/components/Product/ProductPicker.tsx +4 -1
  208. package/src/components/Product/variables.ts +4 -1
  209. package/src/components/Search/Search.tsx +1 -1
  210. package/src/components/Search/SearchDialog.tsx +1 -1
  211. package/src/components/Search/SearchInput.tsx +1 -1
  212. package/src/components/Search/SearchItem.tsx +1 -1
  213. package/src/components/Search/SearchRecent.tsx +1 -1
  214. package/src/components/Search/SearchShortcut.tsx +1 -1
  215. package/src/components/Search/SearchSuggestedPages.tsx +1 -1
  216. package/src/components/Search/SearchTrigger.tsx +1 -1
  217. package/src/components/Search/variables.ts +2 -2
  218. package/src/components/Segmented/Segmented.tsx +1 -1
  219. package/src/components/Select/Select.tsx +3 -3
  220. package/src/components/Sidebar/Sidebar.tsx +1 -1
  221. package/src/components/SidebarActions/ChangeViewButton.tsx +2 -2
  222. package/src/components/SidebarActions/SidebarActions.tsx +2 -2
  223. package/src/components/SidebarLogo/SidebarLogo.tsx +3 -3
  224. package/src/components/TableOfContent/TableOfContent.tsx +1 -1
  225. package/src/components/Tag/Tag.tsx +1 -1
  226. package/src/components/Tooltip/Tooltip.tsx +2 -2
  227. package/src/components/Tooltip/variables.ts +4 -0
  228. package/src/components/Typography/H1.ts +1 -1
  229. package/src/components/Typography/H2.ts +1 -1
  230. package/src/components/Typography/H3.ts +1 -1
  231. package/src/components/Typography/H4.ts +1 -1
  232. package/src/components/UserMenu/UserAvatar.tsx +1 -1
  233. package/src/components/UserMenu/UserInfoMenuItem.tsx +1 -1
  234. package/src/components/UserMenu/UserMenu.tsx +5 -2
  235. package/src/components/UserMenu/UserMenuMobile.tsx +1 -1
  236. package/src/components/UserMenu/variables.ts +4 -1
  237. package/src/core/types/catalog.ts +3 -1
  238. package/src/core/types/hooks.ts +3 -1
  239. package/src/layouts/DocumentationLayout.tsx +7 -0
  240. package/src/layouts/NotFound.tsx +3 -3
  241. package/src/layouts/RootLayout.tsx +2 -2
  242. package/src/markdoc/components/InlineSvg/InlineSvg.tsx +8 -1
  243. package/src/markdoc/components/Tabs/variables.ts +5 -5
@@ -13,6 +13,6 @@ exports.H1 = styled_components_1.default.h1.attrs(({ className }) => ({
13
13
  color: var(--h1-text-color);
14
14
  margin: var(--h1-margin-top) 0 var(--h1-margin-bottom);
15
15
 
16
- ${(0, utils_1.typography)('h1', 'h')};
16
+ ${(0, utils_1.typography)('h1')};
17
17
  `;
18
18
  //# sourceMappingURL=H1.js.map
@@ -13,6 +13,6 @@ exports.H2 = styled_components_1.default.h2.attrs(({ className }) => ({
13
13
  color: var(--h2-text-color);
14
14
  margin: var(--h2-margin-top) 0 var(--h2-margin-bottom);
15
15
 
16
- ${(0, utils_1.typography)('h2', 'h')};
16
+ ${(0, utils_1.typography)('h2')};
17
17
  `;
18
18
  //# sourceMappingURL=H2.js.map
@@ -13,6 +13,6 @@ exports.H3 = styled_components_1.default.h3.attrs(({ className }) => ({
13
13
  color: var(--h3-text-color);
14
14
  margin: var(--h3-margin-top) 0 var(--h3-margin-bottom);
15
15
 
16
- ${(0, utils_1.typography)('h3', 'h')};
16
+ ${(0, utils_1.typography)('h3')};
17
17
  `;
18
18
  //# sourceMappingURL=H3.js.map
@@ -13,6 +13,6 @@ exports.H4 = styled_components_1.default.h4.attrs(({ className }) => ({
13
13
  color: var(--h4-text-color);
14
14
  margin: var(--h4-margin-top) 0 var(--h4-margin-bottom);
15
15
 
16
- ${(0, utils_1.typography)('h4', 'h')};
16
+ ${(0, utils_1.typography)('h4')};
17
17
  `;
18
18
  //# sourceMappingURL=H4.js.map
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
- type UserAvatarProps = {
2
+ export type UserAvatarProps = {
3
3
  picture?: string;
4
4
  className?: string;
5
5
  height?: `var(${string})` | `${number}px`;
6
6
  width?: `var(${string})` | `${number}px`;
7
7
  };
8
8
  export declare function UserAvatar({ picture, className, height, width, }: UserAvatarProps): JSX.Element;
9
- export {};
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
- type UserInfoMenuItemProps = {
2
+ export type UserInfoMenuItemProps = {
3
3
  name: string;
4
4
  email?: string;
5
5
  picture?: string;
6
6
  className?: string;
7
7
  };
8
8
  export declare function UserInfoMenuItem({ name, picture, email, className, }: UserInfoMenuItemProps): JSX.Element;
9
- export {};
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- type UserMenuProps = {
2
+ export type UserMenuProps = {
3
3
  className?: string;
4
4
  };
5
5
  export declare function UserMenu({ className }: UserMenuProps): React.JSX.Element | null;
6
- export {};
@@ -72,7 +72,6 @@ const StyledDropdown = (0, styled_components_1.default)(Dropdown_1.Dropdown).att
72
72
  --dropdown-menu-padding: var(--user-menu-dropdown-padding);
73
73
  --dropdown-menu-border-radius: var(--user-menu-dropdown-border-radius);
74
74
  --dropdown-menu-box-shadow: var(--user-menu-dropdown-box-shadow);
75
- --dropdown-menu-color-disabled: var(--user-menu-dropdown-color-disabled);
76
75
  --dropdown-menu-border-color: var(--user-menu-dropdown-border-color);
77
76
  --dropdown-menu-bg-color: var(--user-menu-dropdown-bg-color);
78
77
  --dropdown-menu-item-padding-horizontal: var(--user-menu-dropdown-item-padding-horizontal);
@@ -84,9 +83,13 @@ const StyledDropdown = (0, styled_components_1.default)(Dropdown_1.Dropdown).att
84
83
  --dropdown-menu-item-border-radius: var(--user-menu-dropdown-item-border-radius);
85
84
  --dropdown-menu-item-bg-color-active: var(--user-menu-dropdown-item-bg-color-active);
86
85
  --dropdown-menu-item-bg-color-hover: var(--user-menu-dropdown-item-bg-color-hover);
86
+ --dropdown-menu-item-bg-color-disabled: var(--user-menu-dropdown-item-bg-color-disabled);
87
87
  --dropdown-menu-item-separator-border-color: var(
88
88
  --user-menu-dropdown-item-separator-border-color
89
89
  );
90
90
  --dropdown-menu-item-color-dangerous: var(--user-menu-dropdown-item-color-dangerous);
91
+ --dropdown-menu-item-color-disabled: var(--user-menu-dropdown-item-color-disabled);
92
+ --dropdown-menu-item-color-active: var(--user-menu-dropdown-item-color-active);
93
+ --dropdown-menu-item-color-hover: var(--user-menu-dropdown-item-color-hover);
91
94
  `;
92
95
  //# sourceMappingURL=UserMenu.js.map
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- type UserMenuMobileProps = {
2
+ export type UserMenuMobileProps = {
3
3
  className?: string;
4
4
  };
5
5
  export declare function UserMenuMobile({ className }: UserMenuMobileProps): JSX.Element | null;
6
- export {};
@@ -44,7 +44,6 @@ exports.userMenu = (0, styled_components_1.css) `
44
44
  --user-menu-dropdown-padding: var(--dropdown-menu-padding ); // @presenter Spacing
45
45
  --user-menu-dropdown-border-radius: var(--dropdown-menu-border-radius); // @presenter BorderRadius
46
46
  --user-menu-dropdown-box-shadow: var(--dropdown-menu-box-shadow); // @presenter Shadow
47
- --user-menu-dropdown-color-disabled: var(--dropdown-menu-color-disabled); // @presenter Color
48
47
  --user-menu-dropdown-border-color: var(--dropdown-menu-border-color); // @presenter Color
49
48
  --user-menu-dropdown-bg-color: var(--dropdown-menu-bg-color); // @presenter Color
50
49
 
@@ -55,8 +54,12 @@ exports.userMenu = (0, styled_components_1.css) `
55
54
  --user-menu-dropdown-item-border-radius: var(--dropdown-menu-item-border-radius ); // @presenter BorderRadius
56
55
  --user-menu-dropdown-item-bg-color-active: var(--dropdown-menu-item-bg-color-active); // @presenter Color
57
56
  --user-menu-dropdown-item-bg-color-hover: var(--dropdown-menu-item-bg-color-hover); // @presenter Color
57
+ --user-menu-dropdown-item-bg-color-disabled: var(--dropdown-menu-item-bg-color-disabled); // @presenter Color
58
58
  --user-menu-dropdown-item-separator-border-color: var(--dropdown-menu-item-separator-border-color); // @presenter Color
59
59
  --user-menu-dropdown-item-color-dangerous: var(--dropdown-menu-item-color-dangerous);
60
+ --user-menu-dropdown-item-color-disabled: var(--dropdown-menu-item-color-disabled);
61
+ --user-menu-dropdown-item-color-active: var(--dropdown-menu-item-color-active);
62
+ --user-menu-dropdown-item-color-hover: var(--dropdown-menu-item-color-hover);
60
63
  --user-menu-dropdown-item-border-color-focused: var(--dropdown-menu-item-border-color-focused);
61
64
 
62
65
  // @tokens End
@@ -7,4 +7,4 @@ export declare function VersionPicker(props: {
7
7
  versions?: Version[];
8
8
  onChange: (v: Version) => void;
9
9
  }): React.JSX.Element | null;
10
- export declare const VersionPickerSelect: import("styled-components").StyledComponent<typeof Select, any, SelectProps<any>, never>;
10
+ export declare const VersionPickerSelect: import("styled-components").StyledComponent<typeof Select, any, SelectProps, never>;
@@ -39,5 +39,8 @@ export type CatalogItem = {
39
39
  }>;
40
40
  scoreCardSlug?: string;
41
41
  tags?: unknown[];
42
+ versions?: CatalogItem[];
43
+ version?: string;
44
+ versionFolderId?: string;
42
45
  [k: string]: unknown;
43
46
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { ResolvedNavItemWithLink, Version } from '@redocly/config';
2
+ import type { PageProps, ResolvedNavItemWithLink, Version } from '@redocly/config';
3
3
  import type { Callback, TFunction as TFunc } from 'i18next';
4
4
  import type { To, Location } from 'react-router-dom';
5
5
  import type { CatalogConfig, ProductUiConfig } from '../../config';
@@ -60,6 +60,8 @@ export type ThemeHooks = {
60
60
  useTelemetry: () => {
61
61
  send(action: TelemetryEvent, data: unknown): void;
62
62
  };
63
+ useUserTeams: () => string[];
64
+ usePageProps: <T extends Record<string, unknown>>() => PageProps & T;
63
65
  };
64
66
  export type I18nConfig = {
65
67
  currentLocale: string;
@@ -35,6 +35,13 @@ const LayoutWrapper = styled_components_1.default.div.attrs(({ className }) => (
35
35
  width: 100%;
36
36
  `;
37
37
  const ContentWrapper = styled_components_1.default.section `
38
+ --md-content-font-size: var(--font-size-lg);
39
+ --md-content-line-height: var(--line-height-lg);
40
+ --md-table-font-size: var(--md-content-font-size);
41
+ --md-table-line-height: var(--md-content-line-height);
42
+ --md-tabs-content-font-size: var(--md-content-font-size);
43
+ --md-tabs-content-line-height: var(--md-content-line-height);
44
+
38
45
  max-width: var(--md-content-max-width);
39
46
  width: 90%;
40
47
  margin: 0 auto;
@@ -12,14 +12,14 @@ const ArrowLeftIcon_1 = require("../icons/ArrowLeftIcon/ArrowLeftIcon");
12
12
  function NotFound() {
13
13
  const { useTranslate } = (0, hooks_1.useThemeHooks)();
14
14
  const { translate } = useTranslate();
15
- return (react_1.default.createElement(Wrapper, { "data-component-name": "Pages/NotFound" },
15
+ return (react_1.default.createElement(NotFoundWrapper, { "data-component-name": "Pages/NotFound" },
16
16
  react_1.default.createElement(StatusText, null, "404"),
17
17
  react_1.default.createElement(Title, { "data-translation-key": "theme.page.notFound.title" }, translate('theme.page.notFound.title', 'Something went missing...')),
18
18
  react_1.default.createElement(Description, { "data-translation-key": "theme.page.notFound.description" }, translate('theme.page.notFound.description', "The page you were trying to reach doesn't exist or may have been moved. You can go back to the previous page, return to the homepage, or use the search bar to find what you're looking for.")),
19
19
  react_1.default.createElement(Button_1.Button, { variant: "primary", size: "large", to: "/", "data-translation-key": "theme.page.homeButton", icon: react_1.default.createElement(ArrowLeftIcon_1.ArrowLeftIcon, null) }, translate('theme.page.homeButton', 'Go home'))));
20
20
  }
21
21
  exports.NotFound = NotFound;
22
- const Wrapper = styled_components_1.default.div `
22
+ const NotFoundWrapper = styled_components_1.default.div `
23
23
  height: 100%;
24
24
  max-width: var(--page-404-max-width);
25
25
  display: flex;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- interface LayoutConfig {
2
+ export type LayoutConfig = {
3
3
  children: React.ReactNode;
4
- }
4
+ };
5
5
  export declare function RootLayout({ children }: LayoutConfig): JSX.Element;
6
- export {};
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare function InlineSvg({ fileRawContent }: {
2
+ export declare function InlineSvg({ fileRawContent, className, }: {
3
3
  fileRawContent: string;
4
+ className?: string;
4
5
  }): React.JSX.Element;
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.InlineSvg = void 0;
27
27
  const React = __importStar(require("react"));
28
- function InlineSvg({ fileRawContent }) {
29
- return (React.createElement("span", { "data-component-name": "Markdoc/InlineSvg/InlineSvg", dangerouslySetInnerHTML: { __html: fileRawContent } }));
28
+ function InlineSvg({ fileRawContent, className, }) {
29
+ return (React.createElement("span", { className: className, "data-component-name": "Markdoc/InlineSvg/InlineSvg", dangerouslySetInnerHTML: { __html: fileRawContent } }));
30
30
  }
31
31
  exports.InlineSvg = InlineSvg;
32
32
  //# sourceMappingURL=InlineSvg.js.map
@@ -8,8 +8,8 @@ exports.markdownTabs = (0, styled_components_1.css) `
8
8
  */
9
9
 
10
10
  --md-tabs-container-text-color: inherit; // @presenter Color
11
- --md-tabs-container-font-size: var(--font-size-base); // @presenter FontSize
12
- --md-tabs-container-font-family: var(--font-size-base); // @presenter FontFamily
11
+ --md-tabs-container-font-size: var(--md-content-font-size); // @presenter FontSize
12
+ --md-tabs-container-font-family: var(--md-content-font-family); // @presenter FontFamily
13
13
  --md-tabs-container-font-style: normal; // @presenter FontStyle
14
14
  --md-tabs-container-font-weight: var(--font-weight-regular); // @presenter FontWeight
15
15
  --md-tabs-container-bg-color: inherit; // @presenter Color
@@ -22,8 +22,8 @@ exports.markdownTabs = (0, styled_components_1.css) `
22
22
  --md-tabs-padding: 0; // @presenter Spacing
23
23
 
24
24
  --md-tabs-content-text-color: inherit; // @presenter Color
25
- --md-tabs-content-font-size: var(--font-size-base); // @presenter FontSize
26
- --md-tabs-content-font-family: var(--font-size-base); // @presenter FontFamily
25
+ --md-tabs-content-font-size: var(--md-content-font-size); // @presenter FontSize
26
+ --md-tabs-content-font-family: var(--md-content-font-family); // @presenter FontFamily
27
27
  --md-tabs-content-font-style: normal; // @presenter FontStyle
28
28
  --md-tabs-content-font-weight: var(--font-weight-regular); // @presenter FontWeight
29
29
  --md-tabs-content-bg-color: inherit; // @presenter Color
@@ -33,7 +33,7 @@ exports.markdownTabs = (0, styled_components_1.css) `
33
33
 
34
34
  --md-tabs-tab-text-color: var(--text-color-primary); // @presenter Color
35
35
  --md-tabs-tab-font-size: var(--font-size-lg); // @presenter FontSize
36
- --md-tabs-tab-font-family: var(--font-size-base); // @presenter FontFamily
36
+ --md-tabs-tab-font-family: var(--md-content-font-family); // @presenter FontFamily
37
37
  --md-tabs-tab-font-style: normal; // @presenter FontStyle
38
38
  --md-tabs-tab-font-weight: var(--font-weight-bold); // @presenter FontWeight
39
39
  --md-tabs-tab-bg-color: none; // @presenter Color
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.82.2-rc.2",
3
+ "version": "0.82.4-rc.1",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -72,7 +72,7 @@
72
72
  "json-schema-to-ts": "2.7.2",
73
73
  "lodash.throttle": "4.1.1",
74
74
  "npm-run-all2": "5.0.2",
75
- "react-refresh": "0.14.0",
75
+ "react-refresh": "0.14.2",
76
76
  "react-router-dom": "6.21.1",
77
77
  "rimraf": "5.0.5",
78
78
  "storybook": "7.6.4",
@@ -87,7 +87,7 @@
87
87
  "tsconfig-paths": "4.2.0",
88
88
  "tsconfig-paths-webpack-plugin": "3.5.2",
89
89
  "typescript": "5.2.2",
90
- "webpack": "5.88.2"
90
+ "webpack": "5.91.0"
91
91
  },
92
92
  "dependencies": {
93
93
  "copy-to-clipboard": "^3.3.3",
@@ -98,7 +98,7 @@
98
98
  "timeago.js": "^4.0.2",
99
99
  "i18next": "^22.4.12",
100
100
  "nprogress": "^0.2.0",
101
- "@redocly/config": "0.82.2-rc.2"
101
+ "@redocly/config": "0.82.4-rc.1"
102
102
  },
103
103
  "scripts": {
104
104
  "start": "npm-run-all --parallel storybook storybook:tokens:watch",
@@ -1,8 +1,18 @@
1
+ import React, { type PropsWithChildren } from 'react';
1
2
  import styled, { css } from 'styled-components';
2
3
 
3
- export const Badge = styled.span.attrs({
4
- 'data-component-name': 'Badge/Badge',
5
- })<{ deprecated?: boolean }>`
4
+ export type BadgeProps = PropsWithChildren<{
5
+ deprecated?: boolean;
6
+ color?: string;
7
+ key?: string;
8
+ className?: string;
9
+ }>;
10
+
11
+ export function Badge(props: BadgeProps): JSX.Element {
12
+ return <BadgeComponent {...props} data-component-name="Badge/Badge" />;
13
+ }
14
+
15
+ const BadgeComponent = styled.span<BadgeProps>`
6
16
  display: inline-block;
7
17
  padding: 0 var(--spacing-xs);
8
18
  vertical-align: middle;
@@ -10,7 +10,7 @@ type BreadcrumbProps = {
10
10
  onClick?: () => void;
11
11
  };
12
12
 
13
- export const Breadcrumb = ({ label, link, isActive, onClick }: BreadcrumbProps): JSX.Element => {
13
+ export function Breadcrumb({ label, link, isActive, onClick }: BreadcrumbProps): JSX.Element {
14
14
  return (
15
15
  <BreadcrumbWrapper
16
16
  data-component-name="Breadcrumbs/Breadcrumb"
@@ -25,7 +25,7 @@ export const Breadcrumb = ({ label, link, isActive, onClick }: BreadcrumbProps):
25
25
  )}
26
26
  </BreadcrumbWrapper>
27
27
  );
28
- };
28
+ }
29
29
 
30
30
  const BreadcrumbText = styled.div`
31
31
  cursor: default;
@@ -4,7 +4,7 @@ import styled from 'styled-components';
4
4
  import { useThemeHooks } from '@redocly/theme/core/hooks';
5
5
  import { Breadcrumb } from '@redocly/theme/components/Breadcrumbs/Breadcrumb';
6
6
 
7
- export const Breadcrumbs = (props: { className?: string }) => {
7
+ export function Breadcrumbs(props: { className?: string }): JSX.Element | null {
8
8
  const { useBreadcrumbs, useTelemetry } = useThemeHooks();
9
9
  const telemetry = useTelemetry();
10
10
  const breadcrumbs = useBreadcrumbs();
@@ -37,7 +37,7 @@ export const Breadcrumbs = (props: { className?: string }) => {
37
37
  })}
38
38
  </BreadcrumbsWrapper>
39
39
  );
40
- };
40
+ }
41
41
 
42
42
  const BreadcrumbsWrapper = styled.div`
43
43
  display: flex;
@@ -191,7 +191,11 @@ const ButtonComponent: React.FC<ButtonProps> = (props) => {
191
191
  );
192
192
 
193
193
  if (props.to) {
194
- return <StyledButtonLink to={props.to}>{button}</StyledButtonLink>;
194
+ return (
195
+ <StyledButtonLink to={props.to} onClick={props.onClick}>
196
+ {button}
197
+ </StyledButtonLink>
198
+ );
195
199
  } else {
196
200
  return button;
197
201
  }
@@ -9,7 +9,7 @@ import { Button } from '@redocly/theme/components/Button/Button';
9
9
  import { CopyIcon } from '@redocly/theme/icons/CopyIcon/CopyIcon';
10
10
  import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
11
11
 
12
- type CopyButtonProps = {
12
+ export type CopyButtonProps = {
13
13
  data: unknown;
14
14
  type?: ControlItemType;
15
15
  toasterPlacement?: TooltipProps['placement'];
@@ -19,9 +19,10 @@ type CopyButtonProps = {
19
19
  onCopyClick?: (e: React.MouseEvent<HTMLElement>) => void;
20
20
  dataTestId?: string;
21
21
  className?: string;
22
+ variant?: string;
22
23
  };
23
24
 
24
- const CopyButtonComponent = ({
25
+ function CopyButtonComponent({
25
26
  data,
26
27
  type = 'icon',
27
28
  toasterPlacement = 'top',
@@ -31,7 +32,8 @@ const CopyButtonComponent = ({
31
32
  onCopyClick,
32
33
  dataTestId = 'copy-button',
33
34
  className,
34
- }: CopyButtonProps): JSX.Element => {
35
+ variant = 'text',
36
+ }: CopyButtonProps): JSX.Element {
35
37
  const { useTranslate } = useThemeHooks();
36
38
  const tooltip = useControl();
37
39
  const { translate } = useTranslate();
@@ -64,12 +66,12 @@ const CopyButtonComponent = ({
64
66
  data-testid={dataTestId}
65
67
  icon={type === 'icon' ? <CopyIcon /> : undefined}
66
68
  size="small"
67
- variant="text"
69
+ variant={variant}
68
70
  >
69
71
  {type !== 'icon' && translate('theme.codeSnippet.copy.toasterText', buttonText || 'Copy')}
70
72
  </Button>
71
73
  </Tooltip>
72
74
  );
73
- };
75
+ }
74
76
 
75
77
  export const CopyButton = memo<CopyButtonProps>(CopyButtonComponent);
@@ -5,11 +5,11 @@ import { useThemeHooks } from '@redocly/theme/core/hooks';
5
5
  import { EditIcon } from '@redocly/theme/icons/EditIcon/EditIcon';
6
6
  import { Link } from '@redocly/theme/components/Link/Link';
7
7
 
8
- type EditPageButtonProps = {
8
+ export type EditPageButtonProps = {
9
9
  to: string;
10
10
  };
11
11
 
12
- export const EditPageButton = ({ to }: EditPageButtonProps): JSX.Element => {
12
+ export function EditPageButton({ to }: EditPageButtonProps): JSX.Element {
13
13
  const { useTranslate, useTelemetry } = useThemeHooks();
14
14
  const { translate } = useTranslate();
15
15
  const telemetry = useTelemetry();
@@ -26,7 +26,7 @@ export const EditPageButton = ({ to }: EditPageButtonProps): JSX.Element => {
26
26
  </ButtonText>
27
27
  </EditPageButtonWrapper>
28
28
  );
29
- };
29
+ }
30
30
 
31
31
  const EditPageButtonWrapper = styled(Link)`
32
32
  height: fit-content;
@@ -3,12 +3,12 @@ import React from 'react';
3
3
  import { Button } from '@redocly/theme/components/Button/Button';
4
4
  import { EmailIcon } from '@redocly/theme/icons/EmailIcon/EmailIcon';
5
5
 
6
- interface EmailButtonProps {
6
+ export type EmailButtonProps = {
7
7
  data: string;
8
8
  dataTestId?: string;
9
- }
9
+ };
10
10
 
11
- export const EmailButton = ({ data, dataTestId = 'email-button' }: EmailButtonProps) => {
11
+ export function EmailButton({ data, dataTestId = 'email-button' }: EmailButtonProps): JSX.Element {
12
12
  const onClick = () => {
13
13
  window.location.href = `mailto:${data}`;
14
14
  };
@@ -25,4 +25,4 @@ export const EmailButton = ({ data, dataTestId = 'email-button' }: EmailButtonPr
25
25
  />
26
26
  </div>
27
27
  );
28
- };
28
+ }
@@ -3,12 +3,15 @@ import React from 'react';
3
3
  import { Button } from '@redocly/theme/components/Button/Button';
4
4
  import { ArrowUpRightIcon } from '@redocly/theme/icons/ArrowUpRightIcon/ArrowUpRightIcon';
5
5
 
6
- interface NewTabButtonProps {
6
+ export type NewTabButtonProps = {
7
7
  data: string;
8
8
  dataTestId?: string;
9
- }
9
+ };
10
10
 
11
- export const NewTabButton = ({ data, dataTestId = 'new-tab-button' }: NewTabButtonProps) => {
11
+ export function NewTabButton({
12
+ data,
13
+ dataTestId = 'new-tab-button',
14
+ }: NewTabButtonProps): JSX.Element {
12
15
  const onClick = () => {
13
16
  window.open(data, '_blank');
14
17
  };
@@ -25,4 +28,4 @@ export const NewTabButton = ({ data, dataTestId = 'new-tab-button' }: NewTabButt
25
28
  />
26
29
  </div>
27
30
  );
28
- };
31
+ }
@@ -12,15 +12,16 @@ import { FilterPopover } from '@redocly/theme/components/Filter/FilterPopover';
12
12
  import { HighlightContext } from '@redocly/theme/components/Catalog/CatalogHighlight';
13
13
  import { CatalogActions } from '@redocly/theme/components/Catalog/CatalogActions';
14
14
  import { Sidebar } from '@redocly/theme/components/Sidebar/Sidebar';
15
- import { MenuContainer } from '@redocly/theme/components/Menu/MenuContainer';
16
15
  import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
17
16
 
18
- export default function Catalog(props: {
17
+ export type CatalogProps = {
19
18
  pageProps: {
20
19
  catalogId: string;
21
20
  catalogConfig: CatalogConfig;
22
21
  };
23
- }): JSX.Element {
22
+ };
23
+
24
+ export default function Catalog(props: CatalogProps): JSX.Element {
24
25
  const { catalogConfig } = props.pageProps;
25
26
  const { useTranslate, useCatalog } = useThemeHooks();
26
27
 
@@ -184,8 +185,5 @@ const FiltersSidebar = styled(Sidebar)`
184
185
  @media screen and (min-width: ${breakpoints.medium}) {
185
186
  display: flex;
186
187
  }
187
-
188
- ${MenuContainer} {
189
- padding: 0;
190
- }
188
+ --menu-container-padding-top: 0;
191
189
  `;
@@ -9,7 +9,7 @@ import { Button } from '@redocly/theme/components/Button/Button';
9
9
  import { FilterIcon } from '@redocly/theme/icons/FilterIcon/FilterIcon';
10
10
  import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
11
11
 
12
- type CatalogActionsProps = {
12
+ export type CatalogActionsProps = {
13
13
  onOpenFilter: () => void;
14
14
  filters: ResolvedFilter[];
15
15
  filterTerm: string;
@@ -11,12 +11,13 @@ import { Tag } from '@redocly/theme/components/Tag/Tag';
11
11
  import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
12
12
  import { Button } from '@redocly/theme/components/Button/Button';
13
13
 
14
- type CatalogCardProps = { item: CatalogItem };
14
+ export type CatalogCardProps = {
15
+ item: CatalogItem;
16
+ };
15
17
 
16
18
  export function CatalogCard({ item }: CatalogCardProps): JSX.Element {
17
19
  const { useTelemetry } = useThemeHooks();
18
20
  const telemetry = useTelemetry();
19
- const hasTags = item.scorecardLevel || item.tags?.length;
20
21
  return (
21
22
  <Link key={item.docsLink || item.link} to={item.docsLink || item.link}>
22
23
  <StyledCard
@@ -34,28 +35,26 @@ export function CatalogCard({ item }: CatalogCardProps): JSX.Element {
34
35
  </CardDescription>
35
36
  </CardContent>
36
37
  <CardFooter>
37
- {hasTags && (
38
- <CardTags>
39
- {((item.tags as string[]) || []).map((tag, index) => (
40
- <CardTag key={tag + index} color={slug(tag)}>
41
- <CatalogHighlight>{capitalize(tag)}</CatalogHighlight>
42
- </CardTag>
43
- ))}
44
- {(item.scorecardLevel && (
45
- <Tag
46
- borderless
47
- withStatusDot
48
- statusDotColor={`var(${getScorecardColorVariable(
49
- item.scorecardLevelIdx || 0,
50
- Object.keys(item.scorecardLevels || {}).length,
51
- )})`}
52
- >
53
- <CatalogHighlight>{item.scorecardLevel}</CatalogHighlight>
54
- </Tag>
55
- )) ||
56
- null}
57
- </CardTags>
58
- )}
38
+ <CardTags>
39
+ {((item.tags as string[]) || []).map((tag, index) => (
40
+ <CardTag key={tag + index} color={slug(tag)}>
41
+ <CatalogHighlight>{capitalize(tag)}</CatalogHighlight>
42
+ </CardTag>
43
+ ))}
44
+ {(item.scorecardLevel && (
45
+ <Tag
46
+ borderless
47
+ withStatusDot
48
+ statusDotColor={`var(${getScorecardColorVariable(
49
+ item.scorecardLevelIdx || 0,
50
+ Object.keys(item.scorecardLevels || {}).length,
51
+ )})`}
52
+ >
53
+ <CatalogHighlight>{item.scorecardLevel}</CatalogHighlight>
54
+ </Tag>
55
+ )) ||
56
+ null}
57
+ </CardTags>
59
58
  <SelectButton size="medium" variant="secondary" icon={<ArrowRightIcon />} />
60
59
  </CardFooter>
61
60
  </StyledCard>
@@ -4,7 +4,7 @@ import styled from 'styled-components';
4
4
 
5
5
  export const HighlightContext = React.createContext<string[]>([]);
6
6
 
7
- type CatalogHighlightProps = React.PropsWithChildren;
7
+ export type CatalogHighlightProps = React.PropsWithChildren;
8
8
 
9
9
  export function CatalogHighlight(props: CatalogHighlightProps): JSX.Element | null {
10
10
  const { children } = props;
@@ -6,7 +6,7 @@ import { getScorecardColorVariable } from '@redocly/theme/core/utils';
6
6
  import { Tag } from '@redocly/theme/components/Tag/Tag';
7
7
  import { Link } from '@redocly/theme/components/Link/Link';
8
8
 
9
- type CatalogInfoBlockProps = {
9
+ export type CatalogInfoBlockProps = {
10
10
  metadata?: {
11
11
  scorecardLevel?: string;
12
12
  scoreCardSlug?: string;
@@ -69,7 +69,7 @@ export function CodeBlock({
69
69
  (source || externalSource?.sample?.get?.(externalSource)) ?? '',
70
70
  );
71
71
 
72
- const highlightedCode = highlightedHtml || children ? null : highlight(sourceCode, lang);
72
+ const highlightedCode = highlightedHtml || (children ? null : highlight(sourceCode, lang));
73
73
 
74
74
  // The same initial value should be returned for ssr and frontend to avoid issues
75
75
  // Because we don't have session storage in ssr and can't get the security details there