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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) 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/Chips/__tests__/ChoiceChips.test.tsx +1 -1
  46. package/dist/Dropdown/DropdownContent.cjs +2 -2
  47. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  48. package/dist/Dropdown/DropdownContent.js +2 -2
  49. package/dist/Dropdown/DropdownContent.js.map +1 -1
  50. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +2 -2
  51. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
  52. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +3 -3
  53. package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
  54. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +1 -1
  55. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
  56. package/dist/GlobalNavigationBar/desktop/UserMenu.js +2 -2
  57. package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
  58. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs +1 -1
  59. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs.map +1 -1
  60. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +2 -2
  61. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js.map +1 -1
  62. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  63. package/dist/GlobalNavigationBar/types.d.ts +2 -2
  64. package/dist/GlobalNavigationBar/types.js.map +1 -1
  65. package/dist/Modals/ModalContent.cjs +2 -2
  66. package/dist/Modals/ModalContent.cjs.map +1 -1
  67. package/dist/Modals/ModalContent.js +3 -3
  68. package/dist/Modals/ModalContent.js.map +1 -1
  69. package/dist/Modals/ModalDialog.cjs +2 -2
  70. package/dist/Modals/ModalDialog.cjs.map +1 -1
  71. package/dist/Modals/ModalDialog.js +3 -3
  72. package/dist/Modals/ModalDialog.js.map +1 -1
  73. package/dist/Modals/ModalTypes.cjs.map +1 -1
  74. package/dist/Modals/ModalTypes.d.ts +3 -3
  75. package/dist/Modals/ModalTypes.js.map +1 -1
  76. package/dist/Popover/Popover.cjs +1 -1
  77. package/dist/Popover/Popover.cjs.map +1 -1
  78. package/dist/Popover/Popover.js +2 -2
  79. package/dist/Popover/Popover.js.map +1 -1
  80. package/dist/SideMenu/SideMenuFooter.cjs +1 -1
  81. package/dist/SideMenu/SideMenuFooter.cjs.map +1 -1
  82. package/dist/SideMenu/SideMenuFooter.js +2 -2
  83. package/dist/SideMenu/SideMenuFooter.js.map +1 -1
  84. package/dist/SideMenu/types.cjs.map +1 -1
  85. package/dist/SideMenu/types.d.ts +2 -2
  86. package/dist/SideMenu/types.js.map +1 -1
  87. package/dist/Table/TableBody.cjs +1 -1
  88. package/dist/Table/TableBody.cjs.map +1 -1
  89. package/dist/Table/TableBody.js +2 -2
  90. package/dist/Table/TableBody.js.map +1 -1
  91. package/dist/Table/TableTypes.cjs.map +1 -1
  92. package/dist/Table/TableTypes.d.ts +2 -2
  93. package/dist/Table/TableTypes.js.map +1 -1
  94. package/dist/Tile/TileCommonItems.cjs +1 -1
  95. package/dist/Tile/TileCommonItems.cjs.map +1 -1
  96. package/dist/Tile/TileCommonItems.js +2 -2
  97. package/dist/Tile/TileCommonItems.js.map +1 -1
  98. package/dist/Tile/TileTypes.cjs.map +1 -1
  99. package/dist/Tile/TileTypes.d.ts +2 -2
  100. package/dist/Tile/TileTypes.js.map +1 -1
  101. package/dist/Toasters/Toast.cjs +1 -2
  102. package/dist/Toasters/Toast.cjs.map +1 -1
  103. package/dist/Toasters/Toast.js +2 -3
  104. package/dist/Toasters/Toast.js.map +1 -1
  105. package/package.json +152 -148
  106. package/dist/Button/Button.cjs.map +0 -1
  107. package/dist/Button/Button.d.ts +0 -70
  108. package/dist/Button/Button.js.map +0 -1
  109. package/dist/Card/VerticalCard/Card.cjs.map +0 -1
  110. package/dist/Card/VerticalCard/Card.d.ts +0 -25
  111. package/dist/Card/VerticalCard/Card.js.map +0 -1
  112. package/dist/Card/VerticalCard/CardBottomSection.cjs.map +0 -1
  113. package/dist/Card/VerticalCard/CardBottomSection.d.ts +0 -53
  114. package/dist/Card/VerticalCard/CardBottomSection.js.map +0 -1
  115. package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +0 -1
  116. package/dist/Card/VerticalCard/CardMiddleSection.d.ts +0 -42
  117. package/dist/Card/VerticalCard/CardMiddleSection.js.map +0 -1
  118. package/dist/Card/VerticalCard/CardTopSection.cjs.map +0 -1
  119. package/dist/Card/VerticalCard/CardTopSection.js.map +0 -1
  120. package/dist/Card/__tests__/Card.test.tsx +0 -146
