@redocly/theme 0.64.0-next.1 → 0.64.0-next.3

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 (223) hide show
  1. package/lib/components/Admonition/Admonition.d.ts +1 -1
  2. package/lib/components/Admonition/Admonition.js +2 -0
  3. package/lib/components/Admonition/variables.dark.js +3 -0
  4. package/lib/components/Admonition/variables.js +13 -0
  5. package/lib/components/Banner/Banner.js +3 -3
  6. package/lib/components/Button/variables.dark.js +2 -2
  7. package/lib/components/Button/variables.js +3 -3
  8. package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -3
  9. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -6
  10. package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
  11. package/lib/components/Catalog/CatalogEntities.js +1 -1
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -8
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +3 -1
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +1 -1
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +1 -1
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +1 -0
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -1
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +2 -6
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +5 -5
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +1 -1
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +15 -7
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +3 -3
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -1
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +3 -3
  26. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +14 -2
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +1 -1
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -3
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +1 -1
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +2 -2
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +3 -3
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +13 -3
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +4 -3
  34. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +3 -2
  35. package/lib/components/Catalog/CatalogEntityTypeIcon.js +9 -9
  36. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -3
  37. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -3
  38. package/lib/components/Catalog/CatalogPageDescription.js +1 -1
  39. package/lib/components/Catalog/CatalogSortButton.d.ts +4 -5
  40. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +6 -2
  41. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -2
  42. package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.d.ts +5 -0
  43. package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.js +45 -0
  44. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +5 -3
  45. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +2 -3
  46. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +3 -2
  47. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
  48. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +15 -5
  49. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +3 -2
  50. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -2
  51. package/lib/components/Catalog/CatalogTags.d.ts +11 -0
  52. package/lib/components/Catalog/CatalogTags.js +62 -0
  53. package/lib/components/Catalog/variables.js +22 -14
  54. package/lib/components/Filter/variables.js +1 -1
  55. package/lib/components/Link/Link.js +2 -2
  56. package/lib/components/Menu/MenuItem.js +1 -0
  57. package/lib/components/Menu/variables.dark.js +2 -0
  58. package/lib/components/Menu/variables.js +4 -3
  59. package/lib/components/Search/SearchDialog.js +118 -116
  60. package/lib/components/SvgViewer/variables.dark.js +1 -1
  61. package/lib/components/Switch/variables.dark.js +2 -2
  62. package/lib/components/Switch/variables.js +1 -1
  63. package/lib/components/TableOfContent/TableOfContent.js +1 -0
  64. package/lib/components/TableOfContent/variables.js +3 -2
  65. package/lib/components/Toast/Toast.d.ts +14 -0
  66. package/lib/components/Toast/Toast.js +239 -0
  67. package/lib/components/Toast/variables.d.ts +1 -0
  68. package/lib/components/Toast/variables.js +64 -0
  69. package/lib/components/Tooltip/JsTooltip.js +1 -1
  70. package/lib/core/constants/catalog.d.ts +1 -1
  71. package/lib/core/constants/catalog.js +1 -1
  72. package/lib/core/constants/toast.d.ts +1 -0
  73. package/lib/core/constants/toast.js +5 -0
  74. package/lib/core/contexts/Toast/ToastContext.d.ts +2 -0
  75. package/lib/core/contexts/Toast/ToastContext.js +6 -0
  76. package/lib/core/contexts/Toast/ToastProvider.d.ts +3 -0
  77. package/lib/core/contexts/Toast/ToastProvider.js +156 -0
  78. package/lib/core/contexts/index.d.ts +2 -0
  79. package/lib/core/contexts/index.js +2 -0
  80. package/lib/core/hooks/catalog/use-catalog-entity-link.d.ts +8 -0
  81. package/lib/core/hooks/catalog/use-catalog-entity-link.js +42 -0
  82. package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +2 -1
  83. package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.js +5 -3
  84. package/lib/core/hooks/index.d.ts +3 -0
  85. package/lib/core/hooks/index.js +3 -0
  86. package/lib/core/hooks/use-toast-logic.d.ts +18 -0
  87. package/lib/core/hooks/use-toast-logic.js +141 -0
  88. package/lib/core/hooks/use-toast.d.ts +11 -0
  89. package/lib/core/hooks/use-toast.js +17 -0
  90. package/lib/core/styles/dark.d.ts +3 -1
  91. package/lib/core/styles/dark.js +37 -33
  92. package/lib/core/styles/global.d.ts +6 -2
  93. package/lib/core/styles/global.js +56 -46
  94. package/lib/core/styles/palette.d.ts +6 -0
  95. package/lib/core/styles/palette.dark.d.ts +3 -0
  96. package/lib/core/styles/palette.dark.js +201 -0
  97. package/lib/core/styles/palette.js +175 -0
  98. package/lib/core/types/catalog.d.ts +23 -7
  99. package/lib/core/types/hooks.d.ts +6 -4
  100. package/lib/core/types/index.d.ts +1 -0
  101. package/lib/core/types/search.d.ts +1 -0
  102. package/lib/core/types/toast.d.ts +23 -0
  103. package/lib/core/types/toast.js +3 -0
  104. package/lib/core/utils/get-auto-dismiss-duration.d.ts +2 -0
  105. package/lib/core/utils/get-auto-dismiss-duration.js +15 -0
  106. package/lib/core/utils/index.d.ts +1 -0
  107. package/lib/core/utils/index.js +1 -0
  108. package/lib/icons/CheckboxIcon/CheckboxIcon.js +6 -4
  109. package/lib/icons/CheckboxIcon/variables.dark.js +2 -1
  110. package/lib/icons/CheckboxIcon/variables.js +3 -3
  111. package/lib/icons/IdeaIcon/IdeaIcon.d.ts +9 -0
  112. package/lib/icons/IdeaIcon/IdeaIcon.js +24 -0
  113. package/lib/icons/NewChatIcon/NewChatIcon.d.ts +11 -0
  114. package/lib/icons/NewChatIcon/NewChatIcon.js +25 -0
  115. package/lib/index.d.ts +5 -1
  116. package/lib/index.js +5 -1
  117. package/lib/markdoc/components/Heading/Heading.js +2 -2
  118. package/lib/markdoc/components/Mermaid/Mermaid.js +0 -2
  119. package/lib/markdoc/components/Tabs/variables.js +3 -3
  120. package/lib/markdoc/components/default.d.ts +0 -1
  121. package/lib/markdoc/components/default.js +0 -1
  122. package/lib/markdoc/tags/admonition.js +1 -1
  123. package/package.json +2 -2
  124. package/src/components/Admonition/Admonition.tsx +3 -1
  125. package/src/components/Admonition/variables.dark.ts +3 -0
  126. package/src/components/Admonition/variables.ts +13 -0
  127. package/src/components/Banner/Banner.tsx +7 -7
  128. package/src/components/Button/variables.dark.ts +2 -2
  129. package/src/components/Button/variables.ts +3 -3
  130. package/src/components/Catalog/CatalogActionsRow.tsx +3 -3
  131. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +4 -6
  132. package/src/components/Catalog/CatalogEntities.tsx +3 -3
  133. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +3 -24
  134. package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +3 -1
  135. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
  136. package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
  137. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +1 -0
  138. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
  139. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +8 -10
  140. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +13 -8
  141. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +1 -0
  142. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +27 -15
  143. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +2 -2
  144. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +9 -9
  145. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +17 -9
  146. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +1 -1
  147. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +4 -8
  148. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +2 -2
  149. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +16 -10
  150. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +4 -3
  151. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +18 -11
  152. package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -3
  153. package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +2 -3
  154. package/src/components/Catalog/CatalogPageDescription.tsx +1 -1
  155. package/src/components/Catalog/CatalogSortButton.tsx +5 -6
  156. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +6 -2
  157. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +2 -2
  158. package/src/components/Catalog/CatalogTableView/CatalogLastUpdateCell.tsx +54 -0
  159. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +5 -2
  160. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -3
  161. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +17 -7
  162. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +3 -2
  163. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -2
  164. package/src/components/Catalog/CatalogTags.tsx +115 -0
  165. package/src/components/Catalog/variables.ts +22 -14
  166. package/src/components/Filter/variables.ts +1 -1
  167. package/src/components/Link/Link.tsx +1 -1
  168. package/src/components/Menu/MenuItem.tsx +5 -1
  169. package/src/components/Menu/variables.dark.ts +2 -0
  170. package/src/components/Menu/variables.ts +4 -3
  171. package/src/components/Search/SearchDialog.tsx +299 -293
  172. package/src/components/SvgViewer/variables.dark.ts +1 -1
  173. package/src/components/Switch/variables.dark.ts +2 -2
  174. package/src/components/Switch/variables.ts +1 -1
  175. package/src/components/TableOfContent/TableOfContent.tsx +1 -0
  176. package/src/components/TableOfContent/variables.ts +3 -2
  177. package/src/components/Toast/Toast.tsx +289 -0
  178. package/src/components/Toast/variables.ts +61 -0
  179. package/src/components/Tooltip/JsTooltip.tsx +1 -1
  180. package/src/core/constants/catalog.ts +1 -1
  181. package/src/core/constants/toast.ts +1 -0
  182. package/src/core/contexts/Toast/ToastContext.tsx +5 -0
  183. package/src/core/contexts/Toast/ToastProvider.tsx +206 -0
  184. package/src/core/contexts/index.ts +2 -0
  185. package/src/core/hooks/catalog/use-catalog-entity-link.ts +46 -0
  186. package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +10 -2
  187. package/src/core/hooks/index.ts +3 -0
  188. package/src/core/hooks/use-toast-logic.ts +203 -0
  189. package/src/core/hooks/use-toast.ts +47 -0
  190. package/src/core/styles/dark.ts +9 -4
  191. package/src/core/styles/global.ts +30 -20
  192. package/src/core/styles/palette.dark.ts +199 -0
  193. package/src/core/styles/palette.ts +173 -0
  194. package/src/core/types/catalog.ts +24 -8
  195. package/src/core/types/hooks.ts +5 -10
  196. package/src/core/types/index.ts +1 -0
  197. package/src/core/types/search.ts +1 -0
  198. package/src/core/types/toast.ts +28 -0
  199. package/src/core/utils/get-auto-dismiss-duration.ts +20 -0
  200. package/src/core/utils/index.ts +1 -0
  201. package/src/icons/CheckboxIcon/CheckboxIcon.tsx +26 -17
  202. package/src/icons/CheckboxIcon/variables.dark.ts +2 -1
  203. package/src/icons/CheckboxIcon/variables.ts +3 -3
  204. package/src/icons/IdeaIcon/IdeaIcon.tsx +32 -0
  205. package/src/icons/NewChatIcon/NewChatIcon.tsx +39 -0
  206. package/src/index.ts +5 -1
  207. package/src/markdoc/components/Heading/Heading.tsx +2 -1
  208. package/src/markdoc/components/Mermaid/Mermaid.tsx +0 -2
  209. package/src/markdoc/components/Tabs/variables.ts +3 -3
  210. package/src/markdoc/components/default.ts +0 -1
  211. package/src/markdoc/tags/admonition.ts +1 -1
  212. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +0 -10
  213. package/lib/components/Catalog/CatalogTagsWithTooltip.js +0 -57
  214. package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.d.ts +0 -7
  215. package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.js +0 -95
  216. package/lib/markdoc/components/ExcalidrawDiagram/variables.d.ts +0 -1
  217. package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.d.ts +0 -1
  218. package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.js +0 -8
  219. package/lib/markdoc/components/ExcalidrawDiagram/variables.js +0 -15
  220. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +0 -101
  221. package/src/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.tsx +0 -85
  222. package/src/markdoc/components/ExcalidrawDiagram/variables.dark.ts +0 -5
  223. package/src/markdoc/components/ExcalidrawDiagram/variables.ts +0 -12
