@redocly/theme 0.56.0-next.2 → 0.56.0-next.4

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 (227) hide show
  1. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -2
  2. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -3
  3. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +4 -11
  4. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +7 -1
  5. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +4 -0
  6. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +3 -3
  7. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +7 -2
  8. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +6 -0
  9. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +19 -0
  10. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +1 -0
  11. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +11 -8
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -6
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +0 -1
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +2 -1
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +11 -5
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +6 -0
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +55 -0
  18. package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
  19. package/lib/components/Catalog/CatalogEntityIcon.js +22 -23
  20. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +2 -1
  21. package/lib/components/Catalog/CatalogEntityTypeIcon.js +11 -23
  22. package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +7 -0
  23. package/lib/components/Catalog/CatalogEntityTypeTag.js +36 -0
  24. package/lib/components/Catalog/CatalogPageDescription.js +2 -2
  25. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -4
  26. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -14
  27. package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.d.ts +3 -0
  28. package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.js +11 -0
  29. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
  30. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
  31. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +3 -26
  32. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +0 -2
  33. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +5 -26
  34. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +1 -1
  35. package/lib/components/Catalog/CatalogTagsWithTooltip.js +5 -6
  36. package/lib/components/Catalog/variables.js +36 -7
  37. package/lib/components/Menu/variables.js +2 -0
  38. package/lib/components/Tag/Tag.d.ts +2 -1
  39. package/lib/components/Tag/Tag.js +3 -3
  40. package/lib/components/Tag/variables.js +14 -0
  41. package/lib/components/Tags/CounterTag.d.ts +1 -1
  42. package/lib/components/Tags/HttpTag.d.ts +1 -1
  43. package/lib/core/constants/catalog.d.ts +3 -0
  44. package/lib/core/constants/catalog.js +55 -1
  45. package/lib/core/constants/index.d.ts +5 -5
  46. package/lib/core/constants/index.js +5 -5
  47. package/lib/core/constants/search.d.ts +1 -1
  48. package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughControlsContext.d.ts +1 -1
  49. package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.d.ts +1 -1
  50. package/lib/core/contexts/ThemeDataContext.d.ts +1 -1
  51. package/lib/core/contexts/index.d.ts +3 -3
  52. package/lib/core/contexts/index.js +3 -3
  53. package/lib/core/hoc/index.d.ts +1 -1
  54. package/lib/core/hoc/index.js +1 -1
  55. package/lib/core/hooks/__mocks__/index.d.ts +28 -28
  56. package/lib/core/hooks/__mocks__/index.js +28 -28
  57. package/lib/core/hooks/catalog/useCatalogEntities.d.ts +1 -1
  58. package/lib/core/hooks/catalog/useCatalogTableViewRow.js +2 -2
  59. package/lib/core/hooks/code-walkthrough/use-code-panel.js +6 -5
  60. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +8 -5
  61. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
  62. package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +9 -9
  63. package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +2 -2
  64. package/lib/core/hooks/code-walkthrough/use-code-walkthrough.js +4 -3
  65. package/lib/core/hooks/code-walkthrough/use-renderable-files.js +6 -4
  66. package/lib/core/hooks/feedback/use-report-dialog.js +4 -3
  67. package/lib/core/hooks/index.d.ts +42 -42
  68. package/lib/core/hooks/index.js +42 -42
  69. package/lib/core/hooks/menu/use-menu-item-expanded.d.ts +1 -1
  70. package/lib/core/hooks/menu/use-mobile-menu-items.d.ts +1 -1
  71. package/lib/core/hooks/menu/use-mobile-menu-items.js +13 -12
  72. package/lib/core/hooks/menu/use-mobile-menu-levels.d.ts +1 -1
  73. package/lib/core/hooks/menu/use-mobile-menu-levels.js +8 -7
  74. package/lib/core/hooks/menu/use-nested-menu.d.ts +1 -1
  75. package/lib/core/hooks/menu/use-nested-menu.js +8 -6
  76. package/lib/core/hooks/search/use-recent-searches.js +3 -3
  77. package/lib/core/hooks/search/use-search-dialog.js +4 -3
  78. package/lib/core/hooks/search/use-search-filter.d.ts +1 -1
  79. package/lib/core/hooks/search/use-suggested-pages.js +2 -2
  80. package/lib/core/hooks/use-active-page-version.js +2 -2
  81. package/lib/core/hooks/use-active-section-id.js +2 -2
  82. package/lib/core/hooks/use-color-switcher.js +4 -3
  83. package/lib/core/hooks/use-input-key-commands.js +2 -2
  84. package/lib/core/hooks/use-language-picker.d.ts +1 -1
  85. package/lib/core/hooks/use-language-picker.js +4 -4
  86. package/lib/core/hooks/use-mobile-menu.js +2 -2
  87. package/lib/core/hooks/use-navbar-height.js +3 -3
  88. package/lib/core/hooks/use-page-versions.js +2 -2
  89. package/lib/core/hooks/use-product-picker.js +2 -2
  90. package/lib/core/hooks/use-theme-config.js +2 -2
  91. package/lib/core/hooks/use-theme-hooks.d.ts +1 -1
  92. package/lib/core/hooks/use-theme-hooks.js +2 -2
  93. package/lib/core/hooks/use-time-ago.js +2 -2
  94. package/lib/core/hooks/use-user-teams.js +2 -2
  95. package/lib/core/index.d.ts +7 -7
  96. package/lib/core/index.js +7 -7
  97. package/lib/core/openapi/index.d.ts +18 -0
  98. package/lib/core/openapi/index.js +48 -0
  99. package/lib/core/styles/global.js +1 -1
  100. package/lib/core/styles/index.d.ts +2 -2
  101. package/lib/core/styles/index.js +2 -2
  102. package/lib/core/templates/Markdown.d.ts +1 -1
  103. package/lib/core/templates/Markdown.js +8 -6
  104. package/lib/core/types/catalog.d.ts +6 -2
  105. package/lib/core/types/code-walkthrough.d.ts +1 -1
  106. package/lib/core/types/feedback.d.ts +1 -1
  107. package/lib/core/types/filter.d.ts +1 -1
  108. package/lib/core/types/hooks.d.ts +11 -3
  109. package/lib/core/types/index.d.ts +18 -18
  110. package/lib/core/types/index.js +18 -18
  111. package/lib/core/types/l10n.d.ts +1 -1
  112. package/lib/core/types/search.d.ts +1 -1
  113. package/lib/core/types/sidebar.d.ts +1 -1
  114. package/lib/core/utils/download-code-walkthrough.js +6 -4
  115. package/lib/core/utils/get-code-walkthrough-file-text.js +4 -3
  116. package/lib/core/utils/index.d.ts +35 -35
  117. package/lib/core/utils/index.js +35 -35
  118. package/lib/core/utils/load-and-navigate.js +2 -2
  119. package/lib/core/utils/match-code-walkthrough-conditions.js +3 -3
  120. package/lib/core/utils/menu.d.ts +3 -2
  121. package/lib/core/utils/menu.js +12 -12
  122. package/lib/core/utils/toc.d.ts +1 -1
  123. package/lib/core/utils/type-guards.d.ts +1 -1
  124. package/lib/core/utils/type-guards.js +5 -5
  125. package/lib/core/utils/urls.d.ts +1 -1
  126. package/lib/core/utils/urls.js +2 -2
  127. package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +9 -0
  128. package/lib/icons/MoleculesIcon/MoleculesIcon.js +22 -0
  129. package/lib/icons/NetworkIcon/NetworkIcon.d.ts +9 -0
  130. package/lib/icons/NetworkIcon/NetworkIcon.js +23 -0
  131. package/lib/icons/NotesIcon/NotesIcon.d.ts +9 -0
  132. package/lib/icons/NotesIcon/NotesIcon.js +26 -0
  133. package/lib/markdoc/components/Tabs/TabList.js +2 -0
  134. package/package.json +2 -2
  135. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -3
  136. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +7 -15
  137. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +7 -1
  138. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -0
  139. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +2 -3
  140. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +10 -3
  141. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +36 -0
  142. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +19 -22
  143. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +8 -2
  144. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +0 -1
  145. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +16 -3
  146. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +52 -0
  147. package/src/components/Catalog/CatalogEntityIcon.tsx +33 -27
  148. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +23 -28
  149. package/src/components/Catalog/CatalogEntityTypeTag.tsx +43 -0
  150. package/src/components/Catalog/CatalogPageDescription.tsx +4 -3
  151. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +7 -20
  152. package/src/components/Catalog/CatalogTableView/CatalogEntityRelationCell.tsx +19 -0
  153. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -2
  154. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +3 -31
  155. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +5 -31
  156. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +10 -19
  157. package/src/components/Catalog/variables.ts +36 -7
  158. package/src/components/Menu/variables.ts +2 -0
  159. package/src/components/Tag/Tag.tsx +11 -2
  160. package/src/components/Tag/variables.ts +14 -0
  161. package/src/core/constants/catalog.ts +58 -0
  162. package/src/core/constants/index.ts +5 -5
  163. package/src/core/constants/search.ts +1 -1
  164. package/src/core/contexts/CodeWalkthrough/CodeWalkthroughControlsContext.tsx +1 -1
  165. package/src/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.tsx +1 -1
  166. package/src/core/contexts/ThemeDataContext.tsx +3 -3
  167. package/src/core/contexts/index.ts +3 -3
  168. package/src/core/hoc/index.ts +1 -1
  169. package/src/core/hooks/__mocks__/index.ts +28 -28
  170. package/src/core/hooks/catalog/useCatalogEntities.ts +1 -1
  171. package/src/core/hooks/catalog/useCatalogTableViewRow.ts +1 -1
  172. package/src/core/hooks/code-walkthrough/use-code-panel.ts +3 -5
  173. package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +4 -6
  174. package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +4 -3
  175. package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +3 -3
  176. package/src/core/hooks/code-walkthrough/use-renderable-files.ts +4 -6
  177. package/src/core/hooks/feedback/use-report-dialog.ts +3 -2
  178. package/src/core/hooks/index.ts +42 -42
  179. package/src/core/hooks/menu/use-menu-item-expanded.ts +1 -1
  180. package/src/core/hooks/menu/use-mobile-menu-items.ts +4 -7
  181. package/src/core/hooks/menu/use-mobile-menu-levels.ts +3 -2
  182. package/src/core/hooks/menu/use-nested-menu.ts +5 -3
  183. package/src/core/hooks/search/use-recent-searches.ts +1 -1
  184. package/src/core/hooks/search/use-search-dialog.ts +2 -1
  185. package/src/core/hooks/search/use-search-filter.ts +1 -1
  186. package/src/core/hooks/search/use-suggested-pages.ts +1 -1
  187. package/src/core/hooks/use-active-page-version.ts +1 -1
  188. package/src/core/hooks/use-active-section-id.ts +1 -1
  189. package/src/core/hooks/use-codeblock-tabs-controls.ts +1 -1
  190. package/src/core/hooks/use-color-switcher.ts +2 -1
  191. package/src/core/hooks/use-input-key-commands.ts +1 -1
  192. package/src/core/hooks/use-language-picker.ts +3 -3
  193. package/src/core/hooks/use-mobile-menu.ts +1 -1
  194. package/src/core/hooks/use-navbar-height.ts +1 -1
  195. package/src/core/hooks/use-page-versions.ts +1 -1
  196. package/src/core/hooks/use-product-picker.ts +1 -1
  197. package/src/core/hooks/use-theme-config.ts +2 -2
  198. package/src/core/hooks/use-theme-hooks.ts +2 -2
  199. package/src/core/hooks/use-time-ago.ts +3 -2
  200. package/src/core/hooks/use-user-teams.ts +1 -1
  201. package/src/core/index.ts +7 -7
  202. package/src/core/openapi/index.ts +31 -0
  203. package/src/core/styles/global.ts +2 -1
  204. package/src/core/styles/index.ts +2 -2
  205. package/src/core/templates/Markdown.tsx +8 -4
  206. package/src/core/types/catalog.ts +15 -2
  207. package/src/core/types/code-walkthrough.ts +1 -1
  208. package/src/core/types/feedback.ts +6 -6
  209. package/src/core/types/filter.ts +1 -1
  210. package/src/core/types/hooks.ts +17 -16
  211. package/src/core/types/index.ts +18 -18
  212. package/src/core/types/l10n.ts +4 -0
  213. package/src/core/types/search.ts +1 -1
  214. package/src/core/types/sidebar.ts +1 -1
  215. package/src/core/utils/download-code-walkthrough.ts +3 -5
  216. package/src/core/utils/get-code-walkthrough-file-text.ts +2 -1
  217. package/src/core/utils/index.ts +35 -35
  218. package/src/core/utils/load-and-navigate.ts +1 -1
  219. package/src/core/utils/match-code-walkthrough-conditions.ts +1 -1
  220. package/src/core/utils/menu.ts +4 -3
  221. package/src/core/utils/toc.ts +1 -1
  222. package/src/core/utils/type-guards.ts +2 -2
  223. package/src/core/utils/urls.ts +2 -2
  224. package/src/icons/MoleculesIcon/MoleculesIcon.tsx +23 -0
  225. package/src/icons/NetworkIcon/NetworkIcon.tsx +31 -0
  226. package/src/icons/NotesIcon/NotesIcon.tsx +43 -0
  227. package/src/markdoc/components/Tabs/TabList.tsx +1 -0
