@laerdal/life-react-components 2.2.1-dev.21 → 2.2.1-dev.23.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 (258) hide show
  1. package/dist/Accordion/AccordionItem.cjs +8 -17
  2. package/dist/Accordion/AccordionItem.cjs.map +1 -1
  3. package/dist/Accordion/AccordionItem.d.ts +2 -0
  4. package/dist/Accordion/AccordionItem.js +9 -18
  5. package/dist/Accordion/AccordionItem.js.map +1 -1
  6. package/dist/Accordion/AccordionMenu.cjs +6 -2
  7. package/dist/Accordion/AccordionMenu.cjs.map +1 -1
  8. package/dist/Accordion/AccordionMenu.d.ts +3 -0
  9. package/dist/Accordion/AccordionMenu.js +6 -2
  10. package/dist/Accordion/AccordionMenu.js.map +1 -1
  11. package/dist/Accordion/styles.cjs +7 -11
  12. package/dist/Accordion/styles.cjs.map +1 -1
  13. package/dist/Accordion/styles.d.ts +1 -4
  14. package/dist/Accordion/styles.js +6 -9
  15. package/dist/Accordion/styles.js.map +1 -1
  16. package/dist/AuthPage/AuthPage.js +1 -1
  17. package/dist/Banners/Banner.cjs.map +1 -1
  18. package/dist/Banners/Banner.js.map +1 -1
  19. package/dist/Button/Button.cjs +1 -1
  20. package/dist/Button/Button.cjs.map +1 -1
  21. package/dist/Button/Button.js +2 -2
  22. package/dist/Button/Button.js.map +1 -1
  23. package/dist/Button/Iconbutton.cjs +68 -61
  24. package/dist/Button/Iconbutton.cjs.map +1 -1
  25. package/dist/Button/Iconbutton.d.ts +3 -1
  26. package/dist/Button/Iconbutton.js +68 -61
  27. package/dist/Button/Iconbutton.js.map +1 -1
  28. package/dist/Card/HorizontalCard/HorizontalCard.cjs +12 -9
  29. package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
  30. package/dist/Card/HorizontalCard/HorizontalCard.d.ts +2 -0
  31. package/dist/Card/HorizontalCard/HorizontalCard.js +9 -8
  32. package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
  33. package/dist/Card/HorizontalCard/HorizontalCardActions.cjs +1 -0
  34. package/dist/Card/HorizontalCard/HorizontalCardActions.cjs.map +1 -1
  35. package/dist/Card/HorizontalCard/HorizontalCardActions.js +1 -0
  36. package/dist/Card/HorizontalCard/HorizontalCardActions.js.map +1 -1
  37. package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +13 -9
  38. package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
  39. package/dist/Card/HorizontalCard/HorizontalCardBody.d.ts +4 -0
  40. package/dist/Card/HorizontalCard/HorizontalCardBody.js +8 -8
  41. package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
  42. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +7 -5
  43. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
  44. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.d.ts +2 -0
  45. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +5 -5
  46. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
  47. package/dist/Card/HorizontalCard/index.cjs +33 -12
  48. package/dist/Card/HorizontalCard/index.cjs.map +1 -1
  49. package/dist/Card/HorizontalCard/index.d.ts +3 -1
  50. package/dist/Card/HorizontalCard/index.js +3 -1
  51. package/dist/Card/HorizontalCard/index.js.map +1 -1
  52. package/dist/Card/HorizontalCard/types.cjs.map +1 -1
  53. package/dist/Card/HorizontalCard/types.d.ts +2 -2
  54. package/dist/Card/HorizontalCard/types.js.map +1 -1
  55. package/dist/ChipsInput/ChipInputField.cjs +1 -1
  56. package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
  57. package/dist/ChipsInput/ChipInputField.js +1 -1
  58. package/dist/ChipsInput/ChipInputField.js.map +1 -1
  59. package/dist/Dropdown/BasicDropdown.cjs +6 -18
  60. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  61. package/dist/Dropdown/BasicDropdown.d.ts +0 -1
  62. package/dist/Dropdown/BasicDropdown.js +7 -19
  63. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  64. package/dist/Dropdown/CommonStyling.cjs +4 -7
  65. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  66. package/dist/Dropdown/CommonStyling.d.ts +1 -3
  67. package/dist/Dropdown/CommonStyling.js +4 -7
  68. package/dist/Dropdown/CommonStyling.js.map +1 -1
  69. package/dist/Dropdown/DropdownButton.cjs +1 -0
  70. package/dist/Dropdown/DropdownButton.cjs.map +1 -1
  71. package/dist/Dropdown/DropdownButton.js +1 -0
  72. package/dist/Dropdown/DropdownButton.js.map +1 -1
  73. package/dist/Dropdown/DropdownButtonTypes.cjs.map +1 -1
  74. package/dist/Dropdown/DropdownButtonTypes.d.ts +2 -0
  75. package/dist/Dropdown/DropdownButtonTypes.js.map +1 -1
  76. package/dist/Dropdown/DropdownContent.cjs +1 -1
  77. package/dist/Dropdown/DropdownContent.js +1 -1
  78. package/dist/Dropdown/DropdownFilter.cjs +2 -12
  79. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  80. package/dist/Dropdown/DropdownFilter.js +2 -12
  81. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  82. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  83. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  84. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +1 -3
  85. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
  86. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +2 -4
  87. package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
  88. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  89. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  90. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs +1 -6
  91. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs.map +1 -1
  92. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +0 -4
  93. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +4 -5
  94. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js.map +1 -1
  95. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +56 -147
  96. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
  97. package/dist/GlobalNavigationBar/desktop/MainMenu.d.ts +2 -2
  98. package/dist/GlobalNavigationBar/desktop/MainMenu.js +56 -147
  99. package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
  100. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +1 -1
  101. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
  102. package/dist/GlobalNavigationBar/mobile/MobileMenu.d.ts +1 -1
  103. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +2 -2
  104. package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  105. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  106. package/dist/GlobalNavigationBar/types.d.ts +2 -12
  107. package/dist/GlobalNavigationBar/types.js.map +1 -1
  108. package/dist/Image/ImageWithFallbacks.js +1 -1
  109. package/dist/InputFields/DatepickerField.cjs +31 -49
  110. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  111. package/dist/InputFields/DatepickerField.js +32 -50
  112. package/dist/InputFields/DatepickerField.js.map +1 -1
  113. package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
  114. package/dist/InputFields/DatepickerFieldHeader.js +1 -1
  115. package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
  116. package/dist/InputFields/Label.cjs +8 -12
  117. package/dist/InputFields/Label.cjs.map +1 -1
  118. package/dist/InputFields/Label.js +8 -12
  119. package/dist/InputFields/Label.js.map +1 -1
  120. package/dist/InputFields/NumberField.cjs +12 -28
  121. package/dist/InputFields/NumberField.cjs.map +1 -1
  122. package/dist/InputFields/NumberField.js +15 -31
  123. package/dist/InputFields/NumberField.js.map +1 -1
  124. package/dist/InputFields/PasswordField.cjs +44 -50
  125. package/dist/InputFields/PasswordField.cjs.map +1 -1
  126. package/dist/InputFields/PasswordField.js +45 -51
  127. package/dist/InputFields/PasswordField.js.map +1 -1
  128. package/dist/InputFields/SearchBar.cjs +1 -2
  129. package/dist/InputFields/SearchBar.cjs.map +1 -1
  130. package/dist/InputFields/SearchBar.js +2 -3
  131. package/dist/InputFields/SearchBar.js.map +1 -1
  132. package/dist/InputFields/TextField.cjs +1 -10
  133. package/dist/InputFields/TextField.cjs.map +1 -1
  134. package/dist/InputFields/TextField.js +2 -11
  135. package/dist/InputFields/TextField.js.map +1 -1
  136. package/dist/InputFields/Textarea.cjs +8 -3
  137. package/dist/InputFields/Textarea.cjs.map +1 -1
  138. package/dist/InputFields/Textarea.d.ts +3 -7
  139. package/dist/InputFields/Textarea.js +12 -6
  140. package/dist/InputFields/Textarea.js.map +1 -1
  141. package/dist/InputFields/components/SearchField.cjs +1 -1
  142. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  143. package/dist/InputFields/components/SearchField.js +1 -1
  144. package/dist/InputFields/components/SearchField.js.map +1 -1
  145. package/dist/InputFields/styling.cjs +11 -11
  146. package/dist/InputFields/styling.cjs.map +1 -1
  147. package/dist/InputFields/styling.d.ts +3 -2
  148. package/dist/InputFields/styling.js +10 -11
  149. package/dist/InputFields/styling.js.map +1 -1
  150. package/dist/InputFields/types.cjs.map +1 -1
  151. package/dist/InputFields/types.d.ts +4 -8
  152. package/dist/InputFields/types.js.map +1 -1
  153. package/dist/LinearProgress/LinearProgress.js +1 -1
  154. package/dist/Modals/ModalContent.cjs +9 -2
  155. package/dist/Modals/ModalContent.cjs.map +1 -1
  156. package/dist/Modals/ModalContent.d.ts +1 -0
  157. package/dist/Modals/ModalContent.js +9 -2
  158. package/dist/Modals/ModalContent.js.map +1 -1
  159. package/dist/Modals/ModalTypes.cjs.map +1 -1
  160. package/dist/Modals/ModalTypes.d.ts +1 -1
  161. package/dist/Modals/ModalTypes.js.map +1 -1
  162. package/dist/NavItem/NavItem.cjs +1 -2
  163. package/dist/NavItem/NavItem.cjs.map +1 -1
  164. package/dist/NavItem/NavItem.d.ts +0 -1
  165. package/dist/NavItem/NavItem.js +1 -1
  166. package/dist/NavItem/NavItem.js.map +1 -1
  167. package/dist/Paginator/Paginator.cjs.map +1 -1
  168. package/dist/Paginator/Paginator.js.map +1 -1
  169. package/dist/Table/Table.cjs +2 -1
  170. package/dist/Table/Table.cjs.map +1 -1
  171. package/dist/Table/Table.js +2 -1
  172. package/dist/Table/Table.js.map +1 -1
  173. package/dist/Table/TableFooter.cjs.map +1 -1
  174. package/dist/Table/TableFooter.js +1 -1
  175. package/dist/Table/TableFooter.js.map +1 -1
  176. package/dist/Table/TableStyles.cjs +4 -4
  177. package/dist/Table/TableStyles.cjs.map +1 -1
  178. package/dist/Table/TableStyles.js +4 -4
  179. package/dist/Table/TableStyles.js.map +1 -1
  180. package/dist/Table/TableTypes.cjs.map +1 -1
  181. package/dist/Table/TableTypes.d.ts +2 -1
  182. package/dist/Table/TableTypes.js.map +1 -1
  183. package/dist/Tabs/HorizontalTabs.cjs +10 -12
  184. package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
  185. package/dist/Tabs/HorizontalTabs.d.ts +2 -1
  186. package/dist/Tabs/HorizontalTabs.js +13 -14
  187. package/dist/Tabs/HorizontalTabs.js.map +1 -1
  188. package/dist/Tabs/TabLink.cjs +14 -39
  189. package/dist/Tabs/TabLink.cjs.map +1 -1
  190. package/dist/Tabs/TabLink.d.ts +1 -6
  191. package/dist/Tabs/TabLink.js +14 -39
  192. package/dist/Tabs/TabLink.js.map +1 -1
  193. package/dist/Tabs/VerticalTabs.cjs +0 -2
  194. package/dist/Tabs/VerticalTabs.cjs.map +1 -1
  195. package/dist/Tabs/VerticalTabs.d.ts +0 -1
  196. package/dist/Tabs/VerticalTabs.js +0 -2
  197. package/dist/Tabs/VerticalTabs.js.map +1 -1
  198. package/dist/Tile/TileCommonItems.cjs +4 -2
  199. package/dist/Tile/TileCommonItems.cjs.map +1 -1
  200. package/dist/Tile/TileCommonItems.js +4 -2
  201. package/dist/Tile/TileCommonItems.js.map +1 -1
  202. package/dist/Tile/TileHeader.cjs +18 -10
  203. package/dist/Tile/TileHeader.cjs.map +1 -1
  204. package/dist/Tile/TileHeader.js +18 -10
  205. package/dist/Tile/TileHeader.js.map +1 -1
  206. package/dist/Tile/TileTypes.cjs.map +1 -1
  207. package/dist/Tile/TileTypes.d.ts +5 -2
  208. package/dist/Tile/TileTypes.js.map +1 -1
  209. package/dist/Toggles/ToggleSwitch.cjs +11 -1
  210. package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
  211. package/dist/Toggles/ToggleSwitch.js +12 -2
  212. package/dist/Toggles/ToggleSwitch.js.map +1 -1
  213. package/dist/Toggles/TogglerStyles.cjs +1 -1
  214. package/dist/Toggles/TogglerStyles.cjs.map +1 -1
  215. package/dist/Toggles/TogglerStyles.js +1 -1
  216. package/dist/Toggles/TogglerStyles.js.map +1 -1
  217. package/dist/Tooltips/TooltipStyles.cjs +5 -8
  218. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  219. package/dist/Tooltips/TooltipStyles.d.ts +1 -3
  220. package/dist/Tooltips/TooltipStyles.js +5 -8
  221. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  222. package/dist/Tooltips/TooltipWrapper.cjs +5 -5
  223. package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
  224. package/dist/Tooltips/TooltipWrapper.js +3 -3
  225. package/dist/Tooltips/TooltipWrapper.js.map +1 -1
  226. package/dist/assets/index.cjs.map +1 -1
  227. package/dist/assets/index.js.map +1 -1
  228. package/dist/common/ActionWithin.cjs +1 -1
  229. package/dist/common/ActionWithin.js +1 -1
  230. package/dist/common/FocusVisible.cjs +1 -1
  231. package/dist/common/FocusVisible.js +1 -1
  232. package/dist/icons/index.cjs +1 -1
  233. package/dist/icons/index.cjs.map +1 -1
  234. package/dist/icons/index.js +1 -1
  235. package/dist/icons/index.js.map +1 -1
  236. package/dist/icons/systemicons/SystemIcons.cjs.map +1 -1
  237. package/dist/icons/systemicons/SystemIcons.js.map +1 -1
  238. package/package.json +1 -2
  239. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +0 -176
  240. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +0 -1
  241. package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +0 -18
  242. package/dist/GlobalNavigationBar/desktop/SubMenu.js +0 -166
  243. package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +0 -1
  244. package/dist/GlobalNavigationBar/utils.cjs +0 -17
  245. package/dist/GlobalNavigationBar/utils.cjs.map +0 -1
  246. package/dist/GlobalNavigationBar/utils.d.ts +0 -2
  247. package/dist/GlobalNavigationBar/utils.js +0 -10
  248. package/dist/GlobalNavigationBar/utils.js.map +0 -1
  249. package/dist/NavItem/NestedNavItem.cjs +0 -38
  250. package/dist/NavItem/NestedNavItem.cjs.map +0 -1
  251. package/dist/NavItem/NestedNavItem.d.ts +0 -13
  252. package/dist/NavItem/NestedNavItem.js +0 -28
  253. package/dist/NavItem/NestedNavItem.js.map +0 -1
  254. package/dist/Tooltips/TooltipOverflow.cjs +0 -112
  255. package/dist/Tooltips/TooltipOverflow.cjs.map +0 -1
  256. package/dist/Tooltips/TooltipOverflow.d.ts +0 -10
  257. package/dist/Tooltips/TooltipOverflow.js +0 -102
  258. package/dist/Tooltips/TooltipOverflow.js.map +0 -1
