@redocly/theme 0.64.0-next.1 → 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/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 +8 -1
- package/lib/core/styles/global.d.ts +6 -2
- package/lib/core/styles/global.js +18 -10
- 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/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/markdoc/components/Heading/Heading.js +2 -2
- 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/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 +10 -2
- package/src/core/styles/global.ts +20 -12
- 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/index.ts +1 -1
- package/src/markdoc/components/Heading/Heading.tsx +2 -1
- 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
package/src/index.ts
CHANGED
|
@@ -136,7 +136,7 @@ export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableHe
|
|
|
136
136
|
export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
137
137
|
export * from '@redocly/theme/components/Catalog/CatalogSelector';
|
|
138
138
|
export * from '@redocly/theme/components/Catalog/CatalogSortButton';
|
|
139
|
-
export * from '@redocly/theme/components/Catalog/
|
|
139
|
+
export * from '@redocly/theme/components/Catalog/CatalogTags';
|
|
140
140
|
export * from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
|
|
141
141
|
export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton';
|
|
142
142
|
export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar';
|
|
@@ -64,7 +64,8 @@ export function Heading({
|
|
|
64
64
|
const { usePageProps } = useThemeHooks();
|
|
65
65
|
const pageProps = usePageProps();
|
|
66
66
|
|
|
67
|
-
const isMarkdownPage =
|
|
67
|
+
const isMarkdownPage =
|
|
68
|
+
pageProps?.metadata?.type === 'markdown' || pageProps?.metadata?.type === 'asciidoc';
|
|
68
69
|
|
|
69
70
|
const linkEl = (
|
|
70
71
|
<a
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
import { TagProps } from '../../components/Tag/Tag';
|
|
3
|
-
export type CatalogTagsWithTooltipProps = {
|
|
4
|
-
items: string[];
|
|
5
|
-
itemsToShow?: number;
|
|
6
|
-
showPlaceholder?: boolean;
|
|
7
|
-
tagProps?: TagProps;
|
|
8
|
-
showAvatars?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare function CatalogTagsWithTooltip({ items, itemsToShow, showPlaceholder, showAvatars, tagProps, }: CatalogTagsWithTooltipProps): JSX.Element | null;
|
|
@@ -1,57 +0,0 @@
|
|
|
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.CatalogTagsWithTooltip = CatalogTagsWithTooltip;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const constants_1 = require("../../core/constants");
|
|
10
|
-
const Tag_1 = require("../../components/Tag/Tag");
|
|
11
|
-
const Tooltip_1 = require("../../components/Tooltip/Tooltip");
|
|
12
|
-
const CatalogHighlight_1 = require("../../components/Catalog/CatalogHighlight");
|
|
13
|
-
const hooks_1 = require("../../core/hooks");
|
|
14
|
-
const CatalogAvatar_1 = require("../../components/Catalog/CatalogAvatar");
|
|
15
|
-
function CatalogTagsWithTooltip({ items, itemsToShow = 1, showPlaceholder = false, showAvatars, tagProps, }) {
|
|
16
|
-
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
17
|
-
const { translate } = useTranslate();
|
|
18
|
-
if (!items || items.length === 0) {
|
|
19
|
-
if (showPlaceholder) {
|
|
20
|
-
return (react_1.default.createElement(CatalogTagsNotConnectedWrapper, { "data-component-name": "Catalog/CatalogTagsWithTooltip" }, translate('catalog.notConnected', 'Not connected')));
|
|
21
|
-
}
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
if (items.length <= itemsToShow) {
|
|
25
|
-
return (react_1.default.createElement(CatalogTagsWrapper, { "data-component-name": "Catalog/CatalogTagsWithTooltip" }, items.map((item, index) => (react_1.default.createElement(Tag_1.Tag, Object.assign({ key: `${item}-${index}` }, tagProps, (showAvatars && {
|
|
26
|
-
icon: react_1.default.createElement(CatalogAvatar_1.CatalogAvatar, { value: item, size: "small" }),
|
|
27
|
-
}), { maxLength: constants_1.CATALOG_TAG_MAX_LENGTH }),
|
|
28
|
-
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, item))))));
|
|
29
|
-
}
|
|
30
|
-
const displayedItems = items.slice(0, itemsToShow);
|
|
31
|
-
const remainingCount = items.length - itemsToShow;
|
|
32
|
-
return (react_1.default.createElement(Tooltip_1.Tooltip, { tip: items.join(', '), placement: "bottom", className: "catalog", width: "400px" },
|
|
33
|
-
react_1.default.createElement(CatalogTagsWrapper, { "data-component-name": "Catalog/CatalogTagsWithTooltip" },
|
|
34
|
-
displayedItems.map((item, index) => (react_1.default.createElement(Tag_1.Tag, Object.assign({ key: `${item}-${index}` }, tagProps, (showAvatars && {
|
|
35
|
-
icon: react_1.default.createElement(CatalogAvatar_1.CatalogAvatar, { value: item, size: "small" }),
|
|
36
|
-
}), { textTransform: "none", maxLength: constants_1.CATALOG_TAG_MAX_LENGTH }),
|
|
37
|
-
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, item)))),
|
|
38
|
-
react_1.default.createElement(MoreTagsButton, null,
|
|
39
|
-
"+",
|
|
40
|
-
remainingCount,
|
|
41
|
-
" ",
|
|
42
|
-
translate('catalog.tags.more', 'more')))));
|
|
43
|
-
}
|
|
44
|
-
const CatalogTagsWrapper = styled_components_1.default.div `
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-wrap: wrap;
|
|
47
|
-
`;
|
|
48
|
-
const MoreTagsButton = styled_components_1.default.span `
|
|
49
|
-
font-size: var(--catalog-tags-more-button-font-size);
|
|
50
|
-
margin-left: var(--catalog-tags-more-button-margin-left);
|
|
51
|
-
`;
|
|
52
|
-
const CatalogTagsNotConnectedWrapper = styled_components_1.default.span `
|
|
53
|
-
font-size: var(--catalog-tags-not-connected-font-size);
|
|
54
|
-
line-height: var(--catalog-tags-not-connected-line-height);
|
|
55
|
-
color: var(--catalog-tags-not-connected-color);
|
|
56
|
-
`;
|
|
57
|
-
//# sourceMappingURL=CatalogTagsWithTooltip.js.map
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { CATALOG_TAG_MAX_LENGTH } from '@redocly/theme/core/constants';
|
|
5
|
-
import { Tag, TagProps } from '@redocly/theme/components/Tag/Tag';
|
|
6
|
-
import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
7
|
-
import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
|
8
|
-
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
|
-
import { CatalogAvatar } from '@redocly/theme/components/Catalog/CatalogAvatar';
|
|
10
|
-
|
|
11
|
-
export type CatalogTagsWithTooltipProps = {
|
|
12
|
-
items: string[];
|
|
13
|
-
itemsToShow?: number;
|
|
14
|
-
showPlaceholder?: boolean;
|
|
15
|
-
tagProps?: TagProps;
|
|
16
|
-
showAvatars?: boolean;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function CatalogTagsWithTooltip({
|
|
20
|
-
items,
|
|
21
|
-
itemsToShow = 1,
|
|
22
|
-
showPlaceholder = false,
|
|
23
|
-
showAvatars,
|
|
24
|
-
tagProps,
|
|
25
|
-
}: CatalogTagsWithTooltipProps): JSX.Element | null {
|
|
26
|
-
const { useTranslate } = useThemeHooks();
|
|
27
|
-
const { translate } = useTranslate();
|
|
28
|
-
|
|
29
|
-
if (!items || items.length === 0) {
|
|
30
|
-
if (showPlaceholder) {
|
|
31
|
-
return (
|
|
32
|
-
<CatalogTagsNotConnectedWrapper data-component-name="Catalog/CatalogTagsWithTooltip">
|
|
33
|
-
{translate('catalog.notConnected', 'Not connected')}
|
|
34
|
-
</CatalogTagsNotConnectedWrapper>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (items.length <= itemsToShow) {
|
|
41
|
-
return (
|
|
42
|
-
<CatalogTagsWrapper data-component-name="Catalog/CatalogTagsWithTooltip">
|
|
43
|
-
{items.map((item, index) => (
|
|
44
|
-
<Tag
|
|
45
|
-
key={`${item}-${index}`}
|
|
46
|
-
{...tagProps}
|
|
47
|
-
{...(showAvatars && {
|
|
48
|
-
icon: <CatalogAvatar value={item} size="small" />,
|
|
49
|
-
})}
|
|
50
|
-
maxLength={CATALOG_TAG_MAX_LENGTH}
|
|
51
|
-
>
|
|
52
|
-
<CatalogHighlight>{item}</CatalogHighlight>
|
|
53
|
-
</Tag>
|
|
54
|
-
))}
|
|
55
|
-
</CatalogTagsWrapper>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const displayedItems = items.slice(0, itemsToShow);
|
|
60
|
-
const remainingCount = items.length - itemsToShow;
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<Tooltip tip={items.join(', ')} placement="bottom" className="catalog" width="400px">
|
|
64
|
-
<CatalogTagsWrapper data-component-name="Catalog/CatalogTagsWithTooltip">
|
|
65
|
-
{displayedItems.map((item, index) => (
|
|
66
|
-
<Tag
|
|
67
|
-
key={`${item}-${index}`}
|
|
68
|
-
{...tagProps}
|
|
69
|
-
{...(showAvatars && {
|
|
70
|
-
icon: <CatalogAvatar value={item} size="small" />,
|
|
71
|
-
})}
|
|
72
|
-
textTransform="none"
|
|
73
|
-
maxLength={CATALOG_TAG_MAX_LENGTH}
|
|
74
|
-
>
|
|
75
|
-
<CatalogHighlight>{item}</CatalogHighlight>
|
|
76
|
-
</Tag>
|
|
77
|
-
))}
|
|
78
|
-
|
|
79
|
-
<MoreTagsButton>
|
|
80
|
-
+{remainingCount} {translate('catalog.tags.more', 'more')}
|
|
81
|
-
</MoreTagsButton>
|
|
82
|
-
</CatalogTagsWrapper>
|
|
83
|
-
</Tooltip>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const CatalogTagsWrapper = styled.div`
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-wrap: wrap;
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
const MoreTagsButton = styled.span`
|
|
93
|
-
font-size: var(--catalog-tags-more-button-font-size);
|
|
94
|
-
margin-left: var(--catalog-tags-more-button-margin-left);
|
|
95
|
-
`;
|
|
96
|
-
|
|
97
|
-
const CatalogTagsNotConnectedWrapper = styled.span`
|
|
98
|
-
font-size: var(--catalog-tags-not-connected-font-size);
|
|
99
|
-
line-height: var(--catalog-tags-not-connected-line-height);
|
|
100
|
-
color: var(--catalog-tags-not-connected-color);
|
|
101
|
-
`;
|