@laerdal/life-react-components 6.0.0-dev.26.full → 6.0.0-dev.27

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 (119) hide show
  1. package/README.md +1 -1
  2. package/dist/Button/DualFunctionButton.cjs +4 -4
  3. package/dist/Button/DualFunctionButton.cjs.map +1 -1
  4. package/dist/Button/DualFunctionButton.d.ts +2 -2
  5. package/dist/Button/DualFunctionButton.js +4 -4
  6. package/dist/Button/DualFunctionButton.js.map +1 -1
  7. package/dist/Button/{Button.cjs → TextButton.cjs} +179 -92
  8. package/dist/Button/TextButton.cjs.map +1 -0
  9. package/dist/Button/TextButton.d.ts +70 -0
  10. package/dist/Button/{Button.js → TextButton.js} +178 -91
  11. package/dist/Button/TextButton.js.map +1 -0
  12. package/dist/Button/__tests__/Button.test.tsx +8 -8
  13. package/dist/Button/__tests__/TextButton.test.tsx +45 -0
  14. package/dist/Button/index.cjs +11 -11
  15. package/dist/Button/index.cjs.map +1 -1
  16. package/dist/Button/index.d.ts +2 -2
  17. package/dist/Button/index.js +2 -2
  18. package/dist/Button/index.js.map +1 -1
  19. package/dist/Card/VerticalCard/{Card.cjs → VerticalCard.cjs} +20 -20
  20. package/dist/Card/VerticalCard/VerticalCard.cjs.map +1 -0
  21. package/dist/Card/VerticalCard/VerticalCard.d.ts +25 -0
  22. package/dist/Card/VerticalCard/{Card.js → VerticalCard.js} +19 -19
  23. package/dist/Card/VerticalCard/VerticalCard.js.map +1 -0
  24. package/dist/Card/VerticalCard/{CardBottomSection.cjs → VerticalCardBottomSection.cjs} +21 -21
  25. package/dist/Card/VerticalCard/VerticalCardBottomSection.cjs.map +1 -0
  26. package/dist/Card/VerticalCard/VerticalCardBottomSection.d.ts +53 -0
  27. package/dist/Card/VerticalCard/{CardBottomSection.js → VerticalCardBottomSection.js} +21 -21
  28. package/dist/Card/VerticalCard/VerticalCardBottomSection.js.map +1 -0
  29. package/dist/Card/VerticalCard/{CardMiddleSection.cjs → VerticalCardMiddleSection.cjs} +16 -16
  30. package/dist/Card/VerticalCard/VerticalCardMiddleSection.cjs.map +1 -0
  31. package/dist/Card/VerticalCard/VerticalCardMiddleSection.d.ts +42 -0
  32. package/dist/Card/VerticalCard/{CardMiddleSection.js → VerticalCardMiddleSection.js} +15 -15
  33. package/dist/Card/VerticalCard/VerticalCardMiddleSection.js.map +1 -0
  34. package/dist/Card/VerticalCard/{CardTopSection.cjs → VerticalCardTopSection.cjs} +15 -15
  35. package/dist/Card/VerticalCard/VerticalCardTopSection.cjs.map +1 -0
  36. package/dist/Card/VerticalCard/{CardTopSection.d.ts → VerticalCardTopSection.d.ts} +8 -8
  37. package/dist/Card/VerticalCard/{CardTopSection.js → VerticalCardTopSection.js} +14 -14
  38. package/dist/Card/VerticalCard/VerticalCardTopSection.js.map +1 -0
  39. package/dist/Card/{HorizontalCard → VerticalCard}/__tests__/VerticalCard.test.tsx +15 -15
  40. package/dist/Card/VerticalCard/index.cjs +25 -25
  41. package/dist/Card/VerticalCard/index.cjs.map +1 -1
  42. package/dist/Card/VerticalCard/index.d.ts +7 -7
  43. package/dist/Card/VerticalCard/index.js +7 -7
  44. package/dist/Card/VerticalCard/index.js.map +1 -1
  45. package/dist/Dropdown/DropdownContent.cjs +2 -2
  46. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  47. package/dist/Dropdown/DropdownContent.js +2 -2
  48. package/dist/Dropdown/DropdownContent.js.map +1 -1
  49. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +2 -2
  50. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
  51. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +3 -3
  52. package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
  53. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +1 -1
  54. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
  55. package/dist/GlobalNavigationBar/desktop/UserMenu.js +2 -2
  56. package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
  57. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs +1 -1
  58. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs.map +1 -1
  59. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +2 -2
  60. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js.map +1 -1
  61. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  62. package/dist/GlobalNavigationBar/types.d.ts +2 -2
  63. package/dist/GlobalNavigationBar/types.js.map +1 -1
  64. package/dist/Modals/ModalContent.cjs +2 -2
  65. package/dist/Modals/ModalContent.cjs.map +1 -1
  66. package/dist/Modals/ModalContent.js +3 -3
  67. package/dist/Modals/ModalContent.js.map +1 -1
  68. package/dist/Modals/ModalDialog.cjs +2 -2
  69. package/dist/Modals/ModalDialog.cjs.map +1 -1
  70. package/dist/Modals/ModalDialog.js +3 -3
  71. package/dist/Modals/ModalDialog.js.map +1 -1
  72. package/dist/Modals/ModalTypes.cjs.map +1 -1
  73. package/dist/Modals/ModalTypes.d.ts +3 -3
  74. package/dist/Modals/ModalTypes.js.map +1 -1
  75. package/dist/Popover/Popover.cjs +1 -1
  76. package/dist/Popover/Popover.cjs.map +1 -1
  77. package/dist/Popover/Popover.js +2 -2
  78. package/dist/Popover/Popover.js.map +1 -1
  79. package/dist/SideMenu/SideMenuFooter.cjs +1 -1
  80. package/dist/SideMenu/SideMenuFooter.cjs.map +1 -1
  81. package/dist/SideMenu/SideMenuFooter.js +2 -2
  82. package/dist/SideMenu/SideMenuFooter.js.map +1 -1
  83. package/dist/SideMenu/types.cjs.map +1 -1
  84. package/dist/SideMenu/types.d.ts +2 -2
  85. package/dist/SideMenu/types.js.map +1 -1
  86. package/dist/Table/TableBody.cjs +1 -1
  87. package/dist/Table/TableBody.cjs.map +1 -1
  88. package/dist/Table/TableBody.js +2 -2
  89. package/dist/Table/TableBody.js.map +1 -1
  90. package/dist/Table/TableTypes.cjs.map +1 -1
  91. package/dist/Table/TableTypes.d.ts +2 -2
  92. package/dist/Table/TableTypes.js.map +1 -1
  93. package/dist/Tile/TileCommonItems.cjs +1 -1
  94. package/dist/Tile/TileCommonItems.cjs.map +1 -1
  95. package/dist/Tile/TileCommonItems.js +2 -2
  96. package/dist/Tile/TileCommonItems.js.map +1 -1
  97. package/dist/Tile/TileTypes.cjs.map +1 -1
  98. package/dist/Tile/TileTypes.d.ts +2 -2
  99. package/dist/Tile/TileTypes.js.map +1 -1
  100. package/dist/Toasters/Toast.cjs +1 -2
  101. package/dist/Toasters/Toast.cjs.map +1 -1
  102. package/dist/Toasters/Toast.js +2 -3
  103. package/dist/Toasters/Toast.js.map +1 -1
  104. package/package.json +148 -152
  105. package/dist/Button/Button.cjs.map +0 -1
  106. package/dist/Button/Button.d.ts +0 -70
  107. package/dist/Button/Button.js.map +0 -1
  108. package/dist/Card/VerticalCard/Card.cjs.map +0 -1
  109. package/dist/Card/VerticalCard/Card.d.ts +0 -25
  110. package/dist/Card/VerticalCard/Card.js.map +0 -1
  111. package/dist/Card/VerticalCard/CardBottomSection.cjs.map +0 -1
  112. package/dist/Card/VerticalCard/CardBottomSection.d.ts +0 -53
  113. package/dist/Card/VerticalCard/CardBottomSection.js.map +0 -1
  114. package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +0 -1
  115. package/dist/Card/VerticalCard/CardMiddleSection.d.ts +0 -42
  116. package/dist/Card/VerticalCard/CardMiddleSection.js.map +0 -1
  117. package/dist/Card/VerticalCard/CardTopSection.cjs.map +0 -1
  118. package/dist/Card/VerticalCard/CardTopSection.js.map +0 -1
  119. package/dist/Card/__tests__/Card.test.tsx +0 -146
