@redocly/theme 0.63.0-next.5 → 0.63.0-next.6

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.
Files changed (112) hide show
  1. package/lib/components/Accordion/variables.js +2 -2
  2. package/lib/components/Catalog/Catalog.js +114 -50
  3. package/lib/components/Catalog/CatalogAvatar.d.ts +5 -0
  4. package/lib/components/Catalog/CatalogAvatar.js +92 -0
  5. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +26 -7
  6. package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +10 -2
  7. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +17 -17
  8. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.js +4 -20
  9. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.d.ts +7 -0
  10. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +53 -0
  11. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.js +3 -17
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +30 -9
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +16 -3
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +8 -4
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +11 -5
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +1 -1
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -1
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +4 -1
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.js +7 -2
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
  23. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +1 -1
  24. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +4 -2
  25. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +25 -8
  26. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +7 -0
  27. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +24 -0
  28. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +6 -0
  29. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.js +26 -0
  30. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +7 -0
  31. package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +30 -0
  32. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +13 -0
  33. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.js +30 -0
  34. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +11 -0
  35. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.js +21 -0
  36. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +7 -0
  37. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.js +25 -0
  38. package/lib/components/Catalog/CatalogPageDescription.js +0 -6
  39. package/lib/components/Catalog/CatalogSelector.d.ts +0 -1
  40. package/lib/components/Catalog/CatalogSelector.js +50 -16
  41. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
  42. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +20 -5
  43. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -23
  44. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +2 -1
  45. package/lib/components/Catalog/CatalogTagsWithTooltip.js +14 -6
  46. package/lib/components/Catalog/variables.js +78 -36
  47. package/lib/components/Filter/variables.js +1 -1
  48. package/lib/components/LoadMore/LoadMore.js +1 -0
  49. package/lib/components/PageActions/PageActions.js +1 -2
  50. package/lib/components/UserMenu/UserMenu.js +1 -3
  51. package/lib/core/hooks/index.d.ts +1 -0
  52. package/lib/core/hooks/index.js +1 -0
  53. package/lib/core/hooks/use-is-truncated.d.ts +1 -0
  54. package/lib/core/hooks/use-is-truncated.js +19 -0
  55. package/lib/core/hooks/use-tabs.d.ts +1 -1
  56. package/lib/core/hooks/use-tabs.js +30 -17
  57. package/lib/core/types/l10n.d.ts +1 -1
  58. package/lib/core/utils/custom-catalog-options-casing.d.ts +15 -0
  59. package/lib/core/utils/custom-catalog-options-casing.js +32 -0
  60. package/lib/core/utils/index.d.ts +1 -0
  61. package/lib/core/utils/index.js +1 -0
  62. package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +2 -2
  63. package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -2
  64. package/lib/markdoc/components/Tabs/Tabs.js +9 -22
  65. package/package.json +4 -4
  66. package/src/components/Accordion/variables.ts +2 -2
  67. package/src/components/Catalog/Catalog.tsx +157 -95
  68. package/src/components/Catalog/CatalogAvatar.tsx +68 -0
  69. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +29 -5
  70. package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +10 -2
  71. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +17 -17
  72. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.tsx +4 -21
  73. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +82 -0
  74. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.tsx +4 -22
  75. package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +39 -10
  76. package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +19 -3
  77. package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +8 -4
  78. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +12 -10
  79. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +5 -1
  80. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +1 -0
  81. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
  82. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +6 -2
  83. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +10 -2
  84. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
  85. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
  86. package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +1 -1
  87. package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +30 -6
  88. package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +31 -0
  89. package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +34 -0
  90. package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +40 -0
  91. package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +54 -0
  92. package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +34 -0
  93. package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +39 -0
  94. package/src/components/Catalog/CatalogPageDescription.tsx +0 -6
  95. package/src/components/Catalog/CatalogSelector.tsx +23 -21
  96. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +37 -6
  97. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -26
  98. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +24 -9
  99. package/src/components/Catalog/variables.ts +78 -36
  100. package/src/components/Filter/variables.ts +1 -1
  101. package/src/components/LoadMore/LoadMore.tsx +1 -0
  102. package/src/components/PageActions/PageActions.tsx +1 -2
  103. package/src/components/UserMenu/UserMenu.tsx +1 -3
  104. package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +1 -1
  105. package/src/core/hooks/index.ts +1 -0
  106. package/src/core/hooks/use-is-truncated.ts +20 -0
  107. package/src/core/hooks/use-tabs.ts +40 -21
  108. package/src/core/types/l10n.ts +2 -0
  109. package/src/core/utils/custom-catalog-options-casing.ts +29 -0
  110. package/src/core/utils/index.ts +1 -0
  111. package/src/markdoc/components/MarkdocExample/MarkdocExample.tsx +2 -6
  112. package/src/markdoc/components/Tabs/Tabs.tsx +4 -37
@@ -6,25 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CatalogEntityRelationsRootNode = CatalogEntityRelationsRootNode;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const react_2 = require("@xyflow/react");
9
- const styled_components_1 = __importDefault(require("styled-components"));
10
- const CatalogEntityIcon_1 = require("../../../../components/Catalog/CatalogEntityIcon");
11
9
  const catalog_1 = require("../../../../core/constants/catalog");
