@laerdal/life-react-components 3.1.2 → 3.1.3-dev.1.full

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/Button/Button.cjs +10 -10
  2. package/dist/Button/Button.cjs.map +1 -1
  3. package/dist/Button/Button.js +10 -10
  4. package/dist/Button/Button.js.map +1 -1
  5. package/dist/Dropdown/BasicDropdown.cjs +4 -6
  6. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  7. package/dist/Dropdown/BasicDropdown.d.ts +0 -1
  8. package/dist/Dropdown/BasicDropdown.js +4 -6
  9. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  10. package/dist/Dropdown/CommonStyling.cjs +1 -1
  11. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  12. package/dist/Dropdown/CommonStyling.js +1 -1
  13. package/dist/Dropdown/CommonStyling.js.map +1 -1
  14. package/dist/Dropdown/DropdownFilter.cjs +2 -4
  15. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  16. package/dist/Dropdown/DropdownFilter.d.ts +0 -1
  17. package/dist/Dropdown/DropdownFilter.js +2 -4
  18. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  19. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +2 -0
  20. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
  21. package/dist/GlobalNavigationBar/desktop/MainMenu.js +2 -0
  22. package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
  23. package/dist/Image/ImageWithFallbacks.cjs +7 -5
  24. package/dist/Image/ImageWithFallbacks.cjs.map +1 -1
  25. package/dist/Image/ImageWithFallbacks.d.ts +3 -3
  26. package/dist/Image/ImageWithFallbacks.js +7 -5
  27. package/dist/Image/ImageWithFallbacks.js.map +1 -1
  28. package/dist/InputFields/Checkbox.cjs +2 -5
  29. package/dist/InputFields/Checkbox.cjs.map +1 -1
  30. package/dist/InputFields/Checkbox.js +2 -5
  31. package/dist/InputFields/Checkbox.js.map +1 -1
  32. package/dist/InputFields/DatepickerField.cjs +7 -8
  33. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  34. package/dist/InputFields/DatepickerField.d.ts +0 -2
  35. package/dist/InputFields/DatepickerField.js +7 -8
  36. package/dist/InputFields/DatepickerField.js.map +1 -1
  37. package/dist/InputFields/NumberField.cjs +5 -7
  38. package/dist/InputFields/NumberField.cjs.map +1 -1
  39. package/dist/InputFields/NumberField.d.ts +0 -2
  40. package/dist/InputFields/NumberField.js +5 -7
  41. package/dist/InputFields/NumberField.js.map +1 -1
  42. package/dist/InputFields/TextField.cjs +2 -4
  43. package/dist/InputFields/TextField.cjs.map +1 -1
  44. package/dist/InputFields/TextField.d.ts +0 -2
  45. package/dist/InputFields/TextField.js +2 -4
  46. package/dist/InputFields/TextField.js.map +1 -1
  47. package/dist/InputFields/styling.cjs +1 -1
  48. package/dist/InputFields/styling.cjs.map +1 -1
  49. package/dist/InputFields/styling.js +1 -1
  50. package/dist/InputFields/styling.js.map +1 -1
  51. package/dist/Modals/ModalContent.cjs +83 -27
  52. package/dist/Modals/ModalContent.cjs.map +1 -1
  53. package/dist/Modals/ModalContent.d.ts +4 -2
  54. package/dist/Modals/ModalContent.js +84 -28
  55. package/dist/Modals/ModalContent.js.map +1 -1
  56. package/dist/Modals/ModalTypes.cjs.map +1 -1
  57. package/dist/Modals/ModalTypes.d.ts +13 -3
  58. package/dist/Modals/ModalTypes.js.map +1 -1
  59. package/dist/Modals/index.cjs.map +1 -1
  60. package/dist/Modals/index.d.ts +1 -1
  61. package/dist/Modals/index.js.map +1 -1
  62. package/dist/Tooltips/TooltipOverflow.cjs +7 -2
  63. package/dist/Tooltips/TooltipOverflow.cjs.map +1 -1
  64. package/dist/Tooltips/TooltipOverflow.js +7 -2
  65. package/dist/Tooltips/TooltipOverflow.js.map +1 -1
  66. package/dist/Tooltips/TooltipStyles.cjs +5 -5
  67. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  68. package/dist/Tooltips/TooltipStyles.d.ts +1 -2
  69. package/dist/Tooltips/TooltipStyles.js +5 -5
  70. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  71. package/dist/Tooltips/TooltipWrapper.cjs +1 -2
  72. package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
  73. package/dist/Tooltips/TooltipWrapper.js +1 -2
  74. package/dist/Tooltips/TooltipWrapper.js.map +1 -1
  75. package/dist/icons/index.cjs +1 -1
  76. package/dist/icons/index.cjs.map +1 -1
  77. package/dist/icons/index.js +1 -1
  78. package/dist/icons/index.js.map +1 -1
  79. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"styling.cjs","names":["InputWrapper","styled","div","props","readOnly","disabled","margin","TooltipTrigger","readOnlyState","css","COLORS","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","extraRightPadding","ComponentSStyling","ComponentTextStyle","Italic","neutral_500","BREAKPOINTS","MEDIUM","ComponentMStyling","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","focusStyles","correct_500","primary_700","ValidationStyling","ComponentXXSStyling","Regular","Warning","ComponentXSStyling","ErrorMessage","critical_500","StateColors","States","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import { TooltipTrigger } from '../Tooltips/TooltipStyles';\nimport styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n \n ${TooltipTrigger('hover')}\n\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n extraRightPadding?: number;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ${props => 16 + (props.extraRightPadding ?? 0)}px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAsC;AAAA;AAAA;AAE/B,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,8JAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,EAG3D,IAAAC,6BAAc,EAAC,OAAO,CAAC,CAE1B;AAAC;AAEK,IAAMC,aAAa,OAAGC,qBAAG,kQACVC,cAAM,CAACC,WAAW,EACRD,cAAM,CAACE,WAAW,EACvCF,cAAM,CAACG,WAAW,CAI5B;AAAC;AACK,IAAMC,uBAAuB,OAAGL,qBAAG,8HACVC,cAAM,CAACK,YAAY,CAClD;AAAC;AAEF,IAAMC,iBAAiB,GAAGf,yBAAM,CAACgB,KAAK,6nDAelC,UAACd,KAAK;EAAA,OACNA,KAAK,CAACe,aAAa,oJAK8BR,cAAM,CAACS,WAAW,6DACxBT,cAAM,CAACS,WAAW,wDACvBT,cAAM,CAACS,WAAW,MAAG;AAAA,GAGhD,UAAAhB,KAAK;EA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e,OAAO,EAAE,IAAI,CAAC,CAezD;AAAC;AACK,IAAMG,YAAY,GAAG,IAAAvC,yBAAM,EAACqC,OAAO,CAAC,wGAChC5B,cAAM,CAAC+B,YAAY,CAC7B;AAAC;AAEF,IAAMC,WAAW,mEACdC,aAAM,CAACC,OAAO,EAAGlC,cAAM,CAACc,WAAW,+CACnCmB,aAAM,CAACE,KAAK,EAAGnC,cAAM,CAACuB,WAAW,+CACjCU,aAAM,CAACG,OAAO,EAAGpC,cAAM,CAAC+B,YAAY,gBACtC;AAEM,IAAMM,iBAAiB,GAAG,IAAA9C,yBAAM,EAACqC,OAAO,CAAC,wGACrC,UAACnC,KAAK;EAAA,OAAKuC,WAAW,CAACvC,KAAK,CAAC6C,IAAI,CAAC;AAAA,EAC5C;AAAC;AAEK,IAAMC,WAAW,GAAG,IAAAhD,yBAAM,EAACqC,OAAO,CAAC,wGAC/B5B,cAAM,CAACc,WAAW,CAC5B;AAAC;AACK,IAAM0B,iBAAiB,GAAG,IAAAjD,yBAAM,EAACqC,OAAO,CAAC,0GACrC5B,cAAM,CAACG,WAAW,CAC5B;AAAC;AAIK,IAAMsC,UAAU,GAAGlD,yBAAM,CAACC,GAAG,gHAEnC;AAAC;AAEK,IAAMkD,iBAAiB,GAAG,IAAAnD,yBAAM,EAACkD,UAAU,CAAC,uIAGlD;AAAC"}