@@ -1 +1 @@
1
- {"version":3,"file":"UserMenu.js","names":["React","styled","Button","BOXSHADOWS","COLORS","ComponentLStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","Size","flowDown","UserMenuSectionListStyling","SystemIcons","HyperLink","Breakpoints","MenuItem","useNavigation","ProfileButton","jsx","_jsx","jsxs","_jsxs","UserMenuScrollContainer","div","UserMenuPinnedContainer","UserMenuWrapper","props","getColor","theme","off_canvas","MEDIUM","BOXSHADOW_CENTERED","fixed_menu","MenuSection","SignOutActionWrapper","MenuSectionHeader","Bold","MenuSectionList","UserSectionAvatar","UserSectionInfo","UserSectionInfoName","generateToken","componentType","defaultVariant","UserSectionInfoEmail","Regular","UserSectionInfoLink","UserSection","UserMenu","_ref","show","user","onHideUserMenu","sections","signOut","label","navigate","isActiveRoute","useEffect","handleKeyPress","e","key","document","addEventListener","removeEventListener","renderItem","item","section","index","id","active","external","to","exact","value","disabled","icon","displayLabel","onClickHandler","action","onClick","className","role","children","tabIndex","initials","firstName","lastName","email","link","variant","href","target","cloneElement","size","filter","a","pinned","map","divider","items","width","Logout","Large","preventDefault","propTypes","_pt","bool","func","isRequired"],"sources":["../../../src/GlobalNavigationBar/desktop/UserMenu.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport {Button} from '../../Button';\r\nimport {\r\n BOXSHADOWS,\r\n COLORS,\r\n ComponentLStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n ComponentXSStyling,\r\n Z_INDEXES\r\n} from '../../styles';\r\nimport {Size} from '../../types';\r\nimport {flowDown, UserMenuSectionListStyling} from '../mobile/CommonStyles';\r\nimport {SystemIcons} from '../../icons';\r\nimport {HyperLink} from '../../HyperLink';\r\nimport {MenuNavigationItem, MenuNavigationSection, ProfileMenu} from '../types';\r\nimport Breakpoints from '../../styles/breakpoints';\r\nimport {MenuItem} from '../../MenuItem';\r\nimport {useNavigation} from '../../Navigation/NavigationProvider';\r\nimport {ProfileButton} from '../../ProfileButton';\r\n\r\nconst UserMenuScrollContainer = styled.div`\r\n flex: 1;\r\n`;\r\n\r\nconst UserMenuPinnedContainer = styled.div``;\r\n\r\n\r\nconst UserMenuWrapper = styled.div`\r\n margin: 0;\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-sizing: border-box;\r\n display: none;\r\n width: 320px;\r\n\r\n position: absolute;\r\n\r\n &.show {\r\n display: block;\r\n }\r\n\r\n top: 0;\r\n right: 0;\r\n z-index: ${Z_INDEXES.off_canvas};\r\n height: 100%;\r\n flex-flow: column;\r\n\r\n\r\n ${Breakpoints.MEDIUM} {\r\n flex-flow: initial;\r\n top: initial;\r\n right: initial;\r\n height: initial;\r\n animation: ${flowDown} 0.2s ease-in-out;\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_CENTERED};\r\n border-radius: 8px;\r\n border: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n z-index: ${Z_INDEXES.fixed_menu};\r\n padding: 24px 0;\r\n }\r\n`;\r\n\r\n\r\nconst MenuSection = styled.div`\r\n padding: 4px 0;\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n\r\n &.divider {\r\n border-top: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n`;\r\n\r\nconst SignOutActionWrapper = styled(MenuSection)`\r\n align-items: center;\r\n justify-content: center;\r\n`;\r\n\r\nconst MenuSectionHeader = styled.div`\r\n display: flex;\r\n align-items: center;\r\n padding: 8px 24px 4px 24px;\r\n box-sizing: border-box;\r\n min-height: 32px;\r\n background-color: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('neutral_500', props.theme))}\r\n`;\r\n\r\nconst MenuSectionList = styled.div`\r\n margin: 0;\r\n padding: 0;\r\n\r\n ${UserMenuSectionListStyling};\r\n`;\r\n\r\n\r\nconst UserSectionAvatar = styled.div`\r\n pointer-events: none;\r\n\r\n button {\r\n padding: 0 !important;\r\n }\r\n\r\n button > div {\r\n width: 48px !important;\r\n height: 48px !important;\r\n border-radius: 50% !important;\r\n }\r\n`;\r\n\r\nconst UserSectionInfo = styled.div`\r\n padding: 2px 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 4px;\r\n`;\r\n\r\nconst UserSectionInfoName = styled.div`\r\n ${props => ComponentLStyling(ComponentTextStyle.Bold, COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme))}\r\n`;\r\n\r\nconst UserSectionInfoEmail = styled.div`\r\n word-break: break-all;\r\n ${props => ComponentXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_500', props.theme))}\r\n`;\r\n\r\nconst UserSectionInfoLink = styled.div`\r\n padding: 2px 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n svg {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n`;\r\n\r\nconst UserSection = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 0 24px 8px 24px;\r\n gap: 16px;\r\n`;\r\n\r\ninterface UserMenuProps extends ProfileMenu {\r\n show?: boolean;\r\n onHideUserMenu: () => void;\r\n}\r\n\r\nconst UserMenu = ({show, user, onHideUserMenu, sections, signOut, label}: UserMenuProps) => {\r\n\r\n const {navigate, isActiveRoute} = useNavigation();\r\n\r\n React.useEffect(() => {\r\n if (!onHideUserMenu) return;\r\n\r\n function handleKeyPress(e: any) {\r\n if (e.key === 'Escape' || e.key === 'Esc') {\r\n onHideUserMenu();\r\n }\r\n }\r\n\r\n document?.addEventListener('keydown', handleKeyPress, false);\r\n return () => {\r\n document?.removeEventListener('keydown', handleKeyPress, false);\r\n };\r\n }, [onHideUserMenu]);\r\n\r\n const renderItem = (item: MenuNavigationItem, section: MenuNavigationSection, index: number) =>\r\n <MenuItem key={index}\r\n id={`profile_${index}`}\r\n active={!item.external && !!isActiveRoute && isActiveRoute(item.to, !!item.exact)}\r\n item={{\r\n value: item.to,\r\n disabled: item.disabled,\r\n icon: item.icon,\r\n displayLabel: item.label,\r\n }}\r\n onClickHandler={(e) => {\r\n item.action && item.action(e);\r\n navigate && navigate(item.to, !!item.external);\r\n }}/>\r\n\r\n return (\r\n <UserMenuWrapper onClick={onHideUserMenu}\r\n className={show ? 'show' : ''}\r\n role=\"menu\"\r\n aria-labelledby=\"UserMenuButton\">\r\n <UserMenuScrollContainer>\r\n <UserSection>\r\n <UserSectionAvatar>\r\n <ProfileButton onClick={() => {\r\n }}\r\n tabIndex={-1}\r\n initials={user.firstName[0] + user.lastName[0]}/>\r\n </UserSectionAvatar>\r\n <UserSectionInfo>\r\n <UserSectionInfoName data-hj-suppress>{`${user.firstName} ${user.lastName}`}</UserSectionInfoName>\r\n <UserSectionInfoEmail data-hj-suppress>{user.email}</UserSectionInfoEmail>\r\n {\r\n user.link &&\r\n <HyperLink variant={'styleless'}\r\n href={user.link.href}\r\n target={user.link.target}\r\n id={user.link.id}\r\n onClick={user.link.onClick}>\r\n <UserSectionInfoLink>\r\n <span>\r\n {user.link.label}\r\n </span>\r\n {user.link.icon && React.cloneElement(user.link.icon, {size: '16px'})}\r\n </UserSectionInfoLink>\r\n </HyperLink>\r\n }\r\n </UserSectionInfo>\r\n </UserSection>\r\n {\r\n sections.filter(a => !a.pinned).map((section, index) =>\r\n <MenuSection key={index} className={section.divider ? 'divider' : ''}>\r\n {section.label && <MenuSectionHeader>{section.label}</MenuSectionHeader>}\r\n <MenuSectionList key={index}>\r\n {section.items.map((item, index) => renderItem(item, section, index))}\r\n </MenuSectionList>\r\n </MenuSection>\r\n )\r\n }\r\n </UserMenuScrollContainer>\r\n <UserMenuPinnedContainer>\r\n {\r\n sections.filter(a => !!a.pinned).map((section, index) =>\r\n <MenuSection key={index} className={section.divider || index === 0 ? 'divider' : ''}>\r\n {section.label && <MenuSectionHeader>{section.label}</MenuSectionHeader>}\r\n <MenuSectionList key={index}>\r\n {section.items.map((item, index) => renderItem(item, section, index))}\r\n </MenuSectionList>\r\n </MenuSection>\r\n )\r\n }\r\n {\r\n signOut &&\r\n <SignOutActionWrapper>\r\n <Button width={'272px'}\r\n variant=\"secondary\"\r\n icon={<SystemIcons.Logout/>}\r\n size={Size.Large}\r\n onClick={e => {\r\n e.preventDefault();\r\n signOut?.action();\r\n }}>\r\n {signOut?.label}\r\n </Button>\r\n </SignOutActionWrapper>\r\n }\r\n </UserMenuPinnedContainer>\r\n </UserMenuWrapper>\r\n );\r\n};\r\n\r\nexport default UserMenu;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,MAAM,QAAO,cAAc;AACnC,SACEC,UAAU,EACVC,MAAM,EACNC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,SAAS,QACJ,cAAc;AACrB,SAAQC,IAAI,QAAO,aAAa;AAChC,SAAQC,QAAQ,EAAEC,0BAA0B,QAAO,wBAAwB;AAC3E,SAAQC,WAAW,QAAO,aAAa;AACvC,SAAQC,SAAS,QAAO,iBAAiB;AAEzC,OAAOC,WAAW,MAAM,0BAA0B;AAClD,SAAQC,QAAQ,QAAO,gBAAgB;AACvC,SAAQC,aAAa,QAAO,qCAAqC;AACjE,SAAQC,aAAa,QAAO,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,MAAMC,uBAAuB,GAAGtB,MAAM,CAACuB,GAAG;AAC1C;AACA,CAAC;AAED,MAAMC,uBAAuB,GAAGxB,MAAM,CAACuB,GAAG,EAAE;AAG5C,MAAME,eAAe,GAAGzB,MAAM,CAACuB,GAAG;AAClC;AACA,sBAAsBG,KAAK,IAAIvB,MAAM,CAACwB,QAAQ,CAAC,OAAO,EAAED,KAAK,CAACE,KAAK,CAAC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAapB,SAAS,CAACqB,UAAU;AACjC;AACA;AACA;AACA;AACA,IAAIf,WAAW,CAACgB,MAAM;AACtB;AACA;AACA;AACA;AACA,iBAAiBpB,QAAQ;AACzB,kBAAkBR,UAAU,CAAC6B,kBAAkB;AAC/C;AACA,wBAAwBL,KA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AC;UACnB,CAAE;UAAAI,QAAA,EACP7B,OAAO,EAAEC;QAAK,CACT;MAAC,CACW,CAAC;IAAA,CAEF,CAAC;EAAA,CACX,CAAC;AAEtB,CAAC;AAACP,QAAA,CAAAyD,SAAA;EA/GAvD,IAAI,EAAAwD,GAAA,CAAAC,IAAA;EACJvD,cAAc,EAAAsD,GAAA,CAAAE,IAAA,CAAAC;AAAA;AAgHhB,eAAe7D,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"UserMenu.js","names":["React","styled","TextButton","BOXSHADOWS","COLORS","ComponentLStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","Z_INDEXES","Size","flowDown","UserMenuSectionListStyling","SystemIcons","HyperLink","Breakpoints","MenuItem","useNavigation","ProfileButton","jsx","_jsx","jsxs","_jsxs","UserMenuScrollContainer","div","UserMenuPinnedContainer","UserMenuWrapper","props","getColor","theme","off_canvas","MEDIUM","BOXSHADOW_CENTERED","fixed_menu","MenuSection","SignOutActionWrapper","MenuSectionHeader","Bold","MenuSectionList","UserSectionAvatar","UserSectionInfo","UserSectionInfoName","generateToken","componentType","defaultVariant","UserSectionInfoEmail","Regular","UserSectionInfoLink","UserSection","UserMenu","_ref","show","user","onHideUserMenu","sections","signOut","label","navigate","isActiveRoute","useEffect","handleKeyPress","e","key","document","addEventListener","removeEventListener","renderItem","item","section","index","id","active","external","to","exact","value","disabled","icon","displayLabel","onClickHandler","action","onClick","className","role","children","tabIndex","initials","firstName","lastName","email","link","variant","href","target","cloneElement","size","filter","a","pinned","map","divider","items","width","Logout","Large","preventDefault","propTypes","_pt","bool","func","isRequired"],"sources":["../../../src/GlobalNavigationBar/desktop/UserMenu.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport {TextButton} from '../../Button';\r\nimport {\r\n BOXSHADOWS,\r\n COLORS,\r\n ComponentLStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n ComponentXSStyling,\r\n Z_INDEXES\r\n} from '../../styles';\r\nimport {Size} from '../../types';\r\nimport {flowDown, UserMenuSectionListStyling} from '../mobile/CommonStyles';\r\nimport {SystemIcons} from '../../icons';\r\nimport {HyperLink} from '../../HyperLink';\r\nimport {MenuNavigationItem, MenuNavigationSection, ProfileMenu} from '../types';\r\nimport Breakpoints from '../../styles/breakpoints';\r\nimport {MenuItem} from '../../MenuItem';\r\nimport {useNavigation} from '../../Navigation/NavigationProvider';\r\nimport {ProfileButton} from '../../ProfileButton';\r\n\r\nconst UserMenuScrollContainer = styled.div`\r\n flex: 1;\r\n`;\r\n\r\nconst UserMenuPinnedContainer = styled.div``;\r\n\r\n\r\nconst UserMenuWrapper = styled.div`\r\n margin: 0;\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-sizing: border-box;\r\n display: none;\r\n width: 320px;\r\n\r\n position: absolute;\r\n\r\n &.show {\r\n display: block;\r\n }\r\n\r\n top: 0;\r\n right: 0;\r\n z-index: ${Z_INDEXES.off_canvas};\r\n height: 100%;\r\n flex-flow: column;\r\n\r\n\r\n ${Breakpoints.MEDIUM} {\r\n flex-flow: initial;\r\n top: initial;\r\n right: initial;\r\n height: initial;\r\n animation: ${flowDown} 0.2s ease-in-out;\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_CENTERED};\r\n border-radius: 8px;\r\n border: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n z-index: ${Z_INDEXES.fixed_menu};\r\n padding: 24px 0;\r\n }\r\n`;\r\n\r\n\r\nconst MenuSection = styled.div`\r\n padding: 4px 0;\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n\r\n &.divider {\r\n border-top: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n`;\r\n\r\nconst SignOutActionWrapper = styled(MenuSection)`\r\n align-items: center;\r\n justify-content: center;\r\n`;\r\n\r\nconst MenuSectionHeader = styled.div`\r\n display: flex;\r\n align-items: center;\r\n padding: 8px 24px 4px 24px;\r\n box-sizing: border-box;\r\n min-height: 32px;\r\n background-color: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('neutral_500', props.theme))}\r\n`;\r\n\r\nconst MenuSectionList = styled.div`\r\n margin: 0;\r\n padding: 0;\r\n\r\n ${UserMenuSectionListStyling};\r\n`;\r\n\r\n\r\nconst UserSectionAvatar = styled.div`\r\n pointer-events: none;\r\n\r\n button {\r\n padding: 0 !important;\r\n }\r\n\r\n button > div {\r\n width: 48px !important;\r\n height: 48px !important;\r\n border-radius: 50% !important;\r\n }\r\n`;\r\n\r\nconst UserSectionInfo = styled.div`\r\n padding: 2px 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 4px;\r\n`;\r\n\r\nconst UserSectionInfoName = styled.div`\r\n ${props => ComponentLStyling(ComponentTextStyle.Bold, COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme))}\r\n`;\r\n\r\nconst UserSectionInfoEmail = styled.div`\r\n word-break: break-all;\r\n ${props => ComponentXSStyling(ComponentTextStyle.Regular, COLORS.getColor('neutral_500', props.theme))}\r\n`;\r\n\r\nconst UserSectionInfoLink = styled.div`\r\n padding: 2px 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n svg {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n`;\r\n\r\nconst UserSection = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 0 24px 8px 24px;\r\n gap: 16px;\r\n`;\r\n\r\ninterface UserMenuProps extends ProfileMenu {\r\n show?: boolean;\r\n onHideUserMenu: () => void;\r\n}\r\n\r\nconst UserMenu = ({show, user, onHideUserMenu, sections, signOut, label}: UserMenuProps) => {\r\n\r\n const {navigate, isActiveRoute} = useNavigation();\r\n\r\n React.useEffect(() => {\r\n if (!onHideUserMenu) return;\r\n\r\n function handleKeyPress(e: any) {\r\n if (e.key === 'Escape' || e.key === 'Esc') {\r\n onHideUserMenu();\r\n }\r\n }\r\n\r\n document?.addEventListener('keydown', handleKeyPress, false);\r\n return () => {\r\n document?.removeEventListener('keydown', handleKeyPress, false);\r\n };\r\n }, [onHideUserMenu]);\r\n\r\n const renderItem = (item: MenuNavigationItem, section: MenuNavigationSection, index: number) =>\r\n <MenuItem key={index}\r\n id={`profile_${index}`}\r\n active={!item.external && !!isActiveRoute && isActiveRoute(item.to, !!item.exact)}\r\n item={{\r\n value: item.to,\r\n disabled: item.disabled,\r\n icon: item.icon,\r\n displayLabel: item.label,\r\n }}\r\n onClickHandler={(e) => {\r\n item.action && item.action(e);\r\n navigate && navigate(item.to, !!item.external);\r\n }}/>\r\n\r\n return (\r\n <UserMenuWrapper onClick={onHideUserMenu}\r\n className={show ? 'show' : ''}\r\n role=\"menu\"\r\n aria-labelledby=\"UserMenuButton\">\r\n <UserMenuScrollContainer>\r\n <UserSection>\r\n <UserSectionAvatar>\r\n <ProfileButton onClick={() => {\r\n }}\r\n tabIndex={-1}\r\n initials={user.firstName[0] + user.lastName[0]}/>\r\n </UserSectionAvatar>\r\n <UserSectionInfo>\r\n <UserSectionInfoName data-hj-suppress>{`${user.firstName} ${user.lastName}`}</UserSectionInfoName>\r\n <UserSectionInfoEmail data-hj-suppress>{user.email}</UserSectionInfoEmail>\r\n {\r\n user.link &&\r\n <HyperLink variant={'styleless'}\r\n href={user.link.href}\r\n target={user.link.target}\r\n id={user.link.id}\r\n onClick={user.link.onClick}>\r\n <UserSectionInfoLink>\r\n <span>\r\n {user.link.label}\r\n </span>\r\n {user.link.icon && React.cloneElement(user.link.icon, {size: '16px'})}\r\n </UserSectionInfoLink>\r\n </HyperLink>\r\n }\r\n </UserSectionInfo>\r\n </UserSection>\r\n {\r\n sections.filter(a => !a.pinned).map((section, index) =>\r\n <MenuSection key={index} className={section.divider ? 'divider' : ''}>\r\n {section.label && <MenuSectionHeader>{section.label}</MenuSectionHeader>}\r\n <MenuSectionList key={index}>\r\n {section.items.map((item, index) => renderItem(item, section, index))}\r\n </MenuSectionList>\r\n </MenuSection>\r\n )\r\n }\r\n </UserMenuScrollContainer>\r\n <UserMenuPinnedContainer>\r\n {\r\n sections.filter(a => !!a.pinned).map((section, index) =>\r\n <MenuSection key={index} className={section.divider || index === 0 ? 'divider' : ''}>\r\n {section.label && <MenuSectionHeader>{section.label}</MenuSectionHeader>}\r\n <MenuSectionList key={index}>\r\n {section.items.map((item, index) => renderItem(item, section, index))}\r\n </MenuSectionList>\r\n </MenuSection>\r\n )\r\n }\r\n {\r\n signOut &&\r\n <SignOutActionWrapper>\r\n <TextButton width={'272px'}\r\n variant=\"secondary\"\r\n icon={<SystemIcons.Logout/>}\r\n size={Size.Large}\r\n onClick={e => {\r\n e.preventDefault();\r\n signOut?.action();\r\n }}>\r\n {signOut?.label}\r\n </TextButton>\r\n </SignOutActionWrapper>\r\n }\r\n </UserMenuPinnedContainer>\r\n </UserMenuWrapper>\r\n );\r\n};\r\n\r\nexport default UserMenu;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,UAAU,QAAO,cAAc;AACvC,SACEC,UAAU,EACVC,MAAM,EACNC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,SAAS,QACJ,cAAc;AACrB,SAAQC,IAAI,QAAO,aAAa;AAChC,SAAQC,QAAQ,EAAEC,0BAA0B,QAAO,wBAAwB;AAC3E,SAAQC,WAAW,QAAO,aAAa;AACvC,SAAQC,SAAS,QAAO,iBAAiB;AAEzC,OAAOC,WAAW,MAAM,0BAA0B;AAClD,SAAQC,QAAQ,QAAO,gBAAgB;AACvC,SAAQC,aAAa,QAAO,qCAAqC;AACjE,SAAQC,aAAa,QAAO,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,MAAMC,uBAAuB,GAAGtB,MAAM,CAACu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KAAK,KAAKH,UAAU,CAACC,IAAI,EAAEC,OAAO,EAAEC,KAAK,CAAC;QAAC,GADjDA,KAEL,CAAC;MAAA,GAJFA,KAKL,CACf,CAAC,EAGDd,OAAO,iBACPnC,IAAA,CAACe,oBAAoB;QAAAiD,QAAA,eACnBhE,IAAA,CAAClB,UAAU;UAACoG,KAAK,EAAE,OAAQ;UACnBX,OAAO,EAAC,WAAW;UACnBd,IAAI,eAAEzD,IAAA,CAACP,WAAW,CAAC0F,MAAM,IAAC,CAAE;UAC5BR,IAAI,EAAErF,IAAI,CAAC8F,KAAM;UACjBvB,OAAO,EAAEpB,CAAC,IAAI;YACZA,CAAC,CAAC4C,cAAc,CAAC,CAAC;YAClBlD,OAAO,EAAEyB,MAAM,CAAC,CAAC;UACnB,CAAE;UAAAI,QAAA,EACP7B,OAAO,EAAEC;QAAK,CACL;MAAC,CACO,CAAC;IAAA,CAEF,CAAC;EAAA,CACX,CAAC;AAEtB,CAAC;AAACP,QAAA,CAAAyD,SAAA;EA/GAvD,IAAI,EAAAwD,GAAA,CAAAC,IAAA;EACJvD,cAAc,EAAAsD,GAAA,CAAAE,IAAA,CAAAC;AAAA;AAgHhB,eAAe7D,QAAQ","ignoreList":[]}
@@ -34,7 +34,7 @@ const MobileActionContainer = _ref => {
34
34
  } = _ref;
35
35
  const isSmallScreen = (0, _rooks.useMediaMatch)(_styles.BREAKPOINTS.SMALL.replace('@media ', ''));
36
36
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionContainer, {
37
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
37
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.TextButton, {
38
38
  variant: variant,
39
39
  size: isSmallScreen ? _types.Size.Medium : _types.Size.Small,
40
40
  disabled: disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"MobileActionContainer.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_Button","_styles","_types","_rooks","_jsxRuntime","ActionContainer","styled","div","props","COLORS","getColor","theme","BREAKPOINTS","SMALL","MobileActionContainer","_ref","disabled","variant","icon","label","loading","action","isSmallScreen","useMediaMatch","replace","jsx","children","Button","size","Size","Medium","Small","onClick","exports"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionContainer.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Button } from '../../Button';\r\nimport { BREAKPOINTS, COLORS } from '../../styles';\r\nimport { Size } from '../../types';\r\nimport { MenuButton } from '../types';\r\nimport {useMediaMatch} from \"rooks\";\r\n\r\nconst ActionContainer = styled.div`\r\n padding: 8px 16px;\r\n box-sizing: border-box;\r\n border-top: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n display: flex;\r\n flex-direction: column;\r\n\r\n ${BREAKPOINTS.SMALL} {\r\n padding: 16px;\r\n }\r\n`;\r\n\r\ninterface MobileActionContainerProps extends MenuButton {}\r\n\r\nexport const MobileActionContainer: React.FunctionComponent<MobileActionContainerProps> = ({ disabled, variant = 'secondary', icon, label, loading, action }) => {\r\n const isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));\r\n\r\n return (\r\n <ActionContainer>\r\n <Button variant={variant} size={isSmallScreen ? Size.Medium : Size.Small} disabled={disabled} icon={icon} loading={loading} onClick={action}>\r\n {label}\r\n </Button>\r\n </ActionContainer>\r\n );\r\n};\r\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAAoC,IAAAM,WAAA,GAAAN,OAAA;AAEpC,MAAMO,eAAe,GAAGC,yBAAM,CAACC,GAAG;AAClC;AACA;AACA,0BAA0BC,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA,IAAIC,mBAAW,CAACC,KAAK;AACrB;AACA;AACA,CAAC;AAIM,MAAMC,qBAA0E,GAAGC,IAAA,IAAuE;EAAA,IAAtE;IAAEC,QAAQ;IAAEC,OAAO,GAAG,WAAW;IAAEC,IAAI;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAO,CAAC,GAAAN,IAAA;EAC1J,MAAMO,aAAa,GAAG,IAAAC,oBAAa,EAACX,mBAAW,CAACC,KAAK,CAACW,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;EAE7E,oBACE,IAAApB,WAAA,CAAAqB,GAAA,EAACpB,eAAe;IAAAqB,QAAA,eACd,IAAAtB,WAAA,CAAAqB,GAAA,EAACzB,OAAA,CAAA2B,MAAM;MAACV,OAAO,EAAEA,OAAQ;MAACW,IAAI,EAAEN,aAAa,GAAGO,WAAI,CAACC,MAAM,GAAGD,WAAI,CAACE,KAAM;MAACf,QAAQ,EAAEA,QAAS;MAACE,IAAI,EAAEA,IAAK;MAACE,OAAO,EAAEA,OAAQ;MAACY,OAAO,EAAEX,MAAO;MAAAK,QAAA,EACzIP;IAAK,CACA;EAAC,CACM,CAAC;AAEtB,CAAC;AAACc,OAAA,CAAAnB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
1
+ {"version":3,"file":"MobileActionContainer.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_Button","_styles","_types","_rooks","_jsxRuntime","ActionContainer","styled","div","props","COLORS","getColor","theme","BREAKPOINTS","SMALL","MobileActionContainer","_ref","disabled","variant","icon","label","loading","action","isSmallScreen","useMediaMatch","replace","jsx","children","TextButton","size","Size","Medium","Small","onClick","exports"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionContainer.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { TextButton } from '../../Button';\r\nimport { BREAKPOINTS, COLORS } from '../../styles';\r\nimport { Size } from '../../types';\r\nimport { MenuButton } from '../types';\r\nimport {useMediaMatch} from \"rooks\";\r\n\r\nconst ActionContainer = styled.div`\r\n padding: 8px 16px;\r\n box-sizing: border-box;\r\n border-top: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n display: flex;\r\n flex-direction: column;\r\n\r\n ${BREAKPOINTS.SMALL} {\r\n padding: 16px;\r\n }\r\n`;\r\n\r\ninterface MobileActionContainerProps extends MenuButton {}\r\n\r\nexport const MobileActionContainer: React.FunctionComponent<MobileActionContainerProps> = ({ disabled, variant = 'secondary', icon, label, loading, action }) => {\r\n const isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));\r\n\r\n return (\r\n <ActionContainer>\r\n <TextButton variant={variant} size={isSmallScreen ? Size.Medium : Size.Small} disabled={disabled} icon={icon} loading={loading} onClick={action}>\r\n {label}\r\n </TextButton>\r\n </ActionContainer>\r\n );\r\n};\r\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAAoC,IAAAM,WAAA,GAAAN,OAAA;AAEpC,MAAMO,eAAe,GAAGC,yBAAM,CAACC,GAAG;AAClC;AACA;AACA,0BAA0BC,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA,IAAIC,mBAAW,CAACC,KAAK;AACrB;AACA;AACA,CAAC;AAIM,MAAMC,qBAA0E,GAAGC,IAAA,IAAuE;EAAA,IAAtE;IAAEC,QAAQ;IAAEC,OAAO,GAAG,WAAW;IAAEC,IAAI;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAO,CAAC,GAAAN,IAAA;EAC1J,MAAMO,aAAa,GAAG,IAAAC,oBAAa,EAACX,mBAAW,CAACC,KAAK,CAACW,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;EAE7E,oBACE,IAAApB,WAAA,CAAAqB,GAAA,EAACpB,eAAe;IAAAqB,QAAA,eACd,IAAAtB,WAAA,CAAAqB,GAAA,EAACzB,OAAA,CAAA2B,UAAU;MAACV,OAAO,EAAEA,OAAQ;MAACW,IAAI,EAAEN,aAAa,GAAGO,WAAI,CAACC,MAAM,GAAGD,WAAI,CAACE,KAAM;MAACf,QAAQ,EAAEA,QAAS;MAACE,IAAI,EAAEA,IAAK;MAACE,OAAO,EAAEA,OAAQ;MAACY,OAAO,EAAEX,MAAO;MAAAK,QAAA,EAC7IP;IAAK,CACI;EAAC,CACE,CAAC;AAEtB,CAAC;AAACc,OAAA,CAAAnB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
- import { Button } from '../../Button';
3
+ import { TextButton } from '../../Button';
4
4
  import { BREAKPOINTS, COLORS } from '../../styles';
5
5
  import { Size } from '../../types';
6
6
  import { useMediaMatch } from "rooks";
@@ -27,7 +27,7 @@ export const MobileActionContainer = _ref => {
27
27
  } = _ref;
28
28
  const isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));
29
29
  return /*#__PURE__*/_jsx(ActionContainer, {
30
- children: /*#__PURE__*/_jsx(Button, {
30
+ children: /*#__PURE__*/_jsx(TextButton, {
31
31
  variant: variant,
32
32
  size: isSmallScreen ? Size.Medium : Size.Small,
33
33
  disabled: disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"MobileActionContainer.js","names":["React","styled","Button","BREAKPOINTS","COLORS","Size","useMediaMatch","jsx","_jsx","ActionContainer","div","props","getColor","theme","SMALL","MobileActionContainer","_ref","disabled","variant","icon","label","loading","action","isSmallScreen","replace","children","size","Medium","Small","onClick"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionContainer.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Button } from '../../Button';\r\nimport { BREAKPOINTS, COLORS } from '../../styles';\r\nimport { Size } from '../../types';\r\nimport { MenuButton } from '../types';\r\nimport {useMediaMatch} from \"rooks\";\r\n\r\nconst ActionContainer = styled.div`\r\n padding: 8px 16px;\r\n box-sizing: border-box;\r\n border-top: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n display: flex;\r\n flex-direction: column;\r\n\r\n ${BREAKPOINTS.SMALL} {\r\n padding: 16px;\r\n }\r\n`;\r\n\r\ninterface MobileActionContainerProps extends MenuButton {}\r\n\r\nexport const MobileActionContainer: React.FunctionComponent<MobileActionContainerProps> = ({ disabled, variant = 'secondary', icon, label, loading, action }) => {\r\n const isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));\r\n\r\n return (\r\n <ActionContainer>\r\n <Button variant={variant} size={isSmallScreen ? Size.Medium : Size.Small} disabled={disabled} icon={icon} loading={loading} onClick={action}>\r\n {label}\r\n </Button>\r\n </ActionContainer>\r\n );\r\n};\r\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,WAAW,EAAEC,MAAM,QAAQ,cAAc;AAClD,SAASC,IAAI,QAAQ,aAAa;AAElC,SAAQC,aAAa,QAAO,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEpC,MAAMC,eAAe,GAAGR,MAAM,CAACS,GAAG;AAClC;AACA;AACA,0BAA0BC,KAAK,IAAIP,MAAM,CAACQ,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA,IAAIV,WAAW,CAACW,KAAK;AACrB;AACA;AACA,CAAC;AAID,OAAO,MAAMC,qBAA0E,GAAGC,IAAA,IAAuE;EAAA,IAAtE;IAAEC,QAAQ;IAAEC,OAAO,GAAG,WAAW;IAAEC,IAAI;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAO,CAAC,GAAAN,IAAA;EAC1J,MAAMO,aAAa,GAAGjB,aAAa,CAACH,WAAW,CAACW,KAAK,CAACU,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;EAE7E,oBACEhB,IAAA,CAACC,eAAe;IAAAgB,QAAA,eACdjB,IAAA,CAACN,MAAM;MAACgB,OAAO,EAAEA,OAAQ;MAACQ,IAAI,EAAEH,aAAa,GAAGlB,IAAI,CAACsB,MAAM,GAAGtB,IAAI,CAACuB,KAAM;MAACX,QAAQ,EAAEA,QAAS;MAACE,IAAI,EAAEA,IAAK;MAACE,OAAO,EAAEA,OAAQ;MAACQ,OAAO,EAAEP,MAAO;MAAAG,QAAA,EACzIL;IAAK,CACA;EAAC,CACM,CAAC;AAEtB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MobileActionContainer.js","names":["React","styled","TextButton","BREAKPOINTS","COLORS","Size","useMediaMatch","jsx","_jsx","ActionContainer","div","props","getColor","theme","SMALL","MobileActionContainer","_ref","disabled","variant","icon","label","loading","action","isSmallScreen","replace","children","size","Medium","Small","onClick"],"sources":["../../../src/GlobalNavigationBar/mobile/MobileActionContainer.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { TextButton } from '../../Button';\r\nimport { BREAKPOINTS, COLORS } from '../../styles';\r\nimport { Size } from '../../types';\r\nimport { MenuButton } from '../types';\r\nimport {useMediaMatch} from \"rooks\";\r\n\r\nconst ActionContainer = styled.div`\r\n padding: 8px 16px;\r\n box-sizing: border-box;\r\n border-top: 1px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n display: flex;\r\n flex-direction: column;\r\n\r\n ${BREAKPOINTS.SMALL} {\r\n padding: 16px;\r\n }\r\n`;\r\n\r\ninterface MobileActionContainerProps extends MenuButton {}\r\n\r\nexport const MobileActionContainer: React.FunctionComponent<MobileActionContainerProps> = ({ disabled, variant = 'secondary', icon, label, loading, action }) => {\r\n const isSmallScreen = useMediaMatch(BREAKPOINTS.SMALL.replace('@media ', ''));\r\n\r\n return (\r\n <ActionContainer>\r\n <TextButton variant={variant} size={isSmallScreen ? Size.Medium : Size.Small} disabled={disabled} icon={icon} loading={loading} onClick={action}>\r\n {label}\r\n </TextButton>\r\n </ActionContainer>\r\n );\r\n};\r\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,EAAEC,MAAM,QAAQ,cAAc;AAClD,SAASC,IAAI,QAAQ,aAAa;AAElC,SAAQC,aAAa,QAAO,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEpC,MAAMC,eAAe,GAAGR,MAAM,CAACS,GAAG;AAClC;AACA;AACA,0BAA0BC,KAAK,IAAIP,MAAM,CAACQ,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA,IAAIV,WAAW,CAACW,KAAK;AACrB;AACA;AACA,CAAC;AAID,OAAO,MAAMC,qBAA0E,GAAGC,IAAA,IAAuE;EAAA,IAAtE;IAAEC,QAAQ;IAAEC,OAAO,GAAG,WAAW;IAAEC,IAAI;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAO,CAAC,GAAAN,IAAA;EAC1J,MAAMO,aAAa,GAAGjB,aAAa,CAACH,WAAW,CAACW,KAAK,CAACU,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;EAE7E,oBACEhB,IAAA,CAACC,eAAe;IAAAgB,QAAA,eACdjB,IAAA,CAACN,UAAU;MAACgB,OAAO,EAAEA,OAAQ;MAACQ,IAAI,EAAEH,aAAa,GAAGlB,IAAI,CAACsB,MAAM,GAAGtB,IAAI,CAACuB,KAAM;MAACX,QAAQ,EAAEA,QAAS;MAACE,IAAI,EAAEA,IAAK;MAACE,OAAO,EAAEA,OAAQ;MAACQ,OAAO,EAAEP,MAAO;MAAAG,QAAA,EAC7IL;IAAK,CACI;EAAC,CACE,CAAC;AAEtB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\r\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\r\nimport { IconButtonProps } from '../Button/Iconbutton';\r\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\r\nimport {ButtonProps} from \"../Button/Button\";\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\n\r\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\r\n label: string;\r\n icon?: React.ReactElement<any>;\r\n}\r\n\r\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\r\n label: string;\r\n action: () => void;\r\n\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport interface MenuGroupFooter {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuGroupHeader {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuAccountInfo {\r\n firstName: string;\r\n lastName: string;\r\n email: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface ProfileMenu {\r\n label?: string;\r\n\r\n user: MenuAccountInfo;\r\n\r\n sections: MenuNavigationSection[];\r\n\r\n signOut?: MenuButton;\r\n}\r\n\r\nexport interface MenuIconSubMenuButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'submenu';\r\n icon: React.ReactNode;\r\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuIconButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'action';\r\n icon: React.ReactNode;\r\n action: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\r\n type: 'profile';\r\n action?: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSearchButton {\r\n type: 'search';\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSwitcherButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'id'\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'switcher';\r\n placement?: 'left' | 'right';\r\n action?: (button?: EventTarget) => boolean | void;\r\n}\r\n\r\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\r\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton | MenuSearchButton;\r\n\r\nexport interface MobileNavigationMenuProps {\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n\r\n header?: MenuGroupHeader;\r\n\r\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport interface DesktopNavigationMenuProps {\r\n buttons?: DesktopMenuButtonTypes[];\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n action?: MenuButton;\r\n reverseRightSideOrder?: boolean;\r\n}\r\n\r\n// @ts-ignore\r\nexport interface MenuNavigationGroup<T = MenuNavigationItemTypeDesktopGroup | MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\r\n label: string;\r\n note?: string;\r\n\r\n buttons?: MobileMenuButtonTypes[];\r\n header?: MenuGroupHeader;\r\n\r\n items: T[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport type MenuNavigationItem = {\r\n icon?: React.ReactNode;\r\n to: string;\r\n exact?: boolean;\r\n disabled?: boolean;\r\n external?: boolean;\r\n action?: (e: React.MouseEvent) => void;\r\n label: string;\r\n note?: string;\r\n pinned?: boolean;\r\n subItems?: MenuNavigationItem[];\r\n} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\r\n\r\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\r\n divider?: boolean;\r\n pinned?: boolean;\r\n label?: string;\r\n items: T[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\r\n type?: 'item';\r\n};\r\n\r\nexport type MenuNavigationItemTypeDesktopGroup = {\r\n id: string;\r\n label?: string;\r\n disabled?: boolean;\r\n pinned?: boolean;\r\n type?: 'desktopgroup';\r\n expanded?: boolean;\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\r\n type: 'group';\r\n icon?: React.ReactNode;\r\n pinned?: boolean;\r\n disabled?: boolean;\r\n};\r\n\r\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\r\n type: 'section';\r\n};\r\n\r\nexport type MenuNavigationCustomSubMenu = {\r\n type: 'custom';\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n custom: () => React.ReactNode;\r\n};\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\r\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\r\nimport { IconButtonProps } from '../Button/Iconbutton';\r\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\r\nimport {TextButtonProps} from \"../Button/TextButton\";\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\n\r\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\r\n label: string;\r\n icon?: React.ReactElement<any>;\r\n}\r\n\r\nexport interface MenuButton extends Omit<TextButtonProps, 'onClick' | 'children' | 'size'> {\r\n label: string;\r\n action: () => void;\r\n\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport interface MenuGroupFooter {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuGroupHeader {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuAccountInfo {\r\n firstName: string;\r\n lastName: string;\r\n email: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface ProfileMenu {\r\n label?: string;\r\n\r\n user: MenuAccountInfo;\r\n\r\n sections: MenuNavigationSection[];\r\n\r\n signOut?: MenuButton;\r\n}\r\n\r\nexport interface MenuIconSubMenuButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'submenu';\r\n icon: React.ReactNode;\r\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuIconButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'action';\r\n icon: React.ReactNode;\r\n action: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\r\n type: 'profile';\r\n action?: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSearchButton {\r\n type: 'search';\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSwitcherButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'id'\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'switcher';\r\n placement?: 'left' | 'right';\r\n action?: (button?: EventTarget) => boolean | void;\r\n}\r\n\r\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\r\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton | MenuSearchButton;\r\n\r\nexport interface MobileNavigationMenuProps {\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n\r\n header?: MenuGroupHeader;\r\n\r\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport interface DesktopNavigationMenuProps {\r\n buttons?: DesktopMenuButtonTypes[];\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n action?: MenuButton;\r\n reverseRightSideOrder?: boolean;\r\n}\r\n\r\n// @ts-ignore\r\nexport interface MenuNavigationGroup<T = MenuNavigationItemTypeDesktopGroup | MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\r\n label: string;\r\n note?: string;\r\n\r\n buttons?: MobileMenuButtonTypes[];\r\n header?: MenuGroupHeader;\r\n\r\n items: T[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport type MenuNavigationItem = {\r\n icon?: React.ReactNode;\r\n to: string;\r\n exact?: boolean;\r\n disabled?: boolean;\r\n external?: boolean;\r\n action?: (e: React.MouseEvent) => void;\r\n label: string;\r\n note?: string;\r\n pinned?: boolean;\r\n subItems?: MenuNavigationItem[];\r\n} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\r\n\r\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\r\n divider?: boolean;\r\n pinned?: boolean;\r\n label?: string;\r\n items: T[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\r\n type?: 'item';\r\n};\r\n\r\nexport type MenuNavigationItemTypeDesktopGroup = {\r\n id: string;\r\n label?: string;\r\n disabled?: boolean;\r\n pinned?: boolean;\r\n type?: 'desktopgroup';\r\n expanded?: boolean;\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\r\n type: 'group';\r\n icon?: React.ReactNode;\r\n pinned?: boolean;\r\n disabled?: boolean;\r\n};\r\n\r\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\r\n type: 'section';\r\n};\r\n\r\nexport type MenuNavigationCustomSubMenu = {\r\n type: 'custom';\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n custom: () => React.ReactNode;\r\n};\r\n"],"mappings":"","ignoreList":[]}
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import { HyperlinkProps } from '../HyperLink/HyperLink';
3
3
  import { IconButtonProps } from '../Button/Iconbutton';
4
4
  import { ProfileButtonProps } from '../ProfileButton/ProfileButton';
5
- import { ButtonProps } from "../Button/Button";
5
+ import { TextButtonProps } from "../Button/TextButton";
6
6
  import { TooltipProps } from "../Tooltips/TooltipTypes";
7
7
  export interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {
8
8
  label: string;
9
9
  icon?: React.ReactElement<any>;
10
10
  }
11
- export interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {
11
+ export interface MenuButton extends Omit<TextButtonProps, 'onClick' | 'children' | 'size'> {
12
12
  label: string;
13
13
  action: () => void;
14
14
  tooltip?: TooltipProps;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\r\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\r\nimport { IconButtonProps } from '../Button/Iconbutton';\r\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\r\nimport {ButtonProps} from \"../Button/Button\";\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\n\r\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\r\n label: string;\r\n icon?: React.ReactElement<any>;\r\n}\r\n\r\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\r\n label: string;\r\n action: () => void;\r\n\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport interface MenuGroupFooter {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuGroupHeader {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuAccountInfo {\r\n firstName: string;\r\n lastName: string;\r\n email: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface ProfileMenu {\r\n label?: string;\r\n\r\n user: MenuAccountInfo;\r\n\r\n sections: MenuNavigationSection[];\r\n\r\n signOut?: MenuButton;\r\n}\r\n\r\nexport interface MenuIconSubMenuButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'submenu';\r\n icon: React.ReactNode;\r\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuIconButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'action';\r\n icon: React.ReactNode;\r\n action: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\r\n type: 'profile';\r\n action?: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSearchButton {\r\n type: 'search';\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSwitcherButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'id'\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'switcher';\r\n placement?: 'left' | 'right';\r\n action?: (button?: EventTarget) => boolean | void;\r\n}\r\n\r\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\r\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton | MenuSearchButton;\r\n\r\nexport interface MobileNavigationMenuProps {\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n\r\n header?: MenuGroupHeader;\r\n\r\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport interface DesktopNavigationMenuProps {\r\n buttons?: DesktopMenuButtonTypes[];\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n action?: MenuButton;\r\n reverseRightSideOrder?: boolean;\r\n}\r\n\r\n// @ts-ignore\r\nexport interface MenuNavigationGroup<T = MenuNavigationItemTypeDesktopGroup | MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\r\n label: string;\r\n note?: string;\r\n\r\n buttons?: MobileMenuButtonTypes[];\r\n header?: MenuGroupHeader;\r\n\r\n items: T[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport type MenuNavigationItem = {\r\n icon?: React.ReactNode;\r\n to: string;\r\n exact?: boolean;\r\n disabled?: boolean;\r\n external?: boolean;\r\n action?: (e: React.MouseEvent) => void;\r\n label: string;\r\n note?: string;\r\n pinned?: boolean;\r\n subItems?: MenuNavigationItem[];\r\n} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\r\n\r\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\r\n divider?: boolean;\r\n pinned?: boolean;\r\n label?: string;\r\n items: T[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\r\n type?: 'item';\r\n};\r\n\r\nexport type MenuNavigationItemTypeDesktopGroup = {\r\n id: string;\r\n label?: string;\r\n disabled?: boolean;\r\n pinned?: boolean;\r\n type?: 'desktopgroup';\r\n expanded?: boolean;\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\r\n type: 'group';\r\n icon?: React.ReactNode;\r\n pinned?: boolean;\r\n disabled?: boolean;\r\n};\r\n\r\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\r\n type: 'section';\r\n};\r\n\r\nexport type MenuNavigationCustomSubMenu = {\r\n type: 'custom';\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n custom: () => React.ReactNode;\r\n};\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\r\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\r\nimport { IconButtonProps } from '../Button/Iconbutton';\r\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\r\nimport {TextButtonProps} from \"../Button/TextButton\";\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\n\r\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\r\n label: string;\r\n icon?: React.ReactElement<any>;\r\n}\r\n\r\nexport interface MenuButton extends Omit<TextButtonProps, 'onClick' | 'children' | 'size'> {\r\n label: string;\r\n action: () => void;\r\n\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport interface MenuGroupFooter {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuGroupHeader {\r\n header: string;\r\n note?: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface MenuAccountInfo {\r\n firstName: string;\r\n lastName: string;\r\n email: string;\r\n link?: MenuHyperLinkProps;\r\n}\r\n\r\nexport interface ProfileMenu {\r\n label?: string;\r\n\r\n user: MenuAccountInfo;\r\n\r\n sections: MenuNavigationSection[];\r\n\r\n signOut?: MenuButton;\r\n}\r\n\r\nexport interface MenuIconSubMenuButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'submenu';\r\n icon: React.ReactNode;\r\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuIconButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'action';\r\n icon: React.ReactNode;\r\n action: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\r\n type: 'profile';\r\n action?: (button?: EventTarget) => boolean | void;\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSearchButton {\r\n type: 'search';\r\n placement?: 'left' | 'right';\r\n}\r\n\r\nexport interface MenuSwitcherButton\r\n extends Omit<\r\n IconButtonProps,\r\n | 'id'\r\n | 'type'\r\n | 'action'\r\n | 'shape'\r\n | 'variant'\r\n | 'hideOnLowWidth'\r\n | 'flatEdge'\r\n | 'isInMobileMenu'\r\n | 'useTransparentBackground'\r\n | 'shouldNotInteract'\r\n | 'iconColor'\r\n | 'unsetIconSize'\r\n | 'borderRadius'\r\n | 'focusBackgroundColor'\r\n | 'children'\r\n | 'invertFocus'\r\n > {\r\n type: 'switcher';\r\n placement?: 'left' | 'right';\r\n action?: (button?: EventTarget) => boolean | void;\r\n}\r\n\r\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\r\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton | MenuSearchButton;\r\n\r\nexport interface MobileNavigationMenuProps {\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n\r\n header?: MenuGroupHeader;\r\n\r\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport interface DesktopNavigationMenuProps {\r\n buttons?: DesktopMenuButtonTypes[];\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n action?: MenuButton;\r\n reverseRightSideOrder?: boolean;\r\n}\r\n\r\n// @ts-ignore\r\nexport interface MenuNavigationGroup<T = MenuNavigationItemTypeDesktopGroup | MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\r\n label: string;\r\n note?: string;\r\n\r\n buttons?: MobileMenuButtonTypes[];\r\n header?: MenuGroupHeader;\r\n\r\n items: T[];\r\n\r\n footer?: MenuGroupFooter;\r\n action?: MenuButton;\r\n}\r\n\r\nexport type MenuNavigationItem = {\r\n icon?: React.ReactNode;\r\n to: string;\r\n exact?: boolean;\r\n disabled?: boolean;\r\n external?: boolean;\r\n action?: (e: React.MouseEvent) => void;\r\n label: string;\r\n note?: string;\r\n pinned?: boolean;\r\n subItems?: MenuNavigationItem[];\r\n} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\r\n\r\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\r\n divider?: boolean;\r\n pinned?: boolean;\r\n label?: string;\r\n items: T[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\r\n type?: 'item';\r\n};\r\n\r\nexport type MenuNavigationItemTypeDesktopGroup = {\r\n id: string;\r\n label?: string;\r\n disabled?: boolean;\r\n pinned?: boolean;\r\n type?: 'desktopgroup';\r\n expanded?: boolean;\r\n items: (MenuNavigationItemTypeItem | MenuNavigationItemTypeDesktopGroup)[];\r\n}\r\n\r\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\r\n type: 'group';\r\n icon?: React.ReactNode;\r\n pinned?: boolean;\r\n disabled?: boolean;\r\n};\r\n\r\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\r\n type: 'section';\r\n};\r\n\r\nexport type MenuNavigationCustomSubMenu = {\r\n type: 'custom';\r\n label?: string;\r\n buttons?: MobileMenuButtonTypes[];\r\n custom: () => React.ReactNode;\r\n};\r\n"],"mappings":"","ignoreList":[]}
@@ -330,7 +330,7 @@ const ModalContent = props => {
330
330
  action
331
331
  } = _ref,
332
332
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded4);
333
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, _objectSpread(_objectSpread({}, rest), {}, {
333
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.TextButton, _objectSpread(_objectSpread({}, rest), {}, {
334
334
  size: props.size,
335
335
  onClick: action,
336
336
  variant: variant ?? 'secondary',
@@ -451,7 +451,7 @@ const ModalContent = props => {
451
451
  text
452
452
  } = item,
453
453
  rest = (0, _objectWithoutProperties2.default)(item, _excluded6);
454
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, _objectSpread(_objectSpread({}, rest), {}, {
454
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.TextButton, _objectSpread(_objectSpread({}, rest), {}, {
455
455
  onClick: action,
456
456
  size: props.size,
457
457
  onKeyDown: a => (a.key === 'Enter' || a.key === ' ') && action(a),
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContent.cjs","names":["_react","_interopRequireDefault","require","_types","_index","_styledComponents","_interopRequireWildcard","_styles","_Tooltips","_Button","_icons","_HyperLink","_Dropdown","_Toggles","_Image","_jsxRuntime","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","HeaderText","styled","div","props","COLORS","generateToken","componentType","defaultVariant","theme","HeaderTitle","ComponentMStyling","ComponentTextStyle","Bold","HeaderActions","HeaderWithImageActions","HeaderWithImage","ModalContentHeaderComponent","exports","TooltipContainer","ModalContentBodyComponent","$scrollable","scrollBarStyling","Size","Small","ModalContentFooterLeftContainerComponent","ModalContentFooterLeftNoteComponent","ComponentXXSStyling","ModalContentFooterLeftLinkComponent","ComponentSStyling","FooterRightContainer","ModalContentFooterComponent","Wrapper","ComponentLStyling","ComponentXSStyling","ComponentXLStyling","ModalContent","useTheme","tooltip","jsx","TooltipWrapper","delay","size","XSmall","align","position","withArrow","label","children","IconButton","variant","shape","style","cursor","action","SystemIcons","Help","color","headerActions","map","index","icon","rest","_objectWithoutProperties2","id","DropdownButton","type","ToggleButton","getLeftActionIconElement","leftFooterAction","React","cloneElement","Large","actionType","_ref","text","Button","onClick","_ref2","jsxs","HyperLink","preventDefault","ModalContainer","showModal","isModalOpen","closeModal","closeAction","className","Medium","image","ImageWithFallbacks","onBack","ArrowLineLeft","hideCloseButton","dataTestId","Close","title","note","Note","scrollableBody","undefined","footerActions","item","onKeyDown","key","propTypes","_propTypes","bool","isRequired","func","string","array","zIndex","number","node","_default"],"sources":["../../src/Modals/ModalContent.tsx"],"sourcesContent":["import React from 'react';\r\nimport {Size} from '../types';\r\nimport {\r\n ButtonAction,\r\n ModalHeaderIconButton,\r\n LeftFooterAction,\r\n LeftFooterButton,\r\n LeftFooterHyperlink,\r\n ModalHeaderButtons\r\n} from './ModalTypes';\r\nimport {ModalContainer} from './index';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentLStyling,\r\n ComponentMStyling, ComponentSStyling,\r\n ComponentTextStyle, ComponentXLStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling, Note,\r\n scrollBarStyling\r\n} from '../styles';\r\nimport {TooltipContainer, TooltipWrapper} from '../Tooltips';\r\nimport {Button, IconButton} from '../Button';\r\nimport {SystemIcons} from '../icons';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {ImageWithFallbacksProps} from \"../Image/ImageWithFallbacks\";\r\nimport {DropdownButton} from \"../Dropdown\";\r\nimport {ToggleButton} from \"../Toggles\";\r\nimport {ImageWithFallbacks} from \"../Image\";\r\n\r\nconst HeaderText = styled.div`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n color: ${props => COLORS.generateToken({componentType:'text', defaultVariant:'default'}, props.theme)};\r\n\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n &:not(:first-child) {\r\n padding-left: 0 !important;\r\n }\r\n\r\n`;\r\nconst HeaderTitle = styled.div`\r\n ${props => ComponentMStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType:'text', defaultVariant:'default' }, props.theme))}\r\n`;\r\n\r\nconst HeaderActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`;\r\n\r\nconst HeaderWithImageActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n position: absolute;\r\n\r\n button:only-child {\r\n margin-left: auto;\r\n }\r\n\r\n top: 4px;\r\n left: 4px;\r\n right: 4px;\r\n\r\n .medium & {\r\n top: 12px;\r\n left: 12px;\r\n right: 12px;\r\n }\r\n\r\n .large & {\r\n top: 20px;\r\n left: 20px;\r\n right: 20px;\r\n }\r\n`;\r\n\r\nconst HeaderWithImage = styled.div`\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n img {\r\n object-fit: cover;\r\n width: 100%;\r\n height: 160px;\r\n border-top-left-radius: 8px;\r\n border-top-right-radius: 8px;\r\n }\r\n\r\n .medium & {\r\n img {\r\n height: 200px;\r\n }\r\n }\r\n\r\n .large & {\r\n img {\r\n height: 240px;\r\n }\r\n }\r\n`;\r\n\r\nexport const ModalContentHeaderComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px;\r\n\r\n ${TooltipContainer} {\r\n height: max-content;\r\n }\r\n`;\r\n\r\nexport const ModalContentBodyComponent = styled.div<{$scrollable?: boolean}>`\r\n margin-right: 8px;\r\n padding: 0 8px 0 16px;\r\n overflow: ${props => props.$scrollable ? 'auto' : 'visible'};\r\n\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nconst ModalContentFooterLeftContainerComponent = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst ModalContentFooterLeftNoteComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.generateToken({componentType:'text', defaultVariant: 'subtle'}, props.theme))}\r\n`;\r\n\r\nconst ModalContentFooterLeftLinkComponent = styled.div`\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType: 'text-link', defaultVariant: 'default' }, props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n`;\r\n\r\nconst FooterRightContainer = styled.div`\r\n gap: 8px;\r\n margin-left: auto;\r\n`\r\n\r\nexport const ModalContentFooterComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 8px 16px;\r\n`;\r\n\r\n\r\nconst Wrapper = styled.div` \r\n display: flex;\r\n flex-direction: column;\r\n width: max-content;\r\n\r\n max-height: calc(100vh - 32px);\r\n max-width: calc(100vw - 32px);\r\n\r\n &.medium {\r\n max-height: calc(100vh - 64px);\r\n max-width: calc(100vw - 64px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 12px 12px 4px 12px;\r\n\r\n ${HeaderText} {\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 16px 0 24px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 12px 24px 20px 24px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 6px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 6px;\r\n }\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 8px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n max-height: calc(100vh - 112px);\r\n max-width: calc(100vw - 112px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 20px 20px 4px 20px;\r\n\r\n ${HeaderText} {\r\n padding: 10px 0 10px 12px;\r\n gap: 8px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentXLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 24px 0 32px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 16px 32px 32px 32px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 8px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 8px;\r\n }\r\n\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 16px;\r\n }\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport interface ModalContentProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n isModalOpen: boolean;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n onBack?: () => void;\r\n title: string;\r\n note?: string;\r\n image?: ImageWithFallbacksProps;\r\n headerActions?: ModalHeaderButtons[];\r\n footerActions?: ButtonAction[];\r\n scrollableBody?: boolean;\r\n leftFooterAction?: LeftFooterAction;\r\n tooltip?: string;\r\n zIndex?: number;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst ModalContent: React.FC<ModalContentProps> = (props) => {\r\n const theme = useTheme();\r\n\r\n const tooltip = () =>\r\n !!props.tooltip &&\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"bottom\" withArrow={false}\r\n label={props.tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" style={{cursor: 'help'}} action={() => {\r\n }}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>\r\n </TooltipWrapper>;\r\n\r\n const headerActions = () => props.headerActions?.map((action, index) => {\r\n switch (action.componentType) {\r\n case 'icon': {\r\n const {icon, componentType, ...rest} = action;\r\n return <IconButton key={action.id || index}\r\n {...rest}>\r\n {icon}\r\n </IconButton>\r\n }\r\n case 'dropdown': {\r\n const {componentType, ...rest} = action;\r\n return <DropdownButton type={'icon'} size={props.size} {...rest}/>\r\n }\r\n case 'toggle': {\r\n const {componentType, ...rest} = action;\r\n return <ToggleButton {...rest}/>\r\n }\r\n }\r\n }\r\n );\r\n\r\n const getLeftActionIconElement = () =>\r\n !!props.leftFooterAction?.icon &&\r\n React.cloneElement(props.leftFooterAction?.icon as React.ReactElement<any>, {\r\n size:\r\n props.size === Size.Small\r\n ? '20px'\r\n : props.size === Size.Large\r\n ? '28px'\r\n : '24px'\r\n });\r\n\r\n const leftFooterAction = () => {\r\n if (!props.leftFooterAction) return null;\r\n\r\n switch (props.leftFooterAction.actionType) {\r\n case 'button': {\r\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterButton;\r\n return (\r\n <Button{...rest}\r\n size={props.size}\r\n onClick={action}\r\n variant={variant ?? 'secondary'}>\r\n {text}\r\n </Button>\r\n );\r\n }\r\n case 'hyperlink': {\r\n const {text, variant, action, actionType, ...rest} = props.leftFooterAction as LeftFooterHyperlink;\r\n return (\r\n <ModalContentFooterLeftLinkComponent>\r\n <HyperLink {...rest}\r\n variant={variant ?? 'default'}\r\n onClick={(e) => {\r\n if (action) {\r\n e.preventDefault();\r\n action(e);\r\n }\r\n }}>\r\n {text}\r\n {getLeftActionIconElement()}\r\n </HyperLink>\r\n </ModalContentFooterLeftLinkComponent>\r\n );\r\n\r\n }\r\n case 'note': {\r\n const {text} = props.leftFooterAction;\r\n return (\r\n <ModalContentFooterLeftNoteComponent>\r\n {getLeftActionIconElement()}\r\n <span>{text}</span>\r\n </ModalContentFooterLeftNoteComponent>\r\n );\r\n }\r\n }\r\n };\r\n\r\n\r\n return (\r\n <ModalContainer showModal={props.isModalOpen} closeModal={props.closeAction}>\r\n <Wrapper className={props.size ?? Size.Medium}>\r\n {\r\n props.image &&\r\n <HeaderWithImage>\r\n <ImageWithFallbacks {...props.image}/>\r\n <HeaderWithImageActions>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n\r\n }\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderWithImageActions>\r\n\r\n <ModalContentHeaderComponent>\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n </HeaderWithImage>\r\n }\r\n {\r\n !props.image &&\r\n <ModalContentHeaderComponent>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n }\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n }\r\n <ModalContentBodyComponent $scrollable={props.scrollableBody == undefined ? true : props.scrollableBody}>\r\n {props.children}\r\n </ModalContentBodyComponent>\r\n <ModalContentFooterComponent>\r\n <ModalContentFooterLeftContainerComponent>\r\n {leftFooterAction()}\r\n </ModalContentFooterLeftContainerComponent>\r\n <FooterRightContainer>\r\n {props.footerActions?.map((item, index) => {\r\n const {action, text, ...rest} = item;\r\n return <Button key={rest.id || index}\r\n {...rest}\r\n onClick={action}\r\n size={props.size}\r\n onKeyDown={a => (a.key === 'Enter' || a.key === ' ') && action!(a)}>\r\n {text}\r\n </Button>\r\n }\r\n )}\r\n </FooterRightContainer>\r\n </ModalContentFooterComponent>\r\n </Wrapper>\r\n </ModalContainer>\r\n );\r\n};\r\n\r\nexport default ModalContent;\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,s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AAAtI,OAAA,CAAA2I,KAAA;EACbV,aAAa,EAAAK,UAAA,CAAAtI,OAAA,CAAA2I,KAAA;EACbZ,cAAc,EAAAO,UAAA,CAAAtI,OAAA,CAAAuI,IAAA;EAEdrE,OAAO,EAAAoE,UAAA,CAAAtI,OAAA,CAAA0I,MAAA;EACPE,MAAM,EAAAN,UAAA,CAAAtI,OAAA,CAAA6I,MAAA;EACNjE,QAAQ,EAAA0D,UAAA,CAAAtI,OAAA,CAAA8I;AAAA;AAAA,IAAAC,QAAA,GAAAjG,OAAA,CAAA9C,OAAA,GAqLKgE,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"ModalContent.cjs","names":["_react","_interopRequireDefault","require","_types","_index","_styledComponents","_interopRequireWildcard","_styles","_Tooltips","_Button","_icons","_HyperLink","_Dropdown","_Toggles","_Image","_jsxRuntime","_excluded","_excluded2","_excluded3","_excluded4","_excluded5","_excluded6","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","HeaderText","styled","div","props","COLORS","generateToken","componentType","defaultVariant","theme","HeaderTitle","ComponentMStyling","ComponentTextStyle","Bold","HeaderActions","HeaderWithImageActions","HeaderWithImage","ModalContentHeaderComponent","exports","TooltipContainer","ModalContentBodyComponent","$scrollable","scrollBarStyling","Size","Small","ModalContentFooterLeftContainerComponent","ModalContentFooterLeftNoteComponent","ComponentXXSStyling","ModalContentFooterLeftLinkComponent","ComponentSStyling","FooterRightContainer","ModalContentFooterComponent","Wrapper","ComponentLStyling","ComponentXSStyling","ComponentXLStyling","ModalContent","useTheme","tooltip","jsx","TooltipWrapper","delay","size","XSmall","align","position","withArrow","label","children","IconButton","variant","shape","style","cursor","action","SystemIcons","Help","color","headerActions","map","index","icon","rest","_objectWithoutProperties2","id","DropdownButton","type","ToggleButton","getLeftActionIconElement","leftFooterAction","React","cloneElement","Large","actionType","_ref","text","TextButton","onClick","_ref2","jsxs","HyperLink","preventDefault","ModalContainer","showModal","isModalOpen","closeModal","closeAction","className","Medium","image","ImageWithFallbacks","onBack","ArrowLineLeft","hideCloseButton","dataTestId","Close","title","note","Note","scrollableBody","undefined","footerActions","item","onKeyDown","key","propTypes","_propTypes","bool","isRequired","func","string","array","zIndex","number","node","_default"],"sources":["../../src/Modals/ModalContent.tsx"],"sourcesContent":["import React from 'react';\r\nimport {Size} from '../types';\r\nimport {\r\n ButtonAction,\r\n ModalHeaderIconButton,\r\n LeftFooterAction,\r\n LeftFooterButton,\r\n LeftFooterHyperlink,\r\n ModalHeaderButtons\r\n} from './ModalTypes';\r\nimport {ModalContainer} from './index';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentLStyling,\r\n ComponentMStyling, ComponentSStyling,\r\n ComponentTextStyle, ComponentXLStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling, Note,\r\n scrollBarStyling\r\n} from '../styles';\r\nimport {TooltipContainer, TooltipWrapper} from '../Tooltips';\r\nimport {TextButton, IconButton} from '../Button';\r\nimport {SystemIcons} from '../icons';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {ImageWithFallbacksProps} from \"../Image/ImageWithFallbacks\";\r\nimport {DropdownButton} from \"../Dropdown\";\r\nimport {ToggleButton} from \"../Toggles\";\r\nimport {ImageWithFallbacks} from \"../Image\";\r\n\r\nconst HeaderText = styled.div`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n color: ${props => COLORS.generateToken({componentType:'text', defaultVariant:'default'}, props.theme)};\r\n\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n &:not(:first-child) {\r\n padding-left: 0 !important;\r\n }\r\n\r\n`;\r\nconst HeaderTitle = styled.div`\r\n ${props => ComponentMStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType:'text', defaultVariant:'default' }, props.theme))}\r\n`;\r\n\r\nconst HeaderActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`;\r\n\r\nconst HeaderWithImageActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n position: absolute;\r\n\r\n button:only-child {\r\n margin-left: auto;\r\n }\r\n\r\n top: 4px;\r\n left: 4px;\r\n right: 4px;\r\n\r\n .medium & {\r\n top: 12px;\r\n left: 12px;\r\n right: 12px;\r\n }\r\n\r\n .large & {\r\n top: 20px;\r\n left: 20px;\r\n right: 20px;\r\n }\r\n`;\r\n\r\nconst HeaderWithImage = styled.div`\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n img {\r\n object-fit: cover;\r\n width: 100%;\r\n height: 160px;\r\n border-top-left-radius: 8px;\r\n border-top-right-radius: 8px;\r\n }\r\n\r\n .medium & {\r\n img {\r\n height: 200px;\r\n }\r\n }\r\n\r\n .large & {\r\n img {\r\n height: 240px;\r\n }\r\n }\r\n`;\r\n\r\nexport const ModalContentHeaderComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px;\r\n\r\n ${TooltipContainer} {\r\n height: max-content;\r\n }\r\n`;\r\n\r\nexport const ModalContentBodyComponent = styled.div<{$scrollable?: boolean}>`\r\n margin-right: 8px;\r\n padding: 0 8px 0 16px;\r\n overflow: ${props => props.$scrollable ? 'auto' : 'visible'};\r\n\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nconst ModalContentFooterLeftContainerComponent = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst ModalContentFooterLeftNoteComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.generateToken({componentType:'text', defaultVariant: 'subtle'}, props.theme))}\r\n`;\r\n\r\nconst ModalContentFooterLeftLinkComponent = styled.div`\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType: 'text-link', defaultVariant: 'default' }, props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n`;\r\n\r\nconst FooterRightContainer = styled.div`\r\n gap: 8px;\r\n margin-left: auto;\r\n`\r\n\r\nexport const ModalContentFooterComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 8px 16px;\r\n`;\r\n\r\n\r\nconst Wrapper = styled.div` \r\n display: flex;\r\n flex-direction: column;\r\n width: max-content;\r\n\r\n max-height: calc(100vh - 32px);\r\n max-width: calc(100vw - 32px);\r\n\r\n &.medium {\r\n max-height: calc(100vh - 64px);\r\n max-width: calc(100vw - 64px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 12px 12px 4px 12px;\r\n\r\n ${HeaderText} {\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 16px 0 24px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 12px 24px 20px 24px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 6px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 6px;\r\n }\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 8px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n max-height: calc(100vh - 112px);\r\n max-width: calc(100vw - 112px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 20px 20px 4px 20px;\r\n\r\n ${HeaderText} {\r\n padding: 10px 0 10px 12px;\r\n gap: 8px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentXLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 24px 0 32px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 16px 32px 32px 32px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 8px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 8px;\r\n }\r\n\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 16px;\r\n }\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport interface ModalContentProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n isModalOpen: boolean;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n onBack?: () => void;\r\n title: string;\r\n note?: string;\r\n image?: ImageWithFallbacksProps;\r\n headerActions?: ModalHeaderButtons[];\r\n footerActions?: ButtonAction[];\r\n scrollableBody?: boolean;\r\n leftFooterAction?: LeftFooterAction;\r\n tooltip?: string;\r\n zIndex?: number;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst ModalContent: React.FC<ModalContentProps> = (props) => {\r\n const theme = useTheme();\r\n\r\n const tooltip = () =>\r\n !!props.tooltip &&\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"bottom\" withArrow={false}\r\n label={props.tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" style={{cursor: 'help'}} action={() => {\r\n }}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>\r\n </TooltipWrapper>;\r\n\r\n const headerActions = () => props.headerActions?.map((action, index) => {\r\n switch (action.componentType) {\r\n case 'icon': {\r\n const {icon, componentType, ...rest} = action;\r\n return <IconButton key={action.id || index}\r\n {...rest}>\r\n {icon}\r\n </IconButton>\r\n }\r\n case 'dropdown': {\r\n const {componentType, ...rest} = action;\r\n return <DropdownButton type={'icon'} size={props.size} {...rest}/>\r\n }\r\n case 'toggle': {\r\n const {componentType, ...rest} = action;\r\n return <ToggleButton {...rest}/>\r\n }\r\n }\r\n }\r\n );\r\n\r\n const getLeftActionIconElement = () =>\r\n !!props.leftFooterAction?.icon &&\r\n React.cloneElement(props.leftFooterAction?.icon as React.ReactElement<any>, {\r\n size:\r\n props.size === Size.Small\r\n ? '20px'\r\n : props.size === Size.Large\r\n ? '28px'\r\n : '24px'\r\n });\r\n\r\n const leftFooterAction = () => {\r\n if (!props.leftFooterAction) return null;\r\n\r\n switch (props.leftFooterAction.actionType) {\r\n case 'button': {\r\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterButton;\r\n return (\r\n <TextButton{...rest}\r\n size={props.size}\r\n onClick={action}\r\n variant={variant ?? 'secondary'}>\r\n {text}\r\n </TextButton>\r\n );\r\n }\r\n case 'hyperlink': {\r\n const {text, variant, action, actionType, ...rest} = props.leftFooterAction as LeftFooterHyperlink;\r\n return (\r\n <ModalContentFooterLeftLinkComponent>\r\n <HyperLink {...rest}\r\n variant={variant ?? 'default'}\r\n onClick={(e) => {\r\n if (action) {\r\n e.preventDefault();\r\n action(e);\r\n }\r\n }}>\r\n {text}\r\n {getLeftActionIconElement()}\r\n </HyperLink>\r\n </ModalContentFooterLeftLinkComponent>\r\n );\r\n\r\n }\r\n case 'note': {\r\n const {text} = props.leftFooterAction;\r\n return (\r\n <ModalContentFooterLeftNoteComponent>\r\n {getLeftActionIconElement()}\r\n <span>{text}</span>\r\n </ModalContentFooterLeftNoteComponent>\r\n );\r\n }\r\n }\r\n };\r\n\r\n\r\n return (\r\n <ModalContainer showModal={props.isModalOpen} closeModal={props.closeAction}>\r\n <Wrapper className={props.size ?? Size.Medium}>\r\n {\r\n props.image &&\r\n <HeaderWithImage>\r\n <ImageWithFallbacks {...props.image}/>\r\n <HeaderWithImageActions>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n\r\n }\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderWithImageActions>\r\n\r\n <ModalContentHeaderComponent>\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n </HeaderWithImage>\r\n }\r\n {\r\n !props.image &&\r\n <ModalContentHeaderComponent>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n }\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n }\r\n <ModalContentBodyComponent $scrollable={props.scrollableBody == undefined ? true : props.scrollableBody}>\r\n {props.children}\r\n </ModalContentBodyComponent>\r\n <ModalContentFooterComponent>\r\n <ModalContentFooterLeftContainerComponent>\r\n {leftFooterAction()}\r\n </ModalContentFooterLeftContainerComponent>\r\n <FooterRightContainer>\r\n {props.footerActions?.map((item, index) => {\r\n const {action, text, ...rest} = item;\r\n return <TextButton key={rest.id || index}\r\n {...rest}\r\n onClick={action}\r\n size={props.size}\r\n onKeyDown={a => (a.key === 'Enter' || a.key === ' ') && action!(a)}>\r\n {text}\r\n </TextButton>\r\n }\r\n )}\r\n </FooterRightContainer>\r\n </ModalContentFooterComponent>\r\n </Wrapper>\r\n </ModalContainer>\r\n );\r\n};\r\n\r\nexport default ModalContent;\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AASA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AAEA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AAA4C,IAAAa,WAAA,GAAAb,OAAA;AAAA,MAAAc,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAjB,wBAAAiB,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAA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AAsB,UAAA,CAAAtI,OAAA,CAAAuI,IAAA,CAAAC,UAAA;EACXtB,WAAW,EAAAoB,UAAA,CAAAtI,OAAA,CAAAyI,IAAA,CAAAD,UAAA;EACXf,eAAe,EAAAa,UAAA,CAAAtI,OAAA,CAAAuI,IAAA;EACfhB,MAAM,EAAAe,UAAA,CAAAtI,OAAA,CAAAyI,IAAA;EACNb,KAAK,EAAAU,UAAA,CAAAtI,OAAA,CAAA0I,MAAA,CAAAF,UAAA;EACLX,IAAI,EAAAS,UAAA,CAAAtI,OAAA,CAAA0I,MAAA;EAEJpD,aAAa,EAAAgD,UAAA,CAAAtI,OAAA,CAAA2I,KAAA;EACbV,aAAa,EAAAK,UAAA,CAAAtI,OAAA,CAAA2I,KAAA;EACbZ,cAAc,EAAAO,UAAA,CAAAtI,OAAA,CAAAuI,IAAA;EAEdrE,OAAO,EAAAoE,UAAA,CAAAtI,OAAA,CAAA0I,MAAA;EACPE,MAAM,EAAAN,UAAA,CAAAtI,OAAA,CAAA6I,MAAA;EACNjE,QAAQ,EAAA0D,UAAA,CAAAtI,OAAA,CAAA8I;AAAA;AAAA,IAAAC,QAAA,GAAAjG,OAAA,CAAA9C,OAAA,GAqLKgE,YAAY","ignoreList":[]}
@@ -15,7 +15,7 @@ import { ModalContainer } from './index';
15
15
  import styled, { useTheme } from 'styled-components';
