@redocly/theme 0.55.0-rc.1 → 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 (353) 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/Marker/Marker.d.ts +10 -0
  105. package/lib/components/Marker/Marker.js +62 -0
  106. package/lib/components/Menu/MenuItem.d.ts +1 -1
  107. package/lib/components/Menu/MenuItem.js +7 -3
  108. package/lib/components/PageNavigation/NavigationButton.d.ts +13 -0
  109. package/lib/components/PageNavigation/NavigationButton.js +32 -0
  110. package/lib/components/PageNavigation/NextButton.js +10 -29
  111. package/lib/components/PageNavigation/PageNavigation.js +1 -1
  112. package/lib/components/PageNavigation/PreviousButton.js +11 -27
  113. package/lib/components/Search/SearchAiConversationInput.js +2 -1
  114. package/lib/components/Select/Select.js +22 -6
  115. package/lib/components/Select/SelectInput.d.ts +1 -0
  116. package/lib/components/Select/SelectInput.js +7 -3
  117. package/lib/components/Select/variables.js +2 -2
  118. package/lib/components/Sidebar/Sidebar.d.ts +3 -0
  119. package/lib/components/Sidebar/Sidebar.js +3 -2
  120. package/lib/components/SkipContent/SkipContent.d.ts +2 -0
  121. package/lib/components/SkipContent/SkipContent.js +68 -0
  122. package/lib/components/SkipContent/variables.d.ts +1 -0
  123. package/lib/components/SkipContent/variables.js +23 -0
  124. package/lib/components/Tag/Tag.d.ts +3 -1
  125. package/lib/components/Tag/Tag.js +54 -2
  126. package/lib/components/Tag/variables.js +21 -0
  127. package/lib/components/Tooltip/Tooltip.d.ts +2 -1
  128. package/lib/components/Tooltip/Tooltip.js +26 -19
  129. package/lib/components/Tooltip/variables.js +17 -0
  130. package/lib/components/VersionPicker/VersionPicker.js +22 -3
  131. package/lib/components/VersionPicker/variables.js +1 -0
  132. package/lib/core/constants/catalog.d.ts +1 -0
  133. package/lib/core/constants/catalog.js +5 -0
  134. package/lib/core/constants/common.d.ts +1 -0
  135. package/lib/core/constants/common.js +2 -1
  136. package/lib/core/constants/index.d.ts +1 -0
  137. package/lib/core/constants/index.js +1 -0
  138. package/lib/core/constants/search.d.ts +1 -0
  139. package/lib/core/constants/search.js +2 -1
  140. package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.d.ts +1 -1
  141. package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.js +5 -2
  142. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
  143. package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
  144. package/lib/core/hooks/catalog/useCatalogEntities.d.ts +4 -0
  145. package/lib/core/hooks/catalog/useCatalogEntities.js +17 -0
  146. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +15 -0
  147. package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.js +23 -0
  148. package/lib/core/hooks/catalog/useCatalogTableViewRow.d.ts +11 -0
  149. package/lib/core/hooks/catalog/useCatalogTableViewRow.js +26 -0
  150. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +17 -9
  151. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +242 -47
  152. package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +9 -2
  153. package/lib/core/hooks/code-walkthrough/use-code-walkthrough.js +2 -2
  154. package/lib/core/hooks/index.d.ts +3 -1
  155. package/lib/core/hooks/index.js +3 -1
  156. package/lib/core/hooks/use-active-page-version.d.ts +1 -0
  157. package/lib/core/hooks/{use-page-active-version.js → use-active-page-version.js} +3 -3
  158. package/lib/core/hooks/use-user-teams.d.ts +1 -0
  159. package/lib/core/hooks/use-user-teams.js +10 -0
  160. package/lib/core/styles/dark.js +2 -0
  161. package/lib/core/styles/global.js +65 -60
  162. package/lib/core/types/catalog.d.ts +118 -5
  163. package/lib/core/types/code-walkthrough.d.ts +13 -0
  164. package/lib/core/types/code-walkthrough.js +3 -0
  165. package/lib/core/types/filter.d.ts +1 -0
  166. package/lib/core/types/hooks.d.ts +11 -4
  167. package/lib/core/types/index.d.ts +3 -0
  168. package/lib/core/types/index.js +3 -0
  169. package/lib/core/types/l10n.d.ts +1 -1
  170. package/lib/core/types/marker.d.ts +4 -0
  171. package/lib/core/types/marker.js +3 -0
  172. package/lib/core/types/telemetry.d.ts +32 -0
  173. package/lib/core/types/telemetry.js +3 -0
  174. package/lib/core/utils/index.d.ts +1 -0
  175. package/lib/core/utils/index.js +1 -0
  176. package/lib/core/utils/js-utils.d.ts +18 -0
  177. package/lib/core/utils/js-utils.js +31 -0
  178. package/lib/core/utils/parse-style-string.d.ts +1 -0
  179. package/lib/core/utils/parse-style-string.js +23 -0
  180. package/lib/icons/AscSortIcon/AscSortIcon.d.ts +9 -0
  181. package/lib/icons/AscSortIcon/AscSortIcon.js +25 -0
  182. package/lib/icons/CardsIcon/CardsIcon.d.ts +9 -0
  183. package/lib/icons/CardsIcon/CardsIcon.js +25 -0
  184. package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +9 -0
  185. package/lib/icons/CaretDownIcon/CaretDownIcon.js +22 -0
  186. package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +9 -0
  187. package/lib/icons/CaretUpIcon/CaretUpIcon.js +22 -0
  188. package/lib/icons/DescSortIcon/DescSortIcon.d.ts +9 -0
  189. package/lib/icons/DescSortIcon/DescSortIcon.js +25 -0
  190. package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +9 -0
  191. package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +26 -0
  192. package/lib/icons/GithubIcon/GithubIcon.d.ts +9 -0
  193. package/lib/icons/GithubIcon/GithubIcon.js +22 -0
  194. package/lib/icons/GraphIcon/GraphIcon.d.ts +9 -0
  195. package/lib/icons/GraphIcon/GraphIcon.js +22 -0
  196. package/lib/icons/PeopleIcon/PeopleIcon.d.ts +9 -0
  197. package/lib/icons/PeopleIcon/PeopleIcon.js +27 -0
  198. package/lib/icons/SlackIcon/SlackIcon.d.ts +9 -0
  199. package/lib/icons/SlackIcon/SlackIcon.js +29 -0
  200. package/lib/icons/SortIcon/SortIcon.d.ts +9 -0
  201. package/lib/icons/SortIcon/SortIcon.js +25 -0
  202. package/lib/icons/TableIcon/TableIcon.d.ts +9 -0
  203. package/lib/icons/TableIcon/TableIcon.js +22 -0
  204. package/lib/icons/TagsIcon/TagsIcon.d.ts +9 -0
  205. package/lib/icons/TagsIcon/TagsIcon.js +24 -0
  206. package/lib/index.d.ts +19 -1
  207. package/lib/index.js +20 -1
  208. package/lib/layouts/PageLayout.js +2 -1
  209. package/lib/layouts/RootLayout.js +2 -0
  210. package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +1 -2
  211. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +26 -20
  212. package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +32 -3
  213. package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
  214. package/lib/markdoc/components/Tabs/Tab.js +10 -2
  215. package/lib/markdoc/components/Tabs/TabList.d.ts +1 -4
  216. package/lib/markdoc/components/Tabs/TabList.js +18 -38
  217. package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
  218. package/lib/markdoc/components/Tabs/Tabs.js +5 -9
  219. package/lib/markdoc/tags/code-step.js +0 -3
  220. package/lib/markdoc/tags/code-walkthrough.js +0 -1
  221. package/package.json +4 -3
  222. package/src/components/Admonition/Admonition.tsx +4 -0
  223. package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
  224. package/src/components/Button/Button.tsx +1 -1
  225. package/src/components/Catalog/Catalog.tsx +235 -0
  226. package/src/components/Catalog/CatalogActionsRow.tsx +58 -0
  227. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +227 -0
  228. package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +29 -0
  229. package/src/components/Catalog/CatalogEntities.tsx +107 -0
  230. package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -0
  231. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +207 -0
  232. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +60 -0
  233. package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +67 -0
  234. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +93 -0
  235. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +35 -0
  236. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +83 -0
  237. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +62 -0
  238. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +36 -0
  239. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +38 -0
  240. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +33 -0
  241. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +41 -0
  242. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +42 -0
  243. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +39 -0
  244. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +31 -0
  245. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +97 -0
  246. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +80 -0
  247. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +92 -0
  248. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +127 -0
  249. package/src/components/Catalog/CatalogEntityIcon.tsx +41 -0
  250. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +48 -0
  251. package/src/components/Catalog/CatalogHighlight.tsx +56 -0
  252. package/src/components/Catalog/CatalogPageDescription.tsx +72 -0
  253. package/src/components/Catalog/CatalogSelector.tsx +67 -0
  254. package/src/components/Catalog/CatalogSortButton.tsx +78 -0
  255. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +26 -0
  256. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +77 -0
  257. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +26 -0
  258. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +120 -0
  259. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +176 -0
  260. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +180 -0
  261. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +28 -0
  262. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +77 -0
  263. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +83 -0
  264. package/src/components/Catalog/CatalogViewModeToggle.tsx +65 -0
  265. package/src/components/Catalog/variables.dark.ts +5 -0
  266. package/src/components/Catalog/variables.ts +351 -0
  267. package/src/components/CatalogClassic/CatalogClassicHighlight.tsx +1 -1
  268. package/src/components/Dropdown/variables.ts +1 -1
  269. package/src/components/Filter/Filter.tsx +10 -2
  270. package/src/components/Filter/FilterCheckboxes.tsx +8 -4
  271. package/src/components/Filter/FilterContent.tsx +21 -5
  272. package/src/components/Filter/FilterInput.tsx +16 -4
  273. package/src/components/Filter/FilterSelect.tsx +8 -4
  274. package/src/components/Image/Image.tsx +5 -9
  275. package/src/components/LoadMore/LoadMore.tsx +38 -0
  276. package/src/components/Markdown/Markdown.tsx +1 -1
  277. package/src/components/Marker/Marker.tsx +53 -0
  278. package/src/components/Menu/MenuItem.tsx +11 -2
  279. package/src/components/PageNavigation/NavigationButton.tsx +68 -0
  280. package/src/components/PageNavigation/NextButton.tsx +20 -43
  281. package/src/components/PageNavigation/PageNavigation.tsx +1 -1
  282. package/src/components/PageNavigation/PreviousButton.tsx +20 -43
  283. package/src/components/Search/SearchAiConversationInput.tsx +3 -0
  284. package/src/components/Select/Select.tsx +29 -4
  285. package/src/components/Select/SelectInput.tsx +20 -1
  286. package/src/components/Select/variables.ts +2 -2
  287. package/src/components/Sidebar/Sidebar.tsx +1 -1
  288. package/src/components/SkipContent/SkipContent.tsx +47 -0
  289. package/src/components/SkipContent/variables.ts +20 -0
  290. package/src/components/Tag/Tag.tsx +67 -1
  291. package/src/components/Tag/variables.ts +21 -0
  292. package/src/components/Tooltip/Tooltip.tsx +31 -22
  293. package/src/components/Tooltip/variables.ts +17 -0
  294. package/src/components/VersionPicker/VersionPicker.tsx +32 -2
  295. package/src/components/VersionPicker/variables.ts +1 -0
  296. package/src/core/constants/catalog.ts +1 -0
  297. package/src/core/constants/common.ts +1 -0
  298. package/src/core/constants/index.ts +1 -0
  299. package/src/core/constants/search.ts +2 -0
  300. package/src/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.tsx +6 -3
  301. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  302. package/src/core/hooks/catalog/useCatalogEntities.ts +16 -0
  303. package/src/core/hooks/catalog/useCatalogTableHeaderCellActions.ts +38 -0
  304. package/src/core/hooks/catalog/useCatalogTableViewRow.ts +40 -0
  305. package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +326 -65
  306. package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +9 -6
  307. package/src/core/hooks/index.ts +3 -1
  308. package/src/core/hooks/{use-page-active-version.ts → use-active-page-version.ts} +1 -1
  309. package/src/core/hooks/use-user-teams.ts +8 -0
  310. package/src/core/styles/dark.ts +2 -0
  311. package/src/core/styles/global.ts +5 -0
  312. package/src/core/types/catalog.ts +143 -5
  313. package/src/core/types/code-walkthrough.ts +15 -0
  314. package/src/core/types/filter.ts +1 -0
  315. package/src/core/types/hooks.ts +32 -5
  316. package/src/core/types/index.ts +3 -0
  317. package/src/core/types/l10n.ts +22 -1
  318. package/src/core/types/marker.ts +4 -0
  319. package/src/core/types/telemetry.ts +36 -0
  320. package/src/core/utils/index.ts +1 -0
  321. package/src/core/utils/js-utils.ts +31 -0
  322. package/src/core/utils/load-and-navigate.ts +5 -4
  323. package/src/core/utils/parse-style-string.ts +21 -0
  324. package/src/icons/AscSortIcon/AscSortIcon.tsx +29 -0
  325. package/src/icons/CardsIcon/CardsIcon.tsx +38 -0
  326. package/src/icons/CaretDownIcon/CaretDownIcon.tsx +26 -0
  327. package/src/icons/CaretUpIcon/CaretUpIcon.tsx +26 -0
  328. package/src/icons/DescSortIcon/DescSortIcon.tsx +29 -0
  329. package/src/icons/EntityTypeIcon/EntityTypeIcon.tsx +49 -0
  330. package/src/icons/GithubIcon/GithubIcon.tsx +35 -0
  331. package/src/icons/GraphIcon/GraphIcon.tsx +26 -0
  332. package/src/icons/PeopleIcon/PeopleIcon.tsx +46 -0
  333. package/src/icons/SlackIcon/SlackIcon.tsx +61 -0
  334. package/src/icons/SortIcon/SortIcon.tsx +29 -0
  335. package/src/icons/TableIcon/TableIcon.tsx +26 -0
  336. package/src/icons/TagsIcon/TagsIcon.tsx +41 -0
  337. package/src/index.ts +21 -1
  338. package/src/layouts/PageLayout.tsx +4 -1
  339. package/src/layouts/RootLayout.tsx +2 -0
  340. package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +76 -36
  341. package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +8 -3
  342. package/src/markdoc/components/Tabs/Tab.tsx +12 -1
  343. package/src/markdoc/components/Tabs/TabList.tsx +40 -70
  344. package/src/markdoc/components/Tabs/Tabs.tsx +11 -10
  345. package/src/markdoc/tags/code-step.ts +0 -3
  346. package/src/markdoc/tags/code-walkthrough.ts +0 -1
  347. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
  348. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
  349. package/lib/core/hooks/use-page-active-version.d.ts +0 -1
  350. package/lib/ext/process-scorecard.d.ts +0 -5
  351. package/lib/ext/process-scorecard.js +0 -11
  352. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
  353. package/src/ext/process-scorecard.ts +0 -13
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+
3
+ import { BffCatalogEntity } from '@redocly/theme/core/types';
4
+ import { CatalogTagsWithTooltip } from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
5
+
6
+ export type CatalogTagsCellProps = {
7
+ entity: BffCatalogEntity;
8
+ };
9
+
10
+ export function CatalogTagsCell({ entity }: CatalogTagsCellProps) {
11
+ return (
12
+ <div data-component-name="Catalog/CatalogTableView/CatalogTagsCell">
13
+ <CatalogTagsWithTooltip
14
+ data-testid="catalog-tags-cell"
15
+ items={entity.tags || []}
16
+ showPlaceholder={false}
17
+ tagProps={{
18
+ style: {
19
+ fontSize: 'var(--font-size-base)',
20
+ borderRadius: 'var(--border-radius)',
21
+ },
22
+ borderless: true,
23
+ color: 'grey',
24
+ }}
25
+ />
26
+ </div>
27
+ );
28
+ }
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
5
+
6
+ export type CatalogUserEntityCellProps = {
7
+ name: string;
8
+ email: string;
9
+ };
10
+
11
+ const extractInitials = (name: string) => {
12
+ return name
13
+ .split(' ')
14
+ .map((n) => n[0])
15
+ .join('');
16
+ };
17
+
18
+ export function CatalogUserEntityCell({ name, email }: CatalogUserEntityCellProps) {
19
+ return (
20
+ <EntityTitleCellWrapper data-component-name="Catalog/CatalogTableView/CatalogUserEntityCell">
21
+ <Avatar>{extractInitials(name)}</Avatar>
22
+ <EntityTitleContent>
23
+ <EntityTitle>
24
+ <CatalogHighlight>{name}</CatalogHighlight>
25
+ </EntityTitle>
26
+ <Email>
27
+ <CatalogHighlight>{email}</CatalogHighlight>
28
+ </Email>
29
+ </EntityTitleContent>
30
+ </EntityTitleCellWrapper>
31
+ );
32
+ }
33
+
34
+ const EntityTitleCellWrapper = styled.div`
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 6px;
38
+ max-width: 100%;
39
+ `;
40
+
41
+ const Avatar = styled.div`
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ width: 32px;
46
+ height: 32px;
47
+ border-radius: 50%;
48
+ background-color: var(--catalog-avatar-bg-color);
49
+ flex-shrink: 0;
50
+ font-size: 14px;
51
+ font-weight: 400;
52
+ `;
53
+
54
+ const EntityTitleContent = styled.div`
55
+ display: flex;
56
+ flex-direction: column;
57
+ overflow: hidden;
58
+ `;
59
+
60
+ const EntityTitle = styled.div`
61
+ font-size: var(--catalog-table-entity-title-font-size);
62
+ line-height: var(--catalog-table-entity-title-line-height);
63
+ font-weight: var(--catalog-table-entity-title-font-weight);
64
+ white-space: nowrap;
65
+ overflow: hidden;
66
+ text-overflow: ellipsis;
67
+ `;
68
+
69
+ export const Email = styled.div`
70
+ font-size: var(--catalog-table-entity-summary-font-size);
71
+ line-height: var(--catalog-table-entity-summary-line-height);
72
+ color: var(--color-blue-6);
73
+ white-space: nowrap;
74
+ overflow: hidden;
75
+ text-overflow: ellipsis;
76
+ width: 100%;
77
+ `;
@@ -0,0 +1,83 @@
1
+ import React, { JSX } from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import { CATALOG_TAG_MAX_LENGTH } from '@redocly/theme/core/constants';
5
+
6
+ import { Tag, TagProps } from '../Tag/Tag';
7
+ import { CatalogHighlight } from './CatalogHighlight';
8
+ import { TooltipComponent } from '../Tooltip/Tooltip';
9
+
10
+ export type CatalogTagsWithTooltipProps = {
11
+ items: string[];
12
+ itemsToShow?: number;
13
+ showPlaceholder?: boolean;
14
+ tagProps?: TagProps;
15
+ };
16
+
17
+ export function CatalogTagsWithTooltip({
18
+ items,
19
+ itemsToShow = 1,
20
+ showPlaceholder = true,
21
+ tagProps,
22
+ }: CatalogTagsWithTooltipProps): JSX.Element | null {
23
+ if (!items || items.length === 0) {
24
+ if (showPlaceholder) {
25
+ return (
26
+ <CatalogTagsWrapper data-component-name="Catalog/CatalogTagsWithTooltip">
27
+ <Tag style={{ backgroundColor: 'var(--catalog-tags-placeholder-bg-color)' }} color="grey">
28
+ N/A
29
+ </Tag>
30
+ </CatalogTagsWrapper>
31
+ );
32
+ }
33
+ return null;
34
+ }
35
+
36
+ if (items.length <= itemsToShow) {
37
+ return (
38
+ <TooltipComponent
39
+ tip={items.join(', ')}
40
+ placement="bottom"
41
+ className="catalog"
42
+ width="400px"
43
+ disabled={items.join(', ').length <= CATALOG_TAG_MAX_LENGTH}
44
+ >
45
+ <CatalogTagsWrapper data-component-name="Catalog/CatalogTagsWithTooltip">
46
+ {items.map((item, index) => (
47
+ <Tag key={`${item}-${index}`} {...tagProps} maxLength={CATALOG_TAG_MAX_LENGTH}>
48
+ <CatalogHighlight>{item}</CatalogHighlight>
49
+ </Tag>
50
+ ))}
51
+ </CatalogTagsWrapper>
52
+ </TooltipComponent>
53
+ );
54
+ }
55
+
56
+ const displayedItems = items.slice(0, itemsToShow);
57
+ const remainingCount = items.length - itemsToShow;
58
+
59
+ return (
60
+ <TooltipComponent tip={items.join(', ')} placement="bottom" className="catalog" width="400px">
61
+ <CatalogTagsWrapper data-component-name="Catalog/CatalogTagsWithTooltip">
62
+ {displayedItems.map((item, index) => (
63
+ <Tag key={`${item}-${index}`} {...tagProps} maxLength={CATALOG_TAG_MAX_LENGTH}>
64
+ <CatalogHighlight>{item}</CatalogHighlight>
65
+ </Tag>
66
+ ))}
67
+
68
+ <MoreTagsButton>+{remainingCount} more</MoreTagsButton>
69
+ </CatalogTagsWrapper>
70
+ </TooltipComponent>
71
+ );
72
+ }
73
+
74
+ const CatalogTagsWrapper = styled.div`
75
+ display: flex;
76
+ flex-wrap: wrap;
77
+ gap: var(--catalog-tags-wrapper-gap);
78
+ `;
79
+
80
+ const MoreTagsButton = styled.span`
81
+ font-size: var(--catalog-tags-more-button-font-size);
82
+ margin-left: var(--catalog-tags-more-button-margin-left);
83
+ `;
@@ -0,0 +1,65 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import { TableIcon } from '@redocly/theme/icons/TableIcon/TableIcon';
5
+ import { CardsIcon } from '@redocly/theme/icons/CardsIcon/CardsIcon';
6
+ import { CatalogViewMode } from '@redocly/theme/core';
7
+
8
+ function useViewMode(initialViewMode: CatalogViewMode) {
9
+ const [viewMode, setViewMode] = useState<CatalogViewMode | null>(null);
10
+
11
+ useEffect(() => {
12
+ setViewMode(initialViewMode);
13
+ }, [initialViewMode]);
14
+
15
+ return viewMode;
16
+ }
17
+
18
+ export type CatalogViewModeToggleProps = {
19
+ viewMode: CatalogViewMode;
20
+ onViewModeChange: (mode: CatalogViewMode) => void;
21
+ };
22
+
23
+ export function CatalogViewModeToggle({
24
+ viewMode: initialViewMode,
25
+ onViewModeChange,
26
+ }: CatalogViewModeToggleProps) {
27
+ const viewMode = useViewMode(initialViewMode);
28
+
29
+ return (
30
+ <ViewModeToggleWrapper data-component-name="Catalog/CatalogViewModeToggle">
31
+ <ViewModeButton
32
+ className={viewMode === 'table' ? 'active' : ''}
33
+ onClick={() => onViewModeChange('table')}
34
+ >
35
+ <TableIcon size="var(--catalog-view-mode-table-icon-size)" />
36
+ </ViewModeButton>
37
+ <ViewModeButton
38
+ className={viewMode === 'cards' ? 'active' : ''}
39
+ onClick={() => onViewModeChange('cards')}
40
+ >
41
+ <CardsIcon size="var(--catalog-view-mode-cards-icon-size)" />
42
+ </ViewModeButton>
43
+ </ViewModeToggleWrapper>
44
+ );
45
+ }
46
+
47
+ const ViewModeToggleWrapper = styled.div`
48
+ display: flex;
49
+ gap: var(--catalog-view-mode-toggle-gap);
50
+ `;
51
+
52
+ const ViewModeButton = styled.button`
53
+ width: var(--catalog-view-mode-button-width);
54
+ height: var(--catalog-view-mode-button-height);
55
+ background-color: transparent;
56
+ cursor: pointer;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ border-radius: var(--catalog-view-mode-button-border-radius);
61
+
62
+ &.active {
63
+ background-color: var(--catalog-view-mode-toggle-active-bg-color);
64
+ }
65
+ `;
@@ -0,0 +1,5 @@
1
+ import { css } from 'styled-components';
2
+
3
+ export const catalogDarkMode = css`
4
+ --catalog-avatar-bg-color: #3b3c45;
5
+ `;
@@ -0,0 +1,351 @@
1
+ import { css } from 'styled-components';
2
+
3
+ export const catalog = css`
4
+ /* === Catalog === */
5
+ /**
6
+ * @tokens Catalog page
7
+ */
8
+ --catalog-page-padding-vertical: var(--spacing-xl);
9
+ --catalog-page-padding-horizontal: var(--spacing-xxl);
10
+ --catalog-page-padding: var(--catalog-page-padding-vertical) var(--catalog-page-padding-horizontal);
11
+ --catalog-page-content-height: calc(100vh - var(--navbar-height) - var(--spacing-lg) * 2);
12
+
13
+ --catalog-filter-padding-vertical-mobile: 0;
14
+ --catalog-filter-padding-horizontal-mobile: var(--spacing-base);
15
+
16
+ --catalog-heading-margin: 0 0 var(--spacing-xl) 0;
17
+ --catalog-sidebar-width: 285px;
18
+
19
+ /**
20
+ * @tokens Catalog page wrapper
21
+ */
22
+ --catalog-page-wrapper-font-weight: var(--font-weight-regular);
23
+ --catalog-page-wrapper-text-color: var(--text-color-secondary);
24
+ --catalog-page-wrapper-font-size: var(--font-size-base);
25
+ --catalog-page-wrapper-font-family: var(--font-family-base);
26
+ --catalog-page-wrapper-line-height: var(--line-height-base);
27
+
28
+ /**
29
+ * @tokens Catalog page content
30
+ */
31
+ --catalog-page-content-width-mobile: 90%;
32
+ --catalog-page-content-width-desktop: 100%;
33
+ --catalog-page-content-margin-mobile: 0 auto;
34
+
35
+ /**
36
+ * @tokens Catalog page title
37
+ */
38
+ --catalog-title-text-color: var(--text-color-primary);
39
+ --catalog-title-font-weight: var(--font-weight-bold);
40
+ --catalog-title-font-size: var(--h3-font-size);
41
+ --catalog-title-margin: var(--spacing-sm) 0 var(--spacing-sm) 0;
42
+ --catalog-title-spacing-right: 8px;
43
+
44
+ /**
45
+ * @tokens Catalog page description
46
+ */
47
+ --catalog-description-text-color: var(--text-color-secondary);
48
+ --catalog-description-font-weight: var(--font-weight-regular);
49
+ --catalog-description-font-size: var(--font-size-lg);
50
+ --catalog-description-margin: 0 0 var(--spacing-sm) 0;
51
+ --catalog-description-line-height: var(--line-height-lg);
52
+
53
+ /**
54
+ * @tokens Catalog page separator
55
+ */
56
+ --catalog-separator-color: var(--text-color-secondary);
57
+ --catalog-separator-font-size: var(--font-size-base);
58
+ --catalog-separator-font-weight: var(--font-weight-regular);
59
+ --catalog-separator-border-color: var(--border-color-secondary);
60
+ --catalog-separator-margin: 0 0 var(--spacing-base) 0;
61
+ --catalog-separator-padding: var(--spacing-xxs) 0 0 0;
62
+ --catalog-separator-label-margin: 0 var(--spacing-xs);
63
+
64
+ /**
65
+ * @tokens Catalog separators and dividers
66
+ */
67
+ --catalog-hr-border-color: var(--border-color-primary);
68
+ --catalog-hr-border-width: 1px;
69
+ --catalog-hr-width: calc(100% + 48px);
70
+ --catalog-hr-margin: auto -24px 0 -24px;
71
+
72
+ /**
73
+ * @tokens Catalog links
74
+ */
75
+ --catalog-link-color: var(--link-color-primary);
76
+ --catalog-link-font-weight: var(--link-font-weight);
77
+ --catalog-link-text-decoration: none;
78
+
79
+ /**
80
+ * @tokens Catalog selector
81
+ */
82
+ --catalog-select-wrapper-margin-top: var(--spacing-xxs);
83
+ --catalog-select-wrapper-margin-bottom: var(--spacing-base);
84
+ --catalog-select-label-margin-bottom: var(--spacing-xxs);
85
+ --catalog-select-label-font-weight: var(--filter-title-font-weight);
86
+ --catalog-select-label-font-size: var(--filter-title-font-size);
87
+ --catalog-select-label-line-height: var(--filter-title-line-height);
88
+ --catalog-select-border-radius: var(--filter-input-border-radius);
89
+ --catalog-select-input-padding: var(--select-input-padding-vertical) var(--spacing-sm);
90
+ --catalog-select-icon-color: var(--input-t-icon-color);
91
+
92
+ /**
93
+ * @tokens Catalog highlight
94
+ */
95
+ --catalog-highlight-bg-color: var(--search-highlight-bg-color);
96
+ --catalog-highlight-text-color: var(--search-highlight-text-color);
97
+
98
+ /**
99
+ * @tokens Catalog entity icon
100
+ */
101
+ --catalog-entity-icon-color: var(--color-primary-base);
102
+
103
+ /**
104
+ * @tokens Catalog tags
105
+ */
106
+ --catalog-tags-wrapper-gap: 4px;
107
+ --catalog-tags-more-button-font-size: var(--font-size-base);
108
+ --catalog-tags-more-button-margin-left: 4px;
109
+ --catalog-tags-placeholder-bg-color: var(--bg-color);
110
+
111
+ /**
112
+ * @tokens Catalog empty state
113
+ */
114
+ --catalog-empty-state-padding: var(--catalog-table-empty-state-padding);
115
+ --catalog-empty-state-font-weight: var(--font-weight-regular);
116
+
117
+ /**
118
+ * @tokens Catalog actions
119
+ */
120
+ --catalog-actions-row-margin-bottom: var(--spacing-xl);
121
+ --catalog-controls-wrapper-gap: var(--spacing-sm);
122
+ --catalog-filter-input-width: 360px;
123
+
124
+ /**
125
+ * @tokens Catalog search input wrapper
126
+ */
127
+ --catalog-search-input-wrapper-width: var(--catalog-filter-input-width);
128
+
129
+ /**
130
+ * @tokens Catalog controls wrapper
131
+ */
132
+ --catalog-controls-wrapper-display: flex;
133
+ --catalog-controls-wrapper-align-items: center;
134
+ --catalog-controls-wrapper-margin-left: auto;
135
+
136
+ /**
137
+ * @tokens Catalog sort button
138
+ */
139
+ --catalog-sort-trigger-gap: var(--spacing-xs);
140
+ --catalog-sort-trigger-padding: 6px 8px;
141
+ --catalog-sort-trigger-border-radius: var(--border-radius-md);
142
+ --catalog-sort-trigger-hover-bg-color: var(--button-bg-color-secondary-hover);
143
+ --catalog-sort-icon-color: var(--text-color-secondary);
144
+ --catalog-sort-text-font-size: var(--font-size-sm);
145
+ --catalog-sort-text-color: var(--text-color-secondary);
146
+ --catalog-sort-text-font-weight: var(--font-weight-medium);
147
+
148
+ /**
149
+ * @tokens Catalog sidebar
150
+ */
151
+ --catalog-sidebar-display-mobile: none;
152
+ --catalog-sidebar-display-desktop: flex;
153
+ --catalog-sidebar-menu-container-padding-top: 0;
154
+
155
+ /**
156
+ * @tokens Catalog page description responsive
157
+ */
158
+ --catalog-page-description-display-mobile: none;
159
+ --catalog-page-description-display-desktop: block;
160
+
161
+ /**
162
+ * @tokens Catalog card
163
+ */
164
+ --catalog-card-min-height: 194px;
165
+ --catalog-card-min-width: 490px;
166
+ --catalog-card-padding-vertical: var(--spacing-base);
167
+ --catalog-card-padding-horizontal: var(--spacing-md);
168
+ --catalog-card-gap: var(--spacing-sm);
169
+ --catalog-card-text-color: var(--text-color-secondary);
170
+ --catalog-card-font-size: var(--font-size-base);
171
+ --catalog-card-font-weight: var(--font-weight-regular);
172
+ --catalog-card-bg-color: var(--layer-color);
173
+ --catalog-card-border-color: var(--border-color-secondary);
174
+ --catalog-card-divider-color: var(--border-color-secondary);
175
+ --catalog-card-border-width: var(--border-width);
176
+ --catalog-card-border-style: var(--border-style);
177
+ --catalog-card-border-color-hover: var(--border-color-primary);
178
+ --catalog-card-border-radius: var(--border-radius-lg);
179
+ --catalog-cards-group-margin: 0 0 var(--spacing-base) 0;
180
+ --catalog-cards-group-gap: var(--spacing-xl);
181
+
182
+ /**
183
+ * @tokens Catalog card icon
184
+ */
185
+ --catalog-card-icon-width: 30px;
186
+ --catalog-card-icon-height: 30px;
187
+ --catalog-card-icon-border-radius: 4px;
188
+ --catalog-card-icon-bg-color: var(--bg-color);
189
+ --catalog-card-icon-border-color: var(--border-color-secondary);
190
+ --catalog-card-icon-border-width: 1px;
191
+ --catalog-card-icon-margin-right: var(--spacing-xs);
192
+
193
+ /**
194
+ * @tokens Catalog metadata
195
+ */
196
+ --catalog-metadata-section-margin-top: var(--spacing-md);
197
+ --catalog-metadata-section-gap: var(--spacing-lg);
198
+ --catalog-metadata-label-font-size: var(--font-size-base);
199
+ --catalog-metadata-label-font-weight: var(--font-weight-medium);
200
+ --catalog-metadata-label-color: var(--text-color-secondary);
201
+ --catalog-metadata-label-margin-bottom: var(--spacing-unit);
202
+ --catalog-metadata-column-half-gap: var(--spacing-sm);
203
+ --catalog-metadata-heading-size: var(--font-size-md);
204
+
205
+ /**
206
+ * @tokens Catalog arrow circle
207
+ */
208
+ --catalog-arrow-circle-size: 32px;
209
+ --catalog-arrow-circle-radius: 16px;
210
+ --catalog-arrow-circle-bg-color: var(--button-bg-color-secondary);
211
+
212
+ /**
213
+ * @tokens Catalog card title
214
+ */
215
+ --catalog-card-title-color: var(--text-color-primary);
216
+ --catalog-card-title-min-height: var(--spacing-xxl);
217
+ --catalog-card-title-font-size: var(--font-size-lg);
218
+ --catalog-card-title-font-weight: var(--font-weight-bold);
219
+ --catalog-card-title-line-height: var(--line-height-lg);
220
+ --catalog-card-title-line-clamp: 2;
221
+
222
+ /**
223
+ * @tokens Catalog card description
224
+ */
225
+ --catalog-card-description-line-clamp: 3;
226
+ --catalog-card-description-color: var(--text-color-description);
227
+ --catalog-card-description-font-size: var(--font-size-base);
228
+ --catalog-card-description-line-height: var(--line-height-base);
229
+ --catalog-card-description-font-weight: var(--font-weight-regular);
230
+ --catalog-card-description-height: 62px;
231
+ --catalog-card-description-margin-top: 2px;
232
+
233
+ --catalog-card-content-gap: var(--spacing-xs);
234
+ --catalog-card-content-gap-vertical: var(--spacing-sm);
235
+
236
+ --catalog-card-tag-bg: transparent;
237
+
238
+ --catalog-actions-gap: var(--spacing-xs);
239
+ --catalog-actions-padding-vertical: var(--spacing-xs);
240
+ --catalog-actions-padding-horizontal: 5%;
241
+ --catalog-actions-min-height: 40px;
242
+ --catalog-actions-bg-color: var(--bg-color-tonal);
243
+
244
+ --catalog-page-badge-border-radius: var(--border-radius);
245
+ --catalog-page-badge-padding: 0 var(--spacing-xs);
246
+ --catalog-page-badge-font-size: var(--font-size-base);
247
+ --catalog-page-badge-line-height: var(--line-height-base);
248
+
249
+ --catalog-page-badge-dot-size: 6px;
250
+ --catalog-page-badge-dot-border-color: #ffffff;
251
+
252
+ /**
253
+ * @tokens Catalog table
254
+ */
255
+ --catalog-table-border-color: var(--border-color-primary);
256
+ --catalog-table-header-bg-color: var(--bg-color-secondary);
257
+ --catalog-table-header-font-weight: var(--font-weight-semibold);
258
+ --catalog-table-header-cell-padding: 5px 8px;
259
+ --catalog-table-cell-padding: 5px 8px;
260
+ --catalog-table-row-hover-bg-color: var(--bg-color-hover, rgba(0, 0, 0, 0.04));
261
+ --catalog-table-empty-state-padding: 32px;
262
+ --catalog-table-empty-state-color: var(--text-color-secondary);
263
+ --catalog-table-title-cell-gap: 12px;
264
+ --catalog-table-entity-title-content-offset: 42px;
265
+
266
+ /**
267
+ * @tokens Catalog table header
268
+ */
269
+ --catalog-table-header-sort-icon-color-active: var(--text-color-primary);
270
+ --catalog-table-header-sort-icon-color-inactive: var(--text-color-helper);
271
+ --catalog-table-header-sort-indicator-color: var(--icon-color-primary);
272
+ --catalog-table-header-sort-arrow-bg-active: var(--bg-color-active);
273
+
274
+ /**
275
+ * @tokens Catalog table icon
276
+ */
277
+ --catalog-table-icon-width: 30px;
278
+ --catalog-table-icon-height: 30px;
279
+ --catalog-table-icon-border-radius: 4px;
280
+ --catalog-table-icon-bg-color: var(--bg-color-tonal);
281
+ --catalog-table-icon-border-color: var(--border-color-secondary);
282
+ --catalog-table-icon-border-width: 1px;
283
+
284
+ /**
285
+ * @tokens Catalog table entity title
286
+ */
287
+ --catalog-table-entity-title-font-size: var(--catalog-card-title-font-size);
288
+ --catalog-table-entity-title-line-height: var(--line-height-lg);
289
+ --catalog-table-entity-title-font-weight: var(--font-weight-semibold);
290
+
291
+ /**
292
+ * @tokens Catalog table description
293
+ */
294
+ --catalog-table-description-line-clamp: 3;
295
+ --catalog-table-description-color: var(--text-color-description);
296
+ --catalog-table-description-font-size: var(--font-size-base);
297
+ --catalog-table-description-line-height: var(--line-height-base);
298
+ --catalog-table-description-font-weight: var(--font-weight-regular);
299
+ --catalog-table-description-height: 62px;
300
+ --catalog-table-entity-summary-font-size: var(--font-size-sm);
301
+ --catalog-table-entity-summary-line-height: var(--line-height-sm);
302
+
303
+ --catalog-table-content-gap: var(--spacing-xxs);
304
+
305
+ --catalog-table-tag-bg: transparent;
306
+
307
+ /**
308
+ * @tokens Catalog entity type tags
309
+ */
310
+ --catalog-entity-service-tag-text-color: var(--color-blue-7);
311
+ --catalog-entity-service-tag-border-color: var(--color-blue-4);
312
+
313
+ --catalog-entity-domain-tag-text-color: var(--color-grass-8);
314
+ --catalog-entity-domain-tag-border-color: var(--color-grass-4);
315
+
316
+ --catalog-entity-team-tag-text-color: var(--color-purple-7);
317
+ --catalog-entity-team-tag-border-color: var(--color-purple-4);
318
+
319
+ --catalog-entity-user-tag-text-color: var(--color-green-7);
320
+ --catalog-entity-user-tag-border-color: var(--color-green-4);
321
+
322
+ --catalog-entity-api-description-tag-text-color: var(--color-sky-8);
323
+ --catalog-entity-api-description-tag-border-color: var(--color-sky-5);
324
+
325
+ /**
326
+ * @tokens Catalog view mode toggle
327
+ */
328
+ --catalog-view-mode-toggle-gap: var(--spacing-xxs);
329
+ --catalog-view-mode-toggle-active-bg-color: var(--button-bg-color-secondary-hover);
330
+ --catalog-view-mode-button-width: 32px;
331
+ --catalog-view-mode-button-height: 32px;
332
+ --catalog-view-mode-button-border-radius: var(--border-radius-md);
333
+ --catalog-view-mode-table-icon-size: 12px;
334
+ --catalog-view-mode-cards-icon-size: 13px;
335
+
336
+ /**
337
+ * @tokens Catalog empty state
338
+ */
339
+ --catalog-empty-state-text-color: var(--text-color-description);
340
+ --catalog-empty-state-min-height: 300px;
341
+ --catalog-empty-state-header-text-color: var(--text-color-primary);
342
+ --catalog-empty-state-header-font-size: var(--font-size-xl);
343
+ --catalog-empty-state-header-font-weight: var(--font-weight-medium);
344
+ --catalog-empty-state-header-line-height: var(--line-height-xl);
345
+ --catalog-empty-state-font-size: var(--font-size-base);
346
+ --catalog-empty-state-line-height: var(--line-height-base);
347
+
348
+
349
+ --catalog-avatar-bg-color: #ededf2;
350
+ // @tokens End
351
+ `;
@@ -48,7 +48,7 @@ export function CatalogClassicHighlight(props: CatalogClassicHighlightProps): JS
48
48
  </>