@@ -5,29 +5,28 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.activeErrorMessageState = exports.Warning = exports.ValidationStyling = exports.ValidationMessage = exports.StyledIcon = exports.SearchIconWrapper = exports.NoteMessage = exports.InputWrapper = exports.InputFieldStyling = exports.ErrorMessage = exports.AutofilledMessage = void 0;
8
+ exports.readOnlyState = exports.activeErrorMessageState = exports.Warning = exports.ValidationStyling = exports.ValidationMessage = exports.StyledIcon = exports.SearchIconWrapper = exports.NoteMessage = exports.InputWrapper = exports.InputFieldStyling = exports.ErrorMessage = exports.AutofilledMessage = void 0;
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
- var _TooltipStyles = require("../Tooltips/TooltipStyles");
11
11
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
12
12
  var _styles = require("../styles");
13
13
  var _typography = require("../styles/typography");
14
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
14
+ var _types = require("../types");
15
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _StateColors, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
15
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
17
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
- var InputWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n outline: none;\n ", ";\n ", "\n position: relative;\n \n ", "\n\n"])), function (props) {
18
+ var InputWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n outline: none;\n ", ";\n ", "\n position: relative;\n"])), function (props) {
18
19
  return props.readOnly || props.disabled ? 'cursor: not-allowed;' : '';
