@redocly/theme 0.68.0-next.0 → 0.68.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/lib/components/Accordion/Accordion.d.ts +1 -1
  2. package/lib/components/Accordion/AccordionBody.d.ts +1 -1
  3. package/lib/components/Accordion/AccordionHeader.d.ts +1 -1
  4. package/lib/components/Admonition/Admonition.d.ts +1 -1
  5. package/lib/components/Breadcrumbs/BreadcrumbDropdown.d.ts +1 -1
  6. package/lib/components/Button/Button.d.ts +1 -1
  7. package/lib/components/Buttons/ConnectMCPButton.d.ts +1 -1
  8. package/lib/components/Buttons/DownloadButton.d.ts +1 -1
  9. package/lib/components/Buttons/NewTabButton.d.ts +1 -1
  10. package/lib/components/Catalog/CatalogActionsRow.d.ts +1 -1
  11. package/lib/components/Catalog/CatalogEntities.js +2 -11
  12. package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +1 -1
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -1
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +1 -1
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.d.ts +1 -1
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.d.ts +1 -1
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.d.ts +1 -1
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.d.ts +1 -1
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.d.ts +1 -1
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.d.ts +1 -1
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.d.ts +1 -1
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.d.ts +1 -1
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +1 -1
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +1 -1
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +1 -1
  26. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +1 -1
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -1
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +1 -1
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +3 -16
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +1 -1
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +1 -1
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +1 -1
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +3 -9
  34. package/lib/components/Catalog/CatalogEntity/ShowMoreButton.d.ts +1 -1
  35. package/lib/components/Catalog/CatalogEntityIcon.d.ts +1 -1
  36. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +1 -1
  37. package/lib/components/Catalog/CatalogFilter/CatalogFilter.d.ts +1 -1
  38. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.d.ts +1 -1
  39. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +1 -7
  40. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +1 -1
  41. package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.d.ts +1 -1
  42. package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.d.ts +1 -1
  43. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +1 -1
  44. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +1 -1
  45. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +1 -1
  46. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +1 -1
  47. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +1 -1
  48. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +1 -1
  49. package/lib/components/Catalog/CatalogPageDescription.d.ts +1 -1
  50. package/lib/components/Catalog/CatalogSelector.d.ts +2 -2
  51. package/lib/components/Catalog/CatalogSortButton.d.ts +1 -1
  52. package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.d.ts +1 -1
  53. package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.d.ts +1 -1
  54. package/lib/components/Catalog/CatalogTags.d.ts +1 -1
  55. package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
  56. package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.d.ts +1 -1
  57. package/lib/components/CodeBlock/CodeBlockControls.d.ts +1 -1
  58. package/lib/components/Feedback/Comment.d.ts +1 -1
  59. package/lib/components/Feedback/Feedback.js +4 -1
  60. package/lib/components/Feedback/ReportDialog.d.ts +1 -1
  61. package/lib/components/Filter/Filter.d.ts +1 -1
  62. package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
  63. package/lib/components/Filter/FilterContent.d.ts +1 -1
  64. package/lib/components/Filter/FilterPopover.d.ts +1 -1
  65. package/lib/components/Filter/FilterSelect.d.ts +1 -1
  66. package/lib/components/Footer/FooterCopyright.d.ts +1 -1
  67. package/lib/components/LoadMore/LoadMore.d.ts +1 -1
  68. package/lib/components/Menu/Menu.d.ts +1 -1
  69. package/lib/components/Menu/MenuContainer.d.ts +1 -1
  70. package/lib/components/PageNavigation/NavigationButton.d.ts +1 -1
  71. package/lib/components/PageNavigation/PageNavigation.d.ts +1 -1
  72. package/lib/components/Panel/Panel.d.ts +1 -1
  73. package/lib/components/Portal/Portal.d.ts +1 -1
  74. package/lib/components/Search/FilterFields/SearchFilterFieldSelect.d.ts +1 -1
  75. package/lib/components/Search/FilterFields/SearchFilterFieldTags.d.ts +1 -1
  76. package/lib/components/Search/SearchAiActionButtons.d.ts +1 -1
  77. package/lib/components/Search/SearchAiConversationInput.d.ts +1 -1
  78. package/lib/components/Search/SearchAiDialog.d.ts +1 -1
  79. package/lib/components/Search/SearchAiMessage.d.ts +1 -1
  80. package/lib/components/Search/SearchAiNegativeFeedbackForm.d.ts +1 -1
  81. package/lib/components/Search/SearchDialog.d.ts +1 -1
  82. package/lib/components/Search/SearchFilter.d.ts +1 -1
  83. package/lib/components/Search/SearchFilterField.d.ts +1 -1
  84. package/lib/components/Search/SearchGroups.d.ts +1 -1
  85. package/lib/components/Search/SearchInput.d.ts +1 -1
  86. package/lib/components/Search/SearchItem.d.ts +1 -1
  87. package/lib/components/Sidebar/Sidebar.d.ts +1 -1
  88. package/lib/components/SidebarActions/styled.d.ts +3 -3
  89. package/lib/components/SidebarLogo/SidebarLogo.d.ts +1 -1
  90. package/lib/components/SvgViewer/SvgViewer.d.ts +1 -1
  91. package/lib/components/Switch/Switch.d.ts +1 -1
  92. package/lib/components/Tags/CounterTag.d.ts +2 -2
  93. package/lib/components/Tags/HttpTag.d.ts +2 -2
  94. package/lib/components/Toast/Toast.d.ts +1 -1
  95. package/lib/components/Typography/CompactTypography.d.ts +8 -8
  96. package/lib/components/UserMenu/LoginButton.d.ts +1 -1
  97. package/lib/components/UserMenu/UserAvatar.d.ts +1 -1
  98. package/lib/components/UserMenu/UserInfoMenuItem.d.ts +1 -1
  99. package/lib/core/hooks/catalog/use-catalog-entity-details.d.ts +1 -1
  100. package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +1 -1
  101. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
  102. package/lib/core/hooks/menu/use-collapse.d.ts +1 -1
  103. package/lib/core/hooks/menu/use-mobile-menu-items.d.ts +2 -2
  104. package/lib/core/hooks/use-active-heading.js +5 -2
  105. package/lib/core/hooks/use-connect-mcp-button.d.ts +1 -1
  106. package/lib/core/hooks/use-element-size.d.ts +1 -1
  107. package/lib/core/hooks/use-product-picker.d.ts +3 -3
  108. package/lib/core/hooks/use-store.d.ts +1 -1
  109. package/lib/core/hooks/use-tabs.d.ts +1 -1
  110. package/lib/core/hooks/use-telemetry-fallback.d.ts +1 -1
  111. package/lib/core/hooks/use-telemetry-fallback.js +1 -1
  112. package/lib/core/hooks/use-toast-logic.d.ts +1 -1
  113. package/lib/core/hooks/use-tooltip-fallback-placement.d.ts +1 -1
  114. package/lib/core/styles/dark.js +11 -0
  115. package/lib/core/styles/global.js +36 -34
  116. package/lib/core/utils/get-operation-color.d.ts +1 -1
  117. package/lib/core/utils/load-and-navigate.d.ts +1 -1
  118. package/lib/core/utils/tooltip-placement.d.ts +2 -2
  119. package/lib/core/utils/transform-revisions-to-version-history.d.ts +1 -1
  120. package/lib/icons/AddIcon/AddIcon.d.ts +3 -1
  121. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.d.ts +3 -1
  122. package/lib/icons/AiStarsIcon/AiStarsIcon.d.ts +3 -1
  123. package/lib/icons/AnthropicIcon/AnthropicIcon.d.ts +3 -1
  124. package/lib/icons/ArrowDownIcon/ArrowDownIcon.d.ts +3 -1
  125. package/lib/icons/ArrowLeftIcon/ArrowLeftIcon.d.ts +3 -1
  126. package/lib/icons/ArrowRightIcon/ArrowRightIcon.d.ts +3 -1
  127. package/lib/icons/ArrowUpRightIcon/ArrowUpRightIcon.d.ts +3 -1
  128. package/lib/icons/AscSortIcon/AscSortIcon.d.ts +3 -1
  129. package/lib/icons/BareMetalServerIcon/BareMetalServerIcon.d.ts +3 -1
  130. package/lib/icons/BookmarkAddIcon/BookmarkAddIcon.d.ts +3 -1
  131. package/lib/icons/BotIcon/BotIcon.d.ts +3 -1
  132. package/lib/icons/CDNIcon/CDNIcon.d.ts +3 -1
  133. package/lib/icons/CardsIcon/CardsIcon.d.ts +3 -1
  134. package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +3 -1
  135. package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +3 -1
  136. package/lib/icons/CertificateIcon/CertificateIcon.d.ts +3 -1
  137. package/lib/icons/CharacterIcon/CharacterIcon.d.ts +3 -1
  138. package/lib/icons/ChatGptIcon/ChatGptIcon.d.ts +3 -1
  139. package/lib/icons/ChatIcon/ChatIcon.d.ts +3 -1
  140. package/lib/icons/CheckboxFilledIcon/CheckboxFilledIcon.d.ts +3 -1
  141. package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +6 -4
  142. package/lib/icons/CheckmarkFilledIcon/CheckmarkFilledIcon.d.ts +3 -1
  143. package/lib/icons/CheckmarkIcon/CheckmarkIcon.d.ts +3 -1
  144. package/lib/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.d.ts +3 -1
  145. package/lib/icons/ChevronDownIcon/ChevronDownIcon.d.ts +3 -1
  146. package/lib/icons/ChevronLeftIcon/ChevronLeftIcon.d.ts +3 -1
  147. package/lib/icons/ChevronRightIcon/ChevronRightIcon.d.ts +3 -1
  148. package/lib/icons/ChevronSortIcon/ChevronSortIcon.d.ts +5 -3
  149. package/lib/icons/ChevronUpIcon/ChevronUpIcon.d.ts +3 -1
  150. package/lib/icons/CircleDashIcon/CircleDashIcon.d.ts +3 -1
  151. package/lib/icons/ClaudeIcon/ClaudeIcon.d.ts +3 -1
  152. package/lib/icons/CleanIcon/CleanIcon.d.ts +3 -1
  153. package/lib/icons/CloseFilledIcon/CloseFilledIcon.d.ts +3 -1
  154. package/lib/icons/CloseIcon/CloseIcon.d.ts +3 -1
  155. package/lib/icons/CloseOutlineIcon/CloseOutlineIcon.d.ts +3 -1
  156. package/lib/icons/CloudUploadIcon/CloudUploadIcon.d.ts +3 -1
  157. package/lib/icons/CodeIcon/CodeIcon.d.ts +3 -1
  158. package/lib/icons/ColorPaletteIcon/ColorPaletteIcon.d.ts +3 -1
  159. package/lib/icons/ConnectIcon/ConnectIcon.d.ts +3 -1
  160. package/lib/icons/ContrastIcon/ContrastIcon.d.ts +3 -1
  161. package/lib/icons/CookieIcon/CookieIcon.d.ts +3 -1
  162. package/lib/icons/CopyIcon/CopyIcon.d.ts +3 -1
  163. package/lib/icons/CopyLinkIcon/CopyLinkIcon.d.ts +3 -1
  164. package/lib/icons/CubeIcon/CubeIcon.d.ts +3 -1
  165. package/lib/icons/CursorIcon/CursorIcon.d.ts +3 -1
  166. package/lib/icons/CurveAutoColonIcon/CurveAutoColonIcon.d.ts +3 -1
  167. package/lib/icons/DataFormatIcon/DataFormatIcon.d.ts +3 -1
  168. package/lib/icons/DataRefineryIcon/DataRefineryIcon.d.ts +3 -1
  169. package/lib/icons/DatabaseIcon/DatabaseIcon.d.ts +3 -1
  170. package/lib/icons/DescSortIcon/DescSortIcon.d.ts +3 -1
  171. package/lib/icons/DeselectIcon/DeselectIcon.d.ts +3 -1
  172. package/lib/icons/DirectionRightIcon/DirectionRightIcon.d.ts +3 -1
  173. package/lib/icons/DocumentAddIcon/DocumentAddIcon.d.ts +3 -1
  174. package/lib/icons/DocumentBlankIcon/DocumentBlankIcon.d.ts +3 -1
  175. package/lib/icons/DocumentCssIcon/DocumentCssIcon.d.ts +3 -1
  176. package/lib/icons/DocumentGraphqlIcon/DocumentGraphqlIcon.d.ts +3 -1
  177. package/lib/icons/DocumentHtmlIcon/DocumentHtmlIcon.d.ts +3 -1
  178. package/lib/icons/DocumentIcon/DocumentIcon.d.ts +3 -1
  179. package/lib/icons/DocumentJavaIcon/DocumentJavaIcon.d.ts +3 -1
  180. package/lib/icons/DocumentJsIcon/DocumentJsIcon.d.ts +3 -1
  181. package/lib/icons/DocumentJsonIcon/DocumentJsonIcon.d.ts +3 -1
  182. package/lib/icons/DocumentMarkdownIcon/DocumentMarkdownIcon.d.ts +3 -1
  183. package/lib/icons/DocumentPythonIcon/DocumentPythonIcon.d.ts +3 -1
  184. package/lib/icons/DocumentReactIcon/DocumentReactIcon.d.ts +3 -1
  185. package/lib/icons/DocumentShellIcon/DocumentShellIcon.d.ts +3 -1
  186. package/lib/icons/DocumentTsIcon/DocumentTsIcon.d.ts +3 -1
  187. package/lib/icons/DocumentYamlIcon/DocumentYamlIcon.d.ts +3 -1
  188. package/lib/icons/DownloadIcon/DownloadIcon.d.ts +3 -1
  189. package/lib/icons/DraggableIcon/DraggableIcon.d.ts +3 -1
  190. package/lib/icons/EditIcon/EditIcon.d.ts +3 -1
  191. package/lib/icons/EmailIcon/EmailIcon.d.ts +3 -1
  192. package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +3 -1
  193. package/lib/icons/ErrorFilledIcon/ErrorFilledIcon.d.ts +3 -1
  194. package/lib/icons/ErrorIcon/ErrorIcon.d.ts +3 -1
  195. package/lib/icons/ExportIcon/ExportIcon.d.ts +3 -1
  196. package/lib/icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon.d.ts +3 -1
  197. package/lib/icons/FaceNeutralIcon/FaceNeutralIcon.d.ts +3 -1
  198. package/lib/icons/FaceSatisfiedIcon/FaceSatisfiedIcon.d.ts +3 -1
  199. package/lib/icons/FileIcon/FileIcon.d.ts +3 -1
  200. package/lib/icons/FileStorageIcon/FileStorageIcon.d.ts +3 -1
  201. package/lib/icons/FilterIcon/FilterIcon.d.ts +3 -1
  202. package/lib/icons/FitToViewIcon/FitToViewIcon.d.ts +3 -1
  203. package/lib/icons/FlowIcon/FlowIcon.d.ts +3 -1
  204. package/lib/icons/FolderAddIcon/FolderAddIcon.d.ts +3 -1
  205. package/lib/icons/FolderIcon/FolderIcon.d.ts +3 -1
  206. package/lib/icons/FolderMoveToIcon/FolderMoveToIcon.d.ts +3 -1
  207. package/lib/icons/GeminiIcon/GeminiIcon.d.ts +3 -1
  208. package/lib/icons/GenericIcon/GenericIcon.d.ts +1 -1
  209. package/lib/icons/GithubIcon/GithubIcon.d.ts +3 -1
  210. package/lib/icons/GlobalOutlinedIcon/GlobalOutlinedIcon.d.ts +3 -1
  211. package/lib/icons/GraphIcon/GraphIcon.d.ts +3 -1
  212. package/lib/icons/GraphqlIcon/GraphqlIcon.d.ts +3 -1
  213. package/lib/icons/GridIcon/GridIcon.d.ts +3 -1
  214. package/lib/icons/HashtagIcon/HashtagIcon.d.ts +3 -1
  215. package/lib/icons/HexagonIcon/HexagonIcon.d.ts +3 -1
  216. package/lib/icons/HierarchyIcon/HierarchyIcon.d.ts +3 -1
  217. package/lib/icons/HorizontalViewIcon/HorizontalViewIcon.d.ts +3 -1
  218. package/lib/icons/IBMCloudHyperProtectCryptoServicesIcon/IBMCloudHyperProtectCryptoServicesIcon.d.ts +3 -1
  219. package/lib/icons/IdeaIcon/IdeaIcon.d.ts +3 -1
  220. package/lib/icons/InformationFilledIcon/InformationFilledIcon.d.ts +3 -1
  221. package/lib/icons/InformationIcon/InformationIcon.d.ts +3 -1
  222. package/lib/icons/JsonIcon/JsonIcon.d.ts +3 -1
  223. package/lib/icons/KafkaIcon/KafkaIcon.d.ts +3 -1
  224. package/lib/icons/LaunchIcon/LaunchIcon.d.ts +3 -1
  225. package/lib/icons/LinkIcon/LinkIcon.d.ts +3 -1
  226. package/lib/icons/LogoutIcon/LogoutIcon.d.ts +3 -1
  227. package/lib/icons/MagicWandIcon/MagicWandIcon.d.ts +3 -1
  228. package/lib/icons/MarkdownFullIcon/MarkdownFullIcon.d.ts +3 -1
  229. package/lib/icons/MaximizeIcon/MaximizeIcon.d.ts +3 -1
  230. package/lib/icons/MenuIcon/MenuIcon.d.ts +3 -1
  231. package/lib/icons/MinimizeIcon/MinimizeIcon.d.ts +3 -1
  232. package/lib/icons/MobileSidebarIcon/MobileSidebarIcon.d.ts +3 -1
  233. package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +3 -1
  234. package/lib/icons/MoonIcon/MoonIcon.d.ts +3 -1
  235. package/lib/icons/NavaidMilitaryIcon/NavaidMilitaryIcon.d.ts +3 -1
  236. package/lib/icons/NetworkIcon/NetworkIcon.d.ts +3 -1
  237. package/lib/icons/NoneIcon/NoneIcon.d.ts +3 -1
  238. package/lib/icons/NoteIcon/NoteIcon.d.ts +3 -1
  239. package/lib/icons/NotesIcon/NotesIcon.d.ts +3 -1
  240. package/lib/icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon.d.ts +3 -1
  241. package/lib/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon.d.ts +3 -1
  242. package/lib/icons/PeopleIcon/PeopleIcon.d.ts +3 -1
  243. package/lib/icons/PlayIcon/PlayIcon.d.ts +3 -1
  244. package/lib/icons/PlaylistIcon/PlaylistIcon.d.ts +3 -1
  245. package/lib/icons/PlusCustomIcon/PlusCustomIcon.d.ts +3 -1
  246. package/lib/icons/RabbitMQIcon/RabbitMQIcon.d.ts +3 -1
  247. package/lib/icons/RadioCheckButtonIcon/RadioCheckButtonIcon.d.ts +3 -1
  248. package/lib/icons/RecentlyViewedIcon/RecentlyViewedIcon.d.ts +3 -1
  249. package/lib/icons/RedoclyIcon/RedoclyIcon.d.ts +3 -1
  250. package/lib/icons/RenewIcon/RenewIcon.d.ts +3 -1
  251. package/lib/icons/ResetIcon/ResetIcon.d.ts +3 -1
  252. package/lib/icons/RestartIcon/RestartIcon.d.ts +3 -1
  253. package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.d.ts +8 -8
  254. package/lib/icons/RocketIcon/RocketIcon.d.ts +3 -1
  255. package/lib/icons/SaveIcon/SaveIcon.d.ts +3 -1
  256. package/lib/icons/SearchIcon/SearchIcon.d.ts +3 -1
  257. package/lib/icons/SecurityIcon/SecurityIcon.d.ts +3 -1
  258. package/lib/icons/SelectIcon/SelectIcon.d.ts +3 -1
  259. package/lib/icons/SendIcon/SendIcon.d.ts +3 -1
  260. package/lib/icons/SettingsCogIcon/SettingsCogIcon.d.ts +3 -1
  261. package/lib/icons/SettingsIcon/SettingsIcon.d.ts +5 -3
  262. package/lib/icons/ShareIcon/ShareIcon.d.ts +3 -1
  263. package/lib/icons/SidePanelCloseIcon/SidePanelCloseIcon.d.ts +3 -1
  264. package/lib/icons/SidePanelOpenIcon/SidePanelOpenIcon.d.ts +3 -1
  265. package/lib/icons/SlackIcon/SlackIcon.d.ts +3 -1
  266. package/lib/icons/SortIcon/SortIcon.d.ts +3 -1
  267. package/lib/icons/SpinnerIcon/SpinnerIcon.d.ts +3 -1
  268. package/lib/icons/StarFilledIcon/StarFilledIcon.d.ts +3 -1
  269. package/lib/icons/StarIcon/StarIcon.d.ts +3 -1
  270. package/lib/icons/StopIcon/StopIcon.d.ts +3 -1
  271. package/lib/icons/SubtractIcon/SubtractIcon.d.ts +3 -1
  272. package/lib/icons/SunIcon/SunIcon.d.ts +3 -1
  273. package/lib/icons/TableBuiltIcon/TableBuiltIcon.d.ts +3 -1
  274. package/lib/icons/TableIcon/TableIcon.d.ts +3 -1
  275. package/lib/icons/TagsIcon/TagsIcon.d.ts +3 -1
  276. package/lib/icons/TaskViewIcon/TaskViewIcon.d.ts +3 -1
  277. package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.d.ts +3 -1
  278. package/lib/icons/ThumbDownIcon/ThumbDownIcon.d.ts +3 -1
  279. package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.d.ts +3 -1
  280. package/lib/icons/ThumbUpIcon/ThumbUpIcon.d.ts +3 -1
  281. package/lib/icons/TimeIcon/TimeIcon.d.ts +3 -1
  282. package/lib/icons/TrashCanIcon/TrashCanIcon.d.ts +3 -1
  283. package/lib/icons/UserIcon/UserIcon.d.ts +3 -1
  284. package/lib/icons/VSCodeIcon/VSCodeIcon.d.ts +3 -1
  285. package/lib/icons/ValueVariableIcon/ValueVariableIcon.d.ts +3 -1
  286. package/lib/icons/VerticalViewIcon/VerticalViewIcon.d.ts +3 -1
  287. package/lib/icons/ViewIcon/ViewIcon.d.ts +3 -1
  288. package/lib/icons/ViewOffIcon/ViewOffIcon.d.ts +3 -1
  289. package/lib/icons/WarningAltFilled/WarningAltFilled.d.ts +3 -1
  290. package/lib/icons/WarningAltFilledIcon/WarningAltFilledIcon.d.ts +3 -1
  291. package/lib/icons/WarningAltIcon/WarningAltIcon.d.ts +3 -1
  292. package/lib/icons/WarningCycleIcon/WarningCycleIcon.d.ts +3 -1
  293. package/lib/icons/WarningFilledIcon/WarningFilledIcon.d.ts +3 -1
  294. package/lib/icons/WarningSquareIcon/WarningSquareIcon.d.ts +3 -1
  295. package/lib/icons/WorkflowAutomationIcon/WorkflowAutomationIcon.d.ts +3 -1
  296. package/lib/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.d.ts +3 -1
  297. package/lib/layouts/CodeWalkthroughLayout.d.ts +1 -1
  298. package/lib/layouts/DocumentationLayout.d.ts +1 -1
  299. package/lib/layouts/DocumentationLayoutBottom.d.ts +1 -1
  300. package/lib/layouts/DocumentationLayoutTop.d.ts +1 -1
  301. package/lib/layouts/PageLayout.d.ts +1 -1
  302. package/lib/markdoc/components/Cards/Card.d.ts +1 -1
  303. package/lib/markdoc/components/CodeWalkthrough/CodeContainer.d.ts +1 -1
  304. package/lib/markdoc/components/CodeWalkthrough/CodeFilters.d.ts +1 -1
  305. package/lib/markdoc/components/CodeWalkthrough/CodePanel.d.ts +1 -1
  306. package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.d.ts +1 -1
  307. package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +1 -1
  308. package/lib/markdoc/components/ConnectMCP/ConnectMCP.d.ts +1 -1
  309. package/lib/markdoc/components/Diagram/Diagram.d.ts +1 -1
  310. package/lib/markdoc/components/Heading/Heading.d.ts +1 -1
  311. package/lib/markdoc/components/InlineSvg/InlineSvg.d.ts +1 -1
  312. package/lib/markdoc/components/LoginButton/LoginButton.d.ts +1 -1
  313. package/lib/markdoc/components/NumberedList/NumberedItem.d.ts +25 -0
  314. package/lib/markdoc/components/NumberedList/NumberedItem.js +217 -0
  315. package/lib/markdoc/components/NumberedList/NumberedList.d.ts +5 -0
  316. package/lib/markdoc/components/NumberedList/NumberedList.js +28 -0
  317. package/lib/markdoc/components/NumberedList/variables.d.ts +1 -0
  318. package/lib/markdoc/components/NumberedList/variables.js +42 -0
  319. package/lib/markdoc/components/Tabs/Tab.d.ts +1 -1
  320. package/lib/markdoc/components/Tabs/TabList.d.ts +3 -3
  321. package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -1
  322. package/lib/markdoc/components/default.d.ts +2 -0
  323. package/lib/markdoc/components/default.js +2 -0
  324. package/lib/markdoc/default.d.ts +46 -1
  325. package/lib/markdoc/default.js +4 -0
  326. package/lib/markdoc/tags/numbered-item.d.ts +2 -0
  327. package/lib/markdoc/tags/numbered-item.js +35 -0
  328. package/lib/markdoc/tags/numbered-list.d.ts +2 -0
  329. package/lib/markdoc/tags/numbered-list.js +28 -0
  330. package/lib/plugin.d.ts +2 -2
  331. package/package.json +6 -6
  332. package/src/components/Catalog/CatalogEntities.tsx +7 -11
  333. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +8 -9
  334. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +6 -8
  335. package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +2 -4
  336. package/src/components/Feedback/Feedback.tsx +11 -1
  337. package/src/core/hooks/use-active-heading.ts +7 -2
  338. package/src/core/hooks/use-telemetry-fallback.ts +1 -1
  339. package/src/core/styles/dark.ts +12 -0
  340. package/src/core/styles/global.ts +2 -0
  341. package/src/markdoc/components/NumberedList/NumberedItem.tsx +274 -0
  342. package/src/markdoc/components/NumberedList/NumberedList.tsx +37 -0
  343. package/src/markdoc/components/NumberedList/variables.ts +39 -0
  344. package/src/markdoc/components/default.ts +2 -0
  345. package/src/markdoc/default.ts +4 -0
  346. package/src/markdoc/tags/numbered-item.ts +46 -0
  347. package/src/markdoc/tags/numbered-list.ts +34 -0
