@redocly/theme 0.55.0-rc.2 → 0.55.0
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 +4 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/lib/components/Button/Button.d.ts +1 -0
- package/lib/components/Catalog/Catalog.d.ts +11 -0
- package/lib/components/Catalog/Catalog.js +138 -0
- package/lib/components/Catalog/CatalogActionsRow.d.ts +15 -0
- package/lib/components/Catalog/CatalogActionsRow.js +34 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +8 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +179 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +8 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +20 -0
- package/lib/components/Catalog/CatalogEntities.d.ts +18 -0
- package/lib/components/Catalog/CatalogEntities.js +63 -0
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +2 -0
- package/lib/components/Catalog/CatalogEntitiesEmptyState.js +38 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +12 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +133 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +49 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +48 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +111 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +25 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +69 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +48 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +19 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +20 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +20 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +23 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +24 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +37 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +10 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +25 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +27 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +22 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +60 -0
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +5 -0
- package/lib/components/Catalog/CatalogEntityIcon.js +38 -0
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +5 -0
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +42 -0
- package/lib/components/Catalog/CatalogHighlight.d.ts +4 -0
- package/lib/components/Catalog/CatalogHighlight.js +48 -0
- package/lib/components/Catalog/CatalogPageDescription.d.ts +9 -0
- package/lib/components/Catalog/CatalogPageDescription.js +52 -0
- package/lib/components/Catalog/CatalogSelector.d.ts +12 -0
- package/lib/components/Catalog/CatalogSelector.js +48 -0
- package/lib/components/Catalog/CatalogSortButton.d.ts +10 -0
- package/lib/components/Catalog/CatalogSortButton.js +71 -0
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +19 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +63 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +19 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +11 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +101 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +31 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +106 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +27 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +127 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +6 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +20 -0
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.d.ts +7 -0
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +66 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +9 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +46 -0
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +7 -0
- package/lib/components/Catalog/CatalogViewModeToggle.js +67 -0
- package/lib/components/Catalog/variables.d.ts +1 -0
- package/lib/components/Catalog/variables.dark.d.ts +1 -0
- package/lib/components/Catalog/variables.dark.js +8 -0
- package/lib/components/Catalog/variables.js +354 -0
- package/lib/components/CatalogClassic/CatalogClassicHighlight.js +1 -1
- package/lib/components/Dropdown/variables.js +1 -1
- package/lib/components/Filter/Filter.d.ts +1 -1
- package/lib/components/Filter/Filter.js +2 -2
- package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
- package/lib/components/Filter/FilterCheckboxes.js +4 -4
- package/lib/components/Filter/FilterContent.d.ts +3 -1
- package/lib/components/Filter/FilterContent.js +34 -4
- package/lib/components/Filter/FilterInput.js +35 -3
- package/lib/components/Filter/FilterSelect.d.ts +1 -1
- package/lib/components/Filter/FilterSelect.js +4 -4
- package/lib/components/Image/Image.js +2 -2
- package/lib/components/LoadMore/LoadMore.d.ts +8 -0
- package/lib/components/LoadMore/LoadMore.js +18 -0
- package/lib/components/Markdown/Markdown.js +1 -1
- package/lib/components/Menu/MenuItem.d.ts +1 -1
- package/lib/components/Menu/MenuItem.js +7 -3
- package/lib/components/PageNavigation/NavigationButton.d.ts +13 -0
- package/lib/components/PageNavigation/NavigationButton.js +32 -0
- package/lib/components/PageNavigation/NextButton.js +10 -29
- package/lib/components/PageNavigation/PageNavigation.js +1 -1
- package/lib/components/PageNavigation/PreviousButton.js +11 -27
- package/lib/components/Search/SearchAiConversationInput.js +2 -1
- package/lib/components/Select/Select.js +22 -6
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +7 -3
- package/lib/components/Select/variables.js +2 -2
- package/lib/components/Sidebar/Sidebar.d.ts +3 -0
- package/lib/components/Sidebar/Sidebar.js +3 -2
- package/lib/components/SkipContent/SkipContent.d.ts +2 -0
- package/lib/components/SkipContent/SkipContent.js +68 -0
- package/lib/components/SkipContent/variables.d.ts +1 -0
- package/lib/components/SkipContent/variables.js +23 -0
- package/lib/components/Tag/Tag.d.ts +3 -1
- package/lib/components/Tag/Tag.js +54 -2
- package/lib/components/Tag/variables.js +21 -0
- package/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib/components/Tooltip/Tooltip.js +26 -19
- package/lib/components/Tooltip/variables.js +17 -0
- package/lib/components/VersionPicker/VersionPicker.js +22 -3
- package/lib/components/VersionPicker/variables.js +1 -0
- package/lib/core/constants/catalog.d.ts +1 -0
- package/lib/core/constants/catalog.js +5 -0
- package/lib/core/constants/common.d.ts +1 -0
- package/lib/core/constants/common.js +2 -1
- package/lib/core/constants/index.d.ts +1 -0
- package/lib/core/constants/index.js +1 -0
- package/lib/core/constants/search.d.ts +1 -0
- package/lib/core/constants/search.js +2 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
- package/lib/core/hooks/catalog/useCatalogEntities.d.ts +4 -0
- package/lib/core/hooks/catalog/useCatalogEntities.js +17 -0
- package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +15 -0
- package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.js +23 -0
- package/lib/core/hooks/catalog/useCatalogTableViewRow.d.ts +11 -0
- package/lib/core/hooks/catalog/useCatalogTableViewRow.js +26 -0
- package/lib/core/hooks/index.d.ts +2 -0
- package/lib/core/hooks/index.js +2 -0
- package/lib/core/hooks/use-user-teams.d.ts +1 -0
- package/lib/core/hooks/use-user-teams.js +10 -0
- package/lib/core/styles/dark.js +2 -0
- package/lib/core/styles/global.js +65 -60
- package/lib/core/types/catalog.d.ts +118 -5
- package/lib/core/types/filter.d.ts +1 -0
- package/lib/core/types/hooks.d.ts +11 -4
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.js +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/telemetry.d.ts +32 -0
- package/lib/core/types/telemetry.js +3 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/parse-style-string.d.ts +1 -0
- package/lib/core/utils/parse-style-string.js +23 -0
- package/lib/icons/AscSortIcon/AscSortIcon.d.ts +9 -0
- package/lib/icons/AscSortIcon/AscSortIcon.js +25 -0
- package/lib/icons/CardsIcon/CardsIcon.d.ts +9 -0
- package/lib/icons/CardsIcon/CardsIcon.js +25 -0
- package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +9 -0
- package/lib/icons/CaretDownIcon/CaretDownIcon.js +22 -0
- package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +9 -0
- package/lib/icons/CaretUpIcon/CaretUpIcon.js +22 -0
- package/lib/icons/DescSortIcon/DescSortIcon.d.ts +9 -0
- package/lib/icons/DescSortIcon/DescSortIcon.js +25 -0
- package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +9 -0
- package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +26 -0
- package/lib/icons/GithubIcon/GithubIcon.d.ts +9 -0
- package/lib/icons/GithubIcon/GithubIcon.js +22 -0
- package/lib/icons/GraphIcon/GraphIcon.d.ts +9 -0
- package/lib/icons/GraphIcon/GraphIcon.js +22 -0
- package/lib/icons/PeopleIcon/PeopleIcon.d.ts +9 -0
- package/lib/icons/PeopleIcon/PeopleIcon.js +27 -0
- package/lib/icons/SlackIcon/SlackIcon.d.ts +9 -0
- package/lib/icons/SlackIcon/SlackIcon.js +29 -0
- package/lib/icons/SortIcon/SortIcon.d.ts +9 -0
- package/lib/icons/SortIcon/SortIcon.js +25 -0
- package/lib/icons/TableIcon/TableIcon.d.ts +9 -0
- package/lib/icons/TableIcon/TableIcon.js +22 -0
- package/lib/icons/TagsIcon/TagsIcon.d.ts +9 -0
- package/lib/icons/TagsIcon/TagsIcon.js +24 -0
- package/lib/index.d.ts +18 -1
- package/lib/index.js +19 -1
- package/lib/layouts/PageLayout.js +2 -1
- package/lib/layouts/RootLayout.js +2 -0
- package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
- package/lib/markdoc/components/Tabs/Tab.js +10 -2
- package/lib/markdoc/components/Tabs/TabList.d.ts +1 -4
- package/lib/markdoc/components/Tabs/TabList.js +18 -38
- package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
- package/lib/markdoc/components/Tabs/Tabs.js +5 -9
- package/package.json +4 -3
- package/src/components/Admonition/Admonition.tsx +4 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Catalog/Catalog.tsx +235 -0
- package/src/components/Catalog/CatalogActionsRow.tsx +58 -0
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +227 -0
- package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +29 -0
- package/src/components/Catalog/CatalogEntities.tsx +107 -0
- package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +207 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +60 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +67 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +93 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +35 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +83 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +62 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +36 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +38 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +33 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +41 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +42 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +39 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +31 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +97 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +80 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +92 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +127 -0
- package/src/components/Catalog/CatalogEntityIcon.tsx +41 -0
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +48 -0
- package/src/components/Catalog/CatalogHighlight.tsx +56 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +72 -0
- package/src/components/Catalog/CatalogSelector.tsx +67 -0
- package/src/components/Catalog/CatalogSortButton.tsx +78 -0
- package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +26 -0
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +77 -0
- package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +26 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +120 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +176 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +180 -0
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +28 -0
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +77 -0
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +83 -0
- package/src/components/Catalog/CatalogViewModeToggle.tsx +65 -0
- package/src/components/Catalog/variables.dark.ts +5 -0
- package/src/components/Catalog/variables.ts +351 -0
- package/src/components/CatalogClassic/CatalogClassicHighlight.tsx +1 -1
- package/src/components/Dropdown/variables.ts +1 -1
- package/src/components/Filter/Filter.tsx +10 -2
- package/src/components/Filter/FilterCheckboxes.tsx +8 -4
- package/src/components/Filter/FilterContent.tsx +21 -5
- package/src/components/Filter/FilterInput.tsx +16 -4
- package/src/components/Filter/FilterSelect.tsx +8 -4
- package/src/components/Image/Image.tsx +5 -9
- package/src/components/LoadMore/LoadMore.tsx +38 -0
- package/src/components/Markdown/Markdown.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +11 -2
- package/src/components/PageNavigation/NavigationButton.tsx +68 -0
- package/src/components/PageNavigation/NextButton.tsx +20 -43
- package/src/components/PageNavigation/PageNavigation.tsx +1 -1
- package/src/components/PageNavigation/PreviousButton.tsx +20 -43
- package/src/components/Search/SearchAiConversationInput.tsx +3 -0
- package/src/components/Select/Select.tsx +29 -4
- package/src/components/Select/SelectInput.tsx +20 -1
- package/src/components/Select/variables.ts +2 -2
- package/src/components/Sidebar/Sidebar.tsx +1 -1
- package/src/components/SkipContent/SkipContent.tsx +47 -0
- package/src/components/SkipContent/variables.ts +20 -0
- package/src/components/Tag/Tag.tsx +67 -1
- package/src/components/Tag/variables.ts +21 -0
- package/src/components/Tooltip/Tooltip.tsx +31 -22
- package/src/components/Tooltip/variables.ts +17 -0
- package/src/components/VersionPicker/VersionPicker.tsx +32 -2
- package/src/components/VersionPicker/variables.ts +1 -0
- package/src/core/constants/catalog.ts +1 -0
- package/src/core/constants/common.ts +1 -0
- package/src/core/constants/index.ts +1 -0
- package/src/core/constants/search.ts +2 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
- package/src/core/hooks/catalog/useCatalogEntities.ts +16 -0
- package/src/core/hooks/catalog/useCatalogTableHeaderCellActions.ts +38 -0
- package/src/core/hooks/catalog/useCatalogTableViewRow.ts +40 -0
- package/src/core/hooks/index.ts +2 -0
- package/src/core/hooks/use-user-teams.ts +8 -0
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +5 -0
- package/src/core/types/catalog.ts +143 -5
- package/src/core/types/filter.ts +1 -0
- package/src/core/types/hooks.ts +32 -5
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +22 -1
- package/src/core/types/telemetry.ts +36 -0
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/load-and-navigate.ts +5 -4
- package/src/core/utils/parse-style-string.ts +21 -0
- package/src/icons/AscSortIcon/AscSortIcon.tsx +29 -0
- package/src/icons/CardsIcon/CardsIcon.tsx +38 -0
- package/src/icons/CaretDownIcon/CaretDownIcon.tsx +26 -0
- package/src/icons/CaretUpIcon/CaretUpIcon.tsx +26 -0
- package/src/icons/DescSortIcon/DescSortIcon.tsx +29 -0
- package/src/icons/EntityTypeIcon/EntityTypeIcon.tsx +49 -0
- package/src/icons/GithubIcon/GithubIcon.tsx +35 -0
- package/src/icons/GraphIcon/GraphIcon.tsx +26 -0
- package/src/icons/PeopleIcon/PeopleIcon.tsx +46 -0
- package/src/icons/SlackIcon/SlackIcon.tsx +61 -0
- package/src/icons/SortIcon/SortIcon.tsx +29 -0
- package/src/icons/TableIcon/TableIcon.tsx +26 -0
- package/src/icons/TagsIcon/TagsIcon.tsx +41 -0
- package/src/index.ts +20 -1
- package/src/layouts/PageLayout.tsx +4 -1
- package/src/layouts/RootLayout.tsx +2 -0
- package/src/markdoc/components/Tabs/Tab.tsx +12 -1
- package/src/markdoc/components/Tabs/TabList.tsx +40 -70
- package/src/markdoc/components/Tabs/Tabs.tsx +11 -10
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
- package/lib/ext/process-scorecard.d.ts +0 -5
- package/lib/ext/process-scorecard.js +0 -11
- package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
- package/src/ext/process-scorecard.ts +0 -13
|
@@ -10,8 +10,9 @@ const hooks_1 = require("../../core/hooks");
|
|
|
10
10
|
const Breadcrumb_1 = require("../../components/Breadcrumbs/Breadcrumb");
|
|
11
11
|
function Breadcrumbs(props) {
|
|
12
12
|
const { useBreadcrumbs, useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
13
|
+
const fileBreadcrumbs = useBreadcrumbs();
|
|
14
|
+
const breadcrumbs = [...fileBreadcrumbs, ...(props.additionalBreadcrumbs || [])];
|
|
13
15
|
const telemetry = useTelemetry();
|
|
14
|
-
const breadcrumbs = useBreadcrumbs();
|
|
15
16
|
if (breadcrumbs.length === 0) {
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
@@ -18,6 +18,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
18
18
|
title?: string;
|
|
19
19
|
tabIndex?: number;
|
|
20
20
|
onClick?: (e?: any) => void;
|
|
21
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
21
22
|
type?: 'button' | 'submit' | 'reset';
|
|
22
23
|
}
|
|
23
24
|
export declare function generateClassName({ variant, tone, size, extraClass, }: ButtonProps): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { CatalogEntityConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntityList } from '../../core/types';
|
|
4
|
+
import { CatalogSwitcherItem } from '../../core';
|
|
5
|
+
export type CatalogProps = {
|
|
6
|
+
catalogConfig: CatalogEntityConfig;
|
|
7
|
+
entitiesTypes: string[];
|
|
8
|
+
initialEntitiesList?: BffCatalogEntityList;
|
|
9
|
+
catalogSwitcherItems: CatalogSwitcherItem[];
|
|
10
|
+
};
|
|
11
|
+
export declare function Catalog(props: CatalogProps): JSX.Element;
|
|
@@ -0,0 +1,138 @@
|
|
|
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.Catalog = Catalog;
|
|
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 hooks_1 = require("../../core/hooks");
|
|
11
|
+
const H3_1 = require("../../components/Typography/H3");
|
|
12
|
+
const FilterContent_1 = require("../../components/Filter/FilterContent");
|
|
13
|
+
const Sidebar_1 = require("../../components/Sidebar/Sidebar");
|
|
14
|
+
const CatalogSelector_1 = require("../../components/Catalog/CatalogSelector");
|
|
15
|
+
const SidebarActions_1 = require("../../components/SidebarActions/SidebarActions");
|
|
16
|
+
const CounterTag_1 = require("../../components/Tags/CounterTag");
|
|
17
|
+
const FilterInput_1 = require("../../components/Filter/FilterInput");
|
|
18
|
+
const CatalogViewModeToggle_1 = require("../../components/Catalog/CatalogViewModeToggle");
|
|
19
|
+
const CatalogSortButton_1 = require("../../components/Catalog/CatalogSortButton");
|
|
20
|
+
const CatalogEntities_1 = require("../../components/Catalog/CatalogEntities");
|
|
21
|
+
function Catalog(props) {
|
|
22
|
+
const { catalogConfig, entitiesTypes, initialEntitiesList, catalogSwitcherItems } = props;
|
|
23
|
+
const { useTranslate, useCatalog } = (0, hooks_1.useThemeHooks)();
|
|
24
|
+
const { translate } = useTranslate();
|
|
25
|
+
const { filters, searchQuery, setSearchQuery, filterQuery, sortOption, setSortOption, handleSortClick, isColumnSorted, viewMode, setViewMode, entitiesCounter, setEntitiesCounter, onChangeViewClick, onChangeCollapseSidebarClick, layout, collapsedSidebar, } = useCatalog(catalogConfig, (initialEntitiesList === null || initialEntitiesList === void 0 ? void 0 : initialEntitiesList.page.total) || 0);
|
|
26
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
27
|
+
react_1.default.createElement(CatalogPageWrapper, { "data-component-name": "Catalog/Catalog" },
|
|
28
|
+
react_1.default.createElement(FiltersSidebar, { collapsed: collapsedSidebar, header: collapsedSidebar ? null : (react_1.default.createElement(CatalogSelector_1.CatalogSelector, { catalogSwitcherItems: catalogSwitcherItems, setSearchQuery: setSearchQuery, setSortOption: setSortOption })), menu: react_1.default.createElement(FilterContent_1.FilterContent, { setFilterTerm: setSearchQuery, filters: filters, filterTerm: searchQuery, hideSearch: true, showCounter: false, filterValuesCasing: "sentence" }), footer: react_1.default.createElement(SidebarActions_1.SidebarActions, { layout: layout, collapsedSidebar: collapsedSidebar, isApiDocs: false, onChangeViewClick: onChangeViewClick, onChangeCollapseSidebarClick: onChangeCollapseSidebarClick }) }),
|
|
29
|
+
react_1.default.createElement(CatalogPageContent, null,
|
|
30
|
+
react_1.default.createElement(CatalogPageDescription, null,
|
|
31
|
+
react_1.default.createElement(CatalogTitleWrapper, null,
|
|
32
|
+
react_1.default.createElement(CatalogTitle, { "data-translation-key": catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey },
|
|
33
|
+
translate(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey),
|
|
34
|
+
' '),
|
|
35
|
+
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, entitiesCounter)),
|
|
36
|
+
react_1.default.createElement(CatalogDescription, { "data-translation-key": catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.descriptionTranslationKey }, translate(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.descriptionTranslationKey))),
|
|
37
|
+
react_1.default.createElement(CatalogActionsRow, null,
|
|
38
|
+
react_1.default.createElement(CatalogSearchInputWrapper, null,
|
|
39
|
+
react_1.default.createElement(FilterInput_1.FilterInput, { value: searchQuery, onChange: (updatedTerm) => setSearchQuery(updatedTerm) })),
|
|
40
|
+
react_1.default.createElement(CatalogControlsWrapper, null,
|
|
41
|
+
react_1.default.createElement(CatalogSortButton_1.CatalogSortButton, { onSortChange: setSortOption, currentSort: sortOption }),
|
|
42
|
+
react_1.default.createElement(CatalogViewModeToggle_1.CatalogViewModeToggle, { viewMode: viewMode, onViewModeChange: setViewMode }))),
|
|
43
|
+
react_1.default.createElement(CatalogEntities_1.CatalogEntities, { catalogConfig: catalogConfig, excludedEntities: catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.excludes, filterQuery: filterQuery, entitiesTypes: entitiesTypes, sortOption: sortOption, searchQuery: searchQuery, viewMode: viewMode, setEntitiesCounter: setEntitiesCounter, initialEntitiesList: initialEntitiesList, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted })))));
|
|
44
|
+
}
|
|
45
|
+
const CatalogActionsRow = styled_components_1.default.div `
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
`;
|
|
49
|
+
const CatalogControlsWrapper = styled_components_1.default.div `
|
|
50
|
+
display: var(--catalog-controls-wrapper-display);
|
|
51
|
+
align-items: var(--catalog-controls-wrapper-align-items);
|
|
52
|
+
margin-left: var(--catalog-controls-wrapper-margin-left);
|
|
53
|
+
gap: var(--catalog-controls-wrapper-gap);
|
|
54
|
+
`;
|
|
55
|
+
const CatalogPageContent = styled_components_1.default.main `
|
|
56
|
+
flex: 1;
|
|
57
|
+
width: var(--catalog-page-content-width-mobile);
|
|
58
|
+
margin: var(--catalog-page-content-margin-mobile);
|
|
59
|
+
|
|
60
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
61
|
+
width: var(--catalog-page-content-width-desktop);
|
|
62
|
+
padding: var(--catalog-page-padding);
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
const CatalogTitleWrapper = styled_components_1.default.div `
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
color: var(--catalog-title-text-color);
|
|
69
|
+
font-weight: var(--catalog-title-font-weight) !important;
|
|
70
|
+
font-size: var(--catalog-title-font-size);
|
|
71
|
+
`;
|
|
72
|
+
const CatalogTitle = (0, styled_components_1.default)(H3_1.H3) `
|
|
73
|
+
color: var(--catalog-title-text-color);
|
|
74
|
+
font-weight: var(--catalog-title-font-weight) !important;
|
|
75
|
+
font-size: var(--catalog-title-font-size);
|
|
76
|
+
margin: var(--catalog-title-margin);
|
|
77
|
+
margin-right: var(--catalog-title-spacing-right);
|
|
78
|
+
`;
|
|
79
|
+
const CatalogDescription = styled_components_1.default.p `
|
|
80
|
+
color: var(--catalog-description-text-color);
|
|
81
|
+
font-weight: var(--catalog-description-font-weight);
|
|
82
|
+
font-size: var(--catalog-description-font-size);
|
|
83
|
+
margin: var(--catalog-description-margin);
|
|
84
|
+
line-height: var(--catalog-description-line-height);
|
|
85
|
+
`;
|
|
86
|
+
const CatalogPageWrapper = styled_components_1.default.div `
|
|
87
|
+
--sidebar-width: var(--catalog-sidebar-width);
|
|
88
|
+
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
|
|
92
|
+
font-weight: var(--catalog-page-wrapper-font-weight);
|
|
93
|
+
color: var(--catalog-page-wrapper-text-color);
|
|
94
|
+
font-size: var(--catalog-page-wrapper-font-size);
|
|
95
|
+
font-family: var(--catalog-page-wrapper-font-family);
|
|
96
|
+
line-height: var(--catalog-page-wrapper-line-height);
|
|
97
|
+
|
|
98
|
+
hr {
|
|
99
|
+
border: 0;
|
|
100
|
+
width: var(--catalog-hr-width);
|
|
101
|
+
margin: var(--catalog-hr-margin);
|
|
102
|
+
border-top: var(--catalog-hr-border-width) solid var(--catalog-hr-border-color);
|
|
103
|
+
}
|
|
104
|
+
a:not([role='button']) {
|
|
105
|
+
text-decoration: var(--catalog-link-text-decoration);
|
|
106
|
+
color: var(--catalog-link-color);
|
|
107
|
+
font-weight: var(--catalog-link-font-weight);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
111
|
+
flex-direction: row;
|
|
112
|
+
padding: 0;
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
const CatalogPageDescription = styled_components_1.default.div `
|
|
116
|
+
margin: var(--catalog-heading-margin);
|
|
117
|
+
display: var(--catalog-page-description-display-mobile);
|
|
118
|
+
|
|
119
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
120
|
+
display: var(--catalog-page-description-display-desktop);
|
|
121
|
+
}
|
|
122
|
+
`;
|
|
123
|
+
const FiltersSidebar = (0, styled_components_1.default)(Sidebar_1.Sidebar) `
|
|
124
|
+
display: var(--catalog-sidebar-display-mobile);
|
|
125
|
+
|
|
126
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
127
|
+
display: var(--catalog-sidebar-display-desktop);
|
|
128
|
+
}
|
|
129
|
+
--menu-container-padding-top: var(--catalog-sidebar-menu-container-padding-top);
|
|
130
|
+
|
|
131
|
+
${Sidebar_1.SidebarHeader} {
|
|
132
|
+
border: none;
|
|
133
|
+
}
|
|
134
|
+
`;
|
|
135
|
+
const CatalogSearchInputWrapper = styled_components_1.default.div `
|
|
136
|
+
width: var(--catalog-search-input-wrapper-width);
|
|
137
|
+
`;
|
|
138
|
+
//# sourceMappingURL=Catalog.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { JSX } from 'react';
|
|
2
|
+
import { SortOption, CatalogViewMode } from '../../core/types';
|
|
3
|
+
export type CatalogActionsRowProps = {
|
|
4
|
+
searchQuery: string;
|
|
5
|
+
setSearchQuery: (updatedTerm: string) => void;
|
|
6
|
+
sortOption: SortOption | null;
|
|
7
|
+
setSortOption: (option: SortOption | null) => void;
|
|
8
|
+
viewMode?: CatalogViewMode;
|
|
9
|
+
onViewModeChange?: (mode: CatalogViewMode) => void;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
};
|
|
12
|
+
export declare function CatalogActionsRow({ searchQuery, setSearchQuery, sortOption, setSortOption, viewMode, onViewModeChange, style, }: CatalogActionsRowProps): JSX.Element;
|
|
13
|
+
export declare const CatalogActionsRowWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const CatalogControlsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
|
+
export declare const CatalogSearchInputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.CatalogSearchInputWrapper = exports.CatalogControlsWrapper = exports.CatalogActionsRowWrapper = void 0;
|
|
7
|
+
exports.CatalogActionsRow = CatalogActionsRow;
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
+
const FilterInput_1 = require("../../components/Filter/FilterInput");
|
|
11
|
+
const CatalogSortButton_1 = require("../../components/Catalog/CatalogSortButton");
|
|
12
|
+
const CatalogViewModeToggle_1 = require("../../components/Catalog/CatalogViewModeToggle");
|
|
13
|
+
function CatalogActionsRow({ searchQuery, setSearchQuery, sortOption, setSortOption, viewMode, onViewModeChange, style, }) {
|
|
14
|
+
return (react_1.default.createElement(exports.CatalogActionsRowWrapper, { style: style },
|
|
15
|
+
react_1.default.createElement(exports.CatalogSearchInputWrapper, null,
|
|
16
|
+
react_1.default.createElement(FilterInput_1.FilterInput, { value: searchQuery, onChange: (updatedTerm) => setSearchQuery(updatedTerm) })),
|
|
17
|
+
react_1.default.createElement(exports.CatalogControlsWrapper, null,
|
|
18
|
+
react_1.default.createElement(CatalogSortButton_1.CatalogSortButton, { onSortChange: setSortOption, currentSort: sortOption }),
|
|
19
|
+
viewMode && onViewModeChange && (react_1.default.createElement(CatalogViewModeToggle_1.CatalogViewModeToggle, { viewMode: viewMode, onViewModeChange: onViewModeChange })))));
|
|
20
|
+
}
|
|
21
|
+
exports.CatalogActionsRowWrapper = styled_components_1.default.div `
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
`;
|
|
25
|
+
exports.CatalogControlsWrapper = styled_components_1.default.div `
|
|
26
|
+
display: var(--catalog-controls-wrapper-display);
|
|
27
|
+
align-items: var(--catalog-controls-wrapper-align-items);
|
|
28
|
+
margin-left: var(--catalog-controls-wrapper-margin-left);
|
|
29
|
+
gap: var(--catalog-controls-wrapper-gap);
|
|
30
|
+
`;
|
|
31
|
+
exports.CatalogSearchInputWrapper = styled_components_1.default.div `
|
|
32
|
+
width: var(--catalog-search-input-wrapper-width);
|
|
33
|
+
`;
|
|
34
|
+
//# sourceMappingURL=CatalogActionsRow.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { CatalogEntityConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntity } from '../../../core/types';
|
|
4
|
+
export type CatalogCardProps = {
|
|
5
|
+
entity: BffCatalogEntity;
|
|
6
|
+
catalogConfig: CatalogEntityConfig;
|
|
7
|
+
};
|
|
8
|
+
export declare function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.Element;
|
|
@@ -0,0 +1,179 @@
|
|
|
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.CatalogCard = CatalogCard;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const hooks_1 = require("../../../core/hooks");
|
|
10
|
+
const CatalogHighlight_1 = require("../../../components/Catalog/CatalogHighlight");
|
|
11
|
+
const GraphIcon_1 = require("../../../icons/GraphIcon/GraphIcon");
|
|
12
|
+
const ArrowRightIcon_1 = require("../../../icons/ArrowRightIcon/ArrowRightIcon");
|
|
13
|
+
const ArrowUpRightIcon_1 = require("../../../icons/ArrowUpRightIcon/ArrowUpRightIcon");
|
|
14
|
+
const CatalogTagsWithTooltip_1 = require("../../../components/Catalog/CatalogTagsWithTooltip");
|
|
15
|
+
const CatalogEntityIcon_1 = require("../../../components/Catalog/CatalogEntityIcon");
|
|
16
|
+
const core_1 = require("../../../core");
|
|
17
|
+
function CatalogCard({ entity, catalogConfig }) {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
const { useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
20
|
+
const telemetry = useTelemetry();
|
|
21
|
+
const pathPrefix = (0, core_1.getPathPrefix)();
|
|
22
|
+
return (react_1.default.createElement(CatalogCardWrapper, { "data-component-name": "Catalog/CatalogCardView/CatalogCard", onClick: () => {
|
|
23
|
+
window.location.assign(`${pathPrefix}/catalogs/${catalogConfig.slug}/entities/${entity.key}`);
|
|
24
|
+
telemetry.send({ type: 'catalog_item.clicked' });
|
|
25
|
+
} },
|
|
26
|
+
react_1.default.createElement(CardContent, null,
|
|
27
|
+
react_1.default.createElement(CardHeader, null,
|
|
28
|
+
react_1.default.createElement(HeaderIconWrapper, null,
|
|
29
|
+
react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entity.type })),
|
|
30
|
+
react_1.default.createElement(CardTitle, null,
|
|
31
|
+
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, entity.title))),
|
|
32
|
+
react_1.default.createElement(CardDescription, null,
|
|
33
|
+
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, (_a = entity.summary) !== null && _a !== void 0 ? _a : '')),
|
|
34
|
+
react_1.default.createElement(CardMetadataSection, null,
|
|
35
|
+
react_1.default.createElement(MetadataColumn, null,
|
|
36
|
+
react_1.default.createElement(MetadataLabel, null, "Domains:"),
|
|
37
|
+
react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: ((_b = entity.domains) === null || _b === void 0 ? void 0 : _b.map((domain) => domain.title)) || [], tagProps: {
|
|
38
|
+
style: {
|
|
39
|
+
fontSize: 'var(--catalog-card-font-size)',
|
|
40
|
+
backgroundColor: 'var(--catalog-card-icon-bg-color)',
|
|
41
|
+
},
|
|
42
|
+
icon: react_1.default.createElement(GraphIcon_1.GraphIcon, { color: "var(--color-green-8)" }),
|
|
43
|
+
} })),
|
|
44
|
+
react_1.default.createElement(MetadataColumn, null,
|
|
45
|
+
react_1.default.createElement(MetadataLabel, null, "Owners:"),
|
|
46
|
+
react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: ((_c = entity.owners) === null || _c === void 0 ? void 0 : _c.map((owner) => owner.key)) || [], tagProps: {
|
|
47
|
+
style: {
|
|
48
|
+
fontSize: 'var(--catalog-card-font-size)',
|
|
49
|
+
backgroundColor: 'var(--catalog-card-icon-bg-color)',
|
|
50
|
+
borderRadius: 'var(--border-radius-xl)',
|
|
51
|
+
},
|
|
52
|
+
} })))),
|
|
53
|
+
react_1.default.createElement(Divider, null),
|
|
54
|
+
react_1.default.createElement(CardFooter, null,
|
|
55
|
+
react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: entity.tags || [], tagProps: {
|
|
56
|
+
style: {
|
|
57
|
+
fontSize: 'var(--catalog-card-font-size)',
|
|
58
|
+
borderRadius: 'var(--border-radius)',
|
|
59
|
+
},
|
|
60
|
+
borderless: true,
|
|
61
|
+
color: 'grey',
|
|
62
|
+
}, itemsToShow: 3 }),
|
|
63
|
+
react_1.default.createElement(ArrowCircle, null,
|
|
64
|
+
react_1.default.createElement(ArrowRightIcon_1.ArrowRightIcon, { size: "16px" }),
|
|
65
|
+
react_1.default.createElement(ArrowUpRightIcon_1.ArrowUpRightIcon, { size: "16px" })))));
|
|
66
|
+
}
|
|
67
|
+
const HeaderIconWrapper = styled_components_1.default.div `
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
width: var(--catalog-card-icon-width);
|
|
72
|
+
height: var(--catalog-card-icon-height);
|
|
73
|
+
border-radius: var(--catalog-card-icon-border-radius);
|
|
74
|
+
background-color: var(--catalog-card-icon-bg-color);
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
border: var(--catalog-card-icon-border-width) solid var(--catalog-card-icon-border-color);
|
|
77
|
+
margin-right: var(--catalog-card-icon-margin-right);
|
|
78
|
+
`;
|
|
79
|
+
const CardHeader = styled_components_1.default.div `
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
`;
|
|
83
|
+
const MetadataLabel = styled_components_1.default.div `
|
|
84
|
+
font-size: var(--catalog-metadata-label-font-size);
|
|
85
|
+
font-weight: var(--catalog-metadata-label-font-weight);
|
|
86
|
+
color: var(--catalog-metadata-label-color);
|
|
87
|
+
margin-bottom: var(--catalog-metadata-label-margin-bottom);
|
|
88
|
+
`;
|
|
89
|
+
const CardMetadataSection = styled_components_1.default.div `
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
margin-top: var(--catalog-metadata-section-margin-top);
|
|
93
|
+
gap: var(--catalog-metadata-section-gap);
|
|
94
|
+
width: 100%;
|
|
95
|
+
`;
|
|
96
|
+
const MetadataColumn = styled_components_1.default.div `
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
flex: 1;
|
|
100
|
+
width: calc(50% - var(--catalog-metadata-column-half-gap)); /* 50% minus half the gap */
|
|
101
|
+
`;
|
|
102
|
+
const ArrowCircle = styled_components_1.default.div `
|
|
103
|
+
width: var(--catalog-arrow-circle-size);
|
|
104
|
+
height: var(--catalog-arrow-circle-size);
|
|
105
|
+
border-radius: var(--catalog-arrow-circle-radius);
|
|
106
|
+
background-color: var(--catalog-arrow-circle-bg-color);
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
position: relative;
|
|
111
|
+
|
|
112
|
+
${ArrowRightIcon_1.ArrowRightIcon}, ${ArrowUpRightIcon_1.ArrowUpRightIcon} {
|
|
113
|
+
position: absolute;
|
|
114
|
+
transition: opacity 0.2s ease-in-out;
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
const CardContent = styled_components_1.default.div `
|
|
118
|
+
padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
|
|
119
|
+
`;
|
|
120
|
+
const CardFooter = styled_components_1.default.div `
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: space-between;
|
|
124
|
+
padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
|
|
125
|
+
`;
|
|
126
|
+
const Divider = styled_components_1.default.div `
|
|
127
|
+
width: 100%;
|
|
128
|
+
height: 1px;
|
|
129
|
+
background-color: var(--catalog-card-divider-color);
|
|
130
|
+
`;
|
|
131
|
+
const CatalogCardWrapper = styled_components_1.default.div `
|
|
132
|
+
min-height: var(--catalog-card-min-height);
|
|
133
|
+
height: 100%;
|
|
134
|
+
color: var(--catalog-card-text-color);
|
|
135
|
+
font-size: var(--catalog-card-font-size);
|
|
136
|
+
font-weight: var(--catalog-card-font-weight);
|
|
137
|
+
background-color: var(--catalog-card-bg-color);
|
|
138
|
+
border: var(--catalog-card-border-width) var(--catalog-card-border-style)
|
|
139
|
+
var(--catalog-card-border-color);
|
|
140
|
+
transition: all 0.2s ease-in-out;
|
|
141
|
+
border-radius: var(--catalog-card-border-radius);
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
${ArrowRightIcon_1.ArrowRightIcon} {
|
|
146
|
+
opacity: 1;
|
|
147
|
+
}
|
|
148
|
+
${ArrowUpRightIcon_1.ArrowUpRightIcon} {
|
|
149
|
+
opacity: 0;
|
|
150
|
+
}
|
|
151
|
+
&:hover {
|
|
152
|
+
${ArrowRightIcon_1.ArrowRightIcon} {
|
|
153
|
+
opacity: 0;
|
|
154
|
+
}
|
|
155
|
+
${ArrowUpRightIcon_1.ArrowUpRightIcon} {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
border-color: var(--catalog-card-border-color-hover);
|
|
159
|
+
}
|
|
160
|
+
`;
|
|
161
|
+
const CardTitle = styled_components_1.default.div `
|
|
162
|
+
color: var(--catalog-card-title-color);
|
|
163
|
+
font-size: var(--catalog-card-title-font-size);
|
|
164
|
+
font-weight: var(--catalog-card-title-font-weight);
|
|
165
|
+
line-height: var(--catalog-card-title-line-height);
|
|
166
|
+
margin: 0;
|
|
167
|
+
`;
|
|
168
|
+
const CardDescription = styled_components_1.default.div `
|
|
169
|
+
margin-top: var(--catalog-card-description-margin-top);
|
|
170
|
+
color: var(--catalog-card-description-color);
|
|
171
|
+
font-size: var(--catalog-card-description-font-size);
|
|
172
|
+
font-weight: var(--catalog-card-description-font-weight);
|
|
173
|
+
line-height: var(--catalog-card-description-line-height);
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
overflow: hidden;
|
|
176
|
+
text-overflow: ellipsis;
|
|
177
|
+
width: 100%;
|
|
178
|
+
`;
|
|
179
|
+
//# sourceMappingURL=CatalogCard.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CatalogEntityConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntity } from '../../../core/types';
|
|
4
|
+
export type CatalogCardViewProps = {
|
|
5
|
+
entities: BffCatalogEntity[];
|
|
6
|
+
catalogConfig: CatalogEntityConfig;
|
|
7
|
+
};
|
|
8
|
+
export declare function CatalogCardView({ entities, catalogConfig }: CatalogCardViewProps): React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
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.CatalogCardView = CatalogCardView;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const CatalogCard_1 = require("../../../components/Catalog/CatalogCardView/CatalogCard");
|
|
10
|
+
function CatalogCardView({ entities, catalogConfig }) {
|
|
11
|
+
return (react_1.default.createElement(CatalogCardsWrapper, { "data-component-name": "Catalog/CatalogCardView/CatalogCardView" }, entities.map((entity) => (react_1.default.createElement(CatalogCard_1.CatalogCard, { key: entity.id, entity: entity, catalogConfig: catalogConfig })))));
|
|
12
|
+
}
|
|
13
|
+
const CatalogCardsWrapper = styled_components_1.default.div `
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--catalog-card-min-width), 1fr));
|
|
16
|
+
gap: var(--catalog-cards-group-gap);
|
|
17
|
+
margin-bottom: var(--spacing-xl);
|
|
18
|
+
margin-top: var(--spacing-xl);
|
|
19
|
+
`;
|
|
20
|
+
//# sourceMappingURL=CatalogCardView.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { CatalogEntityConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntityList, SortOption } from '../../core/types';
|
|
4
|
+
export type CatalogEntitiesProps = {
|
|
5
|
+
catalogConfig: CatalogEntityConfig;
|
|
6
|
+
excludedEntities?: CatalogEntityConfig['excludes'];
|
|
7
|
+
filterQuery: string;
|
|
8
|
+
entitiesTypes: string[];
|
|
9
|
+
searchQuery: string;
|
|
10
|
+
viewMode: string;
|
|
11
|
+
setEntitiesCounter: (counter: number) => void;
|
|
12
|
+
initialEntitiesList?: BffCatalogEntityList;
|
|
13
|
+
sortOption: SortOption | null;
|
|
14
|
+
setSortOption: (sortOption: SortOption | null) => void;
|
|
15
|
+
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
16
|
+
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function CatalogEntities(props: CatalogEntitiesProps): JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CatalogEntities = CatalogEntities;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const hooks_1 = require("../../core/hooks");
|
|
29
|
+
const ArrowDownIcon_1 = require("../../icons/ArrowDownIcon/ArrowDownIcon");
|
|
30
|
+
const CatalogCardView_1 = require("../../components/Catalog/CatalogCardView/CatalogCardView");
|
|
31
|
+
const CatalogTableView_1 = require("../../components/Catalog/CatalogTableView/CatalogTableView");
|
|
32
|
+
const CatalogHighlight_1 = require("../../components/Catalog/CatalogHighlight");
|
|
33
|
+
const LoadMore_1 = require("../../components/LoadMore/LoadMore");
|
|
34
|
+
const CatalogEntitiesEmptyState_1 = require("../../components/Catalog/CatalogEntitiesEmptyState");
|
|
35
|
+
const LOAD_MORE_THRESHOLD = 10;
|
|
36
|
+
function CatalogEntities(props) {
|
|
37
|
+
const { catalogConfig, excludedEntities, filterQuery, entitiesTypes, sortOption, searchQuery, viewMode, setEntitiesCounter, setSortOption, handleSortClick, isColumnSorted, } = props;
|
|
38
|
+
const { useFetchCatalogEntities } = (0, hooks_1.useThemeHooks)();
|
|
39
|
+
const { initialFilter } = (0, hooks_1.useCatalogEntities)({
|
|
40
|
+
entitiesTypes,
|
|
41
|
+
excludedEntities,
|
|
42
|
+
});
|
|
43
|
+
const { items: entities, query, total, } = useFetchCatalogEntities({
|
|
44
|
+
limit: LOAD_MORE_THRESHOLD,
|
|
45
|
+
filter: initialFilter && filterQuery
|
|
46
|
+
? `${initialFilter} AND ${filterQuery}`
|
|
47
|
+
: initialFilter || filterQuery,
|
|
48
|
+
sort: sortOption || undefined,
|
|
49
|
+
search: searchQuery,
|
|
50
|
+
}, props.initialEntitiesList);
|
|
51
|
+
const shouldShowLoadMore = query.hasNextPage ||
|
|
52
|
+
(query.isPlaceholderData && entities && entities.length >= LOAD_MORE_THRESHOLD);
|
|
53
|
+
(0, react_1.useEffect)(() => {
|
|
54
|
+
setEntitiesCounter(total || 0);
|
|
55
|
+
}, [total, setEntitiesCounter]);
|
|
56
|
+
if (!query.isPending && (!entities || entities.length === 0)) {
|
|
57
|
+
return react_1.default.createElement(CatalogEntitiesEmptyState_1.CatalogEntitiesEmptyState, null);
|
|
58
|
+
}
|
|
59
|
+
return (react_1.default.createElement(CatalogHighlight_1.HighlightContext.Provider, { value: [searchQuery], "data-component-name": "Catalog/CatalogEntities" },
|
|
60
|
+
viewMode === 'cards' ? (react_1.default.createElement(CatalogCardView_1.CatalogCardView, { entities: entities, catalogConfig: catalogConfig })) : (react_1.default.createElement(CatalogTableView_1.CatalogTableView, { entities: entities, catalogConfig: catalogConfig, setSortOption: setSortOption, currentSortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted })),
|
|
61
|
+
shouldShowLoadMore && (react_1.default.createElement(LoadMore_1.LoadMore, { icon: react_1.default.createElement(ArrowDownIcon_1.ArrowDownIcon, { size: "var(--catalog-load-more-icon-size)" }), onClick: query.fetchNextPage, disabled: query.isFetchingNextPage, blinking: query.isFetchingNextPage, label: query.isFetchingNextPage ? 'Loading...' : 'Load More' }))));
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=CatalogEntities.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
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.CatalogEntitiesEmptyState = CatalogEntitiesEmptyState;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
function CatalogEntitiesEmptyState() {
|
|
10
|
+
return (react_1.default.createElement(EmptyStateWrapper, { "data-component-name": "Catalog/CatalogEntitiesEmptyState" },
|
|
11
|
+
react_1.default.createElement(EmptyStateHeader, null, "No entities yet"),
|
|
12
|
+
react_1.default.createElement(EmptyStateText, null, "Start by adding your first entity to"),
|
|
13
|
+
react_1.default.createElement(EmptyStateText, null, "begin building your catalog.")));
|
|
14
|
+
}
|
|
15
|
+
const EmptyStateWrapper = styled_components_1.default.div `
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
padding: var(--catalog-empty-state-padding);
|
|
21
|
+
text-align: center;
|
|
22
|
+
min-height: var(--catalog-empty-state-min-height);
|
|
23
|
+
`;
|
|
24
|
+
const EmptyStateHeader = styled_components_1.default.p `
|
|
25
|
+
color: var(--catalog-empty-state-header-text-color);
|
|
26
|
+
font-size: var(--catalog-empty-state-header-font-size);
|
|
27
|
+
font-weight: var(--catalog-empty-state-header-font-weight);
|
|
28
|
+
line-height: var(--catalog-empty-state-header-line-height);
|
|
29
|
+
margin: 0;
|
|
30
|
+
`;
|
|
31
|
+
const EmptyStateText = styled_components_1.default.p `
|
|
32
|
+
color: var(--catalog-empty-state-text-color);
|
|
33
|
+
font-size: var(--catalog-empty-state-font-size);
|
|
34
|
+
font-weight: var(--catalog-empty-state-font-weight);
|
|
35
|
+
line-height: var(--catalog-empty-state-line-height);
|
|
36
|
+
margin: 0;
|
|
37
|
+
`;
|
|
38
|
+
//# sourceMappingURL=CatalogEntitiesEmptyState.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
+
import type { BffCatalogEntity, BffCatalogRelatedEntityList } from '../../../core/types';
|
|
4
|
+
export type CatalogEntityProps = {
|
|
5
|
+
entity: BffCatalogEntity;
|
|
6
|
+
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
7
|
+
catalogConfig: CatalogEntityConfig;
|
|
8
|
+
initialRelations: BffCatalogRelatedEntityList;
|
|
9
|
+
mainCatalogLabelTranslationKey?: string;
|
|
10
|
+
mainCatalogSlug?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function CatalogEntity({ entity, entitiesCatalogConfig, catalogConfig, initialRelations, mainCatalogLabelTranslationKey, mainCatalogSlug, }: CatalogEntityProps): React.JSX.Element;
|