19
20
  }, function (props) {
20
21
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
21
- }, (0, _TooltipStyles.TooltipTrigger)('hover'));
22
+ });
22
23
  exports.InputWrapper = InputWrapper;
23
24
  var readOnlyState = (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])), _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.neutral_600);
25
+ exports.readOnlyState = readOnlyState;
24
26
  var activeErrorMessageState = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.critical_400);
25
27
  exports.activeErrorMessageState = activeErrorMessageState;
26
- var InputFieldStyling = _styledComponents.default.input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 48px;\n width: 100%;\n border-radius: 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 &.invalid {\n margin-bottom: 0 !important;\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) {
28
+ var InputFieldStyling = _styledComponents.default.input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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 16px !important;\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) {
27
29
  return props.withoutBorder ? "-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n " : "-webkit-box-shadow: inset 0px 0px 0px 1px ".concat(_styles.COLORS.neutral_400, ";\n -moz-box-shadow: inset 0px 0px 0px 1px ").concat(_styles.COLORS.neutral_400, ";\n box-shadow: inset 0px 0px 0px 1px ").concat(_styles.COLORS.neutral_400, ";");
28
- }, function (props) {
29
- var _props$extraRightPadd;
30
- return 16 + ((_props$extraRightPadd = props.extraRightPadding) !== null && _props$extraRightPadd !== void 0 ? _props$extraRightPadd : 0);
31
30
  }, (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_500), _styles.BREAKPOINTS.MEDIUM, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_500), _styles.COLORS.black, function (props) {
32
31
  return props.activeErrorMessage ? activeErrorMessageState : '';
33
32
  }, function (props) {
@@ -36,12 +35,13 @@ var InputFieldStyling = _styledComponents.default.input(_templateObject4 || (_te
36
35
  exports.InputFieldStyling = InputFieldStyling;
37
36
  var ValidationStyling = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n &.error-msg {\n ", "\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 ", "\n font-weight: 700;\n line-height: 15px;\n }\n"])), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.black), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, '#e76468'));
38
37
  exports.ValidationStyling = ValidationStyling;
39
- var Warning = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n ", "\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ", "\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ", "\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"])), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, null), _styles.BREAKPOINTS.MEDIUM, (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, null), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, null), (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, null));
38
+ var Warning = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ", "\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ", "\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ", "\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"])), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, null), _styles.BREAKPOINTS.MEDIUM, (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, null), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, null), (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, null));
40
39
  exports.Warning = Warning;
41
40
  var ErrorMessage = (0, _styledComponents.default)(Warning)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.critical_500);
42
41
  exports.ErrorMessage = ErrorMessage;
42
+ var StateColors = (_StateColors = {}, (0, _defineProperty2.default)(_StateColors, _types.States.Default, _styles.COLORS.neutral_500), (0, _defineProperty2.default)(_StateColors, _types.States.Valid, _styles.COLORS.correct_500), (0, _defineProperty2.default)(_StateColors, _types.States.Invalid, _styles.COLORS.critical_500), _StateColors);
43
43
  var ValidationMessage = (0, _styledComponents.default)(Warning)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), function (props) {
44
- return props.type === 'invalid' ? _styles.COLORS.critical_500 : _styles.COLORS.correct_500;
44
+ return StateColors[props.type];
45
45
  });
46
46
  exports.ValidationMessage = ValidationMessage;
