@backstage/core-components 0.9.5 → 0.10.0-next.2
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 +30 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.esm.js +36 -14
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.10.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 32204fa794: Add `transformLinkUri` and `transformImageUri` to `MarkdownContent`
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- b4b711bcc2: Fix the EntityLayout header style so that EntityContextMenu button can display in correct shape when user hover on it
|
|
12
|
+
- 15201b1032: Updated dependency `rc-progress` to `3.4.0`.
|
|
13
|
+
- 385389d23c: Updated to remove usage of the `bursts` object in the theme palette
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @backstage/theme@0.2.16-next.1
|
|
16
|
+
|
|
17
|
+
## 0.9.6-next.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 3c440ea77e: Change BackstageIconLinkVertical style to use pallette instead of explicit color
|
|
22
|
+
- 7e115d42f9: Support displaying subtitle text in `SidebarSubmenuItem`
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/errors@1.1.0-next.0
|
|
25
|
+
- @backstage/theme@0.2.16-next.0
|
|
26
|
+
|
|
27
|
+
## 0.9.6-next.0
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- c3cfc83af2: Updated JSDoc to be MDX compatible.
|
|
32
|
+
|
|
3
33
|
## 0.9.5
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -375,7 +375,7 @@ declare namespace types_d {
|
|
|
375
375
|
*
|
|
376
376
|
* @public
|
|
377
377
|
* @remarks
|
|
378
|
-
*
|
|
378
|
+
* `<NodeData>` and `<EdgeData>` are useful when rendering custom or edge labels
|
|
379
379
|
*/
|
|
380
380
|
interface DependencyGraphProps<NodeData, EdgeData> extends React__default.SVGProps<SVGSVGElement> {
|
|
381
381
|
/**
|
|
@@ -686,6 +686,8 @@ declare type Props$b = {
|
|
|
686
686
|
content: string;
|
|
687
687
|
dialect?: 'gfm' | 'common-mark';
|
|
688
688
|
linkTarget?: Options['linkTarget'];
|
|
689
|
+
transformLinkUri?: (href: string) => string;
|
|
690
|
+
transformImageUri?: (href: string) => string;
|
|
689
691
|
};
|
|
690
692
|
/**
|
|
691
693
|
* MarkdownContent
|
|
@@ -1344,7 +1346,7 @@ declare type ItemCardHeaderProps = Partial<WithStyles<typeof styles>> & {
|
|
|
1344
1346
|
* A simple card header, rendering a default look for "item cards" - cards that
|
|
1345
1347
|
* are arranged in a grid for users to select among several options.
|
|
1346
1348
|
*
|
|
1347
|
-
* This component expects to be placed within a MUI
|
|
1349
|
+
* This component expects to be placed within a MUI `<CardMedia>`.
|
|
1348
1350
|
*
|
|
1349
1351
|
* Styles for the header can be overridden using the `classes` prop, e.g.:
|
|
1350
1352
|
*
|
|
@@ -1504,6 +1506,7 @@ declare type SidebarSubmenuItemDropdownItem = {
|
|
|
1504
1506
|
* Holds submenu item content.
|
|
1505
1507
|
*
|
|
1506
1508
|
* title: Text content of submenu item
|
|
1509
|
+
* subtitle: A subtitle displayed under the main title
|
|
1507
1510
|
* to: Path to navigate to when item is clicked
|
|
1508
1511
|
* icon: Icon displayed on the left of text content
|
|
1509
1512
|
* dropdownItems: Optional array of dropdown items displayed when submenu item is clicked.
|
|
@@ -1512,6 +1515,7 @@ declare type SidebarSubmenuItemDropdownItem = {
|
|
|
1512
1515
|
*/
|
|
1513
1516
|
declare type SidebarSubmenuItemProps = {
|
|
1514
1517
|
title: string;
|
|
1518
|
+
subtitle?: string;
|
|
1515
1519
|
to?: string;
|
|
1516
1520
|
icon?: IconComponent;
|
|
1517
1521
|
dropdownItems?: SidebarSubmenuItemDropdownItem[];
|
package/dist/index.esm.js
CHANGED
|
@@ -1384,7 +1384,7 @@ const useIconStyles = makeStyles((theme) => ({
|
|
|
1384
1384
|
textAlign: "center"
|
|
1385
1385
|
},
|
|
1386
1386
|
disabled: {
|
|
1387
|
-
color:
|
|
1387
|
+
color: theme.palette.text.secondary,
|
|
1388
1388
|
cursor: "default"
|
|
1389
1389
|
},
|
|
1390
1390
|
primary: {
|
|
@@ -1697,14 +1697,22 @@ const components = {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
};
|
|
1699
1699
|
function MarkdownContent(props) {
|
|
1700
|
-
const {
|
|
1700
|
+
const {
|
|
1701
|
+
content,
|
|
1702
|
+
dialect = "gfm",
|
|
1703
|
+
linkTarget,
|
|
1704
|
+
transformLinkUri,
|
|
1705
|
+
transformImageUri
|
|
1706
|
+
} = props;
|
|
1701
1707
|
const classes = useStyles$B();
|
|
1702
1708
|
return /* @__PURE__ */ React.createElement(ReactMarkdown, {
|
|
1703
1709
|
remarkPlugins: dialect === "gfm" ? [gfm] : [],
|
|
1704
1710
|
className: classes.markdown,
|
|
1705
1711
|
children: content,
|
|
1706
1712
|
components,
|
|
1707
|
-
linkTarget
|
|
1713
|
+
linkTarget,
|
|
1714
|
+
transformLinkUri,
|
|
1715
|
+
transformImageUri
|
|
1708
1716
|
});
|
|
1709
1717
|
}
|
|
1710
1718
|
|
|
@@ -3271,13 +3279,13 @@ const useStyles$l = makeStyles((theme) => ({
|
|
|
3271
3279
|
}),
|
|
3272
3280
|
overlayHeader: {
|
|
3273
3281
|
display: "flex",
|
|
3274
|
-
color: theme.palette.
|
|
3282
|
+
color: theme.palette.text.primary,
|
|
3275
3283
|
alignItems: "center",
|
|
3276
3284
|
justifyContent: "space-between",
|
|
3277
3285
|
padding: theme.spacing(2, 3)
|
|
3278
3286
|
},
|
|
3279
3287
|
overlayHeaderClose: {
|
|
3280
|
-
color: theme.palette.
|
|
3288
|
+
color: theme.palette.text.primary
|
|
3281
3289
|
},
|
|
3282
3290
|
marginMobileSidebar: (props) => ({
|
|
3283
3291
|
marginBottom: `${props.sidebarConfig.mobileSidebarHeight}px`
|
|
@@ -3545,6 +3553,13 @@ const useStyles$j = makeStyles((theme) => ({
|
|
|
3545
3553
|
fontSize: 14,
|
|
3546
3554
|
whiteSpace: "nowrap",
|
|
3547
3555
|
overflow: "hidden",
|
|
3556
|
+
"text-overflow": "ellipsis",
|
|
3557
|
+
lineHeight: 1
|
|
3558
|
+
},
|
|
3559
|
+
subtitle: {
|
|
3560
|
+
fontSize: 10,
|
|
3561
|
+
whiteSpace: "nowrap",
|
|
3562
|
+
overflow: "hidden",
|
|
3548
3563
|
"text-overflow": "ellipsis"
|
|
3549
3564
|
},
|
|
3550
3565
|
dropdownArrow: {
|
|
@@ -3575,7 +3590,7 @@ const useStyles$j = makeStyles((theme) => ({
|
|
|
3575
3590
|
}
|
|
3576
3591
|
}), { name: "BackstageSidebarSubmenuItem" });
|
|
3577
3592
|
const SidebarSubmenuItem = (props) => {
|
|
3578
|
-
const { title, to, icon: Icon, dropdownItems } = props;
|
|
3593
|
+
const { title, subtitle, to, icon: Icon, dropdownItems } = props;
|
|
3579
3594
|
const classes = useStyles$j();
|
|
3580
3595
|
const { setIsHoveredOn } = useContext(SidebarItemWithSubmenuContext);
|
|
3581
3596
|
const closeSubmenu = () => {
|
|
@@ -3609,7 +3624,10 @@ const SidebarSubmenuItem = (props) => {
|
|
|
3609
3624
|
}), /* @__PURE__ */ React.createElement(Typography, {
|
|
3610
3625
|
variant: "subtitle1",
|
|
3611
3626
|
className: classes.label
|
|
3612
|
-
}, title),
|
|
3627
|
+
}, title, /* @__PURE__ */ React.createElement("br", null), subtitle && /* @__PURE__ */ React.createElement(Typography, {
|
|
3628
|
+
variant: "caption",
|
|
3629
|
+
className: classes.subtitle
|
|
3630
|
+
}, subtitle)), showDropDown ? /* @__PURE__ */ React.createElement(ArrowDropUpIcon, {
|
|
3613
3631
|
className: classes.dropdownArrow
|
|
3614
3632
|
}) : /* @__PURE__ */ React.createElement(ArrowDropDownIcon, {
|
|
3615
3633
|
className: classes.dropdownArrow
|
|
@@ -3647,7 +3665,10 @@ const SidebarSubmenuItem = (props) => {
|
|
|
3647
3665
|
}), /* @__PURE__ */ React.createElement(Typography, {
|
|
3648
3666
|
variant: "subtitle1",
|
|
3649
3667
|
className: classes.label
|
|
3650
|
-
}, title)
|
|
3668
|
+
}, title, /* @__PURE__ */ React.createElement("br", null), subtitle && /* @__PURE__ */ React.createElement(Typography, {
|
|
3669
|
+
variant: "caption",
|
|
3670
|
+
className: classes.subtitle
|
|
3671
|
+
}, subtitle)))));
|
|
3651
3672
|
};
|
|
3652
3673
|
|
|
3653
3674
|
const useStyles$i = makeStyles((theme) => ({
|
|
@@ -5335,16 +5356,17 @@ const useStyles$5 = makeStyles((theme) => ({
|
|
|
5335
5356
|
flexGrow: 1
|
|
5336
5357
|
},
|
|
5337
5358
|
rightItemsBox: {
|
|
5338
|
-
width: "auto"
|
|
5359
|
+
width: "auto",
|
|
5360
|
+
alignItems: "center"
|
|
5339
5361
|
},
|
|
5340
5362
|
title: {
|
|
5341
|
-
color: theme.
|
|
5363
|
+
color: theme.page.fontColor,
|
|
5342
5364
|
wordBreak: "break-word",
|
|
5343
5365
|
fontSize: theme.typography.h3.fontSize,
|
|
5344
5366
|
marginBottom: 0
|
|
5345
5367
|
},
|
|
5346
5368
|
subtitle: {
|
|
5347
|
-
color: theme.
|
|
5369
|
+
color: theme.page.fontColor,
|
|
5348
5370
|
opacity: 0.8,
|
|
5349
5371
|
display: "inline-block",
|
|
5350
5372
|
marginTop: theme.spacing(1),
|
|
@@ -5355,10 +5377,10 @@ const useStyles$5 = makeStyles((theme) => ({
|
|
|
5355
5377
|
fontSize: 11,
|
|
5356
5378
|
opacity: 0.8,
|
|
5357
5379
|
marginBottom: theme.spacing(1),
|
|
5358
|
-
color: theme.
|
|
5380
|
+
color: theme.page.fontColor
|
|
5359
5381
|
},
|
|
5360
5382
|
breadcrumb: {
|
|
5361
|
-
color: theme.
|
|
5383
|
+
color: theme.page.fontColor
|
|
5362
5384
|
},
|
|
5363
5385
|
breadcrumbType: {
|
|
5364
5386
|
fontSize: "inherit",
|
|
@@ -5561,7 +5583,7 @@ const styles$1 = (theme) => createStyles({
|
|
|
5561
5583
|
root: {
|
|
5562
5584
|
color: theme.palette.common.white,
|
|
5563
5585
|
padding: theme.spacing(2, 2, 3),
|
|
5564
|
-
backgroundImage: theme.
|
|
5586
|
+
backgroundImage: theme.getPageTheme({ themeId: "card" }).backgroundImage,
|
|
5565
5587
|
backgroundPosition: 0,
|
|
5566
5588
|
backgroundSize: "inherit"
|
|
5567
5589
|
}
|