@redocly/theme 0.69.0-next.0 → 0.69.0-next.10

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 (293) hide show
  1. package/lib/components/Accordion/Accordion.js +5 -1
  2. package/lib/components/Accordion/variables.js +1 -1
  3. package/lib/components/Admonition/Admonition.d.ts +1 -1
  4. package/lib/components/Admonition/Admonition.js +1 -1
  5. package/lib/components/Admonition/variables.dark.js +2 -2
  6. package/lib/components/Admonition/variables.js +10 -10
  7. package/lib/components/Badge/Badge.d.ts +3 -1
  8. package/lib/components/Badge/Badge.js +7 -2
  9. package/lib/components/Banner/variables.dark.js +2 -0
  10. package/lib/components/Banner/variables.js +3 -1
  11. package/lib/components/Breadcrumbs/Breadcrumb.js +1 -1
  12. package/lib/components/Breadcrumbs/variables.js +1 -1
  13. package/lib/components/Button/ButtonGroup.d.ts +3 -5
  14. package/lib/components/Button/ButtonGroup.js +25 -5
  15. package/lib/components/Button/variables.js +27 -4
  16. package/lib/components/Buttons/ConnectMCPButton.js +39 -123
  17. package/lib/components/Buttons/CopyButton.js +12 -1
  18. package/lib/components/Buttons/variables.d.ts +0 -1
  19. package/lib/components/Buttons/variables.js +3 -44
  20. package/lib/components/Catalog/CatalogEntities.js +1 -0
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +1 -1
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +1 -1
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +1 -1
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +5 -3
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
  26. package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.js +1 -0
  27. package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
  28. package/lib/components/Catalog/CatalogViewModeToggle.js +2 -43
  29. package/lib/components/Catalog/variables.js +5 -5
  30. package/lib/components/CatalogClassic/variables.js +2 -2
  31. package/lib/components/CodeBlock/CodeBlock.js +2 -1
  32. package/lib/components/CodeBlock/CodeBlockContainer.js +1 -0
  33. package/lib/components/Dropdown/Dropdown.d.ts +10 -20
  34. package/lib/components/Dropdown/Dropdown.js +13 -2
  35. package/lib/components/Dropdown/DropdownMenuItemContent.d.ts +9 -0
  36. package/lib/components/Dropdown/DropdownMenuItemContent.js +56 -0
  37. package/lib/components/Dropdown/variables.js +19 -2
  38. package/lib/components/Feedback/Mood.js +18 -14
  39. package/lib/components/Feedback/Rating.js +18 -13
  40. package/lib/components/Feedback/Scale.js +27 -22
  41. package/lib/components/Feedback/Sentiment.js +17 -13
  42. package/lib/components/Filter/FilterInput.js +4 -2
  43. package/lib/components/Filter/FilterSelect.js +1 -0
  44. package/lib/components/Filter/variables.js +2 -2
  45. package/lib/components/Image/variables.js +5 -3
  46. package/lib/components/JsonViewer/Helpers.js +12 -42
  47. package/lib/components/LanguagePicker/variables.js +1 -1
  48. package/lib/components/MCP/McpConnectionTabs.d.ts +7 -0
  49. package/lib/components/MCP/McpConnectionTabs.js +151 -0
  50. package/lib/components/Markdown/Markdown.js +1 -1
  51. package/lib/components/Markdown/styles/base-table.js +8 -0
  52. package/lib/components/Markdown/variables.js +1 -1
  53. package/lib/components/Menu/MenuItem.js +1 -1
  54. package/lib/components/Menu/variables.js +1 -1
  55. package/lib/components/Navbar/variables.js +1 -1
  56. package/lib/components/PageActions/PageActions.js +4 -6
  57. package/lib/components/PageActions/PageActionsMenuItem.d.ts +4 -4
  58. package/lib/components/PageActions/PageActionsMenuItem.js +27 -43
  59. package/lib/components/Panel/Panel.js +5 -1
  60. package/lib/components/Panel/variables.js +1 -1
  61. package/lib/components/Product/variables.js +2 -1
  62. package/lib/components/ReplayGate/ReplayGate.d.ts +1 -0
  63. package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +22 -32
  64. package/lib/components/Search/SearchAiDialog.js +4 -1
  65. package/lib/components/Search/SearchAiMessage.js +1 -1
  66. package/lib/components/Search/SearchAiNegativeFeedbackForm.js +2 -2
  67. package/lib/components/Search/SearchDialog.js +2 -2
  68. package/lib/components/Search/SearchItem.js +6 -3
  69. package/lib/components/Search/SearchRecent.js +1 -0
  70. package/lib/components/Search/SearchSuggestedPages.js +1 -0
  71. package/lib/components/Search/variables.js +9 -5
  72. package/lib/components/Segmented/Segmented.js +3 -3
  73. package/lib/components/Select/Select.js +30 -23
  74. package/lib/components/Select/variables.js +3 -3
  75. package/lib/components/Sidebar/Sidebar.js +2 -38
  76. package/lib/components/SplitButton/SplitButton.d.ts +21 -0
  77. package/lib/components/SplitButton/SplitButton.js +37 -0
  78. package/lib/components/Switch/variables.dark.js +2 -2
  79. package/lib/components/Switch/variables.js +2 -2
  80. package/lib/components/Tag/variables.js +2 -2
  81. package/lib/components/Tags/variables.js +1 -1
  82. package/lib/components/Toast/variables.js +1 -1
  83. package/lib/components/Tooltip/AnchorTooltip.js +2 -2
  84. package/lib/components/Tooltip/JsTooltip.js +2 -2
  85. package/lib/components/UserMenu/variables.js +1 -1
  86. package/lib/core/constants/accordion.d.ts +3 -0
  87. package/lib/core/constants/accordion.js +7 -0
  88. package/lib/core/constants/index.d.ts +1 -0
  89. package/lib/core/constants/index.js +1 -0
  90. package/lib/core/constants/mcp.d.ts +4 -0
  91. package/lib/core/constants/mcp.js +10 -1
  92. package/lib/core/constants/search.js +2 -2
  93. package/lib/core/contexts/PageActionsContext.d.ts +5 -0
  94. package/lib/core/contexts/PageActionsContext.js +10 -0
  95. package/lib/core/contexts/index.d.ts +1 -0
  96. package/lib/core/contexts/index.js +1 -0
  97. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +5 -17
  98. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +1 -0
  99. package/lib/core/hooks/menu/use-menu-item-expanded.js +1 -0
  100. package/lib/core/hooks/use-active-heading.js +59 -15
  101. package/lib/core/hooks/use-active-section-id.js +3 -1
  102. package/lib/core/hooks/use-connect-mcp-button.d.ts +1 -1
  103. package/lib/core/hooks/use-connect-mcp-button.js +16 -13
  104. package/lib/core/hooks/use-control.js +3 -0
  105. package/lib/core/hooks/use-local-state.js +1 -0
  106. package/lib/core/hooks/use-mcp-config.d.ts +2 -0
  107. package/lib/core/hooks/use-mcp-config.js +14 -4
  108. package/lib/core/hooks/use-mobile-menu.js +10 -2
  109. package/lib/core/styles/global.js +56 -49
  110. package/lib/core/styles/palette.js +2 -0
  111. package/lib/core/types/button-group.d.ts +2 -0
  112. package/lib/core/types/button-group.js +3 -0
  113. package/lib/core/types/catalog.d.ts +2 -4
  114. package/lib/core/types/common.d.ts +2 -0
  115. package/lib/core/types/hooks.d.ts +1 -0
  116. package/lib/core/types/index.d.ts +1 -0
  117. package/lib/core/types/l10n.d.ts +1 -1
  118. package/lib/core/types/mcp.d.ts +1 -1
  119. package/lib/core/utils/RenderWithLink.d.ts +2 -0
  120. package/lib/core/utils/RenderWithLink.js +20 -0
  121. package/lib/core/utils/index.d.ts +1 -0
  122. package/lib/core/utils/index.js +1 -0
  123. package/lib/core/utils/mcp.d.ts +5 -0
  124. package/lib/core/utils/mcp.js +35 -0
  125. package/lib/icons/CodexIcon/CodexIcon.d.ts +25 -0
  126. package/lib/icons/CodexIcon/CodexIcon.js +22 -0
  127. package/lib/icons/LinkIcon/LinkIcon.js +1 -1
  128. package/lib/index.d.ts +2 -0
  129. package/lib/index.js +2 -0
  130. package/lib/layouts/McpNotAllowed.js +10 -10
  131. package/lib/markdoc/components/Accordion/Accordion.d.ts +9 -0
  132. package/lib/markdoc/components/Accordion/Accordion.js +132 -0
  133. package/lib/markdoc/components/Accordion/AccordionGroup.d.ts +5 -0
  134. package/lib/markdoc/components/Accordion/AccordionGroup.js +29 -0
  135. package/lib/markdoc/components/Accordion/variables.d.ts +1 -0
  136. package/lib/markdoc/components/Accordion/variables.js +40 -0
  137. package/lib/markdoc/components/Cards/Card.d.ts +8 -1
  138. package/lib/markdoc/components/Cards/Card.js +55 -16
  139. package/lib/markdoc/components/Cards/CardBadge.d.ts +9 -0
  140. package/lib/markdoc/components/Cards/CardBadge.js +30 -0
  141. package/lib/markdoc/components/Cards/CardIcon.d.ts +5 -4
  142. package/lib/markdoc/components/Cards/CardIcon.js +6 -3
  143. package/lib/markdoc/components/Cards/variables.dark.js +32 -0
  144. package/lib/markdoc/components/Cards/variables.js +81 -7
  145. package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +1 -0
  146. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +1 -1
  147. package/lib/markdoc/components/CodeWalkthrough/variables.js +2 -1
  148. package/lib/markdoc/components/Heading/Heading.js +5 -2
  149. package/lib/markdoc/components/Tabs/TabList.js +6 -2
  150. package/lib/markdoc/components/Tabs/Tabs.js +4 -2
  151. package/lib/markdoc/components/Tabs/variables.js +4 -4
  152. package/lib/markdoc/components/default.d.ts +2 -0
  153. package/lib/markdoc/components/default.js +2 -0
  154. package/lib/markdoc/default.d.ts +4 -0
  155. package/lib/markdoc/default.js +4 -0
  156. package/lib/markdoc/tags/accordion-group.d.ts +2 -0
  157. package/lib/markdoc/tags/accordion-group.js +10 -0
  158. package/lib/markdoc/tags/accordion.d.ts +2 -0
  159. package/lib/markdoc/tags/accordion.js +14 -0
  160. package/lib/markdoc/tags/admonition.js +1 -1
  161. package/lib/markdoc/tags/card.js +14 -0
  162. package/lib/markdoc/tags/connect-mcp.js +2 -1
  163. package/package.json +19 -10
  164. package/src/components/Accordion/Accordion.tsx +7 -3
  165. package/src/components/Accordion/variables.ts +1 -1
  166. package/src/components/Admonition/Admonition.tsx +2 -2
  167. package/src/components/Admonition/variables.dark.ts +2 -2
  168. package/src/components/Admonition/variables.ts +10 -10
  169. package/src/components/Badge/Badge.tsx +16 -2
  170. package/src/components/Banner/variables.dark.ts +2 -0
  171. package/src/components/Banner/variables.ts +3 -1
  172. package/src/components/Breadcrumbs/Breadcrumb.tsx +1 -1
  173. package/src/components/Breadcrumbs/variables.ts +1 -1
  174. package/src/components/Button/ButtonGroup.tsx +28 -10
  175. package/src/components/Button/variables.ts +27 -4
  176. package/src/components/Buttons/ConnectMCPButton.tsx +88 -145
  177. package/src/components/Buttons/CopyButton.tsx +14 -2
  178. package/src/components/Buttons/variables.ts +2 -44
  179. package/src/components/Catalog/CatalogEntities.tsx +1 -0
  180. package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +1 -1
  181. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
  182. package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
  183. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +6 -4
  184. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
  185. package/src/components/Catalog/CatalogFilter/CatalogFilterSelect.tsx +1 -0
  186. package/src/components/Catalog/CatalogViewModeToggle.tsx +2 -17
  187. package/src/components/Catalog/variables.ts +5 -5
  188. package/src/components/CatalogClassic/variables.ts +2 -2
  189. package/src/components/CodeBlock/CodeBlock.tsx +2 -1
  190. package/src/components/CodeBlock/CodeBlockContainer.tsx +1 -0
  191. package/src/components/Dropdown/Dropdown.tsx +25 -4
  192. package/src/components/Dropdown/DropdownMenuItemContent.tsx +72 -0
  193. package/src/components/Dropdown/variables.ts +19 -2
  194. package/src/components/Feedback/Mood.tsx +22 -15
  195. package/src/components/Feedback/Rating.tsx +22 -14
  196. package/src/components/Feedback/Scale.tsx +40 -32
  197. package/src/components/Feedback/Sentiment.tsx +21 -14
  198. package/src/components/Filter/FilterInput.tsx +5 -3
  199. package/src/components/Filter/FilterSelect.tsx +1 -0
  200. package/src/components/Filter/variables.ts +2 -2
  201. package/src/components/Image/variables.ts +5 -3
  202. package/src/components/JsonViewer/Helpers.tsx +13 -9
  203. package/src/components/LanguagePicker/variables.ts +1 -1
  204. package/src/components/MCP/McpConnectionTabs.tsx +263 -0
  205. package/src/components/Markdown/Markdown.tsx +2 -1
  206. package/src/components/Markdown/styles/base-table.ts +8 -0
  207. package/src/components/Markdown/variables.ts +1 -1
  208. package/src/components/Menu/MenuItem.tsx +2 -2
  209. package/src/components/Menu/variables.ts +1 -1
  210. package/src/components/Navbar/variables.ts +1 -1
  211. package/src/components/PageActions/PageActions.tsx +22 -23
  212. package/src/components/PageActions/PageActionsMenuItem.tsx +41 -55
  213. package/src/components/Panel/Panel.tsx +7 -3
  214. package/src/components/Panel/variables.ts +1 -1
  215. package/src/components/Product/variables.ts +2 -1
  216. package/src/components/ReplayGate/ReplayGate.tsx +3 -0
  217. package/src/components/Search/FilterFields/SearchFilterFieldSelect.tsx +32 -40
  218. package/src/components/Search/SearchAiDialog.tsx +4 -1
  219. package/src/components/Search/SearchAiMessage.tsx +1 -1
  220. package/src/components/Search/SearchAiNegativeFeedbackForm.tsx +2 -2
  221. package/src/components/Search/SearchDialog.tsx +2 -2
  222. package/src/components/Search/SearchItem.tsx +7 -1
  223. package/src/components/Search/SearchRecent.tsx +1 -0
  224. package/src/components/Search/SearchSuggestedPages.tsx +1 -0
  225. package/src/components/Search/variables.ts +9 -5
  226. package/src/components/Segmented/Segmented.tsx +6 -3
  227. package/src/components/Select/Select.tsx +36 -22
  228. package/src/components/Select/variables.ts +3 -3
  229. package/src/components/Sidebar/Sidebar.tsx +2 -6
  230. package/src/components/SplitButton/SplitButton.tsx +95 -0
  231. package/src/components/Switch/variables.dark.ts +2 -2
  232. package/src/components/Switch/variables.ts +2 -2
  233. package/src/components/Tag/variables.ts +2 -2
  234. package/src/components/Tags/variables.ts +1 -1
  235. package/src/components/Toast/variables.ts +1 -1
  236. package/src/components/Tooltip/AnchorTooltip.tsx +2 -2
  237. package/src/components/Tooltip/JsTooltip.tsx +2 -2
  238. package/src/components/UserMenu/variables.ts +1 -1
  239. package/src/core/constants/accordion.ts +4 -0
  240. package/src/core/constants/index.ts +1 -0
  241. package/src/core/constants/mcp.ts +14 -0
  242. package/src/core/constants/search.ts +2 -2
  243. package/src/core/contexts/PageActionsContext.tsx +7 -0
  244. package/src/core/contexts/index.ts +1 -0
  245. package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +6 -20
  246. package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +1 -0
  247. package/src/core/hooks/menu/use-menu-item-expanded.ts +1 -0
  248. package/src/core/hooks/use-active-heading.ts +79 -15
  249. package/src/core/hooks/use-active-section-id.ts +3 -1
  250. package/src/core/hooks/use-connect-mcp-button.ts +23 -15
  251. package/src/core/hooks/use-control.ts +5 -1
  252. package/src/core/hooks/use-local-state.ts +1 -0
  253. package/src/core/hooks/use-mcp-config.ts +15 -4
  254. package/src/core/hooks/use-mobile-menu.ts +11 -3
  255. package/src/core/openapi/index.ts +1 -1
  256. package/src/core/styles/global.ts +19 -12
  257. package/src/core/styles/palette.ts +2 -0
  258. package/src/core/types/button-group.ts +2 -0
  259. package/src/core/types/catalog.ts +2 -4
  260. package/src/core/types/common.ts +3 -0
  261. package/src/core/types/hooks.ts +1 -0
  262. package/src/core/types/index.ts +1 -0
  263. package/src/core/types/l10n.ts +29 -1
  264. package/src/core/types/mcp.ts +1 -1
  265. package/src/core/utils/RenderWithLink.tsx +19 -0
  266. package/src/core/utils/index.ts +1 -0
  267. package/src/core/utils/mcp.ts +39 -0
  268. package/src/icons/CodexIcon/CodexIcon.tsx +23 -0
  269. package/src/icons/LinkIcon/LinkIcon.tsx +1 -1
  270. package/src/index.ts +2 -0
  271. package/src/layouts/McpNotAllowed.tsx +37 -11
  272. package/src/markdoc/components/Accordion/Accordion.tsx +128 -0
  273. package/src/markdoc/components/Accordion/AccordionGroup.tsx +41 -0
  274. package/src/markdoc/components/Accordion/variables.ts +37 -0
  275. package/src/markdoc/components/Cards/Card.tsx +79 -14
  276. package/src/markdoc/components/Cards/CardBadge.tsx +39 -0
  277. package/src/markdoc/components/Cards/CardIcon.tsx +16 -5
  278. package/src/markdoc/components/Cards/variables.dark.ts +32 -0
  279. package/src/markdoc/components/Cards/variables.ts +81 -7
  280. package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +1 -0
  281. package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +1 -1
  282. package/src/markdoc/components/CodeWalkthrough/variables.ts +2 -1
  283. package/src/markdoc/components/Heading/Heading.tsx +7 -4
  284. package/src/markdoc/components/Tabs/TabList.tsx +6 -2
  285. package/src/markdoc/components/Tabs/Tabs.tsx +4 -2
  286. package/src/markdoc/components/Tabs/variables.ts +4 -4
  287. package/src/markdoc/components/default.ts +2 -0
  288. package/src/markdoc/default.ts +4 -0
  289. package/src/markdoc/tags/accordion-group.ts +8 -0
  290. package/src/markdoc/tags/accordion.ts +12 -0
  291. package/src/markdoc/tags/admonition.ts +1 -1
  292. package/src/markdoc/tags/card.ts +14 -0
  293. package/src/markdoc/tags/connect-mcp.ts +3 -1
