@backstage/core-components 0.9.3 → 0.9.4-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 CHANGED
@@ -1,5 +1,35 @@
1
1
  # @backstage/core-components
2
2
 
3
+ ## 0.9.4-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 52c02ac02b: Don't set the background color on an Avatar component that has a picture.
8
+ - 3603014e0e: Add ARIA landmark( <main>), & label and a heading to OAuthRequestDialog. Removed nested interactive control (button).
9
+ - 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
10
+
11
+ ## 0.9.4-next.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 55f68c386a: Enabled select component to be enabled by keyboard
16
+ - ba97b80421: Updated dependency `@types/react-syntax-highlighter` to `^15.0.0`.
17
+ - 2bcb0a0e2b: Sidebar NAV now includes aria-label. Component AboutField now uses h2 variant instead of subtitle2 (font properties unchanged)
18
+ - Updated dependencies
19
+ - @backstage/config@1.0.1-next.0
20
+ - @backstage/core-plugin-api@1.0.2-next.1
21
+
22
+ ## 0.9.4-next.0
23
+
24
+ ### Patch Changes
25
+
26
+ - ac19f82936: Added ARIA landmark <main> to Page component and added ARIA landmark <nav> to DesktopSidebar and Sidebar components
27
+ - c0055ece91: Announce external links to screen readers
28
+ - cfc0f2e5bd: Added optional anchorOrigin alignment prop to AlertDisplay
29
+ - f4380eb602: Add an aria-label to the support button to improve accessibility for screen readers
30
+ - Updated dependencies
31
+ - @backstage/core-plugin-api@1.0.2-next.0
32
+
3
33
  ## 0.9.3
4
34
 
5
35
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -28,9 +28,16 @@ import { Overrides } from '@material-ui/core/styles/overrides';
28
28
  * @public
29
29
  * @remarks
30
30
  *
31
- * Shown as SnackBar at the top of the page
31
+ * Shown as SnackBar at the center top of the page by default. Configurable with props.
32
32
  */
33
- declare function AlertDisplay(_props: {}): JSX.Element | null;
33
+ declare type AlertDisplayProps = {
34
+ anchorOrigin?: {
35
+ vertical: 'top' | 'bottom';
36
+ horizontal: 'left' | 'center' | 'right';
37
+ };
38
+ };
39
+ /** @public */
40
+ declare function AlertDisplay(props: AlertDisplayProps): JSX.Element | null;
34
41
 
35
42
  /** @public */
36
43
  declare type AvatarClassKey = 'avatar';
