@redocly/theme 0.61.0 → 0.62.0-custom.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 (199) hide show
  1. package/lib/components/Admonition/Admonition.js +14 -18
  2. package/lib/components/Admonition/variables.dark.d.ts +1 -0
  3. package/lib/components/Admonition/variables.dark.js +18 -0
  4. package/lib/components/Admonition/variables.js +24 -28
  5. package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.d.ts +1 -0
  6. package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.js +12 -0
  7. package/lib/components/Badge/Badge.d.ts +2 -1
  8. package/lib/components/Badge/Badge.js +24 -2
  9. package/lib/components/Banner/Banner.js +19 -1
  10. package/lib/components/Banner/variables.js +1 -0
  11. package/lib/components/Breadcrumbs/Breadcrumb.js +1 -1
  12. package/lib/components/Breadcrumbs/BreadcrumbDropdown.js +9 -6
  13. package/lib/components/Breadcrumbs/Breadcrumbs.js +24 -15
  14. package/lib/components/Buttons/AIAssistantButton.js +7 -4
  15. package/lib/components/Catalog/CatalogEntities.js +10 -8
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +2 -2
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +5 -3
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +13 -11
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +7 -5
  21. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +9 -7
  22. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +1 -1
  23. package/lib/components/Catalog/CatalogTagsWithTooltip.js +2 -2
  24. package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -1
  25. package/lib/components/CodeBlock/CodeBlockControls.js +8 -6
  26. package/lib/components/Filter/FilterCheckboxes.js +1 -1
  27. package/lib/components/JsonViewer/JsonViewer.js +2 -2
  28. package/lib/components/JsonViewer/{Helpers.js → helpers.js} +2 -1
  29. package/lib/components/LanguagePicker/LanguagePicker.js +1 -1
  30. package/lib/components/Markdown/Markdown.js +2 -2
  31. package/lib/components/Menu/MenuItem.js +41 -15
  32. package/lib/components/Navbar/NavbarItem.js +1 -1
  33. package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.d.ts +1 -0
  34. package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.js +12 -0
  35. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +1 -0
  36. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +6 -0
  37. package/lib/components/PageActions/PageActions.js +25 -8
  38. package/lib/components/Search/SearchAiDialog.d.ts +4 -2
  39. package/lib/components/Search/SearchAiDialog.js +23 -4
  40. package/lib/components/Search/SearchAiMessage.d.ts +4 -2
  41. package/lib/components/Search/SearchAiMessage.js +82 -23
  42. package/lib/components/Search/SearchDialog.js +50 -25
  43. package/lib/components/Select/variables.js +2 -2
  44. package/lib/components/SvgViewer/SvgViewer.d.ts +15 -0
  45. package/lib/components/SvgViewer/SvgViewer.js +312 -0
  46. package/lib/components/SvgViewer/variables.d.ts +1 -0
  47. package/lib/components/SvgViewer/variables.dark.d.ts +1 -0
  48. package/lib/components/SvgViewer/variables.dark.js +8 -0
  49. package/lib/components/SvgViewer/variables.js +17 -0
  50. package/lib/components/Tag/Tag.js +1 -1
  51. package/lib/components/Tag/variables.dark.js +6 -0
  52. package/lib/components/Tag/variables.js +6 -0
  53. package/lib/components/Tooltip/Tooltip.d.ts +2 -3
  54. package/lib/components/Tooltip/Tooltip.js +66 -113
  55. package/lib/components/Tooltip/variables.dark.js +4 -0
  56. package/lib/components/Tooltip/variables.js +3 -3
  57. package/lib/components/UserMenu/LoginButton.d.ts +8 -2
  58. package/lib/components/UserMenu/LoginButton.js +4 -3
  59. package/lib/core/constants/search.d.ts +5 -1
  60. package/lib/core/constants/search.js +24 -1
  61. package/lib/core/hooks/search/use-search-dialog.js +2 -2
  62. package/lib/core/hooks/use-color-switcher.d.ts +1 -0
  63. package/lib/core/hooks/use-color-switcher.js +8 -1
  64. package/lib/core/hooks/use-mcp-config.js +2 -1
  65. package/lib/core/hooks/use-modal-scroll-lock.js +24 -10
  66. package/lib/core/hooks/use-outside-click.d.ts +3 -1
  67. package/lib/core/hooks/use-outside-click.js +8 -4
  68. package/lib/core/hooks/use-page-actions.d.ts +1 -1
  69. package/lib/core/hooks/use-page-actions.js +44 -11
  70. package/lib/core/hooks/use-product-picker.js +1 -1
  71. package/lib/core/hooks/use-unique-svg-ids.d.ts +6 -0
  72. package/lib/core/hooks/use-unique-svg-ids.js +15 -0
  73. package/lib/core/openapi/index.d.ts +1 -0
  74. package/lib/core/openapi/index.js +3 -1
  75. package/lib/core/styles/dark.js +4 -0
  76. package/lib/core/styles/global.js +31 -15
  77. package/lib/core/types/catalog.d.ts +1 -1
  78. package/lib/core/types/hooks.d.ts +23 -2
  79. package/lib/core/types/l10n.d.ts +1 -1
  80. package/lib/core/types/search.d.ts +24 -0
  81. package/lib/core/types/search.js +9 -1
  82. package/lib/core/utils/content-segments.d.ts +2 -0
  83. package/lib/core/utils/content-segments.js +22 -0
  84. package/lib/core/utils/index.d.ts +1 -0
  85. package/lib/core/utils/index.js +1 -0
  86. package/lib/core/utils/transform-revisions-to-version-history.js +8 -51
  87. package/lib/ext/process-scorecard.d.ts +5 -0
  88. package/lib/ext/process-scorecard.js +11 -0
  89. package/lib/icons/FitToViewIcon/FitToViewIcon.d.ts +9 -0
  90. package/lib/icons/FitToViewIcon/FitToViewIcon.js +25 -0
  91. package/lib/icons/WarningCycleIcon/WarningCycleIcon.d.ts +9 -0
  92. package/lib/icons/WarningCycleIcon/WarningCycleIcon.js +24 -0
  93. package/lib/index.d.ts +9 -0
  94. package/lib/index.js +9 -0
  95. package/lib/layouts/DocumentationLayout.js +4 -25
  96. package/lib/layouts/DocumentationLayoutBottom.d.ts +11 -0
  97. package/lib/layouts/DocumentationLayoutBottom.js +28 -0
  98. package/lib/layouts/DocumentationLayoutTop.d.ts +13 -0
  99. package/lib/layouts/DocumentationLayoutTop.js +33 -0
  100. package/lib/layouts/Forbidden.js +22 -18
  101. package/lib/markdoc/components/Cards/Card.js +1 -0
  102. package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
  103. package/lib/markdoc/components/Heading/Heading.js +40 -2
  104. package/lib/markdoc/components/LoginButton/LoginButton.d.ts +9 -0
  105. package/lib/markdoc/components/LoginButton/LoginButton.js +48 -0
  106. package/lib/markdoc/components/Mermaid/Mermaid.js +70 -2
  107. package/lib/markdoc/components/default.d.ts +1 -0
  108. package/lib/markdoc/components/default.js +1 -0
  109. package/lib/markdoc/default.d.ts +6 -0
  110. package/lib/markdoc/default.js +2 -0
  111. package/lib/markdoc/tags/login-button.d.ts +2 -0
  112. package/lib/markdoc/tags/login-button.js +32 -0
  113. package/package.json +9 -9
  114. package/src/components/Admonition/Admonition.tsx +14 -18
  115. package/src/components/Admonition/variables.dark.ts +15 -0
  116. package/src/components/Admonition/variables.ts +24 -28
  117. package/src/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.tsx +10 -0
  118. package/src/components/Badge/Badge.tsx +18 -2
  119. package/src/components/Banner/Banner.tsx +23 -1
  120. package/src/components/Banner/variables.ts +1 -0
  121. package/src/components/Breadcrumbs/Breadcrumb.tsx +3 -3
  122. package/src/components/Breadcrumbs/BreadcrumbDropdown.tsx +11 -8
  123. package/src/components/Breadcrumbs/Breadcrumbs.tsx +24 -15
  124. package/src/components/Buttons/AIAssistantButton.tsx +7 -4
  125. package/src/components/Catalog/CatalogEntities.tsx +10 -8
  126. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +1 -1
  127. package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +7 -4
  128. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +1 -1
  129. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +13 -11
  130. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +7 -5
  131. package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +9 -7
  132. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +1 -2
  133. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +9 -5
  134. package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +3 -1
  135. package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
  136. package/src/components/Filter/FilterCheckboxes.tsx +1 -1
  137. package/src/components/JsonViewer/JsonViewer.tsx +1 -2
  138. package/src/components/JsonViewer/{Helpers.tsx → helpers.tsx} +1 -0
  139. package/src/components/LanguagePicker/LanguagePicker.tsx +1 -1
  140. package/src/components/Markdown/Markdown.tsx +2 -2
  141. package/src/components/Menu/MenuItem.tsx +61 -16
  142. package/src/components/Navbar/NavbarItem.tsx +3 -1
  143. package/src/components/OpenApiDocs/hooks/AdditionalOverviewInfo.tsx +10 -0
  144. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +2 -0
  145. package/src/components/PageActions/PageActions.tsx +38 -15
  146. package/src/components/Search/SearchAiDialog.tsx +31 -2
  147. package/src/components/Search/SearchAiMessage.tsx +103 -17
  148. package/src/components/Search/SearchDialog.tsx +70 -37
  149. package/src/components/Select/variables.ts +2 -2
  150. package/src/components/SvgViewer/SvgViewer.tsx +405 -0
  151. package/src/components/SvgViewer/variables.dark.ts +5 -0
  152. package/src/components/SvgViewer/variables.ts +14 -0
  153. package/src/components/Tag/Tag.tsx +2 -1
  154. package/src/components/Tag/variables.dark.ts +6 -0
  155. package/src/components/Tag/variables.ts +6 -0
  156. package/src/components/Tooltip/Tooltip.tsx +77 -120
  157. package/src/components/Tooltip/variables.dark.ts +4 -0
  158. package/src/components/Tooltip/variables.ts +3 -3
  159. package/src/components/UserMenu/LoginButton.tsx +23 -8
  160. package/src/core/constants/search.ts +27 -1
  161. package/src/core/hooks/__mocks__/use-theme-hooks.ts +10 -1
  162. package/src/core/hooks/search/use-search-dialog.ts +2 -2
  163. package/src/core/hooks/use-color-switcher.ts +10 -2
  164. package/src/core/hooks/use-mcp-config.ts +2 -1
  165. package/src/core/hooks/use-modal-scroll-lock.ts +29 -10
  166. package/src/core/hooks/use-outside-click.ts +16 -5
  167. package/src/core/hooks/use-page-actions.ts +66 -25
  168. package/src/core/hooks/use-product-picker.ts +1 -1
  169. package/src/core/hooks/use-unique-svg-ids.ts +12 -0
  170. package/src/core/openapi/index.ts +1 -0
  171. package/src/core/styles/dark.ts +4 -0
  172. package/src/core/styles/global.ts +31 -15
  173. package/src/core/types/catalog.ts +1 -1
  174. package/src/core/types/hooks.ts +29 -1
  175. package/src/core/types/l10n.ts +12 -1
  176. package/src/core/types/search.ts +19 -0
  177. package/src/core/utils/content-segments.ts +27 -0
  178. package/src/core/utils/index.ts +1 -0
  179. package/src/core/utils/transform-revisions-to-version-history.ts +8 -80
  180. package/src/ext/process-scorecard.ts +14 -0
  181. package/src/icons/FitToViewIcon/FitToViewIcon.tsx +26 -0
  182. package/src/icons/WarningCycleIcon/WarningCycleIcon.tsx +32 -0
  183. package/src/index.ts +9 -0
  184. package/src/layouts/DocumentationLayout.tsx +4 -30
  185. package/src/layouts/DocumentationLayoutBottom.tsx +42 -0
  186. package/src/layouts/DocumentationLayoutTop.tsx +52 -0
  187. package/src/layouts/Forbidden.tsx +36 -21
  188. package/src/markdoc/components/Cards/Card.tsx +1 -0
  189. package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +1 -1
  190. package/src/markdoc/components/Heading/Heading.tsx +52 -4
  191. package/src/markdoc/components/LoginButton/LoginButton.tsx +38 -0
  192. package/src/markdoc/components/Mermaid/Mermaid.tsx +57 -8
  193. package/src/markdoc/components/default.ts +1 -0
  194. package/src/markdoc/default.ts +2 -0
  195. package/src/markdoc/tags/login-button.ts +30 -0
  196. package/lib/components/Tooltip/TooltipWrapper.d.ts +0 -12
  197. package/lib/components/Tooltip/TooltipWrapper.js +0 -34
  198. package/src/components/Tooltip/TooltipWrapper.tsx +0 -70
  199. /package/lib/components/JsonViewer/{Helpers.d.ts → helpers.d.ts} +0 -0