@@ -8,7 +8,8 @@ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/c
8
8
  import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
9
9
  import { CatalogActionsRow } from '@redocly/theme/components/Catalog/CatalogActionsRow';
10
10
  import { CatalogEntityRelationsTableContent } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent';
11
- import { useCatalogEntityDetails, useThemeHooks } from '@redocly/theme/core/hooks';
11
+ import { useThemeHooks } from '@redocly/theme/core/hooks';
12
+ import { getBaseDataAttributes } from '@redocly/theme/core/utils';
12
13
  import { reverseRelationMap } from '@redocly/theme/core/constants';
13
14
 
14
15
  export type CatalogEntityRelationsTableProps = {
@@ -51,22 +52,20 @@ export function CatalogEntityRelationsTable({
51
52
  }: CatalogEntityRelationsTableProps): JSX.Element {
52
53
  const { useTelemetry } = useThemeHooks();
53
54
  const telemetry = useTelemetry();
54
- const { getEntityDetailsLink } = useCatalogEntityDetails({
55
- catalogConfig,
56
- entitiesCatalogConfig,
57
- });
58
55
 
59
56
  const onRowClick = (relatedEntity: BffCatalogRelatedEntity) => {
60
57
  if (searchQuery) {
61
- telemetry.sendCatalogEntitiesRelatedEntitiesListSearchResultClickMessage([
58
+ telemetry.sendCatalogEntitiesRelatedEntitiesListSearchResultClickedMessage([
62
59
  {
63
- id: relatedEntity.id,
64
- object: 'catalog_entity',
65
- uri: getEntityDetailsLink(relatedEntity),
60
+ ...getBaseDataAttributes(
61
+ 'catalogEntitiesRelatedEntitiesListSearchResultId',
62
+ 'catalogEntitiesRelatedEntitiesListSearchResult',
63
+ ),
66
64
  query: searchQuery,
67
65
  entityKey: entity.key,
68
66
  entityType: entity.type,
69
67
  relationType: reverseRelationMap[relatedEntity.relationType],
68
+ relatedEntityId: relatedEntity.id,
70
69
  relatedEntityKey: relatedEntity.key,
71
70
  relatedEntityType: relatedEntity.type,
72
71
  },
@@ -5,8 +5,9 @@ import * as Sampler from 'openapi-sampler';
5
5
  import type { CatalogEntityConfig } from '@redocly/config';
6
6
  import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
7
7
 
8
- import { useCatalogEntityDetails, useThemeHooks } from '@redocly/theme/core/hooks';
8
+ import { useThemeHooks } from '@redocly/theme/core/hooks';
9
9
  import { useCatalogEntitySchema } from '@redocly/theme/core/hooks';
10
+ import { getBaseDataAttributes } from '@redocly/theme/core/utils';
10
11
  import { JsonViewer } from '@redocly/theme/components/JsonViewer/JsonViewer';
11
12
  import { CopyButton } from '@redocly/theme/components/Buttons/CopyButton';
12
13
 
@@ -24,7 +25,6 @@ export type CatalogEntitySchemaProps = {
24
25
  export function CatalogEntitySchema({
25
26
  entity,
26
27
  relatedEntity,
27
- catalogConfig,
28
28
  RedocSchema,
29
29
  StoreProvider,
30
30
  GraphqlTypeRenderer,
@@ -35,9 +35,6 @@ export function CatalogEntitySchema({
35
35
  const { definition, parsedSchema, rawSchema } = useCatalogEntitySchema({ entity, relatedEntity });
36
36
  const isGraphql = entity.metadata?.specType === 'graphql';
37
37
  const graphqlSDL = entity?.metadata?.sdl;
38
- const { getEntityDetailsLink } = useCatalogEntityDetails({
39
- catalogConfig,
40
- });
41
38
 
42
39
  return (
43
40
  <MetadataWrapper data-component-name="Catalog/CatalogEntity/CatalogEntitySchema">
@@ -54,9 +51,10 @@ export function CatalogEntitySchema({
54
51
  onCopyClick={() =>
55
52
  telemetry.sendCatalogEntitiesCopyDataSchemaClickedMessage([
56
53
  {
57
- id: entity.id,
58
- object: 'catalog_entity',
59
- uri: getEntityDetailsLink(entity),
54
+ ...getBaseDataAttributes('catalogEntitiesCopyDataSchemaId', 'button'),
55
+ entityId: entity.id,
56
+ entityKey: entity.key,
57
+ entityType: entity.type,
60
58
  },
61
59
  ])
62
60
  }
@@ -12,7 +12,7 @@ import { FilterInput } from '@redocly/theme/components/Filter/FilterInput';
12
12
  import { useThemeHooks } from '@redocly/theme/core/hooks';
13
13
  import { CheckboxIcon } from '@redocly/theme/icons/CheckboxIcon/CheckboxIcon';
14
14
  import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
15
- import { changeTextCasing } from '@redocly/theme/core/utils';
15
+ import { changeTextCasing, getBaseDataAttributes } from '@redocly/theme/core/utils';
16
16
  import { Accordion } from '@redocly/theme/components/Accordion/Accordion';
17
17
 
18
18
  export type CatalogFilterCheckboxesProps = FilterProps & {
@@ -104,9 +104,7 @@ export function CatalogFilterCheckboxes({
104
104
  filter.toggleOption(value);
105
105
  telemetry.sendCatalogEntitiesFilterCheckboxToggledMessage([
106
106
  {
107
- id: filter.property + '--' + value,
108
- object: 'checkbox',
109
- uri: window.location.href,
107
+ ...getBaseDataAttributes('catalogEntitiesFilterCheckboxId', 'checkbox'),
110
108
  category: filter.property,
111
109
  value: value,
112
110
  },
@@ -11,6 +11,7 @@ import { Comment } from '@redocly/theme/components/Feedback/Comment';
11
11
  import { Mood } from '@redocly/theme/components/Feedback/Mood';
12
12
  import { Scale } from '@redocly/theme/components/Feedback/Scale';
13
13
  import { DEFAULT_FEEDBACK_TYPE } from '@redocly/theme/core/constants';
14
+ import { getBaseDataAttributes } from '@redocly/theme/core/utils';
14
15
 
15
16
  const feedbackComponents = {
16
17
  rating: Rating,
@@ -58,7 +59,16 @@ export function Feedback(props: FeedbackProps & { path?: string }) {
58
59
  settings={settings}
59
60
  onSubmit={(values) => {
60
61
  submitFeedback({ type, values, path });
61
- telemetry.sendFeedbackMessage({ feedbackType: type });
62
+ telemetry.sendFeedbackMessage([
63
+ {
64
+ ...getBaseDataAttributes<
65
+ 'feedbackFormId',
66
+ 'feedbackForm',
67
+ 'urn:redocly:realm:ui:feedbackForm:feedbackFormId'
68
+ >('feedbackFormId', 'feedbackForm'),
69
+ feedbackType: type,
70
+ },
71
+ ]);
62
72
  }}
63
73
  />
64
74
  </FeedbackWrapper>
@@ -64,8 +64,13 @@ export function useActiveHeading(
64
64
  const headers = Array.from(allHeaders);
65
65
 
66
66
  if (displayedHeadingsRef.current && displayedHeadingsRef.current.length > 0) {
67
- const displayedIds = displayedHeadingsRef.current.map((h) => h?.id).filter(Boolean);
68
- return headers.filter((header) => displayedIds.includes(header.id));
67
+ // Resolve targets by id so anchors that are not headings (e.g. numbered
68
+ // list items with a lifted headline) can be scrolled to and tracked.
69
+ return displayedHeadingsRef.current
70
+ .map((heading) =>
71
+ heading?.id ? allContent.querySelector<HTMLElement>(`[id="${heading.id}"]`) : null,
72
+ )
73
+ .filter((element): element is HTMLElement => element !== null);
69
74
  }
70
75
 
71
76
  return headers;
@@ -8,7 +8,7 @@ export const useTelemetryFallback = () => ({
8
8
  sendCatalogEntitiesCopyDataSchemaClickedMessage: () => {},
9
9
  sendCatalogEntitiesViewModeChangedMessage: () => {},
10
10
  sendCatalogEntitiesRelatedEntitiesListSearchQueryMessage: () => {},
11
- sendCatalogEntitiesRelatedEntitiesListSearchResultClickMessage: () => {},
11
+ sendCatalogEntitiesRelatedEntitiesListSearchResultClickedMessage: () => {},
12
12
  sendCatalogEntitiesListSearchQueryMessage: () => {},
13
13
  sendCatalogEntitiesListSearchResultClickedMessage: () => {},
14
14
  sendRedirectMessage: () => {},
@@ -60,6 +60,17 @@ const badgesDarkMode = css`
60
60
  // @tokens End
61
61
  `
62
62
 
63
+ const numberedListDarkMode = css`
64
+ /**
65
+ * @tokens Markdown Numbered List
66
+ */
67
+
68
+ --md-numbered-list-marker-bg-color: var(--color-warm-grey-3); // @presenter Color
69
+ --md-numbered-list-marker-bg-color-hover: var(--color-warm-grey-4); // @presenter Color
70
+
71
+ // @tokens End
72
+ `
73
+
63
74
 
64
75
  export const darkMode = css`
65
76
  /* === Dark Theme Colors === */
@@ -352,6 +363,7 @@ export const darkMode = css`
352
363
  ${bannerDarkMode}
353
364
  ${admonitionDarkMode}
354
365
  ${badgesDarkMode}
366
+ ${numberedListDarkMode}
355
367
  ${activeBrandPaletteDark}
356
368
  ${codeBlockDarkMode}
357
369
  /**
@@ -29,6 +29,7 @@ import { productPicker } from '@redocly/theme/components/Product/variables';
29
29
  import { markdown } from '@redocly/theme/components/Markdown/variables';
30
30
  import { banner } from '@redocly/theme/components/Banner/variables';
31
31
  import { markdownTabs } from '@redocly/theme/markdoc/components/Tabs/variables';
32
+ import { markdownNumberedList } from '@redocly/theme/markdoc/components/NumberedList/variables';
32
33
  import { diagram } from '@redocly/theme/markdoc/components/Diagram/variables';
33
34
  import { lastUpdated } from '@redocly/theme/components/LastUpdated/variables';
34
35
  import { logo } from '@redocly/theme/components/Logo/variables';
@@ -1344,6 +1345,7 @@ export const styles = css<{ palette?: string }>`
1344
1345
  ${logo}
1345
1346
  ${markdown}
1346
1347
  ${markdownTabs}
1348
+ ${markdownNumberedList}
1347
1349
  ${diagram}
1348
1350
  ${menu}
1349
1351
  ${mobileMenu}
@@ -0,0 +1,274 @@
1
+ import React, { createElement } from 'react';
2
+ import styled, { css } from 'styled-components';
3
+
4
+ import type { JSX, PropsWithChildren, ReactNode } from 'react';
5
+
6
+ import { GenericIcon } from '@redocly/theme/icons/GenericIcon/GenericIcon';
7
+ import { LinkIcon } from '@redocly/theme/icons/LinkIcon/LinkIcon';
8
+
9
+ export const NumberedListType = {
10
+ ICON: 'icon',
11
+ NUMBER: 'number',
12
+ DOT: 'dot',
13
+ } as const;
14
+
15
+ export type NumberedListType = (typeof NumberedListType)[keyof typeof NumberedListType];
16
+
17
+ export const NumberedListSize = {
18
+ SMALL: 'small',
19
+ MEDIUM: 'medium',
20
+ } as const;
21
+
22
+ export type NumberedListSize = (typeof NumberedListSize)[keyof typeof NumberedListSize];
23
+
24
+ export type NumberedItemProps = PropsWithChildren<{
25
+ headline?: ReactNode;
26
+ anchorId?: string;
27
+ headlineLevel?: number;
28
+ icon?: string | ReactNode;
29
+ /* Internal use only: raw SVG content resolved for relative `.svg` icons */
30
+ iconRawContent?: string;
31
+ className?: string;
32
+ /* Injected by the parent NumberedList component */
33
+ type?: NumberedListType;
34
+ size?: NumberedListSize;
35
+ index?: number;
36
+ isLast?: boolean;
37
+ }>;
38
+
39
+ export function NumberedItem({
40
+ headline,
41
+ anchorId,
42
+ headlineLevel,
43
+ icon,
44
+ iconRawContent,
45
+ className,
46
+ type = NumberedListType.NUMBER,
47
+ size = NumberedListSize.MEDIUM,
48
+ index = 1,
49
+ isLast = true,
50
+ children,
51
+ }: NumberedItemProps): JSX.Element {
52
+ const isDot = type === NumberedListType.DOT;
53
+ const headlineTextId = anchorId ? `${anchorId}-heading-text` : undefined;
54
+
55
+ const marker = (
56
+ <Marker $type={type} $size={size} data-dot={isDot || undefined}>
57
+ {type === NumberedListType.ICON && (
58
+ <MarkerContent className="numbered-item-marker-content">
59
+ <GenericIcon icon={icon} rawContent={iconRawContent} />
60
+ </MarkerContent>
61
+ )}
62
+ {type === NumberedListType.NUMBER && (
63
+ <MarkerContent className="numbered-item-marker-content">{index}</MarkerContent>
64
+ )}
65
+ {anchorId && (
66
+ <MarkerLink className="numbered-item-marker-link" $isDot={isDot}>
67
+ <MarkerLinkIcon
68
+ aria-hidden="true"
69
+ focusable="false"
70
+ color="--md-numbered-list-marker-text-color"
71
+ />
72
+ </MarkerLink>
73
+ )}
74
+ </Marker>
75
+ );
76
+
77
+ return (
78
+ <NumberedItemWrapper
79
+ data-component-name="Markdoc/NumberedList/NumberedItem"
80
+ className={className}
81
+ id={anchorId}
82
+ $size={size}
83
+ $isDot={isDot}
84
+ >
85
+ <MarkerRail>
86
+ {anchorId ? (
87
+ <a
88
+ href={`#${anchorId}`}
89
+ {...(headline
90
+ ? { 'aria-labelledby': headlineTextId }
91
+ : { 'aria-label': 'Link to this item' })}
92
+ >
93
+ {marker}
94
+ </a>
95
+ ) : (
96
+ marker
97
+ )}
98
+ <Tail data-testid="numbered-item-tail" $isLast={isLast} />
99
+ </MarkerRail>
100
+ <NumberedItemContent>
101
+ {headline &&
102
+ createElement(
103
+ NumberedItemHeadline,
104
+ { as: `h${headlineLevel ?? 3}` as keyof JSX.IntrinsicElements, id: headlineTextId },
105
+ headline,
106
+ )}
107
+ <NumberedItemBody>{children}</NumberedItemBody>
108
+ </NumberedItemContent>
109
+ </NumberedItemWrapper>
110
+ );
111
+ }
112
+
113
+ const markerSize = css<{ $size?: string }>`
114
+ ${({ $size }) =>
115
+ $size === NumberedListSize.SMALL
116
+ ? css`
117
+ width: var(--md-numbered-list-marker-small-size);
118
+ height: var(--md-numbered-list-marker-small-size);
119
+ --icon-width: var(--md-numbered-list-icon-small-size);
120
+ --icon-height: var(--md-numbered-list-icon-small-size);
121
+ `
122
+ : css`
123
+ width: var(--md-numbered-list-marker-medium-size);
124
+ height: var(--md-numbered-list-marker-medium-size);
125
+ --icon-width: var(--md-numbered-list-icon-medium-size);
126
+ --icon-height: var(--md-numbered-list-icon-medium-size);
127
+ `}
128
+ `;
129
+
130
+ const Marker = styled.span<{ $type: string; $size: string }>`
131
+ position: relative;
132
+ display: flex;
133
+ align-items: center;
134
+ justify-content: center;
135
+ flex-shrink: 0;
136
+ border-radius: 50%;
137
+ color: var(--md-numbered-list-marker-text-color);
138
+ font-size: var(--md-numbered-list-marker-font-size);
139
+
140
+ ${({ $type }) =>
141
+ $type === NumberedListType.DOT
142
+ ? css`
143
+ width: var(--md-numbered-list-dot-size);
144
+ height: var(--md-numbered-list-dot-size);
145
+ background-color: var(--text-color-primary);
146
+ `
147
+ : css`
148
+ ${markerSize}
149
+ background-color: var(--md-numbered-list-marker-bg-color);
150
+ `}
151
+ `;
152
+
153
+ const MarkerContent = styled.span`
154
+ display: flex;
155
+ align-items: center;
156
+ justify-content: center;
157
+ `;
158
+
159
+ const MarkerLink = styled.span<{ $isDot?: boolean }>`
160
+ display: none;
161
+ align-items: center;
162
+ justify-content: center;
163
+
164
+ svg {
165
+ width: var(--icon-width, 16px);
166
+ height: var(--icon-height, 16px);
167
+ }
168
+
169
+ ${({ $isDot }) =>
170
+ $isDot &&
171
+ css`
172
+ position: absolute;
173
+ inset-inline-end: calc(100% + var(--md-numbered-list-dot-link-gap));
174
+ `}
175
+ `;
176
+
177
+ const MarkerLinkIcon = styled(LinkIcon)`
178
+ path:first-of-type {
179
+ fill: var(--md-numbered-list-marker-icon-bg-color);
180
+ }
181
+ `;
182
+
183
+ const MarkerRail = styled.span`
184
+ display: flex;
185
+ flex-direction: column;
186
+ align-items: center;
187
+ align-self: stretch;
188
+ flex-shrink: 0;
189
+
190
+ a {
191
+ display: flex;
192
+ border-radius: 50%;
193
+ /* Overrides the global markdown link rule a:not([role='button']), which is more specific. */
194
+ text-decoration: none !important;
195
+
196
+ &:hover,
197
+ &:focus {
198
+ text-decoration: none !important;
199
+ }
200
+ }
201
+ `;
202
+
203
+ const Tail = styled.span<{ $isLast: boolean }>`
204
+ flex: 1 0 0;
205
+ min-height: var(--spacing-xs);
206
+ width: var(--md-numbered-list-tail-width);
207
+ background: ${({ $isLast }) =>
208
+ $isLast
209
+ ? 'var(--md-numbered-list-tail-fade-gradient)'
210
+ : 'var(--md-numbered-list-tail-bg-color)'};
211
+ `;
212
+
213
+ const NumberedItemHeadline = styled.h3`
214
+ margin: 0;
215
+ color: var(--md-numbered-list-headline-text-color);
216
+ font-size: var(--md-numbered-list-headline-font-size);
217
+ font-weight: var(--md-numbered-list-headline-font-weight);
218
+ line-height: var(--md-numbered-list-headline-line-height);
219
+ `;
220
+
221
+ const NumberedItemBody = styled.div`
222
+ display: flex;
223
+ flex-direction: column;
224
+ gap: var(--md-numbered-list-body-gap);
225
+ color: var(--md-numbered-list-body-text-color);
226
+ font-size: var(--md-numbered-list-body-font-size);
227
+
228
+ > p {
229
+ margin: 0;
230
+ }
231
+ `;
232
+
233
+ const NumberedItemContent = styled.div`
234
+ display: flex;
235
+ flex-direction: column;
236
+ gap: var(--spacing-unit);
237
+ flex: 1;
238
+ min-width: 0;
239
+ padding-bottom: var(--spacing-sm);
240
+ `;
241
+
242
+ const NumberedItemWrapper = styled.li<{ $size?: string; $isDot?: boolean }>`
243
+ display: flex;
244
+ gap: var(--md-numbered-list-gap);
245
+ align-items: stretch;
246
+
247
+ ${({ $isDot }) =>
248
+ $isDot &&
249
+ css`
250
+ ${MarkerRail} {
251
+ padding-top: var(--md-numbered-list-dot-rail-padding-top);
252
+ }
253
+ `}
254
+
255
+ &:last-child ${NumberedItemContent} {
256
+ padding-bottom: 0;
257
+ }
258
+
259
+ &:hover,
260
+ &:focus-within {
261
+ ${Marker} {
262
+ background-color: ${({ $isDot }) =>
263
+ $isDot ? 'var(--text-color-primary)' : 'var(--md-numbered-list-marker-bg-color-hover)'};
264
+ }
265
+
266
+ a ${Marker}:not([data-dot]) .numbered-item-marker-content {
267
+ display: none;
268
+ }
269
+
270
+ a ${Marker} .numbered-item-marker-link {
271
+ display: flex;
272
+ }
273
+ }
274
+ `;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { JSX, PropsWithChildren } from 'react';
5
+
6
+ export type NumberedListProps = PropsWithChildren<{
7
+ className?: string;
8
+ }>;
9
+
10
+ export function NumberedList({ className, children }: NumberedListProps): JSX.Element | null {
11
+ if (React.Children.count(children) === 0) {
12
+ return null;
13
+ }
14
+
15
+ return (
16
+ <NumberedListWrapper
17
+ data-component-name="Markdoc/NumberedList/NumberedList"
18
+ className={className}
19
+ >
20
+ {children}
21
+ </NumberedListWrapper>
22
+ );
23
+ }
24
+
25
+ const NumberedListWrapper = styled.ol`
26
+ display: flex;
27
+ flex-direction: column;
28
+ margin: var(--md-numbered-list-margin);
29
+ padding: 0;
30
+ list-style: none;
31
+
32
+ && {
33
+ & > li:not(:last-child) {
34
+ margin-bottom: 0;
35
+ }
36
+ }
37
+ `;
@@ -0,0 +1,39 @@
1
+ import { css } from 'styled-components';
2
+
3
+ export const markdownNumberedList = css`
4
+ /**
5
+ * @tokens Markdown Numbered List
6
+ */
7
+
8
+ --md-numbered-list-margin: var(--spacing-sm) 0; // @presenter Spacing
9
+ --md-numbered-list-gap: var(--spacing-base); // @presenter Spacing
10
+
11
+ --md-numbered-list-marker-bg-color: var(--color-warm-grey-2); // @presenter Color
12
+ --md-numbered-list-marker-bg-color-hover: var(--color-warm-grey-3); // @presenter Color
13
+ --md-numbered-list-marker-icon-bg-color: transparent; // @presenter Color
14
+ --md-numbered-list-marker-text-color: var(--text-color-primary); // @presenter Color
15
+ --md-numbered-list-marker-font-size: var(--font-size-base); // @presenter FontSize
16
+
17
+ --md-numbered-list-marker-medium-size: 28px; // @presenter Spacing
18
+ --md-numbered-list-icon-medium-size: 16px; // @presenter Spacing
19
+ --md-numbered-list-tail-width: 1px; // @presenter Spacing
20
+ --md-numbered-list-marker-small-size: 24px; // @presenter Spacing
21
+ --md-numbered-list-icon-small-size: 12px; // @presenter Spacing
22
+ --md-numbered-list-dot-size: 10px; // @presenter Spacing
23
+ --md-numbered-list-dot-rail-padding-top: 7px; // @presenter Spacing
24
+ --md-numbered-list-dot-link-gap: 6px; // @presenter Spacing
25
+
26
+ --md-numbered-list-tail-bg-color: var(--md-numbered-list-marker-bg-color); // @presenter Color
27
+ --md-numbered-list-tail-fade-gradient: linear-gradient(to bottom, var(--md-numbered-list-tail-bg-color), transparent); // @presenter Color
28
+
29
+ --md-numbered-list-headline-text-color: var(--text-color-primary); // @presenter Color
30
+ --md-numbered-list-headline-font-size: var(--font-size-base); // @presenter FontSize
31
+ --md-numbered-list-headline-font-weight: var(--font-weight-medium); // @presenter FontWeight
32
+ --md-numbered-list-headline-line-height: var(--line-height-base); // @presenter LineHeight
33
+
34
+ --md-numbered-list-body-text-color: var(--text-color-secondary); // @presenter Color
35
+ --md-numbered-list-body-gap: var(--spacing-xs); // @presenter Spacing
36
+ --md-numbered-list-body-font-size: var(--font-size-base); // @presenter FontSize
37
+
38
+ // @tokens End
39
+ `;
@@ -8,6 +8,8 @@ export * from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
8
8
  export * from '@redocly/theme/markdoc/components/Tabs/Tab';
9
9
  export * from '@redocly/theme/markdoc/components/Tabs/TabList';
10
10
  export * from '@redocly/theme/markdoc/components/Tabs/Tabs';
11
+ export * from '@redocly/theme/markdoc/components/NumberedList/NumberedItem';
12
+ export * from '@redocly/theme/markdoc/components/NumberedList/NumberedList';
11
13
  export * from '@redocly/theme/markdoc/components/CodeBlock/CodeBlock';
12
14
  export * from '@redocly/theme/markdoc/components/Cards/Cards';
13
15
  export * from '@redocly/theme/markdoc/components/Cards/Card';
@@ -14,6 +14,8 @@ import { markdocExample } from '@redocly/theme/markdoc/tags/markdoc-example';
14
14
  import { partial } from '@redocly/theme/markdoc/tags/partial';
15
15
  import { tab } from '@redocly/theme/markdoc/tags/tab';
16
16
  import { tabs } from '@redocly/theme/markdoc/tags/tabs';
17
+ import { numberedItem } from '@redocly/theme/markdoc/tags/numbered-item';
18
+ import { numberedList } from '@redocly/theme/markdoc/tags/numbered-list';
17
19
  import { debug } from '@redocly/theme/markdoc/tags/debug';
18
20
  import { codeSnippet } from '@redocly/theme/markdoc/tags/code-snippet';
19
21
  import { inlineSvg } from '@redocly/theme/markdoc/tags/inline-svg';
@@ -38,6 +40,8 @@ export const tags = {
38
40
  [partial.tagName]: partial.schema,
39
41
  [tab.tagName]: tab.schema,
40
42
  [tabs.tagName]: tabs.schema,
43
+ [numberedItem.tagName]: numberedItem.schema,
44
+ [numberedList.tagName]: numberedList.schema,
41
45
  [codeSnippet.tagName]: codeSnippet.schema,
42
46
  [inlineSvg.tagName]: inlineSvg.schema,
43
47
  [cards.tagName]: cards.schema,
@@ -0,0 +1,46 @@
1
+ import markdoc from '@markdoc/markdoc';
2
+
3
+ import type { MarkdocSchemaWrapper } from '@redocly/theme/markdoc/tags/types';
4
+
5
+ import { isTag } from '@redocly/theme/core/utils';
6
+
7
+ const HEADING_TAG_NAME = /^(Heading|h[1-6])$/;
8
+
9
+ export const numberedItem: MarkdocSchemaWrapper = {
10
+ schema: {
11
+ transform(node, config) {
12
+ const attributes = node.transformAttributes(config);
13
+ const children = node.transformChildren(config);
14
+ const [first, ...body] = children;
15
+
16
+ if (isTag(first) && HEADING_TAG_NAME.test(String(first.name))) {
17
+ const headlineLevel =
18
+ typeof first.attributes.level === 'number'
19
+ ? first.attributes.level
20
+ : Number(String(first.name).slice(1)) || undefined;
21
+
22
+ return new markdoc.Tag(
23
+ 'NumberedItem',
24
+ {
25
+ ...attributes,
26
+ headline: first.children,
27
+ anchorId: first.attributes.id,
28
+ headlineLevel,
29
+ },
30
+ body,
31
+ );
32
+ }
33
+
34
+ return new markdoc.Tag('NumberedItem', attributes, children);
35
+ },
36
+ attributes: {
37
+ icon: { type: String, resolver: 'relativeOrCdnIcon' },
38
+ iconRawContent: {
39
+ // internal use only
40
+ type: String,
41
+ render: true,
42
+ },
43
+ },
44
+ },
45
+ tagName: 'numbered-item',
46
+ };
@@ -0,0 +1,34 @@
1
+ import markdoc from '@markdoc/markdoc';
2
+
3
+ import type { Tag } from '@markdoc/markdoc';
4
+ import type { MarkdocSchemaWrapper } from '@redocly/theme/markdoc/tags/types';
5
+
6
+ import { isTag } from '@redocly/theme/core/utils';
7
+
8
+ export const numberedList: MarkdocSchemaWrapper = {
9
+ schema: {
10
+ transform(node, config) {
11
+ const attributes = node.transformAttributes(config);
12
+ const items = node
13
+ .transformChildren(config)
14
+ .filter((child): child is Tag => isTag(child) && child.name === 'NumberedItem');
15
+
16
+ items.forEach((item, index) => {
17
+ item.attributes = {
18
+ ...item.attributes,
19
+ type: attributes.type,
20
+ size: attributes.size,
21
+ index: index + 1,
22
+ isLast: index === items.length - 1,
23
+ };
24
+ });
25
+
26
+ return new markdoc.Tag('NumberedList', attributes, items);
27
+ },
28
+ attributes: {
29
+ type: { type: String, matches: ['icon', 'number', 'dot'], default: 'number' },
30
+ size: { type: String, matches: ['small', 'medium'], default: 'medium' },
31
+ },
32
+ },
33
+ tagName: 'numbered-list',
34
+ };