@redocly/theme 0.64.0-next.0 → 0.64.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/Banner/Banner.js +3 -3
- package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -3
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -6
- package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +2 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +5 -5
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +15 -7
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +14 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +13 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +4 -3
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +3 -2
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +9 -9
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -3
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -3
- package/lib/components/Catalog/CatalogPageDescription.js +1 -1
- package/lib/components/Catalog/CatalogSortButton.d.ts +4 -5
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +6 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -2
- package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.js +45 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +5 -3
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +2 -3
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +15 -5
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -2
- package/lib/components/Catalog/CatalogTags.d.ts +11 -0
- package/lib/components/Catalog/CatalogTags.js +62 -0
- package/lib/components/Catalog/variables.js +22 -14
- package/lib/components/Search/SearchDialog.js +118 -116
- package/lib/components/SvgViewer/variables.dark.js +1 -1
- package/lib/core/constants/catalog.d.ts +1 -1
- package/lib/core/constants/catalog.js +1 -1
- package/lib/core/hooks/catalog/use-catalog-entity-link.d.ts +8 -0
- package/lib/core/hooks/catalog/use-catalog-entity-link.js +42 -0
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +2 -1
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.js +5 -3
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/styles/dark.d.ts +3 -1
- package/lib/core/styles/dark.js +42 -31
- package/lib/core/styles/global.d.ts +6 -2
- package/lib/core/styles/global.js +54 -39
- package/lib/core/styles/palette.d.ts +6 -0
- package/lib/core/styles/palette.dark.d.ts +3 -0
- package/lib/core/styles/palette.dark.js +216 -0
- package/lib/core/styles/palette.js +179 -0
- package/lib/core/types/catalog.d.ts +23 -7
- package/lib/core/types/hooks.d.ts +6 -4
- package/lib/icons/ColorPaletteIcon/ColorPaletteIcon.d.ts +9 -0
- package/lib/icons/ColorPaletteIcon/ColorPaletteIcon.js +27 -0
- package/lib/icons/StopIcon/StopIcon.d.ts +9 -0
- package/lib/icons/StopIcon/StopIcon.js +22 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +3 -1
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.d.ts +7 -0
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.js +95 -0
- package/lib/markdoc/components/ExcalidrawDiagram/variables.d.ts +1 -0
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.d.ts +1 -0
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.js +8 -0
- package/lib/markdoc/components/ExcalidrawDiagram/variables.js +15 -0
- package/lib/markdoc/components/Heading/Heading.js +2 -2
- package/lib/markdoc/components/Mermaid/Mermaid.js +2 -0
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/package.json +2 -2
- package/src/components/Banner/Banner.tsx +7 -7
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -3
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +4 -6
- package/src/components/Catalog/CatalogEntities.tsx +3 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +3 -24
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +8 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +13 -8
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +27 -15
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +9 -9
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +17 -9
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +4 -8
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +16 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +4 -3
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +18 -11
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -3
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +2 -3
- package/src/components/Catalog/CatalogPageDescription.tsx +1 -1
- package/src/components/Catalog/CatalogSortButton.tsx +5 -6
- package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +6 -2
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +2 -2
- package/src/components/Catalog/CatalogTableView/CatalogLastUpdateCell.tsx +54 -0
- package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +5 -2
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -3
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +17 -7
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +3 -2
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -2
- package/src/components/Catalog/CatalogTags.tsx +115 -0
- package/src/components/Catalog/variables.ts +22 -14
- package/src/components/Search/SearchDialog.tsx +299 -293
- package/src/components/SvgViewer/variables.dark.ts +1 -1
- package/src/core/constants/catalog.ts +1 -1
- package/src/core/hooks/catalog/use-catalog-entity-link.ts +46 -0
- package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +10 -2
- package/src/core/hooks/index.ts +1 -0
- package/src/core/styles/dark.ts +14 -2
- package/src/core/styles/global.ts +28 -13
- package/src/core/styles/palette.dark.ts +214 -0
- package/src/core/styles/palette.ts +177 -0
- package/src/core/types/catalog.ts +24 -8
- package/src/core/types/hooks.ts +5 -10
- package/src/icons/ColorPaletteIcon/ColorPaletteIcon.tsx +28 -0
- package/src/icons/StopIcon/StopIcon.tsx +23 -0
- package/src/index.ts +3 -1
- package/src/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.tsx +85 -0
- package/src/markdoc/components/ExcalidrawDiagram/variables.dark.ts +5 -0
- package/src/markdoc/components/ExcalidrawDiagram/variables.ts +12 -0
- package/src/markdoc/components/Heading/Heading.tsx +2 -1
- package/src/markdoc/components/Mermaid/Mermaid.tsx +2 -0
- package/src/markdoc/components/default.ts +1 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +0 -10
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +0 -57
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +0 -101
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ColorPaletteIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 13 13", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M3.5 5.25456C3.98325 5.25456 4.375 4.86281 4.375 4.37956C4.375 3.89631 3.98325 3.50456 3.5 3.50456C3.01675 3.50456 2.625 3.89631 2.625 4.37956C2.625 4.86281 3.01675 5.25456 3.5 5.25456Z" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M6.125 3.94206C6.60825 3.94206 7 3.55031 7 3.06706C7 2.58381 6.60825 2.19206 6.125 2.19206C5.64175 2.19206 5.25 2.58381 5.25 3.06706C5.25 3.55031 5.64175 3.94206 6.125 3.94206Z" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M8.75 5.25456C9.23325 5.25456 9.625 4.86281 9.625 4.37956C9.625 3.89631 9.23325 3.50456 8.75 3.50456C8.26675 3.50456 7.875 3.89631 7.875 4.37956C7.875 4.86281 8.26675 5.25456 8.75 5.25456Z" }),
|
|
14
|
+
react_1.default.createElement("path", { d: "M9.1875 7.87956C9.67075 7.87956 10.0625 7.48781 10.0625 7.00456C10.0625 6.52131 9.67075 6.12956 9.1875 6.12956C8.70425 6.12956 8.3125 6.52131 8.3125 7.00456C8.3125 7.48781 8.70425 7.87956 9.1875 7.87956Z" }),
|
|
15
|
+
react_1.default.createElement("path", { d: "M7.4375 10.0671C7.92075 10.0671 8.3125 9.67531 8.3125 9.19206C8.3125 8.70881 7.92075 8.31706 7.4375 8.31706C6.95425 8.31706 6.5625 8.70881 6.5625 9.19206C6.5625 9.67531 6.95425 10.0671 7.4375 10.0671Z" }),
|
|
16
|
+
react_1.default.createElement("path", { d: "M6.36125 0.00455826C5.53725 -0.0272487 4.7153 0.107661 3.9447 0.401198C3.17409 0.694735 2.4707 1.14086 1.87668 1.71281C1.28266 2.28477 0.810249 2.97079 0.487771 3.72974C0.165293 4.48869 -0.000611956 5.30494 1.69613e-06 6.12956C-2.00107e-05 6.45389 0.074769 6.77385 0.218553 7.06457C0.362337 7.35528 0.57124 7.60891 0.829017 7.80574C1.08679 8.00256 1.3865 8.13728 1.70482 8.1994C2.02315 8.26153 2.35151 8.24939 2.66438 8.16393L3.15438 8.02831C3.3493 7.9751 3.55388 7.96761 3.75217 8.00643C3.95047 8.04526 4.13712 8.12934 4.29759 8.25212C4.45806 8.37491 4.58801 8.53309 4.67733 8.71433C4.76664 8.89558 4.8129 9.095 4.8125 9.29706V10.9421C4.8125 11.2902 4.95078 11.624 5.19692 11.8701C5.44307 12.1163 5.77691 12.2546 6.125 12.2546C6.94962 12.2552 7.76587 12.0893 8.52482 11.7668C9.28377 11.4443 9.96979 10.9719 10.5417 10.3779C11.1137 9.78386 11.5598 9.08046 11.8534 8.30986C12.1469 7.53926 12.2818 6.71731 12.25 5.89331C12.1865 4.35185 11.5457 2.89063 10.4548 1.79973C9.36393 0.708834 7.90271 0.0680368 6.36125 0.00455826ZM9.90938 9.76518C9.42087 10.2766 8.83352 10.6835 8.18297 10.961C7.53243 11.2385 6.83227 11.3809 6.125 11.3796C6.00897 11.3796 5.89769 11.3335 5.81564 11.2514C5.7336 11.1694 5.6875 11.0581 5.6875 10.9421V9.29706C5.6875 8.7169 5.45703 8.1605 5.0468 7.75026C4.63656 7.34003 4.08016 7.10956 3.5 7.10956C3.30341 7.10991 3.10774 7.13639 2.91813 7.18831L2.42813 7.32393C2.24511 7.37298 2.05326 7.37922 1.86744 7.34216C1.68163 7.3051 1.50685 7.22574 1.35665 7.11024C1.20645 6.99474 1.08488 6.84619 1.00135 6.67612C0.917824 6.50605 0.87459 6.31903 0.875002 6.12956C0.874459 5.42247 1.01676 4.72256 1.29336 4.07181C1.56996 3.42107 1.97517 2.83291 2.48466 2.34261C2.99416 1.85232 3.59745 1.47 4.25833 1.21859C4.91922 0.967181 5.62408 0.851864 6.33063 0.879558C7.64627 0.948081 8.8899 1.50154 9.82146 2.4331C10.753 3.36466 11.3065 4.60829 11.375 5.92393C11.4051 6.63092 11.2907 7.33662 11.0387 7.99785C10.7867 8.65908 10.4024 9.26195 9.90938 9.76956V9.76518Z" })));
|
|
17
|
+
exports.ColorPaletteIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
18
|
+
'data-component-name': 'icons/ColorPaletteIcon/ColorPaletteIcon',
|
|
19
|
+
})) `
|
|
20
|
+
path {
|
|
21
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
height: ${({ size }) => size || '16px'};
|
|
25
|
+
width: ${({ size }) => size || '16px'};
|
|
26
|
+
`;
|
|
27
|
+
//# sourceMappingURL=ColorPaletteIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const StopIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StopIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 14 14", fill: "none" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M10.5 3.5V10.5H3.5V3.5H10.5ZM10.5 2.625H3.5C3.26794 2.625 3.04538 2.71719 2.88128 2.88128C2.71719 3.04538 2.625 3.26794 2.625 3.5V10.5C2.625 10.7321 2.71719 10.9546 2.88128 11.1187C3.04538 11.2828 3.26794 11.375 3.5 11.375H10.5C10.7321 11.375 10.9546 11.2828 11.1187 11.1187C11.2828 10.9546 11.375 10.7321 11.375 10.5V3.5C11.375 3.26794 11.2828 3.04538 11.1187 2.88128C10.9546 2.71719 10.7321 2.625 10.5 2.625Z" })));
|
|
12
|
+
exports.StopIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
13
|
+
'data-component-name': 'icons/StopIcon/StopIcon',
|
|
14
|
+
})) `
|
|
15
|
+
path {
|
|
16
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
height: ${({ size }) => size || '16px'};
|
|
20
|
+
width: ${({ size }) => size || '16px'};
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=StopIcon.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export * from './components/Catalog/CatalogTableView/CatalogTableHeaderCell';
|
|
|
115
115
|
export * from './components/Catalog/CatalogTableView/CatalogTableView';
|
|
116
116
|
export * from './components/Catalog/CatalogSelector';
|
|
117
117
|
export * from './components/Catalog/CatalogSortButton';
|
|
118
|
-
export * from './components/Catalog/
|
|
118
|
+
export * from './components/Catalog/CatalogTags';
|
|
119
119
|
export * from './components/Catalog/CatalogViewModeToggle';
|
|
120
120
|
export * from './components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton';
|
|
121
121
|
export * from './components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar';
|
|
@@ -247,6 +247,7 @@ export * from './icons/FileIcon/FileIcon';
|
|
|
247
247
|
export * from './icons/ExportIcon/ExportIcon';
|
|
248
248
|
export * from './icons/CertificateIcon/CertificateIcon';
|
|
249
249
|
export * from './icons/PlayIcon/PlayIcon';
|
|
250
|
+
export * from './icons/StopIcon/StopIcon';
|
|
250
251
|
export * from './icons/PlaylistIcon/PlaylistIcon';
|
|
251
252
|
export * from './icons/WorkflowAutomationIcon/WorkflowAutomationIcon';
|
|
252
253
|
export * from './icons/TaskViewIcon/TaskViewIcon';
|
|
@@ -269,6 +270,7 @@ export * from './icons/GenericIcon/GenericIcon';
|
|
|
269
270
|
export * from './icons/ShareIcon/ShareIcon';
|
|
270
271
|
export * from './icons/HashtagIcon/HashtagIcon';
|
|
271
272
|
export * from './icons/FitToViewIcon/FitToViewIcon';
|
|
273
|
+
export * from './icons/ColorPaletteIcon/ColorPaletteIcon';
|
|
272
274
|
export * from './layouts/RootLayout';
|
|
273
275
|
export * from './layouts/PageLayout';
|
|
274
276
|
export * from './layouts/NotFound';
|
package/lib/index.js
CHANGED
|
@@ -173,7 +173,7 @@ __exportStar(require("./components/Catalog/CatalogTableView/CatalogTableHeaderCe
|
|
|
173
173
|
__exportStar(require("./components/Catalog/CatalogTableView/CatalogTableView"), exports);
|
|
174
174
|
__exportStar(require("./components/Catalog/CatalogSelector"), exports);
|
|
175
175
|
__exportStar(require("./components/Catalog/CatalogSortButton"), exports);
|
|
176
|
-
__exportStar(require("./components/Catalog/
|
|
176
|
+
__exportStar(require("./components/Catalog/CatalogTags"), exports);
|
|
177
177
|
__exportStar(require("./components/Catalog/CatalogViewModeToggle"), exports);
|
|
178
178
|
__exportStar(require("./components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton"), exports);
|
|
179
179
|
__exportStar(require("./components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar"), exports);
|
|
@@ -310,6 +310,7 @@ __exportStar(require("./icons/FileIcon/FileIcon"), exports);
|
|
|
310
310
|
__exportStar(require("./icons/ExportIcon/ExportIcon"), exports);
|
|
311
311
|
__exportStar(require("./icons/CertificateIcon/CertificateIcon"), exports);
|
|
312
312
|
__exportStar(require("./icons/PlayIcon/PlayIcon"), exports);
|
|
313
|
+
__exportStar(require("./icons/StopIcon/StopIcon"), exports);
|
|
313
314
|
__exportStar(require("./icons/PlaylistIcon/PlaylistIcon"), exports);
|
|
314
315
|
__exportStar(require("./icons/WorkflowAutomationIcon/WorkflowAutomationIcon"), exports);
|
|
315
316
|
__exportStar(require("./icons/TaskViewIcon/TaskViewIcon"), exports);
|
|
@@ -332,6 +333,7 @@ __exportStar(require("./icons/GenericIcon/GenericIcon"), exports);
|
|
|
332
333
|
__exportStar(require("./icons/ShareIcon/ShareIcon"), exports);
|
|
333
334
|
__exportStar(require("./icons/HashtagIcon/HashtagIcon"), exports);
|
|
334
335
|
__exportStar(require("./icons/FitToViewIcon/FitToViewIcon"), exports);
|
|
336
|
+
__exportStar(require("./icons/ColorPaletteIcon/ColorPaletteIcon"), exports);
|
|
335
337
|
/* Layouts */
|
|
336
338
|
__exportStar(require("./layouts/RootLayout"), exports);
|
|
337
339
|
__exportStar(require("./layouts/PageLayout"), exports);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ExcalidrawDiagram = ExcalidrawDiagram;
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
41
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
42
|
+
const utils_1 = require("../../../core/utils");
|
|
43
|
+
const hooks_1 = require("../../../core/hooks");
|
|
44
|
+
const SvgViewer_1 = require("../../../components/SvgViewer/SvgViewer");
|
|
45
|
+
function ExcalidrawDiagram({ diagramHtml, className }) {
|
|
46
|
+
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
47
|
+
const { translate } = useTranslate();
|
|
48
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
49
|
+
const open = () => setIsOpen(true);
|
|
50
|
+
const close = () => setIsOpen(false);
|
|
51
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
52
|
+
react_1.default.createElement(Wrapper, { className: (0, utils_1.concatClassNames)('excalidraw-wrapper', className), dangerouslySetInnerHTML: { __html: diagramHtml }, "data-component-name": "Markdoc/ExcalidrawDiagram/ExcalidrawDiagram", onClick: open, onKeyDown: (e) => (e.key === 'Enter' || e.key === ' ') && open(), role: "button", tabIndex: 0, "aria-label": translate('excalidraw.openFullscreen', 'Click to open diagram in fullscreen') }),
|
|
53
|
+
react_1.default.createElement(SvgViewer_1.SvgViewer, { isOpen: isOpen, onClose: close, labels: {
|
|
54
|
+
zoomIn: translate('excalidraw.zoomIn', 'Zoom in'),
|
|
55
|
+
zoomOut: translate('excalidraw.zoomOut', 'Zoom out'),
|
|
56
|
+
fitToView: translate('excalidraw.reset', 'Fit to view'),
|
|
57
|
+
close: translate('excalidraw.close', 'Close'),
|
|
58
|
+
dialogLabel: translate('excalidraw.viewer', 'Excalidraw diagram viewer'),
|
|
59
|
+
} },
|
|
60
|
+
react_1.default.createElement(ViewerContent, { dangerouslySetInnerHTML: { __html: diagramHtml } }))));
|
|
61
|
+
}
|
|
62
|
+
const Wrapper = styled_components_1.default.div `
|
|
63
|
+
background-color: var(--excalidraw-bg-color);
|
|
64
|
+
border-radius: var(--excalidraw-border-radius);
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
transition: box-shadow 0.2s ease;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
|
|
69
|
+
&:hover,
|
|
70
|
+
&:focus {
|
|
71
|
+
outline: none;
|
|
72
|
+
box-shadow: 0 0 0 2px var(--border-color-input-focus);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
svg {
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
height: auto;
|
|
78
|
+
display: block;
|
|
79
|
+
|
|
80
|
+
> rect {
|
|
81
|
+
fill: var(--excalidraw-bg-color);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
& + & {
|
|
86
|
+
margin-top: var(--spacing-md);
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
const ViewerContent = styled_components_1.default.div `
|
|
90
|
+
svg {
|
|
91
|
+
display: block;
|
|
92
|
+
max-width: none !important;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
//# sourceMappingURL=ExcalidrawDiagram.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const excalidraw: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const excalidrawDarkMode: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.excalidrawDarkMode = void 0;
|
|
4
|
+
const styled_components_1 = require("styled-components");
|
|
5
|
+
exports.excalidrawDarkMode = (0, styled_components_1.css) `
|
|
6
|
+
--excalidraw-bg-color: var(--bg-color); // @presenter Color
|
|
7
|
+
`;
|
|
8
|
+
//# sourceMappingURL=variables.dark.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.excalidraw = void 0;
|
|
4
|
+
const styled_components_1 = require("styled-components");
|
|
5
|
+
exports.excalidraw = (0, styled_components_1.css) `
|
|
6
|
+
/**
|
|
7
|
+
* @tokens Excalidraw
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
--excalidraw-bg-color: var(--bg-color); // @presenter Color
|
|
11
|
+
--excalidraw-border-radius: var(--border-radius-lg); // @presenter BorderRadius
|
|
12
|
+
|
|
13
|
+
// @tokens End
|
|
14
|
+
`;
|
|
15
|
+
//# sourceMappingURL=variables.js.map
|
|
@@ -70,11 +70,11 @@ function renderWithSpanWrapper(children) {
|
|
|
70
70
|
*/
|
|
71
71
|
const mdClassName = 'md';
|
|
72
72
|
function Heading({ level, id, children, 'data-source': dataSource, 'data-hash': dataHash, className, __idx, }) {
|
|
73
|
-
var _a;
|
|
73
|
+
var _a, _b;
|
|
74
74
|
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
75
75
|
const { usePageProps } = (0, hooks_1.useThemeHooks)();
|
|
76
76
|
const pageProps = usePageProps();
|
|
77
|
-
const isMarkdownPage = ((_a = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _a === void 0 ? void 0 : _a.type) === 'markdown';
|
|
77
|
+
const isMarkdownPage = ((_a = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _a === void 0 ? void 0 : _a.type) === 'markdown' || ((_b = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _b === void 0 ? void 0 : _b.type) === 'asciidoc';
|
|
78
78
|
const linkEl = (react_1.default.createElement("a", { "aria-label": `link to ${id}`, href: `#${id}`, className: (0, utils_1.concatClassNames)('anchor', 'before') },
|
|
79
79
|
react_1.default.createElement(LinkIcon_1.LinkIcon, { size: "14px", color: "--heading-anchor-color" })));
|
|
80
80
|
return (0, react_1.createElement)(`h${level}`, {
|
|
@@ -3,6 +3,7 @@ export * from '../../markdoc/components/InlineSvg/InlineSvg';
|
|
|
3
3
|
export * from '../../markdoc/components/MarkdocExample/MarkdocExample';
|
|
4
4
|
export * from '../../markdoc/components/Heading/Heading';
|
|
5
5
|
export * from '../../markdoc/components/Mermaid/Mermaid';
|
|
6
|
+
export * from '../../markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram';
|
|
6
7
|
export * from '../../markdoc/components/HtmlBlock/HtmlBlock';
|
|
7
8
|
export * from '../../markdoc/components/Tabs/Tab';
|
|
8
9
|
export * from '../../markdoc/components/Tabs/TabList';
|
|
@@ -19,6 +19,7 @@ __exportStar(require("../../markdoc/components/InlineSvg/InlineSvg"), exports);
|
|
|
19
19
|
__exportStar(require("../../markdoc/components/MarkdocExample/MarkdocExample"), exports);
|
|
20
20
|
__exportStar(require("../../markdoc/components/Heading/Heading"), exports);
|
|
21
21
|
__exportStar(require("../../markdoc/components/Mermaid/Mermaid"), exports);
|
|
22
|
+
__exportStar(require("../../markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram"), exports);
|
|
22
23
|
__exportStar(require("../../markdoc/components/HtmlBlock/HtmlBlock"), exports);
|
|
23
24
|
__exportStar(require("../../markdoc/components/Tabs/Tab"), exports);
|
|
24
25
|
__exportStar(require("../../markdoc/components/Tabs/TabList"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.64.0-next.
|
|
3
|
+
"version": "0.64.0-next.2",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"openapi-sampler": "^1.7.2",
|
|
82
82
|
"react-calendar": "5.1.0",
|
|
83
83
|
"react-date-picker": "11.0.0",
|
|
84
|
-
"@redocly/config": "0.44.
|
|
84
|
+
"@redocly/config": "0.44.2"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useState } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ResolvedBannerConfig } from '@redocly/config';
|
|
5
5
|
import type { JSX } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
@@ -23,11 +23,12 @@ function setBannerHeight(height: number): void {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export function Banner({ className }: BannerProps): JSX.Element | null {
|
|
26
|
-
const { useBanner,
|
|
26
|
+
const { useBanner, useMarkdocRenderer } = useThemeHooks();
|
|
27
27
|
const { banner, dismissBanner } = useBanner();
|
|
28
|
-
const [displayBanner, setDisplayBanner] = useState<
|
|
28
|
+
const [displayBanner, setDisplayBanner] = useState<ResolvedBannerConfig | undefined>(undefined);
|
|
29
29
|
const [isVisible, setIsVisible] = useState(false);
|
|
30
|
-
|
|
30
|
+
|
|
31
|
+
const markdownContent = useMarkdocRenderer(displayBanner?.ast);
|
|
31
32
|
const bannerRef = useRef<HTMLDivElement>(null);
|
|
32
33
|
|
|
33
34
|
useEffect(() => {
|
|
@@ -101,8 +102,7 @@ export function Banner({ className }: BannerProps): JSX.Element | null {
|
|
|
101
102
|
return null;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
const bannerColor =
|
|
105
|
-
((displayBanner as BannerConfig & { color?: BannerColor }).color as BannerColor) || 'info';
|
|
105
|
+
const bannerColor = displayBanner.color || 'info';
|
|
106
106
|
|
|
107
107
|
return (
|
|
108
108
|
<BannerWrapper
|
|
@@ -120,7 +120,7 @@ export function Banner({ className }: BannerProps): JSX.Element | null {
|
|
|
120
120
|
variant="ghost"
|
|
121
121
|
size="var(--banner-button-size)"
|
|
122
122
|
icon={<CloseIcon color={`var(--banner-${bannerColor}-icon-color)`} size="16px" />}
|
|
123
|
-
onClick={() => dismissBanner(displayBanner.
|
|
123
|
+
onClick={() => dismissBanner(displayBanner.hash)}
|
|
124
124
|
aria-label="Dismiss banner"
|
|
125
125
|
/>
|
|
126
126
|
)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { JSX } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { CatalogViewMode } from '@redocly/theme/core/types';
|
|
5
5
|
import { FilterInput } from '@redocly/theme/components/Filter/FilterInput';
|
|
6
6
|
import { CatalogSortButton } from '@redocly/theme/components/Catalog/CatalogSortButton';
|
|
7
7
|
import { CatalogViewModeToggle } from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
|
|
@@ -10,8 +10,8 @@ import { breakpoints } from '@redocly/theme/core';
|
|
|
10
10
|
export type CatalogActionsRowProps = {
|
|
11
11
|
searchQuery: string;
|
|
12
12
|
setSearchQuery: (updatedTerm: string) => void;
|
|
13
|
-
sortOption:
|
|
14
|
-
setSortOption: (option:
|
|
13
|
+
sortOption: string | null;
|
|
14
|
+
setSortOption: (option: string | null) => void;
|
|
15
15
|
viewMode?: CatalogViewMode;
|
|
16
16
|
onViewModeChange?: (mode: CatalogViewMode) => void;
|
|
17
17
|
isDetailsPage?: boolean;
|
|
@@ -9,7 +9,7 @@ import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighl
|
|
|
9
9
|
import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
|
|
10
10
|
import { ArrowRightIcon } from '@redocly/theme/icons/ArrowRightIcon/ArrowRightIcon';
|
|
11
11
|
import { ArrowUpRightIcon } from '@redocly/theme/icons/ArrowUpRightIcon/ArrowUpRightIcon';
|
|
12
|
-
import {
|
|
12
|
+
import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
|
|
13
13
|
import { CatalogEntityIcon } from '@redocly/theme/components/Catalog/CatalogEntityIcon';
|
|
14
14
|
import { getPathPrefix } from '@redocly/theme/core/utils';
|
|
15
15
|
|
|
@@ -54,7 +54,7 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
54
54
|
<CardMetadataSection>
|
|
55
55
|
<MetadataRow>
|
|
56
56
|
<MetadataLabel>{translate('catalog.metadata.domains', 'Domains:')}</MetadataLabel>
|
|
57
|
-
<
|
|
57
|
+
<CatalogTags
|
|
58
58
|
items={entity.domains?.map((domain) => domain.title) || []}
|
|
59
59
|
showPlaceholder={true}
|
|
60
60
|
tagProps={{
|
|
@@ -71,7 +71,7 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
71
71
|
|
|
72
72
|
<MetadataRow>
|
|
73
73
|
<MetadataLabel>{translate('catalog.metadata.owners', 'Owners:')}</MetadataLabel>
|
|
74
|
-
<
|
|
74
|
+
<CatalogTags
|
|
75
75
|
items={entity.owners?.map((owner) => owner.key) || []}
|
|
76
76
|
showPlaceholder={true}
|
|
77
77
|
showAvatars={true}
|
|
@@ -80,7 +80,6 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
80
80
|
fontSize: 'var(--catalog-card-font-size)',
|
|
81
81
|
backgroundColor: 'var(--catalog-card-icon-bg-color)',
|
|
82
82
|
borderRadius: 'var(--border-radius-xl)',
|
|
83
|
-
paddingLeft: 'var(--catalog-card-metadata-owner-tag-left-padding)',
|
|
84
83
|
},
|
|
85
84
|
textTransform: 'none',
|
|
86
85
|
variant: 'outline',
|
|
@@ -93,7 +92,7 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
93
92
|
<Divider />
|
|
94
93
|
|
|
95
94
|
<CardFooter hasTags={!!entity.tags?.length}>
|
|
96
|
-
<
|
|
95
|
+
<CatalogTags
|
|
97
96
|
items={entity.tags || []}
|
|
98
97
|
tagProps={{
|
|
99
98
|
style: {
|
|
@@ -179,7 +178,6 @@ const ArrowCircle = styled.div`
|
|
|
179
178
|
const CardContent = styled.div`
|
|
180
179
|
min-width: 0;
|
|
181
180
|
padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
|
|
182
|
-
height: 100%;
|
|
183
181
|
`;
|
|
184
182
|
|
|
185
183
|
const CardFooter = styled.div<{ hasTags: boolean }>`
|
|
@@ -2,7 +2,7 @@ import React, { JSX, useEffect } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { CatalogEntityConfig } from '@redocly/config';
|
|
4
4
|
|
|
5
|
-
import { BffCatalogEntity, BffCatalogEntityList
|
|
5
|
+
import { BffCatalogEntity, BffCatalogEntityList } from '@redocly/theme/core/types';
|
|
6
6
|
import {
|
|
7
7
|
useThemeHooks,
|
|
8
8
|
useCatalogEntities,
|
|
@@ -24,7 +24,7 @@ export type CatalogEntitiesProps = {
|
|
|
24
24
|
viewMode: string;
|
|
25
25
|
setEntitiesCounter: (counter: number) => void;
|
|
26
26
|
initialEntitiesList?: BffCatalogEntityList;
|
|
27
|
-
sortOption:
|
|
27
|
+
sortOption: string | null;
|
|
28
28
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
29
29
|
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
30
30
|
};
|
|
@@ -66,7 +66,7 @@ export function CatalogEntities(props: CatalogEntitiesProps): JSX.Element {
|
|
|
66
66
|
initialFilter && filterQuery
|
|
67
67
|
? `(${initialFilter}) AND (${filterQuery})`
|
|
68
68
|
: initialFilter || filterQuery,
|
|
69
|
-
sort: sortOption ||
|
|
69
|
+
sort: sortOption || (viewMode === 'table' ? 'updated_at' : 'type,title'),
|
|
70
70
|
search: searchQuery,
|
|
71
71
|
},
|
|
72
72
|
props.initialEntitiesList,
|
|
@@ -2,12 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { Route, Routes, useSearchParams } from 'react-router-dom';
|
|
4
4
|
|
|
5
|
-
import type { CatalogEntityConfig
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
BffCatalogRelatedEntity,
|
|
9
|
-
BffCatalogRelatedEntityList,
|
|
10
|
-
} from '@redocly/theme/core/types';
|
|
5
|
+
import type { CatalogEntityConfig } from '@redocly/config';
|
|
6
|
+
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
7
|
+
import type { CatalogEntityPageProps, CatalogEntityProps } from '@redocly/theme/core/types';
|
|
11
8
|
|
|
12
9
|
import { breakpoints } from '@redocly/theme/core/utils';
|
|
13
10
|
import { CatalogPageDescription } from '@redocly/theme/components/Catalog/CatalogPageDescription';
|
|
@@ -22,24 +19,6 @@ import { CatalogEntityMethodAndPath } from '@redocly/theme/components/Catalog/Ca
|
|
|
22
19
|
import { CatalogEntityRelationsGraph } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy';
|
|
23
20
|
import { CatalogEntityHistorySidebar } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar';
|
|
24
21
|
|
|
25
|
-
export type CatalogEntityProps = {
|
|
26
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
27
|
-
RedocSchema: React.ComponentType<any>;
|
|
28
|
-
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
29
|
-
StoreProvider: React.ComponentType<any>;
|
|
30
|
-
GraphqlTypeRenderer?: React.ComponentType<{ sdl: string; typeName: string }>;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type CatalogEntityPageProps = {
|
|
34
|
-
status: 'success';
|
|
35
|
-
entity: BffCatalogEntity;
|
|
36
|
-
relatedEntity: BffCatalogRelatedEntity | null;
|
|
37
|
-
relations: BffCatalogRelatedEntityList;
|
|
38
|
-
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
39
|
-
catalogConfig: CatalogEntityConfig;
|
|
40
|
-
sharedDataIds?: Record<string, string>;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
22
|
const renderFirstColumnEntitySection = (entity: BffCatalogEntity): React.ReactElement => {
|
|
44
23
|
switch (entity.type) {
|
|
45
24
|
case 'api-operation':
|
|
@@ -85,7 +85,7 @@ const MetadataWrapper = styled.div`
|
|
|
85
85
|
border-radius: var(--border-radius);
|
|
86
86
|
background-color: var(--catalog-metadata-bg-color);
|
|
87
87
|
transition: all 0.2s ease-in-out;
|
|
88
|
-
margin: var(--spacing-
|
|
88
|
+
margin-bottom: var(--spacing-base);
|
|
89
89
|
`;
|
|
90
90
|
|
|
91
91
|
const Label = styled.span`
|
|
@@ -52,7 +52,7 @@ const LinksWrapper = styled.div`
|
|
|
52
52
|
border-radius: var(--border-radius);
|
|
53
53
|
background-color: var(--catalog-metadata-bg-color);
|
|
54
54
|
transition: all 0.2s ease-in-out;
|
|
55
|
-
margin: var(--spacing-
|
|
55
|
+
margin: 0 0 var(--spacing-base) 0;
|
|
56
56
|
`;
|
|
57
57
|
|
|
58
58
|
const Label = styled.div`
|
package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx
CHANGED
|
@@ -81,6 +81,7 @@ const CatalogEntityPropertiesGridWrapper = styled.div`
|
|
|
81
81
|
display: grid;
|
|
82
82
|
gap: var(--spacing-base);
|
|
83
83
|
grid-template-columns: 1fr;
|
|
84
|
+
margin-bottom: var(--spacing-lg);
|
|
84
85
|
|
|
85
86
|
@media screen and (min-width: ${breakpoints.small}) {
|
|
86
87
|
grid-template-columns: repeat(2, 1fr);
|
package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx
CHANGED
|
@@ -64,10 +64,11 @@ const CardHeader = styled.div`
|
|
|
64
64
|
const CardContent = styled.div`
|
|
65
65
|
flex: 1;
|
|
66
66
|
display: flex;
|
|
67
|
-
align-items:
|
|
67
|
+
align-items: center;
|
|
68
68
|
gap: var(--catalog-card-content-gap);
|
|
69
69
|
flex-wrap: wrap;
|
|
70
70
|
color: var(--text-color-primary);
|
|
71
71
|
font-size: var(--font-size-lg);
|
|
72
72
|
line-height: var(--line-height-lg);
|
|
73
|
+
font-weight: var(--font-weight-semibold);
|
|
73
74
|
`;
|
|
@@ -2,9 +2,9 @@ import React, { JSX } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
4
|
import { SlackIcon } from '@redocly/theme/icons/SlackIcon/SlackIcon';
|
|
5
|
-
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
5
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
7
6
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
7
|
+
import { Button } from '@redocly/theme/components/Button/Button';
|
|
8
8
|
|
|
9
9
|
export type ContactPropertyProps = {
|
|
10
10
|
entity: BffCatalogEntity;
|
|
@@ -28,18 +28,16 @@ export function ContactProperty({ entity }: ContactPropertyProps): JSX.Element {
|
|
|
28
28
|
content={
|
|
29
29
|
<>
|
|
30
30
|
{channels?.map((channel) => (
|
|
31
|
-
<
|
|
31
|
+
<Button
|
|
32
32
|
key={channel.name}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
}}
|
|
33
|
+
variant="outlined"
|
|
34
|
+
size="small"
|
|
35
|
+
style={{ backgroundColor: 'var(--bg-color)' }}
|
|
36
|
+
to={channel.url}
|
|
37
|
+
external={true}
|
|
40
38
|
>
|
|
41
39
|
{channel.name}
|
|
42
|
-
</
|
|
40
|
+
</Button>
|
|
43
41
|
))}
|
|
44
42
|
</>
|
|
45
43
|
}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React, { JSX } from 'react';
|
|
2
2
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
3
|
+
import { BffCatalogEntity, CatalogEntityPageProps } from '@redocly/theme/core/types';
|
|
4
4
|
import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
|
|
5
|
-
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
5
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
7
|
-
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
6
|
+
import { useCatalogEntityLink, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
7
|
+
import { Button } from '@redocly/theme/components/Button/Button';
|
|
8
8
|
|
|
9
9
|
export type DomainsPropertyProps = {
|
|
10
10
|
entity: BffCatalogEntity;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export function DomainsProperty({ entity }: DomainsPropertyProps): JSX.Element {
|
|
14
|
-
const { useTranslate } = useThemeHooks();
|
|
14
|
+
const { useTranslate, usePageProps } = useThemeHooks();
|
|
15
|
+
const { entitiesCatalogConfig } = usePageProps<CatalogEntityPageProps>();
|
|
16
|
+
const { getEntityLink } = useCatalogEntityLink(entitiesCatalogConfig);
|
|
15
17
|
const { translate } = useTranslate();
|
|
16
18
|
|
|
17
19
|
const { domains = [] } = entity;
|
|
@@ -28,14 +30,17 @@ export function DomainsProperty({ entity }: DomainsPropertyProps): JSX.Element {
|
|
|
28
30
|
content={
|
|
29
31
|
<>
|
|
30
32
|
{domains?.map((domain) => (
|
|
31
|
-
<
|
|
33
|
+
<Button
|
|
32
34
|
key={domain?.id}
|
|
35
|
+
variant="outlined"
|
|
36
|
+
size="small"
|
|
33
37
|
style={{ backgroundColor: 'var(--bg-color)' }}
|
|
34
|
-
|
|
38
|
+
to={getEntityLink(domain)}
|
|
39
|
+
icon={<GraphIcon />}
|
|
40
|
+
external={true}
|
|
35
41
|
>
|
|
36
|
-
<GraphIcon />
|
|
37
42
|
{domain?.title}
|
|
38
|
-
</
|
|
43
|
+
</Button>
|
|
39
44
|
))}
|
|
40
45
|
</>
|
|
41
46
|
}
|