@@ -23,6 +23,7 @@ import { toggle } from '../markdoc/tags/code-toggle';
23
23
  import { codeGroup } from '../markdoc/tags/code-group';
24
24
  import { icon } from '../markdoc/tags/icon';
25
25
  import { connectMcp } from '../markdoc/tags/connect-mcp';
26
+ import { loginButton } from '../markdoc/tags/login-button';
26
27
  export declare const tags: {
27
28
  [admonition.tagName]: import("@markdoc/markdoc").Schema & {
28
29
  attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
@@ -119,4 +120,9 @@ export declare const tags: {
119
120
  resolver?: string;
120
121
  }>;
121
122
  };
123
+ [loginButton.tagName]: import("@markdoc/markdoc").Schema & {
124
+ attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
125
+ resolver?: string;
126
+ }>;
127
+ };
122
128
  };
@@ -65,6 +65,7 @@ const code_toggle_1 = require("../markdoc/tags/code-toggle");
65
65
  const code_group_1 = require("../markdoc/tags/code-group");
66
66
  const icon_1 = require("../markdoc/tags/icon");
67
67
  const connect_mcp_1 = require("../markdoc/tags/connect-mcp");
68
+ const login_button_1 = require("../markdoc/tags/login-button");
68
69
  exports.tags = {
69
70
  [admonition_1.admonition.tagName]: admonition_1.admonition.schema,
70
71
  [debug_1.debug.tagName]: debug_1.debug.schema,
@@ -85,5 +86,6 @@ exports.tags = {
85
86
  [code_group_1.codeGroup.tagName]: code_group_1.codeGroup.schema,
86
87
  [icon_1.icon.tagName]: icon_1.icon.schema,
87
88
  [connect_mcp_1.connectMcp.tagName]: connect_mcp_1.connectMcp.schema,
89
+ [login_button_1.loginButton.tagName]: login_button_1.loginButton.schema,
88
90
  };
89
91
  //# sourceMappingURL=default.js.map
@@ -0,0 +1,2 @@
1
+ import type { MarkdocSchemaWrapper } from '../../markdoc/tags/types';
2
+ export declare const loginButton: MarkdocSchemaWrapper;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loginButton = void 0;
4
+ exports.loginButton = {
5
+ schema: {
6
+ render: 'LoginButton',
7
+ attributes: {
8
+ variant: {
9
+ type: String,
10
+ default: 'primary',
11
+ matches: ['primary', 'secondary', 'outlined', 'text', 'link', 'ghost'],
12
+ },
13
+ size: {
14
+ type: String,
15
+ default: 'medium',
16
+ matches: ['small', 'medium', 'large'],
17
+ },
18
+ label: {
19
+ type: String,
20
+ description: 'Custom button label text. Overrides translation.',
21
+ },
22
+ labelTranslationKey: {
23
+ type: String,
24
+ default: 'userMenu.login',
25
+ description: 'Translation key for the button label.',
26
+ },
27
+ },
28
+ selfClosing: true,
29
+ },
30
+ tagName: 'login-button',
31
+ };
32
+ //# sourceMappingURL=login-button.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.61.0",
3
+ "version": "0.62.0-custom.0",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -29,14 +29,14 @@
29
29
  "@markdoc/markdoc": "0.5.2",
30
30
  "lodash.debounce": "^4.0.8",
31
31
  "lodash.throttle": "^4.1.1",
32
- "react": "19.2.3",
33
- "react-dom": "19.2.3",
34
- "react-router-dom": "^6.21.1",
32
+ "react": "^19.2.4",
33
+ "react-dom": "^19.2.4",
34
+ "react-router-dom": "^6.30.3",
35
35
  "styled-components": "^4.1.1 || ^5.3.11 || ^6.0.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@markdoc/markdoc": "0.5.2",
39
- "@shikijs/types": "1.24.2",
39
+ "@shikijs/types": "3.21.0",
40
40
  "@testing-library/react": "16.3.0",
41
41
  "@testing-library/user-event": "14.6.1",
42
42
  "@types/file-saver": "2.0.7",
@@ -51,7 +51,7 @@
51
51
  "@vitest/coverage-v8": "4.0.10",
52
52
  "@vitest/ui": "3.2.4",
53
53
  "concurrently": "7.6.0",
54
- "react-router-dom": "^6.21.1",
54
+ "react-router-dom": "^6.30.3",
55
55
  "resize-observer-polyfill": "1.5.1",
56
56
  "rimraf": "5.0.7",
57
57
  "styled-components": "5.3.11",
@@ -63,7 +63,7 @@
63
63
  "vitest": "4.0.10",
64
64
  "vitest-when": "0.6.2",
65
65
  "webpack": "5.94.0",
66
- "@redocly/realm-asyncapi-sdk": "0.7.0"
66
+ "@redocly/realm-asyncapi-sdk": "0.9.0-next.0"
67
67
  },