16
16
  import { COLORS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXLStyling, ComponentXSStyling, ComponentXXSStyling, Note, scrollBarStyling } from '../styles';
17
17
  import { TooltipContainer, TooltipWrapper } from '../Tooltips';
18
- import { Button, IconButton } from '../Button';
18
+ import { TextButton, IconButton } from '../Button';
19
19
  import { SystemIcons } from '../icons';
20
20
  import { HyperLink } from '../HyperLink';
21
21
  import { DropdownButton } from "../Dropdown";
@@ -321,7 +321,7 @@ const ModalContent = props => {
321
321
  action
322
322
  } = _ref,
323
323
  rest = _objectWithoutProperties(_ref, _excluded4);
324
- return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, rest), {}, {
324
+ return /*#__PURE__*/_jsx(TextButton, _objectSpread(_objectSpread({}, rest), {}, {
325
325
  size: props.size,
326
326
  onClick: action,
327
327
  variant: variant ?? 'secondary',
@@ -442,7 +442,7 @@ const ModalContent = props => {
442
442
  text
443
443
  } = item,
444
444
  rest = _objectWithoutProperties(item, _excluded6);
445
- return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, rest), {}, {
445
+ return /*#__PURE__*/_jsx(TextButton, _objectSpread(_objectSpread({}, rest), {}, {
446
446
  onClick: action,
447
447
  size: props.size,
448
448
  onKeyDown: a => (a.key === 'Enter' || a.key === ' ') && action(a),
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContent.js","names":["React","Size","ModalContainer","styled","useTheme","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXLStyling","ComponentXSStyling","ComponentXXSStyling","Note","scrollBarStyling","TooltipContainer","TooltipWrapper","Button","IconButton","SystemIcons","HyperLink","DropdownButton","ToggleButton","ImageWithFallbacks","jsx","_jsx","jsxs","_jsxs","HeaderText","div","props","generateToken","componentType","defaultVariant","theme","HeaderTitle","Bold","HeaderActions","HeaderWithImageActions","HeaderWithImage","ModalContentHeaderComponent","ModalContentBodyComponent","$scrollable","Small","ModalContentFooterLeftContainerComponent","ModalContentFooterLeftNoteComponent","ModalContentFooterLeftLinkComponent","FooterRightContainer","ModalContentFooterComponent","Wrapper","ModalContent","tooltip","delay","size","XSmall","align","position","withArrow","label","children","variant","shape","style","cursor","action","Help","color","headerActions","map","index","icon","rest","_objectWithoutProperties","_excluded","_objectSpread","id","_excluded2","type","_excluded3","getLeftActionIconElement","leftFooterAction","cloneElement","Large","actionType","_ref","text","_excluded4","onClick","_ref2","_excluded5","e","preventDefault","showModal","isModalOpen","closeModal","closeAction","className","Medium","image","onBack","ArrowLineLeft","hideCloseButton","dataTestId","Close","title","note","scrollableBody","undefined","footerActions","item","_excluded6","onKeyDown","a","key","propTypes","_pt","bool","isRequired","func","string","array","zIndex","number","node"],"sources":["../../src/Modals/ModalContent.tsx"],"sourcesContent":["import React from 'react';\r\nimport {Size} from '../types';\r\nimport {\r\n ButtonAction,\r\n ModalHeaderIconButton,\r\n LeftFooterAction,\r\n LeftFooterButton,\r\n LeftFooterHyperlink,\r\n ModalHeaderButtons\r\n} from './ModalTypes';\r\nimport {ModalContainer} from './index';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentLStyling,\r\n ComponentMStyling, ComponentSStyling,\r\n ComponentTextStyle, ComponentXLStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling, Note,\r\n scrollBarStyling\r\n} from '../styles';\r\nimport {TooltipContainer, TooltipWrapper} from '../Tooltips';\r\nimport {Button, IconButton} from '../Button';\r\nimport {SystemIcons} from '../icons';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {ImageWithFallbacksProps} from \"../Image/ImageWithFallbacks\";\r\nimport {DropdownButton} from \"../Dropdown\";\r\nimport {ToggleButton} from \"../Toggles\";\r\nimport {ImageWithFallbacks} from \"../Image\";\r\n\r\nconst HeaderText = styled.div`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n color: ${props => COLORS.generateToken({componentType:'text', defaultVariant:'default'}, props.theme)};\r\n\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n &:not(:first-child) {\r\n padding-left: 0 !important;\r\n }\r\n\r\n`;\r\nconst HeaderTitle = styled.div`\r\n ${props => ComponentMStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType:'text', defaultVariant:'default' }, props.theme))}\r\n`;\r\n\r\nconst HeaderActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`;\r\n\r\nconst HeaderWithImageActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n position: absolute;\r\n\r\n button:only-child {\r\n margin-left: auto;\r\n }\r\n\r\n top: 4px;\r\n left: 4px;\r\n right: 4px;\r\n\r\n .medium & {\r\n top: 12px;\r\n left: 12px;\r\n right: 12px;\r\n }\r\n\r\n .large & {\r\n top: 20px;\r\n left: 20px;\r\n right: 20px;\r\n }\r\n`;\r\n\r\nconst HeaderWithImage = styled.div`\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n img {\r\n object-fit: cover;\r\n width: 100%;\r\n height: 160px;\r\n border-top-left-radius: 8px;\r\n border-top-right-radius: 8px;\r\n }\r\n\r\n .medium & {\r\n img {\r\n height: 200px;\r\n }\r\n }\r\n\r\n .large & {\r\n img {\r\n height: 240px;\r\n }\r\n }\r\n`;\r\n\r\nexport const ModalContentHeaderComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px;\r\n\r\n ${TooltipContainer} {\r\n height: max-content;\r\n }\r\n`;\r\n\r\nexport const ModalContentBodyComponent = styled.div<{$scrollable?: boolean}>`\r\n margin-right: 8px;\r\n padding: 0 8px 0 16px;\r\n overflow: ${props => props.$scrollable ? 'auto' : 'visible'};\r\n\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nconst ModalContentFooterLeftContainerComponent = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst ModalContentFooterLeftNoteComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.generateToken({componentType:'text', defaultVariant: 'subtle'}, props.theme))}\r\n`;\r\n\r\nconst ModalContentFooterLeftLinkComponent = styled.div`\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType: 'text-link', defaultVariant: 'default' }, props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n`;\r\n\r\nconst FooterRightContainer = styled.div`\r\n gap: 8px;\r\n margin-left: auto;\r\n`\r\n\r\nexport const ModalContentFooterComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 8px 16px;\r\n`;\r\n\r\n\r\nconst Wrapper = styled.div` \r\n display: flex;\r\n flex-direction: column;\r\n width: max-content;\r\n\r\n max-height: calc(100vh - 32px);\r\n max-width: calc(100vw - 32px);\r\n\r\n &.medium {\r\n max-height: calc(100vh - 64px);\r\n max-width: calc(100vw - 64px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 12px 12px 4px 12px;\r\n\r\n ${HeaderText} {\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 16px 0 24px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 12px 24px 20px 24px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 6px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 6px;\r\n }\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 8px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n max-height: calc(100vh - 112px);\r\n max-width: calc(100vw - 112px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 20px 20px 4px 20px;\r\n\r\n ${HeaderText} {\r\n padding: 10px 0 10px 12px;\r\n gap: 8px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentXLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 24px 0 32px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 16px 32px 32px 32px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 8px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 8px;\r\n }\r\n\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 16px;\r\n }\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport interface ModalContentProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n isModalOpen: boolean;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n onBack?: () => void;\r\n title: string;\r\n note?: string;\r\n image?: ImageWithFallbacksProps;\r\n headerActions?: ModalHeaderButtons[];\r\n footerActions?: ButtonAction[];\r\n scrollableBody?: boolean;\r\n leftFooterAction?: LeftFooterAction;\r\n tooltip?: string;\r\n zIndex?: number;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst ModalContent: React.FC<ModalContentProps> = (props) => {\r\n const theme = useTheme();\r\n\r\n const tooltip = () =>\r\n !!props.tooltip &&\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"bottom\" withArrow={false}\r\n label={props.tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" style={{cursor: 'help'}} action={() => {\r\n }}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>\r\n </TooltipWrapper>;\r\n\r\n const headerActions = () => props.headerActions?.map((action, index) => {\r\n switch (action.componentType) {\r\n case 'icon': {\r\n const {icon, componentType, ...rest} = action;\r\n return <IconButton key={action.id || index}\r\n {...rest}>\r\n {icon}\r\n </IconButton>\r\n }\r\n case 'dropdown': {\r\n const {componentType, ...rest} = action;\r\n return <DropdownButton type={'icon'} size={props.size} {...rest}/>\r\n }\r\n case 'toggle': {\r\n const {componentType, ...rest} = action;\r\n return <ToggleButton {...rest}/>\r\n }\r\n }\r\n }\r\n );\r\n\r\n const getLeftActionIconElement = () =>\r\n !!props.leftFooterAction?.icon &&\r\n React.cloneElement(props.leftFooterAction?.icon as React.ReactElement<any>, {\r\n size:\r\n props.size === Size.Small\r\n ? '20px'\r\n : props.size === Size.Large\r\n ? '28px'\r\n : '24px'\r\n });\r\n\r\n const leftFooterAction = () => {\r\n if (!props.leftFooterAction) return null;\r\n\r\n switch (props.leftFooterAction.actionType) {\r\n case 'button': {\r\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterButton;\r\n return (\r\n <Button{...rest}\r\n size={props.size}\r\n onClick={action}\r\n variant={variant ?? 'secondary'}>\r\n {text}\r\n </Button>\r\n );\r\n }\r\n case 'hyperlink': {\r\n const {text, variant, action, actionType, ...rest} = props.leftFooterAction as LeftFooterHyperlink;\r\n return (\r\n <ModalContentFooterLeftLinkComponent>\r\n <HyperLink {...rest}\r\n variant={variant ?? 'default'}\r\n onClick={(e) => {\r\n if (action) {\r\n e.preventDefault();\r\n action(e);\r\n }\r\n }}>\r\n {text}\r\n {getLeftActionIconElement()}\r\n </HyperLink>\r\n </ModalContentFooterLeftLinkComponent>\r\n );\r\n\r\n }\r\n case 'note': {\r\n const {text} = props.leftFooterAction;\r\n return (\r\n <ModalContentFooterLeftNoteComponent>\r\n {getLeftActionIconElement()}\r\n <span>{text}</span>\r\n </ModalContentFooterLeftNoteComponent>\r\n );\r\n }\r\n }\r\n };\r\n\r\n\r\n return (\r\n <ModalContainer showModal={props.isModalOpen} closeModal={props.closeAction}>\r\n <Wrapper className={props.size ?? Size.Medium}>\r\n {\r\n props.image &&\r\n <HeaderWithImage>\r\n <ImageWithFallbacks {...props.image}/>\r\n <HeaderWithImageActions>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n\r\n }\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderWithImageActions>\r\n\r\n <ModalContentHeaderComponent>\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n </HeaderWithImage>\r\n }\r\n {\r\n !props.image &&\r\n <ModalContentHeaderComponent>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n }\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n }\r\n <ModalContentBodyComponent $scrollable={props.scrollableBody == undefined ? true : props.scrollableBody}>\r\n {props.children}\r\n </ModalContentBodyComponent>\r\n <ModalContentFooterComponent>\r\n <ModalContentFooterLeftContainerComponent>\r\n {leftFooterAction()}\r\n </ModalContentFooterLeftContainerComponent>\r\n <FooterRightContainer>\r\n {props.footerActions?.map((item, index) => {\r\n const {action, text, ...rest} = item;\r\n return <Button key={rest.id || index}\r\n {...rest}\r\n onClick={action}\r\n size={props.size}\r\n onKeyDown={a => (a.key === 'Enter' || a.key === ' ') && action!(a)}>\r\n {text}\r\n </Button>\r\n }\r\n )}\r\n </FooterRightContainer>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AC;IAAA,CACvB;EAAC,CACI,CAAC;AAErB,CAAC;AAACnB,YAAA,CAAAgE,SAAA;EAhMArB,WAAW,EAAAsB,GAAA,CAAAC,IAAA,CAAAC,UAAA;EACXtB,WAAW,EAAAoB,GAAA,CAAAG,IAAA,CAAAD,UAAA;EACXhB,eAAe,EAAAc,GAAA,CAAAC,IAAA;EACfjB,MAAM,EAAAgB,GAAA,CAAAG,IAAA;EACNd,KAAK,EAAAW,GAAA,CAAAI,MAAA,CAAAF,UAAA;EACLZ,IAAI,EAAAU,GAAA,CAAAI,MAAA;EAEJpD,aAAa,EAAAgD,GAAA,CAAAK,KAAA;EACbZ,aAAa,EAAAO,GAAA,CAAAK,KAAA;EACbd,cAAc,EAAAS,GAAA,CAAAC,IAAA;EAEdjE,OAAO,EAAAgE,GAAA,CAAAI,MAAA;EACPE,MAAM,EAAAN,GAAA,CAAAO,MAAA;EACN/D,QAAQ,EAAAwD,GAAA,CAAAQ;AAAA;AAqLV,eAAezE,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"ModalContent.js","names":["React","Size","ModalContainer","styled","useTheme","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXLStyling","ComponentXSStyling","ComponentXXSStyling","Note","scrollBarStyling","TooltipContainer","TooltipWrapper","TextButton","IconButton","SystemIcons","HyperLink","DropdownButton","ToggleButton","ImageWithFallbacks","jsx","_jsx","jsxs","_jsxs","HeaderText","div","props","generateToken","componentType","defaultVariant","theme","HeaderTitle","Bold","HeaderActions","HeaderWithImageActions","HeaderWithImage","ModalContentHeaderComponent","ModalContentBodyComponent","$scrollable","Small","ModalContentFooterLeftContainerComponent","ModalContentFooterLeftNoteComponent","ModalContentFooterLeftLinkComponent","FooterRightContainer","ModalContentFooterComponent","Wrapper","ModalContent","tooltip","delay","size","XSmall","align","position","withArrow","label","children","variant","shape","style","cursor","action","Help","color","headerActions","map","index","icon","rest","_objectWithoutProperties","_excluded","_objectSpread","id","_excluded2","type","_excluded3","getLeftActionIconElement","leftFooterAction","cloneElement","Large","actionType","_ref","text","_excluded4","onClick","_ref2","_excluded5","e","preventDefault","showModal","isModalOpen","closeModal","closeAction","className","Medium","image","onBack","ArrowLineLeft","hideCloseButton","dataTestId","Close","title","note","scrollableBody","undefined","footerActions","item","_excluded6","onKeyDown","a","key","propTypes","_pt","bool","isRequired","func","string","array","zIndex","number","node"],"sources":["../../src/Modals/ModalContent.tsx"],"sourcesContent":["import React from 'react';\r\nimport {Size} from '../types';\r\nimport {\r\n ButtonAction,\r\n ModalHeaderIconButton,\r\n LeftFooterAction,\r\n LeftFooterButton,\r\n LeftFooterHyperlink,\r\n ModalHeaderButtons\r\n} from './ModalTypes';\r\nimport {ModalContainer} from './index';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentLStyling,\r\n ComponentMStyling, ComponentSStyling,\r\n ComponentTextStyle, ComponentXLStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling, Note,\r\n scrollBarStyling\r\n} from '../styles';\r\nimport {TooltipContainer, TooltipWrapper} from '../Tooltips';\r\nimport {TextButton, IconButton} from '../Button';\r\nimport {SystemIcons} from '../icons';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {ImageWithFallbacksProps} from \"../Image/ImageWithFallbacks\";\r\nimport {DropdownButton} from \"../Dropdown\";\r\nimport {ToggleButton} from \"../Toggles\";\r\nimport {ImageWithFallbacks} from \"../Image\";\r\n\r\nconst HeaderText = styled.div`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n color: ${props => COLORS.generateToken({componentType:'text', defaultVariant:'default'}, props.theme)};\r\n\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n &:not(:first-child) {\r\n padding-left: 0 !important;\r\n }\r\n\r\n`;\r\nconst HeaderTitle = styled.div`\r\n ${props => ComponentMStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType:'text', defaultVariant:'default' }, props.theme))}\r\n`;\r\n\r\nconst HeaderActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`;\r\n\r\nconst HeaderWithImageActions = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n position: absolute;\r\n\r\n button:only-child {\r\n margin-left: auto;\r\n }\r\n\r\n top: 4px;\r\n left: 4px;\r\n right: 4px;\r\n\r\n .medium & {\r\n top: 12px;\r\n left: 12px;\r\n right: 12px;\r\n }\r\n\r\n .large & {\r\n top: 20px;\r\n left: 20px;\r\n right: 20px;\r\n }\r\n`;\r\n\r\nconst HeaderWithImage = styled.div`\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n img {\r\n object-fit: cover;\r\n width: 100%;\r\n height: 160px;\r\n border-top-left-radius: 8px;\r\n border-top-right-radius: 8px;\r\n }\r\n\r\n .medium & {\r\n img {\r\n height: 200px;\r\n }\r\n }\r\n\r\n .large & {\r\n img {\r\n height: 240px;\r\n }\r\n }\r\n`;\r\n\r\nexport const ModalContentHeaderComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px;\r\n\r\n ${TooltipContainer} {\r\n height: max-content;\r\n }\r\n`;\r\n\r\nexport const ModalContentBodyComponent = styled.div<{$scrollable?: boolean}>`\r\n margin-right: 8px;\r\n padding: 0 8px 0 16px;\r\n overflow: ${props => props.$scrollable ? 'auto' : 'visible'};\r\n\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nconst ModalContentFooterLeftContainerComponent = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst ModalContentFooterLeftNoteComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.generateToken({componentType:'text', defaultVariant: 'subtle'}, props.theme))}\r\n`;\r\n\r\nconst ModalContentFooterLeftLinkComponent = styled.div`\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType: 'text-link', defaultVariant: 'default' }, props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n`;\r\n\r\nconst FooterRightContainer = styled.div`\r\n gap: 8px;\r\n margin-left: auto;\r\n`\r\n\r\nexport const ModalContentFooterComponent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 8px 16px;\r\n`;\r\n\r\n\r\nconst Wrapper = styled.div` \r\n display: flex;\r\n flex-direction: column;\r\n width: max-content;\r\n\r\n max-height: calc(100vh - 32px);\r\n max-width: calc(100vw - 32px);\r\n\r\n &.medium {\r\n max-height: calc(100vh - 64px);\r\n max-width: calc(100vw - 64px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 12px 12px 4px 12px;\r\n\r\n ${HeaderText} {\r\n padding: 12px 0 12px 12px;\r\n gap: 4px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 16px 0 24px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 12px 24px 20px 24px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 6px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 6px;\r\n }\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 8px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n max-height: calc(100vh - 112px);\r\n max-width: calc(100vw - 112px);\r\n\r\n ${ModalContentHeaderComponent} {\r\n padding: 20px 20px 4px 20px;\r\n\r\n ${HeaderText} {\r\n padding: 10px 0 10px 12px;\r\n gap: 8px;\r\n\r\n ${HeaderTitle} {\r\n ${ComponentXLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n }\r\n }\r\n\r\n ${ModalContentBodyComponent} {\r\n padding: 0 24px 0 32px;\r\n }\r\n\r\n ${ModalContentFooterComponent} {\r\n padding: 16px 32px 32px 32px;\r\n\r\n ${ModalContentFooterLeftNoteComponent} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n gap: 8px;\r\n }\r\n\r\n ${ModalContentFooterLeftLinkComponent} {\r\n a {\r\n gap: 8px;\r\n }\r\n\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n ${FooterRightContainer} {\r\n gap: 16px;\r\n }\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport interface ModalContentProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n isModalOpen: boolean;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n onBack?: () => void;\r\n title: string;\r\n note?: string;\r\n image?: ImageWithFallbacksProps;\r\n headerActions?: ModalHeaderButtons[];\r\n footerActions?: ButtonAction[];\r\n scrollableBody?: boolean;\r\n leftFooterAction?: LeftFooterAction;\r\n tooltip?: string;\r\n zIndex?: number;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst ModalContent: React.FC<ModalContentProps> = (props) => {\r\n const theme = useTheme();\r\n\r\n const tooltip = () =>\r\n !!props.tooltip &&\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"bottom\" withArrow={false}\r\n label={props.tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" style={{cursor: 'help'}} action={() => {\r\n }}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>\r\n </TooltipWrapper>;\r\n\r\n const headerActions = () => props.headerActions?.map((action, index) => {\r\n switch (action.componentType) {\r\n case 'icon': {\r\n const {icon, componentType, ...rest} = action;\r\n return <IconButton key={action.id || index}\r\n {...rest}>\r\n {icon}\r\n </IconButton>\r\n }\r\n case 'dropdown': {\r\n const {componentType, ...rest} = action;\r\n return <DropdownButton type={'icon'} size={props.size} {...rest}/>\r\n }\r\n case 'toggle': {\r\n const {componentType, ...rest} = action;\r\n return <ToggleButton {...rest}/>\r\n }\r\n }\r\n }\r\n );\r\n\r\n const getLeftActionIconElement = () =>\r\n !!props.leftFooterAction?.icon &&\r\n React.cloneElement(props.leftFooterAction?.icon as React.ReactElement<any>, {\r\n size:\r\n props.size === Size.Small\r\n ? '20px'\r\n : props.size === Size.Large\r\n ? '28px'\r\n : '24px'\r\n });\r\n\r\n const leftFooterAction = () => {\r\n if (!props.leftFooterAction) return null;\r\n\r\n switch (props.leftFooterAction.actionType) {\r\n case 'button': {\r\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterButton;\r\n return (\r\n <TextButton{...rest}\r\n size={props.size}\r\n onClick={action}\r\n variant={variant ?? 'secondary'}>\r\n {text}\r\n </TextButton>\r\n );\r\n }\r\n case 'hyperlink': {\r\n const {text, variant, action, actionType, ...rest} = props.leftFooterAction as LeftFooterHyperlink;\r\n return (\r\n <ModalContentFooterLeftLinkComponent>\r\n <HyperLink {...rest}\r\n variant={variant ?? 'default'}\r\n onClick={(e) => {\r\n if (action) {\r\n e.preventDefault();\r\n action(e);\r\n }\r\n }}>\r\n {text}\r\n {getLeftActionIconElement()}\r\n </HyperLink>\r\n </ModalContentFooterLeftLinkComponent>\r\n );\r\n\r\n }\r\n case 'note': {\r\n const {text} = props.leftFooterAction;\r\n return (\r\n <ModalContentFooterLeftNoteComponent>\r\n {getLeftActionIconElement()}\r\n <span>{text}</span>\r\n </ModalContentFooterLeftNoteComponent>\r\n );\r\n }\r\n }\r\n };\r\n\r\n\r\n return (\r\n <ModalContainer showModal={props.isModalOpen} closeModal={props.closeAction}>\r\n <Wrapper className={props.size ?? Size.Medium}>\r\n {\r\n props.image &&\r\n <HeaderWithImage>\r\n <ImageWithFallbacks {...props.image}/>\r\n <HeaderWithImageActions>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n\r\n }\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderWithImageActions>\r\n\r\n <ModalContentHeaderComponent>\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n </HeaderWithImage>\r\n }\r\n {\r\n !props.image &&\r\n <ModalContentHeaderComponent>\r\n {\r\n props.onBack &&\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\r\n <SystemIcons.ArrowLineLeft/>\r\n </IconButton>\r\n }\r\n <HeaderText>\r\n <HeaderTitle>{props.title}</HeaderTitle>\r\n {!!props.note && <Note>{props.note}</Note>}\r\n </HeaderText>\r\n <HeaderActions>\r\n {tooltip()}\r\n {headerActions()}\r\n {!props.hideCloseButton && <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={props.closeAction}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)}/>\r\n </IconButton>}\r\n </HeaderActions>\r\n </ModalContentHeaderComponent>\r\n }\r\n <ModalContentBodyComponent $scrollable={props.scrollableBody == undefined ? true : props.scrollableBody}>\r\n {props.children}\r\n </ModalContentBodyComponent>\r\n <ModalContentFooterComponent>\r\n <ModalContentFooterLeftContainerComponent>\r\n {leftFooterAction()}\r\n </ModalContentFooterLeftContainerComponent>\r\n <FooterRightContainer>\r\n {props.footerActions?.map((item, index) => {\r\n const {action, text, ...rest} = item;\r\n return <TextButton key={rest.id || index}\r\n {...rest}\r\n onClick={action}\r\n size={props.size}\r\n onKeyDown={a => (a.key === 'Enter' || a.key === ' ') && action!(a)}>\r\n {text}\r\n </TextButton>\r\n }\r\n )}\r\n </FooterRightContainer>\r\n </ModalContentFooterComponent>\r\n </Wrapper>\r\n </ModalContainer>\r\n );\r\n};\r\n\r\nexport default ModalContent;\r\n"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,QAAO,UAAU;AAS7B,SAAQC,cAAc,QAAO,SAAS;AACtC,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SACEC,MAAM,EACNC,iBAAiB,EACjBC,iBAAiB,EAAEC,iBAAiB,EACpCC,kBAAkB,EAAEC,kBAAkB,EACtCC,kBAAkB,EAClBC,mBAAmB,EAAEC,IAAI,EACzBC,gBAAgB,QACX,WAAW;AAClB,SAAQC,gBAAgB,EAAEC,cAAc,QAAO,aAAa;AAC5D,SAAQC,UAAU,EAAEC,UAAU,QAAO,WAAW;AAChD,SAAQC,WAAW,QAAO,UAAU;AACpC,SAAQC,SAAS,QAAO,cAAc;AAEtC,SAAQC,cAAc,QAAO,aAAa;AAC1C,SAAQC,YAAY,QAAO,YAAY;AACvC,SAAQC,kBAAkB,QAAO,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE5C,MAAMC,UAAU,GAAGzB,MAAM,CAAC0B,GAAG;AAC7B;AACA;AACA;AACA;AACA,WAAWC,KAAK,IAAIzB,MAAM,CAAC0B,aAAa,CAAC;EAACC,aAAa,EAAC,MAAM;EAAEC,cAAc,EAAC;AAAS,CAAC,EAAEH,KAAK,CAACI,KAAK,CAAC;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,MAAMC,WAAW,GAAGhC,MAAM,CAAC0B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