Added missing items to overridableComponents

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2024-07-13 12:41:22 -05:00
parent f094dfd54a
commit 32fce06e89
48 changed files with 381 additions and 37 deletions
+21
View File
@@ -695,6 +695,9 @@ export const LinkButton: (props: LinkButtonProps) => JSX.Element;
export type LinkButtonProps = ButtonProps_2 &
Omit<LinkProps, 'variant' | 'color'>;
// @public (undocumented)
export type LinkClassKey = 'visuallyHidden' | 'externalLink';
// Warning: (ae-missing-release-tag) "LinkProps" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -1130,11 +1133,26 @@ export const SidebarSubmenu: (
props: SidebarSubmenuProps,
) => React_2.JSX.Element;
// @public (undocumented)
export type SidebarSubmenuClassKey = 'root' | 'drawer' | 'drawerOpen' | 'title';
// @public
export const SidebarSubmenuItem: (
props: SidebarSubmenuItemProps,
) => React_2.JSX.Element;
// @public (undocumented)
export type SidebarSubmenuItemClassKey =
| 'item'
| 'itemContainer'
| 'selected'
| 'label'
| 'subtitle'
| 'dropdownArrow'
| 'dropdown'
| 'dropdownItem'
| 'textContent';
// @public
export type SidebarSubmenuItemDropdownItem = {
title: string;
@@ -1205,6 +1223,9 @@ export function SimpleStepperStep(
// @public (undocumented)
export type SimpleStepperStepClassKey = 'end';
// @public (undocumented)
export type StackDetailsClassKey = 'title';
// @public (undocumented)
export function StarIcon(props: IconComponentProps): React_2.JSX.Element;
@@ -35,6 +35,9 @@ export function isReactRouterBeta(): boolean {
return !obj.index;
}
/** @public */
export type LinkClassKey = 'visuallyHidden' | 'externalLink';
const useStyles = makeStyles(
{
visuallyHidden: {
@@ -15,4 +15,4 @@
*/
export { Link } from './Link';
export type { LinkProps } from './Link';
export type { LinkProps, LinkClassKey } from './Link';
@@ -26,6 +26,9 @@ interface IStackDetailsProps {
stack: string;
}
/** @public */
export type StackDetailsClassKey = 'title';
const useStyles = makeStyles(
theme => ({
title: {
@@ -17,3 +17,4 @@
export { ErrorPage } from './ErrorPage';
export type { ErrorPageClassKey } from './ErrorPage';
export type { MicDropClassKey } from './MicDrop';
export type { StackDetailsClassKey } from './StackDetails';
@@ -27,6 +27,9 @@ import {
} from './config';
import { useSidebarOpenState } from './SidebarOpenStateContext';
/** @public */
export type SidebarSubmenuClassKey = 'root' | 'drawer' | 'drawerOpen' | 'title';
const useStyles = makeStyles<
Theme,
{ submenuConfig: SubmenuConfig; left: number }
@@ -29,6 +29,18 @@ import { isLocationMatch } from './utils';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
/** @public */
export type SidebarSubmenuItemClassKey =
| 'item'
| 'itemContainer'
| 'selected'
| 'label'
| 'subtitle'
| 'dropdownArrow'
| 'dropdown'
| 'dropdownItem'
| 'textContent';
const useStyles = makeStyles(
theme => ({
item: {
@@ -21,10 +21,14 @@ export { SidebarGroup } from './SidebarGroup';
export type { SidebarGroupProps } from './SidebarGroup';
export { SidebarSubmenuItem } from './SidebarSubmenuItem';
export { SidebarSubmenu } from './SidebarSubmenu';
export type { SidebarSubmenuProps } from './SidebarSubmenu';
export type {
SidebarSubmenuProps,
SidebarSubmenuClassKey,
} from './SidebarSubmenu';
export type {
SidebarSubmenuItemProps,
SidebarSubmenuItemDropdownItem,
SidebarSubmenuItemClassKey,
} from './SidebarSubmenuItem';
export type { SidebarClassKey, SidebarProps } from './Bar';
export { SidebarPage, useContent } from './Page';
@@ -61,6 +61,7 @@ import {
FiltersContainerClassKey,
TableClassKey,
WarningPanelClassKey,
LinkClassKey,
FavoriteToggleIconClassKey,
} from './components';
@@ -91,6 +92,10 @@ import {
TabbedCardClassKey,
BoldHeaderClassKey,
CardTabClassKey,
SidebarSubmenuClassKey,
SidebarSubmenuItemClassKey,
StackDetailsClassKey,
BreadcrumbsCurrentPageClassKey,
} from './layout';
type BackstageComponentsNameToClassKey = {
@@ -141,10 +146,12 @@ type BackstageComponentsNameToClassKey = {
BackstageBottomLink: BottomLinkClassKey;
BackstageBreadcrumbsClickableText: BreadcrumbsClickableTextClassKey;
BackstageBreadcrumbsStyledBox: BreadcrumbsStyledBoxClassKey;
BreadcrumbsCurrentPage: BreadcrumbsCurrentPageClassKey;
BackstageContent: BackstageContentClassKey;
BackstageContentHeader: ContentHeaderClassKey;
BackstageErrorPage: ErrorPageClassKey;
BackstageErrorPageMicDrop: MicDropClassKey;
BackstageErrorPageStackDetails: StackDetailsClassKey;
BackstageHeader: HeaderClassKey;
BackstageHeaderLabel: HeaderLabelClassKey;
BackstageHeaderTabs: HeaderTabsClassKey;
@@ -158,12 +165,15 @@ type BackstageComponentsNameToClassKey = {
BackstageSidebarSpacer: SidebarSpacerClassKey;
BackstageSidebarDivider: SidebarDividerClassKey;
BackstageSidebarItem: SidebarItemClassKey;
BackstageSidebarSubmenu: SidebarSubmenuClassKey;
BackstageSidebarSubmenuItem: SidebarSubmenuItemClassKey;
BackstageSidebarPage: SidebarPageClassKey;
BackstageCustomProvider: CustomProviderClassKey;
BackstageSignInPage: SignInPageClassKey;
BackstageTabbedCard: TabbedCardClassKey;
BackstageTabbedCardBoldHeader: BoldHeaderClassKey;
BackstageCardTab: CardTabClassKey;
Link: LinkClassKey;
BackstageFavoriteToggleIcon: FavoriteToggleIconClassKey;
};
+9
View File
@@ -60,6 +60,12 @@ export const catalogGraphPlugin: BackstagePlugin<
// @public
export const catalogGraphRouteRef: RouteRef<undefined>;
// @public (undocumented)
export type CustomLabelClassKey = 'text' | 'secondary';
// @public (undocumented)
export type CustomNodeClassKey = 'node' | 'text' | 'clickable';
// @public
export enum Direction {
BOTTOM_TOP = 'BT',
@@ -107,6 +113,9 @@ export const EntityRelationsGraph: (
props: EntityRelationsGraphProps,
) => React_2.JSX.Element;
// @public (undocumented)
export type EntityRelationsGraphClassKey = 'progress' | 'container' | 'graph';
// @public (undocumented)
export type EntityRelationsGraphProps = {
rootEntityNames: CompoundEntityRef | CompoundEntityRef[];
@@ -39,6 +39,9 @@ import {
} from '../EntityRelationsGraph';
import { EntityRelationsGraphProps } from '../EntityRelationsGraph';
/** @public */
export type CatalogGraphCardClassKey = 'card' | 'graph';
const useStyles = makeStyles<Theme, { height: number | undefined }>(
{
card: ({ height }) => ({
@@ -14,3 +14,4 @@
* limitations under the License.
*/
export { CatalogGraphCard } from './CatalogGraphCard';
export type { CatalogGraphCardClassKey } from './CatalogGraphCard';
@@ -51,6 +51,16 @@ import { SelectedRelationsFilter } from './SelectedRelationsFilter';
import { SwitchFilter } from './SwitchFilter';
import { useCatalogGraphPage } from './useCatalogGraphPage';
/** @public */
export type CatalogGraphPageClassKey =
| 'content'
| 'container'
| 'fullHeight'
| 'graphWrapper'
| 'graph'
| 'legend'
| 'filters';
const useStyles = makeStyles(
theme => ({
content: {
@@ -28,6 +28,9 @@ export type Props = {
onChange: (value: number) => void;
};
/** @public */
export type MaxDepthFilterClassKey = 'formControl';
const useStyles = makeStyles(
{
formControl: {
@@ -28,6 +28,9 @@ import Autocomplete from '@material-ui/lab/Autocomplete';
import React, { useCallback, useEffect, useMemo } from 'react';
import useAsync from 'react-use/esm/useAsync';
/** @public */
export type SelectedKindsFilterClassKey = 'formControl';
const useStyles = makeStyles(
{
formControl: {
@@ -26,6 +26,9 @@ import Autocomplete from '@material-ui/lab/Autocomplete';
import React, { useCallback, useMemo } from 'react';
import { RelationPairs } from '../EntityRelationsGraph';
/** @public */
export type SelectedRelationsFilterClassKey = 'formControl';
const useStyles = makeStyles(
{
formControl: {
@@ -25,6 +25,9 @@ export type Props = {
onChange: (value: boolean) => void;
};
/** @public */
export type SwitchFilterClassKey = 'root';
const useStyles = makeStyles(
{
root: {
@@ -14,3 +14,8 @@
* limitations under the License.
*/
export { CatalogGraphPage } from './CatalogGraphPage';
export type { CatalogGraphPageClassKey } from './CatalogGraphPage';
export type { MaxDepthFilterClassKey } from './MaxDepthFilter';
export type { SelectedKindsFilterClassKey } from './SelectedKindsFilter';
export type { SelectedRelationsFilterClassKey } from './SelectedRelationsFilter';
export type { SwitchFilterClassKey } from './SwitchFilter';
@@ -19,6 +19,9 @@ import React from 'react';
import { EntityEdgeData } from './types';
import classNames from 'classnames';
/** @public */
export type CustomLabelClassKey = 'text' | 'secondary';
const useStyles = makeStyles(
theme => ({
text: {
@@ -23,6 +23,9 @@ import { EntityIcon } from './EntityIcon';
import { EntityNodeData } from './types';
import { DEFAULT_NAMESPACE } from '@backstage/catalog-model';
/** @public */
export type CustomNodeClassKey = 'node' | 'text' | 'clickable';
const useStyles = makeStyles(
theme => ({
node: {
@@ -34,6 +34,9 @@ import { ALL_RELATION_PAIRS, RelationPairs } from './relations';
import { Direction, EntityEdge, EntityNode } from './types';
import { useEntityRelationNodesAndEdges } from './useEntityRelationNodesAndEdges';
/** @public */
export type EntityRelationsGraphClassKey = 'progress' | 'container' | 'graph';
const useStyles = makeStyles(
theme => ({
progress: {
@@ -14,7 +14,10 @@
* limitations under the License.
*/
export { EntityRelationsGraph } from './EntityRelationsGraph';
export type { EntityRelationsGraphProps } from './EntityRelationsGraph';
export type {
EntityRelationsGraphProps,
EntityRelationsGraphClassKey,
} from './EntityRelationsGraph';
export { ALL_RELATION_PAIRS } from './relations';
export type { RelationPairs } from './relations';
export { Direction } from './types';
@@ -24,3 +27,5 @@ export type {
EntityNodeData,
EntityNode,
} from './types';
export type { CustomLabelClassKey } from './DefaultRenderLabel';
export type { CustomNodeClassKey } from './DefaultRenderNode';
@@ -0,0 +1,55 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Overrides } from '@material-ui/core/styles/overrides';
import { StyleRules } from '@material-ui/core/styles/withStyles';
import { CatalogGraphCardClassKey } from './components/CatalogGraphCard';
import {
CatalogGraphPageClassKey,
MaxDepthFilterClassKey,
SelectedKindsFilterClassKey,
SelectedRelationsFilterClassKey,
SwitchFilterClassKey,
} from './components/CatalogGraphPage';
import {
CustomLabelClassKey,
CustomNodeClassKey,
EntityRelationsGraphClassKey,
} from './components';
/** @public */
export type PluginCatalogGraphComponentsNameToClassKey = {
PluginCatalogGraphEntityRelationsGraph: EntityRelationsGraphClassKey;
PluginCatalogGraphCustomNode: CustomNodeClassKey;
PluginCatalogGraphCustomLabel: CustomLabelClassKey;
PluginCatalogGraphSwitchFilter: SwitchFilterClassKey;
PluginCatalogGraphSelectedRelationsFilter: SelectedRelationsFilterClassKey;
PluginCatalogGraphSelectedKindsFilter: SelectedKindsFilterClassKey;
PluginCatalogGraphMaxDepthFilter: MaxDepthFilterClassKey;
PluginCatalogGraphCatalogGraphPage: CatalogGraphPageClassKey;
PluginCatalogGraphCatalogGraphCard: CatalogGraphCardClassKey;
};
/** @public */
export type BackstageOverrides = Overrides & {
[Name in keyof PluginCatalogGraphComponentsNameToClassKey]?: Partial<
StyleRules<PluginCatalogGraphComponentsNameToClassKey[Name]>
>;
};
declare module '@backstage/theme' {
interface OverrideComponentNameToClassKeys
extends PluginCatalogGraphComponentsNameToClassKey {}
}
+5
View File
@@ -92,8 +92,10 @@ export type CatalogReactComponentsNameToClassKey = {
CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey;
CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey;
CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey;
FixedWidthFormControlLabel: FixedWidthFormControlLabelClassKey;
CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey;
CatalogReactEntityAutocompletePickerClassKey: CatalogReactEntityAutocompletePickerClassKey;
BackstageMissingAnnotationEmptyState: MissingAnnotationEmptyStateClassKey;
};
// @public (undocumented)
@@ -649,6 +651,9 @@ export type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
entity: Entity;
};
// @public (undocumented)
export type FixedWidthFormControlLabelClassKey = 'label' | 'root';
// @public
export function getEntityRelations(
entity: Entity | undefined,
@@ -28,9 +28,7 @@ const useStyles = makeStyles(
{
input: {},
},
{
name: 'CatalogReactEntityLifecyclePicker',
},
{ name: 'CatalogReactEntityLifecyclePicker' },
);
/** @public */
@@ -58,11 +58,12 @@ const useStyles = makeStyles(
overflow: 'hidden',
},
},
{
name: 'CatalogReactEntityOwnerPicker',
},
{ name: 'CatalogReactEntityOwnerPicker' },
);
/** @public */
export type FixedWidthFormControlLabelClassKey = 'label' | 'root';
const FixedWidthFormControlLabel = withStyles(
_theme => ({
label: {
@@ -18,4 +18,5 @@ export { EntityOwnerPicker } from './EntityOwnerPicker';
export type {
CatalogReactEntityOwnerPickerClassKey,
EntityOwnerPickerProps,
FixedWidthFormControlLabelClassKey,
} from './EntityOwnerPicker';
@@ -39,9 +39,7 @@ const useStyles = makeStyles(
input: {},
label: {},
},
{
name: 'CatalogReactEntityProcessingStatusPickerPicker',
},
{ name: 'CatalogReactEntityProcessingStatusPickerPicker' },
);
const icon = <CheckBoxOutlineBlankIcon fontSize="small" />;
@@ -40,9 +40,7 @@ const useStyles = makeStyles(
},
input: {},
}),
{
name: 'CatalogReactEntitySearchBar',
},
{ name: 'CatalogReactEntitySearchBar' },
);
/**
@@ -74,9 +74,7 @@ const useStyles = makeStyles(
margin: theme.spacing(1, 1, 2, 1),
},
}),
{
name: 'CatalogReactUserListPicker',
},
{ name: 'CatalogReactUserListPicker' },
);
export type ButtonGroup = {
@@ -25,6 +25,8 @@ import {
CatalogReactEntityTagPickerClassKey,
CatalogReactEntityOwnerPickerClassKey,
CatalogReactEntityProcessingStatusPickerClassKey,
FixedWidthFormControlLabelClassKey,
MissingAnnotationEmptyStateClassKey,
} from './components';
import { CatalogReactEntityAutocompletePickerClassKey } from './components/EntityAutocompletePicker/EntityAutocompletePicker';
@@ -36,8 +38,10 @@ export type CatalogReactComponentsNameToClassKey = {
CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey;
CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey;
CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey;
FixedWidthFormControlLabel: FixedWidthFormControlLabelClassKey;
CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey;
CatalogReactEntityAutocompletePickerClassKey: CatalogReactEntityAutocompletePickerClassKey;
BackstageMissingAnnotationEmptyState: MissingAnnotationEmptyStateClassKey;
};
/** @public */
+13
View File
@@ -223,6 +223,9 @@ export interface CatalogTableRow {
};
}
// @public (undocumented)
export type CatalogTableToolbarClassKey = 'root' | 'text';
// @public (undocumented)
export type ColumnBreakpoints = Record<Breakpoint, number>;
@@ -391,6 +394,9 @@ export interface EntityLabelsCardProps {
variant?: InfoCardVariants;
}
// @public (undocumented)
export type EntityLabelsEmptyStateClassKey = 'code';
// @public
export const EntityLayout: {
(props: EntityLayoutProps): React_2.JSX.Element;
@@ -626,6 +632,9 @@ export type PluginCatalogComponentsNameToClassKey = {
PluginCatalogEntityLinksEmptyState: EntityLinksEmptyStateClassKey;
PluginCatalogSystemDiagramCard: SystemDiagramCardClassKey;
PluginCatalogEntityContextMenu: EntityContextMenuClassKey;
CatalogSearchResultListItem: CatalogSearchResultListItemClassKey;
pluginCatalogTableToolbar: CatalogTableToolbarClassKey;
PluginCatalogEntityLabelsEmptyState: EntityLabelsEmptyStateClassKey;
};
// @public (undocumented)
@@ -653,4 +662,8 @@ export type SystemDiagramCardClassKey =
| 'componentNode'
| 'apiNode'
| 'resourceNode';
// Warnings were encountered during analysis:
//
// src/overridableComponents.d.ts:14:5 - (ae-forgotten-export) The symbol "CatalogSearchResultListItemClassKey" needs to be exported by the entry point index.d.ts
```
@@ -30,6 +30,12 @@ import { HighlightedSearchResultText } from '@backstage/plugin-search-react';
import { catalogTranslationRef } from '../../alpha/translation';
import { useTranslationRef } from '@backstage/frontend-plugin-api';
/** @public */
export type CatalogSearchResultListItemClassKey =
| 'item'
| 'flexContainer'
| 'itemText';
const useStyles = makeStyles(
{
item: {
@@ -15,4 +15,7 @@
*/
export { CatalogSearchResultListItem } from './CatalogSearchResultListItem';
export type { CatalogSearchResultListItemProps } from './CatalogSearchResultListItem';
export type {
CatalogSearchResultListItemProps,
CatalogSearchResultListItemClassKey,
} from './CatalogSearchResultListItem';
@@ -19,6 +19,9 @@ import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
/** @public */
export type CatalogTableToolbarClassKey = 'root' | 'text';
const useToolbarStyles = makeStyles(
theme => ({
root: {
@@ -34,7 +37,7 @@ const useToolbarStyles = makeStyles(
textOverflow: 'ellipsis',
},
}),
{ name: 'BackstageTableToolbar' },
{ name: 'PluginCatalogTableToolbar' },
);
export function CatalogTableToolbar(props: {
@@ -16,4 +16,5 @@
export { CatalogTable } from './CatalogTable';
export type { CatalogTableProps } from './CatalogTable';
export type { CatalogTableToolbarClassKey } from './CatalogTableToolbar';
export type { CatalogTableRow, CatalogTableColumnsFunc } from './types';
@@ -27,6 +27,9 @@ const ENTITY_YAML = `metadata:
labels:
javaVersion: 1.2.3`;
/** @public */
export type EntityLabelsEmptyStateClassKey = 'code';
const useStyles = makeStyles(
theme => ({
code: {
@@ -17,3 +17,4 @@
export { EntityLabelsCard } from './EntityLabelsCard';
export * from './conditions';
export type { EntityLabelsCardProps } from './EntityLabelsCard';
export type { EntityLabelsEmptyStateClassKey } from './EntityLabelsEmptyState';
@@ -19,12 +19,18 @@ import { StyleRules } from '@material-ui/core/styles/withStyles';
import { EntityLinksEmptyStateClassKey } from './components/EntityLinksCard';
import { SystemDiagramCardClassKey } from './components/SystemDiagramCard';
import { EntityContextMenuClassKey } from './components/EntityContextMenu';
import { CatalogSearchResultListItemClassKey } from './components/CatalogSearchResultListItem';
import { CatalogTableToolbarClassKey } from './components/CatalogTable';
import { EntityLabelsEmptyStateClassKey } from './components/EntityLabelsCard';
/** @public */
export type PluginCatalogComponentsNameToClassKey = {
PluginCatalogEntityLinksEmptyState: EntityLinksEmptyStateClassKey;
PluginCatalogSystemDiagramCard: SystemDiagramCardClassKey;
PluginCatalogEntityContextMenu: EntityContextMenuClassKey;
CatalogSearchResultListItem: CatalogSearchResultListItemClassKey;
pluginCatalogTableToolbar: CatalogTableToolbarClassKey;
PluginCatalogEntityLabelsEmptyState: EntityLabelsEmptyStateClassKey;
};
/** @public */
@@ -53,6 +53,12 @@ export type FeaturedDocsCardProps = {
subLinkText?: string;
};
/** @public */
export type FeaturedDocsCardClassKey =
| 'docDescription'
| 'docSubLink'
| 'docsTitleLink';
const useStyles = makeStyles(
theme => ({
docDescription: {
@@ -15,4 +15,7 @@
*/
export { Content } from './Content';
export type { FeaturedDocsCardProps } from './Content';
export type {
FeaturedDocsCardProps,
FeaturedDocsCardClassKey,
} from './Content';
+36
View File
@@ -0,0 +1,36 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Overrides } from '@material-ui/core/styles/overrides';
import { StyleRules } from '@material-ui/core/styles/withStyles';
import { FeaturedDocsCardClassKey } from './homePageComponents/FeaturedDocsCard';
/** @public */
export type CatalogReactComponentsNameToClassKey = {
HomeFeaturedDocsCard: FeaturedDocsCardClassKey;
};
/** @public */
export type BackstageOverrides = Overrides & {
[Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<
StyleRules<CatalogReactComponentsNameToClassKey[Name]>
>;
};
declare module '@backstage/theme' {
interface OverrideComponentNameToClassKeys
extends CatalogReactComponentsNameToClassKey {}
}
+6
View File
@@ -53,6 +53,9 @@ export const GroupProfileCard: (props: {
showLinks?: boolean;
}) => React_2.JSX.Element;
// @public (undocumented)
export type MemberComponentClassKey = 'card' | 'avatar';
// @public (undocumented)
export const MembersListCard: (props: {
memberDisplayTitle?: string;
@@ -63,6 +66,9 @@ export const MembersListCard: (props: {
relationAggregation?: EntityRelationAggregation;
}) => React_2.JSX.Element;
// @public (undocumented)
export type MembersListCardClassKey = 'root' | 'cardContent' | 'memberList';
// @public
export const MyGroupsSidebarItem: (props: {
singularTitle: string;
@@ -46,6 +46,9 @@ import {
import { EntityRefLink } from '@backstage/plugin-catalog-react';
import { EntityRelationAggregation } from '../../types';
/** @public */
export type MemberComponentClassKey = 'card' | 'avatar';
const useStyles = makeStyles(
(theme: Theme) =>
createStyles({
@@ -64,7 +67,7 @@ const useStyles = makeStyles(
top: '-2rem',
},
}),
{ name: 'MembersListCardComponent' },
{ name: 'PluginOrgMemberComponent' },
);
const MemberComponent = (props: { member: UserEntity }) => {
@@ -117,21 +120,27 @@ const MemberComponent = (props: { member: UserEntity }) => {
);
};
const useListStyles = makeStyles(theme => ({
root: {
height: '100%',
},
cardContent: {
overflow: 'auto',
},
memberList: {
display: 'grid',
gap: theme.spacing(1.5),
gridTemplateColumns: `repeat(auto-fit, minmax(auto, ${theme.spacing(
34,
)}px))`,
},
}));
/** @public */
export type MembersListCardClassKey = 'root' | 'cardContent' | 'memberList';
const useListStyles = makeStyles(
theme => ({
root: {
height: '100%',
},
cardContent: {
overflow: 'auto',
},
memberList: {
display: 'grid',
gap: theme.spacing(1.5),
gridTemplateColumns: `repeat(auto-fit, minmax(auto, ${theme.spacing(
34,
)}px))`,
},
}),
{ name: 'PluginOrgMembersListCardComponent' },
);
/** @public */
export const MembersListCard = (props: {
+37
View File
@@ -0,0 +1,37 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Overrides } from '@material-ui/core/styles/overrides';
import { StyleRules } from '@material-ui/core/styles/withStyles';
import { MemberComponentClassKey, MembersListCardClassKey } from './components';
/** @public */
export type CatalogReactComponentsNameToClassKey = {
PluginOrgMemberComponent: MemberComponentClassKey;
PluginOrgMembersListCardComponent: MembersListCardClassKey;
};
/** @public */
export type BackstageOverrides = Overrides & {
[Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<
StyleRules<CatalogReactComponentsNameToClassKey[Name]>
>;
};
declare module '@backstage/theme' {
interface OverrideComponentNameToClassKeys
extends CatalogReactComponentsNameToClassKey {}
}
+3
View File
@@ -65,6 +65,9 @@ export const HighlightedSearchResultText: (
props: HighlightedSearchResultTextProps,
) => React_2.JSX.Element;
// @public (undocumented)
export type HighlightedSearchResultTextClassKey = 'highlight';
// @public
export type HighlightedSearchResultTextProps = {
text: string;
@@ -17,6 +17,9 @@
import React, { useMemo } from 'react';
import { makeStyles } from '@material-ui/core/styles';
/** @public */
export type HighlightedSearchResultTextClassKey = 'highlight';
const useStyles = makeStyles(
() => ({
highlight: {},
@@ -0,0 +1,36 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Overrides } from '@material-ui/core/styles/overrides';
import { StyleRules } from '@material-ui/core/styles/withStyles';
import { HighlightedSearchResultTextClassKey } from './components';
/** @public */
export type CatalogReactComponentsNameToClassKey = {
BackstageHighlightedSearchResultText: HighlightedSearchResultTextClassKey;
};
/** @public */
export type BackstageOverrides = Overrides & {
[Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<
StyleRules<CatalogReactComponentsNameToClassKey[Name]>
>;
};
declare module '@backstage/theme' {
interface OverrideComponentNameToClassKeys
extends CatalogReactComponentsNameToClassKey {}
}