@backstage/core-components 0.9.4 → 0.9.5-next.0

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,16 @@
1
1
  # @backstage/core-components
2
2
 
3
+ ## 0.9.5-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 65840b17be: Fix issue where right arrow icon was incorrectly added to side bar items without a sub-menu
8
+ - 6968b65ba1: Updated dependency `@react-hookz/web` to `^14.0.0`.
9
+ - 96d1e01641: Accessibility updates:
10
+
11
+ - Added `aria-label` to the `Select` component
12
+ - Changed heading level used in the header of `Table` component
13
+
3
14
  ## 0.9.4
4
15
 
5
16
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1612,6 +1612,7 @@ declare type SidebarItemBaseProps = {
1612
1612
  icon: IconComponent;
1613
1613
  text?: string;
1614
1614
  hasNotifications?: boolean;
1615
+ hasSubmenu?: boolean;
1615
1616
  disableHighlight?: boolean;
1616
1617
  className?: string;
1617
1618
  };
package/dist/index.esm.js CHANGED
@@ -2360,6 +2360,7 @@ function SelectComponent(props) {
2360
2360
  }, /* @__PURE__ */ React.createElement(InputLabel, {
2361
2361
  className: classes.formLabel
2362
2362
  }, label), /* @__PURE__ */ React.createElement(Select, {
2363
+ "aria-label": label,
2363
2364
  value,
2364
2365
  native,
2365
2366
  disabled,
@@ -3904,6 +3905,7 @@ const SidebarItemBase = forwardRef((props, ref) => {
3904
3905
  icon: Icon,
3905
3906
  text,
3906
3907
  hasNotifications = false,
3908
+ hasSubmenu = false,
3907
3909
  disableHighlight = false,
3908
3910
  onClick,
3909
3911
  children,
@@ -3913,12 +3915,12 @@ const SidebarItemBase = forwardRef((props, ref) => {
3913
3915
  const { sidebarConfig } = useContext(SidebarConfigContext);
3914
3916
  const classes = useMemoStyles(sidebarConfig);
3915
3917
  const { isOpen } = useContext(SidebarContext);
3916
- const divStyle = !isOpen && children ? { display: "flex", marginLeft: "24px" } : {};
3918
+ const divStyle = !isOpen && hasSubmenu ? { display: "flex", marginLeft: "24px" } : {};
3917
3919
  const displayItemIcon = /* @__PURE__ */ React.createElement("div", {
3918
3920
  style: divStyle
3919
3921
  }, /* @__PURE__ */ React.createElement(Icon, {
3920
3922
  fontSize: "small"
3921
- }), !isOpen && children ? /* @__PURE__ */ React.createElement(ArrowRightIcon, null) : /* @__PURE__ */ React.createElement(React.Fragment, null));
3923
+ }), !isOpen && hasSubmenu ? /* @__PURE__ */ React.createElement(ArrowRightIcon, null) : /* @__PURE__ */ React.createElement(React.Fragment, null));
3922
3924
  const itemIcon = /* @__PURE__ */ React.createElement(Badge, {
3923
3925
  color: "secondary",
3924
3926
  variant: "dot",
@@ -3999,6 +4001,7 @@ const SidebarItemWithSubmenu = ({
3999
4001
  onMouseEnter: handleMouseEnter,
4000
4002
  className: classNames(isHoveredOn && classes.highlighted)
4001
4003
  }, /* @__PURE__ */ React.createElement(SidebarItemBase, {
4004
+ hasSubmenu: true,
4002
4005
  className: isActive ? classes.selected : "",
4003
4006
  ...props
4004
4007
  }, arrowIcon()), isHoveredOn && children));
@@ -4823,7 +4826,7 @@ function Table(props) {
4823
4826
  icons: tableIcons,
4824
4827
  title: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, {
4825
4828
  variant: "h5",
4826
- component: "h3"
4829
+ component: "h2"
4827
4830
  }, title), subtitle && /* @__PURE__ */ React.createElement(Typography, {
4828
4831
  color: "textSecondary",
4829
4832
  variant: "body1"