@redocly/theme 0.59.0-next.1 → 0.59.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/LICENSE +7 -1
  2. package/lib/components/Accordion/Accordion.js +17 -7
  3. package/lib/components/Accordion/AccordionBody.js +17 -7
  4. package/lib/components/Admonition/Admonition.js +17 -7
  5. package/lib/components/Badge/Badge.js +17 -7
  6. package/lib/components/Breadcrumbs/Breadcrumb.js +17 -7
  7. package/lib/components/Breadcrumbs/BreadcrumbDropdown.js +17 -7
  8. package/lib/components/Button/Button.js +17 -7
  9. package/lib/components/Buttons/AIAssistantButton.js +23 -9
  10. package/lib/components/Buttons/ConnectMCPButton.d.ts +8 -0
  11. package/lib/components/Buttons/ConnectMCPButton.js +145 -0
  12. package/lib/components/Buttons/CopyButton.js +17 -7
  13. package/lib/components/Buttons/variables.d.ts +1 -0
  14. package/lib/components/Buttons/variables.js +42 -2
  15. package/lib/components/Catalog/Catalog.d.ts +6 -0
  16. package/lib/components/Catalog/Catalog.js +7 -6
  17. package/lib/components/Catalog/CatalogEntities.js +17 -7
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +17 -7
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js +17 -7
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +1 -0
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +17 -7
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +17 -7
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +17 -7
  26. package/lib/components/Catalog/CatalogEntityIcon.js +2 -1
  27. package/lib/components/Catalog/CatalogFilter/CatalogFilter.js +4 -0
  28. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +17 -7
  29. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +17 -7
  30. package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +17 -7
  31. package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.js +17 -7
  32. package/lib/components/Catalog/CatalogSortButton.js +17 -7
  33. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +17 -7
  34. package/lib/components/Catalog/CatalogViewModeToggle.js +17 -7
  35. package/lib/components/Catalog/variables.js +1 -1
  36. package/lib/components/CatalogClassic/CatalogClassicActions.js +17 -7
  37. package/lib/components/CatalogClassic/CatalogClassicCard.js +17 -7
  38. package/lib/components/CatalogClassic/CatalogClassicHighlight.js +17 -7
  39. package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.js +17 -7
  40. package/lib/components/CodeBlock/CodeBlock.js +17 -7
  41. package/lib/components/CodeBlock/CodeBlockContainer.js +17 -7
  42. package/lib/components/CodeBlock/CodeBlockTabs.js +17 -7
  43. package/lib/components/Dropdown/Dropdown.d.ts +16 -2
  44. package/lib/components/Dropdown/Dropdown.js +22 -12
  45. package/lib/components/Dropdown/DropdownMenuItem.js +17 -7
  46. package/lib/components/Feedback/Comment.js +17 -7
  47. package/lib/components/Feedback/Feedback.js +17 -7
  48. package/lib/components/Feedback/Mood.js +17 -7
  49. package/lib/components/Feedback/Rating.js +17 -7
  50. package/lib/components/Feedback/Reasons.js +17 -7
  51. package/lib/components/Feedback/Scale.js +17 -7
  52. package/lib/components/Feedback/Sentiment.js +17 -7
  53. package/lib/components/Feedback/Stars.js +17 -7
  54. package/lib/components/Filter/FilterContent.js +17 -7
  55. package/lib/components/Filter/FilterInput.js +17 -7
  56. package/lib/components/Image/Image.js +17 -7
  57. package/lib/components/JsonViewer/JsonViewer.js +17 -7
  58. package/lib/components/JsonViewer/helpers.js +17 -7
  59. package/lib/components/LastUpdated/LastUpdated.js +17 -7
  60. package/lib/components/Link/Link.js +17 -7
  61. package/lib/components/Markdown/Markdown.js +17 -7
  62. package/lib/components/Marker/Marker.js +17 -7
  63. package/lib/components/Menu/MenuContainer.js +17 -7
  64. package/lib/components/Menu/MenuItem.js +18 -8
  65. package/lib/components/Menu/MenuMobile.js +17 -7
  66. package/lib/components/Navbar/NavbarItem.js +3 -3
  67. package/lib/components/PageActions/PageActions.js +21 -8
  68. package/lib/components/PageActions/variables.js +2 -0
  69. package/lib/components/PageNavigation/NextButton.js +17 -7
  70. package/lib/components/Panel/Panel.js +17 -7
  71. package/lib/components/Panel/PanelBody.js +17 -7
  72. package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +17 -7
  73. package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +1 -2
  74. package/lib/components/Search/SearchAiActionButtons.d.ts +10 -0
  75. package/lib/components/Search/SearchAiActionButtons.js +43 -0
  76. package/lib/components/Search/SearchAiConversationInput.d.ts +3 -1
  77. package/lib/components/Search/SearchAiConversationInput.js +56 -14
  78. package/lib/components/Search/SearchAiDialog.d.ts +3 -6
  79. package/lib/components/Search/SearchAiDialog.js +37 -16
  80. package/lib/components/Search/SearchAiMessage.d.ts +9 -5
  81. package/lib/components/Search/SearchAiMessage.js +146 -22
  82. package/lib/components/Search/SearchAiNegativeFeedbackForm.d.ts +8 -0
  83. package/lib/components/Search/SearchAiNegativeFeedbackForm.js +169 -0
  84. package/lib/components/Search/SearchDialog.js +53 -12
  85. package/lib/components/Search/SearchFilter.js +17 -7
  86. package/lib/components/Search/SearchGroups.js +19 -9
  87. package/lib/components/Search/SearchHighlight.js +17 -7
  88. package/lib/components/Search/SearchItem.js +17 -7
  89. package/lib/components/Search/SearchRecent.js +17 -7
  90. package/lib/components/Search/SearchShortcut.js +17 -7
  91. package/lib/components/Search/SearchSuggestedPages.js +17 -7
  92. package/lib/components/Search/SearchTrigger.js +17 -7
  93. package/lib/components/Search/variables.js +36 -64
  94. package/lib/components/Segmented/Segmented.d.ts +1 -8
  95. package/lib/components/Segmented/Segmented.js +20 -8
  96. package/lib/components/Select/Select.js +17 -7
  97. package/lib/components/Select/SelectInput.js +18 -8
  98. package/lib/components/Sidebar/Sidebar.js +17 -7
  99. package/lib/components/SidebarActions/styled.js +17 -7
  100. package/lib/components/SkipContent/SkipContent.js +17 -7
  101. package/lib/components/Switch/Switch.js +17 -7
  102. package/lib/components/TableOfContent/TableOfContent.js +17 -7
  103. package/lib/components/Tag/Tag.d.ts +2 -1
  104. package/lib/components/Tag/Tag.js +67 -18
  105. package/lib/components/Tag/variables.dark.js +135 -36
  106. package/lib/components/Tag/variables.js +78 -61
  107. package/lib/components/Tooltip/Tooltip.js +17 -7
  108. package/lib/components/VersionPicker/VersionPicker.js +17 -7
  109. package/lib/core/constants/index.d.ts +1 -0
  110. package/lib/core/constants/index.js +1 -0
  111. package/lib/core/constants/mcp.d.ts +1 -0
  112. package/lib/core/constants/mcp.js +5 -0
  113. package/lib/core/constants/search.d.ts +5 -4
  114. package/lib/core/constants/search.js +4 -5
  115. package/lib/core/contexts/CodeSnippetContext.js +17 -7
  116. package/lib/core/hooks/index.d.ts +3 -0
  117. package/lib/core/hooks/index.js +3 -0
  118. package/lib/core/hooks/menu/use-nested-menu.js +1 -1
  119. package/lib/core/hooks/search/use-feedback-tooltip.d.ts +6 -0
  120. package/lib/core/hooks/search/use-feedback-tooltip.js +26 -0
  121. package/lib/core/hooks/use-connect-mcp-button.d.ts +13 -0
  122. package/lib/core/hooks/use-connect-mcp-button.js +50 -0
  123. package/lib/core/hooks/use-mcp-config.d.ts +9 -0
  124. package/lib/core/hooks/use-mcp-config.js +27 -0
  125. package/lib/core/hooks/use-page-actions.d.ts +1 -1
  126. package/lib/core/hooks/use-page-actions.js +98 -95
  127. package/lib/core/hooks/use-product-picker.js +2 -1
  128. package/lib/core/hooks/use-tabs.d.ts +3 -2
  129. package/lib/core/hooks/use-tabs.js +115 -57
  130. package/lib/core/hooks/use-telemetry-fallback.d.ts +10 -8
  131. package/lib/core/hooks/use-telemetry-fallback.js +10 -8
  132. package/lib/core/openapi/index.d.ts +1 -0
  133. package/lib/core/styles/dark.js +4 -0
  134. package/lib/core/styles/global.js +5 -0
  135. package/lib/core/templates/Markdown.js +17 -7
  136. package/lib/core/types/hooks.d.ts +6 -3
  137. package/lib/core/types/index.d.ts +1 -0
  138. package/lib/core/types/index.js +1 -0
  139. package/lib/core/types/l10n.d.ts +1 -1
  140. package/lib/core/types/mcp.d.ts +6 -0
  141. package/lib/core/types/mcp.js +3 -0
  142. package/lib/core/types/search.d.ts +11 -4
  143. package/lib/core/types/search.js +6 -0
  144. package/lib/core/types/segmented.d.ts +12 -0
  145. package/lib/core/types/segmented.js +3 -0
  146. package/lib/core/utils/download-code-walkthrough.js +17 -7
  147. package/lib/core/utils/frontmatter-translate.d.ts +6 -0
  148. package/lib/core/utils/frontmatter-translate.js +14 -0
  149. package/lib/core/utils/get-file-icon.js +17 -7
  150. package/lib/core/utils/index.d.ts +2 -0
  151. package/lib/core/utils/index.js +2 -0
  152. package/lib/core/utils/mcp.d.ts +2 -0
  153. package/lib/core/utils/mcp.js +31 -0
  154. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +44 -4
  155. package/lib/icons/AiStarsIcon/AiStarsIcon.js +11 -2
  156. package/lib/icons/ConnectIcon/ConnectIcon.d.ts +9 -0
  157. package/lib/icons/ConnectIcon/ConnectIcon.js +17 -0
  158. package/lib/icons/CubeIcon/CubeIcon.d.ts +9 -0
  159. package/lib/icons/CubeIcon/CubeIcon.js +17 -0
  160. package/lib/icons/GenericIcon/GenericIcon.js +17 -7
  161. package/lib/icons/HashtagIcon/HashtagIcon.d.ts +9 -0
  162. package/lib/icons/HashtagIcon/HashtagIcon.js +22 -0
  163. package/lib/icons/RedoclyIcon/RedoclyIcon.js +4 -7
  164. package/lib/icons/Spinner/Spinner.js +17 -7
  165. package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.d.ts +9 -0
  166. package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.js +34 -0
  167. package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.d.ts +9 -0
  168. package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.js +34 -0
  169. package/lib/icons/VSCodeIcon/VSCodeIcon.d.ts +9 -0
  170. package/lib/icons/VSCodeIcon/VSCodeIcon.js +17 -0
  171. package/lib/index.d.ts +1 -0
  172. package/lib/index.js +18 -7
  173. package/lib/layouts/OIDCForbidden.js +17 -7
  174. package/lib/layouts/ThreePanelLayout.js +17 -7
  175. package/lib/markdoc/components/Cards/Card.js +1 -28
  176. package/lib/markdoc/components/Cards/Cards.js +17 -7
  177. package/lib/markdoc/components/CodeGroup/CodeGroup.js +17 -7
  178. package/lib/markdoc/components/CodeWalkthrough/CodeContainer.js +17 -7
  179. package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +17 -7
  180. package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +17 -7
  181. package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.js +17 -7
  182. package/lib/markdoc/components/CodeWalkthrough/CodePanelToolbar.js +17 -7
  183. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +17 -7
  184. package/lib/markdoc/components/CodeWalkthrough/CodeToggle.js +17 -7
  185. package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +17 -7
  186. package/lib/markdoc/components/CodeWalkthrough/Input.js +17 -7
  187. package/lib/markdoc/components/ConnectMCP/ConnectMCP.d.ts +8 -0
  188. package/lib/markdoc/components/ConnectMCP/ConnectMCP.js +19 -0
  189. package/lib/markdoc/components/Heading/Heading.js +17 -7
  190. package/lib/markdoc/components/HtmlBlock/HtmlBlock.js +17 -7
  191. package/lib/markdoc/components/InlineSvg/InlineSvg.js +17 -7
  192. package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +17 -7
  193. package/lib/markdoc/components/Tabs/TabList.d.ts +3 -1
  194. package/lib/markdoc/components/Tabs/TabList.js +214 -54
  195. package/lib/markdoc/components/Tabs/Tabs.d.ts +2 -1
  196. package/lib/markdoc/components/Tabs/Tabs.js +74 -19
  197. package/lib/markdoc/components/default.d.ts +1 -0
  198. package/lib/markdoc/components/default.js +1 -0
  199. package/lib/markdoc/default.d.ts +110 -1
  200. package/lib/markdoc/default.js +19 -7
  201. package/lib/markdoc/tags/card.js +0 -1
  202. package/lib/markdoc/tags/connect-mcp.d.ts +2 -0
  203. package/lib/markdoc/tags/connect-mcp.js +27 -0
  204. package/package.json +8 -8
  205. package/src/components/Buttons/AIAssistantButton.tsx +6 -2
  206. package/src/components/Buttons/ConnectMCPButton.tsx +180 -0
  207. package/src/components/Buttons/variables.ts +42 -1
  208. package/src/components/Catalog/Catalog.tsx +15 -4
  209. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +1 -0
  210. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
  211. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
  212. package/src/components/Catalog/CatalogEntityIcon.tsx +2 -1
  213. package/src/components/Catalog/CatalogFilter/CatalogFilter.tsx +5 -0
  214. package/src/components/Catalog/variables.ts +1 -1
  215. package/src/components/Dropdown/Dropdown.tsx +84 -79
  216. package/src/components/Menu/MenuItem.tsx +1 -0
  217. package/src/components/Navbar/NavbarItem.tsx +6 -5
  218. package/src/components/PageActions/PageActions.tsx +5 -1
  219. package/src/components/PageActions/variables.ts +2 -0
  220. package/src/components/Search/FilterFields/SearchFilterFieldTags.tsx +3 -3
  221. package/src/components/Search/SearchAiActionButtons.tsx +76 -0
  222. package/src/components/Search/SearchAiConversationInput.tsx +61 -18
  223. package/src/components/Search/SearchAiDialog.tsx +52 -23
  224. package/src/components/Search/SearchAiMessage.tsx +172 -43
  225. package/src/components/Search/SearchAiNegativeFeedbackForm.tsx +210 -0
  226. package/src/components/Search/SearchDialog.tsx +49 -13
  227. package/src/components/Search/SearchGroups.tsx +2 -0
  228. package/src/components/Search/variables.ts +36 -64
  229. package/src/components/Segmented/Segmented.tsx +15 -20
  230. package/src/components/Select/SelectInput.tsx +1 -0
  231. package/src/components/Tag/Tag.tsx +36 -20
  232. package/src/components/Tag/variables.dark.ts +135 -36
  233. package/src/components/Tag/variables.ts +78 -61
  234. package/src/core/constants/index.ts +1 -0
  235. package/src/core/constants/mcp.ts +1 -0
  236. package/src/core/constants/search.ts +8 -4
  237. package/src/core/hooks/index.ts +3 -0
  238. package/src/core/hooks/menu/use-nested-menu.ts +2 -2
  239. package/src/core/hooks/search/use-feedback-tooltip.ts +32 -0
  240. package/src/core/hooks/use-connect-mcp-button.ts +79 -0
  241. package/src/core/hooks/use-mcp-config.ts +43 -0
  242. package/src/core/hooks/use-page-actions.ts +148 -126
  243. package/src/core/hooks/use-product-picker.ts +2 -1
  244. package/src/core/hooks/use-tabs.ts +168 -86
  245. package/src/core/hooks/use-telemetry-fallback.ts +10 -8
  246. package/src/core/openapi/index.ts +1 -0
  247. package/src/core/styles/dark.ts +4 -0
  248. package/src/core/styles/global.ts +6 -1
  249. package/src/core/types/hooks.ts +6 -1
  250. package/src/core/types/index.ts +1 -0
  251. package/src/core/types/l10n.ts +14 -0
  252. package/src/core/types/mcp.ts +8 -0
  253. package/src/core/types/search.ts +13 -4
  254. package/src/core/types/segmented.ts +14 -0
  255. package/src/core/utils/frontmatter-translate.ts +9 -0
  256. package/src/core/utils/index.ts +2 -0
  257. package/src/core/utils/mcp.ts +34 -0
  258. package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +13 -4
  259. package/src/icons/AiStarsIcon/AiStarsIcon.tsx +11 -2
  260. package/src/icons/ConnectIcon/ConnectIcon.tsx +27 -0
  261. package/src/icons/CubeIcon/CubeIcon.tsx +27 -0
  262. package/src/icons/HashtagIcon/HashtagIcon.tsx +23 -0
  263. package/src/icons/RedoclyIcon/RedoclyIcon.tsx +4 -22
  264. package/src/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.tsx +38 -0
  265. package/src/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.tsx +35 -0
  266. package/src/icons/VSCodeIcon/VSCodeIcon.tsx +29 -0
  267. package/src/index.ts +1 -0
  268. package/src/markdoc/components/Cards/Card.tsx +1 -28
  269. package/src/markdoc/components/ConnectMCP/ConnectMCP.tsx +28 -0
  270. package/src/markdoc/components/Tabs/TabList.tsx +312 -105
  271. package/src/markdoc/components/Tabs/Tabs.tsx +136 -11
  272. package/src/markdoc/components/default.ts +1 -0
  273. package/src/markdoc/default.ts +2 -0
  274. package/src/markdoc/tags/card.ts +0 -1
  275. package/src/markdoc/tags/connect-mcp.ts +25 -0
