@redocly/theme 0.55.0-rc.2 → 0.55.0

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 (319) hide show
  1. package/lib/components/Admonition/Admonition.js +4 -0
  2. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
  3. package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -1
  4. package/lib/components/Button/Button.d.ts +1 -0
  5. package/lib/components/Catalog/Catalog.d.ts +11 -0
  6. package/lib/components/Catalog/Catalog.js +138 -0
  7. package/lib/components/Catalog/CatalogActionsRow.d.ts +15 -0
  8. package/lib/components/Catalog/CatalogActionsRow.js +34 -0
  9. package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +8 -0
  10. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +179 -0
  11. package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +8 -0
  12. package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +20 -0
  13. package/lib/components/Catalog/CatalogEntities.d.ts +18 -0
  14. package/lib/components/Catalog/CatalogEntities.js +63 -0
  15. package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +2 -0
  16. package/lib/components/Catalog/CatalogEntitiesEmptyState.js +38 -0
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +12 -0
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +133 -0
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +7 -0
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +49 -0
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +6 -0
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +48 -0
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +6 -0
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +111 -0
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.d.ts +6 -0
  26. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +25 -0
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +6 -0
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +69 -0
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +7 -0
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +48 -0
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +6 -0
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +19 -0
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +6 -0
  34. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +20 -0
  35. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +6 -0
  36. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +20 -0
  37. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +6 -0
  38. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +23 -0
  39. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +6 -0
  40. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +21 -0
  41. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +6 -0
  42. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +24 -0
  43. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +6 -0
  44. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +21 -0
  45. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +21 -0
  46. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +37 -0
  47. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +10 -0
  48. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -0
  49. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +25 -0
  50. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +27 -0
  51. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +22 -0
  52. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +60 -0
  53. package/lib/components/Catalog/CatalogEntityIcon.d.ts +5 -0
  54. package/lib/components/Catalog/CatalogEntityIcon.js +38 -0
  55. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +5 -0
  56. package/lib/components/Catalog/CatalogEntityTypeIcon.js +42 -0
  57. package/lib/components/Catalog/CatalogHighlight.d.ts +4 -0
  58. package/lib/components/Catalog/CatalogHighlight.js +48 -0
  59. package/lib/components/Catalog/CatalogPageDescription.d.ts +9 -0
  60. package/lib/components/Catalog/CatalogPageDescription.js +52 -0
  61. package/lib/components/Catalog/CatalogSelector.d.ts +12 -0
  62. package/lib/components/Catalog/CatalogSelector.js +48 -0
  63. package/lib/components/Catalog/CatalogSortButton.d.ts +10 -0
  64. package/lib/components/Catalog/CatalogSortButton.js +71 -0
  65. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.d.ts +5 -0
  66. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +19 -0
  67. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -0
  68. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +63 -0
  69. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.d.ts +5 -0
  70. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +19 -0
  71. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +11 -0
  72. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +101 -0
  73. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +31 -0
  74. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +106 -0
  75. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +27 -0
  76. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +127 -0
  77. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +6 -0
  78. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +20 -0
  79. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.d.ts +7 -0
  80. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +66 -0
  81. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +9 -0
  82. package/lib/components/Catalog/CatalogTagsWithTooltip.js +46 -0
  83. package/lib/components/Catalog/CatalogViewModeToggle.d.ts +7 -0
  84. package/lib/components/Catalog/CatalogViewModeToggle.js +67 -0
  85. package/lib/components/Catalog/variables.d.ts +1 -0
  86. package/lib/components/Catalog/variables.dark.d.ts +1 -0
  87. package/lib/components/Catalog/variables.dark.js +8 -0
  88. package/lib/components/Catalog/variables.js +354 -0
  89. package/lib/components/CatalogClassic/CatalogClassicHighlight.js +1 -1
  90. package/lib/components/Dropdown/variables.js +1 -1
  91. package/lib/components/Filter/Filter.d.ts +1 -1
  92. package/lib/components/Filter/Filter.js +2 -2
  93. package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
  94. package/lib/components/Filter/FilterCheckboxes.js +4 -4
  95. package/lib/components/Filter/FilterContent.d.ts +3 -1
  96. package/lib/components/Filter/FilterContent.js +34 -4
  97. package/lib/components/Filter/FilterInput.js +35 -3
  98. package/lib/components/Filter/FilterSelect.d.ts +1 -1
  99. package/lib/components/Filter/FilterSelect.js +4 -4
  100. package/lib/components/Image/Image.js +2 -2
  101. package/lib/components/LoadMore/LoadMore.d.ts +8 -0
  102. package/lib/components/LoadMore/LoadMore.js +18 -0
  103. package/lib/components/Markdown/Markdown.js +1 -1
  104. package/lib/components/Menu/MenuItem.d.ts +1 -1
  105. package/lib/components/Menu/MenuItem.js +7 -3
  106. package/lib/components/PageNavigation/NavigationButton.d.ts +13 -0
  107. package/lib/components/PageNavigation/NavigationButton.js +32 -0
  108. package/lib/components/PageNavigation/NextButton.js +10 -29
  109. package/lib/components/PageNavigation/PageNavigation.js +1 -1
  110. package/lib/components/PageNavigation/PreviousButton.js +11 -27
  111. package/lib/components/Search/SearchAiConversationInput.js +2 -1
  112. package/lib/components/Select/Select.js +22 -6
  113. package/lib/components/Select/SelectInput.d.ts +1 -0
  114. package/lib/components/Select/SelectInput.js +7 -3
  115. package/lib/components/Select/variables.js +2 -2
  116. package/lib/components/Sidebar/Sidebar.d.ts +3 -0
  117. package/lib/components/Sidebar/Sidebar.js +3 -2
  118. package/lib/components/SkipContent/SkipContent.d.ts +2 -0
  119. package/lib/components/SkipContent/SkipContent.js +68 -0
  120. package/lib/components/SkipContent/variables.d.ts +1 -0
  121. package/lib/components/SkipContent/variables.js +23 -0
  122. package/lib/components/Tag/Tag.d.ts +3 -1
  123. package/lib/components/Tag/Tag.js +54 -2
  124. package/lib/components/Tag/variables.js +21 -0
  125. package/lib/components/Tooltip/Tooltip.d.ts +2 -1
  126. package/lib/components/Tooltip/Tooltip.js +26 -19
  127. package/lib/components/Tooltip/variables.js +17 -0
  128. package/lib/components/VersionPicker/VersionPicker.js +22 -3
  129. package/lib/components/VersionPicker/variables.js +1 -0
  130. package/lib/core/constants/catalog.d.ts +1 -0
  131. package/lib/core/constants/catalog.js +5 -0
  132. package/lib/core/constants/common.d.ts +1 -0
  133. package/lib/core/constants/common.js +2 -1
  134. package/lib/core/constants/index.d.ts +1 -0
  135. package/lib/core/constants/index.js +1 -0
  136. package/lib/core/constants/search.d.ts +1 -0
  137. package/lib/core/constants/search.js +2 -1
  138. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
  139. package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
  140. package/lib/core/hooks/catalog/useCatalogEntities.d.ts +4 -0
  141. package/lib/core/hooks/catalog/useCatalogEntities.js +17 -0
  142. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +15 -0
  143. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.js +23 -0
  144. package/lib/core/hooks/catalog/useCatalogTableViewRow.d.ts +11 -0
  145. package/lib/core/hooks/catalog/useCatalogTableViewRow.js +26 -0
  146. package/lib/core/hooks/index.d.ts +2 -0
  147. package/lib/core/hooks/index.js +2 -0
  148. package/lib/core/hooks/use-user-teams.d.ts +1 -0
  149. package/lib/core/hooks/use-user-teams.js +10 -0
  150. package/lib/core/styles/dark.js +2 -0
  151. package/lib/core/styles/global.js +65 -60
  152. package/lib/core/types/catalog.d.ts +118 -5
  153. package/lib/core/types/filter.d.ts +1 -0
  154. package/lib/core/types/hooks.d.ts +11 -4
  155. package/lib/core/types/index.d.ts +1 -0
  156. package/lib/core/types/index.js +1 -0
  157. package/lib/core/types/l10n.d.ts +1 -1
  158. package/lib/core/types/telemetry.d.ts +32 -0
  159. package/lib/core/types/telemetry.js +3 -0
  160. package/lib/core/utils/index.d.ts +1 -0
  161. package/lib/core/utils/index.js +1 -0
  162. package/lib/core/utils/parse-style-string.d.ts +1 -0
  163. package/lib/core/utils/parse-style-string.js +23 -0
  164. package/lib/icons/AscSortIcon/AscSortIcon.d.ts +9 -0
  165. package/lib/icons/AscSortIcon/AscSortIcon.js +25 -0
  166. package/lib/icons/CardsIcon/CardsIcon.d.ts +9 -0
  167. package/lib/icons/CardsIcon/CardsIcon.js +25 -0
  168. package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +9 -0
  169. package/lib/icons/CaretDownIcon/CaretDownIcon.js +22 -0
  170. package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +9 -0
  171. package/lib/icons/CaretUpIcon/CaretUpIcon.js +22 -0
  172. package/lib/icons/DescSortIcon/DescSortIcon.d.ts +9 -0
  173. package/lib/icons/DescSortIcon/DescSortIcon.js +25 -0
  174. package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +9 -0
  175. package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +26 -0
  176. package/lib/icons/GithubIcon/GithubIcon.d.ts +9 -0
  177. package/lib/icons/GithubIcon/GithubIcon.js +22 -0
  178. package/lib/icons/GraphIcon/GraphIcon.d.ts +9 -0
  179. package/lib/icons/GraphIcon/GraphIcon.js +22 -0
  180. package/lib/icons/PeopleIcon/PeopleIcon.d.ts +9 -0
  181. package/lib/icons/PeopleIcon/PeopleIcon.js +27 -0
  182. package/lib/icons/SlackIcon/SlackIcon.d.ts +9 -0
  183. package/lib/icons/SlackIcon/SlackIcon.js +29 -0
  184. package/lib/icons/SortIcon/SortIcon.d.ts +9 -0
  185. package/lib/icons/SortIcon/SortIcon.js +25 -0
  186. package/lib/icons/TableIcon/TableIcon.d.ts +9 -0
  187. package/lib/icons/TableIcon/TableIcon.js +22 -0
  188. package/lib/icons/TagsIcon/TagsIcon.d.ts +9 -0
  189. package/lib/icons/TagsIcon/TagsIcon.js +24 -0
  190. package/lib/index.d.ts +18 -1
  191. package/lib/index.js +19 -1
  192. package/lib/layouts/PageLayout.js +2 -1
  193. package/lib/layouts/RootLayout.js +2 -0
  194. package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
  195. package/lib/markdoc/components/Tabs/Tab.js +10 -2
  196. package/lib/markdoc/components/Tabs/TabList.d.ts +1 -4
  197. package/lib/markdoc/components/Tabs/TabList.js +18 -38
  198. package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
  199. package/lib/markdoc/components/Tabs/Tabs.js +5 -9
  200. package/package.json +4 -3
  201. package/src/components/Admonition/Admonition.tsx +4 -0
  202. package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
  203. package/src/components/Button/Button.tsx +1 -1
  204. package/src/components/Catalog/Catalog.tsx +235 -0
  205. package/src/components/Catalog/CatalogActionsRow.tsx +58 -0
  206. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +227 -0
  207. package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +29 -0
  208. package/src/components/Catalog/CatalogEntities.tsx +107 -0
  209. package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -0
  210. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +207 -0
  211. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +60 -0
  212. package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +67 -0
  213. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +93 -0
  214. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +35 -0
  215. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +83 -0
  216. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +62 -0
  217. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +36 -0
  218. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +38 -0
  219. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +33 -0
  220. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +41 -0
  221. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +42 -0
  222. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +39 -0
  223. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +31 -0
  224. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +97 -0
  225. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +80 -0
  226. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +92 -0
  227. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +127 -0
  228. package/src/components/Catalog/CatalogEntityIcon.tsx +41 -0
  229. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +48 -0
  230. package/src/components/Catalog/CatalogHighlight.tsx +56 -0
  231. package/src/components/Catalog/CatalogPageDescription.tsx +72 -0
  232. package/src/components/Catalog/CatalogSelector.tsx +67 -0
  233. package/src/components/Catalog/CatalogSortButton.tsx +78 -0
  234. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +26 -0
  235. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +77 -0
  236. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +26 -0
  237. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +120 -0
  238. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +176 -0
  239. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +180 -0
  240. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +28 -0
  241. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +77 -0
  242. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +83 -0
  243. package/src/components/Catalog/CatalogViewModeToggle.tsx +65 -0
  244. package/src/components/Catalog/variables.dark.ts +5 -0
  245. package/src/components/Catalog/variables.ts +351 -0
  246. package/src/components/CatalogClassic/CatalogClassicHighlight.tsx +1 -1
  247. package/src/components/Dropdown/variables.ts +1 -1
  248. package/src/components/Filter/Filter.tsx +10 -2
  249. package/src/components/Filter/FilterCheckboxes.tsx +8 -4
  250. package/src/components/Filter/FilterContent.tsx +21 -5
  251. package/src/components/Filter/FilterInput.tsx +16 -4
  252. package/src/components/Filter/FilterSelect.tsx +8 -4
  253. package/src/components/Image/Image.tsx +5 -9
  254. package/src/components/LoadMore/LoadMore.tsx +38 -0
  255. package/src/components/Markdown/Markdown.tsx +1 -1
  256. package/src/components/Menu/MenuItem.tsx +11 -2
  257. package/src/components/PageNavigation/NavigationButton.tsx +68 -0
  258. package/src/components/PageNavigation/NextButton.tsx +20 -43
  259. package/src/components/PageNavigation/PageNavigation.tsx +1 -1
  260. package/src/components/PageNavigation/PreviousButton.tsx +20 -43
  261. package/src/components/Search/SearchAiConversationInput.tsx +3 -0
  262. package/src/components/Select/Select.tsx +29 -4
  263. package/src/components/Select/SelectInput.tsx +20 -1
  264. package/src/components/Select/variables.ts +2 -2
  265. package/src/components/Sidebar/Sidebar.tsx +1 -1
  266. package/src/components/SkipContent/SkipContent.tsx +47 -0
  267. package/src/components/SkipContent/variables.ts +20 -0
  268. package/src/components/Tag/Tag.tsx +67 -1
  269. package/src/components/Tag/variables.ts +21 -0
  270. package/src/components/Tooltip/Tooltip.tsx +31 -22
  271. package/src/components/Tooltip/variables.ts +17 -0
  272. package/src/components/VersionPicker/VersionPicker.tsx +32 -2
  273. package/src/components/VersionPicker/variables.ts +1 -0
  274. package/src/core/constants/catalog.ts +1 -0
  275. package/src/core/constants/common.ts +1 -0
  276. package/src/core/constants/index.ts +1 -0
  277. package/src/core/constants/search.ts +2 -0
  278. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  279. package/src/core/hooks/catalog/useCatalogEntities.ts +16 -0
  280. package/src/core/hooks/catalog/useCatalogTableHeaderCellActions.ts +38 -0
  281. package/src/core/hooks/catalog/useCatalogTableViewRow.ts +40 -0
  282. package/src/core/hooks/index.ts +2 -0
  283. package/src/core/hooks/use-user-teams.ts +8 -0
  284. package/src/core/styles/dark.ts +2 -0
  285. package/src/core/styles/global.ts +5 -0
  286. package/src/core/types/catalog.ts +143 -5
  287. package/src/core/types/filter.ts +1 -0
  288. package/src/core/types/hooks.ts +32 -5
  289. package/src/core/types/index.ts +1 -0
  290. package/src/core/types/l10n.ts +22 -1
  291. package/src/core/types/telemetry.ts +36 -0
  292. package/src/core/utils/index.ts +1 -0
  293. package/src/core/utils/load-and-navigate.ts +5 -4
  294. package/src/core/utils/parse-style-string.ts +21 -0
  295. package/src/icons/AscSortIcon/AscSortIcon.tsx +29 -0
  296. package/src/icons/CardsIcon/CardsIcon.tsx +38 -0
  297. package/src/icons/CaretDownIcon/CaretDownIcon.tsx +26 -0
  298. package/src/icons/CaretUpIcon/CaretUpIcon.tsx +26 -0
  299. package/src/icons/DescSortIcon/DescSortIcon.tsx +29 -0
  300. package/src/icons/EntityTypeIcon/EntityTypeIcon.tsx +49 -0
  301. package/src/icons/GithubIcon/GithubIcon.tsx +35 -0
  302. package/src/icons/GraphIcon/GraphIcon.tsx +26 -0
  303. package/src/icons/PeopleIcon/PeopleIcon.tsx +46 -0
  304. package/src/icons/SlackIcon/SlackIcon.tsx +61 -0
  305. package/src/icons/SortIcon/SortIcon.tsx +29 -0
  306. package/src/icons/TableIcon/TableIcon.tsx +26 -0
  307. package/src/icons/TagsIcon/TagsIcon.tsx +41 -0
  308. package/src/index.ts +20 -1
  309. package/src/layouts/PageLayout.tsx +4 -1
  310. package/src/layouts/RootLayout.tsx +2 -0
  311. package/src/markdoc/components/Tabs/Tab.tsx +12 -1
  312. package/src/markdoc/components/Tabs/TabList.tsx +40 -70
  313. package/src/markdoc/components/Tabs/Tabs.tsx +11 -10
  314. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
  315. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
  316. package/lib/ext/process-scorecard.d.ts +0 -5
  317. package/lib/ext/process-scorecard.js +0 -11
  318. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
  319. package/src/ext/process-scorecard.ts +0 -13
