@backstage/core-components 0.17.5-next.0 → 0.17.5-next.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.17.5-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5563605: Added `FavoriteToggleProps`.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/config@1.3.3
|
|
10
|
+
- @backstage/core-plugin-api@1.10.9
|
|
11
|
+
- @backstage/errors@1.2.7
|
|
12
|
+
- @backstage/theme@0.6.8-next.0
|
|
13
|
+
- @backstage/version-bridge@1.0.11
|
|
14
|
+
|
|
3
15
|
## 0.17.5-next.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoriteToggle.esm.js","sources":["../../../src/components/FavoriteToggle/FavoriteToggle.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentProps } from 'react';\nimport IconButton from '@material-ui/core/IconButton';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport { Theme, makeStyles } from '@material-ui/core/styles';\nimport { StarIcon, UnstarredIcon } from '../../icons';\n\nconst useStyles = makeStyles<Theme>(\n () => ({\n icon: {\n color: '#f3ba37',\n cursor: 'pointer',\n display: 'inline-flex',\n },\n iconBorder: {\n color: 'inherit',\n cursor: 'pointer',\n display: 'inline-flex',\n },\n }),\n { name: 'BackstageFavoriteToggleIcon' },\n);\n\n/**\n * @public\n */\nexport type FavoriteToggleIconClassKey = 'icon' | 'iconBorder';\n\n/**\n * Icon used in FavoriteToggle component.\n *\n * Can be used independently, useful when used as {@link @material-table/core#MaterialTableProps.actions} in {@link @material-table/core#MaterialTable}\n *\n * @public\n */\nexport function FavoriteToggleIcon(props: { isFavorite: boolean }) {\n const { isFavorite } = props;\n const classes = useStyles();\n\n return (\n <Typography\n component=\"span\"\n className={isFavorite ? classes.icon : classes.iconBorder}\n >\n {isFavorite ? <StarIcon /> : <UnstarredIcon />}\n </Typography>\n );\n}\n\n/**\n * Toggle encapsulating logic for marking something as favorite,\n * primarily used in various instances of entity lists and cards but can be used elsewhere.\n *\n * This component can only be used in as a controlled toggle and does not keep internal state.\n *\n * @public\n */\nexport function FavoriteToggle(
|
|
1
|
+
{"version":3,"file":"FavoriteToggle.esm.js","sources":["../../../src/components/FavoriteToggle/FavoriteToggle.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentProps } from 'react';\nimport IconButton from '@material-ui/core/IconButton';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport { Theme, makeStyles } from '@material-ui/core/styles';\nimport { StarIcon, UnstarredIcon } from '../../icons';\n\nconst useStyles = makeStyles<Theme>(\n () => ({\n icon: {\n color: '#f3ba37',\n cursor: 'pointer',\n display: 'inline-flex',\n },\n iconBorder: {\n color: 'inherit',\n cursor: 'pointer',\n display: 'inline-flex',\n },\n }),\n { name: 'BackstageFavoriteToggleIcon' },\n);\n\n/**\n * @public\n */\nexport type FavoriteToggleIconClassKey = 'icon' | 'iconBorder';\n\n/**\n * Icon used in FavoriteToggle component.\n *\n * Can be used independently, useful when used as {@link @material-table/core#MaterialTableProps.actions} in {@link @material-table/core#MaterialTable}\n *\n * @public\n */\nexport function FavoriteToggleIcon(props: { isFavorite: boolean }) {\n const { isFavorite } = props;\n const classes = useStyles();\n\n return (\n <Typography\n component=\"span\"\n className={isFavorite ? classes.icon : classes.iconBorder}\n >\n {isFavorite ? <StarIcon /> : <UnstarredIcon />}\n </Typography>\n );\n}\n\n/**\n * Props for the {@link FavoriteToggle} component.\n *\n * @public\n */\nexport type FavoriteToggleProps = ComponentProps<typeof IconButton> & {\n id: string;\n title: string;\n isFavorite: boolean;\n onToggle: (value: boolean) => void;\n};\n\n/**\n * Toggle encapsulating logic for marking something as favorite,\n * primarily used in various instances of entity lists and cards but can be used elsewhere.\n *\n * This component can only be used in as a controlled toggle and does not keep internal state.\n *\n * @public\n */\nexport function FavoriteToggle(props: FavoriteToggleProps) {\n const {\n id,\n title,\n isFavorite: value,\n onToggle: onChange,\n ...iconButtonProps\n } = props;\n return (\n <Tooltip id={id} title={title}>\n <IconButton\n aria-label={title}\n id={id}\n onClick={() => onChange(!value)}\n color=\"inherit\"\n {...iconButtonProps}\n >\n <FavoriteToggleIcon isFavorite={value} />\n </IconButton>\n </Tooltip>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAsBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,OAAO;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,SAAA;AAAA,MACP,MAAQ,EAAA,SAAA;AAAA,MACR,OAAS,EAAA;AAAA,KACX;AAAA,IACA,UAAY,EAAA;AAAA,MACV,KAAO,EAAA,SAAA;AAAA,MACP,MAAQ,EAAA,SAAA;AAAA,MACR,OAAS,EAAA;AAAA;AACX,GACF,CAAA;AAAA,EACA,EAAE,MAAM,6BAA8B;AACxC,CAAA;AAcO,SAAS,mBAAmB,KAAgC,EAAA;AACjE,EAAM,MAAA,EAAE,YAAe,GAAA,KAAA;AACvB,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,SAAU,EAAA,MAAA;AAAA,MACV,SAAW,EAAA,UAAA,GAAa,OAAQ,CAAA,IAAA,GAAO,OAAQ,CAAA,UAAA;AAAA,MAE9C,QAAa,EAAA,UAAA,mBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,CAAA,uBAAM,aAAc,EAAA,EAAA;AAAA;AAAA,GAC9C;AAEJ;AAsBO,SAAS,eAAe,KAA4B,EAAA;AACzD,EAAM,MAAA;AAAA,IACJ,EAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAY,EAAA,KAAA;AAAA,IACZ,QAAU,EAAA,QAAA;AAAA,IACV,GAAG;AAAA,GACD,GAAA,KAAA;AACJ,EACE,uBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,EAAA,EAAQ,KACf,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAY,EAAA,KAAA;AAAA,MACZ,EAAA;AAAA,MACA,OAAS,EAAA,MAAM,QAAS,CAAA,CAAC,KAAK,CAAA;AAAA,MAC9B,KAAM,EAAA,SAAA;AAAA,MACL,GAAG,eAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA,CAAC,kBAAmB,EAAA,EAAA,UAAA,EAAY,KAAO,EAAA;AAAA;AAAA,GAE3C,EAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -702,19 +702,25 @@ declare function FavoriteToggleIcon(props: {
|
|
|
702
702
|
isFavorite: boolean;
|
|
703
703
|
}): react_jsx_runtime.JSX.Element;
|
|
704
704
|
/**
|
|
705
|
-
*
|
|
706
|
-
* primarily used in various instances of entity lists and cards but can be used elsewhere.
|
|
707
|
-
*
|
|
708
|
-
* This component can only be used in as a controlled toggle and does not keep internal state.
|
|
705
|
+
* Props for the {@link FavoriteToggle} component.
|
|
709
706
|
*
|
|
710
707
|
* @public
|
|
711
708
|
*/
|
|
712
|
-
|
|
709
|
+
type FavoriteToggleProps = ComponentProps<typeof IconButton> & {
|
|
713
710
|
id: string;
|
|
714
711
|
title: string;
|
|
715
712
|
isFavorite: boolean;
|
|
716
713
|
onToggle: (value: boolean) => void;
|
|
717
|
-
}
|
|
714
|
+
};
|
|
715
|
+
/**
|
|
716
|
+
* Toggle encapsulating logic for marking something as favorite,
|
|
717
|
+
* primarily used in various instances of entity lists and cards but can be used elsewhere.
|
|
718
|
+
*
|
|
719
|
+
* This component can only be used in as a controlled toggle and does not keep internal state.
|
|
720
|
+
*
|
|
721
|
+
* @public
|
|
722
|
+
*/
|
|
723
|
+
declare function FavoriteToggle(props: FavoriteToggleProps): react_jsx_runtime.JSX.Element;
|
|
718
724
|
|
|
719
725
|
type ResponseErrorPanelClassKey = 'text' | 'divider';
|
|
720
726
|
/**
|
|
@@ -2233,4 +2239,4 @@ declare module '@backstage/theme' {
|
|
|
2233
2239
|
}
|
|
2234
2240
|
}
|
|
2235
2241
|
|
|
2236
|
-
export { AlertDisplay, type AlertDisplayProps, AppIcon, type AppIconProps, AutoLogout, type AutoLogoutProps, Avatar, type AvatarClassKey, type AvatarProps, type BackstageContentClassKey, type BackstageOverrides, type BoldHeaderClassKey, BottomLink, type BottomLinkClassKey, type BottomLinkProps, Breadcrumbs, type BreadcrumbsClickableTextClassKey, type BreadcrumbsCurrentPageClassKey, type BreadcrumbsStyledBoxClassKey, BrokenImageIcon, Button, type ButtonProps, type CardActionsTopRightClassKey, CardTab, type CardTabClassKey, CatalogIcon, ChatIcon, type ClosedDropdownClassKey, CodeSnippet, type CodeSnippetProps, Content, ContentHeader, type ContentHeaderClassKey, CopyTextButton, type CopyTextButtonProps, CreateButton, type CreateButtonProps, type CustomProviderClassKey, DashboardIcon, DependencyGraph, type DependencyGraphDefaultLabelClassKey, type DependencyGraphDefaultNodeClassKey, type DependencyGraphEdgeClassKey, type DependencyGraphNodeClassKey, type DependencyGraphProps, DependencyGraphTypes, DismissableBanner, type DismissableBannerClassKey, type DismissbleBannerClassKey, DocsIcon, EmailIcon, EmptyState, type EmptyStateClassKey, type EmptyStateImageClassKey, ErrorBoundary, type ErrorBoundaryProps, ErrorPage, type ErrorPageClassKey, ErrorPanel, type ErrorPanelClassKey, type ErrorPanelProps, FavoriteToggle, FavoriteToggleIcon, type FavoriteToggleIconClassKey, type FeatureCalloutCircleClassKey, FeatureCalloutCircular, type FiltersContainerClassKey, Gauge, GaugeCard, type GaugeCardClassKey, type GaugeClassKey, type GaugeProps, type GaugePropsGetColor, type GaugePropsGetColorOptions, GitHubIcon, GroupIcon, Header, HeaderActionMenu, type HeaderActionMenuItem, type HeaderActionMenuProps, type HeaderClassKey, HeaderIconLinkRow, type HeaderIconLinkRowClassKey, HeaderLabel, type HeaderLabelClassKey, HeaderTabs, type HeaderTabsClassKey, HelpIcon, HorizontalScrollGrid, type HorizontalScrollGridClassKey, type IconComponentProps, IconLinkVertical, type IconLinkVerticalClassKey, type IconLinkVerticalProps, type IdentityProviders, InfoCard, type InfoCardClassKey, type InfoCardVariants, ItemCard, ItemCardGrid, type ItemCardGridClassKey, type ItemCardGridProps, ItemCardHeader, type ItemCardHeaderClassKey, type ItemCardHeaderProps, Lifecycle, type LifecycleClassKey, LinearGauge, Link, LinkButton, type LinkButtonProps, type LinkClassKey, type LinkProps, LogViewer, type LogViewerClassKey, type LogViewerProps, type LoginRequestListItemClassKey, MarkdownContent, type MarkdownContentClassKey, type MetadataTableCellClassKey, type MetadataTableListClassKey, type MetadataTableListItemClassKey, type MetadataTableTitleCellClassKey, type MicDropClassKey, MissingAnnotationEmptyState, MobileSidebar, type MobileSidebarProps, OAuthRequestDialog, type OAuthRequestDialogClassKey, type OpenedDropdownClassKey, OverflowTooltip, type OverflowTooltipClassKey, Page, type PageClassKey, PageWithHeader, Progress, ProxiedSignInPage, type ProxiedSignInPageProps, ResponseErrorPanel, type ResponseErrorPanelClassKey, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, type SelectClassKey, type SelectInputBaseClassKey, type SelectItem, type SelectedItems, Sidebar, type SidebarClassKey, LegacySidebarContext as SidebarContext, type SidebarContextType, SidebarDivider, type SidebarDividerClassKey, SidebarExpandButton, SidebarGroup, type SidebarGroupProps, SidebarItem, type SidebarItemClassKey, type SidebarOpenState, SidebarOpenStateProvider, type SidebarOptions, SidebarPage, type SidebarPageClassKey, type SidebarPageProps, type SidebarPinState, LegacySidebarPinStateContext as SidebarPinStateContext, type SidebarPinStateContextType, SidebarPinStateProvider, type SidebarProps, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, type SidebarSpaceClassKey, SidebarSpacer, type SidebarSpacerClassKey, SidebarSubmenu, type SidebarSubmenuClassKey, SidebarSubmenuItem, type SidebarSubmenuItemClassKey, type SidebarSubmenuItemDropdownItem, type SidebarSubmenuItemProps, type SidebarSubmenuProps, SignInPage, type SignInPageClassKey, type SignInProviderConfig, SimpleStepper, type SimpleStepperFooterClassKey, SimpleStepperStep, type SimpleStepperStepClassKey, type StackDetailsClassKey, StarIcon, StatusAborted, type StatusClassKey, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, type StructuredMetadataTableListClassKey, type StructuredMetadataTableNestedListClassKey, type StructuredMetadataTableProps, type SubmenuOptions, SubvalueCell, type SubvalueCellClassKey, SupportButton, type SupportButtonClassKey, type SupportConfig, type SupportItem, type SupportItemLink, type Tab, TabbedCard, type TabbedCardClassKey, TabbedLayout, Table, type TableClassKey, type TableColumn, type TableFilter, type TableFiltersClassKey, type TableHeaderClassKey, type TableOptions, type TableProps, type TableState, type TableToolbarClassKey, TrendLine, UnstarredIcon, UserIcon, UserIdentity, WarningIcon, WarningPanel, type WarningPanelClassKey, sidebarConfig, useContent, useQueryParamState, useSidebarOpenState, useSidebarPinState, useSupportConfig };
|
|
2242
|
+
export { AlertDisplay, type AlertDisplayProps, AppIcon, type AppIconProps, AutoLogout, type AutoLogoutProps, Avatar, type AvatarClassKey, type AvatarProps, type BackstageContentClassKey, type BackstageOverrides, type BoldHeaderClassKey, BottomLink, type BottomLinkClassKey, type BottomLinkProps, Breadcrumbs, type BreadcrumbsClickableTextClassKey, type BreadcrumbsCurrentPageClassKey, type BreadcrumbsStyledBoxClassKey, BrokenImageIcon, Button, type ButtonProps, type CardActionsTopRightClassKey, CardTab, type CardTabClassKey, CatalogIcon, ChatIcon, type ClosedDropdownClassKey, CodeSnippet, type CodeSnippetProps, Content, ContentHeader, type ContentHeaderClassKey, CopyTextButton, type CopyTextButtonProps, CreateButton, type CreateButtonProps, type CustomProviderClassKey, DashboardIcon, DependencyGraph, type DependencyGraphDefaultLabelClassKey, type DependencyGraphDefaultNodeClassKey, type DependencyGraphEdgeClassKey, type DependencyGraphNodeClassKey, type DependencyGraphProps, DependencyGraphTypes, DismissableBanner, type DismissableBannerClassKey, type DismissbleBannerClassKey, DocsIcon, EmailIcon, EmptyState, type EmptyStateClassKey, type EmptyStateImageClassKey, ErrorBoundary, type ErrorBoundaryProps, ErrorPage, type ErrorPageClassKey, ErrorPanel, type ErrorPanelClassKey, type ErrorPanelProps, FavoriteToggle, FavoriteToggleIcon, type FavoriteToggleIconClassKey, type FavoriteToggleProps, type FeatureCalloutCircleClassKey, FeatureCalloutCircular, type FiltersContainerClassKey, Gauge, GaugeCard, type GaugeCardClassKey, type GaugeClassKey, type GaugeProps, type GaugePropsGetColor, type GaugePropsGetColorOptions, GitHubIcon, GroupIcon, Header, HeaderActionMenu, type HeaderActionMenuItem, type HeaderActionMenuProps, type HeaderClassKey, HeaderIconLinkRow, type HeaderIconLinkRowClassKey, HeaderLabel, type HeaderLabelClassKey, HeaderTabs, type HeaderTabsClassKey, HelpIcon, HorizontalScrollGrid, type HorizontalScrollGridClassKey, type IconComponentProps, IconLinkVertical, type IconLinkVerticalClassKey, type IconLinkVerticalProps, type IdentityProviders, InfoCard, type InfoCardClassKey, type InfoCardVariants, ItemCard, ItemCardGrid, type ItemCardGridClassKey, type ItemCardGridProps, ItemCardHeader, type ItemCardHeaderClassKey, type ItemCardHeaderProps, Lifecycle, type LifecycleClassKey, LinearGauge, Link, LinkButton, type LinkButtonProps, type LinkClassKey, type LinkProps, LogViewer, type LogViewerClassKey, type LogViewerProps, type LoginRequestListItemClassKey, MarkdownContent, type MarkdownContentClassKey, type MetadataTableCellClassKey, type MetadataTableListClassKey, type MetadataTableListItemClassKey, type MetadataTableTitleCellClassKey, type MicDropClassKey, MissingAnnotationEmptyState, MobileSidebar, type MobileSidebarProps, OAuthRequestDialog, type OAuthRequestDialogClassKey, type OpenedDropdownClassKey, OverflowTooltip, type OverflowTooltipClassKey, Page, type PageClassKey, PageWithHeader, Progress, ProxiedSignInPage, type ProxiedSignInPageProps, ResponseErrorPanel, type ResponseErrorPanelClassKey, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, type SelectClassKey, type SelectInputBaseClassKey, type SelectItem, type SelectedItems, Sidebar, type SidebarClassKey, LegacySidebarContext as SidebarContext, type SidebarContextType, SidebarDivider, type SidebarDividerClassKey, SidebarExpandButton, SidebarGroup, type SidebarGroupProps, SidebarItem, type SidebarItemClassKey, type SidebarOpenState, SidebarOpenStateProvider, type SidebarOptions, SidebarPage, type SidebarPageClassKey, type SidebarPageProps, type SidebarPinState, LegacySidebarPinStateContext as SidebarPinStateContext, type SidebarPinStateContextType, SidebarPinStateProvider, type SidebarProps, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, type SidebarSpaceClassKey, SidebarSpacer, type SidebarSpacerClassKey, SidebarSubmenu, type SidebarSubmenuClassKey, SidebarSubmenuItem, type SidebarSubmenuItemClassKey, type SidebarSubmenuItemDropdownItem, type SidebarSubmenuItemProps, type SidebarSubmenuProps, SignInPage, type SignInPageClassKey, type SignInProviderConfig, SimpleStepper, type SimpleStepperFooterClassKey, SimpleStepperStep, type SimpleStepperStepClassKey, type StackDetailsClassKey, StarIcon, StatusAborted, type StatusClassKey, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, type StructuredMetadataTableListClassKey, type StructuredMetadataTableNestedListClassKey, type StructuredMetadataTableProps, type SubmenuOptions, SubvalueCell, type SubvalueCellClassKey, SupportButton, type SupportButtonClassKey, type SupportConfig, type SupportItem, type SupportItemLink, type Tab, TabbedCard, type TabbedCardClassKey, TabbedLayout, Table, type TableClassKey, type TableColumn, type TableFilter, type TableFiltersClassKey, type TableHeaderClassKey, type TableOptions, type TableProps, type TableState, type TableToolbarClassKey, TrendLine, UnstarredIcon, UserIcon, UserIdentity, WarningIcon, WarningPanel, type WarningPanelClassKey, sidebarConfig, useContent, useQueryParamState, useSidebarOpenState, useSidebarPinState, useSupportConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/core-components",
|
|
3
|
-
"version": "0.17.5-next.
|
|
3
|
+
"version": "0.17.5-next.1",
|
|
4
4
|
"description": "Core components used by Backstage plugins and apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library"
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@backstage/app-defaults": "1.6.5-next.0",
|
|
110
|
-
"@backstage/cli": "0.
|
|
110
|
+
"@backstage/cli": "0.34.0-next.1",
|
|
111
111
|
"@backstage/core-app-api": "1.18.0",
|
|
112
112
|
"@backstage/test-utils": "1.7.11-next.0",
|
|
113
113
|
"@testing-library/dom": "^10.0.0",
|