@backstage/core-components 0.8.5 → 0.8.6
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 +12 -0
- package/dist/index.esm.js +12 -15
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.8.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b97a2460d5: Remove the `ignoreChildEvent` utility from the sidebar component to avoid conflicts with popovers
|
|
8
|
+
- bdc53553eb: chore(deps): bump `react-text-truncate` from 0.16.0 to 0.17.0
|
|
9
|
+
- 05f0f44180: chore(deps): bump `remark-gfm` from 2.0.0 to 3.0.1
|
|
10
|
+
- 15bac1d738: chore(deps): bump `react-markdown` from 7.1.2 to 8.0.0
|
|
11
|
+
- 7346b5fb96: chore(deps): bump `rc-progress` from 3.1.4 to 3.2.4
|
|
12
|
+
- 9abb28bb22: Fix issue where component types are not recognized causing the `MobileSidebar` to not render as intended.
|
|
13
|
+
- 1787694435: Updates styling of Header component by removing flex wrap and add max width of characters for subtitle
|
|
14
|
+
|
|
3
15
|
## 0.8.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.esm.js
CHANGED
|
@@ -3118,6 +3118,7 @@ const useStyles$m = makeStyles((theme) => ({
|
|
|
3118
3118
|
}
|
|
3119
3119
|
}));
|
|
3120
3120
|
const sortSidebarGroupsForPriority = (children) => orderBy(children, ({ props: { priority } }) => Number.isInteger(priority) ? priority : -1, "desc");
|
|
3121
|
+
const sidebarGroupType = React.createElement(SidebarGroup).type;
|
|
3121
3122
|
const OverlayMenu = ({
|
|
3122
3123
|
children,
|
|
3123
3124
|
label = "Menu",
|
|
@@ -3152,7 +3153,7 @@ const MobileSidebar = (props) => {
|
|
|
3152
3153
|
useEffect(() => {
|
|
3153
3154
|
setSelectedMenuItemIndex(-1);
|
|
3154
3155
|
}, [location.pathname]);
|
|
3155
|
-
let sidebarGroups = useElementFilter(children, (elements) => elements.getElements().filter((child) => child.type ===
|
|
3156
|
+
let sidebarGroups = useElementFilter(children, (elements) => elements.getElements().filter((child) => child.type === sidebarGroupType));
|
|
3156
3157
|
if (!children) {
|
|
3157
3158
|
return null;
|
|
3158
3159
|
} else if (!sidebarGroups.length) {
|
|
@@ -3290,11 +3291,11 @@ const DesktopSidebar = (props) => {
|
|
|
3290
3291
|
onMouseEnter: disableExpandOnHover ? () => {
|
|
3291
3292
|
} : handleOpen,
|
|
3292
3293
|
onFocus: disableExpandOnHover ? () => {
|
|
3293
|
-
} :
|
|
3294
|
+
} : handleOpen,
|
|
3294
3295
|
onMouseLeave: disableExpandOnHover ? () => {
|
|
3295
3296
|
} : handleClose,
|
|
3296
3297
|
onBlur: disableExpandOnHover ? () => {
|
|
3297
|
-
} :
|
|
3298
|
+
} : handleClose
|
|
3298
3299
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
3299
3300
|
className: classNames(classes.drawer, {
|
|
3300
3301
|
[classes.drawerOpen]: isOpen
|
|
@@ -3322,14 +3323,6 @@ function A11ySkipSidebar() {
|
|
|
3322
3323
|
className: classNames(classes.visuallyHidden)
|
|
3323
3324
|
}, "Skip to content");
|
|
3324
3325
|
}
|
|
3325
|
-
function ignoreChildEvent(handlerFn) {
|
|
3326
|
-
return (event) => {
|
|
3327
|
-
const currentTarget = event == null ? void 0 : event.currentTarget;
|
|
3328
|
-
if (!(currentTarget == null ? void 0 : currentTarget.contains(event.relatedTarget))) {
|
|
3329
|
-
handlerFn(event);
|
|
3330
|
-
}
|
|
3331
|
-
};
|
|
3332
|
-
}
|
|
3333
3326
|
|
|
3334
3327
|
function isLocationMatch(currentLocation, toLocation) {
|
|
3335
3328
|
const toDecodedSearch = new URLSearchParams(toLocation.search).toString();
|
|
@@ -3722,6 +3715,7 @@ const useLocationMatch = (submenu, location) => useElementFilter(submenu.props.c
|
|
|
3722
3715
|
function isButtonItem(props) {
|
|
3723
3716
|
return props.to === void 0;
|
|
3724
3717
|
}
|
|
3718
|
+
const sidebarSubmenuType = React.createElement(SidebarSubmenu).type;
|
|
3725
3719
|
const WorkaroundNavLink = React.forwardRef(function WorkaroundNavLinkWithRef({
|
|
3726
3720
|
to,
|
|
3727
3721
|
end,
|
|
@@ -3855,7 +3849,7 @@ const SidebarItemWithSubmenu = ({
|
|
|
3855
3849
|
}, arrowIcon()), isHoveredOn && children));
|
|
3856
3850
|
};
|
|
3857
3851
|
const SidebarItem = forwardRef((props, ref) => {
|
|
3858
|
-
const [submenu] = useElementFilter(props.children, (elements) => elements.getElements().filter((child) => child.type ===
|
|
3852
|
+
const [submenu] = useElementFilter(props.children, (elements) => elements.getElements().filter((child) => child.type === sidebarSubmenuType));
|
|
3859
3853
|
if (submenu) {
|
|
3860
3854
|
return /* @__PURE__ */ React.createElement(SidebarItemWithSubmenu, {
|
|
3861
3855
|
...props
|
|
@@ -5117,11 +5111,13 @@ const useStyles$5 = makeStyles((theme) => ({
|
|
|
5117
5111
|
zIndex: 100,
|
|
5118
5112
|
display: "flex",
|
|
5119
5113
|
flexDirection: "row",
|
|
5120
|
-
flexWrap: "wrap",
|
|
5121
5114
|
alignItems: "center",
|
|
5122
5115
|
backgroundImage: theme.page.backgroundImage,
|
|
5123
5116
|
backgroundPosition: "center",
|
|
5124
|
-
backgroundSize: "cover"
|
|
5117
|
+
backgroundSize: "cover",
|
|
5118
|
+
[theme.breakpoints.down("sm")]: {
|
|
5119
|
+
flexWrap: "wrap"
|
|
5120
|
+
}
|
|
5125
5121
|
},
|
|
5126
5122
|
leftItemsBox: {
|
|
5127
5123
|
maxWidth: "100%",
|
|
@@ -5140,7 +5136,8 @@ const useStyles$5 = makeStyles((theme) => ({
|
|
|
5140
5136
|
color: theme.palette.common.white,
|
|
5141
5137
|
opacity: 0.8,
|
|
5142
5138
|
display: "inline-block",
|
|
5143
|
-
marginTop: theme.spacing(1)
|
|
5139
|
+
marginTop: theme.spacing(1),
|
|
5140
|
+
maxWidth: "75ch"
|
|
5144
5141
|
},
|
|
5145
5142
|
type: {
|
|
5146
5143
|
textTransform: "uppercase",
|