@laerdal/life-react-components 1.0.1-dev.19.full → 1.0.1-dev.22.full

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.
Files changed (198) hide show
  1. package/dist/esm/AuthPage/Information.js +4 -7
  2. package/dist/esm/AuthPage/Information.js.map +1 -1
  3. package/dist/esm/Banners/Banner.js +5 -5
  4. package/dist/esm/Banners/Banner.js.map +1 -1
  5. package/dist/esm/Banners/OverviewBanner.js +2 -2
  6. package/dist/esm/Banners/OverviewBanner.js.map +1 -1
  7. package/dist/esm/Breadcrumb/Breadcrumb.js +46 -20
  8. package/dist/esm/Breadcrumb/Breadcrumb.js.map +1 -1
  9. package/dist/esm/Button/Iconbutton.js +4 -1
  10. package/dist/esm/Button/Iconbutton.js.map +1 -1
  11. package/dist/esm/Dropdown/CommonStyling.js +28 -28
  12. package/dist/esm/Dropdown/CommonStyling.js.map +1 -1
  13. package/dist/esm/Footer/Components/FooterDropdownLinks.js +9 -9
  14. package/dist/esm/Footer/Components/FooterDropdownLinks.js.map +1 -1
  15. package/dist/esm/Footer/Components/FooterNavSection.js +4 -8
  16. package/dist/esm/Footer/Components/FooterNavSection.js.map +1 -1
  17. package/dist/esm/Footer/Components/FooterNewsletterAndSocialSection.js +4 -4
  18. package/dist/esm/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  19. package/dist/esm/Footer/Components/FooterTop.js +2 -2
  20. package/dist/esm/Footer/Components/FooterTop.js.map +1 -1
  21. package/dist/esm/GlobalNavigationBar/Logo.js +8 -11
  22. package/dist/esm/GlobalNavigationBar/Logo.js.map +1 -1
  23. package/dist/esm/GlobalNavigationBar/RightSideNav.js +4 -3
  24. package/dist/esm/GlobalNavigationBar/RightSideNav.js.map +1 -1
  25. package/dist/esm/GlobalNavigationBar/UserMenu/MenuLink.js +3 -6
  26. package/dist/esm/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -1
  27. package/dist/esm/GlobalNavigationBar/UserMenu/MobileUserMenu.js +10 -7
  28. package/dist/esm/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -1
  29. package/dist/esm/GlobalNavigationBar/UserMenu/UserMenu.js +5 -13
  30. package/dist/esm/GlobalNavigationBar/UserMenu/UserMenu.js.map +1 -1
  31. package/dist/esm/GlobalNavigationBar/mobile/CommonStyles.js +4 -1
  32. package/dist/esm/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  33. package/dist/esm/GlobalNavigationBar/mobile/MobileMenu.js +6 -9
  34. package/dist/esm/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  35. package/dist/esm/InputFields/DatepickerField.js +13 -14
  36. package/dist/esm/InputFields/DatepickerField.js.map +1 -1
  37. package/dist/esm/InputFields/components/SearchBarInput.js +11 -11
  38. package/dist/esm/InputFields/components/SearchBarInput.js.map +1 -1
  39. package/dist/esm/InputFields/components/SearchField.js +13 -11
  40. package/dist/esm/InputFields/components/SearchField.js.map +1 -1
  41. package/dist/esm/List/ListRow.js +5 -2
  42. package/dist/esm/List/ListRow.js.map +1 -1
  43. package/dist/esm/List/ListRowDropdown.js +4 -5
  44. package/dist/esm/List/ListRowDropdown.js.map +1 -1
  45. package/dist/esm/LoadingPage/GlobalLoadingPage.js +4 -3
  46. package/dist/esm/LoadingPage/GlobalLoadingPage.js.map +1 -1
  47. package/dist/esm/MiniProductCard/MiniProductCard.js +4 -5
  48. package/dist/esm/MiniProductCard/MiniProductCard.js.map +1 -1
  49. package/dist/esm/Modals/ModalDialog.js +22 -10
  50. package/dist/esm/Modals/ModalDialog.js.map +1 -1
  51. package/dist/esm/Paginator/Paginator.js +5 -6
  52. package/dist/esm/Paginator/Paginator.js.map +1 -1
  53. package/dist/esm/SkipToContent/SkipToContent.js +4 -5
  54. package/dist/esm/SkipToContent/SkipToContent.js.map +1 -1
  55. package/dist/esm/Switcher/MobileSwitcherMenu.js +4 -4
  56. package/dist/esm/Switcher/MobileSwitcherMenu.js.map +1 -1
  57. package/dist/esm/Switcher/SwitcherMenuItem.js +8 -9
  58. package/dist/esm/Switcher/SwitcherMenuItem.js.map +1 -1
  59. package/dist/esm/Tabs/HorizontalTabs.js +7 -10
  60. package/dist/esm/Tabs/HorizontalTabs.js.map +1 -1
  61. package/dist/esm/Toasters/Toast.js +1 -2
  62. package/dist/esm/Toasters/Toast.js.map +1 -1
  63. package/dist/esm/styles/typography.js +52 -1
  64. package/dist/esm/styles/typography.js.map +1 -1
  65. package/dist/js/AuthPage/Information.js +4 -2
  66. package/dist/js/AuthPage/Information.js.map +1 -1
  67. package/dist/js/Banners/Banner.js +2 -2
  68. package/dist/js/Banners/Banner.js.map +1 -1
  69. package/dist/js/Banners/OverviewBanner.js +3 -1
  70. package/dist/js/Banners/OverviewBanner.js.map +1 -1
  71. package/dist/js/Breadcrumb/Breadcrumb.d.ts +2 -0
  72. package/dist/js/Breadcrumb/Breadcrumb.js +46 -14
  73. package/dist/js/Breadcrumb/Breadcrumb.js.map +1 -1
  74. package/dist/js/Button/Iconbutton.d.ts +1 -0
  75. package/dist/js/Button/Iconbutton.js +4 -1
  76. package/dist/js/Button/Iconbutton.js.map +1 -1
  77. package/dist/js/Dropdown/CommonStyling.js +4 -4
  78. package/dist/js/Dropdown/CommonStyling.js.map +1 -1
  79. package/dist/js/Footer/Components/FooterDropdownLinks.js +3 -3
  80. package/dist/js/Footer/Components/FooterDropdownLinks.js.map +1 -1
  81. package/dist/js/Footer/Components/FooterNavSection.js +4 -2
  82. package/dist/js/Footer/Components/FooterNavSection.js.map +1 -1
  83. package/dist/js/Footer/Components/FooterNewsletterAndSocialSection.js +2 -2
  84. package/dist/js/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  85. package/dist/js/Footer/Components/FooterTop.js +3 -1
  86. package/dist/js/Footer/Components/FooterTop.js.map +1 -1
  87. package/dist/js/GlobalNavigationBar/Logo.js +9 -7
  88. package/dist/js/GlobalNavigationBar/Logo.js.map +1 -1
  89. package/dist/js/GlobalNavigationBar/RightSideNav.js +3 -1
  90. package/dist/js/GlobalNavigationBar/RightSideNav.js.map +1 -1
  91. package/dist/js/GlobalNavigationBar/UserMenu/MenuLink.js +3 -1
  92. package/dist/js/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -1
  93. package/dist/js/GlobalNavigationBar/UserMenu/MobileUserMenu.js +4 -2
  94. package/dist/js/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -1
  95. package/dist/js/GlobalNavigationBar/UserMenu/UserMenu.js +4 -2
  96. package/dist/js/GlobalNavigationBar/UserMenu/UserMenu.js.map +1 -1
  97. package/dist/js/GlobalNavigationBar/mobile/CommonStyles.js +1 -1
  98. package/dist/js/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  99. package/dist/js/GlobalNavigationBar/mobile/MobileMenu.d.ts +1 -1
  100. package/dist/js/GlobalNavigationBar/mobile/MobileMenu.js +4 -2
  101. package/dist/js/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  102. package/dist/js/InputFields/DatepickerField.js +4 -2
  103. package/dist/js/InputFields/DatepickerField.js.map +1 -1
  104. package/dist/js/InputFields/components/SearchBarInput.js +4 -2
  105. package/dist/js/InputFields/components/SearchBarInput.js.map +1 -1
  106. package/dist/js/InputFields/components/SearchField.js +3 -1
  107. package/dist/js/InputFields/components/SearchField.js.map +1 -1
  108. package/dist/js/List/ListRow.js +3 -1
  109. package/dist/js/List/ListRow.js.map +1 -1
  110. package/dist/js/List/ListRowDropdown.js +3 -1
  111. package/dist/js/List/ListRowDropdown.js.map +1 -1
  112. package/dist/js/LoadingPage/GlobalLoadingPage.js +3 -1
  113. package/dist/js/LoadingPage/GlobalLoadingPage.js.map +1 -1
  114. package/dist/js/MiniProductCard/MiniProductCard.js +4 -2
  115. package/dist/js/MiniProductCard/MiniProductCard.js.map +1 -1
  116. package/dist/js/Modals/ModalDialog.d.ts +1 -1
  117. package/dist/js/Modals/ModalDialog.js +24 -10
  118. package/dist/js/Modals/ModalDialog.js.map +1 -1
  119. package/dist/js/Paginator/Paginator.js +3 -1
  120. package/dist/js/Paginator/Paginator.js.map +1 -1
  121. package/dist/js/SkipToContent/SkipToContent.js +3 -1
  122. package/dist/js/SkipToContent/SkipToContent.js.map +1 -1
  123. package/dist/js/Switcher/MobileSwitcherMenu.js +3 -1
  124. package/dist/js/Switcher/MobileSwitcherMenu.js.map +1 -1
  125. package/dist/js/Switcher/SwitcherMenuItem.js +3 -1
  126. package/dist/js/Switcher/SwitcherMenuItem.js.map +1 -1
  127. package/dist/js/Tabs/HorizontalTabs.js +3 -1
  128. package/dist/js/Tabs/HorizontalTabs.js.map +1 -1
  129. package/dist/js/Toasters/Toast.js +3 -3
  130. package/dist/js/Toasters/Toast.js.map +1 -1
  131. package/dist/js/styles/typography.d.ts +19 -6
  132. package/dist/js/styles/typography.js +80 -5
  133. package/dist/js/styles/typography.js.map +1 -1
  134. package/dist/umd/AuthPage/Information.js +6 -10
  135. package/dist/umd/AuthPage/Information.js.map +1 -1
  136. package/dist/umd/Banners/Banner.js +2 -2
  137. package/dist/umd/Banners/Banner.js.map +1 -1
  138. package/dist/umd/Banners/OverviewBanner.js +5 -6
  139. package/dist/umd/Banners/OverviewBanner.js.map +1 -1
  140. package/dist/umd/Breadcrumb/Breadcrumb.js +48 -22
  141. package/dist/umd/Breadcrumb/Breadcrumb.js.map +1 -1
  142. package/dist/umd/Button/Iconbutton.js +4 -1
  143. package/dist/umd/Button/Iconbutton.js.map +1 -1
  144. package/dist/umd/Dropdown/CommonStyling.js +28 -28
  145. package/dist/umd/Dropdown/CommonStyling.js.map +1 -1
  146. package/dist/umd/Footer/Components/FooterDropdownLinks.js +8 -8
  147. package/dist/umd/Footer/Components/FooterDropdownLinks.js.map +1 -1
  148. package/dist/umd/Footer/Components/FooterNavSection.js +6 -11
  149. package/dist/umd/Footer/Components/FooterNavSection.js.map +1 -1
  150. package/dist/umd/Footer/Components/FooterNewsletterAndSocialSection.js +3 -3
  151. package/dist/umd/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  152. package/dist/umd/Footer/Components/FooterTop.js +5 -6
  153. package/dist/umd/Footer/Components/FooterTop.js.map +1 -1
  154. package/dist/umd/GlobalNavigationBar/Logo.js +10 -14
  155. package/dist/umd/GlobalNavigationBar/Logo.js.map +1 -1
  156. package/dist/umd/GlobalNavigationBar/RightSideNav.js +6 -6
  157. package/dist/umd/GlobalNavigationBar/RightSideNav.js.map +1 -1
  158. package/dist/umd/GlobalNavigationBar/UserMenu/MenuLink.js +5 -9
  159. package/dist/umd/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -1
  160. package/dist/umd/GlobalNavigationBar/UserMenu/MobileUserMenu.js +12 -10
  161. package/dist/umd/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -1
  162. package/dist/umd/GlobalNavigationBar/UserMenu/UserMenu.js +7 -16
  163. package/dist/umd/GlobalNavigationBar/UserMenu/UserMenu.js.map +1 -1
  164. package/dist/umd/GlobalNavigationBar/mobile/CommonStyles.js +4 -1
  165. package/dist/umd/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  166. package/dist/umd/GlobalNavigationBar/mobile/MobileMenu.js +7 -11
  167. package/dist/umd/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  168. package/dist/umd/InputFields/DatepickerField.js +15 -16
  169. package/dist/umd/InputFields/DatepickerField.js.map +1 -1
  170. package/dist/umd/InputFields/components/SearchBarInput.js +13 -14
  171. package/dist/umd/InputFields/components/SearchBarInput.js.map +1 -1
  172. package/dist/umd/InputFields/components/SearchField.js +15 -14
  173. package/dist/umd/InputFields/components/SearchField.js.map +1 -1
  174. package/dist/umd/List/ListRow.js +7 -5
  175. package/dist/umd/List/ListRow.js.map +1 -1
  176. package/dist/umd/List/ListRowDropdown.js +6 -8
  177. package/dist/umd/List/ListRowDropdown.js.map +1 -1
  178. package/dist/umd/LoadingPage/GlobalLoadingPage.js +6 -6
  179. package/dist/umd/LoadingPage/GlobalLoadingPage.js.map +1 -1
  180. package/dist/umd/MiniProductCard/MiniProductCard.js +6 -8
  181. package/dist/umd/MiniProductCard/MiniProductCard.js.map +1 -1
  182. package/dist/umd/Modals/ModalDialog.js +22 -10
  183. package/dist/umd/Modals/ModalDialog.js.map +1 -1
  184. package/dist/umd/Paginator/Paginator.js +7 -9
  185. package/dist/umd/Paginator/Paginator.js.map +1 -1
  186. package/dist/umd/SkipToContent/SkipToContent.js +6 -8
  187. package/dist/umd/SkipToContent/SkipToContent.js.map +1 -1
  188. package/dist/umd/Switcher/MobileSwitcherMenu.js +6 -7
  189. package/dist/umd/Switcher/MobileSwitcherMenu.js.map +1 -1
  190. package/dist/umd/Switcher/SwitcherMenuItem.js +10 -12
  191. package/dist/umd/Switcher/SwitcherMenuItem.js.map +1 -1
  192. package/dist/umd/Tabs/HorizontalTabs.js +8 -12
  193. package/dist/umd/Tabs/HorizontalTabs.js.map +1 -1
  194. package/dist/umd/Toasters/Toast.js +1 -2
  195. package/dist/umd/Toasters/Toast.js.map +1 -1
  196. package/dist/umd/styles/typography.js +62 -2
  197. package/dist/umd/styles/typography.js.map +1 -1
  198. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/GlobalNavigationBar/UserMenu/MobileUserMenu.tsx"],"names":["Menu","styled","ul","COLORS","white","flowDown","BREAKPOINTS","SMALL","scrollBarStyling","MenuSection","li","MenuSectionList","UserMenuSectionListStyling","Top","div","neutral_600","LabelLine","span","neutral_20","StyledMenulink","MenuLink","MobileUserMenu","accountMenuHeader","firstName","lastName","email","organizationName","clickMenuAction","accountSection","organizationSection","supportSection","signOut","signOutLabel","React","useEffect","handleKeyPress","e","keyCode","document","addEventListener","removeEventListener","length","map","element","to","label","isExternal","display","margin","width","preventDefault"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAGC,0BAAOC,EAAV,2pBAGYC,eAAOC,KAHnB,EAMaC,sBAN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AK,IAAA,GAAG,EAAC,eAAT;AAAyB,IAAA,KAAK,EAAE;AAAEgB,MAAAA,OAAO,EAAE,MAAX;AAAmBC,MAAAA,MAAM,EAAE;AAA3B;AAAhC,kBACE,oBAAC,cAAD;AACE,IAAA,KAAK,EAAE;AAAEC,MAAAA,KAAK,EAAE,KAAT;AAAgBD,MAAAA,MAAM,EAAE;AAAxB,KADT;AAEE,IAAA,OAAO,EAAC,WAFV;AAGE,IAAA,OAAO,EAAE,iBAACZ,CAAD,EAAO;AACdA,MAAAA,CAAC,CAACc,cAAF;AACAnB,MAAAA,OAAO,CAACK,CAAD,CAAP;AACD;AANH,KAOGJ,YAPH,CADF,CA5CJ,CADF;AA2DD,CArFD;;;AAbEV,EAAAA,iB;AACAC,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,K;AACAC,EAAAA,gB;AACAC,EAAAA,e;AACAC,EAAAA,c;AACAC,EAAAA,mB;AACAC,EAAAA,c;AACAC,EAAAA,O;AACAC,EAAAA,Y;;eA0FaX,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { BREAKPOINTS, COLORS, scrollBarStyling } from '../../styles';\n\nimport MenuLink from './MenuLink';\nimport { UserMenuItem } from '../../types';\nimport { Button, IconButton } from '../../Button';\nimport { ArrowLineLeft, Close } from '../../icons/systemicons/SystemIcons';\nimport { flowDown, Right, UserMenuSectionListStyling } from '../mobile/CommonStyles';\n\nconst Menu = styled.ul`\n list-style: none;\n margin: 0;\n background-color: ${COLORS.white};\n box-sizing: border-box;\n display: none;\n -webkit-animation: ${flowDown} 0.2s ease-in-out;\n animation: ${flowDown} 0.2s ease-in-out;\n position: absolute;\n border-radius: 4px;\n z-index: 100;\n height: 100%;\n width: 320px;\n padding-inline-start: 0;\n overflow-y: scroll;\n ${BREAKPOINTS.SMALL} {\n min-width: 360px;\n }\n\n .open & {\n display: flex;\n flex-direction: column;\n }\n\n .signOutButton {\n height: 40px !important;\n width: 288px !important;\n\n ${BREAKPOINTS.SMALL} {\n width: 328px !important;\n }\n }\n\n ${scrollBarStyling};\n`;\n\nconst MenuSection = styled.li`\n padding: 8px 0;\n position: relative;\n\n .disabled-link {\n color: #21212150;\n pointer-events: none;\n key-events: none;\n }\n`;\n\nconst MenuSectionList = styled.ul`\n list-style: none;\n margin: 0;\n overflow-y: unset !important;\n padding-inline-start: 0;\n ${UserMenuSectionListStyling};\n`;\n\nconst Top = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 22px 12px 0 12px;\n color: ${COLORS.neutral_600};\n\n h3 {\n margin-block-start: 0 !important;\n margin-block-end: 0 !important;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n font-weight: normal;\n font-size: 16px;\n color: inherit;\n margin-left: 24px;\n }\n`;\n\nconst LabelLine = styled.span`\n height: 32px;\n background-color: ${COLORS.neutral_20};\n padding-left: 24px;\n display: flex;\n line-height: 32px;\n`;\n\nconst StyledMenulink = styled(MenuLink)`\n width: 100%;\n height: 48px;\n margin: 0;\n line-height: 48px;\n`;\n\ninterface Props {\n accountMenuHeader: string;\n firstName: string;\n lastName: string;\n email: string;\n organizationName: string;\n clickMenuAction: () => void;\n accountSection?: UserMenuItem[];\n organizationSection?: UserMenuItem[];\n supportSection?: UserMenuItem[];\n signOut?: (e: any) => void;\n signOutLabel?: string;\n}\n\nconst MobileUserMenu = ({\n accountMenuHeader,\n firstName,\n lastName,\n email,\n organizationName,\n clickMenuAction,\n accountSection,\n organizationSection,\n supportSection,\n signOut,\n signOutLabel,\n}: Props) => {\n React.useEffect(() => {\n function handleKeyPress(e: any) {\n if (e.keyCode === 27) {\n clickMenuAction();\n }\n }\n\n document.addEventListener('keydown', handleKeyPress, false);\n return () => {\n document.removeEventListener('keydown', handleKeyPress, false);\n };\n }, [clickMenuAction]);\n\n return (\n <Menu onClick={() => {}} role=\"menu\" aria-labelledby=\"UserMenuButton\">\n <Top key=\"MobileUserMenuTopSection\">\n <IconButton variant=\"secondary\" shape=\"circular\" action={clickMenuAction} isInMobileMenu={true}>\n <ArrowLineLeft size=\"24px\" color={COLORS.neutral_600} />\n </IconButton>\n <h3>{accountMenuHeader}</h3>\n <Right>\n <IconButton variant=\"secondary\" shape=\"circular\" action={clickMenuAction} isInMobileMenu={true}>\n <Close size=\"24px\" />\n </IconButton>\n </Right>\n </Top>\n {accountSection && accountSection?.length > 0 && (\n <MenuSection key=\"MobileAccountSection\">\n <LabelLine data-hj-suppress>{`${firstName} ${lastName}`}</LabelLine>\n <MenuSectionList>\n {accountSection?.map((element) => (\n <StyledMenulink key={element?.to} to={element?.to} menuText={element?.label} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n {organizationSection && organizationSection?.length > 0 && (\n <MenuSection key=\"MObileOrganizationSection\">\n <LabelLine>{organizationName || ''}</LabelLine>\n <MenuSectionList>\n {organizationSection?.map((element) => (\n <StyledMenulink key={element?.to} to={element?.to} menuText={element?.label} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n\n {supportSection && supportSection?.length > 0 && (\n <MenuSection key=\"MobileSupportSection\">\n <LabelLine>{''}</LabelLine>\n <MenuSectionList>\n {supportSection?.map((element) => (\n <StyledMenulink key={element?.to} isExternal={element.isExternal} to={element?.to} menuText={element?.label} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n {signOut && (\n <div key=\"SignoutButton\" style={{ display: 'flex', margin: 'auto 0 12px 0' }}>\n <Button\n style={{ width: '90%', margin: '0 auto' }}\n variant=\"secondary\"\n onClick={(e) => {\n e.preventDefault();\n signOut(e);\n }}>\n {signOutLabel}\n </Button>\n </div>\n )}\n </Menu>\n );\n};\n\nexport default MobileUserMenu;\n"],"file":"MobileUserMenu.js"}
