@ndlib/component-library 0.0.73 → 0.0.74

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.
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import _ChevronRightIcon from '@mui/icons-material/ChevronRight';
3
+ import { ArrowLink } from '../../elements/ArrowLink';
3
4
  import { List, ListItem } from '../../elements/List';
4
5
  import { MENU_ACTION_TYPE, useMenu } from '../../providers/menu';
5
6
  import { Row } from '../../elements/layout/Row';
@@ -29,17 +30,18 @@ export const NavMenu = (props) => {
29
30
  borderColor: COLOR.EXTRA_LIGHT_GRAY,
30
31
  borderRadius: '4px',
31
32
  margin: '0px 10px 0px 10px',
32
- } }, { children: [_jsx(Column, { sx: { flexGrow: 1 } }), submenu.items.map((submenuItem) => {
33
+ } }, { children: [_jsx(Column, { sx: { flexGrow: 1 } }), submenu.items.map((submenuItem, i) => {
33
34
  if (!(submenuItem.action.type === MENU_ACTION_TYPE.SUBMENU)) {
34
35
  return null;
35
36
  }
36
37
  const leafMenuItems = submenuItem.action.submenu.items;
37
38
  const submenuPath = [topLevelMenuId, submenuItem.id];
39
+ const category = topLevelMenuId[0].toUpperCase() + topLevelMenuId.slice(1);
38
40
  return (_jsxs(Column, Object.assign({ sx: { flexBasis: '275px', p: 2, flexShrink: 0, flexGrow: 0 } }, { children: [_jsx(Heading, Object.assign({ standalone: true, size: HEADING_SIZE.SM, underline: true }, getMenuItemProps(submenuPath), { children: submenuItem.label })), _jsx(List, Object.assign({}, getMenuProps(submenuPath), { icon: ChevronRightIcon }, { children: leafMenuItems.map((leafMenuItem, i) => {
39
41
  const leafMenuPath = submenuPath.concat(leafMenuItem.id);
40
42
  return (_jsx(ListItem, Object.assign({ index: i, sx: { mt: 1 } }, getMenuItemProps(leafMenuPath), { children: _jsx(Link, Object.assign({ to: "/", sx: {
41
43
  fontWeight: FONT_WEIGHT.BOLD,
42
44
  }, tabIndex: -1 }, { children: leafMenuItem.label })) }), leafMenuItem.id));
43
- }) }))] }), submenuItem.id));
45
+ }) })), i < 1 && category === 'Research' && 'Services' ? (_jsxs(ArrowLink, Object.assign({ to: category, sx: { margin: '20px 10px 10px 10px' } }, { children: ["View More ", category] }))) : null] }), submenuItem.id));
44
46
  }), _jsx(Column, { sx: { flexGrow: 1 } })] })));
45
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndlib/component-library",
3
- "version": "0.0.73",
3
+ "version": "0.0.74",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [