@redocly/theme 0.69.0-next.5 → 0.69.0-next.7
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/variables.js +1 -1
- package/lib/components/Admonition/variables.js +1 -1
- 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 +15 -128
- 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/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/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.js +1 -0
- 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/FilterSelect.js +1 -0
- package/lib/components/Filter/variables.js +2 -2
- package/lib/components/Image/variables.js +5 -3
- package/lib/components/LanguagePicker/variables.js +1 -1
- package/lib/components/Markdown/variables.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/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/SearchAiDialog.js +1 -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 +1 -0
- package/lib/components/Search/SearchRecent.js +1 -0
- package/lib/components/Search/SearchSuggestedPages.js +1 -0
- package/lib/components/Search/variables.js +8 -5
- package/lib/components/Segmented/Segmented.js +3 -3
- package/lib/components/Select/Select.js +20 -18
- package/lib/components/Select/variables.js +3 -3
- 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 +2 -0
- package/lib/core/constants/mcp.js +3 -1
- package/lib/core/constants/search.js +2 -2
- package/lib/core/hooks/use-control.js +3 -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/styles/global.js +11 -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 -6
- 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/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/icons/LinkIcon/LinkIcon.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/layouts/McpNotAllowed.js +5 -7
- package/lib/markdoc/components/Cards/variables.js +6 -4
- 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/Tabs/TabList.js +6 -2
- package/lib/markdoc/components/Tabs/Tabs.js +4 -2
- package/lib/markdoc/components/Tabs/variables.js +4 -4
- package/package.json +8 -8
- package/src/components/Accordion/variables.ts +1 -1
- package/src/components/Admonition/variables.ts +1 -1
- 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 +63 -150
- package/src/components/Buttons/CopyButton.tsx +14 -2
- package/src/components/Buttons/variables.ts +2 -44
- 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/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterSelect.tsx +1 -0
- 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/FilterSelect.tsx +1 -0
- package/src/components/Filter/variables.ts +2 -2
- package/src/components/Image/variables.ts +5 -3
- package/src/components/LanguagePicker/variables.ts +1 -1
- package/src/components/Markdown/variables.ts +1 -1
- 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/variables.ts +1 -1
- package/src/components/Product/variables.ts +2 -1
- package/src/components/ReplayGate/ReplayGate.tsx +3 -0
- package/src/components/Search/SearchAiDialog.tsx +1 -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 +1 -0
- package/src/components/Search/SearchRecent.tsx +1 -0
- package/src/components/Search/SearchSuggestedPages.tsx +1 -0
- package/src/components/Search/variables.ts +8 -5
- package/src/components/Segmented/Segmented.tsx +6 -3
- package/src/components/Select/Select.tsx +24 -16
- package/src/components/Select/variables.ts +3 -3
- 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 +4 -0
- package/src/core/constants/search.ts +2 -2
- package/src/core/hooks/use-control.ts +5 -1
- package/src/core/hooks/use-mcp-config.ts +15 -4
- package/src/core/openapi/index.ts +1 -1
- package/src/core/styles/global.ts +12 -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 -7
- 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 +8 -1
- package/src/core/utils/RenderWithLink.tsx +19 -0
- package/src/core/utils/index.ts +1 -0
- package/src/icons/LinkIcon/LinkIcon.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/layouts/McpNotAllowed.tsx +33 -9
- package/src/markdoc/components/Cards/variables.ts +6 -4
- 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/Tabs/TabList.tsx +6 -2
- package/src/markdoc/components/Tabs/Tabs.tsx +4 -2
- package/src/markdoc/components/Tabs/variables.ts +4 -4
|
@@ -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
|
|
@@ -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
|
|
|
@@ -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,55 +1,22 @@
|
|
|
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");
|
|
47
16
|
const ClaudeIcon_1 = require("../../icons/ClaudeIcon/ClaudeIcon");
|
|
48
17
|
const CodexIcon_1 = require("../../icons/CodexIcon/CodexIcon");
|
|
49
18
|
const CopyIcon_1 = require("../../icons/CopyIcon/CopyIcon");
|
|
50
19
|
const CheckmarkFilledIcon_1 = require("../../icons/CheckmarkFilledIcon/CheckmarkFilledIcon");
|
|
51
|
-
const ChevronDownIcon_1 = require("../../icons/ChevronDownIcon/ChevronDownIcon");
|
|
52
|
-
const ChevronUpIcon_1 = require("../../icons/ChevronUpIcon/ChevronUpIcon");
|
|
53
20
|
const hooks_1 = require("../../core/hooks");
|
|
54
21
|
const constants_1 = require("../../core/constants");
|
|
55
22
|
const MENU_OPTIONS = [
|
|
@@ -99,10 +66,7 @@ const COPY_OPTIONS = ['claude-code', 'codex', 'copy'];
|
|
|
99
66
|
function ConnectMCPButton({ placement = 'bottom', alignment = 'end', options = constants_1.DEFAULT_MCP_OPTIONS, }) {
|
|
100
67
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
101
68
|
const { translate } = useTranslate();
|
|
102
|
-
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
103
|
-
const wrapperRef = (0, react_1.useRef)(null);
|
|
104
69
|
const { copiedOption, visibleOptions, handleAction } = (0, hooks_1.useConnectMCPButton)({ options });
|
|
105
|
-
(0, hooks_1.useOutsideClick)(wrapperRef, () => setIsOpen(false));
|
|
106
70
|
const menuOptions = MENU_OPTIONS.filter((option) => visibleOptions.includes(option.key));
|
|
107
71
|
const primaryOption = menuOptions[0];
|
|
108
72
|
const dropdownOptions = menuOptions.slice(1);
|
|
@@ -110,98 +74,21 @@ function ConnectMCPButton({ placement = 'bottom', alignment = 'end', options = c
|
|
|
110
74
|
return null;
|
|
111
75
|
const PrimaryIcon = primaryOption.icon;
|
|
112
76
|
const showPrimaryCopied = copiedOption === primaryOption.key;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const Icon = option.icon;
|
|
126
|
-
const showCheckmark = copiedOption === option.key;
|
|
127
|
-
return (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { key: option.key, onAction: () => handleMenuAction(option.key) },
|
|
128
|
-
react_1.default.createElement(MenuItemContent, null,
|
|
129
|
-
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))),
|
|
130
|
-
react_1.default.createElement(MenuItemText, null,
|
|
131
|
-
react_1.default.createElement(MenuItemTitle, null, translate(option.titleTranslationKey, option.titleDefault)),
|
|
132
|
-
react_1.default.createElement(MenuItemDescription, null, translate(option.descriptionTranslationKey, option.descriptionDefault))))));
|
|
133
|
-
}))))));
|
|
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)));
|
|
134
89
|
}
|
|
135
90
|
const ConnectMCPButtonWrapper = styled_components_1.default.div `
|
|
136
91
|
display: inline-block;
|
|
137
92
|
position: relative;
|
|
138
93
|
`;
|
|
139
|
-
const SplitButtonGroup = styled_components_1.default.div `
|
|
140
|
-
display: inline-flex;
|
|
141
|
-
align-items: stretch;
|
|
142
|
-
`;
|
|
143
|
-
/* Doubled selectors outrank the base button class in any style injection order,
|
|
144
|
-
and margin: 0 keeps themed button margins from splitting the group apart. */
|
|
145
|
-
const PrimaryButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
146
|
-
&& {
|
|
147
|
-
--button-gap: var(--connect-mcp-button-gap);
|
|
148
|
-
margin: 0;
|
|
149
|
-
border-top-right-radius: 0;
|
|
150
|
-
border-bottom-right-radius: 0;
|
|
151
|
-
}
|
|
152
|
-
`;
|
|
153
|
-
const ChevronButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
154
|
-
&& {
|
|
155
|
-
margin: 0;
|
|
156
|
-
border-top-left-radius: 0;
|
|
157
|
-
border-bottom-left-radius: 0;
|
|
158
|
-
border-left: none;
|
|
159
|
-
padding-inline: var(--connect-mcp-button-chevron-padding-inline);
|
|
160
|
-
}
|
|
161
|
-
`;
|
|
162
|
-
const DropdownWrapper = styled_components_1.default.div `
|
|
163
|
-
position: absolute;
|
|
164
|
-
top: ${({ $placement }) => ($placement === 'top' ? 'auto' : '100%')};
|
|
165
|
-
bottom: ${({ $placement }) => ($placement === 'top' ? '100%' : 'auto')};
|
|
166
|
-
left: ${({ $alignment }) => ($alignment === 'start' ? '0' : 'auto')};
|
|
167
|
-
right: ${({ $alignment }) => ($alignment === 'end' ? '0' : 'auto')};
|
|
168
|
-
padding-top: var(--dropdown-menu-padding-top);
|
|
169
|
-
z-index: var(--dropdown-menu-z-index);
|
|
170
|
-
`;
|
|
171
|
-
const MenuItemContent = styled_components_1.default.div `
|
|
172
|
-
display: flex;
|
|
173
|
-
align-items: center;
|
|
174
|
-
gap: var(--connect-mcp-button-menu-item-gap);
|
|
175
|
-
padding: var(--connect-mcp-button-menu-item-padding-block)
|
|
176
|
-
var(--connect-mcp-button-menu-item-padding-inline);
|
|
177
|
-
`;
|
|
178
|
-
const MenuItemIcon = styled_components_1.default.div `
|
|
179
|
-
display: flex;
|
|
180
|
-
align-items: center;
|
|
181
|
-
justify-content: center;
|
|
182
|
-
width: var(--connect-mcp-button-menu-item-icon-size);
|
|
183
|
-
height: var(--connect-mcp-button-menu-item-icon-size);
|
|
184
|
-
flex-shrink: 0;
|
|
185
|
-
border: var(--connect-mcp-button-menu-item-icon-border);
|
|
186
|
-
border-radius: var(--connect-mcp-button-menu-item-icon-border-radius);
|
|
187
|
-
color: var(--connect-mcp-button-menu-item-icon-color);
|
|
188
|
-
`;
|
|
189
|
-
const MenuItemText = styled_components_1.default.div `
|
|
190
|
-
display: flex;
|
|
191
|
-
flex-direction: column;
|
|
192
|
-
gap: var(--connect-mcp-button-menu-item-text-gap);
|
|
193
|
-
flex: 1;
|
|
194
|
-
`;
|
|
195
|
-
const MenuItemTitle = styled_components_1.default.div `
|
|
196
|
-
font-size: var(--connect-mcp-button-menu-item-title-font-size);
|
|
197
|
-
font-weight: var(--connect-mcp-button-menu-item-title-font-weight);
|
|
198
|
-
line-height: var(--connect-mcp-button-menu-item-title-line-height);
|
|
199
|
-
color: var(--connect-mcp-button-menu-item-title-color);
|
|
200
|
-
`;
|
|
201
|
-
const MenuItemDescription = styled_components_1.default.div `
|
|
202
|
-
font-size: var(--connect-mcp-button-menu-item-description-font-size);
|
|
203
|
-
font-weight: var(--connect-mcp-button-menu-item-description-font-weight);
|
|
204
|
-
line-height: var(--connect-mcp-button-menu-item-description-line-height);
|
|
205
|
-
color: var(--connect-mcp-button-menu-item-description-color);
|
|
206
|
-
`;
|
|
207
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
|
|
@@ -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);
|
|
@@ -34,7 +34,7 @@ const PathLabel = styled_components_1.default.label `
|
|
|
34
34
|
const LinksWrapper = styled_components_1.default.div `
|
|
35
35
|
display: flex;
|
|
36
36
|
flex-direction: column;
|
|
37
|
-
border-radius: var(--border-radius);
|
|
37
|
+
border-radius: var(--border-radius-xl);
|
|
38
38
|
background-color: var(--catalog-metadata-bg-color);
|
|
39
39
|
transition: all 0.2s ease-in-out;
|
|
40
40
|
margin: 0 0 var(--spacing-base) 0;
|
|
@@ -68,7 +68,7 @@ function CatalogEntitySchema({ entity, relatedEntity, RedocSchema, StoreProvider
|
|
|
68
68
|
const MetadataWrapper = styled_components_1.default.div `
|
|
69
69
|
display: flex;
|
|
70
70
|
flex-direction: column;
|
|
71
|
-
border-radius: var(--border-radius);
|
|
71
|
+
border-radius: var(--border-radius-xl);
|
|
72
72
|
background-color: var(--catalog-metadata-bg-color);
|
|
73
73
|
margin-bottom: var(--spacing-lg);
|
|
74
74
|
`;
|
|
@@ -116,6 +116,7 @@ const StyledSelect = (0, styled_components_1.default)(Select_1.Select) `
|
|
|
116
116
|
--select-text-color: var(--filter-select-color);
|
|
117
117
|
border: 1px solid var(--filter-select-border-color);
|
|
118
118
|
--select-border-radius: var(--filter-select-border-radius);
|
|
119
|
+
--select-input-border-radius: var(--filter-select-border-radius);
|
|
119
120
|
padding: var(--filter-select-padding);
|
|
120
121
|
|
|
121
122
|
&:hover {
|
|
@@ -192,7 +192,7 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
192
192
|
*/
|
|
193
193
|
--catalog-sort-trigger-gap: var(--spacing-xs);
|
|
194
194
|
--catalog-sort-trigger-padding: 6px 8px;
|
|
195
|
-
--catalog-sort-trigger-border-radius: var(--border-radius-
|
|
195
|
+
--catalog-sort-trigger-border-radius: var(--border-radius-lg);
|
|
196
196
|
--catalog-sort-trigger-hover-bg-color: var(--button-bg-color-secondary-hover);
|
|
197
197
|
--catalog-sort-icon-color: var(--text-color-secondary);
|
|
198
198
|
--catalog-sort-text-font-size: var(--font-size-sm);
|
|
@@ -222,7 +222,7 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
222
222
|
--catalog-card-border-width: var(--border-width);
|
|
223
223
|
--catalog-card-border-style: var(--border-style);
|
|
224
224
|
--catalog-card-border-color-hover: var(--border-color-primary);
|
|
225
|
-
--catalog-card-border-radius: var(--border-radius-
|
|
225
|
+
--catalog-card-border-radius: var(--border-radius-xl);
|
|
226
226
|
--catalog-cards-group-margin: 0 0 var(--spacing-base) 0;
|
|
227
227
|
--catalog-cards-group-gap: var(--spacing-lg);
|
|
228
228
|
|
|
@@ -231,7 +231,7 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
231
231
|
*/
|
|
232
232
|
--catalog-card-icon-width: 30px;
|
|
233
233
|
--catalog-card-icon-height: 30px;
|
|
234
|
-
--catalog-card-icon-border-radius:
|
|
234
|
+
--catalog-card-icon-border-radius: var(--border-radius);
|
|
235
235
|
--catalog-card-icon-bg-color: var(--bg-color);
|
|
236
236
|
--catalog-card-icon-border-color: var(--border-color-secondary);
|
|
237
237
|
--catalog-card-icon-border-width: 1px;
|
|
@@ -309,7 +309,7 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
309
309
|
--catalog-actions-min-height: 40px;
|
|
310
310
|
--catalog-actions-bg-color: var(--bg-color-tonal);
|
|
311
311
|
|
|
312
|
-
--catalog-page-badge-border-radius: var(--border-radius);
|
|
312
|
+
--catalog-page-badge-border-radius: var(--badge-border-radius);
|
|
313
313
|
--catalog-page-badge-padding: 0 var(--spacing-xs);
|
|
314
314
|
--catalog-page-badge-font-size: var(--font-size-base);
|
|
315
315
|
--catalog-page-badge-line-height: var(--line-height-base);
|
|
@@ -345,7 +345,7 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
345
345
|
*/
|
|
346
346
|
--catalog-table-icon-width: 32px;
|
|
347
347
|
--catalog-table-icon-height: 32px;
|
|
348
|
-
--catalog-table-icon-border-radius:
|
|
348
|
+
--catalog-table-icon-border-radius: var(--border-radius);
|
|
349
349
|
--catalog-table-icon-bg-color: var(--bg-color-tonal);
|
|
350
350
|
--catalog-table-icon-border-color: var(--border-color-secondary);
|
|
351
351
|
--catalog-table-icon-border-width: 1px;
|
|
@@ -59,7 +59,7 @@ exports.catalogClassic = (0, styled_components_1.css) `
|
|
|
59
59
|
--catalog-classic-card-border-width: var(--border-width);
|
|
60
60
|
--catalog-classic-card-border-style: var(--border-style);
|
|
61
61
|
--catalog-classic-card-border-color-hover: var(--border-color-primary);
|
|
62
|
-
--catalog-classic-card-border-radius: var(--border-radius-
|
|
62
|
+
--catalog-classic-card-border-radius: var(--border-radius-xl);
|
|
63
63
|
--catalog-classic-cards-group-margin: 0 0 var(--spacing-base) 0;
|
|
64
64
|
--catalog-classic-cards-group-gap: var(--spacing-xl);
|
|
65
65
|
|
|
@@ -96,7 +96,7 @@ exports.catalogClassic = (0, styled_components_1.css) `
|
|
|
96
96
|
--catalog-classic-actions-min-height: 40px;
|
|
97
97
|
--catalog-classic-actions-bg-color: var(--bg-color-tonal);
|
|
98
98
|
|
|
99
|
-
--catalog-classic-page-badge-border-radius: var(--border-radius);
|
|
99
|
+
--catalog-classic-page-badge-border-radius: var(--border-radius-md);
|
|
100
100
|
--catalog-classic-page-badge-padding: 0 var(--spacing-xs);
|
|
101
101
|
--catalog-classic-page-badge-font-size: var(--font-size-base);
|
|
102
102
|
--catalog-classic-page-badge-line-height: var(--line-height-base);
|
|
@@ -98,6 +98,7 @@ function CodeBlock(_a) {
|
|
|
98
98
|
var _a, _b;
|
|
99
99
|
const _source = source || ((_b = (_a = externalSource === null || externalSource === void 0 ? void 0 : externalSource.sample) === null || _a === void 0 ? void 0 : _a.get) === null || _b === void 0 ? void 0 : _b.call(_a, externalSource));
|
|
100
100
|
if (_source) {
|
|
101
|
+
// oxlint-disable-next-line react-you-might-not-need-an-effect/no-derived-state
|
|
101
102
|
setSourceCode(_source);
|
|
102
103
|
}
|
|
103
104
|
}, [source, externalSource]);
|
|
@@ -128,7 +129,7 @@ const ContainerWrapper = styled_components_1.default.div `
|
|
|
128
129
|
`;
|
|
129
130
|
const CodeBlockWrapper = styled_components_1.default.div `
|
|
130
131
|
border: 1px solid var(--border-color-secondary);
|
|
131
|
-
border-radius: var(--border-radius);
|
|
132
|
+
border-radius: var(--border-radius-xl);
|
|
132
133
|
background-color: var(--code-block-bg-color);
|
|
133
134
|
margin: 0 0 var(--spacing-sm);
|
|
134
135
|
|
|
@@ -68,6 +68,7 @@ const CodeBlockContainerComponent = styled_components_1.default.pre `
|
|
|
68
68
|
white-space: ${({ $wrapContents }) => ($wrapContents ? 'pre-wrap' : 'var(--code-wrap, pre)')};
|
|
69
69
|
max-height: ${({ $maxHeight }) => $maxHeight ? $maxHeight : 'var(--code-block-max-height, 600px);'};
|
|
70
70
|
word-break: var(--code-block-word-break, initial);
|
|
71
|
+
border-radius: var(--border-radius-xl);
|
|
71
72
|
|
|
72
73
|
pre,
|
|
73
74
|
code {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { RenderableChildren } from '../../core/types';
|
|
3
|
+
type DropdownMenuContext = {
|
|
4
|
+
close: () => void;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type DropdownProps = {
|
|
4
8
|
trigger: React.ReactNode;
|
|
9
|
+
children: RenderableChildren<DropdownMenuContext>;
|
|
5
10
|
triggerEvent?: 'click' | 'hover';
|
|
6
11
|
placement?: 'top' | 'bottom';
|
|
7
12
|
alignment?: 'start' | 'end';
|
|
@@ -14,21 +19,6 @@ export type DropdownProps = PropsWithChildren<{
|
|
|
14
19
|
onClick?: (event: React.UIEvent) => void;
|
|
15
20
|
onClose?: () => void;
|
|
16
21
|
onOpen?: () => void;
|
|
17
|
-
}
|
|
18
|
-
export declare const Dropdown: React.ForwardRefExoticComponent<
|
|
19
|
-
|
|
20
|
-
triggerEvent?: 'click' | 'hover';
|
|
21
|
-
placement?: 'top' | 'bottom';
|
|
22
|
-
alignment?: 'start' | 'end';
|
|
23
|
-
active?: boolean;
|
|
24
|
-
closeOnClick?: boolean;
|
|
25
|
-
dataAttributes?: Record<string, string>;
|
|
26
|
-
className?: string;
|
|
27
|
-
withArrow?: boolean;
|
|
28
|
-
portalled?: boolean;
|
|
29
|
-
onClick?: (event: React.UIEvent) => void;
|
|
30
|
-
onClose?: () => void;
|
|
31
|
-
onOpen?: () => void;
|
|
32
|
-
} & {
|
|
33
|
-
children?: React.ReactNode | undefined;
|
|
34
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
};
|
|
23
|
+
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export {};
|