@laerdal/life-react-components 4.0.0 → 4.0.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.
@@ -58,7 +58,7 @@ var activeValidationMessage = (0, _styledComponents.css)(_templateObject4 || (_t
58
58
  var placeholderStyling = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (props) {
59
59
  return (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.getColor('neutral_600', props.theme));
60
60
  });
61
- var DropdownInputField = _styledComponents["default"].input(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ", " !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n overflow: hidden;\n ", "\n \n ::placeholder {\n color: ", ";\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n"])), function (props) {
61
+ var DropdownInputField = _styledComponents["default"].input(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n min-width: 0px;\n color: ", " !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n overflow: hidden;\n ", "\n \n ::placeholder {\n color: ", ";\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n"])), function (props) {
62
62
  return _styles.COLORS.getColor('black', props.theme);
63
63
  }, function (props) {
64
64
  return props.ellipsis ? 'text-overflow: ellipsis;' : '';
@@ -1 +1 @@
1
- {"version":3,"file":"CommonStyling.cjs","names":["_styledComponents","_interopRequireWildcard","require","_common","_styles","_typography","_zIndexes","_TooltipStyles","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_templateObject12","_templateObject13","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DropdownContainer","styled","div","_taggedTemplateLiteral2","props","isButton","minWidth","concat","readOnly","disabled","margin","Z_INDEXES","focus","COLORS","getColor","theme","exports","lockedState","css","disabledState","activeValidationMessage","placeholderStyling","ComponentMStyling","ComponentTextStyle","Italic","DropdownInputField","input","ellipsis","DropdownInputFieldStyles","ComponentSStyling","Regular","TooltipTrigger","ComponentXXSStyling","BREAKPOINTS","MEDIUM","ComponentXSStyling","isPlaceholder","undefined","Bold","showValidationMessage","CommonInteractionStyling","dropdown","focusStyles","DropdownContentButtonStyling","DropdownButtonTextContent","DropdownButtonTextIcon","DropdownButtonTextArrow","DropdownButtonTextStyles","DropdownButtonTextWrapper"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\r\nimport {CommonInteractionStyling} from '../common';\r\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\r\nimport {\r\n ComponentMStyling,\r\n ComponentLStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles/typography';\r\nimport {Size} from '../types';\r\nimport {Z_INDEXES} from '../styles/z-indexes';\r\nimport { TooltipTrigger, Tooltip } from '../Tooltips/TooltipStyles';\r\n\r\nexport const DropdownContainer = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\r\n display: inline-block;\r\n\r\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\r\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\r\n ${(props) => (props.margin ? `margin: ${props.margin};` : 'margin-bottom: 4px;')}\r\n .show {\r\n display: block;\r\n }\r\n\r\n .value {\r\n flex-grow: 1;\r\n }\r\n\r\n &:focus-within {\r\n z-index: ${Z_INDEXES.focus};\r\n }\r\n\r\n input:hover + div {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n input:active + div {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n\r\n`;\r\n\r\nconst lockedState = css`\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_300', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n`;\r\n\r\nconst disabledState = css`\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nconst activeValidationMessage = css`\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('critical_400', props.theme)};\r\n`;\r\n\r\nconst placeholderStyling = css`\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n`;\r\n\r\nexport const DropdownInputField = styled.input<{ellipsis?: boolean}>`\r\n border: none;\r\n outline: none;\r\n background-color: inherit;\r\n cursor: pointer;\r\n color: ${props => COLORS.getColor('black', props.theme)} !important;\r\n padding: 0;\r\n flex-grow: 1;\r\n display: flex;\r\n justify-content: center;\r\n overflow: hidden;\r\n ${props => props.ellipsis ? 'text-overflow: ellipsis;' : ''}\r\n \r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n font-style: italic;\r\n }\r\n\r\n ::-webkit-search-decoration,\r\n ::-webkit-search-cancel-button,\r\n ::-webkit-search-results-button,\r\n ::-webkit-search-results-decoration {\r\n -webkit-appearance: none;\r\n }\r\n`;\r\n\r\nexport const DropdownInputFieldStyles = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; minWidth?: string }>`\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n\r\n padding: 12px 16px;\r\n height: 48px;\r\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\r\n width: 100%;\r\n\r\n background: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_400', props.theme)};\r\n box-sizing: border-box;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n position: relative;\r\n\r\n input {\r\n font-size: inherit;\r\n line-height: inherit;\r\n color: inherit;\r\n }\r\n\r\n ${TooltipTrigger('hover')}\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n\r\n ${BREAKPOINTS.MEDIUM} {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 16px;\r\n height: 56px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.small {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 12px 16px;\r\n height: 48px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.medium {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n height: 56px;\r\n padding: 16px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n pointer-events: none;\r\n width: 24px;\r\n height: 24px;\r\n color: ${(props) => props.isPlaceholder ? COLORS.getColor('neutral_600', props.theme) : undefined};\r\n }\r\n\r\n &:focus {\r\n outline: 3px solid #ddd;\r\n }\r\n\r\n &:focus-within,\r\n &.focus-visible-within {\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n &:hover:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_200', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n cursor: pointer;\r\n }\r\n\r\n &:active:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_300', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.button {\r\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.getColor('neutral_300', props.theme) : COLORS.getColor('neutral_600', props.theme))}\r\n\r\n box-sizing: border-box;\r\n height: 32px;\r\n padding: 0 8px;\r\n width: initial;\r\n min-width: initial;\r\n border: none !important;\r\n box-shadow: none;\r\n border-radius: 4px;\r\n\r\n &.expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n\r\n ${(props) => (props.disabled ? disabledState : '')}\r\n ${(props) => (props.readOnly ? lockedState : '')}\r\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\r\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\r\n\r\n ${CommonInteractionStyling};\r\n\r\n &.focus-visible,\r\n &.focus-visible-within {\r\n z-index: ${Z_INDEXES.dropdown + 1} !important;\r\n ${focusStyles}\r\n }\r\n`;\r\n\r\nexport const DropdownContentButtonStyling = css`\r\n min-width: 344px;\r\n`;\r\n\r\n\r\n\r\nexport const DropdownButtonTextContent = styled.div`\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n box-sizing: border-box;\r\n min-width: 64px;\r\n min-height: 32px;\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n`;\r\n\r\nexport const DropdownButtonTextIcon = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n`;\r\n\r\nexport const DropdownButtonTextArrow = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n\r\n svg {\r\n pointer-events: none;\r\n }\r\n`;\r\n\r\nexport const DropdownButtonTextStyles = styled.div`\r\n flex: 1\r\n`;\r\n\r\nexport const DropdownButtonTextWrapper = styled.div`\r\n box-sizing: border-box;\r\n min-height: 48px;\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n cursor: pointer;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('neutral_600', props.theme))}\r\n\r\n .expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n\r\n ${DropdownButtonTextContent} {\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &:hover:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &:active:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n\r\n}`;\r\n"],"mappings":";;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAQA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAAoE,IAAAM,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,iBAAA,EAAAC,iBAAA,EAAAC,iBAAA,EAAAC,iBAAA;AAAA,SAAAC,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,SAAArB,wBAAAqB,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,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card","require","_common","_styles","_typography","_zIndexes","_TooltipStyles","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","_templateObject12","_templateObject13","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DropdownContainer","styled","div","_taggedTemplateLiteral2","props","isButton","minWidth","concat","readOnly","disabled","margin","Z_INDEXES","focus","COLORS","getColor","theme","exports","lockedState","css","disabledState","activeValidationMessage","placeholderStyling","ComponentMStyling","ComponentTextStyle","Italic","DropdownInputField","input","ellipsis","DropdownInputFieldStyles","ComponentSStyling","Regular","TooltipTrigger","ComponentXXSStyling","BREAKPOINTS","MEDIUM","ComponentXSStyling","isPlaceholder","undefined","Bold","showValidationMessage","CommonInteractionStyling","dropdown","focusStyles","DropdownContentButtonStyling","DropdownButtonTextContent","DropdownButtonTextIcon","DropdownButtonTextArrow","DropdownButtonTextStyles","DropdownButtonTextWrapper"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\r\nimport {CommonInteractionStyling} from '../common';\r\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\r\nimport {\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles/typography';\r\nimport {Z_INDEXES} from '../styles/z-indexes';\r\nimport { TooltipTrigger } from '../Tooltips/TooltipStyles';\r\n\r\nexport const DropdownContainer = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\r\n display: inline-block;\r\n\r\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\r\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\r\n ${(props) => (props.margin ? `margin: ${props.margin};` : 'margin-bottom: 4px;')}\r\n .show {\r\n display: block;\r\n }\r\n\r\n .value {\r\n flex-grow: 1;\r\n }\r\n\r\n &:focus-within {\r\n z-index: ${Z_INDEXES.focus};\r\n }\r\n\r\n input:hover + div {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n input:active + div {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n\r\n`;\r\n\r\nconst lockedState = css`\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_300', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n`;\r\n\r\nconst disabledState = css`\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nconst activeValidationMessage = css`\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('critical_400', props.theme)};\r\n`;\r\n\r\nconst placeholderStyling = css`\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n`;\r\n\r\nexport const DropdownInputField = styled.input<{ellipsis?: boolean}>`\r\n border: none;\r\n outline: none;\r\n background-color: inherit;\r\n cursor: pointer;\r\n min-width: 0px;\r\n color: ${props => COLORS.getColor('black', props.theme)} !important;\r\n padding: 0;\r\n flex-grow: 1;\r\n display: flex;\r\n justify-content: center;\r\n overflow: hidden;\r\n ${props => props.ellipsis ? 'text-overflow: ellipsis;' : ''}\r\n \r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n font-style: italic;\r\n }\r\n\r\n ::-webkit-search-decoration,\r\n ::-webkit-search-cancel-button,\r\n ::-webkit-search-results-button,\r\n ::-webkit-search-results-decoration {\r\n -webkit-appearance: none;\r\n }\r\n`;\r\n\r\nexport const DropdownInputFieldStyles = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; minWidth?: string }>`\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n\r\n padding: 12px 16px;\r\n height: 48px;\r\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\r\n width: 100%;\r\n\r\n background: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_400', props.theme)};\r\n box-sizing: border-box;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n position: relative;\r\n\r\n input {\r\n font-size: inherit;\r\n line-height: inherit;\r\n color: inherit;\r\n }\r\n\r\n ${TooltipTrigger('hover')}\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n\r\n ${BREAKPOINTS.MEDIUM} {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 16px;\r\n height: 56px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.small {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 12px 16px;\r\n height: 48px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.medium {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n height: 56px;\r\n padding: 16px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n pointer-events: none;\r\n width: 24px;\r\n height: 24px;\r\n color: ${(props) => props.isPlaceholder ? COLORS.getColor('neutral_600', props.theme) : undefined};\r\n }\r\n\r\n &:focus {\r\n outline: 3px solid #ddd;\r\n }\r\n\r\n &:focus-within,\r\n &.focus-visible-within {\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n &:hover:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_200', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n cursor: pointer;\r\n }\r\n\r\n &:active:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_300', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.button {\r\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.getColor('neutral_300', props.theme) : COLORS.getColor('neutral_600', props.theme))}\r\n\r\n box-sizing: border-box;\r\n height: 32px;\r\n padding: 0 8px;\r\n width: initial;\r\n min-width: initial;\r\n border: none !important;\r\n box-shadow: none;\r\n border-radius: 4px;\r\n\r\n &.expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n\r\n ${(props) => (props.disabled ? disabledState : '')}\r\n ${(props) => (props.readOnly ? lockedState : '')}\r\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\r\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\r\n\r\n ${CommonInteractionStyling};\r\n\r\n &.focus-visible,\r\n &.focus-visible-within {\r\n z-index: ${Z_INDEXES.dropdown + 1} !important;\r\n ${focusStyles}\r\n }\r\n`;\r\n\r\nexport const DropdownContentButtonStyling = css`\r\n min-width: 344px;\r\n`;\r\n\r\n\r\n\r\nexport const DropdownButtonTextContent = styled.div`\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n box-sizing: border-box;\r\n min-width: 64px;\r\n min-height: 32px;\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n`;\r\n\r\nexport const DropdownButtonTextIcon = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n`;\r\n\r\nexport const DropdownButtonTextArrow = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n\r\n svg {\r\n pointer-events: none;\r\n }\r\n`;\r\n\r\nexport const DropdownButtonTextStyles = styled.div`\r\n flex: 1\r\n`;\r\n\r\nexport const DropdownButtonTextWrapper = styled.div`\r\n box-sizing: border-box;\r\n min-height: 48px;\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n cursor: pointer;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('neutral_600', props.theme))}\r\n\r\n .expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n\r\n ${DropdownButtonTextContent} {\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &:hover:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &:active:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n\r\n}`;\r\n"],"mappings":";;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAMA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAA2D,IAAAM,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,iBAAA,EAAAC,iBAAA,EAAAC,iBAAA,EAAAC,iBAAA;AAAA,SAAAC,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,SAAArB,wBAAAqB,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,UAAA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Object4 = _tagge
47
47
  var placeholderStyling = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
48
48
  return ComponentMStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme));
49
49
  });
50
- export var DropdownInputField = styled.input(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ", " !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n overflow: hidden;\n ", "\n \n ::placeholder {\n color: ", ";\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n"])), function (props) {
50
+ export var DropdownInputField = styled.input(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n min-width: 0px;\n color: ", " !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n overflow: hidden;\n ", "\n \n ::placeholder {\n color: ", ";\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n"])), function (props) {
51
51
  return COLORS.getColor('black', props.theme);
52
52
  }, function (props) {
53
53
  return props.ellipsis ? 'text-overflow: ellipsis;' : '';
@@ -1 +1 @@
1
- {"version":3,"file":"CommonStyling.js","names":["styled","css","CommonInteractionStyling","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","ComponentXSStyling","ComponentXXSStyling","Z_INDEXES","TooltipTrigger","DropdownContainer","div","_templateObject","_taggedTemplateLiteral","props","isButton","minWidth","concat","readOnly","disabled","margin","focus","getColor","theme","lockedState","_templateObject2","disabledState","_templateObject3","activeValidationMessage","_templateObject4","placeholderStyling","_templateObject5","Italic","DropdownInputField","input","_templateObject6","ellipsis","DropdownInputFieldStyles","_templateObject7","Regular","MEDIUM","isPlaceholder","undefined","Bold","showValidationMessage","dropdown","DropdownContentButtonStyling","_templateObject8","DropdownButtonTextContent","_templateObject9","DropdownButtonTextIcon","_templateObject10","DropdownButtonTextArrow","_templateObject11","DropdownButtonTextStyles","_templateObject12","DropdownButtonTextWrapper","_templateObject13"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\r\nimport {CommonInteractionStyling} from '../common';\r\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\r\nimport {\r\n ComponentMStyling,\r\n ComponentLStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles/typography';\r\nimport {Size} from '../types';\r\nimport {Z_INDEXES} from '../styles/z-indexes';\r\nimport { TooltipTrigger, Tooltip } from '../Tooltips/TooltipStyles';\r\n\r\nexport const DropdownContainer = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\r\n display: inline-block;\r\n\r\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\r\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\r\n ${(props) => (props.margin ? `margin: ${props.margin};` : 'margin-bottom: 4px;')}\r\n .show {\r\n display: block;\r\n }\r\n\r\n .value {\r\n flex-grow: 1;\r\n }\r\n\r\n &:focus-within {\r\n z-index: ${Z_INDEXES.focus};\r\n }\r\n\r\n input:hover + div {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n input:active + div {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n\r\n`;\r\n\r\nconst lockedState = css`\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_300', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n`;\r\n\r\nconst disabledState = css`\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nconst activeValidationMessage = css`\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('critical_400', props.theme)};\r\n`;\r\n\r\nconst placeholderStyling = css`\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n`;\r\n\r\nexport const DropdownInputField = styled.input<{ellipsis?: boolean}>`\r\n border: none;\r\n outline: none;\r\n background-color: inherit;\r\n cursor: pointer;\r\n color: ${props => COLORS.getColor('black', props.theme)} !important;\r\n padding: 0;\r\n flex-grow: 1;\r\n display: flex;\r\n justify-content: center;\r\n overflow: hidden;\r\n ${props => props.ellipsis ? 'text-overflow: ellipsis;' : ''}\r\n \r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n font-style: italic;\r\n }\r\n\r\n ::-webkit-search-decoration,\r\n ::-webkit-search-cancel-button,\r\n ::-webkit-search-results-button,\r\n ::-webkit-search-results-decoration {\r\n -webkit-appearance: none;\r\n }\r\n`;\r\n\r\nexport const DropdownInputFieldStyles = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; minWidth?: string }>`\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n\r\n padding: 12px 16px;\r\n height: 48px;\r\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\r\n width: 100%;\r\n\r\n background: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_400', props.theme)};\r\n box-sizing: border-box;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n position: relative;\r\n\r\n input {\r\n font-size: inherit;\r\n line-height: inherit;\r\n color: inherit;\r\n }\r\n\r\n ${TooltipTrigger('hover')}\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n\r\n ${BREAKPOINTS.MEDIUM} {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 16px;\r\n height: 56px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.small {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 12px 16px;\r\n height: 48px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.medium {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n height: 56px;\r\n padding: 16px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n pointer-events: none;\r\n width: 24px;\r\n height: 24px;\r\n color: ${(props) => props.isPlaceholder ? COLORS.getColor('neutral_600', props.theme) : undefined};\r\n }\r\n\r\n &:focus {\r\n outline: 3px solid #ddd;\r\n }\r\n\r\n &:focus-within,\r\n &.focus-visible-within {\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n &:hover:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_200', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n cursor: pointer;\r\n }\r\n\r\n &:active:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_300', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.button {\r\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.getColor('neutral_300', props.theme) : COLORS.getColor('neutral_600', props.theme))}\r\n\r\n box-sizing: border-box;\r\n height: 32px;\r\n padding: 0 8px;\r\n width: initial;\r\n min-width: initial;\r\n border: none !important;\r\n box-shadow: none;\r\n border-radius: 4px;\r\n\r\n &.expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n\r\n ${(props) => (props.disabled ? disabledState : '')}\r\n ${(props) => (props.readOnly ? lockedState : '')}\r\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\r\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\r\n\r\n ${CommonInteractionStyling};\r\n\r\n &.focus-visible,\r\n &.focus-visible-within {\r\n z-index: ${Z_INDEXES.dropdown + 1} !important;\r\n ${focusStyles}\r\n }\r\n`;\r\n\r\nexport const DropdownContentButtonStyling = css`\r\n min-width: 344px;\r\n`;\r\n\r\n\r\n\r\nexport const DropdownButtonTextContent = styled.div`\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n box-sizing: border-box;\r\n min-width: 64px;\r\n min-height: 32px;\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n`;\r\n\r\nexport const DropdownButtonTextIcon = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n`;\r\n\r\nexport const DropdownButtonTextArrow = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n\r\n svg {\r\n pointer-events: none;\r\n }\r\n`;\r\n\r\nexport const DropdownButtonTextStyles = styled.div`\r\n flex: 1\r\n`;\r\n\r\nexport const DropdownButtonTextWrapper = styled.div`\r\n box-sizing: border-box;\r\n min-height: 48px;\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n cursor: pointer;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('neutral_600', props.theme))}\r\n\r\n .expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n\r\n ${DropdownButtonTextContent} {\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &:hover:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &:active:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n\r\n}`;\r\n"],"mappings":";;AAAA,OAAOA,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,SA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KAAK;EAAA,OAAIb,MAAM,CAACqB,QAAQ,CAAC,aAAa,EAAER,KAAK,CAACS,KAAK,CAAC;AAAA,GAK7DyB,yBAAyB,EACL,UAAAlC,KAAK;EAAA,OAAIb,MAAM,CAACqB,QAAQ,CAAC,aAAa,EAAER,KAAK,CAACS,KAAK,CAAC;AAAA,GAC/D,UAAAT,KAAK;EAAA,OAAIb,MAAM,CAACqB,QAAQ,CAAC,aAAa,EAAER,KAAK,CAACS,KAAK,CAAC;AAAA,GAMtD,UAAAT,KAAK;EAAA,OAAIb,MAAM,CAACqB,QAAQ,CAAC,aAAa,EAAER,KAAK,CAACS,KAAK,CAAC;AAAA,EAG/D","ignoreList":[]}
1
+ {"version":3,"file":"CommonStyling.js","names":["styled","css","CommonInteractionStyling","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","ComponentXSStyling","ComponentXXSStyling","Z_INDEXES","TooltipTrigger","DropdownContainer","div","_templateObject","_taggedTemplateLiteral","props","isButton","minWidth","concat","readOnly","disabled","margin","focus","getColor","theme","lockedState","_templateObject2","disabledState","_templateObject3","activeValidationMessage","_templateObject4","placeholderStyling","_templateObject5","Italic","DropdownInputField","input","_templateObject6","ellipsis","DropdownInputFieldStyles","_templateObject7","Regular","MEDIUM","isPlaceholder","undefined","Bold","showValidationMessage","dropdown","DropdownContentButtonStyling","_templateObject8","DropdownButtonTextContent","_templateObject9","DropdownButtonTextIcon","_templateObject10","DropdownButtonTextArrow","_templateObject11","DropdownButtonTextStyles","_templateObject12","DropdownButtonTextWrapper","_templateObject13"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\r\nimport {CommonInteractionStyling} from '../common';\r\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\r\nimport {\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles/typography';\r\nimport {Z_INDEXES} from '../styles/z-indexes';\r\nimport { TooltipTrigger } from '../Tooltips/TooltipStyles';\r\n\r\nexport const DropdownContainer = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\r\n display: inline-block;\r\n\r\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\r\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\r\n ${(props) => (props.margin ? `margin: ${props.margin};` : 'margin-bottom: 4px;')}\r\n .show {\r\n display: block;\r\n }\r\n\r\n .value {\r\n flex-grow: 1;\r\n }\r\n\r\n &:focus-within {\r\n z-index: ${Z_INDEXES.focus};\r\n }\r\n\r\n input:hover + div {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n input:active + div {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n\r\n`;\r\n\r\nconst lockedState = css`\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_300', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)} !important;\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n`;\r\n\r\nconst disabledState = css`\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n\r\n input {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n\r\nconst activeValidationMessage = css`\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('critical_400', props.theme)};\r\n`;\r\n\r\nconst placeholderStyling = css`\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n`;\r\n\r\nexport const DropdownInputField = styled.input<{ellipsis?: boolean}>`\r\n border: none;\r\n outline: none;\r\n background-color: inherit;\r\n cursor: pointer;\r\n min-width: 0px;\r\n color: ${props => COLORS.getColor('black', props.theme)} !important;\r\n padding: 0;\r\n flex-grow: 1;\r\n display: flex;\r\n justify-content: center;\r\n overflow: hidden;\r\n ${props => props.ellipsis ? 'text-overflow: ellipsis;' : ''}\r\n \r\n ::placeholder {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n font-style: italic;\r\n }\r\n\r\n ::-webkit-search-decoration,\r\n ::-webkit-search-cancel-button,\r\n ::-webkit-search-results-button,\r\n ::-webkit-search-results-decoration {\r\n -webkit-appearance: none;\r\n }\r\n`;\r\n\r\nexport const DropdownInputFieldStyles = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; minWidth?: string }>`\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n\r\n padding: 12px 16px;\r\n height: 48px;\r\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\r\n width: 100%;\r\n\r\n background: ${props => COLORS.getColor('white', props.theme)};\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('neutral_400', props.theme)};\r\n box-sizing: border-box;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n position: relative;\r\n\r\n input {\r\n font-size: inherit;\r\n line-height: inherit;\r\n color: inherit;\r\n }\r\n\r\n ${TooltipTrigger('hover')}\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n\r\n ${BREAKPOINTS.MEDIUM} {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 16px;\r\n height: 56px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.small {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\r\n padding: 12px 16px;\r\n height: 48px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.medium {\r\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\r\n height: 56px;\r\n padding: 16px;\r\n\r\n &::placeholder {\r\n ${props => ComponentXSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n pointer-events: none;\r\n width: 24px;\r\n height: 24px;\r\n color: ${(props) => props.isPlaceholder ? COLORS.getColor('neutral_600', props.theme) : undefined};\r\n }\r\n\r\n &:focus {\r\n outline: 3px solid #ddd;\r\n }\r\n\r\n &:focus-within,\r\n &.focus-visible-within {\r\n box-shadow: inset 0px 0px 0px 2px ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n &:hover:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_200', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_600', props.theme)};\r\n }\r\n\r\n cursor: pointer;\r\n }\r\n\r\n &:active:not(.action-within) {\r\n box-shadow: inset 0px 0px 0px 1px ${props => COLORS.getColor('primary_300', props.theme)};\r\n\r\n input {\r\n ::placeholder {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n .dropdown-arrow {\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.button {\r\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.getColor('neutral_300', props.theme) : COLORS.getColor('neutral_600', props.theme))}\r\n\r\n box-sizing: border-box;\r\n height: 32px;\r\n padding: 0 8px;\r\n width: initial;\r\n min-width: initial;\r\n border: none !important;\r\n box-shadow: none;\r\n border-radius: 4px;\r\n\r\n &.expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n\r\n ${(props) => (props.disabled ? disabledState : '')}\r\n ${(props) => (props.readOnly ? lockedState : '')}\r\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\r\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\r\n\r\n ${CommonInteractionStyling};\r\n\r\n &.focus-visible,\r\n &.focus-visible-within {\r\n z-index: ${Z_INDEXES.dropdown + 1} !important;\r\n ${focusStyles}\r\n }\r\n`;\r\n\r\nexport const DropdownContentButtonStyling = css`\r\n min-width: 344px;\r\n`;\r\n\r\n\r\n\r\nexport const DropdownButtonTextContent = styled.div`\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n box-sizing: border-box;\r\n min-width: 64px;\r\n min-height: 32px;\r\n padding: 4px 8px;\r\n border-radius: 4px;\r\n`;\r\n\r\nexport const DropdownButtonTextIcon = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n`;\r\n\r\nexport const DropdownButtonTextArrow = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n\r\n svg {\r\n pointer-events: none;\r\n }\r\n`;\r\n\r\nexport const DropdownButtonTextStyles = styled.div`\r\n flex: 1\r\n`;\r\n\r\nexport const DropdownButtonTextWrapper = styled.div`\r\n box-sizing: border-box;\r\n min-height: 48px;\r\n display: flex;\r\n align-items: center;\r\n width: fit-content;\r\n cursor: pointer;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('neutral_600', props.theme))}\r\n\r\n .expanded {\r\n color: ${props => COLORS.getColor('neutral_800', props.theme)};\r\n\r\n ${DropdownButtonTextContent} {\r\n background: ${props => COLORS.getColor('neutral_20', props.theme)};\r\n }\r\n }\r\n\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &:hover:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &:active:not(.disabled) {\r\n ${DropdownButtonTextContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n\r\n}`;\r\n"],"mappings":";;AAAA,OAAOA,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,SAAQC,wBAAwB,QAAO,WAAW;AAClD,SAAQC,WAAW,EAAEC,MAAM,EAAEC,kBAAkB,EAAEC,WAAW,QAAO,WAAW;AAC9E,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,mBAAmB,QACd,sBAAsB;AAC7B,SAAQC,SAAS,QAAO,qBAAqB;AAC7C,SAASC,cAAc,QAAQ,2BAA2B;AAE1D,OAAO,IAAMC,iBAAiB,GAAGb,MAAM,CAACc,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,8RAGvC,UAACC,KAAK;EAAA,OAAK,CAACA,KAAK,CAACC,QAAQ,KAAKD,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEE,QAAQ,8BAAAC,MAAA,CAA8BH,KAAK,CAACE,QAAQ,SAAM,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});
85
+ var _CommonStyling = require("./CommonStyling");
86
+ Object.keys(_CommonStyling).forEach(function (key) {
87
+ if (key === "default" || key === "__esModule") return;
88
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
89
+ if (key in exports && exports[key] === _CommonStyling[key]) return;
90
+ Object.defineProperty(exports, key, {
91
+ enumerable: true,
92
+ get: function get() {
93
+ return _CommonStyling[key];
94
+ }
95
+ });
96
+ });
85
97
  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); }
86
98
  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; }
87
99
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["_DropdownContent","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_DropdownButton","_DropdownFilter","_BasicDropdown","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set"],"sources":["../../src/Dropdown/index.ts"],"sourcesContent":["export type { DropdownItem } from './DropdownContent';\r\n\r\nexport { default as DropdownContent } from './DropdownContent';\r\nexport * from './DropdownContent';\r\n\r\nexport { default as DropdownButton } from './DropdownButton';\r\nexport * from './DropdownButton';\r\n\r\nexport { default as DropdownFilter } from './DropdownFilter';\r\nexport * from './DropdownFilter';\r\n\r\nexport { default as B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KAAAC,SAAA,UAAAC,CAAA,GAAAzB,MAAA,CAAAS,cAAA,IAAAT,MAAA,CAAA0B,wBAAA,WAAAC,CAAA,IAAAX,CAAA,oBAAAW,CAAA,OAAAtB,cAAA,CAAAC,IAAA,CAAAU,CAAA,EAAAW,CAAA,SAAAC,CAAA,GAAAH,CAAA,GAAAzB,MAAA,CAAA0B,wBAAA,CAAAV,CAAA,EAAAW,CAAA,UAAAC,CAAA,KAAAA,CAAA,CAAAjB,GAAA,IAAAiB,CAAA,CAAAC,GAAA,IAAA7B,MAAA,CAAAS,cAAA,CAAAc,CAAA,EAAAI,CAAA,EAAAC,CAAA,IAAAL,CAAA,CAAAI,CAAA,IAAAX,CAAA,CAAAW,CAAA,YAAAJ,CAAA,cAAAP,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAU,GAAA,CAAAb,CAAA,EAAAO,CAAA,GAAAA,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.cjs","names":["_DropdownContent","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_DropdownButton","_DropdownFilter","_BasicDropdown","_CommonStyling","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set"],"sources":["../../src/Dropdown/index.ts"],"sourcesContent":["export type { DropdownItem } from './DropdownContent';\r\n\r\nexport { default as DropdownContent } from './DropdownContent';\r\nexport * from './DropdownContent';\r\n\r\nexport { default as DropdownButton } from './DropdownButton';\r\nexport * from './DropdownButton';\r\n\r\nexport { default as DropdownFilter } from './DropdownFilter';\r\nexport * from './DropdownFilter';\r\n\r\nexport { default as BasicDropdown } from './BasicDropdown';\r\nexport * from './BasicDropdown';\r\n\r\nexport * from './CommonStyling';\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,gBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACAC,MAAA,CAAAC,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,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,CAAAT,GAAA,CAAAM,CAAA,OAAAO,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAA1B,MAAA,CAAAS,cAAA,IAAAT,MAAA,CAAA2B,wBAAA,WAAAC,CAAA,IAAAX,CAAA,oBAAAW,CAAA,OAAAvB,cAAA,CAAAC,IAAA,CAAAW,CAAA,EAAAW,CAAA,SAAAC,CAAA,GAAAH,CAAA,GAAA1B,MAAA,CAAA2B,wBAAA,CAAAV,CAAA,EAAAW,CAAA,UAAAC,CAAA,KAAAA,CAAA,CAAAlB,GAAA,IAAAkB,CAAA,CAAAC,GAAA,IAAA9B,MAAA,CAAAS,cAAA,CAAAe,CAAA,EAAAI,CAAA,EAAAC,CAAA,IAAAL,CAAA,CAAAI,CAAA,IAAAX,CAAA,CAAAW,CAAA,YAAAJ,CAAA,cAAAP,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAU,GAAA,CAAAb,CAAA,EAAAO,CAAA,GAAAA,CAAA","ignoreList":[]}
@@ -7,3 +7,4 @@ export { default as DropdownFilter } from './DropdownFilter';
7
7
  export * from './DropdownFilter';
8
8
  export { default as BasicDropdown } from './BasicDropdown';
9
9
  export * from './BasicDropdown';
10
+ export * from './CommonStyling';
@@ -6,4 +6,5 @@ export { default as DropdownFilter } from './DropdownFilter';
6
6
  export * from './DropdownFilter';
7
7
  export { default as BasicDropdown } from './BasicDropdown';
8
8
  export * from './BasicDropdown';
9
+ export * from './CommonStyling';
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","DropdownContent","DropdownButton","DropdownFilter","BasicDropdown"],"sources":["../../src/Dropdown/index.ts"],"sourcesContent":["export type { DropdownItem } from './DropdownContent';\r\n\r\nexport { default as DropdownContent } from './DropdownContent';\r\nexport * from './DropdownContent';\r\n\r\nexport { default as DropdownButton } from './DropdownButton';\r\nexport * from './DropdownButton';\r\n\r\nexport { default as DropdownFilter } from './DropdownFilter';\r\nexport * from './DropdownFilter';\r\n\r\nexport { default as BasicDropdown } from './BasicDropdown';\r\nexport * from './BasicDropdown';\r\n"],"mappings":"AAEA,SAASA,OAAO,IAAIC,eAAe,QAAQ,mBAAmB;AAC9D,cAAc,mBAAmB;AAEjC,SAASD,OAAO,IAAIE,cAAc,QAAQ,kBAAkB;AAC5D,cAAc,kBAAkB;AAEhC,SAASF,OAAO,IAAIG,cAAc,QAAQ,kBAAkB;AAC5D,cAAc,kBAAkB;AAEhC,SAASH,OAAO,IAAII,aAAa,QAAQ,iBAAiB;AAC1D,cAAc,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","DropdownContent","DropdownButton","DropdownFilter","BasicDropdown"],"sources":["../../src/Dropdown/index.ts"],"sourcesContent":["export type { DropdownItem } from './DropdownContent';\r\n\r\nexport { default as DropdownContent } from './DropdownContent';\r\nexport * from './DropdownContent';\r\n\r\nexport { default as DropdownButton } from './DropdownButton';\r\nexport * from './DropdownButton';\r\n\r\nexport { default as DropdownFilter } from './DropdownFilter';\r\nexport * from './DropdownFilter';\r\n\r\nexport { default as BasicDropdown } from './BasicDropdown';\r\nexport * from './BasicDropdown';\r\n\r\nexport * from './CommonStyling';\r\n"],"mappings":"AAEA,SAASA,OAAO,IAAIC,eAAe,QAAQ,mBAAmB;AAC9D,cAAc,mBAAmB;AAEjC,SAASD,OAAO,IAAIE,cAAc,QAAQ,kBAAkB;AAC5D,cAAc,kBAAkB;AAEhC,SAASF,OAAO,IAAIG,cAAc,QAAQ,kBAAkB;AAC5D,cAAc,kBAAkB;AAEhC,SAASH,OAAO,IAAII,aAAa,QAAQ,iBAAiB;AAC1D,cAAc,iBAAiB;AAE/B,cAAc,iBAAiB","ignoreList":[]}
@@ -203,7 +203,7 @@ var ModalDialog = function ModalDialog(_ref) {
203
203
  });
204
204
  };
205
205
  var LeftFooterAction = function LeftFooterAction(leftFooterAction) {
206
- var _variant;
206
+ var _button$variant, _button$children;
207
207
  var text = leftFooterAction.text,
208
208
  actionType = leftFooterAction.actionType,
209
209
  disabled = leftFooterAction.disabled,
@@ -211,20 +211,21 @@ var ModalDialog = function ModalDialog(_ref) {
211
211
  action = leftFooterAction.action;
212
212
  switch (actionType) {
213
213
  case 'button':
214
+ var button = leftFooterAction;
214
215
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
215
216
  id: 'left-action-button',
216
- type: leftFooterAction === null || leftFooterAction === void 0 ? void 0 : leftFooterAction.type,
217
+ type: button === null || button === void 0 ? void 0 : button.type,
217
218
  disabled: disabled,
218
- loading: leftFooterAction === null || leftFooterAction === void 0 ? void 0 : leftFooterAction.loading,
219
+ loading: button === null || button === void 0 ? void 0 : button.loading,
219
220
  icon: icon,
220
221
  size: size,
221
222
  onClick: action,
222
- variant: (_variant = leftFooterAction === null || leftFooterAction === void 0 ? void 0 : leftFooterAction.variant) !== null && _variant !== void 0 ? _variant : 'secondary',
223
+ variant: (_button$variant = button === null || button === void 0 ? void 0 : button.variant) !== null && _button$variant !== void 0 ? _button$variant : 'secondary',
223
224
  style: {
224
225
  order: -1,
225
226
  marginRight: 'auto'
226
227
  },
227
- children: text
228
+ children: (_button$children = button === null || button === void 0 ? void 0 : button.children) !== null && _button$children !== void 0 ? _button$children : button === null || button === void 0 ? void 0 : button.text
228
229
  });
229
230
  case 'hyperlink':
230
231
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_.HyperLink, {
@@ -307,6 +308,7 @@ var ModalDialog = function ModalDialog(_ref) {
307
308
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalStyles.ModalFooter, {
308
309
  size: size,
309
310
  children: [leftFooterAction && LeftFooterAction(leftFooterAction), buttons === null || buttons === void 0 ? void 0 : buttons.map(function (b, i) {
311
+ var _b$children;
310
312
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
311
313
  icon: b.icon,
312
314
  id: b.id,
@@ -316,7 +318,7 @@ var ModalDialog = function ModalDialog(_ref) {
316
318
  onClick: b.action,
317
319
  type: b.type,
318
320
  variant: b.variant,
319
- children: b.text
321
+ children: (_b$children = b.children) !== null && _b$children !== void 0 ? _b$children : b.text
320
322
  }, b.id || i);
321
323
  })]
322
324
  })]
@@ -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","_variant","text","actionType","disabled","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","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 return (\r\n <Button\r\n id={'left-action-button'}\r\n type={(leftFooterAction as LeftFooterButton)?.type}\r\n disabled={disabled}\r\n loading={(leftFooterAction as LeftFooterButton)?.loading}\r\n icon={icon}\r\n size={size}\r\n onClick={action}\r\n variant={(leftFooterAction as LeftFooterButton)?.variant ?? 'secondary'}\r\n style={{ order: -1, marginRight: 'auto' }}>\r\n {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.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"],"mapp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0G,UAAA,YAAAK,MAAA;EACf9G,KAAK,EAAAyG,UAAA,YAAAK,MAAA;EACL7G,iBAAiB,EAAAwG,UAAA,YAAAC;AAAA;AAAA,IAAAS,QAAA,GA6QJvI,WAAW;AAAA2H,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","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;A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H,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":[]}
@@ -197,7 +197,7 @@ export var ModalDialog = function ModalDialog(_ref) {
197
197
  });
198
198
  };
199
199
  var LeftFooterAction = function LeftFooterAction(leftFooterAction) {
200
- var _variant;
200
+ var _button$variant, _button$children;
201
201
  var text = leftFooterAction.text,
202
202
  actionType = leftFooterAction.actionType,
203
203
  disabled = leftFooterAction.disabled,
@@ -205,20 +205,21 @@ export var ModalDialog = function ModalDialog(_ref) {
205
205
  action = leftFooterAction.action;
206
206
  switch (actionType) {
207
207
  case 'button':
208
+ var button = leftFooterAction;
208
209
  return /*#__PURE__*/_jsx(Button, {
209
210
  id: 'left-action-button',
210
- type: leftFooterAction === null || leftFooterAction === void 0 ? void 0 : leftFooterAction.type,
211
+ type: button === null || button === void 0 ? void 0 : button.type,
211
212
  disabled: disabled,
212
- loading: leftFooterAction === null || leftFooterAction === void 0 ? void 0 : leftFooterAction.loading,
213
+ loading: button === null || button === void 0 ? void 0 : button.loading,
213
214
  icon: icon,
214
215
  size: size,
215
216
  onClick: action,
216
- variant: (_variant = leftFooterAction === null || leftFooterAction === void 0 ? void 0 : leftFooterAction.variant) !== null && _variant !== void 0 ? _variant : 'secondary',
217
+ variant: (_button$variant = button === null || button === void 0 ? void 0 : button.variant) !== null && _button$variant !== void 0 ? _button$variant : 'secondary',
217
218
  style: {
218
219
  order: -1,
219
220
  marginRight: 'auto'
220
221
  },
221
- children: text
222
+ children: (_button$children = button === null || button === void 0 ? void 0 : button.children) !== null && _button$children !== void 0 ? _button$children : button === null || button === void 0 ? void 0 : button.text
222
223
  });
223
224
  case 'hyperlink':
224
225
  return /*#__PURE__*/_jsxs(HyperLink, {
@@ -301,6 +302,7 @@ export var ModalDialog = function ModalDialog(_ref) {
301
302
  }), /*#__PURE__*/_jsxs(ModalFooter, {
302
303
  size: size,
303
304
  children: [leftFooterAction && LeftFooterAction(leftFooterAction), buttons === null || buttons === void 0 ? void 0 : buttons.map(function (b, i) {
305
+ var _b$children;
304
306
  return /*#__PURE__*/_jsx(Button, {
305
307
  icon: b.icon,
306
308
  id: b.id,
@@ -310,7 +312,7 @@ export var ModalDialog = function ModalDialog(_ref) {
310
312
  onClick: b.action,
311
313
  type: b.type,
312
314
  variant: b.variant,
313
- children: b.text
315
+ children: (_b$children = b.children) !== null && _b$children !== void 0 ? _b$children : b.text
314
316
  }, b.id || i);
315
317
  })]
316
318
  })]
@@ -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","_variant","text","actionType","disabled","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","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 return (\r\n <Button\r\n id={'left-action-button'}\r\n type={(leftFooterAction as LeftFooterButton)?.type}\r\n disabled={disabled}\r\n loading={(leftFooterAction as LeftFooterButton)?.loading}\r\n icon={icon}\r\n size={size}\r\n onClick={action}\r\n variant={(leftFooterAction as LeftFooterButton)?.variant ?? 'secondary'}\r\n style={{ order: -1, marginRight: 'auto' }}>\r\n {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.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 ModalDial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O,EAAAiF,GAAA,CAAAK,MAAA;EAEPzF,UAAU,EAAAoF,GAAA,CAAAQ,IAAA;EACV3F,WAAW,EAAAmF,GAAA,CAAAQ,IAAA,CAAAN,UAAA;EACXpF,YAAY,EAAAkF,GAAA,CAAAQ,IAAA,CAAAN,UAAA;EACZjF,IAAI,EAAA+E,GAAA,CAAAI,SAAA,EAAAJ,GAAA,CAAAK,MAAA,EAAAL,GAAA,CAAAG,IAAA;EACJjF,KAAK,EAAA8E,GAAA,CAAAK,MAAA;EACLlF,IAAI,EAAA6E,GAAA,CAAAG,IAAA;EACJ/E,MAAM,EAAA4E,GAAA,CAAAS,MAAA;EACNpF,eAAe,EAAA2E,GAAA,CAAAK,MAAA;EACf/E,KAAK,EAAA0E,GAAA,CAAAK,MAAA;EACL9E,iBAAiB,EAAAyE,GAAA,CAAAC;AAAA;AA6QnB,eAAe/F,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","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.children ?? b.text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,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 +1 @@
1
- {"version":3,"file":"ModalTypes.cjs","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {ButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text: string;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n text: string;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ModalTypes.cjs","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {ButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
@@ -17,7 +17,8 @@ export interface ModalHeaderToggleButton extends ToggleButtonProps {
17
17
  export type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;
18
18
  export interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {
19
19
  action?: (() => void) | ((e: any) => void);
20
- text: string;
20
+ text?: string;
21
+ children?: React.ReactNode;
21
22
  }
22
23
  export interface LeftFooterActionBase {
23
24
  actionType: 'hyperlink' | 'note' | 'button';
@@ -28,6 +29,6 @@ export interface LeftFooterActionBase {
28
29
  export interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {
29
30
  }
30
31
  export interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {
31
- text: string;
32
+ children?: React.ReactNode;
32
33
  }
33
34
  export type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;
@@ -1 +1 @@
1
- {"version":3,"file":"ModalTypes.js","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {ButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text: string;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n text: string;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ModalTypes.js","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import {ButtonProps} from '../Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {IconButtonProps} from '../Button';\r\nimport React from 'react';\r\nimport {IconDropdownButtonProps} from \"../Dropdown/DropdownButtonTypes\";\r\nimport {ToggleButtonProps} from \"../Toggles/ToggleButton\";\r\n\r\nexport interface ModalHeaderIconButton extends Omit<IconButtonProps, 'hideOnLowWidth' | 'flatEdge' | 'isInMobileMenu' | 'useTransparentBackground' | 'shouldNotInteract' | 'unsetIconSize' | 'borderRadius' | 'focusBackgroundColor' | 'children' | 'focusOnClick'> {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport interface ModalHeaderDropdownButton extends Omit<IconDropdownButtonProps, 'size' | 'type'> {\r\n componentType: 'dropdown';\r\n}\r\n\r\nexport interface ModalHeaderToggleButton extends ToggleButtonProps {\r\n componentType: 'toggle';\r\n}\r\n\r\nexport type ModalHeaderButtons = ModalHeaderIconButton | ModalHeaderDropdownButton | ModalHeaderToggleButton;\r\n\r\n\r\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\r\n action?: (() => void) | ((e: any) => void);\r\n text?: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport interface LeftFooterActionBase {\r\n actionType: 'hyperlink' | 'note' | 'button';\r\n text: string;\r\n icon?: React.ReactNode;\r\n action?: (() => void) | ((e: any) => void);\r\n}\r\n\r\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {\r\n}\r\n\r\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\r\n"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laerdal/life-react-components",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "private": false,
5
5
  "author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
6
6
  "contributors": [],