10
+ const CatalogEntityRelationsNodeContent_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent");
12
11
  function CatalogEntityRelationsRootNode({ label, entityType, className, }) {
13
- return (react_1.default.createElement(RelationsRootNodeWrapper, { className: className, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode" },
14
- react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, forceColor: "var(--catalog-entity-relations-node-root-icon-color)" }),
15
- react_1.default.createElement("div", null, label),
12
+ return (react_1.default.createElement("div", { className: className, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode" },
13
+ react_1.default.createElement(CatalogEntityRelationsNodeContent_1.CatalogEntityRelationsNodeContent, { entityType: entityType, label: label, isRoot: true }),
16
14
  react_1.default.createElement(react_2.Handle, { type: catalog_1.GraphHandleType.Source, position: react_2.Position.Bottom, id: catalog_1.GraphHandleType.Source })));
17
15
  }
18
- const RelationsRootNodeWrapper = styled_components_1.default.div `
19
- display: flex;
20
- align-items: center;
21
- gap: var(--catalog-entity-relations-node-gap);
22
- padding: var(--catalog-entity-relations-node-padding);
23
- border-radius: var(--catalog-entity-relations-node-border-radius);
24
- font-style: normal;
25
- font-weight: var(--catalog-entity-relations-node-font-weight-root);
26
- background: var(--catalog-entity-relations-node-root-bg-color);
27
- color: var(--catalog-entity-relations-node-root-text-color);
28
- border: none;
29
- `;
30
16
  //# sourceMappingURL=CatalogEntityRelationsRootNode.js.map
@@ -43,10 +43,13 @@ const RecentlyViewedIcon_1 = require("../../../../icons/RecentlyViewedIcon/Recen
43
43
  const CheckmarkOutlineIcon_1 = require("../../../../icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon");
44
44
  const hooks_1 = require("../../../../core/hooks");
45
45
  const constants_1 = require("../../../../core/constants");
46
+ const Tooltip_1 = require("../../../../components/Tooltip/Tooltip");
47
+ const hooks_2 = require("../../../../core/hooks");
46
48
  function CatalogEntityHistoryButton({ version, className, }) {
47
49
  const [label, setLabel] = (0, react_1.useState)(version === constants_1.VERSION_NOT_SPECIFIED ? null : version);
48
50
  const { useTranslate } = (0, hooks_1.useThemeHooks)();
49
51
  const { translate } = useTranslate();
52
+ const [labelRef, isLabelTruncated] = (0, hooks_2.useIsTruncated)(label);
50
53
  const handleClose = (0, react_1.useCallback)((e) => {
51
54
  setLabel(e.detail.version === constants_1.VERSION_NOT_SPECIFIED
52
55
  ? e.detail.revision || 'r.1'
@@ -67,12 +70,14 @@ function CatalogEntityHistoryButton({ version, className, }) {
67
70
  react_1.default.createElement(HistoryIcon, null),
68
71
  react_1.default.createElement(HistoryContent, null,
69
72
  react_1.default.createElement(HistoryText, null, translate('catalog.history.button.label', 'Version history')),
70
- label && (react_1.default.createElement(VersionPill, null,
71
- react_1.default.createElement(CheckmarkIcon, null),
72
- react_1.default.createElement("span", null, label)))))));
73
+ label && (react_1.default.createElement(Tooltip_1.Tooltip, { tip: label, placement: "bottom", arrowPosition: "left", disabled: !isLabelTruncated },
74
+ react_1.default.createElement(VersionPillWrapper, null,
75
+ react_1.default.createElement(VersionPill, null,
76
+ react_1.default.createElement(CheckmarkIcon, null),
77
+ react_1.default.createElement("span", { ref: labelRef }, label)))))))));
73
78
  }
74
79
  const CatalogHistoryButtonWrapper = styled_components_1.default.div `
75
- width: 100%;
80
+ width: var(--catalog-history-button-width);
76
81
  `;
77
82
  const Separator = styled_components_1.default.div `
78
83
  width: 100%;
@@ -89,7 +94,7 @@ const HistoryItem = styled_components_1.default.button `
89
94
  gap: var(--catalog-history-item-gap);
90
95
  padding: var(--catalog-history-item-padding);
91
96
  margin-bottom: var(--catalog-history-item-margin-bottom);
92
- width: 100%;
97
+ width: var(--catalog-history-button-item-width);
93
98
  border-radius: var(--catalog-history-item-border-radius);
94
99
  cursor: pointer;
95
100
  transition: background-color 0.2s ease;
@@ -100,18 +105,27 @@ const HistoryItem = styled_components_1.default.button `
100
105
  `;
101
106
  const HistoryContent = styled_components_1.default.div `
102
107
  display: flex;
108
+ flex-wrap: wrap;
103
109
  align-items: center;
104
110
  justify-content: space-between;
105
111
  flex: 1;
106
112
  gap: var(--catalog-history-item-gap);
113
+ min-width: 0;
114
+ max-width: var(--catalog-history-content-max-width);
107
115
  `;
108
116
  const HistoryText = styled_components_1.default.span `
117
+ flex: 0 0 auto;
109
118
  font-family: var(--catalog-history-text-font-family);
110
119
  font-size: var(--catalog-history-text-font-size);
111
120
  font-weight: var(--catalog-history-text-font-weight);
112
121
  line-height: var(--catalog-history-text-line-height);
113
122
  color: var(--catalog-history-text-color);
114
- flex: 1;
123
+ white-space: nowrap;
124
+ `;
125
+ const VersionPillWrapper = styled_components_1.default.div `
126
+ flex: 0 1 auto;
127
+ min-width: 0;
128
+ max-width: var(--catalog-history-content-max-width);
115
129
  `;
116
130
  const HistoryIcon = (0, styled_components_1.default)(RecentlyViewedIcon_1.RecentlyViewedIcon) `
117
131
  width: var(--catalog-history-icon-size);
@@ -122,23 +136,30 @@ const VersionPill = styled_components_1.default.div `
122
136
  display: flex;
