@backstage/core-components 0.9.4-next.2 → 0.9.4
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 +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +16 -7
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.9.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ac19f82936: Added ARIA landmark <main> to Page component and added ARIA landmark <nav> to DesktopSidebar and Sidebar components
|
|
8
|
+
- 55f68c386a: Enabled select component to be enabled by keyboard
|
|
9
|
+
- c0055ece91: Announce external links to screen readers
|
|
10
|
+
- e210c0cab8: Add ability to customize `Read More` destination with `readMoreUrl` prop for `MissingAnnotationEmptyState` component.
|
|
11
|
+
- 52c02ac02b: Don't set the background color on an Avatar component that has a picture.
|
|
12
|
+
- cfc0f2e5bd: Added optional anchorOrigin alignment prop to AlertDisplay
|
|
13
|
+
- f4380eb602: Add an aria-label to the support button to improve accessibility for screen readers
|
|
14
|
+
- ba97b80421: Updated dependency `@types/react-syntax-highlighter` to `^15.0.0`.
|
|
15
|
+
- e462112be5: Updated dependency `rc-progress` to `3.3.2`.
|
|
16
|
+
- 2bcb0a0e2b: Sidebar NAV now includes aria-label. Component AboutField now uses h2 variant instead of subtitle2 (font properties unchanged)
|
|
17
|
+
- c7f32b53a4: Fixed multiple scrolls appearing on Page when added InfoCard with external bottom link
|
|
18
|
+
- 3603014e0e: Add ARIA landmark( <main>), & label and a heading to OAuthRequestDialog. Removed nested interactive control (button).
|
|
19
|
+
- 2025d7c123: Properly highlight `SidebarSubmenuItem` dropdown items on hover, use ellipsis styling on long labels in `SidebarSubmenu`, allow `icon` and `to` properties to be optional on `SidebarSubmenuItem`, and fix `SidebarPage` padding to be responsive to pinned state
|
|
20
|
+
- 2295b4ab2b: Add controls to Storybook stories
|
|
21
|
+
- 521293b22e: Added a chevron Indicator when the sidebar is collapsed and has a sub-menu
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @backstage/core-plugin-api@1.0.2
|
|
24
|
+
- @backstage/config@1.0.1
|
|
25
|
+
|
|
3
26
|
## 0.9.4-next.2
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -553,6 +553,7 @@ declare type EmptyStateImageClassKey = 'generalImg';
|
|
|
553
553
|
|
|
554
554
|
declare type Props$g = {
|
|
555
555
|
annotation: string;
|
|
556
|
+
readMoreUrl?: string;
|
|
556
557
|
};
|
|
557
558
|
declare type MissingAnnotationEmptyStateClassKey = 'code';
|
|
558
559
|
declare function MissingAnnotationEmptyState(props: Props$g): JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -8,6 +8,7 @@ import pluralize from 'pluralize';
|
|
|
8
8
|
import { makeStyles, createStyles, useTheme, darken, lighten, withStyles, styled, ThemeProvider } from '@material-ui/core/styles';
|
|
9
9
|
import MaterialAvatar from '@material-ui/core/Avatar';
|
|
10
10
|
import Button$1 from '@material-ui/core/Button';
|
|
11
|
+
import classNames from 'classnames';
|
|
11
12
|
import Link$1 from '@material-ui/core/Link';
|
|
12
13
|
import { Link as Link$2, useSearchParams, useLocation, useResolvedPath, resolvePath } from 'react-router-dom';
|
|
13
14
|
import Tooltip from '@material-ui/core/Tooltip';
|
|
@@ -27,7 +28,6 @@ import makeStyles$1 from '@material-ui/core/styles/makeStyles';
|
|
|
27
28
|
import * as d3Shape from 'd3-shape';
|
|
28
29
|
import isFinite from 'lodash/isFinite';
|
|
29
30
|
import useObservable from 'react-use/lib/useObservable';
|
|
30
|
-
import classNames from 'classnames';
|
|
31
31
|
import SnackbarContent from '@material-ui/core/SnackbarContent';
|
|
32
32
|
import Grid from '@material-ui/core/Grid';
|
|
33
33
|
import Typography from '@material-ui/core/Typography';
|
|
@@ -217,6 +217,9 @@ const useStyles$R = makeStyles({
|
|
|
217
217
|
whiteSpace: "nowrap",
|
|
218
218
|
height: 1,
|
|
219
219
|
width: 1
|
|
220
|
+
},
|
|
221
|
+
externalLink: {
|
|
222
|
+
position: "relative"
|
|
220
223
|
}
|
|
221
224
|
}, { name: "Link" });
|
|
222
225
|
const isExternalUri = (uri) => /^([a-z+.-]+):/.test(uri);
|
|
@@ -251,7 +254,8 @@ const Link = React.forwardRef(({ onClick, noTrack, ...props }, ref) => {
|
|
|
251
254
|
href: to,
|
|
252
255
|
onClick: handleClick,
|
|
253
256
|
...newWindow ? { target: "_blank", rel: "noopener" } : {},
|
|
254
|
-
...props
|
|
257
|
+
...props,
|
|
258
|
+
className: classNames(classes.externalLink, props.className)
|
|
255
259
|
}, props.children, /* @__PURE__ */ React.createElement("span", {
|
|
256
260
|
className: classes.visuallyHidden
|
|
257
261
|
}, ", Opens in a new window")) : /* @__PURE__ */ React.createElement(Link$1, {
|
|
@@ -946,7 +950,8 @@ const useStyles$J = makeStyles((theme) => ({
|
|
|
946
950
|
}
|
|
947
951
|
}), { name: "BackstageMissingAnnotationEmptyState" });
|
|
948
952
|
function MissingAnnotationEmptyState(props) {
|
|
949
|
-
const { annotation } = props;
|
|
953
|
+
const { annotation, readMoreUrl } = props;
|
|
954
|
+
const url = readMoreUrl || "https://backstage.io/docs/features/software-catalog/well-known-annotations";
|
|
950
955
|
const classes = useStyles$J();
|
|
951
956
|
const description = /* @__PURE__ */ React.createElement(React.Fragment, null, "The ", /* @__PURE__ */ React.createElement("code", null, annotation), " annotation is missing. You need to add the annotation to your component if you want to enable this tool.");
|
|
952
957
|
return /* @__PURE__ */ React.createElement(EmptyState, {
|
|
@@ -966,7 +971,7 @@ function MissingAnnotationEmptyState(props) {
|
|
|
966
971
|
})), /* @__PURE__ */ React.createElement(Button$1, {
|
|
967
972
|
color: "primary",
|
|
968
973
|
component: Link,
|
|
969
|
-
to:
|
|
974
|
+
to: url
|
|
970
975
|
}, "Read more"))
|
|
971
976
|
});
|
|
972
977
|
}
|
|
@@ -3908,15 +3913,19 @@ const SidebarItemBase = forwardRef((props, ref) => {
|
|
|
3908
3913
|
const { sidebarConfig } = useContext(SidebarConfigContext);
|
|
3909
3914
|
const classes = useMemoStyles(sidebarConfig);
|
|
3910
3915
|
const { isOpen } = useContext(SidebarContext);
|
|
3916
|
+
const divStyle = !isOpen && children ? { display: "flex", marginLeft: "24px" } : {};
|
|
3917
|
+
const displayItemIcon = /* @__PURE__ */ React.createElement("div", {
|
|
3918
|
+
style: divStyle
|
|
3919
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
3920
|
+
fontSize: "small"
|
|
3921
|
+
}), !isOpen && children ? /* @__PURE__ */ React.createElement(ArrowRightIcon, null) : /* @__PURE__ */ React.createElement(React.Fragment, null));
|
|
3911
3922
|
const itemIcon = /* @__PURE__ */ React.createElement(Badge, {
|
|
3912
3923
|
color: "secondary",
|
|
3913
3924
|
variant: "dot",
|
|
3914
3925
|
overlap: "circular",
|
|
3915
3926
|
invisible: !hasNotifications,
|
|
3916
3927
|
className: classNames({ [classes.closedItemIcon]: !isOpen })
|
|
3917
|
-
},
|
|
3918
|
-
fontSize: "small"
|
|
3919
|
-
}));
|
|
3928
|
+
}, displayItemIcon);
|
|
3920
3929
|
const openContent = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
3921
3930
|
"data-testid": "login-button",
|
|
3922
3931
|
className: classes.iconContainer
|