@redocly/theme 0.69.0-next.9 → 0.70.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Buttons/DownloadButton.js +13 -3
- package/lib/components/Catalog/Catalog.d.ts +2 -2
- package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -2
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.js +1 -0
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +45 -23
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +67 -33
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.js +15 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +48 -57
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +2 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -2
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +2 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +1 -2
- package/lib/components/Catalog/CatalogHighlight.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogSelector.d.ts +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTags.d.ts +2 -2
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
- package/lib/components/Catalog/variables.js +24 -33
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.d.ts +1 -1
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -2
- package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.d.ts +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.js +7 -1
- package/lib/components/Filter/FilterOptionLabel.d.ts +1 -1
- package/lib/components/LoadMore/LoadMore.d.ts +1 -1
- package/lib/components/MCP/McpConnectionTabs.js +22 -12
- package/lib/components/Markdown/Markdown.js +1 -3
- package/lib/components/Markdown/styles/base-table.js +8 -0
- package/lib/components/Markdown/variables.js +1 -2
- package/lib/components/PageActions/PageActions.d.ts +1 -1
- package/lib/components/Search/SearchAiDialog.d.ts +1 -1
- package/lib/components/Search/SearchAiDialog.js +3 -0
- package/lib/components/Search/SearchAiMessage.d.ts +1 -2
- package/lib/components/Search/SearchAiMessage.js +8 -10
- package/lib/components/Search/SearchAiResponse.d.ts +1 -1
- package/lib/components/Search/SearchGroups.d.ts +1 -1
- package/lib/core/constants/markdown.d.ts +2 -0
- package/lib/core/constants/markdown.js +3 -1
- package/lib/core/contexts/AccordionGroupContext.d.ts +1 -0
- package/lib/core/contexts/AccordionGroupContext.js +6 -0
- package/lib/core/contexts/PageActionsContext.d.ts +5 -0
- package/lib/core/contexts/PageActionsContext.js +10 -0
- package/lib/core/contexts/index.d.ts +2 -0
- package/lib/core/contexts/index.js +2 -0
- package/lib/core/hooks/catalog/use-catalog-entity-schema.d.ts +1 -1
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +1 -1
- package/lib/core/hooks/catalog/use-graph.d.ts +3 -3
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +1 -0
- package/lib/core/hooks/use-active-heading.js +4 -0
- package/lib/core/hooks/use-active-section-id.js +6 -0
- package/lib/core/hooks/use-connect-mcp-button.js +7 -2
- package/lib/core/hooks/use-element-size.d.ts +1 -1
- package/lib/core/hooks/use-product-picker.js +1 -1
- package/lib/core/hooks/use-tabs.js +4 -2
- package/lib/core/hooks/use-telemetry-fallback.d.ts +2 -0
- package/lib/core/hooks/use-telemetry-fallback.js +2 -0
- package/lib/core/styles/global.js +1 -0
- package/lib/core/types/catalog.d.ts +2 -3
- package/lib/core/types/common.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +4 -7
- package/lib/core/utils/class-names.d.ts +1 -0
- package/lib/core/utils/class-names.js +7 -0
- package/lib/core/utils/mcp.d.ts +0 -1
- package/lib/core/utils/mcp.js +0 -13
- package/lib/core/utils/menu.d.ts +2 -2
- package/lib/core/utils/urls.js +1 -3
- package/lib/ext/use-configure-replay.d.ts +1 -1
- package/lib/layouts/OIDCForbidden.js +1 -1
- package/lib/markdoc/components/Accordion/Accordion.js +6 -6
- package/lib/markdoc/components/Accordion/AccordionGroup.d.ts +2 -1
- package/lib/markdoc/components/Accordion/AccordionGroup.js +39 -3
- package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.d.ts +1 -2
- package/lib/markdoc/components/Diagram/Diagram.d.ts +1 -1
- package/lib/markdoc/components/Diagram/Diagram.js +1 -2
- package/lib/markdoc/components/Heading/Heading.js +5 -2
- package/lib/markdoc/components/Tabs/Tab.d.ts +1 -1
- package/lib/markdoc/components/Tabs/TabList.d.ts +1 -1
- package/lib/markdoc/tags/accordion-group.js +3 -0
- package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
- package/lib/markdoc/tags/markdoc-example.js +34 -22
- package/package.json +2 -2
- package/src/components/Buttons/DownloadButton.tsx +16 -8
- package/src/components/Catalog/Catalog.tsx +4 -4
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -2
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +3 -2
- package/src/components/Catalog/CatalogEntities.tsx +4 -2
- package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx +4 -5
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +56 -35
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +80 -42
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.tsx +18 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +61 -75
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -2
- package/src/components/Catalog/CatalogEntityIcon.tsx +3 -2
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +3 -2
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +2 -4
- package/src/components/Catalog/CatalogHighlight.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -1
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +2 -1
- package/src/components/Catalog/CatalogSelector.tsx +3 -2
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +1 -1
- package/src/components/Catalog/CatalogTags.tsx +4 -2
- package/src/components/Catalog/CatalogViewModeToggle.tsx +1 -1
- package/src/components/Catalog/variables.ts +24 -33
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +2 -5
- package/src/components/CatalogClassic/CatalogClassicVirtualizedGroups.tsx +1 -1
- package/src/components/CodeBlock/CodeBlockControls.tsx +2 -1
- package/src/components/Dropdown/Dropdown.tsx +5 -1
- package/src/components/Filter/FilterOptionLabel.tsx +1 -1
- package/src/components/LoadMore/LoadMore.tsx +2 -1
- package/src/components/MCP/McpConnectionTabs.tsx +35 -14
- package/src/components/Markdown/Markdown.tsx +1 -3
- package/src/components/Markdown/styles/base-table.ts +8 -0
- package/src/components/Markdown/variables.ts +1 -2
- package/src/components/PageActions/PageActions.tsx +2 -1
- package/src/components/Search/SearchAiDialog.tsx +4 -1
- package/src/components/Search/SearchAiMessage.tsx +3 -6
- package/src/components/Search/SearchAiResponse.tsx +2 -4
- package/src/components/Search/SearchGroups.tsx +1 -5
- package/src/core/constants/markdown.ts +4 -0
- package/src/core/contexts/AccordionGroupContext.tsx +3 -0
- package/src/core/contexts/PageActionsContext.tsx +7 -0
- package/src/core/contexts/index.ts +2 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +2 -0
- package/src/core/hooks/catalog/use-catalog-entity-schema.ts +1 -1
- package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +1 -1
- package/src/core/hooks/catalog/use-graph.ts +4 -4
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +1 -0
- package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +1 -1
- package/src/core/hooks/use-active-heading.ts +4 -0
- package/src/core/hooks/use-active-section-id.ts +8 -0
- package/src/core/hooks/use-connect-mcp-button.ts +8 -2
- package/src/core/hooks/use-element-size.ts +2 -1
- package/src/core/hooks/use-product-picker.ts +2 -2
- package/src/core/hooks/use-tabs.ts +4 -2
- package/src/core/hooks/use-telemetry-fallback.ts +2 -0
- package/src/core/styles/global.ts +1 -0
- package/src/core/types/catalog.ts +7 -3
- package/src/core/types/common.ts +1 -1
- package/src/core/types/hooks.ts +15 -13
- package/src/core/utils/class-names.ts +8 -0
- package/src/core/utils/mcp.ts +0 -17
- package/src/core/utils/menu.ts +2 -2
- package/src/core/utils/urls.ts +1 -3
- package/src/ext/use-configure-replay.ts +3 -3
- package/src/layouts/OIDCForbidden.tsx +1 -1
- package/src/markdoc/components/Accordion/Accordion.tsx +8 -2
- package/src/markdoc/components/Accordion/AccordionGroup.tsx +9 -2
- package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +2 -4
- package/src/markdoc/components/Diagram/Diagram.tsx +2 -5
- package/src/markdoc/components/Heading/Heading.tsx +7 -4
- package/src/markdoc/components/Tabs/Tab.tsx +1 -1
- package/src/markdoc/components/Tabs/TabList.tsx +1 -1
- package/src/markdoc/tags/accordion-group.ts +3 -0
- package/src/markdoc/tags/code-walkthrough.ts +2 -1
- package/src/markdoc/tags/markdoc-example.ts +45 -28
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
2
3
|
|
|
3
4
|
import type { CatalogEntityConfig } from '@redocly/config';
|
|
4
5
|
|
|
5
|
-
import { BffCatalogEntity, BffCatalogEntityList } from '@redocly/theme/core/types';
|
|
6
|
+
import type { BffCatalogEntity, BffCatalogEntityList } from '@redocly/theme/core/types';
|
|
6
7
|
import { useThemeHooks, useCatalogEntities } from '@redocly/theme/core/hooks';
|
|
7
8
|
import { getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
8
9
|
import { ArrowDownIcon } from '@redocly/theme/icons/ArrowDownIcon/ArrowDownIcon';
|
|
@@ -88,6 +89,7 @@ export function CatalogEntities(props: CatalogEntitiesProps): JSX.Element {
|
|
|
88
89
|
(query.isPlaceholderData && entities && entities.length >= LOAD_MORE_THRESHOLD);
|
|
89
90
|
|
|
90
91
|
useEffect(() => {
|
|
92
|
+
// oxlint-disable-next-line react-you-might-not-need-an-effect/no-pass-data-to-parent -- the entities query lives in this ejectable component; the fetched total is mirrored up so the portal page header can show the count
|
|
91
93
|
setEntitiesCounter(total || 0);
|
|
92
94
|
}, [total, setEntitiesCounter]);
|
|
93
95
|
|
|
@@ -3,8 +3,12 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { Route, Routes, useSearchParams } from 'react-router';
|
|
4
4
|
|
|
5
5
|
import type { CatalogEntityConfig } from '@redocly/config';
|
|
6
|
-
import type {
|
|
7
|
-
|
|
6
|
+
import type {
|
|
7
|
+
BffCatalogEntity,
|
|
8
|
+
BffCatalogRelatedEntity,
|
|
9
|
+
CatalogEntityPageProps,
|
|
10
|
+
CatalogEntityProps,
|
|
11
|
+
} from '@redocly/theme/core/types';
|
|
8
12
|
|
|
9
13
|
import { breakpoints } from '@redocly/theme/core/utils';
|
|
10
14
|
import { CatalogPageDescription } from '@redocly/theme/components/Catalog/CatalogPageDescription';
|
package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React, { JSX, useMemo } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React, { type JSX, useMemo } from 'react';
|
|
2
|
+
import { type ColorMode, Background, Controls, ReactFlow } from '@xyflow/react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
6
|
-
import { useColorSwitcher, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
7
|
-
import { useGraph } from '@redocly/theme/core/hooks';
|
|
5
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
6
|
+
import { useColorSwitcher, useThemeHooks, useGraph } from '@redocly/theme/core/hooks';
|
|
8
7
|
import { CatalogEntityRelationsNode } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode';
|
|
9
8
|
import { CatalogEntityRelationsEdge } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsEdge';
|
|
10
9
|
import { xyflow } from '@redocly/theme/core/styles';
|
package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx
CHANGED
|
@@ -2,49 +2,70 @@ import React, { useCallback, useEffect, useState } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { RecentlyViewedIcon } from '@redocly/theme/icons/RecentlyViewedIcon/RecentlyViewedIcon';
|
|
5
|
-
import {
|
|
6
|
-
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
5
|
+
import { RadioCheckButtonIcon } from '@redocly/theme/icons/RadioCheckButtonIcon/RadioCheckButtonIcon';
|
|
6
|
+
import { useThemeHooks, useIsTruncated } from '@redocly/theme/core/hooks';
|
|
7
7
|
import { VERSION_NOT_SPECIFIED } from '@redocly/theme/core/constants';
|
|
8
8
|
import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
9
|
-
import { useIsTruncated } from '@redocly/theme/core/hooks';
|
|
10
9
|
|
|
11
10
|
export type CatalogHistoryButtonProps = {
|
|
12
11
|
version: string | null;
|
|
12
|
+
/** Marks `version` as the group's default, shown as a "(latest)" suffix on the pill. */
|
|
13
|
+
isDefaultVersion?: boolean;
|
|
13
14
|
className?: string;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The pill label: the page's version, updated by the overlay's close event
|
|
19
|
+
* (which appends the revision while an old revision is open), with a
|
|
20
|
+
* "(latest)" suffix on the plain default-version label.
|
|
21
|
+
*/
|
|
22
|
+
function useVersionPillLabel(version: string | null, isDefaultVersion?: boolean): string | null {
|
|
23
|
+
const pageLabel = version === VERSION_NOT_SPECIFIED ? null : version;
|
|
24
|
+
const [label, setLabel] = useState(pageLabel);
|
|
25
|
+
// Keep the pill in sync when navigation changes the page version.
|
|
26
|
+
const [lastPageLabel, setLastPageLabel] = useState(pageLabel);
|
|
27
|
+
if (lastPageLabel !== pageLabel) {
|
|
28
|
+
setLastPageLabel(pageLabel);
|
|
29
|
+
setLabel(pageLabel);
|
|
30
|
+
}
|
|
21
31
|
const { useTranslate } = useThemeHooks();
|
|
22
32
|
const { translate } = useTranslate();
|
|
23
|
-
const
|
|
33
|
+
const latestWord = translate('catalog.history.version.latest', 'latest');
|
|
24
34
|
|
|
25
35
|
const handleClose = useCallback(
|
|
26
36
|
(e: CustomEvent): void => {
|
|
27
|
-
|
|
28
|
-
e.detail.version === VERSION_NOT_SPECIFIED
|
|
29
|
-
|
|
30
|
-
: `${e.detail.version || version}, ${e.detail.revision || 'r.1'}`,
|
|
31
|
-
);
|
|
37
|
+
const closedVersion =
|
|
38
|
+
e.detail.version === VERSION_NOT_SPECIFIED ? null : e.detail.version || version;
|
|
39
|
+
setLabel([closedVersion, e.detail.revision].filter(Boolean).join(', ') || null);
|
|
32
40
|
},
|
|
33
41
|
[version],
|
|
34
42
|
);
|
|
35
43
|
|
|
36
44
|
useEffect(() => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
return () => {
|
|
42
|
-
window.removeEventListener('portal:sidebar:close-version-history', (e) =>
|
|
43
|
-
handleClose(e as CustomEvent),
|
|
44
|
-
);
|
|
45
|
-
};
|
|
45
|
+
const onClose = (e: Event) => handleClose(e as CustomEvent);
|
|
46
|
+
window.addEventListener('portal:sidebar:close-version-history', onClose);
|
|
47
|
+
return () => window.removeEventListener('portal:sidebar:close-version-history', onClose);
|
|
46
48
|
}, [handleClose]);
|
|
47
49
|
|
|
50
|
+
// A label with a revision, or a version named "latest", stays as-is.
|
|
51
|
+
return label !== null &&
|
|
52
|
+
label === pageLabel &&
|
|
53
|
+
isDefaultVersion &&
|
|
54
|
+
label.toLowerCase() !== latestWord.toLowerCase()
|
|
55
|
+
? `${label} (${latestWord})`
|
|
56
|
+
: label;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CatalogEntityHistoryButton({
|
|
60
|
+
version,
|
|
61
|
+
isDefaultVersion,
|
|
62
|
+
className,
|
|
63
|
+
}: CatalogHistoryButtonProps): React.ReactElement {
|
|
64
|
+
const { useTranslate } = useThemeHooks();
|
|
65
|
+
const { translate } = useTranslate();
|
|
66
|
+
const displayLabel = useVersionPillLabel(version, isDefaultVersion);
|
|
67
|
+
const [labelRef, isLabelTruncated] = useIsTruncated<HTMLSpanElement>(displayLabel);
|
|
68
|
+
|
|
48
69
|
const handleClick = (): void => {
|
|
49
70
|
window.dispatchEvent(new CustomEvent('portal:sidebar:open-version-history'));
|
|
50
71
|
};
|
|
@@ -54,14 +75,13 @@ export function CatalogEntityHistoryButton({
|
|
|
54
75
|
className={className}
|
|
55
76
|
data-component-name="Catalog/CatalogHistoryButton"
|
|
56
77
|
>
|
|
57
|
-
<Separator />
|
|
58
78
|
<HistoryItem onClick={handleClick}>
|
|
59
79
|
<HistoryIcon />
|
|
60
80
|
<HistoryContent>
|
|
61
|
-
<HistoryText>{translate('catalog.history.button.label', 'Version
|
|
62
|
-
{
|
|
81
|
+
<HistoryText>{translate('catalog.history.button.label', 'Version')}</HistoryText>
|
|
82
|
+
{displayLabel && (
|
|
63
83
|
<Tooltip
|
|
64
|
-
tip={
|
|
84
|
+
tip={displayLabel}
|
|
65
85
|
placement="bottom"
|
|
66
86
|
arrowPosition="left"
|
|
67
87
|
disabled={!isLabelTruncated}
|
|
@@ -69,13 +89,14 @@ export function CatalogEntityHistoryButton({
|
|
|
69
89
|
<VersionPillWrapper>
|
|
70
90
|
<VersionPill>
|
|
71
91
|
<CheckmarkIcon />
|
|
72
|
-
<span ref={labelRef}>{
|
|
92
|
+
<span ref={labelRef}>{displayLabel}</span>
|
|
73
93
|
</VersionPill>
|
|
74
94
|
</VersionPillWrapper>
|
|
75
95
|
</Tooltip>
|
|
76
96
|
)}
|
|
77
97
|
</HistoryContent>
|
|
78
98
|
</HistoryItem>
|
|
99
|
+
<Separator />
|
|
79
100
|
</CatalogHistoryButtonWrapper>
|
|
80
101
|
);
|
|
81
102
|
}
|
|
@@ -88,19 +109,19 @@ const Separator = styled.div`
|
|
|
88
109
|
width: 100%;
|
|
89
110
|
height: 1px;
|
|
90
111
|
background-color: var(--catalog-history-separator-border-color);
|
|
91
|
-
margin
|
|
112
|
+
margin: var(--catalog-history-separator-margin);
|
|
92
113
|
flex-shrink: 0;
|
|
93
114
|
`;
|
|
94
115
|
|
|
95
116
|
const HistoryItem = styled.button`
|
|
96
117
|
all: unset;
|
|
118
|
+
box-sizing: border-box;
|
|
97
119
|
display: flex;
|
|
98
120
|
align-items: center;
|
|
99
121
|
justify-content: space-between;
|
|
100
122
|
gap: var(--catalog-history-item-gap);
|
|
101
123
|
padding: var(--catalog-history-item-padding);
|
|
102
|
-
|
|
103
|
-
width: var(--catalog-history-button-item-width);
|
|
124
|
+
width: 100%;
|
|
104
125
|
border-radius: var(--catalog-history-item-border-radius);
|
|
105
126
|
cursor: pointer;
|
|
106
127
|
transition: background-color 0.2s ease;
|
|
@@ -112,13 +133,11 @@ const HistoryItem = styled.button`
|
|
|
112
133
|
|
|
113
134
|
const HistoryContent = styled.div`
|
|
114
135
|
display: flex;
|
|
115
|
-
flex-wrap: wrap;
|
|
116
136
|
align-items: center;
|
|
117
137
|
justify-content: space-between;
|
|
118
138
|
flex: 1;
|
|
119
139
|
gap: var(--catalog-history-item-gap);
|
|
120
140
|
min-width: 0;
|
|
121
|
-
max-width: var(--catalog-history-content-max-width);
|
|
122
141
|
`;
|
|
123
142
|
|
|
124
143
|
const HistoryText = styled.span`
|
|
@@ -134,19 +153,21 @@ const HistoryText = styled.span`
|
|
|
134
153
|
const VersionPillWrapper = styled.div`
|
|
135
154
|
flex: 0 1 auto;
|
|
136
155
|
min-width: 0;
|
|
137
|
-
max-width: var(--catalog-history-content-max-width);
|
|
138
156
|
`;
|
|
139
157
|
|
|
140
158
|
const HistoryIcon = styled(RecentlyViewedIcon)`
|
|
141
159
|
width: var(--catalog-history-icon-size);
|
|
142
160
|
height: var(--catalog-history-icon-size);
|
|
143
161
|
flex-shrink: 0;
|
|
162
|
+
margin-right: var(--catalog-history-icon-gap);
|
|
144
163
|
`;
|
|
145
164
|
|
|
146
165
|
const VersionPill = styled.div`
|
|
166
|
+
box-sizing: border-box;
|
|
147
167
|
display: flex;
|
|
148
168
|
align-items: center;
|
|
149
169
|
gap: var(--catalog-history-pill-gap);
|
|
170
|
+
height: var(--catalog-history-pill-height);
|
|
150
171
|
padding: var(--catalog-history-pill-padding-vertical) var(--catalog-history-pill-padding-horizontal);
|
|
151
172
|
border: 1px solid var(--catalog-history-pill-border-color);
|
|
152
173
|
border-radius: var(--catalog-history-pill-border-radius);
|
|
@@ -166,7 +187,7 @@ const VersionPill = styled.div`
|
|
|
166
187
|
}
|
|
167
188
|
`;
|
|
168
189
|
|
|
169
|
-
const CheckmarkIcon = styled(
|
|
190
|
+
const CheckmarkIcon = styled(RadioCheckButtonIcon)`
|
|
170
191
|
width: var(--catalog-history-pill-icon-size);
|
|
171
192
|
height: var(--catalog-history-pill-icon-size);
|
|
172
193
|
min-width: var(--catalog-history-pill-icon-size);
|
package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { useLocation } from 'react-router';
|
|
4
4
|
|
|
@@ -17,18 +17,67 @@ export type CatalogHistorySidebarProps = {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Overlay visibility, driven by the button's open event. The overlay stays
|
|
22
|
+
* open only on the location it was opened at, so navigation closes it; every
|
|
23
|
+
* close (explicit or by navigation) emits the close event that syncs the
|
|
24
|
+
* button pill with the given version/revision.
|
|
25
|
+
*/
|
|
26
|
+
function useVersionHistoryOverlay(version: string | null | undefined, revisionLabel?: string) {
|
|
27
|
+
const location = useLocation();
|
|
28
|
+
const locationKey = `${location.pathname}${location.search}`;
|
|
29
|
+
const locationKeyRef = useRef(locationKey);
|
|
30
|
+
locationKeyRef.current = locationKey;
|
|
31
|
+
const [openLocation, setOpenLocation] = useState<string | null>(null);
|
|
32
|
+
const closeEventPending = useRef(false);
|
|
33
|
+
if (openLocation !== null && openLocation !== locationKey) {
|
|
34
|
+
closeEventPending.current = true;
|
|
35
|
+
setOpenLocation(null);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const open = () => setOpenLocation(locationKeyRef.current);
|
|
40
|
+
window.addEventListener('portal:sidebar:open-version-history', open);
|
|
41
|
+
return () => window.removeEventListener('portal:sidebar:open-version-history', open);
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
const emitClose = useCallback(() => {
|
|
45
|
+
window.dispatchEvent(
|
|
46
|
+
new CustomEvent('portal:sidebar:close-version-history', {
|
|
47
|
+
detail: { version, revision: revisionLabel },
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
50
|
+
}, [version, revisionLabel]);
|
|
51
|
+
|
|
52
|
+
// Dispatched after the post-navigation render so the close event carries
|
|
53
|
+
// the freshly navigated-to version/revision.
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (!closeEventPending.current) return;
|
|
56
|
+
closeEventPending.current = false;
|
|
57
|
+
emitClose();
|
|
58
|
+
}, [openLocation, emitClose]);
|
|
59
|
+
|
|
60
|
+
const close = useCallback(() => {
|
|
61
|
+
emitClose();
|
|
62
|
+
setOpenLocation(null);
|
|
63
|
+
}, [emitClose]);
|
|
64
|
+
|
|
65
|
+
return { isOpen: openLocation !== null && openLocation === locationKey, close };
|
|
66
|
+
}
|
|
67
|
+
|
|
20
68
|
export function CatalogEntityHistorySidebar({
|
|
21
69
|
entityKey,
|
|
22
70
|
revision,
|
|
23
71
|
version,
|
|
24
72
|
className,
|
|
25
73
|
}: CatalogHistorySidebarProps): React.ReactElement | null {
|
|
26
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
27
74
|
const location = useLocation();
|
|
28
75
|
const basePath = location.pathname;
|
|
29
|
-
const { useTranslate, useFetchCatalogEntityRevisions, useL10nConfig } =
|
|
76
|
+
const { useTranslate, useFetchCatalogEntityRevisions, useL10nConfig, usePageVersions } =
|
|
77
|
+
useThemeHooks();
|
|
30
78
|
const { translate } = useTranslate();
|
|
31
79
|
const { currentLocale } = useL10nConfig();
|
|
80
|
+
const { versions: pageVersions } = usePageVersions();
|
|
32
81
|
|
|
33
82
|
const { items: revisions } = useFetchCatalogEntityRevisions({ entityKey });
|
|
34
83
|
|
|
@@ -50,9 +99,12 @@ export function CatalogEntityHistorySidebar({
|
|
|
50
99
|
item.revisions?.some((revision) => revision.isActive),
|
|
51
100
|
);
|
|
52
101
|
const activeRevision = itemWithActiveRevision?.revisions?.find((revision) => revision.isActive);
|
|
53
|
-
|
|
102
|
+
// Show the revision label only while an old revision is open.
|
|
103
|
+
return activeRevision && !activeRevision.isCurrent ? activeRevision.name : undefined;
|
|
54
104
|
}, [versionHistoryItems]);
|
|
55
105
|
|
|
106
|
+
const { isOpen, close } = useVersionHistoryOverlay(version, activeRevisionLabel);
|
|
107
|
+
|
|
56
108
|
const [expandedVersions, setExpandedVersions] = useState<Set<string>>(new Set());
|
|
57
109
|
|
|
58
110
|
useEffect(() => {
|
|
@@ -61,27 +113,6 @@ export function CatalogEntityHistorySidebar({
|
|
|
61
113
|
);
|
|
62
114
|
}, [versionHistoryItems]);
|
|
63
115
|
|
|
64
|
-
const handleOpenSidebar = useCallback(() => {
|
|
65
|
-
setIsOpen(true);
|
|
66
|
-
}, []);
|
|
67
|
-
|
|
68
|
-
useEffect(() => {
|
|
69
|
-
window.addEventListener('portal:sidebar:open-version-history', handleOpenSidebar);
|
|
70
|
-
|
|
71
|
-
return () => {
|
|
72
|
-
window.removeEventListener('portal:sidebar:open-version-history', handleOpenSidebar);
|
|
73
|
-
};
|
|
74
|
-
}, [handleOpenSidebar]);
|
|
75
|
-
|
|
76
|
-
const handleClose = (): void => {
|
|
77
|
-
window.dispatchEvent(
|
|
78
|
-
new CustomEvent('portal:sidebar:close-version-history', {
|
|
79
|
-
detail: { version, revision: activeRevisionLabel },
|
|
80
|
-
}),
|
|
81
|
-
);
|
|
82
|
-
setIsOpen(false);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
116
|
const toggleVersion = (version: string): void => {
|
|
86
117
|
setExpandedVersions((prev) => {
|
|
87
118
|
const newSet = new Set(prev);
|
|
@@ -101,18 +132,16 @@ export function CatalogEntityHistorySidebar({
|
|
|
101
132
|
return (
|
|
102
133
|
<SidebarOverlay className={className} data-component-name="Catalog/CatalogHistorySidebar">
|
|
103
134
|
<SidebarHeader>
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
<HeaderTitle>{translate('catalog.history.sidebar.title', 'Version history')}</HeaderTitle>
|
|
107
|
-
</HeaderWrapper>
|
|
135
|
+
<HistoryIcon />
|
|
136
|
+
<HeaderTitle>{translate('catalog.history.sidebar.title', 'Version')}</HeaderTitle>
|
|
108
137
|
<CloseButton
|
|
109
|
-
onClick={
|
|
138
|
+
onClick={close}
|
|
110
139
|
aria-label={translate('catalog.history.sidebar.close', 'Close version history')}
|
|
111
140
|
>
|
|
112
|
-
<CloseIcon size="
|
|
141
|
+
<CloseIcon size="14px" color="--catalog-history-sidebar-close-icon-color" />
|
|
113
142
|
</CloseButton>
|
|
114
143
|
</SidebarHeader>
|
|
115
|
-
|
|
144
|
+
<Divider />
|
|
116
145
|
<MenuContainer growContent>
|
|
117
146
|
<VersionList>
|
|
118
147
|
{versionHistoryItems.map((group) => (
|
|
@@ -122,6 +151,9 @@ export function CatalogEntityHistorySidebar({
|
|
|
122
151
|
basePath={basePath}
|
|
123
152
|
isExpanded={expandedVersions.has(group.version)}
|
|
124
153
|
onToggle={toggleVersion}
|
|
154
|
+
versionLink={
|
|
155
|
+
pageVersions?.find((pageVersion) => pageVersion.version === group.version)?.link
|
|
156
|
+
}
|
|
125
157
|
/>
|
|
126
158
|
))}
|
|
127
159
|
</VersionList>
|
|
@@ -136,6 +168,7 @@ const SidebarOverlay = styled.div`
|
|
|
136
168
|
left: 0;
|
|
137
169
|
width: var(--sidebar-width);
|
|
138
170
|
height: calc(100vh - var(--navbar-height) - var(--banner-height));
|
|
171
|
+
padding: var(--catalog-history-sidebar-padding);
|
|
139
172
|
background-color: var(--catalog-history-sidebar-bg-color);
|
|
140
173
|
border-right: 1px solid var(--catalog-history-sidebar-border-color);
|
|
141
174
|
display: flex;
|
|
@@ -144,16 +177,27 @@ const SidebarOverlay = styled.div`
|
|
|
144
177
|
overflow: hidden;
|
|
145
178
|
`;
|
|
146
179
|
|
|
180
|
+
// Same row geometry as the history button, so opening the overlay keeps the
|
|
181
|
+
// icon and title in place.
|
|
147
182
|
const SidebarHeader = styled.div`
|
|
148
183
|
display: flex;
|
|
149
184
|
align-items: center;
|
|
150
|
-
|
|
185
|
+
gap: var(--catalog-history-item-gap);
|
|
151
186
|
padding: var(--catalog-history-sidebar-header-padding);
|
|
152
|
-
border-
|
|
187
|
+
border-radius: var(--border-radius-lg);
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
`;
|
|
190
|
+
|
|
191
|
+
const Divider = styled.div`
|
|
192
|
+
height: 1px;
|
|
193
|
+
background-color: var(--catalog-history-sidebar-border-color);
|
|
194
|
+
margin: var(--catalog-history-sidebar-divider-margin);
|
|
153
195
|
flex-shrink: 0;
|
|
154
196
|
`;
|
|
155
197
|
|
|
156
198
|
const HeaderTitle = styled.h2`
|
|
199
|
+
flex: 1;
|
|
200
|
+
min-width: 0;
|
|
157
201
|
margin: 0;
|
|
158
202
|
font-family: var(--catalog-history-sidebar-header-font-family);
|
|
159
203
|
font-size: var(--catalog-history-sidebar-header-font-size);
|
|
@@ -182,18 +226,12 @@ const CloseButton = styled.button`
|
|
|
182
226
|
const VersionList = styled.ul`
|
|
183
227
|
list-style: none;
|
|
184
228
|
margin: 0;
|
|
185
|
-
padding:
|
|
186
|
-
margin-top: var(--catalog-history-sidebar-content-margin-top);
|
|
229
|
+
padding: 0;
|
|
187
230
|
`;
|
|
188
231
|
|
|
189
232
|
const HistoryIcon = styled(RecentlyViewedIcon)`
|
|
190
233
|
width: var(--catalog-history-icon-size);
|
|
191
234
|
height: var(--catalog-history-icon-size);
|
|
192
235
|
flex-shrink: 0;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const HeaderWrapper = styled.div`
|
|
196
|
-
display: flex;
|
|
197
|
-
align-items: center;
|
|
198
|
-
gap: var(--spacing-xs);
|
|
236
|
+
margin-right: var(--catalog-history-icon-gap);
|
|
199
237
|
`;
|
package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.tsx
CHANGED
|
@@ -12,16 +12,26 @@ export type CatalogEntityRevisionItemProps = {
|
|
|
12
12
|
revisionItem: CatalogEntityRevision;
|
|
13
13
|
basePath: string;
|
|
14
14
|
version?: string | null;
|
|
15
|
+
/** The version's own page URL (from the host's usePageVersions). */
|
|
16
|
+
versionLink?: string;
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
export function CatalogEntityRevisionItem({
|
|
18
20
|
revisionItem,
|
|
19
21
|
basePath,
|
|
20
22
|
version,
|
|
23
|
+
versionLink,
|
|
21
24
|
}: CatalogEntityRevisionItemProps): React.ReactElement {
|
|
22
25
|
const { useTranslate } = useThemeHooks();
|
|
23
26
|
const { translate } = useTranslate();
|
|
24
|
-
|
|
27
|
+
// The current revision links to the version's live page. Older revisions
|
|
28
|
+
// add ?revision= to that URL. Hosts without page-version links keep the
|
|
29
|
+
// legacy ?revision=&version= contract.
|
|
30
|
+
const base = versionLink ?? basePath;
|
|
31
|
+
const revisionFilter = revisionItem.isCurrent
|
|
32
|
+
? base
|
|
33
|
+
: (buildRevisionUrl(base, revisionItem.revisionDate, versionLink ? undefined : version) ??
|
|
34
|
+
base);
|
|
25
35
|
const isActive = revisionItem.isActive ?? false;
|
|
26
36
|
|
|
27
37
|
return (
|
|
@@ -56,12 +66,18 @@ const RevisionItemWrapper = styled(Link)<{ $isActive?: boolean }>`
|
|
|
56
66
|
padding-left: var(--catalog-history-sidebar-revisions-padding-left);
|
|
57
67
|
border-radius: var(--catalog-history-sidebar-revision-item-border-radius);
|
|
58
68
|
transition: 0.2s ease;
|
|
59
|
-
text-decoration: none;
|
|
60
69
|
color: inherit;
|
|
61
70
|
cursor: pointer;
|
|
62
71
|
background-color: ${({ $isActive }) =>
|
|
63
72
|
$isActive ? 'var(--catalog-history-sidebar-revision-item-bg-color-active)' : 'transparent'};
|
|
64
73
|
|
|
74
|
+
&,
|
|
75
|
+
&:hover,
|
|
76
|
+
&:focus,
|
|
77
|
+
&:visited {
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
65
81
|
&:hover {
|
|
66
82
|
background-color: ${({ $isActive }) =>
|
|
67
83
|
$isActive
|