grep-components 1.15.0-grepf-1792.1 → 1.15.0-grepf-1792.3
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/dist/components/AppBarNew/MainAppStyles.d.ts +14 -20
- package/dist/index.js +45 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Theme, MUIStyledCommonProps } from '@mui/system';
|
|
3
2
|
import { v0colors } from './types';
|
|
4
3
|
export declare const dimensions: {
|
|
5
4
|
breadcrumbsFontSize: number;
|
|
@@ -12,26 +11,21 @@ export declare const dimensions: {
|
|
|
12
11
|
toolbarMenuWidth: number;
|
|
13
12
|
toolbarMenuHeight: number;
|
|
14
13
|
};
|
|
15
|
-
export declare const ToolbarTitle: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
16
|
-
export declare const EnvironmentTitle: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
-
export declare const Toolbar: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
14
|
+
export declare const ToolbarTitle: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
15
|
+
export declare const EnvironmentTitle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
export declare const Toolbar: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
18
17
|
colors: v0colors;
|
|
19
18
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
-
export declare const ToolbarFixer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
19
|
+
export declare const ToolbarFixer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
21
20
|
colors: v0colors;
|
|
22
21
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
-
export declare const ToolbarInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
-
export declare const ToolbarLeft: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
25
|
-
export declare const ToolbarRight: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
|
-
export declare const UserContainer: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
27
|
-
export declare const AccountName: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
28
|
-
export declare const ToolbarMenu: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export declare const
|
|
32
|
-
|
|
33
|
-
} & MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
34
|
-
export declare const ToolbarMenuInner: import("@emotion/styled").StyledComponent<MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
35
|
-
export declare const ToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
36
|
-
colors: v0colors;
|
|
37
|
-
}, {}, {}>;
|
|
22
|
+
export declare const ToolbarInner: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
+
export declare const ToolbarLeft: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const ToolbarRight: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
25
|
+
export declare const UserContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
|
+
export declare const AccountName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
27
|
+
export declare const ToolbarMenu: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
28
|
+
export declare const MobileToolbarMenu: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
29
|
+
export declare const ToolbarMenuInner: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
30
|
+
export declare const ToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
31
|
+
export declare const MobileToolbarMenuItem: import("@emotion/styled").StyledComponent<import("react-router-dom").NavLinkProps<unknown> & import("react").RefAttributes<HTMLAnchorElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,7 @@ export { ContentState } from 'draft-js';
|
|
|
40
40
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
41
41
|
import FormatBold from '@mui/icons-material/FormatBold';
|
|
42
42
|
import FormatItalic from '@mui/icons-material/FormatItalic';
|
|
43
|
+
import Divider$1 from '@mui/material/Divider';
|
|
43
44
|
import Menu$2 from '@mui/material/Menu';
|
|
44
45
|
import MenuItem$1 from '@mui/material/MenuItem';
|
|
45
46
|
import Button$1 from '@mui/material/Button';
|
|
@@ -21765,7 +21766,7 @@ var Toolbar = styled('div')(function (_a) {
|
|
|
21765
21766
|
return ({
|
|
21766
21767
|
display: 'flex',
|
|
21767
21768
|
flexDirection: 'column',
|
|
21768
|
-
backgroundColor:
|
|
21769
|
+
backgroundColor: colors.headerBackgroundColor,
|
|
21769
21770
|
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21770
21771
|
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21771
21772
|
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
@@ -21776,7 +21777,7 @@ var ToolbarFixer = styled('div')(function (_a) {
|
|
|
21776
21777
|
return ({
|
|
21777
21778
|
display: 'flex',
|
|
21778
21779
|
flexDirection: 'column',
|
|
21779
|
-
backgroundColor:
|
|
21780
|
+
backgroundColor: colors.headerBackgroundColor,
|
|
21780
21781
|
height: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21781
21782
|
minHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
21782
21783
|
maxHeight: "".concat(dimensions.toolbarMenuHeight + dimensions.toolbarHeight, "px"),
|
|
@@ -21845,12 +21846,9 @@ var AccountName = styled('span')(function () { return ({
|
|
|
21845
21846
|
}); });
|
|
21846
21847
|
var ToolbarMenu = styled('div')(function (_a) {
|
|
21847
21848
|
var _b;
|
|
21848
|
-
var theme = _a.theme
|
|
21849
|
-
if (!theme) {
|
|
21850
|
-
return {};
|
|
21851
|
-
}
|
|
21849
|
+
var theme = _a.theme;
|
|
21852
21850
|
return _b = {
|
|
21853
|
-
backgroundColor:
|
|
21851
|
+
backgroundColor: theme.palette.primary.main,
|
|
21854
21852
|
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21855
21853
|
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21856
21854
|
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
@@ -21870,12 +21868,9 @@ var ToolbarMenu = styled('div')(function (_a) {
|
|
|
21870
21868
|
});
|
|
21871
21869
|
var MobileToolbarMenu = styled('div')(function (_a) {
|
|
21872
21870
|
var _b;
|
|
21873
|
-
var theme = _a.theme
|
|
21874
|
-
|
|
21875
|
-
|
|
21876
|
-
}
|
|
21877
|
-
return _b = {
|
|
21878
|
-
backgroundColor: "".concat(colors.primary),
|
|
21871
|
+
var theme = _a.theme;
|
|
21872
|
+
return (_b = {
|
|
21873
|
+
backgroundColor: theme.palette.primary.main,
|
|
21879
21874
|
height: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21880
21875
|
maxHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
21881
21876
|
minHeight: "".concat(dimensions.toolbarMenuHeight, "px"),
|
|
@@ -21891,7 +21886,7 @@ var MobileToolbarMenu = styled('div')(function (_a) {
|
|
|
21891
21886
|
_b[theme.breakpoints.up('sm')] = {
|
|
21892
21887
|
display: 'none',
|
|
21893
21888
|
},
|
|
21894
|
-
_b;
|
|
21889
|
+
_b);
|
|
21895
21890
|
});
|
|
21896
21891
|
var ToolbarMenuInner = styled('div')(function (_a) {
|
|
21897
21892
|
var _b;
|
|
@@ -21913,11 +21908,11 @@ var ToolbarMenuInner = styled('div')(function (_a) {
|
|
|
21913
21908
|
});
|
|
21914
21909
|
var menuItemHoverGreen = '#B9E1CC';
|
|
21915
21910
|
var ToolbarMenuItem = styled(NavLink)(function (_a) {
|
|
21916
|
-
var
|
|
21911
|
+
var theme = _a.theme;
|
|
21917
21912
|
return ({
|
|
21918
21913
|
alignItems: 'center',
|
|
21919
21914
|
borderRight: '1px solid #696868',
|
|
21920
|
-
color:
|
|
21915
|
+
color: theme.palette.background.default,
|
|
21921
21916
|
cursor: 'pointer',
|
|
21922
21917
|
display: 'flex',
|
|
21923
21918
|
fontSize: '1.1rem',
|
|
@@ -21942,7 +21937,7 @@ var ToolbarMenuItem = styled(NavLink)(function (_a) {
|
|
|
21942
21937
|
left: '50%',
|
|
21943
21938
|
width: '32px',
|
|
21944
21939
|
marginLeft: '-16px',
|
|
21945
|
-
borderBottom: "2px solid ".concat(
|
|
21940
|
+
borderBottom: "2px solid ".concat(theme.palette.secondary.main),
|
|
21946
21941
|
opacity: 0,
|
|
21947
21942
|
content: '""',
|
|
21948
21943
|
transition: 'all 0.3s ease',
|
|
@@ -21960,10 +21955,21 @@ var ToolbarMenuItem = styled(NavLink)(function (_a) {
|
|
|
21960
21955
|
opacity: '1',
|
|
21961
21956
|
},
|
|
21962
21957
|
});
|
|
21963
|
-
});
|
|
21958
|
+
});
|
|
21959
|
+
var MobileToolbarMenuItem = styled(NavLink)(function () { return ({
|
|
21960
|
+
alignItems: 'center',
|
|
21961
|
+
color: 'black',
|
|
21962
|
+
cursor: 'pointer',
|
|
21963
|
+
display: 'flex',
|
|
21964
|
+
height: '100%',
|
|
21965
|
+
textTransform: 'capitalize',
|
|
21966
|
+
userSelect: 'none',
|
|
21967
|
+
position: 'relative',
|
|
21968
|
+
textDecoration: 'none',
|
|
21969
|
+
}); });
|
|
21964
21970
|
|
|
21965
21971
|
var MobileAppBar = function (_a) {
|
|
21966
|
-
var userMenuItems = _a.userMenuItems, menuItems = _a.menuItems
|
|
21972
|
+
var userMenuItems = _a.userMenuItems, menuItems = _a.menuItems;
|
|
21967
21973
|
var _b = __read(React.useState(null), 2), anchorElNav = _b[0], setAnchorElNav = _b[1];
|
|
21968
21974
|
var openNav = Boolean(anchorElNav);
|
|
21969
21975
|
var handleClickNav = function (event) {
|
|
@@ -21980,23 +21986,27 @@ var MobileAppBar = function (_a) {
|
|
|
21980
21986
|
var handleCloseMenu = function () {
|
|
21981
21987
|
setAnchorElMenu(null);
|
|
21982
21988
|
};
|
|
21983
|
-
return (React.createElement(MobileToolbarMenu, {
|
|
21989
|
+
return (React.createElement(MobileToolbarMenu, { style: { flexGrow: 1 } },
|
|
21984
21990
|
React.createElement(AppBar$3, { position: "static" },
|
|
21985
21991
|
React.createElement(Toolbar$1, { style: { minHeight: '50px' } },
|
|
21986
21992
|
React.createElement(IconButton, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
21987
21993
|
React.createElement(Menu$1, { sx: { color: 'white' } })),
|
|
21988
21994
|
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
21989
21995
|
'aria-labelledby': 'basic-button',
|
|
21990
|
-
} }, menuItems.map(function (page) { return (React.createElement(
|
|
21991
|
-
React.createElement(MenuItem, {
|
|
21996
|
+
} }, menuItems.map(function (page) { return (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|
|
21997
|
+
React.createElement(MenuItem, { sx: {
|
|
21998
|
+
width: '100%',
|
|
21999
|
+
}, key: page.name }, page.translatedTextRef))); })),
|
|
21992
22000
|
React.createElement(IconButton, { size: "medium", edge: "end", color: "inherit", "aria-label": "menu", style: { marginLeft: 'auto' }, onClick: handleClickMenu },
|
|
21993
22001
|
React.createElement(MoreVert, { sx: { color: 'white' } })),
|
|
21994
22002
|
React.createElement(Menu, { id: "basic-menu", anchorEl: anchorElMenu, open: openMenu, onClose: handleCloseMenu, MenuListProps: {
|
|
21995
22003
|
'aria-labelledby': 'basic-button',
|
|
21996
|
-
} }, userMenuItems.map(function (i) { return (React.createElement(
|
|
21997
|
-
|
|
21998
|
-
|
|
21999
|
-
|
|
22004
|
+
} }, userMenuItems.map(function (i, index) { return (React.createElement(Box, { key: i.id },
|
|
22005
|
+
React.createElement(MenuItem, { key: i.id, onClick: function () {
|
|
22006
|
+
handleCloseMenu();
|
|
22007
|
+
i.action();
|
|
22008
|
+
} }, i.label),
|
|
22009
|
+
userMenuItems.length > index + 1 && React.createElement(Divider, null))); }))))));
|
|
22000
22010
|
};
|
|
22001
22011
|
|
|
22002
22012
|
var AppBar = function (_a) {
|
|
@@ -22013,7 +22023,7 @@ var AppBar = function (_a) {
|
|
|
22013
22023
|
var isActive = (page === null || page === void 0 ? void 0 : page.exact)
|
|
22014
22024
|
? currentPath === page.redirectUrl
|
|
22015
22025
|
: currentPath.includes(page.redirectUrl || '');
|
|
22016
|
-
return (React.createElement(ToolbarMenuItem, { className: isActive ? 'active' : '', to: page.redirectUrl || '', key: page.name, tabIndex: 0
|
|
22026
|
+
return (React.createElement(ToolbarMenuItem, { className: isActive ? 'active' : '', to: page.redirectUrl || '', key: page.name, tabIndex: 0 }, page === null || page === void 0 ? void 0 : page.translatedTextRef));
|
|
22017
22027
|
};
|
|
22018
22028
|
return (React.createElement(Toolbar, { colors: colors },
|
|
22019
22029
|
React.createElement(ToolbarFixer, { colors: colors },
|
|
@@ -22035,13 +22045,15 @@ var AppBar = function (_a) {
|
|
|
22035
22045
|
}, transformOrigin: {
|
|
22036
22046
|
vertical: 'top',
|
|
22037
22047
|
horizontal: 'center',
|
|
22038
|
-
} }, userMenuItems.map(function (i) {
|
|
22039
|
-
return (React.createElement(
|
|
22040
|
-
|
|
22041
|
-
|
|
22042
|
-
|
|
22048
|
+
} }, userMenuItems.map(function (i, index) {
|
|
22049
|
+
return (React.createElement(Box, { key: i.id },
|
|
22050
|
+
React.createElement(MenuItem$1, { key: i.id, onClick: function () {
|
|
22051
|
+
setUserMenuAnchor(null);
|
|
22052
|
+
i.action();
|
|
22053
|
+
} }, i.label),
|
|
22054
|
+
userMenuItems.length > index + 1 && React.createElement(Divider$1, null)));
|
|
22043
22055
|
})))),
|
|
22044
|
-
React.createElement(ToolbarMenu,
|
|
22056
|
+
React.createElement(ToolbarMenu, null,
|
|
22045
22057
|
React.createElement(ToolbarMenuInner, null, menuItems.map(function (page) { return _renderToolbarMenuItem(page); }))),
|
|
22046
22058
|
React.createElement(MobileAppBar, { menuItems: menuItems, userMenuItems: userMenuItems, colors: colors }))));
|
|
22047
22059
|
};
|