@@ -2,8 +2,10 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import { ChevronRightIcon } from '@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon';
5
+ import { ArrowUpRightIcon } from '@redocly/theme/icons/ArrowUpRightIcon/ArrowUpRightIcon';
5
6
  import { CardImage } from '@redocly/theme/markdoc/components/Cards/CardImage';
6
7
  import { CardIcon, CardIconWrapper } from '@redocly/theme/markdoc/components/Cards/CardIcon';
8
+ import { CardBadge } from '@redocly/theme/markdoc/components/Cards/CardBadge';
7
9
  import { Link } from '@redocly/theme/components/Link/Link';
8
10
 
9
11
  export type CardProps = React.PropsWithChildren<{
@@ -17,8 +19,15 @@ export type CardProps = React.PropsWithChildren<{
17
19
  layout?: 'horizontal' | 'vertical' | 'combined';
18
20
  variant?: 'filled' | 'outlined' | 'elevated' | 'ghost';
19
21
  iconVariant?: 'filled' | 'ghost';
22
+ iconColor?: string;
20
23
  align?: 'start' | 'center' | 'end';
21
24
  to?: string;
25
+ linkIcon?: 'chevron' | 'arrow';
26
+ cta?: React.ReactNode;
27
+ badge?: string;
28
+ badgeColor?: string;
29
+ badgeIcon?: string;
30
+ badgeIconRawContent?: string;
22
31
  }>;
23
32
 
24
33
  export function Card({
@@ -32,8 +41,15 @@ export function Card({
32
41
  variant = 'filled',
33
42
  lineClamp,
34
43
  iconVariant = 'filled',
44
+ iconColor,
35
45
  align = 'start',
36
46
  to,
47
+ cta,
48
+ linkIcon,
49
+ badge,
50
+ badgeColor,
51
+ badgeIcon,
52
+ badgeIconRawContent,
37
53
  children,
38
54
  }: CardProps) {
39
55
  const titleNoSpaces = title?.replace(/\s+/g, '-').toLowerCase();
@@ -66,14 +82,30 @@ export function Card({
66
82
  src={icon}
67
83
  rawContent={iconRawContent}
68
84
  position={iconPosition}
85
+ color={iconColor}
69
86
  />
70
87
  )}
71
88
  <ContentWrapper>
72
- <Title id={cardTitleId} $isCardLink={!!to} $justifyContent={justifyContent}>
73
- {title}
74
- {variant == 'ghost' && !!to && <CardLinkIcon />}
75
- </Title>
89
+ <TitleWrapper id={cardTitleId} $isCardLink={!!to} $justifyContent={justifyContent}>
90
+ <Title>
91
+ {title}
92
+ {!!to && !!linkIcon && (
93
+ <CardLinkIcon as={linkIcon === 'arrow' ? ArrowUpRightIcon : undefined} />
94
+ )}
95
+ </Title>
96
+ {!!badge && (
97
+ <CardBadge color={badgeColor} icon={badgeIcon} iconRawContent={badgeIconRawContent}>
98
+ {badge}
99
+ </CardBadge>
100
+ )}
101
+ </TitleWrapper>
76
102
  <Body $lineClamp={lineClamp}>{children}</Body>
103
+ {!!to && !!cta && (
104
+ <Cta $justifyContent={justifyContent}>
105
+ <CtaText> {cta} </CtaText>
106
+ <CtaIcon />
107
+ </Cta>
108
+ )}
77
109
  </ContentWrapper>
78
110
  </CardContentWrapper>
79
111
  </>
@@ -105,25 +137,28 @@ const ContentWrapper = styled.div`
105
137
  width: 100%;
106
138
  `;
107
139
 
108
- const Title = styled.h3<{ $isCardLink: boolean; $justifyContent: string }>`
109
- margin: var(--card-title-margin);
110
- font-weight: var(--card-title-font-weight);
140
+ const TitleWrapper = styled.div<{ $isCardLink: boolean; $justifyContent: string }>`
111
141
  color: var(--card-title-text-color);
112
142
  display: flex;
113
143
  align-items: center;
144
+ flex-wrap: wrap;
145
+ row-gap: var(--card-title-row-gap);
114
146
  justify-content: ${({ $justifyContent }) => $justifyContent};
115
147
  width: 100%;
116
148
  `;
117
149
 
150
+ const Title = styled.h3`
151
+ margin: var(--card-title-margin);
152
+ font-weight: var(--card-title-font-weight);
153
+ `;
154
+
155
+ // The `as` prop selects the icon; the chevron is the default target.
118
156
  const CardLinkIcon = styled(ChevronRightIcon)`
119
157
  width: var(--card-link-icon-width);
120
158
  height: var(--card-link-icon-height);
121
- color: var(--card-link-icon-color);
159
+ color: var(--icon-color-secondary);
122
160
  margin-left: var(--spacing-xxs);
123
- opacity: 0;
124
- transition:
125
- opacity 0.3s,
126
- transform 0.3s;
161
+ margin-top: calc(var(--spacing-xxs) / 2);
127
162
  `;
128
163
 
129
164
  const Body = styled.div<{ $lineClamp?: number }>`
@@ -149,6 +184,29 @@ const Body = styled.div<{ $lineClamp?: number }>`
149
184
  }
150
185
  `;
151
186
 
187
+ const Cta = styled.div<{ $justifyContent: string }>`
188
+ display: flex;
189
+ gap: var(--card-cta-gap);
190
+ align-items: center;
191
+ margin-top: var(--card-cta-margin-top);
192
+ color: var(--card-cta-text-color);
193
+ font-size: var(--card-cta-font-size);
194
+ justify-content: ${({ $justifyContent }) => $justifyContent};
195
+
196
+ && > * {
197
+ cursor: pointer;
198
+ }
199
+ `;
200
+
201
+ const CtaText = styled.span`
202
+ font-weight: var(--card-cta-font-weight);
203
+ `;
204
+
205
+ const CtaIcon = styled(ChevronRightIcon)`
206
+ width: var(--card-cta-icon-width);
207
+ height: var(--card-cta-icon-height);
208
+ `;
209
+
152
210
  const CardWrapper = styled.div.attrs<{
153
211
  $variant: string;
154
212
  $isCardLink: boolean;
@@ -185,6 +243,13 @@ const CardWrapper = styled.div.attrs<{
185
243
  height: 100%;
186
244
  object-fit: cover;
187
245
  `}
246
+ }
247
+
248
+ &:hover,
249
+ &:focus-within {
250
+ ${Cta} {
251
+ color: var(--card-link-icon-color);
252
+ }
188
253
  }
189
254
 
190
255
  &.card-link {
@@ -203,8 +268,8 @@ const CardWrapper = styled.div.attrs<{
203
268
  background-color: var(--card-icon-bg-color-hover);
204
269
  }
205
270
 
206
- svg {
207
- opacity: 1;
271
+ ${CardLinkIcon} {
272
+ color: var(--card-link-icon-color);
208
273
  }
209
274
  }
210
275
  }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import { Badge } from '@redocly/theme/components/Badge/Badge';
5
+
6
+ export type CardBadgeProps = React.PropsWithChildren<{
7
+ color?: string;
8
+ icon?: string;
9
+ /** Inline SVG content for the icon */
10
+ iconRawContent?: string;
11
+ className?: string;
12
+ }>;
13
+
14
+ export function CardBadge({ color, icon, iconRawContent, className, children }: CardBadgeProps) {
15
+ // `tag-default` keeps a badge grey when the name is absent or unknown.
16
+ const classNames = ['tag-default', color && `tag-${color}`, className].filter(Boolean).join(' ');
17
+
18
+ return (
19
+ <CardBadgeWrapper className={classNames} icon={icon} iconRawContent={iconRawContent}>
20
+ {children}
21
+ </CardBadgeWrapper>
22
+ );
23
+ }
24
+
25
+ const CardBadgeWrapper = styled(Badge)`
26
+ display: flex;
27
+ align-items: center;
28
+ margin: var(--card-badge-margin);
29
+ padding: var(--card-badge-padding);
30
+ border-radius: var(--card-badge-border-radius);
31
+ font-size: var(--card-badge-font-size);
32
+ font-weight: var(--card-badge-font-weight);
33
+ line-height: var(--card-badge-line-height);
34
+ white-space: nowrap;
35
+ flex-shrink: 0;
36
+
37
+ --badge-text-color: var(--tag-color);
38
+ --badge-bg-color: var(--tag-bg-color);
39
+ `;
@@ -4,24 +4,35 @@ import styled from 'styled-components';
4
4
  import { GenericIcon } from '@redocly/theme/icons/GenericIcon/GenericIcon';
5
5
 
6
6
  export type CardIconProps = {
7
- variant?: string;
7
+ variant?: 'filled' | 'ghost';
8
8
  src: string;
9
9
  rawContent?: string;
10
10
  position?: 'auto' | 'start' | 'center' | 'end';
11
+ color?: string;
11
12
  };
12
13
 
13
- export function CardIcon({ variant, src, rawContent, position }: CardIconProps) {
14
+ export function CardIcon({ variant, src, rawContent, position, color }: CardIconProps) {
14
15
  return (
15
- <CardIconWrapper $variant={variant} $position={position}>
16
+ <CardIconWrapper
17
+ className={color && `card-icon-color-${color}`}
18
+ $variant={variant}
19
+ $position={position}
20
+ >
16
21
  <GenericIcon icon={src} rawContent={rawContent} />
17
22
  </CardIconWrapper>
18
23
  );
19
24
  }
20
25
 
21
- export const CardIconWrapper = styled.div<{ $variant?: string; $position?: string }>`
26
+ export const CardIconWrapper = styled.div<{
27
+ $variant?: 'filled' | 'ghost';
28
+ $position?: string;
29
+ }>`
30
+ --card-icon-bg-color-hover: ${({ $variant }) => $variant === 'ghost' && 'transparent'};
22
31
  --icon-width: var(--card-icon-width);
23
32
  --icon-height: var(--card-icon-height);
24
33
  color: var(--card-icon-color);
34
+ /* An inline SVG fills from this. */
35
+ --icon-color: var(--card-icon-color);
25
36
 
26
37
  display: flex;
27
38
  align-self: ${({ $position }) => ($position ? $position : 'auto')};
@@ -30,7 +41,7 @@ export const CardIconWrapper = styled.div<{ $variant?: string; $position?: strin
30
41
  min-height: var(--card-icon-height);
31
42
  flex-shrink: 0;
32
43
 
33
- padding: var(--card-icon-padding);
44
+ padding: ${({ $variant }) => ($variant === 'ghost' ? 0 : `var(--card-icon-padding)`)};
34
45
  border: ${({ $variant }) => $variant !== 'ghost' && `var(--card-icon-border)`};
35
46
  border-radius: var(--card-icon-border-radius);
36
47
  overflow: hidden;
@@ -21,5 +21,37 @@ export const cardsDarkMode = css`
21
21
  --card-box-shadow: 0px 8px 24px -4px #00000014, 0px 6px 12px -6px #0000001F;
22
22
  --card-box-shadow-hover: 0px 14px 64px -4px #0000001F, 0px 8px 22px -6px #0000001F;
23
23
  }
24
+
25
+ .card-icon-color-green {
26
+ --card-icon-color: var(--color-green-7);
27
+ }
28
+
29
+ .card-icon-color-grey {
30
+ --card-icon-color: var(--color-warm-grey-8);
31
+ }
32
+
33
+ .card-icon-color-turquoise {
34
+ --card-icon-color: var(--color-turquoise-6);
35
+ }
36
+
37
+ .card-icon-color-magenta {
38
+ --card-icon-color: var(--color-magenta-4);
39
+ }
40
+
41
+ .card-icon-color-carrot {
42
+ --card-icon-color: var(--color-carrot-6);
43
+ }
44
+
45
+ .card-icon-color-grass {
46
+ --card-icon-color: var(--color-grass-7);
47
+ }
48
+
49
+ .card-icon-color-persian-green {
50
+ --card-icon-color: var(--color-persian-green-7);
51
+ }
52
+
53
+ .card-icon-color-sky {
54
+ --card-icon-color: var(--color-sky-6);
55
+ }
24
56
  `;
25
57
  /* eslint-enable theme/no-raw-colors-in-styles */
@@ -21,24 +21,38 @@ export const cards = css`
21
21
  --card-border-radius: var(--border-radius-xl);
22
22
  --card-border-style: solid;
23
23
  --card-link-cursor: pointer;
24
- --card-link-icon-width: var(--h3-font-size);
25
- --card-link-icon-height: var(--h3-font-size);
24
+ --card-link-icon-width: 14px;
25
+ --card-link-icon-height: 14px;
26
26
  --card-border-width: 1px;
27
- --card-image-border-radius: var(--border-radius-md);
27
+ --card-image-border-radius: var(--border-radius-xl);
28
28
  --card-image-aspect-ratio: 16 / 9;
29
- --card-icon-border-radius: var(--border-radius-md);
29
+ --card-icon-border-radius: var(--border-radius-lg);
30
30
  --card-icon-border: var(--card-border-width) var(--border-style) var(--card-icon-border-color);
31
31
  --card-icon-padding: var(--spacing-sm);
32
32
  --card-icon-size: 24px;
33
33
  --card-icon-height: var(--card-icon-size);
34
34
  --card-icon-width: var(--card-icon-size);
35
35
  --card-icon-gap: var(--spacing-base);
36
- --card-title-margin: 0;
36
+ --card-title-margin: 0 var(--spacing-xs) 0 0;
37
37
  --card-title-font-weight: var(--font-weight-semibold);
38
+ --card-title-row-gap: var(--spacing-xxs);
38
39
  --card-content-gap: 4px;
39
40
  --card-padding: 16px 20px;
40
41
  --card-body-font-size: var(--font-size-base);
41
42
  --card-body-line-height: var(--line-height-base);
43
+ --card-cta-margin-top: var(--spacing-base);
44
+ --card-cta-gap: var(--spacing-xxs);
45
+ --card-cta-font-size: var(--font-size-base);
46
+ --card-cta-font-weight: var(--font-weight-regular);
47
+ --card-cta-text-color: var(--text-color-secondary);
48
+ --card-cta-icon-width: 14px;
49
+ --card-cta-icon-height: 14px;
50
+ --card-badge-margin: 0 var(--spacing-xxs) 0 0 ;
51
+ --card-badge-padding: 0 var(--spacing-xxs);
52
+ --card-badge-border-radius: var(--badge-border-radius);
53
+ --card-badge-font-size: var(--font-size-sm);
54
+ --card-badge-font-weight: var(--font-weight-regular);
55
+ --card-badge-line-height: var(--line-height-sm);
42
56
 
43
57
  /**
44
58
  * @tokens Card variants
@@ -74,7 +88,7 @@ export const cards = css`
74
88
  --card-bg-color: transparent;
75
89
  --card-bg-color-hover: var(--layer-color);
76
90
  --card-border-width: 0;
77
- --card-border-radius: var(--border-radius-md);
91
+ --card-border-radius: var(--border-radius-xl);
78
92
  --card-padding: var(--spacing-xs) 0;
79
93
  --card-icon-border-color-hover: var(--card-icon-border-color);
80
94
  --card-icon-bg-color-hover: var(--card-icon-bg-color);
@@ -82,5 +96,65 @@ export const cards = css`
82
96
  --card-hover-transition: initial;
83
97
  }
84
98
 
99
+ /**
100
+ * @tokens Card icon colors
101
+ */
102
+ .card-icon-color-red {
103
+ --card-icon-color: var(--color-red-7);
104
+ }
105
+
106
+ .card-icon-color-green {
107
+ --card-icon-color: var(--color-green-8);
108
+ }
109
+
110
+ .card-icon-color-blue {
111
+ --card-icon-color: var(--color-blue-7);
112
+ }
113
+
114
+ .card-icon-color-grey {
115
+ --card-icon-color: var(--text-color-secondary);
116
+ }
117
+
118
+ .card-icon-color-turquoise {
119
+ --card-icon-color: var(--color-turquoise-8);
120
+ }
121
+
122
+ .card-icon-color-magenta {
123
+ --card-icon-color: var(--color-magenta-7);
124
+ }
125
+
126
+ .card-icon-color-purple {
127
+ --card-icon-color: var(--color-purple-7);
128
+ }
129
+
130
+ .card-icon-color-carrot {
131
+ --card-icon-color: var(--color-carrot-8);
132
+ }
133
+
134
+ .card-icon-color-raspberry {
135
+ --card-icon-color: var(--color-raspberry-7);
136
+ }
137
+
138
+ .card-icon-color-orange {
139
+ --card-icon-color: var(--color-orange-7);
140
+ }
141
+
142
+ .card-icon-color-grass {
143
+ --card-icon-color: var(--color-grass-8);
144
+ }
145
+
146
+ .card-icon-color-persian-green {
147
+ --card-icon-color: var(--color-persian-green-8);
148
+ }
149
+
150
+ .card-icon-color-sky {
151
+ --card-icon-color: var(--color-sky-8);
152
+ }
153
+
154
+ .card-icon-color-blueberry {
155
+ --card-icon-color: var(--color-blueberry-7);
156
+ }
157
+
158
+ // @tokens End
85
159
  `;
86
- /* eslint-enable theme/no-raw-colors-in-styles */
160
+ /* eslint-enable theme/no-raw-colors-in-styles */
@@ -63,6 +63,7 @@ const CodePanelWrapper = styled.div`
63
63
  background-color: var(--code-panel-bg-color);
64
64
  border: 1px solid var(--code-panel-border-color);
65
65
  border-radius: var(--code-panel-border-radius);
66
+ overflow: clip;
66
67
  --code-block-max-height: calc(100vh - var(--navbar-height) - 2 * var(--spacing-xl));
67
68
  height: calc(100vh - var(--navbar-height) - 2 * var(--spacing-xl));
68
69
  position: sticky;
@@ -153,7 +153,7 @@ const StepContent = styled.div.withConfig({
153
153
  margin: var(--spacing-xs) 0px var(--spacing-xs) calc(var(--spacing-unit) * 3.5);
154
154
  padding: var(--spacing-md) var(--spacing-lg);
155
155
  background: ${({ isActive }) => (isActive ? 'var(--layer-color)' : 'none')};
156
- border-radius: var(--border-radius);
156
+ border-radius: var(--code-step-border-radius);
157
157
 
158
158
  &:hover {
159
159
  background-color: ${({ isActive }) =>
@@ -7,10 +7,11 @@ export const codeWalkthrough = css`
7
7
  --code-step-bg-active: var(--layer-color);
8
8
  --code-step-bg-hover: var(--color-hover-base);
9
9
  --code-step-bg-active-hover: var(--layer-color-hover);
10
+ --code-step-border-radius: var(--border-radius-lg);
10
11
 
11
12
  --code-panel-bg-color: var(--layer-color);
12
13
  --code-panel-line-numbering-color: var(--text-color-disabled);
13
14
  --code-panel-header-height: var(--spacing-lg);
14
15
  --code-panel-border-color: var(--border-color-secondary);
15
- --code-panel-border-radius: var(--border-radius);
16
+ --code-panel-border-radius: var(--border-radius-xl);
16
17
  `;
@@ -1,4 +1,4 @@
1
- import React, { createElement, isValidElement } from 'react';
1
+ import React, { createElement, isValidElement, useContext } from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { useLocation } from 'react-router';
4
4
 
@@ -9,6 +9,7 @@ import { concatClassNames } from '@redocly/theme/core/utils';
9
9
  import { LinkIcon } from '@redocly/theme/icons/LinkIcon/LinkIcon';
10
10
  import { PageActions } from '@redocly/theme/components/PageActions/PageActions';
11
11
  import { useThemeHooks } from '@redocly/theme/core/hooks';
12
+ import { PageActionsContext } from '@redocly/theme/core/contexts';
12
13
  import {
13
14
  ANCHOR_CLASS,
14
15
  HEADING_ANCHOR_CLASS,
@@ -65,8 +66,10 @@ export function Heading({
65
66
  const { usePageProps } = useThemeHooks();
66
67
  const pageProps = usePageProps();
67
68
 
68
- const isMarkdownPage =
69
- pageProps?.metadata?.type === 'markdown' || pageProps?.metadata?.type === 'asciidoc';
69
+ // The page-type fallback is only for backward compatibility; templates set the scope.
70
+ const withPageActions =
71
+ useContext(PageActionsContext) ??
72
+ (pageProps?.metadata?.type === 'markdown' || pageProps?.metadata?.type === 'asciidoc');
70
73
  const headingTextId = `${id}-heading-text`;
71
74
 
72
75
  const linkEl = (
@@ -101,7 +104,7 @@ export function Heading({
101
104
  <HeadingContentWrapper>
102
105
  {linkEl}
103
106
  {headingText}
104
- {isMarkdownPage && __idx === 0 ? <PageActions pageSlug={pathname} /> : null}
107
+ {withPageActions && __idx === 0 ? <PageActions pageSlug={pathname} /> : null}
105
108
  </HeadingContentWrapper>
106
109
  </div>
107
110
  );
@@ -173,6 +173,7 @@ export function TabList({
173
173
  });
174
174
 
175
175
  useEffect(() => {
176
+ // oxlint-disable-next-line react-you-might-not-need-an-effect/no-pass-data-to-parent
176
177
  onReadyChange?.(isReady);
177
178
  }, [isReady, onReadyChange]);
178
179
 
@@ -281,6 +282,7 @@ const useHighlightBarAnimation = (props: UseHighlightBarAnimationProps) => {
281
282
  });
282
283
 
283
284
  useEffect(() => {
285
+ // oxlint-disable-next-line react-you-might-not-need-an-effect/no-pass-data-to-parent
284
286
  const activeIndex = childrenArray.findIndex((child) => child.props.label === activeTab);
285
287
  const container = tabsContainerRef.current;
286
288
 
@@ -302,6 +304,7 @@ const useHighlightBarAnimation = (props: UseHighlightBarAnimationProps) => {
302
304
  const moreButtonRect = moreButton.getBoundingClientRect();
303
305
  const containerRect = container.getBoundingClientRect();
304
306
 
307
+ // oxlint-disable-next-line react-you-might-not-need-an-effect/no-derived-state
305
308
  setHighlightStyle({
306
309
  left: moreButtonRect.left - containerRect.left,
307
310
  width: moreButtonRect.width,
@@ -319,6 +322,7 @@ const useHighlightBarAnimation = (props: UseHighlightBarAnimationProps) => {
319
322
 
320
323
  if (visibleTabs.includes(activeIndex)) {
321
324
  activeTabElement.classList.add('active');
325
+ // oxlint-disable-next-line react-you-might-not-need-an-effect/no-derived-state
322
326
  setHighlightStyle({ left: offsetLeft, width: offsetWidth });
323
327
  return;
324
328
  }
@@ -400,8 +404,8 @@ export const TabItem = styled.li.withConfig({
400
404
  right: -4px;
401
405
  bottom: -2px;
402
406
  left: -4px;
403
- border: 1px solid var(--button-border-color-focused);
404
- border-radius: 6px;
407
+ border: var(--border-width) var(--border-style) var(--button-border-color-focused);
408
+ border-radius: var(--border-radius-md);
405
409
  pointer-events: none;
406
410
  }
407
411
  }
@@ -144,7 +144,9 @@ function useValidateActiveTab(
144
144
  initialTab: string,
145
145
  ) {
146
146
  useEffect(() => {
147
+ // oxlint-disable-next-line react-you-might-not-need-an-effect/no-pass-data-to-parent
147
148
  const availableLabels = childrenArray.map((child) => child.props.label);
149
+ // oxlint-disable-next-line react-you-might-not-need-an-effect/no-pass-data-to-parent
148
150
  if (activeTab && !availableLabels.includes(activeTab) && availableLabels.length > 0) {
149
151
  setActiveTab(initialTab);
150
152
  }
@@ -221,8 +223,8 @@ export const TabContent = styled.div`
221
223
  right: -4px;
222
224
  bottom: -2px;
223
225
  left: -4px;
224
- border: 1px solid var(--button-border-color-focused);
225
- border-radius: 6px;
226
+ border: var(--border-width) var(--border-style) var(--button-border-color-focused);
227
+ border-radius: var(--border-radius-md);
226
228
  pointer-events: none;
227
229
  }
228
230
  }
@@ -50,7 +50,7 @@ export const markdownTabs = css`
50
50
  --md-tabs-small-tab-font-size: var(--font-size-base); // @presenter FontSize
51
51
  --md-tabs-small-tab-font-weight: var(--font-weight-regular); // @presenter FontWeight
52
52
  --md-tabs-small-tab-line-height: var(--line-height-base); // @presenter LineHeight
53
- --md-tabs-small-tab-border-radius: var(--border-radius); // @presenter BorderRadius
53
+ --md-tabs-small-tab-border-radius: var(--border-radius-md); // @presenter BorderRadius
54
54
 
55
55
  --md-tabs-active-tab-text-color: var(--color-primary-text, var(--md-tabs-active-tab-text-color-legacy)); // @presenter Color
56
56
  --md-tabs-active-tab-font-family: var(--md-tabs-tab-font-family); // @presenter FontFamily
@@ -63,14 +63,14 @@ export const markdownTabs = css`
63
63
  --md-tabs-medium-active-tab-line-height: var(--md-tabs-medium-tab-line-height); // @presenter LineHeight
64
64
  --md-tabs-medium-active-tab-padding: var(--md-tabs-medium-tab-padding); // @presenter Spacing
65
65
  --md-tabs-medium-active-tab-border-width: var(--md-tabs-medium-tab-border-width); // @presenter Spacing
66
- --md-tabs-medium-active-tab-border-radius: 6px; // @presenter BorderRadius
66
+ --md-tabs-medium-active-tab-border-radius: var(--border-radius-lg); // @presenter BorderRadius
67
67
 
68
68
  --md-tabs-small-active-tab-font-size: var(--md-tabs-small-tab-font-size); // @presenter FontSize
69
69
  --md-tabs-small-active-tab-font-weight: var(--md-tabs-small-tab-font-weight); // @presenter FontWeight
70
70
  --md-tabs-small-active-tab-line-height: var(--md-tabs-small-tab-line-height); // @presenter LineHeight
71
71
  --md-tabs-small-active-tab-padding: var(--md-tabs-small-tab-padding); // @presenter Spacing
72
72
  --md-tabs-small-active-tab-border-width: var(--md-tabs-medium-tab-border-width); // @presenter Spacing
73
- --md-tabs-small-active-tab-border-radius: var(--border-radius); // @presenter BorderRadius
73
+ --md-tabs-small-active-tab-border-radius: var(--border-radius-md); // @presenter BorderRadius
74
74
 
75
75
  --md-tabs-hover-tab-text-color: var(--md-tabs-tab-text-color); // @presenter Color
76
76
  --md-tabs-hover-tab-font-family: var(--md-tabs-tab-font-family); // @presenter FontFamily
@@ -90,7 +90,7 @@ export const markdownTabs = css`
90
90
  --md-tabs-small-hover-tab-line-height: var(--md-tabs-small-tab-line-height); // @presenter LineHeight
91
91
  --md-tabs-small-hover-tab-padding: var(--md-tabs-small-tab-padding); // @presenter Spacing
92
92
  --md-tabs-small-hover-tab-border-width: var(--md-tabs-medium-tab-border-width); // @presenter Spacing
93
- --md-tabs-small-hover-tab-border-radius: var(--border-radius); // @presenter BorderRadius
93
+ --md-tabs-small-hover-tab-border-radius: var(--border-radius-md); // @presenter BorderRadius
94
94
 
95
95
  --md-tabs-tab-text-disabled-color: var(--text-color-disabled); // @presenter Color
96
96
 
@@ -1,3 +1,5 @@
1
+ export * from '@redocly/theme/markdoc/components/Accordion/Accordion';
2
+ export * from '@redocly/theme/markdoc/components/Accordion/AccordionGroup';
1
3
  export * from '@redocly/theme/markdoc/components/Admonition/Admonition';
2
4
  export * from '@redocly/theme/markdoc/components/InlineSvg/InlineSvg';
3
5
  export * from '@redocly/theme/markdoc/components/MarkdocExample/MarkdocExample';
@@ -8,6 +8,8 @@ export * from '@redocly/theme/markdoc/attributes/svg-content';
8
8
  /* Components */
9
9
  export * as components from '@redocly/theme/markdoc/components/default';
10
10
  /* Tags */
11
+ import { accordion } from '@redocly/theme/markdoc/tags/accordion';
12
+ import { accordionGroup } from '@redocly/theme/markdoc/tags/accordion-group';
11
13
  import { admonition } from '@redocly/theme/markdoc/tags/admonition';
12
14
  import { html } from '@redocly/theme/markdoc/tags/html';
13
15
  import { markdocExample } from '@redocly/theme/markdoc/tags/markdoc-example';
@@ -33,6 +35,8 @@ import { loginButton } from '@redocly/theme/markdoc/tags/login-button';
33
35
  import { diagram } from '@redocly/theme/markdoc/tags/diagram';
34
36
 
35
37
  export const tags = {
38
+ [accordion.tagName]: accordion.schema,
39
+ [accordionGroup.tagName]: accordionGroup.schema,
36
40
  [admonition.tagName]: admonition.schema,
37
41
  [debug.tagName]: debug.schema,
38
42
  [html.tagName]: html.schema,
@@ -0,0 +1,8 @@
1
+ import type { MarkdocSchemaWrapper } from '@redocly/theme/markdoc/tags/types';
2
+
3
+ export const accordionGroup: MarkdocSchemaWrapper = {
4
+ schema: {
5
+ render: 'AccordionGroup',
6
+ },
7
+ tagName: 'accordion-group',
8
+ };
@@ -0,0 +1,12 @@
1
+ import type { MarkdocSchemaWrapper } from '@redocly/theme/markdoc/tags/types';
2
+
3
+ export const accordion: MarkdocSchemaWrapper = {
4
+ schema: {
5
+ render: 'Accordion',
6
+ attributes: {
7
+ title: { type: String, required: true },
8
+ expanded: { type: Boolean, default: false },
9
+ },
10
+ },
11
+ tagName: 'accordion',
12
+ };
@@ -7,7 +7,7 @@ export const admonition: MarkdocSchemaWrapper = {
7
7
  type: String,
8
8
  required: true,
9
9
  default: 'info',
10
- matches: ['warning', 'info', 'danger', 'success', 'default'],
10
+ matches: ['warning', 'info', 'danger', 'success', 'idea'],
11
11
  },
12
12
  name: { type: String },
13
13
  },
@@ -52,7 +52,21 @@ export const card: MarkdocSchemaWrapper = {
52
52
  type: String,
53
53
  matches: ['filled', 'ghost'],
54
54
  },
55
+ iconColor: { type: String },
55
56
  to: { type: String, resolver: 'link' },
57
+ linkIcon: {
58
+ type: String,
59
+ matches: ['arrow', 'chevron'],
60
+ },
61
+ cta: { type: String },
62
+ badge: { type: String },
63
+ badgeColor: { type: String },
64
+ badgeIcon: { type: String, resolver: 'relativeOrCdnIcon' },
65
+ badgeIconRawContent: {
66
+ // internal use only
67
+ type: String,
68
+ render: true,
69
+ },
56
70
  },
57
71
  },
58
72
  tagName: 'card',