1
+ {"version":3,"sources":["../../../../src/GlobalNavigationBar/UserMenu/MobileUserMenu.tsx"],"names":["Menu","styled","ul","COLORS","white","flowDown","BREAKPOINTS","SMALL","scrollBarStyling","MenuSection","li","MenuSectionList","UserMenuSectionListStyling","Top","div","neutral_600","ComponentTextStyle","Regular","LabelLine","span","neutral_20","StyledMenulink","MenuLink","MobileUserMenu","accountMenuHeader","firstName","lastName","email","organizationName","clickMenuAction","accountSection","organizationSection","supportSection","signOut","signOutLabel","React","useEffect","handleKeyPress","e","keyCode","document","addEventListener","removeEventListener","length","map","element","to","label","isExternal","display","margin","width","preventDefault"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAGC,0BAAOC,EAAV,2pBAGYC,eAAOC,KAHnB,EAMaC,sBANb,EAOKA,sBAPL,EAeNC,oBAAYC,KAfN,EA4BJD,oBAAYC,KA5BR,EAiCNC,wBAjCM,CAAV;;AAoCA,IAAMC,WAAW,GAAGR,0BAAOS,EAAV,uNAAjB;;AAWA,IAAMC,eAAe,GAAGV,0BAAOC,EAAV,mLAKjBU,wCALiB,CAArB;;AAQA,IAAMC,GAAG,GAAGZ,0BAAOa,GAAV,iXAKEX,eAAOY,WALT,EAcH,mCAAkBC,2BAAmBC,OAArC,EAA8C,SAA9C,CAdG,CAAT;;AAkBA,IAAMC,SAAS,GAAGjB,0BAAOkB,IAAV,qLAEOhB,eAAOiB,UAFd,CAAf;;AAQA,IAAMC,cAAc,GAAG,+BAAOC,iBAAP,CAAH,6JAApB;;AAwBA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,OAYV;AAAA,MAXXC,iBAWW,QAXXA,iBAWW;AAAA,MAVXC,SAUW,QAVXA,SAUW;AAAA,MATXC,QASW,QATXA,QASW;AAAA,MARXC,KAQW,QARXA,KAQW;AAAA,MAPXC,gBAOW,QAPXA,gBAOW;AAAA,MANXC,eAMW,QANXA,eAMW;AAAA,MALXC,cAKW,QALXA,cAKW;AAAA,MAJXC,mBAIW,QAJXA,mBAIW;AAAA,MAHXC,cAGW,QAHXA,cAGW;AAAA,MAFXC,OAEW,QAFXA,OAEW;AAAA,MADXC,YACW,QADXA,YACW;AACXC,EAAAA,KAAK,CAACC,SAAN,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ADH,uBACGA,cAAc,CAAEY,GAAhB,CAAoB,UAACC,OAAD;AAAA,wBACnB,oBAAC,cAAD;AAAgB,MAAA,GAAG,EAAEA,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEC,EAA9B;AAAkC,MAAA,UAAU,EAAED,OAAO,CAACG,UAAtD;AAAkE,MAAA,EAAE,EAAEH,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEC,EAA/E;AAAmF,MAAA,QAAQ,EAAED,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEE;AAAtG,MADmB;AAAA,GAApB,CADH,CAFF,CAlCJ,EA2CGd,OAAO,iBACN;AAAK,IAAA,GAAG,EAAC,eAAT;AAAyB,IAAA,KAAK,EAAE;AAAEgB,MAAAA,OAAO,EAAE,MAAX;AAAmBC,MAAAA,MAAM,EAAE;AAA3B;AAAhC,kBACE,oBAAC,cAAD;AACE,IAAA,KAAK,EAAE;AAAEC,MAAAA,KAAK,EAAE,KAAT;AAAgBD,MAAAA,MAAM,EAAE;AAAxB,KADT;AAEE,IAAA,OAAO,EAAC,WAFV;AAGE,IAAA,OAAO,EAAE,iBAACZ,CAAD,EAAO;AACdA,MAAAA,CAAC,CAACc,cAAF;AACAnB,MAAAA,OAAO,CAACK,CAAD,CAAP;AACD;AANH,KAOGJ,YAPH,CADF,CA5CJ,CADF;AA2DD,CArFD;;;AAbEV,EAAAA,iB;AACAC,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,K;AACAC,EAAAA,gB;AACAC,EAAAA,e;AACAC,EAAAA,c;AACAC,EAAAA,mB;AACAC,EAAAA,c;AACAC,EAAAA,O;AACAC,EAAAA,Y;;eA0FaX,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, scrollBarStyling} from '../../styles';\n\nimport MenuLink from './MenuLink';\nimport {UserMenuItem} from '../../types';\nimport {Button, IconButton} from '../../Button';\nimport {ArrowLineLeft, Close} from '../../icons/systemicons/SystemIcons';\nimport {flowDown, Right, UserMenuSectionListStyling} from '../mobile/CommonStyles';\nimport {ComponentSStyling} from '../../styles/typography';\n\nconst Menu = styled.ul`\n list-style: none;\n margin: 0;\n background-color: ${COLORS.white};\n box-sizing: border-box;\n display: none;\n -webkit-animation: ${flowDown} 0.2s ease-in-out;\n animation: ${flowDown} 0.2s ease-in-out;\n position: absolute;\n border-radius: 4px;\n z-index: 100;\n height: 100%;\n width: 320px;\n padding-inline-start: 0;\n overflow-y: scroll;\n ${BREAKPOINTS.SMALL} {\n min-width: 360px;\n }\n\n .open & {\n display: flex;\n flex-direction: column;\n }\n\n .signOutButton {\n height: 40px !important;\n width: 288px !important;\n\n ${BREAKPOINTS.SMALL} {\n width: 328px !important;\n }\n }\n\n ${scrollBarStyling};\n`;\n\nconst MenuSection = styled.li`\n padding: 8px 0;\n position: relative;\n\n .disabled-link {\n color: #21212150;\n pointer-events: none;\n key-events: none;\n }\n`;\n\nconst MenuSectionList = styled.ul`\n list-style: none;\n margin: 0;\n overflow-y: unset !important;\n padding-inline-start: 0;\n ${UserMenuSectionListStyling};\n`;\n\nconst Top = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 22px 12px 0 12px;\n color: ${COLORS.neutral_600};\n\n h3 {\n margin-block-start: 0 !important;\n margin-block-end: 0 !important;\n margin-inline-start: 0;\n margin-inline-end: 0;\n margin-left: 24px;\n\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n }\n`;\n\nconst LabelLine = styled.span`\n height: 32px;\n background-color: ${COLORS.neutral_20};\n padding-left: 24px;\n display: flex;\n line-height: 32px;\n`;\n\nconst StyledMenulink = styled(MenuLink)`\n width: 100%;\n height: 48px;\n margin: 0;\n \n & a {\n height: 100%;\n }\n`;\n\ninterface Props {\n accountMenuHeader: string;\n firstName: string;\n lastName: string;\n email: string;\n organizationName: string;\n clickMenuAction: () => void;\n accountSection?: UserMenuItem[];\n organizationSection?: UserMenuItem[];\n supportSection?: UserMenuItem[];\n signOut?: (e: any) => void;\n signOutLabel?: string;\n}\n\nconst MobileUserMenu = ({\n accountMenuHeader,\n firstName,\n lastName,\n email,\n organizationName,\n clickMenuAction,\n accountSection,\n organizationSection,\n supportSection,\n signOut,\n signOutLabel,\n}: Props) => {\n React.useEffect(() => {\n function handleKeyPress(e: any) {\n if (e.keyCode === 27) {\n clickMenuAction();\n }\n }\n\n document.addEventListener('keydown', handleKeyPress, false);\n return () => {\n document.removeEventListener('keydown', handleKeyPress, false);\n };\n }, [clickMenuAction]);\n\n return (\n <Menu onClick={() => {}} role=\"menu\" aria-labelledby=\"UserMenuButton\">\n <Top key=\"MobileUserMenuTopSection\">\n <IconButton variant=\"secondary\" shape=\"circular\" action={clickMenuAction} isInMobileMenu={true}>\n <ArrowLineLeft size=\"24px\" color={COLORS.neutral_600} />\n </IconButton>\n <h3>{accountMenuHeader}</h3>\n <Right>\n <IconButton variant=\"secondary\" shape=\"circular\" action={clickMenuAction} isInMobileMenu={true}>\n <Close size=\"24px\" />\n </IconButton>\n </Right>\n </Top>\n {accountSection && accountSection?.length > 0 && (\n <MenuSection key=\"MobileAccountSection\">\n <LabelLine data-hj-suppress>{`${firstName} ${lastName}`}</LabelLine>\n <MenuSectionList>\n {accountSection?.map((element) => (\n <StyledMenulink key={element?.to} to={element?.to} menuText={element?.label} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n {organizationSection && organizationSection?.length > 0 && (\n <MenuSection key=\"MObileOrganizationSection\">\n <LabelLine>{organizationName || ''}</LabelLine>\n <MenuSectionList>\n {organizationSection?.map((element) => (\n <StyledMenulink key={element?.to} to={element?.to} menuText={element?.label} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n\n {supportSection && supportSection?.length > 0 && (\n <MenuSection key=\"MobileSupportSection\">\n <LabelLine>{''}</LabelLine>\n <MenuSectionList>\n {supportSection?.map((element) => (\n <StyledMenulink key={element?.to} isExternal={element.isExternal} to={element?.to} menuText={element?.label} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n {signOut && (\n <div key=\"SignoutButton\" style={{ display: 'flex', margin: 'auto 0 12px 0' }}>\n <Button\n style={{ width: '90%', margin: '0 auto' }}\n variant=\"secondary\"\n onClick={(e) => {\n e.preventDefault();\n signOut(e);\n }}>\n {signOutLabel}\n </Button>\n </div>\n )}\n </Menu>\n );\n};\n\nexport default MobileUserMenu;\n"],"file":"MobileUserMenu.js"}
@@ -23,6 +23,8 @@ var _MenuLink = _interopRequireDefault(require("./MenuLink"));
23
23
 
24
24
  var _CommonStyles = require("../mobile/CommonStyles");
25
25
 
26
+ var _typography = require("../../styles/typography");
27
+
26
28
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
27
29
 
28
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); }
@@ -41,11 +43,11 @@ var MenuSectionList = _styledComponents.default.ul(_templateObject3 || (_templat
41
43
 
42
44
  var StyledAvatarContainer = (0, _styledComponents.default)(_Avatar.AvatarContainer)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: 25px 0 0 25px;\n"])));
43
45
 
44
- var AvatarAndName = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n\n h5 {\n margin: 27px 0 0 20px;\n font-style: normal;\n font-weight: bold;\n font-size: 20px;\n line-height: 140%;\n color: ", ";\n }\n span {\n margin: -5px 0 0 20px;\n font-weight: normal;\n font-size: 14px;\n line-height: 140%;\n color: ", ";\n top: -2px;\n }\n"])), _styles.COLORS.neutral_600, _styles.COLORS.neutral_600);
46
+ var AvatarAndName = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n\n h5 {\n margin: 27px 0 0 20px;\n ", "\n }\n span {\n margin: -5px 0 0 20px;\n ", "\n top: -2px;\n }\n"])), (0, _typography.HeadlineXXSStyling)(_styles.COLORS.neutral_600), (0, _typography.ComponentXSStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600));
45
47
 
46
48
  var NameAndEmail = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
47
49
 
48
- var OrganizationName = _styledComponents.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-weight: bold;\n font-size: 14px;\n color: ", ";\n margin-left: 25px;\n"])), _styles.COLORS.neutral_600);
50
+ var OrganizationName = _styledComponents.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: 25px;\n ", "\n"])), (0, _typography.ComponentXSStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.neutral_600));
49
51
 
50
52
  var UserMenu = function UserMenu(_ref) {
51
53
  var firstName = _ref.firstName,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/GlobalNavigationBar/UserMenu/UserMenu.tsx"],"names":["Menu","styled","ul","COLORS","white","flowDown","neutral_200","MenuSection","li","neutral_100","MenuSectionList","UserMenuSectionListStyling","StyledAvatarContainer","AvatarContainer","AvatarAndName","div","neutral_600","NameAndEmail","OrganizationName","span","UserMenu","firstName","lastName","email","organizationName","clickMenuAction","accountSection","organizationSection","supportSection","signOut","signOutLabel","React","useEffect","handleKeyPress","e","keyCode","document","addEventListener","removeEventListener","primary_500","length","map","element","to","label","icon","onClick","isExternal","preventDefault","fontSize","lineHeight","boxSizing","borderRadius","height","display","justifyContent","alignItems","margin","width"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAGC,0BAAOC,EAAV,2dAIYC,eAAOC,KAJnB,EAQaC,s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;AAAuG,MAAA,IAAI,EAAEF,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEG,IAAtH;AAA4H,MAAA,OAAO,EAAEH,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEI;AAA9I,MAD0B;AAAA,GAA3B,CADH,EAIGjB,OAAO,iBACN,oBAAC,cAAD;AACE,IAAA,KAAK,EAAC,KADR;AAEE,IAAA,SAAS,EAAC,cAFZ;AAGE,IAAA,OAAO,EAAC,WAHV;AAIE,IAAA,IAAI,EAAC,KAJP;AAKE,IAAA,OAAO,EAAE,iBAAAK,CAAC,EAAI;AACZA,MAAAA,CAAC,CAACc,cAAF;AACAnB,MAAAA,OAAO,CAACK,CAAD,CAAP;AACD,KARH;AASE,IAAA,KAAK,EAAE;AACLe,MAAAA,QAAQ,EAAE,MADL;AAELC,MAAAA,UAAU,EAAE,MAFP;AAGLC,MAAAA,SAAS,EAAE,YAHN;AAILC,MAAAA,YAAY,EAAE,KAJT;AAKLC,MAAAA,MAAM,EAAE,MALH;AAMLC,MAAAA,OAAO,EAAE,MANJ;AAOLC,MAAAA,cAAc,EAAE,QAPX;AAQLC,MAAAA,UAAU,EAAE,QARP;AASLC,MAAAA,MAAM,EAAE,oBATH;AAULC,MAAAA,KAAK,EAAE;AAVF;AATT,KAqBG5B,YArBH,CALJ,CADF,CA/BF,CADF;AAkED,CAhFD;;;AAZET,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,K;AACAC,EAAAA,gB;AACAC,EAAAA,e;AACAC,EAAAA,c;AACAC,EAAAA,mB;AACAC,EAAAA,c;AACAC,EAAAA,O;AACAC,EAAAA,Y;;eAqFaV,Q","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '../../Button';\nimport { COLORS } from '../../styles';\nimport Avatar, { AvatarContainer } from '../Avatar';\nimport MenuLink from './MenuLink';\nimport { UserMenuItem } from '../../types';\nimport { flowDown, UserMenuSectionListStyling } from '../mobile/CommonStyles';\n\nconst Menu = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n background-color: ${COLORS.white};\n box-sizing: border-box;\n display: none;\n min-width: 312px;\n -webkit-animation: ${flowDown} 0.2s ease-in-out;\n animation: ${flowDown} 0.2s ease-in-out;\n position: absolute;\n box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n border: 1px solid ${COLORS.neutral_200};\n z-index: 100;\n\n .open & {\n display: block;\n }\n`;\n\nconst MenuSection = styled.li`\n padding: 8px 0;\n position: relative;\n\n &:not(:first-of-type)::before {\n content: '';\n position: absolute;\n background: ${COLORS.neutral_100};\n height: 1px;\n top: 0;\n left: 16px;\n right: 16px;\n }\n\n .disabled-link {\n color: #21212150;\n pointer-events: none;\n key-events: none;\n }\n`;\n\nconst MenuSectionList = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n\n ${UserMenuSectionListStyling};\n`;\n\nconst StyledAvatarContainer = styled(AvatarContainer)`\n margin: 25px 0 0 25px;\n`;\n\nconst AvatarAndName = styled.div`\n display: flex;\n flex-direction: row;\n\n h5 {\n margin: 27px 0 0 20px;\n font-style: normal;\n font-weight: bold;\n font-size: 20px;\n line-height: 140%;\n color: ${COLORS.neutral_600};\n }\n span {\n margin: -5px 0 0 20px;\n font-weight: normal;\n font-size: 14px;\n line-height: 140%;\n color: ${COLORS.neutral_600};\n top: -2px;\n }\n`;\n\nconst NameAndEmail = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst OrganizationName = styled.span`\n font-weight: bold;\n font-size: 14px;\n color: ${COLORS.neutral_600};\n margin-left: 25px;\n`;\n\ninterface Props {\n firstName: string;\n lastName: string;\n email: string;\n organizationName: string;\n clickMenuAction: () => void;\n accountSection?: UserMenuItem[];\n organizationSection?: UserMenuItem[];\n supportSection?: UserMenuItem[];\n signOut?: (e: any) => void;\n signOutLabel?: string;\n}\n\nconst UserMenu = ({ firstName, lastName, email, organizationName, clickMenuAction, accountSection, organizationSection, supportSection, signOut, signOutLabel }: Props) => {\n React.useEffect(() => {\n function handleKeyPress(e: any) {\n if (e.keyCode === 27) {\n clickMenuAction();\n }\n }\n\n document.addEventListener('keydown', handleKeyPress, false);\n return () => {\n document.removeEventListener('keydown', handleKeyPress, false);\n };\n }, [clickMenuAction]);\n\n return (\n <Menu onClick={clickMenuAction} role=\"menu\" aria-labelledby=\"UserMenuButton\">\n <AvatarAndName key=\"AvatarAndNameSection\">\n <StyledAvatarContainer hidePadding={true}>\n <Avatar size={48} firstName={firstName} lastName={lastName} color={COLORS.primary_500} profileMenuLink=\"#TODO\" />\n </StyledAvatarContainer>\n <NameAndEmail>\n <h5 data-hj-suppress>{`${firstName} ${lastName}`}</h5>\n <span data-hj-suppress>{email}</span>\n </NameAndEmail>\n </AvatarAndName>\n {accountSection && accountSection?.length > 0 && (\n <MenuSection key=\"MobileAccountSection\">\n <MenuSectionList>\n {accountSection?.map(element => (\n <MenuLink key={element?.to} to={element?.to} menuText={element?.label} Icon={element?.icon} onClick={element?.onClick} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n\n {organizationSection && organizationSection?.length > 0 && (\n <MenuSection key=\"MobileOrganizationSection\">\n <OrganizationName>{organizationName || ''}</OrganizationName>\n <MenuSectionList>\n {organizationSection?.map(element => (\n <MenuLink key={element?.to} to={element?.to} menuText={element?.label} Icon={element?.icon} onClick={element?.onClick} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n\n <MenuSection key=\"MobileSupportSection\">\n <MenuSectionList>\n {supportSection?.map(element => (\n <MenuLink key={element?.to} isExternal={element.isExternal} to={element?.to} menuText={element?.label} Icon={element?.icon} onClick={element?.onClick} />\n ))}\n {signOut && (\n <Button\n width=\"90%\"\n className=\"UserMenuLink\"\n variant=\"secondary\"\n size=\"big\"\n onClick={e => {\n e.preventDefault();\n signOut(e);\n }}\n style={{\n fontSize: '19px',\n lineHeight: '23px',\n boxSizing: 'border-box',\n borderRadius: '8px',\n height: '56px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n margin: '8px auto 12px auto',\n width: '90%',\n }}>\n {signOutLabel}\n </Button>\n )}\n </MenuSectionList>\n </MenuSection>\n </Menu>\n );\n};\n\nexport default UserMenu;\n"],"file":"UserMenu.js"}
1
+ {"version":3,"sources":["../../../../src/GlobalNavigationBar/UserMenu/UserMenu.tsx"],"names":["Menu","styled","ul","COLORS","white","flowDown","neutral_200","MenuSection","li","neutral_100","MenuSectionList","UserMenuSectionListStyling","StyledAvatarContainer","AvatarContainer","AvatarAndName","div","neutral_600","ComponentTextStyle","Regular","NameAndEmail","OrganizationName","span","Bold","UserMenu","firstName","lastName","email","organizationName","clickMenuAction","accountSection","organizationSection","supportSection","signOut","signOutLabel","React","useEffect","handleKeyPress","e","keyCode","document","addEventListener","removeEventListener","primary_500","length","map","element","to","label","icon","onClick","isExternal","preventDefault","fontSize","lineHeight","boxSizing","borderRadius","height","display","justifyContent","alignItems","margin","width"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAGC,0BAAOC,EAAV,2dAIYC,eAAOC,KAJnB,EAQaC,sBARb,EASKA,sBATL,EAaYF,eAAOG,WAbnB,CAAV;;AAqBA,IAAMC,WAAW,GAAGN,0BAAOO,EAAV,sYAOCL,eAAOM,WAPR,CAAjB;;AAqBA,IAAMC,eAAe,GAAGT,0BAAOC,EAAV,uIAKjBS,wCALiB,CAArB;;AAQA,IAAMC,qBAAqB,GAAG,+BAAOC,uBAAP,CAAH,mGAA3B;;AAIA,IAAMC,aAAa,GAAGb,0BAAOc,GAAV,8OAMb,oCAAmBZ,eAAOa,WAA1B,CANa,EAUb,oCAAmBC,2BAAmBC,OAAtC,EAA+Cf,eAAOa,WAAtD,CAVa,CAAnB;;AAeA,IAAMG,YAAY,GAAGlB,0BAAOc,GAAV,sHAAlB;;AAKA,IAAMK,gBAAgB,GAAGnB,0BAAOoB,IAAV,wGAElB,oCAAmBJ,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MAAAA,OAAO,CAACK,CAAD,CAAP;AACD,KARH;AASE,IAAA,KAAK,EAAE;AACLe,MAAAA,QAAQ,EAAE,MADL;AAELC,MAAAA,UAAU,EAAE,MAFP;AAGLC,MAAAA,SAAS,EAAE,YAHN;AAILC,MAAAA,YAAY,EAAE,KAJT;AAKLC,MAAAA,MAAM,EAAE,MALH;AAMLC,MAAAA,OAAO,EAAE,MANJ;AAOLC,MAAAA,cAAc,EAAE,QAPX;AAQLC,MAAAA,UAAU,EAAE,QARP;AASLC,MAAAA,MAAM,EAAE,oBATH;AAULC,MAAAA,KAAK,EAAE;AAVF;AATT,KAqBG5B,YArBH,CALJ,CADF,CA/BF,CADF;AAkED,CAhFD;;;AAZET,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,K;AACAC,EAAAA,gB;AACAC,EAAAA,e;AACAC,EAAAA,c;AACAC,EAAAA,mB;AACAC,EAAAA,c;AACAC,EAAAA,O;AACAC,EAAAA,Y;;eAqFaV,Q","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {Button} from '../../Button';\nimport {COLORS, ComponentTextStyle} from '../../styles';\nimport Avatar, {AvatarContainer} from '../Avatar';\nimport MenuLink from './MenuLink';\nimport {UserMenuItem} from '../../types';\nimport {flowDown, UserMenuSectionListStyling} from '../mobile/CommonStyles';\nimport {ComponentXSStyling, HeadlineXXSStyling} from '../../styles/typography';\n\nconst Menu = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n background-color: ${COLORS.white};\n box-sizing: border-box;\n display: none;\n min-width: 312px;\n -webkit-animation: ${flowDown} 0.2s ease-in-out;\n animation: ${flowDown} 0.2s ease-in-out;\n position: absolute;\n box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n border: 1px solid ${COLORS.neutral_200};\n z-index: 100;\n\n .open & {\n display: block;\n }\n`;\n\nconst MenuSection = styled.li`\n padding: 8px 0;\n position: relative;\n\n &:not(:first-of-type)::before {\n content: '';\n position: absolute;\n background: ${COLORS.neutral_100};\n height: 1px;\n top: 0;\n left: 16px;\n right: 16px;\n }\n\n .disabled-link {\n color: #21212150;\n pointer-events: none;\n key-events: none;\n }\n`;\n\nconst MenuSectionList = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n\n ${UserMenuSectionListStyling};\n`;\n\nconst StyledAvatarContainer = styled(AvatarContainer)`\n margin: 25px 0 0 25px;\n`;\n\nconst AvatarAndName = styled.div`\n display: flex;\n flex-direction: row;\n\n h5 {\n margin: 27px 0 0 20px;\n ${HeadlineXXSStyling(COLORS.neutral_600)}\n }\n span {\n margin: -5px 0 0 20px;\n ${ComponentXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n top: -2px;\n }\n`;\n\nconst NameAndEmail = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst OrganizationName = styled.span`\n margin-left: 25px;\n ${ComponentXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n`;\n\ninterface Props {\n firstName: string;\n lastName: string;\n email: string;\n organizationName: string;\n clickMenuAction: () => void;\n accountSection?: UserMenuItem[];\n organizationSection?: UserMenuItem[];\n supportSection?: UserMenuItem[];\n signOut?: (e: any) => void;\n signOutLabel?: string;\n}\n\nconst UserMenu = ({ firstName, lastName, email, organizationName, clickMenuAction, accountSection, organizationSection, supportSection, signOut, signOutLabel }: Props) => {\n React.useEffect(() => {\n function handleKeyPress(e: any) {\n if (e.keyCode === 27) {\n clickMenuAction();\n }\n }\n\n document.addEventListener('keydown', handleKeyPress, false);\n return () => {\n document.removeEventListener('keydown', handleKeyPress, false);\n };\n }, [clickMenuAction]);\n\n return (\n <Menu onClick={clickMenuAction} role=\"menu\" aria-labelledby=\"UserMenuButton\">\n <AvatarAndName key=\"AvatarAndNameSection\">\n <StyledAvatarContainer hidePadding={true}>\n <Avatar size={48} firstName={firstName} lastName={lastName} color={COLORS.primary_500} profileMenuLink=\"#TODO\" />\n </StyledAvatarContainer>\n <NameAndEmail>\n <h5 data-hj-suppress>{`${firstName} ${lastName}`}</h5>\n <span data-hj-suppress>{email}</span>\n </NameAndEmail>\n </AvatarAndName>\n {accountSection && accountSection?.length > 0 && (\n <MenuSection key=\"MobileAccountSection\">\n <MenuSectionList>\n {accountSection?.map(element => (\n <MenuLink key={element?.to} to={element?.to} menuText={element?.label} Icon={element?.icon} onClick={element?.onClick} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n\n {organizationSection && organizationSection?.length > 0 && (\n <MenuSection key=\"MobileOrganizationSection\">\n <OrganizationName>{organizationName || ''}</OrganizationName>\n <MenuSectionList>\n {organizationSection?.map(element => (\n <MenuLink key={element?.to} to={element?.to} menuText={element?.label} Icon={element?.icon} onClick={element?.onClick} />\n ))}\n </MenuSectionList>\n </MenuSection>\n )}\n\n <MenuSection key=\"MobileSupportSection\">\n <MenuSectionList>\n {supportSection?.map(element => (\n <MenuLink key={element?.to} isExternal={element.isExternal} to={element?.to} menuText={element?.label} Icon={element?.icon} onClick={element?.onClick} />\n ))}\n {signOut && (\n <Button\n width=\"90%\"\n className=\"UserMenuLink\"\n variant=\"secondary\"\n size=\"big\"\n onClick={e => {\n e.preventDefault();\n signOut(e);\n }}\n style={{\n fontSize: '19px',\n lineHeight: '23px',\n boxSizing: 'border-box',\n borderRadius: '8px',\n height: '56px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n margin: '8px auto 12px auto',\n width: '90%',\n }}>\n {signOutLabel}\n </Button>\n )}\n </MenuSectionList>\n </MenuSection>\n </Menu>\n );\n};\n\nexport default UserMenu;\n"],"file":"UserMenu.js"}
@@ -49,7 +49,7 @@ var MenuSection = _styledComponents.default.li(_templateObject8 || (_templateObj
49
49
 
50
50
  exports.MenuSection = MenuSection;
51
51
 
52
- var MenuSectionList = _styledComponents.default.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 line-height: 48px;\n }\n"])));
52
+ var MenuSectionList = _styledComponents.default.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"])));
53
53
 
54
54
  exports.MenuSectionList = MenuSectionList;
55
55
  var UserMenuSectionListStyling = (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n li:hover:not(.disabled) {\n background-color: ", ";\n a {\n color: ", ";\n }\n svg {\n color: ", ";\n }\n }\n\n li:focus-within:not(.disabled) {\n box-shadow: 0px 0px 8px ", ", 0px 4px 12px rgba(46, 127, 161, 0.25);\n a {\n outline: none;\n }\n }\n\n li:active:not(.disabled) {\n background: ", ";\n box-shadow: none;\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"])), _styles.COLORS.primary_20, _styles.COLORS.primary_600, _styles.COLORS.primary_600, _styles.COLORS.primary_500, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _styles.COLORS.primary_800, _styles.COLORS.neutral_300, _styles.COLORS.neutral_300, _styles.COLORS.neutral_100);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/GlobalNavigationBar/mobile/CommonStyles.ts"],"names":["RowLayout","styled","div","Button","button","COLORS","white","flowLeft","keyframes","flowRight","Menu","ul","BREAKPOINTS","SMALL","Right","SiteName","span","neutral_600","MenuSection","li","MenuSectionList","UserMenuSectionListStyling","css","primary_20","primary_600","primary_500","primary_100","primary_800","neutral_300","neutral_100","MenuLink","NavLink","ComponentTextStyle","Regular","black","MenuWrapper","props","isVisible","flowDown"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,IAAMA,SAAS,GAAGC,0BAAOC,GAAV,iHAAf;;;;AAKA,IAAMC,MAAM,GAAGF,0BAAOG,MAAV,yIACGC,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} from 'react-router-dom';\nimport { ComponentMStyling, ComponentTextStyle } from '../../styles/typography';\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: 100;\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 line-height: 48px;\n }\n`;\n\nexport const UserMenuSectionListStyling = css`\n li:hover:not(.disabled) {\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 box-shadow: 0px 0px 8px ${COLORS.primary_500}, 0px 4px 12px rgba(46, 127, 161, 0.25);\n a {\n outline: none;\n }\n }\n\n li:active:not(.disabled) {\n background: ${COLORS.primary_100};\n box-shadow: none;\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"}
1
+ {"version":3,"sources":["../../../../src/GlobalNavigationBar/mobile/CommonStyles.ts"],"names":["RowLayout","styled","div","Button","button","COLORS","white","flowLeft","keyframes","flowRight","Menu","ul","BREAKPOINTS","SMALL","Right","SiteName","span","neutral_600","MenuSection","li","MenuSectionList","UserMenuSectionListStyling","css","primary_20","primary_600","primary_500","primary_100","primary_800","neutral_300","neutral_100","MenuLink","NavLink","ComponentTextStyle","Regular","black","MenuWrapper","props","isVisible","flowDown"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,IAAMA,SAAS,GAAGC,0BAAOC,GAAV,iHAAf;;;;AAKA,IAAMC,MAAM,GAAGF,0BAAOG,MAAV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import { NavLink } from 'react-router-dom';\nimport { ComponentMStyling, ComponentTextStyle } from '../../styles/typography';\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: 100;\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:hover:not(.disabled) {\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 box-shadow: 0px 0px 8px ${COLORS.primary_500}, 0px 4px 12px rgba(46, 127, 161, 0.25);\n a {\n outline: none;\n }\n }\n\n li:active:not(.disabled) {\n background: ${COLORS.primary_100};\n box-shadow: none;\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"}
@@ -1,4 +1,4 @@
1
- import { NavButton, NavOption, ActionOptions, UserMenuItem } from '../../types';
1
+ import { ActionOptions, NavButton, NavOption, UserMenuItem } from '../../types';
2
2
  declare type Props = {
3
3
  name: string;
4
4
  navigationOptions?: NavOption[];
@@ -35,6 +35,8 @@ var _Button = require("../../Button");
35
35
 
36
36
  var _assets = require("../../assets");
37
37
 
38
+ var _typography = require("../../styles/typography");
39
+
38
40
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
39
41
 
40
42
  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); }
@@ -57,13 +59,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
57
59
 
58
60
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
59
61
 
60
- var SwitchButton = _styledComponents.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 14px;\n font-weight: bold;\n padding: 0;\n border: 0;\n margin: 0 auto 0 12px;\n line-height: 48px;\n"])), _styles.COLORS.neutral_600);
62
+ var SwitchButton = _styledComponents.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n \n padding: 0;\n border: 0;\n margin: 0 auto 0 12px;\n line-height: 48px;\n"])), (0, _typography.ComponentXSStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.neutral_600));
61
63
 
62
64
  var BottomPinnedSection = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n width: 100%;\n bottom: 0;\n border-top: 1px solid ", ";\n"])), _styles.COLORS.neutral_200);
63
65
 
64
66
  var FirstRowLayout = (0, _styledComponents.default)(_CommonStyles.RowLayout)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: 10px;\n padding: 12px;\n"])));
65
67
  var BottomRowLayout = (0, _styledComponents.default)(_CommonStyles.RowLayout)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: 8px auto 0 0;\n width: 95%;\n height: 48px;\n ", " {\n height: 56px;\n }\n"])), _styles.BREAKPOINTS.SMALL);
66
- var StyledNavItem = (0, _styledComponents.default)(_Switcher.SwitcherMenuItem)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-style: normal;\n font-weight: normal;\n font-size: 19px;\n padding: 0 0 0 20px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n color: ", ";\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 4px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n font-weight: bold;\n &:after {\n background-color: ", ";\n }\n\n color: ", ";\n svg path {\n fill: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:hover:not(.disabled) {\n color: ", ";\n background-color: ", ";\n\n svg path {\n fill: ", ";\n }\n }\n\n &:active:not(.disabled) {\n color: ", ";\n background-color: ", ";\n box-shadow: none;\n &:after {\n background-color: ", ";\n }\n svg path {\n fill: ", ";\n }\n }\n\n &:focus:not(.disabled) {\n box-shadow: 0px 0px 8px ", ", 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n"])), _styles.COLORS.black, _styles.COLORS.primary_500, _styles.COLORS.primary_800, _styles.COLORS.primary_800, _styles.COLORS.neutral_300, _styles.COLORS.neutral_100, _styles.COLORS.primary_600, _styles.COLORS.primary_20, _styles.COLORS.primary_600, _styles.COLORS.primary_800, _styles.COLORS.primary_100, _styles.COLORS.primary_500, _styles.COLORS.primary_800, _styles.COLORS.primary_500);
68
+ var StyledNavItem = (0, _styledComponents.default)(_Switcher.SwitcherMenuItem)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 0 0 0 20px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ", "\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 4px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n font-weight: bold;\n &:after {\n background-color: ", ";\n }\n\n color: ", ";\n svg path {\n fill: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:hover:not(.disabled) {\n color: ", ";\n background-color: ", ";\n\n svg path {\n fill: ", ";\n }\n }\n\n &:active:not(.disabled) {\n color: ", ";\n background-color: ", ";\n box-shadow: none;\n &:after {\n background-color: ", ";\n }\n svg path {\n fill: ", ";\n }\n }\n\n &:focus:not(.disabled) {\n box-shadow: 0px 0px 8px ", ", 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n"])), (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.black), _styles.COLORS.primary_500, _styles.COLORS.primary_800, _styles.COLORS.primary_800, _styles.COLORS.neutral_300, _styles.COLORS.neutral_100, _styles.COLORS.primary_600, _styles.COLORS.primary_20, _styles.COLORS.primary_600, _styles.COLORS.primary_800, _styles.COLORS.primary_100, _styles.COLORS.primary_500, _styles.COLORS.primary_800, _styles.COLORS.primary_500);
67
69
 
68
70
  var SwitcherButton = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n margin-left: auto;\n\n line-height: 48px;\n button:last-child {\n margin: 0 !important;\n }\n"])));
69
71
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/GlobalNavigationBar/mobile/MobileMenu.tsx"],"names":["SwitchButton","styled","span","COLORS","neutral_600","BottomPinnedSection","div","neutral_200","FirstRowLayout","RowLayout","BottomRowLayout","BREAKPOINTS","SMALL","StyledNavItem","SwitcherMenuItem","black","primary_500","primary_800","neutral_300","neutral_100","primary_600","primary_20","primary_100","SwitcherButton","MobileMenu","clickMenuAction","navigationOptions","actions","firstName","lastName","email","signout","notifications","accountSection","organizationSection","supportSection","switcherAction","accountMenuHeader","signOutLabel","organizationName","useUserMenu","showUserMenu","setShowUserMenu","React","useState","showNotificationMenu","setShowNotificationMenu","notificationMenuRef","useRef","userMenuRef","userRef","location","user","notification","fireAction","action","ref","undefined","current","blur","isPressingEnter","e","key","preventDefault","stopPropagation","useEffect","map","no","label","NavLink","exact","to","onCl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,CADsB;AAAA,GAAvB,CADH,CADF,CApEF,eAwFE,oBAAC,mBAAD,qBACE,oBAAC,yBAAD;AAAa,IAAA,KAAK,EAAE;AAAEK,MAAAA,OAAO,EAAE,kBAAX;AAA+BC,MAAAA,MAAM,EAAE;AAAvC;AAApB,kBACE,oBAAC,6BAAD,qBACE,oBAAC,eAAD,qBACE,oBAAC,mBAAD,OADF,EAEGtC,cAAc,iBACb,oBAAC,cAAD,qBACE,oBAAC,YAAD;AAAc,IAAA,OAAO,EAAE;AAAA,aAAMA,cAAc,EAApB;AAAA;AAAvB,mBADF,EAC4E,GAD5E,eAEE,oBAAC,kBAAD;AACE,IAAA,OAAO,EAAE,WADX;AAEE,IAAA,KAAK,EAAE,UAFT;AAGE,IAAA,cAAc,EAAE,KAHlB;AAIE,IAAA,cAAc,EAAE,IAJlB;AAKE,IAAA,EAAE,EAAC,qBALL;AAME,IAAA,MAAM,EAAE;AAAA,aAAMA,cAAc,EAApB;AAAA,KANV;AAOE,IAAA,UAAU,EAAE,oBAACyB,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBzB,cAAc,EAAnC,GAAwC,IAArD;AAAA;AAPd,kBAQI,oBAAC,sBAAD;AAAW,IAAA,IAAI,EAAC;AAAhB,IARJ,CAFF,CAHJ,CADF,CADF,CADF,CAxFF,CADF;AAmHD,CAvKD;;;AAxBEuC,EAAAA,I;AACAjD,EAAAA,iB;AACAkD,EAAAA,0B;AAGAnD,EAAAA,e;AACAG,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,K;AACAC,EAAAA,O;AACA8C,EAAAA,e;AACA7C,EAAAA,a;AACAI,EAAAA,c;AACAH,EAAAA,c;AACAC,EAAAA,mB;AACAC,EAAAA,c;AACAE,EAAAA,iB;AACAC,EAAAA,Y;AACAC,EAAAA,gB;AAEAE,EAAAA,Y;AACAC,EAAAA,e;;eA4KalB,U","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\n\nimport { BREAKPOINTS, COLORS } from '../../styles';\nimport { NavButton, NavOption, ActionOptions, UserMenuItem } from '../../types';\nimport Actions from '../Actions';\nimport { Close, Notification, SwitchApp } from '../../icons/systemicons/SystemIcons';\nimport MobileActionMenu from './MobileActionMenu';\nimport { Right, RowLayout, MenuWrapper, MenuSection, MenuSectionList } from './CommonStyles';\nimport { NavLink, useLocation } from 'react-router-dom';\nimport { SwitcherMenuItem } from '../../Switcher';\nimport Avatar, { AvatarContainer } from '../Avatar';\nimport MobileUserMenu from '../UserMenu/MobileUserMenu';\nimport { IconButton } from '../../Button';\nimport { LaerdalLogo } from '../../assets';\n\nconst SwitchButton = styled.span`\n color: ${COLORS.neutral_600};\n font-size: 14px;\n font-weight: bold;\n padding: 0;\n border: 0;\n margin: 0 auto 0 12px;\n line-height: 48px;\n`;\n\nconst BottomPinnedSection = styled.div`\n position: absolute;\n left: 0;\n width: 100%;\n bottom: 0;\n border-top: 1px solid ${COLORS.neutral_200};\n`;\n\nconst FirstRowLayout = styled(RowLayout)`\n margin-top: 10px;\n padding: 12px;\n`;\n\nconst BottomRowLayout = styled(RowLayout)`\n margin: 8px auto 0 0;\n width: 95%;\n height: 48px;\n ${BREAKPOINTS.SMALL} {\n height: 56px;\n }\n`;\n\nconst StyledNavItem = styled(SwitcherMenuItem)`\n font-style: normal;\n font-weight: normal;\n font-size: 19px;\n padding: 0 0 0 20px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n color: ${COLORS.black};\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 4px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n font-weight: bold;\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n color: ${COLORS.primary_800};\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n }\n\n &:hover:not(.disabled) {\n color: ${COLORS.primary_600};\n background-color: ${COLORS.primary_20};\n\n svg path {\n fill: ${COLORS.primary_600};\n }\n }\n\n &:active:not(.disabled) {\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_100};\n box-shadow: none;\n &:after {\n background-color: ${COLORS.primary_500};\n }\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &:focus:not(.disabled) {\n box-shadow: 0px 0px 8px ${COLORS.primary_500}, 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n`;\nconst SwitcherButton = styled.div`\n display: flex;\n margin-left: auto;\n\n line-height: 48px;\n button:last-child {\n margin: 0 !important;\n }\n`;\n\ntype Props = {\n name: string;\n navigationOptions?: NavOption[];\n secondaryNavigationOptions?: NavOption[];\n secondaryButton?: NavButton;\n actions?: ActionOptions;\n clickMenuAction: () => void;\n firstName: string;\n lastName: string;\n email: string;\n signout?: (e: any) => void;\n isAuthenticated?: boolean;\n notifications?: NavOption[];\n switcherAction?: () => void;\n accountSection?: UserMenuItem[];\n organizationSection?: UserMenuItem[];\n supportSection?: UserMenuItem[];\n accountMenuHeader: string;\n signOutLabel: string;\n organizationName: string;\n useUserMenu: boolean | undefined;\n showUserMenu: boolean;\n setShowUserMenu: (show: boolean) => void;\n};\n\nconst MobileMenu = ({\n clickMenuAction,\n navigationOptions,\n actions,\n firstName,\n lastName,\n email,\n signout,\n notifications,\n accountSection,\n organizationSection,\n supportSection,\n switcherAction,\n accountMenuHeader,\n signOutLabel,\n organizationName,\n useUserMenu,\n showUserMenu,\n setShowUserMenu,\n}: Props) => {\n const [showNotificationMenu, setShowNotificationMenu] = React.useState<boolean>(false);\n const notificationMenuRef = React.useRef(null);\n const userMenuRef = React.useRef(null);\n const userRef = React.useRef(null);\n\n const location = useLocation();\n\n if (actions?.user) {\n actions.user = () => setShowUserMenu(true);\n }\n if (actions?.notification) {\n actions.notification = () => setShowNotificationMenu(true);\n }\n\n const fireAction = (action: (() => void) | undefined, ref: React.MutableRefObject<HTMLButtonElement | null> | undefined = undefined) => {\n ref?.current?.blur();\n !!action && action();\n };\n\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n React.useEffect(() => {\n clickMenuAction();\n }, [location]);\n\n return (\n <>\n {actions?.notification && (\n <MenuWrapper ref={notificationMenuRef} className={showNotificationMenu ? 'open' : ''} isVisible={showNotificationMenu}>\n <MobileActionMenu\n name=\"Notifications\"\n clickMenuAction={() => setShowNotificationMenu(false)}\n navigationOptions={notifications}\n actionList={{\n notification: () => {},\n }}\n />\n </MenuWrapper>\n )}\n {actions?.user && (\n <MenuWrapper ref={userMenuRef} className={showUserMenu ? 'open' : ''} isVisible={showUserMenu}>\n <MobileUserMenu\n accountMenuHeader={accountMenuHeader}\n firstName={firstName}\n lastName={lastName}\n email={email}\n organizationName={organizationName}\n clickMenuAction={clickMenuAction}\n accountSection={accountSection}\n organizationSection={organizationSection}\n supportSection={supportSection}\n signOut={signout}\n signOutLabel={signOutLabel}\n />\n </MenuWrapper>\n )}\n <FirstRowLayout>\n {firstName && lastName && (\n <AvatarContainer\n id=\"avatarContainer\"\n ref={userRef}\n onClick={actions?.user}\n onKeyDown={(e: any) => (isPressingEnter(e) ? fireAction(actions?.user, userRef) : null)}\n inMobileMenu={true}\n hideOnLowWidth={false}>\n <Avatar size={36} firstName={firstName} lastName={lastName} color={COLORS.primary_500} profileMenuLink=\"#TODO\" />\n </AvatarContainer>\n )}\n {actions?.notification && (\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n hideOnLowWidth={false}\n isInMobileMenu={true}\n action={() => fireAction(actions?.notification)}\n onKeyPress={(e: any) => (isPressingEnter(e) ? fireAction(actions?.notification) : null)}>\n <Notification size=\"24px\" />\n </IconButton>\n )}\n <Right>\n <Actions\n actions={actions}\n firstName={firstName}\n lastName={lastName}\n isInMobileMenu={true}\n hideOnLowWidth={false}\n useUserMenu={useUserMenu}\n setShowUserMenu={setShowUserMenu}\n />\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => clickMenuAction()} isInMobileMenu={true}>\n <Close size=\"24px\" />\n </IconButton>\n </Right>\n </FirstRowLayout>\n <MenuSection>\n <MenuSectionList>\n {navigationOptions?.map((no) => (\n <li key={no.label}>\n <StyledNavItem\n as={NavLink}\n exact={no?.exact}\n to={no.to}\n onClick={() => {\n if (no?.onClick) {\n no?.onClick();\n }\n }}>\n {no.label}\n </StyledNavItem>\n </li>\n ))}\n </MenuSectionList>\n </MenuSection>\n\n <BottomPinnedSection>\n <MenuSection style={{ padding: '0 12px 12px 12px', margin: '0' }}>\n <MenuSectionList>\n <BottomRowLayout>\n <LaerdalLogo />\n {switcherAction && (\n <SwitcherButton>\n <SwitchButton onClick={() => switcherAction()}>Switch site</SwitchButton>{' '}\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n hideOnLowWidth={false}\n isInMobileMenu={true}\n id=\"globalNavAppsButton\"\n action={() => switcherAction()}\n onKeyPress={(e: any) => (isPressingEnter(e) ? switcherAction() : null)}>\n <SwitchApp size=\"24px\" />\n </IconButton>\n </SwitcherButton>\n )}\n </BottomRowLayout>\n </MenuSectionList>\n </MenuSection>\n </BottomPinnedSection>\n </>\n );\n};\n\nexport default MobileMenu;\n"],"file":"MobileMenu.js"}
1
+ {"version":3,"sources":["../../../../src/GlobalNavigationBar/mobile/MobileMenu.tsx"],"names":["SwitchButton","styled","span","ComponentTextStyle","Bold","COLORS","neutral_600","BottomPinnedSection","div","neutral_200","FirstRowLayout","RowLayout","BottomRowLayout","BREAKPOINTS","SMALL","StyledNavItem","SwitcherMenuItem","Regular","black","primary_500","primary_800","neutral_300","neutral_100","primary_600","primary_20","primary_100","SwitcherButton","MobileMenu","clickMenuAction","navigationOptions","actions","firstName","lastName","email","signout","notifications","accountSection","organizationSection","supportSection","switcherAction","accountMenuHeader","signOutLabel","organizationName","useUserMenu","showUserMenu","setShowUserMenu","React","useState","showNotificationMenu","setShowNotificationMenu","notificationMenuRef","useRef","userMenuRef","userRef","location","user","notification","fireAction","action","ref","undefined","current","blur","isPressingEnter","e","key","preventDefault","stopPropagation","useEffect","map","no","label","NavLink","exact","to","onClick","padding","margin","name","secondaryNavigationOptions","isAuthenticated"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAGC,0BAAOC,IAAV,iKACd,oCAAmBC,2BAAmBC,IAAtC,EAA4CC,eAAOC,WAAnD,CADc,CAAlB;;AASA,IAAMC,mBAAmB,GAAGN,0BAAOO,GAAV,0KAKCH,eAAOI,WALR,CAAzB;;AAQA,IAAMC,cAAc,GAAG,+BAAOC,uBAAP,CAAH,gHAApB;AAKA,IAAMC,eAAe,GAAG,+BAAOD,uBAAP,CAAH,qKAIjBE,oBAAYC,KAJK,CAArB;AASA,IAAMC,aAAa,GAAG,+BAAOC,0BAAP,CAAH,4oCASf,mCAAkBb,2BAAmBc,OAArC,EAA8CZ,eAAOa,KAArD,CATe,EA8BOb,eAAOc,WA9Bd,EAiCNd,eAAOe,WAjCD,EAmCLf,eAAOe,WAnCF,EAwCNf,eAAOgB,WAxCD,EAyCKhB,eAAOiB,WAzCZ,EA6CNjB,eAAOkB,WA7CD,EA8CKlB,eAAOmB,UA9CZ,EAiDLnB,eAAOkB,WAjDF,EAsDNlB,eAAOe,WAtDD,EAuDKf,eAAOoB,WAvDZ,EA0DOpB,eAAOc,WA1Dd,EA6DLd,eAAOe,WA7DF,EAkEWf,eAAOc,WAlElB,CAAnB;;AAsEA,IAAMO,cAAc,GAAGzB,0BAAOO,GAAV,gMAApB;;AAmCA,IAAMmB,UAAU,GAAG,SAAbA,UAAa,OAmBN;AAAA,MAlBXC,eAkBW,QAlBXA,eAkBW;AAAA,MAjBXC,iBAiBW,QAjBXA,iBAiBW;AAAA,MAhBX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A,a;AACAI,EAAAA,c;AACAH,EAAAA,c;AACAC,EAAAA,mB;AACAC,EAAAA,c;AACAE,EAAAA,iB;AACAC,EAAAA,Y;AACAC,EAAAA,gB;AAEAE,EAAAA,Y;AACAC,EAAAA,e;;eA4KalB,U","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\n\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles';\nimport {ActionOptions, NavButton, NavOption, UserMenuItem} from '../../types';\nimport Actions from '../Actions';\nimport {Close, Notification, SwitchApp} from '../../icons/systemicons/SystemIcons';\nimport MobileActionMenu from './MobileActionMenu';\nimport {MenuSection, MenuSectionList, MenuWrapper, Right, RowLayout} from './CommonStyles';\nimport {NavLink, useLocation} from 'react-router-dom';\nimport {SwitcherMenuItem} from '../../Switcher';\nimport Avatar, {AvatarContainer} from '../Avatar';\nimport MobileUserMenu from '../UserMenu/MobileUserMenu';\nimport {IconButton} from '../../Button';\nimport {LaerdalLogo} from '../../assets';\nimport {ComponentMStyling, ComponentXSStyling} from '../../styles/typography';\n\nconst SwitchButton = styled.span`\n ${ComponentXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n \n padding: 0;\n border: 0;\n margin: 0 auto 0 12px;\n line-height: 48px;\n`;\n\nconst BottomPinnedSection = styled.div`\n position: absolute;\n left: 0;\n width: 100%;\n bottom: 0;\n border-top: 1px solid ${COLORS.neutral_200};\n`;\n\nconst FirstRowLayout = styled(RowLayout)`\n margin-top: 10px;\n padding: 12px;\n`;\n\nconst BottomRowLayout = styled(RowLayout)`\n margin: 8px auto 0 0;\n width: 95%;\n height: 48px;\n ${BREAKPOINTS.SMALL} {\n height: 56px;\n }\n`;\n\nconst StyledNavItem = styled(SwitcherMenuItem)`\n padding: 0 0 0 20px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 4px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n font-weight: bold;\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n color: ${COLORS.primary_800};\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n }\n\n &:hover:not(.disabled) {\n color: ${COLORS.primary_600};\n background-color: ${COLORS.primary_20};\n\n svg path {\n fill: ${COLORS.primary_600};\n }\n }\n\n &:active:not(.disabled) {\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_100};\n box-shadow: none;\n &:after {\n background-color: ${COLORS.primary_500};\n }\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &:focus:not(.disabled) {\n box-shadow: 0px 0px 8px ${COLORS.primary_500}, 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n`;\nconst SwitcherButton = styled.div`\n display: flex;\n margin-left: auto;\n\n line-height: 48px;\n button:last-child {\n margin: 0 !important;\n }\n`;\n\ntype Props = {\n name: string;\n navigationOptions?: NavOption[];\n secondaryNavigationOptions?: NavOption[];\n secondaryButton?: NavButton;\n actions?: ActionOptions;\n clickMenuAction: () => void;\n firstName: string;\n lastName: string;\n email: string;\n signout?: (e: any) => void;\n isAuthenticated?: boolean;\n notifications?: NavOption[];\n switcherAction?: () => void;\n accountSection?: UserMenuItem[];\n organizationSection?: UserMenuItem[];\n supportSection?: UserMenuItem[];\n accountMenuHeader: string;\n signOutLabel: string;\n organizationName: string;\n useUserMenu: boolean | undefined;\n showUserMenu: boolean;\n setShowUserMenu: (show: boolean) => void;\n};\n\nconst MobileMenu = ({\n clickMenuAction,\n navigationOptions,\n actions,\n firstName,\n lastName,\n email,\n signout,\n notifications,\n accountSection,\n organizationSection,\n supportSection,\n switcherAction,\n accountMenuHeader,\n signOutLabel,\n organizationName,\n useUserMenu,\n showUserMenu,\n setShowUserMenu,\n}: Props) => {\n const [showNotificationMenu, setShowNotificationMenu] = React.useState<boolean>(false);\n const notificationMenuRef = React.useRef(null);\n const userMenuRef = React.useRef(null);\n const userRef = React.useRef(null);\n\n const location = useLocation();\n\n if (actions?.user) {\n actions.user = () => setShowUserMenu(true);\n }\n if (actions?.notification) {\n actions.notification = () => setShowNotificationMenu(true);\n }\n\n const fireAction = (action: (() => void) | undefined, ref: React.MutableRefObject<HTMLButtonElement | null> | undefined = undefined) => {\n ref?.current?.blur();\n !!action && action();\n };\n\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n React.useEffect(() => {\n clickMenuAction();\n }, [location]);\n\n return (\n <>\n {actions?.notification && (\n <MenuWrapper ref={notificationMenuRef} className={showNotificationMenu ? 'open' : ''} isVisible={showNotificationMenu}>\n <MobileActionMenu\n name=\"Notifications\"\n clickMenuAction={() => setShowNotificationMenu(false)}\n navigationOptions={notifications}\n actionList={{\n notification: () => {},\n }}\n />\n </MenuWrapper>\n )}\n {actions?.user && (\n <MenuWrapper ref={userMenuRef} className={showUserMenu ? 'open' : ''} isVisible={showUserMenu}>\n <MobileUserMenu\n accountMenuHeader={accountMenuHeader}\n firstName={firstName}\n lastName={lastName}\n email={email}\n organizationName={organizationName}\n clickMenuAction={clickMenuAction}\n accountSection={accountSection}\n organizationSection={organizationSection}\n supportSection={supportSection}\n signOut={signout}\n signOutLabel={signOutLabel}\n />\n </MenuWrapper>\n )}\n <FirstRowLayout>\n {firstName && lastName && (\n <AvatarContainer\n id=\"avatarContainer\"\n ref={userRef}\n onClick={actions?.user}\n onKeyDown={(e: any) => (isPressingEnter(e) ? fireAction(actions?.user, userRef) : null)}\n inMobileMenu={true}\n hideOnLowWidth={false}>\n <Avatar size={36} firstName={firstName} lastName={lastName} color={COLORS.primary_500} profileMenuLink=\"#TODO\" />\n </AvatarContainer>\n )}\n {actions?.notification && (\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n hideOnLowWidth={false}\n isInMobileMenu={true}\n action={() => fireAction(actions?.notification)}\n onKeyPress={(e: any) => (isPressingEnter(e) ? fireAction(actions?.notification) : null)}>\n <Notification size=\"24px\" />\n </IconButton>\n )}\n <Right>\n <Actions\n actions={actions}\n firstName={firstName}\n lastName={lastName}\n isInMobileMenu={true}\n hideOnLowWidth={false}\n useUserMenu={useUserMenu}\n setShowUserMenu={setShowUserMenu}\n />\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => clickMenuAction()} isInMobileMenu={true}>\n <Close size=\"24px\" />\n </IconButton>\n </Right>\n </FirstRowLayout>\n <MenuSection>\n <MenuSectionList>\n {navigationOptions?.map((no) => (\n <li key={no.label}>\n <StyledNavItem\n as={NavLink}\n exact={no?.exact}\n to={no.to}\n onClick={() => {\n if (no?.onClick) {\n no?.onClick();\n }\n }}>\n {no.label}\n </StyledNavItem>\n </li>\n ))}\n </MenuSectionList>\n </MenuSection>\n\n <BottomPinnedSection>\n <MenuSection style={{ padding: '0 12px 12px 12px', margin: '0' }}>\n <MenuSectionList>\n <BottomRowLayout>\n <LaerdalLogo />\n {switcherAction && (\n <SwitcherButton>\n <SwitchButton onClick={() => switcherAction()}>Switch site</SwitchButton>{' '}\n <IconButton\n variant={'secondary'}\n shape={'circular'}\n hideOnLowWidth={false}\n isInMobileMenu={true}\n id=\"globalNavAppsButton\"\n action={() => switcherAction()}\n onKeyPress={(e: any) => (isPressingEnter(e) ? switcherAction() : null)}>\n <SwitchApp size=\"24px\" />\n </IconButton>\n </SwitcherButton>\n )}\n </BottomRowLayout>\n </MenuSectionList>\n </MenuSection>\n </BottomPinnedSection>\n </>\n );\n};\n\nexport default MobileMenu;\n"],"file":"MobileMenu.js"}
@@ -33,6 +33,8 @@ var _styling = require("./styling");
33
33
 
34
34
  require("react-datepicker/dist/react-datepicker.css");
35
35
 
36
+ var _typography = require("../styles/typography");
37
+
36
38
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
37
39
 
38
40
  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); }
@@ -64,11 +66,11 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
64
66
  /**
65
67
  * Add custom styles.
66
68
  */
67
- var DatePickerContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > div {\n display: block;\n ", "\n\n .react-datepicker {\n box-sizing: border-box;\n box-shadow: 0px 2px 4px rgb(0 0 0 / 15%);\n border: 1px solid #e5e5e5;\n }\n\n .react-datepicker__navigation {\n line-height: normal;\n text-indent: inherit;\n border: none;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n outline: none;\n margin: 0px;\n color: transparent;\n\n &:hover {\n background: ", ";\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n }\n\n &:focus {\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n }\n\n &::before {\n text-align: center;\n display: inline-block;\n content: '';\n height: 32px;\n width: 32px;\n vertical-align: middle;\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n }\n\n .react-datepicker__month-container,\n .react-datepicker__year--container {\n width: 336px;\n }\n\n .react-datepicker__month {\n margin: 0px;\n }\n\n .react-datepicker__triangle {\n left: 50% !important;\n display: none;\n }\n .react-datepicker-popper[data-placement^='bottom'] {\n margin-top: 0;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle {\n border-bottom-color: ", ";\n }\n\n .react-datepicker__header {\n border-bottom: 1px solid ", ";\n background: ", ";\n height: ", ";\n padding-top: 0px;\n }\n\n .react-datepicker__current-month {\n color: ", ";\n font-weight: 700;\n height: 48px;\n display: inline-flex;\n align-items: center;\n font-size: 19px;\n margin-right: 5px;\n }\n\n .react-datepicker__year {\n max-height: 300px;\n overflow-y: scroll;\n\n ", "\n }\n\n .react-datepicker__year-wrapper {\n max-width: 100%;\n justify-content: space-around;\n }\n\n .react-datepicker__day-name {\n color: ", ";\n font-weight: 400;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n font-size: 19px;\n margin: 0px;\n width: 48px;\n }\n\n .react-datepicker__year-text {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n font-size: 19px;\n margin-top: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n\n &.react-datepicker__year-text--disabled {\n display: none;\n }\n\n &.react-datepicker__day--keyboard-selected {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n color: ", ";\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n }\n\n &.react-datepicker__year-text--selected {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .react-datepicker__day {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 40px;\n width: 40px;\n margin: 4px;\n font-size: 19px;\n\n &.react-datepicker__day--keyboard-selected {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n color: ", ";\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n }\n\n &.react-datepicker__day--selected {\n color: ", " !important;\n background: ", " !important;\n }\n\n &.react-datepicker__day--today {\n border-radius: 0.3rem;\n color: ", ";\n background: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n color: ", ";\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n }\n }\n }\n }\n"])), function (props) {
69
+ var DatePickerContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > div {\n display: block;\n ", "\n\n .react-datepicker {\n box-sizing: border-box;\n box-shadow: 0px 2px 4px rgb(0 0 0 / 15%);\n border: 1px solid #e5e5e5;\n }\n\n .react-datepicker__navigation {\n line-height: normal;\n text-indent: inherit;\n border: none;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n outline: none;\n margin: 0px;\n color: transparent;\n\n &:hover {\n background: ", ";\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n }\n\n &:focus {\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n }\n\n &::before {\n text-align: center;\n display: inline-block;\n content: '';\n height: 32px;\n width: 32px;\n vertical-align: middle;\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n }\n\n .react-datepicker__month-container,\n .react-datepicker__year--container {\n width: 336px;\n }\n\n .react-datepicker__month {\n margin: 0px;\n }\n\n .react-datepicker__triangle {\n left: 50% !important;\n display: none;\n }\n .react-datepicker-popper[data-placement^='bottom'] {\n margin-top: 0;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle {\n border-bottom-color: ", ";\n }\n\n .react-datepicker__header {\n border-bottom: 1px solid ", ";\n background: ", ";\n height: ", ";\n padding-top: 0px;\n }\n\n .react-datepicker__current-month {\n height: 48px;\n display: inline-flex;\n align-items: center;\n margin-right: 5px;\n\n ", "\n }\n\n .react-datepicker__year {\n max-height: 300px;\n overflow-y: scroll;\n\n ", "\n }\n\n .react-datepicker__year-wrapper {\n max-width: 100%;\n justify-content: space-around;\n }\n\n .react-datepicker__day-name {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n margin: 0px;\n width: 48px;\n\n ", "\n }\n\n .react-datepicker__year-text {\n background: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-top: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n\n ", "\n\n &.react-datepicker__year-text--disabled {\n display: none;\n }\n\n &.react-datepicker__day--keyboard-selected {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n color: ", ";\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n }\n\n &.react-datepicker__year-text--selected {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .react-datepicker__day {\n background: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 40px;\n width: 40px;\n margin: 4px;\n\n ", "\n &.react-datepicker__day--keyboard-selected {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n color: ", ";\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n }\n\n &.react-datepicker__day--selected {\n color: ", " !important;\n background: ", " !important;\n }\n\n &.react-datepicker__day--today {\n border-radius: 0.3rem;\n color: ", ";\n background: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n color: ", ";\n background: ", ";\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", " !important;\n outline: none;\n }\n }\n }\n }\n"])), function (props) {
68
70
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
69
71
  }, _colors.default.primary_20, _colors.default.primary_100, _colors.default.focus_25, _colors.default.focus, _colors.default.neutral_20, _colors.default.neutral_200, _colors.default.neutral_20, function (props) {
70
72
  return !props.yearPicker ? '96px' : '54px';
71
- }, _colors.default.neutral_600, _styles.scrollBarStyling, _colors.default.neutral_600, _colors.default.neutral_600, _colors.default.white, _colors.default.neutral_600, _colors.default.white, _colors.default.primary_700, _colors.default.primary_20, _colors.default.primary_800, _colors.default.primary_100, _colors.default.focus_25, _colors.default.focus, _colors.default.white, _colors.default.primary_500, _colors.default.neutral_600, _colors.default.white, _colors.default.neutral_600, _colors.default.white, _colors.default.primary_700, _colors.default.primary_20, _colors.default.primary_800, _colors.default.primary_100, _colors.default.focus_25, _colors.default.focus, _colors.default.white, _colors.default.primary_500, _colors.default.neutral_700, _colors.default.neutral_100, _colors.default.primary_700, _colors.default.primary_20, _colors.default.primary_800, _colors.default.primary_100, _colors.default.focus_25, _colors.default.focus);
73
+ }, (0, _typography.ComponentSStyling)(_styles.ComponentTextStyle.Bold, _colors.default.neutral_600), _styles.scrollBarStyling, (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _colors.default.neutral_600), _colors.default.white, (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _colors.default.neutral_600), _colors.default.neutral_600, _colors.default.white, _colors.default.primary_700, _colors.default.primary_20, _colors.default.primary_800, _colors.default.primary_100, _colors.default.focus_25, _colors.default.focus, _colors.default.white, _colors.default.primary_500, _colors.default.white, (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _colors.default.neutral_600), _colors.default.neutral_600, _colors.default.white, _colors.default.primary_700, _colors.default.primary_20, _colors.default.primary_800, _colors.default.primary_100, _colors.default.focus_25, _colors.default.focus, _colors.default.white, _colors.default.primary_500, _colors.default.neutral_700, _colors.default.neutral_100, _colors.default.primary_700, _colors.default.primary_20, _colors.default.primary_800, _colors.default.primary_100, _colors.default.focus_25, _colors.default.focus);
72
74
 
73
75
  var DatepickerRow = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n position: relative;\n\n > button {\n position: absolute;\n right: 4px;\n top: 4px;\n\n svg {\n }\n }\n\n ", "\n &:focus-within {\n -webkit-box-shadow: inset 0px 0px 0px 2px ", ";\n -moz-box-shadow: inset 0px 0px 0px 2px ", ";\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n"])), function (props) {
74
76
  return props !== null && props !== void 0 && props.disabled || props !== null && props !== void 0 && props.locked ? '' : (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &:hover {\n svg,\n svg path {\n fill: ", " !important;\n }\n }\n "])), _colors.default.primary_600);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/DatepickerField.tsx"],"names":["DatePickerContainer","styled","div","props","margin","COLORS","primary_20","primary_100","focus_25","focus","neutral_20","neutral_200","yearPicker","neutral_600","scrollBarStyling","white","primary_700","primary_800","primary_500","neutral_700","neutral_100","DatepickerRow","disabled","locked","css","primary_600","StyledInputFieldStyling","InputFieldStyling","primary_200","primary_300","neutral_300","DatepickerField","id","onChange","hasError","value","validationMessage","dateFormat","autoComplete","placeholder","required","yearsBeforeCurrentDate","yearsAfterCurrentDate","inputRef","React","useRef","datepickerRef","useState","tabbedHere","setTabbedHere","activeMonthPage","setActiveMonthPage","yearPickerMode","setYearPickerMode","openAt","setOpenAt","supressFocusRef","useEffect","current","format","selectedDate","document","getElementsByClassName","dropdownParent","parentElement","scrollTop","offsetTop","offsetHeight","setOpen","handleCalendarOpen","maxDate","Date","setFullYear","getFullYear","minDate","itemsNumber","Math","round","e","newDate","setMonth","en","undefined","params","createElement","DatepickerFieldHeader","customHeaderCount","display","critical_400"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA;AACA;AACA;AACA,IAAMA,mBAAmB,GAAGC,0BAAOC,GAAV,+iQAGnB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAHmB,EAuBHC,gBAAOC,UAvBJ,EAmCHD,gBAAOE,WAnCJ,EAoCUF,gBAAOG,QApCjB,EAoC0CH,gBAAOI,KApCjD,EAmFIJ,gBAAOK,UAnFX,E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kBAAM,CAAE,CAA7E;AAA+E,MAAA,QAAQ,EAAEpC,QAAQ,IAAIC;AAArG,oBACE,oBAAC,qBAAD;AAAU,MAAA,IAAI,EAAC;AAAf,MADF,CA1BF,CADF,CADF;AAlCJ,IADF,CAFF,EA4EGa,iBAAiB,iBAChB,oBAAC,qBAAD,qBACE,oBAAC,6BAAD;AAAkB,IAAA,IAAI,EAAC,MAAvB;AAA8B,IAAA,KAAK,EAAE/B,gBAAOmF;AAA5C,IADF,eAEE,kCAAOpD,iBAAP,CAFF,CA7EJ,CADF;AAqFD,CArJD;;;AArTEJ,EAAAA,E;AACAV,EAAAA,Q;AACAC,EAAAA,M;AACAU,EAAAA,Q;AACAC,EAAAA,Q;AACAC,EAAAA,K;AACAE,EAAAA,U;AACAD,EAAAA,iB;AACAE,EAAAA,Y;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACA5B,EAAAA,U;AACA6B,EAAAA,sB;AACAC,EAAAA,qB;AACAtC,EAAAA,M;;eA8ba2B,e","sourcesContent":["/**\n * Import react libraries.\n */\nimport * as React from 'react';\n\n/**\n * Import third-party libraries.\n */\nimport styled, { css } from 'styled-components';\nimport DatePicker from 'react-datepicker';\nimport en from 'date-fns/locale/en-GB';\nimport moment from 'moment';\n\n/**\n * Import custom components.\n */\nimport COLORS from '../styles/colors';\nimport { Calendar, TechnicalWarning } from '../icons/systemicons/SystemIcons';\nimport { IconButton } from '../Button/index';\nimport { DatepickerFieldHeader, DatepickerFieldHeaderParams } from './DatepickerFieldHeader';\nimport { scrollBarStyling } from '../styles';\n\n/**\n * Import custom styles.\n */\nimport { InputFieldStyling, InputWrapper, ErrorMessage } from './styling';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport { CommonInteractionStyling } from '../common';\n\n/**\n * Add custom types.\n */\ntype DatepickerFieldProps = {\n id: string;\n disabled?: boolean;\n locked?: boolean;\n onChange?: (date: Date) => void;\n hasError?: boolean;\n value?: Date;\n dateFormat?: string;\n validationMessage?: string;\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n yearPicker?: boolean;\n yearsBeforeCurrentDate?: number;\n yearsAfterCurrentDate?: number;\n margin?: string;\n};\n\n/**\n * Add custom styles.\n */\nconst DatePickerContainer = styled.div<{ yearPicker: boolean; margin: string }>`\n > div {\n display: block;\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n\n .react-datepicker {\n box-sizing: border-box;\n box-shadow: 0px 2px 4px rgb(0 0 0 / 15%);\n border: 1px solid #e5e5e5;\n }\n\n .react-datepicker__navigation {\n line-height: normal;\n text-indent: inherit;\n border: none;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n outline: none;\n margin: 0px;\n color: transparent;\n\n &:hover {\n background: ${COLORS.primary_20};\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n }\n\n &:focus {\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n }\n\n &::before {\n text-align: center;\n display: inline-block;\n content: '';\n height: 32px;\n width: 32px;\n vertical-align: middle;\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n }\n\n .react-datepicker__month-container,\n .react-datepicker__year--container {\n width: 336px;\n }\n\n .react-datepicker__month {\n margin: 0px;\n }\n\n .react-datepicker__triangle {\n left: 50% !important;\n display: none;\n }\n .react-datepicker-popper[data-placement^='bottom'] {\n margin-top: 0;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle {\n border-bottom-color: ${COLORS.neutral_20};\n }\n\n .react-datepicker__header {\n border-bottom: 1px solid ${COLORS.neutral_200};\n background: ${COLORS.neutral_20};\n height: ${(props) => (!props.yearPicker ? '96px' : '54px')};\n padding-top: 0px;\n }\n\n .react-datepicker__current-month {\n color: ${COLORS.neutral_600};\n font-weight: 700;\n height: 48px;\n display: inline-flex;\n align-items: center;\n font-size: 19px;\n margin-right: 5px;\n }\n\n .react-datepicker__year {\n max-height: 300px;\n overflow-y: scroll;\n\n ${scrollBarStyling}\n }\n\n .react-datepicker__year-wrapper {\n max-width: 100%;\n justify-content: space-around;\n }\n\n .react-datepicker__day-name {\n color: ${COLORS.neutral_600};\n font-weight: 400;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n font-size: 19px;\n margin: 0px;\n width: 48px;\n }\n\n .react-datepicker__year-text {\n color: ${COLORS.neutral_600};\n background: ${COLORS.white};\n font-weight: 400;\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n font-size: 19px;\n margin-top: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n\n &.react-datepicker__year-text--disabled {\n display: none;\n }\n\n &.react-datepicker__day--keyboard-selected {\n color: ${COLORS.neutral_600};\n background: ${COLORS.white};\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ${COLORS.primary_700};\n background: ${COLORS.primary_20};\n }\n\n &:focus {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n }\n\n &.react-datepicker__year-text--selected {\n color: ${COLORS.white} !important;\n background: ${COLORS.primary_500} !important;\n }\n }\n\n .react-datepicker__day {\n color: ${COLORS.neutral_600};\n background: ${COLORS.white};\n font-weight: 400;\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 40px;\n width: 40px;\n margin: 4px;\n font-size: 19px;\n\n &.react-datepicker__day--keyboard-selected {\n color: ${COLORS.neutral_600};\n background: ${COLORS.white};\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ${COLORS.primary_700};\n background: ${COLORS.primary_20};\n }\n\n &:focus {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n }\n\n &.react-datepicker__day--selected {\n color: ${COLORS.white} !important;\n background: ${COLORS.primary_500} !important;\n }\n\n &.react-datepicker__day--today {\n border-radius: 0.3rem;\n color: ${COLORS.neutral_700};\n background: ${COLORS.neutral_100};\n\n &:hover {\n color: ${COLORS.primary_700};\n background: ${COLORS.primary_20};\n }\n\n &:focus {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n }\n }\n }\n }\n`;\n\nconst DatepickerRow = styled.div<{ disabled?: boolean; locked?: boolean }>`\n display: flex;\n flex-direction: row;\n position: relative;\n\n > button {\n position: absolute;\n right: 4px;\n top: 4px;\n\n svg {\n }\n }\n\n ${(props) =>\n props?.disabled || props?.locked\n ? ''\n : css`\n &:hover {\n svg,\n svg path {\n fill: ${COLORS.primary_600} !important;\n }\n }\n `}\n &:focus-within {\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n`;\n\nconst StyledInputFieldStyling = styled(InputFieldStyling)`\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_200};\n ::placeholder {\n color: ${COLORS.primary_600};\n }\n cursor: pointer;\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_300};\n ::placeholder {\n color: ${COLORS.primary_800};\n }\n }\n &:disabled {\n box-shadow: none;\n background-color: ${COLORS.white};\n span {\n color: ${COLORS.neutral_300};\n }\n &::after {\n background-color: ${COLORS.white};\n }\n }\n`;\n\nconst DatepickerField = ({\n id,\n disabled,\n locked,\n onChange,\n hasError,\n value,\n validationMessage,\n dateFormat,\n autoComplete,\n placeholder,\n required,\n yearPicker,\n yearsBeforeCurrentDate,\n yearsAfterCurrentDate,\n margin,\n}: DatepickerFieldProps) => {\n // Globally used variables within the component\n const inputRef = React.useRef<any>(null);\n const datepickerRef = React.useRef<any>(null);\n const [tabbedHere, setTabbedHere] = React.useState<boolean>(false);\n const [activeMonthPage, setActiveMonthPage] = React.useState<number>(-1);\n const [yearPickerMode, setYearPickerMode] = React.useState<boolean>(false);\n const [openAt, setOpenAt] = React.useState<Date | null>(null);\n const supressFocusRef = React.useRef<any>(null);\n\n /**\n * Format the date in a specific way.\n */\n React.useEffect(() => {\n if (value) inputRef.current.value = moment(value).format(dateFormat ? dateFormat : 'MMMM Do, YYYY');\n }, [value]);\n\n React.useEffect(() => {\n if (yearPickerMode) {\n //unfortunately, since there are no refs, and year pickers is rendered not by our code, but by 'react-datepicker'\n //we have to touch DOM directly\n const selectedDate = document.getElementsByClassName('react-datepicker__year-text--selected')[0] as HTMLElement;\n const dropdownParent = selectedDate?.parentElement?.parentElement;\n if (selectedDate && dropdownParent) dropdownParent.scrollTop = selectedDate.offsetTop - 2 * selectedDate.offsetHeight;\n }\n }, [yearPickerMode]);\n\n //we have to manually reopen the calendar when needed, to guarantee that datepicker will show selected date after year selection\n //otherwise after year selection datepicker will show January month of the selected year\n React.useEffect(() => {\n if (openAt) {\n datepickerRef.current.setOpen(true);\n //setOpenAt(null);\n }\n }, [openAt]);\n\n const handleCalendarOpen = () => {\n if (openAt) setOpenAt(null);\n };\n\n let maxDate = new Date(value && new Date(value) > new Date() ? new Date(value) : new Date());\n maxDate.setFullYear(maxDate.getFullYear() + (yearsAfterCurrentDate ?? 50));\n\n //itemsNumber - controls number of year select options generated in the dropdown\n //items related to dates higher than 'maxDate' will be hidden, thus to avoid creating hundreds of invisible divs, we divide by 5\n let minDate = new Date(value && new Date(value) < new Date() ? new Date(value) : new Date());\n const itemsNumber = Math.round((minDate.getFullYear() - (yearsBeforeCurrentDate ?? 15)) / 5);\n\n return (\n <>\n {/* Let's render the input itself */}\n <DatePickerContainer yearPicker={yearPickerMode} margin={margin || ''}>\n <DatePicker\n ref={datepickerRef}\n onCalendarOpen={handleCalendarOpen}\n onChange={(e: any) => {\n if (onChange) {\n if (yearPickerMode) {\n const newDate = new Date();\n newDate.setFullYear(e.getFullYear());\n newDate.setMonth(activeMonthPage);\n setOpenAt(newDate);\n } else onChange(e);\n }\n if (yearPickerMode) setYearPickerMode(false);\n }}\n disabled={disabled || locked}\n locale={en}\n showYearPicker={yearPickerMode}\n //we manipulate 'yearItemNumber' and 'maxDate' to guarantee number of year select options shown before and after selected year\n yearItemNumber={yearPickerMode ? itemsNumber : undefined}\n maxDate={yearPickerMode ? maxDate : undefined}\n selected={value}\n openToDate={openAt ?? undefined}\n shouldCloseOnSelect={true}\n renderCustomHeader={\n yearPicker\n ? (params: DatepickerFieldHeaderParams) =>\n React.createElement(\n DatepickerFieldHeader,\n { ...params, setActiveMonthPage, customHeaderCount: 0, yearPickerMode: yearPickerMode, setYearPickerMode: setYearPickerMode },\n null,\n )\n : undefined\n }\n customInput={\n <InputWrapper disabled={disabled} locked={locked} tabIndex={disabled ? -1 : 0}>\n <div style={{ display: 'block' }}>\n <DatepickerRow locked={locked} disabled={disabled}>\n <StyledInputFieldStyling\n id={id}\n ref={inputRef}\n type=\"text\"\n name=\"datepicker\"\n readOnly={true}\n className={hasError ? 'error' : ''}\n tabIndex={0}\n autoComplete={autoComplete}\n placeholder={placeholder}\n disabled={disabled}\n locked={locked}\n required={required}\n tabbedHere={tabbedHere}\n onBlur={() => setTabbedHere(false)}\n onMouseDown={(e: any) => {\n if (!(locked || disabled) && !tabbedHere) supressFocusRef.current = true;\n }}\n onFocus={(e: any) => {\n if (!(locked || disabled)) {\n if (!supressFocusRef.current) setTabbedHere(true);\n else supressFocusRef.current = false;\n }\n }}\n />\n <IconButton variant=\"secondary\" shape=\"square\" tabIndex={-1} action={() => {}} disabled={disabled || locked}>\n <Calendar size=\"24\" />\n </IconButton>\n </DatepickerRow>\n </div>\n </InputWrapper>\n }\n />\n </DatePickerContainer>\n\n {/* If there is an error, let's render the error */}\n {validationMessage && (\n <ErrorMessage>\n <TechnicalWarning size=\"20px\" color={COLORS.critical_400} />\n <span>{validationMessage}</span>\n </ErrorMessage>\n )}\n </>\n );\n};\n\nexport default DatepickerField;\n"],"file":"DatepickerField.js"}
1
+ {"version":3,"sources":["../../../src/InputFields/DatepickerField.tsx"],"names":["DatePickerContainer","styled","div","props","margin","COLORS","primary_20","primary_100","focus_25","focus","neutral_20","neutral_200","yearPicker","ComponentTextStyle","Bold","neutral_600","scrollBarStyling","Regular","white","primary_700","primary_800","primary_500","neutral_700","neutral_100","DatepickerRow","disabled","locked","css","primary_600","StyledInputFieldStyling","InputFieldStyling","primary_200","primary_300","neutral_300","DatepickerField","id","onChange","hasError","value","validationMessage","dateFormat","autoComplete","placeholder","required","yearsBeforeCurrentDate","yearsAfterCurrentDate","inputRef","React","useRef","datepickerRef","useState","tabbedHere","setTabbedHere","activeMonthPage","setActiveMonthPage","yearPickerMode","setYearPickerMode","openAt","setOpenAt","supressFocusRef","useEffect","current","format","selectedDate","document","getElementsByClassName","dropdownParent","parentElement","scrollTop","offsetTop","offsetHeight","setOpen","handleCalendarOpen","maxDate","Date","setFullYear","getFullYear","minDate","itemsNumber","Math","round","e","newDate","setMonth","en","undefined","params","createElement","DatepickerFieldHeader","customHeaderCount","display","critical_400"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;AACA,IAAMA,mBAAmB,GAAGC,0BAAOC,GAAV,i1PAGnB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAHmB,EAuBHC,gBAAOC,UAvBJ,EAmCHD,gBAAOE,WAnCJ,EAoCUF,gBAAOG,QApCjB,EAoC0CH,gBAAOI,KApCjD,EAmFIJ,gBAAOK,UAn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A1B;AACN;AACF;AAvBH,MADF,eA0BE,oBAAC,iBAAD;AAAY,MAAA,OAAO,EAAC,WAApB;AAAgC,MAAA,KAAK,EAAC,QAAtC;AAA+C,MAAA,QAAQ,EAAE,CAAC,CAA1D;AAA6D,MAAA,MAAM,EAAE,kBAAM,CAAE,CAA7E;AAA+E,MAAA,QAAQ,EAAEpC,QAAQ,IAAIC;AAArG,oBACE,oBAAC,qBAAD;AAAU,MAAA,IAAI,EAAC;AAAf,MADF,CA1BF,CADF,CADF;AAlCJ,IADF,CAFF,EA4EGa,iBAAiB,iBAChB,oBAAC,qBAAD,qBACE,oBAAC,6BAAD;AAAkB,IAAA,IAAI,EAAC,MAAvB;AAA8B,IAAA,KAAK,EAAElC,gBAAOsF;AAA5C,IADF,eAEE,kCAAOpD,iBAAP,CAFF,CA7EJ,CADF;AAqFD,CArJD;;;AAhTEJ,EAAAA,E;AACAV,EAAAA,Q;AACAC,EAAAA,M;AACAU,EAAAA,Q;AACAC,EAAAA,Q;AACAC,EAAAA,K;AACAE,EAAAA,U;AACAD,EAAAA,iB;AACAE,EAAAA,Y;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACA/B,EAAAA,U;AACAgC,EAAAA,sB;AACAC,EAAAA,qB;AACAzC,EAAAA,M;;eAyba8B,e","sourcesContent":["/**\n * Import react libraries.\n */\nimport * as React from 'react';\n\n/**\n * Import third-party libraries.\n */\nimport styled, {css} from 'styled-components';\nimport DatePicker from 'react-datepicker';\nimport en from 'date-fns/locale/en-GB';\nimport moment from 'moment';\n\n/**\n * Import custom components.\n */\nimport COLORS from '../styles/colors';\nimport {Calendar, TechnicalWarning} from '../icons/systemicons/SystemIcons';\nimport {IconButton} from '../Button/index';\nimport {DatepickerFieldHeader, DatepickerFieldHeaderParams} from './DatepickerFieldHeader';\nimport {ComponentTextStyle, scrollBarStyling} from '../styles';\n\n/**\n * Import custom styles.\n */\nimport {ErrorMessage, InputFieldStyling, InputWrapper} from './styling';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport {ComponentMStyling, ComponentSStyling} from '../styles/typography';\n\n/**\n * Add custom types.\n */\ntype DatepickerFieldProps = {\n id: string;\n disabled?: boolean;\n locked?: boolean;\n onChange?: (date: Date) => void;\n hasError?: boolean;\n value?: Date;\n dateFormat?: string;\n validationMessage?: string;\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n yearPicker?: boolean;\n yearsBeforeCurrentDate?: number;\n yearsAfterCurrentDate?: number;\n margin?: string;\n};\n\n/**\n * Add custom styles.\n */\nconst DatePickerContainer = styled.div<{ yearPicker: boolean; margin: string }>`\n > div {\n display: block;\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n\n .react-datepicker {\n box-sizing: border-box;\n box-shadow: 0px 2px 4px rgb(0 0 0 / 15%);\n border: 1px solid #e5e5e5;\n }\n\n .react-datepicker__navigation {\n line-height: normal;\n text-indent: inherit;\n border: none;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n outline: none;\n margin: 0px;\n color: transparent;\n\n &:hover {\n background: ${COLORS.primary_20};\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n }\n\n &:focus {\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n }\n\n &::before {\n text-align: center;\n display: inline-block;\n content: '';\n height: 32px;\n width: 32px;\n vertical-align: middle;\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n }\n\n .react-datepicker__month-container,\n .react-datepicker__year--container {\n width: 336px;\n }\n\n .react-datepicker__month {\n margin: 0px;\n }\n\n .react-datepicker__triangle {\n left: 50% !important;\n display: none;\n }\n .react-datepicker-popper[data-placement^='bottom'] {\n margin-top: 0;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle {\n border-bottom-color: ${COLORS.neutral_20};\n }\n\n .react-datepicker__header {\n border-bottom: 1px solid ${COLORS.neutral_200};\n background: ${COLORS.neutral_20};\n height: ${(props) => (!props.yearPicker ? '96px' : '54px')};\n padding-top: 0px;\n }\n\n .react-datepicker__current-month {\n height: 48px;\n display: inline-flex;\n align-items: center;\n margin-right: 5px;\n\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n }\n\n .react-datepicker__year {\n max-height: 300px;\n overflow-y: scroll;\n\n ${scrollBarStyling}\n }\n\n .react-datepicker__year-wrapper {\n max-width: 100%;\n justify-content: space-around;\n }\n\n .react-datepicker__day-name {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n margin: 0px;\n width: 48px;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n }\n\n .react-datepicker__year-text {\n background: ${COLORS.white};\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-top: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n &.react-datepicker__year-text--disabled {\n display: none;\n }\n\n &.react-datepicker__day--keyboard-selected {\n color: ${COLORS.neutral_600};\n background: ${COLORS.white};\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ${COLORS.primary_700};\n background: ${COLORS.primary_20};\n }\n\n &:focus {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n }\n\n &.react-datepicker__year-text--selected {\n color: ${COLORS.white} !important;\n background: ${COLORS.primary_500} !important;\n }\n }\n\n .react-datepicker__day {\n background: ${COLORS.white};\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 40px;\n width: 40px;\n margin: 4px;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n &.react-datepicker__day--keyboard-selected {\n color: ${COLORS.neutral_600};\n background: ${COLORS.white};\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ${COLORS.primary_700};\n background: ${COLORS.primary_20};\n }\n\n &:focus {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n }\n\n &.react-datepicker__day--selected {\n color: ${COLORS.white} !important;\n background: ${COLORS.primary_500} !important;\n }\n\n &.react-datepicker__day--today {\n border-radius: 0.3rem;\n color: ${COLORS.neutral_700};\n background: ${COLORS.neutral_100};\n\n &:hover {\n color: ${COLORS.primary_700};\n background: ${COLORS.primary_20};\n }\n\n &:focus {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus} !important;\n outline: none;\n }\n }\n }\n }\n`;\n\nconst DatepickerRow = styled.div<{ disabled?: boolean; locked?: boolean }>`\n display: flex;\n flex-direction: row;\n position: relative;\n\n > button {\n position: absolute;\n right: 4px;\n top: 4px;\n\n svg {\n }\n }\n\n ${(props) =>\n props?.disabled || props?.locked\n ? ''\n : css`\n &:hover {\n svg,\n svg path {\n fill: ${COLORS.primary_600} !important;\n }\n }\n `}\n &:focus-within {\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n`;\n\nconst StyledInputFieldStyling = styled(InputFieldStyling)`\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_200};\n ::placeholder {\n color: ${COLORS.primary_600};\n }\n cursor: pointer;\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_300};\n ::placeholder {\n color: ${COLORS.primary_800};\n }\n }\n &:disabled {\n box-shadow: none;\n background-color: ${COLORS.white};\n span {\n color: ${COLORS.neutral_300};\n }\n &::after {\n background-color: ${COLORS.white};\n }\n }\n`;\n\nconst DatepickerField = ({\n id,\n disabled,\n locked,\n onChange,\n hasError,\n value,\n validationMessage,\n dateFormat,\n autoComplete,\n placeholder,\n required,\n yearPicker,\n yearsBeforeCurrentDate,\n yearsAfterCurrentDate,\n margin,\n}: DatepickerFieldProps) => {\n // Globally used variables within the component\n const inputRef = React.useRef<any>(null);\n const datepickerRef = React.useRef<any>(null);\n const [tabbedHere, setTabbedHere] = React.useState<boolean>(false);\n const [activeMonthPage, setActiveMonthPage] = React.useState<number>(-1);\n const [yearPickerMode, setYearPickerMode] = React.useState<boolean>(false);\n const [openAt, setOpenAt] = React.useState<Date | null>(null);\n const supressFocusRef = React.useRef<any>(null);\n\n /**\n * Format the date in a specific way.\n */\n React.useEffect(() => {\n if (value) inputRef.current.value = moment(value).format(dateFormat ? dateFormat : 'MMMM Do, YYYY');\n }, [value]);\n\n React.useEffect(() => {\n if (yearPickerMode) {\n //unfortunately, since there are no refs, and year pickers is rendered not by our code, but by 'react-datepicker'\n //we have to touch DOM directly\n const selectedDate = document.getElementsByClassName('react-datepicker__year-text--selected')[0] as HTMLElement;\n const dropdownParent = selectedDate?.parentElement?.parentElement;\n if (selectedDate && dropdownParent) dropdownParent.scrollTop = selectedDate.offsetTop - 2 * selectedDate.offsetHeight;\n }\n }, [yearPickerMode]);\n\n //we have to manually reopen the calendar when needed, to guarantee that datepicker will show selected date after year selection\n //otherwise after year selection datepicker will show January month of the selected year\n React.useEffect(() => {\n if (openAt) {\n datepickerRef.current.setOpen(true);\n //setOpenAt(null);\n }\n }, [openAt]);\n\n const handleCalendarOpen = () => {\n if (openAt) setOpenAt(null);\n };\n\n let maxDate = new Date(value && new Date(value) > new Date() ? new Date(value) : new Date());\n maxDate.setFullYear(maxDate.getFullYear() + (yearsAfterCurrentDate ?? 50));\n\n //itemsNumber - controls number of year select options generated in the dropdown\n //items related to dates higher than 'maxDate' will be hidden, thus to avoid creating hundreds of invisible divs, we divide by 5\n let minDate = new Date(value && new Date(value) < new Date() ? new Date(value) : new Date());\n const itemsNumber = Math.round((minDate.getFullYear() - (yearsBeforeCurrentDate ?? 15)) / 5);\n\n return (\n <>\n {/* Let's render the input itself */}\n <DatePickerContainer yearPicker={yearPickerMode} margin={margin || ''}>\n <DatePicker\n ref={datepickerRef}\n onCalendarOpen={handleCalendarOpen}\n onChange={(e: any) => {\n if (onChange) {\n if (yearPickerMode) {\n const newDate = new Date();\n newDate.setFullYear(e.getFullYear());\n newDate.setMonth(activeMonthPage);\n setOpenAt(newDate);\n } else onChange(e);\n }\n if (yearPickerMode) setYearPickerMode(false);\n }}\n disabled={disabled || locked}\n locale={en}\n showYearPicker={yearPickerMode}\n //we manipulate 'yearItemNumber' and 'maxDate' to guarantee number of year select options shown before and after selected year\n yearItemNumber={yearPickerMode ? itemsNumber : undefined}\n maxDate={yearPickerMode ? maxDate : undefined}\n selected={value}\n openToDate={openAt ?? undefined}\n shouldCloseOnSelect={true}\n renderCustomHeader={\n yearPicker\n ? (params: DatepickerFieldHeaderParams) =>\n React.createElement(\n DatepickerFieldHeader,\n { ...params, setActiveMonthPage, customHeaderCount: 0, yearPickerMode: yearPickerMode, setYearPickerMode: setYearPickerMode },\n null,\n )\n : undefined\n }\n customInput={\n <InputWrapper disabled={disabled} locked={locked} tabIndex={disabled ? -1 : 0}>\n <div style={{ display: 'block' }}>\n <DatepickerRow locked={locked} disabled={disabled}>\n <StyledInputFieldStyling\n id={id}\n ref={inputRef}\n type=\"text\"\n name=\"datepicker\"\n readOnly={true}\n className={hasError ? 'error' : ''}\n tabIndex={0}\n autoComplete={autoComplete}\n placeholder={placeholder}\n disabled={disabled}\n locked={locked}\n required={required}\n tabbedHere={tabbedHere}\n onBlur={() => setTabbedHere(false)}\n onMouseDown={(e: any) => {\n if (!(locked || disabled) && !tabbedHere) supressFocusRef.current = true;\n }}\n onFocus={(e: any) => {\n if (!(locked || disabled)) {\n if (!supressFocusRef.current) setTabbedHere(true);\n else supressFocusRef.current = false;\n }\n }}\n />\n <IconButton variant=\"secondary\" shape=\"square\" tabIndex={-1} action={() => {}} disabled={disabled || locked}>\n <Calendar size=\"24\" />\n </IconButton>\n </DatepickerRow>\n </div>\n </InputWrapper>\n }\n />\n </DatePickerContainer>\n\n {/* If there is an error, let's render the error */}\n {validationMessage && (\n <ErrorMessage>\n <TechnicalWarning size=\"20px\" color={COLORS.critical_400} />\n <span>{validationMessage}</span>\n </ErrorMessage>\n )}\n </>\n );\n};\n\nexport default DatepickerField;\n"],"file":"DatepickerField.js"}
@@ -15,6 +15,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
15
15
 
16
16
  var _index = require("../../styles/index");
17
17
 
18
+ var _typography = require("../../styles/typography");
19
+
18
20
  var _templateObject, _templateObject2;
19
21
 
20
22
  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,10 +31,10 @@ var Search = _styledComponents.default.input.attrs(function () {
29
31
  return {
30
32
  type: 'search'
31
33
  };
32
- })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n appearance: none;\n font-size: 1rem;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n font-style: italic;\n color: ", ";\n }\n\n &:focus {\n outline-width: 0;\n }\n"])), _index.COLORS.neutral_400);
34
+ })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n appearance: none;\n width: calc(100% - 96px);\n ", "\n\n /* To prevent browser putting its own cross inside the search bar */\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ", "\n }\n\n &:focus {\n outline-width: 0;\n }\n"])), (0, _typography.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _typography.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500));
33
35
 
34
36
  exports.Search = Search;
35
- var BigSearch = (0, _styledComponents.default)(Search)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 32px;\n font-size: 1.125rem;\n border-width: 0;\n margin-left: 50px;\n color: ", ";\n outline: none;\n ::placeholder {\n color: ", ";\n font-size: 16px;\n }\n ", " {\n ::placeholder {\n font-size: 18px;\n }\n }\n &.small {\n ::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n ::placeholder {\n font-size: 18px;\n }\n }\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), _index.COLORS.black, _index.COLORS.neutral_600, _index.BREAKPOINTS.MEDIUM);
37
+ var BigSearch = (0, _styledComponents.default)(Search)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ", "\n\n ::placeholder {\n ", "\n }\n ", " {\n ::placeholder {\n ", "\n }\n }\n &.small {\n ::placeholder {\n ", "\n }\n }\n &.medium {\n ::placeholder {\n ", "\n }\n }\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), (0, _typography.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _typography.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), _index.BREAKPOINTS.MEDIUM, (0, _typography.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _typography.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _typography.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600));
36
38
  exports.BigSearch = BigSearch;
37
39
  var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
38
40
  var id = props.id,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/InputFields/components/SearchBarInput.tsx"],"names":["Search","styled","input","attrs","type","COLORS","neutral_400","BigSearch","black","neutral_600","BREAKPOINTS","MEDIUM","SearchBarInput","React","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","setTabbedHere","onBlur","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;AAEO,IAAMA,MAAM,GAAGC,0BAAOC,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAAEC,IAAAA,IAAI,EAAE;AAAR,GAAP;AAAA,CAAnB,CAAH,ooBAyBNC,cAAOC,WAzBD,CAAZ;;;AAiCA,IAAMC,SAAS,GAAG,+BAAOP,MAAP,CAAH,qhBAKXK,cAAOG,KALI,EAQTH,cAAOI,WARE,EAWlBC,mBAAYC,MAXM,CAAf;;AA6CP,IAAMC,cAAc,gBAAGC,KAAK,CAACC,UAAN,CAAwD,UAACC,KAAD,EAA6BC,GAA7B,EAAqC;AAClH,MAAQC,EAAR,GAAsHF,KAAtH,CAAQE,EAAR;AAAA,MAAYC,UAAZ,GAAsHH,KAAtH,CAAYG,UAAZ;AAAA,MAAwBC,aAAxB,GAAsHJ,KAAtH,CAAwBI,aAAxB;AAAA,MAAuCC,WAAvC,GAAsHL,KAAtH,CAAuCK,WAAvC;AAAA,MAAoDC,WAApD,GAAsHN,KAAtH,CAAoDM,WAApD;AAAA,MAAiEC,QAAjE,GAAsHP,KAAtH,CAAiEO,QAAjE;AAAA,MAA2EC,SAA3E,GAAsHR,K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ACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AACAC,EAAAA,I,4BAAO,O,EAAU,Q;AACjBC,EAAAA,a;AACAC,EAAAA,M;;eAgCad,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { BREAKPOINTS, COLORS } from '../../styles/index';\n\nexport const Search = styled.input.attrs(() => ({ type: 'search' }))`\n appearance: none;\n font-size: 1rem;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n font-style: italic;\n color: ${COLORS.neutral_400};\n }\n\n &:focus {\n outline-width: 0;\n }\n`;\n\nexport const BigSearch = styled(Search)`\n height: 32px;\n font-size: 1.125rem;\n border-width: 0;\n margin-left: 50px;\n color: ${COLORS.black};\n outline: none;\n ::placeholder {\n color: ${COLORS.neutral_600};\n font-size: 16px;\n }\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n font-size: 18px;\n }\n }\n &.small {\n ::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n ::placeholder {\n font-size: 18px;\n }\n }\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: 'small' | 'medium';\n setTabbedHere: (tabbedHere: boolean) => void;\n onBlur?: (e: any) => void;\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const { id, searchTerm, setSearchTerm, enterSearch, placeholder, disabled, onKeyDown, size, setTabbedHere, onBlur } = props;\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <BigSearch\n placeholder={disabled ? '' : placeholder}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={-1}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n ref={ref}\n onBlur={(e) => (onBlur ? onBlur(e) : setTabbedHere(false))}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.js"}
1
+ {"version":3,"sources":["../../../../src/InputFields/components/SearchBarInput.tsx"],"names":["Search","styled","input","attrs","type","ComponentTextStyle","Regular","COLORS","black","Italic","neutral_500","BigSearch","neutral_600","BREAKPOINTS","MEDIUM","SearchBarInput","React","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","setTabbedHere","onBlur","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEO,IAAMA,MAAM,GAAGC,0BAAOC,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAAEC,IAAAA,IAAI,EAAE;AAAR,GAAP;AAAA,CAAnB,CAAH,ulBAGf,mCAAkBC,0BAAmBC,OAArC,EAA8CC,cAAOC,KAArD,CAHe,EAwBb,mCAAkBH,0BAAmBI,MAArC,EAA6CF,cAAOG,WAApD,CAxBa,CAAZ;;;AAgCA,IAAMC,SAAS,GAAG,+BAAOX,MAAP,CAAH,ubAMlB,mCAAkBK,0BAAmBC,OAArC,EAA8CC,cAAOC,KAArD,CANkB,EAShB,mCAAkBH,0BAAmBI,MAArC,EAA6CF,cAAOK,WAApD,CATgB,EAWlBC,mBAAYC,MAXM,EAad,mCAAkBT,0BAAmBI,MAArC,EAA6CF,cAAOK,WAApD,CAbc,EAk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A,QAAQ,EAAE,kBAACM,CAAD;AAAA,aAAYT,aAAa,CAACS,CAAC,CAACI,MAAF,CAASC,KAAV,CAAzB;AAAA,KAPZ;AAQE,IAAA,KAAK,EAAEf,UART;AASE,IAAA,GAAG,EAAEF,GATP;AAUE,IAAA,MAAM,EAAE,gBAACY,CAAD;AAAA,aAAQF,OAAM,GAAGA,OAAM,CAACE,CAAD,CAAT,GAAeH,aAAa,CAAC,KAAD,CAA1C;AAAA,KAVV;AAWE,IAAA,SAAS,EAAEF,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACK,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBR,WAAW,CAACQ,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CA3BsB,CAAvB;;AAZEX,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AACAC,EAAAA,I,4BAAO,O,EAAU,Q;AACjBC,EAAAA,a;AACAC,EAAAA,M;;eAgCad,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles/typography';\n\nexport const Search = styled.input.attrs(() => ({ type: 'search' }))`\n appearance: none;\n width: calc(100% - 96px);\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n /* To prevent browser putting its own cross inside the search bar */\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n &:focus {\n outline-width: 0;\n }\n`;\n\nexport const BigSearch = styled(Search)`\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: 'small' | 'medium';\n setTabbedHere: (tabbedHere: boolean) => void;\n onBlur?: (e: any) => void;\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const { id, searchTerm, setSearchTerm, enterSearch, placeholder, disabled, onKeyDown, size, setTabbedHere, onBlur } = props;\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <BigSearch\n placeholder={disabled ? '' : placeholder}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={-1}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n ref={ref}\n onBlur={(e) => (onBlur ? onBlur(e) : setTabbedHere(false))}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.js"}