@redocly/theme 0.59.0-rc.2 → 0.60.0-next.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/LICENSE +7 -1
  2. package/lib/components/Buttons/AIAssistantButton.js +6 -2
  3. package/lib/components/Buttons/ConnectMCPButton.d.ts +8 -0
  4. package/lib/components/Buttons/ConnectMCPButton.js +145 -0
  5. package/lib/components/Buttons/variables.d.ts +1 -0
  6. package/lib/components/Buttons/variables.js +42 -2
  7. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +1 -0
  8. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
  9. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
  10. package/lib/components/Catalog/CatalogEntityIcon.js +2 -1
  11. package/lib/components/Catalog/CatalogFilter/CatalogFilter.js +4 -0
  12. package/lib/components/Catalog/CatalogTagsWithTooltip.js +1 -1
  13. package/lib/components/Catalog/variables.js +1 -1
  14. package/lib/components/Dropdown/Dropdown.d.ts +16 -2
  15. package/lib/components/Dropdown/Dropdown.js +5 -5
  16. package/lib/components/Link/Link.d.ts +1 -0
  17. package/lib/components/Menu/MenuItem.js +1 -1
  18. package/lib/components/Navbar/NavbarItem.js +3 -3
  19. package/lib/components/PageActions/PageActions.js +4 -1
  20. package/lib/components/PageActions/variables.js +2 -0
  21. package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +1 -2
  22. package/lib/components/Search/SearchAiActionButtons.d.ts +10 -0
  23. package/lib/components/Search/SearchAiActionButtons.js +43 -0
  24. package/lib/components/Search/SearchAiConversationInput.d.ts +3 -1
  25. package/lib/components/Search/SearchAiConversationInput.js +39 -7
  26. package/lib/components/Search/SearchAiDialog.d.ts +3 -6
  27. package/lib/components/Search/SearchAiDialog.js +20 -9
  28. package/lib/components/Search/SearchAiMessage.d.ts +9 -5
  29. package/lib/components/Search/SearchAiMessage.js +146 -22
  30. package/lib/components/Search/SearchAiNegativeFeedbackForm.d.ts +8 -0
  31. package/lib/components/Search/SearchAiNegativeFeedbackForm.js +169 -0
  32. package/lib/components/Search/SearchDialog.js +36 -5
  33. package/lib/components/Search/SearchGroups.js +2 -2
  34. package/lib/components/Search/variables.js +36 -64
  35. package/lib/components/Segmented/Segmented.d.ts +1 -8
  36. package/lib/components/Segmented/Segmented.js +3 -1
  37. package/lib/components/Select/SelectInput.js +1 -1
  38. package/lib/components/Select/variables.js +2 -2
  39. package/lib/components/Tag/Tag.d.ts +2 -1
  40. package/lib/components/Tag/Tag.js +66 -17
  41. package/lib/components/Tag/variables.dark.js +135 -36
  42. package/lib/components/Tag/variables.js +78 -61
  43. package/lib/config.d.ts +2 -2
  44. package/lib/core/constants/index.d.ts +1 -0
  45. package/lib/core/constants/index.js +1 -0
  46. package/lib/core/constants/mcp.d.ts +1 -0
  47. package/lib/core/constants/mcp.js +5 -0
  48. package/lib/core/constants/search.d.ts +5 -4
  49. package/lib/core/constants/search.js +4 -5
  50. package/lib/core/hooks/index.d.ts +3 -0
  51. package/lib/core/hooks/index.js +3 -0
  52. package/lib/core/hooks/menu/use-nested-menu.js +1 -1
  53. package/lib/core/hooks/search/use-feedback-tooltip.d.ts +6 -0
  54. package/lib/core/hooks/search/use-feedback-tooltip.js +26 -0
  55. package/lib/core/hooks/use-connect-mcp-button.d.ts +13 -0
  56. package/lib/core/hooks/use-connect-mcp-button.js +50 -0
  57. package/lib/core/hooks/use-mcp-config.d.ts +9 -0
  58. package/lib/core/hooks/use-mcp-config.js +27 -0
  59. package/lib/core/hooks/use-page-actions.d.ts +1 -1
  60. package/lib/core/hooks/use-page-actions.js +99 -119
  61. package/lib/core/hooks/use-product-picker.js +2 -1
  62. package/lib/core/hooks/use-tabs.d.ts +3 -2
  63. package/lib/core/hooks/use-tabs.js +115 -57
  64. package/lib/core/hooks/use-telemetry-fallback.d.ts +10 -8
  65. package/lib/core/hooks/use-telemetry-fallback.js +10 -8
  66. package/lib/core/openapi/index.d.ts +1 -0
  67. package/lib/core/styles/dark.js +4 -0
  68. package/lib/core/styles/global.js +5 -0
  69. package/lib/core/types/hooks.d.ts +2 -2
  70. package/lib/core/types/index.d.ts +1 -0
  71. package/lib/core/types/index.js +1 -0
  72. package/lib/core/types/l10n.d.ts +1 -1
  73. package/lib/core/types/mcp.d.ts +6 -0
  74. package/lib/core/types/mcp.js +3 -0
  75. package/lib/core/types/search.d.ts +11 -4
  76. package/lib/core/types/search.js +6 -0
  77. package/lib/core/types/segmented.d.ts +12 -0
  78. package/lib/core/types/segmented.js +3 -0
  79. package/lib/core/utils/frontmatter-translate.d.ts +6 -0
  80. package/lib/core/utils/frontmatter-translate.js +14 -0
  81. package/lib/core/utils/index.d.ts +2 -0
  82. package/lib/core/utils/index.js +2 -0
  83. package/lib/core/utils/mcp.d.ts +2 -0
  84. package/lib/core/utils/mcp.js +31 -0
  85. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +44 -4
  86. package/lib/icons/AiStarsIcon/AiStarsIcon.js +11 -2
  87. package/lib/icons/ConnectIcon/ConnectIcon.d.ts +9 -0
  88. package/lib/icons/ConnectIcon/ConnectIcon.js +17 -0
  89. package/lib/icons/CubeIcon/CubeIcon.d.ts +9 -0
  90. package/lib/icons/CubeIcon/CubeIcon.js +17 -0
  91. package/lib/icons/HashtagIcon/HashtagIcon.d.ts +9 -0
  92. package/lib/icons/HashtagIcon/HashtagIcon.js +22 -0
  93. package/lib/icons/RedoclyIcon/RedoclyIcon.js +4 -7
  94. package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.d.ts +9 -0
  95. package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.js +34 -0
  96. package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.d.ts +9 -0
  97. package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.js +34 -0
  98. package/lib/icons/VSCodeIcon/VSCodeIcon.d.ts +9 -0
  99. package/lib/icons/VSCodeIcon/VSCodeIcon.js +17 -0
  100. package/lib/index.d.ts +1 -2
  101. package/lib/index.js +1 -2
  102. package/lib/markdoc/components/Cards/Card.js +1 -28
  103. package/lib/markdoc/components/ConnectMCP/ConnectMCP.d.ts +8 -0
  104. package/lib/markdoc/components/ConnectMCP/ConnectMCP.js +19 -0
  105. package/lib/markdoc/components/Tabs/TabList.d.ts +3 -1
  106. package/lib/markdoc/components/Tabs/TabList.js +197 -47
  107. package/lib/markdoc/components/Tabs/Tabs.d.ts +2 -1
  108. package/lib/markdoc/components/Tabs/Tabs.js +57 -12
  109. package/lib/markdoc/components/default.d.ts +1 -0
  110. package/lib/markdoc/components/default.js +1 -0
  111. package/lib/markdoc/default.d.ts +6 -0
  112. package/lib/markdoc/default.js +2 -0
  113. package/lib/markdoc/tags/card.js +0 -1
  114. package/lib/markdoc/tags/connect-mcp.d.ts +2 -0
  115. package/lib/markdoc/tags/connect-mcp.js +27 -0
  116. package/package.json +6 -6
  117. package/src/components/Buttons/AIAssistantButton.tsx +6 -2
  118. package/src/components/Buttons/ConnectMCPButton.tsx +180 -0
  119. package/src/components/Buttons/variables.ts +42 -1
  120. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +1 -0
  121. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
  122. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
  123. package/src/components/Catalog/CatalogEntityIcon.tsx +2 -1
  124. package/src/components/Catalog/CatalogFilter/CatalogFilter.tsx +5 -0
  125. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +1 -5
  126. package/src/components/Catalog/variables.ts +1 -1
  127. package/src/components/Dropdown/Dropdown.tsx +84 -79
  128. package/src/components/Link/Link.tsx +1 -0
  129. package/src/components/Menu/MenuItem.tsx +1 -0
  130. package/src/components/Navbar/NavbarItem.tsx +6 -5
  131. package/src/components/PageActions/PageActions.tsx +5 -1
  132. package/src/components/PageActions/variables.ts +2 -0
  133. package/src/components/Search/FilterFields/SearchFilterFieldTags.tsx +3 -3
  134. package/src/components/Search/SearchAiActionButtons.tsx +76 -0
  135. package/src/components/Search/SearchAiConversationInput.tsx +61 -18
  136. package/src/components/Search/SearchAiDialog.tsx +52 -23
  137. package/src/components/Search/SearchAiMessage.tsx +172 -43
  138. package/src/components/Search/SearchAiNegativeFeedbackForm.tsx +210 -0
  139. package/src/components/Search/SearchDialog.tsx +49 -13
  140. package/src/components/Search/SearchGroups.tsx +2 -0
  141. package/src/components/Search/variables.ts +36 -64
  142. package/src/components/Segmented/Segmented.tsx +15 -20
  143. package/src/components/Select/SelectInput.tsx +1 -0
  144. package/src/components/Select/variables.ts +2 -2
  145. package/src/components/Tag/Tag.tsx +35 -19
  146. package/src/components/Tag/variables.dark.ts +135 -36
  147. package/src/components/Tag/variables.ts +78 -61
  148. package/src/config.ts +2 -0
  149. package/src/core/constants/index.ts +1 -0
  150. package/src/core/constants/mcp.ts +1 -0
  151. package/src/core/constants/search.ts +8 -4
  152. package/src/core/hooks/index.ts +3 -0
  153. package/src/core/hooks/menu/use-nested-menu.ts +2 -2
  154. package/src/core/hooks/search/use-feedback-tooltip.ts +32 -0
  155. package/src/core/hooks/use-connect-mcp-button.ts +79 -0
  156. package/src/core/hooks/use-mcp-config.ts +43 -0
  157. package/src/core/hooks/use-page-actions.ts +141 -150
  158. package/src/core/hooks/use-product-picker.ts +2 -1
  159. package/src/core/hooks/use-tabs.ts +168 -86
  160. package/src/core/hooks/use-telemetry-fallback.ts +10 -8
  161. package/src/core/openapi/index.ts +1 -0
  162. package/src/core/styles/dark.ts +4 -0
  163. package/src/core/styles/global.ts +6 -1
  164. package/src/core/types/hooks.ts +5 -1
  165. package/src/core/types/index.ts +1 -0
  166. package/src/core/types/l10n.ts +13 -0
  167. package/src/core/types/mcp.ts +8 -0
  168. package/src/core/types/search.ts +13 -4
  169. package/src/core/types/segmented.ts +14 -0
  170. package/src/core/utils/frontmatter-translate.ts +9 -0
  171. package/src/core/utils/index.ts +2 -0
  172. package/src/core/utils/mcp.ts +34 -0
  173. package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +13 -4
  174. package/src/icons/AiStarsIcon/AiStarsIcon.tsx +11 -2
  175. package/src/icons/ConnectIcon/ConnectIcon.tsx +27 -0
  176. package/src/icons/CubeIcon/CubeIcon.tsx +27 -0
  177. package/src/icons/HashtagIcon/HashtagIcon.tsx +23 -0
  178. package/src/icons/RedoclyIcon/RedoclyIcon.tsx +4 -22
  179. package/src/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.tsx +38 -0
  180. package/src/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.tsx +35 -0
  181. package/src/icons/VSCodeIcon/VSCodeIcon.tsx +29 -0
  182. package/src/index.ts +1 -2
  183. package/src/markdoc/components/Cards/Card.tsx +1 -28
  184. package/src/markdoc/components/ConnectMCP/ConnectMCP.tsx +28 -0
  185. package/src/markdoc/components/Tabs/TabList.tsx +312 -105
  186. package/src/markdoc/components/Tabs/Tabs.tsx +136 -11
  187. package/src/markdoc/components/default.ts +1 -0
  188. package/src/markdoc/default.ts +2 -0
  189. package/src/markdoc/tags/card.ts +0 -1
  190. package/src/markdoc/tags/connect-mcp.ts +25 -0
  191. package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.d.ts +0 -1
  192. package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.js +0 -11
  193. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
  194. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
  195. package/lib/ext/process-scorecard.d.ts +0 -5
  196. package/lib/ext/process-scorecard.js +0 -11
  197. package/src/components/OpenApiDocs/hooks/AdditionalOverviewInfo.tsx +0 -9
  198. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
  199. package/src/ext/process-scorecard.ts +0 -13
package/LICENSE CHANGED
@@ -1 +1,7 @@
1
- (c) Copyright 2022 Redocly Inc, all rights reserved.
1
+ Copyright 2022 Redocly Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -49,7 +49,7 @@ const RedoclyIcon_1 = require("../../icons/RedoclyIcon/RedoclyIcon");
49
49
  const defaultConfig = {
50
50
  hide: false,
51
51
  inputType: 'button',
52
- inputIcon: 'redocly',
52
+ inputIcon: 'sparkles',
53
53
  };
54
54
  const getIcon = (iconType, inputType = 'button') => {
55
55
  const iconSize = inputType === 'icon'
@@ -73,8 +73,9 @@ function AIAssistantButton() {
73
73
  var _a, _b;
74
74
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
75
75
  const themeConfig = (0, hooks_1.useThemeConfig)();
76
- const { useTranslate } = (0, hooks_1.useThemeHooks)();
76
+ const { useTranslate, useTelemetry } = (0, hooks_1.useThemeHooks)();
77
77
  const { translate } = useTranslate();
78
+ const telemetry = useTelemetry();
78
79
  const buttonConfig = Object.assign(Object.assign({}, defaultConfig), ((_b = (_a = themeConfig.aiAssistant) === null || _a === void 0 ? void 0 : _a.trigger) !== null && _b !== void 0 ? _b : {}));
79
80
  const { hide, inputIcon, inputType } = buttonConfig;
80
81
  if (hide) {
@@ -84,6 +85,9 @@ function AIAssistantButton() {
84
85
  const text = translate('aiAssistant.trigger', 'Ask AI');
85
86
  const handleOpen = () => {
86
87
  setIsOpen(true);
88
+ telemetry.sendSearchAiOpenedMessage({
89
+ method: 'ai_trigger_button',
90
+ });
87
91
  };
88
92
  const handleClose = () => {
89
93
  setIsOpen(false);
@@ -0,0 +1,8 @@
1
+ import type { JSX } from 'react';
2
+ import type { MCPOption } from '../../core/types';
3
+ export type ConnectMCPButtonProps = {
4
+ placement?: 'top' | 'bottom';
5
+ alignment?: 'start' | 'end';
6
+ options?: MCPOption[];
7
+ };
8
+ export declare function ConnectMCPButton({ placement, alignment, options, }: ConnectMCPButtonProps): JSX.Element;
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ConnectMCPButton = ConnectMCPButton;
40
+ const react_1 = __importStar(require("react"));
41
+ const styled_components_1 = __importDefault(require("styled-components"));
42
+ const Dropdown_1 = require("../../components/Dropdown/Dropdown");
43
+ const DropdownMenu_1 = require("../../components/Dropdown/DropdownMenu");
44
+ const DropdownMenuItem_1 = require("../../components/Dropdown/DropdownMenuItem");
45
+ const Button_1 = require("../../components/Button/Button");
46
+ const CursorIcon_1 = require("../../icons/CursorIcon/CursorIcon");
47
+ const VSCodeIcon_1 = require("../../icons/VSCodeIcon/VSCodeIcon");
48
+ const CopyIcon_1 = require("../../icons/CopyIcon/CopyIcon");
49
+ const CheckmarkFilledIcon_1 = require("../../icons/CheckmarkFilledIcon/CheckmarkFilledIcon");
50
+ const ConnectIcon_1 = require("../../icons/ConnectIcon/ConnectIcon");
51
+ const use_connect_mcp_button_1 = require("../../core/hooks/use-connect-mcp-button");
52
+ const hooks_1 = require("../../core/hooks");
53
+ const TriggerButton = react_1.default.memo(({ text }) => {
54
+ return (react_1.default.createElement(StyledButton, { variant: "secondary", icon: react_1.default.createElement(ConnectIcon_1.ConnectIcon, null) }, text));
55
+ });
56
+ const MENU_OPTIONS = [
57
+ {
58
+ key: 'cursor',
59
+ icon: CursorIcon_1.CursorIcon,
60
+ titleTranslationKey: 'page.actions.connectMcp.cursor',
61
+ titleDefault: 'Connect to Cursor',
62
+ descriptionTranslationKey: 'page.actions.connectMcp.cursorDescription',
63
+ descriptionDefault: 'Install MCP server on Cursor',
64
+ },
65
+ {
66
+ key: 'vscode',
67
+ icon: VSCodeIcon_1.VSCodeIcon,
68
+ titleTranslationKey: 'page.actions.connectMcp.vscode',
69
+ titleDefault: 'Connect to VS Code',
70
+ descriptionTranslationKey: 'page.actions.connectMcp.vscodeDescription',
71
+ descriptionDefault: 'Install MCP server on VS Code',
72
+ },
73
+ {
74
+ key: 'copy',
75
+ icon: CopyIcon_1.CopyIcon,
76
+ titleTranslationKey: 'page.actions.connectMcp.copyConfig',
77
+ titleDefault: 'Copy MCP Configuration',
78
+ descriptionTranslationKey: 'page.actions.connectMcp.copyConfigDescription',
79
+ descriptionDefault: 'Copy MCP JSON Configuration',
80
+ },
81
+ ];
82
+ function ConnectMCPButton({ placement = 'bottom', alignment = 'end', options = ['cursor', 'vscode', 'copy'], }) {
83
+ const { useTranslate } = (0, hooks_1.useThemeHooks)();
84
+ const { translate } = useTranslate();
85
+ const { isCopied, triggerButtonText, visibleOptions, handleAction } = (0, use_connect_mcp_button_1.useConnectMCPButton)({
86
+ options,
87
+ });
88
+ const menuOptions = (0, react_1.useMemo)(() => MENU_OPTIONS.filter((option) => visibleOptions.includes(option.key)), [visibleOptions]);
89
+ return (react_1.default.createElement(ConnectMCPButtonWrapper, { "data-component-name": "Buttons/ConnectMCPButton" },
90
+ react_1.default.createElement(Dropdown_1.Dropdown, { trigger: react_1.default.createElement(TriggerButton, { text: triggerButtonText }), triggerEvent: "hover", placement: placement, alignment: alignment, closeOnClick: false },
91
+ react_1.default.createElement(DropdownMenu_1.DropdownMenu, null, menuOptions.map((option) => {
92
+ const Icon = option.icon;
93
+ const showCheckmark = option.key === 'copy' && isCopied;
94
+ return (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { key: option.key, onAction: () => handleAction(option.key) },
95
+ react_1.default.createElement(MenuItemContent, null,
96
+ react_1.default.createElement(MenuItemIcon, null, showCheckmark ? (react_1.default.createElement(CheckmarkFilledIcon_1.CheckmarkFilledIcon, { color: "var(--color-success-base)" })) : (react_1.default.createElement(Icon, null))),
97
+ react_1.default.createElement(MenuItemText, null,
98
+ react_1.default.createElement(MenuItemTitle, null, translate(option.titleTranslationKey, option.titleDefault)),
99
+ react_1.default.createElement(MenuItemDescription, null, translate(option.descriptionTranslationKey, option.descriptionDefault))))));
100
+ })))));
101
+ }
102
+ const ConnectMCPButtonWrapper = styled_components_1.default.div `
103
+ display: inline-block;
104
+ position: relative;
105
+ `;
106
+ const StyledButton = (0, styled_components_1.default)(Button_1.Button) `
107
+ --button-gap: var(--connect-mcp-button-gap);
108
+ `;
109
+ const MenuItemContent = styled_components_1.default.div `
110
+ display: flex;
111
+ align-items: center;
112
+ gap: var(--connect-mcp-button-menu-item-gap);
113
+ padding: var(--connect-mcp-button-menu-item-padding-block)
114
+ var(--connect-mcp-button-menu-item-padding-inline);
115
+ `;
116
+ const MenuItemIcon = styled_components_1.default.div `
117
+ display: flex;
118
+ align-items: center;
119
+ justify-content: center;
120
+ width: var(--connect-mcp-button-menu-item-icon-size);
121
+ height: var(--connect-mcp-button-menu-item-icon-size);
122
+ flex-shrink: 0;
123
+ border: var(--connect-mcp-button-menu-item-icon-border);
124
+ border-radius: var(--connect-mcp-button-menu-item-icon-border-radius);
125
+ color: var(--connect-mcp-button-menu-item-icon-color);
126
+ `;
127
+ const MenuItemText = styled_components_1.default.div `
128
+ display: flex;
129
+ flex-direction: column;
130
+ gap: var(--connect-mcp-button-menu-item-text-gap);
131
+ flex: 1;
132
+ `;
133
+ const MenuItemTitle = styled_components_1.default.div `
134
+ font-size: var(--connect-mcp-button-menu-item-title-font-size);
135
+ font-weight: var(--connect-mcp-button-menu-item-title-font-weight);
136
+ line-height: var(--connect-mcp-button-menu-item-title-line-height);
137
+ color: var(--connect-mcp-button-menu-item-title-color);
138
+ `;
139
+ const MenuItemDescription = styled_components_1.default.div `
140
+ font-size: var(--connect-mcp-button-menu-item-description-font-size);
141
+ font-weight: var(--connect-mcp-button-menu-item-description-font-weight);
142
+ line-height: var(--connect-mcp-button-menu-item-description-line-height);
143
+ color: var(--connect-mcp-button-menu-item-description-color);
144
+ `;
145
+ //# sourceMappingURL=ConnectMCPButton.js.map
@@ -1 +1,2 @@
1
1
  export declare const aiAssistantButton: import("styled-components").FlattenSimpleInterpolation;
2
+ export declare const connectMCPButton: import("styled-components").FlattenSimpleInterpolation;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.aiAssistantButton = void 0;
3
+ exports.connectMCPButton = exports.aiAssistantButton = void 0;
4
4
  const styled_components_1 = require("styled-components");
5
5
  exports.aiAssistantButton = (0, styled_components_1.css) `
6
6
  /**
@@ -23,7 +23,7 @@ exports.aiAssistantButton = (0, styled_components_1.css) `
23
23
  /* Positioning */
24
24
  --ai-assistant-button-bottom: var(--spacing-xl);
25
25
  --ai-assistant-button-right: var(--spacing-xl);
26
- --ai-assistant-button-z-index: 1000;
26
+ --ai-assistant-button-z-index: 50
27
27
 
28
28
  /* Typography */
29
29
  --ai-assistant-button-font-size: var(--font-size-base);
@@ -48,4 +48,44 @@ exports.aiAssistantButton = (0, styled_components_1.css) `
48
48
  /* Transition */
49
49
  --ai-assistant-button-transition: box-shadow 0.3s ease, transform 0.2s ease;
50
50
  `;
51
+ exports.connectMCPButton = (0, styled_components_1.css) `
52
+ /**
53
+ * @tokens Connect MCP Button
54
+ * @presenter Color
55
+ */
56
+
57
+ /* Button gap */
58
+ --connect-mcp-button-gap: var(--spacing-xs);
59
+
60
+ /* Menu item layout */
61
+ --connect-mcp-button-menu-item-gap: var(--spacing-sm);
62
+ --connect-mcp-button-menu-item-padding-block: var(--spacing-xxs);
63
+ --connect-mcp-button-menu-item-padding-inline: 0;
64
+
65
+ /* Menu item icon */
66
+ --connect-mcp-button-menu-item-icon-size: 32px;
67
+ --connect-mcp-button-menu-item-icon-border-color: var(--border-color-secondary);
68
+ --connect-mcp-button-menu-item-icon-border-style: solid;
69
+ --connect-mcp-button-menu-item-icon-border-width: 1px;
70
+ --connect-mcp-button-menu-item-icon-border: var(--connect-mcp-button-menu-item-icon-border-width)
71
+ var(--connect-mcp-button-menu-item-icon-border-style)
72
+ var(--connect-mcp-button-menu-item-icon-border-color);
73
+ --connect-mcp-button-menu-item-icon-border-radius: var(--border-radius);
74
+ --connect-mcp-button-menu-item-icon-color: var(--icon-color-secondary);
75
+
76
+ /* Menu item text */
77
+ --connect-mcp-button-menu-item-text-gap: var(--spacing-xxs);
78
+
79
+ /* Menu item title */
80
+ --connect-mcp-button-menu-item-title-font-size: var(--font-size-base);
81
+ --connect-mcp-button-menu-item-title-font-weight: var(--font-weight-regular);
82
+ --connect-mcp-button-menu-item-title-line-height: var(--line-height-base);
83
+ --connect-mcp-button-menu-item-title-color: var(--text-color-secondary);
84
+
85
+ /* Menu item description */
86
+ --connect-mcp-button-menu-item-description-font-size: var(--font-size-sm);
87
+ --connect-mcp-button-menu-item-description-font-weight: var(--font-weight-regular);
88
+ --connect-mcp-button-menu-item-description-line-height: var(--line-height-sm);
89
+ --connect-mcp-button-menu-item-description-color: var(--text-color-description);
90
+ `;
51
91
  //# sourceMappingURL=variables.js.map
@@ -25,6 +25,7 @@ const InfoBarWrapper = styled_components_1.default.div `
25
25
  transition: all 0.2s ease-in-out;
26
26
  height: 100%;
27
27
  padding: var(--catalog-card-gap);
28
+ margin-bottom: var(--spacing-xs);
28
29
 
29
30
  ${({ hoverEffect }) => hoverEffect &&
30
31
  `
@@ -13,7 +13,7 @@ const MoleculesIcon_1 = require("../../../../icons/MoleculesIcon/MoleculesIcon")
13
13
  const NetworkIcon_1 = require("../../../../icons/NetworkIcon/NetworkIcon");
14
14
  function CatalogEntityApiDescriptionRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
15
15
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations" },
16
- react_1.default.createElement(Tabs_1.Tabs, { key: entity.id, size: Tabs_1.TabsSize.MEDIUM },
16
+ react_1.default.createElement(Tabs_1.Tabs, { key: entity.id, forceReady: relations.length > 0, size: Tabs_1.TabsSize.MEDIUM },
17
17
  react_1.default.createElement(TabItem, { label: "Operations", icon: react_1.default.createElement(MoleculesIcon_1.MoleculesIcon, null), onClick: () => setFilter('type:api-operation') },
18
18
  react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { key: "operations-table", entity: entity, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, shouldShowHeading: false, listType: "api-operation" })),
19
19
  react_1.default.createElement(TabItem, { label: "Schemas", icon: react_1.default.createElement(NetworkIcon_1.NetworkIcon, null), onClick: () => setFilter('type:data-schema') },
@@ -40,7 +40,7 @@ const teamColumns = [
40
40
  ];
41
41
  function CatalogEntityTeamRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
42
42
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations" },
43
- react_1.default.createElement(Tabs_1.Tabs, { size: Tabs_1.TabsSize.MEDIUM },
43
+ react_1.default.createElement(Tabs_1.Tabs, { forceReady: relations.length > 0, size: Tabs_1.TabsSize.MEDIUM },
44
44
  react_1.default.createElement(TabItem, { label: "Members", icon: react_1.default.createElement(PeopleIcon_1.PeopleIcon, null), onClick: () => setFilter('type:user') },
45
45
  react_1.default.createElement(CatalogEntityRelationsTable_1.CatalogEntityRelationsTable, { key: "members-table", entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, columns: teamColumns, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, listType: "team" })),
46
46
  react_1.default.createElement(TabItem, { label: "Related entities", icon: react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null), onClick: () => setFilter('-type:user') },
@@ -14,6 +14,7 @@ const HierarchyIcon_1 = require("../../icons/HierarchyIcon/HierarchyIcon");
14
14
  const Image_1 = require("../../components/Image/Image");
15
15
  const core_1 = require("../../core");
16
16
  const NoteIcon_1 = require("../../icons/NoteIcon/NoteIcon");
17
+ const CubeIcon_1 = require("../../icons/CubeIcon/CubeIcon");
17
18
  const getIconColor = (entityType) => `var(--catalog-entity-icon-color-${entityType})`;
18
19
  const getEntityIcon = ({ entityType, defaultColor, forceColor, entitiesCatalogConfig, }) => {
19
20
  var _a, _b;
@@ -34,7 +35,7 @@ const getEntityIcon = ({ entityType, defaultColor, forceColor, entitiesCatalogCo
34
35
  if ((iconConfig === null || iconConfig === void 0 ? void 0 : iconConfig.src) || (iconConfig === null || iconConfig === void 0 ? void 0 : iconConfig.srcSet)) {
35
36
  return (react_1.default.createElement(Image_1.Image, { src: iconConfig === null || iconConfig === void 0 ? void 0 : iconConfig.src, srcSet: iconConfig === null || iconConfig === void 0 ? void 0 : iconConfig.srcSet, alt: `${entityType} icon`, width: "16", height: "16" }));
36
37
  }
37
- return react_1.default.createElement(CodeIcon_1.CodeIcon, { color: "var(--catalog-entity-icon-color)" }); // @TODO: add default icon
38
+ return react_1.default.createElement(CubeIcon_1.CubeIcon, { color: "var(--catalog-entity-icon-color)" });
38
39
  };
39
40
  function CatalogEntityIcon({ entityType, defaultColor = false, forceColor, }) {
40
41
  const themeConfig = (0, core_1.useThemeConfig)();
@@ -17,6 +17,10 @@ const filterComponents = {
17
17
  function CatalogFilter({ filter, filterValuesCasing, showCounter = true, className, }) {
18
18
  if (!filter.parentUsed)
19
19
  return null;
20
+ const filteredOptions = filter.filteredOptions || filter.options;
21
+ if (!filteredOptions || filteredOptions.length === 0) {
22
+ return null;
23
+ }
20
24
  const FilterComponent = filterComponents[(filter.type || 'checkboxes')];
21
25
  return (react_1.default.createElement(CatalogFilterGroup, { className: className, "data-component-name": "Catalog/CatalogFilter", key: filter.property + filter.title },
22
26
  react_1.default.createElement(FilterComponent, { filter: filter, filterValuesCasing: filterValuesCasing, showCounter: showCounter })));
@@ -14,7 +14,7 @@ function CatalogTagsWithTooltip({ items, itemsToShow = 1, showPlaceholder = true
14
14
  if (!items || items.length === 0) {
15
15
  if (showPlaceholder) {
16
16
  return (react_1.default.createElement(CatalogTagsWrapper, { "data-component-name": "Catalog/CatalogTagsWithTooltip" },
17
- react_1.default.createElement(Tag_1.Tag, { variant: "outline", style: { backgroundColor: 'var(--catalog-tags-placeholder-bg-color)' }, color: "grey" }, "N/A")));
17
+ react_1.default.createElement(Tag_1.Tag, { style: { backgroundColor: 'var(--catalog-tags-placeholder-bg-color)' }, color: "grey" }, "N/A")));
18
18
  }
19
19
  return null;
20
20
  }
@@ -99,7 +99,7 @@ exports.catalog = (0, styled_components_1.css) `
99
99
  /**
100
100
  * @tokens Catalog entity icon
101
101
  */
102
- --catalog-entity-icon-color: var(--color-primary-base);
102
+ --catalog-entity-icon-color: var(--color-persian-green-8);
103
103
  --catalog-entity-border-color: var(--border-color-secondary);
104
104
  --catalog-entity-bg-color: var(--bg-color-tonal);
105
105
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { PropsWithChildren, JSX } from 'react';
2
+ import type { PropsWithChildren } from 'react';
3
3
  export type DropdownProps = PropsWithChildren<{
4
4
  trigger: React.ReactNode;
5
5
  triggerEvent?: 'click' | 'hover';
@@ -13,4 +13,18 @@ export type DropdownProps = PropsWithChildren<{
13
13
  onClick?: (event: React.UIEvent) => void;
14
14
  onClose?: () => void;
15
15
  }>;
16
- export declare function Dropdown({ children, className, active, trigger, triggerEvent, closeOnClick, withArrow, dataAttributes, placement, alignment, onClick, onClose, }: DropdownProps): JSX.Element;
16
+ export declare const Dropdown: React.ForwardRefExoticComponent<{
17
+ trigger: React.ReactNode;
18
+ triggerEvent?: "click" | "hover";
19
+ placement?: "top" | "bottom";
20
+ alignment?: "start" | "end";
21
+ active?: boolean;
22
+ closeOnClick?: boolean;
23
+ dataAttributes?: Record<string, string>;
24
+ className?: string;
25
+ withArrow?: boolean;
26
+ onClick?: (event: React.UIEvent) => void;
27
+ onClose?: () => void;
28
+ } & {
29
+ children?: React.ReactNode | undefined;
30
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -36,13 +36,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Dropdown = Dropdown;
39
+ exports.Dropdown = void 0;
40
40
  const react_1 = __importStar(require("react"));
41
41
  const styled_components_1 = __importDefault(require("styled-components"));
42
42
  const hooks_1 = require("../../core/hooks");
43
43
  const ChevronDownIcon_1 = require("../../icons/ChevronDownIcon/ChevronDownIcon");
44
44
  const ChevronUpIcon_1 = require("../../icons/ChevronUpIcon/ChevronUpIcon");
45
- function Dropdown({ children, className, active, trigger, triggerEvent = 'click', closeOnClick = true, withArrow, dataAttributes, placement, alignment, onClick, onClose, }) {
45
+ exports.Dropdown = (0, react_1.forwardRef)(({ children, className, active, trigger, triggerEvent = 'click', closeOnClick = true, withArrow, dataAttributes, placement, alignment, onClick, onClose, }, ref) => {
46
46
  const dropdownRef = (0, react_1.useRef)(null);
47
47
  const [isOpen, setIsOpen] = (0, hooks_1.useControlledState)(false, active);
48
48
  const handleOpen = () => {
@@ -65,13 +65,13 @@ function Dropdown({ children, className, active, trigger, triggerEvent = 'click'
65
65
  handleToggle(event);
66
66
  }
67
67
  };
68
- (0, hooks_1.useOutsideClick)(dropdownRef, handleClose);
68
+ (0, hooks_1.useOutsideClick)(ref || dropdownRef, handleClose);
69
69
  const triggerChild = react_1.default.Children.only(trigger);
70
70
  const dropdownTrigger = (0, react_1.cloneElement)(triggerChild, Object.assign(Object.assign(Object.assign({ onClick: triggerEvent === 'click' ? handleToggle : undefined, icon: withArrow ? isOpen ? react_1.default.createElement(ChevronUpIcon_1.ChevronUpIcon, null) : react_1.default.createElement(ChevronDownIcon_1.ChevronDownIcon, null) : undefined }, (withArrow ? { iconPosition: 'right' } : {})), triggerChild.props), { onKeyDown: triggerEvent === 'click' ? handleKeyDown : undefined }));
71
- return (react_1.default.createElement(DropdownWrapper, Object.assign({ "data-component-name": "Dropdown/Dropdown", "data-testid": "dropdown" }, dataAttributes, { className: className, ref: dropdownRef, onPointerEnter: triggerEvent === 'hover' ? handleOpen : undefined, onPointerLeave: triggerEvent === 'hover' ? handleClose : undefined, onClick: onClick }),
71
+ return (react_1.default.createElement(DropdownWrapper, Object.assign({ "data-component-name": "Dropdown/Dropdown", "data-testid": "dropdown" }, dataAttributes, { className: className, ref: ref || dropdownRef, onPointerEnter: triggerEvent === 'hover' ? handleOpen : undefined, onPointerLeave: triggerEvent === 'hover' ? handleClose : undefined, onClick: onClick }),
72
72
  dropdownTrigger,
73
73
  react_1.default.createElement(ChildrenWrapper, { placement: placement, alignment: alignment, isOpen: isOpen, onClick: closeOnClick ? handleChildClick : undefined }, children)));
74
- }
74
+ });
75
75
  const DropdownWrapper = styled_components_1.default.div `
76
76
  --button-gap: var(--spacing-xxs);
77
77
 
@@ -10,5 +10,6 @@ export type LinkProps = {
10
10
  languageInsensitive?: boolean;
11
11
  onClick?: () => void;
12
12
  [key: string]: unknown;
13
+ rel?: string;
13
14
  };
14
15
  export declare function Link(props: React.PropsWithChildren<LinkProps>): JSX.Element;
@@ -81,7 +81,7 @@ function MenuItem(props) {
81
81
  };
82
82
  const chevron = hasChevron ? (isExpanded ? (react_1.default.createElement(ChevronDownIcon_1.ChevronDownIcon, { size: "var(--menu-item-label-chevron-size)", color: "--tree-content-color-default" })) : (react_1.default.createElement(ChevronRightIcon_1.ChevronRightIcon, { size: "var(--menu-item-label-chevron-size)", color: "--tree-content-color-default" }))) : null;
83
83
  const httpColor = item.deprecated ? 'http-deprecated' : item.httpVerb;
84
- const label = item.label && (react_1.default.createElement(MenuItemLabelWrapper, { active: item.active, deprecated: item.deprecated, depth: depth, withChevron: hasChevron, isSeparator: isSeparator, onClick: handleOnClick, onKeyDown: handleExpandOnEnter, ref: labelRef, role: item.link ? 'none' : 'link', tabIndex: !item.link ? 0 : undefined, "data-testid": "menu-item-label" },
84
+ const label = item.label && (react_1.default.createElement(MenuItemLabelWrapper, { active: item.active, deprecated: item.deprecated, depth: depth, withChevron: hasChevron, isSeparator: isSeparator, onClick: handleOnClick, onKeyDown: handleExpandOnEnter, ref: labelRef, role: item.link ? 'none' : 'link', tabIndex: !item.link ? 0 : undefined, "data-testid": "menu-item-label", "data-active": item.active },
85
85
  hasChevron ? react_1.default.createElement(ChevronWrapper, null, chevron) : null,
86
86
  react_1.default.createElement(MenuItemIcon, { icon: item.icon, srcSet: item.srcSet }),
87
87
  react_1.default.createElement(MenuItemLabelTextWrapper, null,
@@ -24,9 +24,9 @@ function NavbarItem({ navItem, className }) {
24
24
  if (navItem.type !== 'link' && !navItem.items)
25
25
  return null;
26
26
  const item = navItem;
27
- const normalizedPath = (item.link && item.link !== '/' ? (0, utils_1.removeTrailingSlash)(item.link) : item.link) || '';
28
- const isActive = pathname ===
29
- (0, utils_1.withPathPrefix)((0, utils_1.getPathnameForLocale)(normalizedPath, defaultLocale, currentLocale, locales));
27
+ const normalizedPath = (item.link ? (0, utils_1.removeTrailingSlash)(item.link) : item.link) || '';
28
+ const pathWithPathPrefix = (0, utils_1.withPathPrefix)((0, utils_1.getPathnameForLocale)(normalizedPath, defaultLocale, currentLocale, locales));
29
+ const isActive = (0, utils_1.removeTrailingSlash)(pathname) === (0, utils_1.removeTrailingSlash)(pathWithPathPrefix);
30
30
  const itemContent = (react_1.default.createElement(NavbarMenuItem, { as: item.link ? Link_1.Link : undefined, active: isActive, className: className, onClick: () => telemetry.sendNavbarMenuItemClickedMessage({ type: item.type }), external: item.external, target: item.target, to: item.link },
31
31
  react_1.default.createElement(NavbarIcon, { icon: item.icon, srcSet: item.srcSet }),
32
32
  react_1.default.createElement(NavbarLabel, { "data-translation-key": item.labelTranslationKey }, translate(item.labelTranslationKey, item.label)),
@@ -86,7 +86,7 @@ function PageActions(props) {
86
86
  react_1.default.createElement(ButtonGroup_1.ButtonGroup, { variant: "outlined", size: "medium" },
87
87
  react_1.default.createElement(Button_1.Button, { icon: renderIcon(buttonAction, actionState), to: 'link' in buttonAction ? buttonAction.link : undefined, external: true, onClick: () => handleActionClick(buttonAction) }, buttonAction.buttonText),
88
88
  actions.length > 1 ? (react_1.default.createElement(Dropdown_1.Dropdown, { withArrow: true, trigger: react_1.default.createElement(Button_1.Button, null), placement: "bottom", alignment: "end" },
89
- react_1.default.createElement(DropdownMenu_1.DropdownMenu, { items: menuItems }))) : null)));
89
+ react_1.default.createElement(StyledDropdownMenu, { items: menuItems }))) : null)));
90
90
  }
91
91
  function renderIcon(buttonAction, actionState) {
92
92
  switch (actionState) {
@@ -111,4 +111,7 @@ const LinkMenuItem = (0, styled_components_1.default)(Link_1.Link) `
111
111
  text-decoration: none;
112
112
  --link-decoration-hover: none;
113
113
  `;
114
+ const StyledDropdownMenu = (0, styled_components_1.default)(DropdownMenu_1.DropdownMenu) `
115
+ --dropdown-menu-max-height: var(--page-actions-dropdown-max-height);
116
+ `;
114
117
  //# sourceMappingURL=PageActions.js.map
@@ -9,6 +9,8 @@ exports.pageActions = (0, styled_components_1.css) `
9
9
  --page-actions-button-text-color: var(--text-color-secondary);
10
10
  --page-actions-button-padding: 5px 14px 5px var(--spacing-sm);
11
11
 
12
+ --page-actions-dropdown-max-height: fit-content;
13
+
12
14
  --page-actions-menu-item-padding: 3px 0;
13
15
  --page-actions-menu-item-gap: var(--spacing-xs);
14
16
  --page-actions-menu-item-icon-color: var(--icon-color-secondary);
@@ -23,7 +23,7 @@ function SearchFilterFieldTags({ className, facet, selectedValues, onChange, })
23
23
  if (e.key === 'Enter') {
24
24
  updateSelectedValues();
25
25
  }
26
- }, active: active, borderless: true },
26
+ }, active: active, borderless: true, selectable: true },
27
27
  value,
28
28
  " ",
29
29
  isCounterVisible && react_1.default.createElement("span", null, count)));
@@ -37,7 +37,6 @@ const FilterTagsWrapper = styled_components_1.default.div `
37
37
  const FilterTagWrapper = (0, styled_components_1.default)(Tag_1.Tag) `
38
38
  text-transform: uppercase;
39
39
  cursor: pointer;
40
- ${({ color }) => color && `background-color: var(--tag-operation-bg-color-${color});`}
41
40
  margin: var(--search-filter-field-tags-tag-margin);
42
41
  `;
43
42
  //# sourceMappingURL=SearchFilterFieldTags.js.map
@@ -0,0 +1,10 @@
1
+ import type { JSX } from 'react';
2
+ import { FeedbackType } from '../../core/types';
3
+ export type SearchAiActionButtonsProps = {
4
+ content: string;
5
+ className?: string;
6
+ feedback?: FeedbackType;
7
+ onFeedback: (feedback: FeedbackType) => void;
8
+ disabled?: boolean;
9
+ };
10
+ export declare function SearchAiActionButtons({ content, className, feedback, onFeedback, disabled, }: SearchAiActionButtonsProps): JSX.Element;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SearchAiActionButtons = SearchAiActionButtons;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const types_1 = require("../../core/types");
10
+ const Button_1 = require("../../components/Button/Button");
11
+ const ThumbUpIcon_1 = require("../../icons/ThumbUpIcon/ThumbUpIcon");
12
+ const ThumbUpFilledIcon_1 = require("../../icons/ThumbUpFilledIcon/ThumbUpFilledIcon");
13
+ const ThumbDownIcon_1 = require("../../icons/ThumbDownIcon/ThumbDownIcon");
14
+ const ThumbDownFilledIcon_1 = require("../../icons/ThumbDownFilledIcon/ThumbDownFilledIcon");
15
+ const CopyButton_1 = require("../../components/Buttons/CopyButton");
16
+ function SearchAiActionButtons({ content, className, feedback, onFeedback, disabled, }) {
17
+ return (react_1.default.createElement(ActionButtonsWrapper, { className: className, "data-component-name": "Search/SearchAiActionButtons" },
18
+ react_1.default.createElement(CopyButton_1.CopyButton, { data: content }),
19
+ react_1.default.createElement(FeedbackButton, { variant: "text", size: "small", icon: feedback === types_1.FeedbackType.Like ? react_1.default.createElement(ThumbUpFilledIcon_1.ThumbUpFilledIcon, null) : react_1.default.createElement(ThumbUpIcon_1.ThumbUpIcon, null), onClick: () => !disabled && onFeedback(types_1.FeedbackType.Like), extraClass: feedback === types_1.FeedbackType.Like ? 'active' : '', "aria-label": "Like this response", disabled: disabled }),
20
+ react_1.default.createElement(FeedbackButton, { variant: "text", size: "small", icon: feedback === types_1.FeedbackType.Dislike ? react_1.default.createElement(ThumbDownFilledIcon_1.ThumbDownFilledIcon, null) : react_1.default.createElement(ThumbDownIcon_1.ThumbDownIcon, null), onClick: () => !disabled && onFeedback(types_1.FeedbackType.Dislike), extraClass: feedback === types_1.FeedbackType.Dislike ? 'active' : '', "aria-label": "Dislike this response", disabled: disabled })));
21
+ }
22
+ const ActionButtonsWrapper = styled_components_1.default.div `
23
+ display: flex;
24
+ align-items: center;
25
+ gap: var(--search-ai-feedback-gap);
26
+ `;
27
+ const FeedbackButton = (0, styled_components_1.default)(Button_1.Button) `
28
+ &:disabled {
29
+ pointer-events: none;
30
+ cursor: default;
31
+ opacity: 1;
32
+ background-color: var(--button-bg-color);
33
+ color: var(--button-color);
34
+ border-color: var(--button-border-color);
35
+ }
36
+
37
+ &:disabled.active {
38
+ background-color: var(--button-bg-color-active);
39
+ border-color: var(--button-border-color-active);
40
+ color: var(--button-color-active);
41
+ }
42
+ `;
43
+ //# sourceMappingURL=SearchAiActionButtons.js.map
@@ -4,6 +4,8 @@ type SearchAiConversationInputProps = {
4
4
  isGeneratingResponse: boolean;
5
5
  placeholder?: string;
6
6
  className?: string;
7
+ disabled?: boolean;
8
+ multiline?: boolean;
7
9
  };
8
- export declare function SearchAiConversationInput({ isGeneratingResponse, onMessageSent, className, placeholder, }: SearchAiConversationInputProps): JSX.Element;
10
+ export declare function SearchAiConversationInput({ isGeneratingResponse, onMessageSent, className, placeholder, disabled, multiline, }: SearchAiConversationInputProps): JSX.Element;
9
11
  export {};