@laerdal/life-react-components 1.8.0-dev.16 → 1.8.0-dev.18
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/Dropdown/CommonStyling.cjs +1 -1
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.js +1 -1
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +7 -3
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +7 -3
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/GlobalNavigationBar/Actions.cjs +185 -0
- package/dist/GlobalNavigationBar/Actions.cjs.map +1 -0
- package/dist/GlobalNavigationBar/Actions.d.ts +13 -0
- package/dist/GlobalNavigationBar/Actions.js +160 -0
- package/dist/GlobalNavigationBar/Actions.js.map +1 -0
- package/dist/GlobalNavigationBar/Avatar.cjs +104 -0
- package/dist/GlobalNavigationBar/Avatar.cjs.map +1 -0
- package/dist/GlobalNavigationBar/Avatar.d.ts +15 -0
- package/dist/GlobalNavigationBar/Avatar.js +77 -0
- package/dist/GlobalNavigationBar/Avatar.js.map +1 -0
- package/dist/GlobalNavigationBar/{desktop/ExtendedMainMenu.cjs → ExtendedMainMenu.cjs} +9 -7
- package/dist/GlobalNavigationBar/ExtendedMainMenu.cjs.map +1 -0
- package/dist/GlobalNavigationBar/{desktop/ExtendedMainMenu.d.ts → ExtendedMainMenu.d.ts} +2 -2
- package/dist/GlobalNavigationBar/{desktop/ExtendedMainMenu.js → ExtendedMainMenu.js} +6 -6
- package/dist/GlobalNavigationBar/ExtendedMainMenu.js.map +1 -0
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +176 -107
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.d.ts +27 -13
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js +176 -106
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
- package/dist/GlobalNavigationBar/Logo.cjs +5 -3
- package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
- package/dist/GlobalNavigationBar/Logo.js +1 -1
- package/dist/GlobalNavigationBar/Logo.js.map +1 -1
- package/dist/GlobalNavigationBar/{desktop/MainMenu.cjs → MainMenu.cjs} +21 -17
- package/dist/GlobalNavigationBar/MainMenu.cjs.map +1 -0
- package/dist/GlobalNavigationBar/MainMenu.d.ts +8 -0
- package/dist/GlobalNavigationBar/{desktop/MainMenu.js → MainMenu.js} +21 -17
- package/dist/GlobalNavigationBar/MainMenu.js.map +1 -0
- package/dist/GlobalNavigationBar/{desktop/RightSideNav.cjs → RightSideNav.cjs} +26 -22
- package/dist/GlobalNavigationBar/RightSideNav.cjs.map +1 -0
- package/dist/GlobalNavigationBar/RightSideNav.d.ts +8 -0
- package/dist/GlobalNavigationBar/RightSideNav.js +61 -0
- package/dist/GlobalNavigationBar/RightSideNav.js.map +1 -0
- package/dist/GlobalNavigationBar/UserMenu/MenuLink.cjs +112 -0
- package/dist/GlobalNavigationBar/UserMenu/MenuLink.cjs.map +1 -0
- package/dist/GlobalNavigationBar/UserMenu/MenuLink.d.ts +11 -0
- package/dist/GlobalNavigationBar/UserMenu/MenuLink.js +86 -0
- package/dist/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -0
- package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.cjs +178 -0
- package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.cjs.map +1 -0
- package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.d.ts +16 -0
- package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.js +146 -0
- package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -0
- package/dist/GlobalNavigationBar/UserMenu/UserMenu.cjs +168 -0
- package/dist/GlobalNavigationBar/UserMenu/UserMenu.cjs.map +1 -0
- package/dist/GlobalNavigationBar/UserMenu/UserMenu.d.ts +15 -0
- package/dist/GlobalNavigationBar/UserMenu/UserMenu.js +135 -0
- package/dist/GlobalNavigationBar/UserMenu/UserMenu.js.map +1 -0
- package/dist/GlobalNavigationBar/index.cjs +18 -15
- package/dist/GlobalNavigationBar/index.cjs.map +1 -1
- package/dist/GlobalNavigationBar/index.d.ts +2 -2
- package/dist/GlobalNavigationBar/index.js +2 -2
- package/dist/GlobalNavigationBar/index.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs +21 -15
- package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.d.ts +6 -3
- package/dist/GlobalNavigationBar/mobile/CommonStyles.js +15 -14
- package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/ExitMenuButton.cjs +49 -0
- package/dist/GlobalNavigationBar/mobile/ExitMenuButton.cjs.map +1 -0
- package/dist/GlobalNavigationBar/mobile/ExitMenuButton.d.ts +6 -0
- package/dist/GlobalNavigationBar/mobile/ExitMenuButton.js +27 -0
- package/dist/GlobalNavigationBar/mobile/ExitMenuButton.js.map +1 -0
- package/dist/GlobalNavigationBar/mobile/MobileActionMenu.cjs +91 -0
- package/dist/GlobalNavigationBar/mobile/MobileActionMenu.cjs.map +1 -0
- package/dist/GlobalNavigationBar/mobile/MobileActionMenu.d.ts +13 -0
- package/dist/GlobalNavigationBar/mobile/MobileActionMenu.js +70 -0
- package/dist/GlobalNavigationBar/mobile/MobileActionMenu.js.map +1 -0
- package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +221 -114
- package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.d.ts +25 -6
- package/dist/GlobalNavigationBar/mobile/MobileMenu.js +216 -113
- package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
- package/dist/MenuItem/MenuItem.cjs +10 -16
- package/dist/MenuItem/MenuItem.cjs.map +1 -1
- package/dist/MenuItem/MenuItem.d.ts +3 -3
- package/dist/MenuItem/MenuItem.js +8 -14
- package/dist/MenuItem/MenuItem.js.map +1 -1
- package/dist/ProfileButton/ProfileButton.cjs +11 -20
- package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
- package/dist/ProfileButton/ProfileButton.d.ts +1 -3
- package/dist/ProfileButton/ProfileButton.js +10 -18
- package/dist/ProfileButton/ProfileButton.js.map +1 -1
- package/dist/Switcher/MobileSwitcherMenu.cjs +78 -24
- package/dist/Switcher/MobileSwitcherMenu.cjs.map +1 -1
- package/dist/Switcher/MobileSwitcherMenu.d.ts +5 -6
- package/dist/Switcher/MobileSwitcherMenu.js +70 -26
- package/dist/Switcher/MobileSwitcherMenu.js.map +1 -1
- package/dist/Tile/TileBody.cjs +1 -1
- package/dist/Tile/TileBody.cjs.map +1 -1
- package/dist/Tile/TileBody.js +1 -1
- package/dist/Tile/TileBody.js.map +1 -1
- package/dist/Tile/TileCommonItems.cjs +1 -1
- package/dist/Tile/TileCommonItems.cjs.map +1 -1
- package/dist/Tile/TileCommonItems.js +1 -1
- package/dist/Tile/TileCommonItems.js.map +1 -1
- package/dist/Tile/TileFooter.cjs +1 -1
- package/dist/Tile/TileFooter.cjs.map +1 -1
- package/dist/Tile/TileFooter.js +1 -1
- package/dist/Tile/TileFooter.js.map +1 -1
- package/dist/Tile/TileHeader.cjs +1 -1
- package/dist/Tile/TileHeader.cjs.map +1 -1
- package/dist/Tile/TileHeader.js +2 -2
- package/dist/Tile/TileHeader.js.map +1 -1
- package/dist/hooks/useClickOutside.cjs +2 -6
- package/dist/hooks/useClickOutside.cjs.map +1 -1
- package/dist/hooks/useClickOutside.d.ts +1 -1
- package/dist/hooks/useClickOutside.js +2 -6
- package/dist/hooks/useClickOutside.js.map +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.ts +32 -0
- package/dist/types.js.map +1 -1
- package/package.json +8 -10
- package/dist/GlobalNavigationBar/NavigationHelper.cjs +0 -38
- package/dist/GlobalNavigationBar/NavigationHelper.cjs.map +0 -1
- package/dist/GlobalNavigationBar/NavigationHelper.d.ts +0 -4
- package/dist/GlobalNavigationBar/NavigationHelper.js +0 -27
- package/dist/GlobalNavigationBar/NavigationHelper.js.map +0 -1
- package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs +0 -127
- package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs.map +0 -1
- package/dist/GlobalNavigationBar/desktop/DesktopActions.d.ts +0 -15
- package/dist/GlobalNavigationBar/desktop/DesktopActions.js +0 -98
- package/dist/GlobalNavigationBar/desktop/DesktopActions.js.map +0 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs.map +0 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js.map +0 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +0 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.d.ts +0 -8
- package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +0 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +0 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.d.ts +0 -8
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js +0 -59
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +0 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +0 -204
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +0 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.d.ts +0 -7
- package/dist/GlobalNavigationBar/desktop/UserMenu.js +0 -163
- package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +0 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs +0 -221
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs.map +0 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.d.ts +0 -11
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js +0 -184
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js.map +0 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.cjs +0 -160
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.cjs.map +0 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.d.ts +0 -12
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js +0 -139
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js.map +0 -1
- package/dist/GlobalNavigationBar/types.cjs +0 -6
- package/dist/GlobalNavigationBar/types.cjs.map +0 -1
- package/dist/GlobalNavigationBar/types.d.ts +0 -120
- package/dist/GlobalNavigationBar/types.js +0 -2
- package/dist/GlobalNavigationBar/types.js.map +0 -1
- package/dist/common/StackState.cjs +0 -47
- package/dist/common/StackState.cjs.map +0 -1
- package/dist/common/StackState.d.ts +0 -7
- package/dist/common/StackState.js +0 -30
- package/dist/common/StackState.js.map +0 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
4
4
|
|
|
5
5
|
import styled, { css, keyframes } from 'styled-components';
|
|
6
6
|
import { BREAKPOINTS, COLORS, focusStyles } from '../../styles';
|
|
7
7
|
import { NavLink } from 'react-router-dom';
|
|
8
|
-
import { ComponentMStyling, ComponentTextStyle } from '../../styles';
|
|
9
|
-
import { Z_INDEXES } from '../../styles';
|
|
8
|
+
import { ComponentMStyling, ComponentTextStyle } from '../../styles/typography';
|
|
9
|
+
import { Z_INDEXES } from '../../styles/z-indexes';
|
|
10
10
|
export var RowLayout = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
|
|
11
11
|
export var Button = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n font-weight: bold;\n border: 0;\n"])), COLORS.white);
|
|
12
12
|
var flowLeft = keyframes(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n"])));
|
|
13
|
-
var flowRight = keyframes(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n opacity: 1;\n transform: translateX(0);\n
|
|
14
|
-
export var
|
|
15
|
-
export var
|
|
16
|
-
export var
|
|
17
|
-
export var
|
|
18
|
-
export var
|
|
19
|
-
export var
|
|
20
|
-
export var
|
|
21
|
-
export var
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
var flowRight = keyframes(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(100%);\n }\n"])));
|
|
14
|
+
export var Menu = styled.ul(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n height: 100%;\n list-style: none;\n margin: 0 auto 0 auto;\n background-color: ", ";\n box-sizing: border-box;\n display: none;\n right: 0;\n top: 0;\n min-width: 300px;\n position: absolute;\n z-index: ", ";\n align-items: center;\n width: 320px;\n padding-inline-start: 0;\n\n ", " {\n min-width: 360px;\n }\n\n .open & {\n display: block;\n -webkit-animation: ", " 0.3s ease-in-out;\n animation: ", " 0.3s ease-in-out;\n }\n\n .closed & {\n display: block;\n -webkit-animation: ", " 0.3s ease-in-out;\n animation: ", " 0.3s ease-in-out;\n }\n"])), COLORS.white, Z_INDEXES.off_canvas, BREAKPOINTS.SMALL, flowLeft, flowLeft, flowRight, flowRight);
|
|
15
|
+
export var Right = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n margin-left: auto;\n"])));
|
|
16
|
+
export var SiteName = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: ", ";\n font-weight: bold;\n font-size: 14px;\n margin-left: 4px;\n"])), COLORS.neutral_600);
|
|
17
|
+
export var MenuSection = styled.li(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-top: 16px;\n .disabled-link {\n color: #21212150;\n pointer-events: none;\n key-events: none;\n }\n"])));
|
|
18
|
+
export var MenuSectionList = styled.ul(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n\n li {\n width: 80%;\n height: 48px;\n margin: 0 auto 0 12px;\n \n a {\n height: 100%;\n }\n }\n"])));
|
|
19
|
+
export var UserMenuSectionListStyling = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n li {\n position: relative;\n }\n li:hover:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n a {\n color: ", ";\n }\n svg {\n color: ", ";\n }\n }\n\n li:focus-within:not(.disabled) {\n z-index: ", ";\n ", "\n a {\n outline: none;\n }\n }\n\n li:active:not(.disabled) {\n z-index: ", ";\n background: ", ";\n a {\n color: ", ";\n }\n svg {\n color: ", ";\n }\n }\n\n .disabled {\n a {\n color: ", ";\n }\n svg {\n color: ", ";\n }\n background-color: ", ";\n }\n"])), Z_INDEXES.hover, COLORS.primary_20, COLORS.primary_600, COLORS.primary_600, Z_INDEXES.focus, focusStyles, Z_INDEXES.active, COLORS.primary_100, COLORS.primary_800, COLORS.primary_800, COLORS.neutral_300, COLORS.neutral_300, COLORS.neutral_100);
|
|
20
|
+
export var MenuLink = styled(NavLink)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n border: none;\n background: transparent;\n margin: auto;\n\n box-sizing: border-box;\n\n ", "\n\n text-decoration: none;\n text-align: center;\n align-items: center;\n display: flex;\n"])), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black));
|
|
21
|
+
export var MenuWrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n background-color: ", ";\n display: ", ";\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n\n &:focus-within,\n &:hover,\n &.open {\n background: ", ";\n }\n"])), COLORS.white, function (props) {
|
|
22
|
+
return props.isVisible ? 'flex' : 'none';
|
|
23
|
+
}, COLORS.white);
|
|
24
|
+
export var flowDown = keyframes(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n"])));
|
|
24
25
|
//# sourceMappingURL=CommonStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/GlobalNavigationBar/mobile/CommonStyles.ts"],"names":["styled","css","keyframes","BREAKPOINTS","COLORS","focusStyles","NavLink","ComponentMStyling","ComponentTextStyle","Z_INDEXES","RowLayout","div","Button","button","white","flowLeft","flowRight","
|
|
1
|
+
{"version":3,"sources":["../../../src/GlobalNavigationBar/mobile/CommonStyles.ts"],"names":["styled","css","keyframes","BREAKPOINTS","COLORS","focusStyles","NavLink","ComponentMStyling","ComponentTextStyle","Z_INDEXES","RowLayout","div","Button","button","white","flowLeft","flowRight","Menu","ul","off_canvas","SMALL","Right","SiteName","span","neutral_600","MenuSection","li","MenuSectionList","UserMenuSectionListStyling","hover","primary_20","primary_600","focus","active","primary_100","primary_800","neutral_300","neutral_100","MenuLink","Regular","black","MenuWrapper","props","isVisible","flowDown"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,EAAsBC,SAAtB,QAAuC,mBAAvC;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,WAA7B,QAA+C,cAA/C;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,SAASC,iBAAT,EAA4BC,kBAA5B,QAAsD,yBAAtD;AACA,SAAQC,SAAR,QAAwB,wBAAxB;AAEA,OAAO,IAAMC,SAAS,GAAGV,MAAM,CAACW,GAAV,iHAAf;AAKP,OAAO,IAAMC,MAAM,GAAGZ,MAAM,CAACa,MAAV,yIACGT,MAAM,CAACU,KADV,CAAZ;AAMP,IAAMC,QAAQ,GAAGb,SAAH,sMAAd;AAWA,IAAMc,SAAS,GAAGd,SAAH,sMAAf;AAWA,OAAO,IAAMe,IAAI,GAAGjB,MAAM,CAACkB,EAAV,qpBAIKd,MAAM,CAACU,KAJZ,EAWJL,SAAS,CAACU,UAXN,EAgBbhB,WAAW,CAACiB,KAhBC,EAsBQL,QAtBR,EAuBAA,QAvBA,EA4BQC,SA5BR,EA6BAA,SA7BA,CAAV;AAiCP,OAAO,IAAMK,KAAK,GAAGrB,MAAM,CAACW,GAAV,iHAAX;AAKP,OAAO,IAAMW,QAAQ,GAAGtB,MAAM,CAACuB,IAAV,yJACVnB,MAAM,CAACoB,WADG,CAAd;AAOP,OAAO,IAAMC,WAAW,GAAGzB,MAAM,CAAC0B,EAAV,gMAAjB;AASP,OAAO,IAAMC,eAAe,GAAG3B,MAAM,CAACkB,EAAV,uOAArB;AAeP,OAAO,IAAMU,0BAA0B,GAAG3B,GAAH,qpBAKxBQ,SAAS,CAACoB,KALc,EAMfzB,MAAM,CAAC0B,UANQ,EAQxB1B,MAAM,CAAC2B,WARiB,EAWxB3B,MAAM,CAAC2B,WAXiB,EAgBxBtB,SAAS,CAACuB,KAhBc,EAiBjC3B,WAjBiC,EAwBxBI,SAAS,CAACwB,MAxBc,EAyBrB7B,MAAM,CAAC8B,WAzBc,EA2BxB9B,MAAM,CAAC+B,WA3BiB,EA8BxB/B,MAAM,CAAC+B,WA9BiB,EAoCxB/B,MAAM,CAACgC,WApCiB,EAuCxBhC,MAAM,CAACgC,WAvCiB,EAyCfhC,MAAM,CAACiC,WAzCQ,CAAhC;AA6CP,OAAO,IAAMC,QAAQ,GAAGtC,MAAM,CAACM,OAAD,CAAT,8QAOjBC,iBAAiB,CAACC,kBAAkB,CAAC+B,OAApB,EAA6BnC,MAAM,CAACoC,KAApC,CAPA,CAAd;AAeP,OAAO,IAAMC,WAAW,GAAGzC,MAAM,CAACW,GAAV,iRACFP,MAAM,CAACU,KADL,EAEX,UAAC4B,KAAD;AAAA,SAAYA,KAAK,CAACC,SAAN,GAAkB,MAAlB,GAA2B,MAAvC;AAAA,CAFW,EAYNvC,MAAM,CAACU,KAZD,CAAjB;AAoBP,OAAO,IAAM8B,QAAQ,GAAG1C,SAAH,yMAAd","sourcesContent":["import styled, { css, keyframes } from 'styled-components';\nimport {BREAKPOINTS, COLORS, focusStyles} from '../../styles';\nimport { NavLink } from 'react-router-dom';\nimport { ComponentMStyling, ComponentTextStyle } from '../../styles/typography';\nimport {Z_INDEXES} from '../../styles/z-indexes';\n\nexport const RowLayout = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const Button = styled.button`\n background-color: ${COLORS.white};\n font-weight: bold;\n border: 0;\n`;\n\nconst flowLeft = keyframes`\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n`;\n\nconst flowRight = keyframes`\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(100%);\n }\n`;\n\nexport const Menu = styled.ul`\n height: 100%;\n list-style: none;\n margin: 0 auto 0 auto;\n background-color: ${COLORS.white};\n box-sizing: border-box;\n display: none;\n right: 0;\n top: 0;\n min-width: 300px;\n position: absolute;\n z-index: ${Z_INDEXES.off_canvas};\n align-items: center;\n width: 320px;\n padding-inline-start: 0;\n\n ${BREAKPOINTS.SMALL} {\n min-width: 360px;\n }\n\n .open & {\n display: block;\n -webkit-animation: ${flowLeft} 0.3s ease-in-out;\n animation: ${flowLeft} 0.3s ease-in-out;\n }\n\n .closed & {\n display: block;\n -webkit-animation: ${flowRight} 0.3s ease-in-out;\n animation: ${flowRight} 0.3s ease-in-out;\n }\n`;\n\nexport const Right = styled.div`\n display: flex;\n margin-left: auto;\n`;\n\nexport const SiteName = styled.span`\n color: ${COLORS.neutral_600};\n font-weight: bold;\n font-size: 14px;\n margin-left: 4px;\n`;\n\nexport const MenuSection = styled.li`\n margin-top: 16px;\n .disabled-link {\n color: #21212150;\n pointer-events: none;\n key-events: none;\n }\n`;\n\nexport const MenuSectionList = styled.ul`\n list-style: none;\n padding: 0;\n\n li {\n width: 80%;\n height: 48px;\n margin: 0 auto 0 12px;\n \n a {\n height: 100%;\n }\n }\n`;\n\nexport const UserMenuSectionListStyling = css`\n li {\n position: relative;\n }\n li:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n a {\n color: ${COLORS.primary_600};\n }\n svg {\n color: ${COLORS.primary_600};\n }\n }\n\n li:focus-within:not(.disabled) {\n z-index: ${Z_INDEXES.focus};\n ${focusStyles}\n a {\n outline: none;\n }\n }\n\n li:active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n background: ${COLORS.primary_100};\n a {\n color: ${COLORS.primary_800};\n }\n svg {\n color: ${COLORS.primary_800};\n }\n }\n\n .disabled {\n a {\n color: ${COLORS.neutral_300};\n }\n svg {\n color: ${COLORS.neutral_300};\n }\n background-color: ${COLORS.neutral_100};\n }\n`;\n\nexport const MenuLink = styled(NavLink)`\n border: none;\n background: transparent;\n margin: auto;\n\n box-sizing: border-box;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n text-decoration: none;\n text-align: center;\n align-items: center;\n display: flex;\n`;\n\nexport const MenuWrapper = styled.div<MenuWrapperProps>`\n background-color: ${COLORS.white};\n display: ${(props) => (props.isVisible ? 'flex' : 'none')};\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n\n &:focus-within,\n &:hover,\n &.open {\n background: ${COLORS.white};\n }\n`;\n\ninterface MenuWrapperProps {\n isVisible: boolean;\n}\n\nexport const flowDown = keyframes`\n 0% {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n"],"file":"CommonStyles.js"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
var React = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
19
|
+
|
|
20
|
+
var _SystemIcons = require("../../icons/systemicons/SystemIcons");
|
|
21
|
+
|
|
22
|
+
var _CommonStyles = require("./CommonStyles");
|
|
23
|
+
|
|
24
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
+
|
|
26
|
+
var _templateObject;
|
|
27
|
+
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
32
|
+
var StyledButton = (0, _styledComponents.default)(_CommonStyles.Button)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 0;\n height: 36px;\n"])));
|
|
33
|
+
|
|
34
|
+
var ExitMenuButton = function ExitMenuButton(_ref) {
|
|
35
|
+
var closeMenu = _ref.closeMenu;
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledButton, {
|
|
37
|
+
onClick: closeMenu,
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SystemIcons.Close, {
|
|
39
|
+
size: "24px"
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
ExitMenuButton.propTypes = {
|
|
45
|
+
closeMenu: _propTypes.default.func.isRequired
|
|
46
|
+
};
|
|
47
|
+
var _default = ExitMenuButton;
|
|
48
|
+
exports.default = _default;
|
|
49
|
+
//# sourceMappingURL=ExitMenuButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/GlobalNavigationBar/mobile/ExitMenuButton.tsx"],"names":["StyledButton","Button","ExitMenuButton","closeMenu"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,+BAAOC,oBAAP,CAAH,qHAAlB;;AASA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,OAAqD;AAAA,MAAlDC,SAAkD,QAAlDA,SAAkD;AAC1E,sBACE,qBAAC,YAAD;AAAc,IAAA,OAAO,EAAEA,SAAvB;AAAA,2BACE,qBAAC,kBAAD;AAAO,MAAA,IAAI,EAAC;AAAZ;AADF,IADF;AAKD,CAND;;;AAHEA,EAAAA,S;;eAWaD,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { Close } from '../../icons/systemicons/SystemIcons';\nimport { Button } from './CommonStyles';\n\nconst StyledButton = styled(Button)`\n padding: 0;\n height: 36px;\n`;\n\ntype Props = {\n closeMenu: () => void;\n};\n\nconst ExitMenuButton = ({ closeMenu }: Props): React.ReactElement<Props> => {\n return (\n <StyledButton onClick={closeMenu}>\n <Close size=\"24px\" />\n </StyledButton>\n );\n};\n\nexport default ExitMenuButton;\n"],"file":"ExitMenuButton.cjs"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
import _pt from "prop-types";
|
|
3
|
+
|
|
4
|
+
var _templateObject;
|
|
5
|
+
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { Close } from '../../icons/systemicons/SystemIcons';
|
|
9
|
+
import { Button } from './CommonStyles';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var StyledButton = styled(Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0;\n height: 36px;\n"])));
|
|
12
|
+
|
|
13
|
+
var ExitMenuButton = function ExitMenuButton(_ref) {
|
|
14
|
+
var closeMenu = _ref.closeMenu;
|
|
15
|
+
return /*#__PURE__*/_jsx(StyledButton, {
|
|
16
|
+
onClick: closeMenu,
|
|
17
|
+
children: /*#__PURE__*/_jsx(Close, {
|
|
18
|
+
size: "24px"
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
ExitMenuButton.propTypes = {
|
|
24
|
+
closeMenu: _pt.func.isRequired
|
|
25
|
+
};
|
|
26
|
+
export default ExitMenuButton;
|
|
27
|
+
//# sourceMappingURL=ExitMenuButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/GlobalNavigationBar/mobile/ExitMenuButton.tsx"],"names":["React","styled","Close","Button","StyledButton","ExitMenuButton","closeMenu"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,KAAT,QAAsB,qCAAtB;AACA,SAASC,MAAT,QAAuB,gBAAvB;;AAEA,IAAMC,YAAY,GAAGH,MAAM,CAACE,MAAD,CAAT,uGAAlB;;AASA,IAAME,cAAc,GAAG,SAAjBA,cAAiB,OAAqD;AAAA,MAAlDC,SAAkD,QAAlDA,SAAkD;AAC1E,sBACE,KAAC,YAAD;AAAc,IAAA,OAAO,EAAEA,SAAvB;AAAA,2BACE,KAAC,KAAD;AAAO,MAAA,IAAI,EAAC;AAAZ;AADF,IADF;AAKD,CAND;;;AAHEA,EAAAA,S;;AAWF,eAAeD,cAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { Close } from '../../icons/systemicons/SystemIcons';\nimport { Button } from './CommonStyles';\n\nconst StyledButton = styled(Button)`\n padding: 0;\n height: 36px;\n`;\n\ntype Props = {\n closeMenu: () => void;\n};\n\nconst ExitMenuButton = ({ closeMenu }: Props): React.ReactElement<Props> => {\n return (\n <StyledButton onClick={closeMenu}>\n <Close size=\"24px\" />\n </StyledButton>\n );\n};\n\nexport default ExitMenuButton;\n"],"file":"ExitMenuButton.js"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
var React = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
19
|
+
|
|
20
|
+
var _Actions = _interopRequireDefault(require("../Actions"));
|
|
21
|
+
|
|
22
|
+
var _ExitMenuButton = _interopRequireDefault(require("./ExitMenuButton"));
|
|
23
|
+
|
|
24
|
+
var _CommonStyles = require("./CommonStyles");
|
|
25
|
+
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
|
|
28
|
+
var _templateObject;
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
var FirstRowLayout = (0, _styledComponents.default)(_CommonStyles.RowLayout)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 5px;\n"])));
|
|
35
|
+
|
|
36
|
+
var MobileActionMenu = function MobileActionMenu(_ref) {
|
|
37
|
+
var clickMenuAction = _ref.clickMenuAction,
|
|
38
|
+
navigationOptions = _ref.navigationOptions,
|
|
39
|
+
firstName = _ref.firstName,
|
|
40
|
+
lastName = _ref.lastName,
|
|
41
|
+
actionList = _ref.actionList;
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CommonStyles.Menu, {
|
|
43
|
+
role: "menu",
|
|
44
|
+
"aria-labelledby": "UserMenuButton",
|
|
45
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(FirstRowLayout, {
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Actions.default, {
|
|
48
|
+
actions: actionList,
|
|
49
|
+
firstName: firstName,
|
|
50
|
+
lastName: lastName,
|
|
51
|
+
isInMobileMenu: true,
|
|
52
|
+
useUserMenu: false,
|
|
53
|
+
setShowUserMenu: function setShowUserMenu() {}
|
|
54
|
+
})
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CommonStyles.Right, {
|
|
56
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExitMenuButton.default, {
|
|
57
|
+
closeMenu: clickMenuAction
|
|
58
|
+
})
|
|
59
|
+
})]
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CommonStyles.MenuSection, {
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CommonStyles.MenuSectionList, {
|
|
62
|
+
children: navigationOptions === null || navigationOptions === void 0 ? void 0 : navigationOptions.map(function (no) {
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
64
|
+
onClick: function onClick() {
|
|
65
|
+
return clickMenuAction();
|
|
66
|
+
},
|
|
67
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CommonStyles.MenuLink, {
|
|
68
|
+
to: no.to,
|
|
69
|
+
role: "menuitem",
|
|
70
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
71
|
+
children: no.label
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
}, no.label);
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
MobileActionMenu.propTypes = {
|
|
82
|
+
name: _propTypes.default.string.isRequired,
|
|
83
|
+
mainNavLabel: _propTypes.default.string,
|
|
84
|
+
navigationOptions: _propTypes.default.array,
|
|
85
|
+
clickMenuAction: _propTypes.default.func.isRequired,
|
|
86
|
+
firstName: _propTypes.default.string,
|
|
87
|
+
lastName: _propTypes.default.string
|
|
88
|
+
};
|
|
89
|
+
var _default = MobileActionMenu;
|
|
90
|
+
exports.default = _default;
|
|
91
|
+
//# sourceMappingURL=MobileActionMenu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionMenu.tsx"],"names":["FirstRowLayout","RowLayout","MobileActionMenu","clickMenuAction","navigationOptions","firstName","lastName","actionList","map","no","to","label","name","mainNavLabel"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,cAAc,GAAG,+BAAOC,uBAAP,CAAH,yGAApB;;AAeA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,OAAoF;AAAA,MAAjFC,eAAiF,QAAjFA,eAAiF;AAAA,MAAhEC,iBAAgE,QAAhEA,iBAAgE;AAAA,MAA7CC,SAA6C,QAA7CA,SAA6C;AAAA,MAAlCC,QAAkC,QAAlCA,QAAkC;AAAA,MAAxBC,UAAwB,QAAxBA,UAAwB;AAC3G,sBACE,sBAAC,kBAAD;AAAM,IAAA,IAAI,EAAC,MAAX;AAAkB,uBAAgB,gBAAlC;AAAA,4BACE,sBAAC,cAAD;AAAA,8BACE;AAAA,+BACE,qBAAC,gBAAD;AAAS,UAAA,OAAO,EAAEA,UAAlB;AAA8B,UAAA,SAAS,EAAEF,SAAzC;AAAoD,UAAA,QAAQ,EAAEC,QAA9D;AAAwE,UAAA,cAAc,EAAE,IAAxF;AAA8F,UAAA,WAAW,EAAE,KAA3G;AAAkH,UAAA,eAAe,EAAE,2BAAM,CAAE;AAA3I;AADF,QADF,eAIE,qBAAC,mBAAD;AAAA,+BACE,qBAAC,uBAAD;AAAgB,UAAA,SAAS,EAAEH;AAA3B;AADF,QAJF;AAAA,MADF,eASE,qBAAC,yBAAD;AAAA,6BACE,qBAAC,6BAAD;AAAA,kBACGC,iBADH,aACGA,iBADH,uBACGA,iBAAiB,CAAEI,GAAnB,CAAuB,UAAAC,EAAE;AAAA,8BACxB;AAAmB,YAAA,OAAO,EAAE;AAAA,qBAAMN,eAAe,EAArB;AAAA,aAA5B;AAAA,mCACE,qBAAC,sBAAD;AAAU,cAAA,EAAE,EAAEM,EAAE,CAACC,EAAjB;AAAqB,cAAA,IAAI,EAAC,UAA1B;AAAA,qCACE;AAAA,0BAAMD,EAAE,CAACE;AAAT;AADF;AADF,aAASF,EAAE,CAACE,KAAZ,CADwB;AAAA,SAAzB;AADH;AADF,MATF;AAAA,IADF;AAuBD,CAxBD;;;AAVEC,EAAAA,I;AACAC,EAAAA,Y;AACAT,EAAAA,iB;AAEAD,EAAAA,e;AACAE,EAAAA,S;AACAC,EAAAA,Q;;eA8BaJ,gB","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { NavOption, ActionOptions } from '../../types';\nimport Actions from '../Actions';\nimport ExitMenuButton from './ExitMenuButton';\nimport { Menu, Right, MenuSection, MenuSectionList, MenuLink, RowLayout } from './CommonStyles';\n\nconst FirstRowLayout = styled(RowLayout)`\n margin-top: 5px;\n`;\n\ntype Props = {\n name: string;\n mainNavLabel?: string;\n navigationOptions?: NavOption[];\n actions?: ActionOptions;\n clickMenuAction: () => void;\n firstName?: string;\n lastName?: string;\n actionList?: ActionOptions;\n};\n\nconst MobileActionMenu = ({ clickMenuAction, navigationOptions, firstName, lastName, actionList }: Props) => {\n return (\n <Menu role=\"menu\" aria-labelledby=\"UserMenuButton\">\n <FirstRowLayout>\n <>\n <Actions actions={actionList} firstName={firstName} lastName={lastName} isInMobileMenu={true} useUserMenu={false} setShowUserMenu={() => {}} />\n </>\n <Right>\n <ExitMenuButton closeMenu={clickMenuAction} />\n </Right>\n </FirstRowLayout>\n <MenuSection>\n <MenuSectionList>\n {navigationOptions?.map(no => (\n <li key={no.label} onClick={() => clickMenuAction()}>\n <MenuLink to={no.to} role=\"menuitem\">\n <div>{no.label}</div>\n </MenuLink>\n </li>\n ))}\n </MenuSectionList>\n </MenuSection>\n </Menu>\n );\n};\n\nexport default MobileActionMenu;\n"],"file":"MobileActionMenu.cjs"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NavOption, ActionOptions } from '../../types';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
name: string;
|
|
4
|
+
mainNavLabel?: string;
|
|
5
|
+
navigationOptions?: NavOption[];
|
|
6
|
+
actions?: ActionOptions;
|
|
7
|
+
clickMenuAction: () => void;
|
|
8
|
+
firstName?: string;
|
|
9
|
+
lastName?: string;
|
|
10
|
+
actionList?: ActionOptions;
|
|
11
|
+
};
|
|
12
|
+
declare const MobileActionMenu: ({ clickMenuAction, navigationOptions, firstName, lastName, actionList }: Props) => JSX.Element;
|
|
13
|
+
export default MobileActionMenu;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
import _pt from "prop-types";
|
|
3
|
+
|
|
4
|
+
var _templateObject;
|
|
5
|
+
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import Actions from '../Actions';
|
|
9
|
+
import ExitMenuButton from './ExitMenuButton';
|
|
10
|
+
import { Menu, Right, MenuSection, MenuSectionList, MenuLink, RowLayout } from './CommonStyles';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
var FirstRowLayout = styled(RowLayout)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: 5px;\n"])));
|
|
15
|
+
|
|
16
|
+
var MobileActionMenu = function MobileActionMenu(_ref) {
|
|
17
|
+
var clickMenuAction = _ref.clickMenuAction,
|
|
18
|
+
navigationOptions = _ref.navigationOptions,
|
|
19
|
+
firstName = _ref.firstName,
|
|
20
|
+
lastName = _ref.lastName,
|
|
21
|
+
actionList = _ref.actionList;
|
|
22
|
+
return /*#__PURE__*/_jsxs(Menu, {
|
|
23
|
+
role: "menu",
|
|
24
|
+
"aria-labelledby": "UserMenuButton",
|
|
25
|
+
children: [/*#__PURE__*/_jsxs(FirstRowLayout, {
|
|
26
|
+
children: [/*#__PURE__*/_jsx(_Fragment, {
|
|
27
|
+
children: /*#__PURE__*/_jsx(Actions, {
|
|
28
|
+
actions: actionList,
|
|
29
|
+
firstName: firstName,
|
|
30
|
+
lastName: lastName,
|
|
31
|
+
isInMobileMenu: true,
|
|
32
|
+
useUserMenu: false,
|
|
33
|
+
setShowUserMenu: function setShowUserMenu() {}
|
|
34
|
+
})
|
|
35
|
+
}), /*#__PURE__*/_jsx(Right, {
|
|
36
|
+
children: /*#__PURE__*/_jsx(ExitMenuButton, {
|
|
37
|
+
closeMenu: clickMenuAction
|
|
38
|
+
})
|
|
39
|
+
})]
|
|
40
|
+
}), /*#__PURE__*/_jsx(MenuSection, {
|
|
41
|
+
children: /*#__PURE__*/_jsx(MenuSectionList, {
|
|
42
|
+
children: navigationOptions === null || navigationOptions === void 0 ? void 0 : navigationOptions.map(function (no) {
|
|
43
|
+
return /*#__PURE__*/_jsx("li", {
|
|
44
|
+
onClick: function onClick() {
|
|
45
|
+
return clickMenuAction();
|
|
46
|
+
},
|
|
47
|
+
children: /*#__PURE__*/_jsx(MenuLink, {
|
|
48
|
+
to: no.to,
|
|
49
|
+
role: "menuitem",
|
|
50
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
51
|
+
children: no.label
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
}, no.label);
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
MobileActionMenu.propTypes = {
|
|
62
|
+
name: _pt.string.isRequired,
|
|
63
|
+
mainNavLabel: _pt.string,
|
|
64
|
+
navigationOptions: _pt.array,
|
|
65
|
+
clickMenuAction: _pt.func.isRequired,
|
|
66
|
+
firstName: _pt.string,
|
|
67
|
+
lastName: _pt.string
|
|
68
|
+
};
|
|
69
|
+
export default MobileActionMenu;
|
|
70
|
+
//# sourceMappingURL=MobileActionMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionMenu.tsx"],"names":["React","styled","Actions","ExitMenuButton","Menu","Right","MenuSection","MenuSectionList","MenuLink","RowLayout","FirstRowLayout","MobileActionMenu","clickMenuAction","navigationOptions","firstName","lastName","actionList","map","no","to","label","name","mainNavLabel"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AAEA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,SAASC,IAAT,EAAeC,KAAf,EAAsBC,WAAtB,EAAmCC,eAAnC,EAAoDC,QAApD,EAA8DC,SAA9D,QAA+E,gBAA/E;;;;AAEA,IAAMC,cAAc,GAAGT,MAAM,CAACQ,SAAD,CAAT,2FAApB;;AAeA,IAAME,gBAAgB,GAAG,SAAnBA,gBAAmB,OAAoF;AAAA,MAAjFC,eAAiF,QAAjFA,eAAiF;AAAA,MAAhEC,iBAAgE,QAAhEA,iBAAgE;AAAA,MAA7CC,SAA6C,QAA7CA,SAA6C;AAAA,MAAlCC,QAAkC,QAAlCA,QAAkC;AAAA,MAAxBC,UAAwB,QAAxBA,UAAwB;AAC3G,sBACE,MAAC,IAAD;AAAM,IAAA,IAAI,EAAC,MAAX;AAAkB,uBAAgB,gBAAlC;AAAA,4BACE,MAAC,cAAD;AAAA,8BACE;AAAA,+BACE,KAAC,OAAD;AAAS,UAAA,OAAO,EAAEA,UAAlB;AAA8B,UAAA,SAAS,EAAEF,SAAzC;AAAoD,UAAA,QAAQ,EAAEC,QAA9D;AAAwE,UAAA,cAAc,EAAE,IAAxF;AAA8F,UAAA,WAAW,EAAE,KAA3G;AAAkH,UAAA,eAAe,EAAE,2BAAM,CAAE;AAA3I;AADF,QADF,eAIE,KAAC,KAAD;AAAA,+BACE,KAAC,cAAD;AAAgB,UAAA,SAAS,EAAEH;AAA3B;AADF,QAJF;AAAA,MADF,eASE,KAAC,WAAD;AAAA,6BACE,KAAC,eAAD;AAAA,kBACGC,iBADH,aACGA,iBADH,uBACGA,iBAAiB,CAAEI,GAAnB,CAAuB,UAAAC,EAAE;AAAA,8BACxB;AAAmB,YAAA,OAAO,EAAE;AAAA,qBAAMN,eAAe,EAArB;AAAA,aAA5B;AAAA,mCACE,KAAC,QAAD;AAAU,cAAA,EAAE,EAAEM,EAAE,CAACC,EAAjB;AAAqB,cAAA,IAAI,EAAC,UAA1B;AAAA,qCACE;AAAA,0BAAMD,EAAE,CAACE;AAAT;AADF;AADF,aAASF,EAAE,CAACE,KAAZ,CADwB;AAAA,SAAzB;AADH;AADF,MATF;AAAA,IADF;AAuBD,CAxBD;;;AAVEC,EAAAA,I;AACAC,EAAAA,Y;AACAT,EAAAA,iB;AAEAD,EAAAA,e;AACAE,EAAAA,S;AACAC,EAAAA,Q;;AA8BF,eAAeJ,gBAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { NavOption, ActionOptions } from '../../types';\nimport Actions from '../Actions';\nimport ExitMenuButton from './ExitMenuButton';\nimport { Menu, Right, MenuSection, MenuSectionList, MenuLink, RowLayout } from './CommonStyles';\n\nconst FirstRowLayout = styled(RowLayout)`\n margin-top: 5px;\n`;\n\ntype Props = {\n name: string;\n mainNavLabel?: string;\n navigationOptions?: NavOption[];\n actions?: ActionOptions;\n clickMenuAction: () => void;\n firstName?: string;\n lastName?: string;\n actionList?: ActionOptions;\n};\n\nconst MobileActionMenu = ({ clickMenuAction, navigationOptions, firstName, lastName, actionList }: Props) => {\n return (\n <Menu role=\"menu\" aria-labelledby=\"UserMenuButton\">\n <FirstRowLayout>\n <>\n <Actions actions={actionList} firstName={firstName} lastName={lastName} isInMobileMenu={true} useUserMenu={false} setShowUserMenu={() => {}} />\n </>\n <Right>\n <ExitMenuButton closeMenu={clickMenuAction} />\n </Right>\n </FirstRowLayout>\n <MenuSection>\n <MenuSectionList>\n {navigationOptions?.map(no => (\n <li key={no.label} onClick={() => clickMenuAction()}>\n <MenuLink to={no.to} role=\"menuitem\">\n <div>{no.label}</div>\n </MenuLink>\n </li>\n ))}\n </MenuSectionList>\n </MenuSection>\n </Menu>\n );\n};\n\nexport default MobileActionMenu;\n"],"file":"MobileActionMenu.js"}
|