123
137
  align-items: center;
124
138
  gap: var(--catalog-history-pill-gap);
125
- padding: var(--catalog-history-pill-padding-vertical)
126
- var(--catalog-history-pill-padding-horizontal);
139
+ padding: var(--catalog-history-pill-padding-vertical) var(--catalog-history-pill-padding-horizontal);
127
140
  border: 1px solid var(--catalog-history-pill-border-color);
128
141
  border-radius: var(--catalog-history-pill-border-radius);
129
142
  background-color: transparent;
130
- flex-shrink: 0;
143
+ min-width: 0;
144
+ max-width: 100%;
131
145
 
132
146
  span {
133
147
  font-family: var(--catalog-history-pill-font-family);
134
148
  font-size: var(--catalog-history-pill-font-size);
135
149
  line-height: var(--catalog-history-pill-line-height);
136
150
  color: var(--catalog-history-pill-text-color);
151
+ overflow: hidden;
152
+ text-overflow: ellipsis;
153
+ white-space: nowrap;
154
+ min-width: 0;
137
155
  }
138
156
  `;
139
157
  const CheckmarkIcon = (0, styled_components_1.default)(CheckmarkOutlineIcon_1.CheckmarkOutlineIcon) `
140
158
  width: var(--catalog-history-pill-icon-size);
141
159
  height: var(--catalog-history-pill-icon-size);
160
+ min-width: var(--catalog-history-pill-icon-size);
161
+ min-height: var(--catalog-history-pill-icon-size);
162
+ flex-shrink: 0;
142
163
  color: var(--catalog-history-pill-icon-color);
143
164
  `;
144
165
  //# sourceMappingURL=CatalogEntityHistoryButton.js.map
@@ -46,6 +46,7 @@ const MenuContainer_1 = require("../../../../components/Menu/MenuContainer");
46
46
  const utils_1 = require("../../../../core/utils");
47
47
  const constants_1 = require("../../../../core/constants");
48
48
  const CatalogEntityVersionItem_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem");
49
+ const RecentlyViewedIcon_1 = require("../../../../icons/RecentlyViewedIcon/RecentlyViewedIcon");
49
50
  function CatalogEntityHistorySidebar({ entityKey, revision, version, className, }) {
50
51
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
51
52
  const location = (0, react_router_dom_1.useLocation)();
@@ -103,7 +104,9 @@ function CatalogEntityHistorySidebar({ entityKey, revision, version, className,
103
104
  }
104
105
  return (react_1.default.createElement(SidebarOverlay, { className: className, "data-component-name": "Catalog/CatalogHistorySidebar" },
105
106
  react_1.default.createElement(SidebarHeader, null,
106
- react_1.default.createElement(HeaderTitle, null, translate('catalog.history.sidebar.title', 'Version history')),
107
+ react_1.default.createElement(HeaderWrapper, null,
108
+ react_1.default.createElement(HistoryIcon, null),
109
+ react_1.default.createElement(HeaderTitle, null, translate('catalog.history.sidebar.title', 'Version history'))),
107
110
  react_1.default.createElement(CloseButton, { onClick: handleClose, "aria-label": translate('catalog.history.sidebar.close', 'Close version history') },
108
111
  react_1.default.createElement(CloseIcon_1.CloseIcon, { size: "20px", color: "--catalog-history-sidebar-close-icon-color" }))),
109
112
  react_1.default.createElement(MenuContainer_1.MenuContainer, { growContent: true },
@@ -111,10 +114,10 @@ function CatalogEntityHistorySidebar({ entityKey, revision, version, className,
111
114
  }
112
115
  const SidebarOverlay = styled_components_1.default.div `
113
116
  position: fixed;
114
- top: calc(var(--navbar-height) + var(--banner-height, 0));
117
+ top: calc(var(--navbar-height) + var(--banner-height));
115
118
  left: 0;
116
119
  width: var(--sidebar-width);
117
- height: calc(100vh - var(--navbar-height) - var(--banner-height, 0));
120
+ height: calc(100vh - var(--navbar-height) - var(--banner-height));
118
121
  background-color: var(--catalog-history-sidebar-bg-color);
119
122
  border-right: 1px solid var(--catalog-history-sidebar-border-color);
120
123
  display: flex;
@@ -160,4 +163,14 @@ const VersionList = styled_components_1.default.ul `
160
163
  padding: var(--catalog-history-sidebar-content-padding);
161
164
  margin-top: var(--catalog-history-sidebar-content-margin-top);
162
165
  `;
166
+ const HistoryIcon = (0, styled_components_1.default)(RecentlyViewedIcon_1.RecentlyViewedIcon) `
167
+ width: var(--catalog-history-icon-size);
168
+ height: var(--catalog-history-icon-size);
169
+ flex-shrink: 0;
170
+ `;
171
+ const HeaderWrapper = styled_components_1.default.div `
172
+ display: flex;
173
+ align-items: center;
174
+ gap: var(--spacing-xs);
175
+ `;
163
176
  //# sourceMappingURL=CatalogEntityHistorySidebar.js.map