68
68
  "dependencies": {
69
69
  "@tanstack/react-query": "5.62.3",
@@ -81,14 +81,14 @@
81
81
  "openapi-sampler": "1.6.2",
82
82
  "react-calendar": "5.1.0",
83
83
  "react-date-picker": "11.0.0",
84
- "@redocly/config": "0.41.2"
84
+ "@redocly/config": "0.43.0-custom.0"
85
85
  },
86
86
  "scripts": {
87
87
  "watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
88
88
  "ts:check": "tsc --noEmit --skipLibCheck",
89
89
  "clean": "rimraf lib",
90
90
  "compile": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
91
- "build": "npm run clean && npm run compile",
91
+ "build": "pnpm run clean && pnpm run compile",
92
92
  "test": "vitest run",
93
93
  "test:update": "vitest run --update",
94
94
  "test:watch": "vitest",
@@ -3,10 +3,10 @@ import styled, { css } from 'styled-components';
3
3
 
4
4
  import type { FC, JSX } from 'react';
5
5
 
6
- import { WarningFilledIcon } from '@redocly/theme/icons/WarningFilledIcon/WarningFilledIcon';
7
- import { CheckmarkFilledIcon } from '@redocly/theme/icons/CheckmarkFilledIcon/CheckmarkFilledIcon';
8
- import { CloseFilledIcon } from '@redocly/theme/icons/CloseFilledIcon/CloseFilledIcon';
9
- import { InformationFilledIcon } from '@redocly/theme/icons/InformationFilledIcon/InformationFilledIcon';
6
+ import { WarningCycleIcon } from '@redocly/theme/icons/WarningCycleIcon/WarningCycleIcon';
7
+ import { CheckmarkOutlineIcon } from '@redocly/theme/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon';
8
+ import { ErrorIcon } from '@redocly/theme/icons/ErrorIcon/ErrorIcon';
9
+ import { InformationIcon } from '@redocly/theme/icons/InformationIcon/InformationIcon';
10
10
 
11
11
  type AdmonitionTypeProps = {
12
12
  type: 'warning' | 'success' | 'danger' | 'info';
@@ -20,10 +20,10 @@ export type AdmonitionProps = Partial<AdmonitionTypeProps> & {
20
20
  };
21
21
 
22
22
  const IconsMap: Record<AdmonitionTypeProps['type'], FC<{ color?: string }>> = {
23
- warning: WarningFilledIcon,
24
- success: CheckmarkFilledIcon,
25
- danger: CloseFilledIcon,
26
- info: InformationFilledIcon,
23
+ warning: WarningCycleIcon,
24
+ success: CheckmarkOutlineIcon,
25
+ danger: ErrorIcon,
26
+ info: InformationIcon,
27
27
  };
28
28
 
29
29
  export function Admonition({
@@ -65,9 +65,9 @@ const Content = styled.div`
65
65
  const AdmonitionWrapper = styled.div<AdmonitionTypeProps>`
66
66
  display: flex;
67
67
  flex-direction: row;
68
- gap: var(--spacing-base);
69
- margin: var(--admonition-margin-vertical) var(--admonition-margin-horizontal);
70
- padding: var(--admonition-padding-vertical-xs) var(--admonition-padding-horizontal);
68
+ gap: var(--admonition-gap);
69
+ margin: var(--admonition-margin);
70
+ padding: var(--admonition-padding);
71
71
  border-radius: var(--admonition-border-radius);
72
72
  font-size: var(--admonition-font-size);
73
73
  font-weight: var(--admonition-font-weight);
@@ -79,17 +79,12 @@ const AdmonitionWrapper = styled.div<AdmonitionTypeProps>`
79
79
  ${({ type }) => css`
80
80
  background-color: var(--admonition-${type}-bg-color);
81
81
  color: var(--admonition-${type}-text-color);
82
- border-left: var(--admonition-${type}-border);
82
+ border: var(--admonition-${type}-border);
83
83
  `};
84
84
 
85
- &:has(${Content}) {
86
- padding: var(--admonition-padding-vertical-md) var(--admonition-padding-horizontal);
87
- }
88
-
89
85
  &:not(:has(${Content})) {
90
86
  --admonition-heading-font-size: var(--admonition-font-size);
91
87
  --admonition-heading-line-height: var(--admonition-line-height);
92
- --admonition-icon-size: 16px;
93
88
 
94
89
  align-items: center;
95
90
  gap: calc(var(--spacing-xxs) * 1.5);
@@ -99,6 +94,7 @@ const AdmonitionWrapper = styled.div<AdmonitionTypeProps>`
99
94
  width: var(--admonition-icon-size);
100
95
  height: var(--admonition-icon-size);
101
96
  flex-shrink: 0;
97
+ margin: var(--admonition-icon-margin);
102
98
 
103
99
  fill: ${({ type }) => `var(--admonition-${type}-icon-color)`};
104
100
 
@@ -112,7 +108,7 @@ const AdmonitionWrapper = styled.div<AdmonitionTypeProps>`
112
108
  const TextContainer = styled.div`
113
109
  display: flex;
114
110
  flex-direction: column;
115
- gap: var(--spacing-unit);
111
+ gap: var(--admonition-text-gap);
116
112
  width: 100%;
117
113
  `;
118
114
 
@@ -0,0 +1,15 @@
1
+ import { css } from "styled-components";
2
+
3
+ export const admonitionDarkMode = css`
4
+ --admonition-info-bg-color: color-mix(in srgb, var(--color-blue-1) 40%, transparent); // @presenter Color
5
+ --admonition-info-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-blue-3) 40%, transparent); // @presenter Border
6
+
7
+ --admonition-warning-bg-color: color-mix(in srgb, var(--color-carrot-1) 40%, transparent); // @presenter Color
8
+ --admonition-warning-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-carrot-3) 40%, transparent); // @presenter Border
9
+
10
+ --admonition-danger-bg-color: color-mix(in srgb, var(--color-raspberry-1) 40%, transparent); // @presenter Color
11
+ --admonition-danger-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-raspberry-3) 40%, transparent); // @presenter Border
12
+
13
+ --admonition-success-bg-color: color-mix(in srgb, var(--color-green-1) 40%, transparent); // @presenter Color
14
+ --admonition-success-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-green-3) 40%, transparent); // @presenter Border
15
+ `;
@@ -10,23 +10,23 @@ export const admonition = css`
10
10
  --admonition-font-size: var(--font-size-base); // @presenter FontSize