@@ -3,11 +3,7 @@ import styled from 'styled-components';
3
3
 
4
4
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
5
5
  import type { ListType } from '@redocly/theme/core/types';
6
- import type {
7
- BffCatalogEntity,
8
- BffCatalogRelatedEntity,
9
- SortOption,
10
- } from '@redocly/theme/core/types';
6
+ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
11
7
 
12
8
  import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
13
9
  import { CatalogActionsRow } from '@redocly/theme/components/Catalog/CatalogActionsRow';
@@ -28,8 +24,8 @@ export type CatalogEntityRelationsTableProps = {
28
24
  setSearchQuery: (query: string) => void;
29
25
  heading?: string;
30
26
  columns: CatalogColumn<BffCatalogRelatedEntity>[];
31
- sortOption: SortOption | null;
32
- setSortOption: (sortOption: SortOption | null) => void;
27
+ sortOption: string | null;
28
+ setSortOption: (sortOption: string | null) => void;
33
29
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
34
30
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
35
31
  shouldShowLoadMore: boolean;
@@ -112,7 +108,7 @@ const CatalogEntityRelationsTableWrapper = styled.div`
112
108
  `;
113
109
 
114
110
  const Heading = styled.h2`
115
- margin: var(--spacing-base) 0;
111
+ margin: 0 0 var(--spacing-base) 0;
116
112
  font-size: var(--font-size-md);
117
113
  color: var(--catalog-metadata-heading-color);
118
114
  `;
@@ -3,7 +3,7 @@ import styled from 'styled-components';
3
3
 
4
4
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
5
5
  import type { ListType } from '@redocly/theme/core/types';
6
- import type { BffCatalogRelatedEntity, SortOption } from '@redocly/theme/core/types';
6
+ import type { BffCatalogRelatedEntity } from '@redocly/theme/core/types';
7
7
 
8
8
  import { ArrowDownIcon } from '@redocly/theme/icons/ArrowDownIcon/ArrowDownIcon';
9
9
  import { LoadMore } from '@redocly/theme/components/LoadMore/LoadMore';
@@ -24,7 +24,7 @@ export type CatalogEntityRelationsTableContentProps = {
24
24
  };
25
25
  searchQuery: string;
26
26
  columns: CatalogColumn<BffCatalogRelatedEntity>[];
27
- sortOption: SortOption | null;
27
+ sortOption: string | null;
28
28
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
29
29
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
30
30
  shouldShowLoadMore: boolean;
@@ -2,11 +2,7 @@ import React, { JSX, ReactNode } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
5
- import type {
6
- BffCatalogEntity,
7
- BffCatalogRelatedEntity,
8
- SortOption,
9
- } from '@redocly/theme/core/types';
5
+ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
10
6
 
11
7
  import { Tabs, TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
12
8
  import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon';
@@ -16,6 +12,7 @@ import { Tag } from '@redocly/theme/components/Tag/Tag';
16
12
  import { CatalogEntityRelationsTable } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
17
13
  import { CatalogUserEntityCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogUserEntityCell';
18
14
  import { CatalogEntityDefaultRelations } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations';
15
+ import { CatalogLastUpdateCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogLastUpdateCell';
19
16
 
20
17
  const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
21
18
  {
@@ -24,12 +21,12 @@ const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
24
21
  render: (entity) => (
25
22
  <CatalogUserEntityCell name={entity.title} email={entity.metadata?.email as string} />
26
23
  ),
27
- width: '2fr',
24
+ width: '3fr',
28
25
  sortable: true,
29
26
  sortKey: 'title',
30
27
  },
31
28
  {
32
- key: 'metadata',
29
+ key: 'metadata.role',
33
30
  title: 'Role',
34
31
  render: (entity) => (entity.metadata?.role ? <Tag>{entity.metadata?.role}</Tag> : null),
35
32
  width: '2fr',
@@ -38,7 +35,16 @@ const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
38
35
  key: 'description',
39
36
  title: 'Description',
40
37
  render: (entity) => <EntityDescription>{entity.summary}</EntityDescription>,
41
- width: '3fr',
38
+ width: '2fr',
39
+ },
40
+ {
41
+ key: 'lastUpdate',
42
+ title: 'Last update',
43
+ render: (entity) => <CatalogLastUpdateCell lastModified={entity.updatedAt} />,
44
+ width: '1fr',
45
+ minWidth: '112px',
46
+ sortable: true,
47
+ sortKey: 'updated_at',
42
48
  },
43
49
  ];
44
50
 
@@ -55,8 +61,8 @@ export type CatalogEntityTeamRelationsProps = {
55
61
  searchQuery: string;
56
62
  setSearchQuery: (query: string) => void;
57
63
  setFilter: (filter: string) => void;
58
- sortOption: SortOption | null;
59
- setSortOption: (sortOption: SortOption | null) => void;
64
+ sortOption: string | null;
65
+ setSortOption: (sortOption: string | null) => void;
60
66
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
61
67
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
62
68
  shouldShowLoadMore: boolean;
@@ -40,7 +40,7 @@ export function CatalogEntitySchema({
40
40
  });
41
41
 
42
42
  return (
43
- <MetadataWrapper data-component-name="Catalog/CatalogEntity/CatalogEntityMetadata">
43
+ <MetadataWrapper data-component-name="Catalog/CatalogEntity/CatalogEntitySchema">
44
44
  <HeaderWrapper>
45
45
  <Heading>{translate('catalog.entity.schema.title')}</Heading>
46
46
  {!isGraphql && (
@@ -89,8 +89,7 @@ const MetadataWrapper = styled.div`
89
89
  flex-direction: column;
90
90
  border-radius: var(--border-radius);
91
91
  background-color: var(--catalog-metadata-bg-color);
92
- margin-top: var(--spacing-base);
93
- margin-bottom: var(--spacing-xs);
92
+ margin-bottom: var(--spacing-lg);
94
93
  `;
95
94
 
96
95
  const SchemaContentWrapper = styled.div`
@@ -110,6 +109,8 @@ const HeaderWrapper = styled.div`
110
109
 
111
110
  const Heading = styled.h2`
112
111
  font-size: var(--catalog-metadata-heading-size);
112
+ line-height: var(--line-height-lg);
113
+ margin: 0;
113
114
  `;
114
115
 
115
116
  const SplitViewWrapper = styled.div`
@@ -6,33 +6,40 @@ import { PREDEFINED_ENTITY_TYPES } from '@redocly/theme/core';
6
6
 
7
7
  export type CatalogEntityTypeIconProps = {
8
8
  entityType: string;
9
- defaultColor?: boolean;
9
+ defaultColors?: boolean;
10
+ size?: 'large' | 'medium';
10
11
  };
11
12
 
12
13
  export function CatalogEntityTypeIcon({
13
14
  entityType,
14
- defaultColor = false,
15
+ defaultColors = false,
16
+ size = 'medium',
15
17
  }: CatalogEntityTypeIconProps) {
16
18
  return (
17
19
  <IconContainer
18
20
  data-component-name="Catalog/CatalogEntityTypeIcon"
19
21
  entityType={entityType}
20
- defaultColor={defaultColor}
22
+ defaultColors={defaultColors}
23
+ size={size}
21
24
  >
22
- <CatalogEntityIcon entityType={entityType} defaultColor={defaultColor} />
25
+ <CatalogEntityIcon entityType={entityType} defaultColor={false} />
23
26
  </IconContainer>
24
27
  );
25
28
  }
26
29
 
27
- const IconContainer = styled.div<{ entityType: string; defaultColor: boolean }>`
30
+ const IconContainer = styled.div<{
31
+ entityType: string;
32
+ defaultColors: boolean;
33
+ size: 'large' | 'medium';
34
+ }>`
28
35
  display: flex;
29
36
  align-items: center;
30
37
  justify-content: center;
31
- width: var(--catalog-table-icon-width);
32
- height: var(--catalog-table-icon-height);
38
+ width: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-width-large)' : 'var(--catalog-table-icon-width-medium)')};
39
+ height: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-height-large)' : 'var(--catalog-table-icon-height-medium)')};
33
40
  border-radius: var(--catalog-table-icon-border-radius);
34
- background-color: ${({ defaultColor, entityType }) => {
35
- if (defaultColor) {
41
+ background-color: ${({ defaultColors, entityType }) => {
42
+ if (defaultColors) {
36
43
  return 'var(--catalog-entity-bg-color)';
37
44
  }
38
45
  if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
@@ -42,8 +49,8 @@ const IconContainer = styled.div<{ entityType: string; defaultColor: boolean }>`
42
49
  }};
43
50
  flex-shrink: 0;
44
51
  border: 1px solid
45
- ${({ defaultColor, entityType }) => {
46
- if (defaultColor) {
52
+ ${({ defaultColors, entityType }) => {
53
+ if (defaultColors) {
47
54
  return 'var(--catalog-entity-border-color)';
48
55
  }
49
56
  if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
@@ -3,14 +3,14 @@ import styled from 'styled-components';
3
3
 
4
4
  import { CatalogMobileTopBarFiltersButton } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton';
5
5
  import { CatalogMobileTopBarControls } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls';
6
- import { breakpoints, SortOption } from '@redocly/theme/core';
6
+ import { breakpoints } from '@redocly/theme/core';
7
7
  import { CatalogViewMode } from '@redocly/theme/core';
8
8
 
9
9
  type CatalogMobileTopBarProps = {
10
10
  setMobileFiltersPanelOpen: (open: boolean) => void;
11
11
  activeFiltersCount: number;
12
- setSortOption: (sortOption: SortOption | null) => void;
13
- sortOption: SortOption | null;
12
+ setSortOption: (sortOption: string | null) => void;
13
+ sortOption: string | null;
14
14
  viewMode: CatalogViewMode;
15
15
  setViewMode: (viewMode: CatalogViewMode) => void;
16
16
  };
@@ -3,12 +3,11 @@ import styled from 'styled-components';
3
3
 
4
4
  import { CatalogSortButton } from '@redocly/theme/components/Catalog/CatalogSortButton';
5
5
  import { CatalogViewModeToggle } from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
6
- import { SortOption } from '@redocly/theme/core';
7
6
  import { CatalogViewMode } from '@redocly/theme/core';
8
7
 
9
8
  type CatalogMobileTopBarControlsProps = {
10
- setSortOption: (sortOption: SortOption | null) => void;
11
- sortOption: SortOption | null;
9
+ setSortOption: (sortOption: string | null) => void;
10
+ sortOption: string | null;
12
11
  viewMode: CatalogViewMode;
13
12
  setViewMode: (viewMode: CatalogViewMode) => void;
14
13
  };
@@ -58,7 +58,7 @@ const CatalogDescription = styled.p`
58
58
  color: var(--catalog-description-text-color);
59
59
  font-weight: var(--catalog-description-font-weight);
60
60
  font-size: var(--catalog-description-font-size);
61
- margin: var(--catalog-description-margin);
61
+ margin: 0;
62
62
  line-height: var(--catalog-description-line-height);
63
63
  display: -webkit-box;
64
64
  -webkit-line-clamp: 3;
@@ -1,7 +1,6 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
- import { SortOption } from '@redocly/theme/core/types';
5
4
  import { AscSortIcon } from '@redocly/theme/icons/AscSortIcon/AscSortIcon';
6
5
  import { DescSortIcon } from '@redocly/theme/icons/DescSortIcon/DescSortIcon';
7
6
  import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
@@ -10,16 +9,16 @@ import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMen
10
9
  import { useThemeHooks } from '@redocly/theme/core/hooks';
11
10
 
12
11
  export type CatalogSortButtonProps = {
13
- onSortChange: (sortOption: SortOption | null) => void;
14
- currentSort?: SortOption | null;
12
+ onSortChange: (sortOption: string | null) => void;
13
+ currentSort?: string | null;
15
14
  };
16
15
 
17
16
  export function CatalogSortButton({
18
17
  onSortChange,
19
18
  currentSort,
20
19
  }: {
21
- onSortChange: (sortOption: SortOption | null) => void;
22
- currentSort?: SortOption | null;
20
+ onSortChange: (sortOption: string | null) => void;
21
+ currentSort?: string | null;
23
22
  }) {
24
23
  const { useTranslate } = useThemeHooks();
25
24
  const { translate } = useTranslate();
@@ -27,7 +26,7 @@ export function CatalogSortButton({
27
26
  const toggleSort = useCallback(
28
27
  (field: string): void => {
29
28
  const newSort = currentSort === `-${field}` ? field : `-${field}`;
30
- onSortChange(newSort as SortOption);
29
+ onSortChange(newSort);
31
30
  },
32
31
  [currentSort, onSortChange],
33
32
  );
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
 
3
- import { CatalogTagsWithTooltip } from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
3
+ import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
4
+ import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
4
5
 
5
6
  export type CatalogDomainsCellProps = {
6
7
  domains: string[];
@@ -9,15 +10,18 @@ export type CatalogDomainsCellProps = {
9
10
  export function CatalogDomainsCell({ domains }: CatalogDomainsCellProps) {
10
11
  return (
11
12
  <div data-component-name="Catalog/CatalogTableView/CatalogDomainsCell">
12
- <CatalogTagsWithTooltip
13
+ <CatalogTags
13
14
  data-testid="catalog-domains-cell"
14
15
  items={domains}
15
16
  showPlaceholder={false}
16
17
  tagProps={{
18
+ variant: 'outline',
19
+ icon: <GraphIcon />,
17
20
  style: {
18
21
  fontSize: 'var(--font-size-base)',
19
22
  backgroundColor: 'transparent',
20
23
  borderRadius: 'var(--border-radius-xl)',
24
+ margin: 0,
21
25
  },
22
26
  textTransform: 'none',
23
27
  }}
@@ -13,7 +13,7 @@ export type CatalogEntityCellProps<T extends Entity> = {
13
13
  export function CatalogEntityCell<T extends Entity>({ entity }: CatalogEntityCellProps<T>) {
14
14
  return (
15
15
  <EntityTitleCellWrapper data-component-name="Catalog/CatalogTableView/CatalogEntityCell">
16
- <CatalogEntityTypeIcon entityType={entity.type} />
16
+ <CatalogEntityTypeIcon entityType={entity.type} size="large" defaultColors={true} />
17
17
  <EntityTitleContent>
18
18
  <EntityTitle data-component-name="Catalog/CatalogTableView/CatalogEntityTitle">
19
19
  <CatalogHighlight>{entity.title}</CatalogHighlight>
@@ -40,7 +40,7 @@ const EntityTitleContent = styled.div`
40
40
  flex-direction: column;
41
41
  max-width: calc(
42
42
  100% - var(--catalog-table-entity-title-content-offset)
43
- ); /* Account for icon width (30px) + gap (12px) */
43
+ ); /* Account for icon width (32px) + gap (8px) */
44
44
  overflow: hidden;
45
45
  `;
46
46
 
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
5
+
6
+ export type CatalogLastUpdateCellProps = {
7
+ lastModified: string;
8
+ };
9
+
10
+ function formatLastModified(isoString: string): string {
11
+ const date = new Date(isoString);
12
+ if (Number.isNaN(date.getTime())) {
13
+ return isoString;
14
+ }
15
+ return date.toLocaleDateString('en-US', {
16
+ year: 'numeric',
17
+ month: 'short',
18
+ day: 'numeric',
19
+ timeZone: 'UTC',
20
+ });
21
+ }
22
+
23
+ function formatLastModifiedTooltip(isoString: string): string {
24
+ const date = new Date(isoString);
25
+ if (Number.isNaN(date.getTime())) {
26
+ return isoString;
27
+ }
28
+ return date.toLocaleString('en-US', {
29
+ year: 'numeric',
30
+ month: 'short',
31
+ day: 'numeric',
32
+ hour: '2-digit',
33
+ minute: '2-digit',
34
+ second: '2-digit',
35
+ hour12: false,
36
+ timeZone: 'UTC',
37
+ });
38
+ }
39
+
40
+ export function CatalogLastUpdateCell({
41
+ lastModified,
42
+ }: CatalogLastUpdateCellProps): React.ReactElement {
43
+ return (
44
+ <CatalogLastUpdateCellWrapper data-component-name="Catalog/CatalogTableView/CatalogLastUpdateCell">
45
+ <Tooltip tip={formatLastModifiedTooltip(lastModified)} placement="bottom">
46
+ {formatLastModified(lastModified)}
47
+ </Tooltip>
48
+ </CatalogLastUpdateCellWrapper>
49
+ );
50
+ }
51
+
52
+ const CatalogLastUpdateCellWrapper = styled.div`
53
+ color: var(--text-color-helper);
54
+ `;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { CatalogTagsWithTooltip } from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
3
+ import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
4
4
 
5
5
  export type CatalogOwnersCellProps = {
6
6
  owners: string[];
@@ -9,18 +9,21 @@ export type CatalogOwnersCellProps = {
9
9
  export function CatalogOwnersCell({ owners }: CatalogOwnersCellProps) {
10
10
  return (
11
11
  <div data-component-name="Catalog/CatalogTableView/CatalogOwnersCell">
12
- <CatalogTagsWithTooltip
12
+ <CatalogTags
13
13
  data-testid="catalog-owners-cell"
14
14
  items={owners}
15
15
  showPlaceholder={false}
16
16
  tagProps={{
17
+ variant: 'outline',
17
18
  style: {
18
19
  fontSize: 'var(--font-size-base)',
19
20
  backgroundColor: 'transparent',
20
21
  borderRadius: 'var(--border-radius-xl)',
22
+ margin: 0,
21
23
  },
22
24
  textTransform: 'none',
23
25
  }}
26
+ showAvatars={true}
24
27
  />
25
28
  </div>
26
29
  );
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
 
4
- import { SortOption } from '@redocly/theme/core/types';
5
4
  import { CaretDownIcon } from '@redocly/theme/icons/CaretDownIcon/CaretDownIcon';
6
5
  import { CaretUpIcon } from '@redocly/theme/icons/CaretUpIcon/CaretUpIcon';
7
6
  import { useCatalogTableHeaderCellActions } from '@redocly/theme/core/hooks';
@@ -12,18 +11,20 @@ import {
12
11
 
13
12
  export type CatalogTableHeaderCellProps<T extends BaseEntity> = {
14
13
  column: CatalogColumn<T>;
15
- currentSortOption?: SortOption | null;
14
+ currentSortOption?: string | null;
16
15
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
17
16
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
18
17
  };
19
18
 
20
19
  export const CatalogTableHeaderCell = <T extends BaseEntity>({
21
20
  column,
21
+ currentSortOption,
22
22
  handleSortClick,
23
23
  isColumnSorted,
24
24
  }: CatalogTableHeaderCellProps<T>) => {
25
25
  const { handleCellClick, sortKey, isUpActive, isDownActive } = useCatalogTableHeaderCellActions({
26
26
  column,
27
+ currentSortOption,
27
28
  handleSortClick,
28
29
  isColumnSorted,
29
30
  });
@@ -88,7 +89,7 @@ const SortIndicator = styled.div`
88
89
  flex-direction: column;
89
90
  align-items: center;
90
91
  justify-content: center;
91
- margin-left: 8px;
92
+ margin-left: 4px;
92
93
  gap: 2px;
93
94
  color: var(--catalog-table-header-sort-indicator-color);
94
95
  `;
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
5
- import type { SortOption, BffCatalogEntity } from '@redocly/theme/core/types';
5
+ import type { BffCatalogEntity } from '@redocly/theme/core/types';
6
6
 
7
7
  import { CatalogOwnersCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogOwnersCell';
8
8
  import { CatalogDomainsCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogDomainsCell';
@@ -12,6 +12,7 @@ import { CatalogTagsCell } from '@redocly/theme/components/Catalog/CatalogTableV
12
12
  import { CatalogTableViewRow } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableViewRow';
13
13
  import { CatalogEntityTypeTag } from '@redocly/theme/components/Catalog/CatalogEntityTypeTag';
14
14
  import { breakpoints } from '@redocly/theme/core';
15
+ import { CatalogLastUpdateCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogLastUpdateCell';
15
16
 
16
17
  export type BaseEntity = {
17
18
  id: string;
@@ -26,7 +27,7 @@ export type CatalogTableViewProps<T extends BaseEntity> = {
26
27
  entitiesCatalogConfig?: EntitiesCatalogConfig;
27
28
  catalogConfig: CatalogEntityConfig;
28
29
  columns?: CatalogColumn<T>[];
29
- currentSortOption?: SortOption | null;
30
+ currentSortOption?: string | null;
30
31
  onRowClick?: (entity: T) => void;
31
32
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
32
33
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
@@ -50,7 +51,7 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
50
51
  title: 'Entity',
51
52
  render: (entity) => <CatalogEntityCell entity={entity} />,
52
53
  width: '3fr',
53
- minWidth: '250px',
54
+ minWidth: '164px',
54
55
  sortable: true,
55
56
  sortKey: 'title',
56
57
  },
@@ -59,7 +60,7 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
59
60
  title: 'Type',
60
61
  render: (entity) => <CatalogEntityTypeTag entityType={entity.type} />,
61
62
  width: '2fr',
62
- minWidth: '120px',
63
+ minWidth: '162px',
63
64
  sortable: true,
64
65
  sortKey: 'type',
65
66
  },
@@ -70,7 +71,7 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
70
71
  <CatalogDomainsCell domains={entity.domains?.map((domain) => domain.title) || []} />
71
72
  ),
72
73
  width: '2fr',
73
- minWidth: '150px',
74
+ minWidth: '162px',
74
75
  },
75
76
  {
76
77
  key: 'owners',
@@ -79,14 +80,23 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
79
80
  <CatalogOwnersCell owners={entity.owners?.map((owner) => owner.title) || []} />
80
81
  ),
81
82
  width: '2fr',
82
- minWidth: '150px',
83
+ minWidth: '162px',
83
84
  },
84
85
  {
85
86
  key: 'tags',
86
87
  title: 'Tags',
87
88
  render: (entity) => <CatalogTagsCell entity={entity} />,
88
89
  width: '2fr',
89
- minWidth: '120px',
90
+ minWidth: '160px',
91
+ },
92
+ {
93
+ key: 'lastUpdate',
94
+ title: 'Last update',
95
+ render: (entity) => <CatalogLastUpdateCell lastModified={entity.updatedAt} />,
96
+ width: '1fr',
97
+ minWidth: '112px',
98
+ sortable: true,
99
+ sortKey: 'updated_at',
90
100
  },
91
101
  ];
92
102
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
 
3
3
  import { BffCatalogEntity } from '@redocly/theme/core/types';
4
- import { CatalogTagsWithTooltip } from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
4
+ import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
5
5
 
6
6
  export type CatalogTagsCellProps = {
7
7
  entity: BffCatalogEntity;
@@ -10,7 +10,7 @@ export type CatalogTagsCellProps = {
10
10
  export function CatalogTagsCell({ entity }: CatalogTagsCellProps) {
11
11
  return (
12
12
  <div data-component-name="Catalog/CatalogTableView/CatalogTagsCell">
13
- <CatalogTagsWithTooltip
13
+ <CatalogTags
14
14
  data-testid="catalog-tags-cell"
15
15
  items={entity.tags || []}
16
16
  showPlaceholder={false}
@@ -18,6 +18,7 @@ export function CatalogTagsCell({ entity }: CatalogTagsCellProps) {
18
18
  style: {
19
19
  fontSize: 'var(--font-size-base)',
20
20
  borderRadius: 'var(--border-radius)',
21
+ margin: 0,
21
22
  },
22
23
  borderless: true,
23
24
  color: 'grey',
@@ -48,8 +48,8 @@ const EntityTitle = styled.div`
48
48
  `;
49
49
 
50
50
  export const Email = styled.div`
51
- font-size: var(--catalog-table-entity-summary-font-size);
52
- line-height: var(--catalog-table-entity-summary-line-height);
51
+ font-size: var(--catalog-user-entity-cell-email-font-size);
52
+ line-height: var(--catalog-user-entity-cell-email-line-height);
53
53
  color: var(--color-blue-6);
54
54
  white-space: nowrap;
55
55
  overflow: hidden;