@@ -222,7 +222,7 @@ const ModalDialog = _ref => {
222
222
  switch (actionType) {
223
223
  case 'button':
224
224
  const button = leftFooterAction;
225
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
225
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.TextButton, {
226
226
  id: 'left-action-button',
227
227
  type: button?.type,
228
228
  disabled: disabled,
@@ -318,7 +318,7 @@ const ModalDialog = _ref => {
318
318
  icon: icon
319
319
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalStyles.ModalFooter, {
320
320
  $size: size,
321
- children: [leftFooterAction && LeftFooterAction(leftFooterAction), buttons?.map((b, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
321
+ children: [leftFooterAction && LeftFooterAction(leftFooterAction), buttons?.map((b, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.TextButton, {
322
322
  icon: b.icon,
323
323
  id: b.id,
324
324
  disabled: b.disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalDialog.cjs","names":["_react","_interopRequireDefault","require","_Button","_icons","_styles","_types","_ModalContainer","_ModalStyles","_ModalNote","_Tooltips","_","_styledComponents","_jsxRuntime","ModalDialog","_ref","size","isModalOpen","title","topImage","topImageWithFallbacksProps","topImageGrayscale","buttons","leftFooterAction","backButton","closeAction","submitAction","tooltip","children","note","shouldCloseOnOverlayClick","state","icon","zIndex","contentOverflow","hideCloseButton","width","hasContentBorders","theme","useTheme","getMinWidth","Size","Small","Large","Medium","getMaxWidth","getImageHeight","getMarginBottom","getPadding","getMaxHeight","ModalTitle","jsx","ComponentM","textStyle","ComponentTextStyle","Bold","ComponentL","ComponentXL","ModalTootip","ModalHoverModifier","TooltipWrapper","delay","XSmall","align","position","withArrow","label","IconButton","variant","shape","action","SystemIcons","Help","color","COLORS","generateToken","componentType","defaultVariant","ModalCloseButton","onClick","CloseButtonWrapper","$hasImage","$size","borderRadius","Close","ModalBackButton","BackButtonWrapper","ArrowLineLeft","getLeftActionIconElement","React","cloneElement","LeftFooterAction","text","actionType","disabled","button","Button","id","type","loading","style","order","marginRight","jsxs","HyperLink","className","href","e","preventDefault","default","showModal","closeModal","minWidth","maxWidth","height","padding","Column","onSubmit","display","flexDirection","maxHeight","StyledModalHeader","$height","$marginBottom","ImageContainer","ImageOverlay","src","alt","ImageWithFallbacks","loader","fallbacks","ModalHeaderActionsWithImage","$hasBackButton","ModalTitleSection","FlexContainer","ModalHeaderActions","ModalBody","$overflow","$hasContentBorders","ModalNote","ModalFooter","map","b","i","exports","propTypes","_propTypes","bool","isRequired","node","oneOfType","string","any","array","func","number","_default"],"sources":["../../src/Modals/ModalDialog.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Button, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { COLORS, ComponentL, ComponentM, ComponentTextStyle, ComponentXL } from '../styles';\r\nimport { Size } from '../types';\r\nimport ModalContainer from './ModalContainer';\r\nimport {\r\n BackButtonWrapper,\r\n CloseButtonWrapper,\r\n Column,\r\n FlexContainer,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeaderActions,\r\n ModalHeaderActionsWithImage,\r\n ModalTitleSection,\r\n StyledModalHeader,\r\n ModalHoverModifier,\r\n ImageOverlay,\r\n ImageContainer,\r\n} from './ModalStyles';\r\n\r\nimport { ModalNote } from './ModalNote';\r\nimport { TooltipWrapper } from '../Tooltips';\r\nimport { ButtonAction, LeftFooterAction, LeftFooterButton, LeftFooterHyperlink } from './ModalTypes';\r\nimport { HyperLink, ImageWithFallbacks } from '..';\r\nimport { ImageWithFallbacksProps } from '../Image/ImageWithFallbacks';\r\nimport { useTheme } from 'styled-components';\r\n\r\nexport interface ModalDialogProps {\r\n /** Optional. Size of the modal. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Required. Current state of the modal. */\r\n isModalOpen: boolean;\r\n /** Optional. Content of the ModalDialog. */\r\n children?: React.ReactNode;\r\n /** Optional. Title of the ModalDialog. */\r\n title?: string | React.ReactNode;\r\n /** Optional. Content of the image to be shown in the header of the modal. */\r\n topImage?: any;\r\n /** Optional. Serves same purpose as 'topImage' except adds support for fallback options. Has higher priority than 'topImage'. */\r\n topImageWithFallbacksProps?: ImageWithFallbacksProps;\r\n /** Optional. If flag is set then overlay is added that converts image to grey color. */\r\n topImageGrayscale?: boolean;\r\n /** Optional. Collection of Buttons that will be shown in the footer on the right side of the ModalDialog. */\r\n buttons?: ButtonAction[];\r\n /** Optional. Left footer action that will be shown on the left side of the footer of ModalDialog. Can be a hyperlink, button or a note. */\r\n leftFooterAction?: LeftFooterAction;\r\n /** Optional. Tooltip that will be shown */\r\n tooltip?: string;\r\n /** */\r\n backButton?: () => void;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n submitAction: (event?: React.FormEvent<HTMLFormElement> | undefined) => void;\r\n note?: string | React.ReactNode;\r\n state?: string;\r\n icon?: React.ReactNode;\r\n zIndex?: number;\r\n contentOverflow?: string;\r\n width?: string;\r\n hasContentBorders?: boolean;\r\n shouldCloseOnOverlayClick?: boolean;\r\n}\r\n\r\nexport const ModalDialog: React.FunctionComponent<ModalDialogProps> = ({\r\n size,\r\n isModalOpen,\r\n title,\r\n topImage,\r\n topImageWithFallbacksProps,\r\n topImageGrayscale,\r\n buttons,\r\n leftFooterAction,\r\n backButton,\r\n closeAction,\r\n submitAction,\r\n tooltip,\r\n children,\r\n note,\r\n shouldCloseOnOverlayClick,\r\n state,\r\n icon,\r\n zIndex,\r\n contentOverflow,\r\n hideCloseButton,\r\n width,\r\n hasContentBorders,\r\n}) => {\r\n\r\n const theme = useTheme();\r\n const getMinWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '320px';\r\n case Size.Large:\r\n return '640px';\r\n case Size.Medium:\r\n default:\r\n return '480px';\r\n }\r\n };\r\n\r\n const getMaxWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '480px';\r\n case Size.Large:\r\n return '720px';\r\n case Size.Medium:\r\n default:\r\n return '640px';\r\n }\r\n };\r\n\r\n const getImageHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 160;\r\n case Size.Medium:\r\n return 200;\r\n case Size.Large:\r\n return 240;\r\n default:\r\n return 200;\r\n }\r\n };\r\n\r\n const getMarginBottom = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px';\r\n case Size.Medium:\r\n return '24px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px';\r\n }\r\n };\r\n\r\n const getPadding = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px 16px 8px';\r\n case Size.Medium:\r\n return '24px 24px 20px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px 24px 16px';\r\n }\r\n };\r\n\r\n const getMaxHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 'calc(100vh - 56px)';\r\n case Size.Medium:\r\n return 'calc(100vh - 76px)';\r\n case Size.Large:\r\n return 'calc(100vh - 96px)';\r\n default:\r\n return 'calc(100vh - 72px)';\r\n }\r\n };\r\n\r\n const ModalTitle = (title: string | React.ReactNode, size?: Size) => {\r\n if (typeof title === 'string') {\r\n switch (size) {\r\n case Size.Small:\r\n return <ComponentM textStyle={ComponentTextStyle.Bold}>{title}</ComponentM>;\r\n case Size.Medium:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n case Size.Large:\r\n return <ComponentXL textStyle={ComponentTextStyle.Bold}>{title}</ComponentXL>;\r\n default:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n }\r\n } else {\r\n return title;\r\n }\r\n };\r\n\r\n const ModalTootip = (tooltip: string) => {\r\n return (\r\n <ModalHoverModifier>\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"top\" withArrow={false} label={tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => {}}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </TooltipWrapper>\r\n </ModalHoverModifier>\r\n );\r\n };\r\n\r\n const ModalCloseButton = (onClick: any) => {\r\n return (\r\n <CloseButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => onClick()} borderRadius={48}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </CloseButtonWrapper>\r\n );\r\n };\r\n\r\n const ModalBackButton = () => {\r\n if (backButton) {\r\n return (\r\n <BackButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => backButton()} borderRadius={48}>\r\n <SystemIcons.ArrowLineLeft size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </BackButtonWrapper>\r\n );\r\n }\r\n };\r\n\r\n const getLeftActionIconElement = (icon: React.ReactNode) => {\r\n return React.cloneElement(icon as React.ReactElement<any>, { size: size === Size.Small ? '20px' : size === Size.Large ? '28px' : '24px' });\r\n };\r\n\r\n const LeftFooterAction = (leftFooterAction: LeftFooterAction) => {\r\n const { text, actionType, disabled, icon, action } = leftFooterAction;\r\n switch (actionType) {\r\n case 'button':\r\n const button = leftFooterAction as LeftFooterButton;\r\n return (\r\n <Button\r\n id={'left-action-button'}\r\n type={button?.type}\r\n disabled={disabled}\r\n loading={button?.loading}\r\n icon={icon}\r\n size={size}\r\n onClick={action}\r\n variant={button?.variant ?? 'secondary'}\r\n style={{ order: -1, marginRight: 'auto' }}>\r\n {button?.children ?? button?.text}\r\n </Button>\r\n );\r\n case 'hyperlink':\r\n return (\r\n <HyperLink\r\n id=\"left-action-hyperlink\"\r\n className=\"footer-action\"\r\n href={(leftFooterAction as LeftFooterHyperlink).href}\r\n disabled={disabled}\r\n 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 {icon && getLeftActionIconElement(icon)}\r\n </HyperLink>\r\n );\r\n case 'note':\r\n return (\r\n <div className=\"footer-action note\">\r\n {icon && getLeftActionIconElement(icon)}\r\n <span>{text}</span>\r\n </div>\r\n );\r\n }\r\n };\r\n\r\n return (\r\n <ModalContainer\r\n showModal={isModalOpen}\r\n closeModal={closeAction}\r\n minWidth={getMinWidth()}\r\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\r\n maxWidth={getMaxWidth()}\r\n height=\"auto\"\r\n padding={getPadding()}\r\n zIndex={zIndex}\r\n width={width}>\r\n <Column>\r\n <form onSubmit={submitAction} style={{ display: 'flex', flexDirection: 'column', maxHeight: getMaxHeight() }}>\r\n {(topImage || topImageWithFallbacksProps) && (\r\n <StyledModalHeader $size={size} $height={getImageHeight()} $marginBottom={getMarginBottom()}>\r\n <ImageContainer $height={getImageHeight()}>\r\n {topImageGrayscale && <ImageOverlay $height={getImageHeight()} />}\r\n {topImage && <img src={topImage} alt=\"Modal top\" />}\r\n {!topImage && topImageWithFallbacksProps && (\r\n <ImageWithFallbacks\r\n loader={topImageWithFallbacksProps.loader}\r\n alt={topImageWithFallbacksProps.alt}\r\n fallbacks={topImageWithFallbacksProps.fallbacks}\r\n src={topImageWithFallbacksProps.src}\r\n />\r\n )}\r\n </ImageContainer>\r\n <ModalHeaderActionsWithImage $hasBackButton={!!backButton}>\r\n {ModalBackButton()}\r\n {!hideCloseButton && ModalCloseButton(closeAction)}\r\n </ModalHeaderActionsWithImage>\r\n </StyledModalHeader>\r\n )}\r\n <ModalTitleSection>\r\n <FlexContainer>\r\n {!(topImage || topImageWithFallbacksProps) && ModalBackButton()}\r\n {title && ModalTitle(title, size)}\r\n </FlexContainer>\r\n {(tooltip || !(topImage || topImageWithFallbacksProps)) && (\r\n <ModalHeaderActions>\r\n {tooltip && ModalTootip(tooltip)}\r\n {!(topImage || topImageWithFallbacksProps || hideCloseButton) && ModalCloseButton(closeAction)}\r\n </ModalHeaderActions>\r\n )}\r\n </ModalTitleSection>\r\n\r\n <ModalBody $size={size} $overflow={contentOverflow} $hasContentBorders={hasContentBorders}>\r\n {children}\r\n </ModalBody>\r\n\r\n {note && <ModalNote note={note} state={state} size={size} icon={icon} />}\r\n\r\n <ModalFooter $size={size}>\r\n {leftFooterAction && LeftFooterAction(leftFooterAction)}\r\n {buttons?.map((b, i) => (\r\n <Button key={b.id || i} icon={b.icon} id={b.id} disabled={b.disabled} loading={b.loading} size={size} onClick={b.action} type={b.type} variant={b.variant}>\r\n {b.children ?? b.text}\r\n </Button>\r\n ))}\r\n </ModalFooter>\r\n </form>\r\n </Column>\r\n </ModalContainer>\r\n );\r\n};\r\n\r\nexport default ModalDialog;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAgBA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAEA,IAAAS,CAAA,GAAAT,OAAA;AAEA,IAAAU,iBAAA,GAAAV,OAAA;AAA6C,IAAAW,WAAA,GAAAX,OAAA;AAsCtC,MAAMY,WAAsD,GAAGC,IAAA,IAuBhE;EAAA,IAvBiE;IACrEC,IAAI;IACJC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC,0BAA0B;IAC1BC,iBAAiB;IACjBC,OAAO;IACPC,gBAAgB;IAChBC,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,OAAO;IACPC,QAAQ;IACRC,IAAI;IACJC,yBAAyB;IACzBC,KAAK;IACLC,IAAI;IACJC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,KAAK;IACLC;EACF,CAAC,GAAAtB,IAAA;EAEC,MAAMuB,KAAK,GAAG,IAAAC,0BAAQ,EAAC,CAAC;E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EACLlH,iBAAiB,EAAA6G,UAAA,CAAArC,OAAA,CAAAsC,IAAA;EACjBrH,yBAAyB,EAAAoH,UAAA,CAAArC,OAAA,CAAAsC;AAAA;AAAA,IAAAS,QAAA,GAAAZ,OAAA,CAAAnC,OAAA,GAiRZ/F,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"ModalDialog.cjs","names":["_react","_interopRequireDefault","require","_Button","_icons","_styles","_types","_ModalContainer","_ModalStyles","_ModalNote","_Tooltips","_","_styledComponents","_jsxRuntime","ModalDialog","_ref","size","isModalOpen","title","topImage","topImageWithFallbacksProps","topImageGrayscale","buttons","leftFooterAction","backButton","closeAction","submitAction","tooltip","children","note","shouldCloseOnOverlayClick","state","icon","zIndex","contentOverflow","hideCloseButton","width","hasContentBorders","theme","useTheme","getMinWidth","Size","Small","Large","Medium","getMaxWidth","getImageHeight","getMarginBottom","getPadding","getMaxHeight","ModalTitle","jsx","ComponentM","textStyle","ComponentTextStyle","Bold","ComponentL","ComponentXL","ModalTootip","ModalHoverModifier","TooltipWrapper","delay","XSmall","align","position","withArrow","label","IconButton","variant","shape","action","SystemIcons","Help","color","COLORS","generateToken","componentType","defaultVariant","ModalCloseButton","onClick","CloseButtonWrapper","$hasImage","$size","borderRadius","Close","ModalBackButton","BackButtonWrapper","ArrowLineLeft","getLeftActionIconElement","React","cloneElement","LeftFooterAction","text","actionType","disabled","button","TextButton","id","type","loading","style","order","marginRight","jsxs","HyperLink","className","href","e","preventDefault","default","showModal","closeModal","minWidth","maxWidth","height","padding","Column","onSubmit","display","flexDirection","maxHeight","StyledModalHeader","$height","$marginBottom","ImageContainer","ImageOverlay","src","alt","ImageWithFallbacks","loader","fallbacks","ModalHeaderActionsWithImage","$hasBackButton","ModalTitleSection","FlexContainer","ModalHeaderActions","ModalBody","$overflow","$hasContentBorders","ModalNote","ModalFooter","map","b","i","exports","propTypes","_propTypes","bool","isRequired","node","oneOfType","string","any","array","func","number","_default"],"sources":["../../src/Modals/ModalDialog.tsx"],"sourcesContent":["import React from 'react';\r\nimport { TextButton, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { COLORS, ComponentL, ComponentM, ComponentTextStyle, ComponentXL } from '../styles';\r\nimport { Size } from '../types';\r\nimport ModalContainer from './ModalContainer';\r\nimport {\r\n BackButtonWrapper,\r\n CloseButtonWrapper,\r\n Column,\r\n FlexContainer,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeaderActions,\r\n ModalHeaderActionsWithImage,\r\n ModalTitleSection,\r\n StyledModalHeader,\r\n ModalHoverModifier,\r\n ImageOverlay,\r\n ImageContainer,\r\n} from './ModalStyles';\r\n\r\nimport { ModalNote } from './ModalNote';\r\nimport { TooltipWrapper } from '../Tooltips';\r\nimport { ButtonAction, LeftFooterAction, LeftFooterButton, LeftFooterHyperlink } from './ModalTypes';\r\nimport { HyperLink, ImageWithFallbacks } from '..';\r\nimport { ImageWithFallbacksProps } from '../Image/ImageWithFallbacks';\r\nimport { useTheme } from 'styled-components';\r\n\r\nexport interface ModalDialogProps {\r\n /** Optional. Size of the modal. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Required. Current state of the modal. */\r\n isModalOpen: boolean;\r\n /** Optional. Content of the ModalDialog. */\r\n children?: React.ReactNode;\r\n /** Optional. Title of the ModalDialog. */\r\n title?: string | React.ReactNode;\r\n /** Optional. Content of the image to be shown in the header of the modal. */\r\n topImage?: any;\r\n /** Optional. Serves same purpose as 'topImage' except adds support for fallback options. Has higher priority than 'topImage'. */\r\n topImageWithFallbacksProps?: ImageWithFallbacksProps;\r\n /** Optional. If flag is set then overlay is added that converts image to grey color. */\r\n topImageGrayscale?: boolean;\r\n /** Optional. Collection of Buttons that will be shown in the footer on the right side of the ModalDialog. */\r\n buttons?: ButtonAction[];\r\n /** Optional. Left footer action that will be shown on the left side of the footer of ModalDialog. Can be a hyperlink, button or a note. */\r\n leftFooterAction?: LeftFooterAction;\r\n /** Optional. Tooltip that will be shown */\r\n tooltip?: string;\r\n /** */\r\n backButton?: () => void;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n submitAction: (event?: React.FormEvent<HTMLFormElement> | undefined) => void;\r\n note?: string | React.ReactNode;\r\n state?: string;\r\n icon?: React.ReactNode;\r\n zIndex?: number;\r\n contentOverflow?: string;\r\n width?: string;\r\n hasContentBorders?: boolean;\r\n shouldCloseOnOverlayClick?: boolean;\r\n}\r\n\r\nexport const ModalDialog: React.FunctionComponent<ModalDialogProps> = ({\r\n size,\r\n isModalOpen,\r\n title,\r\n topImage,\r\n topImageWithFallbacksProps,\r\n topImageGrayscale,\r\n buttons,\r\n leftFooterAction,\r\n backButton,\r\n closeAction,\r\n submitAction,\r\n tooltip,\r\n children,\r\n note,\r\n shouldCloseOnOverlayClick,\r\n state,\r\n icon,\r\n zIndex,\r\n contentOverflow,\r\n hideCloseButton,\r\n width,\r\n hasContentBorders,\r\n}) => {\r\n\r\n const theme = useTheme();\r\n const getMinWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '320px';\r\n case Size.Large:\r\n return '640px';\r\n case Size.Medium:\r\n default:\r\n return '480px';\r\n }\r\n };\r\n\r\n const getMaxWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '480px';\r\n case Size.Large:\r\n return '720px';\r\n case Size.Medium:\r\n default:\r\n return '640px';\r\n }\r\n };\r\n\r\n const getImageHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 160;\r\n case Size.Medium:\r\n return 200;\r\n case Size.Large:\r\n return 240;\r\n default:\r\n return 200;\r\n }\r\n };\r\n\r\n const getMarginBottom = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px';\r\n case Size.Medium:\r\n return '24px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px';\r\n }\r\n };\r\n\r\n const getPadding = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px 16px 8px';\r\n case Size.Medium:\r\n return '24px 24px 20px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px 24px 16px';\r\n }\r\n };\r\n\r\n const getMaxHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 'calc(100vh - 56px)';\r\n case Size.Medium:\r\n return 'calc(100vh - 76px)';\r\n case Size.Large:\r\n return 'calc(100vh - 96px)';\r\n default:\r\n return 'calc(100vh - 72px)';\r\n }\r\n };\r\n\r\n const ModalTitle = (title: string | React.ReactNode, size?: Size) => {\r\n if (typeof title === 'string') {\r\n switch (size) {\r\n case Size.Small:\r\n return <ComponentM textStyle={ComponentTextStyle.Bold}>{title}</ComponentM>;\r\n case Size.Medium:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n case Size.Large:\r\n return <ComponentXL textStyle={ComponentTextStyle.Bold}>{title}</ComponentXL>;\r\n default:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n }\r\n } else {\r\n return title;\r\n }\r\n };\r\n\r\n const ModalTootip = (tooltip: string) => {\r\n return (\r\n <ModalHoverModifier>\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"top\" withArrow={false} label={tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => {}}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </TooltipWrapper>\r\n </ModalHoverModifier>\r\n );\r\n };\r\n\r\n const ModalCloseButton = (onClick: any) => {\r\n return (\r\n <CloseButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => onClick()} borderRadius={48}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </CloseButtonWrapper>\r\n );\r\n };\r\n\r\n const ModalBackButton = () => {\r\n if (backButton) {\r\n return (\r\n <BackButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => backButton()} borderRadius={48}>\r\n <SystemIcons.ArrowLineLeft size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </BackButtonWrapper>\r\n );\r\n }\r\n };\r\n\r\n const getLeftActionIconElement = (icon: React.ReactNode) => {\r\n return React.cloneElement(icon as React.ReactElement<any>, { size: size === Size.Small ? '20px' : size === Size.Large ? '28px' : '24px' });\r\n };\r\n\r\n const LeftFooterAction = (leftFooterAction: LeftFooterAction) => {\r\n const { text, actionType, disabled, icon, action } = leftFooterAction;\r\n switch (actionType) {\r\n case 'button':\r\n const button = leftFooterAction as LeftFooterButton;\r\n return (\r\n <TextButton\r\n id={'left-action-button'}\r\n type={button?.type}\r\n disabled={disabled}\r\n loading={button?.loading}\r\n icon={icon}\r\n size={size}\r\n onClick={action}\r\n variant={button?.variant ?? 'secondary'}\r\n style={{ order: -1, marginRight: 'auto' }}>\r\n {button?.children ?? button?.text}\r\n </TextButton>\r\n );\r\n case 'hyperlink':\r\n return (\r\n <HyperLink\r\n id=\"left-action-hyperlink\"\r\n className=\"footer-action\"\r\n href={(leftFooterAction as LeftFooterHyperlink).href}\r\n disabled={disabled}\r\n 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 {icon && getLeftActionIconElement(icon)}\r\n </HyperLink>\r\n );\r\n case 'note':\r\n return (\r\n <div className=\"footer-action note\">\r\n {icon && getLeftActionIconElement(icon)}\r\n <span>{text}</span>\r\n </div>\r\n );\r\n }\r\n };\r\n\r\n return (\r\n <ModalContainer\r\n showModal={isModalOpen}\r\n closeModal={closeAction}\r\n minWidth={getMinWidth()}\r\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\r\n maxWidth={getMaxWidth()}\r\n height=\"auto\"\r\n padding={getPadding()}\r\n zIndex={zIndex}\r\n width={width}>\r\n <Column>\r\n <form onSubmit={submitAction} style={{ display: 'flex', flexDirection: 'column', maxHeight: getMaxHeight() }}>\r\n {(topImage || topImageWithFallbacksProps) && (\r\n <StyledModalHeader $size={size} $height={getImageHeight()} $marginBottom={getMarginBottom()}>\r\n <ImageContainer $height={getImageHeight()}>\r\n {topImageGrayscale && <ImageOverlay $height={getImageHeight()} />}\r\n {topImage && <img src={topImage} alt=\"Modal top\" />}\r\n {!topImage && topImageWithFallbacksProps && (\r\n <ImageWithFallbacks\r\n loader={topImageWithFallbacksProps.loader}\r\n alt={topImageWithFallbacksProps.alt}\r\n fallbacks={topImageWithFallbacksProps.fallbacks}\r\n src={topImageWithFallbacksProps.src}\r\n />\r\n )}\r\n </ImageContainer>\r\n <ModalHeaderActionsWithImage $hasBackButton={!!backButton}>\r\n {ModalBackButton()}\r\n {!hideCloseButton && ModalCloseButton(closeAction)}\r\n </ModalHeaderActionsWithImage>\r\n </StyledModalHeader>\r\n )}\r\n <ModalTitleSection>\r\n <FlexContainer>\r\n {!(topImage || topImageWithFallbacksProps) && ModalBackButton()}\r\n {title && ModalTitle(title, size)}\r\n </FlexContainer>\r\n {(tooltip || !(topImage || topImageWithFallbacksProps)) && (\r\n <ModalHeaderActions>\r\n {tooltip && ModalTootip(tooltip)}\r\n {!(topImage || topImageWithFallbacksProps || hideCloseButton) && ModalCloseButton(closeAction)}\r\n </ModalHeaderActions>\r\n )}\r\n </ModalTitleSection>\r\n\r\n <ModalBody $size={size} $overflow={contentOverflow} $hasContentBorders={hasContentBorders}>\r\n {children}\r\n </ModalBody>\r\n\r\n {note && <ModalNote note={note} state={state} size={size} icon={icon} />}\r\n\r\n <ModalFooter $size={size}>\r\n {leftFooterAction && LeftFooterAction(leftFooterAction)}\r\n {buttons?.map((b, i) => (\r\n <TextButton key={b.id || i} icon={b.icon} id={b.id} disabled={b.disabled} loading={b.loading} size={size} onClick={b.action} type={b.type} variant={b.variant}>\r\n {b.children ?? b.text}\r\n </TextButton>\r\n ))}\r\n </ModalFooter>\r\n </form>\r\n </Column>\r\n </ModalContainer>\r\n );\r\n};\r\n\r\nexport default ModalDialog;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAgBA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAEA,IAAAS,CAAA,GAAAT,OAAA;AAEA,IAAAU,iBAAA,GAAAV,OAAA;AAA6C,IAAAW,WAAA,GAAAX,OAAA;AAsCtC,MAAMY,WAAsD,GAAGC,IAAA,IAuBhE;EAAA,IAvBiE;IACrEC,IAAI;IACJC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC,0BAA0B;IAC1BC,iBAAiB;IACjBC,OAAO;IACPC,gBAAgB;IAChBC,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,OAAO;IACPC,QAAQ;IACRC,IAAI;IACJC,yBAAyB;IACzBC,KAAK;IACLC,IAAI;IACJC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,KAAK;IACLC;EACF,CAAC,GAAAtB,IAAA;EAEC,MAAMuB,KAAK,GAAG,IAAAC,0BAAQ,EAAC,CAAC;EACxB,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACxB,QAAQxB,IAAI;MACV,KAAKyB,WAAI,CAACC,KAAK;QACb,OAAO,OAAO;MAChB,KAAKD,WAAI,CAACE,KAAK;QACb,OAAO,OAAO;MAChB,KAAKF,WAAI,CAACG,MAAM;MAChB;QACE,OAAO,OAAO;IAClB;EACF,CAAC;EAED,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACx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from '../Button';
3
+ import { TextButton, IconButton } from '../Button';
4
4
  import { SystemIcons } from '../icons';
5
5
  import { COLORS, ComponentL, ComponentM, ComponentTextStyle, ComponentXL } from '../styles';
6
6
  import { Size } from '../types';
@@ -215,7 +215,7 @@ export const ModalDialog = _ref => {
215
215
  switch (actionType) {
216
216
  case 'button':
217
217
  const button = leftFooterAction;
218
- return /*#__PURE__*/_jsx(Button, {
218
+ return /*#__PURE__*/_jsx(TextButton, {
219
219
  id: 'left-action-button',
220
220
  type: button?.type,
221
221
  disabled: disabled,
@@ -311,7 +311,7 @@ export const ModalDialog = _ref => {
311
311
  icon: icon
312
312
  }), /*#__PURE__*/_jsxs(ModalFooter, {
313
313
  $size: size,
314
- children: [leftFooterAction && LeftFooterAction(leftFooterAction), buttons?.map((b, i) => /*#__PURE__*/_jsx(Button, {
314
+ children: [leftFooterAction && LeftFooterAction(leftFooterAction), buttons?.map((b, i) => /*#__PURE__*/_jsx(TextButton, {
315
315
  icon: b.icon,
316
316
  id: b.id,
317
317
  disabled: b.disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalDialog.js","names":["React","Button","IconButton","SystemIcons","COLORS","ComponentL","ComponentM","ComponentTextStyle","ComponentXL","Size","ModalContainer","BackButtonWrapper","CloseButtonWrapper","Column","FlexContainer","ModalBody","ModalFooter","ModalHeaderActions","ModalHeaderActionsWithImage","ModalTitleSection","StyledModalHeader","ModalHoverModifier","ImageOverlay","ImageContainer","ModalNote","TooltipWrapper","HyperLink","ImageWithFallbacks","useTheme","jsx","_jsx","jsxs","_jsxs","ModalDialog","_ref","size","isModalOpen","title","topImage","topImageWithFallbacksProps","topImageGrayscale","buttons","leftFooterAction","backButton","closeAction","submitAction","tooltip","children","note","shouldCloseOnOverlayClick","state","icon","zIndex","contentOverflow","hideCloseButton","width","hasContentBorders","theme","getMinWidth","Small","Large","Medium","getMaxWidth","getImageHeight","getMarginBottom","getPadding","getMaxHeight","ModalTitle","textStyle","Bold","ModalTootip","delay","XSmall","align","position","withArrow","label","variant","shape","action","Help","color","generateToken","componentType","defaultVariant","ModalCloseButton","onClick","$hasImage","$size","borderRadius","Close","ModalBackButton","ArrowLineLeft","getLeftActionIconElement","cloneElement","LeftFooterAction","text","actionType","disabled","button","id","type","loading","style","order","marginRight","className","href","e","preventDefault","showModal","closeModal","minWidth","maxWidth","height","padding","onSubmit","display","flexDirection","maxHeight","$height","$marginBottom","src","alt","loader","fallbacks","$hasBackButton","$overflow","$hasContentBorders","map","b","i","propTypes","_pt","bool","isRequired","node","oneOfType","string","any","array","func","number"],"sources":["../../src/Modals/ModalDialog.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Button, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { COLORS, ComponentL, ComponentM, ComponentTextStyle, ComponentXL } from '../styles';\r\nimport { Size } from '../types';\r\nimport ModalContainer from './ModalContainer';\r\nimport {\r\n BackButtonWrapper,\r\n CloseButtonWrapper,\r\n Column,\r\n FlexContainer,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeaderActions,\r\n ModalHeaderActionsWithImage,\r\n ModalTitleSection,\r\n StyledModalHeader,\r\n ModalHoverModifier,\r\n ImageOverlay,\r\n ImageContainer,\r\n} from './ModalStyles';\r\n\r\nimport { ModalNote } from './ModalNote';\r\nimport { TooltipWrapper } from '../Tooltips';\r\nimport { ButtonAction, LeftFooterAction, LeftFooterButton, LeftFooterHyperlink } from './ModalTypes';\r\nimport { HyperLink, ImageWithFallbacks } from '..';\r\nimport { ImageWithFallbacksProps } from '../Image/ImageWithFallbacks';\r\nimport { useTheme } from 'styled-components';\r\n\r\nexport interface ModalDialogProps {\r\n /** Optional. Size of the modal. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Required. Current state of the modal. */\r\n isModalOpen: boolean;\r\n /** Optional. Content of the ModalDialog. */\r\n children?: React.ReactNode;\r\n /** Optional. Title of the ModalDialog. */\r\n title?: string | React.ReactNode;\r\n /** Optional. Content of the image to be shown in the header of the modal. */\r\n topImage?: any;\r\n /** Optional. Serves same purpose as 'topImage' except adds support for fallback options. Has higher priority than 'topImage'. */\r\n topImageWithFallbacksProps?: ImageWithFallbacksProps;\r\n /** Optional. If flag is set then overlay is added that converts image to grey color. */\r\n topImageGrayscale?: boolean;\r\n /** Optional. Collection of Buttons that will be shown in the footer on the right side of the ModalDialog. */\r\n buttons?: ButtonAction[];\r\n /** Optional. Left footer action that will be shown on the left side of the footer of ModalDialog. Can be a hyperlink, button or a note. */\r\n leftFooterAction?: LeftFooterAction;\r\n /** Optional. Tooltip that will be shown */\r\n tooltip?: string;\r\n /** */\r\n backButton?: () => void;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n submitAction: (event?: React.FormEvent<HTMLFormElement> | undefined) => void;\r\n note?: string | React.ReactNode;\r\n state?: string;\r\n icon?: React.ReactNode;\r\n zIndex?: number;\r\n contentOverflow?: string;\r\n width?: string;\r\n hasContentBorders?: boolean;\r\n shouldCloseOnOverlayClick?: boolean;\r\n}\r\n\r\nexport const ModalDialog: React.FunctionComponent<ModalDialogProps> = ({\r\n size,\r\n isModalOpen,\r\n title,\r\n topImage,\r\n topImageWithFallbacksProps,\r\n topImageGrayscale,\r\n buttons,\r\n leftFooterAction,\r\n backButton,\r\n closeAction,\r\n submitAction,\r\n tooltip,\r\n children,\r\n note,\r\n shouldCloseOnOverlayClick,\r\n state,\r\n icon,\r\n zIndex,\r\n contentOverflow,\r\n hideCloseButton,\r\n width,\r\n hasContentBorders,\r\n}) => {\r\n\r\n const theme = useTheme();\r\n const getMinWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '320px';\r\n case Size.Large:\r\n return '640px';\r\n case Size.Medium:\r\n default:\r\n return '480px';\r\n }\r\n };\r\n\r\n const getMaxWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '480px';\r\n case Size.Large:\r\n return '720px';\r\n case Size.Medium:\r\n default:\r\n return '640px';\r\n }\r\n };\r\n\r\n const getImageHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 160;\r\n case Size.Medium:\r\n return 200;\r\n case Size.Large:\r\n return 240;\r\n default:\r\n return 200;\r\n }\r\n };\r\n\r\n const getMarginBottom = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px';\r\n case Size.Medium:\r\n return '24px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px';\r\n }\r\n };\r\n\r\n const getPadding = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px 16px 8px';\r\n case Size.Medium:\r\n return '24px 24px 20px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px 24px 16px';\r\n }\r\n };\r\n\r\n const getMaxHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 'calc(100vh - 56px)';\r\n case Size.Medium:\r\n return 'calc(100vh - 76px)';\r\n case Size.Large:\r\n return 'calc(100vh - 96px)';\r\n default:\r\n return 'calc(100vh - 72px)';\r\n }\r\n };\r\n\r\n const ModalTitle = (title: string | React.ReactNode, size?: Size) => {\r\n if (typeof title === 'string') {\r\n switch (size) {\r\n case Size.Small:\r\n return <ComponentM textStyle={ComponentTextStyle.Bold}>{title}</ComponentM>;\r\n case Size.Medium:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n case Size.Large:\r\n return <ComponentXL textStyle={ComponentTextStyle.Bold}>{title}</ComponentXL>;\r\n default:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n }\r\n } else {\r\n return title;\r\n }\r\n };\r\n\r\n const ModalTootip = (tooltip: string) => {\r\n return (\r\n <ModalHoverModifier>\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"top\" withArrow={false} label={tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => {}}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </TooltipWrapper>\r\n </ModalHoverModifier>\r\n );\r\n };\r\n\r\n const ModalCloseButton = (onClick: any) => {\r\n return (\r\n <CloseButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => onClick()} borderRadius={48}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </CloseButtonWrapper>\r\n );\r\n };\r\n\r\n const ModalBackButton = () => {\r\n if (backButton) {\r\n return (\r\n <BackButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => backButton()} borderRadius={48}>\r\n <SystemIcons.ArrowLineLeft size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </BackButtonWrapper>\r\n );\r\n }\r\n };\r\n\r\n const getLeftActionIconElement = (icon: React.ReactNode) => {\r\n return React.cloneElement(icon as React.ReactElement<any>, { size: size === Size.Small ? '20px' : size === Size.Large ? '28px' : '24px' });\r\n };\r\n\r\n const LeftFooterAction = (leftFooterAction: LeftFooterAction) => {\r\n const { text, actionType, disabled, icon, action } = leftFooterAction;\r\n switch (actionType) {\r\n case 'button':\r\n const button = leftFooterAction as LeftFooterButton;\r\n return (\r\n <Button\r\n id={'left-action-button'}\r\n type={button?.type}\r\n disabled={disabled}\r\n loading={button?.loading}\r\n icon={icon}\r\n size={size}\r\n onClick={action}\r\n variant={button?.variant ?? 'secondary'}\r\n style={{ order: -1, marginRight: 'auto' }}>\r\n {button?.children ?? button?.text}\r\n </Button>\r\n );\r\n case 'hyperlink':\r\n return (\r\n <HyperLink\r\n id=\"left-action-hyperlink\"\r\n className=\"footer-action\"\r\n href={(leftFooterAction as LeftFooterHyperlink).href}\r\n disabled={disabled}\r\n 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 {icon && getLeftActionIconElement(icon)}\r\n </HyperLink>\r\n );\r\n case 'note':\r\n return (\r\n <div className=\"footer-action note\">\r\n {icon && getLeftActionIconElement(icon)}\r\n <span>{text}</span>\r\n </div>\r\n );\r\n }\r\n };\r\n\r\n return (\r\n <ModalContainer\r\n showModal={isModalOpen}\r\n closeModal={closeAction}\r\n minWidth={getMinWidth()}\r\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\r\n maxWidth={getMaxWidth()}\r\n height=\"auto\"\r\n padding={getPadding()}\r\n zIndex={zIndex}\r\n width={width}>\r\n <Column>\r\n <form onSubmit={submitAction} style={{ display: 'flex', flexDirection: 'column', maxHeight: getMaxHeight() }}>\r\n {(topImage || topImageWithFallbacksProps) && (\r\n <StyledModalHeader $size={size} $height={getImageHeight()} $marginBottom={getMarginBottom()}>\r\n <ImageContainer $height={getImageHeight()}>\r\n {topImageGrayscale && <ImageOverlay $height={getImageHeight()} />}\r\n {topImage && <img src={topImage} alt=\"Modal top\" />}\r\n {!topImage && topImageWithFallbacksProps && (\r\n <ImageWithFallbacks\r\n loader={topImageWithFallbacksProps.loader}\r\n alt={topImageWithFallbacksProps.alt}\r\n fallbacks={topImageWithFallbacksProps.fallbacks}\r\n src={topImageWithFallbacksProps.src}\r\n />\r\n )}\r\n </ImageContainer>\r\n <ModalHeaderActionsWithImage $hasBackButton={!!backButton}>\r\n {ModalBackButton()}\r\n {!hideCloseButton && ModalCloseButton(closeAction)}\r\n </ModalHeaderActionsWithImage>\r\n </StyledModalHeader>\r\n )}\r\n <ModalTitleSection>\r\n <FlexContainer>\r\n {!(topImage || topImageWithFallbacksProps) && ModalBackButton()}\r\n {title && ModalTitle(title, size)}\r\n </FlexContainer>\r\n {(tooltip || !(topImage || topImageWithFallbacksProps)) && (\r\n <ModalHeaderActions>\r\n {tooltip && ModalTootip(tooltip)}\r\n {!(topImage || topImageWithFallbacksProps || hideCloseButton) && ModalCloseButton(closeAction)}\r\n </ModalHeaderActions>\r\n )}\r\n </ModalTitleSection>\r\n\r\n <ModalBody $size={size} $overflow={contentOverflow} $hasContentBorders={hasContentBorders}>\r\n {children}\r\n </ModalBody>\r\n\r\n {note && <ModalNote note={note} state={state} size={size} icon={icon} />}\r\n\r\n <ModalFooter $size={size}>\r\n {leftFooterAction && LeftFooterAction(leftFooterAction)}\r\n {buttons?.map((b, i) => (\r\n <Button key={b.id || i} icon={b.icon} id={b.id} disabled={b.disabled} loading={b.loading} size={size} onClick={b.action} type={b.type} variant={b.variant}>\r\n {b.children ?? b.text}\r\n </Button>\r\n ))}\r\n </ModalFooter>\r\n </form>\r\n </Column>\r\n </ModalContainer>\r\n );\r\n};\r\n\r\nexport default ModalDialog;\r\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,UAAU,QAAQ,WAAW;AAC9C,SAASC,WAAW,QAAQ,UAAU;AACtC,SAASC,MAAM,EAAEC,UAAU,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,WAAW;AAC3F,SAASC,IAAI,QAAQ,UAAU;AAC/B,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,MAAM,EACNC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,kBAAkB,EAClBC,2BAA2B,EAC3BC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,QACT,eAAe;AAEtB,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,cAAc,QAAQ,aAAa;AAE5C,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,IAAI;AAElD,SAASC,QAAQ,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAsC7C,OAAO,MAAMC,WAAsD,GAAGC,IAAA,IAuBhE;EAAA,IAvBiE;IACrEC,I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AA,CAAAK,MAAA;EACLvF,IAAI,EAAAkF,GAAA,CAAAG,IAAA;EACJpF,MAAM,EAAAiF,GAAA,CAAAS,MAAA;EACNzF,eAAe,EAAAgF,GAAA,CAAAK,MAAA;EACfnF,KAAK,EAAA8E,GAAA,CAAAK,MAAA;EACLlF,iBAAiB,EAAA6E,GAAA,CAAAC,IAAA;EACjBrF,yBAAyB,EAAAoF,GAAA,CAAAC;AAAA;AAiR3B,eAAerG,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"ModalDialog.js","names":["React","TextButton","IconButton","SystemIcons","COLORS","ComponentL","ComponentM","ComponentTextStyle","ComponentXL","Size","ModalContainer","BackButtonWrapper","CloseButtonWrapper","Column","FlexContainer","ModalBody","ModalFooter","ModalHeaderActions","ModalHeaderActionsWithImage","ModalTitleSection","StyledModalHeader","ModalHoverModifier","ImageOverlay","ImageContainer","ModalNote","TooltipWrapper","HyperLink","ImageWithFallbacks","useTheme","jsx","_jsx","jsxs","_jsxs","ModalDialog","_ref","size","isModalOpen","title","topImage","topImageWithFallbacksProps","topImageGrayscale","buttons","leftFooterAction","backButton","closeAction","submitAction","tooltip","children","note","shouldCloseOnOverlayClick","state","icon","zIndex","contentOverflow","hideCloseButton","width","hasContentBorders","theme","getMinWidth","Small","Large","Medium","getMaxWidth","getImageHeight","getMarginBottom","getPadding","getMaxHeight","ModalTitle","textStyle","Bold","ModalTootip","delay","XSmall","align","position","withArrow","label","variant","shape","action","Help","color","generateToken","componentType","defaultVariant","ModalCloseButton","onClick","$hasImage","$size","borderRadius","Close","ModalBackButton","ArrowLineLeft","getLeftActionIconElement","cloneElement","LeftFooterAction","text","actionType","disabled","button","id","type","loading","style","order","marginRight","className","href","e","preventDefault","showModal","closeModal","minWidth","maxWidth","height","padding","onSubmit","display","flexDirection","maxHeight","$height","$marginBottom","src","alt","loader","fallbacks","$hasBackButton","$overflow","$hasContentBorders","map","b","i","propTypes","_pt","bool","isRequired","node","oneOfType","string","any","array","func","number"],"sources":["../../src/Modals/ModalDialog.tsx"],"sourcesContent":["import React from 'react';\r\nimport { TextButton, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { COLORS, ComponentL, ComponentM, ComponentTextStyle, ComponentXL } from '../styles';\r\nimport { Size } from '../types';\r\nimport ModalContainer from './ModalContainer';\r\nimport {\r\n BackButtonWrapper,\r\n CloseButtonWrapper,\r\n Column,\r\n FlexContainer,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeaderActions,\r\n ModalHeaderActionsWithImage,\r\n ModalTitleSection,\r\n StyledModalHeader,\r\n ModalHoverModifier,\r\n ImageOverlay,\r\n ImageContainer,\r\n} from './ModalStyles';\r\n\r\nimport { ModalNote } from './ModalNote';\r\nimport { TooltipWrapper } from '../Tooltips';\r\nimport { ButtonAction, LeftFooterAction, LeftFooterButton, LeftFooterHyperlink } from './ModalTypes';\r\nimport { HyperLink, ImageWithFallbacks } from '..';\r\nimport { ImageWithFallbacksProps } from '../Image/ImageWithFallbacks';\r\nimport { useTheme } from 'styled-components';\r\n\r\nexport interface ModalDialogProps {\r\n /** Optional. Size of the modal. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Required. Current state of the modal. */\r\n isModalOpen: boolean;\r\n /** Optional. Content of the ModalDialog. */\r\n children?: React.ReactNode;\r\n /** Optional. Title of the ModalDialog. */\r\n title?: string | React.ReactNode;\r\n /** Optional. Content of the image to be shown in the header of the modal. */\r\n topImage?: any;\r\n /** Optional. Serves same purpose as 'topImage' except adds support for fallback options. Has higher priority than 'topImage'. */\r\n topImageWithFallbacksProps?: ImageWithFallbacksProps;\r\n /** Optional. If flag is set then overlay is added that converts image to grey color. */\r\n topImageGrayscale?: boolean;\r\n /** Optional. Collection of Buttons that will be shown in the footer on the right side of the ModalDialog. */\r\n buttons?: ButtonAction[];\r\n /** Optional. Left footer action that will be shown on the left side of the footer of ModalDialog. Can be a hyperlink, button or a note. */\r\n leftFooterAction?: LeftFooterAction;\r\n /** Optional. Tooltip that will be shown */\r\n tooltip?: string;\r\n /** */\r\n backButton?: () => void;\r\n closeAction: () => void;\r\n hideCloseButton?: boolean;\r\n submitAction: (event?: React.FormEvent<HTMLFormElement> | undefined) => void;\r\n note?: string | React.ReactNode;\r\n state?: string;\r\n icon?: React.ReactNode;\r\n zIndex?: number;\r\n contentOverflow?: string;\r\n width?: string;\r\n hasContentBorders?: boolean;\r\n shouldCloseOnOverlayClick?: boolean;\r\n}\r\n\r\nexport const ModalDialog: React.FunctionComponent<ModalDialogProps> = ({\r\n size,\r\n isModalOpen,\r\n title,\r\n topImage,\r\n topImageWithFallbacksProps,\r\n topImageGrayscale,\r\n buttons,\r\n leftFooterAction,\r\n backButton,\r\n closeAction,\r\n submitAction,\r\n tooltip,\r\n children,\r\n note,\r\n shouldCloseOnOverlayClick,\r\n state,\r\n icon,\r\n zIndex,\r\n contentOverflow,\r\n hideCloseButton,\r\n width,\r\n hasContentBorders,\r\n}) => {\r\n\r\n const theme = useTheme();\r\n const getMinWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '320px';\r\n case Size.Large:\r\n return '640px';\r\n case Size.Medium:\r\n default:\r\n return '480px';\r\n }\r\n };\r\n\r\n const getMaxWidth = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '480px';\r\n case Size.Large:\r\n return '720px';\r\n case Size.Medium:\r\n default:\r\n return '640px';\r\n }\r\n };\r\n\r\n const getImageHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 160;\r\n case Size.Medium:\r\n return 200;\r\n case Size.Large:\r\n return 240;\r\n default:\r\n return 200;\r\n }\r\n };\r\n\r\n const getMarginBottom = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px';\r\n case Size.Medium:\r\n return '24px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px';\r\n }\r\n };\r\n\r\n const getPadding = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return '16px 16px 8px';\r\n case Size.Medium:\r\n return '24px 24px 20px';\r\n case Size.Large:\r\n return '32px';\r\n default:\r\n return '24px 24px 16px';\r\n }\r\n };\r\n\r\n const getMaxHeight = () => {\r\n switch (size) {\r\n case Size.Small:\r\n return 'calc(100vh - 56px)';\r\n case Size.Medium:\r\n return 'calc(100vh - 76px)';\r\n case Size.Large:\r\n return 'calc(100vh - 96px)';\r\n default:\r\n return 'calc(100vh - 72px)';\r\n }\r\n };\r\n\r\n const ModalTitle = (title: string | React.ReactNode, size?: Size) => {\r\n if (typeof title === 'string') {\r\n switch (size) {\r\n case Size.Small:\r\n return <ComponentM textStyle={ComponentTextStyle.Bold}>{title}</ComponentM>;\r\n case Size.Medium:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n case Size.Large:\r\n return <ComponentXL textStyle={ComponentTextStyle.Bold}>{title}</ComponentXL>;\r\n default:\r\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\r\n }\r\n } else {\r\n return title;\r\n }\r\n };\r\n\r\n const ModalTootip = (tooltip: string) => {\r\n return (\r\n <ModalHoverModifier>\r\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"top\" withArrow={false} label={tooltip}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => {}}>\r\n <SystemIcons.Help size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </TooltipWrapper>\r\n </ModalHoverModifier>\r\n );\r\n };\r\n\r\n const ModalCloseButton = (onClick: any) => {\r\n return (\r\n <CloseButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => onClick()} borderRadius={48}>\r\n <SystemIcons.Close size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </CloseButtonWrapper>\r\n );\r\n };\r\n\r\n const ModalBackButton = () => {\r\n if (backButton) {\r\n return (\r\n <BackButtonWrapper $hasImage={!!topImage || !!topImageWithFallbacksProps} $size={size}>\r\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => backButton()} borderRadius={48}>\r\n <SystemIcons.ArrowLineLeft size=\"24px\" color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} />\r\n </IconButton>\r\n </BackButtonWrapper>\r\n );\r\n }\r\n };\r\n\r\n const getLeftActionIconElement = (icon: React.ReactNode) => {\r\n return React.cloneElement(icon as React.ReactElement<any>, { size: size === Size.Small ? '20px' : size === Size.Large ? '28px' : '24px' });\r\n };\r\n\r\n const LeftFooterAction = (leftFooterAction: LeftFooterAction) => {\r\n const { text, actionType, disabled, icon, action } = leftFooterAction;\r\n switch (actionType) {\r\n case 'button':\r\n const button = leftFooterAction as LeftFooterButton;\r\n return (\r\n <TextButton\r\n id={'left-action-button'}\r\n type={button?.type}\r\n disabled={disabled}\r\n loading={button?.loading}\r\n icon={icon}\r\n size={size}\r\n onClick={action}\r\n variant={button?.variant ?? 'secondary'}\r\n style={{ order: -1, marginRight: 'auto' }}>\r\n {button?.children ?? button?.text}\r\n </TextButton>\r\n );\r\n case 'hyperlink':\r\n return (\r\n <HyperLink\r\n id=\"left-action-hyperlink\"\r\n className=\"footer-action\"\r\n href={(leftFooterAction as LeftFooterHyperlink).href}\r\n disabled={disabled}\r\n 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 {icon && getLeftActionIconElement(icon)}\r\n </HyperLink>\r\n );\r\n case 'note':\r\n return (\r\n <div className=\"footer-action note\">\r\n {icon && getLeftActionIconElement(icon)}\r\n <span>{text}</span>\r\n </div>\r\n );\r\n }\r\n };\r\n\r\n return (\r\n <ModalContainer\r\n showModal={isModalOpen}\r\n closeModal={closeAction}\r\n minWidth={getMinWidth()}\r\n shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}\r\n maxWidth={getMaxWidth()}\r\n height=\"auto\"\r\n padding={getPadding()}\r\n zIndex={zIndex}\r\n width={width}>\r\n <Column>\r\n <form onSubmit={submitAction} style={{ display: 'flex', flexDirection: 'column', maxHeight: getMaxHeight() }}>\r\n {(topImage || topImageWithFallbacksProps) && (\r\n <StyledModalHeader $size={size} $height={getImageHeight()} $marginBottom={getMarginBottom()}>\r\n <ImageContainer $height={getImageHeight()}>\r\n {topImageGrayscale && <ImageOverlay $height={getImageHeight()} />}\r\n {topImage && <img src={topImage} alt=\"Modal top\" />}\r\n {!topImage && topImageWithFallbacksProps && (\r\n <ImageWithFallbacks\r\n loader={topImageWithFallbacksProps.loader}\r\n alt={topImageWithFallbacksProps.alt}\r\n fallbacks={topImageWithFallbacksProps.fallbacks}\r\n src={topImageWithFallbacksProps.src}\r\n />\r\n )}\r\n </ImageContainer>\r\n <ModalHeaderActionsWithImage $hasBackButton={!!backButton}>\r\n {ModalBackButton()}\r\n {!hideCloseButton && ModalCloseButton(closeAction)}\r\n </ModalHeaderActionsWithImage>\r\n </StyledModalHeader>\r\n )}\r\n <ModalTitleSection>\r\n <FlexContainer>\r\n {!(topImage || topImageWithFallbacksProps) && ModalBackButton()}\r\n {title && ModalTitle(title, size)}\r\n </FlexContainer>\r\n {(tooltip || !(topImage || topImageWithFallbacksProps)) && (\r\n <ModalHeaderActions>\r\n {tooltip && ModalTootip(tooltip)}\r\n {!(topImage || topImageWithFallbacksProps || hideCloseButton) && ModalCloseButton(closeAction)}\r\n </ModalHeaderActions>\r\n )}\r\n </ModalTitleSection>\r\n\r\n <ModalBody $size={size} $overflow={contentOverflow} $hasContentBorders={hasContentBorders}>\r\n {children}\r\n </ModalBody>\r\n\r\n {note && <ModalNote note={note} state={state} size={size} icon={icon} />}\r\n\r\n <ModalFooter $size={size}>\r\n {leftFooterAction && LeftFooterAction(leftFooterAction)}\r\n {buttons?.map((b, i) => (\r\n <TextButton key={b.id || i} icon={b.icon} id={b.id} disabled={b.disabled} loading={b.loading} size={size} onClick={b.action} type={b.type} variant={b.variant}>\r\n {b.children ?? b.text}\r\n </TextButton>\r\n ))}\r\n </ModalFooter>\r\n </form>\r\n </Column>\r\n </ModalContainer>\r\n );\r\n};\r\n\r\nexport default ModalDialog;\r\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,UAAU,QAAQ,WAAW;AAClD,SAASC,WAAW,QAAQ,UAAU;AACtC,SAASC,MAAM,EAAEC,UAAU,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,WAAW;AAC3F,SAASC,IAAI,QAAQ,UAAU;AAC/B,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,MAAM,EACNC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,kBAAkB,EAClBC,2BAA2B,EAC3BC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,QACT,eAAe;AAEtB,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,cAAc,QAAQ,aAAa;AAE5C,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,IAAI;AAElD,SAASC,QAAQ,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAsC7C,OAAO,MAAMC,WAAsD,GAAGC,IAAA,IAuBhE;EAAA,IAvBiE;IACrEC,IAAI;IACJC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC,0BAA0B;IAC1BC,iBAAiB;IACjBC,OAAO;IACPC,gBAAgB;IAChBC,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,OAAO;IACPC,QAAQ;IACRC,IAAI;IACJC,yBAAyB;IACzBC,KAAK;IACLC,IAAI;IACJC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,KAAK;IACLC;EACF,CAAC,GAAAtB,IAAA;EAEC,MAAMuB,KAAK,GAAG7B,QAAQ,CAAC,CAAC;EAC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","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {ButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ModalTypes.cjs","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {TextButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<TextButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<TextButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { ButtonProps } from '../Button';
1
+ import { TextButtonProps } from '../Button';
2
2
  import { HyperlinkProps } from '../HyperLink/HyperLink';
3
3
  import { IconButtonProps } from '../Button';
4
4
  import React from 'react';
@@ -15,7 +15,7 @@ export interface ModalHeaderToggleButton extends ToggleButtonProps {
15
15
  componentType: 'toggle';
16
16
  }
17
17
  export type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;
18
- export interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {
18
+ export interface ButtonAction extends Pick<TextButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {
19
19
  action?: (() => void) | ((e: any) => void);
20
20
  text?: string;
21
21
  children?: React.ReactNode;
@@ -28,7 +28,7 @@ export interface LeftFooterActionBase {
28
28
  }
29
29
  export interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {
30
30
  }
31
- export interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {
31
+ export interface LeftFooterButton extends Pick<TextButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {
32
32
  children?: React.ReactNode;
33
33
  }
34
34
  export type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;
@@ -1 +1 @@
1
- {"version":3,"file":"ModalTypes.js","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {ButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ModalTypes.js","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {TextButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<TextButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<TextButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
@@ -251,7 +251,7 @@ const Popover = _ref => {
251
251
  children: [!!bottomSectionProps?.textButton?.icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(TextButtonContainer, {
252
252
  $size: size,
253
253
  "data-testid": 'textBtn',
254
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
254
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.TextButton, {
255
255
  size: size,
256
256
  variant: "secondary",
257
257
  icon: bottomSectionProps.textButton.icon,
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_","_Button","_icons","_styles","_types","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","PopoverContainer","exports","styled","div","props","$size","Size","Small","Large","COLORS","generateToken","componentType","defaultVariant","theme","BOXSHADOWS","BOXSHADOW_CENTERED","Z_INDEXES","popover","$position","Position","Bottom","Top","Left","Right","$showArrowPointer","renderArrowStyles","PopoverTopSectionContainer","PopoverMiddleSectionContainer","scrollBarStyling","PopoverBottomSectionContainer","TextContainer","renderMargins","$note","NoteContainer","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentSStyling","ComponentXSStyling","LabelContainer","Bold","ComponentLStyling","ComponentMStyling","CloseButtonContainer","TextButtonContainer","IconButtonContainer","PopoverWrapper","$showOnClick","$showPopover","isNotePresent","size","position","Popover","_ref","Medium","topSectionProps","bottomSectionProps","mainContent","children","showOnClick","showArrowPointer","showPopover","setShowPopover","useState","useTheme","popoverRef","useRef","useEffect","checkIfClickedOutside","current","contains","target","document","addEventListener","removeEventListener","jsxs","ref","note","jsx","text","IconButton","action","useTransparentBackground","iconColor","variant","shape","SystemIcons","Close","textButton","icon","Button","onClick","label","className","iconButtons","map","iconButton","propTypes","_propTypes","string","isRequired","arrayOf","node","func","bool","_default"],"sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\nimport { Button, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { BOXSHADOWS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXXSStyling, scrollBarStyling, Z_INDEXES } from '../styles';\r\nimport { Position, Size } from '../types';\r\n\r\nexport const PopoverContainer = styled.div<{ $size: Size; $position: Position; $showArrowPointer: boolean }>`\r\n //height: ${(props) => (props.$size === Size.Small ? '240px' : props.$size === Size.Large ? '480px' : '360px')};\r\n min-width: ${(props) => (props.$size === Size.Small ? '320px' : props.$size === Size.Large ? '640px' : '480px')};\r\n border-radius: 4px;\r\n background: ${props => COLORS.generateToken({ componentType: 'bg-surface', defaultVariant: 'high' }, props.theme)};\r\n cursor: default;\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_CENTERED};\r\n\r\n position: absolute; \r\n visibility: hidden;\r\n opacity: 0;\r\n z-index: ${Z_INDEXES.popover};\r\n\r\n ${(props) => (props.$position == Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n ${(props) => (props.$position == Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n\r\n ${(props) => (props.$position == Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n ${(props) => (props.$position == Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n\r\n &::after {\r\n ${(props) => (props.$showArrowPointer ? renderArrowStyles(props.$position) : '')}\r\n`;\r\n\r\nexport const PopoverTopSectionContainer = styled.div<{ $size: Size }>`\r\n height: ${(props) => (props.$size === Size.Small ? '56px' : props.$size === Size.Large ? '72px' : '64px')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverMiddleSectionContainer = styled.div<{ $size: Size }>`\r\n margin: 8px;\r\n height: ${(props) => (props.$size === Size.Small ? '104px' : props.$size === Size.Large ? '304px' : '208px')};\r\n padding: ${(props) => (props.$size === Size.Small ? '0 8px' : props.$size === Size.Large ? '0 16px' : '0 12px')};\r\n overflow-y: auto;\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nexport const PopoverBottomSectionContainer = styled.div<{ $size: Size }>`\r\n height: ${(props) => (props.$size === Size.Small ? '64px' : props.$size === Size.Large ? '88px' : '72px')}; \r\n display: flex;\r\n\r\n .bottom-flex {\r\n flex: 1;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{ $note: boolean; $size: Size }>`\r\n display: flex;\r\n flex-direction: column;\r\n color: ${props => COLORS.generateToken({ componentType: 'text', defaultVariant: 'default' }, props.theme)};\r\n margin: ${(props) => renderMargins(props.$note, props.$size)};\r\n flex-grow: 1;\r\n`;\r\n\r\nconst NoteContainer = styled.div<{ $size: Size }>`\r\n ${(props) =>\r\n props.$size === Size.Small\r\n ? ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme))\r\n : props.$size === Size.Large\r\n ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme))\r\n : ComponentXSStyling(ComponentTextStyle.Regular, COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme))}\r\n`;\r\n\r\nconst LabelContainer = styled.div<{ $size: Size }>`\r\n ${(props) =>\r\n props.$size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, null)\r\n : props.$size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, null)\r\n : ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\nconst CloseButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '4px 16px 4px 0' : props.$size === Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0')};\r\n`;\r\n\r\nconst TextButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '8px 0 8px 16px' : props.$size === Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px')};\r\n`;\r\n\r\nconst IconButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '8px 16px 8px 0' : props.$size === Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverWrapper = styled.div<{ $position: Position; $showOnClick: boolean; $showPopover: boolean }>`\r\n position: relative;\r\n\r\n .pointer-space {\r\n height: ${(props) => (props.$position === Position.Top || props.$position === Position.Bottom ? '16px' : '100%')};\r\n width: ${(props) => (props.$position === Position.Left || props.$position === Position.Right ? '16px' : '100%')};\r\n position: absolute;\r\n\r\n ${(props) => (props.$position === Position.Left ? 'right:100%; bottom: 0%' : '')};\r\n ${(props) => (props.$position === Position.Right ? 'left:100%; bottom: 0%' : '')};\r\n\r\n ${(props) => (props.$position === Position.Top ? 'bottom: 100%' : '')};\r\n ${(props) => (props.$position === Position.Bottom ? 'top: 100%' : '')};\r\n }\r\n\r\n ${(props) =>\r\n props.$showOnClick\r\n ? `${PopoverContainer} {\r\n visibility: ${props.$showPopover ? 'visible' : 'hidden'};\r\n opacity: ${props.$showPopover ? '1' : '0'};\r\n }\r\n cursor: pointer;`\r\n : `&:hover {\r\n ${PopoverContainer} {\r\n visibility: visible;\r\n opacity: 1;\r\n }\r\n }`}\r\n`;\r\n\r\nconst renderMargins = (isNotePresent: boolean, size: Size): string => {\r\n if (isNotePresent) {\r\n return size === Size.Small ? '10px 16px' : size === Size.Large ? '14px 24px' : '12px 20px';\r\n } else {\r\n return size === Size.Small ? '18px 16px' : size === Size.Large ? '24px' : '20px';\r\n }\r\n};\r\n\r\nconst renderArrowStyles = (position: Position) => {\r\n if (position === Position.Bottom) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid transparent;\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid rgb(255,255,255);\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n bottom: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Top) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid rgb(255,255,255);\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid transparent;\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n top: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Left) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid transparent;\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid rgb(255,255,255);\r\n content: \"\";\r\n position: absolute;\r\n left: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n\r\n if (position === Position.Right) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid rgb(255,255,255);\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n};\r\n\r\nexport interface PopoverTopSectionProps {\r\n /**\r\n * Required. The main text to be displayed in the top section of the popover.\r\n */\r\n text: string;\r\n\r\n /**\r\n * Optional. A note to be displayed below the main text in the top section of the popover.\r\n */\r\n note?: string;\r\n};\r\n\r\nexport interface PopoverActionButtonProps {\r\n /**\r\n * Required. The icon to be displayed on the button.\r\n */\r\n icon: React.ReactNode;\r\n\r\n /**\r\n * Required. The handler function to be called when the button is clicked.\r\n */\r\n action: () => void;\r\n\r\n /**\r\n * Optional. The label for the button. If provided, the button will display this text.\r\n */\r\n label?: string;\r\n};\r\n\r\nexport interface PopoverBottomSectionProps {\r\n /**\r\n * Optional. An array of PopoverActionButtonProps objects.\r\n * Each object represents an icon button to be displayed in the bottom section of the popover.\r\n */\r\n iconButtons?: PopoverActionButtonProps[];\r\n\r\n /**\r\n * Optional. A PopoverActionButtonProps object representing a text button to be displayed in the bottom section of the popover.\r\n */\r\n textButton?: PopoverActionButtonProps;\r\n};\r\n\r\nexport interface PopoverProps {\r\n /**\r\n * Optional. The size of the popover. It can be 'Small', 'Medium', or 'Large'.\r\n * Defaults to 'Medium' if not specified.\r\n */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n\r\n /**\r\n * Optional. Properties for the top section of the popover.\r\n */\r\n topSectionProps?: PopoverTopSectionProps;\r\n\r\n /**\r\n * Optional. Properties for the bottom section of the popover.\r\n */\r\n bottomSectionProps?: PopoverBottomSectionProps;\r\n\r\n /**\r\n * Required. The main content to be displayed in the popover.\r\n */\r\n mainContent: React.ReactNode;\r\n\r\n /**\r\n * Required. The children to be rendered inside the popover.\r\n */\r\n children: React.ReactNode;\r\n\r\n /**\r\n * Required. The position of the popover relative to the target element.\r\n * It can be 'Top', 'Bottom', 'Right', or 'Left'.\r\n */\r\n position: Position.Top | Position.Bottom | Position.Right | Position.Left;\r\n\r\n /**\r\n * Required. A boolean indicating whether the popover should be shown when the target element is clicked. Defaults to 'false', meaning that popover will be shown on mouse hover.\r\n */\r\n showOnClick: boolean;\r\n\r\n /**\r\n * Optional. A boolean indicating whether an arrow pointer should be shown on the popover.\r\n * Defaults to 'false' if not specified.\r\n */\r\n showArrowPointer?: boolean;\r\n};\r\n\r\nconst Popover: React.FunctionComponent<PopoverProps> = ({\r\n size = Size.Medium,\r\n topSectionProps,\r\n bottomSectionProps,\r\n mainContent,\r\n children,\r\n position,\r\n showOnClick = false,\r\n showArrowPointer = false,\r\n}) => {\r\n const [showPopover, setShowPopover] = React.useState(false);\r\n const theme = useTheme();\r\n const popoverRef = React.useRef<any>(null);\r\n\r\n React.useEffect(() => {\r\n const checkIfClickedOutside = (e: { target: any }) => {\r\n if (showPopover && popoverRef.current && !popoverRef.current.contains(e.target)) {\r\n setShowPopover(false);\r\n }\r\n };\r\n\r\n document.addEventListener('mousedown', checkIfClickedOutside);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', checkIfClickedOutside);\r\n };\r\n }, [showPopover]);\r\n\r\n return (\r\n <PopoverWrapper $position={position} $showOnClick={showOnClick} $showPopover={showPopover}>\r\n <PopoverContainer $size={size} $position={position} ref={popoverRef} $showArrowPointer={showArrowPointer}>\r\n {!!topSectionProps && (\r\n <PopoverTopSectionContainer $size={size}>\r\n <TextContainer $note={!!topSectionProps?.note} $size={size}>\r\n {topSectionProps?.note && <NoteContainer $size={size}>{topSectionProps.note}</NoteContainer>}\r\n <LabelContainer $size={size}>{topSectionProps?.text}</LabelContainer>\r\n </TextContainer>\r\n\r\n {showOnClick && (\r\n <CloseButtonContainer $size={size} data-testid={'closeBtn'}>\r\n <IconButton action={() => setShowPopover(false)} useTransparentBackground \r\n iconColor={COLORS.generateToken({ componentType: 'icon', defaultVariant: 'subtle' }, theme)} variant=\"secondary\" shape=\"circular\">\r\n <SystemIcons.Close />\r\n </IconButton>\r\n </CloseButtonContainer>\r\n )}\r\n </PopoverTopSectionContainer>\r\n )}\r\n\r\n <PopoverMiddleSectionContainer $size={size}>{mainContent}</PopoverMiddleSectionContainer>\r\n\r\n {!!bottomSectionProps && (\r\n <PopoverBottomSectionContainer $size={size}>\r\n {!!bottomSectionProps?.textButton?.icon && (\r\n <TextButtonContainer $size={size} data-testid={'textBtn'}>\r\n <Button size={size} variant=\"secondary\" icon={bottomSectionProps.textButton.icon} onClick={bottomSectionProps.textButton.action}>\r\n {bottomSectionProps.textButton.label}\r\n </Button>\r\n </TextButtonContainer>\r\n )}\r\n\r\n <div className=\"bottom-flex\" />\r\n\r\n <IconButtonContainer $size={size} data-testid={'iconBtn'}>\r\n {bottomSectionProps?.iconButtons?.map((iconButton) => (\r\n <IconButton action={iconButton.action} variant=\"secondary\" shape=\"circular\" useTransparentBackground>\r\n {iconButton.icon}\r\n </IconButton>\r\n ))}\r\n </IconButtonContainer>\r\n </PopoverBottomSectionContainer>\r\n )}\r\n </PopoverContainer>\r\n\r\n <div onClick={() => showOnClick && setShowPopover(!showPopover)}>\r\n {children}\r\n\r\n <div className=\"pointer-space\" />\r\n </div>\r\n </PopoverWrapper>\r\n );\r\n};\r\n\r\nexport default Popover;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,CAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,G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AhH,OAAA,CAAAsH,IAAA,CAAAJ,UAAA;EAMXxC,gBAAgB,EAAAsC,UAAA,CAAAhH,OAAA,CAAAsH;AAAA;AAAA,IAAAC,QAAA,GAAAxG,OAAA,CAAAf,OAAA,GAsFHkE,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"Popover.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_","_Button","_icons","_styles","_types","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","PopoverContainer","exports","styled","div","props","$size","Size","Small","Large","COLORS","generateToken","componentType","defaultVariant","theme","BOXSHADOWS","BOXSHADOW_CENTERED","Z_INDEXES","popover","$position","Position","Bottom","Top","Left","Right","$showArrowPointer","renderArrowStyles","PopoverTopSectionContainer","PopoverMiddleSectionContainer","scrollBarStyling","PopoverBottomSectionContainer","TextContainer","renderMargins","$note","NoteContainer","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentSStyling","ComponentXSStyling","LabelContainer","Bold","ComponentLStyling","ComponentMStyling","CloseButtonContainer","TextButtonContainer","IconButtonContainer","PopoverWrapper","$showOnClick","$showPopover","isNotePresent","size","position","Popover","_ref","Medium","topSectionProps","bottomSectionProps","mainContent","children","showOnClick","showArrowPointer","showPopover","setShowPopover","useState","useTheme","popoverRef","useRef","useEffect","checkIfClickedOutside","current","contains","target","document","addEventListener","removeEventListener","jsxs","ref","note","jsx","text","IconButton","action","useTransparentBackground","iconColor","variant","shape","SystemIcons","Close","textButton","icon","TextButton","onClick","label","className","iconButtons","map","iconButton","propTypes","_propTypes","string","isRequired","arrayOf","node","func","bool","_default"],"sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';\r\nimport { TextButton, IconButton } from '../Button';\r\nimport { SystemIcons } from '../icons';\r\nimport { BOXSHADOWS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXXSStyling, scrollBarStyling, Z_INDEXES } from '../styles';\r\nimport { Position, Size } from '../types';\r\n\r\nexport const PopoverContainer = styled.div<{ $size: Size; $position: Position; $showArrowPointer: boolean }>`\r\n //height: ${(props) => (props.$size === Size.Small ? '240px' : props.$size === Size.Large ? '480px' : '360px')};\r\n min-width: ${(props) => (props.$size === Size.Small ? '320px' : props.$size === Size.Large ? '640px' : '480px')};\r\n border-radius: 4px;\r\n background: ${props => COLORS.generateToken({ componentType: 'bg-surface', defaultVariant: 'high' }, props.theme)};\r\n cursor: default;\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_CENTERED};\r\n\r\n position: absolute; \r\n visibility: hidden;\r\n opacity: 0;\r\n z-index: ${Z_INDEXES.popover};\r\n\r\n ${(props) => (props.$position == Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n ${(props) => (props.$position == Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : '')}\r\n\r\n ${(props) => (props.$position == Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n ${(props) => (props.$position == Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : '')}\r\n\r\n &::after {\r\n ${(props) => (props.$showArrowPointer ? renderArrowStyles(props.$position) : '')}\r\n`;\r\n\r\nexport const PopoverTopSectionContainer = styled.div<{ $size: Size }>`\r\n height: ${(props) => (props.$size === Size.Small ? '56px' : props.$size === Size.Large ? '72px' : '64px')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverMiddleSectionContainer = styled.div<{ $size: Size }>`\r\n margin: 8px;\r\n height: ${(props) => (props.$size === Size.Small ? '104px' : props.$size === Size.Large ? '304px' : '208px')};\r\n padding: ${(props) => (props.$size === Size.Small ? '0 8px' : props.$size === Size.Large ? '0 16px' : '0 12px')};\r\n overflow-y: auto;\r\n ${scrollBarStyling(Size.Small)}\r\n`;\r\n\r\nexport const PopoverBottomSectionContainer = styled.div<{ $size: Size }>`\r\n height: ${(props) => (props.$size === Size.Small ? '64px' : props.$size === Size.Large ? '88px' : '72px')}; \r\n display: flex;\r\n\r\n .bottom-flex {\r\n flex: 1;\r\n }\r\n`;\r\n\r\nconst TextContainer = styled.div<{ $note: boolean; $size: Size }>`\r\n display: flex;\r\n flex-direction: column;\r\n color: ${props => COLORS.generateToken({ componentType: 'text', defaultVariant: 'default' }, props.theme)};\r\n margin: ${(props) => renderMargins(props.$note, props.$size)};\r\n flex-grow: 1;\r\n`;\r\n\r\nconst NoteContainer = styled.div<{ $size: Size }>`\r\n ${(props) =>\r\n props.$size === Size.Small\r\n ? ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme))\r\n : props.$size === Size.Large\r\n ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme))\r\n : ComponentXSStyling(ComponentTextStyle.Regular, COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme))}\r\n`;\r\n\r\nconst LabelContainer = styled.div<{ $size: Size }>`\r\n ${(props) =>\r\n props.$size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, null)\r\n : props.$size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, null)\r\n : ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n`;\r\n\r\nconst CloseButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '4px 16px 4px 0' : props.$size === Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0')};\r\n`;\r\n\r\nconst TextButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '8px 0 8px 16px' : props.$size === Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px')};\r\n`;\r\n\r\nconst IconButtonContainer = styled.div<{ $size: Size }>`\r\n margin: ${(props) => (props.$size === Size.Small ? '8px 16px 8px 0' : props.$size === Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0')};\r\n display: flex;\r\n`;\r\n\r\nexport const PopoverWrapper = styled.div<{ $position: Position; $showOnClick: boolean; $showPopover: boolean }>`\r\n position: relative;\r\n\r\n .pointer-space {\r\n height: ${(props) => (props.$position === Position.Top || props.$position === Position.Bottom ? '16px' : '100%')};\r\n width: ${(props) => (props.$position === Position.Left || props.$position === Position.Right ? '16px' : '100%')};\r\n position: absolute;\r\n\r\n ${(props) => (props.$position === Position.Left ? 'right:100%; bottom: 0%' : '')};\r\n ${(props) => (props.$position === Position.Right ? 'left:100%; bottom: 0%' : '')};\r\n\r\n ${(props) => (props.$position === Position.Top ? 'bottom: 100%' : '')};\r\n ${(props) => (props.$position === Position.Bottom ? 'top: 100%' : '')};\r\n }\r\n\r\n ${(props) =>\r\n props.$showOnClick\r\n ? `${PopoverContainer} {\r\n visibility: ${props.$showPopover ? 'visible' : 'hidden'};\r\n opacity: ${props.$showPopover ? '1' : '0'};\r\n }\r\n cursor: pointer;`\r\n : `&:hover {\r\n ${PopoverContainer} {\r\n visibility: visible;\r\n opacity: 1;\r\n }\r\n }`}\r\n`;\r\n\r\nconst renderMargins = (isNotePresent: boolean, size: Size): string => {\r\n if (isNotePresent) {\r\n return size === Size.Small ? '10px 16px' : size === Size.Large ? '14px 24px' : '12px 20px';\r\n } else {\r\n return size === Size.Small ? '18px 16px' : size === Size.Large ? '24px' : '20px';\r\n }\r\n};\r\n\r\nconst renderArrowStyles = (position: Position) => {\r\n if (position === Position.Bottom) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid transparent;\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid rgb(255,255,255);\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n bottom: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Top) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 16px solid rgb(255,255,255);\r\n border-right: 12px solid transparent;\r\n border-bottom: 16px solid transparent;\r\n border-left: 12px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(50% - 12px);\r\n top: calc(100% - 1px);`;\r\n }\r\n\r\n if (position === Position.Left) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid transparent;\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid rgb(255,255,255);\r\n content: \"\";\r\n position: absolute;\r\n left: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n\r\n if (position === Position.Right) {\r\n return `height: 0px;\r\n width: 0px;\r\n border-top: 12px solid transparent;\r\n border-right: 16px solid rgb(255,255,255);\r\n border-bottom: 12px solid transparent;\r\n border-left: 16px solid transparent;\r\n content: \"\";\r\n position: absolute;\r\n right: calc(100% - 1px);\r\n bottom: calc(50% - 12px);`;\r\n }\r\n};\r\n\r\nexport interface PopoverTopSectionProps {\r\n /**\r\n * Required. The main text to be displayed in the top section of the popover.\r\n */\r\n text: string;\r\n\r\n /**\r\n * Optional. A note to be displayed below the main text in the top section of the popover.\r\n */\r\n note?: string;\r\n};\r\n\r\nexport interface PopoverActionButtonProps {\r\n /**\r\n * Required. The icon to be displayed on the button.\r\n */\r\n icon: React.ReactNode;\r\n\r\n /**\r\n * Required. The handler function to be called when the button is clicked.\r\n */\r\n action: () => void;\r\n\r\n /**\r\n * Optional. The label for the button. If provided, the button will display this text.\r\n */\r\n label?: string;\r\n};\r\n\r\nexport interface PopoverBottomSectionProps {\r\n /**\r\n * Optional. An array of PopoverActionButtonProps objects.\r\n * Each object represents an icon button to be displayed in the bottom section of the popover.\r\n */\r\n iconButtons?: PopoverActionButtonProps[];\r\n\r\n /**\r\n * Optional. A PopoverActionButtonProps object representing a text button to be displayed in the bottom section of the popover.\r\n */\r\n textButton?: PopoverActionButtonProps;\r\n};\r\n\r\nexport interface PopoverProps {\r\n /**\r\n * Optional. The size of the popover. It can be 'Small', 'Medium', or 'Large'.\r\n * Defaults to 'Medium' if not specified.\r\n */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n\r\n /**\r\n * Optional. Properties for the top section of the popover.\r\n */\r\n topSectionProps?: PopoverTopSectionProps;\r\n\r\n /**\r\n * Optional. Properties for the bottom section of the popover.\r\n */\r\n bottomSectionProps?: PopoverBottomSectionProps;\r\n\r\n /**\r\n * Required. The main content to be displayed in the popover.\r\n */\r\n mainContent: React.ReactNode;\r\n\r\n /**\r\n * Required. The children to be rendered inside the popover.\r\n */\r\n children: React.ReactNode;\r\n\r\n /**\r\n * Required. The position of the popover relative to the target element.\r\n * It can be 'Top', 'Bottom', 'Right', or 'Left'.\r\n */\r\n position: Position.Top | Position.Bottom | Position.Right | Position.Left;\r\n\r\n /**\r\n * Required. A boolean indicating whether the popover should be shown when the target element is clicked. Defaults to 'false', meaning that popover will be shown on mouse hover.\r\n */\r\n showOnClick: boolean;\r\n\r\n /**\r\n * Optional. A boolean indicating whether an arrow pointer should be shown on the popover.\r\n * Defaults to 'false' if not specified.\r\n */\r\n showArrowPointer?: boolean;\r\n};\r\n\r\nconst Popover: React.FunctionComponent<PopoverProps> = ({\r\n size = Size.Medium,\r\n topSectionProps,\r\n bottomSectionProps,\r\n mainContent,\r\n children,\r\n position,\r\n showOnClick = false,\r\n showArrowPointer = false,\r\n}) => {\r\n const [showPopover, setShowPopover] = React.useState(false);\r\n const theme = useTheme();\r\n const popoverRef = React.useRef<any>(null);\r\n\r\n React.useEffect(() => {\r\n const checkIfClickedOutside = (e: { target: any }) => {\r\n if (showPopover && popoverRef.current && !popoverRef.current.contains(e.target)) {\r\n setShowPopover(false);\r\n }\r\n };\r\n\r\n document.addEventListener('mousedown', checkIfClickedOutside);\r\n\r\n return () => {\r\n document.removeEventListener('mousedown', checkIfClickedOutside);\r\n };\r\n }, [showPopover]);\r\n\r\n return (\r\n <PopoverWrapper $position={position} $showOnClick={showOnClick} $showPopover={showPopover}>\r\n <PopoverContainer $size={size} $position={position} ref={popoverRef} $showArrowPointer={showArrowPointer}>\r\n {!!topSectionProps && (\r\n <PopoverTopSectionContainer $size={size}>\r\n <TextContainer $note={!!topSectionProps?.note} $size={size}>\r\n {topSectionProps?.note && <NoteContainer $size={size}>{topSectionProps.note}</NoteContainer>}\r\n <LabelContainer $size={size}>{topSectionProps?.text}</LabelContainer>\r\n </TextContainer>\r\n\r\n {showOnClick && (\r\n <CloseButtonContainer $size={size} data-testid={'closeBtn'}>\r\n <IconButton action={() => setShowPopover(false)} useTransparentBackground \r\n iconColor={COLORS.generateToken({ componentType: 'icon', defaultVariant: 'subtle' }, theme)} variant=\"secondary\" shape=\"circular\">\r\n <SystemIcons.Close />\r\n </IconButton>\r\n </CloseButtonContainer>\r\n )}\r\n </PopoverTopSectionContainer>\r\n )}\r\n\r\n <PopoverMiddleSectionContainer $size={size}>{mainContent}</PopoverMiddleSectionContainer>\r\n\r\n {!!bottomSectionProps && (\r\n <PopoverBottomSectionContainer $size={size}>\r\n {!!bottomSectionProps?.textButton?.icon && (\r\n <TextButtonContainer $size={size} data-testid={'textBtn'}>\r\n <TextButton size={size} variant=\"secondary\" icon={bottomSectionProps.textButton.icon} onClick={bottomSectionProps.textButton.action}>\r\n {bottomSectionProps.textButton.label}\r\n </TextButton>\r\n </TextButtonContainer>\r\n )}\r\n\r\n <div className=\"bottom-flex\" />\r\n\r\n <IconButtonContainer $size={size} data-testid={'iconBtn'}>\r\n {bottomSectionProps?.iconButtons?.map((iconButton) => (\r\n <IconButton action={iconButton.action} variant=\"secondary\" shape=\"circular\" useTransparentBackground>\r\n {iconButton.icon}\r\n </IconButton>\r\n ))}\r\n </IconButtonContainer>\r\n </PopoverBottomSectionContainer>\r\n )}\r\n </PopoverContainer>\r\n\r\n <div onClick={() => showOnClick && setShowPopover(!showPopover)}>\r\n {children}\r\n\r\n <div className=\"pointer-space\" />\r\n </div>\r\n </PopoverWrapper>\r\n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AA,CAAAH,UAAA;MAKNR,KAAK,EAAAM,UAAA,CAAAhH,OAAA,CAAAiH;IAAA;EAAA;EAoCL1C,WAAW,EAAAyC,UAAA,CAAAhH,OAAA,CAAAoH,IAAA,CAAAF,UAAA;EAKX1C,QAAQ,EAAAwC,UAAA,CAAAhH,OAAA,CAAAoH,IAAA,CAAAF,UAAA;EAWRzC,WAAW,EAAAuC,UAAA,CAAAhH,OAAA,CAAAsH,IAAA,CAAAJ,UAAA;EAMXxC,gBAAgB,EAAAsC,UAAA,CAAAhH,OAAA,CAAAsH;AAAA;AAAA,IAAAC,QAAA,GAAAxG,OAAA,CAAAf,OAAA,GAsFHkE,OAAO","ignoreList":[]}
@@ -2,7 +2,7 @@ import _pt from "prop-types";
2
2
  import * as React from 'react';
3
3
  import styled, { useTheme } from 'styled-components';
4
4
  import { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';
5
- import { Button, IconButton } from '../Button';
5
+ import { TextButton, IconButton } from '../Button';
6
6
  import { SystemIcons } from '../icons';
7
7
  import { BOXSHADOWS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXXSStyling, scrollBarStyling, Z_INDEXES } from '../styles';
8
8
  import { Position, Size } from '../types';
@@ -242,7 +242,7 @@ const Popover = _ref => {
242
242
  children: [!!bottomSectionProps?.textButton?.icon && /*#__PURE__*/_jsx(TextButtonContainer, {
243
243
  $size: size,
244
244
  "data-testid": 'textBtn',
245
- children: /*#__PURE__*/_jsx(Button, {
245
+ children: /*#__PURE__*/_jsx(TextButton, {
246
246
  size: size,
247
247
  variant: "secondary",
248
248
  icon: bottomSectionProps.textButton.icon,