11
11
  --admonition-font-weight: var(--font-weight-regular); // @presenter FontWeight
12
12
  --admonition-line-height: var(--line-height-base); // @presenter LineHeight
13
- --admonition-heading-font-size: var(--font-size-lg); // @presenter FontSize
14
- --admonition-heading-font-weight: var(--font-weight-regular); // @presenter FontWeight
15
- --admonition-heading-line-height: var(--line-height-lg); // @presenter LineHeight
16
- --admonition-heading-letter-spacing: 0.3px; // @presenter LetterSpacing
13
+ --admonition-heading-font-size: var(--font-size-base); // @presenter FontSize
14
+ --admonition-heading-font-weight: var(--font-weight-semibold); // @presenter FontWeight
15
+ --admonition-heading-line-height: var(--line-height-base); // @presenter LineHeight
16
+ --admonition-heading-letter-spacing: 0; // @presenter LetterSpacing
17
17
  --admonition-heading-transform: none;
18
-
18
+ --admonition-heading-text-color: var(--color-warm-grey-11); // @presenter Color
19
19
  /**
20
20
  * @tokens Admonition spacing
21
21
  * @presenter Spacing
22
22
  */
23
23
 
24
- --admonition-margin-horizontal: 0;
25
- --admonition-margin-vertical: var(--spacing-lg);
26
- --admonition-padding-horizontal: var(--spacing-base);
27
- --admonition-padding-vertical-xs: var(--spacing-xs);
28
- --admonition-padding-vertical-md: var(--spacing-md);
29
- --admonition-icon-size: 24px;
24
+ --admonition-gap: var(--spacing-sm); // @presenter Spacing
25
+ --admonition-text-gap: var(--spacing-xxs); // @presenter Spacing
26
+ --admonition-margin: var(--spacing-base) 0 var(--spacing-md) 0; // @presenter Spacing
27
+ --admonition-padding: var(--spacing-sm) var(--spacing-base); // @presenter Spacing
28
+ --admonition-icon-margin: calc(var(--spacing-unit) / 2) 0; // @presenter Spacing
29
+ --admonition-icon-size: 18px; // @presenter Spacing
30
30
 
