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

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 (655) 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/breakpoints.js +7 -6
  636. package/dist/styles/colors.js +110 -89
  637. package/dist/styles/focus-styles.js +7 -9
  638. package/dist/styles/global.js +25 -13
  639. package/dist/styles/index.cjs +2 -2
  640. package/dist/styles/index.cjs.map +1 -1
  641. package/dist/styles/index.d.ts +1 -1
  642. package/dist/styles/index.js +18 -20
  643. package/dist/styles/index.js.map +1 -1
  644. package/dist/styles/overwritecolors.cjs +2 -2
  645. package/dist/styles/overwritecolors.cjs.map +1 -1
  646. package/dist/styles/overwritecolors.d.ts +2 -1
  647. package/dist/styles/overwritecolors.js +12 -12
  648. package/dist/styles/overwritecolors.js.map +1 -1
  649. package/dist/styles/shadowstyles.js +8 -7
  650. package/dist/styles/typography.d.ts +1 -1
  651. package/dist/styles/typography.js +279 -130
  652. package/dist/styles/z-indexes.js +17 -16
  653. package/dist/types.js +52 -51
  654. package/dist/utils/utils.js +4 -3
  655. package/package.json +1 -1
@@ -1,101 +1,226 @@
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
- import * as React from 'react';
6
- import styled from 'styled-components';
7
- import { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';
8
- import { Button, IconButton } from '../Button';
9
- import { SystemIcons } from '../icons';
10
- import { BOXSHADOWS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXXSStyling, scrollBarStyling, Z_INDEXES } from '../styles';
11
- import { Position, Size } from '../types';
12
- export var PopoverContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n //height: ", ";\n min-width: ", ";\n border-radius: 4px;\n background: ", ";\n cursor: default;\n box-shadow: ", ";\n\n position: absolute; \n visibility: hidden;\n opacity: 0;\n z-index: ", ";\n\n ", "\n ", "\n\n ", "\n ", "\n\n &::after {\n ", "\n"], ["\n //height: ", ";\n min-width: ", ";\n border-radius: 4px;\n background: ", ";\n cursor: default;\n box-shadow: ", ";\n\n position: absolute; \n visibility: hidden;\n opacity: 0;\n z-index: ", ";\n\n ", "\n ", "\n\n ", "\n ", "\n\n &::after {\n ", "\n"])), function (props) { return (props.size === Size.Small ? '240px' : props.size === Size.Large ? '480px' : '360px'); }, function (props) { return (props.size === Size.Small ? '320px' : props.size === Size.Large ? '640px' : '480px'); }, COLORS.white, BOXSHADOWS.BOXSHADOW_CENTERED, Z_INDEXES.popover, function (props) { return (props.position == Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : ''); }, function (props) { return (props.position == Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : ''); }, function (props) { return (props.position == Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : ''); }, function (props) { return (props.position == Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : ''); }, function (props) { return (props.showArrowPointer ? renderArrowStyles(props.position) : ''); });
13
- export var PopoverTopSectionContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", ";\n display: flex;\n"], ["\n height: ", ";\n display: flex;\n"])), function (props) { return (props.size === Size.Small ? '56px' : props.size === Size.Large ? '72px' : '64px'); });
14
- export var PopoverMiddleSectionContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin: 8px;\n height: ", ";\n padding: ", ";\n overflow-y: auto;\n ", "\n"], ["\n margin: 8px;\n height: ", ";\n padding: ", ";\n overflow-y: auto;\n ", "\n"])), function (props) { return (props.size === Size.Small ? '104px' : props.size === Size.Large ? '304px' : '208px'); }, function (props) { return (props.size === Size.Small ? '0 8px' : props.size === Size.Large ? '0 16px' : '0 12px'); }, scrollBarStyling(Size.Small));
15
- export var PopoverBottomSectionContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: ", "; \n display: flex;\n\n .bottom-flex {\n flex: 1;\n }\n"], ["\n height: ", "; \n display: flex;\n\n .bottom-flex {\n flex: 1;\n }\n"])), function (props) { return (props.size === Size.Small ? '64px' : props.size === Size.Large ? '88px' : '72px'); });
16
- var TextContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin: ", ";\n flex-grow: 1;\n"], ["\n display: flex;\n flex-direction: column;\n margin: ", ";\n flex-grow: 1;\n"])), function (props) { return renderMargins(props.note, props.size); });
17
- var NoteContainer = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
18
- return props.size === Size.Small
19
- ? ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)
20
- : props.size === Size.Large
21
- ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)
22
- : ComponentXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600);
23
- });
24
- var LabelContainer = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
25
- return props.size === Size.Small
26
- ? ComponentSStyling(ComponentTextStyle.Bold, null)
27
- : props.size === Size.Large
28
- ? ComponentLStyling(ComponentTextStyle.Bold, null)
29
- : ComponentMStyling(ComponentTextStyle.Bold, null);
30
- });
31
- var CloseButtonContainer = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n margin: ", ";\n"], ["\n margin: ", ";\n"])), function (props) { return (props.size === Size.Small ? '4px 16px 4px 0' : props.size === Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0'); });
32
- var TextButtonContainer = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n margin: ", ";\n"], ["\n margin: ", ";\n"])), function (props) { return (props.size === Size.Small ? '8px 0 8px 16px' : props.size === Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px'); });
33
- var IconButtonContainer = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n margin: ", ";\n display: flex;\n"], ["\n margin: ", ";\n display: flex;\n"])), function (props) { return (props.size === Size.Small ? '8px 16px 8px 0' : props.size === Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0'); });
34
- export var PopoverWrapper = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n position: relative;\n\n .pointer-space {\n height: ", ";\n width: ", ";\n position: absolute;\n\n ", ";\n ", ";\n\n ", ";\n ", ";\n }\n\n ", "\n"], ["\n position: relative;\n\n .pointer-space {\n height: ", ";\n width: ", ";\n position: absolute;\n\n ", ";\n ", ";\n\n ", ";\n ", ";\n }\n\n ", "\n"])), function (props) { return (props.position === Position.Top || props.position === Position.Bottom ? '16px' : '100%'); }, function (props) { return (props.position === Position.Left || props.position === Position.Right ? '16px' : '100%'); }, function (props) { return (props.position === Position.Left ? 'right:100%; bottom: 0%' : ''); }, function (props) { return (props.position === Position.Right ? 'left:100%; bottom: 0%' : ''); }, function (props) { return (props.position === Position.Top ? 'bottom: 100%' : ''); }, function (props) { return (props.position === Position.Bottom ? 'top: 100%' : ''); }, function (props) {
35
- return props.showOnClick
36
- ? "".concat(PopoverContainer, " {\n visibility: ").concat(props.showPopover ? 'visible' : 'hidden', ";\n opacity: ").concat(props.showPopover ? '1' : '0', ";\n }\n cursor: pointer;")
37
- : "&:hover {\n ".concat(PopoverContainer, " {\n visibility: visible;\n opacity: 1;\n }\n }");
38
- });
39
- var renderMargins = function (isNotePresent, size) {
40
- if (isNotePresent) {
41
- return size === Size.Small ? '10px 16px' : size === Size.Large ? '14px 24px' : '12px 20px';
42
- }
43
- else {
44
- return size === Size.Small ? '18px 16px' : size === Size.Large ? '24px' : '20px';
45
- }
46
- };
47
- var renderArrowStyles = function (position) {
48
- if (position === Position.Bottom) {
49
- return "height: 0px;\n width: 0px;\n border-top: 16px solid transparent;\n border-right: 12px solid transparent;\n border-bottom: 16px solid rgb(255,255,255);\n border-left: 12px solid transparent;\n content: \"\";\n position: absolute;\n right: calc(50% - 12px);\n bottom: calc(100% - 1px);";
50
- }
51
- if (position === Position.Top) {
52
- return "height: 0px;\n width: 0px;\n border-top: 16px solid rgb(255,255,255);\n border-right: 12px solid transparent;\n border-bottom: 16px solid transparent;\n border-left: 12px solid transparent;\n content: \"\";\n position: absolute;\n right: calc(50% - 12px);\n top: calc(100% - 1px);";
53
- }
54
- if (position === Position.Left) {
55
- return "height: 0px;\n width: 0px;\n border-top: 12px solid transparent;\n border-right: 16px solid transparent;\n border-bottom: 12px solid transparent;\n border-left: 16px solid rgb(255,255,255);\n content: \"\";\n position: absolute;\n left: calc(100% - 1px);\n bottom: calc(50% - 12px);";
56
- }
57
- if (position === Position.Right) {
58
- return "height: 0px;\n width: 0px;\n border-top: 12px solid transparent;\n border-right: 16px solid rgb(255,255,255);\n border-bottom: 12px solid transparent;\n border-left: 16px solid transparent;\n content: \"\";\n position: absolute;\n right: calc(100% - 1px);\n bottom: calc(50% - 12px);";
59
- }
60
- };
61
- ;
62
- ;
63
- ;
64
- ;
65
- var Popover = function (_a) {
66
- var _b, _c;
67
- var _d = _a.size, size = _d === void 0 ? Size.Medium : _d, topSectionProps = _a.topSectionProps, bottomSectionProps = _a.bottomSectionProps, mainContent = _a.mainContent, children = _a.children, position = _a.position, _e = _a.showOnClick, showOnClick = _e === void 0 ? false : _e, _f = _a.showArrowPointer, showArrowPointer = _f === void 0 ? false : _f;
68
- var _g = React.useState(false), showPopover = _g[0], setShowPopover = _g[1];
69
- var popoverRef = React.useRef();
70
- React.useEffect(function () {
71
- var checkIfClickedOutside = function (e) {
72
- if (showPopover && popoverRef.current && !popoverRef.current.contains(e.target)) {
73
- setShowPopover(false);
74
- }
75
- };
76
- document.addEventListener('mousedown', checkIfClickedOutside);
77
- return function () {
78
- document.removeEventListener('mousedown', checkIfClickedOutside);
79
- };
80
- }, [showPopover]);
81
- return (React.createElement(PopoverWrapper, { position: position, showOnClick: showOnClick, showPopover: showPopover },
82
- React.createElement(PopoverContainer, { size: size, position: position, ref: popoverRef, showArrowPointer: showArrowPointer },
83
- !!topSectionProps && (React.createElement(PopoverTopSectionContainer, { size: size },
84
- React.createElement(TextContainer, { note: !!(topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.note), size: size },
85
- (topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.note) && React.createElement(NoteContainer, { size: size }, topSectionProps.note),
86
- React.createElement(LabelContainer, { size: size }, topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.text)),
87
- showOnClick && (React.createElement(CloseButtonContainer, { size: size, "data-testid": 'closeBtn' },
88
- React.createElement(IconButton, { action: function () { return setShowPopover(false); }, useTransparentBackground: true, iconColor: COLORS.neutral_600, variant: "secondary", shape: "circular" },
89
- React.createElement(SystemIcons.Close, null)))))),
90
- React.createElement(PopoverMiddleSectionContainer, { size: size }, mainContent),
91
- !!bottomSectionProps && (React.createElement(PopoverBottomSectionContainer, { size: size },
92
- !!((_b = bottomSectionProps === null || bottomSectionProps === void 0 ? void 0 : bottomSectionProps.textButton) === null || _b === void 0 ? void 0 : _b.icon) && (React.createElement(TextButtonContainer, { size: size, "data-testid": 'textBtn' },
93
- React.createElement(Button, { size: size, variant: "secondary", icon: bottomSectionProps.textButton.icon, onClick: bottomSectionProps.textButton.action }, bottomSectionProps.textButton.label))),
94
- React.createElement("div", { className: "bottom-flex" }),
95
- React.createElement(IconButtonContainer, { size: size, "data-testid": 'iconBtn' }, (_c = bottomSectionProps === null || bottomSectionProps === void 0 ? void 0 : bottomSectionProps.iconButtons) === null || _c === void 0 ? void 0 : _c.map(function (iconButton) { return (React.createElement(IconButton, { action: iconButton.action, variant: "secondary", shape: "circular", useTransparentBackground: true }, iconButton.icon)); }))))),
96
- React.createElement("div", { onClick: function () { return showOnClick && setShowPopover(!showPopover); } },
97
- children,
98
- React.createElement("div", { className: "pointer-space" }))));
99
- };
100
- export default Popover;
101
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
3
+ import _pt from "prop-types";
4
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
5
+ import * as React from 'react';
6
+ import styled from 'styled-components';
7
+ import { COLORS, ComponentTextStyle, ComponentXSStyling } from '..';
8
+ import { Button, IconButton } from '../Button';
9
+ import { SystemIcons } from '../icons';
10
+ import { BOXSHADOWS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXXSStyling, scrollBarStyling, Z_INDEXES } from '../styles';
11
+ import { Position, Size } from '../types';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ export var PopoverContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n //height: ", ";\n min-width: ", ";\n border-radius: 4px;\n background: ", ";\n cursor: default;\n box-shadow: ", ";\n\n position: absolute; \n visibility: hidden;\n opacity: 0;\n z-index: ", ";\n\n ", "\n ", "\n\n ", "\n ", "\n\n &::after {\n ", "\n"])), function (props) {
15
+ return props.size === Size.Small ? '240px' : props.size === Size.Large ? '480px' : '360px';
16
+ }, function (props) {
17
+ return props.size === Size.Small ? '320px' : props.size === Size.Large ? '640px' : '480px';
18
+ }, COLORS.white, BOXSHADOWS.BOXSHADOW_CENTERED, Z_INDEXES.popover, function (props) {
19
+ return props.position == Position.Bottom ? 'right: 50%; top: calc(100% + 16px); transform: translateX(50%);' : '';
20
+ }, function (props) {
21
+ return props.position == Position.Top ? 'right: 50%; bottom: calc(100% + 16px); transform: translateX(50%);' : '';
22
+ }, function (props) {
23
+ return props.position == Position.Left ? 'bottom: 50%; right: calc(100% + 16px); transform: translateY(50%);' : '';
24
+ }, function (props) {
25
+ return props.position == Position.Right ? 'bottom: 50%; left: calc(100% + 16px); transform: translateY(50%);' : '';
26
+ }, function (props) {
27
+ return props.showArrowPointer ? renderArrowStyles(props.position) : '';
28
+ });
29
+ export var PopoverTopSectionContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: ", ";\n display: flex;\n"])), function (props) {
30
+ return props.size === Size.Small ? '56px' : props.size === Size.Large ? '72px' : '64px';
31
+ });
32
+ export var PopoverMiddleSectionContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: 8px;\n height: ", ";\n padding: ", ";\n overflow-y: auto;\n ", "\n"])), function (props) {
33
+ return props.size === Size.Small ? '104px' : props.size === Size.Large ? '304px' : '208px';
34
+ }, function (props) {
35
+ return props.size === Size.Small ? '0 8px' : props.size === Size.Large ? '0 16px' : '0 12px';
36
+ }, scrollBarStyling(Size.Small));
37
+ export var PopoverBottomSectionContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: ", "; \n display: flex;\n\n .bottom-flex {\n flex: 1;\n }\n"])), function (props) {
38
+ return props.size === Size.Small ? '64px' : props.size === Size.Large ? '88px' : '72px';
39
+ });
40
+ var TextContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin: ", ";\n flex-grow: 1;\n"])), function (props) {
41
+ return renderMargins(props.note, props.size);
42
+ });
43
+ var NoteContainer = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
44
+ return props.size === Size.Small ? ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600) : props.size === Size.Large ? ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600) : ComponentXSStyling(ComponentTextStyle.Regular, COLORS.neutral_600);
45
+ });
46
+ var LabelContainer = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
47
+ return props.size === Size.Small ? ComponentSStyling(ComponentTextStyle.Bold, null) : props.size === Size.Large ? ComponentLStyling(ComponentTextStyle.Bold, null) : ComponentMStyling(ComponentTextStyle.Bold, null);
48
+ });
49
+ var CloseButtonContainer = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: ", ";\n"])), function (props) {
50
+ return props.size === Size.Small ? '4px 16px 4px 0' : props.size === Size.Large ? '12px 24px 12px 0' : '8px 20px 8px 0';
51
+ });
52
+ var TextButtonContainer = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: ", ";\n"])), function (props) {
53
+ return props.size === Size.Small ? '8px 0 8px 16px' : props.size === Size.Large ? '16px 0 16px 24px' : '12px 0 12px 20px';
54
+ });
55
+ var IconButtonContainer = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin: ", ";\n display: flex;\n"])), function (props) {
56
+ return props.size === Size.Small ? '8px 16px 8px 0' : props.size === Size.Large ? '16px 24px 16px 0' : '12px 20px 12px 0';
57
+ });
58
+ export var PopoverWrapper = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n\n .pointer-space {\n height: ", ";\n width: ", ";\n position: absolute;\n\n ", ";\n ", ";\n\n ", ";\n ", ";\n }\n\n ", "\n"])), function (props) {
59
+ return props.position === Position.Top || props.position === Position.Bottom ? '16px' : '100%';
60
+ }, function (props) {
61
+ return props.position === Position.Left || props.position === Position.Right ? '16px' : '100%';
62
+ }, function (props) {
63
+ return props.position === Position.Left ? 'right:100%; bottom: 0%' : '';
64
+ }, function (props) {
65
+ return props.position === Position.Right ? 'left:100%; bottom: 0%' : '';
66
+ }, function (props) {
67
+ return props.position === Position.Top ? 'bottom: 100%' : '';
68
+ }, function (props) {
69
+ return props.position === Position.Bottom ? 'top: 100%' : '';
70
+ }, function (props) {
71
+ return props.showOnClick ? "".concat(PopoverContainer, " {\n visibility: ").concat(props.showPopover ? 'visible' : 'hidden', ";\n opacity: ").concat(props.showPopover ? '1' : '0', ";\n }\n cursor: pointer;") : "&:hover {\n ".concat(PopoverContainer, " {\n visibility: visible;\n opacity: 1;\n }\n }");
72
+ });
73
+ var renderMargins = function renderMargins(isNotePresent, size) {
74
+ if (isNotePresent) {
75
+ return size === Size.Small ? '10px 16px' : size === Size.Large ? '14px 24px' : '12px 20px';
76
+ } else {
77
+ return size === Size.Small ? '18px 16px' : size === Size.Large ? '24px' : '20px';
78
+ }
79
+ };
80
+ var renderArrowStyles = function renderArrowStyles(position) {
81
+ if (position === Position.Bottom) {
82
+ return "height: 0px;\n width: 0px;\n border-top: 16px solid transparent;\n border-right: 12px solid transparent;\n border-bottom: 16px solid rgb(255,255,255);\n border-left: 12px solid transparent;\n content: \"\";\n position: absolute;\n right: calc(50% - 12px);\n bottom: calc(100% - 1px);";
83
+ }
84
+ if (position === Position.Top) {
85
+ return "height: 0px;\n width: 0px;\n border-top: 16px solid rgb(255,255,255);\n border-right: 12px solid transparent;\n border-bottom: 16px solid transparent;\n border-left: 12px solid transparent;\n content: \"\";\n position: absolute;\n right: calc(50% - 12px);\n top: calc(100% - 1px);";
86
+ }
87
+ if (position === Position.Left) {
88
+ return "height: 0px;\n width: 0px;\n border-top: 12px solid transparent;\n border-right: 16px solid transparent;\n border-bottom: 12px solid transparent;\n border-left: 16px solid rgb(255,255,255);\n content: \"\";\n position: absolute;\n left: calc(100% - 1px);\n bottom: calc(50% - 12px);";
89
+ }
90
+ if (position === Position.Right) {
91
+ return "height: 0px;\n width: 0px;\n border-top: 12px solid transparent;\n border-right: 16px solid rgb(255,255,255);\n border-bottom: 12px solid transparent;\n border-left: 16px solid transparent;\n content: \"\";\n position: absolute;\n right: calc(100% - 1px);\n bottom: calc(50% - 12px);";
92
+ }
93
+ };
94
+ ;
95
+ ;
96
+ ;
97
+ ;
98
+ var Popover = function Popover(_ref) {
99
+ var _bottomSectionProps$t, _bottomSectionProps$i;
100
+ var _ref$size = _ref.size,
101
+ size = _ref$size === void 0 ? Size.Medium : _ref$size,
102
+ topSectionProps = _ref.topSectionProps,
103
+ bottomSectionProps = _ref.bottomSectionProps,
104
+ mainContent = _ref.mainContent,
105
+ children = _ref.children,
106
+ position = _ref.position,
107
+ _ref$showOnClick = _ref.showOnClick,
108
+ showOnClick = _ref$showOnClick === void 0 ? false : _ref$showOnClick,
109
+ _ref$showArrowPointer = _ref.showArrowPointer,
110
+ showArrowPointer = _ref$showArrowPointer === void 0 ? false : _ref$showArrowPointer;
111
+ var _React$useState = React.useState(false),
112
+ _React$useState2 = _slicedToArray(_React$useState, 2),
113
+ showPopover = _React$useState2[0],
114
+ setShowPopover = _React$useState2[1];
115
+ var popoverRef = React.useRef();
116
+ React.useEffect(function () {
117
+ var checkIfClickedOutside = function checkIfClickedOutside(e) {
118
+ if (showPopover && popoverRef.current && !popoverRef.current.contains(e.target)) {
119
+ setShowPopover(false);
120
+ }
121
+ };
122
+ document.addEventListener('mousedown', checkIfClickedOutside);
123
+ return function () {
124
+ document.removeEventListener('mousedown', checkIfClickedOutside);
125
+ };
126
+ }, [showPopover]);
127
+ return /*#__PURE__*/_jsxs(PopoverWrapper, {
128
+ position: position,
129
+ showOnClick: showOnClick,
130
+ showPopover: showPopover,
131
+ children: [/*#__PURE__*/_jsxs(PopoverContainer, {
132
+ size: size,
133
+ position: position,
134
+ ref: popoverRef,
135
+ showArrowPointer: showArrowPointer,
136
+ children: [!!topSectionProps && /*#__PURE__*/_jsxs(PopoverTopSectionContainer, {
137
+ size: size,
138
+ children: [/*#__PURE__*/_jsxs(TextContainer, {
139
+ note: !!(topSectionProps !== null && topSectionProps !== void 0 && topSectionProps.note),
140
+ size: size,
141
+ children: [(topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.note) && /*#__PURE__*/_jsx(NoteContainer, {
142
+ size: size,
143
+ children: topSectionProps.note
144
+ }), /*#__PURE__*/_jsx(LabelContainer, {
145
+ size: size,
146
+ children: topSectionProps === null || topSectionProps === void 0 ? void 0 : topSectionProps.text
147
+ })]
148
+ }), showOnClick && /*#__PURE__*/_jsx(CloseButtonContainer, {
149
+ size: size,
150
+ "data-testid": 'closeBtn',
151
+ children: /*#__PURE__*/_jsx(IconButton, {
152
+ action: function action() {
153
+ return setShowPopover(false);
154
+ },
155
+ useTransparentBackground: true,
156
+ iconColor: COLORS.neutral_600,
157
+ variant: "secondary",
158
+ shape: "circular",
159
+ children: /*#__PURE__*/_jsx(SystemIcons.Close, {})
160
+ })
161
+ })]
162
+ }), /*#__PURE__*/_jsx(PopoverMiddleSectionContainer, {
163
+ size: size,
164
+ children: mainContent
165
+ }), !!bottomSectionProps && /*#__PURE__*/_jsxs(PopoverBottomSectionContainer, {
166
+ size: size,
167
+ children: [!!(bottomSectionProps !== null && bottomSectionProps !== void 0 && (_bottomSectionProps$t = bottomSectionProps.textButton) !== null && _bottomSectionProps$t !== void 0 && _bottomSectionProps$t.icon) && /*#__PURE__*/_jsx(TextButtonContainer, {
168
+ size: size,
169
+ "data-testid": 'textBtn',
170
+ children: /*#__PURE__*/_jsx(Button, {
171
+ size: size,
172
+ variant: "secondary",
173
+ icon: bottomSectionProps.textButton.icon,
174
+ onClick: bottomSectionProps.textButton.action,
175
+ children: bottomSectionProps.textButton.label
176
+ })
177
+ }), /*#__PURE__*/_jsx("div", {
178
+ className: "bottom-flex"
179
+ }), /*#__PURE__*/_jsx(IconButtonContainer, {
180
+ size: size,
181
+ "data-testid": 'iconBtn',
182
+ children: bottomSectionProps === null || bottomSectionProps === void 0 ? void 0 : (_bottomSectionProps$i = bottomSectionProps.iconButtons) === null || _bottomSectionProps$i === void 0 ? void 0 : _bottomSectionProps$i.map(function (iconButton) {
183
+ return /*#__PURE__*/_jsx(IconButton, {
184
+ action: iconButton.action,
185
+ variant: "secondary",
186
+ shape: "circular",
187
+ useTransparentBackground: true,
188
+ children: iconButton.icon
189
+ });
190
+ })
191
+ })]
192
+ })]
193
+ }), /*#__PURE__*/_jsxs("div", {
194
+ onClick: function onClick() {
195
+ return showOnClick && setShowPopover(!showPopover);
196
+ },
197
+ children: [children, /*#__PURE__*/_jsx("div", {
198
+ className: "pointer-space"
199
+ })]
200
+ })]
201
+ });
202
+ };
203
+ Popover.propTypes = {
204
+ topSectionProps: _pt.shape({
205
+ text: _pt.string.isRequired,
206
+ note: _pt.string
207
+ }),
208
+ bottomSectionProps: _pt.shape({
209
+ iconButtons: _pt.arrayOf(_pt.shape({
210
+ icon: _pt.node.isRequired,
211
+ action: _pt.func.isRequired,
212
+ label: _pt.string
213
+ })),
214
+ textButton: _pt.shape({
215
+ icon: _pt.node.isRequired,
216
+ action: _pt.func.isRequired,
217
+ label: _pt.string
218
+ })
219
+ }),
220
+ mainContent: _pt.node.isRequired,
221
+ children: _pt.node.isRequired,
222
+ showOnClick: _pt.bool.isRequired,
223
+ showArrowPointer: _pt.bool
224
+ };
225
+ export default Popover;
226
+ //# sourceMappingURL=Popover.js.map
@@ -1 +1,2 @@
1
- export { default as Popover } from './Popover';
1
+ export { default as Popover } from './Popover';
2
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare type ProfileButtonProps = {
2
+ export type ProfileButtonProps = {
3
3
  /**
4
4
  * Optional. The source URL of the profile picture.
5
5
  */
@@ -40,7 +40,7 @@ declare const ProfileButton: React.ForwardRefExoticComponent<{
40
40
  /**
41
41
  * Required. The handler function to be called when the button is clicked.
42
42
  */
43
- onClick: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent> | undefined) => void;
43
+ onClick: (event?: React.MouseEvent<HTMLButtonElement>) => void;
44
44
  /**
45
45
  * Optional. The variant of the notification dot. It can be 'positive' or 'critical'.
46
46
  */
@@ -1,52 +1,75 @@
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 __rest = (this && this.__rest) || function (s, e) {
17
- var t = {};
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
- t[p] = s[p];
20
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
- t[p[i]] = s[p[i]];
24
- }
25
- return t;
26
- };
27
- import * as React from 'react';
28
- import styled from 'styled-components';
29
- import { COLORS, IconButton, Size } from '..';
30
- import { IconButtonContentStyles, IconButtonStyledPrimary } from '../Button/Iconbutton';
31
- import { NotificationDot } from '../NotificationDot';
32
- import { BREAKPOINTS, ComponentS, ComponentTextStyle } from '../styles';
33
- var PortraitOverlay = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: ", ";\n opacity: 0;\n position: absolute;\n top: 0px;\n left: 0px;\n"], ["\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: ", ";\n opacity: 0;\n position: absolute;\n top: 0px;\n left: 0px;\n"])), COLORS.black);
34
- export var ProfileButtonContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 48px;\n height: 48px;\n display: inline;\n user-select: none;\n \n ", " {\n display: ", ";\n\n ", " {\n display: inline;\n }\n\n :disabled {\n img {\n filter: grayscale(100%);\n }\n\n ", " {\n background-color: ", ";\n\n svg, svg path {\n fill: ", ";\n }\n }\n }\n\n :hover:not(:disabled):not(:active),\n &.hover-state {\n ", " {\n opacity: 0.25;\n transition: opacity 100ms ease-in-out;\n }\n }\n\n :active:not(:disabled),\n &.active-state {\n ", " {\n opacity: 0.5;\n transition: opacity 0ms ease-in-out;\n }\n }\n }\n"], ["\n width: 48px;\n height: 48px;\n display: inline;\n user-select: none;\n \n ", " {\n display: ", ";\n\n ", " {\n display: inline;\n }\n\n :disabled {\n img {\n filter: grayscale(100%);\n }\n\n ", " {\n background-color: ", ";\n\n svg, svg path {\n fill: ", ";\n }\n }\n }\n\n :hover:not(:disabled):not(:active),\n &.hover-state {\n ", " {\n opacity: 0.25;\n transition: opacity 100ms ease-in-out;\n }\n }\n\n :active:not(:disabled),\n &.active-state {\n ", " {\n opacity: 0.5;\n transition: opacity 0ms ease-in-out;\n }\n }\n }\n"])), IconButtonStyledPrimary, function (props) { return (props.hideOnLowWidth ? 'none' : 'inline'); }, BREAKPOINTS.MEDIUM, IconButtonContentStyles, COLORS.neutral_100, COLORS.neutral_300, PortraitOverlay, PortraitOverlay);
35
- var NotificationContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n left: 30px;\n bottom: 30px;\n"], ["\n position: absolute;\n left: 30px;\n bottom: 30px;\n"])));
36
- var ImageWrapper = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 36px;\n height: 36px;\n position: relative;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n object-fit: cover;\n }\n"], ["\n width: 36px;\n height: 36px;\n position: relative;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n object-fit: cover;\n }\n"])));
37
- var ProfileButton = React.forwardRef(function (_a, ref) {
38
- var portraitSrc = _a.portraitSrc, icon = _a.icon, initials = _a.initials, onClick = _a.onClick, disabled = _a.disabled, notificationVariant = _a.notificationVariant, className = _a.className, tabIndex = _a.tabIndex, rest = __rest(_a, ["portraitSrc", "icon", "initials", "onClick", "disabled", "notificationVariant", "className", "tabIndex"]);
39
- var renderIcon = function () {
40
- return ((portraitSrc && (React.createElement(ImageWrapper, null,
41
- React.createElement("img", { src: portraitSrc }),
42
- React.createElement(PortraitOverlay, null)))) ||
43
- (initials && (React.createElement(ComponentS, { className: "initials", textStyle: ComponentTextStyle.Bold, color: disabled ? COLORS.neutral_300 : COLORS.white }, initials))) || React.createElement(React.Fragment, null, icon));
44
- };
45
- return (React.createElement(ProfileButtonContainer, null,
46
- React.createElement(IconButton, __assign({ ref: ref, className: className, disabled: disabled, action: onClick, variant: "primary", tabIndex: tabIndex, shape: "circular" }, rest),
47
- renderIcon(),
48
- notificationVariant && (React.createElement(NotificationContainer, null,
49
- React.createElement(NotificationDot, { size: Size.Medium, variant: notificationVariant }))))));
50
- });
51
- export default ProfileButton;
52
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
4
+ import _pt from "prop-types";
5
+ var _excluded = ["portraitSrc", "icon", "initials", "onClick", "disabled", "notificationVariant", "className", "tabIndex"];
6
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
7
+ 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; }
8
+ 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; }
9
+ import * as React from 'react';
10
+ import styled from 'styled-components';
11
+ import { COLORS, IconButton, Size } from '..';
12
+ import { IconButtonContentStyles, IconButtonStyledPrimary } from '../Button/Iconbutton';
13
+ import { NotificationDot } from '../NotificationDot';
14
+ import { BREAKPOINTS, ComponentS, ComponentTextStyle } from '../styles';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { Fragment as _Fragment } from "react/jsx-runtime";
18
+ var PortraitOverlay = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: ", ";\n opacity: 0;\n position: absolute;\n top: 0px;\n left: 0px;\n"])), COLORS.black);
19
+ export var ProfileButtonContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 48px;\n height: 48px;\n display: inline;\n user-select: none;\n \n ", " {\n display: ", ";\n\n ", " {\n display: inline;\n }\n\n :disabled {\n img {\n filter: grayscale(100%);\n }\n\n ", " {\n background-color: ", ";\n\n svg, svg path {\n fill: ", ";\n }\n }\n }\n\n :hover:not(:disabled):not(:active),\n &.hover-state {\n ", " {\n opacity: 0.25;\n transition: opacity 100ms ease-in-out;\n }\n }\n\n :active:not(:disabled),\n &.active-state {\n ", " {\n opacity: 0.5;\n transition: opacity 0ms ease-in-out;\n }\n }\n }\n"])), IconButtonStyledPrimary, function (props) {
20
+ return props.hideOnLowWidth ? 'none' : 'inline';
21
+ }, BREAKPOINTS.MEDIUM, IconButtonContentStyles, COLORS.neutral_100, COLORS.neutral_300, PortraitOverlay, PortraitOverlay);
22
+ var NotificationContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n left: 30px;\n bottom: 30px;\n"])));
23
+ var ImageWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 36px;\n height: 36px;\n position: relative;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n object-fit: cover;\n }\n"])));
24
+ var ProfileButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
25
+ var portraitSrc = _ref.portraitSrc,
26
+ icon = _ref.icon,
27
+ initials = _ref.initials,
28
+ onClick = _ref.onClick,
29
+ disabled = _ref.disabled,
30
+ notificationVariant = _ref.notificationVariant,
31
+ className = _ref.className,
32
+ tabIndex = _ref.tabIndex,
33
+ rest = _objectWithoutProperties(_ref, _excluded);
34
+ var renderIcon = function renderIcon() {
35
+ return portraitSrc && /*#__PURE__*/_jsxs(ImageWrapper, {
36
+ children: [/*#__PURE__*/_jsx("img", {
37
+ src: portraitSrc
38
+ }), /*#__PURE__*/_jsx(PortraitOverlay, {})]
39
+ }) || initials && /*#__PURE__*/_jsx(ComponentS, {
40
+ className: "initials",
41
+ textStyle: ComponentTextStyle.Bold,
42
+ color: disabled ? COLORS.neutral_300 : COLORS.white,
43
+ children: initials
44
+ }) || /*#__PURE__*/_jsx(_Fragment, {
45
+ children: icon
46
+ });
47
+ };
48
+ return /*#__PURE__*/_jsx(ProfileButtonContainer, {
49
+ children: /*#__PURE__*/_jsxs(IconButton, _objectSpread(_objectSpread({
50
+ ref: ref,
51
+ className: className,
52
+ disabled: disabled,
53
+ action: onClick,
54
+ variant: "primary",
55
+ tabIndex: tabIndex,
56
+ shape: "circular"
57
+ }, rest), {}, {
58
+ children: [renderIcon(), notificationVariant && /*#__PURE__*/_jsx(NotificationContainer, {
59
+ children: /*#__PURE__*/_jsx(NotificationDot, {
60
+ size: Size.Medium,
61
+ variant: notificationVariant
62
+ })
63
+ })]
64
+ }))
65
+ });
66
+ });
67
+ ProfileButton.propTypes = {
68
+ portraitSrc: _pt.string,
69
+ icon: _pt.node,
70
+ initials: _pt.string,
71
+ onClick: _pt.func.isRequired,
72
+ notificationVariant: _pt.oneOf(['positive', 'critical'])
73
+ };
74
+ export default ProfileButton;
75
+ //# sourceMappingURL=ProfileButton.js.map
@@ -1 +1,2 @@
1
- export { default as ProfileButton } from './ProfileButton';
1
+ export { default as ProfileButton } from './ProfileButton';
2
+ //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Size } from '..';
3
- export declare type QuizButtonProps = {
3
+ export type QuizButtonProps = {
4
4
  /**
5
5
  * Optional. The result type of the quiz button. Can be 'correct', 'incorrect', or 'partial'.
6
6
  */