@laerdal/life-react-components 5.0.0 → 5.0.2-dev.1

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.
@@ -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","state","icon","zIndex","contentOverflow","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","getColor","ModalCloseButton","onClick","CloseButtonWrapper","$hasImage","$size","borderRadius","Close","ModalBackButton","BackButtonWrapper","ArrowLineLeft","getLeftActionIconElement","React","cloneElement","LeftFooterAction","_button$variant","_button$children","text","actionType","disabled","button","Button","id","type","loading","style","order","marginRight","jsxs","HyperLink","className","href","e","preventDefault","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","_b$children","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 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}\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 state,\r\n icon,\r\n zIndex,\r\n contentOverflow,\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.getColor('neutral_600', 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.getColor('black', 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.getColor('black', 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, { 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 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 {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) && 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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AAAgH,UAAA,YAAAS,MAAA;EACNxH,eAAe,EAAA+G,UAAA,YAAAK,MAAA;EACfnH,KAAK,EAAA8G,UAAA,YAAAK,MAAA;EACLlH,iBAAiB,EAAA6G,UAAA,YAAAC;AAAA;AAAA,IAAAS,QAAA,GA8QJ5I,WAAW;AAAAgI,OAAA,cAAAY,QAAA","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","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","getColor","ModalCloseButton","onClick","CloseButtonWrapper","$hasImage","$size","borderRadius","Close","ModalBackButton","BackButtonWrapper","ArrowLineLeft","getLeftActionIconElement","React","cloneElement","LeftFooterAction","_button$variant","_button$children","text","actionType","disabled","button","Button","id","type","loading","style","order","marginRight","jsxs","HyperLink","className","href","e","preventDefault","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","_b$children","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 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 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.getColor('neutral_600', 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.getColor('black', 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.getColor('black', 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, { 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 {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) && 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"],"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,WAAW,EAAAwH,UAAA,YAAAQ,IAAA,CAAAN,UAAA;EACXzH,YAAY,EAAAuH,UAAA,YAAAQ,IAAA,CAAAN,UAAA;EACZtH,IAAI,EAAAoH,UAAA,YAAAI,SAAA,EAAAJ,UAAA,YAAAK,MAAA,EAAAL,UAAA,YAAAG,IAAA;EACJrH,KAAK,EAAAkH,UAAA,YAAAK,MAAA;EACLtH,IAAI,EAAAiH,UAAA,YAAAG,IAAA;EACJnH,MAAM,EAAAgH,UAAA,YAAAS,MAAA;EACNxH,eAAe,EAAA+G,UAAA,YAAAK,MAAA;EACfnH,KAAK,EAAA8G,UAAA,YAAAK,MAAA;EACLlH,iBAAiB,EAAA6G,UAAA,YAAAC,IAAA;EACjBpH,yBAAyB,EAAAmH,UAAA,YAAAC;AAAA;AAAA,IAAAS,QAAA,GAgRZ7I,WAAW;AAAAiI,OAAA,cAAAY,QAAA","ignoreList":[]}
@@ -34,6 +34,7 @@ export interface ModalDialogProps {
34
34
  contentOverflow?: string;
35
35
  width?: string;
36
36
  hasContentBorders?: boolean;
37
+ shouldCloseOnOverlayClick?: boolean;
37
38
  }
38
39
  export declare const ModalDialog: React.FunctionComponent<ModalDialogProps>;
39
40
  export default ModalDialog;
@@ -27,6 +27,7 @@ export var ModalDialog = function ModalDialog(_ref) {
27
27
  tooltip = _ref.tooltip,
28
28
  children = _ref.children,
29
29
  note = _ref.note,
30
+ shouldCloseOnOverlayClick = _ref.shouldCloseOnOverlayClick,
30
31
  state = _ref.state,
31
32
  icon = _ref.icon,
32
33
  zIndex = _ref.zIndex,
@@ -249,6 +250,7 @@ export var ModalDialog = function ModalDialog(_ref) {
249
250
  showModal: isModalOpen,
250
251
  closeModal: closeAction,
251
252
  minWidth: getMinWidth(),
253
+ shouldCloseOnOverlayClick: shouldCloseOnOverlayClick,
252
254
  maxWidth: getMaxWidth(),
253
255
  height: "auto",
254
256
  padding: getPadding(),
@@ -337,7 +339,8 @@ ModalDialog.propTypes = {
337
339
  zIndex: _pt.number,
338
340
  contentOverflow: _pt.string,
339
341
  width: _pt.string,
340
- hasContentBorders: _pt.bool
342
+ hasContentBorders: _pt.bool,
343
+ shouldCloseOnOverlayClick: _pt.bool
341
344
  };
342
345
  export default ModalDialog;
343
346
  //# sourceMappingURL=ModalDialog.js.map
@@ -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","state","icon","zIndex","contentOverflow","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","getColor","ModalCloseButton","onClick","$hasImage","$size","borderRadius","Close","ModalBackButton","ArrowLineLeft","getLeftActionIconElement","cloneElement","LeftFooterAction","_button$variant","_button$children","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","_b$children","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 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}\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 state,\r\n icon,\r\n zIndex,\r\n contentOverflow,\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.getColor('neutral_600', 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.getColor('black', 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.getColor('black', 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, { 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 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 {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) && 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,U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AsF,GAAA,CAAAK,MAAA;EAEP9F,UAAU,EAAAyF,GAAA,CAAAQ,IAAA;EACVhG,WAAW,EAAAwF,GAAA,CAAAQ,IAAA,CAAAN,UAAA;EACXzF,YAAY,EAAAuF,GAAA,CAAAQ,IAAA,CAAAN,UAAA;EACZtF,IAAI,EAAAoF,GAAA,CAAAI,SAAA,EAAAJ,GAAA,CAAAK,MAAA,EAAAL,GAAA,CAAAG,IAAA;EACJtF,KAAK,EAAAmF,GAAA,CAAAK,MAAA;EACLvF,IAAI,EAAAkF,GAAA,CAAAG,IAAA;EACJpF,MAAM,EAAAiF,GAAA,CAAAS,MAAA;EACNzF,eAAe,EAAAgF,GAAA,CAAAK,MAAA;EACfpF,KAAK,EAAA+E,GAAA,CAAAK,MAAA;EACLnF,iBAAiB,EAAA8E,GAAA,CAAAC;AAAA;AA8QnB,eAAepG,WAAW","ignoreList":[]}
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","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","getColor","ModalCloseButton","onClick","$hasImage","$size","borderRadius","Close","ModalBackButton","ArrowLineLeft","getLeftActionIconElement","cloneElement","LeftFooterAction","_button$variant","_button$children","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","_b$children","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 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 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.getColor('neutral_600', 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.getColor('black', 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.getColor('black', 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, { 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 {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) && 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;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAqC7C,OAAO,IAAMC,WAAsD,GAAG,SAAzDA,WAAsDA,CAAAC,IAAA,EAsB7D;EAAA,IArBJC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,0BAA0B,GAAAL,IAAA,CAA1BK,0BAA0B;IAC1BC,iBAAiB,GAAAN,IAA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ing-library/jest-dom';
@@ -13,26 +13,27 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
13
13
  var _ = require(".");
14
14
  var _types = require("../types");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
16
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
- var TypographyBase = (0, _styledComponents["default"])('div')(function (_ref) {
20
- var $color = _ref.$color,
21
- lineHeight = _ref.$lineHeight,
22
- $fontSize = _ref.$fontSize,
23
- $fontWeight = _ref.$fontWeight,
24
- $fontStyle = _ref.$fontStyle,
25
- textTransform = _ref.$textTransform,
26
- textDecorationLine = _ref.$textDecorationLine;
27
- return {
28
- fontSize: $fontSize,
29
- fontWeight: $fontWeight,
30
- lineHeight: lineHeight + 'px',
31
- textTransform: textTransform ? textTransform : 'none',
32
- textDecorationLine: textDecorationLine ? textDecorationLine : 'none',
33
- fontStyle: $fontStyle ? $fontStyle : 'normal',
34
- color: $color ? $color : _.COLORS.black
35
- };
19
+ var TypographyBase = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n fontSize: ", ";\n fontWeight: ", ";\n lineHeight: ", "px;\n textTransform: ", ";\n textDecorationLine: ", ";\n fontStyle: ", ";\n color: ", ";\n"])), function (props) {
20
+ return props.$fontSize;
21
+ }, function (props) {
22
+ return props.$fontWeight;
23
+ }, function (props) {
24
+ return props.$lineHeight;
25
+ }, function (props) {
26
+ var _props$$textTransform;
27
+ return (_props$$textTransform = props.$textTransform) !== null && _props$$textTransform !== void 0 ? _props$$textTransform : 'none';
28
+ }, function (props) {
29
+ var _props$$textDecoratio;
30
+ return (_props$$textDecoratio = props.$textDecorationLine) !== null && _props$$textDecoratio !== void 0 ? _props$$textDecoratio : 'none';
31
+ }, function (props) {
32
+ var _props$$fontStyle;
33
+ return (_props$$fontStyle = props.$fontStyle) !== null && _props$$fontStyle !== void 0 ? _props$$fontStyle : 'normal';
34
+ }, function (props) {
35
+ var _props$color;
36
+ return (_props$color = props.color) !== null && _props$color !== void 0 ? _props$color : _.COLORS.getColor('black', props.theme);
36
37
  });
37
38
  exports.TypographyBase = TypographyBase;
38
39
  var ComponentTextStyle;
@@ -59,7 +60,7 @@ var componentTextTransformation = function componentTextTransformation(textStyle
59
60
  return fontStyle;
60
61
  };
61
62
  var ComponentStyling = function ComponentStyling(fontSize, lineHeight, textStyle, color) {
62
- return (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n font-style: ", ";\n ", "\n "])), fontSize, componentFontWeight(textStyle), lineHeight, componentFontStyle(textStyle), function (props) {
63
+ return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n font-style: ", ";\n ", "\n "])), fontSize, componentFontWeight(textStyle), lineHeight, componentFontStyle(textStyle), function (props) {
63
64
  return color === null ? '' : "color: ".concat(color || _.COLORS.getColor('black', props.theme), ";");
64
65
  });
65
66
  };
@@ -67,11 +68,11 @@ var ComponentXLStyling = function ComponentXLStyling(textStyle, color) {
67
68
  return ComponentStyling('24px', '28px', textStyle, color);
68
69
  };
69
70
  exports.ComponentXLStyling = ComponentXLStyling;
70
- var ComponentXL = function ComponentXL(_ref2) {
71
- var color = _ref2.color,
72
- textStyle = _ref2.textStyle,
73
- children = _ref2.children,
74
- className = _ref2.className;
71
+ var ComponentXL = function ComponentXL(_ref) {
72
+ var color = _ref.color,
73
+ textStyle = _ref.textStyle,
74
+ children = _ref.children,
75
+ className = _ref.className;
75
76
  var fontWeight = componentFontWeight(textStyle);
76
77
  var fontStyle = componentFontStyle(textStyle);
77
78
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
@@ -95,11 +96,11 @@ var ComponentLStyling = function ComponentLStyling(textStyle, color) {
95
96
  return ComponentStyling('20px', '24px', textStyle, color);
96
97
  };
97
98
  exports.ComponentLStyling = ComponentLStyling;
98
- var ComponentL = function ComponentL(_ref3) {
99
- var color = _ref3.color,
100
- textStyle = _ref3.textStyle,
101
- children = _ref3.children,
102
- className = _ref3.className;
99
+ var ComponentL = function ComponentL(_ref2) {
100
+ var color = _ref2.color,
101
+ textStyle = _ref2.textStyle,
102
+ children = _ref2.children,
103
+ className = _ref2.className;
103
104
  var fontWeight = componentFontWeight(textStyle);
104
105
  var fontStyle = componentFontStyle(textStyle);
105
106
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
@@ -123,11 +124,11 @@ var ComponentMStyling = function ComponentMStyling(textStyle, color) {
123
124
  return ComponentStyling('18px', '24px', textStyle, color);
124
125
  };
125
126
  exports.ComponentMStyling = ComponentMStyling;
126
- var ComponentM = function ComponentM(_ref4) {
127
- var color = _ref4.color,
128
- textStyle = _ref4.textStyle,
129
- children = _ref4.children,
130
- className = _ref4.className;
127
+ var ComponentM = function ComponentM(_ref3) {
128
+ var color = _ref3.color,
129
+ textStyle = _ref3.textStyle,
130
+ children = _ref3.children,
131
+ className = _ref3.className;
131
132
  var fontWeight = componentFontWeight(textStyle);
132
133
  var fontStyle = componentFontStyle(textStyle);
133
134
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
@@ -151,11 +152,11 @@ var ComponentSStyling = function ComponentSStyling(textStyle, color) {
151
152
  return ComponentStyling('16px', '20px', textStyle, color);
152
153
  };
153
154
  exports.ComponentSStyling = ComponentSStyling;
154
- var ComponentS = function ComponentS(_ref5) {
155
- var color = _ref5.color,
156
- textStyle = _ref5.textStyle,
157
- children = _ref5.children,
158
- className = _ref5.className;
155
+ var ComponentS = function ComponentS(_ref4) {
156
+ var color = _ref4.color,
157
+ textStyle = _ref4.textStyle,
158
+ children = _ref4.children,
159
+ className = _ref4.className;
159
160
  var fontWeight = componentFontWeight(textStyle);
160
161
  var fontStyle = componentFontStyle(textStyle);
161
162
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyBase, {
@@ -179,11 +180,11 @@ var ComponentXSStyling = function ComponentXSStyling(textStyle, color) {
179
180
  return ComponentStyling('14px', '16px', textStyle, color);
180
181
  };
181
182
  exports.ComponentXSStyling = ComponentXSStyling;
182
- var ComponentXS = function ComponentXS(_ref6) {
183
- var color = _ref6.color,
184
- textStyle = _ref6.textStyle,
185
- children = _ref6.children,
186
- className = _ref6.className;
183
+ var ComponentXS = function ComponentXS(_ref5) {
184
+ var color = _ref5.color,
185
+ textStyle = _ref5.textStyle,
186
+ children = _ref5.children,
187
+ className = _ref5.className;
187
188
  var fontWeight = componentFontWeight(textStyle);
188
189
  var fontStyle = componentFontStyle(textStyle);
189
190
  var textTransform = componentTextTransformation(textStyle);
@@ -209,11 +210,11 @@ var ComponentXXSStyling = function ComponentXXSStyling(textStyle, color) {
209
210
  return ComponentStyling('12px', '16px', textStyle, color);
210
211
  };
211
212
  exports.ComponentXXSStyling = ComponentXXSStyling;
212
- var ComponentXXS = function ComponentXXS(_ref7) {
213
- var color = _ref7.color,
214
- textStyle = _ref7.textStyle,
215
- children = _ref7.children,
216
- className = _ref7.className;
213
+ var ComponentXXS = function ComponentXXS(_ref6) {
214
+ var color = _ref6.color,
215
+ textStyle = _ref6.textStyle,
216
+ children = _ref6.children,
217
+ className = _ref6.className;
217
218
  var fontWeight = componentFontWeight(textStyle);
218
219
  var fontStyle = componentFontStyle(textStyle);
219
220
  var textTransform = componentTextTransformation(textStyle);
@@ -235,12 +236,12 @@ ComponentXXS.propTypes = {
235
236
  textStyle: _propTypes["default"].oneOf([1, 2, 3, 4]),
236
237
  children: _propTypes["default"].node
237
238
  };
238
- var ComponentResponsive = function ComponentResponsive(_ref8) {
239
- var color = _ref8.color,
240
- textStyle = _ref8.textStyle,
241
- children = _ref8.children,
242
- size = _ref8.size,
243
- width = _ref8.width;
239
+ var ComponentResponsive = function ComponentResponsive(_ref7) {
240
+ var color = _ref7.color,
241
+ textStyle = _ref7.textStyle,
242
+ children = _ref7.children,
243
+ size = _ref7.size,
244
+ width = _ref7.width;
244
245
  var fontsize = size;
245
246
  if (!size) {
246
247
  if (width == -1) {
@@ -294,18 +295,18 @@ ComponentResponsive.propTypes = {
294
295
  textStyle: _propTypes["default"].oneOf([1, 2, 3, 4]),
295
296
  children: _propTypes["default"].node
296
297
  };
297
- var Typography = (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n html {\n font-size: 100%;\n }\n\n @media (min-width: 48rem) {\n html {\n font-size: 112.5%;\n }\n }\n\n @media (min-width: 80rem) {\n html {\n font-size: 125%;\n }\n }\n\n h1, h2, h3, h4, h5, h6 {\n font-weight: 700;\n line-height: 120%;\n margin: 0;\n }\n\n h1 {\n font-size: 3rem;\n }\n\n h2 {\n font-size: 2.5rem;\n }\n\n h3 {\n font-size: 2rem;\n }\n\n h4 {\n font-size: 1.75rem;\n }\n\n h5 {\n font-size: 1.5rem;\n }\n\n h6 {\n font-size: 1.25rem;\n }\n\n p {\n font-size: 1rem;\n line-height: 150%;\n margin: 0 0 0.5rem;\n }\n\n p:last-of-type {\n margin-bottom: 0;\n }\n\n\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 34rem;\n }\n\n :lang(ja-jp) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n\n :lang(ko-kr) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n\n :lang(zh-CN) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n"])));
298
+ var Typography = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n html {\n font-size: 100%;\n }\n\n @media (min-width: 48rem) {\n html {\n font-size: 112.5%;\n }\n }\n\n @media (min-width: 80rem) {\n html {\n font-size: 125%;\n }\n }\n\n h1, h2, h3, h4, h5, h6 {\n font-weight: 700;\n line-height: 120%;\n margin: 0;\n }\n\n h1 {\n font-size: 3rem;\n }\n\n h2 {\n font-size: 2.5rem;\n }\n\n h3 {\n font-size: 2rem;\n }\n\n h4 {\n font-size: 1.75rem;\n }\n\n h5 {\n font-size: 1.5rem;\n }\n\n h6 {\n font-size: 1.25rem;\n }\n\n p {\n font-size: 1rem;\n line-height: 150%;\n margin: 0 0 0.5rem;\n }\n\n p:last-of-type {\n margin-bottom: 0;\n }\n\n\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 34rem;\n }\n\n :lang(ja-jp) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n\n :lang(ko-kr) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n\n :lang(zh-CN) {\n h1, h2, h3, h4, h5, h6, p, span {\n max-width: 30rem;\n }\n }\n"])));
298
299
  exports.Typography = Typography;
299
- var QuoteTypography = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 1.5rem;\n line-height: 150%;\n margin-bottom: 0.75rem;\n"])));
300
+ var QuoteTypography = (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 1.5rem;\n line-height: 150%;\n margin-bottom: 0.75rem;\n"])));
300
301
  exports.QuoteTypography = QuoteTypography;
301
- var NoteTypography = (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 0.75rem;\n line-height: 150%;\n margin-bottom: 0.375rem;\n"])));
302
+ var NoteTypography = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 0.75rem;\n line-height: 150%;\n margin-bottom: 0.375rem;\n"])));
302
303
  exports.NoteTypography = NoteTypography;
303
- var UpperCaseTypography = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 0.75rem;\n line-height: 150%;\n font-weight: 700;\n text-transform: uppercase;\n"])));
304
+ var UpperCaseTypography = (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 0.75rem;\n line-height: 150%;\n font-weight: 700;\n text-transform: uppercase;\n"])));
304
305
  exports.UpperCaseTypography = UpperCaseTypography;
305
- var Note = _styledComponents["default"].p(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), NoteTypography);
306
+ var Note = _styledComponents["default"].p(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), NoteTypography);
306
307
  exports.Note = Note;
307
- var Quote = _styledComponents["default"].p(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), QuoteTypography);
308
+ var Quote = _styledComponents["default"].p(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), QuoteTypography);
308
309
  exports.Quote = Quote;
309
- var UpperCase = _styledComponents["default"].p(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), UpperCaseTypography);
310
+ var UpperCase = _styledComponents["default"].p(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), UpperCaseTypography);
310
311
  exports.UpperCase = UpperCase;
311
312
  //# sourceMappingURL=typography.cjs.map