31
31
  /**
32
32
  * @tokens Admonition border
@@ -34,21 +34,20 @@ export const admonition = css`
34
34
 
35
35
  --admonition-border-radius: var(--border-radius-lg); // @presenter BorderRadius
36
36
  --admonition-border-style: var(--border-style);
37
- --admonition-border-width: calc(var(--border-width) * 4);
37
+ --admonition-border-width: 1px;
38
38
 
39
39
  /**
40
40
  * @tokens Admonition type info
41
41
  */
42
42
 
43
43
  --admonition-info-bg-color: var(--color-info-bg); // @presenter Color
44
- --admonition-info-heading-text-color: var(--text-color-primary); // @presenter Color
45
- --admonition-info-text-color: var(--text-color-secondary); // @presenter Color
46
- --admonition-info-icon-color: var(--color-info-base); // @presenter Color
44
+ --admonition-info-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
45
+ --admonition-info-text-color: var(--admonition-heading-text-color); // @presenter Color
46
+ --admonition-info-icon-color: var(--color-info-active); // @presenter Color
47
47
  --admonition-info-border-color: var(--color-info-border); // @presenter Color
48
48
  --admonition-info-border-style: var(--admonition-border-style);
49
49
  --admonition-info-border-width: var(--admonition-border-width);
50
50
  --admonition-info-border: var(--admonition-info-border-width) var(--admonition-info-border-style) var(--admonition-info-border-color); // @presenter Border