1
+ {"version":3,"file":"styling.cjs","names":["InputWrapper","styled","div","props","readOnly","disabled","margin","TooltipTrigger","readOnlyState","css","COLORS","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","extraRightPadding","ComponentSStyling","ComponentTextStyle","Italic","neutral_500","BREAKPOINTS","MEDIUM","ComponentMStyling","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","focusStyles","correct_500","primary_700","ValidationStyling","ComponentXXSStyling","Regular","Warning","ComponentXSStyling","ErrorMessage","critical_500","StateColors","States","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import { TooltipTrigger } from '../Tooltips/TooltipStyles';\nimport styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n \n ${TooltipTrigger()}\n\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n extraRightPadding?: number;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ${props => 16 + (props.extraRightPadding ?? 0)}px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAsC;AAAA;AAAA;AAE/B,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,8JAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,EAG3D,IAAAC,6BAAc,GAAE,CAEnB;AAAC;AA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D;AAAC"}
@@ -10,7 +10,7 @@ export var InputWrapper = styled.div(_templateObject || (_templateObject = _tagg
10
10
  return props.readOnly || props.disabled ? 'cursor: not-allowed;' : '';
11
11
  }, function (props) {
12
12
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
13
- }, TooltipTrigger('hover'));
13
+ }, TooltipTrigger());
14
14
  export var readOnlyState = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n box-shadow: inset 0 0 0 1px ", " !important;\n color: ", " !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n"])), COLORS.neutral_100, COLORS.neutral_300, COLORS.neutral_600);
15
15
  export var activeErrorMessageState = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.critical_400);