47
47
  var NoteMessage = (0, _styledComponents.default)(Warning)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.neutral_500);
@@ -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","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 } 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\nconst 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\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 &.invalid {\n margin-bottom: 0 !important;\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 ${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\nexport const ValidationMessage = styled(Warning)<{ type: 'valid' | 'invalid' }>`\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\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;AAAyI;AAAA;AAAA;AAGlI,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;AAEF,IAAMC,aAAa,OAAGC,qBAAG,kQACHC,cAAM,CAACC,WAAW,EACRD,cAAM,CAACE,WAAW,EACvCF,cAAM,CAACG,WAAW,CAI5B;AACM,IAAMC,uBAAuB,OAAGL,qBAAG,8HACVC,cAAM,CAACK,YAAY,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AAO,EAAE,IAAI,CAAC,EAOrDZ,mBAAW,CAACC,MAAM,EAChB,IAAAa,8BAAkB,EAACjB,8BAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,EAQpD,IAAAD,+BAAmB,EAACd,8BAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,EAOrD,IAAAE,8BAAkB,EAACjB,8BAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,CAezD;AAAC;AACK,IAAMG,YAAY,GAAG,IAAAvC,yBAAM,EAACqC,OAAO,CAAC,wGAChC5B,cAAM,CAAC+B,YAAY,CAC7B;AAAC;AAEK,IAAMC,iBAAiB,GAAG,IAAAzC,yBAAM,EAACqC,OAAO,CAAC,wGACrC,UAACnC,KAAK;EAAA,OAAMA,KAAK,CAACwC,IAAI,KAAK,SAAS,GAAGjC,cAAM,CAAC+B,YAAY,GAAG/B,cAAM,CAACuB,WAAW;AAAA,CAAC,CAC1F;AAAC;AAEK,IAAMW,WAAW,GAAG,IAAA3C,yBAAM,EAACqC,OAAO,CAAC,wGAC/B5B,cAAM,CAACc,WAAW,CAC5B;AAAC;AACK,IAAMqB,iBAAiB,GAAG,IAAA5C,yBAAM,EAACqC,OAAO,CAAC,0GACrC5B,cAAM,CAACG,WAAW,CAC5B;AAAC;AAIK,IAAMiC,UAAU,GAAG7C,yBAAM,CAACC,GAAG,gHAEnC;AAAC;AAEK,IAAM6C,iBAAiB,GAAG,IAAA9C,yBAAM,EAAC6C,UAAU,CAAC,uIAGlD;AAAC"}
1
+ {"version":3,"file":"styling.cjs","names":["InputWrapper","styled","div","props","readOnly","disabled","margin","readOnlyState","css","COLORS","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","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 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\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}>`\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 16px !important;\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;AAAsC;AAAA;AAAA;AAE/B,IAAMA,YAAY,GAAGC,yBAAM,CAACC,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,CAE9D;AAAC;AAEK,IAAMC,aAAa,OAAGC,qBAAG,kQACVC,cAAM,CAACC,WAAW,EACRD,cAAM,CAACE,WAAW,EACvC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E,IAAI,CAAC,EAOrDZ,mBAAW,CAACC,MAAM,EAChB,IAAAa,8BAAkB,EAACjB,8BAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,EAQpD,IAAAD,+BAAmB,EAACd,8BAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,EAOrD,IAAAE,8BAAkB,EAACjB,8BAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,CAezD;AAAC;AACK,IAAMG,YAAY,GAAG,IAAArC,yBAAM,EAACmC,OAAO,CAAC,wGAChC3B,cAAM,CAAC8B,YAAY,CAC7B;AAAC;AAEF,IAAMC,WAAW,mEACdC,aAAM,CAACC,OAAO,EAAGjC,cAAM,CAACa,WAAW,+CACnCmB,aAAM,CAACE,KAAK,EAAGlC,cAAM,CAACsB,WAAW,+CACjCU,aAAM,CAACG,OAAO,EAAGnC,cAAM,CAAC8B,YAAY,gBACtC;AAEM,IAAMM,iBAAiB,GAAG,IAAA5C,yBAAM,EAACmC,OAAO,CAAC,wGACrC,UAACjC,KAAK;EAAA,OAAKqC,WAAW,CAACrC,KAAK,CAAC2C,IAAI,CAAC;AAAA,EAC5C;AAAC;AAEK,IAAMC,WAAW,GAAG,IAAA9C,yBAAM,EAACmC,OAAO,CAAC,wGAC/B3B,cAAM,CAACa,WAAW,CAC5B;AAAC;AACK,IAAM0B,iBAAiB,GAAG,IAAA/C,yBAAM,EAACmC,OAAO,CAAC,0GACrC3B,cAAM,CAACG,WAAW,CAC5B;AAAC;AAIK,IAAMqC,UAAU,GAAGhD,yBAAM,CAACC,GAAG,gHAEnC;AAAC;AAEK,IAAMgD,iBAAiB,GAAG,IAAAjD,yBAAM,EAACgD,UAAU,CAAC,uIAGlD;AAAC"}
@@ -1,8 +1,10 @@
1
+ import { States } from '../types';
1
2
  export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {
2
3
  readOnly?: boolean | undefined;
3
4
  disabled?: boolean | undefined;
4
5
  margin?: string | undefined;
5
6
  }, never>;
7
+ export declare const readOnlyState: import("styled-components").FlattenSimpleInterpolation;
6
8
  export declare const activeErrorMessageState: import("styled-components").FlattenSimpleInterpolation;
7
9
  declare const InputFieldStyling: import("styled-components").StyledComponent<"input", any, {
8
10
  activeErrorMessage?: boolean | undefined;
@@ -10,13 +12,12 @@ declare const InputFieldStyling: import("styled-components").StyledComponent<"in
10
12
  withoutBorder?: boolean | undefined;
11
13
  size?: string | undefined;
12
14
  suppressReadOnlyStyles?: boolean | undefined;
13
- extraRightPadding?: number | undefined;
14
15
  }, never>;
15
16
  declare const ValidationStyling: import("styled-components").FlattenSimpleInterpolation;
16
17
  export declare const Warning: import("styled-components").StyledComponent<"div", any, {}, never>;
17
18
  export declare const ErrorMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
18
19
  export declare const ValidationMessage: import("styled-components").StyledComponent<"div", any, {
19
- type: 'valid' | 'invalid';
20
+ type: States.Valid | States.Invalid | States.Default;
20
21
  }, never>;
21
22
  export declare const NoteMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
22
23
  export declare const AutofilledMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,31 +1,30 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
3
- import { TooltipTrigger } from '../Tooltips/TooltipStyles';
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _StateColors, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
4
4
  import styled, { css } from 'styled-components';
5
5
  import { BREAKPOINTS, COLORS, focusStyles } from '../styles';
6
6
  import { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';
7
- export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n position: relative;\n \n ", "\n\n"])), function (props) {
7
+ import { States } from '../types';
8
+ export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n position: relative;\n"])), function (props) {
8
9
  return props.readOnly || props.disabled ? 'cursor: not-allowed;' : '';
9
10
  }, function (props) {
10
11
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
11
- }, TooltipTrigger('hover'));
12
- 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);
12
+ });
13
+ 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);
13
14
  export var activeErrorMessageState = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.critical_400);
