@redocly/theme 0.66.0 → 0.67.0-next.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 (201) hide show
  1. package/lib/components/Admonition/Admonition.js +9 -9
  2. package/lib/components/Badge/Badge.d.ts +1 -1
  3. package/lib/components/Badge/Badge.js +4 -4
  4. package/lib/components/Button/Button.d.ts +1 -1
  5. package/lib/components/Button/Button.js +16 -17
  6. package/lib/components/Buttons/AIAssistantButton.js +2 -0
  7. package/lib/components/Catalog/CatalogActionsRow.js +3 -1
  8. package/lib/components/Catalog/CatalogAvatar.d.ts +3 -1
  9. package/lib/components/Catalog/CatalogAvatar.js +3 -3
  10. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -4
  11. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +7 -7
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +6 -6
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -2
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -6
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +3 -5
  16. package/lib/components/Catalog/CatalogEntityTypeIcon.js +15 -11
  17. package/lib/components/Catalog/CatalogEntityTypeTag.js +5 -5
  18. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +5 -3
  19. package/lib/components/CatalogClassic/CatalogClassic.d.ts +4 -2
  20. package/lib/components/CatalogClassic/CatalogClassic.js +3 -1
  21. package/lib/components/CodeBlock/CodeBlockContainer.js +16 -4
  22. package/lib/components/CodeBlock/CodeBlockControls.d.ts +2 -1
  23. package/lib/components/CodeBlock/CodeBlockControls.js +9 -7
  24. package/lib/components/CodeBlock/CodeBlockTabs.js +2 -2
  25. package/lib/components/Dropdown/Dropdown.js +6 -6
  26. package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -1
  27. package/lib/components/Feedback/Comment.js +3 -3
  28. package/lib/components/Feedback/Mood.js +3 -3
  29. package/lib/components/Filter/FilterContent.js +2 -2
  30. package/lib/components/Footer/Footer.js +2 -2
  31. package/lib/components/Footer/FooterColumn.js +2 -2
  32. package/lib/components/Footer/FooterItem.js +5 -5
  33. package/lib/components/Image/Image.js +2 -2
  34. package/lib/components/LastUpdated/LastUpdated.js +2 -2
  35. package/lib/components/Link/Link.d.ts +2 -19
  36. package/lib/components/Link/Link.js +2 -9
  37. package/lib/components/Loaders/Loading.js +2 -2
  38. package/lib/components/Loaders/SpinnerLoader.js +4 -4
  39. package/lib/components/Markdown/Markdown.d.ts +7 -10
  40. package/lib/components/Markdown/Markdown.js +6 -3
  41. package/lib/components/Marker/Marker.js +3 -3
  42. package/lib/components/Menu/MenuContainer.d.ts +2 -2
  43. package/lib/components/Menu/MenuContainer.js +9 -11
  44. package/lib/components/Menu/MenuItem.js +14 -14
  45. package/lib/components/Menu/MenuMobile.js +8 -8
  46. package/lib/components/Navbar/NavbarItem.js +7 -7
  47. package/lib/components/PageNavigation/NavigationButton.js +3 -3
  48. package/lib/components/Panel/PanelBody.d.ts +5 -5
  49. package/lib/components/Panel/PanelBody.js +6 -3
  50. package/lib/components/Panel/PanelHeader.d.ts +2 -5
  51. package/lib/components/Panel/PanelHeader.js +6 -2
  52. package/lib/components/Search/SearchAiMessage.js +10 -8
  53. package/lib/components/Search/SearchDialog.js +6 -0
  54. package/lib/components/Search/SearchSuggestedPages.js +2 -2
  55. package/lib/components/Select/Select.js +3 -1
  56. package/lib/components/Select/SelectInput.d.ts +1 -0
  57. package/lib/components/Select/SelectInput.js +8 -8
  58. package/lib/components/Sidebar/Sidebar.d.ts +4 -2
  59. package/lib/components/Sidebar/Sidebar.js +10 -8
  60. package/lib/components/SidebarActions/styled.d.ts +6 -6
  61. package/lib/components/SidebarActions/styled.js +12 -4
  62. package/lib/components/StatusCode/StatusCode.d.ts +6 -4
  63. package/lib/components/StatusCode/StatusCode.js +8 -2
  64. package/lib/components/Switch/Switch.js +13 -13
  65. package/lib/components/TableOfContent/TableOfContent.js +2 -2
  66. package/lib/components/Tag/Tag.js +11 -11
  67. package/lib/components/Tooltip/AnchorTooltip.js +26 -25
  68. package/lib/components/Tooltip/JsTooltip.js +5 -5
  69. package/lib/components/Typography/CompactTypography.d.ts +27 -11
  70. package/lib/components/Typography/CompactTypography.js +2 -2
  71. package/lib/components/Typography/Typography.d.ts +6 -2
  72. package/lib/components/Typography/Typography.js +18 -3
  73. package/lib/components/UserMenu/UserAvatar.js +5 -5
  74. package/lib/core/contexts/ThemeDataContext.d.ts +1 -1
  75. package/lib/core/hooks/feedback/use-report-dialog.d.ts +8 -5
  76. package/lib/core/styles/global.js +1 -0
  77. package/lib/core/templates/Markdown.js +5 -6
  78. package/lib/core/types/index.d.ts +1 -0
  79. package/lib/core/types/link.d.ts +19 -0
  80. package/lib/core/types/link.js +3 -0
  81. package/lib/core/utils/details.d.ts +1 -1
  82. package/lib/core/utils/details.js +3 -0
  83. package/lib/core/utils/dom.d.ts +0 -1
  84. package/lib/core/utils/dom.js +0 -9
  85. package/lib/core/utils/index.d.ts +0 -1
  86. package/lib/core/utils/index.js +0 -1
  87. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.d.ts +1 -1
  88. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +6 -1
  89. package/lib/icons/AiStarsIcon/AiStarsIcon.d.ts +1 -1
  90. package/lib/icons/AiStarsIcon/AiStarsIcon.js +6 -1
  91. package/lib/icons/MagicWandIcon/MagicWandIcon.d.ts +23 -0
  92. package/lib/icons/MagicWandIcon/MagicWandIcon.js +25 -0
  93. package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.d.ts +25 -5
  94. package/lib/index.d.ts +1 -0
  95. package/lib/index.js +1 -0
  96. package/lib/layouts/DocumentationLayout.js +2 -2
  97. package/lib/layouts/ThreePanelLayout.d.ts +27 -7
  98. package/lib/layouts/ThreePanelLayout.js +11 -8
  99. package/lib/markdoc/components/CodeWalkthrough/CodeContainer.js +2 -2
  100. package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +2 -2
  101. package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.js +2 -2
  102. package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +4 -2
  103. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +6 -2
  104. package/lib/markdoc/components/Image/Image.js +3 -3
  105. package/lib/markdoc/components/Tabs/TabItemFragment.d.ts +9 -0
  106. package/lib/markdoc/components/Tabs/TabItemFragment.js +11 -0
  107. package/lib/markdoc/components/Tabs/TabList.d.ts +7 -4
  108. package/lib/markdoc/components/Tabs/TabList.js +6 -4
  109. package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -9
  110. package/lib/markdoc/components/Tabs/Tabs.js +12 -5
  111. package/lib/markdoc/components/default.d.ts +1 -0
  112. package/lib/markdoc/components/default.js +1 -0
  113. package/lib/markdoc/tags/tab.js +1 -1
  114. package/lib/markdoc/tags/tabs.js +1 -1
  115. package/package.json +2 -3
  116. package/src/components/Admonition/Admonition.tsx +11 -11
  117. package/src/components/Badge/Badge.tsx +11 -6
  118. package/src/components/Button/Button.tsx +51 -21
  119. package/src/components/Buttons/AIAssistantButton.tsx +2 -0
  120. package/src/components/Catalog/CatalogActionsRow.tsx +3 -1
  121. package/src/components/Catalog/CatalogAvatar.tsx +6 -10
  122. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -6
  123. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +14 -14
  124. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +11 -11
  125. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -4
  126. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +8 -11
  127. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +10 -9
  128. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +22 -16
  129. package/src/components/Catalog/CatalogEntityTypeTag.tsx +8 -8
  130. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +8 -6
  131. package/src/components/CatalogClassic/CatalogClassic.tsx +3 -1
  132. package/src/components/CodeBlock/CodeBlockContainer.tsx +23 -7
  133. package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
  134. package/src/components/CodeBlock/CodeBlockTabs.tsx +4 -4
  135. package/src/components/Dropdown/Dropdown.tsx +9 -9
  136. package/src/components/Dropdown/DropdownMenuItem.tsx +1 -1
  137. package/src/components/Feedback/Comment.tsx +5 -5
  138. package/src/components/Feedback/Mood.tsx +5 -5
  139. package/src/components/Filter/FilterContent.tsx +4 -4
  140. package/src/components/Filter/FilterPopover.tsx +1 -1
  141. package/src/components/Footer/Footer.tsx +4 -4
  142. package/src/components/Footer/FooterColumn.tsx +3 -3
  143. package/src/components/Footer/FooterItem.tsx +9 -9
  144. package/src/components/Image/Image.tsx +3 -3
  145. package/src/components/LastUpdated/LastUpdated.tsx +4 -4
  146. package/src/components/Link/Link.tsx +6 -51
  147. package/src/components/Loaders/Loading.tsx +3 -3
  148. package/src/components/Loaders/SpinnerLoader.tsx +5 -5
  149. package/src/components/Markdown/Markdown.tsx +7 -7
  150. package/src/components/Marker/Marker.tsx +4 -4
  151. package/src/components/Menu/MenuContainer.tsx +32 -16
  152. package/src/components/Menu/MenuItem.tsx +34 -29
  153. package/src/components/Menu/MenuMobile.tsx +12 -12
  154. package/src/components/Navbar/NavbarItem.tsx +13 -13
  155. package/src/components/PageNavigation/NavigationButton.tsx +4 -4
  156. package/src/components/Panel/PanelBody.tsx +7 -4
  157. package/src/components/Panel/PanelHeader.tsx +9 -4
  158. package/src/components/Search/SearchAiMessage.tsx +17 -15
  159. package/src/components/Search/SearchDialog.tsx +6 -0
  160. package/src/components/Search/SearchSuggestedPages.tsx +20 -5
  161. package/src/components/Select/Select.tsx +3 -1
  162. package/src/components/Select/SelectInput.tsx +10 -9
  163. package/src/components/Sidebar/Sidebar.tsx +15 -13
  164. package/src/components/SidebarActions/styled.ts +12 -4
  165. package/src/components/StatusCode/StatusCode.tsx +12 -4
  166. package/src/components/Switch/Switch.tsx +21 -21
  167. package/src/components/TableOfContent/TableOfContent.tsx +3 -3
  168. package/src/components/Tag/Tag.tsx +34 -27
  169. package/src/components/Tooltip/AnchorTooltip.tsx +50 -42
  170. package/src/components/Tooltip/JsTooltip.tsx +14 -13
  171. package/src/components/Typography/CompactTypography.tsx +4 -4
  172. package/src/components/Typography/Typography.tsx +21 -5
  173. package/src/components/UserMenu/UserAvatar.tsx +7 -7
  174. package/src/core/contexts/ThemeDataContext.tsx +1 -1
  175. package/src/core/hooks/feedback/use-report-dialog.ts +1 -5
  176. package/src/core/styles/dark.ts +1 -1
  177. package/src/core/styles/global.ts +1 -0
  178. package/src/core/templates/Markdown.tsx +6 -7
  179. package/src/core/types/index.ts +1 -0
  180. package/src/core/types/link.ts +20 -0
  181. package/src/core/utils/details.ts +4 -0
  182. package/src/core/utils/dom.ts +0 -8
  183. package/src/core/utils/index.ts +0 -1
  184. package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +9 -3
  185. package/src/icons/AiStarsIcon/AiStarsIcon.tsx +9 -3
  186. package/src/icons/MagicWandIcon/MagicWandIcon.tsx +26 -0
  187. package/src/icons/ReturnKeyIcon/ReturnKeyIcon.tsx +1 -1
  188. package/src/index.ts +1 -0
  189. package/src/layouts/DocumentationLayout.tsx +3 -3
  190. package/src/layouts/ThreePanelLayout.tsx +27 -14
  191. package/src/markdoc/components/CodeWalkthrough/CodeContainer.tsx +4 -4
  192. package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +4 -4
  193. package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +3 -3
  194. package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +6 -2
  195. package/src/markdoc/components/Image/Image.tsx +4 -4
  196. package/src/markdoc/components/Tabs/TabItemFragment.tsx +15 -0
  197. package/src/markdoc/components/Tabs/TabList.tsx +9 -6
  198. package/src/markdoc/components/Tabs/Tabs.tsx +21 -15
  199. package/src/markdoc/components/default.ts +1 -0
  200. package/src/markdoc/tags/tab.ts +1 -1
  201. package/src/markdoc/tags/tabs.ts +1 -1