16
16
  var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ", "px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ", " !important;\n\n ", "\n\n &:read-only:not(:disabled) {\n ", "\n }\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.focus-visible {\n ", "\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n"])), function (props) {
@@ -1 +1 @@
1
- {"version":3,"file":"styling.js","names":["TooltipTrigger","styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","States","InputWrapper","div","props","readOnly","disabled","margin","readOnlyState","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","extraRightPadding","Italic","neutral_500","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","correct_500","primary_700","ValidationStyling","Regular","Warning","ErrorMessage","critical_500","StateColors","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import { TooltipTrigger } from '../Tooltips/TooltipStyles';\nimport styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n \n ${TooltipTrigger('hover')}\n\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n extraRightPadding?: number;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ${props => 16 + (props.extraRightPadding ?? 0)}px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":";;;AAAA,SAASA,cAAc,QAAQ,2BAA2B;AAC1D,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC5D,SAASC,mBAAmB,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AACxI,SAAcC,MAAM,QAAO,UAAU;AAErC,OAAO,IAAMC,YAAY,GAAGX,MAAM,CAACY,GAAG,gJAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,EAG3DjB,cAAc,CAAC,OAAO,CAAC,CAE1B;AAED,OAAO,IAAMkB,aAAa,GAAGhB,GAAG,mPACVE,MAAM,CAACe,WAAW,EACRf,MAAM,CAACgB,WAAW,EACvChB,MAAM,CAACiB,WAAW,CAI5B;AACD,OAAO,IAAMC,uBAAuB,GAAGpB,GAAG,+GACVE,MAAM,CAACmB,YAAY,CAClD;AAED,IAAMC,iBAAiB,GAAGvB,MAAM,CAACwB,KAAK,+mDAelC,UAACX,KAAK;EAAA,OACNA,KAAK,CAACY,aAAa,oJAK8BtB,MAAM,CAACuB,WAAW,6DACxBvB,M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,IAAI,CAAC,EAOrD7B,kBAAkB,CAACH,kBAAkB,CAACgC,OAAO,EAAE,IAAI,CAAC,CAezD;AACD,OAAO,IAAME,YAAY,GAAGxC,MAAM,CAACuC,OAAO,CAAC,0FAChCpC,MAAM,CAACsC,YAAY,CAC7B;AAED,IAAMC,WAAW,qDACdhC,MAAM,CAACiC,OAAO,EAAGxC,MAAM,CAAC0B,WAAW,iCACnCnB,MAAM,CAACkC,KAAK,EAAGzC,MAAM,CAACgC,WAAW,iCACjCzB,MAAM,CAACmC,OAAO,EAAG1C,MAAM,CAACsC,YAAY,gBACtC;AAED,OAAO,IAAMK,iBAAiB,GAAG9C,MAAM,CAACuC,OAAO,CAAC,0FACrC,UAAC1B,KAAK;EAAA,OAAK6B,WAAW,CAAC7B,KAAK,CAACkC,IAAI,CAAC;AAAA,EAC5C;AAED,OAAO,IAAMC,WAAW,GAAGhD,MAAM,CAACuC,OAAO,CAAC,0FAC/BpC,MAAM,CAAC0B,WAAW,CAC5B;AACD,OAAO,IAAMoB,iBAAiB,GAAGjD,MAAM,CAACuC,OAAO,CAAC,4FACrCpC,MAAM,CAACiB,WAAW,CAC5B;AAED,SAASiB,iBAAiB,EAAEd,iBAAiB;AAE7C,OAAO,IAAM2B,UAAU,GAAGlD,MAAM,CAACY,GAAG,kGAEnC;AAED,OAAO,IAAMuC,iBAAiB,GAAGnD,MAAM,CAACkD,UAAU,CAAC,yHAGlD"}
1
+ {"version":3,"file":"styling.js","names":["TooltipTrigger","styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","States","InputWrapper","div","props","readOnly","disabled","margin","readOnlyState","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","extraRightPadding","Italic","neutral_500","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","correct_500","primary_700","ValidationStyling","Regular","Warning","ErrorMessage","critical_500","StateColors","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import { TooltipTrigger } from '../Tooltips/TooltipStyles';\nimport styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n \n ${TooltipTrigger()}\n\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n extraRightPadding?: number;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ${props => 16 + (props.extraRightPadding ?? 0)}px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":";;;AAAA,SAASA,cAAc,QAAQ,2BAA2B;AAC1D,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC5D,SAASC,mBAAmB,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AACxI,SAAcC,MAAM,QAAO,UAAU;AAErC,OAAO,IAAMC,YAAY,GAAGX,MAAM,C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AiB,GAAGjD,MAAM,CAACuC,OAAO,CAAC,4FACrCpC,MAAM,CAACiB,WAAW,CAC5B;AAED,SAASiB,iBAAiB,EAAEd,iBAAiB;AAE7C,OAAO,IAAM2B,UAAU,GAAGlD,MAAM,CAACY,GAAG,kGAEnC;AAED,OAAO,IAAMuC,iBAAiB,GAAGnD,MAAM,CAACkD,UAAU,CAAC,yHAGlD"}
@@ -18,26 +18,32 @@ var _Tooltips = require("../Tooltips");
18
18
  var _Button = require("../Button");
19
19
  var _icons = require("../icons");
20
20
  var _HyperLink = require("../HyperLink");
21
+ var _Dropdown = require("../Dropdown");
22
+ var _Toggles = require("../Toggles");
23
+ var _Image = require("../Image");
21
24
  var _jsxRuntime = require("react/jsx-runtime");
22
- var _excluded = ["icon"],
23
- _excluded2 = ["text", "variant", "action"],
24
- _excluded3 = ["text", "variant", "action"],
25
- _excluded4 = ["action", "text"];
26
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
25
+ var _excluded = ["icon", "componentType"],
26
+ _excluded2 = ["componentType"],
27
+ _excluded3 = ["componentType"],
28
+ _excluded4 = ["text", "variant", "action"],
29
+ _excluded5 = ["text", "variant", "action"],
30
+ _excluded6 = ["action", "text"];
31
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
27
32
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
28
33
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29
- var HeaderText = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n padding: 12px 0 12px 12px;\n gap: 4px;\n \n &:not(:first-child) {\n padding-left: 0 !important;\n }\n \n"])));
34
+ var HeaderText = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n &:not(:first-child) {\n padding-left: 0 !important;\n }\n\n"])));
30
35
  var HeaderTitle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.black));
31
- var HeaderNote = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), (0, _styles.ComponentXXSStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600));
32
- var HeaderActions = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n"])));
33
- var Header = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n padding: 4px;\n\n ", " {\n height: max-content;\n }\n"])), _Tooltips.TooltipContainer);
34
- var Content = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: 8px;\n padding: 0 8px 0 16px;\n overflow: auto;\n\n ", "\n"])), (0, _styles.scrollBarStyling)(_types.Size.Small));
35
- var FooterLeftContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
36
- var FooterLeftNote = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n\n ", "\n"])), (0, _styles.ComponentXXSStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.neutral_600));
37
- var FooterLeftLink = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n"])), (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.primary_500));
38
- var FooterRightContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n gap: 8px;\n margin-left: auto;\n"])));
39
- var Footer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n padding: 8px 16px;\n"])));
40
- var Wrapper = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: max-content;\n\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n\n &.medium {\n max-height: calc(100vh - 64px);\n max-width: calc(100vw - 64px);\n\n ", " {\n padding: 12px 12px 4px 12px;\n\n ", " {\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 16px 0 24px;\n }\n\n ", " {\n padding: 12px 24px 20px 24px;\n\n ", " {\n ", "\n gap: 6px;\n }\n\n ", " {\n a {\n gap: 6px;\n }\n\n ", "\n }\n\n ", " {\n gap: 8px;\n }\n }\n }\n\n &.large {\n max-height: calc(100vh - 112px);\n max-width: calc(100vw - 112px);\n\n ", " {\n padding: 20px 20px 4px 20px;\n\n ", " {\n padding: 10px 0 10px 12px;\n gap: 8px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 24px 0 32px;\n }\n\n ", " {\n padding: 16px 32px 32px 32px;\n\n ", " {\n ", "\n gap: 8px;\n }\n\n ", " {\n a {\n gap: 8px;\n }\n\n ", "\n }\n\n ", " {\n gap: 16px;\n }\n }\n }\n"])), Header, HeaderText, HeaderTitle, (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Bold, null), HeaderNote, (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Regular, null), Content, Footer, FooterLeftNote, (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Bold, null), FooterLeftLink, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, null), FooterRightContainer, Header, HeaderText, HeaderTitle, (0, _styles.ComponentXLStyling)(_styles.ComponentTextStyle.Bold, null), HeaderNote, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, null), Content, Footer, FooterLeftNote, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, null), FooterLeftLink, (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Bold, null), FooterRightContainer);
36
+ var HeaderActions = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n"])));
37
+ var HeaderWithImageActions = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n position: absolute;\n\n button:only-child {\n justify-self: flex-end;\n }\n\n top: 4px;\n left: 4px;\n right: 4px;\n\n .medium & {\n top: 12px;\n left: 12px;\n right: 12px;\n }\n\n .large & {\n top: 20px;\n left: 20px;\n right: 20px;\n }\n"])));
38
+ var HeaderWithImage = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n\n img {\n object-fit: cover;\n width: 100%;\n height: 160px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n }\n\n .medium & {\n img {\n height: 200px;\n }\n }\n\n .large & {\n img {\n height: 240px;\n }\n }\n"])));
39
+ var Header = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n padding: 4px;\n\n ", " {\n height: max-content;\n }\n"])), _Tooltips.TooltipContainer);
40
+ var Content = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: 8px;\n padding: 0 8px 0 16px;\n overflow: auto;\n\n ", "\n"])), (0, _styles.scrollBarStyling)(_types.Size.Small));
41
+ var FooterLeftContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
42
+ var FooterLeftNote = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n\n ", "\n"])), (0, _styles.ComponentXXSStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.neutral_600));
43
+ var FooterLeftLink = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n"])), (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.primary_500));
44
+ var FooterRightContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n gap: 8px;\n margin-left: auto;\n"])));
45
+ var Footer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n padding: 8px 16px;\n"])));
46
+ var Wrapper = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: max-content;\n\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n\n &.medium {\n max-height: calc(100vh - 64px);\n max-width: calc(100vw - 64px);\n\n ", " {\n padding: 12px 12px 4px 12px;\n\n ", " {\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 16px 0 24px;\n }\n\n ", " {\n padding: 12px 24px 20px 24px;\n\n ", " {\n ", "\n gap: 6px;\n }\n\n ", " {\n a {\n gap: 6px;\n }\n\n ", "\n }\n\n ", " {\n gap: 8px;\n }\n }\n }\n\n &.large {\n max-height: calc(100vh - 112px);\n max-width: calc(100vw - 112px);\n\n ", " {\n padding: 20px 20px 4px 20px;\n\n ", " {\n padding: 10px 0 10px 12px;\n gap: 8px;\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 24px 0 32px;\n }\n\n ", " {\n padding: 16px 32px 32px 32px;\n\n ", " {\n ", "\n gap: 8px;\n }\n\n ", " {\n a {\n gap: 8px;\n }\n\n ", "\n }\n\n ", " {\n gap: 16px;\n }\n }\n }\n"])), Header, HeaderText, HeaderTitle, (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Bold, null), Content, Footer, FooterLeftNote, (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Bold, null), FooterLeftLink, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, null), FooterRightContainer, Header, HeaderText, HeaderTitle, (0, _styles.ComponentXLStyling)(_styles.ComponentTextStyle.Bold, null), Content, Footer, FooterLeftNote, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, null), FooterLeftLink, (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Bold, null), FooterRightContainer);
41
47
  var ModalContent = function ModalContent(props) {
42
48
  var _props$size, _props$footerActions;
43
49
  var tooltip = function tooltip() {
@@ -65,11 +71,32 @@ var ModalContent = function ModalContent(props) {
65
71
  var headerActions = function headerActions() {
66
72
  var _props$headerActions;
67
73
  return (_props$headerActions = props.headerActions) === null || _props$headerActions === void 0 ? void 0 : _props$headerActions.map(function (action, index) {
68
- var icon = action.icon,
69
- rest = (0, _objectWithoutProperties2.default)(action, _excluded);
70
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, _objectSpread(_objectSpread({}, rest), {}, {
71
- children: icon
72
- }), action.id || index);
74
+ switch (action.componentType) {
75
+ case 'icon':
76
+ {
77
+ var icon = action.icon,
78
+ componentType = action.componentType,
79
+ rest = (0, _objectWithoutProperties2.default)(action, _excluded);
80
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, _objectSpread(_objectSpread({}, rest), {}, {
81
+ children: icon
82
+ }), action.id || index);
83
+ }
84
+ case 'dropdown':
85
+ {
86
+ var _componentType = action.componentType,
87
+ _rest = (0, _objectWithoutProperties2.default)(action, _excluded2);
88
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.DropdownButton, _objectSpread({
89
+ type: 'icon',
90
+ size: props.size
91
+ }, _rest));
92
+ }
93
+ case 'toggle':
94
+ {
95
+ var _componentType2 = action.componentType,
96
+ _rest2 = (0, _objectWithoutProperties2.default)(action, _excluded3);
97
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toggles.ToggleButton, _objectSpread({}, _rest2));
98
+ }
99
+ }
73
100
  });
74
101
  };
75
102
  var getLeftActionIconElement = function getLeftActionIconElement() {
@@ -87,7 +114,7 @@ var ModalContent = function ModalContent(props) {
87
114
  text = _ref.text,
88
115
  variant = _ref.variant,
89
116
  action = _ref.action,
90
- rest = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
117
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded4);
91
118
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, _objectSpread(_objectSpread({}, rest), {}, {
92
119
  size: props.size,
93
120
  onClick: action,
@@ -101,9 +128,9 @@ var ModalContent = function ModalContent(props) {
101
128
  _text = _ref2.text,
102
129
  _variant = _ref2.variant,
103
130
  _action = _ref2.action,
104
- _rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded3);
131
+ _rest3 = (0, _objectWithoutProperties2.default)(_ref2, _excluded5);
105
132
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(FooterLeftLink, {
106
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_HyperLink.HyperLink, _objectSpread(_objectSpread({}, _rest), {}, {
133
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_HyperLink.HyperLink, _objectSpread(_objectSpread({}, _rest3), {}, {
107
134
  variant: _variant !== null && _variant !== void 0 ? _variant : 'default',
108
135
  onClick: function onClick(e) {
109
136
  if (_action) {
@@ -131,7 +158,36 @@ var ModalContent = function ModalContent(props) {
131
158
  closeModal: props.closeAction,
132
159
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
133
160
  className: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : _types.Size.Medium,
134
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Header, {
161
+ children: [props.image && /*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderWithImage, {
162
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.ImageWithFallbacks, _objectSpread({}, props.image)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderWithImageActions, {
163
+ children: [props.onBack && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
164
+ variant: "secondary",
165
+ shape: "circular",
166
+ action: props.onBack,
167
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.ArrowLineLeft, {})
168
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
169
+ dataTestId: 'content-modal-close-button',
170
+ id: 'content-modal-close-button',
171
+ variant: "secondary",
172
+ shape: "circular",
173
+ action: props.closeAction,
174
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.Close, {
175
+ size: "24px",
176
+ color: _styles.COLORS.neutral_600
177
+ })
178
+ })]
179
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Header, {
180
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderText, {
181
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(HeaderTitle, {
182
+ children: props.title
183
+ }), !!props.note && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Note, {
184
+ children: props.note
185
+ })]
186
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderActions, {
187
+ children: [tooltip(), headerActions()]
188
+ })]
189
+ })]
190
+ }), !props.image && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Header, {
135
191
  children: [props.onBack && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
136
192
  variant: "secondary",
137
193
  shape: "circular",
@@ -140,7 +196,7 @@ var ModalContent = function ModalContent(props) {
140
196
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderText, {
141
197
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(HeaderTitle, {
142
198
  children: props.title
143
- }), !!props.note && /*#__PURE__*/(0, _jsxRuntime.jsx)(HeaderNote, {
199
+ }), !!props.note && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Note, {
144
200
  children: props.note
145
201
  })]
146
202
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderActions, {
@@ -165,7 +221,7 @@ var ModalContent = function ModalContent(props) {
165
221
  children: (_props$footerActions = props.footerActions) === null || _props$footerActions === void 0 ? void 0 : _props$footerActions.map(function (item, index) {
166
222
  var action = item.action,
167
223
  text = item.text,
168
- rest = (0, _objectWithoutProperties2.default)(item, _excluded4);
224
+ rest = (0, _objectWithoutProperties2.default)(item, _excluded6);
169
225
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, _objectSpread(_objectSpread({}, rest), {}, {
170
226
  onClick: action,
171
227
  size: props.size,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContent.cjs","names":["HeaderText","styled","div","HeaderTitle","ComponentMStyling","ComponentTextStyle","Bold","COLORS","black","HeaderNote","ComponentXXSStyling","Regular","neutral_600","HeaderActions","Header","TooltipContainer","Content","scrollBarStyling","Size","Small","FooterLeftContainer","FooterLeftNote","FooterLeftLink","ComponentSStyling","primary_500","FooterRightContainer","Footer","Wrapper","ComponentLStyling","ComponentXSStyling","ComponentXLStyling","ModalContent","props","tooltip","XSmall","cursor","headerActions","map","action","index","icon","rest","id","getLeftActionIconElement","leftFooterAction","React","cloneElement","size","Large","actionType","text","variant","e","preventDefault","isModalOpen","closeAction","Medium","onBack","title","note","children","footerActions","item","a","key","zIndex"],"sources":["../../src/Modals/ModalContent.tsx"],"sourcesContent":["import React from 'react';\nimport {Size} from '../types';\nimport {ButtonAction, IconButtonAction, LeftFooterAction, LeftFooterButton, LeftFooterHyperlink} from './ModalTypes';\nimport {ModalContainer} from './index';\nimport styled from 'styled-components';\nimport {\n COLORS,\n ComponentLStyling,\n ComponentMStyling, ComponentSStyling,\n ComponentTextStyle, ComponentXLStyling,\n ComponentXSStyling,\n ComponentXXSStyling,\n scrollBarStyling\n} from '../styles';\nimport {TooltipContainer, TooltipWrapper} from '../Tooltips';\nimport {Button, IconButton} from '../Button';\nimport {SystemIcons} from '../icons';\nimport {HyperLink} from '../HyperLink';\n\nconst HeaderText = styled.div`\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n padding: 12px 0 12px 12px;\n gap: 4px;\n \n &:not(:first-child) {\n padding-left: 0 !important;\n }\n \n`;\nconst HeaderTitle = styled.div`\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.black)}\n`;\nconst HeaderNote = styled.div`\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n`;\n\nconst HeaderActions = styled.div`\n display: flex;\n flex-direction: row;\n`;\n\nconst Header = styled.div`\n display: flex;\n flex-direction: row;\n padding: 4px;\n\n ${TooltipContainer} {\n height: max-content;\n }\n`;\n\nconst Content = styled.div`\n margin-right: 8px;\n padding: 0 8px 0 16px;\n overflow: auto;\n\n ${scrollBarStyling(Size.Small)}\n`;\n\nconst FooterLeftContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst FooterLeftNote = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n\n ${ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n`;\n\nconst FooterLeftLink = styled.div`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.primary_500)}\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n`;\n\nconst FooterRightContainer = styled.div`\n gap: 8px;\n margin-left: auto;\n`\n\nconst Footer = styled.div`\n display: flex;\n flex-direction: row;\n padding: 8px 16px;\n`;\n\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: max-content;\n\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n\n &.medium {\n max-height: calc(100vh - 64px);\n max-width: calc(100vw - 64px);\n\n ${Header} {\n padding: 12px 12px 4px 12px;\n\n ${HeaderText} {\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n ${HeaderTitle} {\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n\n ${HeaderNote} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n }\n }\n }\n\n ${Content} {\n padding: 0 16px 0 24px;\n }\n\n ${Footer} {\n padding: 12px 24px 20px 24px;\n\n ${FooterLeftNote} {\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\n gap: 6px;\n }\n\n ${FooterLeftLink} {\n a {\n gap: 6px;\n }\n\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n }\n\n ${FooterRightContainer} {\n gap: 8px;\n }\n }\n }\n\n &.large {\n max-height: calc(100vh - 112px);\n max-width: calc(100vw - 112px);\n\n ${Header} {\n padding: 20px 20px 4px 20px;\n\n ${HeaderText} {\n padding: 10px 0 10px 12px;\n gap: 8px;\n\n ${HeaderTitle} {\n ${ComponentXLStyling(ComponentTextStyle.Bold, null)}\n }\n\n ${HeaderNote} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n }\n }\n }\n\n ${Content} {\n padding: 0 24px 0 32px;\n }\n\n ${Footer} {\n padding: 16px 32px 32px 32px;\n\n ${FooterLeftNote} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n gap: 8px;\n }\n\n ${FooterLeftLink} {\n a {\n gap: 8px;\n }\n\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n\n ${FooterRightContainer} {\n gap: 16px;\n }\n }\n }\n`;\n\n\ninterface ModalContentProps {\n size?: Size.Small | Size.Medium | Size.Large;\n isModalOpen: boolean;\n closeAction: () => void;\n onBack?: () => void;\n title: string;\n note?: string;\n headerActions?: IconButtonAction[];\n footerActions?: ButtonAction[];\n leftFooterAction?: LeftFooterAction;\n tooltip?: string;\n zIndex?: number;\n children?: React.ReactNode;\n}\n\nconst ModalContent: React.FC<ModalContentProps> = (props) => {\n\n const tooltip = () =>\n !!props.tooltip &&\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"bottom\" withArrow={false}\n label={props.tooltip}>\n <IconButton variant=\"secondary\" shape=\"circular\" style={{cursor: 'help'}} action={() => {\n }}>\n <SystemIcons.Help size=\"24px\" color={COLORS.neutral_600}/>\n </IconButton>\n </TooltipWrapper>;\n\n const headerActions = () => props.headerActions?.map((action, index) => {\n const {icon, ...rest} = action;\n return <IconButton key={action.id || index}\n {...rest}>\n {icon}\n </IconButton>\n }\n );\n\n const getLeftActionIconElement = () =>\n !!props.leftFooterAction?.icon &&\n React.cloneElement(props.leftFooterAction?.icon as React.ReactElement, {\n size:\n props.size === Size.Small\n ? '20px'\n : props.size === Size.Large\n ? '28px'\n : '24px'\n });\n\n const leftFooterAction = () => {\n if (!props.leftFooterAction) return null;\n\n switch (props.leftFooterAction.actionType) {\n case 'button': {\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterButton;\n return (\n <Button{...rest}\n size={props.size}\n onClick={action}\n variant={variant ?? 'secondary'}>\n {text}\n </Button>\n );\n }\n case 'hyperlink': {\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterHyperlink;\n return (\n <FooterLeftLink>\n <HyperLink {...rest}\n variant={variant ?? 'default'}\n onClick={(e) => {\n if (action) {\n e.preventDefault();\n action(e);\n }\n }}>\n {text}\n {getLeftActionIconElement()}\n </HyperLink>\n </FooterLeftLink>\n );\n\n }\n case 'note': {\n const {text} = props.leftFooterAction;\n return (\n <FooterLeftNote>\n {getLeftActionIconElement()}\n <span>{text}</span>\n </FooterLeftNote>\n );\n }\n }\n };\n\n\n return (\n <ModalContainer showModal={props.isModalOpen} closeModal={props.closeAction}>\n <Wrapper className={props.size ?? Size.Medium}>\n <Header>\n {\n props.onBack &&\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\n <SystemIcons.ArrowLineLeft/>\n </IconButton>\n }\n <HeaderText>\n <HeaderTitle>{props.title}</HeaderTitle>\n {!!props.note && <HeaderNote>{props.note}</HeaderNote>}\n </HeaderText>\n <HeaderActions>\n {tooltip()}\n {headerActions()}\n <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'} variant=\"secondary\" shape=\"circular\"\n action={props.closeAction}>\n <SystemIcons.Close size=\"24px\" color={COLORS.neutral_600}/>\n </IconButton>\n </HeaderActions>\n </Header>\n <Content>\n {props.children}\n </Content>\n <Footer>\n <FooterLeftContainer>\n {leftFooterAction()}\n </FooterLeftContainer>\n <FooterRightContainer>\n {props.footerActions?.map((item, index) => {\n const {action, text, ...rest} = item;\n return <Button key={rest.id || index}\n {...rest}\n onClick={action}\n size={props.size}\n onKeyDown={a => (a.key === 'Enter' || a.key === ' ') && action!(a)}>\n {text}\n </Button>\n }\n )}\n </FooterRightContainer>\n </Footer>\n </Wrapper>\n </ModalContainer>\n );\n};\n\nexport default ModalContent;\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AAEA;AACA;AACA;AASA;AACA;AACA;AACA;AAAuC;AAAA;EAAA;EAAA;EAAA;AAAA;AAAA;AAAA;AAEvC,IAAMA,UAAU,GAAGC,yBAAM,CAACC,GAAG,8RAa5B;AACD,IAAMC,WAAW,GAAGF,yBAAM,CAACC,GAAG,gGAC1B,IAAAE,yBAAiB,EAACC,0BAAkB,CAACC,IAAI,EAAEC,cAAM,CAACC,KAAK,CAAC,CAC3D;AACD,IAAMC,UAAU,GAAGR,yBAAM,CAACC,GAAG,gGACzB,IAAAQ,2BAAmB,EAACL,0BAAkB,CAACM,OAAO,EAAEJ,cAAM,CAACK,WAAW,CAAC,CACtE;AAED,IAAMC,aAAa,GAAGZ,yBAAM,CAACC,GAAG,iIAG/B;AAED,IAAMY,MAAM,GAAGb,yBAAM,CAACC,GAAG,8LAKrBa,0BAAgB,CAGnB;AAED,IAAMC,OAAO,GAAGf,yBAAM,CAACC,GAAG,qKAKtB,IAAAe,wBAAgB,EAACC,WAAI,CAACC,KAAK,CAAC,CAC/B;AAED,IAAMC,mBAAmB,GAAGnB,yBAAM,CAACC,GAAG,iIAGrC;AAED,IAAMmB,cAAc,GAAGpB,yBAAM,CAACC,GAAG,iLAM7B,IAAAQ,2BAAmB,EAACL,0BAAkB,CAACC,IAAI,EAAEC,cAAM,CAACK,WAAW,CAAC,CACnE;AAED,IAAMU,cAAc,GAAGrB,yBAAM,CAACC,GAAG,mMAC7B,IAAAqB,yBAAiB,EAAClB,0BAAkB,CAACC,IAAI,EAAEC,cAAM,CAACiB,WAAW,CAAC,CAOjE;AAED,IAAMC,oBAAoB,GAAGxB,yBAAM,CAACC,GAAG,4HAGtC;AAED,IAAMwB,MAAM,GAAGzB,yBAAM,CAACC,GAAG,yJAIxB;AAGD,IAAMyB,OAAO,GAAG1B,yBAAM,CAACC,GAAG,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AG,KAAK,GAAG,KAAK1B,MAAM,CAAEyB,CAAC,CAAC;cAAA,CAAC;cAAA,UAC/Eb;YAAI,IALaT,IAAI,CAACC,EAAE,IAAIH,KAAK,CAM3B;UACX,CAAC;QACF,EACoB;MAAA,EAChB;IAAA;EACD,EACK;AAErB,CAAC;AAAC;EA3IAe,WAAW;EACXC,WAAW;EACXE,MAAM;EACNC,KAAK;EACLC,IAAI;EACJvB,aAAa;EACbyB,aAAa;EAEb5B,OAAO;EACPgC,MAAM;EACNL,QAAQ;AAAA;AAAA,eAmIK7B,YAAY;AAAA"}
1
+ {"version":3,"file":"ModalContent.cjs","names":["HeaderText","styled","div","HeaderTitle","ComponentMStyling","ComponentTextStyle","Bold","COLORS","black","HeaderActions","HeaderWithImageActions","HeaderWithImage","Header","TooltipContainer","Content","scrollBarStyling","Size","Small","FooterLeftContainer","FooterLeftNote","ComponentXXSStyling","neutral_600","FooterLeftLink","ComponentSStyling","primary_500","FooterRightContainer","Footer","Wrapper","ComponentLStyling","ComponentXSStyling","ComponentXLStyling","ModalContent","props","tooltip","XSmall","cursor","headerActions","map","action","index","componentType","icon","rest","id","size","getLeftActionIconElement","leftFooterAction","React","cloneElement","Large","actionType","text","variant","e","preventDefault","isModalOpen","closeAction","Medium","image","onBack","title","note","children","footerActions","item","a","key","zIndex"],"sources":["../../src/Modals/ModalContent.tsx"],"sourcesContent":["import React from 'react';\nimport {Size} from '../types';\nimport {\n ButtonAction,\n ModalHeaderIconButton,\n LeftFooterAction,\n LeftFooterButton,\n LeftFooterHyperlink,\n ModalHeaderButtons\n} from './ModalTypes';\nimport {ModalContainer} from './index';\nimport styled from 'styled-components';\nimport {\n COLORS,\n ComponentLStyling,\n ComponentMStyling, ComponentSStyling,\n ComponentTextStyle, ComponentXLStyling,\n ComponentXSStyling,\n ComponentXXSStyling, Note,\n scrollBarStyling\n} from '../styles';\nimport {TooltipContainer, TooltipWrapper} from '../Tooltips';\nimport {Button, IconButton} from '../Button';\nimport {SystemIcons} from '../icons';\nimport {HyperLink} from '../HyperLink';\nimport {ImageWithFallbacksProps} from \"../Image/ImageWithFallbacks\";\nimport {DropdownButton} from \"../Dropdown\";\nimport {ToggleButton} from \"../Toggles\";\nimport {ImageWithFallbacks} from \"../Image\";\n\nconst HeaderText = styled.div`\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n &:not(:first-child) {\n padding-left: 0 !important;\n }\n\n`;\nconst HeaderTitle = styled.div`\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.black)}\n`;\n\nconst HeaderActions = styled.div`\n display: flex;\n flex-direction: row;\n`;\n\nconst HeaderWithImageActions = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n position: absolute;\n\n button:only-child {\n justify-self: flex-end;\n }\n\n top: 4px;\n left: 4px;\n right: 4px;\n\n .medium & {\n top: 12px;\n left: 12px;\n right: 12px;\n }\n\n .large & {\n top: 20px;\n left: 20px;\n right: 20px;\n }\n`;\n\nconst HeaderWithImage = styled.div`\n position: relative;\n display: flex;\n flex-direction: column;\n\n img {\n object-fit: cover;\n width: 100%;\n height: 160px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n }\n\n .medium & {\n img {\n height: 200px;\n }\n }\n\n .large & {\n img {\n height: 240px;\n }\n }\n`;\n\nconst Header = styled.div`\n display: flex;\n flex-direction: row;\n padding: 4px;\n\n ${TooltipContainer} {\n height: max-content;\n }\n`;\n\nconst Content = styled.div`\n margin-right: 8px;\n padding: 0 8px 0 16px;\n overflow: auto;\n\n ${scrollBarStyling(Size.Small)}\n`;\n\nconst FooterLeftContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst FooterLeftNote = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n\n ${ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n`;\n\nconst FooterLeftLink = styled.div`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.primary_500)}\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n`;\n\nconst FooterRightContainer = styled.div`\n gap: 8px;\n margin-left: auto;\n`\n\nconst Footer = styled.div`\n display: flex;\n flex-direction: row;\n padding: 8px 16px;\n`;\n\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: max-content;\n\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n\n &.medium {\n max-height: calc(100vh - 64px);\n max-width: calc(100vw - 64px);\n\n ${Header} {\n padding: 12px 12px 4px 12px;\n\n ${HeaderText} {\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n ${HeaderTitle} {\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n }\n }\n\n ${Content} {\n padding: 0 16px 0 24px;\n }\n\n ${Footer} {\n padding: 12px 24px 20px 24px;\n\n ${FooterLeftNote} {\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\n gap: 6px;\n }\n\n ${FooterLeftLink} {\n a {\n gap: 6px;\n }\n\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n }\n\n ${FooterRightContainer} {\n gap: 8px;\n }\n }\n }\n\n &.large {\n max-height: calc(100vh - 112px);\n max-width: calc(100vw - 112px);\n\n ${Header} {\n padding: 20px 20px 4px 20px;\n\n ${HeaderText} {\n padding: 10px 0 10px 12px;\n gap: 8px;\n\n ${HeaderTitle} {\n ${ComponentXLStyling(ComponentTextStyle.Bold, null)}\n }\n }\n }\n\n ${Content} {\n padding: 0 24px 0 32px;\n }\n\n ${Footer} {\n padding: 16px 32px 32px 32px;\n\n ${FooterLeftNote} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n gap: 8px;\n }\n\n ${FooterLeftLink} {\n a {\n gap: 8px;\n }\n\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n\n ${FooterRightContainer} {\n gap: 16px;\n }\n }\n }\n`;\n\n\ninterface ModalContentProps {\n size?: Size.Small | Size.Medium | Size.Large;\n isModalOpen: boolean;\n closeAction: () => void;\n onBack?: () => void;\n title: string;\n note?: string;\n image?: ImageWithFallbacksProps;\n headerActions?: ModalHeaderButtons[];\n footerActions?: ButtonAction[];\n leftFooterAction?: LeftFooterAction;\n tooltip?: string;\n zIndex?: number;\n children?: React.ReactNode;\n}\n\nconst ModalContent: React.FC<ModalContentProps> = (props) => {\n\n const tooltip = () =>\n !!props.tooltip &&\n <TooltipWrapper delay=\"0s\" size={Size.XSmall} align=\"center\" position=\"bottom\" withArrow={false}\n label={props.tooltip}>\n <IconButton variant=\"secondary\" shape=\"circular\" style={{cursor: 'help'}} action={() => {\n }}>\n <SystemIcons.Help size=\"24px\" color={COLORS.neutral_600}/>\n </IconButton>\n </TooltipWrapper>;\n\n const headerActions = () => props.headerActions?.map((action, index) => {\n switch (action.componentType) {\n case 'icon': {\n const {icon, componentType, ...rest} = action;\n return <IconButton key={action.id || index}\n {...rest}>\n {icon}\n </IconButton>\n }\n case 'dropdown': {\n const {componentType, ...rest} = action;\n return <DropdownButton type={'icon'} size={props.size} {...rest}/>\n }\n case 'toggle': {\n const {componentType, ...rest} = action;\n return <ToggleButton {...rest}/>\n }\n }\n }\n );\n\n const getLeftActionIconElement = () =>\n !!props.leftFooterAction?.icon &&\n React.cloneElement(props.leftFooterAction?.icon as React.ReactElement, {\n size:\n props.size === Size.Small\n ? '20px'\n : props.size === Size.Large\n ? '28px'\n : '24px'\n });\n\n const leftFooterAction = () => {\n if (!props.leftFooterAction) return null;\n\n switch (props.leftFooterAction.actionType) {\n case 'button': {\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterButton;\n return (\n <Button{...rest}\n size={props.size}\n onClick={action}\n variant={variant ?? 'secondary'}>\n {text}\n </Button>\n );\n }\n case 'hyperlink': {\n const {text, variant, action, ...rest} = props.leftFooterAction as LeftFooterHyperlink;\n return (\n <FooterLeftLink>\n <HyperLink {...rest}\n variant={variant ?? 'default'}\n onClick={(e) => {\n if (action) {\n e.preventDefault();\n action(e);\n }\n }}>\n {text}\n {getLeftActionIconElement()}\n </HyperLink>\n </FooterLeftLink>\n );\n\n }\n case 'note': {\n const {text} = props.leftFooterAction;\n return (\n <FooterLeftNote>\n {getLeftActionIconElement()}\n <span>{text}</span>\n </FooterLeftNote>\n );\n }\n }\n };\n\n\n return (\n <ModalContainer showModal={props.isModalOpen} closeModal={props.closeAction}>\n <Wrapper className={props.size ?? Size.Medium}>\n {\n props.image &&\n <HeaderWithImage>\n <ImageWithFallbacks {...props.image}/>\n <HeaderWithImageActions>\n {\n props.onBack &&\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\n <SystemIcons.ArrowLineLeft/>\n </IconButton>\n\n }\n <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\n variant=\"secondary\"\n shape=\"circular\"\n action={props.closeAction}>\n <SystemIcons.Close size=\"24px\" color={COLORS.neutral_600}/>\n </IconButton>\n </HeaderWithImageActions>\n\n <Header>\n <HeaderText>\n <HeaderTitle>{props.title}</HeaderTitle>\n {!!props.note && <Note>{props.note}</Note>}\n </HeaderText>\n <HeaderActions>\n {tooltip()}\n {headerActions()}\n </HeaderActions>\n </Header>\n </HeaderWithImage>\n }\n {\n !props.image &&\n <Header>\n {\n props.onBack &&\n <IconButton variant=\"secondary\" shape=\"circular\" action={props.onBack}>\n <SystemIcons.ArrowLineLeft/>\n </IconButton>\n }\n <HeaderText>\n <HeaderTitle>{props.title}</HeaderTitle>\n {!!props.note && <Note>{props.note}</Note>}\n </HeaderText>\n <HeaderActions>\n {tooltip()}\n {headerActions()}\n <IconButton dataTestId={'content-modal-close-button'} id={'content-modal-close-button'}\n variant=\"secondary\"\n shape=\"circular\"\n action={props.closeAction}>\n <SystemIcons.Close size=\"24px\" color={COLORS.neutral_600}/>\n </IconButton>\n </HeaderActions>\n </Header>\n }\n <Content>\n {props.children}\n </Content>\n <Footer>\n <FooterLeftContainer>\n {leftFooterAction()}\n </FooterLeftContainer>\n <FooterRightContainer>\n {props.footerActions?.map((item, index) => {\n const {action, text, ...rest} = item;\n return <Button key={rest.id || index}\n {...rest}\n onClick={action}\n size={props.size}\n onKeyDown={a => (a.key === 'Enter' || a.key === ' ') && action!(a)}>\n {text}\n </Button>\n }\n )}\n </FooterRightContainer>\n </Footer>\n </Wrapper>\n </ModalContainer>\n );\n};\n\nexport default ModalContent;\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AASA;AACA;AACA;AASA;AACA;AACA;AACA;AAEA;AACA;AACA;AAA4C;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA;AAAA;AAE5C,IAAMA,UAAU,GAAGC,yBAAM,CAACC,GAAG,0RAa5B;AACD,IAAMC,WAAW,GAAGF,yBAAM,CAACC,GAAG,gGAC1B,IAAAE,yBAAiB,EAACC,0BAAkB,CAACC,IAAI,EAAEC,cAAM,CAACC,KAAK,CAAC,CAC3D;AAED,IAAMC,aAAa,GAAGR,yBAAM,CAACC,GAAG,iIAG/B;AAED,IAAMQ,sBAAsB,GAAGT,yBAAM,CAACC,GAAG,mbAyBxC;AAED,IAAMS,eAAe,GAAGV,yBAAM,CAACC,GAAG,yaAwBjC;AAED,IAAMU,MAAM,GAAGX,yBAAM,CAACC,GAAG,8LAKrBW,0BAAgB,CAGnB;AAED,IAAMC,OAAO,GAAGb,yBAAM,CAACC,GAAG,qKAKtB,IAAAa,wBAAgB,EAACC,WAAI,CAACC,KAAK,CAAC,CAC/B;AAED,IAAMC,mBAAmB,GAAGjB,yBAAM,CAACC,GAAG,iIAGrC;AAED,IAAMiB,cAAc,GAAGlB,yBAAM,CAACC,GAAG,iLAM7B,IAAAkB,2BAAmB,EAACf,0BAAkB,CAACC,IAAI,EAAEC,cAAM,CAACc,WAAW,CAAC,CACnE;AAED,IAAMC,cAAc,GAAGrB,yBAAM,CAACC,GAAG,qMAC7B,IAAAqB,yBAAiB,EAAClB,0BAAkB,CAACC,IAAI,EAAEC,cAAM,CAACiB,WAAW,CAAC,CA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,IAAI,0CAAIsB,IAAI;YACpC,oBAAO,qBAAC,cAAM,kCACKtB,IAAI;cACR,OAAO,EAAEJ,MAAO;cAChB,IAAI,EAAEN,KAAK,CAACY,IAAK;cACjB,SAAS,EAAE,mBAAAqB,CAAC;gBAAA,OAAI,CAACA,CAAC,CAACC,GAAG,KAAK,OAAO,IAAID,CAAC,CAACC,GAAG,KAAK,GAAG,KAAK5B,MAAM,CAAE2B,CAAC,CAAC;cAAA,CAAC;cAAA,UAC/Ed;YAAI,IALaT,IAAI,CAACC,EAAE,IAAIJ,KAAK,CAM3B;UACX,CAAC;QACF,EACoB;MAAA,EAChB;IAAA;EACD,EACK;AAErB,CAAC;AAAC;EA7LAgB,WAAW;EACXC,WAAW;EACXG,MAAM;EACNC,KAAK;EACLC,IAAI;EAEJzB,aAAa;EACb2B,aAAa;EAEb9B,OAAO;EACPkC,MAAM;EACNL,QAAQ;AAAA;AAAA,eAoLK/B,YAAY;AAAA"}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Size } from '../types';
3
- import { ButtonAction, IconButtonAction, LeftFooterAction } from './ModalTypes';
3
+ import { ButtonAction, LeftFooterAction, ModalHeaderButtons } from './ModalTypes';
4
+ import { ImageWithFallbacksProps } from "../Image/ImageWithFallbacks";
4
5
  interface ModalContentProps {
5
6
  size?: Size.Small | Size.Medium | Size.Large;
6
7
  isModalOpen: boolean;
@@ -8,7 +9,8 @@ interface ModalContentProps {
8
9
  onBack?: () => void;
9
10
  title: string;
10
11
  note?: string;
11
- headerActions?: IconButtonAction[];
12
+ image?: ImageWithFallbacksProps;
13
+ headerActions?: ModalHeaderButtons[];
12
14
  footerActions?: ButtonAction[];
13
15
  leftFooterAction?: LeftFooterAction;
14
16
  tooltip?: string;
@@ -2,36 +2,42 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
4
4
  import _pt from "prop-types";
5
- var _excluded = ["icon"],
6
- _excluded2 = ["text", "variant", "action"],
7
- _excluded3 = ["text", "variant", "action"],
8
- _excluded4 = ["action", "text"];
9
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
5
+ var _excluded = ["icon", "componentType"],
6
+ _excluded2 = ["componentType"],
7
+ _excluded3 = ["componentType"],
8
+ _excluded4 = ["text", "variant", "action"],
9
+ _excluded5 = ["text", "variant", "action"],
10
+ _excluded6 = ["action", "text"];
11
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
10
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
13
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
14
  import React from 'react';
13
15
  import { Size } from '../types';
14
16
  import { ModalContainer } from './index';
15
17
  import styled from 'styled-components';
16
- import { COLORS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXLStyling, ComponentXSStyling, ComponentXXSStyling, scrollBarStyling } from '../styles';
18
+ import { COLORS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXLStyling, ComponentXSStyling, ComponentXXSStyling, Note, scrollBarStyling } from '../styles';
17
19
  import { TooltipContainer, TooltipWrapper } from '../Tooltips';
18
20
  import { Button, IconButton } from '../Button';
19
21
  import { SystemIcons } from '../icons';
20
22
  import { HyperLink } from '../HyperLink';
23
+ import { DropdownButton } from "../Dropdown";
24
+ import { ToggleButton } from "../Toggles";
25
+ import { ImageWithFallbacks } from "../Image";
21
26
  import { jsx as _jsx } from "react/jsx-runtime";
22
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
23
- var HeaderText = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n padding: 12px 0 12px 12px;\n gap: 4px;\n \n &:not(:first-child) {\n padding-left: 0 !important;\n }\n \n"])));
28
+ var HeaderText = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n &:not(:first-child) {\n padding-left: 0 !important;\n }\n\n"])));
24
29
  var HeaderTitle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), ComponentMStyling(ComponentTextStyle.Bold, COLORS.black));
25
- var HeaderNote = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n"])), ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600));
26
- var HeaderActions = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n"])));
27
- var Header = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n padding: 4px;\n\n ", " {\n height: max-content;\n }\n"])), TooltipContainer);
28
- var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-right: 8px;\n padding: 0 8px 0 16px;\n overflow: auto;\n\n ", "\n"])), scrollBarStyling(Size.Small));
29
- var FooterLeftContainer = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
30
- var FooterLeftNote = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n\n ", "\n"])), ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600));
31
- var FooterLeftLink = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n"])), ComponentSStyling(ComponentTextStyle.Bold, COLORS.primary_500));
32
- var FooterRightContainer = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n gap: 8px;\n margin-left: auto;\n"])));
33
- var Footer = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n padding: 8px 16px;\n"])));
34
- var Wrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: max-content;\n\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n\n &.medium {\n max-height: calc(100vh - 64px);\n max-width: calc(100vw - 64px);\n\n ", " {\n padding: 12px 12px 4px 12px;\n\n ", " {\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 16px 0 24px;\n }\n\n ", " {\n padding: 12px 24px 20px 24px;\n\n ", " {\n ", "\n gap: 6px;\n }\n\n ", " {\n a {\n gap: 6px;\n }\n\n ", "\n }\n\n ", " {\n gap: 8px;\n }\n }\n }\n\n &.large {\n max-height: calc(100vh - 112px);\n max-width: calc(100vw - 112px);\n\n ", " {\n padding: 20px 20px 4px 20px;\n\n ", " {\n padding: 10px 0 10px 12px;\n gap: 8px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 24px 0 32px;\n }\n\n ", " {\n padding: 16px 32px 32px 32px;\n\n ", " {\n ", "\n gap: 8px;\n }\n\n ", " {\n a {\n gap: 8px;\n }\n\n ", "\n }\n\n ", " {\n gap: 16px;\n }\n }\n }\n"])), Header, HeaderText, HeaderTitle, ComponentLStyling(ComponentTextStyle.Bold, null), HeaderNote, ComponentXSStyling(ComponentTextStyle.Regular, null), Content, Footer, FooterLeftNote, ComponentXSStyling(ComponentTextStyle.Bold, null), FooterLeftLink, ComponentMStyling(ComponentTextStyle.Bold, null), FooterRightContainer, Header, HeaderText, HeaderTitle, ComponentXLStyling(ComponentTextStyle.Bold, null), HeaderNote, ComponentSStyling(ComponentTextStyle.Regular, null), Content, Footer, FooterLeftNote, ComponentSStyling(ComponentTextStyle.Bold, null), FooterLeftLink, ComponentLStyling(ComponentTextStyle.Bold, null), FooterRightContainer);
30
+ var HeaderActions = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n"])));
31
+ var HeaderWithImageActions = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n position: absolute;\n\n button:only-child {\n justify-self: flex-end;\n }\n\n top: 4px;\n left: 4px;\n right: 4px;\n\n .medium & {\n top: 12px;\n left: 12px;\n right: 12px;\n }\n\n .large & {\n top: 20px;\n left: 20px;\n right: 20px;\n }\n"])));
32
+ var HeaderWithImage = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n\n img {\n object-fit: cover;\n width: 100%;\n height: 160px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n }\n\n .medium & {\n img {\n height: 200px;\n }\n }\n\n .large & {\n img {\n height: 240px;\n }\n }\n"])));
33
+ var Header = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n padding: 4px;\n\n ", " {\n height: max-content;\n }\n"])), TooltipContainer);
34
+ var Content = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 8px;\n padding: 0 8px 0 16px;\n overflow: auto;\n\n ", "\n"])), scrollBarStyling(Size.Small));
35
+ var FooterLeftContainer = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
36
+ var FooterLeftNote = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n\n ", "\n"])), ComponentXXSStyling(ComponentTextStyle.Bold, COLORS.neutral_600));
37
+ var FooterLeftLink = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n ", "\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n"])), ComponentSStyling(ComponentTextStyle.Bold, COLORS.primary_500));
38
+ var FooterRightContainer = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n gap: 8px;\n margin-left: auto;\n"])));
39
+ var Footer = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n padding: 8px 16px;\n"])));
40
+ var Wrapper = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: max-content;\n\n max-height: calc(100vh - 32px);\n max-width: calc(100vw - 32px);\n\n &.medium {\n max-height: calc(100vh - 64px);\n max-width: calc(100vw - 64px);\n\n ", " {\n padding: 12px 12px 4px 12px;\n\n ", " {\n padding: 12px 0 12px 12px;\n gap: 4px;\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 16px 0 24px;\n }\n\n ", " {\n padding: 12px 24px 20px 24px;\n\n ", " {\n ", "\n gap: 6px;\n }\n\n ", " {\n a {\n gap: 6px;\n }\n\n ", "\n }\n\n ", " {\n gap: 8px;\n }\n }\n }\n\n &.large {\n max-height: calc(100vh - 112px);\n max-width: calc(100vw - 112px);\n\n ", " {\n padding: 20px 20px 4px 20px;\n\n ", " {\n padding: 10px 0 10px 12px;\n gap: 8px;\n\n ", " {\n ", "\n }\n }\n }\n\n ", " {\n padding: 0 24px 0 32px;\n }\n\n ", " {\n padding: 16px 32px 32px 32px;\n\n ", " {\n ", "\n gap: 8px;\n }\n\n ", " {\n a {\n gap: 8px;\n }\n\n ", "\n }\n\n ", " {\n gap: 16px;\n }\n }\n }\n"])), Header, HeaderText, HeaderTitle, ComponentLStyling(ComponentTextStyle.Bold, null), Content, Footer, FooterLeftNote, ComponentXSStyling(ComponentTextStyle.Bold, null), FooterLeftLink, ComponentMStyling(ComponentTextStyle.Bold, null), FooterRightContainer, Header, HeaderText, HeaderTitle, ComponentXLStyling(ComponentTextStyle.Bold, null), Content, Footer, FooterLeftNote, ComponentSStyling(ComponentTextStyle.Bold, null), FooterLeftLink, ComponentLStyling(ComponentTextStyle.Bold, null), FooterRightContainer);
35
41
  var ModalContent = function ModalContent(props) {
36
42
  var _props$size, _props$footerActions;
37
43
  var tooltip = function tooltip() {
@@ -59,11 +65,32 @@ var ModalContent = function ModalContent(props) {
59
65
  var headerActions = function headerActions() {
60
66
  var _props$headerActions;
61
67
  return (_props$headerActions = props.headerActions) === null || _props$headerActions === void 0 ? void 0 : _props$headerActions.map(function (action, index) {
62
- var icon = action.icon,
63
- rest = _objectWithoutProperties(action, _excluded);
64
- return /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({}, rest), {}, {
65
- children: icon
66
- }), action.id || index);
68
+ switch (action.componentType) {
69
+ case 'icon':
70
+ {
71
+ var icon = action.icon,
72
+ componentType = action.componentType,
73
+ rest = _objectWithoutProperties(action, _excluded);
74
+ return /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({}, rest), {}, {
75
+ children: icon
76
+ }), action.id || index);
77
+ }
78
+ case 'dropdown':
79
+ {
80
+ var _componentType = action.componentType,
81
+ _rest = _objectWithoutProperties(action, _excluded2);
82
+ return /*#__PURE__*/_jsx(DropdownButton, _objectSpread({
83
+ type: 'icon',
84
+ size: props.size
85
+ }, _rest));
86
+ }
87
+ case 'toggle':
88
+ {
89
+ var _componentType2 = action.componentType,
90
+ _rest2 = _objectWithoutProperties(action, _excluded3);
91
+ return /*#__PURE__*/_jsx(ToggleButton, _objectSpread({}, _rest2));
92
+ }
93
+ }
67
94
  });
68
95
  };
69
96
  var getLeftActionIconElement = function getLeftActionIconElement() {
@@ -81,7 +108,7 @@ var ModalContent = function ModalContent(props) {
81
108
  text = _ref.text,
82
109
  variant = _ref.variant,
83
110
  action = _ref.action,
84
- rest = _objectWithoutProperties(_ref, _excluded2);
111
+ rest = _objectWithoutProperties(_ref, _excluded4);
85
112
  return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, rest), {}, {
86
113
  size: props.size,
87
114
  onClick: action,
@@ -95,9 +122,9 @@ var ModalContent = function ModalContent(props) {
95
122
  _text = _ref2.text,
96
123
  _variant = _ref2.variant,
97
124
  _action = _ref2.action,
98
- _rest = _objectWithoutProperties(_ref2, _excluded3);
125
+ _rest3 = _objectWithoutProperties(_ref2, _excluded5);
99
126
  return /*#__PURE__*/_jsx(FooterLeftLink, {
100
- children: /*#__PURE__*/_jsxs(HyperLink, _objectSpread(_objectSpread({}, _rest), {}, {
127
+ children: /*#__PURE__*/_jsxs(HyperLink, _objectSpread(_objectSpread({}, _rest3), {}, {
101
128
  variant: _variant !== null && _variant !== void 0 ? _variant : 'default',
102
129
  onClick: function onClick(e) {
103
130
  if (_action) {
@@ -125,7 +152,36 @@ var ModalContent = function ModalContent(props) {
125
152
  closeModal: props.closeAction,
126
153
  children: /*#__PURE__*/_jsxs(Wrapper, {
127
154
  className: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : Size.Medium,
128
- children: [/*#__PURE__*/_jsxs(Header, {
155
+ children: [props.image && /*#__PURE__*/_jsxs(HeaderWithImage, {
156
+ children: [/*#__PURE__*/_jsx(ImageWithFallbacks, _objectSpread({}, props.image)), /*#__PURE__*/_jsxs(HeaderWithImageActions, {
157
+ children: [props.onBack && /*#__PURE__*/_jsx(IconButton, {
158
+ variant: "secondary",
159
+ shape: "circular",
160
+ action: props.onBack,
161
+ children: /*#__PURE__*/_jsx(SystemIcons.ArrowLineLeft, {})
162
+ }), /*#__PURE__*/_jsx(IconButton, {
163
+ dataTestId: 'content-modal-close-button',
164
+ id: 'content-modal-close-button',
165
+ variant: "secondary",
166
+ shape: "circular",
167
+ action: props.closeAction,
168
+ children: /*#__PURE__*/_jsx(SystemIcons.Close, {
169
+ size: "24px",
170
+ color: COLORS.neutral_600
171
+ })
172
+ })]
173
+ }), /*#__PURE__*/_jsxs(Header, {
174
+ children: [/*#__PURE__*/_jsxs(HeaderText, {
175
+ children: [/*#__PURE__*/_jsx(HeaderTitle, {
176
+ children: props.title
177
+ }), !!props.note && /*#__PURE__*/_jsx(Note, {
178
+ children: props.note
179
+ })]
180
+ }), /*#__PURE__*/_jsxs(HeaderActions, {
181
+ children: [tooltip(), headerActions()]
182
+ })]
183
+ })]
184
+ }), !props.image && /*#__PURE__*/_jsxs(Header, {
129
185
  children: [props.onBack && /*#__PURE__*/_jsx(IconButton, {
130
186
  variant: "secondary",
131
187
  shape: "circular",
@@ -134,7 +190,7 @@ var ModalContent = function ModalContent(props) {
134
190
  }), /*#__PURE__*/_jsxs(HeaderText, {
135
191
  children: [/*#__PURE__*/_jsx(HeaderTitle, {
136
192
  children: props.title
137
- }), !!props.note && /*#__PURE__*/_jsx(HeaderNote, {
193
+ }), !!props.note && /*#__PURE__*/_jsx(Note, {
138
194
  children: props.note
139
195
  })]
140
196
  }), /*#__PURE__*/_jsxs(HeaderActions, {
@@ -159,7 +215,7 @@ var ModalContent = function ModalContent(props) {
159
215
  children: (_props$footerActions = props.footerActions) === null || _props$footerActions === void 0 ? void 0 : _props$footerActions.map(function (item, index) {
160
216
  var action = item.action,
161
217
  text = item.text,
162
- rest = _objectWithoutProperties(item, _excluded4);
218
+ rest = _objectWithoutProperties(item, _excluded6);
163
219
  return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, rest), {}, {
164
220
  onClick: action,
165
221
  size: props.size,