@laerdal/life-react-components 5.0.0-dev.1 → 5.0.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/AccordionItem.cjs +1 -1
- package/dist/Accordion/AccordionItem.cjs.map +1 -1
- package/dist/Accordion/AccordionItem.js +1 -1
- package/dist/Accordion/AccordionItem.js.map +1 -1
- package/dist/Accordion/styles.cjs +3 -3
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.d.ts +1 -1
- package/dist/Accordion/styles.js +3 -3
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/AuthPage/AuthPage.cjs +1 -1
- package/dist/AuthPage/AuthPage.cjs.map +1 -1
- package/dist/AuthPage/AuthPage.js +1 -1
- package/dist/AuthPage/AuthPage.js.map +1 -1
- package/dist/AuthPage/ScreenSetsContainer.cjs +1 -1
- package/dist/AuthPage/ScreenSetsContainer.cjs.map +1 -1
- package/dist/AuthPage/ScreenSetsContainer.d.ts +1 -1
- package/dist/AuthPage/ScreenSetsContainer.js +1 -1
- package/dist/AuthPage/ScreenSetsContainer.js.map +1 -1
- package/dist/Banners/Banner.cjs +8 -8
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.d.ts +8 -2
- package/dist/Banners/Banner.js +8 -8
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Banners/OverviewBanner.d.ts +4 -4
- package/dist/Breadcrumb/Breadcrumb.cjs +2 -2
- package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumb/styles.cjs +5 -5
- package/dist/Breadcrumb/styles.cjs.map +1 -1
- package/dist/Breadcrumb/styles.d.ts +2 -2
- package/dist/Breadcrumb/styles.js +5 -5
- package/dist/Breadcrumb/styles.js.map +1 -1
- package/dist/Button/BackButton.cjs +2 -2
- package/dist/Button/BackButton.cjs.map +1 -1
- package/dist/Button/BackButton.js +2 -2
- package/dist/Button/BackButton.js.map +1 -1
- package/dist/Button/Button.cjs +1 -1
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.js +1 -1
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/DualFunctionButton.cjs +5 -5
- package/dist/Button/DualFunctionButton.cjs.map +1 -1
- package/dist/Button/DualFunctionButton.js +5 -5
- package/dist/Button/DualFunctionButton.js.map +1 -1
- package/dist/Button/Iconbutton.cjs +25 -23
- package/dist/Button/Iconbutton.cjs.map +1 -1
- package/dist/Button/Iconbutton.d.ts +24 -3
- package/dist/Button/Iconbutton.js +25 -23
- package/dist/Button/Iconbutton.js.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.cjs +2 -2
- package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.d.ts +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.js +2 -2
- package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.cjs +2 -2
- package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.d.ts +2 -2
- package/dist/Card/VerticalCard/CardMiddleSection.js +2 -2
- package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +9 -9
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +9 -9
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +10 -10
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.d.ts +9 -9
- package/dist/Dropdown/CommonStyling.js +10 -10
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +41 -41
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.d.ts +12 -12
- package/dist/Dropdown/DropdownContent.js +41 -41
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +8 -8
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +8 -8
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Footer/Components/FooterDropdownLinks.cjs +3 -3
- package/dist/Footer/Components/FooterDropdownLinks.cjs.map +1 -1
- package/dist/Footer/Components/FooterDropdownLinks.js +3 -3
- package/dist/Footer/Components/FooterDropdownLinks.js.map +1 -1
- package/dist/Footer/Components/FooterNavSection.cjs +2 -2
- package/dist/Footer/Components/FooterNavSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNavSection.js +2 -2
- package/dist/Footer/Components/FooterNavSection.js.map +1 -1
- package/dist/Footer/SiteFooter.cjs +3 -3
- package/dist/Footer/SiteFooter.cjs.map +1 -1
- package/dist/Footer/SiteFooter.js +3 -3
- package/dist/Footer/SiteFooter.js.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +5 -5
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js +5 -5
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
- package/dist/GlobalNavigationBar/Logo.cjs +4 -4
- package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
- package/dist/GlobalNavigationBar/Logo.js +4 -4
- package/dist/GlobalNavigationBar/Logo.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +2 -13
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.js +2 -13
- package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +5 -5
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +2 -2
- package/dist/GlobalNavigationBar/desktop/SubMenu.js +5 -5
- package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +1 -1
- package/dist/HyperLink/HyperLink.cjs +3 -3
- package/dist/HyperLink/HyperLink.cjs.map +1 -1
- package/dist/HyperLink/HyperLink.d.ts +2 -2
- package/dist/HyperLink/HyperLink.js +3 -3
- package/dist/HyperLink/HyperLink.js.map +1 -1
- package/dist/InputFields/Checkbox.cjs +4 -4
- package/dist/InputFields/Checkbox.cjs.map +1 -1
- package/dist/InputFields/Checkbox.d.ts +3 -3
- package/dist/InputFields/Checkbox.js +4 -4
- package/dist/InputFields/Checkbox.js.map +1 -1
- package/dist/InputFields/DatepickerField.cjs +9 -9
- package/dist/InputFields/DatepickerField.cjs.map +1 -1
- package/dist/InputFields/DatepickerField.js +9 -9
- package/dist/InputFields/DatepickerField.js.map +1 -1
- package/dist/InputFields/Label.cjs +2 -2
- package/dist/InputFields/Label.cjs.map +1 -1
- package/dist/InputFields/Label.js +2 -2
- package/dist/InputFields/Label.js.map +1 -1
- package/dist/InputFields/NumberField.cjs +24 -24
- package/dist/InputFields/NumberField.cjs.map +1 -1
- package/dist/InputFields/NumberField.js +24 -24
- package/dist/InputFields/NumberField.js.map +1 -1
- package/dist/InputFields/PasswordField.cjs +4 -4
- package/dist/InputFields/PasswordField.cjs.map +1 -1
- package/dist/InputFields/PasswordField.js +4 -4
- package/dist/InputFields/PasswordField.js.map +1 -1
- package/dist/InputFields/SearchBar.cjs +2 -2
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +2 -2
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/TextField.cjs +5 -5
- package/dist/InputFields/TextField.cjs.map +1 -1
- package/dist/InputFields/TextField.js +5 -5
- package/dist/InputFields/TextField.js.map +1 -1
- package/dist/InputFields/Textarea.cjs +3 -3
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.js +3 -3
- package/dist/InputFields/Textarea.js.map +1 -1
- package/dist/InputFields/components/SearchField.cjs.map +1 -1
- package/dist/InputFields/components/SearchField.d.ts +1 -1
- package/dist/InputFields/components/SearchField.js.map +1 -1
- package/dist/InputFields/styling.cjs +7 -7
- package/dist/InputFields/styling.cjs.map +1 -1
- package/dist/InputFields/styling.d.ts +9 -9
- package/dist/InputFields/styling.js +7 -7
- package/dist/InputFields/styling.js.map +1 -1
- package/dist/Layouts/index.cjs +11 -11
- package/dist/Layouts/index.cjs.map +1 -1
- package/dist/Layouts/index.d.ts +6 -6
- package/dist/Layouts/index.js +11 -11
- package/dist/Layouts/index.js.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
- package/dist/MenuItem/MenuItem.cjs +8 -8
- package/dist/MenuItem/MenuItem.cjs.map +1 -1
- package/dist/MenuItem/MenuItem.d.ts +2 -2
- package/dist/MenuItem/MenuItem.js +8 -8
- package/dist/MenuItem/MenuItem.js.map +1 -1
- package/dist/Modals/ModalDialog.cjs +11 -11
- package/dist/Modals/ModalDialog.cjs.map +1 -1
- package/dist/Modals/ModalDialog.js +11 -11
- package/dist/Modals/ModalDialog.js.map +1 -1
- package/dist/Modals/ModalNote.cjs +8 -8
- package/dist/Modals/ModalNote.cjs.map +1 -1
- package/dist/Modals/ModalNote.js +8 -8
- package/dist/Modals/ModalNote.js.map +1 -1
- package/dist/Modals/ModalStyles.cjs +19 -19
- package/dist/Modals/ModalStyles.cjs.map +1 -1
- package/dist/Modals/ModalStyles.d.ts +17 -17
- package/dist/Modals/ModalStyles.js +19 -19
- package/dist/Modals/ModalStyles.js.map +1 -1
- package/dist/NotificationDot/NotificationDot.cjs +11 -12
- package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
- package/dist/NotificationDot/NotificationDot.js +11 -12
- package/dist/NotificationDot/NotificationDot.js.map +1 -1
- package/dist/Popover/Popover.cjs +40 -40
- package/dist/Popover/Popover.cjs.map +1 -1
- package/dist/Popover/Popover.d.ts +9 -9
- package/dist/Popover/Popover.js +40 -40
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/QuizButton/QuizButton.cjs +14 -14
- package/dist/QuizButton/QuizButton.cjs.map +1 -1
- package/dist/QuizButton/QuizButton.js +14 -14
- package/dist/QuizButton/QuizButton.js.map +1 -1
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.cjs.map +1 -1
- package/dist/Table/Table.js +1 -1
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody.cjs +2 -2
- package/dist/Table/TableBody.cjs.map +1 -1
- package/dist/Table/TableBody.js +2 -2
- package/dist/Table/TableBody.js.map +1 -1
- package/dist/Table/TableStyles.cjs +4 -4
- package/dist/Table/TableStyles.cjs.map +1 -1
- package/dist/Table/TableStyles.d.ts +3 -3
- package/dist/Table/TableStyles.js +4 -4
- package/dist/Table/TableStyles.js.map +1 -1
- package/dist/Tabs/TabLink.cjs +3 -3
- package/dist/Tabs/TabLink.cjs.map +1 -1
- package/dist/Tabs/TabLink.js +3 -3
- package/dist/Tabs/TabLink.js.map +1 -1
- package/dist/Tabs/Tabs.cjs.map +1 -1
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tag/Tag.cjs +6 -6
- package/dist/Tag/Tag.cjs.map +1 -1
- package/dist/Tag/Tag.js +6 -6
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/Toasters/Toast.cjs +16 -16
- package/dist/Toasters/Toast.cjs.map +1 -1
- package/dist/Toasters/Toast.d.ts +6 -7
- package/dist/Toasters/Toast.js +16 -16
- package/dist/Toasters/Toast.js.map +1 -1
- package/dist/Toggles/ToggleSwitch.cjs +1 -1
- package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
- package/dist/Toggles/ToggleSwitch.js +1 -1
- package/dist/Toggles/ToggleSwitch.js.map +1 -1
- package/dist/Toggles/TogglerStyles.cjs.map +1 -1
- package/dist/Toggles/TogglerStyles.d.ts +1 -1
- package/dist/Toggles/TogglerStyles.js.map +1 -1
- package/dist/Tooltips/TooltipOverflow.cjs +7 -7
- package/dist/Tooltips/TooltipOverflow.cjs.map +1 -1
- package/dist/Tooltips/TooltipOverflow.js +7 -7
- package/dist/Tooltips/TooltipOverflow.js.map +1 -1
- package/dist/Tooltips/TooltipStyles.cjs +29 -29
- package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
- package/dist/Tooltips/TooltipStyles.d.ts +9 -9
- package/dist/Tooltips/TooltipStyles.js +29 -29
- package/dist/Tooltips/TooltipStyles.js.map +1 -1
- package/dist/Tooltips/TooltipWrapper.cjs +7 -7
- package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
- package/dist/Tooltips/TooltipWrapper.js +7 -7
- package/dist/Tooltips/TooltipWrapper.js.map +1 -1
- package/package.json +1 -2
|
@@ -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","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","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,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;AAoCtC,IAAMY,WAAsD,GAAG,SAAzDA,WAAsDA,CAAAC,IAAA,EAqB7D;EAAA,IApBJC,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,IAAA,CAAjBM,iBAAiB;IACjBC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,gBAAgB,GAAAR,IAAA,CAAhBQ,gBAAgB;IAChBC,UAAU,GAAAT,IAAA,CAAVS,UAAU;IACVC,WAAW,GAAAV,IAAA,CAAXU,WAAW;IACXC,YAAY,GAAAX,IAAA,CAAZW,YAAY;IACZC,OAAO,GAAAZ,IAAA,CAAPY,OA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AC,IAAA;EAEjBzH,OAAO,EAAAwH,UAAA,YAAAO,KAAA;EAIP1H,OAAO,EAAAmH,UAAA,YAAAK,MAAA;EAEP3H,UAAU,EAAAsH,UAAA,YAAAQ,IAAA;EACV7H,WAAW,EAAAqH,UAAA,YAAAQ,IAAA,CAAAN,UAAA;EACXtH,YAAY,EAAAoH,UAAA,YAAAQ,IAAA,CAAAN,UAAA;EACZnH,IAAI,EAAAiH,UAAA,YAAAI,SAAA,EAAAJ,UAAA,YAAAK,MAAA,EAAAL,UAAA,YAAAG,IAAA;EACJnH,KAAK,EAAAgH,UAAA,YAAAK,MAAA;EACLpH,IAAI,EAAA+G,UAAA,YAAAG,IAAA;EACJjH,MAAM,EAAA8G,UAAA,YAAAS,MAAA;EACNtH,eAAe,EAAA6G,UAAA,YAAAK,MAAA;EACfjH,KAAK,EAAA4G,UAAA,YAAAK,MAAA;EACLhH,iBAAiB,EAAA2G,UAAA,YAAAC;AAAA;AAAA,IAAAS,QAAA,GA8QJ1I,WAAW;AAAA8H,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","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,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;AAoCtC,IAAMY,WAAsD,GAAG,SAAzDA,WAAsDA,CAAAC,IAAA,EAqB7D;EAAA,IApBJC,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,IAAA,CAAjBM,iBAAiB;IACjBC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,gBAAgB,GAAAR,IAAA,CAAhBQ,gBAAgB;IAChBC,UAAU,GAAAT,IAAA,CAAVS,UAAU;IACVC,WAAW,GAAAV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AAL,UAAA,YAAAG,IAAA;EAELhI,QAAQ,EAAA6H,UAAA,YAAAM,GAAA;EAIRjI,iBAAiB,EAAA2H,UAAA,YAAAC,IAAA;EAEjB3H,OAAO,EAAA0H,UAAA,YAAAO,KAAA;EAIP5H,OAAO,EAAAqH,UAAA,YAAAK,MAAA;EAEP7H,UAAU,EAAAwH,UAAA,YAAAQ,IAAA;EACV/H,WAAW,EAAAuH,UAAA,YAAAQ,IAAA,CAAAN,UAAA;EACXxH,YAAY,EAAAsH,UAAA,YAAAQ,IAAA,CAAAN,UAAA;EACZrH,IAAI,EAAAmH,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;AAAA;AAAA,IAAAS,QAAA,GA8QJ5I,WAAW;AAAAgI,OAAA,cAAAY,QAAA","ignoreList":[]}
|
|
@@ -155,8 +155,8 @@ export var ModalDialog = function ModalDialog(_ref) {
|
|
|
155
155
|
};
|
|
156
156
|
var ModalCloseButton = function ModalCloseButton(onClick) {
|
|
157
157
|
return /*#__PURE__*/_jsx(CloseButtonWrapper, {
|
|
158
|
-
hasImage: !!topImage || !!topImageWithFallbacksProps,
|
|
159
|
-
size: size,
|
|
158
|
+
$hasImage: !!topImage || !!topImageWithFallbacksProps,
|
|
159
|
+
$size: size,
|
|
160
160
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
161
161
|
variant: "secondary",
|
|
162
162
|
shape: "circular",
|
|
@@ -174,8 +174,8 @@ export var ModalDialog = function ModalDialog(_ref) {
|
|
|
174
174
|
var ModalBackButton = function ModalBackButton() {
|
|
175
175
|
if (backButton) {
|
|
176
176
|
return /*#__PURE__*/_jsx(BackButtonWrapper, {
|
|
177
|
-
hasImage: !!topImage || !!topImageWithFallbacksProps,
|
|
178
|
-
size: size,
|
|
177
|
+
$hasImage: !!topImage || !!topImageWithFallbacksProps,
|
|
178
|
+
$size: size,
|
|
179
179
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
180
180
|
variant: "secondary",
|
|
181
181
|
shape: "circular",
|
|
@@ -263,9 +263,9 @@ export var ModalDialog = function ModalDialog(_ref) {
|
|
|
263
263
|
maxHeight: getMaxHeight()
|
|
264
264
|
},
|
|
265
265
|
children: [(topImage || topImageWithFallbacksProps) && /*#__PURE__*/_jsxs(StyledModalHeader, {
|
|
266
|
-
size: size,
|
|
266
|
+
$size: size,
|
|
267
267
|
$height: getImageHeight(),
|
|
268
|
-
marginBottom: getMarginBottom(),
|
|
268
|
+
$marginBottom: getMarginBottom(),
|
|
269
269
|
children: [/*#__PURE__*/_jsxs(ImageContainer, {
|
|
270
270
|
$height: getImageHeight(),
|
|
271
271
|
children: [topImageGrayscale && /*#__PURE__*/_jsx(ImageOverlay, {
|
|
@@ -280,7 +280,7 @@ export var ModalDialog = function ModalDialog(_ref) {
|
|
|
280
280
|
src: topImageWithFallbacksProps.src
|
|
281
281
|
})]
|
|
282
282
|
}), /*#__PURE__*/_jsxs(ModalHeaderActionsWithImage, {
|
|
283
|
-
hasBackButton: !!backButton,
|
|
283
|
+
$hasBackButton: !!backButton,
|
|
284
284
|
children: [ModalBackButton(), ModalCloseButton(closeAction)]
|
|
285
285
|
})]
|
|
286
286
|
}), /*#__PURE__*/_jsxs(ModalTitleSection, {
|
|
@@ -290,9 +290,9 @@ export var ModalDialog = function ModalDialog(_ref) {
|
|
|
290
290
|
children: [tooltip && ModalTootip(tooltip), !(topImage || topImageWithFallbacksProps) && ModalCloseButton(closeAction)]
|
|
291
291
|
})]
|
|
292
292
|
}), /*#__PURE__*/_jsx(ModalBody, {
|
|
293
|
-
size: size,
|
|
294
|
-
overflow: contentOverflow,
|
|
295
|
-
hasContentBorders: hasContentBorders,
|
|
293
|
+
$size: size,
|
|
294
|
+
$overflow: contentOverflow,
|
|
295
|
+
$hasContentBorders: hasContentBorders,
|
|
296
296
|
children: children
|
|
297
297
|
}), note && /*#__PURE__*/_jsx(ModalNote, {
|
|
298
298
|
note: note,
|
|
@@ -300,7 +300,7 @@ export var ModalDialog = function ModalDialog(_ref) {
|
|
|
300
300
|
size: size,
|
|
301
301
|
icon: icon
|
|
302
302
|
}), /*#__PURE__*/_jsxs(ModalFooter, {
|
|
303
|
-
size: size,
|
|
303
|
+
$size: size,
|
|
304
304
|
children: [leftFooterAction && LeftFooterAction(leftFooterAction), buttons === null || buttons === void 0 ? void 0 : buttons.map(function (b, i) {
|
|
305
305
|
var _b$children;
|
|
306
306
|
return /*#__PURE__*/_jsx(Button, {
|
|
@@ -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","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","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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W,EAAA8F,GAAA,CAAAC,IAAA,CAAAC,UAAA;EAEXrF,QAAQ,EAAAmF,GAAA,CAAAG,IAAA;EAERhG,KAAK,EAAA6F,GAAA,CAAAI,SAAA,EAAAJ,GAAA,CAAAK,MAAA,EAAAL,GAAA,CAAAG,IAAA;EAEL/F,QAAQ,EAAA4F,GAAA,CAAAM,GAAA;EAIRhG,iBAAiB,EAAA0F,GAAA,CAAAC,IAAA;EAEjB1F,OAAO,EAAAyF,GAAA,CAAAO,KAAA;EAIP3F,OAAO,EAAAoF,GAAA,CAAAK,MAAA;EAEP5F,UAAU,EAAAuF,GAAA,CAAAQ,IAAA;EACV9F,WAAW,EAAAsF,GAAA,CAAAQ,IAAA,CAAAN,UAAA;EACXvF,YAAY,EAAAqF,GAAA,CAAAQ,IAAA,CAAAN,UAAA;EACZpF,IAAI,EAAAkF,GAAA,CAAAI,SAAA,EAAAJ,GAAA,CAAAK,MAAA,EAAAL,GAAA,CAAAG,IAAA;EACJpF,KAAK,EAAAiF,GAAA,CAAAK,MAAA;EACLrF,IAAI,EAAAgF,GAAA,CAAAG,IAAA;EACJlF,MAAM,EAAA+E,GAAA,CAAAS,MAAA;EACNvF,eAAe,EAAA8E,GAAA,CAAAK,MAAA;EACflF,KAAK,EAAA6E,GAAA,CAAAK,MAAA;EACLjF,iBAAiB,EAAA4E,GAAA,CAAAC;AAAA;AA8QnB,eAAelG,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","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,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;AAoC7C,OAAO,IAAMC,WAAsD,GAAG,SAAzDA,WAAsDA,CAAAC,IAAA,EAqB7D;EAAA,IAp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G,WAAW","ignoreList":[]}
|
|
@@ -26,8 +26,8 @@ var ModalNote = function ModalNote(_ref) {
|
|
|
26
26
|
switch (stateVal) {
|
|
27
27
|
case 'positive':
|
|
28
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalStyles.ModalNoteSection, {
|
|
29
|
-
state: stateVal,
|
|
30
|
-
size: size,
|
|
29
|
+
$state: stateVal,
|
|
30
|
+
$size: size,
|
|
31
31
|
children: [icon ? icon : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.CheckMark, {
|
|
32
32
|
color: _.COLORS.getColor('correct_500', theme)
|
|
33
33
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -36,8 +36,8 @@ var ModalNote = function ModalNote(_ref) {
|
|
|
36
36
|
});
|
|
37
37
|
case 'warning':
|
|
38
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalStyles.ModalNoteSection, {
|
|
39
|
-
state: stateVal,
|
|
40
|
-
size: size,
|
|
39
|
+
$state: stateVal,
|
|
40
|
+
$size: size,
|
|
41
41
|
children: [icon ? icon : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.TechnicalWarning, {
|
|
42
42
|
color: _.COLORS.getColor('warning_500', theme)
|
|
43
43
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -46,8 +46,8 @@ var ModalNote = function ModalNote(_ref) {
|
|
|
46
46
|
});
|
|
47
47
|
case 'critical':
|
|
48
48
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalStyles.ModalNoteSection, {
|
|
49
|
-
state: stateVal,
|
|
50
|
-
size: size,
|
|
49
|
+
$state: stateVal,
|
|
50
|
+
$size: size,
|
|
51
51
|
children: [icon ? icon : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.TechnicalWarning, {
|
|
52
52
|
color: _.COLORS.getColor('warning_500', theme)
|
|
53
53
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -56,8 +56,8 @@ var ModalNote = function ModalNote(_ref) {
|
|
|
56
56
|
});
|
|
57
57
|
default:
|
|
58
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalStyles.ModalNoteSection, {
|
|
59
|
-
state: stateVal,
|
|
60
|
-
size: size,
|
|
59
|
+
$state: stateVal,
|
|
60
|
+
$size: size,
|
|
61
61
|
children: [icon ? icon : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.Information, {
|
|
62
62
|
color: _.COLORS.getColor('primary_500', theme),
|
|
63
63
|
className: size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalNote.cjs","names":["React","_interopRequireWildcard","require","_","_icons","_ModalStyles","_styledComponents","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalNote","_ref","note","icon","size","_ref$state","state","stateVal","toLowerCase","theme","useTheme","jsxs","ModalNoteSection","children","jsx","SystemIcons","CheckMark","color","COLORS","getColor","TechnicalWarning","Information","className","exports","propTypes","_propTypes","oneOfType","string","node","isRequired","_default"],"sources":["../../src/Modals/ModalNote.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { COLORS } from '..';\r\nimport { SystemIcons } from '../icons';\r\nimport { ModalNoteSection } from './ModalStyles';\r\nimport { useTheme } from 'styled-components';\r\n\r\ninterface NoteProps {\r\n note: string | React.ReactNode;\r\n icon?: React.ReactNode;\r\n state?: string;\r\n size?: string;\r\n}\r\n\r\nexport const ModalNote: React.FunctionComponent<NoteProps> = ({ note, icon, size, state = 'neutral' }) => {\r\n const stateVal = state.toLowerCase();\r\n const theme = useTheme();\r\n \r\n switch (stateVal) {\r\n case 'positive':\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.CheckMark color={COLORS.getColor('correct_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'warning':\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'critical':\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n default:\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.Information color={COLORS.getColor('primary_500', theme)} className={size} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n }\r\n};\r\n\r\nexport default ModalNote;\r\n"],"mappings":";;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAA6C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,cAAAR,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAStC,IAAMW,SAA6C,GAAG,SAAhDA,SAA6CA,CAAAC,IAAA,EAAgD;EAAA,IAA1CC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAEC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,UAAA,GAAAJ,IAAA,CAAEK,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,SAAS,GAAAA,UAAA;EACjG,IAAME,QAAQ,GAAGD,KAAK,CAACE,WAAW,CAAC,CAAC;EACpC,IAAMC,KAAK,GAAG,IAAAC,0BAAQ,EAAC,CAAC;EAExB,QAAQH,QAAQ;IACd,KAAK,UAAU;MACb,oBACE,IAAA5B,WAAA,CAAAgC,IAAA,EAAClC,YAAA,CAAAmC,gBAAgB;
|
|
1
|
+
{"version":3,"file":"ModalNote.cjs","names":["React","_interopRequireWildcard","require","_","_icons","_ModalStyles","_styledComponents","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalNote","_ref","note","icon","size","_ref$state","state","stateVal","toLowerCase","theme","useTheme","jsxs","ModalNoteSection","$state","$size","children","jsx","SystemIcons","CheckMark","color","COLORS","getColor","TechnicalWarning","Information","className","exports","propTypes","_propTypes","oneOfType","string","node","isRequired","_default"],"sources":["../../src/Modals/ModalNote.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { COLORS } from '..';\r\nimport { SystemIcons } from '../icons';\r\nimport { ModalNoteSection } from './ModalStyles';\r\nimport { useTheme } from 'styled-components';\r\n\r\ninterface NoteProps {\r\n note: string | React.ReactNode;\r\n icon?: React.ReactNode;\r\n state?: string;\r\n size?: string;\r\n}\r\n\r\nexport const ModalNote: React.FunctionComponent<NoteProps> = ({ note, icon, size, state = 'neutral' }) => {\r\n const stateVal = state.toLowerCase();\r\n const theme = useTheme();\r\n \r\n switch (stateVal) {\r\n case 'positive':\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.CheckMark color={COLORS.getColor('correct_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'warning':\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'critical':\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n default:\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.Information color={COLORS.getColor('primary_500', theme)} className={size} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n }\r\n};\r\n\r\nexport default ModalNote;\r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KAAK,EAAAqB,UAAA,YAAAE,MAAA;EACLzB,IAAI,EAAAuB,UAAA,YAAAE;AAAA;AAAA,IAAAG,QAAA,GA0CShC,SAAS;AAAAyB,OAAA,cAAAO,QAAA","ignoreList":[]}
|
package/dist/Modals/ModalNote.js
CHANGED
|
@@ -17,8 +17,8 @@ export var ModalNote = function ModalNote(_ref) {
|
|
|
17
17
|
switch (stateVal) {
|
|
18
18
|
case 'positive':
|
|
19
19
|
return /*#__PURE__*/_jsxs(ModalNoteSection, {
|
|
20
|
-
state: stateVal,
|
|
21
|
-
size: size,
|
|
20
|
+
$state: stateVal,
|
|
21
|
+
$size: size,
|
|
22
22
|
children: [icon ? icon : /*#__PURE__*/_jsx(SystemIcons.CheckMark, {
|
|
23
23
|
color: COLORS.getColor('correct_500', theme)
|
|
24
24
|
}), /*#__PURE__*/_jsx("span", {
|
|
@@ -27,8 +27,8 @@ export var ModalNote = function ModalNote(_ref) {
|
|
|
27
27
|
});
|
|
28
28
|
case 'warning':
|
|
29
29
|
return /*#__PURE__*/_jsxs(ModalNoteSection, {
|
|
30
|
-
state: stateVal,
|
|
31
|
-
size: size,
|
|
30
|
+
$state: stateVal,
|
|
31
|
+
$size: size,
|
|
32
32
|
children: [icon ? icon : /*#__PURE__*/_jsx(SystemIcons.TechnicalWarning, {
|
|
33
33
|
color: COLORS.getColor('warning_500', theme)
|
|
34
34
|
}), /*#__PURE__*/_jsx("span", {
|
|
@@ -37,8 +37,8 @@ export var ModalNote = function ModalNote(_ref) {
|
|
|
37
37
|
});
|
|
38
38
|
case 'critical':
|
|
39
39
|
return /*#__PURE__*/_jsxs(ModalNoteSection, {
|
|
40
|
-
state: stateVal,
|
|
41
|
-
size: size,
|
|
40
|
+
$state: stateVal,
|
|
41
|
+
$size: size,
|
|
42
42
|
children: [icon ? icon : /*#__PURE__*/_jsx(SystemIcons.TechnicalWarning, {
|
|
43
43
|
color: COLORS.getColor('warning_500', theme)
|
|
44
44
|
}), /*#__PURE__*/_jsx("span", {
|
|
@@ -47,8 +47,8 @@ export var ModalNote = function ModalNote(_ref) {
|
|
|
47
47
|
});
|
|
48
48
|
default:
|
|
49
49
|
return /*#__PURE__*/_jsxs(ModalNoteSection, {
|
|
50
|
-
state: stateVal,
|
|
51
|
-
size: size,
|
|
50
|
+
$state: stateVal,
|
|
51
|
+
$size: size,
|
|
52
52
|
children: [icon ? icon : /*#__PURE__*/_jsx(SystemIcons.Information, {
|
|
53
53
|
color: COLORS.getColor('primary_500', theme),
|
|
54
54
|
className: size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalNote.js","names":["React","COLORS","SystemIcons","ModalNoteSection","useTheme","jsx","_jsx","jsxs","_jsxs","ModalNote","_ref","note","icon","size","_ref$state","state","stateVal","toLowerCase","theme","children","CheckMark","color","getColor","TechnicalWarning","Information","className","propTypes","_pt","oneOfType","string","node","isRequired"],"sources":["../../src/Modals/ModalNote.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { COLORS } from '..';\r\nimport { SystemIcons } from '../icons';\r\nimport { ModalNoteSection } from './ModalStyles';\r\nimport { useTheme } from 'styled-components';\r\n\r\ninterface NoteProps {\r\n note: string | React.ReactNode;\r\n icon?: React.ReactNode;\r\n state?: string;\r\n size?: string;\r\n}\r\n\r\nexport const ModalNote: React.FunctionComponent<NoteProps> = ({ note, icon, size, state = 'neutral' }) => {\r\n const stateVal = state.toLowerCase();\r\n const theme = useTheme();\r\n \r\n switch (stateVal) {\r\n case 'positive':\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.CheckMark color={COLORS.getColor('correct_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'warning':\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'critical':\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n default:\r\n return (\r\n <ModalNoteSection state={stateVal} size={size}>\r\n {icon ? icon : <SystemIcons.Information color={COLORS.getColor('primary_500', theme)} className={size} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n }\r\n};\r\n\r\nexport default ModalNote;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,MAAM,QAAQ,IAAI;AAC3B,SAASC,WAAW,QAAQ,UAAU;AACtC,SAASC,gBAAgB,QAAQ,eAAe;AAChD,SAASC,QAAQ,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAS7C,OAAO,IAAMC,SAA6C,GAAG,SAAhDA,SAA6CA,CAAAC,IAAA,EAAgD;EAAA,IAA1CC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAEC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,UAAA,GAAAJ,IAAA,CAAEK,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,SAAS,GAAAA,UAAA;EACjG,IAAME,QAAQ,GAAGD,KAAK,CAACE,WAAW,CAAC,CAAC;EACpC,IAAMC,KAAK,GAAGd,QAAQ,CAAC,CAAC;EAExB,QAAQY,QAAQ;IACd,KAAK,UAAU;MACb,oBACER,KAAA,CAACL,gBAAgB;
|
|
1
|
+
{"version":3,"file":"ModalNote.js","names":["React","COLORS","SystemIcons","ModalNoteSection","useTheme","jsx","_jsx","jsxs","_jsxs","ModalNote","_ref","note","icon","size","_ref$state","state","stateVal","toLowerCase","theme","$state","$size","children","CheckMark","color","getColor","TechnicalWarning","Information","className","propTypes","_pt","oneOfType","string","node","isRequired"],"sources":["../../src/Modals/ModalNote.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport { COLORS } from '..';\r\nimport { SystemIcons } from '../icons';\r\nimport { ModalNoteSection } from './ModalStyles';\r\nimport { useTheme } from 'styled-components';\r\n\r\ninterface NoteProps {\r\n note: string | React.ReactNode;\r\n icon?: React.ReactNode;\r\n state?: string;\r\n size?: string;\r\n}\r\n\r\nexport const ModalNote: React.FunctionComponent<NoteProps> = ({ note, icon, size, state = 'neutral' }) => {\r\n const stateVal = state.toLowerCase();\r\n const theme = useTheme();\r\n \r\n switch (stateVal) {\r\n case 'positive':\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.CheckMark color={COLORS.getColor('correct_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'warning':\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n case 'critical':\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.TechnicalWarning color={COLORS.getColor('warning_500', theme)} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n\r\n default:\r\n return (\r\n <ModalNoteSection $state={stateVal} $size={size}>\r\n {icon ? icon : <SystemIcons.Information color={COLORS.getColor('primary_500', theme)} className={size} />}\r\n <span>{note}</span>\r\n </ModalNoteSection>\r\n );\r\n }\r\n};\r\n\r\nexport default ModalNote;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,MAAM,QAAQ,IAAI;AAC3B,SAASC,WAAW,QAAQ,UAAU;AACtC,SAASC,gBAAgB,QAAQ,eAAe;AAChD,SAASC,QAAQ,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,I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C7CT,IAAI,GAAGA,IAAI,gBAAGN,IAAA,CAACJ,WAAW,CAACuB,gBAAgB;UAACF,KAAK,EAAEtB,MAAM,CAACuB,QAAQ,CAAC,aAAa,EAAEN,KAAK;QAAE,CAAE,CAAC,eAC7FZ,IAAA;UAAAe,QAAA,EAAOV;QAAI,CAAO,CAAC;MAAA,CACH,CAAC;IAGvB;MACE,oBACEH,KAAA,CAACL,gBAAgB;QAACgB,MAAM,EAAEH,QAAS;QAACI,KAAK,EAAEP,IAAK;QAAAQ,QAAA,GAC7CT,IAAI,GAAGA,IAAI,gBAAGN,IAAA,CAACJ,WAAW,CAACwB,WAAW;UAACH,KAAK,EAAEtB,MAAM,CAACuB,QAAQ,CAAC,aAAa,EAAEN,KAAK,CAAE;UAACS,SAAS,EAAEd;QAAK,CAAE,CAAC,eACzGP,IAAA;UAAAe,QAAA,EAAOV;QAAI,CAAO,CAAC;MAAA,CACH,CAAC;EAEzB;AACF,CAAC;AAACF,SAAA,CAAAmB,SAAA;EA3CAjB,IAAI,EAAAkB,GAAA,CAAAC,SAAA,EAAAD,GAAA,CAAAE,MAAA,EAAAF,GAAA,CAAAG,IAAA,GAAAC,UAAA;EACJrB,IAAI,EAAAiB,GAAA,CAAAG,IAAA;EACJjB,KAAK,EAAAc,GAAA,CAAAE,MAAA;EACLlB,IAAI,EAAAgB,GAAA,CAAAE;AAAA;AA0CN,eAAetB,SAAS","ignoreList":[]}
|
|
@@ -18,11 +18,11 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
18
18
|
* Modal styles
|
|
19
19
|
*/
|
|
20
20
|
var ModalHeader = _styledComponents["default"].section(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: ", ";\n"])), function (props) {
|
|
21
|
-
return props
|
|
21
|
+
return props.$marginBottom || '24px';
|
|
22
22
|
});
|
|
23
23
|
exports.ModalHeader = ModalHeader;
|
|
24
24
|
var StyledModalHeader = (0, _styledComponents["default"])(ModalHeader)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 0 calc(50% - 5px);\n flex-direction: column;\n flex-basis: auto;\n text-align: left;\n height: ", ";\n img {\n width: 100%;\n height: ", ";\n object-fit: cover;\n border-radius: 8px 8px 0 0;\n }\n"])), function (props) {
|
|
25
|
-
return props.$height ? "".concat(props.$height - (props
|
|
25
|
+
return props.$height ? "".concat(props.$height - (props.$size === 'small' ? 16 : props.$size === 'large' ? 32 : 24), "px") : '';
|
|
26
26
|
}, function (props) {
|
|
27
27
|
return "".concat(props.$height, "px");
|
|
28
28
|
});
|
|
@@ -42,7 +42,7 @@ exports.Column = Column;
|
|
|
42
42
|
var ModalTitleSection = _styledComponents["default"].section(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n word-break: break-word;\n display: flex;\n width: 100%;\n justify-content: space-between;\n"])));
|
|
43
43
|
exports.ModalTitleSection = ModalTitleSection;
|
|
44
44
|
var ModalHeaderActionsWithImage = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n justify-content: space-between;\n width: 100%;\n z-index: 1;\n"])), function (props) {
|
|
45
|
-
return !props
|
|
45
|
+
return !props.$hasBackButton ? 'row-reverse' : 'row';
|
|
46
46
|
});
|
|
47
47
|
exports.ModalHeaderActionsWithImage = ModalHeaderActionsWithImage;
|
|
48
48
|
var ModalHeaderActions = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n margin: -12px -12px 0 0;\n"])));
|
|
@@ -52,46 +52,46 @@ exports.FlexContainer = FlexContainer;
|
|
|
52
52
|
var ModalHoverModifier = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n button:hover {\n cursor: help !important;\n }\n"])));
|
|
53
53
|
exports.ModalHoverModifier = ModalHoverModifier;
|
|
54
54
|
var CloseButtonWrapper = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n button {\n ", "\n }\n"])), function (props) {
|
|
55
|
-
return props
|
|
55
|
+
return props.$hasImage ? (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n margin: -12px -12px 0 0 !important;\n "]))) : (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n left: unset;\n "])));
|
|
56
56
|
});
|
|
57
57
|
exports.CloseButtonWrapper = CloseButtonWrapper;
|
|
58
58
|
var BackButtonWrapper = _styledComponents["default"].div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n button {\n margin: -12px 0 0 -12px !important;\n }\n"])));
|
|
59
59
|
exports.BackButtonWrapper = BackButtonWrapper;
|
|
60
60
|
var ModalTitle = _styledComponents["default"].h5(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0;\n font-size: ", ";\n font-weight: bold;\n"])), function (props) {
|
|
61
|
-
return props
|
|
61
|
+
return props.$fontSize || '1.25em';
|
|
62
62
|
});
|
|
63
63
|
exports.ModalTitle = ModalTitle;
|
|
64
64
|
var ModalNoteSection = _styledComponents["default"].section(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n font-size: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n display: flex;\n flex-direction: row;\n padding: ", ";\n border-radius: 2px;\n\n span {\n display: block;\n width: calc(100% - 32px);\n margin-left: 8px;\n color: ", ";\n }\n"])), function (props) {
|
|
65
|
-
return getBackgroundColor(props
|
|
65
|
+
return getBackgroundColor(props.$state, props.theme);
|
|
66
66
|
}, function (props) {
|
|
67
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
67
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === 'small' ? "16px" : (props === null || props === void 0 ? void 0 : props.$size) === 'large' ? '20px' : '18px';
|
|
68
68
|
}, function (props) {
|
|
69
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
69
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === 'small' ? "0px" : (props === null || props === void 0 ? void 0 : props.$size) === 'large' ? '16px' : '4px';
|
|
70
70
|
}, function (props) {
|
|
71
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
71
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === 'small' ? "8px" : (props === null || props === void 0 ? void 0 : props.$size) === 'large' ? '24px' : '16px';
|
|
72
72
|
}, function (props) {
|
|
73
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
73
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === 'small' ? "8px" : (props === null || props === void 0 ? void 0 : props.$size) === 'large' ? '16px' : '12px';
|
|
74
74
|
}, function (props) {
|
|
75
|
-
return getNoteMessageColor(props
|
|
75
|
+
return getNoteMessageColor(props.$state, props.theme);
|
|
76
76
|
});
|
|
77
77
|
exports.ModalNoteSection = ModalNoteSection;
|
|
78
78
|
var ModalBody = _styledComponents["default"].section(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 1 auto;\n overflow: ", ";\n margin: ", ";\n\n border-top: ", ";\n border-bottom: ", ";\n\n ", "\n"])), function (props) {
|
|
79
|
-
var _props
|
|
80
|
-
return (_props
|
|
79
|
+
var _props$$overflow;
|
|
80
|
+
return (_props$$overflow = props === null || props === void 0 ? void 0 : props.$overflow) !== null && _props$$overflow !== void 0 ? _props$$overflow : 'unset';
|
|
81
81
|
}, function (props) {
|
|
82
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
82
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === 'small' ? "8px 0" : (props === null || props === void 0 ? void 0 : props.$size) === 'large' ? '16px 0' : '12px 0';
|
|
83
83
|
}, function (props) {
|
|
84
|
-
return props !== null && props !== void 0 && props
|
|
84
|
+
return props !== null && props !== void 0 && props.$hasContentBorders ? "1px solid ".concat(_.COLORS.getColor('neutral_100', props.theme)) : 'none';
|
|
85
85
|
}, function (props) {
|
|
86
|
-
return props !== null && props !== void 0 && props
|
|
86
|
+
return props !== null && props !== void 0 && props.$hasContentBorders ? "1px solid ".concat(_.COLORS.getColor('neutral_100', props.theme)) : 'none';
|
|
87
87
|
}, (0, _styles.scrollBarStyling)(_types.Size.Small));
|
|
88
88
|
exports.ModalBody = ModalBody;
|
|
89
89
|
var ModalFooter = _styledComponents["default"].section(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: flex-end;\n\n gap: ", ";\n\n .footer-action {\n order: -1;\n margin-right: auto;\n display: flex;\n align-items: center;\n font-size: ", ";\n gap: ", ";\n }\n\n .footer-action.note {\n color: ", ";\n }\n"])), function (props) {
|
|
90
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
90
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === 'large' ? "16px" : '8px';
|
|
91
91
|
}, function (props) {
|
|
92
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
92
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === 'small' ? "16px" : (props === null || props === void 0 ? void 0 : props.$size) === 'large' ? '20px' : '18px';
|
|
93
93
|
}, function (props) {
|
|
94
|
-
return (props === null || props === void 0 ? void 0 : props
|
|
94
|
+
return (props === null || props === void 0 ? void 0 : props.$size) === _types.Size.Large ? "8px" : (props === null || props === void 0 ? void 0 : props.$size) === _types.Size.Small ? '4px' : '6px';
|
|
95
95
|
}, function (props) {
|
|
96
96
|
return _.COLORS.getColor('neutral_600', props.theme);
|
|
97
97
|
});
|