51
- --admonition-info-icon: none;
52
51
 
53
52
  /**
54
53
  * @tokens Admonition type warning
@@ -56,42 +55,39 @@ export const admonition = css`
56
55
 
57
56
  /* warning */
58
57
  --admonition-warning-bg-color: var(--color-warning-bg); // @presenter Color
59
- --admonition-warning-text-color: var(--text-color-secondary); // @presenter Color
60
- --admonition-warning-heading-text-color: var(--text-color-primary); // @presenter Color
61
- --admonition-warning-icon-color: var(--color-warning-base); // @presenter Color
58
+ --admonition-warning-text-color: var(--admonition-heading-text-color); // @presenter Color
59
+ --admonition-warning-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
60
+ --admonition-warning-icon-color: var(--color-warning-active); // @presenter Color
62
61
  --admonition-warning-border-color: var(--color-warning-border); // @presenter Color
63
62
  --admonition-warning-border-style: var(--admonition-border-style); // @presenter Color
64
63
  --admonition-warning-border-width: var(--admonition-border-width); // @presenter Color
65
64
  --admonition-warning-border: var(--admonition-warning-border-width) var(--admonition-warning-border-style) var(--admonition-warning-border-color); // @presenter Border
66
- --admonition-warning-icon: none;
67
65
 
68
66
  /**
69
67
  * @tokens Admonition type danger
70
68
  */
71
69
 
72
70
  --admonition-danger-bg-color: var(--color-error-bg); // @presenter Color
73
- --admonition-danger-text-color: var(--text-color-secondary); // @presenter Color
74
- --admonition-danger-heading-text-color: var(--text-color-primary); // @presenter Color
75
- --admonition-danger-icon-color: var(--color-error-base); // @presenter Color
71
+ --admonition-danger-text-color: var(--admonition-heading-text-color); // @presenter Color
72
+ --admonition-danger-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
73
+ --admonition-danger-icon-color: var(--color-error-active); // @presenter Color
76
74
  --admonition-danger-border-color: var(--color-error-border); // @presenter Color
77
75
  --admonition-danger-border-style: var(--admonition-border-style); // @presenter Color
78
76
  --admonition-danger-border-width: var(--admonition-border-width); // @presenter Color
79
77
  --admonition-danger-border: var(--admonition-danger-border-width) var(--admonition-danger-border-style) var(--admonition-danger-border-color); // @presenter Border
80
- --admonition-danger-icon: none;
81
78
 
82
79
  /**
83
80
  * @tokens Admonition type success
84
81
  */
85
82
 
86
83
  --admonition-success-bg-color: var(--color-success-bg); // @presenter Color
87
- --admonition-success-text-color: var(--text-color-secondary); // @presenter Color
88
- --admonition-success-heading-text-color: var(--text-color-primary); // @presenter Color
89
- --admonition-success-icon-color: var(--color-success-base); // @presenter Color
84
+ --admonition-success-text-color: var(--admonition-heading-text-color); // @presenter Color
85
+ --admonition-success-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
86
+ --admonition-success-icon-color: var(--color-success-active); // @presenter Color
90
87
  --admonition-success-border-color: var(--color-success-border); // @presenter Color
91
88
  --admonition-success-border-style: var(--admonition-border-style); // @presenter Color
92
89
  --admonition-success-border-width: var(--admonition-border-width); // @presenter Color
93
90
  --admonition-success-border: var(--admonition-success-border-width) var(--admonition-success-border-style) var(--admonition-success-border-color); // @presenter Border
94
- --admonition-success-icon: none;
95
91
 
96
92
  // @tokens End
97
93
  `;
@@ -0,0 +1,10 @@
1
+ // interface AfterAsyncApiChannelDescriptionProps {
2
+ // channel: any;
3
+ // }
4
+
5
+ // export function AfterAsyncApiChannelDescription(_props: AfterAsyncApiChannelDescriptionProps) {
6
+ // return null;
7
+ // }
8
+
9
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
10
+ export const AfterAsyncApiChannelDescription: any = null;
@@ -3,15 +3,23 @@ import styled, { css } from 'styled-components';
3
3
 
4
4
  import type { PropsWithChildren, JSX } from 'react';
5
5
 
6
+ import { GenericIcon } from '@redocly/theme/icons/GenericIcon/GenericIcon';
7
+
6
8
  export type BadgeProps = PropsWithChildren<{
7
9
  deprecated?: boolean;
8
10
  color?: string;
9
11
  key?: string;
10
12
  className?: string;
13
+ icon?: string;
11
14
  }>;
12
15
 
13
- export function Badge(props: BadgeProps): JSX.Element {
14
- return <BadgeComponent {...props} data-component-name="Badge/Badge" />;
16
+ export function Badge({ icon, children, ...props }: BadgeProps): JSX.Element {
17
+ return (
18
+ <BadgeComponent {...props} data-component-name="Badge/Badge">
19
+ {icon ? <BadgeIcon icon={icon} /> : null}
20
+ {children}
21
+ </BadgeComponent>
22
+ );
15
23
  }
16
24
 
17
25
  const BadgeComponent = styled.span<BadgeProps>`
@@ -34,3 +42,11 @@ const BadgeComponent = styled.span<BadgeProps>`
34
42
  border-radius: var(--badge-deprecated-border-radius);
35
43
  `}