@@ -1515,8 +1522,8 @@ declare type SidebarSubmenuItemDropdownItem = {
1515
1522
  */
1516
1523
  declare type SidebarSubmenuItemProps = {
1517
1524
  title: string;
1518
- to: string;
1519
- icon: IconComponent;
1525
+ to?: string;
1526
+ icon?: IconComponent;
1520
1527
  dropdownItems?: SidebarSubmenuItemDropdownItem[];
1521
1528
  };
1522
1529
  /**
@@ -1892,4 +1899,4 @@ declare type BackstageOverrides = Overrides & {
1892
1899
  [Name in keyof BackstageComponentsNameToClassKey]?: Partial<StyleRules<BackstageComponentsNameToClassKey[Name]>>;
1893
1900
  };
1894
1901
 
1895
- export { AlertDisplay, Avatar, AvatarClassKey, AvatarProps, BackstageContentClassKey, BackstageOverrides, BoldHeaderClassKey, BottomLink, BottomLinkClassKey, BottomLinkProps, Breadcrumbs, BreadcrumbsClickableTextClassKey, BreadcrumbsStyledBoxClassKey, BrokenImageIcon, Button, ButtonProps, CardActionsTopRightClassKey, CardTab, CardTabClassKey, CatalogIcon, ChatIcon, ClosedDropdownClassKey, CodeSnippet, CodeSnippetProps, Content, ContentHeader, ContentHeaderClassKey, CopyTextButton, CopyTextButtonProps, CreateButton, CreateButtonProps, CustomProviderClassKey, DashboardIcon, DependencyGraph, DependencyGraphDefaultLabelClassKey, DependencyGraphDefaultNodeClassKey, DependencyGraphEdgeClassKey, DependencyGraphNodeClassKey, DependencyGraphProps, types_d as DependencyGraphTypes, DismissableBanner, DismissableBannerClassKey, DismissbleBannerClassKey, DocsIcon, EmailIcon, EmptyState, EmptyStateClassKey, EmptyStateImageClassKey, ErrorBoundary, ErrorBoundaryProps, ErrorPage, ErrorPageClassKey, ErrorPanel, ErrorPanelClassKey, ErrorPanelProps, FeatureCalloutCircleClassKey, FeatureCalloutCircular, FiltersContainerClassKey, Gauge, GaugeCard, GaugeCardClassKey, GaugeClassKey, GaugeProps, GaugePropsGetColor, GaugePropsGetColorOptions, GitHubIcon, GroupIcon, Header, HeaderClassKey, HeaderIconLinkRow, HeaderIconLinkRowClassKey, HeaderLabel, HeaderLabelClassKey, HeaderTabs, HeaderTabsClassKey, HelpIcon, HomepageTimer, HorizontalScrollGrid, HorizontalScrollGridClassKey, IconLinkVerticalClassKey, IconLinkVerticalProps, IdentityProviders, InfoCard, InfoCardClassKey, InfoCardVariants, IntroCard, ItemCard, ItemCardGrid, ItemCardGridClassKey, ItemCardGridProps, ItemCardHeader, ItemCardHeaderClassKey, ItemCardHeaderProps, Lifecycle, LifecycleClassKey, LinearGauge, Link, LinkProps, LogViewer, LogViewerClassKey, LogViewerProps, LoginRequestListItemClassKey, MarkdownContent, MarkdownContentClassKey, MetadataTableCellClassKey, MetadataTableListClassKey, MetadataTableListItemClassKey, MetadataTableTitleCellClassKey, MicDropClassKey, MissingAnnotationEmptyState, MissingAnnotationEmptyStateClassKey, MobileSidebar, MobileSidebarProps, OAuthRequestDialog, OAuthRequestDialogClassKey, OpenedDropdownClassKey, OverflowTooltip, OverflowTooltipClassKey, Page, PageClassKey, PageWithHeader, Progress, ProxiedSignInPage, ProxiedSignInPageProps, ResponseErrorPanel, ResponseErrorPanelClassKey, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, SelectClassKey, SelectInputBaseClassKey, SelectItem, SelectedItems, Sidebar, SidebarClassKey, SidebarContext, SidebarContextType, SidebarDivider, SidebarDividerClassKey, SidebarExpandButton, SidebarGroup, SidebarGroupProps, SidebarIntro, SidebarIntroClassKey, SidebarItem, SidebarItemClassKey, SidebarOptions, SidebarPage, SidebarPageClassKey, SidebarPageProps, SidebarPinStateContext, SidebarPinStateContextType, SidebarProps, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, SidebarSpaceClassKey, SidebarSpacer, SidebarSpacerClassKey, SidebarSubmenu, SidebarSubmenuItem, SidebarSubmenuItemDropdownItem, SidebarSubmenuItemProps, SidebarSubmenuProps, SignInPage, SignInPageClassKey, SignInProviderConfig, SimpleStepper, SimpleStepperFooterClassKey, SimpleStepperStep, SimpleStepperStepClassKey, StatusAborted, StatusClassKey, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, StructuredMetadataTableListClassKey, StructuredMetadataTableNestedListClassKey, SubmenuOptions, SubvalueCell, SubvalueCellClassKey, SupportButton, SupportButtonClassKey, SupportConfig, SupportItem, SupportItemLink, Tab, TabBarClassKey, TabClassKey, TabIconClassKey, TabbedCard, TabbedCardClassKey, TabbedLayout, Table, TableClassKey, TableColumn, TableFilter, TableFiltersClassKey, TableHeaderClassKey, TableProps, TableState, TableToolbarClassKey, Tabs, TabsClassKey, TrendLine, UserIcon, UserIdentity, WarningIcon, WarningPanel, WarningPanelClassKey, sidebarConfig, useContent, useQueryParamState, useSupportConfig };
1902
+ export { AlertDisplay, AlertDisplayProps, Avatar, AvatarClassKey, AvatarProps, BackstageContentClassKey, BackstageOverrides, BoldHeaderClassKey, BottomLink, BottomLinkClassKey, BottomLinkProps, Breadcrumbs, BreadcrumbsClickableTextClassKey, BreadcrumbsStyledBoxClassKey, BrokenImageIcon, Button, ButtonProps, CardActionsTopRightClassKey, CardTab, CardTabClassKey, CatalogIcon, ChatIcon, ClosedDropdownClassKey, CodeSnippet, CodeSnippetProps, Content, ContentHeader, ContentHeaderClassKey, CopyTextButton, CopyTextButtonProps, CreateButton, CreateButtonProps, CustomProviderClassKey, DashboardIcon, DependencyGraph, DependencyGraphDefaultLabelClassKey, DependencyGraphDefaultNodeClassKey, DependencyGraphEdgeClassKey, DependencyGraphNodeClassKey, DependencyGraphProps, types_d as DependencyGraphTypes, DismissableBanner, DismissableBannerClassKey, DismissbleBannerClassKey, DocsIcon, EmailIcon, EmptyState, EmptyStateClassKey, EmptyStateImageClassKey, ErrorBoundary, ErrorBoundaryProps, ErrorPage, ErrorPageClassKey, ErrorPanel, ErrorPanelClassKey, ErrorPanelProps, FeatureCalloutCircleClassKey, FeatureCalloutCircular, FiltersContainerClassKey, Gauge, GaugeCard, GaugeCardClassKey, GaugeClassKey, GaugeProps, GaugePropsGetColor, GaugePropsGetColorOptions, GitHubIcon, GroupIcon, Header, HeaderClassKey, HeaderIconLinkRow, HeaderIconLinkRowClassKey, HeaderLabel, HeaderLabelClassKey, HeaderTabs, HeaderTabsClassKey, HelpIcon, HomepageTimer, HorizontalScrollGrid, HorizontalScrollGridClassKey, IconLinkVerticalClassKey, IconLinkVerticalProps, IdentityProviders, InfoCard, InfoCardClassKey, InfoCardVariants, IntroCard, ItemCard, ItemCardGrid, ItemCardGridClassKey, ItemCardGridProps, ItemCardHeader, ItemCardHeaderClassKey, ItemCardHeaderProps, Lifecycle, LifecycleClassKey, LinearGauge, Link, LinkProps, LogViewer, LogViewerClassKey, LogViewerProps, LoginRequestListItemClassKey, MarkdownContent, MarkdownContentClassKey, MetadataTableCellClassKey, MetadataTableListClassKey, MetadataTableListItemClassKey, MetadataTableTitleCellClassKey, MicDropClassKey, MissingAnnotationEmptyState, MissingAnnotationEmptyStateClassKey, MobileSidebar, MobileSidebarProps, OAuthRequestDialog, OAuthRequestDialogClassKey, OpenedDropdownClassKey, OverflowTooltip, OverflowTooltipClassKey, Page, PageClassKey, PageWithHeader, Progress, ProxiedSignInPage, ProxiedSignInPageProps, ResponseErrorPanel, ResponseErrorPanelClassKey, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, SelectClassKey, SelectInputBaseClassKey, SelectItem, SelectedItems, Sidebar, SidebarClassKey, SidebarContext, SidebarContextType, SidebarDivider, SidebarDividerClassKey, SidebarExpandButton, SidebarGroup, SidebarGroupProps, SidebarIntro, SidebarIntroClassKey, SidebarItem, SidebarItemClassKey, SidebarOptions, SidebarPage, SidebarPageClassKey, SidebarPageProps, SidebarPinStateContext, SidebarPinStateContextType, SidebarProps, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, SidebarSpaceClassKey, SidebarSpacer, SidebarSpacerClassKey, SidebarSubmenu, SidebarSubmenuItem, SidebarSubmenuItemDropdownItem, SidebarSubmenuItemProps, SidebarSubmenuProps, SignInPage, SignInPageClassKey, SignInProviderConfig, SimpleStepper, SimpleStepperFooterClassKey, SimpleStepperStep, SimpleStepperStepClassKey, StatusAborted, StatusClassKey, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, StructuredMetadataTableListClassKey, StructuredMetadataTableNestedListClassKey, SubmenuOptions, SubvalueCell, SubvalueCellClassKey, SupportButton, SupportButtonClassKey, SupportConfig, SupportItem, SupportItemLink, Tab, TabBarClassKey, TabClassKey, TabIconClassKey, TabbedCard, TabbedCardClassKey, TabbedLayout, Table, TableClassKey, TableColumn, TableFilter, TableFiltersClassKey, TableHeaderClassKey, TableProps, TableState, TableToolbarClassKey, Tabs, TabsClassKey, TrendLine, UserIcon, UserIdentity, WarningIcon, WarningPanel, WarningPanelClassKey, sidebarConfig, useContent, useQueryParamState, useSupportConfig };
package/dist/index.esm.js CHANGED
@@ -71,6 +71,7 @@ import Checkbox from '@material-ui/core/Checkbox';
71
71
  import Chip from '@material-ui/core/Chip';
72
72
  import FormControl from '@material-ui/core/FormControl';
73
73
  import InputBase from '@material-ui/core/InputBase';
74
+ import InputLabel from '@material-ui/core/InputLabel';
74
75
  import MenuItem from '@material-ui/core/MenuItem';
75
76
  import Select from '@material-ui/core/Select';
76
77
  import SvgIcon from '@material-ui/core/SvgIcon';
@@ -131,9 +132,10 @@ import { useForm } from 'react-hook-form';
131
132
  import FormHelperText from '@material-ui/core/FormHelperText';
132
133
  import isEmpty from 'lodash/isEmpty';
133
134
 
134
- function AlertDisplay(_props) {
135
+ function AlertDisplay(props) {
135
136
  const [messages, setMessages] = useState([]);
136
137
  const alertApi = useApi(alertApiRef);
138
+ const { anchorOrigin = { vertical: "top", horizontal: "center" } } = props;
137
139
  useEffect(() => {
138
140
  const subscription = alertApi.alert$().subscribe((message) => setMessages((msgs) => msgs.concat(message)));
139
141
  return () => {
@@ -149,7 +151,7 @@ function AlertDisplay(_props) {
149
151
  };
150
152
  return /* @__PURE__ */ React.createElement(Snackbar, {
151
153
  open: true,
152
- anchorOrigin: { vertical: "top", horizontal: "center" }
154
+ anchorOrigin
153
155
  }, /* @__PURE__ */ React.createElement(Alert, {
154
156
  action: /* @__PURE__ */ React.createElement(IconButton, {
155
157
  color: "inherit",
@@ -178,7 +180,7 @@ function extractInitials(value) {
178
180
  return (_a = value.match(/\b\w/g)) == null ? void 0 : _a.join("").substring(0, 2);
179
181
  }
180
182
 
181
- const useStyles$R = makeStyles((theme) => createStyles({
183
+ const useStyles$S = makeStyles((theme) => createStyles({
182
184
  avatar: {
183
185
  width: "4rem",
184
186
  height: "4rem",
@@ -190,18 +192,33 @@ const useStyles$R = makeStyles((theme) => createStyles({
190
192
  }), { name: "BackstageAvatar" });
191
193
  function Avatar(props) {
192
194
  const { displayName, picture, customStyles } = props;
193
- const classes = useStyles$R();
195
+ const classes = useStyles$S();
196
+ let styles = { ...customStyles };
197
+ if (!picture) {
198
+ styles = {
199
+ backgroundColor: stringToColor(displayName || ""),
200
+ ...customStyles
201
+ };
202
+ }
194
203
  return /* @__PURE__ */ React.createElement(MaterialAvatar, {
195
204
  alt: displayName,
196
205
  src: picture,
197
206
  className: classes.avatar,
198
- style: {
199
- backgroundColor: stringToColor(displayName || picture || ""),
200
- ...customStyles
201
- }
207
+ style: styles
202
208
  }, displayName && extractInitials(displayName));
203
209
  }
204
210
 
211
+ const useStyles$R = makeStyles({
212
+ visuallyHidden: {
213
+ clip: "rect(0 0 0 0)",
214
+ clipPath: "inset(50%)",
215
+ overflow: "hidden",
216
+ position: "absolute",
217
+ whiteSpace: "nowrap",
218
+ height: 1,
219
+ width: 1
220
+ }
221
+ }, { name: "Link" });
205
222
  const isExternalUri = (uri) => /^([a-z+.-]+):/.test(uri);
206
223
  const getNodeText = (node) => {
207
224
  var _a;
@@ -217,6 +234,7 @@ const getNodeText = (node) => {
217
234
  return "";
218
235
  };
219
236
  const Link = React.forwardRef(({ onClick, noTrack, ...props }, ref) => {
237
+ const classes = useStyles$R();
220
238
  const analytics = useAnalytics();
221
239
  const to = String(props.to);
222
240
  const linkText = getNodeText(props.children) || to;
@@ -234,7 +252,9 @@ const Link = React.forwardRef(({ onClick, noTrack, ...props }, ref) => {
234
252
  onClick: handleClick,
235
253
  ...newWindow ? { target: "_blank", rel: "noopener" } : {},
236
254
  ...props
237
- }) : /* @__PURE__ */ React.createElement(Link$1, {
255
+ }, props.children, /* @__PURE__ */ React.createElement("span", {
256
+ className: classes.visuallyHidden
257
+ }, ", Opens in a new window")) : /* @__PURE__ */ React.createElement(Link$1, {
238
258
  ref,
239
259
  component: Link$2,
240
260
  onClick: handleClick,
@@ -1702,7 +1722,6 @@ const LoginRequestListItem = ({ request, busy, setBusy }) => {
1702
1722
  };
1703
1723
  const IconComponent = request.provider.icon;
1704
1724
  return /* @__PURE__ */ React.createElement(ListItem, {
1705
- button: true,
1706
1725
  disabled: busy,
1707
1726
  classes: { root: classes.root }
1708
1727
  }, /* @__PURE__ */ React.createElement(ListItemAvatar, null, /* @__PURE__ */ React.createElement(IconComponent, {
@@ -1726,6 +1745,9 @@ const useStyles$A = makeStyles((theme) => ({
1726
1745
  title: {
1727
1746
  minWidth: 0
1728
1747
  },
1748
+ titleHeading: {
1749
+ fontSize: theme.typography.h6.fontSize
1750
+ },
1729
1751
  contentList: {
1730
1752
  padding: 0
1731
1753
  },
@@ -1745,10 +1767,15 @@ function OAuthRequestDialog(_props) {
1745
1767
  open: Boolean(requests.length),
1746
1768
  fullWidth: true,
1747
1769
  maxWidth: "xs",
1748
- classes: { paper: classes.dialog }
1749
- }, /* @__PURE__ */ React.createElement(DialogTitle, {
1750
- classes: { root: classes.title }
1751
- }, "Login Required"), /* @__PURE__ */ React.createElement(DialogContent, {
1770
+ classes: { paper: classes.dialog },
1771
+ "aria-labelledby": "oauth-req-dialog-title"
1772
+ }, /* @__PURE__ */ React.createElement("main", null, /* @__PURE__ */ React.createElement(DialogTitle, {
1773
+ classes: { root: classes.title },
1774
+ id: "oauth-req-dialog-title"
1775
+ }, /* @__PURE__ */ React.createElement(Typography, {
1776
+ className: classes.titleHeading,
1777
+ variant: "h1"
1778
+ }, "Login Required")), /* @__PURE__ */ React.createElement(DialogContent, {
1752
1779
  dividers: true,
1753
1780
  classes: { root: classes.contentList }
1754
1781
  }, /* @__PURE__ */ React.createElement(List, null, requests.map((request) => /* @__PURE__ */ React.createElement(LoginRequestListItem, {
@@ -1756,7 +1783,7 @@ function OAuthRequestDialog(_props) {
1756
1783
  request,
1757
1784
  busy,
1758
1785
  setBusy
1759
- })))), /* @__PURE__ */ React.createElement(DialogActions, {
1786
+ }))))), /* @__PURE__ */ React.createElement(DialogActions, {
1760
1787
  classes: { root: classes.actionButtons }
1761
1788
  }, /* @__PURE__ */ React.createElement(Button$1, {
1762
1789
  onClick: handleRejectAll
@@ -2249,6 +2276,16 @@ const useStyles$s = makeStyles((theme) => createStyles({
2249
2276
  color: theme.palette.text.primary
2250
2277
  }
2251
2278
  },
2279
+ formLabel: {
2280
+ transform: "initial",
2281
+ fontWeight: "bold",
2282
+ fontSize: 14,
2283
+ fontFamily: theme.typography.fontFamily,
2284
+ color: theme.palette.text.primary,
2285
+ "&.Mui-focused": {
2286
+ color: theme.palette.text.primary
2287
+ }
2288
+ },
2252
2289
  chips: {
2253
2290
  display: "flex",
2254
2291
  flexWrap: "wrap"
@@ -2311,13 +2348,13 @@ function SelectComponent(props) {
2311
2348
  };
2312
2349
  return /* @__PURE__ */ React.createElement("div", {
2313
2350
  className: classes.root
2314
- }, /* @__PURE__ */ React.createElement(Typography, {
2315
- variant: "button"
2316
- }, label), /* @__PURE__ */ React.createElement(ClickAwayListener, {
2351
+ }, /* @__PURE__ */ React.createElement(ClickAwayListener, {
2317
2352
  onClickAway: handleClickAway
2318
2353
  }, /* @__PURE__ */ React.createElement(FormControl, {
2319
2354
  className: classes.formControl
2320
- }, /* @__PURE__ */ React.createElement(Select, {
2355
+ }, /* @__PURE__ */ React.createElement(InputLabel, {
2356
+ className: classes.formLabel
2357
+ }, label), /* @__PURE__ */ React.createElement(Select, {
2321
2358
  value,
2322
2359
  native,
2323
2360
  disabled,
@@ -2328,6 +2365,8 @@ function SelectComponent(props) {
2328
2365
  onClick: handleClick,
2329
2366
  open: isOpen,
2330
2367
  input: /* @__PURE__ */ React.createElement(BootstrapInput, null),
2368
+ label,
2369
+ tabIndex: 0,
2331
2370
  renderValue: (s) => {
2332
2371
  var _a;
2333
2372
  return multiple && value.length !== 0 ? /* @__PURE__ */ React.createElement("div", {
@@ -2940,6 +2979,7 @@ function SupportButton(props) {
2940
2979
  "data-testid": "support-button"
2941
2980
  }, /* @__PURE__ */ React.createElement(HelpIcon, null)) : /* @__PURE__ */ React.createElement(Button$1, {
2942
2981
  "data-testid": "support-button",
2982
+ "aria-label": "support",
2943
2983
  color: "primary",
2944
2984
  onClick: onClickHandler,
2945
2985
  startIcon: /* @__PURE__ */ React.createElement(HelpIcon, null)
@@ -3040,17 +3080,17 @@ const LocalStorage = {
3040
3080
  };
3041
3081
 
3042
3082
  const useStyles$n = makeStyles((theme) => ({
3043
- root: (props) => ({
3083
+ root: {
3044
3084
  width: "100%",
3045
3085
  transition: "padding-left 0.1s ease-out",
3046
3086
  isolation: "isolate",
3047
3087
  [theme.breakpoints.up("sm")]: {
3048
- paddingLeft: () => props.isPinned ? props.sidebarConfig.drawerWidthOpen : props.sidebarConfig.drawerWidthClosed
3088
+ paddingLeft: (props) => props.isPinned ? props.sidebarConfig.drawerWidthOpen : props.sidebarConfig.drawerWidthClosed
3049
3089
  },
3050
3090
  [theme.breakpoints.down("xs")]: {
3051
- paddingBottom: props.sidebarConfig.mobileSidebarHeight
3091
+ paddingBottom: (props) => props.sidebarConfig.mobileSidebarHeight
3052
3092
  }
3053
- }),
3093
+ },
3054
3094
  content: {
3055
3095
  zIndex: 0,
3056
3096
  isolation: "isolate",
@@ -3218,7 +3258,9 @@ const OverlayMenu = ({
3218
3258
  }, label), /* @__PURE__ */ React.createElement(IconButton, {
3219
3259
  onClick: onClose,
3220
3260
  classes: { root: classes.overlayHeaderClose }
3221
- }, /* @__PURE__ */ React.createElement(CloseIcon, null))), /* @__PURE__ */ React.createElement(Box, null, children));
3261
+ }, /* @__PURE__ */ React.createElement(CloseIcon, null))), /* @__PURE__ */ React.createElement(Box, {
3262
+ component: "nav"
3263
+ }, children));
3222
3264
  };
3223
3265
  const MobileSidebarContext = createContext({
3224
3266
  selectedMenuItemIndex: -1,
@@ -3257,7 +3299,8 @@ const MobileSidebar = (props) => {
3257
3299
  onClose: () => setSelectedMenuItemIndex(-1)
3258
3300
  }, sidebarGroups[selectedMenuItemIndex] && sidebarGroups[selectedMenuItemIndex].props.children), /* @__PURE__ */ React.createElement(BottomNavigation, {
3259
3301
  className: classes.root,
3260
- "data-testid": "mobile-sidebar-root"
3302
+ "data-testid": "mobile-sidebar-root",
3303
+ component: "nav"
3261
3304
  }, sidebarGroups)));
3262
3305
  };
3263
3306
 
@@ -3360,8 +3403,9 @@ const DesktopSidebar = (props) => {
3360
3403
  toggleSidebarPinState();
3361
3404
  }
3362
3405
  };
3363
- return /* @__PURE__ */ React.createElement("div", {
3364
- style: {}
3406
+ return /* @__PURE__ */ React.createElement("nav", {
3407
+ style: {},
3408
+ "aria-label": "sidebar nav"
3365
3409
  }, /* @__PURE__ */ React.createElement(A11ySkipSidebar, null), /* @__PURE__ */ React.createElement(SidebarContext.Provider, {
3366
3410
  value: { isOpen, setOpen }
3367
3411
  }, /* @__PURE__ */ React.createElement("div", {
@@ -3445,7 +3489,10 @@ const useStyles$j = makeStyles((theme) => ({
3445
3489
  label: {
3446
3490
  margin: 14,
3447
3491
  marginLeft: 7,
3448
- fontSize: 14
3492
+ fontSize: 14,
3493
+ whiteSpace: "nowrap",
3494
+ overflow: "hidden",
3495
+ "text-overflow": "ellipsis"
3449
3496
  },
3450
3497
  dropdownArrow: {
3451
3498
  position: "absolute",
@@ -3458,17 +3505,20 @@ const useStyles$j = makeStyles((theme) => ({
3458
3505
  },
3459
3506
  dropdownItem: {
3460
3507
  width: "100%",
3461
- padding: "10px 0 10px 0"
3508
+ padding: "10px 0 10px 0",
3509
+ "&:hover": {
3510
+ background: "#6f6f6f",
3511
+ color: theme.palette.navigation.selectedColor
3512
+ }
3462
3513
  },
3463
3514
  textContent: {
3464
3515
  color: theme.palette.navigation.color,
3465
- display: "flex",
3466
- justifyContent: "center",
3467
- [theme.breakpoints.down("xs")]: {
3468
- display: "block",
3469
- paddingLeft: theme.spacing(4)
3470
- },
3471
- fontSize: "14px"
3516
+ paddingLeft: theme.spacing(4),
3517
+ paddingRight: theme.spacing(1),
3518
+ fontSize: "14px",
3519
+ whiteSpace: "nowrap",
3520
+ overflow: "hidden",
3521
+ "text-overflow": "ellipsis"
3472
3522
  }
3473
3523
  }), { name: "BackstageSidebarSubmenuItem" });
3474
3524
  const SidebarSubmenuItem = (props) => {
@@ -3478,7 +3528,7 @@ const SidebarSubmenuItem = (props) => {
3478
3528
  const closeSubmenu = () => {
3479
3529
  setIsHoveredOn(false);
3480
3530
  };
3481
- const toLocation = useResolvedPath(to);
3531
+ const toLocation = useResolvedPath(to != null ? to : "");
3482
3532
  const currentLocation = useLocation();
3483
3533
  let isActive = isLocationMatch(currentLocation, toLocation);
3484
3534
  const [showDropDown, setShowDropDown] = useState(false);
@@ -3493,11 +3543,15 @@ const SidebarSubmenuItem = (props) => {
3493
3543
  });
3494
3544
  return /* @__PURE__ */ React.createElement("div", {
3495
3545
  className: classes.itemContainer
3546
+ }, /* @__PURE__ */ React.createElement(Tooltip, {
3547
+ title,
3548
+ enterDelay: 500,
3549
+ enterNextDelay: 500
3496
3550
  }, /* @__PURE__ */ React.createElement("button", {
3497
3551
  onClick: handleClickDropdown,
3498
3552
  onTouchStart: (e) => e.stopPropagation(),
3499
3553
  className: classNames(classes.item, isActive ? classes.selected : void 0)
3500
- }, /* @__PURE__ */ React.createElement(Icon, {
3554
+ }, Icon && /* @__PURE__ */ React.createElement(Icon, {
3501
3555
  fontSize: "small"
3502
3556
  }), /* @__PURE__ */ React.createElement(Typography, {
3503
3557
  variant: "subtitle1",
@@ -3506,33 +3560,41 @@ const SidebarSubmenuItem = (props) => {
3506
3560
  className: classes.dropdownArrow
3507
3561
  }) : /* @__PURE__ */ React.createElement(ArrowDropDownIcon, {
3508
3562
  className: classes.dropdownArrow
3509
- })), dropdownItems && showDropDown && /* @__PURE__ */ React.createElement("div", {
3563
+ }))), dropdownItems && showDropDown && /* @__PURE__ */ React.createElement("div", {
3510
3564
  className: classes.dropdown
3511
- }, dropdownItems.map((object, key) => /* @__PURE__ */ React.createElement(Link, {
3565
+ }, dropdownItems.map((object, key) => /* @__PURE__ */ React.createElement(Tooltip, {
3566
+ key,
3567
+ title: object.title,
3568
+ enterDelay: 500,
3569
+ enterNextDelay: 500
3570
+ }, /* @__PURE__ */ React.createElement(Link, {
3512
3571
  to: object.to,
3513
3572
  underline: "none",
3514
3573
  className: classes.dropdownItem,
3515
3574
  onClick: closeSubmenu,
3516
- onTouchStart: (e) => e.stopPropagation(),
3517
- key
3575
+ onTouchStart: (e) => e.stopPropagation()
3518
3576
  }, /* @__PURE__ */ React.createElement(Typography, {
3519
3577
  className: classes.textContent
3520
- }, object.title)))));
3578
+ }, object.title))))));
3521
3579
  }
3522
3580
  return /* @__PURE__ */ React.createElement("div", {
3523
3581
  className: classes.itemContainer
3582
+ }, /* @__PURE__ */ React.createElement(Tooltip, {
3583
+ title,
3584
+ enterDelay: 500,
3585
+ enterNextDelay: 500
3524
3586
  }, /* @__PURE__ */ React.createElement(Link, {
3525
3587
  to,
3526
3588
  underline: "none",
3527
3589
  className: classNames(classes.item, isActive ? classes.selected : void 0),
3528
3590
  onClick: closeSubmenu,
3529
3591
  onTouchStart: (e) => e.stopPropagation()
3530
- }, /* @__PURE__ */ React.createElement(Icon, {
3592
+ }, Icon && /* @__PURE__ */ React.createElement(Icon, {
3531
3593
  fontSize: "small"
3532
3594
  }), /* @__PURE__ */ React.createElement(Typography, {
3533
3595
  variant: "subtitle1",
3534
3596
  className: classes.label
3535
- }, title)));
3597
+ }, title))));
3536
3598
  };
3537
3599
 
3538
3600
  const useStyles$i = makeStyles((theme) => ({
@@ -5513,7 +5575,7 @@ function Page(props) {
5513
5575
  ...baseTheme,
5514
5576
  page: baseTheme.getPageTheme({ themeId })
5515
5577
  })
5516
- }, /* @__PURE__ */ React.createElement("div", {
5578
+ }, /* @__PURE__ */ React.createElement("main", {
5517
5579
  className: classes.root
5518
5580
  }, children));
5519
5581
  }