@@ -71,17 +71,18 @@ function CatalogEntityVersionItem({ group, basePath, isExpanded, onToggle, }) {
71
71
  const isNotSpecifiedVersion = group.version === constants_1.VERSION_NOT_SPECIFIED;
72
72
  const singleRevisionLink = (0, utils_1.buildRevisionUrl)(basePath, group.singleRevisionDate, group.version);
73
73
  const versionTitle = isNotSpecifiedVersion
74
- ? `${translate('catalog.history.version.label', 'Version')}: ${translate('catalog.history.version.notSpecified', 'not specified')}`
75
- : `${translate('catalog.history.version.label', 'Version')}: ${group.version}`;
74
+ ? `${translate('catalog.history.version.label', 'Version')}:\u00a0${translate('catalog.history.version.notSpecified', 'not specified')}`
75
+ : `${translate('catalog.history.version.label', 'Version')}:\u00a0${group.version}`;
76
76
  const versionButton = (react_1.default.createElement(VersionButton, { type: "button", onClick: () => hasRevisions && onToggle(group.version), "$isCurrent": group.isCurrent },
77
77
  react_1.default.createElement(VersionIcon, { "$isCurrent": group.isCurrent }, group.isCurrent ? (react_1.default.createElement(CheckmarkOutlineIcon_1.CheckmarkOutlineIcon, { size: "16px", color: "--catalog-history-sidebar-version-icon-color-current" })) : (react_1.default.createElement(NavaidMilitaryIcon_1.NavaidMilitaryIcon, { size: "16px", color: "--catalog-history-sidebar-version-icon-color" }))),
78
78
  react_1.default.createElement(VersionInfo, null,
79
79
  react_1.default.createElement(VersionTitleRow, null,
80
80
  react_1.default.createElement(VersionTitle, null, versionTitle),
81
- group.isDefaultVersion && (react_1.default.createElement(Tag_1.Tag, { color: "grey", borderless: true, textTransform: "none", style: {
81
+ group.isDefaultVersion && (react_1.default.createElement(Tag_1.Tag, { color: "grey", borderless: true, textTransform: "lowercase", style: {
82
82
  fontSize: 'var(--font-size-xs)',
83
83
  borderRadius: 'var(--catalog-history-sidebar-version-tag-border-radius)',
84
84
  flexShrink: 0,
85
+ marginLeft: 'var(--spacing-xxs)',
85
86
  } }, translate('catalog.history.version.default', 'default')))),
86
87
  !isNotSpecifiedVersion && react_1.default.createElement(VersionDate, null, group.date)),
87
88
  hasRevisions && (react_1.default.createElement(ChevronIcon, null, isExpanded ? (react_1.default.createElement(ChevronDownIcon_1.ChevronDownIcon, { size: "16px", color: "--catalog-history-sidebar-chevron-icon-color" })) : (react_1.default.createElement(ChevronRightIcon_1.ChevronRightIcon, { size: "16px", color: "--catalog-history-sidebar-chevron-icon-color" }))))));
@@ -156,6 +157,8 @@ const VersionTitle = styled_components_1.default.span `
156
157
  color: var(--catalog-history-sidebar-version-title-color);
157
158
  flex-shrink: 1;
158
159
  min-width: 0;
160
+ overflow-wrap: break-word;
161
+ word-break: break-word;
159
162
  `;
160
163
  const VersionDate = styled_components_1.default.span `
161
164
  font-family: var(--catalog-history-sidebar-version-date-font-family);
@@ -176,6 +179,7 @@ const RevisionsList = styled_components_1.default.ul `
176
179
  margin: 0;
177
180
  padding: 0;
178
181
  padding-left: var(--catalog-history-sidebar-revisions-padding-left);
182
+ padding-bottom: var(--catalog-history-sidebar-revisions-padding-bottom);
179
183
  position: relative;
180
184
 
181
185
  &::before {
@@ -183,7 +187,7 @@ const RevisionsList = styled_components_1.default.ul `
183
187
  position: absolute;
184
188
  left: 22px;
185
189
  top: 0;
186
- bottom: 0;
190
+ bottom: var(--catalog-history-sidebar-revisions-padding-bottom);
187
191
  width: 1px;
188
192
  background-color: var(
189
193
  --catalog-history-sidebar-revision-line-color,
@@ -14,6 +14,7 @@ const DomainsProperty_1 = require("../../../../components/Catalog/CatalogEntity/
14
14
  const OwnersProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty");
15
15
  const ContactProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty");
16
16
  const FormatProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty");
17
+ const core_1 = require("../../../../core");
17
18
  const propertyRenderers = [
18
19
  {
19
20
  key: 'type',
@@ -58,14 +59,19 @@ const propertyRenderers = [
58
59
  ];
59
60
  function CatalogEntityProperties({ entity }) {
60
61
  const renderers = propertyRenderers.filter((renderer) => renderer.condition(entity));
61
- const gridTemplateColumns = [1, 2, 4].includes(renderers.length)
62
- ? 'repeat(2, 1fr)'
63
- : 'repeat(3, 1fr)';
64
- return (react_1.default.createElement(CatalogEntityPropertiesGridWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties", gridTemplateColumns: gridTemplateColumns }, renderers.map((renderer) => (react_1.default.createElement(renderer.component, { key: renderer.key + entity.id, entity: entity })))));
62
+ return (react_1.default.createElement(CatalogEntityPropertiesGridWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties" }, renderers.map((renderer) => (react_1.default.createElement(renderer.component, { key: renderer.key + entity.id, entity: entity })))));
65
63
  }
66
64
  const CatalogEntityPropertiesGridWrapper = styled_components_1.default.div `
67
65
  display: grid;
68
- grid-template-columns: ${({ gridTemplateColumns }) => gridTemplateColumns};
69
66
  gap: var(--spacing-base);
67
+ grid-template-columns: 1fr;
68
+
69
+ @media screen and (min-width: ${core_1.breakpoints.small}) {
70
+ grid-template-columns: repeat(2, 1fr);
71
+ }
72
+
73
+ @media screen and (min-width: ${core_1.breakpoints.max}) {
74
+ grid-template-columns: repeat(3, 1fr);
75
+ }
70
76
  `;
71
77
  //# sourceMappingURL=CatalogEntityProperties.js.map
@@ -16,7 +16,7 @@ function DomainsProperty({ entity }) {
16
16
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty" },
17
17
  react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
18
18
  react_1.default.createElement(GraphIcon_1.GraphIcon, null),
19
- translate('catalog.domains.label', 'Domains')), content: react_1.default.createElement(react_1.default.Fragment, null, domains === null || domains === void 0 ? void 0 : domains.map((domain) => (react_1.default.createElement(Tag_1.Tag, { key: domain === null || domain === void 0 ? void 0 : domain.id, style: { backgroundColor: 'var(--bg-color)' } },
19
+ translate('catalog.domains.label', 'Domains')), content: react_1.default.createElement(react_1.default.Fragment, null, domains === null || domains === void 0 ? void 0 : domains.map((domain) => (react_1.default.createElement(Tag_1.Tag, { key: domain === null || domain === void 0 ? void 0 : domain.id, style: { backgroundColor: 'var(--bg-color)' }, variant: "outline" },
20
20
  react_1.default.createElement(GraphIcon_1.GraphIcon, null), domain === null || domain === void 0 ? void 0 :
21
21
  domain.title)))) })));
22
22
  }
@@ -19,6 +19,6 @@ function OwnersProperty({ entity }) {
19
19
  translate('catalog.owners.label', 'Owners')), content: react_1.default.createElement(react_1.default.Fragment, null, owners.map((owner) => (react_1.default.createElement(Tag_1.Tag, { key: owner === null || owner === void 0 ? void 0 : owner.id, style: {
20
20
  backgroundColor: 'var(--bg-color)',
21
21
  borderRadius: 'var(--border-radius-xl)',
22
- } }, owner === null || owner === void 0 ? void 0 : owner.title)))) })));
22
+ }, variant: "outline" }, owner === null || owner === void 0 ? void 0 : owner.title)))) })));
23
23
  }
24
24
  //# sourceMappingURL=OwnersProperty.js.map
@@ -13,7 +13,7 @@ const MoleculesIcon_1 = require("../../../../icons/MoleculesIcon/MoleculesIcon")
13
13
  const NetworkIcon_1 = require("../../../../icons/NetworkIcon/NetworkIcon");
14
14
  function CatalogEntityApiDescriptionRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
15
15
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations" },
16
- react_1.default.createElement(Tabs_1.Tabs, { key: entity.id, forceReady: relations.length > 0, size: Tabs_1.TabsSize.MEDIUM },
16
+ react_1.default.createElement(Tabs_1.Tabs, { key: entity.id, size: Tabs_1.TabsSize.MEDIUM },
17
17
  react_1.default.createElement(TabItem, { label: "Operations", icon: react_1.default.createElement(MoleculesIcon_1.MoleculesIcon, null), onClick: () => setFilter('type:api-operation') },
18
18
  react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { key: "operations-table", entity: entity, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, shouldShowHeading: false, listType: "api-operation" })),
19
19
  react_1.default.createElement(TabItem, { label: "Schemas", icon: react_1.default.createElement(NetworkIcon_1.NetworkIcon, null), onClick: () => setFilter('type:data-schema') },
@@ -34,11 +34,14 @@ function CatalogEntityRelationsTable({ entity, entitiesCatalogConfig, catalogCon
34
34
  ]);
35
35
  }
36
36
  };
37
- return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable" },
37
+ return (react_1.default.createElement(CatalogEntityRelationsTableWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable" },
38
38
  heading && react_1.default.createElement(Heading, null, heading),
39
39
  react_1.default.createElement(CatalogActionsRow_1.CatalogActionsRow, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, sortOption: sortOption, setSortOption: setSortOption, style: { marginBottom: '12px' } }),
40
40
  react_1.default.createElement(CatalogEntityRelationsTableContent_1.CatalogEntityRelationsTableContent, { entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, relations: relations, query: query, searchQuery: searchQuery, columns: columns, setSortOption: setSortOption, sortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, listType: listType, onRowClick: onRowClick })));
41
41
  }
42
+ const CatalogEntityRelationsTableWrapper = styled_components_1.default.div `
43
+ min-width: 0;
44
+ `;
42
45
  const Heading = styled_components_1.default.h2 `
43
46
  margin: var(--spacing-base) 0;
44
47
  font-size: var(--font-size-md);
@@ -5,14 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CatalogEntityRelationsTableContent = CatalogEntityRelationsTableContent;
7
7
  const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
8
9
  const ArrowDownIcon_1 = require("../../../../icons/ArrowDownIcon/ArrowDownIcon");
9
10
  const LoadMore_1 = require("../../../../components/LoadMore/LoadMore");
10
11
  const CatalogTableView_1 = require("../../../../components/Catalog/CatalogTableView/CatalogTableView");
11
12
  const CatalogHighlight_1 = require("../../../../components/Catalog/CatalogHighlight");
12
13
  const CatalogEntitiesEmptyState_1 = require("../../../../components/Catalog/CatalogEntitiesEmptyState");
13
14
  function CatalogEntityRelationsTableContent({ entitiesCatalogConfig, catalogConfig, relations, query, searchQuery, columns, setSortOption, sortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, listType, onRowClick, }) {
14
- return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent" },
15
- react_1.default.createElement(CatalogHighlight_1.HighlightContext.Provider, { value: [searchQuery] }, relations.length > 0 ? (react_1.default.createElement(CatalogTableView_1.CatalogTableView, { entities: relations, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, columns: columns, setSortOption: setSortOption, currentSortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, style: { marginTop: 0 }, onRowClick: onRowClick })) : (react_1.default.createElement(CatalogEntitiesEmptyState_1.CatalogEntitiesEmptyState, { listType: listType }))),
15
+ return (react_1.default.createElement(TableContentWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent" },
16
+ react_1.default.createElement(CatalogHighlight_1.HighlightContext.Provider, { value: [searchQuery] }, relations.length > 0 ? (react_1.default.createElement(CatalogTableView_1.CatalogTableView, { entities: relations, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, columns: columns, setSortOption: setSortOption, currentSortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, style: { marginTop: 0 }, onRowClick: onRowClick, contentMinWidth: TABLE_SCROLL_MIN_WIDTH_PX })) : (react_1.default.createElement(CatalogEntitiesEmptyState_1.CatalogEntitiesEmptyState, { listType: listType }))),
16
17
  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' }))));
17
18
  }
19
+ const TABLE_SCROLL_MIN_WIDTH_PX = 608;
20
+ const TableContentWrapper = styled_components_1.default.div `
21
+ min-width: 0; /* Constrain width so table overflow-x scroll works inside tabs */
22
+ `;
18
23
  //# sourceMappingURL=CatalogEntityRelationsTableContent.js.map
@@ -40,7 +40,7 @@ const teamColumns = [
40
40
  ];
41
41
  function CatalogEntityTeamRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
42
42
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations" },
43
- react_1.default.createElement(Tabs_1.Tabs, { forceReady: relations.length > 0, size: Tabs_1.TabsSize.MEDIUM },
43
+ react_1.default.createElement(Tabs_1.Tabs, { size: Tabs_1.TabsSize.MEDIUM },
44
44
  react_1.default.createElement(TabItem, { label: "Members", icon: react_1.default.createElement(PeopleIcon_1.PeopleIcon, null), onClick: () => setFilter('type:user') },
45
45
  react_1.default.createElement(CatalogEntityRelationsTable_1.CatalogEntityRelationsTable, { key: "members-table", entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, columns: teamColumns, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, listType: "team" })),
46
46
  react_1.default.createElement(TabItem, { label: "Related entities", icon: react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null), onClick: () => setFilter('-type:user') },
@@ -104,7 +104,7 @@ const SplitViewWrapper = styled_components_1.default.div `
104
104
  const SchemaSampleWrapper = styled_components_1.default.div `
105
105
  flex: 1;
106
106
  position: sticky;
107
- top: calc(var(--navbar-height) + var(--spacing-md));
107
+ top: calc(var(--navbar-height) + var(--banner-height) + var(--spacing-md));
108
108
  align-self: flex-start;
109
109
  padding-top: var(--spacing-sm);
110
110
  `;
@@ -155,6 +155,6 @@ const FilterCheckboxOption = (0, styled_components_1.default)(FilterOption_1.Fil
155
155
  padding-left: var(--filter-option-checkbox-padding-left);
156
156
  `;
157
157
  const FilterSearchWrapper = styled_components_1.default.div `
158
- padding: var(--filter-content-search-padding);
158
+ padding-bottom: var(--spacing-xs);
159
159
  `;
160
160
  //# sourceMappingURL=CatalogFilterCheckboxes.js.map
@@ -1,4 +1,4 @@
1
- import type { JSX } from 'react';
1
+ import type { JSX, ReactNode } from 'react';
2
2
  import type { ResolvedFilter } from '../../../core/types';
3
3
  import type { RedoclyConfig } from '../../../config';
4
4
  export type CatalogFilterContentProps = {
@@ -7,6 +7,8 @@ export type CatalogFilterContentProps = {
7
7
  filterTerm: string;
8
8
  filterValuesCasing?: NonNullable<RedoclyConfig['catalog']>[string]['filterValuesCasing'] | ((str: string) => string);
9
9
  showCounter?: boolean;
10
+ catalogSelector?: ReactNode;
11
+ searchInput?: ReactNode;
10
12
  className?: string;
11
13
  };
12
- export declare function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter, className, }: CatalogFilterContentProps): JSX.Element | null;
14
+ export declare function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter, catalogSelector, searchInput, className, }: CatalogFilterContentProps): JSX.Element | null;
@@ -10,7 +10,8 @@ const hooks_1 = require("../../../core/hooks");
10
10
  const Button_1 = require("../../../components/Button/Button");
11
11
  const CatalogFilter_1 = require("../../../components/Catalog/CatalogFilter/CatalogFilter");
12
12
  const utils_1 = require("../../../core/utils");
13
- function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter = true, className, }) {
13
+ const utils_2 = require("../../../core/utils");
14
+ function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter = true, catalogSelector, searchInput, className, }) {
14
15
  const { useTranslate } = (0, hooks_1.useThemeHooks)();
15
16
  const { translate } = useTranslate();
16
17
  const hasActiveFilters = filters.some((filter) => {
@@ -19,7 +20,7 @@ function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing
19
20
  if (filter.selectedOptions && filter.selectedOptions instanceof Set) {
20
21
  return filter.selectedOptions.size;
21
22
  }
22
- else if ((0, utils_1.isFromToSelectedOptions)(filter.selectedOptions) &&
23
+ else if ((0, utils_2.isFromToSelectedOptions)(filter.selectedOptions) &&
23
24
  filter.selectedOptions.from &&
24
25
  filter.selectedOptions.to) {
25
26
  return true;
@@ -29,14 +30,17 @@ function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing
29
30
  filters.forEach((filter) => filter.selectOption(''));
30
31
  onClear();
31
32
  };
32
- if (!filters.length) {
33
+ if (!filters.length && !catalogSelector) {
33
34
  return null;
34
35
  }
35
36
  return (react_1.default.createElement(CatalogFilterContentWrapper, { className: className, "data-component-name": "Catalog/CatalogFilterContent" },
36
37
  react_1.default.createElement(FiltersHeader, null,
37
38
  react_1.default.createElement(FiltersTitle, { "data-translation-key": "catalog.filters.title" }, translate('catalog.filters.title', 'Filters')),
38
- hasActiveFilters ? (react_1.default.createElement(Button_1.Button, { size: "medium", tone: "danger", variant: "ghost", onClick: handleClearAll }, translate('catalog.filters.clearAll', 'Clear filters'))) : null),
39
- react_1.default.createElement(FilterItems, null, filters.map((filter, idx) => (react_1.default.createElement(CatalogFilter_1.CatalogFilter, { filter: filter, key: filter.property + '-' + idx, filterValuesCasing: filterValuesCasing, showCounter: showCounter }))))));
39
+ hasActiveFilters ? (react_1.default.createElement(Button_1.Button, { size: "medium", variant: "ghost", onClick: handleClearAll }, translate('catalog.filters.clearAll', 'Clear filters'))) : null),
40
+ searchInput ? react_1.default.createElement(FiltersSearchWrapper, null, searchInput) : null,
41
+ react_1.default.createElement(FilterItems, null,
42
+ catalogSelector ? (react_1.default.createElement(CatalogSelectorItemWrapper, null, catalogSelector)) : null,
43
+ filters.map((filter, idx) => (react_1.default.createElement(CatalogFilter_1.CatalogFilter, { filter: filter, key: filter.property + '-' + idx, filterValuesCasing: filterValuesCasing, showCounter: showCounter }))))));
40
44
  }
41
45
  const CatalogFilterContentWrapper = styled_components_1.default.div `
42
46
  padding: 0 0 var(--filter-content-padding-vertical) 0;
@@ -45,8 +49,7 @@ const CatalogFilterContentWrapper = styled_components_1.default.div `
45
49
  `;
46
50
  const FiltersHeader = styled_components_1.default.div `
47
51
  display: flex;
48
- padding: var(--filter-content-header-padding-vertical)
49
- var(--filter-content-header-padding-horizontal);
52
+ padding: var(--catalog-filter-content-header-padding);
50
53
  `;
51
54
  const FiltersTitle = styled_components_1.default.div `
52
55
  margin-right: auto;
@@ -54,10 +57,24 @@ const FiltersTitle = styled_components_1.default.div `
54
57
  font-weight: var(--filter-content-title-font-weight);
55
58
  line-height: var(--filter-content-title-line-height);
56
59
  `;
60
+ const CatalogSelectorItemWrapper = styled_components_1.default.div `
61
+ padding: var(--filter-group-padding);
62
+ display: flex;
63
+ flex-direction: column;
64
+ gap: var(--filter-group-gap);
65
+ border-bottom: 1px solid var(--catalog-table-border-color);
66
+ `;
67
+ const FiltersSearchWrapper = styled_components_1.default.div `
68
+ padding: 0 var(--spacing-base) var(--spacing-base) var(--spacing-base);
69
+
70
+ @media screen and (min-width: ${utils_1.breakpoints.medium}) {
71
+ display: none;
72
+ }
73
+ `;
57
74
  const FilterItems = styled_components_1.default.div `
58
75
  height: 100%;
59
76
  display: flex;
60
77
  flex-direction: column;
61
- border-top: 1px solid var(--border-color-secondary);
78
+ border-top: 1px solid var(--catalog-table-border-color);
62
79
  `;
63
80
  //# sourceMappingURL=CatalogFilterContent.js.map
@@ -0,0 +1,7 @@
1
+ import React, { JSX } from 'react';
2
+ type CatalogMobileFiltersPanelProps = {
3
+ setMobileFiltersPanelOpen: (open: boolean) => void;
4
+ filterContent: React.ReactNode;
5
+ };
6
+ export declare function CatalogMobileFiltersPanel({ setMobileFiltersPanelOpen, filterContent, }: CatalogMobileFiltersPanelProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,24 @@
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.CatalogMobileFiltersPanel = CatalogMobileFiltersPanel;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const CatalogMobileFiltersPanelHeader_1 = require("../../../components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader");
10
+ function CatalogMobileFiltersPanel({ setMobileFiltersPanelOpen, filterContent, }) {
11
+ return (react_1.default.createElement(CatalogMobileFiltersPanelWrapper, null,
12
+ react_1.default.createElement(CatalogMobileFiltersPanelHeader_1.CatalogMobileFiltersPanelHeader, { setMobileFiltersPanelOpen: setMobileFiltersPanelOpen }),
13
+ filterContent));
14
+ }
15
+ const CatalogMobileFiltersPanelWrapper = styled_components_1.default.div `
16
+ width: 100%;
17
+ max-height: calc(100vh - var(--navbar-height) - var(--banner-height));
18
+ overflow-y: auto;
19
+ background: var(--sidebar-bg-color);
20
+ display: flex;
21
+ flex-direction: column;
22
+ height: 100%;
23
+ `;
24
+ //# sourceMappingURL=CatalogMobileFiltersPanel.js.map
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ type CatalogMobileFiltersPanelHeaderProps = {
3
+ setMobileFiltersPanelOpen: (open: boolean) => void;
4
+ };
5
+ export declare function CatalogMobileFiltersPanelHeader({ setMobileFiltersPanelOpen, }: CatalogMobileFiltersPanelHeaderProps): JSX.Element;
6
+ export {};
@@ -0,0 +1,26 @@
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.CatalogMobileFiltersPanelHeader = CatalogMobileFiltersPanelHeader;
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
+ const core_1 = require("../../../core");
11
+ function CatalogMobileFiltersPanelHeader({ setMobileFiltersPanelOpen, }) {
12
+ const { useTranslate } = (0, core_1.useThemeHooks)();
13
+ const { translate } = useTranslate();
14
+ return (react_1.default.createElement(CatalogMobileFiltersPanelHeaderWrapper, null,
15
+ react_1.default.createElement("span", null),
16
+ react_1.default.createElement(Button_1.Button, { variant: "ghost", size: "medium", onClick: () => setMobileFiltersPanelOpen(false) }, translate('catalog.filters.close', 'Close'))));
17
+ }
18
+ const CatalogMobileFiltersPanelHeaderWrapper = styled_components_1.default.div `
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ padding: var(--catalog-filter-content-header-padding);
23
+ border-bottom: 1px solid var(--border-color-secondary);
24
+ flex-shrink: 0;
25
+ `;
26
+ //# sourceMappingURL=CatalogMobileFiltersPanelHeader.js.map
@@ -0,0 +1,7 @@
1
+ import React, { JSX } from 'react';
2
+ type CatalogMobileFiltersPanelOverlayProps = {
3
+ setMobileFiltersPanelOpen: (open: boolean) => void;
4
+ filterContent: React.ReactNode;
5
+ };
6
+ export declare function CatalogMobileFiltersPanelOverlay({ setMobileFiltersPanelOpen, filterContent, }: CatalogMobileFiltersPanelOverlayProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,30 @@
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.CatalogMobileFiltersPanelOverlay = CatalogMobileFiltersPanelOverlay;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const core_1 = require("../../../core");
10
+ const CatalogMobileFiltersPanel_1 = require("../../../components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel");
11
+ function CatalogMobileFiltersPanelOverlay({ setMobileFiltersPanelOpen, filterContent, }) {
12
+ return (react_1.default.createElement(CatalogMobileFiltersPanelOverlayWrapper, null,
13
+ react_1.default.createElement(CatalogMobileFiltersPanel_1.CatalogMobileFiltersPanel, { setMobileFiltersPanelOpen: setMobileFiltersPanelOpen, filterContent: filterContent })));
14
+ }
15
+ const CatalogMobileFiltersPanelOverlayWrapper = styled_components_1.default.div `
16
+ display: none;
17
+ position: fixed;
18
+ top: calc(var(--navbar-height) + var(--banner-height));
19
+ left: 0;
20
+ width: 100%;
21
+ height: calc(100vh - var(--navbar-height) - var(--banner-height));
22
+ z-index: 3;
23
+ background: var(--bg-color);
24
+ flex-direction: column;
25
+
26
+ @media screen and (max-width: ${core_1.breakpoints.medium}) {
27
+ display: flex;
28
+ }
29
+ `;
30
+ //# sourceMappingURL=CatalogMobileFiltersPanelOverlay.js.map
@@ -0,0 +1,13 @@
1
+ import { JSX } from 'react';
2
+ import { SortOption } from '../../../core';
3
+ import { CatalogViewMode } from '../../../core';
4
+ type CatalogMobileTopBarProps = {
5
+ setMobileFiltersPanelOpen: (open: boolean) => void;
6
+ activeFiltersCount: number;
7
+ setSortOption: (sortOption: SortOption | null) => void;
8
+ sortOption: SortOption | null;
9
+ viewMode: CatalogViewMode;
10
+ setViewMode: (viewMode: CatalogViewMode) => void;
11
+ };
12
+ export declare function CatalogMobileTopBar({ setMobileFiltersPanelOpen, activeFiltersCount, setSortOption, sortOption, viewMode, setViewMode, }: CatalogMobileTopBarProps): JSX.Element;
13
+ export {};
@@ -0,0 +1,30 @@
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.CatalogMobileTopBar = CatalogMobileTopBar;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const CatalogMobileTopBarFiltersButton_1 = require("../../../components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton");
10
+ const CatalogMobileTopBarControls_1 = require("../../../components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls");
11
+ const core_1 = require("../../../core");
12
+ function CatalogMobileTopBar({ setMobileFiltersPanelOpen, activeFiltersCount, setSortOption, sortOption, viewMode, setViewMode, }) {
13
+ return (react_1.default.createElement(CatalogMobileTopBarWrapper, null,
14
+ react_1.default.createElement(CatalogMobileTopBarFiltersButton_1.CatalogMobileTopBarFiltersButton, { setMobileFiltersPanelOpen: setMobileFiltersPanelOpen, activeFiltersCount: activeFiltersCount }),
15
+ react_1.default.createElement(CatalogMobileTopBarControls_1.CatalogMobileTopBarControls, { setSortOption: setSortOption, sortOption: sortOption, viewMode: viewMode, setViewMode: setViewMode })));
16
+ }
17
+ const CatalogMobileTopBarWrapper = styled_components_1.default.div `
18
+ display: none;
19
+ align-items: center;
20
+ justify-content: space-between;
21
+ padding: var(--spacing-sm) var(--catalog-page-padding-horizontal);
22
+ border-bottom: 1px solid var(--border-color-secondary);
23
+ background: var(--bg-color);
24
+ flex-shrink: 0;
25
+
26
+ @media screen and (max-width: ${core_1.breakpoints.medium}) {
27
+ display: flex;
28
+ }
29
+ `;
30
+ //# sourceMappingURL=CatalogMobileTopBar.js.map