package/src/index.ts CHANGED
@@ -15,6 +15,7 @@ export * from '@redocly/theme/components/Dropdown/Dropdown';
15
15
  export * from '@redocly/theme/components/Dropdown/DropdownMenu';
16
16
  export * from '@redocly/theme/components/Dropdown/DropdownMenuItem';
17
17
  export * from '@redocly/theme/components/Loaders/Loading';
18
+ export * from '@redocly/theme/components/LoadMore/LoadMore';
18
19
  export * from '@redocly/theme/components/Link/Link';
19
20
  export * from '@redocly/theme/components/Portal/Portal';
20
21
  export * from '@redocly/theme/components/Segmented/Segmented';
@@ -89,7 +90,6 @@ export * from '@redocly/theme/components/Sidebar/Sidebar';
89
90
  /* OpenApiDocs */
90
91
  export * from '@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiOperation';
91
92
  export * from '@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiTitle';
92
- export * from '@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiDescription';
93
93
  export * from '@redocly/theme/components/OpenApiDocs/hooks/BeforeOpenApiOperation';
94
94
  export * from '@redocly/theme/components/OpenApiDocs/hooks/OpenApiFooter';
95
95
  export * from '@redocly/theme/components/OpenApiDocs/hooks/OpenApiHeader';
@@ -118,6 +118,25 @@ export * from '@redocly/theme/components/Menu/MenuMobile';
118
118
  export * from '@redocly/theme/components/Breadcrumbs/Breadcrumb';
