@redocly/theme 0.55.0-next.7 → 0.55.0-next.8
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/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -1
- 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/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/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/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 +3 -3
- package/lib/components/Sidebar/Sidebar.d.ts +3 -0
- package/lib/components/Sidebar/Sidebar.js +3 -2
- 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/core/constants/catalog.d.ts +1 -0
- package/lib/core/constants/catalog.js +5 -0
- 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 +63 -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/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 -0
- package/lib/index.js +19 -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.js +2 -2
- package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
- package/lib/markdoc/components/Tabs/Tabs.js +2 -2
- package/package.json +2 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
- 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/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/LoadMore/LoadMore.tsx +38 -0
- package/src/components/Markdown/Markdown.tsx +1 -1
- 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 +5 -3
- package/src/components/Sidebar/Sidebar.tsx +1 -1
- 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/core/constants/catalog.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 +3 -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 +20 -0
- package/src/core/types/telemetry.ts +36 -0
- package/src/core/utils/load-and-navigate.ts +5 -4
- 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 -0
- package/src/markdoc/components/Tabs/Tab.tsx +12 -1
- package/src/markdoc/components/Tabs/TabList.tsx +2 -1
- package/src/markdoc/components/Tabs/Tabs.tsx +8 -3
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.catalog = void 0;
|
|
4
|
+
const styled_components_1 = require("styled-components");
|
|
5
|
+
exports.catalog = (0, styled_components_1.css) `
|
|
6
|
+
/* === Catalog === */
|
|
7
|
+
/**
|
|
8
|
+
* @tokens Catalog page
|
|
9
|
+
*/
|
|
10
|
+
--catalog-page-padding-vertical: var(--spacing-xl);
|
|
11
|
+
--catalog-page-padding-horizontal: var(--spacing-xxl);
|
|
12
|
+
--catalog-page-padding: var(--catalog-page-padding-vertical) var(--catalog-page-padding-horizontal);
|
|
13
|
+
--catalog-page-content-height: calc(100vh - var(--navbar-height) - var(--spacing-lg) * 2);
|
|
14
|
+
|
|
15
|
+
--catalog-filter-padding-vertical-mobile: 0;
|
|
16
|
+
--catalog-filter-padding-horizontal-mobile: var(--spacing-base);
|
|
17
|
+
|
|
18
|
+
--catalog-heading-margin: 0 0 var(--spacing-xl) 0;
|
|
19
|
+
--catalog-sidebar-width: 285px;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @tokens Catalog page wrapper
|
|
23
|
+
*/
|
|
24
|
+
--catalog-page-wrapper-font-weight: var(--font-weight-regular);
|
|
25
|
+
--catalog-page-wrapper-text-color: var(--text-color-secondary);
|
|
26
|
+
--catalog-page-wrapper-font-size: var(--font-size-base);
|
|
27
|
+
--catalog-page-wrapper-font-family: var(--font-family-base);
|
|
28
|
+
--catalog-page-wrapper-line-height: var(--line-height-base);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @tokens Catalog page content
|
|
32
|
+
*/
|
|
33
|
+
--catalog-page-content-width-mobile: 90%;
|
|
34
|
+
--catalog-page-content-width-desktop: 100%;
|
|
35
|
+
--catalog-page-content-margin-mobile: 0 auto;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @tokens Catalog page title
|
|
39
|
+
*/
|
|
40
|
+
--catalog-title-text-color: var(--text-color-primary);
|
|
41
|
+
--catalog-title-font-weight: var(--font-weight-bold);
|
|
42
|
+
--catalog-title-font-size: var(--h3-font-size);
|
|
43
|
+
--catalog-title-margin: var(--spacing-sm) 0 var(--spacing-sm) 0;
|
|
44
|
+
--catalog-title-spacing-right: 8px;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @tokens Catalog page description
|
|
48
|
+
*/
|
|
49
|
+
--catalog-description-text-color: var(--text-color-secondary);
|
|
50
|
+
--catalog-description-font-weight: var(--font-weight-regular);
|
|
51
|
+
--catalog-description-font-size: var(--font-size-lg);
|
|
52
|
+
--catalog-description-margin: 0 0 var(--spacing-sm) 0;
|
|
53
|
+
--catalog-description-line-height: var(--line-height-lg);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @tokens Catalog page separator
|
|
57
|
+
*/
|
|
58
|
+
--catalog-separator-color: var(--text-color-secondary);
|
|
59
|
+
--catalog-separator-font-size: var(--font-size-base);
|
|
60
|
+
--catalog-separator-font-weight: var(--font-weight-regular);
|
|
61
|
+
--catalog-separator-border-color: var(--border-color-secondary);
|
|
62
|
+
--catalog-separator-margin: 0 0 var(--spacing-base) 0;
|
|
63
|
+
--catalog-separator-padding: var(--spacing-xxs) 0 0 0;
|
|
64
|
+
--catalog-separator-label-margin: 0 var(--spacing-xs);
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @tokens Catalog separators and dividers
|
|
68
|
+
*/
|
|
69
|
+
--catalog-hr-border-color: var(--border-color-primary);
|
|
70
|
+
--catalog-hr-border-width: 1px;
|
|
71
|
+
--catalog-hr-width: calc(100% + 48px);
|
|
72
|
+
--catalog-hr-margin: auto -24px 0 -24px;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @tokens Catalog links
|
|
76
|
+
*/
|
|
77
|
+
--catalog-link-color: var(--link-color-primary);
|
|
78
|
+
--catalog-link-font-weight: var(--link-font-weight);
|
|
79
|
+
--catalog-link-text-decoration: none;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @tokens Catalog selector
|
|
83
|
+
*/
|
|
84
|
+
--catalog-select-wrapper-margin-top: var(--spacing-xxs);
|
|
85
|
+
--catalog-select-wrapper-margin-bottom: var(--spacing-base);
|
|
86
|
+
--catalog-select-label-margin-bottom: var(--spacing-xxs);
|
|
87
|
+
--catalog-select-label-font-weight: var(--filter-title-font-weight);
|
|
88
|
+
--catalog-select-label-font-size: var(--filter-title-font-size);
|
|
89
|
+
--catalog-select-label-line-height: var(--filter-title-line-height);
|
|
90
|
+
--catalog-select-border-radius: var(--filter-input-border-radius);
|
|
91
|
+
--catalog-select-input-padding: var(--select-input-padding-vertical) var(--spacing-sm);
|
|
92
|
+
--catalog-select-icon-color: var(--input-t-icon-color);
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @tokens Catalog highlight
|
|
96
|
+
*/
|
|
97
|
+
--catalog-highlight-bg-color: var(--search-highlight-bg-color);
|
|
98
|
+
--catalog-highlight-text-color: var(--search-highlight-text-color);
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @tokens Catalog entity icon
|
|
102
|
+
*/
|
|
103
|
+
--catalog-entity-icon-color: var(--color-primary-base);
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @tokens Catalog tags
|
|
107
|
+
*/
|
|
108
|
+
--catalog-tags-wrapper-gap: 4px;
|
|
109
|
+
--catalog-tags-more-button-font-size: var(--font-size-base);
|
|
110
|
+
--catalog-tags-more-button-margin-left: 4px;
|
|
111
|
+
--catalog-tags-placeholder-bg-color: var(--bg-color);
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @tokens Catalog empty state
|
|
115
|
+
*/
|
|
116
|
+
--catalog-empty-state-padding: var(--catalog-table-empty-state-padding);
|
|
117
|
+
--catalog-empty-state-font-weight: var(--font-weight-regular);
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @tokens Catalog actions
|
|
121
|
+
*/
|
|
122
|
+
--catalog-actions-row-margin-bottom: var(--spacing-xl);
|
|
123
|
+
--catalog-controls-wrapper-gap: var(--spacing-sm);
|
|
124
|
+
--catalog-filter-input-width: 360px;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @tokens Catalog search input wrapper
|
|
128
|
+
*/
|
|
129
|
+
--catalog-search-input-wrapper-width: var(--catalog-filter-input-width);
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @tokens Catalog controls wrapper
|
|
133
|
+
*/
|
|
134
|
+
--catalog-controls-wrapper-display: flex;
|
|
135
|
+
--catalog-controls-wrapper-align-items: center;
|
|
136
|
+
--catalog-controls-wrapper-margin-left: auto;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @tokens Catalog sort button
|
|
140
|
+
*/
|
|
141
|
+
--catalog-sort-trigger-gap: var(--spacing-xs);
|
|
142
|
+
--catalog-sort-trigger-padding: 6px 8px;
|
|
143
|
+
--catalog-sort-trigger-border-radius: var(--border-radius-md);
|
|
144
|
+
--catalog-sort-trigger-hover-bg-color: var(--button-bg-color-secondary-hover);
|
|
145
|
+
--catalog-sort-icon-color: var(--text-color-secondary);
|
|
146
|
+
--catalog-sort-text-font-size: var(--font-size-sm);
|
|
147
|
+
--catalog-sort-text-color: var(--text-color-secondary);
|
|
148
|
+
--catalog-sort-text-font-weight: var(--font-weight-medium);
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @tokens Catalog sidebar
|
|
152
|
+
*/
|
|
153
|
+
--catalog-sidebar-display-mobile: none;
|
|
154
|
+
--catalog-sidebar-display-desktop: flex;
|
|
155
|
+
--catalog-sidebar-menu-container-padding-top: 0;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @tokens Catalog page description responsive
|
|
159
|
+
*/
|
|
160
|
+
--catalog-page-description-display-mobile: none;
|
|
161
|
+
--catalog-page-description-display-desktop: block;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @tokens Catalog card
|
|
165
|
+
*/
|
|
166
|
+
--catalog-card-min-height: 194px;
|
|
167
|
+
--catalog-card-min-width: 490px;
|
|
168
|
+
--catalog-card-padding-vertical: var(--spacing-base);
|
|
169
|
+
--catalog-card-padding-horizontal: var(--spacing-md);
|
|
170
|
+
--catalog-card-gap: var(--spacing-sm);
|
|
171
|
+
--catalog-card-text-color: var(--text-color-secondary);
|
|
172
|
+
--catalog-card-font-size: var(--font-size-base);
|
|
173
|
+
--catalog-card-font-weight: var(--font-weight-regular);
|
|
174
|
+
--catalog-card-bg-color: var(--layer-color);
|
|
175
|
+
--catalog-card-border-color: var(--border-color-secondary);
|
|
176
|
+
--catalog-card-divider-color: var(--border-color-secondary);
|
|
177
|
+
--catalog-card-border-width: var(--border-width);
|
|
178
|
+
--catalog-card-border-style: var(--border-style);
|
|
179
|
+
--catalog-card-border-color-hover: var(--border-color-primary);
|
|
180
|
+
--catalog-card-border-radius: var(--border-radius-lg);
|
|
181
|
+
--catalog-cards-group-margin: 0 0 var(--spacing-base) 0;
|
|
182
|
+
--catalog-cards-group-gap: var(--spacing-xl);
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @tokens Catalog card icon
|
|
186
|
+
*/
|
|
187
|
+
--catalog-card-icon-width: 30px;
|
|
188
|
+
--catalog-card-icon-height: 30px;
|
|
189
|
+
--catalog-card-icon-border-radius: 4px;
|
|
190
|
+
--catalog-card-icon-bg-color: var(--bg-color);
|
|
191
|
+
--catalog-card-icon-border-color: var(--border-color-secondary);
|
|
192
|
+
--catalog-card-icon-border-width: 1px;
|
|
193
|
+
--catalog-card-icon-margin-right: var(--spacing-xs);
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @tokens Catalog metadata
|
|
197
|
+
*/
|
|
198
|
+
--catalog-metadata-section-margin-top: var(--spacing-md);
|
|
199
|
+
--catalog-metadata-section-gap: var(--spacing-lg);
|
|
200
|
+
--catalog-metadata-label-font-size: var(--font-size-base);
|
|
201
|
+
--catalog-metadata-label-font-weight: var(--font-weight-medium);
|
|
202
|
+
--catalog-metadata-label-color: var(--text-color-secondary);
|
|
203
|
+
--catalog-metadata-label-margin-bottom: var(--spacing-unit);
|
|
204
|
+
--catalog-metadata-column-half-gap: var(--spacing-sm);
|
|
205
|
+
--catalog-metadata-heading-size: var(--font-size-md);
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @tokens Catalog arrow circle
|
|
209
|
+
*/
|
|
210
|
+
--catalog-arrow-circle-size: 32px;
|
|
211
|
+
--catalog-arrow-circle-radius: 16px;
|
|
212
|
+
--catalog-arrow-circle-bg-color: var(--button-bg-color-secondary);
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @tokens Catalog card title
|
|
216
|
+
*/
|
|
217
|
+
--catalog-card-title-color: var(--text-color-primary);
|
|
218
|
+
--catalog-card-title-min-height: var(--spacing-xxl);
|
|
219
|
+
--catalog-card-title-font-size: var(--font-size-lg);
|
|
220
|
+
--catalog-card-title-font-weight: var(--font-weight-bold);
|
|
221
|
+
--catalog-card-title-line-height: var(--line-height-lg);
|
|
222
|
+
--catalog-card-title-line-clamp: 2;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @tokens Catalog card description
|
|
226
|
+
*/
|
|
227
|
+
--catalog-card-description-line-clamp: 3;
|
|
228
|
+
--catalog-card-description-color: var(--text-color-description);
|
|
229
|
+
--catalog-card-description-font-size: var(--font-size-base);
|
|
230
|
+
--catalog-card-description-line-height: var(--line-height-base);
|
|
231
|
+
--catalog-card-description-font-weight: var(--font-weight-regular);
|
|
232
|
+
--catalog-card-description-height: 62px;
|
|
233
|
+
--catalog-card-description-margin-top: 2px;
|
|
234
|
+
|
|
235
|
+
--catalog-card-content-gap: var(--spacing-xs);
|
|
236
|
+
--catalog-card-content-gap-vertical: var(--spacing-sm);
|
|
237
|
+
|
|
238
|
+
--catalog-card-tag-bg: transparent;
|
|
239
|
+
|
|
240
|
+
--catalog-actions-gap: var(--spacing-xs);
|
|
241
|
+
--catalog-actions-padding-vertical: var(--spacing-xs);
|
|
242
|
+
--catalog-actions-padding-horizontal: 5%;
|
|
243
|
+
--catalog-actions-min-height: 40px;
|
|
244
|
+
--catalog-actions-bg-color: var(--bg-color-tonal);
|
|
245
|
+
|
|
246
|
+
--catalog-page-badge-border-radius: var(--border-radius);
|
|
247
|
+
--catalog-page-badge-padding: 0 var(--spacing-xs);
|
|
248
|
+
--catalog-page-badge-font-size: var(--font-size-base);
|
|
249
|
+
--catalog-page-badge-line-height: var(--line-height-base);
|
|
250
|
+
|
|
251
|
+
--catalog-page-badge-dot-size: 6px;
|
|
252
|
+
--catalog-page-badge-dot-border-color: #ffffff;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @tokens Catalog table
|
|
256
|
+
*/
|
|
257
|
+
--catalog-table-border-color: var(--border-color-primary);
|
|
258
|
+
--catalog-table-header-bg-color: var(--bg-color-secondary);
|
|
259
|
+
--catalog-table-header-font-weight: var(--font-weight-semibold);
|
|
260
|
+
--catalog-table-header-cell-padding: 5px 8px;
|
|
261
|
+
--catalog-table-cell-padding: 5px 8px;
|
|
262
|
+
--catalog-table-row-hover-bg-color: var(--bg-color-hover, rgba(0, 0, 0, 0.04));
|
|
263
|
+
--catalog-table-empty-state-padding: 32px;
|
|
264
|
+
--catalog-table-empty-state-color: var(--text-color-secondary);
|
|
265
|
+
--catalog-table-title-cell-gap: 12px;
|
|
266
|
+
--catalog-table-entity-title-content-offset: 42px;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @tokens Catalog table header
|
|
270
|
+
*/
|
|
271
|
+
--catalog-table-header-sort-icon-color-active: var(--text-color-primary);
|
|
272
|
+
--catalog-table-header-sort-icon-color-inactive: var(--text-color-helper);
|
|
273
|
+
--catalog-table-header-sort-indicator-color: var(--icon-color-primary);
|
|
274
|
+
--catalog-table-header-sort-arrow-bg-active: var(--bg-color-active);
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @tokens Catalog table icon
|
|
278
|
+
*/
|
|
279
|
+
--catalog-table-icon-width: 30px;
|
|
280
|
+
--catalog-table-icon-height: 30px;
|
|
281
|
+
--catalog-table-icon-border-radius: 4px;
|
|
282
|
+
--catalog-table-icon-bg-color: var(--bg-color-tonal);
|
|
283
|
+
--catalog-table-icon-border-color: var(--border-color-secondary);
|
|
284
|
+
--catalog-table-icon-border-width: 1px;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @tokens Catalog table entity title
|
|
288
|
+
*/
|
|
289
|
+
--catalog-table-entity-title-font-size: var(--catalog-card-title-font-size);
|
|
290
|
+
--catalog-table-entity-title-line-height: var(--line-height-lg);
|
|
291
|
+
--catalog-table-entity-title-font-weight: var(--font-weight-semibold);
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @tokens Catalog table description
|
|
295
|
+
*/
|
|
296
|
+
--catalog-table-description-line-clamp: 3;
|
|
297
|
+
--catalog-table-description-color: var(--text-color-description);
|
|
298
|
+
--catalog-table-description-font-size: var(--font-size-base);
|
|
299
|
+
--catalog-table-description-line-height: var(--line-height-base);
|
|
300
|
+
--catalog-table-description-font-weight: var(--font-weight-regular);
|
|
301
|
+
--catalog-table-description-height: 62px;
|
|
302
|
+
--catalog-table-entity-summary-font-size: var(--font-size-sm);
|
|
303
|
+
--catalog-table-entity-summary-line-height: var(--line-height-sm);
|
|
304
|
+
|
|
305
|
+
--catalog-table-content-gap: var(--spacing-xxs);
|
|
306
|
+
|
|
307
|
+
--catalog-table-tag-bg: transparent;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* @tokens Catalog entity type tags
|
|
311
|
+
*/
|
|
312
|
+
--catalog-entity-service-tag-text-color: var(--color-blue-7);
|
|
313
|
+
--catalog-entity-service-tag-border-color: var(--color-blue-4);
|
|
314
|
+
|
|
315
|
+
--catalog-entity-domain-tag-text-color: var(--color-grass-8);
|
|
316
|
+
--catalog-entity-domain-tag-border-color: var(--color-grass-4);
|
|
317
|
+
|
|
318
|
+
--catalog-entity-team-tag-text-color: var(--color-purple-7);
|
|
319
|
+
--catalog-entity-team-tag-border-color: var(--color-purple-4);
|
|
320
|
+
|
|
321
|
+
--catalog-entity-user-tag-text-color: var(--color-green-7);
|
|
322
|
+
--catalog-entity-user-tag-border-color: var(--color-green-4);
|
|
323
|
+
|
|
324
|
+
--catalog-entity-api-description-tag-text-color: var(--color-sky-8);
|
|
325
|
+
--catalog-entity-api-description-tag-border-color: var(--color-sky-5);
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @tokens Catalog view mode toggle
|
|
329
|
+
*/
|
|
330
|
+
--catalog-view-mode-toggle-gap: var(--spacing-xxs);
|
|
331
|
+
--catalog-view-mode-toggle-active-bg-color: var(--button-bg-color-secondary-hover);
|
|
332
|
+
--catalog-view-mode-button-width: 32px;
|
|
333
|
+
--catalog-view-mode-button-height: 32px;
|
|
334
|
+
--catalog-view-mode-button-border-radius: var(--border-radius-md);
|
|
335
|
+
--catalog-view-mode-table-icon-size: 12px;
|
|
336
|
+
--catalog-view-mode-cards-icon-size: 13px;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @tokens Catalog empty state
|
|
340
|
+
*/
|
|
341
|
+
--catalog-empty-state-text-color: var(--text-color-description);
|
|
342
|
+
--catalog-empty-state-min-height: 300px;
|
|
343
|
+
--catalog-empty-state-header-text-color: var(--text-color-primary);
|
|
344
|
+
--catalog-empty-state-header-font-size: var(--font-size-xl);
|
|
345
|
+
--catalog-empty-state-header-font-weight: var(--font-weight-medium);
|
|
346
|
+
--catalog-empty-state-header-line-height: var(--line-height-xl);
|
|
347
|
+
--catalog-empty-state-font-size: var(--font-size-base);
|
|
348
|
+
--catalog-empty-state-line-height: var(--line-height-base);
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
--catalog-avatar-bg-color: #ededf2;
|
|
352
|
+
// @tokens End
|
|
353
|
+
`;
|
|
354
|
+
//# sourceMappingURL=variables.js.map
|
|
@@ -61,7 +61,7 @@ function CatalogClassicHighlight(props) {
|
|
|
61
61
|
return (React.createElement(React.Fragment, null, children.map((child, idx) => typeof children === 'string' ? highlight(child, idx) : child || null)));
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
|
-
return React.createElement(React.Fragment, null,
|
|
64
|
+
return React.createElement(React.Fragment, null, children);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
const HighlightedText = styled_components_1.default.span `
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { FilterProps } from '../../core/types';
|
|
3
|
-
export declare function Filter({ filter, filterValuesCasing }: FilterProps): JSX.Element | null;
|
|
3
|
+
export declare function Filter({ filter, filterValuesCasing, showCounter, }: FilterProps): JSX.Element | null;
|
|
@@ -14,12 +14,12 @@ const filterComponents = {
|
|
|
14
14
|
'date-range': FilterDateRange_1.FilterDateRange,
|
|
15
15
|
checkboxes: FilterCheckboxes_1.FilterCheckboxes,
|
|
16
16
|
};
|
|
17
|
-
function Filter({ filter, filterValuesCasing }) {
|
|
17
|
+
function Filter({ filter, filterValuesCasing, showCounter = true, }) {
|
|
18
18
|
if (!filter.parentUsed)
|
|
19
19
|
return null;
|
|
20
20
|
const FilterComponent = filterComponents[(filter.type || 'checkboxes')];
|
|
21
21
|
return (react_1.default.createElement(FilterGroup, { "data-component-name": "Filter/Filter", key: filter.property + filter.title },
|
|
22
|
-
react_1.default.createElement(FilterComponent, { filter: filter, filterValuesCasing: filterValuesCasing })));
|
|
22
|
+
react_1.default.createElement(FilterComponent, { filter: filter, filterValuesCasing: filterValuesCasing, showCounter: showCounter })));
|
|
23
23
|
}
|
|
24
24
|
const FilterGroup = styled_components_1.default.div `
|
|
25
25
|
padding: var(--filter-group-padding);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { FilterProps } from '../../core/types';
|
|
3
|
-
export declare function FilterCheckboxes({ filter, filterValuesCasing }: FilterProps): JSX.Element;
|
|
3
|
+
export declare function FilterCheckboxes({ filter, filterValuesCasing, showCounter, }: FilterProps): JSX.Element;
|
|
@@ -14,21 +14,21 @@ const hooks_1 = require("../../core/hooks");
|
|
|
14
14
|
const CheckboxIcon_1 = require("../../icons/CheckboxIcon/CheckboxIcon");
|
|
15
15
|
const CounterTag_1 = require("../../components/Tags/CounterTag");
|
|
16
16
|
const utils_1 = require("../../core/utils");
|
|
17
|
-
function FilterCheckboxes({ filter, filterValuesCasing }) {
|
|
17
|
+
function FilterCheckboxes({ filter, filterValuesCasing, showCounter = true, }) {
|
|
18
18
|
const { useTranslate, useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
19
19
|
const { translate } = useTranslate();
|
|
20
20
|
const telemetry = useTelemetry();
|
|
21
21
|
return (react_1.default.createElement(FilterCheckboxesWrapper, { "data-component-name": "Filter/FilterCheckboxes" },
|
|
22
22
|
react_1.default.createElement(FilterTitle_1.FilterTitle, { "data-translation-key": filter.titleTranslationKey }, translate(filter.titleTranslationKey, filter.title)),
|
|
23
|
-
react_1.default.createElement(FilterOptions_1.FilterOptions, null, filter.
|
|
23
|
+
react_1.default.createElement(FilterOptions_1.FilterOptions, null, filter.options.map(({ value, count }) => {
|
|
24
24
|
const id = 'filter--' + filter.property + '--' + value;
|
|
25
25
|
return (react_1.default.createElement(FilterCheckboxOption, { key: id, role: "link", onClick: () => {
|
|
26
26
|
filter.toggleOption(value);
|
|
27
27
|
telemetry.send({ type: 'filter_checkbox.toggled', payload: { id } });
|
|
28
28
|
} },
|
|
29
|
-
react_1.default.createElement(CheckboxIcon_1.CheckboxIcon, { checked: filter.selectedOptions.has(value) }),
|
|
29
|
+
react_1.default.createElement(CheckboxIcon_1.CheckboxIcon, { checked: filter.selectedOptions.has(value === null || value === void 0 ? void 0 : value.toLowerCase()) }),
|
|
30
30
|
react_1.default.createElement(FilterOptionLabel_1.FilterOptionLabel, { "data-translation-key": value }, (0, utils_1.changeTextCasing)(translate(value), filterValuesCasing)),
|
|
31
|
-
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, count)));
|
|
31
|
+
showCounter && react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, count)));
|
|
32
32
|
}))));
|
|
33
33
|
}
|
|
34
34
|
const FilterCheckboxOption = (0, styled_components_1.default)(FilterOption_1.FilterOption) `
|
|
@@ -6,5 +6,7 @@ export type FilterContentProps = {
|
|
|
6
6
|
filters: ResolvedFilter[];
|
|
7
7
|
filterTerm: string;
|
|
8
8
|
filterValuesCasing?: NonNullable<RedoclyConfig['catalog']>[string]['filterValuesCasing'];
|
|
9
|
+
hideSearch?: boolean;
|
|
10
|
+
showCounter?: boolean;
|
|
9
11
|
};
|
|
10
|
-
export declare function FilterContent({ setFilterTerm, filters, filterTerm, filterValuesCasing, }: FilterContentProps): JSX.Element;
|
|
12
|
+
export declare function FilterContent({ setFilterTerm, filters, filterTerm, filterValuesCasing, hideSearch, showCounter, }: FilterContentProps): JSX.Element | null;
|
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (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
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.FilterContent = FilterContent;
|
|
7
30
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const styled_components_1 =
|
|
31
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
9
32
|
const FilterInput_1 = require("../../components/Filter/FilterInput");
|
|
10
33
|
const hooks_1 = require("../../core/hooks");
|
|
11
34
|
const Button_1 = require("../../components/Button/Button");
|
|
12
35
|
const Filter_1 = require("../../components/Filter/Filter");
|
|
13
36
|
const utils_1 = require("../../core/utils");
|
|
14
|
-
function FilterContent({ setFilterTerm, filters, filterTerm, filterValuesCasing, }) {
|
|
37
|
+
function FilterContent({ setFilterTerm, filters, filterTerm, filterValuesCasing, hideSearch, showCounter = true, }) {
|
|
15
38
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
16
39
|
const { translate } = useTranslate();
|
|
17
40
|
const hasActiveFilters = filters.some((filter) => {
|
|
@@ -30,12 +53,15 @@ function FilterContent({ setFilterTerm, filters, filterTerm, filterValuesCasing,
|
|
|
30
53
|
filters.forEach((filter) => filter.selectOption(''));
|
|
31
54
|
setFilterTerm('');
|
|
32
55
|
};
|
|
56
|
+
if (!filters.length) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
33
59
|
return (react_1.default.createElement(FilterContentWrapper, { "data-component-name": "Filter/FilterContent" },
|
|
34
60
|
react_1.default.createElement(FiltersHeader, null,
|
|
35
61
|
react_1.default.createElement(FiltersTitle, { "data-translation-key": "catalog.filters.title" }, translate('catalog.filters.title', 'Filters')),
|
|
36
62
|
hasActiveFilters ? (react_1.default.createElement(Button_1.Button, { size: "medium", tone: "danger", variant: "ghost", onClick: handleClearAll }, translate('catalog.filters.clearAll', 'Clear filters'))) : null),
|
|
37
|
-
react_1.default.createElement(FilterInput_1.FilterInput, { value: filterTerm, onChange: (updatedTerm) => setFilterTerm(updatedTerm) }),
|
|
38
|
-
react_1.default.createElement(FilterItems,
|
|
63
|
+
!hideSearch && (react_1.default.createElement(FilterInput_1.FilterInput, { value: filterTerm, onChange: (updatedTerm) => setFilterTerm(updatedTerm) })),
|
|
64
|
+
react_1.default.createElement(FilterItems, { hideSearch: hideSearch }, filters.map((filter, idx) => (react_1.default.createElement(Filter_1.Filter, { filter: filter, key: filter.property + '-' + idx, filterValuesCasing: filterValuesCasing, showCounter: showCounter }))))));
|
|
39
65
|
}
|
|
40
66
|
const FilterContentWrapper = styled_components_1.default.div `
|
|
41
67
|
padding: var(--filter-content-padding-vertical) var(--filter-content-padding-horizontal);
|
|
@@ -61,5 +87,9 @@ const FilterItems = styled_components_1.default.div `
|
|
|
61
87
|
flex-direction: column;
|
|
62
88
|
gap: var(--spacing-base);
|
|
63
89
|
border-top: 1px solid var(--border-color-secondary);
|
|
90
|
+
${({ hideSearch }) => hideSearch &&
|
|
91
|
+
(0, styled_components_1.css) `
|
|
92
|
+
border-top: none;
|
|
93
|
+
`}
|
|
64
94
|
`;
|
|
65
95
|
//# sourceMappingURL=FilterContent.js.map
|
|
@@ -1,20 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (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
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.FilterInput = FilterInput;
|
|
7
|
-
const react_1 =
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
8
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
32
|
const hooks_1 = require("../../core/hooks");
|
|
10
33
|
const SearchIcon_1 = require("../../icons/SearchIcon/SearchIcon");
|
|
11
34
|
function FilterInput(props) {
|
|
12
|
-
const { value, onChange } = props;
|
|
35
|
+
const { value: initialValue, onChange } = props;
|
|
36
|
+
const [value, setValue] = (0, react_1.useState)(initialValue);
|
|
37
|
+
(0, react_1.useEffect)(() => {
|
|
38
|
+
setValue(initialValue);
|
|
39
|
+
}, [initialValue]);
|
|
40
|
+
const handleChange = (e) => {
|
|
41
|
+
const newValue = e.target.value;
|
|
42
|
+
setValue(newValue);
|
|
43
|
+
onChange(newValue);
|
|
44
|
+
};
|
|
13
45
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
14
46
|
const { translate } = useTranslate();
|
|
15
47
|
return (react_1.default.createElement(InputWrapper, { "data-component-name": "Filter/FilterInput" },
|
|
16
48
|
react_1.default.createElement(InputIcon, null),
|
|
17
|
-
react_1.default.createElement(Input, { value: value, onChange:
|
|
49
|
+
react_1.default.createElement(Input, { value: value, onChange: handleChange, placeholder: translate('catalog.filters.placeholder', 'Search') })));
|
|
18
50
|
}
|
|
19
51
|
const InputWrapper = styled_components_1.default.div `
|
|
20
52
|
position: relative;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { FilterProps } from '../../core/types';
|
|
3
|
-
export declare function FilterSelect({ filter, filterValuesCasing }: FilterProps): JSX.Element;
|
|
3
|
+
export declare function FilterSelect({ filter, filterValuesCasing, showCounter, }: FilterProps): JSX.Element;
|
|
@@ -13,12 +13,12 @@ const Select_1 = require("../../components/Select/Select");
|
|
|
13
13
|
const CounterTag_1 = require("../../components/Tags/CounterTag");
|
|
14
14
|
const utils_1 = require("../../core/utils");
|
|
15
15
|
const hooks_1 = require("../../core/hooks");
|
|
16
|
-
function FilterSelect({ filter, filterValuesCasing }) {
|
|
16
|
+
function FilterSelect({ filter, filterValuesCasing, showCounter = true, }) {
|
|
17
17
|
var _a;
|
|
18
18
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
19
19
|
const { translate } = useTranslate();
|
|
20
20
|
let selectOptions = [];
|
|
21
|
-
const defaultOptionCount = filter.
|
|
21
|
+
const defaultOptionCount = filter.options.reduce((acc, option) => acc + option.count, 0);
|
|
22
22
|
selectOptions = [
|
|
23
23
|
{
|
|
24
24
|
value: '',
|
|
@@ -26,11 +26,11 @@ function FilterSelect({ filter, filterValuesCasing }) {
|
|
|
26
26
|
react_1.default.createElement(FilterOptionLabel_1.FilterOptionLabel, { "data-translation-key": "catalog.filters.select.all" }, translate('catalog.filters.select.all', 'All')),
|
|
27
27
|
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, defaultOptionCount))),
|
|
28
28
|
},
|
|
29
|
-
...filter.
|
|
29
|
+
...filter.options.map((option) => ({
|
|
30
30
|
value: option.value,
|
|
31
31
|
element: (react_1.default.createElement(FilterOption_1.FilterOption, { key: option.value },
|
|
32
32
|
react_1.default.createElement(FilterOptionLabel_1.FilterOptionLabel, { "data-translation-key": option.value }, (0, utils_1.changeTextCasing)(translate(option.value), filterValuesCasing)),
|
|
33
|
-
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, option.count))),
|
|
33
|
+
showCounter && react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, option.count))),
|
|
34
34
|
})),
|
|
35
35
|
];
|
|
36
36
|
return (react_1.default.createElement(FilterSelectWrapper, { "data-component-name": "Filter/FilterSelect" },
|
|
@@ -0,0 +1,18 @@
|
|
|
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.LoadMore = LoadMore;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const Button_1 = require("../../components/Button/Button");
|
|
10
|
+
function LoadMore({ icon, onClick, disabled, blinking, label, }) {
|
|
11
|
+
return (react_1.default.createElement(LoadMoreWrapper, { "data-component-name": "LoadMore/LoadMore" },
|
|
12
|
+
react_1.default.createElement(Button_1.Button, { variant: "secondary", icon: icon, iconPosition: "left", onClick: onClick, disabled: disabled, blinking: blinking }, label)));
|
|
13
|
+
}
|
|
14
|
+
const LoadMoreWrapper = styled_components_1.default.div `
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
`;
|
|
18
|
+
//# sourceMappingURL=LoadMore.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
type NavigationButtonPosition = 'left' | 'right';
|
|
3
|
+
export type NavigationButtonProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
link: string;
|
|
6
|
+
text: string;
|
|
7
|
+
translationKey: string;
|
|
8
|
+
position: NavigationButtonPosition;
|
|
9
|
+
icon?: JSX.Element;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function NavigationButton({ label, link, text, translationKey, position, icon, className, }: NavigationButtonProps): JSX.Element;
|
|
13
|
+
export {};
|