36
44
  `;
45
+
46
+ const BadgeIcon = styled(GenericIcon)`
47
+ --icon-width: var(--font-size-sm);
48
+ --icon-height: var(--font-size-sm);
49
+ margin-right: var(--spacing-xxs);
50
+ flex-shrink: 0;
51
+ vertical-align: middle;
52
+ `;
@@ -5,10 +5,13 @@ import type { BannerConfig } from '@redocly/config';
5
5
  import type { JSX } from 'react';
6
6
 
7
7
  import { useThemeHooks } from '@redocly/theme/core/hooks';
8
+ import { getNavbarElement } from '@redocly/theme/core/utils';
8
9
  import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
9
10
  import { CloseIcon } from '@redocly/theme/icons/CloseIcon/CloseIcon';
10
11
  import { Button } from '@redocly/theme/components/Button/Button';
11
12
 
13
+ const ANIMATION_DURATION = 0.4;
14
+
12
15
  type BannerColor = 'info' | 'success' | 'warning' | 'error';
13
16
 
14
17
  type BannerProps = {
@@ -67,6 +70,25 @@ export function Banner({ className }: BannerProps): JSX.Element | null {
67
70
 
68
71
  updateHeight();
69
72
 
73
+ if (window.location.hash) {
74
+ setTimeout(
75
+ () => {
76
+ const hash = window.location.hash;
77
+ const el = document.getElementById(hash.slice(1));
78
+ if (el) {
79
+ const navbar = getNavbarElement();
80
+ const navbarHeight = navbar?.getBoundingClientRect().height ?? 0;
81
+ const elementTop = el.getBoundingClientRect().top + window.scrollY;
82
+ const scrollPosition = elementTop - navbarHeight;
83
+ if (Math.abs(window.scrollY - scrollPosition) > 1) {
84
+ window.scrollTo({ top: scrollPosition });
85
+ }
86
+ }
87
+ },
88
+ ANIMATION_DURATION * 1000 + 100,
89
+ );
90
+ }
91
+
70
92
  const resizeObserver = new ResizeObserver(updateHeight);
71
93
  resizeObserver.observe(bannerElement);
72
94
 
@@ -154,7 +176,7 @@ const BannerWrapper = styled.div<{ $color?: BannerColor; $isVisible?: boolean }>
154
176
  width: 100%;
155
177
  z-index: var(--z-index-overlay);
156
178
  transform: ${({ $isVisible }) => ($isVisible ? 'translateY(0)' : 'translateY(-100%)')};
157
- transition: transform 0.4s ease-out;
179
+ transition: transform ${ANIMATION_DURATION}s ease-out;
158
180
  ${({ $color }) =>
159
181
  $color &&
160
182
  css`