119
119
  export * from '@redocly/theme/components/Breadcrumbs/Breadcrumbs';
120
120
  /* Catalog */
121
+ export * from '@redocly/theme/components/Catalog/Catalog';
122
+ export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntity';
123
+ export * from '@redocly/theme/components/Catalog/CatalogCardView/CatalogCardView';
124
+ export * from '@redocly/theme/components/Catalog/CatalogCardView/CatalogCard';
125
+ export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogDomainsCell';
126
+ export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogEntityCell';
127
+ export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogOwnersCell';
128
+ export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableHeaderCell';
129
+ export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
130
+ export * from '@redocly/theme/components/Catalog/CatalogSelector';
131
+ export * from '@redocly/theme/components/Catalog/CatalogSortButton';
132
+ export * from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
133
+ export * from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
134
+ export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations';
135
+ export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations';
136
+ export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations';
137
+ export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
138
+
139
+ /* CatalogClassic */
121
140
  export * from '@redocly/theme/components/CatalogClassic/CatalogClassic';
122
141
  export * from '@redocly/theme/components/CatalogClassic/CatalogClassicCard';
123
142
  export * from '@redocly/theme/components/CatalogClassic/CatalogClassicActions';
@@ -4,6 +4,7 @@ import styled from 'styled-components';
4
4
  import type { JSX } from 'react';
