@laerdal/life-react-components 3.5.1-dev.12 → 3.5.1-dev.14

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 (660) hide show
  1. package/dist/Accordion/AccordionItem.js +69 -47
  2. package/dist/Accordion/AccordionMenu.js +91 -64
  3. package/dist/Accordion/ContentAccordion.js +154 -105
  4. package/dist/Accordion/index.js +8 -7
  5. package/dist/Accordion/styles.js +16 -12
  6. package/dist/AuthPage/AuthPage.d.ts +1 -1
  7. package/dist/AuthPage/AuthPage.js +36 -29
  8. package/dist/AuthPage/ScreenSetsContainer.js +9 -9
  9. package/dist/AuthPage/index.js +5 -4
  10. package/dist/Banners/Banner.d.ts +2 -2
  11. package/dist/Banners/Banner.js +182 -112
  12. package/dist/Banners/OverviewBanner.d.ts +1 -1
  13. package/dist/Banners/OverviewBanner.js +32 -39
  14. package/dist/Banners/index.js +5 -4
  15. package/dist/Banners/styles.js +53 -55
  16. package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
  17. package/dist/Breadcrumb/Breadcrumb.js +126 -67
  18. package/dist/Breadcrumb/BreadcrumbItem.js +2 -1
  19. package/dist/Breadcrumb/index.js +5 -4
  20. package/dist/Breadcrumb/styles.js +32 -24
  21. package/dist/Button/BackButton.js +48 -45
  22. package/dist/Button/Button.js +195 -85
  23. package/dist/Button/DualFunctionButton.js +160 -71
  24. package/dist/Button/Iconbutton.js +127 -70
  25. package/dist/Button/index.js +9 -8
  26. package/dist/Card/HorizontalCard/HorizontalCard.js +78 -55
  27. package/dist/Card/HorizontalCard/HorizontalCardActions.d.ts +1 -1
  28. package/dist/Card/HorizontalCard/HorizontalCardActions.js +92 -39
  29. package/dist/Card/HorizontalCard/HorizontalCardBody.d.ts +1 -1
  30. package/dist/Card/HorizontalCard/HorizontalCardBody.js +38 -23
  31. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.d.ts +1 -1
  32. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +34 -21
  33. package/dist/Card/HorizontalCard/index.js +5 -4
  34. package/dist/Card/HorizontalCard/types.d.ts +5 -5
  35. package/dist/Card/HorizontalCard/types.js +2 -1
  36. package/dist/Card/VerticalCard/Card.js +81 -61
  37. package/dist/Card/VerticalCard/CardBottomSection.js +110 -45
  38. package/dist/Card/VerticalCard/CardMiddleSection.js +66 -32
  39. package/dist/Card/VerticalCard/CardTopSection.js +101 -33
  40. package/dist/Card/VerticalCard/index.js +8 -7
  41. package/dist/Card/index.js +3 -2
  42. package/dist/Chips/ActionChip.js +63 -41
  43. package/dist/Chips/ChipStyles.js +11 -12
  44. package/dist/Chips/ChipTypes.d.ts +1 -1
  45. package/dist/Chips/ChipTypes.js +2 -1
  46. package/dist/Chips/ChoiceChips.js +93 -66
  47. package/dist/Chips/FilterChip.js +64 -43
  48. package/dist/Chips/InputChip.js +106 -65
  49. package/dist/Chips/index.js +7 -6
  50. package/dist/ChipsInput/ChipDropdownInput.js +361 -224
  51. package/dist/ChipsInput/ChipInput.js +124 -95
  52. package/dist/ChipsInput/ChipInputField.js +195 -114
  53. package/dist/ChipsInput/ChipInputTypes.js +2 -1
  54. package/dist/ChipsInput/index.js +3 -2
  55. package/dist/Dropdown/BasicDropdown.d.ts +3 -3
  56. package/dist/Dropdown/BasicDropdown.js +305 -153
  57. package/dist/Dropdown/CommonStyling.js +44 -24
  58. package/dist/Dropdown/DropdownButton.js +206 -103
  59. package/dist/Dropdown/DropdownButtonTypes.d.ts +3 -3
  60. package/dist/Dropdown/DropdownButtonTypes.js +2 -1
  61. package/dist/Dropdown/DropdownContent.js +605 -339
  62. package/dist/Dropdown/DropdownFilter.js +318 -161
  63. package/dist/Dropdown/index.js +9 -8
  64. package/dist/Footer/Components/FooterBottomLinks.js +41 -20
  65. package/dist/Footer/Components/FooterDropdownLinks.js +61 -25
  66. package/dist/Footer/Components/FooterNavSection.js +62 -32
  67. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +95 -42
  68. package/dist/Footer/Components/FooterTop.js +60 -34
  69. package/dist/Footer/Footer.js +20 -17
  70. package/dist/Footer/SiteFooter.js +89 -51
  71. package/dist/Footer/index.js +3 -2
  72. package/dist/GlobalNavigationBar/GlobalNavigationBar.d.ts +1 -1
  73. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +192 -89
  74. package/dist/GlobalNavigationBar/Logo.d.ts +1 -1
  75. package/dist/GlobalNavigationBar/Logo.js +74 -33
  76. package/dist/GlobalNavigationBar/desktop/DesktopActions.js +146 -88
  77. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +1 -1
  78. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +66 -42
  79. package/dist/GlobalNavigationBar/desktop/MainMenu.d.ts +1 -1
  80. package/dist/GlobalNavigationBar/desktop/MainMenu.js +282 -175
  81. package/dist/GlobalNavigationBar/desktop/RightSideNav.d.ts +1 -1
  82. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +64 -46
  83. package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +1 -1
  84. package/dist/GlobalNavigationBar/desktop/SubMenu.js +248 -131
  85. package/dist/GlobalNavigationBar/desktop/UserMenu.js +155 -90
  86. package/dist/GlobalNavigationBar/index.js +4 -3
  87. package/dist/GlobalNavigationBar/mobile/CommonStyles.js +26 -28
  88. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +32 -18
  89. package/dist/GlobalNavigationBar/mobile/MobileMenu.d.ts +1 -1
  90. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +146 -94
  91. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js +145 -89
  92. package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js +152 -108
  93. package/dist/GlobalNavigationBar/types.d.ts +8 -8
  94. package/dist/GlobalNavigationBar/types.js +2 -1
  95. package/dist/GlobalNavigationBar/utils.js +10 -7
  96. package/dist/HyperLink/HyperLink.js +42 -36
  97. package/dist/HyperLink/index.js +4 -3
  98. package/dist/HyperLink/styling.js +7 -9
  99. package/dist/Image/ImageWithFallbacks.d.ts +1 -1
  100. package/dist/Image/ImageWithFallbacks.js +106 -87
  101. package/dist/Image/index.js +3 -2
  102. package/dist/InputFields/Checkbox.js +95 -65
  103. package/dist/InputFields/DatepickerField.d.ts +1 -1
  104. package/dist/InputFields/DatepickerField.js +335 -227
  105. package/dist/InputFields/DatepickerFieldHeader.js +80 -43
  106. package/dist/InputFields/Label.d.ts +1 -1
  107. package/dist/InputFields/Label.js +116 -77
  108. package/dist/InputFields/NumberField.js +304 -194
  109. package/dist/InputFields/PasswordField.d.ts +1 -1
  110. package/dist/InputFields/PasswordField.js +129 -60
  111. package/dist/InputFields/QuickSearch.d.ts +1 -1
  112. package/dist/InputFields/QuickSearch.js +189 -92
  113. package/dist/InputFields/RadioButton.d.ts +1 -1
  114. package/dist/InputFields/RadioButton.js +96 -54
  115. package/dist/InputFields/ResponsiveComponentWrapper.d.ts +1 -1
  116. package/dist/InputFields/ResponsiveComponentWrapper.js +44 -20
  117. package/dist/InputFields/RichTextField.js +111 -83
  118. package/dist/InputFields/SearchBar.d.ts +1 -1
  119. package/dist/InputFields/SearchBar.js +187 -63
  120. package/dist/InputFields/TextField.d.ts +1 -1
  121. package/dist/InputFields/TextField.js +121 -51
  122. package/dist/InputFields/Textarea.js +88 -57
  123. package/dist/InputFields/components/SearchBarInput.d.ts +1 -1
  124. package/dist/InputFields/components/SearchBarInput.js +73 -26
  125. package/dist/InputFields/components/SearchField.js +45 -44
  126. package/dist/InputFields/index.js +14 -13
  127. package/dist/InputFields/styling.js +38 -33
  128. package/dist/InputFields/types.d.ts +2 -2
  129. package/dist/InputFields/types.js +3 -2
  130. package/dist/Layouts/index.js +41 -25
  131. package/dist/LinearProgress/LinearProgress.js +105 -78
  132. package/dist/LinearProgress/index.js +4 -3
  133. package/dist/List/ListRow.js +140 -83
  134. package/dist/List/index.js +3 -2
  135. package/dist/LoadingIndicator/LoadingIndicator.d.ts +1 -1
  136. package/dist/LoadingIndicator/LoadingIndicator.js +46 -26
  137. package/dist/LoadingIndicator/index.js +2 -1
  138. package/dist/LoadingPage/GlobalLoadingPage.js +36 -26
  139. package/dist/LoadingPage/index.js +2 -1
  140. package/dist/MenuItem/MenuItem.d.ts +1 -1
  141. package/dist/MenuItem/MenuItem.js +101 -60
  142. package/dist/MenuItem/index.js +2 -1
  143. package/dist/MiniProductCard/MiniProductCard.d.ts +1 -1
  144. package/dist/MiniProductCard/MiniProductCard.js +47 -30
  145. package/dist/MiniProductCard/index.js +2 -1
  146. package/dist/Modals/Modal.d.ts +1 -1
  147. package/dist/Modals/Modal.js +55 -36
  148. package/dist/Modals/ModalContainer.d.ts +2 -2
  149. package/dist/Modals/ModalContainer.js +185 -130
  150. package/dist/Modals/ModalContent.js +246 -159
  151. package/dist/Modals/ModalDialog.js +339 -166
  152. package/dist/Modals/ModalNote.js +66 -27
  153. package/dist/Modals/ModalStyles.js +94 -53
  154. package/dist/Modals/ModalTypes.d.ts +2 -2
  155. package/dist/Modals/ModalTypes.js +2 -1
  156. package/dist/Modals/index.js +7 -6
  157. package/dist/NavItem/NavItem.d.ts +1 -1
  158. package/dist/NavItem/NavItem.js +18 -26
  159. package/dist/NavItem/NestedNavItem.js +28 -18
  160. package/dist/NavItem/index.js +2 -1
  161. package/dist/NotificationDot/NotificationDot.js +47 -17
  162. package/dist/NotificationDot/index.js +2 -1
  163. package/dist/Paginator/Paginator.js +147 -77
  164. package/dist/Paginator/index.js +3 -2
  165. package/dist/Panel/Panel.d.ts +1 -1
  166. package/dist/Panel/Panel.js +131 -82
  167. package/dist/Panel/index.js +2 -1
  168. package/dist/Popover/Popover.js +226 -101
  169. package/dist/Popover/index.js +2 -1
  170. package/dist/ProfileButton/ProfileButton.d.ts +2 -2
  171. package/dist/ProfileButton/ProfileButton.js +75 -52
  172. package/dist/ProfileButton/index.js +2 -1
  173. package/dist/QuizButton/QuizButton.d.ts +1 -1
  174. package/dist/QuizButton/QuizButton.js +121 -53
  175. package/dist/QuizButton/index.js +2 -1
  176. package/dist/SegmentControl/SegmentControl.js +78 -57
  177. package/dist/SegmentControl/index.js +3 -2
  178. package/dist/Services/functions.js +12 -11
  179. package/dist/SideMenu/SideMenu.js +30 -43
  180. package/dist/SideMenu/SideMenuBody.js +38 -24
  181. package/dist/SideMenu/SideMenuFooter.js +46 -43
  182. package/dist/SideMenu/SideMenuHeader.js +42 -46
  183. package/dist/SideMenu/index.js +3 -2
  184. package/dist/SideMenu/types.d.ts +3 -3
  185. package/dist/SideMenu/types.js +2 -1
  186. package/dist/SkipToContent/SkipToContent.d.ts +1 -1
  187. package/dist/SkipToContent/SkipToContent.js +24 -17
  188. package/dist/SkipToContent/index.js +2 -1
  189. package/dist/Switcher/MobileCustomMenuContent.js +37 -26
  190. package/dist/Switcher/MobileSwitcherMenu.js +55 -21
  191. package/dist/Switcher/SwitcherMenuItem.js +44 -18
  192. package/dist/Switcher/index.js +4 -3
  193. package/dist/Table/Table.js +391 -286
  194. package/dist/Table/TableBody.js +244 -116
  195. package/dist/Table/TableFooter.js +94 -41
  196. package/dist/Table/TableHeaders.js +31 -26
  197. package/dist/Table/TableStyles.js +48 -40
  198. package/dist/Table/TableTypes.d.ts +4 -4
  199. package/dist/Table/TableTypes.js +2 -2
  200. package/dist/Table/index.js +4 -3
  201. package/dist/Tabs/HorizontalTabs.js +161 -116
  202. package/dist/Tabs/TabLink.js +117 -76
  203. package/dist/Tabs/Tabs.d.ts +1 -1
  204. package/dist/Tabs/Tabs.js +80 -62
  205. package/dist/Tabs/VerticalTabs.js +46 -13
  206. package/dist/Tabs/index.js +4 -3
  207. package/dist/Tag/Tag.d.ts +2 -2
  208. package/dist/Tag/Tag.js +49 -41
  209. package/dist/Tag/index.js +2 -1
  210. package/dist/Tile/Tile.js +42 -43
  211. package/dist/Tile/TileBody.js +18 -15
  212. package/dist/Tile/TileCommonItems.js +117 -75
  213. package/dist/Tile/TileFooter.js +28 -19
  214. package/dist/Tile/TileHeader.js +81 -57
  215. package/dist/Tile/TileTypes.d.ts +8 -8
  216. package/dist/Tile/TileTypes.js +2 -1
  217. package/dist/Tile/index.js +4 -3
  218. package/dist/Toasters/Toast.d.ts +2 -2
  219. package/dist/Toasters/Toast.js +241 -166
  220. package/dist/Toasters/ToastContext.d.ts +2 -2
  221. package/dist/Toasters/ToastContext.js +145 -69
  222. package/dist/Toasters/index.js +5 -4
  223. package/dist/Toggles/ToggleButton.js +71 -48
  224. package/dist/Toggles/ToggleSwitch.js +83 -61
  225. package/dist/Toggles/TogglerStyles.js +12 -13
  226. package/dist/Toggles/TogglerTypes.js +2 -1
  227. package/dist/Toggles/index.js +4 -3
  228. package/dist/Tooltips/TooltipOverflow.js +102 -71
  229. package/dist/Tooltips/TooltipStyles.d.ts +1 -1
  230. package/dist/Tooltips/TooltipStyles.js +70 -41
  231. package/dist/Tooltips/TooltipTypes.js +2 -1
  232. package/dist/Tooltips/TooltipWrapper.js +93 -65
  233. package/dist/Tooltips/index.js +4 -3
  234. package/dist/assets/index.d.ts +1 -1
  235. package/dist/assets/index.js +154 -41
  236. package/dist/common/ActionWithin.js +45 -25
  237. package/dist/common/ClickOutside.js +23 -20
  238. package/dist/common/EventHandlers.js +9 -8
  239. package/dist/common/FocusOutside.js +23 -20
  240. package/dist/common/FocusVisible.d.ts +1 -1
  241. package/dist/common/FocusVisible.js +89 -75
  242. package/dist/common/InputStyling.js +6 -8
  243. package/dist/common/NavigationHelper.js +24 -18
  244. package/dist/common/ScrollableContainer.js +25 -22
  245. package/dist/common/StackState.js +29 -10
  246. package/dist/common/index.js +7 -6
  247. package/dist/icons/contenticons/Adaptive.js +37 -31
  248. package/dist/icons/contenticons/Add.js +37 -31
  249. package/dist/icons/contenticons/Adult.js +37 -31
  250. package/dist/icons/contenticons/AedNoShockAdvised.js +37 -31
  251. package/dist/icons/contenticons/AedPads.js +37 -31
  252. package/dist/icons/contenticons/AedPadsCorrect.js +37 -31
  253. package/dist/icons/contenticons/AedPadsError.js +37 -31
  254. package/dist/icons/contenticons/AedShockAdvised.js +37 -31
  255. package/dist/icons/contenticons/Ambulance.js +37 -31
  256. package/dist/icons/contenticons/Assignments.js +37 -31
  257. package/dist/icons/contenticons/Attention.js +37 -31
  258. package/dist/icons/contenticons/AutomaticMode.js +37 -31
  259. package/dist/icons/contenticons/AwardWinningPerson.js +37 -31
  260. package/dist/icons/contenticons/Biohazard.js +37 -31
  261. package/dist/icons/contenticons/Bleeding.js +37 -31
  262. package/dist/icons/contenticons/Book.js +37 -31
  263. package/dist/icons/contenticons/Buildings.js +37 -31
  264. package/dist/icons/contenticons/CPRCall.js +37 -31
  265. package/dist/icons/contenticons/CPRCycles.js +37 -31
  266. package/dist/icons/contenticons/CPRTraining.js +37 -31
  267. package/dist/icons/contenticons/Calendar.js +37 -31
  268. package/dist/icons/contenticons/Call.js +37 -31
  269. package/dist/icons/contenticons/Certificate.js +37 -31
  270. package/dist/icons/contenticons/ChestCompressionFraction.js +37 -31
  271. package/dist/icons/contenticons/Child.js +37 -31
  272. package/dist/icons/contenticons/Cleaning.js +37 -31
  273. package/dist/icons/contenticons/ClinicalFindings.js +37 -31
  274. package/dist/icons/contenticons/Cloud.js +37 -31
  275. package/dist/icons/contenticons/CloudAttension.js +37 -31
  276. package/dist/icons/contenticons/CloudChecked.js +37 -31
  277. package/dist/icons/contenticons/CloudDownload.js +37 -31
  278. package/dist/icons/contenticons/CloudLocked.js +37 -31
  279. package/dist/icons/contenticons/CloudNoConnection.js +37 -31
  280. package/dist/icons/contenticons/CloudSyncing.js +37 -31
  281. package/dist/icons/contenticons/CloudUpload.js +37 -31
  282. package/dist/icons/contenticons/Code.js +37 -31
  283. package/dist/icons/contenticons/CoffeeBreak.js +37 -31
  284. package/dist/icons/contenticons/Contact.js +37 -31
  285. package/dist/icons/contenticons/ContactInfo.js +37 -31
  286. package/dist/icons/contenticons/Cookie.js +37 -31
  287. package/dist/icons/contenticons/CountAloud.js +37 -31
  288. package/dist/icons/contenticons/Dashboard.js +37 -31
  289. package/dist/icons/contenticons/Data.js +37 -31
  290. package/dist/icons/contenticons/DecisionFlow.js +37 -31
  291. package/dist/icons/contenticons/Defribilator.js +37 -31
  292. package/dist/icons/contenticons/DefribilatorMonitor.js +37 -31
  293. package/dist/icons/contenticons/Depth.js +37 -31
  294. package/dist/icons/contenticons/Desktop.js +37 -31
  295. package/dist/icons/contenticons/DeviceChecked.js +37 -31
  296. package/dist/icons/contenticons/Dispatcher.js +37 -31
  297. package/dist/icons/contenticons/Doctor.js +37 -31
  298. package/dist/icons/contenticons/DocumentChecked.js +37 -31
  299. package/dist/icons/contenticons/Download.js +37 -31
  300. package/dist/icons/contenticons/ELearning.js +37 -31
  301. package/dist/icons/contenticons/EMSRescuer.js +37 -31
  302. package/dist/icons/contenticons/ESimulation.js +37 -31
  303. package/dist/icons/contenticons/Edit.js +37 -31
  304. package/dist/icons/contenticons/Educator.js +37 -31
  305. package/dist/icons/contenticons/Elderly.js +37 -31
  306. package/dist/icons/contenticons/Embryo.js +37 -31
  307. package/dist/icons/contenticons/EventLog.js +37 -31
  308. package/dist/icons/contenticons/Faq.js +37 -31
  309. package/dist/icons/contenticons/Female.js +37 -31
  310. package/dist/icons/contenticons/FirstAid.js +37 -31
  311. package/dist/icons/contenticons/Geriatric.js +37 -31
  312. package/dist/icons/contenticons/GiftCard.js +37 -31
  313. package/dist/icons/contenticons/Goals.js +37 -31
  314. package/dist/icons/contenticons/Grid.js +37 -31
  315. package/dist/icons/contenticons/GuidedTour.js +37 -31
  316. package/dist/icons/contenticons/HandPlacement.js +37 -31
  317. package/dist/icons/contenticons/HandPlacementCorrect.js +37 -31
  318. package/dist/icons/contenticons/HandPlacementIncorrect.js +37 -31
  319. package/dist/icons/contenticons/HeadTilt.js +37 -31
  320. package/dist/icons/contenticons/Heart.js +37 -31
  321. package/dist/icons/contenticons/HeartPulse.js +37 -31
  322. package/dist/icons/contenticons/HeartShock.js +37 -31
  323. package/dist/icons/contenticons/Help.js +37 -31
  324. package/dist/icons/contenticons/Hierarchy.js +37 -31
  325. package/dist/icons/contenticons/Hospital.js +37 -31
  326. package/dist/icons/contenticons/Hospitalized.js +37 -31
  327. package/dist/icons/contenticons/House.js +37 -31
  328. package/dist/icons/contenticons/Infant.js +37 -31
  329. package/dist/icons/contenticons/Information.js +37 -31
  330. package/dist/icons/contenticons/Injustice.js +37 -31
  331. package/dist/icons/contenticons/Institute.js +37 -31
  332. package/dist/icons/contenticons/Justice.js +37 -31
  333. package/dist/icons/contenticons/Laptop.js +37 -31
  334. package/dist/icons/contenticons/Leaflet.js +37 -31
  335. package/dist/icons/contenticons/Learner.js +37 -31
  336. package/dist/icons/contenticons/Levels.js +37 -31
  337. package/dist/icons/contenticons/LevelsDecreasing.js +37 -31
  338. package/dist/icons/contenticons/LevelsIncreasing.js +37 -31
  339. package/dist/icons/contenticons/LevelsStarred.js +37 -31
  340. package/dist/icons/contenticons/Maintenance.js +37 -31
  341. package/dist/icons/contenticons/Male.js +37 -31
  342. package/dist/icons/contenticons/Manikin.js +37 -31
  343. package/dist/icons/contenticons/ManikinCorrect.js +37 -31
  344. package/dist/icons/contenticons/ManikinError.js +37 -31
  345. package/dist/icons/contenticons/ManualMode.js +37 -31
  346. package/dist/icons/contenticons/MapPoint.js +37 -31
  347. package/dist/icons/contenticons/MaskLeak.js +37 -31
  348. package/dist/icons/contenticons/MedicalHistory.js +37 -31
  349. package/dist/icons/contenticons/MedicalRecord.js +37 -31
  350. package/dist/icons/contenticons/Medication.js +37 -31
  351. package/dist/icons/contenticons/Metronome.js +37 -31
  352. package/dist/icons/contenticons/MoodHappy.js +37 -31
  353. package/dist/icons/contenticons/MoodIndifferent.js +37 -31
  354. package/dist/icons/contenticons/MoodSad.js +37 -31
  355. package/dist/icons/contenticons/MoodVeryHappy.js +37 -31
  356. package/dist/icons/contenticons/MoodVerySad.js +37 -31
  357. package/dist/icons/contenticons/Newborn.js +37 -31
  358. package/dist/icons/contenticons/NoInterruption.js +37 -31
  359. package/dist/icons/contenticons/Note.js +37 -31
  360. package/dist/icons/contenticons/Pain.js +37 -31
  361. package/dist/icons/contenticons/Patient.js +37 -31
  362. package/dist/icons/contenticons/PatientAssignment.js +37 -31
  363. package/dist/icons/contenticons/PatientMonitor.js +37 -31
  364. package/dist/icons/contenticons/PatientStretcher.js +37 -31
  365. package/dist/icons/contenticons/PatientTransfer.js +37 -31
  366. package/dist/icons/contenticons/PatientTreatment.js +37 -31
  367. package/dist/icons/contenticons/Person.js +37 -31
  368. package/dist/icons/contenticons/PhysiologicalModel.js +37 -31
  369. package/dist/icons/contenticons/PieChart.js +37 -31
  370. package/dist/icons/contenticons/Pill.js +37 -31
  371. package/dist/icons/contenticons/Pregnant.js +37 -31
  372. package/dist/icons/contenticons/Print.js +37 -31
  373. package/dist/icons/contenticons/ProvidersOrders.js +37 -31
  374. package/dist/icons/contenticons/Pulse.js +37 -31
  375. package/dist/icons/contenticons/RQICart.js +37 -31
  376. package/dist/icons/contenticons/Rate.js +37 -31
  377. package/dist/icons/contenticons/RateTooFast.js +37 -31
  378. package/dist/icons/contenticons/RateTooSlow.js +37 -31
  379. package/dist/icons/contenticons/Recoil.js +37 -31
  380. package/dist/icons/contenticons/Ruler.js +37 -31
  381. package/dist/icons/contenticons/Screens.js +37 -31
  382. package/dist/icons/contenticons/Search.js +37 -31
  383. package/dist/icons/contenticons/Sepsis.js +37 -31
  384. package/dist/icons/contenticons/Settings.js +37 -31
  385. package/dist/icons/contenticons/Shock.js +37 -31
  386. package/dist/icons/contenticons/ShockAdvised.js +37 -31
  387. package/dist/icons/contenticons/ShockAutomated.js +37 -31
  388. package/dist/icons/contenticons/ShockNotAdvised.js +37 -31
  389. package/dist/icons/contenticons/Sleep.js +37 -31
  390. package/dist/icons/contenticons/Smartphone.js +37 -31
  391. package/dist/icons/contenticons/Speech.js +37 -31
  392. package/dist/icons/contenticons/SpeechBubble.js +37 -31
  393. package/dist/icons/contenticons/SpeechBubbles.js +37 -31
  394. package/dist/icons/contenticons/Star.js +37 -31
  395. package/dist/icons/contenticons/Stethoscope.js +37 -31
  396. package/dist/icons/contenticons/Stock.js +37 -31
  397. package/dist/icons/contenticons/Stopwatch.js +37 -31
  398. package/dist/icons/contenticons/Suitcase.js +37 -31
  399. package/dist/icons/contenticons/SwitchCamera.js +37 -31
  400. package/dist/icons/contenticons/SwitchRoles.js +37 -31
  401. package/dist/icons/contenticons/Tablet.js +37 -31
  402. package/dist/icons/contenticons/Talking.js +37 -31
  403. package/dist/icons/contenticons/TargetGroup.js +37 -31
  404. package/dist/icons/contenticons/TaskTrainer.js +37 -31
  405. package/dist/icons/contenticons/TeamLead.js +37 -31
  406. package/dist/icons/contenticons/TeamWork.js +37 -31
  407. package/dist/icons/contenticons/Terms.js +37 -31
  408. package/dist/icons/contenticons/TimelineReview.js +37 -31
  409. package/dist/icons/contenticons/Translation.js +37 -31
  410. package/dist/icons/contenticons/Trophy.js +37 -31
  411. package/dist/icons/contenticons/Trophy1st.js +37 -31
  412. package/dist/icons/contenticons/Trophy2nd.js +37 -31
  413. package/dist/icons/contenticons/Trophy3rd.js +37 -31
  414. package/dist/icons/contenticons/TrophyStar.js +37 -31
  415. package/dist/icons/contenticons/Truck.js +37 -31
  416. package/dist/icons/contenticons/TwoRescuerCPR.js +37 -31
  417. package/dist/icons/contenticons/USB.js +37 -31
  418. package/dist/icons/contenticons/Ultrasound.js +37 -31
  419. package/dist/icons/contenticons/VentilationLungs.js +37 -31
  420. package/dist/icons/contenticons/VentilationPressure.js +37 -31
  421. package/dist/icons/contenticons/VentilationVolume.js +37 -31
  422. package/dist/icons/contenticons/Video.js +37 -31
  423. package/dist/icons/contenticons/VideoRecording.js +37 -31
  424. package/dist/icons/contenticons/Visibility.js +37 -31
  425. package/dist/icons/contenticons/VitalSigns.js +37 -31
  426. package/dist/icons/contenticons/index.js +180 -179
  427. package/dist/icons/index.d.ts +1 -1
  428. package/dist/icons/index.js +67 -41
  429. package/dist/icons/systemicons/Accessibility.js +37 -31
  430. package/dist/icons/systemicons/Add.js +37 -31
  431. package/dist/icons/systemicons/AddUser.js +37 -31
  432. package/dist/icons/systemicons/Adult.js +37 -31
  433. package/dist/icons/systemicons/AedPads.js +37 -31
  434. package/dist/icons/systemicons/AedPadsCorrect.js +37 -31
  435. package/dist/icons/systemicons/AedPadsError.js +37 -31
  436. package/dist/icons/systemicons/Archive.js +37 -31
  437. package/dist/icons/systemicons/ArrowCollapse.js +37 -31
  438. package/dist/icons/systemicons/ArrowDropDown.js +37 -31
  439. package/dist/icons/systemicons/ArrowDropLeft.js +37 -31
  440. package/dist/icons/systemicons/ArrowDropRight.js +37 -31
  441. package/dist/icons/systemicons/ArrowDropUp.js +37 -31
  442. package/dist/icons/systemicons/ArrowExpand.js +37 -31
  443. package/dist/icons/systemicons/ArrowLineDown.js +37 -31
  444. package/dist/icons/systemicons/ArrowLineLeft.js +37 -31
  445. package/dist/icons/systemicons/ArrowLineRight.js +37 -31
  446. package/dist/icons/systemicons/ArrowLineUp.js +37 -31
  447. package/dist/icons/systemicons/ArrowStopLeft.js +37 -31
  448. package/dist/icons/systemicons/ArrowStopRight.js +37 -31
  449. package/dist/icons/systemicons/Assignments.js +37 -31
  450. package/dist/icons/systemicons/Asterisk.js +37 -31
  451. package/dist/icons/systemicons/Attachment.js +37 -31
  452. package/dist/icons/systemicons/Attention.js +37 -31
  453. package/dist/icons/systemicons/AudioDescriptionOn.js +37 -31
  454. package/dist/icons/systemicons/BackwardsFiveSec.js +37 -31
  455. package/dist/icons/systemicons/Battery0.js +37 -31
  456. package/dist/icons/systemicons/Battery1.js +37 -31
  457. package/dist/icons/systemicons/Battery2.js +37 -31
  458. package/dist/icons/systemicons/Battery3.js +37 -31
  459. package/dist/icons/systemicons/Battery4.js +37 -31
  460. package/dist/icons/systemicons/Battery5.js +37 -31
  461. package/dist/icons/systemicons/Battery6.js +37 -31
  462. package/dist/icons/systemicons/BatteryFull.js +37 -31
  463. package/dist/icons/systemicons/Bluetooth.js +37 -31
  464. package/dist/icons/systemicons/Book.js +37 -31
  465. package/dist/icons/systemicons/BookmarkAdd.js +37 -31
  466. package/dist/icons/systemicons/BookmarkCollection.js +37 -31
  467. package/dist/icons/systemicons/BookmarkOff.js +37 -31
  468. package/dist/icons/systemicons/BookmarkOn.js +37 -31
  469. package/dist/icons/systemicons/Bullet.js +37 -31
  470. package/dist/icons/systemicons/Calendar.js +37 -31
  471. package/dist/icons/systemicons/CheckMark.js +37 -31
  472. package/dist/icons/systemicons/CheckboxOff.js +37 -31
  473. package/dist/icons/systemicons/CheckboxOn.js +37 -31
  474. package/dist/icons/systemicons/CheckboxSemi.js +37 -31
  475. package/dist/icons/systemicons/ChevronDown.js +37 -31
  476. package/dist/icons/systemicons/ChevronLeft.js +37 -31
  477. package/dist/icons/systemicons/ChevronRight.js +37 -31
  478. package/dist/icons/systemicons/ChevronUp.js +37 -31
  479. package/dist/icons/systemicons/Child.js +37 -31
  480. package/dist/icons/systemicons/Clear.js +37 -31
  481. package/dist/icons/systemicons/Close.js +37 -31
  482. package/dist/icons/systemicons/ClosedCaptionOn.js +37 -31
  483. package/dist/icons/systemicons/Cloud.js +37 -31
  484. package/dist/icons/systemicons/CloudAttention.js +37 -31
  485. package/dist/icons/systemicons/CloudCheck.js +37 -31
  486. package/dist/icons/systemicons/CloudDownload.js +37 -31
  487. package/dist/icons/systemicons/CloudLocked.js +37 -31
  488. package/dist/icons/systemicons/CloudNoConnection.js +37 -31
  489. package/dist/icons/systemicons/CloudSyncing.js +37 -31
  490. package/dist/icons/systemicons/CloudUpload.js +37 -31
  491. package/dist/icons/systemicons/CoffeeBreak.js +37 -31
  492. package/dist/icons/systemicons/Copy.js +37 -31
  493. package/dist/icons/systemicons/Dashboard.js +37 -31
  494. package/dist/icons/systemicons/DecisionFlow.js +37 -31
  495. package/dist/icons/systemicons/Delete.js +37 -31
  496. package/dist/icons/systemicons/Document.js +39 -31
  497. package/dist/icons/systemicons/Download.js +37 -31
  498. package/dist/icons/systemicons/DragHandle.js +37 -31
  499. package/dist/icons/systemicons/DragIndicator.js +37 -31
  500. package/dist/icons/systemicons/Edit.js +37 -31
  501. package/dist/icons/systemicons/Educator.js +37 -31
  502. package/dist/icons/systemicons/Equals.js +37 -31
  503. package/dist/icons/systemicons/EventLog.js +37 -31
  504. package/dist/icons/systemicons/Export.js +37 -31
  505. package/dist/icons/systemicons/ExportCVS.js +37 -31
  506. package/dist/icons/systemicons/ExportDoc.js +37 -31
  507. package/dist/icons/systemicons/ExportEXL.js +37 -31
  508. package/dist/icons/systemicons/ExportJpg.js +37 -31
  509. package/dist/icons/systemicons/ExportPDF.js +37 -31
  510. package/dist/icons/systemicons/ExportPNG.js +37 -31
  511. package/dist/icons/systemicons/ExtendTextArea.js +37 -31
  512. package/dist/icons/systemicons/Facebook.js +37 -31
  513. package/dist/icons/systemicons/Filter.js +37 -31
  514. package/dist/icons/systemicons/Flickr.js +37 -31
  515. package/dist/icons/systemicons/Forward.js +37 -31
  516. package/dist/icons/systemicons/ForwardFiveSec.js +37 -31
  517. package/dist/icons/systemicons/ForwardSlash.js +37 -31
  518. package/dist/icons/systemicons/Fullscreen.js +37 -31
  519. package/dist/icons/systemicons/FullscreenExit.js +37 -31
  520. package/dist/icons/systemicons/GearSettings.js +37 -31
  521. package/dist/icons/systemicons/GridView.js +37 -31
  522. package/dist/icons/systemicons/Group.js +37 -31
  523. package/dist/icons/systemicons/GuidedTour.js +37 -31
  524. package/dist/icons/systemicons/HeartShock.js +37 -31
  525. package/dist/icons/systemicons/Help.js +37 -31
  526. package/dist/icons/systemicons/Hierarchy.js +37 -31
  527. package/dist/icons/systemicons/History.js +37 -31
  528. package/dist/icons/systemicons/Home.js +37 -31
  529. package/dist/icons/systemicons/Image.js +37 -31
  530. package/dist/icons/systemicons/Infant.js +37 -31
  531. package/dist/icons/systemicons/Information.js +37 -31
  532. package/dist/icons/systemicons/Institute.js +37 -31
  533. package/dist/icons/systemicons/Keyboard.js +37 -31
  534. package/dist/icons/systemicons/Language.js +37 -31
  535. package/dist/icons/systemicons/Learner.js +37 -31
  536. package/dist/icons/systemicons/Legend.js +37 -31
  537. package/dist/icons/systemicons/Legend1Circle.js +37 -31
  538. package/dist/icons/systemicons/Legend2Triangle.js +37 -31
  539. package/dist/icons/systemicons/Legend3Star.js +37 -31
  540. package/dist/icons/systemicons/Legend4Square.js +37 -31
  541. package/dist/icons/systemicons/Legend5Diamond.js +37 -31
  542. package/dist/icons/systemicons/Legend6Nabla.js +37 -31
  543. package/dist/icons/systemicons/Legend7Pentagon.js +37 -31
  544. package/dist/icons/systemicons/Legend8Rectangle.js +37 -31
  545. package/dist/icons/systemicons/LegendStrokeDashed.js +37 -31
  546. package/dist/icons/systemicons/LegendStrokeSolid.js +37 -31
  547. package/dist/icons/systemicons/LikeOff.js +37 -31
  548. package/dist/icons/systemicons/LikeOn.js +37 -31
  549. package/dist/icons/systemicons/Link.js +37 -31
  550. package/dist/icons/systemicons/LinkedIn.js +37 -31
  551. package/dist/icons/systemicons/ListView.js +37 -31
  552. package/dist/icons/systemicons/LoadingMedium.js +30 -8
  553. package/dist/icons/systemicons/LoadingSmall.js +30 -8
  554. package/dist/icons/systemicons/LockedOff.js +37 -31
  555. package/dist/icons/systemicons/LockedOn.js +37 -31
  556. package/dist/icons/systemicons/Login.js +37 -31
  557. package/dist/icons/systemicons/Logout.js +37 -31
  558. package/dist/icons/systemicons/Loop.js +37 -31
  559. package/dist/icons/systemicons/Mail.js +37 -31
  560. package/dist/icons/systemicons/Manikin.js +37 -31
  561. package/dist/icons/systemicons/MapPoint.js +37 -31
  562. package/dist/icons/systemicons/Menu.js +37 -31
  563. package/dist/icons/systemicons/Metronome.js +37 -31
  564. package/dist/icons/systemicons/Microphone.js +37 -31
  565. package/dist/icons/systemicons/Minus.js +37 -31
  566. package/dist/icons/systemicons/MoreHorizontal.js +37 -31
  567. package/dist/icons/systemicons/MoreVertical.js +37 -31
  568. package/dist/icons/systemicons/Notification.js +37 -31
  569. package/dist/icons/systemicons/NotificationNew.js +37 -31
  570. package/dist/icons/systemicons/OpenFolder.js +37 -31
  571. package/dist/icons/systemicons/OpenNewWindow.js +37 -31
  572. package/dist/icons/systemicons/OverView.js +37 -31
  573. package/dist/icons/systemicons/Pause.js +37 -31
  574. package/dist/icons/systemicons/PieChart.js +37 -31
  575. package/dist/icons/systemicons/Pin.js +37 -31
  576. package/dist/icons/systemicons/Play.js +37 -31
  577. package/dist/icons/systemicons/PlayList.js +37 -31
  578. package/dist/icons/systemicons/PlayOutline.js +37 -31
  579. package/dist/icons/systemicons/PlaybackSpeed.js +37 -31
  580. package/dist/icons/systemicons/Plus.js +37 -31
  581. package/dist/icons/systemicons/PointDown.js +37 -31
  582. package/dist/icons/systemicons/PointLeft.js +37 -31
  583. package/dist/icons/systemicons/PointRight.js +37 -31
  584. package/dist/icons/systemicons/PointUp.js +37 -31
  585. package/dist/icons/systemicons/Print.js +37 -31
  586. package/dist/icons/systemicons/RadioButtonOff.js +37 -31
  587. package/dist/icons/systemicons/RadioButtonOn.js +37 -31
  588. package/dist/icons/systemicons/Record.js +37 -31
  589. package/dist/icons/systemicons/Refresh.js +37 -31
  590. package/dist/icons/systemicons/Replay.js +37 -31
  591. package/dist/icons/systemicons/Rewind.js +37 -31
  592. package/dist/icons/systemicons/SUN.js +37 -31
  593. package/dist/icons/systemicons/Save.js +37 -31
  594. package/dist/icons/systemicons/Search.js +37 -31
  595. package/dist/icons/systemicons/SendTo.js +37 -31
  596. package/dist/icons/systemicons/Share.js +37 -31
  597. package/dist/icons/systemicons/Shock.js +37 -31
  598. package/dist/icons/systemicons/ShockAdvised.js +37 -31
  599. package/dist/icons/systemicons/ShockAutomated.js +37 -31
  600. package/dist/icons/systemicons/ShockNotAdvised.js +37 -31
  601. package/dist/icons/systemicons/ShoppingCart.js +37 -31
  602. package/dist/icons/systemicons/SkipForward.js +37 -31
  603. package/dist/icons/systemicons/Sort.js +37 -31
  604. package/dist/icons/systemicons/SpeechBuble.js +37 -31
  605. package/dist/icons/systemicons/StarFilled.js +37 -31
  606. package/dist/icons/systemicons/StarOutlined.js +37 -31
  607. package/dist/icons/systemicons/Stop.js +37 -31
  608. package/dist/icons/systemicons/Support.js +37 -31
  609. package/dist/icons/systemicons/SwitchApp.js +37 -31
  610. package/dist/icons/systemicons/Team.js +37 -31
  611. package/dist/icons/systemicons/TechnicalWarning.js +37 -31
  612. package/dist/icons/systemicons/ThumbsDown.js +37 -31
  613. package/dist/icons/systemicons/ThumbsUp.js +37 -31
  614. package/dist/icons/systemicons/Time.js +37 -31
  615. package/dist/icons/systemicons/TimeLimited.js +37 -31
  616. package/dist/icons/systemicons/Timeline.js +37 -31
  617. package/dist/icons/systemicons/Tip.js +37 -31
  618. package/dist/icons/systemicons/Transcript.js +37 -31
  619. package/dist/icons/systemicons/Translation.js +37 -31
  620. package/dist/icons/systemicons/Twitter.js +37 -31
  621. package/dist/icons/systemicons/Upload.js +37 -31
  622. package/dist/icons/systemicons/Usb.js +37 -31
  623. package/dist/icons/systemicons/User.js +37 -31
  624. package/dist/icons/systemicons/Video.js +37 -31
  625. package/dist/icons/systemicons/VisibleOff.js +37 -31
  626. package/dist/icons/systemicons/VisibleOn.js +37 -31
  627. package/dist/icons/systemicons/VolumeDown.js +37 -31
  628. package/dist/icons/systemicons/VolumeOff.js +37 -31
  629. package/dist/icons/systemicons/VolumeUp.js +37 -31
  630. package/dist/icons/systemicons/Youtube.js +37 -31
  631. package/dist/icons/systemicons/Zoom.js +37 -31
  632. package/dist/icons/systemicons/ZoomOut.js +37 -31
  633. package/dist/icons/systemicons/index.js +205 -204
  634. package/dist/index.js +46 -45
  635. package/dist/styles/WriteThemedColors.cjs +20 -0
  636. package/dist/styles/WriteThemedColors.cjs.map +1 -0
  637. package/dist/styles/WriteThemedColors.d.ts +3 -0
  638. package/dist/styles/WriteThemedColors.js +12 -0
  639. package/dist/styles/WriteThemedColors.js.map +1 -0
  640. package/dist/styles/breakpoints.js +7 -6
  641. package/dist/styles/colors.js +110 -89
  642. package/dist/styles/focus-styles.js +7 -9
  643. package/dist/styles/global.js +25 -13
  644. package/dist/styles/index.cjs +4 -4
  645. package/dist/styles/index.cjs.map +1 -1
  646. package/dist/styles/index.d.ts +2 -2
  647. package/dist/styles/index.js +18 -20
  648. package/dist/styles/index.js.map +1 -1
  649. package/dist/styles/overwritecolors.cjs +2 -2
  650. package/dist/styles/overwritecolors.cjs.map +1 -1
  651. package/dist/styles/overwritecolors.d.ts +2 -1
  652. package/dist/styles/overwritecolors.js +12 -12
  653. package/dist/styles/overwritecolors.js.map +1 -1
  654. package/dist/styles/shadowstyles.js +8 -7
  655. package/dist/styles/typography.d.ts +1 -1
  656. package/dist/styles/typography.js +279 -130
  657. package/dist/styles/z-indexes.js +17 -16
  658. package/dist/types.js +52 -51
  659. package/dist/utils/utils.js +4 -3
  660. package/package.json +1 -1
@@ -15,7 +15,7 @@ export declare const ToastActionButtons: import("styled-components").StyledCompo
15
15
  export declare const ToastCloseButton: import("styled-components").StyledComponent<"div", any, {}, never>;
16
16
  export declare const ToastTextContainer: import("styled-components").StyledComponent<"span", any, {}, never>;
17
17
  export declare const ToastIconContainer: import("styled-components").StyledComponent<"span", any, {}, never>;
18
- export declare type ToastOptions = {
18
+ export type ToastOptions = {
19
19
  /** Optional. Color of the toast. Defaults to 'BLACK' */
20
20
  color?: ToastColor;
21
21
  /** Optional. If set Toast will automatically close after delay. Defaults to 'true' */
@@ -37,7 +37,7 @@ export declare type ToastOptions = {
37
37
  /** Optional. Icon that will be shown on the left side of the Toast */
38
38
  icon?: React.ReactNode;
39
39
  };
40
- declare type Props = {
40
+ type Props = {
41
41
  remove?: any;
42
42
  content: any;
43
43
  options?: ToastOptions;
@@ -1,166 +1,241 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
- var _a, _b;
17
- import * as React from 'react';
18
- import styled, { keyframes } from 'styled-components';
19
- import { ToastActionType, ToastColor, ToastEntryDirection, ToastPosition } from '../types';
20
- import { BOXSHADOWS, COLORS } from '../styles';
21
- import { Size } from '../types';
22
- import { Button, IconButton } from '../Button';
23
- import { ComponentSStyling, ComponentTextStyle } from '../styles';
24
- import { HyperLinkDefaultStyling, HyperLinkInvertedStyling } from '../HyperLink';
25
- import { SystemIcons } from '../icons';
26
- var LoaderAnimationKeyframes = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n background-position: right;\n }\n 100% {\n background-position: left;\n }\n"], ["\n 0% {\n background-position: right;\n }\n 100% {\n background-position: left;\n }\n"])));
27
- var Loader = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n\n animation: ", " ", "ms cubic-bezier(0.18, 0.39, 0.35, 1);\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n"], ["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n\n animation: ", " ", "ms cubic-bezier(0.18, 0.39, 0.35, 1);\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n"])), LoaderAnimationKeyframes, function (props) { return props.duration; }, ToastColor[ToastColor.BLACK], COLORS.neutral_200, COLORS.neutral_800, ToastColor[ToastColor.WHITE], COLORS.neutral_400, COLORS.white, ToastColor[ToastColor.BLUE], COLORS.accent1_200, COLORS.accent1_600, ToastColor[ToastColor.GREEN], COLORS.correct_200, COLORS.correct_500, ToastColor[ToastColor.ORANGE], COLORS.warning_200, COLORS.warning_500, ToastColor[ToastColor.RED], COLORS.critical_200, COLORS.critical_500);
28
- export var ToastContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-shadow: ", ";\n border-radius: 4px;\n\n animation: ", " ", " ", ";\n transform: ", ";\n\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\n\n padding: 0 ", " ", " 16px;\n\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 16px;\n justify-content: left;\n\n position: relative;\n\n width: max-content;\n min-height: 48px;\n box-sizing: border-box;\n\n ", "\n\n & a {\n display: inline;\n ", "\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n color: ", ";\n\n & a {\n ", "\n }\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n"], ["\n box-shadow: ", ";\n border-radius: 4px;\n\n animation: ", " ", " ", ";\n transform: ", ";\n\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\n\n padding: 0 ", " ", " 16px;\n\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 16px;\n justify-content: left;\n\n position: relative;\n\n width: max-content;\n min-height: 48px;\n box-sizing: border-box;\n\n ", "\n\n & a {\n display: inline;\n ", "\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n color: ", ";\n\n & a {\n ", "\n }\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n"])), BOXSHADOWS.BOXSHADOW_L2, function (props) { return props.animation.keyframes; }, function (props) { return props.animation.duration; }, function (props) { return props.animation.bezier; }, function (props) { return props.animation.transform; }, function (props) { return (props.withClose ? '0' : '16px'); }, function (props) { return (props.withLoader ? '4px' : '0'); }, ComponentSStyling(ComponentTextStyle.Regular, COLORS.white), HyperLinkInvertedStyling, ToastColor[ToastColor.BLACK], COLORS.neutral_800, ToastColor[ToastColor.WHITE], COLORS.white, COLORS.black, HyperLinkDefaultStyling, ToastColor[ToastColor.BLUE], COLORS.accent1_600, ToastColor[ToastColor.GREEN], COLORS.correct_500, ToastColor[ToastColor.ORANGE], COLORS.warning_500, ToastColor[ToastColor.RED], COLORS.critical_500);
29
- export var ToastActionButtons = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n\n & .action {\n height: unset;\n }\n"], ["\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n\n & .action {\n height: unset;\n }\n"])));
30
- export var ToastCloseButton = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n & > button {\n margin-left: 16px;\n\n & svg {\n padding: 0;\n }\n }\n\n button svg path{\n fill: ", " !important;\n }\n\n &.", " {\n button svg path {\n fill: ", " !important;\n }\n }\n"], ["\n & > button {\n margin-left: 16px;\n\n & svg {\n padding: 0;\n }\n }\n\n button svg path{\n fill: ", " !important;\n }\n\n &.", " {\n button svg path {\n fill: ", " !important;\n }\n }\n"])), COLORS.white, ToastColor[ToastColor.WHITE], COLORS.neutral_600);
31
- export var ToastTextContainer = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-feature-settings: 'liga' off;\n width: 240px;\n display: flex;\n padding: 16px 0;\n"], ["\n font-feature-settings: 'liga' off;\n width: 240px;\n display: flex;\n padding: 16px 0;\n"])));
32
- export var ToastIconContainer = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-right: -8px;\n"], ["\n margin-right: -8px;\n"])));
33
- var DEFAULT_OPTIONS = {
34
- color: ToastColor.BLACK,
35
- autoClose: true,
36
- delay: 5000,
37
- showCloseButton: false,
38
- position: ToastPosition.TOPLEFT,
39
- enterFrom: ToastEntryDirection.TOP,
40
- };
41
- var Toast = function (_a) {
42
- var _b, _c, _d;
43
- var content = _a.content, remove = _a.remove, _e = _a.options, options = _e === void 0 ? DEFAULT_OPTIONS : _e, testId = _a.testId;
44
- if (!remove)
45
- throw new Error('remove function is required when rendering Toast. Make sure that you are using useToast hook and ToastProvider for rendering Toasts');
46
- var removeRef = React.useRef();
47
- removeRef.current = remove;
48
- var elementRef = React.useRef(null);
49
- var _f = React.useState(false), shouldRemove = _f[0], setShouldRemove = _f[1];
50
- var _g = React.useState({ width: 0, height: 0 }), dimensions = _g[0], setDimensions = _g[1];
51
- var opts = __assign(__assign({}, DEFAULT_OPTIONS), options);
52
- React.useEffect(function () {
53
- if (opts === null || opts === void 0 ? void 0 : opts.autoClose) {
54
- // @ts-ignore
55
- var id_1 = setTimeout(function () { return setShouldRemove(true); }, opts.delay);
56
- return function () { return clearTimeout(id_1); };
57
- }
58
- return undefined;
59
- }, []);
60
- React.useEffect(function () {
61
- if (shouldRemove) {
62
- // @ts-ignore
63
- var id_2 = setTimeout(function () { return removeRef.current(); }, 200);
64
- return function () { return clearTimeout(id_2); };
65
- }
66
- }, [shouldRemove]);
67
- React.useEffect(function () {
68
- var _a, _b;
69
- setDimensions({ height: (_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight, width: (_b = elementRef.current) === null || _b === void 0 ? void 0 : _b.clientWidth });
70
- }, []);
71
- var animation = animations[shouldRemove ? 'leave' : 'enter'];
72
- var direction = animation[(_b = opts.enterFrom) !== null && _b !== void 0 ? _b : ToastEntryDirection.TOP];
73
- var fromY = dimensions.height * direction.fromHeight;
74
- var toY = dimensions.height * direction.toHeight;
75
- var fromX = dimensions.width * direction.fromWidth;
76
- var toX = dimensions.width * direction.toWidth;
77
- var prop = {
78
- duration: animation.duration,
79
- bezier: animation.bezier,
80
- transform: "translateY(".concat(toY, ") translateX(").concat(toX, ")"),
81
- keyframes: keyframes(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n 0% {\n transform: translateY(", "px) translateX(", "px);\n }\n 100% {\n transform: translateY(", "px) translateX(", "px);\n }"], ["\n 0% {\n transform: translateY(", "px) translateX(", "px);\n }\n 100% {\n transform: translateY(", "px) translateX(", "px);\n }"])), fromY, fromX, toY, toX),
82
- };
83
- if (!dimensions.height) {
84
- prop = __assign(__assign({}, prop), {
85
- transform: 'translateY(-1000vh) translateX(-1000vw)',
86
- keyframes: keyframes(templateObject_9 || (templateObject_9 = __makeTemplateObject([""], [""]))),
87
- });
88
- }
89
- var theme = ToastColor[(_c = opts.color) !== null && _c !== void 0 ? _c : ToastColor.BLACK];
90
- if (!shouldRemove) {
91
- setTimeout(function () { var _a; return (_a = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
92
- }
93
- return (React.createElement(ToastContainer, { "data-testid": testId, animation: prop, ref: elementRef, withLoader: !!opts.autoClose, className: theme, withClose: !!opts.showCloseButton, tabIndex: -1 },
94
- opts.icon && React.createElement(ToastIconContainer, null, opts.icon),
95
- React.createElement(ToastTextContainer, { className: 'description' }, content),
96
- opts.action && (React.createElement(ToastActionButtons, null, opts.action.map(function (action, i) { return (React.createElement(Button, { size: Size.Small, variant: action.type === ToastActionType.SECONDARY ? 'secondary' : 'primary', colorTheme: opts.color !== ToastColor.WHITE ? 'dark' : 'teal', invertFocus: opts.color === ToastColor.BLACK, key: i, onClick: function () {
97
- setShouldRemove(true);
98
- action.handler();
99
- }, className: 'action' }, action.label)); }))),
100
- opts.showCloseButton && (React.createElement(ToastCloseButton, { className: "close-button ".concat(theme) },
101
- React.createElement(IconButton, { variant: 'secondary', shape: "circular", useTransparentBackground: true, invertFocus: opts.color === ToastColor.BLACK, action: function (event) { return setShouldRemove(true); } },
102
- React.createElement(SystemIcons.Close, { size: "24px", color: COLORS.neutral_600 })))),
103
- !!opts.autoClose && React.createElement(Loader, { className: "loader ".concat(theme), duration: (_d = opts.delay) !== null && _d !== void 0 ? _d : 0 })));
104
- };
105
- export default Toast;
106
- var animations = {
107
- enter: (_a = {
108
- bezier: 'cubic-bezier(0.22, 0.61, 0.35, 1)',
109
- duration: '300ms'
110
- },
111
- _a[ToastEntryDirection.TOP] = {
112
- fromHeight: -1,
113
- toHeight: 0,
114
- fromWidth: 0,
115
- toWidth: 0,
116
- },
117
- _a[ToastEntryDirection.BOTTOM] = {
118
- fromHeight: 1,
119
- toHeight: 0,
120
- fromWidth: 0,
121
- toWidth: 0,
122
- },
123
- _a[ToastEntryDirection.LEFT] = {
124
- fromHeight: 0,
125
- toHeight: 0,
126
- fromWidth: -1,
127
- toWidth: 0,
128
- },
129
- _a[ToastEntryDirection.RIGHT] = {
130
- fromHeight: 0,
131
- toHeight: 0,
132
- fromWidth: 1,
133
- toWidth: 0,
134
- },
135
- _a),
136
- leave: (_b = {
137
- bezier: 'cubic-bezier(0.5, 0.05, 0.67, 0.19)',
138
- duration: '205ms'
139
- },
140
- _b[ToastEntryDirection.TOP] = {
141
- fromHeight: 0,
142
- toHeight: -1,
143
- fromWidth: 0,
144
- toWidth: 0,
145
- },
146
- _b[ToastEntryDirection.BOTTOM] = {
147
- fromHeight: 0,
148
- toHeight: 1,
149
- fromWidth: 0,
150
- toWidth: 0,
151
- },
152
- _b[ToastEntryDirection.LEFT] = {
153
- fromHeight: 0,
154
- toHeight: 0,
155
- fromWidth: 0,
156
- toWidth: -1,
157
- },
158
- _b[ToastEntryDirection.RIGHT] = {
159
- fromHeight: 0,
160
- toHeight: 0,
161
- fromWidth: 0,
162
- toWidth: 1,
163
- },
164
- _b),
165
- };
166
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
4
+ import _pt from "prop-types";
5
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _enter, _leave;
6
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
+ import * as React from 'react';
9
+ import styled, { keyframes } from 'styled-components';
10
+ import { ToastActionType, ToastColor, ToastEntryDirection, ToastPosition } from '../types';
11
+ import { BOXSHADOWS, COLORS } from '../styles';
12
+ import { Size } from '../types';
13
+ import { Button, IconButton } from '../Button';
14
+ import { ComponentSStyling, ComponentTextStyle } from '../styles';
15
+ import { HyperLinkDefaultStyling, HyperLinkInvertedStyling } from '../HyperLink';
16
+ import { SystemIcons } from '../icons';
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ var LoaderAnimationKeyframes = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n background-position: right;\n }\n 100% {\n background-position: left;\n }\n"])));
20
+ var Loader = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n\n animation: ", " ", "ms cubic-bezier(0.18, 0.39, 0.35, 1);\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n\n &.", " {\n background: linear-gradient(to right, ", " 50%, ", " 50%) left;\n background-size: 200% 100%;\n }\n"])), LoaderAnimationKeyframes, function (props) {
21
+ return props.duration;
22
+ }, ToastColor[ToastColor.BLACK], COLORS.neutral_200, COLORS.neutral_800, ToastColor[ToastColor.WHITE], COLORS.neutral_400, COLORS.white, ToastColor[ToastColor.BLUE], COLORS.accent1_200, COLORS.accent1_600, ToastColor[ToastColor.GREEN], COLORS.correct_200, COLORS.correct_500, ToastColor[ToastColor.ORANGE], COLORS.warning_200, COLORS.warning_500, ToastColor[ToastColor.RED], COLORS.critical_200, COLORS.critical_500);
23
+ export var ToastContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n border-radius: 4px;\n\n animation: ", " ", " ", ";\n transform: ", ";\n\n transition: all 300ms cubic-bezier(0.64, 0.04, 0.35, 1);\n\n padding: 0 ", " ", " 16px;\n\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 16px;\n justify-content: left;\n\n position: relative;\n\n width: max-content;\n min-height: 48px;\n box-sizing: border-box;\n\n ", "\n\n & a {\n display: inline;\n ", "\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n color: ", ";\n\n & a {\n ", "\n }\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n\n &.", " {\n background-color: ", ";\n }\n"])), BOXSHADOWS.BOXSHADOW_L2, function (props) {
24
+ return props.animation.keyframes;
25
+ }, function (props) {
26
+ return props.animation.duration;
27
+ }, function (props) {
28
+ return props.animation.bezier;
29
+ }, function (props) {
30
+ return props.animation.transform;
31
+ }, function (props) {
32
+ return props.withClose ? '0' : '16px';
33
+ }, function (props) {
34
+ return props.withLoader ? '4px' : '0';
35
+ }, ComponentSStyling(ComponentTextStyle.Regular, COLORS.white), HyperLinkInvertedStyling, ToastColor[ToastColor.BLACK], COLORS.neutral_800, ToastColor[ToastColor.WHITE], COLORS.white, COLORS.black, HyperLinkDefaultStyling, ToastColor[ToastColor.BLUE], COLORS.accent1_600, ToastColor[ToastColor.GREEN], COLORS.correct_500, ToastColor[ToastColor.ORANGE], COLORS.warning_500, ToastColor[ToastColor.RED], COLORS.critical_500);
36
+ export var ToastActionButtons = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n\n & .action {\n height: unset;\n }\n"])));
37
+ export var ToastCloseButton = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n & > button {\n margin-left: 16px;\n\n & svg {\n padding: 0;\n }\n }\n\n button svg path{\n fill: ", " !important;\n }\n\n &.", " {\n button svg path {\n fill: ", " !important;\n }\n }\n"])), COLORS.white, ToastColor[ToastColor.WHITE], COLORS.neutral_600);
38
+ export var ToastTextContainer = styled.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-feature-settings: 'liga' off;\n width: 240px;\n display: flex;\n padding: 16px 0;\n"])));
39
+ export var ToastIconContainer = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: -8px;\n"])));
40
+ var DEFAULT_OPTIONS = {
41
+ color: ToastColor.BLACK,
42
+ autoClose: true,
43
+ delay: 5000,
44
+ showCloseButton: false,
45
+ position: ToastPosition.TOPLEFT,
46
+ enterFrom: ToastEntryDirection.TOP
47
+ };
48
+ var Toast = function Toast(_ref) {
49
+ var _opts$enterFrom, _opts$color, _opts$delay;
50
+ var content = _ref.content,
51
+ remove = _ref.remove,
52
+ _ref$options = _ref.options,
53
+ options = _ref$options === void 0 ? DEFAULT_OPTIONS : _ref$options,
54
+ testId = _ref.testId;
55
+ if (!remove) throw new Error('remove function is required when rendering Toast. Make sure that you are using useToast hook and ToastProvider for rendering Toasts');
56
+ var removeRef = React.useRef();
57
+ removeRef.current = remove;
58
+ var elementRef = React.useRef(null);
59
+ var _React$useState = React.useState(false),
60
+ _React$useState2 = _slicedToArray(_React$useState, 2),
61
+ shouldRemove = _React$useState2[0],
62
+ setShouldRemove = _React$useState2[1];
63
+ var _React$useState3 = React.useState({
64
+ width: 0,
65
+ height: 0
66
+ }),
67
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
68
+ dimensions = _React$useState4[0],
69
+ setDimensions = _React$useState4[1];
70
+ var opts = _objectSpread(_objectSpread({}, DEFAULT_OPTIONS), options);
71
+ React.useEffect(function () {
72
+ if (opts !== null && opts !== void 0 && opts.autoClose) {
73
+ // @ts-ignore
74
+ var id = setTimeout(function () {
75
+ return setShouldRemove(true);
76
+ }, opts.delay);
77
+ return function () {
78
+ return clearTimeout(id);
79
+ };
80
+ }
81
+ return undefined;
82
+ }, []);
83
+ React.useEffect(function () {
84
+ if (shouldRemove) {
85
+ // @ts-ignore
86
+ var id = setTimeout(function () {
87
+ return removeRef.current();
88
+ }, 200);
89
+ return function () {
90
+ return clearTimeout(id);
91
+ };
92
+ }
93
+ }, [shouldRemove]);
94
+ React.useEffect(function () {
95
+ var _elementRef$current, _elementRef$current2;
96
+ setDimensions({
97
+ height: (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.clientHeight,
98
+ width: (_elementRef$current2 = elementRef.current) === null || _elementRef$current2 === void 0 ? void 0 : _elementRef$current2.clientWidth
99
+ });
100
+ }, []);
101
+ var animation = animations[shouldRemove ? 'leave' : 'enter'];
102
+ var direction = animation[(_opts$enterFrom = opts.enterFrom) !== null && _opts$enterFrom !== void 0 ? _opts$enterFrom : ToastEntryDirection.TOP];
103
+ var fromY = dimensions.height * direction.fromHeight;
104
+ var toY = dimensions.height * direction.toHeight;
105
+ var fromX = dimensions.width * direction.fromWidth;
106
+ var toX = dimensions.width * direction.toWidth;
107
+ var prop = {
108
+ duration: animation.duration,
109
+ bezier: animation.bezier,
110
+ transform: "translateY(".concat(toY, ") translateX(").concat(toX, ")"),
111
+ keyframes: keyframes(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n 0% {\n transform: translateY(", "px) translateX(", "px);\n }\n 100% {\n transform: translateY(", "px) translateX(", "px);\n }"])), fromY, fromX, toY, toX)
112
+ };
113
+ if (!dimensions.height) {
114
+ prop = _objectSpread(_objectSpread({}, prop), {
115
+ transform: 'translateY(-1000vh) translateX(-1000vw)',
116
+ keyframes: keyframes(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""])))
117
+ });
118
+ }
119
+ var theme = ToastColor[(_opts$color = opts.color) !== null && _opts$color !== void 0 ? _opts$color : ToastColor.BLACK];
120
+ if (!shouldRemove) {
121
+ setTimeout(function () {
122
+ var _elementRef$current3;
123
+ return elementRef === null || elementRef === void 0 ? void 0 : (_elementRef$current3 = elementRef.current) === null || _elementRef$current3 === void 0 ? void 0 : _elementRef$current3.focus();
124
+ });
125
+ }
126
+ return /*#__PURE__*/_jsxs(ToastContainer, {
127
+ "data-testid": testId,
128
+ animation: prop,
129
+ ref: elementRef,
130
+ withLoader: !!opts.autoClose,
131
+ className: theme,
132
+ withClose: !!opts.showCloseButton,
133
+ tabIndex: -1,
134
+ children: [opts.icon && /*#__PURE__*/_jsx(ToastIconContainer, {
135
+ children: opts.icon
136
+ }), /*#__PURE__*/_jsx(ToastTextContainer, {
137
+ className: 'description',
138
+ children: content
139
+ }), opts.action && /*#__PURE__*/_jsx(ToastActionButtons, {
140
+ children: opts.action.map(function (action, i) {
141
+ return /*#__PURE__*/_jsx(Button, {
142
+ size: Size.Small,
143
+ variant: action.type === ToastActionType.SECONDARY ? 'secondary' : 'primary',
144
+ colorTheme: opts.color !== ToastColor.WHITE ? 'dark' : 'teal',
145
+ invertFocus: opts.color === ToastColor.BLACK,
146
+ onClick: function onClick() {
147
+ setShouldRemove(true);
148
+ action.handler();
149
+ },
150
+ className: 'action',
151
+ children: action.label
152
+ }, i);
153
+ })
154
+ }), opts.showCloseButton && /*#__PURE__*/_jsx(ToastCloseButton, {
155
+ className: "close-button ".concat(theme),
156
+ children: /*#__PURE__*/_jsx(IconButton, {
157
+ variant: 'secondary',
158
+ shape: "circular",
159
+ useTransparentBackground: true,
160
+ invertFocus: opts.color === ToastColor.BLACK,
161
+ action: function action(event) {
162
+ return setShouldRemove(true);
163
+ },
164
+ children: /*#__PURE__*/_jsx(SystemIcons.Close, {
165
+ size: "24px",
166
+ color: COLORS.neutral_600
167
+ })
168
+ })
169
+ }), !!opts.autoClose && /*#__PURE__*/_jsx(Loader, {
170
+ className: "loader ".concat(theme),
171
+ duration: (_opts$delay = opts.delay) !== null && _opts$delay !== void 0 ? _opts$delay : 0
172
+ })]
173
+ });
174
+ };
175
+ Toast.propTypes = {
176
+ remove: _pt.any,
177
+ content: _pt.any.isRequired,
178
+ options: _pt.shape({
179
+ autoClose: _pt.bool,
180
+ delay: _pt.number,
181
+ showCloseButton: _pt.bool,
182
+ action: _pt.arrayOf(_pt.shape({
183
+ label: _pt.string.isRequired,
184
+ handler: _pt.func.isRequired
185
+ })),
186
+ icon: _pt.node
187
+ }),
188
+ testId: _pt.string
189
+ };
190
+ export default Toast;
191
+ var animations = {
192
+ enter: (_enter = {
193
+ bezier: 'cubic-bezier(0.22, 0.61, 0.35, 1)',
194
+ duration: '300ms'
195
+ }, _defineProperty(_enter, ToastEntryDirection.TOP, {
196
+ fromHeight: -1,
197
+ toHeight: 0,
198
+ fromWidth: 0,
199
+ toWidth: 0
200
+ }), _defineProperty(_enter, ToastEntryDirection.BOTTOM, {
201
+ fromHeight: 1,
202
+ toHeight: 0,
203
+ fromWidth: 0,
204
+ toWidth: 0
205
+ }), _defineProperty(_enter, ToastEntryDirection.LEFT, {
206
+ fromHeight: 0,
207
+ toHeight: 0,
208
+ fromWidth: -1,
209
+ toWidth: 0
210
+ }), _defineProperty(_enter, ToastEntryDirection.RIGHT, {
211
+ fromHeight: 0,
212
+ toHeight: 0,
213
+ fromWidth: 1,
214
+ toWidth: 0
215
+ }), _enter),
216
+ leave: (_leave = {
217
+ bezier: 'cubic-bezier(0.5, 0.05, 0.67, 0.19)',
218
+ duration: '205ms'
219
+ }, _defineProperty(_leave, ToastEntryDirection.TOP, {
220
+ fromHeight: 0,
221
+ toHeight: -1,
222
+ fromWidth: 0,
223
+ toWidth: 0
224
+ }), _defineProperty(_leave, ToastEntryDirection.BOTTOM, {
225
+ fromHeight: 0,
226
+ toHeight: 1,
227
+ fromWidth: 0,
228
+ toWidth: 0
229
+ }), _defineProperty(_leave, ToastEntryDirection.LEFT, {
230
+ fromHeight: 0,
231
+ toHeight: 0,
232
+ fromWidth: 0,
233
+ toWidth: -1
234
+ }), _defineProperty(_leave, ToastEntryDirection.RIGHT, {
235
+ fromHeight: 0,
236
+ toHeight: 0,
237
+ fromWidth: 0,
238
+ toWidth: 1
239
+ }), _leave)
240
+ };
241
+ //# sourceMappingURL=Toast.js.map
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ToastOptions } from './Toast';
3
- export declare type ToastProviderProps = {
3
+ export type ToastProviderProps = {
4
4
  children?: any;
5
5
  };
6
6
  export interface toast {
@@ -8,7 +8,7 @@ export interface toast {
8
8
  id: string;
9
9
  content: any;
10
10
  }
11
- export declare type ToasterValueProps = {
11
+ export type ToasterValueProps = {
12
12
  toasts: toast[];
13
13
  addToast: (content: any, options: ToastOptions) => string;
14
14
  removeToast: (id: string) => void;