grep-components 1.15.0-grepf-1792.4 → 1.15.0-grepf-1792.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.
@@ -1,7 +1,9 @@
1
1
  export declare type UserMenuItem = {
2
2
  id: string;
3
3
  label: string;
4
- action: () => void;
4
+ action?: () => void;
5
+ isAnchor?: boolean;
6
+ href?: string;
5
7
  };
6
8
  export interface IAuthorizedPage {
7
9
  name: string;
package/dist/index.js CHANGED
@@ -21735,25 +21735,49 @@ var EnvironmentTitle = styled('div')(function () { return ({
21735
21735
  color: 'rgba(0, 0, 0, 0.33)',
21736
21736
  marginLeft: '17px',
21737
21737
  }); });
21738
- var Toolbar = styled('div')(function () { return ({
21739
- display: 'flex',
21740
- flexDirection: 'column',
21741
- height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21742
- minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21743
- maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21744
- }); });
21745
- var ToolbarFixer = styled('div')(function () { return ({
21746
- display: 'flex',
21747
- flexDirection: 'column',
21748
- height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21749
- minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21750
- maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21751
- position: 'fixed',
21752
- top: 0,
21753
- left: 0,
21754
- right: 0,
21755
- zIndex: 101,
21756
- }); });
21738
+ var Toolbar = styled('div')(function (_a) {
21739
+ var _b;
21740
+ var theme = _a.theme;
21741
+ return (_b = {
21742
+ display: 'flex',
21743
+ flexDirection: 'column'
21744
+ },
21745
+ _b[theme.breakpoints.down('sm')] = {
21746
+ height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
21747
+ minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
21748
+ maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
21749
+ },
21750
+ _b[theme.breakpoints.up('sm')] = {
21751
+ height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21752
+ minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21753
+ maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21754
+ },
21755
+ _b);
21756
+ });
21757
+ var ToolbarFixer = styled('div')(function (_a) {
21758
+ var _b;
21759
+ var theme = _a.theme;
21760
+ return (_b = {
21761
+ display: 'flex',
21762
+ flexDirection: 'column',
21763
+ position: 'fixed',
21764
+ top: 0,
21765
+ left: 0,
21766
+ right: 0,
21767
+ zIndex: 101
21768
+ },
21769
+ _b[theme.breakpoints.down('sm')] = {
21770
+ height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
21771
+ minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
21772
+ maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeightMobile, "px"),
21773
+ },
21774
+ _b[theme.breakpoints.up('sm')] = {
21775
+ height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21776
+ minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21777
+ maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
21778
+ },
21779
+ _b);
21780
+ });
21757
21781
  var ToolbarInner = styled('div')(function (_a) {
21758
21782
  var _b;
21759
21783
  var colors = _a.colors, theme = _a.theme;
@@ -21974,8 +21998,11 @@ var MobileAppBar = function (_a) {
21974
21998
  } }, userMenuItems.map(function (i, index) { return (React.createElement(Box, { key: i.id },
21975
21999
  React.createElement(MenuItem, { key: i.id, onClick: function () {
21976
22000
  handleCloseMenu();
21977
- i.action();
21978
- } }, i.label),
22001
+ i.action && i.action();
22002
+ } }, i.isAnchor ? (React.createElement("a", { style: {
22003
+ textDecoration: 'inherit',
22004
+ color: 'inherit',
22005
+ }, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
21979
22006
  userMenuItems.length > index + 1 && React.createElement(Divider, null))); }))))));
21980
22007
  };
21981
22008
 
@@ -22019,8 +22046,11 @@ var AppBar = function (_a) {
22019
22046
  return (React.createElement(Box, { key: i.id },
22020
22047
  React.createElement(MenuItem$1, { key: i.id, onClick: function () {
22021
22048
  setUserMenuAnchor(null);
22022
- i.action();
22023
- } }, i.label),
22049
+ i.action && i.action();
22050
+ } }, i.isAnchor ? (React.createElement("a", { style: {
22051
+ textDecoration: 'inherit',
22052
+ color: 'inherit',
22053
+ }, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
22024
22054
  userMenuItems.length > index + 1 && React.createElement(Divider$1, null)));
22025
22055
  })))),
22026
22056
  React.createElement(ToolbarMenu, null,