5
5
 
6
6
  import { breakpoints } from '@redocly/theme/core/utils';
7
+ import { CONTENT_ID } from '@redocly/theme/core/constants';
7
8
 
8
9
  interface PageLayoutProps {
9
10
  sidebar?: React.ReactNode;
@@ -16,7 +17,9 @@ export function PageLayout({
16
17
  return (
17
18
  <Container data-component-name="Layout/PageLayout">
18
19
  {sidebar}
19
- <ContentContainer>{children}</ContentContainer>
20
+ <ContentContainer id={CONTENT_ID} tabIndex={0}>
21
+ {children}
22
+ </ContentContainer>
20
23
  </Container>
21
24
  );
22
25
  }
@@ -4,6 +4,7 @@ import type { JSX } from 'react';
4
4
 
5
5
  import { Navbar } from '@redocly/theme/components/Navbar/Navbar';
6
6
  import { Footer } from '@redocly/theme/components/Footer/Footer';
7
+ import { SkipContent } from '@redocly/theme/components/SkipContent/SkipContent';
7
8
 
8
9
  export type LayoutConfig = {
9
10
  children: React.ReactNode;
@@ -12,6 +13,7 @@ export type LayoutConfig = {
12
13
  export function RootLayout({ children }: LayoutConfig): JSX.Element {
13
14
  return (
14
15
  <div data-component-name="layouts/RootLayout">
16
+ <SkipContent />
15
17
  <Navbar />
16
18
  {children}
17
19
  <Footer />
@@ -14,6 +14,7 @@ export type TabProps = {
14
14
  setRef: (element: HTMLButtonElement | null) => void;
15
15
  onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
16
16
  onClick: () => void;
17
+ icon?: React.ReactNode;
17
18
  };
18
19
 
19
20
  export function TabComponent({
@@ -24,6 +25,7 @@ export function TabComponent({
24
25
  setRef,
25
26
  onKeyDown,
26
27
  onClick,
28
+ icon,
27
29
  }: TabProps): JSX.Element {
28
30
  return (
29
31
  <TabItem data-component-name="Markdoc/Tabs/Tab" size={size} tabIndex={0}>
@@ -39,10 +41,19 @@ export function TabComponent({
39
41
  onKeyDown={onKeyDown}
40
42
  onClick={onClick}
41
43
  >
42
- {label}
44
+ <LabelWrapper>
45
+ {icon}
46
+ {label}
47
+ </LabelWrapper>
43
48
  </TabButtonLink>
44
49
  </TabItem>
45
50
  );
46
51
  }
47
52
 
53
+ const LabelWrapper = styled.div`
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 4px;
57
+ `;
58
+
48
59
  export const Tab = styled(TabComponent)``;
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useState } from 'react';
1
+ import React from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
 
4
4
  import type { JSX } from 'react';
@@ -8,8 +8,7 @@ import { TabItemProps, TabsSize } from '@redocly/theme/markdoc/components/Tabs/T
8
8
  import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
9
9
  import { DropdownMenu } from '@redocly/theme/components/Dropdown/DropdownMenu';
10
10
  import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMenuItem';
11
- import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
12
- import { ChevronUpIcon } from '@redocly/theme/icons/ChevronUpIcon/ChevronUpIcon';
11
+ import { Button } from '@redocly/theme/components/Button/Button';
13
12
 
14
13
  type TabListProps = {
15
14
  childrenArray: React.ReactElement<TabItemProps>[];
@@ -42,16 +41,6 @@ export function TabList({
42
41
  allTabsHidden,
43
42
  tabsContainerRef,
44
43
  }: TabListProps): JSX.Element {
45
- const [isDropdownOpen, setIsDropdownOpen] = useState<boolean>(false);
46
-
47
- const handleDropdownOpen = useCallback(() => {
48
- setIsDropdownOpen(true);
49
- }, []);
50
-
51
- const handleDropdownClose = useCallback(() => {
52
- setIsDropdownOpen(false);
53
- }, []);
54
-
55
44
  return (
56
45
  <TabListContainer role="tablist" ref={tabsContainerRef} data-animating={isAnimating}>
57
46
  <HighlightBar size={size} style={{ left: highlightStyle.left, width: highlightStyle.width }}>
@@ -59,13 +48,14 @@ export function TabList({
59
48
  </HighlightBar>
60
49
  {childrenArray.map((child, index) => {
61
50
  if (!visibleTabs.includes(index)) return null;
62
- const { label } = child.props;
51
+ const { label, icon } = child.props;
63
52
  const tabId = getTabId(label, index);
64
53
  return (
65
54
  <Tab
66
55
  key={`key-${tabId}`}
67
56
  tabId={tabId}
68
57
  label={label}
58
+ icon={icon}
69
59
  size={size}
70
60
  disabled={child.props.disable}
71
61
  setRef={(el: HTMLButtonElement | null) => {
@@ -88,47 +78,41 @@ export function TabList({
88
78
  tabIndex={0}
89
79
  >
90
80
  {overflowTabs.length > 0 && (
91
- <div onPointerEnter={handleDropdownOpen} onPointerLeave={handleDropdownClose}>
92
- <Dropdown
93
- trigger={
94
- <TabButtonLink
95
- size={size}
96
- className={
97
- overflowTabs.some((index) => activeTab === childrenArray[index].props.label)
98
- ? 'active'
99
- : undefined
100
- }
101
- >
102
- {allTabsHidden ? activeTab : 'More'}
103
- {isDropdownOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}
104
- </TabButtonLink>
105
- }
106
- alignment="start"
107
- withArrow={false}
108
- active={isDropdownOpen}
109
- triggerEvent="click"
110
- >
111
- <DropdownMenu>
112
- {overflowTabs.map((index) => {
113
- const { label } = childrenArray[index].props;
114
- const tabId = getTabId(label, index);
115
- return (
116
- <DropdownMenuItem
117
- key={`more-${tabId}`}
118
- active={activeTab === label}
119
- onAction={() => {
120
- onTabClick(index);
121
- handleDropdownClose();
122
- }}
123
- disabled={childrenArray[index].props.disable}
124
- >
125
- {label}
126
- </DropdownMenuItem>
127
- );
128
- })}
129
- </DropdownMenu>
130
- </Dropdown>
131
- </div>
81
+ <Dropdown
82
+ trigger={
83
+ <TabButtonLink
84
+ size={size}
85
+ className={
86
+ overflowTabs.some((index) => activeTab === childrenArray[index].props.label)
87
+ ? 'active'
88
+ : undefined
89
+ }
90
+ >
91
+ {allTabsHidden ? activeTab : 'More'}
92
+ </TabButtonLink>
93
+ }
94
+ alignment="start"
95
+ withArrow={true}
96
+ >
97
+ <DropdownMenu>
98
+ {overflowTabs.map((index) => {
99
+ const { label } = childrenArray[index].props;
100
+ const tabId = getTabId(label, index);
101
+ return (
102
+ <DropdownMenuItem
103
+ key={`more-${tabId}`}
104
+ active={activeTab === label}
105
+ onAction={() => {
106
+ onTabClick(index);
107
+ }}
108
+ disabled={childrenArray[index].props.disable}
109
+ >
110
+ {label}
111
+ </DropdownMenuItem>
112
+ );
113
+ })}
114
+ </DropdownMenu>
115
+ </Dropdown>
132
116
  )}
133
117
  </TabItem>
134
118
  </TabListContainer>
@@ -231,25 +215,11 @@ const HighlightBar = styled.div<{ size: TabsSize }>`
231
215
  }
232
216
  `;
233
217
 
234
- export const TabButtonLink = styled.button<{
235
- size: TabsSize;
236
- disabled?: boolean;
237
- }>`
238
- all: unset;
239
- flex-grow: 1;
240
- cursor: pointer;
241
- width: 100%;
242
- text-align: center;
218
+ export const TabButtonLink = styled(Button)`
243
219
  color: var(--md-tabs-tab-text-color);
244
220
  font-family: var(--md-tabs-tab-font-family);
245
221
  font-style: var(--md-tabs-tab-font-style);
246
222
  background-color: var(--md-tabs-tab-bg-color);
247
- white-space: nowrap;
248
- display: inline-flex;
249
- align-items: center;
250
- justify-content: center;
251
- gap: var(--spacing-xxs);
252
- z-index: 2;
253
223
 
254
224
  transition:
255
225
  background-color 300ms ease-in-out,
@@ -16,15 +16,17 @@ export type TabItemProps = {
16
16
  disable?: boolean;
17
17
  onClick?: () => void;
18
18
  children: React.ReactNode;
19
+ icon?: React.ReactNode;
19
20
  };
20
21
 
21
22
  type TabsProps = {
22
23
  children: React.ReactElement<TabItemProps>[];
23
24
  className?: string;
24
25
  size: TabsSize;
26
+ forceReady?: boolean;
25
27
  };
26
28
 
27
- export function Tabs({ children, className, size }: TabsProps): JSX.Element {
29
+ export function Tabs({ children, className, size, forceReady = false }: TabsProps): JSX.Element {
28
30
  const [childrenArray, setChildrenArray] = useState<React.ReactElement<TabItemProps>[]>(
29
31
  React.Children.toArray(children) as React.ReactElement<TabItemProps>[],
30
32
  );
@@ -34,7 +36,6 @@ export function Tabs({ children, className, size }: TabsProps): JSX.Element {
34
36
  }, [children]);
35
37
  const tabsContainerRef = useRef<HTMLUListElement>(null);
36
38
  const [isAnimating, setIsAnimating] = useState<boolean>(false);
37
-
38
39
  const initialTab = childrenArray[0]?.props.label ?? '';
39
40
  const {
40
41
  activeTab,
@@ -105,15 +106,11 @@ export function Tabs({ children, className, size }: TabsProps): JSX.Element {
105
106
  setHighlightStyle({ left: offsetLeft, width: offsetWidth });
106
107
  }
107
108
 
108
- const timeoutId = setTimeout(() => {
109
- if (visibleTabs.includes(activeIndex)) {
110
- activeTabElement?.classList.add('active');
111
- }
112
- setIsAnimating(false);
113
- }, 300);
109
+ if (visibleTabs.includes(activeIndex)) {
110
+ activeTabElement?.classList.add('active');
111
+ }
114
112
 
115
113
  return () => {
116
- clearTimeout(timeoutId);
117
114
  container.querySelectorAll('[data-label]').forEach((el) => {
118
115
  el.classList.remove('active');
119
116
  });
@@ -130,7 +127,11 @@ export function Tabs({ children, className, size }: TabsProps): JSX.Element {
130
127
  }, [activeTab, prevTab, childrenArray, visibleTabs, overflowTabs]);
131
128
 
132
129
  return (
133
- <TabsContainer data-component-name="Markdoc/Tabs/Tabs" className={className} isReady={ready}>
130
+ <TabsContainer
131
+ data-component-name="Markdoc/Tabs/Tabs"
132
+ className={className}
133
+ isReady={ready || forceReady}
134
+ >
134
135
  <TabList
135
136
  size={size}
136
137
  childrenArray={childrenArray}
@@ -1 +0,0 @@
1
- export declare const AfterOpenApiDescription: any;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AfterOpenApiDescription = void 0;
4
- exports.AfterOpenApiDescription = null;
5
- //# sourceMappingURL=AfterOpenApiDescription.js.map
@@ -1,5 +0,0 @@
1
- import type { CatalogItem } from '../index.js';
2
- export declare function useProcessScorecard(): {
3
- processScorecard: <T = any>(scorecard: T, api: CatalogItem) => T;
4
- processInfo: <T>(info: T) => T;
5
- };
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useProcessScorecard = useProcessScorecard;
4
- const react_1 = require("react");
5
- function useProcessScorecard() {
6
- return {
7
- processScorecard: (0, react_1.useCallback)((scorecard) => scorecard, []),
8
- processInfo: (0, react_1.useCallback)((info) => info, []),
9
- };
10
- }
11
- //# sourceMappingURL=process-scorecard.js.map
@@ -1 +0,0 @@
1
- export const AfterOpenApiDescription: any = null;
@@ -1,13 +0,0 @@
1
- import { useCallback } from 'react';
2
-
3
- import type { CatalogItem } from '@redocly/theme';
4
-
5
- export function useProcessScorecard(): {
6
- processScorecard: <T = any>(scorecard: T, api: CatalogItem) => T;
7
- processInfo: <T>(info: T) => T;
8
- } {
9
- return {
10
- processScorecard: useCallback((scorecard) => scorecard, []),
11
- processInfo: useCallback((info) => info, []),
12
- };
13
- }