@@ -35,19 +35,28 @@ export const AiStarsIcon = styled(Icon).attrs(() => ({
35
35
  height: ${({ size }) => size || '16px'};
36
36
  width: ${({ size }) => size || '16px'};
37
37
 
38
- ${({ background, borderRadius, margin }) =>
38
+ ${({ background, borderRadius, margin, padding, size }) =>
39
39
  background &&
40
40
  `
41
41
  display: flex;
42
42
  align-items: center;
43
43
  justify-content: center;
44
+ flex-shrink: 0;
44
45
 
45
46
  background: ${getCssColorVariable(background)};
47
+ width: ${size || '16px'};
48
+ height: ${size || '16px'};
46
49
 
47
- padding: var(--spacing-xs);
50
+ padding: ${padding || 'var(--spacing-xs)'};
48
51
  margin: ${margin || '0'};
49
52
 
50
53
  border-radius: ${background && borderRadius ? borderRadius : 'none'};
54
+
55
+ svg {
56
+ width: calc(${size || '16px'} - 2 * (${padding || 'var(--spacing-xs)'}));
57
+ height: calc(${size || '16px'} - 2 * (${padding || 'var(--spacing-xs)'}));
58
+ flex-shrink: 0;
59
+ }
51
60
  `}
52
61
 
53
62
  color: ${({ color }) => color && getCssColorVariable(color)};
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ const Icon = (props: IconProps) => (
7
+ <svg
8
+ width="14"
9
+ height="14"
10
+ viewBox="0 0 14 14"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ {...props}
14
+ >
15
+ <path
16
+ d="M10.5 7.00875C9.74669 7.00947 9.01371 7.25321 8.40999 7.70375L6.29999 5.59375C6.75586 4.99443 7.00185 4.26175 6.99999 3.50875C7.00197 2.72021 6.73759 1.9541 6.24973 1.33459C5.76186 0.715073 5.07908 0.278462 4.31205 0.0955081C3.54502 -0.0874454 2.73868 -0.00601915 2.02371 0.326591C1.30874 0.659201 0.727035 1.2235 0.372873 1.92805C0.0187108 2.63259 -0.087157 3.43608 0.0724264 4.20832C0.23201 4.98055 0.647693 5.67627 1.25211 6.18272C1.85652 6.68917 2.61425 6.97668 3.4025 6.99864C4.19074 7.02061 4.96331 6.77576 5.59499 6.30375L7.69999 8.41375C7.22812 9.04527 6.98326 9.81759 7.00508 10.6056C7.0269 11.3937 7.31412 12.1512 7.82021 12.7557C8.32631 13.3601 9.02164 13.776 9.79358 13.9359C10.5655 14.0959 11.3688 13.9906 12.0735 13.637C12.7781 13.2834 13.3427 12.7024 13.6758 11.9879C14.009 11.2734 14.0912 10.4674 13.9091 9.70036C13.727 8.93334 13.2913 8.25026 12.6726 7.76174C12.0539 7.27323 11.2883 7.00791 10.5 7.00875ZM0.999993 3.50875C0.999993 3.0143 1.14662 2.53095 1.42132 2.11983C1.69602 1.70871 2.08647 1.38827 2.54328 1.19906C3.0001 1.00984 3.50277 0.960328 3.98772 1.05679C4.47267 1.15325 4.91813 1.39136 5.26776 1.74099C5.61739 2.09062 5.85549 2.53608 5.95196 3.02103C6.04842 3.50598 5.99891 4.00865 5.80969 4.46546C5.62047 4.92228 5.30004 5.31272 4.88892 5.58743C4.4778 5.86213 3.99445 6.00875 3.49999 6.00875C2.83695 6.00875 2.20107 5.74536 1.73223 5.27652C1.26339 4.80768 0.999993 4.1718 0.999993 3.50875Z"
17
+ fill="currentColor"
18
+ />
19
+ </svg>
20
+ );
21
+
22
+ export const ConnectIcon = styled(Icon).attrs(() => ({
23
+ 'data-component-name': 'icons/ConnectIcon/ConnectIcon',
24
+ }))<IconProps>`
25
+ height: ${({ size }) => size || '14px'};
26
+ width: ${({ size }) => size || '14px'};
27
+ `;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ const Icon = (props: IconProps) => (
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width="16"
10
+ height="16"
11
+ viewBox="0 0 16 16"
12
+ fill="currentColor"
13
+ {...props}
14
+ >
15
+ <path
16
+ d="M14.252 4.06812L8.25195 0.568119C8.17548 0.523507 8.08853 0.5 8 0.5C7.91147 0.5 7.82452 0.523507 7.74805 0.568119L1.74805 4.06812C1.67257 4.11215 1.60994 4.1752 1.56642 4.25099C1.5229 4.32677 1.5 4.41263 1.5 4.50002V11.5C1.5 11.5874 1.5229 11.6733 1.56642 11.7491C1.60994 11.8248 1.67257 11.8879 1.74805 11.9319L7.74805 15.4319C7.82452 15.4765 7.91147 15.5 8 15.5C8.08853 15.5 8.17548 15.4765 8.25195 15.4319L14.252 11.9319C14.3274 11.8879 14.3901 11.8248 14.4336 11.7491C14.4771 11.6733 14.5 11.5874 14.5 11.5V4.50002C14.5 4.41263 14.4771 4.32677 14.4336 4.25099C14.3901 4.1752 14.3274 4.11215 14.252 4.06812ZM8 1.57887L13.0078 4.50002L8 7.42117L2.9922 4.50002L8 1.57887ZM2.5 5.37062L7.5 8.28712V14.1294L2.5 11.2129V5.37062ZM8.5 14.1294V8.28712L13.5 5.37062V11.2129L8.5 14.1294Z"
17
+ fill="currentColor"
18
+ />
19
+ </svg>
20
+ );
21
+
22
+ export const CubeIcon = styled(Icon).attrs(() => ({
23
+ 'data-component-name': 'icons/CubeIcon/CubeIcon',
24
+ }))<IconProps>`
25
+ height: ${({ size }) => size || '16px'};
26
+ width: ${({ size }) => size || '16px'};
27
+ `;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
10
+ <path d="M10.5 4.5V3.75H8.25V1.5H7.5V3.75H4.5V1.5H3.75V3.75H1.5V4.5H3.75V7.5H1.5V8.25H3.75V10.5H4.5V8.25H7.5V10.5H8.25V8.25H10.5V7.5H8.25V4.5H10.5ZM7.5 7.5H4.5V4.5H7.5V7.5Z" />
11
+ </svg>
12
+ );
13
+
14
+ export const HashtagIcon = styled(Icon).attrs(() => ({
15
+ 'data-component-name': 'icons/HashtagIcon/HashtagIcon',
16
+ }))<IconProps>`
17
+ path {
18
+ fill: ${({ color }) => getCssColorVariable(color)};
19
+ }
20
+
21
+ height: ${({ size }) => size || '16px'};
22
+ width: ${({ size }) => size || '16px'};
23
+ `;
@@ -6,29 +6,11 @@ import type { IconProps } from '@redocly/theme/icons/types';
6
6
  import { getCssColorVariable } from '@redocly/theme/core/utils';
7
7
 
8
8
  const Icon = (props: IconProps) => (
9
- <svg
10
- width="18"
11
- height="18"
12
- viewBox="0 0 18 18"
13
- fill="none"
14
- xmlns="http://www.w3.org/2000/svg"
15
- {...props}
16
- >
17
- <g clipPath="url(#clip0_4053_1165)">
18
- <path
19
- d="M14.625 6.19973C14.625 8.69176 12.6173 10.712 10.1406 10.712H2.8125V10.2717C5.04753 10.2717 6.85938 8.44864 6.85938 6.19973C6.85938 3.95082 5.04753 2.12772 2.8125 2.12772V1.6875H10.1406C12.6173 1.6875 14.625 3.70769 14.625 6.19973Z"
20
- fill="#2467F2"
21
- />
22
- <path
23
- d="M14.625 16.875C14.625 14.383 12.6173 12.3628 10.1406 12.3628H2.8125V12.803C5.04753 12.803 6.85938 14.6261 6.85938 16.875H14.625Z"
24
- fill="#2467F2"
25
- />
9
+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>
10
+ <g>
11
+ <path d="M14.625 6.19973C14.625 8.69176 12.6173 10.712 10.1406 10.712H2.8125V10.2717C5.04753 10.2717 6.85938 8.44864 6.85938 6.19973C6.85938 3.95082 5.04753 2.12772 2.8125 2.12772V1.6875H10.1406C12.6173 1.6875 14.625 3.70769 14.625 6.19973Z" />
12
+ <path d="M14.625 16.875C14.625 14.383 12.6173 12.3628 10.1406 12.3628H2.8125V12.803C5.04753 12.803 6.85938 14.6261 6.85938 16.875H14.625Z" />
26
13
  </g>
27
- <defs>
28
- <clipPath id="clip0_4053_1165">
29
- <rect width="18" height="18" fill="white" />
30
- </clipPath>
31
- </defs>
32
14
  </svg>
33
15
  );
34
16
 
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => {
9
+ const { color, ...restProps } = props;
10
+
11
+ return (
12
+ <svg
13
+ width="14"
14
+ height="14"
15
+ viewBox="0 0 14 14"
16
+ fill="none"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ {...restProps}
19
+ >
20
+ <path
21
+ d="M3.0625 0.875H0.875V7H3.0625V0.875Z"
22
+ fill={getCssColorVariable(color) || '#DCDDE5'}
23
+ />
24
+ <path
25
+ d="M10.0625 0.875H3.9375V7.35118L5.26846 9.34771L5.63828 11.9362C5.66886 12.1443 5.77308 12.3346 5.932 12.4725C6.09092 12.6103 6.29402 12.6866 6.5044 12.6875H6.5625C6.91048 12.6871 7.2441 12.5487 7.49016 12.3027C7.73621 12.0566 7.87462 11.723 7.875 11.375V8.75H11.375C11.839 8.74948 12.2838 8.56494 12.6119 8.23686C12.9399 7.90879 13.1245 7.46397 13.125 7V3.9375C13.1241 3.12555 12.8012 2.34712 12.227 1.77298C11.6529 1.19885 10.8744 0.875903 10.0625 0.875Z"
26
+ fill={getCssColorVariable(color) || '#DCDDE5'}
27
+ />
28
+ </svg>
29
+ );
30
+ };
31
+
32
+ export const ThumbDownFilledIcon = styled(Icon).attrs(() => ({
33
+ 'data-component-name': 'icons/ThumbDownFilledIcon/ThumbDownFilledIcon',
34
+ }))<IconProps>`
35
+ height: ${({ size }) => size || '14px'};
36
+ width: ${({ size }) => size || '14px'};
37
+ color: ${({ color }) => color && getCssColorVariable(color)};
38
+ `;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => {
9
+ const { color, ...restProps } = props;
10
+
11
+ return (
12
+ <svg
13
+ width="14"
14
+ height="14"
15
+ viewBox="0 0 14 14"
16
+ fill="none"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ {...restProps}
19
+ >
20
+ <path d="M3.0625 7H0.875V13.125H3.0625V7Z" fill={getCssColorVariable(color) || '#DCDDE5'} />
21
+ <path
22
+ d="M10.0625 13.125H3.9375V6.64882L5.26846 4.65229L5.63828 2.06382C5.66886 1.85567 5.77308 1.66539 5.932 1.52753C6.09092 1.38967 6.29402 1.31338 6.5044 1.3125H6.5625C6.91048 1.31288 7.2441 1.45129 7.49016 1.69734C7.73621 1.9434 7.87462 2.27702 7.875 2.625V5.25H11.375C11.839 5.25052 12.2838 5.43506 12.6119 5.76314C12.9399 6.09121 13.1245 6.53603 13.125 7V10.0625C13.1241 10.8744 12.8012 11.6529 12.227 12.227C11.6529 12.8012 10.8744 13.1241 10.0625 13.125Z"
23
+ fill={getCssColorVariable(color) || '#DCDDE5'}
24
+ />
25
+ </svg>
26
+ );
27
+ };
28
+
29
+ export const ThumbUpFilledIcon = styled(Icon).attrs(() => ({
30
+ 'data-component-name': 'icons/ThumbUpFilledIcon/ThumbUpFilledIcon',
31
+ }))<IconProps>`
32
+ height: ${({ size }) => size || '14px'};
33
+ width: ${({ size }) => size || '14px'};
34
+ color: ${({ color }) => color && getCssColorVariable(color)};
35
+ `;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ const Icon = (props: IconProps) => (
7
+ <svg
8
+ width="16"
9
+ height="16"
10
+ viewBox="0 0 100 100"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ {...props}
14
+ >
15
+ <path
16
+ clipRule="evenodd"
17
+ d="m70.9119 99.3171c1.575.6136 3.3709.5743 4.9606-.1907l20.5883-9.9067c2.1634-1.041 3.5392-3.2305 3.5392-5.6325v-67.1739c0-2.402-1.3757-4.5915-3.5391-5.6325l-20.5884-9.907044c-2.0863-1.003885-4.5279-.757996-6.359.573194-.2615.19016-.5107.40248-.7445.63646l-39.4139 35.95809-17.1679-13.0319c-1.5982-1.2131-3.83357-1.1137-5.31787.2365l-5.5063 5.0088c-1.815582 1.6515-1.817663 4.5078-.0045 6.1621l14.88857 13.5831-14.88857 13.5831c-1.813163 1.6542-1.811082 4.5106.0045 6.1621l5.5063 5.0088c1.4843 1.3502 3.71967 1.4496 5.31787.2364l17.1679-13.0318 39.4139 35.958c.6235.6239 1.3556 1.0937 2.1429 1.4004zm4.1033-72.0182-29.9061 22.7012 29.9061 22.7011z"
18
+ fill="currentColor"
19
+ fillRule="evenodd"
20
+ />
21
+ </svg>
22
+ );
23
+
24
+ export const VSCodeIcon = styled(Icon).attrs(() => ({
25
+ 'data-component-name': 'icons/VSCodeIcon/VSCodeIcon',
26
+ }))<IconProps>`
27
+ height: ${({ size }) => size || '16px'};
28
+ width: ${({ size }) => size || '16px'};
29
+ `;
package/src/index.ts CHANGED
@@ -287,6 +287,7 @@ export * from '@redocly/theme/icons/RedoclyIcon/RedoclyIcon';
287
287
  export * from '@redocly/theme/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon';
288
288
  export * from '@redocly/theme/icons/GenericIcon/GenericIcon';
289
289
  export * from '@redocly/theme/icons/ShareIcon/ShareIcon';
290
+ export * from '@redocly/theme/icons/HashtagIcon/HashtagIcon';
290
291
  /* Layouts */
291
292
  export * from '@redocly/theme/layouts/RootLayout';
292
293
  export * from '@redocly/theme/layouts/PageLayout';
@@ -103,6 +103,7 @@ const ContentWrapper = styled.div`
103
103
  flex-direction: column;
104
104
  flex-shrink: 1;
105
105
  gap: var(--card-content-gap);
106
+ width: 100%;
106
107
  `;
107
108
 
108
109
  const Title = styled.h3<{ $isCardLink: boolean; $justifyContent: string }>`
@@ -146,28 +147,6 @@ const Body = styled.div<{ $lineClamp?: number }>`
146
147
  > *:last-child {
147
148
  margin-bottom: 0;
148
149
  }
149
-
150
- /* Icon link styles */
151
- & a {
152
- display: inline-flex;
153
- align-items: center;
154
- line-height: 1;
155
-
156
- & svg {
157
- width: 1.2em;
158
- height: 1.2em;
159
- margin-right: 0.25em;
160
- vertical-align: middle;
161
-
162
- & g {
163
- fill: var(--link-color-primary);
164
- }
165
- }
166
- }
167
-
168
- & a:visited > span > svg > g {
169
- fill: var(--link-color-visited);
170
- }
171
150
  `;
172
151
 
173
152
  const CardWrapper = styled.div.attrs<{
@@ -222,12 +201,6 @@ const CardWrapper = styled.div.attrs<{
222
201
  }
223
202
  }
224
203
  }
225
-
226
- && ul {
227
- list-style: none;
228
- padding-left: 0;
229
- margin: var(--spacing-xs) 0;
230
- }
231
204
  `;
232
205
 
233
206
  const getCardWrapperClass = ($isCardLink: boolean, $variant?: string) => {
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+
3
+ import type { JSX } from 'react';
4
+ import type { MCPOption } from '@redocly/theme/core/types';
5
+
6
+ import { ConnectMCPButton } from '@redocly/theme/components/Buttons/ConnectMCPButton';
7
+ import { useThemeConfig } from '@redocly/theme/core/hooks';
8
+
9
+ export type ConnectMCPProps = {
10
+ placement?: 'top' | 'bottom';
11
+ alignment?: 'start' | 'end';
12
+ options?: MCPOption[];
13
+ };
14
+
15
+ export function ConnectMCP({
16
+ placement = 'bottom',
17
+ alignment = 'start',
18
+ options,
19
+ }: ConnectMCPProps): JSX.Element | null {
20
+ const themeConfig = useThemeConfig();
21
+ const isMcpDisabled = themeConfig.mcp?.hide || themeConfig.mcp?.docs?.hide;
22
+
23
+ if (isMcpDisabled) {
24
+ return null;
25
+ }
26
+
27
+ return <ConnectMCPButton placement={placement} alignment={alignment} options={options} />;
28
+ }