@@ -1,8 +1,8 @@
1
1
  import { useContext } from 'react';
2
2
 
3
- import type { ThemeHooks } from '@redocly/theme/core/types';
3
+ import type { ThemeHooks } from '../types/hooks';
4
4
 
5
- import { ThemeDataContext } from '@redocly/theme/core/contexts';
5
+ import { ThemeDataContext } from '../contexts/ThemeDataContext';
6
6
 
7
7
  const fallbacks = {
8
8
  useTranslate: () => ({
@@ -1,8 +1,9 @@
1
1
  import { useCallback } from 'react';
2
2
 
3
- import type { Plural, TranslationKey } from '@redocly/theme/core/types';
3
+ import type { Plural } from '../types/common';
4
+ import type { TranslationKey } from '../types/l10n';
4
5
 
5
- import { useThemeHooks } from '@redocly/theme/core/hooks';
6
+ import { useThemeHooks } from './use-theme-hooks';
6
7
 
7
8
  const timeUnits = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'] as const;
8
9
  const timeUnitConversions = [
@@ -1,4 +1,4 @@
1
- import { useThemeHooks } from '@redocly/theme/core/hooks';
1
+ import { useThemeHooks } from './use-theme-hooks';
2
2
 
3
3
  export function useUserTeams() {
4
4
  const { useUserTeams } = useThemeHooks();
package/src/core/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from '@redocly/theme/core/constants';
2
- export * from '@redocly/theme/core/contexts';
3
- export * from '@redocly/theme/core/hoc';
4
- export * from '@redocly/theme/core/hooks';
5
- export * from '@redocly/theme/core/types';
6
- export * from '@redocly/theme/core/utils';
7
- export * from '@redocly/theme/core/styles';
1
+ export * from './constants';
2
+ export * from './contexts';
3
+ export * from './hoc';
4
+ export * from './hooks';
5
+ export * from './types';
6
+ export * from './utils';
7
+ export * from './styles';
@@ -0,0 +1,31 @@
1
+ // This file is intended to provide selective imports from @redocly/theme/core
2
+ // to reduce bundle size by exporting only functionality used in the @redocly/openapi-docs package.
3
+ //
4
+ // This selective import approach will help with tree shaking and reduce
5
+ // the overall bundle size by avoiding importing the entire theme package
6
+ // when only specific functionality is needed.
7
+ export { IS_BROWSER } from '../utils/dom';
8
+ export {
9
+ addLeadingSlash,
10
+ removeLeadingSlash,
11
+ getPathPrefix,
12
+ combineUrls,
13
+ addTrailingSlash,
14
+ withPathPrefix,
15
+ } from '../utils/urls';
16
+ export { typedMemo } from '../hoc/typedMemo';
17
+ export { useMount } from '../hooks/use-mount';
18
+ export { GlobalStyle } from '../styles/global';
19
+ export { breakpoints } from '../utils/media-css';
20
+ export { isPrimitive } from '../utils/args-typecheck';
21
+ export type { UserClaims } from '../types/user-claims';
22
+ export { useFocusTrap } from '../hooks/use-focus-trap';
23
+ export type { TFunction, TOptions } from '../types/l10n';
24
+ export { useThemeHooks } from '../hooks/use-theme-hooks';
25
+ export { useOutsideClick } from '../hooks/use-outside-click';
26
+ export type { SelectOption, SelectProps } from '../types/select';
27
+ export { useActiveSectionId } from '../hooks/use-active-section-id';
28
+ export { useModalScrollLock } from '../hooks/use-modal-scroll-lock';
29
+ export { SecurityVariablesEnvSuffix } from '../constants/environments';
30
+ export { isUndefined, isString, isNotNull, isObject } from '../utils/type-guards';
31
+ export { ThemeDataContext, type ThemeDataTransferObject } from '../contexts/ThemeDataContext';
@@ -1,6 +1,5 @@
1
1
  import { createGlobalStyle, css } from 'styled-components';
2
2
 
3
- import { darkMode } from '@redocly/theme/core/styles/dark';
4
3
  import { languagePicker } from '@redocly/theme/components/LanguagePicker/variables';
5
4
  import { scorecard } from '@redocly/theme/components/Scorecard/variables';
6
5
  import { feedback } from '@redocly/theme/components/Feedback/variables';
@@ -40,6 +39,8 @@ import { cards } from '@redocly/theme/markdoc/components/Cards/variables';
40
39
  import { codeWalkthrough } from '@redocly/theme/markdoc/components/CodeWalkthrough/variables';
41
40
  import { skipContent } from '@redocly/theme/components/SkipContent/variables';
42
41
 
42
+ import { darkMode } from './dark';
43
+
43
44
  const themeColors = css`
44
45
  /* === Palette === */
45
46
  /**
@@ -1,2 +1,2 @@
1
- export * from '@redocly/theme/core/styles/global';
2
- export * from '@redocly/theme/core/styles/dark';
1
+ export * from './global';
2
+ export * from './dark';
@@ -1,17 +1,21 @@
1
1
  import * as React from 'react';
2
2
  import { useLocation } from 'react-router-dom';
3
3
 
4
- import type { UiAccessibleConfig } from '@redocly/theme/config';
5
- import type { MdHeading, FeedbackProps } from '@redocly/theme/core/types';
4
+ import type { UiAccessibleConfig } from '../../config';
5
+ import type { FeedbackProps } from '../types/feedback';
6
+ import type { MdHeading } from '../types/markdown';
6
7
 
7
- import { useThemeConfig, useThemeHooks } from '@redocly/theme/core/hooks';
8
8
  import { DocumentationLayout } from '@redocly/theme/layouts/DocumentationLayout';
9
9
  import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
10
10
  import { TableOfContent } from '@redocly/theme/components/TableOfContent/TableOfContent';
11
11
  import { Feedback } from '@redocly/theme/components/Feedback/Feedback';
12
- import { IS_BROWSER, onDocumentReady, extendDetailsBehaviour } from '@redocly/theme/core/utils';
13
12
  import { CodeWalkthroughLayout } from '@redocly/theme/layouts/CodeWalkthroughLayout';
14
13
 
14
+ import { IS_BROWSER, onDocumentReady } from '../utils/dom';
15
+ import { extendDetailsBehaviour } from '../utils/details';
16
+ import { useThemeHooks } from '../hooks/use-theme-hooks';
17
+ import { useThemeConfig } from '../hooks/use-theme-config';
18
+
15
19
  export type MarkdownTemplateProps = {
16
20
  pageProps: {
17
21
  frontmatter?: UiAccessibleConfig;
@@ -3,6 +3,8 @@ import { CatalogEntityConfig, LayoutVariant } from '@redocly/config';
3
3
 
4
4
  import type { CatalogFilterConfig } from '@redocly/theme/config';
5
5
 
6
+ import { ENTITY_RELATION_TYPES } from '../constants/catalog';
7
+
6
8
  export type SortOption = 'title' | '-title' | 'type' | '-type';
7
9
 
8
10
  export type UseCatalogResponse = {
@@ -103,7 +105,14 @@ export type UseCatalogEntitiesResponse = {
103
105
  setEntitiesCounter: (counter: number) => void;
104
106
  };
105
107
 
106
- export type EntityType = 'service' | 'domain' | 'team' | 'user' | 'api-description';
108
+ export type EntityType =
109
+ | 'service'
110
+ | 'domain'
111
+ | 'team'
112
+ | 'user'
113
+ | 'api-description'
114
+ | 'data-schema'
115
+ | 'api-operation';
107
116
 
108
117
  export type CatalogViewMode = 'cards' | 'table';
109
118
 
@@ -121,6 +130,8 @@ export type BffCatalogRelatedEntity = {
121
130
  title: string;
122
131
  summary?: string | null;
123
132
  readonly source: 'api' | 'file';
133
+ relationRole: 'source' | 'target';
134
+ relationType: EntityRelationType;
124
135
  sourceFile?: string | null;
125
136
  metadata?: Record<string, any>;
126
137
  readonly createdAt: string | null;
@@ -137,7 +148,7 @@ export type BffCatalogEntity = {
137
148
  readonly source: 'api' | 'file';
138
149
  domains?: Array<BffCatalogRelatedEntity>;
139
150
  owners?: Array<BffCatalogRelatedEntity>;
140
- summary?: string;
151
+ summary?: string | null;
141
152
  tags?: Array<string>;
142
153
  metadata?: Record<string, any>;
143
154
  git?: Array<string>;
@@ -178,3 +189,5 @@ export type Page = {
178
189
  limit: number;
179
190
  total: number;
180
191
  };
192
+
193
+ export type EntityRelationType = (typeof ENTITY_RELATION_TYPES)[number];
@@ -1,4 +1,4 @@
1
- import type { MarkerArea } from '@redocly/theme/core/types';
1
+ import type { MarkerArea } from './marker';
2
2
 
3
3
  export type ActiveStep = string | null;
4
4
 
@@ -1,9 +1,9 @@
1
- import type { FEEDBACK_TYPES } from '@redocly/theme/core/constants';
2
- import type { SentimentProps } from '@redocly/theme/components/Feedback/Sentiment';
3
- import type { CommentProps } from '@redocly/theme/components/Feedback/Comment';
4
- import type { MoodProps } from '@redocly/theme/components/Feedback/Mood';
5
- import type { ScaleProps } from '@redocly/theme/components/Feedback/Scale';
6
- import type { RatingProps } from '@redocly/theme/components/Feedback/Rating';
1
+ import type { FEEDBACK_TYPES } from '../constants/common';
2
+ import type { SentimentProps } from '../../components/Feedback/Sentiment';
3
+ import type { CommentProps } from '../../components/Feedback/Comment';
4
+ import type { MoodProps } from '../../components/Feedback/Mood';
5
+ import type { ScaleProps } from '../../components/Feedback/Scale';
6
+ import type { RatingProps } from '../../components/Feedback/Rating';
7
7
 
8
8
  export type SubmitFeedbackParams = {
9
9
  type: string;
@@ -1,4 +1,4 @@
1
- import type { ResolvedFilter } from '@redocly/theme/core/types';
1
+ import type { ResolvedFilter } from './catalog';
2
2
  import type { RedoclyConfig } from '@redocly/config';
3
3
 
4
4
  export type FilterProps = {
@@ -9,34 +9,35 @@ import type { Callback, TFunction as TFunc } from 'i18next';
9
9
  import type { To, Location, NavigateFunction } from 'react-router-dom';
10
10
  import type { CatalogConfig, ProductUiConfig } from '@redocly/theme/config';
11
11
  import type {
12
- UserMenuData,
13
12
  UseCatalogResponse,
14
- ItemState,
15
- SearchItemData,
16
- SubmitFeedbackParams,
17
- TFunction,
18
- BreadcrumbItem,
19
- DrilldownMenuItemDetails,
20
- SearchFacet,
21
- SearchFilterItem,
22
- SearchFacetQuery,
23
- AiSearchConversationItem,
24
13
  CatalogApiResults,
25
14
  CatalogApiParams,
26
15
  FilteredCatalog,
27
16
  UseCatalogSortResponse,
28
17
  UseCatalogSearchResponse,
29
- EventType,
30
- SendEventParams,
31
- } from '@redocly/theme/core/types';
18
+ } from './catalog';
19
+ import type { UserMenuData } from './user-menu';
20
+ import type { ItemState } from './sidebar';
21
+ import type {
22
+ SearchItemData,
23
+ SearchFacet,
24
+ SearchFilterItem,
25
+ SearchFacetQuery,
26
+ AiSearchConversationItem,
27
+ } from './search';
28
+ import type { EventType, SendEventParams } from './telemetry';
29
+ import type { SubmitFeedbackParams } from './feedback';
30
+ import type { TFunction } from './l10n';
31
+ import type { BreadcrumbItem } from './breadcrumb';
32
+ import type { DrilldownMenuItemDetails } from './sidebar';
32
33
 
33
34
  import {
34
35
  BffCatalogEntity,
35
36
  BffCatalogEntityList,
36
37
  BffCatalogRelatedEntity,
37
38
  BffCatalogRelatedEntityList,
38
- } from '@redocly/theme/core/types';
39
- import { AiSearchError } from '@redocly/theme/core/constants';
39
+ } from './catalog';
40
+ import { AiSearchError } from '../constants/search';
40
41
 
41
42
  export type ThemeHooks = {
42
43
  useTranslate: () => { translate: TFunction };
@@ -1,18 +1,18 @@
1
- export * from '@redocly/theme/core/types/breadcrumb';
2
- export * from '@redocly/theme/core/types/catalog';
3
- export * from '@redocly/theme/core/types/l10n';
4
- export * from '@redocly/theme/core/types/feedback';
5
- export * from '@redocly/theme/core/types/hooks';
6
- export * from '@redocly/theme/core/types/markdown';
7
- export * from '@redocly/theme/core/types/navbar';
8
- export * from '@redocly/theme/core/types/search';
9
- export * from '@redocly/theme/core/types/select';
10
- export * from '@redocly/theme/core/types/sidebar';
11
- export * from '@redocly/theme/core/types/filter';
12
- export * from '@redocly/theme/core/types/user-menu';
13
- export * from '@redocly/theme/core/types/user-claims';
14
- export * from '@redocly/theme/core/types/common';
15
- export * from '@redocly/theme/core/types/open-api-server';
16
- export * from '@redocly/theme/core/types/marker';
17
- export * from '@redocly/theme/core/types/code-walkthrough';
18
- export * from '@redocly/theme/core/types/telemetry';
1
+ export * from './breadcrumb';
2
+ export * from './catalog';
3
+ export * from './l10n';
4
+ export * from './feedback';
5
+ export * from './hooks';
6
+ export * from './markdown';
7
+ export * from './navbar';
8
+ export * from './search';
9
+ export * from './select';
10
+ export * from './sidebar';
11
+ export * from './filter';
12
+ export * from './user-menu';
13
+ export * from './user-claims';
14
+ export * from './common';
15
+ export * from './open-api-server';
16
+ export * from './marker';
17
+ export * from './code-walkthrough';
18
+ export * from './telemetry';
@@ -136,7 +136,11 @@ export type TranslationKey =
136
136
  | 'catalog.catalogs.apiDescription.title'
137
137
  | 'catalog.catalogs.apiDescription.description'
138
138
  | 'catalog.catalogs.apiDescription.switcherLabel'
139
+ | 'catalog.catalogs.dataSchema.title'
140
+ | 'catalog.catalogs.dataSchema.description'
141
+ | 'catalog.catalogs.dataSchema.switcherLabel'
139
142
  | 'catalog.entity.metadata.title'
143
+ | 'catalog.entity.schema.title'
140
144
  | 'catalog.entity.properties.apiDescription.title'
141
145
  | 'sidebar.menu.backLabel'
142
146
  | 'sidebar.menu.backToLabel'
@@ -1,6 +1,6 @@
1
1
  import type { ItemBadge, REDOCLY_ROUTE_RBAC } from '@redocly/config';
2
2
  import type { ProductConfig } from '@redocly/theme/config';
3
- import type { AiSearchConversationRole } from '@redocly/theme/core/constants';
3
+ import type { AiSearchConversationRole } from '../constants/search';
4
4
 
5
5
  export type OperationParameter = {
6
6
  name: string | string[];
@@ -5,7 +5,7 @@ import type {
5
5
  RbacScopeItems,
6
6
  ItemBadge,
7
7
  } from '@redocly/config';
8
- import type { MenuItemType } from '@redocly/theme/core/constants';
8
+ import type { MenuItemType } from '../constants/common';
9
9
  export type { MenuStyle } from '@redocly/config';
10
10
 
11
11
  export type SidebarNavItem = {
@@ -3,11 +3,9 @@ import JSZip from 'jszip';
3
3
 
4
4
  import type { CodeWalkthroughFile } from '@redocly/config';
5
5
 
6
- import {
7
- findClosestCommonDirectory,
8
- getCodeWalkthroughFileText,
9
- removeLeadingSlash,
10
- } from '@redocly/theme/core/utils';
6
+ import { removeLeadingSlash } from './urls';
7
+ import { findClosestCommonDirectory } from './find-closest-common-directory';
8
+ import { getCodeWalkthroughFileText } from './get-code-walkthrough-file-text';
11
9
 
12
10
  // https://github.com/Stuk/jszip/issues/196#issuecomment-69503828
13
11
  JSZip.support.nodebuffer = false;
@@ -1,6 +1,7 @@
1
1
  import type { CodeWalkthroughFile, CodeWalkthroughNode } from '@redocly/config';
2
2
 
3
- import { matchCodeWalkthroughConditions, replaceInputsWithValue } from '@redocly/theme/core/utils';
3
+ import { matchCodeWalkthroughConditions } from './match-code-walkthrough-conditions';
4
+ import { replaceInputsWithValue } from './replace-inputs-with-value';
4
5
 
5
6
  export function getCodeWalkthroughFileText(
6
7
  file: CodeWalkthroughFile,
@@ -1,35 +1,35 @@
1
- export * from '@redocly/theme/core/utils/clipboard-service';
2
- export * from '@redocly/theme/core/utils/css-variables';
3
- export * from '@redocly/theme/core/utils/add-line-numbers';
4
- export * from '@redocly/theme/core/utils/media-css';
5
- export * from '@redocly/theme/core/utils/theme-helpers';
6
- export * from '@redocly/theme/core/utils/class-names';
7
- export * from '@redocly/theme/core/utils/args-typecheck';
8
- export * from '@redocly/theme/core/utils/color';
9
- export * from '@redocly/theme/core/utils/urls';
10
- export * from '@redocly/theme/core/utils/js-utils';
11
- export * from '@redocly/theme/core/utils/tags-parser';
12
- export * from '@redocly/theme/core/utils/text-transform';
13
- export * from '@redocly/theme/core/utils/dom';
14
- export * from '@redocly/theme/core/utils/markdoc';
15
- export * from '@redocly/theme/core/utils/attribute-parser';
16
- export * from '@redocly/theme/core/utils/type-guards';
17
- export * from '@redocly/theme/core/utils/dom';
18
- export * from '@redocly/theme/core/utils/toc';
19
- export * from '@redocly/theme/core/utils/menu';
20
- export * from '@redocly/theme/core/utils/load-and-navigate';
21
- export * from '@redocly/theme/core/utils/get-scorecard-color-variable';
22
- export * from '@redocly/theme/core/utils/change-text-casing';
23
- export * from '@redocly/theme/core/utils/format-date-without-timezone';
24
- export * from '@redocly/theme/core/utils/details';
25
- export * from '@redocly/theme/core/utils/get-navbar-element';
26
- export * from '@redocly/theme/core/utils/with-load-progress';
27
- export * from '@redocly/theme/core/utils/text-trimmer';
28
- export * from '@redocly/theme/core/utils/get-code-walkthrough-file-text';
29
- export * from '@redocly/theme/core/utils/download-code-walkthrough';
30
- export * from '@redocly/theme/core/utils/get-file-icon';
31
- export * from '@redocly/theme/core/utils/match-code-walkthrough-conditions';
32
- export * from '@redocly/theme/core/utils/replace-inputs-with-value';
33
- export * from '@redocly/theme/core/utils/find-closest-common-directory';
34
- export * from '@redocly/theme/core/utils/get-user-agent';
35
- export * from '@redocly/theme/core/utils/parse-style-string';
1
+ export * from './clipboard-service';
2
+ export * from './css-variables';
3
+ export * from './add-line-numbers';
4
+ export * from './media-css';
5
+ export * from './theme-helpers';
6
+ export * from './class-names';
7
+ export * from './args-typecheck';
8
+ export * from './color';
9
+ export * from './urls';
10
+ export * from './js-utils';
11
+ export * from './tags-parser';
12
+ export * from './text-transform';
13
+ export * from './dom';
14
+ export * from './markdoc';
15
+ export * from './attribute-parser';
16
+ export * from './type-guards';
17
+ export * from './dom';
18
+ export * from './toc';
19
+ export * from './menu';
20
+ export * from './load-and-navigate';
21
+ export * from './get-scorecard-color-variable';
22
+ export * from './change-text-casing';
23
+ export * from './format-date-without-timezone';
24
+ export * from './details';
25
+ export * from './get-navbar-element';
26
+ export * from './with-load-progress';
27
+ export * from './text-trimmer';
28
+ export * from './get-code-walkthrough-file-text';
29
+ export * from './download-code-walkthrough';
30
+ export * from './get-file-icon';
31
+ export * from './match-code-walkthrough-conditions';
32
+ export * from './replace-inputs-with-value';
33
+ export * from './find-closest-common-directory';
34
+ export * from './get-user-agent';
35
+ export * from './parse-style-string';
@@ -1,6 +1,6 @@
1
1
  import type { NavigateFunction, NavigateOptions } from 'react-router-dom';
2
2
 
3
- import { withLoadProgress } from '@redocly/theme/core/utils';
3
+ import { withLoadProgress } from './with-load-progress';
4
4
 
5
5
  export type HistoryOrigin = 'pm' | 'browser';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import type { CodeWalkthroughConditionsObject } from '@redocly/config';
2
2
 
3
- import { isObject } from '@redocly/theme/core/utils';
3
+ import { isObject } from './type-guards';
4
4
 
5
5
  export function matchCodeWalkthroughConditions(
6
6
  conditions: CodeWalkthroughConditionsObject = {},
@@ -1,9 +1,10 @@
1
1
  import type { ResolvedNavItem, Version } from '@redocly/config';
2
2
  import type { Location } from 'react-router-dom';
3
3
 
4
- import { getPathnameForLocale, withoutPathPrefix, withPathPrefix } from '@redocly/theme/core/utils';
5
- import { type Locale, type TFunction, type ItemState } from '@redocly/theme/core/types';
6
- import { MenuItemType } from '@redocly/theme/core/constants';
4
+ import { type Locale, type TFunction } from '../types/l10n';
5
+ import { type ItemState } from '../types/sidebar';
6
+ import { MenuItemType } from '../constants/common';
7
+ import { getPathnameForLocale, withoutPathPrefix, withPathPrefix } from './urls';
7
8
 
8
9
  const TRANSLATION_KEYS = {
9
10
  version: 'mobileMenu.version',
@@ -1,4 +1,4 @@
1
- import type { MdHeading } from '@redocly/theme/core/types';
1
+ import type { MdHeading } from '../types/markdown';
2
2
 
3
3
  export function getDisplayedHeadings(
4
4
  headings: Array<MdHeading | null> | null | undefined,
@@ -16,9 +16,9 @@ export function isNotNull<T>(value: T): value is NonNullable<T> {
16
16
  return !isNull(value);
17
17
  }
18
18
 
19
- export const isObject = (item: unknown): item is object => {
19
+ export function isObject(item: unknown): item is object {
20
20
  return isNotNull(item) && typeof item === 'object';
21
- };
21
+ }
22
22
 
23
23
  export const isNavLinkItem = (item: ResolvedNavItem): item is ResolvedNavLinkItem => {
24
24
  return item.link !== undefined;
@@ -1,6 +1,6 @@
1
- import type { Locale } from '@redocly/theme/core/types';
1
+ import type { Locale } from '../types/l10n';
2
2
 
3
- import { DEFAULT_LOCALE_PLACEHOLDER } from '@redocly/theme/core/constants';
3
+ import { DEFAULT_LOCALE_PLACEHOLDER } from '../constants/common';
4
4
 
5
5
  export function combineUrls(baseURL: string, ...relativeURLs: (string | undefined)[]) {
6
6
  let res = baseURL;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" {...props}>
10
+ <path d="M13.625 11.375C13.2277 11.3769 12.8386 11.4878 12.5 11.6956L10.7619 9.95188C11.1663 9.38137 11.3835 8.69932 11.3835 8C11.3835 7.30068 11.1663 6.61863 10.7619 6.04813L12.5 4.30438C12.8386 4.51216 13.2277 4.62306 13.625 4.625C14.07 4.625 14.505 4.49304 14.875 4.24581C15.245 3.99857 15.5334 3.64717 15.7037 3.23604C15.874 2.8249 15.9186 2.3725 15.8318 1.93605C15.745 1.49959 15.5307 1.09868 15.216 0.784011C14.9013 0.469343 14.5004 0.255051 14.064 0.168234C13.6275 0.0814174 13.1751 0.125975 12.764 0.296272C12.3528 0.466569 12.0014 0.754957 11.7542 1.12497C11.507 1.49498 11.375 1.92999 11.375 2.375C11.3769 2.77227 11.4878 3.1614 11.6956 3.5L9.95188 5.23813C9.38137 4.83369 8.69932 4.61645 8 4.61645C7.30068 4.61645 6.61863 4.83369 6.04813 5.23813L4.30438 3.5C4.51216 3.1614 4.62306 2.77227 4.625 2.375C4.625 1.92999 4.49304 1.49498 4.24581 1.12497C3.99857 0.754957 3.64717 0.466569 3.23604 0.296272C2.8249 0.125975 2.3725 0.0814174 1.93605 0.168234C1.49959 0.255051 1.09868 0.469343 0.784011 0.784011C0.469343 1.09868 0.255051 1.49959 0.168234 1.93605C0.0814174 2.3725 0.125975 2.8249 0.296272 3.23604C0.466569 3.64717 0.754957 3.99857 1.12497 4.24581C1.49498 4.49304 1.92999 4.625 2.375 4.625C2.77227 4.62306 3.1614 4.51216 3.5 4.30438L5.23813 6.04813C4.83369 6.61863 4.61645 7.30068 4.61645 8C4.61645 8.69932 4.83369 9.38137 5.23813 9.95188L3.5 11.6956C3.1614 11.4878 2.77227 11.3769 2.375 11.375C1.92999 11.375 1.49498 11.507 1.12497 11.7542C0.754957 12.0014 0.466569 12.3528 0.296272 12.764C0.125975 13.1751 0.0814174 13.6275 0.168234 14.064C0.255051 14.5004 0.469343 14.9013 0.784011 15.216C1.09868 15.5307 1.49959 15.745 1.93605 15.8318C2.3725 15.9186 2.8249 15.874 3.23604 15.7037C3.64717 15.5334 3.99857 15.245 4.24581 14.875C4.49304 14.505 4.625 14.07 4.625 13.625C4.62306 13.2277 4.51216 12.8386 4.30438 12.5L6.04813 10.7619C6.61863 11.1663 7.30068 11.3835 8 11.3835C8.69932 11.3835 9.38137 11.1663 9.95188 10.7619L11.6956 12.5C11.4878 12.8386 11.3769 13.2277 11.375 13.625C11.375 14.07 11.507 14.505 11.7542 14.875C12.0014 15.245 12.3528 15.5334 12.764 15.7037C13.1751 15.874 13.6275 15.9186 14.064 15.8318C14.5004 15.745 14.9013 15.5307 15.216 15.216C15.5307 14.9013 15.745 14.5004 15.8318 14.064C15.9186 13.6275 15.874 13.1751 15.7037 12.764C15.5334 12.3528 15.245 12.0014 14.875 11.7542C14.505 11.507 14.07 11.375 13.625 11.375ZM13.625 1.25C13.8475 1.25 14.065 1.31598 14.25 1.4396C14.435 1.56321 14.5792 1.73892 14.6644 1.94448C14.7495 2.15005 14.7718 2.37625 14.7284 2.59448C14.685 2.81271 14.5778 3.01316 14.4205 3.1705C14.2632 3.32783 14.0627 3.43498 13.8445 3.47838C13.6262 3.52179 13.4 3.49951 13.1945 3.41437C12.9889 3.32922 12.8132 3.18502 12.6896 3.00002C12.566 2.81501 12.5 2.59751 12.5 2.375C12.5 2.07663 12.6185 1.79048 12.8295 1.57951C13.0405 1.36853 13.3266 1.25 13.625 1.25ZM1.25 2.375C1.25 2.1525 1.31598 1.93499 1.4396 1.74998C1.56321 1.56498 1.73892 1.42078 1.94448 1.33564C2.15005 1.25049 2.37625 1.22821 2.59448 1.27162C2.81271 1.31503 3.01316 1.42217 3.1705 1.57951C3.32783 1.73684 3.43498 1.9373 3.47838 2.15552C3.52179 2.37375 3.49951 2.59995 3.41437 2.80552C3.32922 3.01109 3.18502 3.18679 3.00002 3.3104C2.81501 3.43402 2.59751 3.5 2.375 3.5C2.07663 3.5 1.79048 3.38147 1.57951 3.1705C1.36853 2.95952 1.25 2.67337 1.25 2.375ZM2.375 14.75C2.1525 14.75 1.93499 14.684 1.74998 14.5604C1.56498 14.4368 1.42078 14.2611 1.33564 14.0555C1.25049 13.85 1.22821 13.6238 1.27162 13.4055C1.31503 13.1873 1.42217 12.9868 1.57951 12.8295C1.73684 12.6722 1.9373 12.565 2.15552 12.5216C2.37375 12.4782 2.59995 12.5005 2.80552 12.5856C3.01109 12.6708 3.18679 12.815 3.3104 13C3.43402 13.185 3.5 13.4025 3.5 13.625C3.5 13.9234 3.38147 14.2095 3.1705 14.4205C2.95952 14.6315 2.67337 14.75 2.375 14.75ZM8 10.25C7.55499 10.25 7.11998 10.118 6.74997 9.87081C6.37996 9.62357 6.09157 9.27217 5.92127 8.86104C5.75097 8.4499 5.70642 7.99751 5.79323 7.56105C5.88005 7.12459 6.09434 6.72368 6.40901 6.40901C6.72368 6.09434 7.12459 5.88005 7.56105 5.79323C7.99751 5.70642 8.4499 5.75097 8.86104 5.92127C9.27217 6.09157 9.62357 6.37996 9.87081 6.74997C10.118 7.11998 10.25 7.55499 10.25 8C10.25 8.59674 10.0129 9.16903 9.59099 9.59099C9.16903 10.0129 8.59674 10.25 8 10.25ZM13.625 14.75C13.4025 14.75 13.185 14.684 13 14.5604C12.815 14.4368 12.6708 14.2611 12.5856 14.0555C12.5005 13.85 12.4782 13.6238 12.5216 13.4055C12.565 13.1873 12.6722 12.9868 12.8295 12.8295C12.9868 12.6722 13.1873 12.565 13.4055 12.5216C13.6238 12.4782 13.85 12.5005 14.0555 12.5856C14.2611 12.6708 14.4368 12.815 14.5604 13C14.684 13.185 14.75 13.4025 14.75 13.625C14.75 13.9234 14.6315 14.2095 14.4205 14.4205C14.2095 14.6315 13.9234 14.75 13.625 14.75Z" />
11
+ </svg>
12
+ );
13
+
14
+ export const MoleculesIcon = styled(Icon).attrs(() => ({
15
+ 'data-component-name': 'icons/MoleculesIcon/MoleculesIcon',
16
+ }))<IconProps>`
17
+ path {
18
+ fill: ${({ color }) => getCssColorVariable(color)};
19
+ }
20
+
21
+ height: ${({ size }) => size || '16px'};
22
+ width: ${({ size }) => size || '16px'};
23
+ `;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ width="18"
12
+ height="18"
13
+ viewBox="0 0 18 18"
14
+ fill="none"
15
+ {...props}
16
+ >
17
+ <rect width="18" height="18" />
18
+ <path d="M16.3125 13.6036V4.39644C16.9659 4.16323 17.4375 3.54471 17.4375 2.8125C17.4375 1.88196 16.6805 1.125 15.75 1.125C14.8195 1.125 14.0625 1.88196 14.0625 2.8125C14.0625 3.03278 14.1078 3.2418 14.1847 3.43462L9 7.97141L3.81527 3.43485C3.89233 3.24174 3.9375 3.03278 3.9375 2.8125C3.9375 1.88196 3.18054 1.125 2.25 1.125C1.31946 1.125 0.5625 1.88196 0.5625 2.8125C0.5625 3.54476 1.0341 4.16329 1.6875 4.39616V13.6038C1.0341 13.8367 0.5625 14.4552 0.5625 15.1874C0.5625 16.118 1.31946 16.8749 2.25 16.8749C3.18054 16.8749 3.9375 16.118 3.9375 15.1874C3.9375 14.8125 3.81049 14.4692 3.6027 14.1888L6.60279 11.5636L7.93283 13.8911C7.55724 14.2009 7.3125 14.6636 7.3125 15.1874C7.3125 16.118 8.06946 16.8749 9 16.8749C9.93054 16.8749 10.6875 16.118 10.6875 15.1874C10.6875 14.6636 10.4426 14.2009 10.0672 13.8911L11.3972 11.5636L14.3973 14.1888C14.1895 14.4692 14.0625 14.8125 14.0625 15.1874C14.0625 16.118 14.8195 16.8749 15.75 16.8749C16.6805 16.8749 17.4375 16.118 17.4375 15.1874C17.4375 14.4552 16.9659 13.8367 16.3125 13.6036ZM15.75 2.25C16.0602 2.25 16.3125 2.50239 16.3125 2.8125C16.3125 3.12261 16.0602 3.375 15.75 3.375C15.4398 3.375 15.1875 3.12261 15.1875 2.8125C15.1875 2.50239 15.4398 2.25 15.75 2.25ZM13.6001 5.44101L11.1028 9.81135L9.85421 8.71875L13.6001 5.44101ZM8.14584 8.71875L6.89709 9.81135L4.39976 5.44101L8.14584 8.71875ZM2.25 2.25C2.56022 2.25 2.8125 2.50239 2.8125 2.8125C2.8125 3.12261 2.56022 3.375 2.25 3.375C1.93978 3.375 1.6875 3.12261 1.6875 2.8125C1.6875 2.50239 1.93978 2.25 2.25 2.25ZM2.25 15.75C1.93978 15.75 1.6875 15.4976 1.6875 15.1875C1.6875 14.8774 1.93978 14.625 2.25 14.625C2.56022 14.625 2.8125 14.8774 2.8125 15.1875C2.8125 15.4976 2.56022 15.75 2.25 15.75ZM2.8125 13.3855V4.93065L6.03343 10.5672L2.8125 13.3855ZM9 15.75C8.68978 15.75 8.4375 15.4976 8.4375 15.1875C8.4375 14.8774 8.68978 14.625 9 14.625C9.31022 14.625 9.5625 14.8774 9.5625 15.1875C9.5625 15.4976 9.31022 15.75 9 15.75ZM9 13.4915L7.46657 10.8078L9 9.46609L10.5334 10.8078L9 13.4915ZM15.1875 4.93042V13.3855L11.9666 10.5672L15.1875 4.93042ZM15.75 15.7501C15.4398 15.7501 15.1875 15.4977 15.1875 15.1876C15.1875 14.8774 15.4398 14.6251 15.75 14.6251C16.0602 14.6251 16.3125 14.8774 16.3125 15.1876C16.3125 15.4977 16.0602 15.7501 15.75 15.7501Z" />
19
+ </svg>
20
+ );
21
+
22
+ export const NetworkIcon = styled(Icon).attrs(() => ({
23
+ 'data-component-name': 'icons/NetworkIcon/NetworkIcon',
24
+ }))<IconProps>`
25
+ path {
26
+ fill: ${({ color }) => getCssColorVariable(color)};
27
+ }
28
+
29
+ height: ${({ size }) => size || '16px'};
30
+ width: ${({ size }) => size || '16px'};
31
+ `;
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import type { IconProps } from '@redocly/theme/icons/types';
5
+
6
+ import { getCssColorVariable } from '@redocly/theme/core/utils';
7
+
8
+ const Icon = (props: IconProps) => (
9
+ <svg
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ width="18"
12
+ height="18"
13
+ viewBox="0 0 18 18"
14
+ fill="none"
15
+ {...props}
16
+ >
17
+ <path d="M15.25 5.875H10.25V7.125H15.25V5.875Z" fill="currentColor" />
18
+ <path d="M7.75 10.875H2.75V12.125H7.75V10.875Z" fill="currentColor" />
19
+ <path
20
+ d="M5.25 9C4.75555 9 4.2722 8.85338 3.86107 8.57867C3.44995 8.30397 3.12952 7.91352 2.9403 7.45671C2.75108 6.99989 2.70157 6.49723 2.79804 6.01227C2.8945 5.52732 3.1326 5.08186 3.48223 4.73223C3.83186 4.3826 4.27732 4.1445 4.76227 4.04804C5.24723 3.95157 5.74989 4.00108 6.20671 4.1903C6.66352 4.37952 7.05397 4.69995 7.32867 5.11107C7.60338 5.5222 7.75 6.00555 7.75 6.5C7.74926 7.16281 7.48562 7.79826 7.01694 8.26694C6.54826 8.73562 5.91281 8.99926 5.25 9ZM5.25 5.25C5.00277 5.25 4.7611 5.32331 4.55554 5.46066C4.34998 5.59801 4.18976 5.79324 4.09515 6.02165C4.00054 6.25005 3.97579 6.50139 4.02402 6.74386C4.07225 6.98634 4.1913 7.20907 4.36612 7.38388C4.54093 7.5587 4.76366 7.67775 5.00614 7.72598C5.24861 7.77421 5.49995 7.74946 5.72835 7.65485C5.95676 7.56024 6.15199 7.40002 6.28934 7.19446C6.42669 6.9889 6.5 6.74723 6.5 6.5C6.49967 6.16858 6.36787 5.85083 6.13352 5.61648C5.89917 5.38213 5.58142 5.25033 5.25 5.25Z"
21
+ fill="currentColor"
22
+ />
23
+ <path
24
+ d="M12.75 14C12.2555 14 11.7722 13.8534 11.3611 13.5787C10.95 13.304 10.6295 12.9135 10.4403 12.4567C10.2511 11.9999 10.2016 11.4972 10.298 11.0123C10.3945 10.5273 10.6326 10.0819 10.9822 9.73223C11.3319 9.3826 11.7773 9.1445 12.2623 9.04804C12.7472 8.95157 13.2499 9.00108 13.7067 9.1903C14.1635 9.37952 14.554 9.69995 14.8287 10.1111C15.1034 10.5222 15.25 11.0055 15.25 11.5C15.2493 12.1628 14.9856 12.7983 14.5169 13.2669C14.0483 13.7356 13.4128 13.9993 12.75 14ZM12.75 10.25C12.5028 10.25 12.2611 10.3233 12.0555 10.4607C11.85 10.598 11.6898 10.7932 11.5951 11.0216C11.5005 11.2501 11.4758 11.5014 11.524 11.7439C11.5723 11.9863 11.6913 12.2091 11.8661 12.3839C12.0409 12.5587 12.2637 12.6777 12.5061 12.726C12.7486 12.7742 12.9999 12.7495 13.2284 12.6549C13.4568 12.5602 13.652 12.4 13.7893 12.1945C13.9267 11.9889 14 11.7472 14 11.5C13.9997 11.1686 13.8679 10.8508 13.6335 10.6165C13.3992 10.3821 13.0814 10.2503 12.75 10.25Z"
25
+ fill="currentColor"
26
+ />
27
+ <path
28
+ d="M16.5 17.75H1.5C1.16859 17.7497 0.850846 17.6178 0.6165 17.3835C0.382155 17.1492 0.250347 16.8314 0.25 16.5V1.5C0.250347 1.16859 0.382155 0.850846 0.6165 0.6165C0.850846 0.382155 1.16859 0.250347 1.5 0.25H16.5C16.8314 0.250347 17.1492 0.382155 17.3835 0.6165C17.6178 0.850846 17.7497 1.16859 17.75 1.5V16.5C17.7497 16.8314 17.6178 17.1492 17.3835 17.3835C17.1492 17.6178 16.8314 17.7497 16.5 17.75ZM1.5 1.5V16.5H16.5V1.5H1.5Z"
29
+ fill="currentColor"
30
+ />
31
+ </svg>
32
+ );
33
+
34
+ export const NotesIcon = styled(Icon).attrs(() => ({
35
+ 'data-component-name': 'icons/NotesIcon/NotesIcon',
36
+ }))<IconProps>`
37
+ path {
38
+ fill: ${({ color }) => getCssColorVariable(color)};
39
+ }
40
+
41
+ height: ${({ size }) => size || '16px'};
42
+ width: ${({ size }) => size || '16px'};
43
+ `;
@@ -67,6 +67,7 @@ export function TabList({
67
67
  }}
68
68
  onKeyDown={(event) => handleKeyboard(event, index)}
69
69
  onClick={() => {
70
+ child.props.onClick?.();
70
71
  onTabClick(label);
71
72
  }}
72
73
  />