14
- var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 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 &.invalid {\n margin-bottom: 0 !important;\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) {
15
+ 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 16px !important;\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) {
15
16
  return props.withoutBorder ? "-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n " : "-webkit-box-shadow: inset 0px 0px 0px 1px ".concat(COLORS.neutral_400, ";\n -moz-box-shadow: inset 0px 0px 0px 1px ").concat(COLORS.neutral_400, ";\n box-shadow: inset 0px 0px 0px 1px ").concat(COLORS.neutral_400, ";");
16
- }, function (props) {
17
- var _props$extraRightPadd;
18
- return 16 + ((_props$extraRightPadd = props.extraRightPadding) !== null && _props$extraRightPadd !== void 0 ? _props$extraRightPadd : 0);
19
17
  }, ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.black, function (props) {
20
18
  return props.activeErrorMessage ? activeErrorMessageState : '';
21
19
  }, function (props) {
22
20
  return props.suppressReadOnlyStyles ? '' : readOnlyState;
23
21
  }, COLORS.neutral_100, COLORS.neutral_300, COLORS.primary_800, focusStyles, COLORS.critical_400, COLORS.correct_500, COLORS.primary_700, COLORS.primary_800);
24
22
  var ValidationStyling = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &.error-msg {\n ", "\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 ", "\n font-weight: 700;\n line-height: 15px;\n }\n"])), ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468'));
25
- export var Warning = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n ", "\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ", "\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ", "\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"])), ComponentXXSStyling(ComponentTextStyle.Regular, null), BREAKPOINTS.MEDIUM, ComponentXSStyling(ComponentTextStyle.Regular, null), ComponentXXSStyling(ComponentTextStyle.Regular, null), ComponentXSStyling(ComponentTextStyle.Regular, null));
23
+ export var Warning = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ", "\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ", "\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ", "\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"])), ComponentXXSStyling(ComponentTextStyle.Regular, null), BREAKPOINTS.MEDIUM, ComponentXSStyling(ComponentTextStyle.Regular, null), ComponentXXSStyling(ComponentTextStyle.Regular, null), ComponentXSStyling(ComponentTextStyle.Regular, null));
26
24
  export var ErrorMessage = styled(Warning)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.critical_500);
25
+ var StateColors = (_StateColors = {}, _defineProperty(_StateColors, States.Default, COLORS.neutral_500), _defineProperty(_StateColors, States.Valid, COLORS.correct_500), _defineProperty(_StateColors, States.Invalid, COLORS.critical_500), _StateColors);
27
26
  export var ValidationMessage = styled(Warning)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (props) {
28
- return props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500;
27
+ return StateColors[props.type];
29
28
  });
30
29
  export var NoteMessage = styled(Warning)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.neutral_500);
31
30
  export var AutofilledMessage = styled(Warning)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.neutral_600);