@@ -48,7 +48,9 @@ export function CatalogActionsRow({
48
48
  );
49
49
  }
50
50
 
51
- export const CatalogActionsRowWrapper = styled.div<{ isDetailsPage: boolean }>`
51
+ export const CatalogActionsRowWrapper = styled.div.withConfig({
52
+ shouldForwardProp: (prop) => prop !== 'isDetailsPage',
53
+ })<{ isDetailsPage: boolean }>`
52
54
  display: flex;
53
55
  align-items: center;
54
56
 
@@ -1,6 +1,8 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import React from 'react';
3
3
 
4
+ type CatalogAvatarSize = 'small' | 'medium' | 'large';
5
+
4
6
  const extractInitials = (value: string): string => {
5
7
  const trimmed = value.trim();
6
8
  if (!trimmed) return '';
@@ -23,21 +25,15 @@ const extractInitials = (value: string): string => {
23
25
  return initials[0] + initials[initials.length - 1];
24
26
  };
25
27
 
26
- export function CatalogAvatar({
27
- value,
28
- size,
29
- }: {
30
- value: string;
31
- size: 'small' | 'medium' | 'large';
32
- }) {
28
+ export function CatalogAvatar({ value, size }: { value: string; size: CatalogAvatarSize }) {
33
29
  return (
34
- <CatalogAvatarWrapper data-component-name="Catalog/CatalogAvatar" size={size}>
30
+ <CatalogAvatarWrapper data-component-name="Catalog/CatalogAvatar" $size={size}>
35
31
  {extractInitials(value)}
36
32
  </CatalogAvatarWrapper>
37
33
  );
38
34
  }
39
35
 
40
- const CatalogAvatarWrapper = styled.div<{ size: 'small' | 'medium' | 'large' }>`
36
+ const CatalogAvatarWrapper = styled.div<{ $size: CatalogAvatarSize }>`
41
37
  display: flex;
42
38
  align-items: center;
43
39
  justify-content: center;
@@ -46,7 +42,7 @@ const CatalogAvatarWrapper = styled.div<{ size: 'small' | 'medium' | 'large' }>`
46
42
  flex-shrink: 0;
47
43
  font-weight: var(--catalog-avatar-font-weight);
48
44
  line-height: var(--catalog-avatar-line-height);
49
- ${({ size }) => SIZES[size]};
45
+ ${({ $size }) => SIZES[$size]};
50
46
  `;
51
47
 
52
48
  const SIZES = {
@@ -39,7 +39,7 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
39
39
  <HeaderIconWrapper>
40
40
  <CatalogEntityIcon entityType={entity.type} />
41
41
  </HeaderIconWrapper>
42
- <HeaderIconText entityType={entity.type}>{entity.type}</HeaderIconText>
42
+ <HeaderIconText $entityType={entity.type}>{entity.type}</HeaderIconText>
43
43
  </CardHeader>
44
44
 
45
45
  <CardDescription>
@@ -91,7 +91,7 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
91
91
 
92
92
  <Divider />
93
93
 
94
- <CardFooter hasTags={!!entity.tags?.length}>
94
+ <CardFooter $hasTags={!!entity.tags?.length}>
95
95
  <CatalogTags
96
96
  items={entity.tags || []}
97
97
  tagProps={{
@@ -128,8 +128,8 @@ const HeaderIconWrapper = styled.div`
128
128
  margin-right: var(--catalog-card-icon-margin-right);
129
129
  `;
130
130
 
131
- const HeaderIconText = styled.div<{ entityType: string }>`
132
- color: ${({ entityType }) => `var(--catalog-entity-icon-color-${entityType})`};
131
+ const HeaderIconText = styled.div<{ $entityType: string }>`
132
+ color: ${({ $entityType }) => `var(--catalog-entity-icon-color-${$entityType})`};
133
133
  `;
134
134
 
135
135
  const CardHeader = styled.div`
@@ -180,11 +180,11 @@ const CardContent = styled.div`
180
180
  padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
181
181
  `;
182
182
 
183
- const CardFooter = styled.div<{ hasTags: boolean }>`
183
+ const CardFooter = styled.div<{ $hasTags: boolean }>`
184
184
  height: var(--catalog-card-footer-height);
185
185
  display: flex;
186
186
  align-items: center;
187
- justify-content: ${({ hasTags }) => (hasTags ? 'space-between' : 'flex-end')};
187
+ justify-content: ${({ $hasTags }) => ($hasTags ? 'space-between' : 'flex-end')};
188
188
  padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
189
189
  `;
190
190
 
@@ -19,10 +19,10 @@ export function CatalogEntityRelationsNodeContent({
19
19
 
20
20
  return (
21
21
  <CatalogEntityRelationsNodeContentWrapper
22
- isRoot={isRoot}
22
+ $isRoot={isRoot}
23
23
  data-component-name="Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent"
24
24
  >
25
- <CatalogEntityRelationsNodeTypeRow isRoot={isRoot}>
25
+ <CatalogEntityRelationsNodeTypeRow $isRoot={isRoot}>
26
26
  {isRoot ? (
27
27
  <CatalogEntityIcon
28
28
  entityType={entityType}
@@ -33,36 +33,36 @@ export function CatalogEntityRelationsNodeContent({
33
33
  )}
34
34
  <span>{formattedEntityType}</span>
35
35
  </CatalogEntityRelationsNodeTypeRow>
36
- <CatalogEntityRelationsNodeLabelRow isRoot={isRoot}>
36
+ <CatalogEntityRelationsNodeLabelRow $isRoot={isRoot}>
37
37
  {label}
38
38
  </CatalogEntityRelationsNodeLabelRow>
39
39
  </CatalogEntityRelationsNodeContentWrapper>
40
40
  );
41
41
  }
42
42
 
43
- const CatalogEntityRelationsNodeTypeRow = styled.div<{ isRoot: boolean }>`
43
+ const CatalogEntityRelationsNodeTypeRow = styled.div<{ $isRoot: boolean }>`
44
44
  display: flex;
45
45
  align-items: center;
46
46
  gap: var(--catalog-entity-relations-node-gap);
47
47
  line-height: var(--line-height-sm);
48
48
  font-size: var(--font-size-sm);
49
- color: ${({ isRoot }) =>
50
- isRoot
49
+ color: ${({ $isRoot }) =>
50
+ $isRoot
51
51
  ? 'var(--catalog-entity-relations-node-root-text-color)'
52
52
  : 'var(--text-color-description)'};
53
53
  `;
54
54
 
55
- const CatalogEntityRelationsNodeLabelRow = styled.div<{ isRoot: boolean }>`
55
+ const CatalogEntityRelationsNodeLabelRow = styled.div<{ $isRoot: boolean }>`
56
56
  display: flex;
57
57
  align-items: center;
58
58
  gap: var(--catalog-entity-relations-node-gap);
59
59
  line-height: var(--line-height-lg);
60
60
  font-size: var(--font-size-lg);
61
- color: ${({ isRoot }) =>
62
- isRoot ? 'var(--catalog-entity-relations-node-root-text-color)' : 'var(--text-color-primary)'};
61
+ color: ${({ $isRoot }) =>
62
+ $isRoot ? 'var(--catalog-entity-relations-node-root-text-color)' : 'var(--text-color-primary)'};
63
63
  `;
64
64
 
65
- const CatalogEntityRelationsNodeContentWrapper = styled.div<{ isRoot: boolean }>`
65
+ const CatalogEntityRelationsNodeContentWrapper = styled.div<{ $isRoot: boolean }>`
66
66
  display: flex;
67
67
  flex-direction: column;
68
68
  align-items: flex-start;
@@ -71,12 +71,12 @@ const CatalogEntityRelationsNodeContentWrapper = styled.div<{ isRoot: boolean }>
71
71
  border-radius: var(--catalog-entity-relations-node-border-radius);
72
72
  font-style: normal;
73
73
  font-weight: var(--catalog-entity-relations-node-font-weight);
74
- background: ${({ isRoot }) =>
75
- isRoot
74
+ background: ${({ $isRoot }) =>
75
+ $isRoot
76
76
  ? 'var(--catalog-entity-relations-node-root-bg-color)'
77
77
  : 'var(--catalog-entity-relations-node-bg-color)'};
78
- border: ${({ isRoot }) =>
79
- isRoot
78
+ border: ${({ $isRoot }) =>
79
+ $isRoot
80
80
  ? 'none'
81
81
  : `var(--catalog-entity-relations-node-border-width) var(--catalog-entity-relations-node-border-style) var(--catalog-entity-relations-node-border-color)`};
82
82
  `;
@@ -19,15 +19,15 @@ export function CatalogEntityInfoBar({
19
19
  return (
20
20
  <InfoBarWrapper
21
21
  data-component-name="Catalog/CatalogEntity/CatalogEntityInfoBar"
22
- hoverEffect={hoverEffect}
22
+ $hoverEffect={hoverEffect}
23
23
  >
24
- <LeftColumn withSeparator={withSeparator}>{leftContent}</LeftColumn>
25
- {rightContent && <RightColumn isCodeBlock={isCodeBlock}>{rightContent}</RightColumn>}
24
+ <LeftColumn $withSeparator={withSeparator}>{leftContent}</LeftColumn>
25
+ {rightContent && <RightColumn $isCodeBlock={isCodeBlock}>{rightContent}</RightColumn>}
26
26
  </InfoBarWrapper>
27
27
  );
28
28
  }
29
29
 
30
- const InfoBarWrapper = styled.div<{ hoverEffect: boolean }>`
30
+ const InfoBarWrapper = styled.div<{ $hoverEffect: boolean }>`
31
31
  display: grid;
32
32
  grid-template-columns: 1fr 1fr;
33
33
  grid-template-areas: 'left right';
@@ -43,8 +43,8 @@ const InfoBarWrapper = styled.div<{ hoverEffect: boolean }>`
43
43
  padding: var(--catalog-card-gap);
44
44
  margin-bottom: var(--spacing-xs);
45
45
 
46
- ${({ hoverEffect }) =>
47
- hoverEffect &&
46
+ ${({ $hoverEffect }) =>
47
+ $hoverEffect &&
48
48
  `
49
49
  &:hover {
50
50
  border-color: var(--catalog-card-border-color-hover);
@@ -53,25 +53,25 @@ const InfoBarWrapper = styled.div<{ hoverEffect: boolean }>`
53
53
  `}
54
54
  `;
55
55
 
56
- const LeftColumn = styled.div<{ withSeparator?: boolean }>`
56
+ const LeftColumn = styled.div<{ $withSeparator: boolean }>`
57
57
  font-weight: var(--font-weight-medium);
58
58
  color: var(--catalog-metadata-label-color);
59
59
  width: 100%;
60
60
  grid-area: left;
61
61
  justify-self: start;
62
62
  text-align: left;
63
- border-right: ${({ withSeparator }) =>
64
- withSeparator ? '1px solid var(--border-color-primary)' : 'none'};
63
+ border-right: ${({ $withSeparator }) =>
64
+ $withSeparator ? '1px solid var(--border-color-primary)' : 'none'};
65
65
  height: 100%;
66
66
  display: flex;
67
67
  align-items: center;
68
68
  `;
69
69
 
70
- const RightColumn = styled.div<{ isCodeBlock?: boolean }>`
70
+ const RightColumn = styled.div<{ $isCodeBlock: boolean }>`
71
71
  color: var(--catalog-metadata-value-color);
72
72
  font-weight: var(--font-weight-medium);
73
73
  grid-area: right;
74
74
  justify-self: end;
75
75
  text-align: right;
76
- width: ${({ isCodeBlock }) => (isCodeBlock ? '100%' : 'auto')};
76
+ width: ${({ $isCodeBlock }) => ($isCodeBlock ? '100%' : 'auto')};
77
77
  `;
@@ -18,7 +18,7 @@ export function CatalogEntityPropertyCard({
18
18
  <CatalogEntityPropertyWrapper
19
19
  data-component-name="Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard"
20
20
  onClick={onClick}
21
- hoverEffect={hoverEffect}
21
+ $hoverEffect={hoverEffect}
22
22
  >
23
23
  <CardHeader>{header}</CardHeader>
24
24
  <CardContent>{content}</CardContent>
@@ -26,7 +26,7 @@ export function CatalogEntityPropertyCard({
26
26
  );
27
27
  }
28
28
 
29
- const CatalogEntityPropertyWrapper = styled.div<{ hoverEffect: boolean }>`
29
+ const CatalogEntityPropertyWrapper = styled.div<{ $hoverEffect: boolean }>`
30
30
  display: flex;
31
31
  flex-direction: column;
32
32
  color: var(--catalog-card-text-color);
@@ -39,8 +39,8 @@ const CatalogEntityPropertyWrapper = styled.div<{ hoverEffect: boolean }>`
39
39
  padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
40
40
  gap: var(--catalog-card-content-gap-vertical);
41
41
 
42
- ${({ hoverEffect }) =>
43
- hoverEffect &&
42
+ ${({ $hoverEffect }) =>
43
+ $hoverEffect &&
44
44
  `
45
45
  &:hover {
46
46
  border-color: var(--catalog-card-border-color-hover);
@@ -1,10 +1,11 @@
1
- import React, { JSX, ReactNode } from 'react';
1
+ import React, { JSX } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
5
5
  import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
6
6
 
7
7
  import { Tabs, TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
8
+ import { TabItemFragment } from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
8
9
  import { EntityTypeIcon } from '@redocly/theme/icons/EntityTypeIcon/EntityTypeIcon';
9
10
  import { CatalogEntityDefaultRelations } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations';
10
11
  import { MoleculesIcon } from '@redocly/theme/icons/MoleculesIcon/MoleculesIcon';
@@ -48,7 +49,7 @@ export function CatalogEntityApiDescriptionRelations({
48
49
  return (
49
50
  <TabsWrapper data-component-name="Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations">
50
51
  <Tabs key={entity.id} size={TabsSize.MEDIUM}>
51
- <TabItem
52
+ <TabItemFragment
52
53
  label="Operations"
53
54
  icon={<MoleculesIcon />}
54
55
  onClick={() => setFilter('type:api-operation')}
@@ -70,8 +71,8 @@ export function CatalogEntityApiDescriptionRelations({
70
71
  shouldShowHeading={false}
71
72
  listType="api-operation"
72
73
  />
73
- </TabItem>
74
- <TabItem
74
+ </TabItemFragment>
75
+ <TabItemFragment
75
76
  label="Schemas"
76
77
  icon={<NetworkIcon />}
77
78
  onClick={() => setFilter('type:data-schema')}
@@ -93,8 +94,8 @@ export function CatalogEntityApiDescriptionRelations({
93
94
  shouldShowHeading={false}
94
95
  listType="data-schema"
95
96
  />
96
- </TabItem>
97
- <TabItem
97
+ </TabItemFragment>
98
+ <TabItemFragment
98
99
  label="Related entities"
99
100
  icon={<EntityTypeIcon />}
100
101
  onClick={() => setFilter('-type:api-operation,data-schema')}
@@ -115,16 +116,12 @@ export function CatalogEntityApiDescriptionRelations({
115
116
  shouldShowLoadMore={shouldShowLoadMore}
116
117
  shouldShowHeading={false}
117
118
  />
118
- </TabItem>
119
+ </TabItemFragment>
119
120
  </Tabs>
120
121
  </TabsWrapper>
121
122
  );
122
123
  }
123
124
 
124
- const TabItem = styled.div<{ label: string; icon?: ReactNode }>`
125
- padding: var(--spacing-sm);
126
- `;
127
-
128
125
  const TabsWrapper = styled.div`
129
126
  --md-tabs-container-margin: none;
130
127
  `;
@@ -1,10 +1,11 @@
1
- import React, { JSX, ReactNode } from 'react';
1
+ import React, { JSX } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
5
5
  import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
6
6
 
7
7
  import { Tabs, TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
8
+ import { TabItemFragment } from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
8
9
  import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon';
9
10
  import { EntityTypeIcon } from '@redocly/theme/icons/EntityTypeIcon/EntityTypeIcon';
10
11
  import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
@@ -86,7 +87,11 @@ export function CatalogEntityTeamRelations({
86
87
  return (
87
88
  <div data-component-name="Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations">
88
89
  <Tabs size={TabsSize.MEDIUM}>
89
- <TabItem label="Members" icon={<PeopleIcon />} onClick={() => setFilter('type:user')}>
90
+ <TabItemFragment
91
+ label="Members"
92
+ icon={<PeopleIcon />}
93
+ onClick={() => setFilter('type:user')}
94
+ >
90
95
  <CatalogEntityRelationsTable
91
96
  key="members-table"
92
97
  entity={entity}
@@ -104,8 +109,8 @@ export function CatalogEntityTeamRelations({
104
109
  shouldShowLoadMore={shouldShowLoadMore}
105
110
  listType="team"
106
111
  />
107
- </TabItem>
108
- <TabItem
112
+ </TabItemFragment>
113
+ <TabItemFragment
109
114
  label="Related entities"
110
115
  icon={<EntityTypeIcon />}
111
116
  onClick={() => setFilter('-type:user')}
@@ -126,16 +131,12 @@ export function CatalogEntityTeamRelations({
126
131
  shouldShowLoadMore={shouldShowLoadMore}
127
132
  shouldShowHeading={false}
128
133
  />
129
- </TabItem>
134
+ </TabItemFragment>
130
135
  </Tabs>
131
136
  </div>
132
137
  );
133
138
  }
134
139
 
135
- const TabItem = styled.div<{ label: string; icon?: ReactNode }>`
136
- padding: var(--spacing-sm);
137
- `;
138
-
139
140
  const EntityDescription = styled.div`
140
141
  font-size: var(--catalog-table-entity-summary-font-size);
141
142
  line-height: var(--catalog-table-entity-summary-line-height);
@@ -18,9 +18,9 @@ export function CatalogEntityTypeIcon({
18
18
  return (
19
19
  <IconContainer
20
20
  data-component-name="Catalog/CatalogEntityTypeIcon"
21
- entityType={entityType}
22
- defaultColors={defaultColors}
23
- size={size}
21
+ $entityType={entityType}
22
+ $defaultColors={defaultColors}
23
+ $size={size}
24
24
  >
25
25
  <CatalogEntityIcon entityType={entityType} defaultColor={false} />
26
26
  </IconContainer>
@@ -28,33 +28,39 @@ export function CatalogEntityTypeIcon({
28
28
  }
29
29
 
30
30
  const IconContainer = styled.div<{
31
- entityType: string;
32
- defaultColors: boolean;
33
- size: 'large' | 'medium';
31
+ $entityType: string;
32
+ $defaultColors: boolean;
33
+ $size: 'large' | 'medium';
34
34
  }>`
35
35
  display: flex;
36
36
  align-items: center;
37
37
  justify-content: center;
38
- width: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-width-large)' : 'var(--catalog-table-icon-width-medium)')};
39
- height: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-height-large)' : 'var(--catalog-table-icon-height-medium)')};
38
+ width: ${({ $size }) =>
39
+ $size === 'large'
40
+ ? 'var(--catalog-table-icon-width-large)'
41
+ : 'var(--catalog-table-icon-width-medium)'};
42
+ height: ${({ $size }) =>
43
+ $size === 'large'
44
+ ? 'var(--catalog-table-icon-height-large)'
45
+ : 'var(--catalog-table-icon-height-medium)'};
40
46
  border-radius: var(--catalog-table-icon-border-radius);
41
- background-color: ${({ defaultColors, entityType }) => {
42
- if (defaultColors) {
47
+ background-color: ${({ $defaultColors, $entityType }) => {
48
+ if ($defaultColors) {
43
49
  return 'var(--catalog-entity-bg-color)';
44
50
  }
45
- if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
46
- return `var(--catalog-entity-bg-color-${entityType})`;
51
+ if (PREDEFINED_ENTITY_TYPES.includes($entityType)) {
52
+ return `var(--catalog-entity-bg-color-${$entityType})`;
47
53
  }
48
54
  return 'var(--catalog-entity-bg-color-custom)';
49
55
  }};
50
56
  flex-shrink: 0;
51
57
  border: 1px solid
52
- ${({ defaultColors, entityType }) => {
53
- if (defaultColors) {
58
+ ${({ $defaultColors, $entityType }) => {
59
+ if ($defaultColors) {
54
60
  return 'var(--catalog-entity-border-color)';
55
61
  }
56
- if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
57
- return `var(--catalog-entity-border-color-${entityType})`;
62
+ if (PREDEFINED_ENTITY_TYPES.includes($entityType)) {
63
+ return `var(--catalog-entity-border-color-${$entityType})`;
58
64
  }
59
65
  return 'var(--catalog-entity-border-color-custom)';
60
66
  }};
@@ -33,7 +33,7 @@ export const getEntityTagColor = (type: EntityType): string => {
33
33
  export function CatalogEntityTypeTag({ entityType }: CatalogEntityTypeTagProps): JSX.Element {
34
34
  return (
35
35
  <EntityTypeTagWrapper
36
- entityType={entityType as EntityType}
36
+ $entityType={entityType as EntityType}
37
37
  data-component-name="Catalog/CatalogEntityTypeTag"
38
38
  >
39
39
  <CatalogHighlight>{entityType}</CatalogHighlight>
@@ -41,17 +41,17 @@ export function CatalogEntityTypeTag({ entityType }: CatalogEntityTypeTagProps):
41
41
  );
42
42
  }
43
43
 
44
- const EntityTypeTagWrapper = styled(Tag)<{ entityType: EntityType }>`
44
+ const EntityTypeTagWrapper = styled(Tag)<{ $entityType: EntityType }>`
45
45
  font-size: var(--font-size-base);
46
46
  background-color: transparent;
47
47
  text-transform: none;
48
48
  border: 1px solid
49
- ${({ entityType }) =>
50
- !PREDEFINED_ENTITY_TYPES.includes(entityType)
49
+ ${({ $entityType }) =>
50
+ !PREDEFINED_ENTITY_TYPES.includes($entityType)
51
51
  ? 'var(--catalog-entity-border-color-custom)'
52
- : `var(--catalog-entity-border-color-${entityType})`};
53
- color: ${({ entityType }) =>
54
- !PREDEFINED_ENTITY_TYPES.includes(entityType)
52
+ : `var(--catalog-entity-border-color-${$entityType})`};
53
+ color: ${({ $entityType }) =>
54
+ !PREDEFINED_ENTITY_TYPES.includes($entityType)
55
55
  ? 'var(--catalog-entity-icon-color-custom)'
56
- : `var(--catalog-entity-icon-color-${entityType})`};
56
+ : `var(--catalog-entity-icon-color-${$entityType})`};
57
57
  `;
@@ -115,8 +115,8 @@ export const CatalogTableView = <T extends BaseEntity>({
115
115
  const tableContent = (
116
116
  <>
117
117
  <CatalogTableHeader
118
- columnsWidths={columns.map((column) => column.width || '1fr')}
119
- columnsMinWidths={columns.map((column) => column.minWidth || 'auto')}
118
+ $columnsWidths={columns.map((column) => column.width || '1fr')}
119
+ $columnsMinWidths={columns.map((column) => column.minWidth || 'auto')}
120
120
  >
121
121
  {columns.map((column) => (
122
122
  <CatalogTableHeaderCell<T>
@@ -174,12 +174,14 @@ const CatalogTableContentInner = styled.div<{ $contentMinWidth: number }>`
174
174
  min-width: ${({ $contentMinWidth }) => $contentMinWidth}px;
175
175
  `;
176
176
 
177
- const CatalogTableHeader = styled.div<{ columnsWidths: string[]; columnsMinWidths: string[] }>`
177
+ const CatalogTableHeader = styled.div<{ $columnsWidths: string[]; $columnsMinWidths: string[] }>`
178
178
  display: grid;
179
- grid-template-columns: ${({ columnsWidths, columnsMinWidths }) =>
180
- columnsWidths
179
+ grid-template-columns: ${({ $columnsWidths, $columnsMinWidths }) =>
180
+ $columnsWidths
181
181
  .map((width, index) =>
182
- columnsMinWidths[index] !== 'auto' ? `minmax(${columnsMinWidths[index]}, ${width})` : width,
182
+ $columnsMinWidths[index] !== 'auto'
183
+ ? `minmax(${$columnsMinWidths[index]}, ${width})`
184
+ : width,
183
185
  )
184
186
  .join(' ')};
185
187
  background: var(--catalog-table-header-bg-color);
@@ -124,7 +124,9 @@ export const CatalogDescription = styled.p`
124
124
  margin: var(--catalog-classic-description-margin);
125
125
  `;
126
126
 
127
- export const CatalogPageWrapper = styled.div<{ withoutFilters?: boolean }>`
127
+ export const CatalogPageWrapper = styled.div.withConfig({
128
+ shouldForwardProp: (prop) => prop !== 'withoutFilters',
129
+ })<{ withoutFilters?: boolean; className?: string }>`
128
130
  --sidebar-width: var(--catalog-classic-sidebar-width, 285px);
129
131
 
130
132
  display: flex;
@@ -20,12 +20,28 @@ export type CodeBlockContainerProps = PropsWithChildren<{
20
20
  }>;
21
21
 
22
22
  export function CodeBlockContainer(props: CodeBlockContainerProps): JSX.Element {
23
+ const { hideCodeColors, wrapContents, maxHeight, ...rest } = props;
23
24
  return (
24
- <CodeBlockContainerComponent {...props} data-component-name="CodeBlock/CodeBlockContainer" />
25
+ <CodeBlockContainerComponent
26
+ {...rest}
27
+ $hideCodeColors={hideCodeColors}
28
+ $wrapContents={wrapContents}
29
+ $maxHeight={maxHeight}
30
+ data-component-name="CodeBlock/CodeBlockContainer"
31
+ />
25
32
  );
26
33
  }
27
34
 
28
- const CodeBlockContainerComponent = styled.pre<CodeBlockContainerProps>`
35
+ const CodeBlockContainerComponent = styled.pre<{
36
+ $hideCodeColors?: boolean;
37
+ $wrapContents?: boolean;
38
+ $maxHeight?: string;
39
+ className?: string;
40
+ withLineNumbers?: boolean;
41
+ dangerouslySetInnerHTML?: CodeBlockContainerProps['dangerouslySetInnerHTML'];
42
+ suppressHydrationWarning?: boolean;
43
+ tabIndex?: number;
44
+ }>`
29
45
  && {
30
46
  overflow-x: auto;
31
47
  font-family: var(--code-block-font-family);
@@ -35,9 +51,9 @@ const CodeBlockContainerComponent = styled.pre<CodeBlockContainerProps>`
35
51
  margin: var(--code-block-margin);
36
52
  color: var(--code-block-text-color);
37
53
  font-size: var(--code-block-font-size);
38
- white-space: ${({ wrapContents }) => (wrapContents ? 'pre-wrap' : 'var(--code-wrap, pre)')};
39
- max-height: ${({ maxHeight }) =>
40
- maxHeight ? maxHeight : 'var(--code-block-max-height, 600px);'};
54
+ white-space: ${({ $wrapContents }) => ($wrapContents ? 'pre-wrap' : 'var(--code-wrap, pre)')};
55
+ max-height: ${({ $maxHeight }) =>
56
+ $maxHeight ? $maxHeight : 'var(--code-block-max-height, 600px);'};
41
57
  word-break: var(--code-block-word-break, initial);
42
58
 
43
59
  pre,
@@ -321,8 +337,8 @@ const CodeBlockContainerComponent = styled.pre<CodeBlockContainerProps>`
321
337
 
322
338
  ${generateCodeBlockTokens()}
323
339
 
324
- ${({ hideCodeColors }) =>
325
- hideCodeColors &&
340
+ ${({ $hideCodeColors }) =>
341
+ $hideCodeColors &&
326
342
  css`
327
343
  .line-number:not(.highlighted),
328
344
  .line-number:not(.highlighted) > span,