49
49
  );
50
50
  } else {
51
- return <>children</> || null;
51
+ return <>{children}</>;
52
52
  }
53
53
  }
54
54
 
@@ -40,6 +40,6 @@ export const dropdown = css`
40
40
 
41
41
  --dropdown-menu-item-color-dangerous: var(--color-error-base);
42
42
 
43
- --dropdown-menu-item-border-color-focused: var(--color-blue-4);
43
+ --dropdown-menu-item-border-color-focused: var(--button-border-color-focused);
44
44
  // @tokens End
45
45
  `;
@@ -14,14 +14,22 @@ const filterComponents = {
14
14
  checkboxes: FilterCheckboxes,
15
15
  } as const;
16
16
 
17
- export function Filter({ filter, filterValuesCasing }: FilterProps): JSX.Element | null {
17
+ export function Filter({
18
+ filter,
19
+ filterValuesCasing,
20
+ showCounter = true,
21
+ }: FilterProps): JSX.Element | null {
18
22
  if (!filter.parentUsed) return null;
19
23
 
20
24
  const FilterComponent = filterComponents[(filter.type || 'checkboxes') as FilterTypes];
21
25
 
22
26
  return (
23
27
  <FilterGroup data-component-name="Filter/Filter" key={filter.property + filter.title}>
24
- <FilterComponent filter={filter} filterValuesCasing={filterValuesCasing} />
28
+ <FilterComponent
29
+ filter={filter}
30
+ filterValuesCasing={filterValuesCasing}
31
+ showCounter={showCounter}
32
+ />
25
33
  </FilterGroup>
26
34
  );
27
35
  }
@@ -13,7 +13,11 @@ import { CheckboxIcon } from '@redocly/theme/icons/CheckboxIcon/CheckboxIcon';
13
13
  import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
14
14
  import { changeTextCasing } from '@redocly/theme/core/utils';
15
15
 
16
- export function FilterCheckboxes({ filter, filterValuesCasing }: FilterProps): JSX.Element {
16
+ export function FilterCheckboxes({
17
+ filter,
18
+ filterValuesCasing,
19
+ showCounter = true,
20
+ }: FilterProps): JSX.Element {
17
21
  const { useTranslate, useTelemetry } = useThemeHooks();
18
22
  const { translate } = useTranslate();
19
23
  const telemetry = useTelemetry();
@@ -24,7 +28,7 @@ export function FilterCheckboxes({ filter, filterValuesCasing }: FilterProps): J
24
28
  {translate(filter.titleTranslationKey, filter.title)}
25
29
  </FilterTitle>
26
30
  <FilterOptions>
27
- {filter.filteredOptions.map(({ value, count }) => {
31
+ {filter.options.map(({ value, count }) => {
28
32
  const id = 'filter--' + filter.property + '--' + value;
29
33
  return (
30
34
  <FilterCheckboxOption
@@ -35,11 +39,11 @@ export function FilterCheckboxes({ filter, filterValuesCasing }: FilterProps): J
35
39
  telemetry.send({ type: 'filter_checkbox.toggled', payload: { id } });
36
40
  }}
37
41
  >
38
- <CheckboxIcon checked={filter.selectedOptions.has(value)} />
42
+ <CheckboxIcon checked={filter.selectedOptions.has(value?.toLowerCase())} />
39
43
  <FilterOptionLabel data-translation-key={value}>
40
44
  {changeTextCasing(translate(value), filterValuesCasing)}
41
45
  </FilterOptionLabel>
42
- <CounterTag borderless>{count}</CounterTag>
46
+ {showCounter && <CounterTag borderless>{count}</CounterTag>}
43
47
  </FilterCheckboxOption>
44
48
  );
45
49
  })}