@@ -1 +1 @@
1
- {"version":3,"file":"styling.js","names":["TooltipTrigger","styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","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","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 } 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\nconst 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\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 &.invalid {\n margin-bottom: 0 !important;\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 ${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\nexport const ValidationMessage = styled(Warning)<{ type: 'valid' | 'invalid' }>`\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\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;AAGxI,OAAO,IAAMC,YAAY,GAAGV,MAAM,CAACW,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,EAG3DhB,cAAc,CAAC,OAAO,CAAC,CAE1B;AAED,IAAMiB,aAAa,GAAGf,GAAG,mPACHE,MAAM,CAACc,WAAW,EACRd,MAAM,CAACe,WAAW,EACvCf,MAAM,CAACgB,WAAW,CAI5B;AACD,OAAO,IAAMC,uBAAuB,GAAGnB,GAAG,+GACVE,MAAM,CAACkB,YAAY,CAClD;AAED,IAAMC,iBAAiB,GAAGtB,MAAM,CAACuB,KAAK,gpDAclC,UAACX,KAAK;EAAA,OACNA,KAAK,CAACY,aAAa,oJAK8BrB,MAAM,CAACsB,WAAW,6DACxBtB,MAAM,CAACsB,WAAW,wDACvBtB,MAAM,CAACsB,WAAW,MAAG;AAAA,GAGhD,UAAAb,KAAK;EAA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D;AACD,OAAO,IAAME,YAAY,GAAGvC,MAAM,CAACsC,OAAO,CAAC,0FAChCnC,MAAM,CAACqC,YAAY,CAC7B;AAED,OAAO,IAAMC,iBAAiB,GAAGzC,MAAM,CAACsC,OAAO,CAAC,0FACrC,UAAC1B,KAAK;EAAA,OAAMA,KAAK,CAAC8B,IAAI,KAAK,SAAS,GAAGvC,MAAM,CAACqC,YAAY,GAAGrC,MAAM,CAAC+B,WAAW;AAAA,CAAC,CAC1F;AAED,OAAO,IAAMS,WAAW,GAAG3C,MAAM,CAACsC,OAAO,CAAC,0FAC/BnC,MAAM,CAACyB,WAAW,CAC5B;AACD,OAAO,IAAMgB,iBAAiB,GAAG5C,MAAM,CAACsC,OAAO,CAAC,4FACrCnC,MAAM,CAACgB,WAAW,CAC5B;AAED,SAASiB,iBAAiB,EAAEd,iBAAiB;AAE7C,OAAO,IAAMuB,UAAU,GAAG7C,MAAM,CAACW,GAAG,kGAEnC;AAED,OAAO,IAAMmC,iBAAiB,GAAG9C,MAAM,CAAC6C,UAAU,CAAC,yHAGlD"}
1
+ {"version":3,"file":"styling.js","names":["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","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 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\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}>`\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 16px !important;\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,OAAOA,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,kIAElC,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,CAE9D;AAED,OAAO,IAAMC,aAAa,GAAGhB,GAAG,mPACVE,MAAM,CAACe,WAAW,EACRf,MAAM,CAACgB,WAAW,EACvChB,MAAM,CAACiB,WAAW,CAI5B;AACD,OAAO,IAAMC,uBAAuB,GAAGpB,GAAG,+GACV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,EAAE,IAAI,CAAC,EAQpDhC,mBAAmB,CAACC,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,EAOrD5B,kBAAkB,CAACH,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,CAezD;AACD,OAAO,IAAME,YAAY,GAAGvC,MAAM,CAACsC,OAAO,CAAC,0FAChCnC,MAAM,CAACqC,YAAY,CAC7B;AAED,IAAMC,WAAW,qDACd/B,MAAM,CAACgC,OAAO,EAAGvC,MAAM,CAACyB,WAAW,iCACnClB,MAAM,CAACiC,KAAK,EAAGxC,MAAM,CAAC+B,WAAW,iCACjCxB,MAAM,CAACkC,OAAO,EAAGzC,MAAM,CAACqC,YAAY,gBACtC;AAED,OAAO,IAAMK,iBAAiB,GAAG7C,MAAM,CAACsC,OAAO,CAAC,0FACrC,UAACzB,KAAK;EAAA,OAAK4B,WAAW,CAAC5B,KAAK,CAACiC,IAAI,CAAC;AAAA,EAC5C;AAED,OAAO,IAAMC,WAAW,GAAG/C,MAAM,CAACsC,OAAO,CAAC,0FAC/BnC,MAAM,CAACyB,WAAW,CAC5B;AACD,OAAO,IAAMoB,iBAAiB,GAAGhD,MAAM,CAACsC,OAAO,CAAC,4FACrCnC,MAAM,CAACiB,WAAW,CAC5B;AAED,SAASgB,iBAAiB,EAAEb,iBAAiB;AAE7C,OAAO,IAAM0B,UAAU,GAAGjD,MAAM,CAACY,GAAG,kGAEnC;AAED,OAAO,IAAMsC,iBAAiB,GAAGlD,MAAM,CAACiD,UAAU,CAAC,yHAGlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size, Testable } from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: 'invalid' | 'valid';\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'placeholder' | 'disabled' | 'required' | 'onChange'>\n & {\n id: string;\n placeholder: string;\n value?: string;\n disabled?: boolean;\n state?: 'invalid' | 'valid';\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n required: boolean;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};"],"mappings":";;;;;AA2DC"}
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import {Size, States, Testable} from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: States.Invalid | States.Valid;\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>\n & {\n id: string;\n state?: States.Invalid | States.Valid;\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};\n"],"mappings":";;;;;AAuDC"}
@@ -1,4 +1,4 @@
1
- import { Size, Testable } from '../types';
1
+ import { Size, States, Testable } from '../types';
2
2
  import React from 'react';
3
3
  export type TextFieldProps = {
4
4
  id: string;
@@ -8,7 +8,7 @@ export type TextFieldProps = {
8
8
  value?: string;
9
9
  validationMessage?: string;
10
10
  type?: string;
11
- state?: 'invalid' | 'valid';
11
+ state?: States.Invalid | States.Valid;
12
12
  autoComplete?: string;
13
13
  placeholder?: string;
14
14
  required?: boolean;
@@ -19,19 +19,15 @@ export type TextFieldProps = {
19
19
  margin?: string;
20
20
  note?: TextFieldNote;
21
21
  };
22
- export type TextareaProps = Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'placeholder' | 'disabled' | 'required' | 'onChange'> & {
22
+ export type TextareaProps = Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'> & {
23
23
  id: string;
24
- placeholder: string;
25
- value?: string;
26
- disabled?: boolean;
27
- state?: 'invalid' | 'valid';
24
+ state?: States.Invalid | States.Valid;
28
25
  onChange?: (text: string) => void;
29
26
  validationMessage?: string;
30
27
  size: Size.Small | Size.Medium;
31
28
  autoHeight?: boolean;
32
29
  margin?: string;
33
30
  note?: TextFieldNote;
34
- required: boolean;
35
31
  };
36
32
  export type TextFieldNote = {
37
33
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size, Testable } from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: 'invalid' | 'valid';\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'placeholder' | 'disabled' | 'required' | 'onChange'>\n & {\n id: string;\n placeholder: string;\n value?: string;\n disabled?: boolean;\n state?: 'invalid' | 'valid';\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n required: boolean;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};"],"mappings":"AA2DC;AAAC"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import {Size, States, Testable} from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: States.Invalid | States.Valid;\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>\n & {\n id: string;\n state?: States.Invalid | States.Valid;\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};\n"],"mappings":"AAuDC;AAAC"}
@@ -10,8 +10,8 @@ import React from 'react';
10
10
  import { Size } from '../types';
11
11
  import styled from 'styled-components';
12
12
  import { COLORS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
16
  export var Bar = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n height: 6px;\n\n &.small {\n height: 6px;\n }\n\n &.medium {\n height: 8px;\n }\n\n &.large {\n height: 12px;\n }\n\n background-color: ", ";\n\n &.active {\n background-color: ", ";\n }\n\n &.current {\n background-color: ", ";\n }\n\n &.inverted {\n background-color: ", ";\n }\n\n &.inverted.active {\n background-color: ", ";\n }\n\n &.inverted.current {\n background-color: ", ";\n }\n\n"])), COLORS.neutral_100, COLORS.accent1_400, COLORS.accent1_800, COLORS.neutral_600, COLORS.accent1_400, COLORS.white);
17
17
  export var Dot = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n\n\n &:after {\n content: '';\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: ", ";\n }\n\n &.small {\n &:after {\n width: 6px;\n height: 6px;\n }\n\n &.current:after {\n width: 10px;\n height: 10px;\n }\n }\n\n &.medium {\n &:after {\n width: 8px;\n height: 8px;\n }\n\n &.current:after {\n width: 12px;\n height: 12px;\n }\n }\n\n &.large {\n &:after {\n width: 12px;\n height: 12px;\n }\n\n &.current:after {\n width: 16px;\n height: 16px;\n }\n }\n\n\n &.active:after {\n background-color: ", ";\n }\n\n &.current:after {\n background-color: ", ";\n }\n\n &.inverted:after {\n background-color: ", ";\n }\n\n &.inverted.active:after {\n background-color: ", ";\n }\n\n &.inverted.current:after {\n background-color: ", ";\n }\n"])), COLORS.neutral_400, COLORS.accent1_600, COLORS.accent1_800, COLORS.neutral_400, COLORS.accent1_400, COLORS.white);
@@ -18,6 +18,7 @@ var _Tooltips = require("../Tooltips");
18
18
  var _Button = require("../Button");
19
19
  var _SystemIcons = require("../icons/systemicons/SystemIcons");
20
20
  var _HyperLink = require("../HyperLink");
21
+ var _icons = require("../icons");
21
22
  var _jsxRuntime = require("react/jsx-runtime");
22
23
  var _excluded = ["icon"],
23
24
  _excluded2 = ["text", "variant", "action"],
@@ -26,7 +27,7 @@ var _excluded = ["icon"],
26
27
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
27
28
  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
29
  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"])));
30
+ 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
31
  var HeaderTitle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, _styles.COLORS.black));
31
32
  var HeaderNote = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), (0, _styles.ComponentXXSStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600));
32
33
  var HeaderActions = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n"])));