@@ -4,6 +4,7 @@ export const banner = css`
4
4
  /**
5
5
  * @tokens Banner
6
6
  */
7
+ --banner-height: 0px; /* default 0px so calc formulas work on page load */
7
8
  --banner-button-size: 22px;
8
9
  --banner-button-padding: 3px; // @presenter Spacing
9
10
  --banner-button-font-size: var(--font-size-base);
@@ -4,7 +4,7 @@ import styled, { css } from 'styled-components';
4
4
  import type { JSX } from 'react';
5
5
 
6
6
  import { Link } from '@redocly/theme/components/Link/Link';
7
- import { TooltipComponent } from '@redocly/theme/components/Tooltip/Tooltip';
7
+ import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
8
8
  import { BreadcrumbIcon } from '@redocly/theme/components/Breadcrumbs/BreadcrumbIcon';
9
9
  import { trimText } from '@redocly/theme/core/utils';
10
10
  import { BREADCRUMB_MAX_LENGTH } from '@redocly/theme/core/constants';
@@ -48,9 +48,9 @@ export function Breadcrumb({ label, link, isActive, onClick, icon }: BreadcrumbP
48
48
  );
49
49
 
50
50
  return isTruncated ? (
51
- <TooltipComponent tip={label} placement="bottom" width="max-content">
51
+ <Tooltip tip={label} placement="bottom">
52
52
  {breadcrumbContent}
53
- </TooltipComponent>
53
+ </Tooltip>
54
54
  ) : (
55
55
  breadcrumbContent
56
56
  );
@@ -8,7 +8,7 @@ import { useThemeHooks } from '@redocly/theme/core/hooks';
8
8
  import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
9
9
  import { DropdownMenu } from '@redocly/theme/components/Dropdown/DropdownMenu';
10
10
  import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMenuItem';
11
- import { TooltipComponent } from '@redocly/theme/components/Tooltip/Tooltip';
11
+ import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
12
12
  import { GenericIcon } from '@redocly/theme/icons/GenericIcon/GenericIcon';
13
13
  import { BREADCRUMB_MAX_LENGTH } from '@redocly/theme/core/constants';
14
14
  import { BreadcrumbIcon } from '@redocly/theme/components/Breadcrumbs/BreadcrumbIcon';
@@ -39,9 +39,9 @@ export function BreadcrumbDropdown({
39
39
  const isTruncated = label.length > BREADCRUMB_MAX_LENGTH;
40
40
 
41
41
  const triggerContent = isTruncated ? (
42
- <TooltipComponent tip={label} placement="bottom" width="max-content">
42
+ <Tooltip tip={label} placement="bottom">
43
43
  <TriggerContentWrapper>{children}</TriggerContentWrapper>
44
- </TooltipComponent>
44
+ </Tooltip>
45
45
  ) : (
46
46
  children
47
47
  );
@@ -66,11 +66,14 @@ export function BreadcrumbDropdown({
66
66
  key={index}
67
67
  onAction={() => {
68
68
  onItemClick?.(item, index);
69
- telemetry.sendBreadcrumbClickedMessage({
70
- link: item.link,
71
- position: index + 1,
72
- totalBreadcrumbs: items.length,
73
- });
69
+ telemetry.sendBreadcrumbClickedMessage([
70
+ {
71
+ object: 'breadcrumb',
72
+ link: item.link,
73
+ position: index + 1,
74
+ totalBreadcrumbs: items.length,
75
+ },
76
+ ]);
74
77
  }}
75
78
  $hasLink={hasLink}
76
79
  to={item.link}
@@ -66,11 +66,14 @@ export function Breadcrumbs(props: {
66
66
  label={translatedLabel}
67
67
  items={siblingsWithActive}
68
68
  onItemClick={(item, itemIdx) =>
69
- telemetry.sendBreadcrumbClickedMessage({
70
- link: item.link,
71
- position: itemIdx + 1,
72
- totalBreadcrumbs: siblingsWithActive.length,
73
- })
69
+ telemetry.sendBreadcrumbClickedMessage([
70
+ {
71
+ object: 'breadcrumb',
72
+ link: item.link,
73
+ position: itemIdx + 1,
74
+ totalBreadcrumbs: siblingsWithActive.length,
75
+ },
76
+ ])
74
77
  }
75
78
  >
76
79
  <BreadcrumbIcon icon={breadcrumb.icon} />
@@ -87,11 +90,14 @@ export function Breadcrumbs(props: {
87
90
  isActive={isActive}
88
91
  icon={breadcrumb.icon}
89
92
  onClick={() =>
90
- telemetry.sendBreadcrumbClickedMessage({
91
- link: breadcrumb.link,
92
- position: idx + 1,
93
- totalBreadcrumbs: breadcrumbs.length,
94
- })
93
+ telemetry.sendBreadcrumbClickedMessage([
94
+ {
95
+ object: 'breadcrumb',
96
+ link: breadcrumb.link,
97
+ position: idx + 1,
98
+ totalBreadcrumbs: breadcrumbs.length,
99
+ },
100
+ ])
95
101
  }
96
102
  />
97
103
  );
@@ -112,11 +118,14 @@ export function Breadcrumbs(props: {
112
118
  label="..."
113
119
  items={collapsedBreadcrumbs}
114
120
  onItemClick={(item, itemIdx) =>
115
- telemetry.sendBreadcrumbClickedMessage({
116
- link: item.link,
117
- position: itemIdx + 1,
118
- totalBreadcrumbs: breadcrumbs.length,
119
- })
121
+ telemetry.sendBreadcrumbClickedMessage([
122
+ {
123
+ object: 'breadcrumb',
124
+ link: item.link,
125
+ position: itemIdx + 1,
126
+ totalBreadcrumbs: breadcrumbs.length,
127
+ },
128
+ ])
120
129
  }
121
130
  >
122
131
  ...
@@ -77,9 +77,12 @@ export function AIAssistantButton() {
77
77
 
78
78
  const handleOpen = () => {
79
79
  setIsOpen(true);
80
- telemetry.sendSearchAiOpenedMessage({
81
- method: 'ai_trigger_button',
82
- });
80
+ telemetry.sendSearchAiOpenedMessage([
81
+ {
82
+ object: 'search',
83
+ method: 'ai_trigger_button',
84
+ },
85
+ ]);
83
86
  };
84
87
 
85
88
  const handleClose = () => {
@@ -108,7 +111,7 @@ export function AIAssistantButton() {
108
111
  const StyledAIAssistantButton = styled(Button)<{ $inputType?: AIAssistantButtonType }>`
109
112
  position: fixed;
110
113
  bottom: var(--ai-assistant-button-bottom);
111
- right: var(--ai-assistant-button-right);
114
+ right: calc(var(--ai-assistant-button-right) + var(--modal-scrollbar-width, 0px));
112
115
  ${({ $inputType }) =>
113
116
  $inputType === 'icon'
114
117
  ? `
@@ -76,14 +76,16 @@ export function CatalogEntities(props: CatalogEntitiesProps): JSX.Element {
76
76
 
77
77
  const onRowClick = (entity: BffCatalogEntity) => {
78
78
  if (searchQuery) {
79
- telemetry.sendCatalogEntitiesListSearchResultClickedMessage({
80
- id: entity.id,
81
- object: 'catalog_entity',
82
- uri: getEntityDetailsLink(entity),
83
- query: searchQuery,
84
- entityKey: entity.key,
85
- entityType: entity.type,
86
- });
79
+ telemetry.sendCatalogEntitiesListSearchResultClickedMessage([
80
+ {
81
+ id: entity.id,
82
+ object: 'catalog_entity',
83
+ uri: getEntityDetailsLink(entity),
84
+ query: searchQuery,
85
+ entityKey: entity.key,
86
+ entityType: entity.type,
87
+ },
88
+ ]);
87
89
  }
88
90
  };
89
91
 
@@ -20,7 +20,7 @@ import { useThemeHooks } from '@redocly/theme/core/hooks';
20
20
  import { CatalogEntitySchema } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntitySchema';
21
21
  import { CatalogEntityMethodAndPath } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath';
22
22
  import { CatalogEntityRelationsGraph } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy';
23
- import { CatalogEntityHistorySidebar } from '@redocly/theme';
23
+ import { CatalogEntityHistorySidebar } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar';
24
24
 
25
25
  export type CatalogEntityProps = {
26
26
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */