@redocly/theme 0.69.0-next.1 → 0.69.0-next.10
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.
- package/lib/components/Accordion/Accordion.js +5 -1
- package/lib/components/Accordion/variables.js +1 -1
- package/lib/components/Admonition/Admonition.d.ts +1 -1
- package/lib/components/Admonition/Admonition.js +1 -1
- package/lib/components/Admonition/variables.dark.js +2 -2
- package/lib/components/Admonition/variables.js +10 -10
- package/lib/components/Badge/Badge.d.ts +3 -1
- package/lib/components/Badge/Badge.js +7 -2
- package/lib/components/Banner/variables.dark.js +2 -0
- package/lib/components/Banner/variables.js +3 -1
- package/lib/components/Breadcrumbs/Breadcrumb.js +1 -1
- package/lib/components/Breadcrumbs/variables.js +1 -1
- package/lib/components/Button/ButtonGroup.d.ts +3 -5
- package/lib/components/Button/ButtonGroup.js +25 -5
- package/lib/components/Button/variables.js +27 -4
- package/lib/components/Buttons/ConnectMCPButton.js +39 -123
- package/lib/components/Buttons/CopyButton.js +12 -1
- package/lib/components/Buttons/variables.d.ts +0 -1
- package/lib/components/Buttons/variables.js +3 -44
- package/lib/components/Catalog/CatalogEntities.js +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +5 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.js +1 -0
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
- package/lib/components/Catalog/CatalogViewModeToggle.js +2 -43
- package/lib/components/Catalog/variables.js +5 -5
- package/lib/components/CatalogClassic/variables.js +2 -2
- package/lib/components/CodeBlock/CodeBlock.js +2 -1
- package/lib/components/CodeBlock/CodeBlockContainer.js +1 -0
- package/lib/components/Dropdown/Dropdown.d.ts +10 -20
- package/lib/components/Dropdown/Dropdown.js +13 -2
- package/lib/components/Dropdown/DropdownMenuItemContent.d.ts +9 -0
- package/lib/components/Dropdown/DropdownMenuItemContent.js +56 -0
- package/lib/components/Dropdown/variables.js +19 -2
- package/lib/components/Feedback/Mood.js +18 -14
- package/lib/components/Feedback/Rating.js +18 -13
- package/lib/components/Feedback/Scale.js +27 -22
- package/lib/components/Feedback/Sentiment.js +17 -13
- package/lib/components/Filter/FilterInput.js +4 -2
- package/lib/components/Filter/FilterSelect.js +1 -0
- package/lib/components/Filter/variables.js +2 -2
- package/lib/components/Image/variables.js +5 -3
- package/lib/components/JsonViewer/Helpers.js +12 -42
- package/lib/components/LanguagePicker/variables.js +1 -1
- package/lib/components/MCP/McpConnectionTabs.d.ts +7 -0
- package/lib/components/MCP/McpConnectionTabs.js +151 -0
- package/lib/components/Markdown/styles/base-table.js +8 -0
- package/lib/components/Markdown/variables.js +1 -1
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/Menu/variables.js +1 -1
- package/lib/components/Navbar/variables.js +1 -1
- package/lib/components/PageActions/PageActions.js +4 -6
- package/lib/components/PageActions/PageActionsMenuItem.d.ts +4 -4
- package/lib/components/PageActions/PageActionsMenuItem.js +27 -43
- package/lib/components/Panel/Panel.js +5 -1
- package/lib/components/Panel/variables.js +1 -1
- package/lib/components/Product/variables.js +2 -1
- package/lib/components/ReplayGate/ReplayGate.d.ts +1 -0
- package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +22 -32
- package/lib/components/Search/SearchAiDialog.js +4 -1
- package/lib/components/Search/SearchAiMessage.js +1 -1
- package/lib/components/Search/SearchAiNegativeFeedbackForm.js +2 -2
- package/lib/components/Search/SearchDialog.js +2 -2
- package/lib/components/Search/SearchItem.js +6 -3
- package/lib/components/Search/SearchRecent.js +1 -0
- package/lib/components/Search/SearchSuggestedPages.js +1 -0
- package/lib/components/Search/variables.js +9 -5
- package/lib/components/Segmented/Segmented.js +3 -3
- package/lib/components/Select/Select.js +30 -23
- package/lib/components/Select/variables.js +3 -3
- package/lib/components/Sidebar/Sidebar.js +2 -38
- package/lib/components/SplitButton/SplitButton.d.ts +21 -0
- package/lib/components/SplitButton/SplitButton.js +37 -0
- package/lib/components/Switch/variables.dark.js +2 -2
- package/lib/components/Switch/variables.js +2 -2
- package/lib/components/Tag/variables.js +2 -2
- package/lib/components/Tags/variables.js +1 -1
- package/lib/components/Toast/variables.js +1 -1
- package/lib/components/Tooltip/AnchorTooltip.js +2 -2
- package/lib/components/Tooltip/JsTooltip.js +2 -2
- package/lib/components/UserMenu/variables.js +1 -1
- package/lib/core/constants/mcp.d.ts +4 -0
- package/lib/core/constants/mcp.js +10 -1
- package/lib/core/constants/search.js +2 -2
- package/lib/core/contexts/PageActionsContext.d.ts +5 -0
- package/lib/core/contexts/PageActionsContext.js +10 -0
- package/lib/core/contexts/index.d.ts +1 -0
- package/lib/core/contexts/index.js +1 -0
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +5 -17
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +1 -0
- package/lib/core/hooks/menu/use-menu-item-expanded.js +1 -0
- package/lib/core/hooks/use-active-heading.js +59 -15
- package/lib/core/hooks/use-active-section-id.js +3 -1
- package/lib/core/hooks/use-connect-mcp-button.d.ts +1 -1
- package/lib/core/hooks/use-connect-mcp-button.js +16 -13
- package/lib/core/hooks/use-control.js +3 -0
- package/lib/core/hooks/use-local-state.js +1 -0
- package/lib/core/hooks/use-mcp-config.d.ts +2 -0
- package/lib/core/hooks/use-mcp-config.js +14 -4
- package/lib/core/hooks/use-mobile-menu.js +10 -2
- package/lib/core/styles/global.js +16 -11
- package/lib/core/styles/palette.js +2 -0
- package/lib/core/types/button-group.d.ts +2 -0
- package/lib/core/types/button-group.js +3 -0
- package/lib/core/types/catalog.d.ts +2 -4
- package/lib/core/types/common.d.ts +2 -0
- package/lib/core/types/hooks.d.ts +1 -0
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/mcp.d.ts +1 -1
- package/lib/core/utils/RenderWithLink.d.ts +2 -0
- package/lib/core/utils/RenderWithLink.js +20 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/mcp.d.ts +5 -0
- package/lib/core/utils/mcp.js +35 -0
- package/lib/icons/CodexIcon/CodexIcon.d.ts +25 -0
- package/lib/icons/CodexIcon/CodexIcon.js +22 -0
- package/lib/icons/LinkIcon/LinkIcon.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/layouts/McpNotAllowed.js +10 -10
- package/lib/markdoc/components/Cards/Card.d.ts +8 -1
- package/lib/markdoc/components/Cards/Card.js +55 -16
- package/lib/markdoc/components/Cards/CardBadge.d.ts +9 -0
- package/lib/markdoc/components/Cards/CardBadge.js +30 -0
- package/lib/markdoc/components/Cards/CardIcon.d.ts +5 -4
- package/lib/markdoc/components/Cards/CardIcon.js +6 -3
- package/lib/markdoc/components/Cards/variables.dark.js +32 -0
- package/lib/markdoc/components/Cards/variables.js +81 -7
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +1 -0
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/variables.js +2 -1
- package/lib/markdoc/components/Heading/Heading.js +5 -2
- package/lib/markdoc/components/Tabs/TabList.js +6 -2
- package/lib/markdoc/components/Tabs/Tabs.js +4 -2
- package/lib/markdoc/components/Tabs/variables.js +4 -4
- package/lib/markdoc/tags/admonition.js +1 -1
- package/lib/markdoc/tags/card.js +14 -0
- package/lib/markdoc/tags/connect-mcp.js +2 -1
- package/package.json +19 -10
- package/src/components/Accordion/Accordion.tsx +7 -3
- package/src/components/Accordion/variables.ts +1 -1
- package/src/components/Admonition/Admonition.tsx +2 -2
- package/src/components/Admonition/variables.dark.ts +2 -2
- package/src/components/Admonition/variables.ts +10 -10
- package/src/components/Badge/Badge.tsx +16 -2
- package/src/components/Banner/variables.dark.ts +2 -0
- package/src/components/Banner/variables.ts +3 -1
- package/src/components/Breadcrumbs/Breadcrumb.tsx +1 -1
- package/src/components/Breadcrumbs/variables.ts +1 -1
- package/src/components/Button/ButtonGroup.tsx +28 -10
- package/src/components/Button/variables.ts +27 -4
- package/src/components/Buttons/ConnectMCPButton.tsx +88 -145
- package/src/components/Buttons/CopyButton.tsx +14 -2
- package/src/components/Buttons/variables.ts +2 -44
- package/src/components/Catalog/CatalogEntities.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +6 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterSelect.tsx +1 -0
- package/src/components/Catalog/CatalogViewModeToggle.tsx +2 -17
- package/src/components/Catalog/variables.ts +5 -5
- package/src/components/CatalogClassic/variables.ts +2 -2
- package/src/components/CodeBlock/CodeBlock.tsx +2 -1
- package/src/components/CodeBlock/CodeBlockContainer.tsx +1 -0
- package/src/components/Dropdown/Dropdown.tsx +25 -4
- package/src/components/Dropdown/DropdownMenuItemContent.tsx +72 -0
- package/src/components/Dropdown/variables.ts +19 -2
- package/src/components/Feedback/Mood.tsx +22 -15
- package/src/components/Feedback/Rating.tsx +22 -14
- package/src/components/Feedback/Scale.tsx +40 -32
- package/src/components/Feedback/Sentiment.tsx +21 -14
- package/src/components/Filter/FilterInput.tsx +5 -3
- package/src/components/Filter/FilterSelect.tsx +1 -0
- package/src/components/Filter/variables.ts +2 -2
- package/src/components/Image/variables.ts +5 -3
- package/src/components/JsonViewer/Helpers.tsx +13 -9
- package/src/components/LanguagePicker/variables.ts +1 -1
- package/src/components/MCP/McpConnectionTabs.tsx +263 -0
- package/src/components/Markdown/styles/base-table.ts +8 -0
- package/src/components/Markdown/variables.ts +1 -1
- package/src/components/Menu/MenuItem.tsx +2 -2
- package/src/components/Menu/variables.ts +1 -1
- package/src/components/Navbar/variables.ts +1 -1
- package/src/components/PageActions/PageActions.tsx +22 -23
- package/src/components/PageActions/PageActionsMenuItem.tsx +41 -55
- package/src/components/Panel/Panel.tsx +7 -3
- package/src/components/Panel/variables.ts +1 -1
- package/src/components/Product/variables.ts +2 -1
- package/src/components/ReplayGate/ReplayGate.tsx +3 -0
- package/src/components/Search/FilterFields/SearchFilterFieldSelect.tsx +32 -40
- package/src/components/Search/SearchAiDialog.tsx +4 -1
- package/src/components/Search/SearchAiMessage.tsx +1 -1
- package/src/components/Search/SearchAiNegativeFeedbackForm.tsx +2 -2
- package/src/components/Search/SearchDialog.tsx +2 -2
- package/src/components/Search/SearchItem.tsx +7 -1
- package/src/components/Search/SearchRecent.tsx +1 -0
- package/src/components/Search/SearchSuggestedPages.tsx +1 -0
- package/src/components/Search/variables.ts +9 -5
- package/src/components/Segmented/Segmented.tsx +6 -3
- package/src/components/Select/Select.tsx +36 -22
- package/src/components/Select/variables.ts +3 -3
- package/src/components/Sidebar/Sidebar.tsx +2 -6
- package/src/components/SplitButton/SplitButton.tsx +95 -0
- package/src/components/Switch/variables.dark.ts +2 -2
- package/src/components/Switch/variables.ts +2 -2
- package/src/components/Tag/variables.ts +2 -2
- package/src/components/Tags/variables.ts +1 -1
- package/src/components/Toast/variables.ts +1 -1
- package/src/components/Tooltip/AnchorTooltip.tsx +2 -2
- package/src/components/Tooltip/JsTooltip.tsx +2 -2
- package/src/components/UserMenu/variables.ts +1 -1
- package/src/core/constants/mcp.ts +14 -0
- package/src/core/constants/search.ts +2 -2
- package/src/core/contexts/PageActionsContext.tsx +7 -0
- package/src/core/contexts/index.ts +1 -0
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +6 -20
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +1 -0
- package/src/core/hooks/menu/use-menu-item-expanded.ts +1 -0
- package/src/core/hooks/use-active-heading.ts +79 -15
- package/src/core/hooks/use-active-section-id.ts +3 -1
- package/src/core/hooks/use-connect-mcp-button.ts +23 -15
- package/src/core/hooks/use-control.ts +5 -1
- package/src/core/hooks/use-local-state.ts +1 -0
- package/src/core/hooks/use-mcp-config.ts +15 -4
- package/src/core/hooks/use-mobile-menu.ts +11 -3
- package/src/core/openapi/index.ts +1 -1
- package/src/core/styles/global.ts +17 -12
- package/src/core/styles/palette.ts +2 -0
- package/src/core/types/button-group.ts +2 -0
- package/src/core/types/catalog.ts +2 -4
- package/src/core/types/common.ts +3 -0
- package/src/core/types/hooks.ts +1 -0
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +29 -1
- package/src/core/types/mcp.ts +1 -1
- package/src/core/utils/RenderWithLink.tsx +19 -0
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/mcp.ts +39 -0
- package/src/icons/CodexIcon/CodexIcon.tsx +23 -0
- package/src/icons/LinkIcon/LinkIcon.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/layouts/McpNotAllowed.tsx +37 -11
- package/src/markdoc/components/Cards/Card.tsx +79 -14
- package/src/markdoc/components/Cards/CardBadge.tsx +39 -0
- package/src/markdoc/components/Cards/CardIcon.tsx +16 -5
- package/src/markdoc/components/Cards/variables.dark.ts +32 -0
- package/src/markdoc/components/Cards/variables.ts +81 -7
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +1 -0
- package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/variables.ts +2 -1
- package/src/markdoc/components/Heading/Heading.tsx +7 -4
- package/src/markdoc/components/Tabs/TabList.tsx +6 -2
- package/src/markdoc/components/Tabs/Tabs.tsx +4 -2
- package/src/markdoc/components/Tabs/variables.ts +4 -4
- package/src/markdoc/tags/admonition.ts +1 -1
- package/src/markdoc/tags/card.ts +14 -0
- package/src/markdoc/tags/connect-mcp.ts +3 -1
|
@@ -47,6 +47,11 @@ const ChevronRightIcon_1 = require("../../icons/ChevronRightIcon/ChevronRightIco
|
|
|
47
47
|
function Accordion({ expanded = true, isExpandable = true, renderChildrenHidden = false, header, className, children, onToggle, dataTestId, }) {
|
|
48
48
|
const [isExpanded, setExpanded] = (0, react_1.useState)(expanded);
|
|
49
49
|
const [animate, setAnimate] = (0, react_1.useState)(false);
|
|
50
|
+
const [prevExpanded, setPrevExpanded] = (0, react_1.useState)(expanded);
|
|
51
|
+
if (prevExpanded !== expanded) {
|
|
52
|
+
setPrevExpanded(expanded);
|
|
53
|
+
setExpanded(expanded);
|
|
54
|
+
}
|
|
50
55
|
const toggle = ({ target }) => {
|
|
51
56
|
if (target instanceof HTMLAnchorElement || !isExpandable)
|
|
52
57
|
return;
|
|
@@ -54,7 +59,6 @@ function Accordion({ expanded = true, isExpandable = true, renderChildrenHidden
|
|
|
54
59
|
setExpanded(!isExpanded);
|
|
55
60
|
onToggle === null || onToggle === void 0 ? void 0 : onToggle(!isExpanded);
|
|
56
61
|
};
|
|
57
|
-
(0, react_1.useEffect)(() => setExpanded(expanded), [expanded]);
|
|
58
62
|
return (react_1.default.createElement(AccordionWrapper, { className: className, "data-testid": dataTestId, "data-component-name": "Accordion/Accordion" },
|
|
59
63
|
header &&
|
|
60
64
|
(typeof header === 'function' ? (header({ expanded: isExpanded })) : (react_1.default.createElement(AccordionHeader_1.AccordionHeader, { "data-testid": "accordion-header", onClick: toggle, expanded: isExpanded, isExpandable: isExpandable },
|
|
@@ -14,7 +14,7 @@ exports.accordion = (0, styled_components_1.css) `
|
|
|
14
14
|
* @tokens Accordion common
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
--accordion-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
17
|
+
--accordion-border-radius: var(--border-radius-xl); // @presenter BorderRadius
|
|
18
18
|
--accordion-border: none; // @presenter Border
|
|
19
19
|
|
|
20
20
|
--accordion-line-height: var(--line-height-base); // @presenter LineHeight
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
3
|
type AdmonitionTypeProps = {
|
|
4
|
-
type: 'warning' | 'success' | 'danger' | 'info' | '
|
|
4
|
+
type: 'warning' | 'success' | 'danger' | 'info' | 'idea';
|
|
5
5
|
};
|
|
6
6
|
export type AdmonitionProps = Partial<AdmonitionTypeProps> & {
|
|
7
7
|
name?: string;
|
|
@@ -49,7 +49,7 @@ const IconsMap = {
|
|
|
49
49
|
success: CheckmarkOutlineIcon_1.CheckmarkOutlineIcon,
|
|
50
50
|
danger: ErrorIcon_1.ErrorIcon,
|
|
51
51
|
info: InformationIcon_1.InformationIcon,
|
|
52
|
-
|
|
52
|
+
idea: IdeaIcon_1.IdeaIcon,
|
|
53
53
|
};
|
|
54
54
|
function Admonition({ type = 'info', name, children, className, 'data-source': dataSource, 'data-hash': dataHash, }) {
|
|
55
55
|
const Icon = IconsMap[type] || IconsMap['info'];
|
|
@@ -15,7 +15,7 @@ exports.admonitionDarkMode = (0, styled_components_1.css) `
|
|
|
15
15
|
--admonition-success-bg-color: color-mix(in srgb, var(--color-green-1) 40%, transparent); // @presenter Color
|
|
16
16
|
--admonition-success-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-green-3) 40%, transparent); // @presenter Border
|
|
17
17
|
|
|
18
|
-
--admonition-
|
|
19
|
-
--admonition-
|
|
18
|
+
--admonition-idea-bg-color: color-mix(in srgb, var(--color-primary-bg, var(--admonition-default-bg-color-legacy)) 40%, transparent); // @presenter Color
|
|
19
|
+
--admonition-idea-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-primary-border, var(--admonition-default-border-color-legacy)) 40%, transparent); // @presenter Border
|
|
20
20
|
`;
|
|
21
21
|
//# sourceMappingURL=variables.dark.js.map
|
|
@@ -34,7 +34,7 @@ exports.admonition = (0, styled_components_1.css) `
|
|
|
34
34
|
* @tokens Admonition border
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
--admonition-border-radius: var(--border-radius-
|
|
37
|
+
--admonition-border-radius: var(--border-radius-xl); // @presenter BorderRadius
|
|
38
38
|
--admonition-border-style: var(--border-style);
|
|
39
39
|
--admonition-border-width: 1px;
|
|
40
40
|
|
|
@@ -92,17 +92,17 @@ exports.admonition = (0, styled_components_1.css) `
|
|
|
92
92
|
--admonition-success-border: var(--admonition-success-border-width) var(--admonition-success-border-style) var(--admonition-success-border-color); // @presenter Border
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* @tokens Admonition type
|
|
95
|
+
* @tokens Admonition type idea
|
|
96
96
|
*/
|
|
97
97
|
|
|
98
|
-
--admonition-
|
|
99
|
-
--admonition-
|
|
100
|
-
--admonition-
|
|
101
|
-
--admonition-
|
|
102
|
-
--admonition-
|
|
103
|
-
--admonition-
|
|
104
|
-
--admonition-
|
|
105
|
-
--admonition-
|
|
98
|
+
--admonition-idea-bg-color: var(--color-primary-bg, var(--admonition-default-bg-color-legacy)); // @presenter Color
|
|
99
|
+
--admonition-idea-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
100
|
+
--admonition-idea-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
101
|
+
--admonition-idea-icon-color: var(--color-primary-base, var(--admonition-default-icon-color-legacy)); // @presenter Color
|
|
102
|
+
--admonition-idea-border-color: var(--color-primary-border, var(--admonition-default-border-color-legacy)); // @presenter Color
|
|
103
|
+
--admonition-idea-border-style: var(--admonition-border-style); // @presenter Color
|
|
104
|
+
--admonition-idea-border-width: var(--admonition-border-width); // @presenter Color
|
|
105
|
+
--admonition-idea-border: var(--admonition-idea-border-width) var(--admonition-idea-border-style) var(--admonition-idea-border-color); // @presenter Border
|
|
106
106
|
|
|
107
107
|
// @tokens End
|
|
108
108
|
`;
|
|
@@ -5,5 +5,7 @@ export type BadgeProps = PropsWithChildren<{
|
|
|
5
5
|
key?: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
icon?: string;
|
|
8
|
+
/** Inline SVG content for the icon */
|
|
9
|
+
iconRawContent?: string;
|
|
8
10
|
}>;
|
|
9
|
-
export declare function Badge({ icon, children, deprecated, color, ...props }: BadgeProps): JSX.Element;
|
|
11
|
+
export declare function Badge({ icon, iconRawContent, children, deprecated, color, ...props }: BadgeProps): JSX.Element;
|
|
@@ -52,9 +52,9 @@ const react_1 = __importDefault(require("react"));
|
|
|
52
52
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
53
53
|
const GenericIcon_1 = require("../../icons/GenericIcon/GenericIcon");
|
|
54
54
|
function Badge(_a) {
|
|
55
|
-
var { icon, children, deprecated, color } = _a, props = __rest(_a, ["icon", "children", "deprecated", "color"]);
|
|
55
|
+
var { icon, iconRawContent, children, deprecated, color } = _a, props = __rest(_a, ["icon", "iconRawContent", "children", "deprecated", "color"]);
|
|
56
56
|
return (react_1.default.createElement(BadgeComponent, Object.assign({}, props, { $color: color, $deprecated: deprecated, "data-component-name": "Badge/Badge" }),
|
|
57
|
-
icon ? react_1.default.createElement(BadgeIcon, { icon: icon }) : null,
|
|
57
|
+
icon || iconRawContent ? react_1.default.createElement(BadgeIcon, { icon: icon, rawContent: iconRawContent }) : null,
|
|
58
58
|
children));
|
|
59
59
|
}
|
|
60
60
|
const BadgeComponent = styled_components_1.default.span `
|
|
@@ -82,5 +82,10 @@ const BadgeIcon = (0, styled_components_1.default)(GenericIcon_1.GenericIcon) `
|
|
|
82
82
|
margin-right: var(--spacing-xxs);
|
|
83
83
|
flex-shrink: 0;
|
|
84
84
|
vertical-align: middle;
|
|
85
|
+
|
|
86
|
+
/* For inline SVG to align properly */
|
|
87
|
+
svg {
|
|
88
|
+
display: block;
|
|
89
|
+
}
|
|
85
90
|
`;
|
|
86
91
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -10,7 +10,7 @@ exports.banner = (0, styled_components_1.css) `
|
|
|
10
10
|
--banner-button-size: 22px;
|
|
11
11
|
--banner-button-padding: 3px; // @presenter Spacing
|
|
12
12
|
--banner-button-font-size: var(--font-size-base);
|
|
13
|
-
--banner-button-border-radius: var(--border-radius);
|
|
13
|
+
--banner-button-border-radius: var(--border-radius-md);
|
|
14
14
|
--banner-button-padding-inline: 1px var(--spacing-sm);
|
|
15
15
|
--banner-button-line-height: var(--line-height-base); // @presenter LineHeight
|
|
16
16
|
--banner-button-icon-size: 14px;
|
|
@@ -49,5 +49,7 @@ exports.banner = (0, styled_components_1.css) `
|
|
|
49
49
|
--banner-error-link-color: var(--banner-error-text-color); // @presenter Color
|
|
50
50
|
--banner-error-link-decoration: underline 1px var(--banner-error-link-color);
|
|
51
51
|
--banner-error-link-decoration-hover: underline 2px var(--banner-error-link-color);
|
|
52
|
+
|
|
53
|
+
// @tokens End
|
|
52
54
|
`;
|
|
53
55
|
//# sourceMappingURL=variables.js.map
|
|
@@ -58,7 +58,7 @@ const baseBreadcrumbStyles = `
|
|
|
58
58
|
align-items: center;
|
|
59
59
|
gap: var(--breadcrumbs-gap);
|
|
60
60
|
padding: var(--breadcrumb-padding);
|
|
61
|
-
border-radius: var(--border-radius);
|
|
61
|
+
border-radius: var(--breadcrumbs-border-radius);
|
|
62
62
|
color: var(--breadcrumbs-text-color);
|
|
63
63
|
text-decoration: none;
|
|
64
64
|
|
|
@@ -15,7 +15,7 @@ exports.breadcrumbs = (0, styled_components_1.css) `
|
|
|
15
15
|
--breadcrumbs-icon-size: var(--font-size-base); // @presenter FontSize
|
|
16
16
|
--breadcrumbs-font-weight-active: var(--font-weight-medium); // @presenter FontWeight
|
|
17
17
|
|
|
18
|
-
--breadcrumbs-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
18
|
+
--breadcrumbs-border-radius: var(--border-radius-md); // @presenter BorderRadius
|
|
19
19
|
--breadcrumbs-gap: var(--spacing-xxs); // @presenter Spacing
|
|
20
20
|
|
|
21
21
|
--breadcrumbs-padding: 2px var(--spacing-xs); // @presenter Spacing
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
type
|
|
5
|
-
type ButtonGroupProps = {
|
|
3
|
+
import type { ButtonGroupSize, ButtonGroupVariant } from '../../core/types';
|
|
4
|
+
export type ButtonGroupProps = {
|
|
6
5
|
variant?: ButtonGroupVariant;
|
|
7
|
-
size?:
|
|
6
|
+
size?: ButtonGroupSize;
|
|
8
7
|
children: React.ReactNode;
|
|
9
8
|
className?: string;
|
|
10
9
|
};
|
|
11
10
|
export declare function ButtonGroup(props: ButtonGroupProps): JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -14,25 +14,45 @@ const ButtonGroupWrapper = styled_components_1.default.div `
|
|
|
14
14
|
display: flex;
|
|
15
15
|
line-height: var(--button-line-height);
|
|
16
16
|
|
|
17
|
-
.button
|
|
17
|
+
& > .button,
|
|
18
|
+
& > * > .button {
|
|
18
19
|
border-radius: 0;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
& > .button:first-child,
|
|
22
|
-
*:first-child > .button {
|
|
23
|
+
& > *:first-child > .button {
|
|
23
24
|
border-top-left-radius: var(--button-border-radius);
|
|
24
25
|
border-bottom-left-radius: var(--button-border-radius);
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
& > .button:last-child,
|
|
28
|
-
*:last-child > .button {
|
|
29
|
+
& > *:last-child > .button {
|
|
29
30
|
border-top-right-radius: var(--button-border-radius);
|
|
30
31
|
border-bottom-right-radius: var(--button-border-radius);
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
/* Adjacent segments share a single divider line: the leading segment drops its
|
|
35
|
+
own right border and the trailing one draws the divider as its left border. */
|
|
36
|
+
& > .button:not(:last-child),
|
|
37
|
+
& > *:not(:last-child) > .button {
|
|
38
|
+
border-right-style: none;
|
|
39
|
+
border-right-width: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
33
42
|
& > .button:not(:first-child),
|
|
34
|
-
*:not(:first-child) > .button {
|
|
35
|
-
border-left:
|
|
43
|
+
& > *:not(:first-child) > .button {
|
|
44
|
+
border-left-width: 1px;
|
|
45
|
+
border-left-style: solid;
|
|
46
|
+
border-left-color: color-mix(
|
|
47
|
+
in srgb,
|
|
48
|
+
var(--button-group-divider-color) calc(var(--button-group-divider-opacity) * 100%),
|
|
49
|
+
transparent
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& > .button:not(:first-child):disabled,
|
|
54
|
+
& > *:not(:first-child) > .button:disabled {
|
|
55
|
+
border-left-color: var(--button-group-divider-color-disabled);
|
|
36
56
|
}
|
|
37
57
|
`;
|
|
38
58
|
//# sourceMappingURL=ButtonGroup.js.map
|
|
@@ -70,7 +70,7 @@ exports.button = (0, styled_components_1.css) `
|
|
|
70
70
|
--button-font-weight: var(--font-weight-regular);
|
|
71
71
|
--button-font-size: var(--font-size-base);
|
|
72
72
|
--button-line-height: var(--line-height-base);
|
|
73
|
-
--button-border-radius: var(--border-radius-
|
|
73
|
+
--button-border-radius: var(--border-radius-lg);
|
|
74
74
|
--button-padding: 5px var(--spacing-sm);
|
|
75
75
|
--button-text-wrap: nowrap;
|
|
76
76
|
--button-gap: var(--spacing-xs);
|
|
@@ -96,7 +96,7 @@ exports.button = (0, styled_components_1.css) `
|
|
|
96
96
|
.button-size-small,
|
|
97
97
|
.button-group-size-small .button {
|
|
98
98
|
--button-font-size: var(--font-size-base);
|
|
99
|
-
--button-border-radius: var(--border-radius);
|
|
99
|
+
--button-border-radius: var(--border-radius-md);
|
|
100
100
|
--button-padding: 1px var(--spacing-sm);
|
|
101
101
|
--button-line-height: var(--line-height-base);
|
|
102
102
|
|
|
@@ -109,7 +109,7 @@ exports.button = (0, styled_components_1.css) `
|
|
|
109
109
|
.button-size-medium,
|
|
110
110
|
.button-group-size-medium .button {
|
|
111
111
|
--button-font-size: var(--font-size-base);
|
|
112
|
-
--button-border-radius: var(--border-radius-
|
|
112
|
+
--button-border-radius: var(--border-radius-lg);
|
|
113
113
|
--button-padding: 5px var(--spacing-sm);
|
|
114
114
|
--button-line-height: var(--line-height-base);
|
|
115
115
|
|
|
@@ -122,7 +122,7 @@ exports.button = (0, styled_components_1.css) `
|
|
|
122
122
|
.button-size-large,
|
|
123
123
|
.button-group-size-large .button {
|
|
124
124
|
--button-font-size: var(--font-size-lg); // @presenter FontSize
|
|
125
|
-
--button-border-radius: var(--border-radius-
|
|
125
|
+
--button-border-radius: var(--border-radius-xl);
|
|
126
126
|
--button-padding: var(--spacing-xs) var(--spacing-md);
|
|
127
127
|
--button-line-height: var(--line-height-lg); // @presenter LineHeight
|
|
128
128
|
|
|
@@ -243,6 +243,29 @@ exports.button = (0, styled_components_1.css) `
|
|
|
243
243
|
--button-icon-right-padding: 0;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* @tokens Button group divider
|
|
248
|
+
*/
|
|
249
|
+
|
|
250
|
+
--button-group-divider-color: transparent;
|
|
251
|
+
--button-group-divider-opacity: 1;
|
|
252
|
+
--button-group-divider-color-disabled: var(--color-warm-grey-2); // @presenter Color
|
|
253
|
+
|
|
254
|
+
.button-group-primary {
|
|
255
|
+
--button-group-divider-color: var(--button-content-color-inverse); // @presenter Color
|
|
256
|
+
--button-group-divider-opacity: 0.32;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.button-group-secondary {
|
|
260
|
+
--button-group-divider-color: var(--button-content-color); // @presenter Color
|
|
261
|
+
--button-group-divider-opacity: 0.12;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.button-group-outlined {
|
|
265
|
+
--button-group-divider-color: var(--button-border-color); // @presenter Color
|
|
266
|
+
--button-group-divider-opacity: 1;
|
|
267
|
+
}
|
|
268
|
+
|
|
246
269
|
// @tokens End
|
|
247
270
|
`;
|
|
248
271
|
//# sourceMappingURL=variables.js.map
|
|
@@ -1,54 +1,24 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
4
|
};
|
|
38
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
6
|
exports.ConnectMCPButton = ConnectMCPButton;
|
|
40
|
-
const react_1 =
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
41
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
42
9
|
const DropdownMenu_1 = require("../../components/Dropdown/DropdownMenu");
|
|
43
10
|
const DropdownMenuItem_1 = require("../../components/Dropdown/DropdownMenuItem");
|
|
11
|
+
const DropdownMenuItemContent_1 = require("../../components/Dropdown/DropdownMenuItemContent");
|
|
44
12
|
const Button_1 = require("../../components/Button/Button");
|
|
13
|
+
const SplitButton_1 = require("../../components/SplitButton/SplitButton");
|
|
45
14
|
const CursorIcon_1 = require("../../icons/CursorIcon/CursorIcon");
|
|
46
15
|
const VSCodeIcon_1 = require("../../icons/VSCodeIcon/VSCodeIcon");
|
|
16
|
+
const ClaudeIcon_1 = require("../../icons/ClaudeIcon/ClaudeIcon");
|
|
17
|
+
const CodexIcon_1 = require("../../icons/CodexIcon/CodexIcon");
|
|
47
18
|
const CopyIcon_1 = require("../../icons/CopyIcon/CopyIcon");
|
|
48
19
|
const CheckmarkFilledIcon_1 = require("../../icons/CheckmarkFilledIcon/CheckmarkFilledIcon");
|
|
49
|
-
const ChevronDownIcon_1 = require("../../icons/ChevronDownIcon/ChevronDownIcon");
|
|
50
|
-
const ChevronUpIcon_1 = require("../../icons/ChevronUpIcon/ChevronUpIcon");
|
|
51
20
|
const hooks_1 = require("../../core/hooks");
|
|
21
|
+
const constants_1 = require("../../core/constants");
|
|
52
22
|
const MENU_OPTIONS = [
|
|
53
23
|
{
|
|
54
24
|
key: 'cursor',
|
|
@@ -66,6 +36,22 @@ const MENU_OPTIONS = [
|
|
|
66
36
|
descriptionTranslationKey: 'page.actions.connectMcp.vscodeDescription',
|
|
67
37
|
descriptionDefault: 'Install MCP server on VS Code',
|
|
68
38
|
},
|
|
39
|
+
{
|
|
40
|
+
key: 'claude-code',
|
|
41
|
+
icon: ClaudeIcon_1.ClaudeIcon,
|
|
42
|
+
titleTranslationKey: 'page.actions.connectMcp.claudeCode',
|
|
43
|
+
titleDefault: 'Connect to Claude Code',
|
|
44
|
+
descriptionTranslationKey: 'page.actions.connectMcp.claudeCodeDescription',
|
|
45
|
+
descriptionDefault: 'Copy the Claude Code CLI command',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: 'codex',
|
|
49
|
+
icon: CodexIcon_1.CodexIcon,
|
|
50
|
+
titleTranslationKey: 'page.actions.connectMcp.codex',
|
|
51
|
+
titleDefault: 'Connect to Codex CLI',
|
|
52
|
+
descriptionTranslationKey: 'page.actions.connectMcp.codexDescription',
|
|
53
|
+
descriptionDefault: 'Copy the Codex CLI command',
|
|
54
|
+
},
|
|
69
55
|
{
|
|
70
56
|
key: 'copy',
|
|
71
57
|
icon: CopyIcon_1.CopyIcon,
|
|
@@ -75,104 +61,34 @@ const MENU_OPTIONS = [
|
|
|
75
61
|
descriptionDefault: 'Copy MCP JSON Configuration',
|
|
76
62
|
},
|
|
77
63
|
];
|
|
78
|
-
|
|
64
|
+
// Copy actions keep the dropdown open so the copied checkmark is visible.
|
|
65
|
+
const COPY_OPTIONS = ['claude-code', 'codex', 'copy'];
|
|
66
|
+
function ConnectMCPButton({ placement = 'bottom', alignment = 'end', options = constants_1.DEFAULT_MCP_OPTIONS, }) {
|
|
79
67
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
80
68
|
const { translate } = useTranslate();
|
|
81
|
-
const
|
|
82
|
-
const wrapperRef = (0, react_1.useRef)(null);
|
|
83
|
-
const { isCopied, visibleOptions, handleAction } = (0, hooks_1.useConnectMCPButton)({ options });
|
|
84
|
-
(0, hooks_1.useOutsideClick)(wrapperRef, () => setIsOpen(false));
|
|
69
|
+
const { copiedOption, visibleOptions, handleAction } = (0, hooks_1.useConnectMCPButton)({ options });
|
|
85
70
|
const menuOptions = MENU_OPTIONS.filter((option) => visibleOptions.includes(option.key));
|
|
86
71
|
const primaryOption = menuOptions[0];
|
|
87
72
|
const dropdownOptions = menuOptions.slice(1);
|
|
88
73
|
if (!primaryOption)
|
|
89
74
|
return null;
|
|
90
75
|
const PrimaryIcon = primaryOption.icon;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const Icon = option.icon;
|
|
105
|
-
const showCheckmark = option.key === 'copy' && isCopied;
|
|
106
|
-
return (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { key: option.key, onAction: () => handleMenuAction(option.key) },
|
|
107
|
-
react_1.default.createElement(MenuItemContent, null,
|
|
108
|
-
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))),
|
|
109
|
-
react_1.default.createElement(MenuItemText, null,
|
|
110
|
-
react_1.default.createElement(MenuItemTitle, null, translate(option.titleTranslationKey, option.titleDefault)),
|
|
111
|
-
react_1.default.createElement(MenuItemDescription, null, translate(option.descriptionTranslationKey, option.descriptionDefault))))));
|
|
112
|
-
}))))));
|
|
76
|
+
const showPrimaryCopied = copiedOption === primaryOption.key;
|
|
77
|
+
return (react_1.default.createElement(ConnectMCPButtonWrapper, { "data-component-name": "Buttons/ConnectMCPButton" }, react_1.default.createElement(SplitButton_1.SplitButton, { variant: "secondary", placement: placement, alignment: alignment, closeOnSelect: false, toggleAriaLabel: translate('page.actions.connectMcp.moreOptions', 'More options'), button: react_1.default.createElement(Button_1.Button, { variant: "secondary", icon: showPrimaryCopied ? (react_1.default.createElement(CheckmarkFilledIcon_1.CheckmarkFilledIcon, { color: "var(--color-success-base)" })) : (react_1.default.createElement(PrimaryIcon, null)), onClick: () => handleAction(primaryOption.key) }, translate(primaryOption.titleTranslationKey, primaryOption.titleDefault)) }, dropdownOptions.length > 0
|
|
78
|
+
? ({ close }) => (react_1.default.createElement(DropdownMenu_1.DropdownMenu, null, dropdownOptions.map((option) => {
|
|
79
|
+
const Icon = option.icon;
|
|
80
|
+
const showCheckmark = copiedOption === option.key;
|
|
81
|
+
return (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { key: option.key, onAction: () => {
|
|
82
|
+
handleAction(option.key);
|
|
83
|
+
if (!COPY_OPTIONS.includes(option.key)) {
|
|
84
|
+
close();
|
|
85
|
+
}
|
|
86
|
+
} }, react_1.default.createElement(DropdownMenuItemContent_1.DropdownMenuItemContent, { icon: showCheckmark ? (react_1.default.createElement(CheckmarkFilledIcon_1.CheckmarkFilledIcon, { color: "var(--color-success-base)" })) : (react_1.default.createElement(Icon, null)), title: translate(option.titleTranslationKey, option.titleDefault), description: translate(option.descriptionTranslationKey, option.descriptionDefault) })));
|
|
87
|
+
})))
|
|
88
|
+
: null)));
|
|
113
89
|
}
|
|
114
90
|
const ConnectMCPButtonWrapper = styled_components_1.default.div `
|
|
115
91
|
display: inline-block;
|
|
116
92
|
position: relative;
|
|
117
93
|
`;
|
|
118
|
-
const SplitButtonGroup = styled_components_1.default.div `
|
|
119
|
-
display: inline-flex;
|
|
120
|
-
align-items: stretch;
|
|
121
|
-
`;
|
|
122
|
-
const PrimaryButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
123
|
-
--button-gap: var(--connect-mcp-button-gap);
|
|
124
|
-
border-top-right-radius: 0;
|
|
125
|
-
border-bottom-right-radius: 0;
|
|
126
|
-
`;
|
|
127
|
-
const ChevronButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
128
|
-
border-top-left-radius: 0;
|
|
129
|
-
border-bottom-left-radius: 0;
|
|
130
|
-
border-left: none;
|
|
131
|
-
padding-inline: var(--connect-mcp-button-chevron-padding-inline);
|
|
132
|
-
`;
|
|
133
|
-
const DropdownWrapper = styled_components_1.default.div `
|
|
134
|
-
position: absolute;
|
|
135
|
-
top: ${({ $placement }) => ($placement === 'top' ? 'auto' : '100%')};
|
|
136
|
-
bottom: ${({ $placement }) => ($placement === 'top' ? '100%' : 'auto')};
|
|
137
|
-
left: ${({ $alignment }) => ($alignment === 'start' ? '0' : 'auto')};
|
|
138
|
-
right: ${({ $alignment }) => ($alignment === 'end' ? '0' : 'auto')};
|
|
139
|
-
padding-top: var(--dropdown-menu-padding-top);
|
|
140
|
-
z-index: var(--dropdown-menu-z-index);
|
|
141
|
-
`;
|
|
142
|
-
const MenuItemContent = styled_components_1.default.div `
|
|
143
|
-
display: flex;
|
|
144
|
-
align-items: center;
|
|
145
|
-
gap: var(--connect-mcp-button-menu-item-gap);
|
|
146
|
-
padding: var(--connect-mcp-button-menu-item-padding-block)
|
|
147
|
-
var(--connect-mcp-button-menu-item-padding-inline);
|
|
148
|
-
`;
|
|
149
|
-
const MenuItemIcon = styled_components_1.default.div `
|
|
150
|
-
display: flex;
|
|
151
|
-
align-items: center;
|
|
152
|
-
justify-content: center;
|
|
153
|
-
width: var(--connect-mcp-button-menu-item-icon-size);
|
|
154
|
-
height: var(--connect-mcp-button-menu-item-icon-size);
|
|
155
|
-
flex-shrink: 0;
|
|
156
|
-
border: var(--connect-mcp-button-menu-item-icon-border);
|
|
157
|
-
border-radius: var(--connect-mcp-button-menu-item-icon-border-radius);
|
|
158
|
-
color: var(--connect-mcp-button-menu-item-icon-color);
|
|
159
|
-
`;
|
|
160
|
-
const MenuItemText = styled_components_1.default.div `
|
|
161
|
-
display: flex;
|
|
162
|
-
flex-direction: column;
|
|
163
|
-
gap: var(--connect-mcp-button-menu-item-text-gap);
|
|
164
|
-
flex: 1;
|
|
165
|
-
`;
|
|
166
|
-
const MenuItemTitle = styled_components_1.default.div `
|
|
167
|
-
font-size: var(--connect-mcp-button-menu-item-title-font-size);
|
|
168
|
-
font-weight: var(--connect-mcp-button-menu-item-title-font-weight);
|
|
169
|
-
line-height: var(--connect-mcp-button-menu-item-title-line-height);
|
|
170
|
-
color: var(--connect-mcp-button-menu-item-title-color);
|
|
171
|
-
`;
|
|
172
|
-
const MenuItemDescription = styled_components_1.default.div `
|
|
173
|
-
font-size: var(--connect-mcp-button-menu-item-description-font-size);
|
|
174
|
-
font-weight: var(--connect-mcp-button-menu-item-description-font-weight);
|
|
175
|
-
line-height: var(--connect-mcp-button-menu-item-description-line-height);
|
|
176
|
-
color: var(--connect-mcp-button-menu-item-description-color);
|
|
177
|
-
`;
|
|
178
94
|
//# sourceMappingURL=ConnectMCPButton.js.map
|
|
@@ -44,9 +44,20 @@ function CopyButtonComponent({ data, type = 'icon', toasterPlacement = 'top', to
|
|
|
44
44
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
45
45
|
const tooltip = (0, hooks_1.useControl)();
|
|
46
46
|
const { translate } = useTranslate();
|
|
47
|
+
const closeTimerRef = (0, react_1.useRef)(null);
|
|
48
|
+
(0, react_1.useEffect)(() => {
|
|
49
|
+
return () => {
|
|
50
|
+
if (closeTimerRef.current) {
|
|
51
|
+
clearTimeout(closeTimerRef.current);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
47
55
|
const showTooltip = (duration = 1500) => {
|
|
48
56
|
tooltip.handleOpen();
|
|
49
|
-
|
|
57
|
+
if (closeTimerRef.current) {
|
|
58
|
+
clearTimeout(closeTimerRef.current);
|
|
59
|
+
}
|
|
60
|
+
closeTimerRef.current = setTimeout(() => {
|
|
50
61
|
tooltip.handleClose();
|
|
51
62
|
}, duration);
|
|
52
63
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.aiAssistantButton = void 0;
|
|
4
4
|
const styled_components_1 = require("styled-components");
|
|
5
5
|
/* eslint-disable theme/no-raw-colors-in-styles */
|
|
6
6
|
exports.aiAssistantButton = (0, styled_components_1.css) `
|
|
@@ -48,49 +48,8 @@ exports.aiAssistantButton = (0, styled_components_1.css) `
|
|
|
48
48
|
|
|
49
49
|
/* Transition */
|
|
50
50
|
--ai-assistant-button-transition: box-shadow 0.3s ease, transform 0.2s ease;
|
|
51
|
-
`;
|
|
52
|
-
/* eslint-enable theme/no-raw-colors-in-styles */
|
|
53
|
-
exports.connectMCPButton = (0, styled_components_1.css) `
|
|
54
|
-
/**
|
|
55
|
-
* @tokens Connect MCP Button
|
|
56
|
-
* @presenter Color
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
/* Button gap */
|
|
60
|
-
--connect-mcp-button-gap: var(--spacing-xs);
|
|
61
51
|
|
|
62
|
-
|
|
63
|
-
--connect-mcp-button-chevron-padding-inline: var(--spacing-xs);
|
|
64
|
-
|
|
65
|
-
/* Menu item layout */
|
|
66
|
-
--connect-mcp-button-menu-item-gap: var(--spacing-sm);
|
|
67
|
-
--connect-mcp-button-menu-item-padding-block: var(--spacing-xxs);
|
|
68
|
-
--connect-mcp-button-menu-item-padding-inline: 0;
|
|
69
|
-
|
|
70
|
-
/* Menu item icon */
|
|
71
|
-
--connect-mcp-button-menu-item-icon-size: 32px;
|
|
72
|
-
--connect-mcp-button-menu-item-icon-border-color: var(--border-color-secondary);
|
|
73
|
-
--connect-mcp-button-menu-item-icon-border-style: solid;
|
|
74
|
-
--connect-mcp-button-menu-item-icon-border-width: 1px;
|
|
75
|
-
--connect-mcp-button-menu-item-icon-border: var(--connect-mcp-button-menu-item-icon-border-width)
|
|
76
|
-
var(--connect-mcp-button-menu-item-icon-border-style)
|
|
77
|
-
var(--connect-mcp-button-menu-item-icon-border-color);
|
|
78
|
-
--connect-mcp-button-menu-item-icon-border-radius: var(--border-radius);
|
|
79
|
-
--connect-mcp-button-menu-item-icon-color: var(--icon-color-secondary);
|
|
80
|
-
|
|
81
|
-
/* Menu item text */
|
|
82
|
-
--connect-mcp-button-menu-item-text-gap: var(--spacing-xxs);
|
|
83
|
-
|
|
84
|
-
/* Menu item title */
|
|
85
|
-
--connect-mcp-button-menu-item-title-font-size: var(--font-size-base);
|
|
86
|
-
--connect-mcp-button-menu-item-title-font-weight: var(--font-weight-regular);
|
|
87
|
-
--connect-mcp-button-menu-item-title-line-height: var(--line-height-base);
|
|
88
|
-
--connect-mcp-button-menu-item-title-color: var(--text-color-secondary);
|
|
89
|
-
|
|
90
|
-
/* Menu item description */
|
|
91
|
-
--connect-mcp-button-menu-item-description-font-size: var(--font-size-sm);
|
|
92
|
-
--connect-mcp-button-menu-item-description-font-weight: var(--font-weight-regular);
|
|
93
|
-
--connect-mcp-button-menu-item-description-line-height: var(--line-height-sm);
|
|
94
|
-
--connect-mcp-button-menu-item-description-color: var(--text-color-description);
|
|
52
|
+
// @tokens End
|
|
95
53
|
`;
|
|
54
|
+
/* eslint-enable theme/no-raw-colors-in-styles */
|
|
96
55
|
//# sourceMappingURL=variables.js.map
|
|
@@ -70,6 +70,7 @@ function CatalogEntities(props) {
|
|
|
70
70
|
const shouldShowLoadMore = query.hasNextPage ||
|
|
71
71
|
(query.isPlaceholderData && entities && entities.length >= LOAD_MORE_THRESHOLD);
|
|
72
72
|
(0, react_1.useEffect)(() => {
|
|
73
|
+
// oxlint-disable-next-line react-you-might-not-need-an-effect/no-pass-data-to-parent -- the entities query lives in this ejectable component; the fetched total is mirrored up so the portal page header can show the count
|
|
73
74
|
setEntitiesCounter(total || 0);
|
|
74
75
|
}, [total, setEntitiesCounter]);
|
|
75
76
|
if (!query.isPending && (!entities || entities.length === 0)) {
|
|
@@ -29,7 +29,7 @@ function CatalogEntityLinks({ entity }) {
|
|
|
29
29
|
const LinksWrapper = styled_components_1.default.div `
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
|
-
border-radius: var(--border-radius);
|
|
32
|
+
border-radius: var(--border-radius-xl);
|
|
33
33
|
background-color: var(--catalog-metadata-bg-color);
|
|
34
34
|
transition: all 0.2s ease-in-out;
|
|
35
35
|
margin: var(--spacing-lg) 0;
|
|
@@ -90,7 +90,7 @@ const JsonViewerWrapper = (0, styled_components_1.default)(JsonViewer_1.JsonView
|
|
|
90
90
|
const MetadataWrapper = styled_components_1.default.div `
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
93
|
-
border-radius: var(--border-radius);
|
|
93
|
+
border-radius: var(--border-radius-xl);
|
|
94
94
|
background-color: var(--catalog-metadata-bg-color);
|
|
95
95
|
transition: all 0.2s ease-in-out;
|
|
96
96
|
margin-bottom: var(--spacing-base);
|