@@ -132,7 +133,12 @@ var ModalContent = function ModalContent(props) {
132
133
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
133
134
  className: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : _types.Size.Medium,
134
135
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Header, {
135
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderText, {
136
+ children: [props.onBack && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
137
+ variant: "secondary",
138
+ shape: "circular",
139
+ action: props.onBack,
140
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.ArrowLineLeft, {})
141
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(HeaderText, {
136
142
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(HeaderTitle, {
137
143
  children: props.title
138
144
  }), !!props.note && /*#__PURE__*/(0, _jsxRuntime.jsx)(HeaderNote, {
@@ -178,6 +184,7 @@ var ModalContent = function ModalContent(props) {
178
184
  ModalContent.propTypes = {
179
185
  isModalOpen: _propTypes.default.bool.isRequired,
180
186
  closeAction: _propTypes.default.func.isRequired,
187
+ onBack: _propTypes.default.func,
181
188
  title: _propTypes.default.string.isRequired,
182
189
  note: _propTypes.default.string,
183
190
  headerActions: _propTypes.default.array,
@@ -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","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 {Close, Help} from '../icons/systemicons/SystemIcons';\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`;\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 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 <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 {getLeftActionIconElement()}\n {text}\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 <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 <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,sNAQ5B;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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ChB,IAAI,EAAEN,KAAK,CAACe,IAAK;cACjB,SAAS,EAAE,mBAAAe,CAAC;gBAAA,OAAI,CAACA,CAAC,CAACC,GAAG,KAAK,OAAO,IAAID,CAAC,CAACC,GAAG,KAAK,GAAG,KAAKzB,MAAM,CAAEwB,CAAC,CAAC;cAAA,CAAC;cAAA,UAC/EZ;YAAI,IALaT,IAAI,CAACC,EAAE,IAAIH,KAAK,CAM3B;UACX,CAAC;QACF,EACoB;MAAA,EAChB;IAAA;EACD,EACK;AAErB,CAAC;AAAC;EApIAe,WAAW;EACXC,WAAW;EACXE,KAAK;EACLC,IAAI;EACJtB,aAAa;EACbwB,aAAa;EAEb3B,OAAO;EACP+B,MAAM;EACNL,QAAQ;AAAA;AAAA,eA6HK5B,YAAY;AAAA"}
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 {Close, Help} from '../icons/systemicons/SystemIcons';\nimport {HyperLink} from '../HyperLink';\nimport {SystemIcons} from \"../icons\";\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 <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 {getLeftActionIconElement()}\n {text}\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 <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;AACA;AAAqC;AAAA;EAAA;EAAA;EAAA;AAAA;AAAA;AAAA;AAErC,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,iI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BZ,KAAK,CAAC6B,aAAa,yDAAnB,qBAAqBxB,GAAG,CAAC,UAACyB,IAAI,EAAEvB,KAAK,EAAK;YACvC,IAAOD,MAAM,GAAmBwB,IAAI,CAA7BxB,MAAM;cAAEY,IAAI,GAAaY,IAAI,CAArBZ,IAAI;cAAKT,IAAI,0CAAIqB,IAAI;YACpC,oBAAO,qBAAC,cAAM,kCACKrB,IAAI;cACR,OAAO,EAAEH,MAAO;cAChB,IAAI,EAAEN,KAAK,CAACe,IAAK;cACjB,SAAS,EAAE,mBAAAgB,CAAC;gBAAA,OAAI,CAACA,CAAC,CAACC,GAAG,KAAK,OAAO,IAAID,CAAC,CAACC,GAAG,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"}
@@ -5,6 +5,7 @@ interface ModalContentProps {
5
5
  size?: Size.Small | Size.Medium | Size.Large;
6
6
  isModalOpen: boolean;
7
7
  closeAction: () => void;
8
+ onBack?: () => void;
8
9
  title: string;
9
10
  note?: string;
10
11
  headerActions?: IconButtonAction[];
@@ -18,9 +18,10 @@ import { TooltipContainer, TooltipWrapper } from '../Tooltips';
18
18
  import { Button, IconButton } from '../Button';
19
19
  import { Close, Help } from '../icons/systemicons/SystemIcons';
20
20
  import { HyperLink } from '../HyperLink';
21
+ import { SystemIcons } from "../icons";
21
22
  import { jsx as _jsx } from "react/jsx-runtime";
22
23
  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"])));
24
+ 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
25
  var HeaderTitle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), ComponentMStyling(ComponentTextStyle.Bold, COLORS.black));
25
26
  var HeaderNote = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n"])), ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600));
26
27
  var HeaderActions = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n"])));
@@ -126,7 +127,12 @@ var ModalContent = function ModalContent(props) {
126
127
  children: /*#__PURE__*/_jsxs(Wrapper, {
127
128
  className: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : Size.Medium,
128
129
  children: [/*#__PURE__*/_jsxs(Header, {
129
- children: [/*#__PURE__*/_jsxs(HeaderText, {
130
+ children: [props.onBack && /*#__PURE__*/_jsx(IconButton, {
131
+ variant: "secondary",
132
+ shape: "circular",
133
+ action: props.onBack,
134
+ children: /*#__PURE__*/_jsx(SystemIcons.ArrowLineLeft, {})
135
+ }), /*#__PURE__*/_jsxs(HeaderText, {
130
136
  children: [/*#__PURE__*/_jsx(HeaderTitle, {
131
137
  children: props.title
132
138
  }), !!props.note && /*#__PURE__*/_jsx(HeaderNote, {
@@ -172,6 +178,7 @@ var ModalContent = function ModalContent(props) {
172
178
  ModalContent.propTypes = {
173
179
  isModalOpen: _pt.bool.isRequired,
174
180
  closeAction: _pt.func.isRequired,
181
+ onBack: _pt.func,
175
182
  title: _pt.string.isRequired,
176
183
  note: _pt.string,
177
184
  headerActions: _pt.array,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContent.js","names":["React","Size","ModalContainer","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXLStyling","ComponentXSStyling","ComponentXXSStyling","scrollBarStyling","TooltipContainer","TooltipWrapper","Button","IconButton","Close","Help","HyperLink","HeaderText","div","HeaderTitle","Bold","black","HeaderNote","Regular","neutral_600","HeaderActions","Header","Content","Small","FooterLeftContainer","FooterLeftNote","FooterLeftLink","primary_500","FooterRightContainer","Footer","Wrapper","ModalContent","props","tooltip","XSmall","cursor","headerActions","map","action","index","icon","rest","id","getLeftActionIconElement","leftFooterAction","cloneElement","size","Large","actionType","text","variant","e","preventDefault","isModalOpen","closeAction","Medium","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 {Close, Help} from '../icons/systemicons/SystemIcons';\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`;\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 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 <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 {getLeftActionIconElement()}\n {text}\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 <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 <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,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,QAAO,UAAU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EAAE,IAAIH,KAAK,CAM3B;UACX,CAAC;QACF,EACoB;MAAA,EAChB;IAAA;EACD,EACK;AAErB,CAAC;AAAC;EApIAc,WAAW;EACXC,WAAW;EACXE,KAAK;EACLC,IAAI;EACJrB,aAAa;EACbuB,aAAa;EAEb1B,OAAO;EACP8B,MAAM;EACNL,QAAQ;AAAA;AA6HV,eAAe3B,YAAY"}
1
+ {"version":3,"file":"ModalContent.js","names":["React","Size","ModalContainer","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXLStyling","ComponentXSStyling","ComponentXXSStyling","scrollBarStyling","TooltipContainer","TooltipWrapper","Button","IconButton","Close","Help","HyperLink","SystemIcons","HeaderText","div","HeaderTitle","Bold","black","HeaderNote","Regular","neutral_600","HeaderActions","Header","Content","Small","FooterLeftContainer","FooterLeftNote","FooterLeftLink","primary_500","FooterRightContainer","Footer","Wrapper","ModalContent","props","tooltip","XSmall","cursor","headerActions","map","action","index","icon","rest","id","getLeftActionIconElement","leftFooterAction","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 {Close, Help} from '../icons/systemicons/SystemIcons';\nimport {HyperLink} from '../HyperLink';\nimport {SystemIcons} from \"../icons\";\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 <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 {getLeftActionIconElement()}\n {text}\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 <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,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,QAAO,UAAU;AAE7B,SAAQC,cAAc,QAAO,SAAS;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SACEC,MAAM,EACNC,iBAAiB,EACjBC,iBAAiB,EAAEC,iBAAiB,EACpCC,kBAAkB,EAAEC,kBAAkB,EACtCC,kBAAkB,EAClBC,mBAAmB,EACnBC,gBAAgB,QACX,WAAW;AAClB,SAAQC,gBAAgB,EAAEC,cAAc,QAAO,aAAa;AAC5D,SAAQC,MAAM,EAAEC,UAAU,QAAO,WAAW;AAC5C,SAAQC,KAAK,EAAEC,IAAI,QAAO,kCAAkC;AAC5D,SAAQC,SAAS,QAAO,cAAc;AACtC,SAAQC,WAAW,QAAO,UAAU;AAAC;AAAA;AAErC,IAAMC,UAAU,GAAGlB,MAAM,CAACmB,GAAG,gRAa5B;AACD,IAAMC,WAAW,GAAGpB,MAAM,CAACmB,GAAG,kFAC1BhB,iBAAiB,CAACE,kBAAkB,CAACgB,IAAI,EAAEpB,MAAM,CAACqB,KAAK,CAAC,CAC3D;AACD,IAAMC,UAAU,GAAGvB,MAAM,CAACmB,GAAG,kFACzBX,mBAAmB,CAACH,kBAAkB,CAACmB,OAAO,EAAEvB,MAAM,CAACwB,WAAW,CAAC,CACtE;AAED,IAAMC,aAAa,GAAG1B,MAAM,CAACmB,GAAG,mHAG/B;AAED,IAAMQ,MAAM,GAAG3B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eACV,MAAC,MAAM;QAAA,wBACL,KAAC,mBAAmB;UAAA,UACjBf,gBAAgB;QAAE,EACC,eACtB,KAAC,oBAAoB;UAAA,kCAClBZ,KAAK,CAAC4B,aAAa,yDAAnB,qBAAqBvB,GAAG,CAAC,UAACwB,IAAI,EAAEtB,KAAK,EAAK;YACvC,IAAOD,MAAM,GAAmBuB,IAAI,CAA7BvB,MAAM;cAAEW,IAAI,GAAaY,IAAI,CAArBZ,IAAI;cAAKR,IAAI,4BAAIoB,IAAI;YACpC,oBAAO,KAAC,MAAM,kCACKpB,IAAI;cACR,OAAO,EAAEH,MAAO;cAChB,IAAI,EAAEN,KAAK,CAACc,IAAK;cACjB,SAAS,EAAE,mBAAAgB,CAAC;gBAAA,OAAI,CAACA,CAAC,CAACC,GAAG,KAAK,OAAO,IAAID,CAAC,CAACC,GAAG,KAAK,GAAG,KAAKzB,MAAM,CAAEwB,CAAC,CAAC;cAAA,CAAC;cAAA,UAC/Eb;YAAI,IALaR,IAAI,CAACC,EAAE,IAAIH,KAAK,CAM3B;UACX,CAAC;QACF,EACoB;MAAA,EAChB;IAAA;EACD,EACK;AAErB,CAAC;AAAC;EA3IAc,WAAW;EACXC,WAAW;EACXE,MAAM;EACNC,KAAK;EACLC,IAAI;EACJtB,aAAa;EACbwB,aAAa;EAEb3B,OAAO;EACP+B,MAAM;EACNL,QAAQ;AAAA;AAmIV,eAAe5B,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalTypes.cjs","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import { ButtonProps } from '../Button/Button';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport React from 'react';\n\nexport interface IconButtonAction extends Pick<IconButtonProps, 'variant' | 'id' | 'shape' | 'disabled' | 'action'> {\n icon: React.ReactNode;\n}\n\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\n action?: (() => void) | ((e: any) => void);\n text: string;\n}\n\nexport interface LeftFooterActionBase {\n actionType: 'hyperlink' | 'note' | 'button';\n text: string;\n icon?: React.ReactNode;\n action?: (() => void) | ((e: any) => void);\n}\n\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {}\n\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\n text: string;\n}\n\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\n"],"mappings":""}
1
+ {"version":3,"file":"ModalTypes.cjs","names":[],"sources":["../../src/Modals/ModalTypes.ts"],"sourcesContent":["import { ButtonProps } from '../Button/Button';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport React from 'react';\n\nexport interface IconButtonAction extends Pick<IconButtonProps, 'variant' | 'id' | 'shape' | 'disabled' | 'action' | 'tooltip'> {\n icon: React.ReactNode;\n}\n\nexport interface ButtonAction extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'> {\n action?: (() => void) | ((e: any) => void);\n text: string;\n}\n\nexport interface LeftFooterActionBase {\n actionType: 'hyperlink' | 'note' | 'button';\n text: string;\n icon?: React.ReactNode;\n action?: (() => void) | ((e: any) => void);\n}\n\nexport interface LeftFooterHyperlink extends HyperlinkProps, LeftFooterActionBase {}\n\nexport interface LeftFooterButton extends Pick<ButtonProps, 'variant' | 'id' | 'loading' | 'disabled' | 'icon' | 'type'>, LeftFooterActionBase {\n text: string;\n}\n\nexport type LeftFooterAction = LeftFooterButton | LeftFooterHyperlink;\n"],"mappings":""}