@redocly/theme 0.67.0-next.0 → 0.67.0-next.2
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/Admonition/Admonition.js +9 -9
- package/lib/components/Badge/Badge.d.ts +1 -1
- package/lib/components/Badge/Badge.js +4 -4
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.js +16 -17
- package/lib/components/Buttons/AIAssistantButton.js +2 -0
- package/lib/components/Catalog/CatalogActionsRow.js +3 -1
- package/lib/components/Catalog/CatalogAvatar.d.ts +3 -1
- package/lib/components/Catalog/CatalogAvatar.js +3 -3
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +7 -7
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +6 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +3 -5
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +15 -11
- package/lib/components/Catalog/CatalogEntityTypeTag.js +5 -5
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +5 -3
- package/lib/components/CatalogClassic/CatalogClassic.d.ts +4 -2
- package/lib/components/CatalogClassic/CatalogClassic.js +3 -1
- package/lib/components/CodeBlock/CodeBlockContainer.js +16 -4
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +2 -1
- package/lib/components/CodeBlock/CodeBlockControls.js +9 -7
- package/lib/components/CodeBlock/CodeBlockTabs.js +2 -2
- package/lib/components/Dropdown/Dropdown.js +6 -6
- package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -1
- package/lib/components/Feedback/Comment.js +3 -3
- package/lib/components/Feedback/Mood.js +3 -3
- package/lib/components/Filter/FilterContent.js +2 -2
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/FooterColumn.js +2 -2
- package/lib/components/Footer/FooterItem.js +5 -5
- package/lib/components/Image/Image.js +2 -2
- package/lib/components/LastUpdated/LastUpdated.js +2 -2
- package/lib/components/Link/Link.d.ts +2 -19
- package/lib/components/Link/Link.js +2 -9
- package/lib/components/Loaders/Loading.js +2 -2
- package/lib/components/Loaders/SpinnerLoader.js +4 -4
- package/lib/components/Markdown/Markdown.d.ts +7 -10
- package/lib/components/Markdown/Markdown.js +6 -3
- package/lib/components/Marker/Marker.js +3 -3
- package/lib/components/Menu/MenuContainer.d.ts +2 -2
- package/lib/components/Menu/MenuContainer.js +9 -11
- package/lib/components/Menu/MenuItem.js +14 -14
- package/lib/components/Menu/MenuMobile.js +8 -8
- package/lib/components/Navbar/NavbarItem.js +7 -7
- package/lib/components/PageNavigation/NavigationButton.js +3 -3
- package/lib/components/Panel/PanelBody.d.ts +5 -5
- package/lib/components/Panel/PanelBody.js +6 -3
- package/lib/components/Panel/PanelHeader.d.ts +2 -5
- package/lib/components/Panel/PanelHeader.js +6 -2
- package/lib/components/Search/SearchAiMessage.js +10 -8
- package/lib/components/Search/SearchDialog.js +6 -0
- package/lib/components/Search/SearchSuggestedPages.js +2 -2
- package/lib/components/Select/Select.js +3 -1
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +8 -8
- package/lib/components/Sidebar/Sidebar.d.ts +4 -2
- package/lib/components/Sidebar/Sidebar.js +10 -8
- package/lib/components/SidebarActions/styled.d.ts +6 -6
- package/lib/components/SidebarActions/styled.js +12 -4
- package/lib/components/StatusCode/StatusCode.d.ts +6 -4
- package/lib/components/StatusCode/StatusCode.js +8 -2
- package/lib/components/Switch/Switch.js +13 -13
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/components/Tag/Tag.js +11 -11
- package/lib/components/Tooltip/AnchorTooltip.js +26 -25
- package/lib/components/Tooltip/JsTooltip.js +5 -5
- package/lib/components/Typography/CompactTypography.d.ts +27 -11
- package/lib/components/Typography/CompactTypography.js +2 -2
- package/lib/components/Typography/Typography.d.ts +6 -2
- package/lib/components/Typography/Typography.js +18 -3
- package/lib/components/UserMenu/UserAvatar.js +5 -5
- package/lib/core/contexts/ThemeDataContext.d.ts +1 -1
- package/lib/core/hooks/feedback/use-report-dialog.d.ts +8 -5
- package/lib/core/styles/global.js +1 -0
- package/lib/core/templates/Markdown.js +5 -6
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/link.d.ts +19 -0
- package/lib/core/types/link.js +3 -0
- package/lib/core/utils/details.d.ts +1 -1
- package/lib/core/utils/details.js +3 -0
- package/lib/core/utils/dom.d.ts +0 -1
- package/lib/core/utils/dom.js +0 -9
- package/lib/core/utils/index.d.ts +0 -1
- package/lib/core/utils/index.js +0 -1
- package/lib/ext/configure-helpers.d.ts +35 -0
- package/lib/ext/configure-helpers.js +3 -0
- package/lib/ext/configure.d.ts +3 -25
- package/lib/ext/configure.js +16 -0
- package/lib/ext/helpers/is-direct-configure-request-values.d.ts +15 -0
- package/lib/ext/helpers/is-direct-configure-request-values.js +42 -0
- package/lib/ext/use-configure-replay.d.ts +1 -1
- package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.d.ts +1 -1
- package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +6 -1
- package/lib/icons/AiStarsIcon/AiStarsIcon.d.ts +1 -1
- package/lib/icons/AiStarsIcon/AiStarsIcon.js +6 -1
- package/lib/icons/MagicWandIcon/MagicWandIcon.d.ts +23 -0
- package/lib/icons/MagicWandIcon/MagicWandIcon.js +25 -0
- package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.d.ts +25 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/layouts/DocumentationLayout.js +2 -2
- package/lib/layouts/ThreePanelLayout.d.ts +27 -7
- package/lib/layouts/ThreePanelLayout.js +11 -8
- package/lib/markdoc/components/CodeWalkthrough/CodeContainer.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +4 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +6 -2
- package/lib/markdoc/components/Image/Image.js +3 -3
- package/lib/markdoc/components/Tabs/TabItemFragment.d.ts +9 -0
- package/lib/markdoc/components/Tabs/TabItemFragment.js +11 -0
- package/lib/markdoc/components/Tabs/TabList.d.ts +7 -4
- package/lib/markdoc/components/Tabs/TabList.js +6 -4
- package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -9
- package/lib/markdoc/components/Tabs/Tabs.js +12 -5
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/tags/tab.js +1 -1
- package/lib/markdoc/tags/tabs.js +1 -1
- package/package.json +2 -3
- package/src/components/Admonition/Admonition.tsx +11 -11
- package/src/components/Badge/Badge.tsx +11 -6
- package/src/components/Button/Button.tsx +51 -21
- package/src/components/Buttons/AIAssistantButton.tsx +2 -0
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -1
- package/src/components/Catalog/CatalogAvatar.tsx +6 -10
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -6
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +14 -14
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +11 -11
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +8 -11
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +10 -9
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +22 -16
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +8 -8
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +8 -6
- package/src/components/CatalogClassic/CatalogClassic.tsx +3 -1
- package/src/components/CodeBlock/CodeBlockContainer.tsx +23 -7
- package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
- package/src/components/CodeBlock/CodeBlockTabs.tsx +4 -4
- package/src/components/Dropdown/Dropdown.tsx +9 -9
- package/src/components/Dropdown/DropdownMenuItem.tsx +1 -1
- package/src/components/Feedback/Comment.tsx +5 -5
- package/src/components/Feedback/Mood.tsx +5 -5
- package/src/components/Filter/FilterContent.tsx +4 -4
- package/src/components/Filter/FilterPopover.tsx +1 -1
- package/src/components/Footer/Footer.tsx +4 -4
- package/src/components/Footer/FooterColumn.tsx +3 -3
- package/src/components/Footer/FooterItem.tsx +9 -9
- package/src/components/Image/Image.tsx +3 -3
- package/src/components/LastUpdated/LastUpdated.tsx +4 -4
- package/src/components/Link/Link.tsx +6 -51
- package/src/components/Loaders/Loading.tsx +3 -3
- package/src/components/Loaders/SpinnerLoader.tsx +5 -5
- package/src/components/Markdown/Markdown.tsx +7 -7
- package/src/components/Marker/Marker.tsx +4 -4
- package/src/components/Menu/MenuContainer.tsx +32 -16
- package/src/components/Menu/MenuItem.tsx +34 -29
- package/src/components/Menu/MenuMobile.tsx +12 -12
- package/src/components/Navbar/NavbarItem.tsx +13 -13
- package/src/components/PageNavigation/NavigationButton.tsx +4 -4
- package/src/components/Panel/PanelBody.tsx +7 -4
- package/src/components/Panel/PanelHeader.tsx +9 -4
- package/src/components/Search/SearchAiMessage.tsx +17 -15
- package/src/components/Search/SearchDialog.tsx +6 -0
- package/src/components/Search/SearchSuggestedPages.tsx +20 -5
- package/src/components/Select/Select.tsx +3 -1
- package/src/components/Select/SelectInput.tsx +10 -9
- package/src/components/Sidebar/Sidebar.tsx +15 -13
- package/src/components/SidebarActions/styled.ts +12 -4
- package/src/components/StatusCode/StatusCode.tsx +12 -4
- package/src/components/Switch/Switch.tsx +21 -21
- package/src/components/TableOfContent/TableOfContent.tsx +3 -3
- package/src/components/Tag/Tag.tsx +34 -27
- package/src/components/Tooltip/AnchorTooltip.tsx +50 -42
- package/src/components/Tooltip/JsTooltip.tsx +14 -13
- package/src/components/Typography/CompactTypography.tsx +4 -4
- package/src/components/Typography/Typography.tsx +21 -5
- package/src/components/UserMenu/UserAvatar.tsx +7 -7
- package/src/core/contexts/ThemeDataContext.tsx +1 -1
- package/src/core/hooks/feedback/use-report-dialog.ts +1 -5
- package/src/core/styles/dark.ts +1 -1
- package/src/core/styles/global.ts +1 -0
- package/src/core/templates/Markdown.tsx +6 -7
- package/src/core/types/index.ts +1 -0
- package/src/core/types/link.ts +20 -0
- package/src/core/utils/details.ts +4 -0
- package/src/core/utils/dom.ts +0 -8
- package/src/core/utils/index.ts +0 -1
- package/src/ext/configure-helpers.ts +45 -0
- package/src/ext/configure.ts +6 -26
- package/src/ext/helpers/is-direct-configure-request-values.ts +53 -0
- package/src/ext/use-configure-replay.ts +3 -3
- package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +9 -3
- package/src/icons/AiStarsIcon/AiStarsIcon.tsx +9 -3
- package/src/icons/MagicWandIcon/MagicWandIcon.tsx +26 -0
- package/src/icons/ReturnKeyIcon/ReturnKeyIcon.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/layouts/DocumentationLayout.tsx +3 -3
- package/src/layouts/ThreePanelLayout.tsx +27 -14
- package/src/markdoc/components/CodeWalkthrough/CodeContainer.tsx +4 -4
- package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +4 -4
- package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +3 -3
- package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +6 -2
- package/src/markdoc/components/Image/Image.tsx +4 -4
- package/src/markdoc/components/Tabs/TabItemFragment.tsx +15 -0
- package/src/markdoc/components/Tabs/TabList.tsx +9 -6
- package/src/markdoc/components/Tabs/Tabs.tsx +21 -15
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/tags/tab.ts +1 -1
- package/src/markdoc/tags/tabs.ts +1 -1
|
@@ -53,10 +53,10 @@ const IconsMap = {
|
|
|
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'];
|
|
56
|
-
return (react_1.default.createElement(AdmonitionWrapper, { type: type, className: className, "data-component-name": "Admonition/Admonition", "data-source": dataSource, "data-hash": dataHash },
|
|
56
|
+
return (react_1.default.createElement(AdmonitionWrapper, { $type: type, className: className, "data-component-name": "Admonition/Admonition", "data-source": dataSource, "data-hash": dataHash },
|
|
57
57
|
react_1.default.createElement(Icon, { color: `--admonition-${type}-icon-color` }),
|
|
58
58
|
react_1.default.createElement(TextContainer, null,
|
|
59
|
-
name ? react_1.default.createElement(Heading, { type: type }, name) : null,
|
|
59
|
+
name ? react_1.default.createElement(Heading, { $type: type }, name) : null,
|
|
60
60
|
children ? react_1.default.createElement(Content, null, children) : null)));
|
|
61
61
|
}
|
|
62
62
|
const Content = styled_components_1.default.div `
|
|
@@ -82,10 +82,10 @@ const AdmonitionWrapper = styled_components_1.default.div `
|
|
|
82
82
|
print-color-adjust: exact;
|
|
83
83
|
-webkit-print-color-adjust: exact;
|
|
84
84
|
|
|
85
|
-
${({ type }) => (0, styled_components_1.css) `
|
|
86
|
-
background-color: var(--admonition-${type}-bg-color);
|
|
87
|
-
color: var(--admonition-${type}-text-color);
|
|
88
|
-
border: var(--admonition-${type}-border);
|
|
85
|
+
${({ $type }) => (0, styled_components_1.css) `
|
|
86
|
+
background-color: var(--admonition-${$type}-bg-color);
|
|
87
|
+
color: var(--admonition-${$type}-text-color);
|
|
88
|
+
border: var(--admonition-${$type}-border);
|
|
89
89
|
`};
|
|
90
90
|
|
|
91
91
|
&:not(:has(${Content})) {
|
|
@@ -102,9 +102,9 @@ const AdmonitionWrapper = styled_components_1.default.div `
|
|
|
102
102
|
flex-shrink: 0;
|
|
103
103
|
margin: var(--admonition-icon-margin);
|
|
104
104
|
|
|
105
|
-
fill: ${({ type }) => `var(--admonition-${type}-icon-color)`};
|
|
105
|
+
fill: ${({ $type }) => `var(--admonition-${$type}-icon-color)`};
|
|
106
106
|
|
|
107
|
-
background-image: ${({ type }) => `var(--admonition-${type}-icon)`};
|
|
107
|
+
background-image: ${({ $type }) => `var(--admonition-${$type}-icon)`};
|
|
108
108
|
background-repeat: no-repeat;
|
|
109
109
|
background-position: center;
|
|
110
110
|
background-size: contain;
|
|
@@ -118,7 +118,7 @@ const TextContainer = styled_components_1.default.div `
|
|
|
118
118
|
`;
|
|
119
119
|
const Heading = styled_components_1.default.div `
|
|
120
120
|
letter-spacing: var(--admonition-heading-letter-spacing);
|
|
121
|
-
color: ${({ type }) => `var(--admonition-${type}-heading-text-color)`};
|
|
121
|
+
color: ${({ $type }) => `var(--admonition-${$type}-heading-text-color)`};
|
|
122
122
|
|
|
123
123
|
&& {
|
|
124
124
|
font-size: var(--admonition-heading-font-size);
|
|
@@ -6,4 +6,4 @@ export type BadgeProps = PropsWithChildren<{
|
|
|
6
6
|
className?: string;
|
|
7
7
|
icon?: string;
|
|
8
8
|
}>;
|
|
9
|
-
export declare function Badge({ icon, children, ...props }: BadgeProps): JSX.Element;
|
|
9
|
+
export declare function Badge({ icon, children, deprecated, color, ...props }: BadgeProps): JSX.Element;
|
|
@@ -52,8 +52,8 @@ 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 } = _a, props = __rest(_a, ["icon", "children"]);
|
|
56
|
-
return (react_1.default.createElement(BadgeComponent, Object.assign({}, props, { "data-component-name": "Badge/Badge" }),
|
|
55
|
+
var { icon, children, deprecated, color } = _a, props = __rest(_a, ["icon", "children", "deprecated", "color"]);
|
|
56
|
+
return (react_1.default.createElement(BadgeComponent, Object.assign({}, props, { $color: color, $deprecated: deprecated, "data-component-name": "Badge/Badge" }),
|
|
57
57
|
icon ? react_1.default.createElement(BadgeIcon, { icon: icon }) : null,
|
|
58
58
|
children));
|
|
59
59
|
}
|
|
@@ -63,13 +63,13 @@ const BadgeComponent = styled_components_1.default.span `
|
|
|
63
63
|
vertical-align: middle;
|
|
64
64
|
line-height: var(--line-height-base);
|
|
65
65
|
color: var(--badge-text-color);
|
|
66
|
-
background-color: ${({ color }) => color || 'var(--badge-bg-color)'};
|
|
66
|
+
background-color: ${({ $color }) => $color || 'var(--badge-bg-color)'};
|
|
67
67
|
border-radius: var(--badge-border-radius);
|
|
68
68
|
margin: 0 0 0 0.5em;
|
|
69
69
|
font-size: var(--font-size-base);
|
|
70
70
|
font-weight: var(--font-weight-regular);
|
|
71
71
|
|
|
72
|
-
${({ deprecated }) => deprecated &&
|
|
72
|
+
${({ $deprecated }) => $deprecated &&
|
|
73
73
|
(0, styled_components_1.css) `
|
|
74
74
|
color: var(--badge-deprecated-text-color);
|
|
75
75
|
background-color: var(--badge-deprecated-bg-color);
|
|
@@ -22,6 +22,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
22
22
|
onClick?: (e?: any) => void;
|
|
23
23
|
ref?: React.Ref<HTMLButtonElement>;
|
|
24
24
|
}
|
|
25
|
-
export declare function generateClassName({ variant, tone, size, extraClass }: ButtonProps): string;
|
|
25
|
+
export declare function generateClassName({ variant, tone, size, extraClass, className }: ButtonProps): string;
|
|
26
26
|
export declare const Button: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<ButtonProps, keyof ButtonProps> & ButtonProps, never> & Partial<Pick<import("styled-components").FastOmit<ButtonProps, keyof ButtonProps> & ButtonProps, never>>> & string & Omit<React.FC<ButtonProps>, keyof React.Component<any, {}, any>>;
|
|
27
27
|
export {};
|
|
@@ -74,23 +74,22 @@ const StyledButtonLink = (0, styled_components_1.default)(Link_1.Link) `
|
|
|
74
74
|
}
|
|
75
75
|
border-radius: var(--button-border-radius);
|
|
76
76
|
`;
|
|
77
|
-
function generateClassName({ variant = 'secondary', tone = 'default', size = 'medium', extraClass = '', }) {
|
|
77
|
+
function generateClassName({ variant = 'secondary', tone = 'default', size = 'medium', extraClass = '', className = '', }) {
|
|
78
78
|
const classNames = [
|
|
79
79
|
'button',
|
|
80
80
|
extraClass,
|
|
81
81
|
`button-tone-${tone}`,
|
|
82
82
|
`button-variant-${variant}`,
|
|
83
83
|
`button-size-${size}`,
|
|
84
|
+
className,
|
|
84
85
|
];
|
|
85
86
|
return classNames
|
|
86
87
|
.filter((className) => className)
|
|
87
88
|
.join(' ')
|
|
88
89
|
.trim();
|
|
89
90
|
}
|
|
90
|
-
const StyledButton = styled_components_1.default.button
|
|
91
|
-
|
|
92
|
-
})) `
|
|
93
|
-
width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
|
|
91
|
+
const StyledButton = styled_components_1.default.button `
|
|
92
|
+
width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};
|
|
94
93
|
|
|
95
94
|
display: inline-flex;
|
|
96
95
|
align-items: center;
|
|
@@ -109,8 +108,8 @@ const StyledButton = styled_components_1.default.button.attrs((props) => ({
|
|
|
109
108
|
font-weight: var(--button-font-weight);
|
|
110
109
|
font-size: var(--button-font-size);
|
|
111
110
|
line-height: var(--button-line-height);
|
|
112
|
-
padding: ${({ icon, iconPosition, iconOnly }) => icon
|
|
113
|
-
? `var(--button-icon-${iconOnly ? '' : `${iconPosition || 'left'}-`}padding)`
|
|
111
|
+
padding: ${({ $icon, $iconPosition, $iconOnly }) => $icon
|
|
112
|
+
? `var(--button-icon-${$iconOnly ? '' : `${$iconPosition || 'left'}-`}padding)`
|
|
114
113
|
: 'var(--button-padding)'};
|
|
115
114
|
border-radius: var(--button-border-radius);
|
|
116
115
|
|
|
@@ -162,29 +161,29 @@ const StyledButton = styled_components_1.default.button.attrs((props) => ({
|
|
|
162
161
|
border-width: var(--button-border-width-disabled);
|
|
163
162
|
}
|
|
164
163
|
|
|
165
|
-
${({ variant, size }) => (variant === 'link' || variant === 'ghost') &&
|
|
166
|
-
size === 'small' &&
|
|
164
|
+
${({ $variant, $size }) => ($variant === 'link' || $variant === 'ghost') &&
|
|
165
|
+
$size === 'small' &&
|
|
167
166
|
(0, styled_components_1.css) `
|
|
168
167
|
--button-font-size: var(--font-size-sm);
|
|
169
168
|
--button-line-height: var(--line-height-sm);
|
|
170
169
|
--button-icon-padding: var(--button-icon-padding-small) !important;
|
|
171
170
|
`}
|
|
172
171
|
|
|
173
|
-
${({ blinking }) => blinking &&
|
|
172
|
+
${({ $blinking }) => $blinking &&
|
|
174
173
|
(0, styled_components_1.css) `
|
|
175
174
|
pointer-events: none;
|
|
176
175
|
animation: ${getBlink()} 1.2s infinite;
|
|
177
176
|
`}
|
|
178
177
|
`;
|
|
179
178
|
const ButtonComponent = (props) => {
|
|
180
|
-
const { languageInsensitive } = props,
|
|
179
|
+
const { languageInsensitive, fullWidth, blinking, iconPosition, icon, children, variant, tone, size, extraClass, to, external, className } = props, rest = __rest(props, ["languageInsensitive", "fullWidth", "blinking", "iconPosition", "icon", "children", "variant", "tone", "size", "extraClass", "to", "external", "className"]);
|
|
181
180
|
const tabIndex = 'tabIndex' in props ? props.tabIndex : props.to ? -1 : undefined;
|
|
182
|
-
const button = (react_1.default.createElement(StyledButton, Object.assign({ "data-component-name": "Button/Button" },
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (
|
|
187
|
-
return (react_1.default.createElement(StyledButtonLink, { to:
|
|
181
|
+
const button = (react_1.default.createElement(StyledButton, Object.assign({ "data-component-name": "Button/Button" }, rest, { className: generateClassName({ variant, tone, size, extraClass, className }), $fullWidth: fullWidth, $blinking: blinking, $iconPosition: iconPosition, $icon: icon, $iconOnly: !children && icon != null, $variant: variant, $size: size, tabIndex: tabIndex }),
|
|
182
|
+
icon && iconPosition !== 'right' && icon,
|
|
183
|
+
children,
|
|
184
|
+
icon && iconPosition === 'right' && icon));
|
|
185
|
+
if (to) {
|
|
186
|
+
return (react_1.default.createElement(StyledButtonLink, { to: to, external: external, languageInsensitive: languageInsensitive, onClick: props.onClick }, button));
|
|
188
187
|
}
|
|
189
188
|
else {
|
|
190
189
|
return button;
|
|
@@ -89,7 +89,9 @@ function AIAssistantButton() {
|
|
|
89
89
|
setIsOpen(true);
|
|
90
90
|
telemetry.sendSearchAiOpenedMessage([
|
|
91
91
|
{
|
|
92
|
+
id: 'aiAssistantTriggerButton',
|
|
92
93
|
object: 'search',
|
|
94
|
+
uri: 'urn:redocly:realm:ui:search:aiAssistantTriggerButton',
|
|
93
95
|
method: 'ai_trigger_button',
|
|
94
96
|
},
|
|
95
97
|
]);
|
|
@@ -52,7 +52,9 @@ function CatalogActionsRow({ searchQuery, setSearchQuery, sortOption, setSortOpt
|
|
|
52
52
|
viewMode === 'cards' && (react_1.default.createElement(CatalogSortButton_1.CatalogSortButton, { onSortChange: setSortOption, currentSort: sortOption })),
|
|
53
53
|
viewMode && onViewModeChange && (react_1.default.createElement(CatalogViewModeToggle_1.CatalogViewModeToggle, { viewMode: viewMode, onViewModeChange: onViewModeChange })))));
|
|
54
54
|
}
|
|
55
|
-
exports.CatalogActionsRowWrapper = styled_components_1.default.div
|
|
55
|
+
exports.CatalogActionsRowWrapper = styled_components_1.default.div.withConfig({
|
|
56
|
+
shouldForwardProp: (prop) => prop !== 'isDetailsPage',
|
|
57
|
+
}) `
|
|
56
58
|
display: flex;
|
|
57
59
|
align-items: center;
|
|
58
60
|
|
|
@@ -58,8 +58,8 @@ const extractInitials = (value) => {
|
|
|
58
58
|
}
|
|
59
59
|
return initials[0] + initials[initials.length - 1];
|
|
60
60
|
};
|
|
61
|
-
function CatalogAvatar({ value, size
|
|
62
|
-
return (react_1.default.createElement(CatalogAvatarWrapper, { "data-component-name": "Catalog/CatalogAvatar", size: size }, extractInitials(value)));
|
|
61
|
+
function CatalogAvatar({ value, size }) {
|
|
62
|
+
return (react_1.default.createElement(CatalogAvatarWrapper, { "data-component-name": "Catalog/CatalogAvatar", $size: size }, extractInitials(value)));
|
|
63
63
|
}
|
|
64
64
|
const CatalogAvatarWrapper = styled_components_1.default.div `
|
|
65
65
|
display: flex;
|
|
@@ -70,7 +70,7 @@ const CatalogAvatarWrapper = styled_components_1.default.div `
|
|
|
70
70
|
flex-shrink: 0;
|
|
71
71
|
font-weight: var(--catalog-avatar-font-weight);
|
|
72
72
|
line-height: var(--catalog-avatar-line-height);
|
|
73
|
-
${({ size }) => SIZES[size]};
|
|
73
|
+
${({ $size }) => SIZES[$size]};
|
|
74
74
|
`;
|
|
75
75
|
const SIZES = {
|
|
76
76
|
small: (0, styled_components_1.css) `
|
|
@@ -29,7 +29,7 @@ function CatalogCard({ entity, catalogConfig }) {
|
|
|
29
29
|
react_1.default.createElement(CardHeader, null,
|
|
30
30
|
react_1.default.createElement(HeaderIconWrapper, null,
|
|
31
31
|
react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entity.type })),
|
|
32
|
-
react_1.default.createElement(HeaderIconText, { entityType: entity.type }, entity.type)),
|
|
32
|
+
react_1.default.createElement(HeaderIconText, { $entityType: entity.type }, entity.type)),
|
|
33
33
|
react_1.default.createElement(CardDescription, null,
|
|
34
34
|
react_1.default.createElement(CardTitle, null,
|
|
35
35
|
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, entity.title)),
|
|
@@ -59,7 +59,7 @@ function CatalogCard({ entity, catalogConfig }) {
|
|
|
59
59
|
variant: 'outline',
|
|
60
60
|
} })))),
|
|
61
61
|
react_1.default.createElement(Divider, null),
|
|
62
|
-
react_1.default.createElement(CardFooter, { hasTags: !!((_c = entity.tags) === null || _c === void 0 ? void 0 : _c.length) },
|
|
62
|
+
react_1.default.createElement(CardFooter, { $hasTags: !!((_c = entity.tags) === null || _c === void 0 ? void 0 : _c.length) },
|
|
63
63
|
react_1.default.createElement(CatalogTags_1.CatalogTags, { items: entity.tags || [], tagProps: {
|
|
64
64
|
style: {
|
|
65
65
|
fontSize: 'var(--catalog-card-font-size)',
|
|
@@ -86,7 +86,7 @@ const HeaderIconWrapper = styled_components_1.default.div `
|
|
|
86
86
|
margin-right: var(--catalog-card-icon-margin-right);
|
|
87
87
|
`;
|
|
88
88
|
const HeaderIconText = styled_components_1.default.div `
|
|
89
|
-
color: ${({ entityType }) => `var(--catalog-entity-icon-color-${entityType})`};
|
|
89
|
+
color: ${({ $entityType }) => `var(--catalog-entity-icon-color-${$entityType})`};
|
|
90
90
|
`;
|
|
91
91
|
const CardHeader = styled_components_1.default.div `
|
|
92
92
|
display: flex;
|
|
@@ -134,7 +134,7 @@ const CardFooter = styled_components_1.default.div `
|
|
|
134
134
|
height: var(--catalog-card-footer-height);
|
|
135
135
|
display: flex;
|
|
136
136
|
align-items: center;
|
|
137
|
-
justify-content: ${({ hasTags }) => (hasTags ? 'space-between' : 'flex-end')};
|
|
137
|
+
justify-content: ${({ $hasTags }) => ($hasTags ? 'space-between' : 'flex-end')};
|
|
138
138
|
padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
|
|
139
139
|
`;
|
|
140
140
|
const Divider = styled_components_1.default.div `
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js
CHANGED
|
@@ -10,11 +10,11 @@ const CatalogEntityIcon_1 = require("../../../../components/Catalog/CatalogEntit
|
|
|
10
10
|
const utils_1 = require("../../../../core/utils");
|
|
11
11
|
function CatalogEntityRelationsNodeContent({ entityType, label, isRoot, }) {
|
|
12
12
|
const formattedEntityType = (0, utils_1.customCatalogOptionsCasing)(entityType);
|
|
13
|
-
return (react_1.default.createElement(CatalogEntityRelationsNodeContentWrapper, { isRoot: isRoot, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent" },
|
|
14
|
-
react_1.default.createElement(CatalogEntityRelationsNodeTypeRow, { isRoot: isRoot },
|
|
13
|
+
return (react_1.default.createElement(CatalogEntityRelationsNodeContentWrapper, { $isRoot: isRoot, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent" },
|
|
14
|
+
react_1.default.createElement(CatalogEntityRelationsNodeTypeRow, { $isRoot: isRoot },
|
|
15
15
|
isRoot ? (react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, forceColor: "var(--catalog-entity-relations-node-root-icon-color)" })) : (react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, defaultColor: false })),
|
|
16
16
|
react_1.default.createElement("span", null, formattedEntityType)),
|
|
17
|
-
react_1.default.createElement(CatalogEntityRelationsNodeLabelRow, { isRoot: isRoot }, label)));
|
|
17
|
+
react_1.default.createElement(CatalogEntityRelationsNodeLabelRow, { $isRoot: isRoot }, label)));
|
|
18
18
|
}
|
|
19
19
|
const CatalogEntityRelationsNodeTypeRow = styled_components_1.default.div `
|
|
20
20
|
display: flex;
|
|
@@ -22,7 +22,7 @@ const CatalogEntityRelationsNodeTypeRow = styled_components_1.default.div `
|
|
|
22
22
|
gap: var(--catalog-entity-relations-node-gap);
|
|
23
23
|
line-height: var(--line-height-sm);
|
|
24
24
|
font-size: var(--font-size-sm);
|
|
25
|
-
color: ${({ isRoot }) => isRoot
|
|
25
|
+
color: ${({ $isRoot }) => $isRoot
|
|
26
26
|
? 'var(--catalog-entity-relations-node-root-text-color)'
|
|
27
27
|
: 'var(--text-color-description)'};
|
|
28
28
|
`;
|
|
@@ -32,7 +32,7 @@ const CatalogEntityRelationsNodeLabelRow = styled_components_1.default.div `
|
|
|
32
32
|
gap: var(--catalog-entity-relations-node-gap);
|
|
33
33
|
line-height: var(--line-height-lg);
|
|
34
34
|
font-size: var(--font-size-lg);
|
|
35
|
-
color: ${({ isRoot }) => isRoot ? 'var(--catalog-entity-relations-node-root-text-color)' : 'var(--text-color-primary)'};
|
|
35
|
+
color: ${({ $isRoot }) => $isRoot ? 'var(--catalog-entity-relations-node-root-text-color)' : 'var(--text-color-primary)'};
|
|
36
36
|
`;
|
|
37
37
|
const CatalogEntityRelationsNodeContentWrapper = styled_components_1.default.div `
|
|
38
38
|
display: flex;
|
|
@@ -43,10 +43,10 @@ const CatalogEntityRelationsNodeContentWrapper = styled_components_1.default.div
|
|
|
43
43
|
border-radius: var(--catalog-entity-relations-node-border-radius);
|
|
44
44
|
font-style: normal;
|
|
45
45
|
font-weight: var(--catalog-entity-relations-node-font-weight);
|
|
46
|
-
background: ${({ isRoot }) => isRoot
|
|
46
|
+
background: ${({ $isRoot }) => $isRoot
|
|
47
47
|
? 'var(--catalog-entity-relations-node-root-bg-color)'
|
|
48
48
|
: 'var(--catalog-entity-relations-node-bg-color)'};
|
|
49
|
-
border: ${({ isRoot }) => isRoot
|
|
49
|
+
border: ${({ $isRoot }) => $isRoot
|
|
50
50
|
? 'none'
|
|
51
51
|
: `var(--catalog-entity-relations-node-border-width) var(--catalog-entity-relations-node-border-style) var(--catalog-entity-relations-node-border-color)`};
|
|
52
52
|
`;
|
|
@@ -7,9 +7,9 @@ exports.CatalogEntityInfoBar = CatalogEntityInfoBar;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
function CatalogEntityInfoBar({ leftContent, rightContent, withSeparator = true, hoverEffect = true, isCodeBlock = false, }) {
|
|
10
|
-
return (react_1.default.createElement(InfoBarWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityInfoBar", hoverEffect: hoverEffect },
|
|
11
|
-
react_1.default.createElement(LeftColumn, { withSeparator: withSeparator }, leftContent),
|
|
12
|
-
rightContent && react_1.default.createElement(RightColumn, { isCodeBlock: isCodeBlock }, rightContent)));
|
|
10
|
+
return (react_1.default.createElement(InfoBarWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityInfoBar", $hoverEffect: hoverEffect },
|
|
11
|
+
react_1.default.createElement(LeftColumn, { $withSeparator: withSeparator }, leftContent),
|
|
12
|
+
rightContent && react_1.default.createElement(RightColumn, { $isCodeBlock: isCodeBlock }, rightContent)));
|
|
13
13
|
}
|
|
14
14
|
const InfoBarWrapper = styled_components_1.default.div `
|
|
15
15
|
display: grid;
|
|
@@ -27,7 +27,7 @@ const InfoBarWrapper = styled_components_1.default.div `
|
|
|
27
27
|
padding: var(--catalog-card-gap);
|
|
28
28
|
margin-bottom: var(--spacing-xs);
|
|
29
29
|
|
|
30
|
-
${({ hoverEffect }) => hoverEffect &&
|
|
30
|
+
${({ $hoverEffect }) => $hoverEffect &&
|
|
31
31
|
`
|
|
32
32
|
&:hover {
|
|
33
33
|
border-color: var(--catalog-card-border-color-hover);
|
|
@@ -42,7 +42,7 @@ const LeftColumn = styled_components_1.default.div `
|
|
|
42
42
|
grid-area: left;
|
|
43
43
|
justify-self: start;
|
|
44
44
|
text-align: left;
|
|
45
|
-
border-right: ${({ withSeparator }) => withSeparator ? '1px solid var(--border-color-primary)' : 'none'};
|
|
45
|
+
border-right: ${({ $withSeparator }) => $withSeparator ? '1px solid var(--border-color-primary)' : 'none'};
|
|
46
46
|
height: 100%;
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
@@ -53,6 +53,6 @@ const RightColumn = styled_components_1.default.div `
|
|
|
53
53
|
grid-area: right;
|
|
54
54
|
justify-self: end;
|
|
55
55
|
text-align: right;
|
|
56
|
-
width: ${({ isCodeBlock }) => (isCodeBlock ? '100%' : 'auto')};
|
|
56
|
+
width: ${({ $isCodeBlock }) => ($isCodeBlock ? '100%' : 'auto')};
|
|
57
57
|
`;
|
|
58
58
|
//# sourceMappingURL=CatalogEntityInfoBar.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.CatalogEntityPropertyCard = CatalogEntityPropertyCard;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
function CatalogEntityPropertyCard({ header, content, onClick, hoverEffect = true, }) {
|
|
10
|
-
return (react_1.default.createElement(CatalogEntityPropertyWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard", onClick: onClick, hoverEffect: hoverEffect },
|
|
10
|
+
return (react_1.default.createElement(CatalogEntityPropertyWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard", onClick: onClick, $hoverEffect: hoverEffect },
|
|
11
11
|
react_1.default.createElement(CardHeader, null, header),
|
|
12
12
|
react_1.default.createElement(CardContent, null, content)));
|
|
13
13
|
}
|
|
@@ -24,7 +24,7 @@ const CatalogEntityPropertyWrapper = styled_components_1.default.div `
|
|
|
24
24
|
padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
|
|
25
25
|
gap: var(--catalog-card-content-gap-vertical);
|
|
26
26
|
|
|
27
|
-
${({ hoverEffect }) => hoverEffect &&
|
|
27
|
+
${({ $hoverEffect }) => $hoverEffect &&
|
|
28
28
|
`
|
|
29
29
|
&:hover {
|
|
30
30
|
border-color: var(--catalog-card-border-color-hover);
|
|
@@ -7,6 +7,7 @@ exports.CatalogEntityApiDescriptionRelations = CatalogEntityApiDescriptionRelati
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const Tabs_1 = require("../../../../markdoc/components/Tabs/Tabs");
|
|
10
|
+
const TabItemFragment_1 = require("../../../../markdoc/components/Tabs/TabItemFragment");
|
|
10
11
|
const EntityTypeIcon_1 = require("../../../../icons/EntityTypeIcon/EntityTypeIcon");
|
|
11
12
|
const CatalogEntityDefaultRelations_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations");
|
|
12
13
|
const MoleculesIcon_1 = require("../../../../icons/MoleculesIcon/MoleculesIcon");
|
|
@@ -14,16 +15,13 @@ const NetworkIcon_1 = require("../../../../icons/NetworkIcon/NetworkIcon");
|
|
|
14
15
|
function CatalogEntityApiDescriptionRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
|
|
15
16
|
return (react_1.default.createElement(TabsWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations" },
|
|
16
17
|
react_1.default.createElement(Tabs_1.Tabs, { key: entity.id, size: Tabs_1.TabsSize.MEDIUM },
|
|
17
|
-
react_1.default.createElement(
|
|
18
|
+
react_1.default.createElement(TabItemFragment_1.TabItemFragment, { label: "Operations", icon: react_1.default.createElement(MoleculesIcon_1.MoleculesIcon, null), onClick: () => setFilter('type:api-operation') },
|
|
18
19
|
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
|
-
react_1.default.createElement(
|
|
20
|
+
react_1.default.createElement(TabItemFragment_1.TabItemFragment, { label: "Schemas", icon: react_1.default.createElement(NetworkIcon_1.NetworkIcon, null), onClick: () => setFilter('type:data-schema') },
|
|
20
21
|
react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { key: "schemas-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: "data-schema" })),
|
|
21
|
-
react_1.default.createElement(
|
|
22
|
+
react_1.default.createElement(TabItemFragment_1.TabItemFragment, { label: "Related entities", icon: react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null), onClick: () => setFilter('-type:api-operation,data-schema') },
|
|
22
23
|
react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { key: "related-entities-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 })))));
|
|
23
24
|
}
|
|
24
|
-
const TabItem = styled_components_1.default.div `
|
|
25
|
-
padding: var(--spacing-sm);
|
|
26
|
-
`;
|
|
27
25
|
const TabsWrapper = styled_components_1.default.div `
|
|
28
26
|
--md-tabs-container-margin: none;
|
|
29
27
|
`;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.CatalogEntityTeamRelations = CatalogEntityTeamRelations;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const Tabs_1 = require("../../../../markdoc/components/Tabs/Tabs");
|
|
10
|
+
const TabItemFragment_1 = require("../../../../markdoc/components/Tabs/TabItemFragment");
|
|
10
11
|
const PeopleIcon_1 = require("../../../../icons/PeopleIcon/PeopleIcon");
|
|
11
12
|
const EntityTypeIcon_1 = require("../../../../icons/EntityTypeIcon/EntityTypeIcon");
|
|
12
13
|
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
@@ -48,14 +49,11 @@ const teamColumns = [
|
|
|
48
49
|
function CatalogEntityTeamRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
|
|
49
50
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations" },
|
|
50
51
|
react_1.default.createElement(Tabs_1.Tabs, { size: Tabs_1.TabsSize.MEDIUM },
|
|
51
|
-
react_1.default.createElement(
|
|
52
|
+
react_1.default.createElement(TabItemFragment_1.TabItemFragment, { label: "Members", icon: react_1.default.createElement(PeopleIcon_1.PeopleIcon, null), onClick: () => setFilter('type:user') },
|
|
52
53
|
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" })),
|
|
53
|
-
react_1.default.createElement(
|
|
54
|
+
react_1.default.createElement(TabItemFragment_1.TabItemFragment, { label: "Related entities", icon: react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null), onClick: () => setFilter('-type:user') },
|
|
54
55
|
react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { key: "related-entities-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 })))));
|
|
55
56
|
}
|
|
56
|
-
const TabItem = styled_components_1.default.div `
|
|
57
|
-
padding: var(--spacing-sm);
|
|
58
|
-
`;
|
|
59
57
|
const EntityDescription = styled_components_1.default.div `
|
|
60
58
|
font-size: var(--catalog-table-entity-summary-font-size);
|
|
61
59
|
line-height: var(--catalog-table-entity-summary-line-height);
|
|
@@ -9,33 +9,37 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
9
9
|
const CatalogEntityIcon_1 = require("../../components/Catalog/CatalogEntityIcon");
|
|
10
10
|
const core_1 = require("../../core");
|
|
11
11
|
function CatalogEntityTypeIcon({ entityType, defaultColors = false, size = 'medium', }) {
|
|
12
|
-
return (react_1.default.createElement(IconContainer, { "data-component-name": "Catalog/CatalogEntityTypeIcon", entityType: entityType, defaultColors: defaultColors, size: size },
|
|
12
|
+
return (react_1.default.createElement(IconContainer, { "data-component-name": "Catalog/CatalogEntityTypeIcon", $entityType: entityType, $defaultColors: defaultColors, $size: size },
|
|
13
13
|
react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, defaultColor: false })));
|
|
14
14
|
}
|
|
15
15
|
const IconContainer = styled_components_1.default.div `
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
justify-content: center;
|
|
19
|
-
width: ${({ size }) =>
|
|
20
|
-
|
|
19
|
+
width: ${({ $size }) => $size === 'large'
|
|
20
|
+
? 'var(--catalog-table-icon-width-large)'
|
|
21
|
+
: 'var(--catalog-table-icon-width-medium)'};
|
|
22
|
+
height: ${({ $size }) => $size === 'large'
|
|
23
|
+
? 'var(--catalog-table-icon-height-large)'
|
|
24
|
+
: 'var(--catalog-table-icon-height-medium)'};
|
|
21
25
|
border-radius: var(--catalog-table-icon-border-radius);
|
|
22
|
-
background-color: ${({ defaultColors, entityType }) => {
|
|
23
|
-
if (defaultColors) {
|
|
26
|
+
background-color: ${({ $defaultColors, $entityType }) => {
|
|
27
|
+
if ($defaultColors) {
|
|
24
28
|
return 'var(--catalog-entity-bg-color)';
|
|
25
29
|
}
|
|
26
|
-
if (core_1.PREDEFINED_ENTITY_TYPES.includes(entityType)) {
|
|
27
|
-
return `var(--catalog-entity-bg-color-${entityType})`;
|
|
30
|
+
if (core_1.PREDEFINED_ENTITY_TYPES.includes($entityType)) {
|
|
31
|
+
return `var(--catalog-entity-bg-color-${$entityType})`;
|
|
28
32
|
}
|
|
29
33
|
return 'var(--catalog-entity-bg-color-custom)';
|
|
30
34
|
}};
|
|
31
35
|
flex-shrink: 0;
|
|
32
36
|
border: 1px solid
|
|
33
|
-
${({ defaultColors, entityType }) => {
|
|
34
|
-
if (defaultColors) {
|
|
37
|
+
${({ $defaultColors, $entityType }) => {
|
|
38
|
+
if ($defaultColors) {
|
|
35
39
|
return 'var(--catalog-entity-border-color)';
|
|
36
40
|
}
|
|
37
|
-
if (core_1.PREDEFINED_ENTITY_TYPES.includes(entityType)) {
|
|
38
|
-
return `var(--catalog-entity-border-color-${entityType})`;
|
|
41
|
+
if (core_1.PREDEFINED_ENTITY_TYPES.includes($entityType)) {
|
|
42
|
+
return `var(--catalog-entity-border-color-${$entityType})`;
|
|
39
43
|
}
|
|
40
44
|
return 'var(--catalog-entity-border-color-custom)';
|
|
41
45
|
}};
|
|
@@ -28,7 +28,7 @@ const getEntityTagColor = (type) => {
|
|
|
28
28
|
};
|
|
29
29
|
exports.getEntityTagColor = getEntityTagColor;
|
|
30
30
|
function CatalogEntityTypeTag({ entityType }) {
|
|
31
|
-
return (react_1.default.createElement(EntityTypeTagWrapper, { entityType: entityType, "data-component-name": "Catalog/CatalogEntityTypeTag" },
|
|
31
|
+
return (react_1.default.createElement(EntityTypeTagWrapper, { $entityType: entityType, "data-component-name": "Catalog/CatalogEntityTypeTag" },
|
|
32
32
|
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, entityType)));
|
|
33
33
|
}
|
|
34
34
|
const EntityTypeTagWrapper = (0, styled_components_1.default)(Tag_1.Tag) `
|
|
@@ -36,11 +36,11 @@ const EntityTypeTagWrapper = (0, styled_components_1.default)(Tag_1.Tag) `
|
|
|
36
36
|
background-color: transparent;
|
|
37
37
|
text-transform: none;
|
|
38
38
|
border: 1px solid
|
|
39
|
-
${({ entityType }) => !core_1.PREDEFINED_ENTITY_TYPES.includes(entityType)
|
|
39
|
+
${({ $entityType }) => !core_1.PREDEFINED_ENTITY_TYPES.includes($entityType)
|
|
40
40
|
? 'var(--catalog-entity-border-color-custom)'
|
|
41
|
-
: `var(--catalog-entity-border-color-${entityType})`};
|
|
42
|
-
color: ${({ entityType }) => !core_1.PREDEFINED_ENTITY_TYPES.includes(entityType)
|
|
41
|
+
: `var(--catalog-entity-border-color-${$entityType})`};
|
|
42
|
+
color: ${({ $entityType }) => !core_1.PREDEFINED_ENTITY_TYPES.includes($entityType)
|
|
43
43
|
? 'var(--catalog-entity-icon-color-custom)'
|
|
44
|
-
: `var(--catalog-entity-icon-color-${entityType})`};
|
|
44
|
+
: `var(--catalog-entity-icon-color-${$entityType})`};
|
|
45
45
|
`;
|
|
46
46
|
//# sourceMappingURL=CatalogEntityTypeTag.js.map
|
|
@@ -67,7 +67,7 @@ const baseColumns = [
|
|
|
67
67
|
];
|
|
68
68
|
const CatalogTableView = ({ entities, entitiesCatalogConfig, catalogConfig, columns = baseColumns, currentSortOption, onRowClick, handleSortClick, isColumnSorted, style, contentMinWidth, }) => {
|
|
69
69
|
const tableContent = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
70
|
-
react_1.default.createElement(CatalogTableHeader, { columnsWidths: columns.map((column) => column.width || '1fr'), columnsMinWidths: columns.map((column) => column.minWidth || 'auto') }, columns.map((column) => (react_1.default.createElement(CatalogTableHeaderCell_1.CatalogTableHeaderCell, { key: column.key, column: column, currentSortOption: currentSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted })))),
|
|
70
|
+
react_1.default.createElement(CatalogTableHeader, { $columnsWidths: columns.map((column) => column.width || '1fr'), $columnsMinWidths: columns.map((column) => column.minWidth || 'auto') }, columns.map((column) => (react_1.default.createElement(CatalogTableHeaderCell_1.CatalogTableHeaderCell, { key: column.key, column: column, currentSortOption: currentSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted })))),
|
|
71
71
|
react_1.default.createElement(CatalogTableBody, null, entities.map((entity) => (react_1.default.createElement(CatalogTableViewRow_1.CatalogTableViewRow, { key: entity.id, entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, columns: columns, onRowClick: onRowClick }))))));
|
|
72
72
|
return (react_1.default.createElement(CatalogTableWrapper, { "data-component-name": "Catalog/CatalogTableView", style: style }, contentMinWidth != null ? (react_1.default.createElement(CatalogTableContentInner, { $contentMinWidth: contentMinWidth }, tableContent)) : (react_1.default.createElement(CatalogTableScrollContent, null, tableContent))));
|
|
73
73
|
};
|
|
@@ -89,8 +89,10 @@ const CatalogTableContentInner = styled_components_1.default.div `
|
|
|
89
89
|
`;
|
|
90
90
|
const CatalogTableHeader = styled_components_1.default.div `
|
|
91
91
|
display: grid;
|
|
92
|
-
grid-template-columns: ${({ columnsWidths, columnsMinWidths }) => columnsWidths
|
|
93
|
-
.map((width, index) => columnsMinWidths[index] !== 'auto'
|
|
92
|
+
grid-template-columns: ${({ $columnsWidths, $columnsMinWidths }) => $columnsWidths
|
|
93
|
+
.map((width, index) => $columnsMinWidths[index] !== 'auto'
|
|
94
|
+
? `minmax(${$columnsMinWidths[index]}, ${width})`
|
|
95
|
+
: width)
|
|
94
96
|
.join(' ')};
|
|
95
97
|
background: var(--catalog-table-header-bg-color);
|
|
96
98
|
font-weight: var(--catalog-table-header-font-weight);
|
|
@@ -25,9 +25,11 @@ export declare const CatalogTitle: import("styled-components/dist/types").IStyle
|
|
|
25
25
|
forwardedAs?: import("styled-components").WebTarget | undefined;
|
|
26
26
|
}, never>>> & string;
|
|
27
27
|
export declare const CatalogDescription: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>> & string;
|
|
28
|
-
export declare const CatalogPageWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "withoutFilters"> & {
|
|
28
|
+
export declare const CatalogPageWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "withoutFilters"> & {
|
|
29
29
|
withoutFilters?: boolean;
|
|
30
|
-
|
|
30
|
+
className?: string;
|
|
31
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "withoutFilters"> & {
|
|
31
32
|
withoutFilters?: boolean;
|
|
33
|
+
className?: string;
|
|
32
34
|
}, never>>> & string;
|
|
33
35
|
export declare const CatalogPageDescriptionWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
@@ -65,7 +65,9 @@ exports.CatalogDescription = styled_components_1.default.p `
|
|
|
65
65
|
font-size: var(--catalog-classic-description-font-size);
|
|
66
66
|
margin: var(--catalog-classic-description-margin);
|
|
67
67
|
`;
|
|
68
|
-
exports.CatalogPageWrapper = styled_components_1.default.div
|
|
68
|
+
exports.CatalogPageWrapper = styled_components_1.default.div.withConfig({
|
|
69
|
+
shouldForwardProp: (prop) => prop !== 'withoutFilters',
|
|
70
|
+
}) `
|
|
69
71
|
--sidebar-width: var(--catalog-classic-sidebar-width, 285px);
|
|
70
72
|
|
|
71
73
|
display: flex;
|
|
@@ -32,6 +32,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
35
46
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
47
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
48
|
};
|
|
@@ -41,7 +52,8 @@ const react_1 = __importDefault(require("react"));
|
|
|
41
52
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
42
53
|
const utils_1 = require("../../core/utils");
|
|
43
54
|
function CodeBlockContainer(props) {
|
|
44
|
-
|
|
55
|
+
const { hideCodeColors, wrapContents, maxHeight } = props, rest = __rest(props, ["hideCodeColors", "wrapContents", "maxHeight"]);
|
|
56
|
+
return (react_1.default.createElement(CodeBlockContainerComponent, Object.assign({}, rest, { $hideCodeColors: hideCodeColors, $wrapContents: wrapContents, $maxHeight: maxHeight, "data-component-name": "CodeBlock/CodeBlockContainer" })));
|
|
45
57
|
}
|
|
46
58
|
const CodeBlockContainerComponent = styled_components_1.default.pre `
|
|
47
59
|
&& {
|
|
@@ -53,8 +65,8 @@ const CodeBlockContainerComponent = styled_components_1.default.pre `
|
|
|
53
65
|
margin: var(--code-block-margin);
|
|
54
66
|
color: var(--code-block-text-color);
|
|
55
67
|
font-size: var(--code-block-font-size);
|
|
56
|
-
white-space: ${({ wrapContents }) => (wrapContents ? 'pre-wrap' : 'var(--code-wrap, pre)')};
|
|
57
|
-
max-height: ${({ maxHeight }) => maxHeight ? maxHeight : 'var(--code-block-max-height, 600px);'};
|
|
68
|
+
white-space: ${({ $wrapContents }) => ($wrapContents ? 'pre-wrap' : 'var(--code-wrap, pre)')};
|
|
69
|
+
max-height: ${({ $maxHeight }) => $maxHeight ? $maxHeight : 'var(--code-block-max-height, 600px);'};
|
|
58
70
|
word-break: var(--code-block-word-break, initial);
|
|
59
71
|
|
|
60
72
|
pre,
|
|
@@ -338,7 +350,7 @@ const CodeBlockContainerComponent = styled_components_1.default.pre `
|
|
|
338
350
|
|
|
339
351
|
${(0, utils_1.generateCodeBlockTokens)()}
|
|
340
352
|
|
|
341
|
-
${({ hideCodeColors }) => hideCodeColors &&
|
|
353
|
+
${({ $hideCodeColors }) => $hideCodeColors &&
|
|
342
354
|
(0, styled_components_1.css) `
|
|
343
355
|
.line-number:not(.highlighted),
|
|
344
356
|
.line-number:not(.highlighted) > span,
|