@laerdal/life-react-components 1.6.0 → 1.7.0-dev.10

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 (381) hide show
  1. package/dist/Accordion/ContentAccordion.cjs +1 -1
  2. package/dist/Accordion/ContentAccordion.cjs.map +1 -1
  3. package/dist/Accordion/ContentAccordion.js +2 -2
  4. package/dist/Accordion/ContentAccordion.js.map +1 -1
  5. package/dist/Accordion/styles.cjs +1 -1
  6. package/dist/Accordion/styles.cjs.map +1 -1
  7. package/dist/Accordion/styles.js +2 -2
  8. package/dist/Accordion/styles.js.map +1 -1
  9. package/dist/Banners/Banner.cjs +21 -5
  10. package/dist/Banners/Banner.cjs.map +1 -1
  11. package/dist/Banners/Banner.js +20 -5
  12. package/dist/Banners/Banner.js.map +1 -1
  13. package/dist/Banners/styles.cjs +1 -1
  14. package/dist/Banners/styles.cjs.map +1 -1
  15. package/dist/Banners/styles.js +1 -1
  16. package/dist/Banners/styles.js.map +1 -1
  17. package/dist/Button/BackButton.cjs +2 -2
  18. package/dist/Button/BackButton.cjs.map +1 -1
  19. package/dist/Button/BackButton.js +3 -3
  20. package/dist/Button/BackButton.js.map +1 -1
  21. package/dist/Button/Button.cjs +8 -21
  22. package/dist/Button/Button.cjs.map +1 -1
  23. package/dist/Button/Button.d.ts +1 -0
  24. package/dist/Button/Button.js +9 -22
  25. package/dist/Button/Button.js.map +1 -1
  26. package/dist/Button/Iconbutton.cjs +26 -32
  27. package/dist/Button/Iconbutton.cjs.map +1 -1
  28. package/dist/Button/Iconbutton.d.ts +5 -0
  29. package/dist/Button/Iconbutton.js +23 -32
  30. package/dist/Button/Iconbutton.js.map +1 -1
  31. package/dist/Card/Card.cjs +28 -44
  32. package/dist/Card/Card.cjs.map +1 -1
  33. package/dist/Card/Card.d.ts +3 -11
  34. package/dist/Card/Card.js +26 -44
  35. package/dist/Card/Card.js.map +1 -1
  36. package/dist/Card/CardBottomSection.cjs +5 -12
  37. package/dist/Card/CardBottomSection.cjs.map +1 -1
  38. package/dist/Card/CardBottomSection.d.ts +1 -2
  39. package/dist/Card/CardBottomSection.js +6 -13
  40. package/dist/Card/CardBottomSection.js.map +1 -1
  41. package/dist/Card/CardMiddleSection.cjs +7 -18
  42. package/dist/Card/CardMiddleSection.cjs.map +1 -1
  43. package/dist/Card/CardMiddleSection.d.ts +0 -2
  44. package/dist/Card/CardMiddleSection.js +7 -17
  45. package/dist/Card/CardMiddleSection.js.map +1 -1
  46. package/dist/Card/CardTopSection.cjs +11 -14
  47. package/dist/Card/CardTopSection.cjs.map +1 -1
  48. package/dist/Card/CardTopSection.d.ts +2 -4
  49. package/dist/Card/CardTopSection.js +12 -15
  50. package/dist/Card/CardTopSection.js.map +1 -1
  51. package/dist/Card/index.cjs +1 -13
  52. package/dist/Card/index.cjs.map +1 -1
  53. package/dist/Card/index.d.ts +0 -1
  54. package/dist/Card/index.js +0 -1
  55. package/dist/Card/index.js.map +1 -1
  56. package/dist/Chips/ActionChip.cjs +22 -29
  57. package/dist/Chips/ActionChip.cjs.map +1 -1
  58. package/dist/Chips/ActionChip.js +24 -31
  59. package/dist/Chips/ActionChip.js.map +1 -1
  60. package/dist/Chips/ChipStyles.cjs +8 -22
  61. package/dist/Chips/ChipStyles.cjs.map +1 -1
  62. package/dist/Chips/ChipStyles.d.ts +2 -9
  63. package/dist/Chips/ChipStyles.js +5 -14
  64. package/dist/Chips/ChipStyles.js.map +1 -1
  65. package/dist/Chips/ChipTypes.d.ts +12 -26
  66. package/dist/Chips/ChoiceChips.cjs +14 -8
  67. package/dist/Chips/ChoiceChips.cjs.map +1 -1
  68. package/dist/Chips/ChoiceChips.js +14 -9
  69. package/dist/Chips/ChoiceChips.js.map +1 -1
  70. package/dist/Chips/FilterChip.cjs +22 -29
  71. package/dist/Chips/FilterChip.cjs.map +1 -1
  72. package/dist/Chips/FilterChip.js +25 -32
  73. package/dist/Chips/FilterChip.js.map +1 -1
  74. package/dist/Chips/InputChip.cjs +45 -45
  75. package/dist/Chips/InputChip.cjs.map +1 -1
  76. package/dist/Chips/InputChip.js +47 -46
  77. package/dist/Chips/InputChip.js.map +1 -1
  78. package/dist/Chips/index.cjs +1 -1
  79. package/dist/Chips/index.cjs.map +1 -1
  80. package/dist/Chips/index.d.ts +1 -1
  81. package/dist/Chips/index.js +1 -1
  82. package/dist/Chips/index.js.map +1 -1
  83. package/dist/ChipsInput/ChipDropdownInput.cjs +398 -0
  84. package/dist/ChipsInput/ChipDropdownInput.cjs.map +1 -0
  85. package/dist/ChipsInput/ChipDropdownInput.d.ts +22 -0
  86. package/dist/ChipsInput/ChipDropdownInput.js +382 -0
  87. package/dist/ChipsInput/ChipDropdownInput.js.map +1 -0
  88. package/dist/ChipsInput/ChipInput.cjs +141 -0
  89. package/dist/ChipsInput/ChipInput.cjs.map +1 -0
  90. package/dist/{Chips → ChipsInput}/ChipInput.d.ts +1 -4
  91. package/dist/ChipsInput/ChipInput.js +122 -0
  92. package/dist/ChipsInput/ChipInput.js.map +1 -0
  93. package/dist/ChipsInput/ChipInputField.cjs +193 -0
  94. package/dist/ChipsInput/ChipInputField.cjs.map +1 -0
  95. package/dist/ChipsInput/ChipInputField.d.ts +24 -0
  96. package/dist/ChipsInput/ChipInputField.js +158 -0
  97. package/dist/ChipsInput/ChipInputField.js.map +1 -0
  98. package/dist/ChipsInput/ChipInputTypes.cjs +6 -0
  99. package/dist/ChipsInput/ChipInputTypes.cjs.map +1 -0
  100. package/dist/ChipsInput/ChipInputTypes.d.ts +22 -0
  101. package/dist/ChipsInput/ChipInputTypes.js +2 -0
  102. package/dist/ChipsInput/ChipInputTypes.js.map +1 -0
  103. package/dist/ChipsInput/index.cjs +19 -0
  104. package/dist/ChipsInput/index.cjs.map +1 -0
  105. package/dist/ChipsInput/index.d.ts +1 -0
  106. package/dist/ChipsInput/index.js +2 -0
  107. package/dist/ChipsInput/index.js.map +1 -0
  108. package/dist/Dropdown/BasicDropdown.cjs +1 -0
  109. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  110. package/dist/Dropdown/BasicDropdown.js +2 -1
  111. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  112. package/dist/Dropdown/CommonStyling.cjs +7 -5
  113. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  114. package/dist/Dropdown/CommonStyling.js +7 -6
  115. package/dist/Dropdown/CommonStyling.js.map +1 -1
  116. package/dist/Dropdown/DropdownContent.cjs +19 -24
  117. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  118. package/dist/Dropdown/DropdownContent.js +20 -25
  119. package/dist/Dropdown/DropdownContent.js.map +1 -1
  120. package/dist/Dropdown/index.cjs +0 -8
  121. package/dist/Dropdown/index.cjs.map +1 -1
  122. package/dist/Dropdown/index.d.ts +1 -2
  123. package/dist/Dropdown/index.js +1 -2
  124. package/dist/Dropdown/index.js.map +1 -1
  125. package/dist/Footer/Components/FooterDropdownLinks.cjs +6 -3
  126. package/dist/Footer/Components/FooterDropdownLinks.cjs.map +1 -1
  127. package/dist/Footer/Components/FooterDropdownLinks.js +6 -4
  128. package/dist/Footer/Components/FooterDropdownLinks.js.map +1 -1
  129. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +5 -3
  130. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  131. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +5 -4
  132. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  133. package/dist/Footer/Components/FooterTop.cjs +2 -1
  134. package/dist/Footer/Components/FooterTop.cjs.map +1 -1
  135. package/dist/Footer/Components/FooterTop.js +3 -2
  136. package/dist/Footer/Components/FooterTop.js.map +1 -1
  137. package/dist/GlobalNavigationBar/Avatar.cjs +5 -7
  138. package/dist/GlobalNavigationBar/Avatar.cjs.map +1 -1
  139. package/dist/GlobalNavigationBar/Avatar.js +5 -8
  140. package/dist/GlobalNavigationBar/Avatar.js.map +1 -1
  141. package/dist/GlobalNavigationBar/Logo.cjs +9 -6
  142. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  143. package/dist/GlobalNavigationBar/Logo.d.ts +2 -1
  144. package/dist/GlobalNavigationBar/Logo.js +9 -7
  145. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  146. package/dist/GlobalNavigationBar/MainMenu.cjs +11 -13
  147. package/dist/GlobalNavigationBar/MainMenu.cjs.map +1 -1
  148. package/dist/GlobalNavigationBar/MainMenu.js +10 -13
  149. package/dist/GlobalNavigationBar/MainMenu.js.map +1 -1
  150. package/dist/GlobalNavigationBar/RightSideNav.cjs +3 -5
  151. package/dist/GlobalNavigationBar/RightSideNav.cjs.map +1 -1
  152. package/dist/GlobalNavigationBar/RightSideNav.js +2 -5
  153. package/dist/GlobalNavigationBar/RightSideNav.js.map +1 -1
  154. package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.cjs +3 -1
  155. package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.cjs.map +1 -1
  156. package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.js +2 -1
  157. package/dist/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -1
  158. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs +1 -1
  159. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs.map +1 -1
  160. package/dist/GlobalNavigationBar/mobile/CommonStyles.js +2 -2
  161. package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  162. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +1 -1
  163. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
  164. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +2 -2
  165. package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  166. package/dist/HyperLink/HyperLink.cjs +3 -1
  167. package/dist/HyperLink/HyperLink.cjs.map +1 -1
  168. package/dist/HyperLink/HyperLink.d.ts +4 -0
  169. package/dist/HyperLink/HyperLink.js +1 -1
  170. package/dist/HyperLink/HyperLink.js.map +1 -1
  171. package/dist/HyperLink/styling.cjs +1 -1
  172. package/dist/HyperLink/styling.cjs.map +1 -1
  173. package/dist/HyperLink/styling.js +1 -1
  174. package/dist/HyperLink/styling.js.map +1 -1
  175. package/dist/Image/ImageWithFallbacks.cjs +122 -0
  176. package/dist/Image/ImageWithFallbacks.cjs.map +1 -0
  177. package/dist/Image/ImageWithFallbacks.d.ts +21 -0
  178. package/dist/Image/ImageWithFallbacks.js +109 -0
  179. package/dist/Image/ImageWithFallbacks.js.map +1 -0
  180. package/dist/Image/index.cjs +16 -0
  181. package/dist/Image/index.cjs.map +1 -0
  182. package/dist/Image/index.d.ts +2 -0
  183. package/dist/Image/index.js +3 -0
  184. package/dist/Image/index.js.map +1 -0
  185. package/dist/InputFields/Checkbox.cjs +2 -2
  186. package/dist/InputFields/Checkbox.cjs.map +1 -1
  187. package/dist/InputFields/Checkbox.js +3 -3
  188. package/dist/InputFields/Checkbox.js.map +1 -1
  189. package/dist/InputFields/DatepickerField.cjs +57 -19
  190. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  191. package/dist/InputFields/DatepickerField.js +56 -19
  192. package/dist/InputFields/DatepickerField.js.map +1 -1
  193. package/dist/InputFields/QuickSearch.cjs +119 -96
  194. package/dist/InputFields/QuickSearch.cjs.map +1 -1
  195. package/dist/InputFields/QuickSearch.js +119 -96
  196. package/dist/InputFields/QuickSearch.js.map +1 -1
  197. package/dist/InputFields/RadioButton.cjs +2 -2
  198. package/dist/InputFields/RadioButton.cjs.map +1 -1
  199. package/dist/InputFields/RadioButton.js +3 -3
  200. package/dist/InputFields/RadioButton.js.map +1 -1
  201. package/dist/InputFields/SearchBar.cjs +3 -3
  202. package/dist/InputFields/SearchBar.cjs.map +1 -1
  203. package/dist/InputFields/SearchBar.js +3 -3
  204. package/dist/InputFields/SearchBar.js.map +1 -1
  205. package/dist/InputFields/Textarea.cjs +1 -1
  206. package/dist/InputFields/Textarea.cjs.map +1 -1
  207. package/dist/InputFields/Textarea.js +1 -1
  208. package/dist/InputFields/Textarea.js.map +1 -1
  209. package/dist/InputFields/components/SearchBarInput.cjs +6 -8
  210. package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
  211. package/dist/InputFields/components/SearchBarInput.d.ts +0 -3
  212. package/dist/InputFields/components/SearchBarInput.js +4 -5
  213. package/dist/InputFields/components/SearchBarInput.js.map +1 -1
  214. package/dist/InputFields/components/SearchField.cjs +29 -19
  215. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  216. package/dist/InputFields/components/SearchField.d.ts +8 -8
  217. package/dist/InputFields/components/SearchField.js +25 -18
  218. package/dist/InputFields/components/SearchField.js.map +1 -1
  219. package/dist/InputFields/styling.cjs +6 -8
  220. package/dist/InputFields/styling.cjs.map +1 -1
  221. package/dist/InputFields/styling.js +7 -8
  222. package/dist/InputFields/styling.js.map +1 -1
  223. package/dist/List/ListRow.cjs +5 -5
  224. package/dist/List/ListRow.cjs.map +1 -1
  225. package/dist/List/ListRow.js +8 -5
  226. package/dist/List/ListRow.js.map +1 -1
  227. package/dist/MenuItem/MenuItem.cjs +1 -0
  228. package/dist/MenuItem/MenuItem.cjs.map +1 -1
  229. package/dist/MenuItem/MenuItem.js +2 -1
  230. package/dist/MenuItem/MenuItem.js.map +1 -1
  231. package/dist/Modals/ModalContainer.cjs +79 -38
  232. package/dist/Modals/ModalContainer.cjs.map +1 -1
  233. package/dist/Modals/ModalContainer.d.ts +15 -8
  234. package/dist/Modals/ModalContainer.js +80 -37
  235. package/dist/Modals/ModalContainer.js.map +1 -1
  236. package/dist/Modals/ModalContent.cjs +234 -0
  237. package/dist/Modals/ModalContent.cjs.map +1 -0
  238. package/dist/Modals/ModalContent.d.ts +17 -0
  239. package/dist/Modals/ModalContent.js +203 -0
  240. package/dist/Modals/ModalContent.js.map +1 -0
  241. package/dist/Modals/ModalDialog.cjs +69 -42
  242. package/dist/Modals/ModalDialog.cjs.map +1 -1
  243. package/dist/Modals/ModalDialog.d.ts +6 -2
  244. package/dist/Modals/ModalDialog.js +71 -42
  245. package/dist/Modals/ModalDialog.js.map +1 -1
  246. package/dist/Modals/ModalStyles.cjs +14 -8
  247. package/dist/Modals/ModalStyles.cjs.map +1 -1
  248. package/dist/Modals/ModalStyles.d.ts +2 -0
  249. package/dist/Modals/ModalStyles.js +12 -7
  250. package/dist/Modals/ModalStyles.js.map +1 -1
  251. package/dist/Modals/ModalTypes.d.ts +5 -0
  252. package/dist/Modals/index.cjs +8 -0
  253. package/dist/Modals/index.cjs.map +1 -1
  254. package/dist/Modals/index.d.ts +3 -2
  255. package/dist/Modals/index.js +2 -1
  256. package/dist/Modals/index.js.map +1 -1
  257. package/dist/NavItem/NavItem.cjs +1 -1
  258. package/dist/NavItem/NavItem.cjs.map +1 -1
  259. package/dist/NavItem/NavItem.js +2 -2
  260. package/dist/NavItem/NavItem.js.map +1 -1
  261. package/dist/Paginator/Paginator.cjs +1 -1
  262. package/dist/Paginator/Paginator.cjs.map +1 -1
  263. package/dist/Paginator/Paginator.js +2 -2
  264. package/dist/Paginator/Paginator.js.map +1 -1
  265. package/dist/QuizButton/QuizButton.cjs +4 -8
  266. package/dist/QuizButton/QuizButton.cjs.map +1 -1
  267. package/dist/QuizButton/QuizButton.js +5 -9
  268. package/dist/QuizButton/QuizButton.js.map +1 -1
  269. package/dist/SegmentControl/SegmentControl.cjs +1 -1
  270. package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
  271. package/dist/SegmentControl/SegmentControl.js +2 -2
  272. package/dist/SegmentControl/SegmentControl.js.map +1 -1
  273. package/dist/SkipToContent/SkipToContent.cjs +2 -2
  274. package/dist/SkipToContent/SkipToContent.cjs.map +1 -1
  275. package/dist/SkipToContent/SkipToContent.js +2 -2
  276. package/dist/SkipToContent/SkipToContent.js.map +1 -1
  277. package/dist/Switcher/MobileSwitcherMenu.cjs +3 -1
  278. package/dist/Switcher/MobileSwitcherMenu.cjs.map +1 -1
  279. package/dist/Switcher/MobileSwitcherMenu.js +2 -1
  280. package/dist/Switcher/MobileSwitcherMenu.js.map +1 -1
  281. package/dist/Switcher/SwitcherMenuItem.cjs +1 -1
  282. package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
  283. package/dist/Switcher/SwitcherMenuItem.js +2 -2
  284. package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
  285. package/dist/Table/TableStyles.cjs +4 -4
  286. package/dist/Table/TableStyles.cjs.map +1 -1
  287. package/dist/Table/TableStyles.js +5 -5
  288. package/dist/Table/TableStyles.js.map +1 -1
  289. package/dist/Tabs/HorizontalTabs.cjs +5 -1
  290. package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
  291. package/dist/Tabs/HorizontalTabs.js +6 -3
  292. package/dist/Tabs/HorizontalTabs.js.map +1 -1
  293. package/dist/Tabs/TabLink.cjs +48 -45
  294. package/dist/Tabs/TabLink.cjs.map +1 -1
  295. package/dist/Tabs/TabLink.js +47 -46
  296. package/dist/Tabs/TabLink.js.map +1 -1
  297. package/dist/Tabs/VerticalTabs.cjs.map +1 -1
  298. package/dist/Tabs/VerticalTabs.js.map +1 -1
  299. package/dist/Tag/Tag.cjs +5 -2
  300. package/dist/Tag/Tag.cjs.map +1 -1
  301. package/dist/Tag/Tag.js +5 -2
  302. package/dist/Tag/Tag.js.map +1 -1
  303. package/dist/Toasters/Toast.cjs +2 -0
  304. package/dist/Toasters/Toast.cjs.map +1 -1
  305. package/dist/Toasters/Toast.js +2 -0
  306. package/dist/Toasters/Toast.js.map +1 -1
  307. package/dist/Toggles/ToggleButton.cjs +81 -0
  308. package/dist/Toggles/ToggleButton.cjs.map +1 -0
  309. package/dist/Toggles/ToggleButton.d.ts +14 -0
  310. package/dist/Toggles/ToggleButton.js +59 -0
  311. package/dist/Toggles/ToggleButton.js.map +1 -0
  312. package/dist/Toggles/ToggleSwitch.cjs +8 -6
  313. package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
  314. package/dist/Toggles/ToggleSwitch.js +8 -6
  315. package/dist/Toggles/ToggleSwitch.js.map +1 -1
  316. package/dist/Toggles/TogglerStyles.cjs +2 -2
  317. package/dist/Toggles/TogglerStyles.cjs.map +1 -1
  318. package/dist/Toggles/TogglerStyles.js +3 -3
  319. package/dist/Toggles/TogglerStyles.js.map +1 -1
  320. package/dist/Toggles/index.cjs +8 -0
  321. package/dist/Toggles/index.cjs.map +1 -1
  322. package/dist/Toggles/index.d.ts +2 -1
  323. package/dist/Toggles/index.js +2 -1
  324. package/dist/Toggles/index.js.map +1 -1
  325. package/dist/Tooltips/TooltipStyles.cjs +2 -2
  326. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  327. package/dist/Tooltips/TooltipStyles.js +3 -3
  328. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  329. package/dist/Tooltips/TooltipTypes.cjs.map +1 -1
  330. package/dist/Tooltips/TooltipTypes.d.ts +1 -0
  331. package/dist/Tooltips/TooltipTypes.js.map +1 -1
  332. package/dist/Tooltips/TooltipWrapper.cjs +2 -0
  333. package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
  334. package/dist/Tooltips/TooltipWrapper.d.ts +1 -1
  335. package/dist/Tooltips/TooltipWrapper.js +2 -0
  336. package/dist/Tooltips/TooltipWrapper.js.map +1 -1
  337. package/dist/common/FocusVisible.cjs +24 -1
  338. package/dist/common/FocusVisible.cjs.map +1 -1
  339. package/dist/common/FocusVisible.js +24 -1
  340. package/dist/common/FocusVisible.js.map +1 -1
  341. package/dist/common/HoverWithin.cjs +63 -0
  342. package/dist/common/HoverWithin.cjs.map +1 -0
  343. package/dist/common/HoverWithin.d.ts +2 -0
  344. package/dist/common/HoverWithin.js +51 -0
  345. package/dist/common/HoverWithin.js.map +1 -0
  346. package/dist/common/InputStyling.cjs +1 -1
  347. package/dist/common/InputStyling.cjs.map +1 -1
  348. package/dist/common/InputStyling.js +2 -2
  349. package/dist/common/InputStyling.js.map +1 -1
  350. package/dist/common/index.cjs +8 -0
  351. package/dist/common/index.cjs.map +1 -1
  352. package/dist/common/index.d.ts +1 -0
  353. package/dist/common/index.js +1 -0
  354. package/dist/common/index.js.map +1 -1
  355. package/dist/index.cjs +28 -0
  356. package/dist/index.cjs.map +1 -1
  357. package/dist/index.d.ts +2 -0
  358. package/dist/index.js +2 -0
  359. package/dist/index.js.map +1 -1
  360. package/dist/styles/focus-styles.cjs +22 -0
  361. package/dist/styles/focus-styles.cjs.map +1 -0
  362. package/dist/styles/focus-styles.d.ts +2 -0
  363. package/dist/styles/focus-styles.js +9 -0
  364. package/dist/styles/focus-styles.js.map +1 -0
  365. package/dist/styles/index.cjs +67 -1
  366. package/dist/styles/index.cjs.map +1 -1
  367. package/dist/styles/index.d.ts +3 -1
  368. package/dist/styles/index.js +6 -1
  369. package/dist/styles/index.js.map +1 -1
  370. package/dist/types.cjs.map +1 -1
  371. package/dist/types.js.map +1 -1
  372. package/package.json +1 -1
  373. package/dist/Chips/ChipInput.cjs +0 -199
  374. package/dist/Chips/ChipInput.cjs.map +0 -1
  375. package/dist/Chips/ChipInput.js +0 -182
  376. package/dist/Chips/ChipInput.js.map +0 -1
  377. package/dist/Dropdown/ChipDropdownInput.cjs +0 -431
  378. package/dist/Dropdown/ChipDropdownInput.cjs.map +0 -1
  379. package/dist/Dropdown/ChipDropdownInput.d.ts +0 -24
  380. package/dist/Dropdown/ChipDropdownInput.js +0 -418
  381. package/dist/Dropdown/ChipDropdownInput.js.map +0 -1
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.default = exports.InteractionType = exports.CardTopLevelContainer = void 0;
10
+ exports.default = exports.Wrapper = exports.CardTopLevelContainer = void 0;
11
11
 
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
13
 
@@ -29,7 +29,7 @@ var _ = require("..");
29
29
 
30
30
  var _jsxRuntime = require("react/jsx-runtime");
31
31
 
32
- var _templateObject;
32
+ var _templateObject, _templateObject2;
33
33
 
34
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
35
 
@@ -39,61 +39,45 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
39
39
 
40
40
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
41
41
 
42
- var CardTopLevelContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n ", "\n"])), _.COLORS.white, function (props) {
43
- return props.interactionType == InteractionType.Clickable && !props.disabled ? "\n\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ".concat(_.COLORS.neutral_200, ";\n }\n\n &:hover:focus, &:hover {\n outline: none;\n overflow: visible;\n border-width: 0px;\n border: 1px solid ").concat(_.COLORS.neutral_200, ";\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n \n &:focus, &.focus-state {\n border-width: 0px;\n border: 1px solid ").concat(_.COLORS.neutral_200, ";\n outline: none;\n overflow: hidden;\n box-shadow: 0px 4px 12px 2px rgba(46, 127, 161, 0.25), 0px 0px 8px 2px #2E7FA1;\n }") : "";
44
- });
42
+ var CardTopLevelContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n}\n"])), _.COLORS.white);
45
43
 
46
44
  exports.CardTopLevelContainer = CardTopLevelContainer;
47
- var InteractionType;
48
- exports.InteractionType = InteractionType;
49
45
 
50
- (function (InteractionType) {
51
- InteractionType[InteractionType["None"] = 0] = "None";
52
- InteractionType[InteractionType["Clickable"] = 1] = "Clickable";
53
- InteractionType[InteractionType["Selectable"] = 2] = "Selectable";
54
- })(InteractionType || (exports.InteractionType = InteractionType = {}));
46
+ var Wrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: max-content;\n width: max-content;\n\n &.interactive:focus {\n ", "\n }\n\n &.interactive:not(.disabled) {\n cursor: pointer;\n\n ", " {\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ", ";\n }\n\n &:hover {\n overflow: visible;\n border: 1px solid ", ";\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n }\n"])), _.focusStyles, CardTopLevelContainer, _.COLORS.neutral_200, _.COLORS.neutral_200);
47
+
48
+ exports.Wrapper = Wrapper;
55
49
 
56
50
  var Card = function Card(_ref) {
57
- var _ref$interactionType = _ref.interactionType,
58
- interactionType = _ref$interactionType === void 0 ? InteractionType.None : _ref$interactionType,
59
- onCardClicked = _ref.onCardClicked,
51
+ var onCardClicked = _ref.onCardClicked,
60
52
  topSectionProps = _ref.topSectionProps,
61
53
  middleSectionProps = _ref.middleSectionProps,
62
54
  bottomSectionProps = _ref.bottomSectionProps,
63
55
  disabled = _ref.disabled;
64
- var rootRef = React.useRef(null);
65
-
66
- var onCardClick = function onCardClick() {
67
- if (interactionType == InteractionType.Clickable) {
68
- var _rootRef$current;
69
-
70
- if (onCardClicked) onCardClicked();
71
- (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.blur();
72
- }
73
- };
74
-
75
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardTopLevelContainer, {
76
- disabled: disabled,
77
- ref: rootRef,
78
- tabIndex: interactionType == InteractionType.Clickable && !disabled ? 0 : -1,
79
- interactionType: interactionType,
80
- onClick: onCardClick,
81
- children: [topSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardTopSection.default, _objectSpread(_objectSpread({}, topSectionProps), {}, {
82
- disabled: disabled,
83
- interactionType: interactionType
84
- })), middleSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardMiddleSection.default, _objectSpread(_objectSpread({}, middleSectionProps), {}, {
85
- disabled: disabled,
86
- interactionType: interactionType
87
- })), bottomSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardBottomSection.default, _objectSpread(_objectSpread({}, bottomSectionProps), {}, {
88
- disabled: disabled,
89
- interactionType: interactionType
90
- }))]
56
+ var cls = "".concat(!!onCardClicked ? 'interactive' : '', " ").concat(disabled ? 'disabled' : '');
57
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
58
+ className: cls,
59
+ tabIndex: !!onCardClicked && !disabled ? 0 : -1,
60
+ onMouseDown: _.defaultOnMouseDownHandler,
61
+ onKeyDown: function onKeyDown(a) {
62
+ return a.key === 'Enter' && !disabled && onCardClicked && onCardClicked();
63
+ },
64
+ onClick: function onClick(e) {
65
+ return !disabled && onCardClicked && onCardClicked();
66
+ },
67
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardTopLevelContainer, {
68
+ children: [topSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardTopSection.default, _objectSpread(_objectSpread({}, topSectionProps), {}, {
69
+ disabled: disabled
70
+ })), middleSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardMiddleSection.default, _objectSpread(_objectSpread({}, middleSectionProps), {}, {
71
+ disabled: disabled
72
+ })), bottomSectionProps && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardBottomSection.default, _objectSpread(_objectSpread({}, bottomSectionProps), {}, {
73
+ disabled: disabled
74
+ }))]
75
+ })
91
76
  });
92
77
  };
93
78
 
94
79
  Card.propTypes = {
95
- interactionType: _propTypes.default.oneOf([0, 1, 2]).isRequired,
96
- onCardClicked: _propTypes.default.func.isRequired,
80
+ onCardClicked: _propTypes.default.func,
97
81
  disabled: _propTypes.default.bool.isRequired
98
82
  };
99
83
  var _default = Card;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Card/Card.tsx"],"names":["CardTopLevelContainer","styled","div","COLORS","white","props","interactionType","InteractionType","Clickable","disabled","neutral_200","Card","None","onCardClicked","topSectionProps","middleSectionProps","bottomSectionProps","rootRef","React","useRef","onCardClick","current","blur"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEO,IAAMA,qBAAqB,GAAGC,0BAAOC,GAAV,iVACZC,SAAOC,KADK,EAY9B,UAAAC,KAAK;AAAA,SACLA,KAAK,CAACC,eAAN,IAAyBC,eAAe,CAACC,SAAzC,IAAsD,CAACH,KAAK,CAACI,QAA7D,kIAKsBN,SAAOO,WAL7B,yJAYsBP,SAAOO,WAZ7B,sKAkBsBP,SAAOO,WAlB7B,wJADK;AAAA,CAZyB,CAA3B;;;IAuCKH,e;;;WAAAA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;AAAAA,EAAAA,e,CAAAA,e;GAAAA,e,+BAAAA,e;;AAeZ,IAAMI,IAAwC,GAAG,SAA3CA,IAA2C,OAOhC;AAAA,kCANfL,eAMe;AAAA,MANfA,eAMe,qCANGC,eAAe,C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led-components';\nimport CardTopSection, { CardTopSectionProps } from './CardTopSection';\nimport CardMiddleSection, { CardMiddleSectionProps } from './CardMiddleSection';\nimport CardBottomSection, { CardBottomSectionProps } from './CardBottomSection';\nimport { COLORS, CommonInteractionStyling } from '..';\n\nexport const CardTopLevelContainer = styled.div<{ interactionType: InteractionType; disabled: boolean; }>`\n background-color: ${COLORS.white};\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n ${props =>\n props.interactionType == InteractionType.Clickable && !props.disabled\n ? `\n\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ${COLORS.neutral_200};\n }\n\n &:hover:focus, &:hover {\n outline: none;\n overflow: visible;\n border-width: 0px;\n border: 1px solid ${COLORS.neutral_200};\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n \n &:focus, &.focus-state {\n border-width: 0px;\n border: 1px solid ${COLORS.neutral_200};\n outline: none;\n overflow: hidden;\n box-shadow: 0px 4px 12px 2px rgba(46, 127, 161, 0.25), 0px 0px 8px 2px #2E7FA1;\n }`\n : ``}\n`;\n\nexport enum InteractionType {\n None,\n Clickable,\n Selectable,\n}\n\nexport interface CardProps {\n interactionType: InteractionType;\n onCardClicked: () => {};\n disabled: boolean;\n topSectionProps?: CardTopSectionProps;\n middleSectionProps?: CardMiddleSectionProps;\n bottomSectionProps?: CardBottomSectionProps;\n}\n\nconst Card: React.FunctionComponent<CardProps> = ({\n interactionType = InteractionType.None,\n onCardClicked,\n topSectionProps,\n middleSectionProps,\n bottomSectionProps,\n disabled\n}: CardProps) => {\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n const onCardClick = () => {\n if (interactionType == InteractionType.Clickable) {\n if(onCardClicked) onCardClicked();\n rootRef.current?.blur();\n }\n };\n\n return (\n <CardTopLevelContainer disabled={disabled} ref={rootRef} tabIndex={interactionType == InteractionType.Clickable && !disabled ? 0 : -1} interactionType={interactionType} onClick={onCardClick}>\n {topSectionProps && <CardTopSection {...topSectionProps} disabled={disabled} interactionType={interactionType} />}\n {middleSectionProps && <CardMiddleSection {...middleSectionProps} disabled={disabled} interactionType={interactionType} />}\n {bottomSectionProps && <CardBottomSection {...bottomSectionProps} disabled={disabled} interactionType={interactionType} />}\n </CardTopLevelContainer>\n );\n};\n\nexport default Card;\n"],"file":"Card.cjs"}
1
+ {"version":3,"sources":["../../src/Card/Card.tsx"],"names":["CardTopLevelContainer","styled","div","COLORS","white","Wrapper","focusStyles","neutral_200","Card","onCardClicked","topSectionProps","middleSectionProps","bottomSectionProps","disabled","cls","defaultOnMouseDownHandler","a","key","e"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEO,IAAMA,qBAAqB,GAAGC,0BAAOC,GAAV,0UACZC,SAAOC,KADK,CAA3B;;;;AAeA,IAAMC,OAAO,GAAGJ,0BAAOC,GAAV,ilBAKdI,aALc,EAWdN,qBAXc,EAcQG,SAAOI,WAdf,EAmBQJ,SAAOI,WAnBf,CAAb;;;;AAuCP,IAAMC,IAAwC,GAAG,SAA3CA,IAA2C,OAMkB;AAAA,MALfC,aAKe,QALfA,aAKe;AAAA,MAJfC,eAIe,QAJfA,eAIe;AAAA,MAHfC,kBAGe,QAHfA,kBAGe;AAAA,MAFfC,kBAEe,QAFfA,kBAEe;AAAA,MADfC,QACe,QADfA,QACe;AAGjE,MAAMC,GAAG,aAAM,CAAC,CAACL,aAAF,GAAkB,aAAlB,GAAkC,EAAxC,cAA8CI,QAAQ,GAAG,UAAH,GAAgB,EAAtE,CAAT;AAEA,sBAEE,qBAAC,OAAD;AAAS,IAAA,SAAS,EAAEC,GAApB;AACS,IAAA,QAAQ,EAAE,CAAC,CAACL,aAAF,IAAmB,CAACI,QAApB,GAA+B,CAA/B,GAAmC,CAAC,CADvD;AAES,IAAA,WAAW,EAAEE,2BAFtB;AAGS,IAAA,SAAS,EAAE,mBAAAC,CAAC;AAAA,aAAIA,CAAC,CAACC,GAAF,KAAU,OAAV,IAAqB,CAACJ,QAAtB,IAAkCJ,aAAlC,IAAmDA,aAAa,EAApE;AAAA,KAHrB;AAIS,IAAA,OAAO,EAAE,iBAAAS,CAAC;AAAA,aAAI,CAACL,QAAD,IAAaJ,aAAb,IAA8BA,aAAa,EAA/C;AAAA,KAJnB;AAAA,2BAKE,sBAAC,qBAAD;AAAA,iBACGC,eAAe,iBAAI,qBAAC,uBAAD,kCAAoBA,eAApB;AAAqC,QAAA,QAAQ,EAAEG;AAA/C,SADtB,EAEGF,kBAAkB,iBACjB,qBAAC,0BAAD,kCAAuBA,kBAAvB;AAA2C,QAAA,QAAQ,EAAEE;AAArD,SAHJ,EAIGD,kBAAkB,iBACjB,qBAAC,0BAAD,kCAAuBA,kBAAvB;AAA2C,QAAA,QAAQ,EAAEC;AAArD,SALJ;AAAA;AALF,IAFF;AAiBD,CA5BD;;;AAPEJ,EAAAA,a;AACAI,EAAAA,Q;;eAoCaL,I","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport CardTopSection, {CardTopSectionProps} from './CardTopSection';\nimport CardMiddleSection, {CardMiddleSectionProps} from './CardMiddleSection';\nimport CardBottomSection, {CardBottomSectionProps} from './CardBottomSection';\nimport {COLORS, defaultOnMouseDownHandler, focusStyles} from '..';\n\nexport const CardTopLevelContainer = styled.div`\n background-color: ${COLORS.white};\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n}\n`;\n\n\nexport const Wrapper = styled.div`\n height: max-content;\n width: max-content;\n\n &.interactive:focus {\n ${focusStyles}\n }\n\n &.interactive:not(.disabled) {\n cursor: pointer;\n\n ${CardTopLevelContainer} {\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ${COLORS.neutral_200};\n }\n\n &:hover {\n overflow: visible;\n border: 1px solid ${COLORS.neutral_200};\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n }\n`;\n\n\nexport interface CardProps {\n onCardClicked?: () => {};\n disabled: boolean;\n topSectionProps?: CardTopSectionProps;\n middleSectionProps?: CardMiddleSectionProps;\n bottomSectionProps?: CardBottomSectionProps;\n}\n\nconst Card: React.FunctionComponent<CardProps> = ({\n onCardClicked,\n topSectionProps,\n middleSectionProps,\n bottomSectionProps,\n disabled\n }: CardProps) => {\n\n\n const cls = `${!!onCardClicked ? 'interactive' : ''} ${disabled ? 'disabled' : ''}`;\n\n return (\n\n <Wrapper className={cls}\n tabIndex={!!onCardClicked && !disabled ? 0 : -1}\n onMouseDown={defaultOnMouseDownHandler}\n onKeyDown={a => a.key === 'Enter' && !disabled && onCardClicked && onCardClicked()}\n onClick={e => !disabled && onCardClicked && onCardClicked()}>\n <CardTopLevelContainer>\n {topSectionProps && <CardTopSection {...topSectionProps} disabled={disabled}/>}\n {middleSectionProps &&\n <CardMiddleSection {...middleSectionProps} disabled={disabled}/>}\n {bottomSectionProps &&\n <CardBottomSection {...bottomSectionProps} disabled={disabled}/>}\n </CardTopLevelContainer>\n </Wrapper>\n\n );\n};\n\nexport default Card;\n"],"file":"Card.cjs"}
@@ -2,18 +2,10 @@ import * as React from 'react';
2
2
  import { CardTopSectionProps } from './CardTopSection';
3
3
  import { CardMiddleSectionProps } from './CardMiddleSection';
4
4
  import { CardBottomSectionProps } from './CardBottomSection';
5
- export declare const CardTopLevelContainer: import("styled-components").StyledComponent<"div", any, {
6
- interactionType: InteractionType;
7
- disabled: boolean;
8
- }, never>;
9
- export declare enum InteractionType {
10
- None = 0,
11
- Clickable = 1,
12
- Selectable = 2
13
- }
5
+ export declare const CardTopLevelContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
14
7
  export interface CardProps {
15
- interactionType: InteractionType;
16
- onCardClicked: () => {};
8
+ onCardClicked?: () => {};
17
9
  disabled: boolean;
18
10
  topSectionProps?: CardTopSectionProps;
19
11
  middleSectionProps?: CardMiddleSectionProps;
package/dist/Card/Card.js CHANGED
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
3
3
  import _pt from "prop-types";
4
4
 
5
- var _templateObject;
5
+ var _templateObject, _templateObject2;
6
6
 
7
7
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
8
8
 
@@ -13,61 +13,43 @@ import styled from 'styled-components';
13
13
  import CardTopSection from './CardTopSection';
14
14
  import CardMiddleSection from './CardMiddleSection';
15
15
  import CardBottomSection from './CardBottomSection';
16
- import { COLORS } from '..';
16
+ import { COLORS, defaultOnMouseDownHandler, focusStyles } from '..';
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
- export var CardTopLevelContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n ", "\n"])), COLORS.white, function (props) {
20
- return props.interactionType == InteractionType.Clickable && !props.disabled ? "\n\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ".concat(COLORS.neutral_200, ";\n }\n\n &:hover:focus, &:hover {\n outline: none;\n overflow: visible;\n border-width: 0px;\n border: 1px solid ").concat(COLORS.neutral_200, ";\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n \n &:focus, &.focus-state {\n border-width: 0px;\n border: 1px solid ").concat(COLORS.neutral_200, ";\n outline: none;\n overflow: hidden;\n box-shadow: 0px 4px 12px 2px rgba(46, 127, 161, 0.25), 0px 0px 8px 2px #2E7FA1;\n }") : "";
21
- });
22
- export var InteractionType;
23
-
24
- (function (InteractionType) {
25
- InteractionType[InteractionType["None"] = 0] = "None";
26
- InteractionType[InteractionType["Clickable"] = 1] = "Clickable";
27
- InteractionType[InteractionType["Selectable"] = 2] = "Selectable";
28
- })(InteractionType || (InteractionType = {}));
19
+ export var CardTopLevelContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n}\n"])), COLORS.white);
20
+ export var Wrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: max-content;\n width: max-content;\n\n &.interactive:focus {\n ", "\n }\n\n &.interactive:not(.disabled) {\n cursor: pointer;\n\n ", " {\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ", ";\n }\n\n &:hover {\n overflow: visible;\n border: 1px solid ", ";\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n }\n"])), focusStyles, CardTopLevelContainer, COLORS.neutral_200, COLORS.neutral_200);
29
21
 
30
22
  var Card = function Card(_ref) {
31
- var _ref$interactionType = _ref.interactionType,
32
- interactionType = _ref$interactionType === void 0 ? InteractionType.None : _ref$interactionType,
33
- onCardClicked = _ref.onCardClicked,
23
+ var onCardClicked = _ref.onCardClicked,
34
24
  topSectionProps = _ref.topSectionProps,
35
25
  middleSectionProps = _ref.middleSectionProps,
36
26
  bottomSectionProps = _ref.bottomSectionProps,
37
27
  disabled = _ref.disabled;
38
- var rootRef = React.useRef(null);
39
-
40
- var onCardClick = function onCardClick() {
41
- if (interactionType == InteractionType.Clickable) {
42
- var _rootRef$current;
43
-
44
- if (onCardClicked) onCardClicked();
45
- (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.blur();
46
- }
47
- };
48
-
49
- return /*#__PURE__*/_jsxs(CardTopLevelContainer, {
50
- disabled: disabled,
51
- ref: rootRef,
52
- tabIndex: interactionType == InteractionType.Clickable && !disabled ? 0 : -1,
53
- interactionType: interactionType,
54
- onClick: onCardClick,
55
- children: [topSectionProps && /*#__PURE__*/_jsx(CardTopSection, _objectSpread(_objectSpread({}, topSectionProps), {}, {
56
- disabled: disabled,
57
- interactionType: interactionType
58
- })), middleSectionProps && /*#__PURE__*/_jsx(CardMiddleSection, _objectSpread(_objectSpread({}, middleSectionProps), {}, {
59
- disabled: disabled,
60
- interactionType: interactionType
61
- })), bottomSectionProps && /*#__PURE__*/_jsx(CardBottomSection, _objectSpread(_objectSpread({}, bottomSectionProps), {}, {
62
- disabled: disabled,
63
- interactionType: interactionType
64
- }))]
28
+ var cls = "".concat(!!onCardClicked ? 'interactive' : '', " ").concat(disabled ? 'disabled' : '');
29
+ return /*#__PURE__*/_jsx(Wrapper, {
30
+ className: cls,
31
+ tabIndex: !!onCardClicked && !disabled ? 0 : -1,
32
+ onMouseDown: defaultOnMouseDownHandler,
33
+ onKeyDown: function onKeyDown(a) {
34
+ return a.key === 'Enter' && !disabled && onCardClicked && onCardClicked();
35
+ },
36
+ onClick: function onClick(e) {
37
+ return !disabled && onCardClicked && onCardClicked();
38
+ },
39
+ children: /*#__PURE__*/_jsxs(CardTopLevelContainer, {
40
+ children: [topSectionProps && /*#__PURE__*/_jsx(CardTopSection, _objectSpread(_objectSpread({}, topSectionProps), {}, {
41
+ disabled: disabled
42
+ })), middleSectionProps && /*#__PURE__*/_jsx(CardMiddleSection, _objectSpread(_objectSpread({}, middleSectionProps), {}, {
43
+ disabled: disabled
44
+ })), bottomSectionProps && /*#__PURE__*/_jsx(CardBottomSection, _objectSpread(_objectSpread({}, bottomSectionProps), {}, {
45
+ disabled: disabled
46
+ }))]
47
+ })
65
48
  });
66
49
  };
67
50
 
68
51
  Card.propTypes = {
69
- interactionType: _pt.oneOf([0, 1, 2]).isRequired,
70
- onCardClicked: _pt.func.isRequired,
52
+ onCardClicked: _pt.func,
71
53
  disabled: _pt.bool.isRequired
72
54
  };
73
55
  export default Card;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Card/Card.tsx"],"names":["React","styled","CardTopSection","CardMiddleSection","CardBottomSection","COLORS","CardTopLevelContainer","div","white","props","interactionType","InteractionType","Clickable","disabled","neutral_200","Card","None","onCardClicked","topSectionProps","middleSectionProps","bottomSectionProps","rootRef","useRef","onCardClick","current","blur"],"mappings":";;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,cAAP,MAAoD,kBAApD;AACA,OAAOC,iBAAP,MAA0D,qBAA1D;AACA,OAAOC,iBAAP,MAA0D,qBAA1D;AACA,SAASC,MAAT,QAAiD,IAAjD;;;AAEA,OAAO,IAAMC,qBAAqB,GAAGL,MAAM,CAACM,GAAV,mUACZF,MAAM,CAACG,KADK,EAY9B,UAAAC,KAAK;AAAA,SACLA,KAAK,CAACC,eAAN,IAAyBC,eAAe,CAACC,SAAzC,IAAsD,CAACH,KAAK,CAACI,QAA7D,kIAKsBR,MAAM,CAACS,WAL7B,yJAYsBT,MAAM,CAACS,WAZ7B,sKAkBsBT,MAAM,CAACS,WAlB7B,wJADK;AAAA,CAZyB,CAA3B;AAuCP,WAAYH,eAAZ;;WAAYA,e;AAAAA,EAAAA,e,CAAAA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Q,EAAEP,QAArD;AAA+D,MAAA,eAAe,EAAEH;AAAhF,OAHzB;AAAA,IADF;AAOD,CAxBD;;;AAREA,EAAAA,e;AACAO,EAAAA,a;AACAJ,EAAAA,Q;;AAgCF,eAAeE,IAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport CardTopSection, { CardTopSectionProps } from './CardTopSection';\nimport CardMiddleSection, { CardMiddleSectionProps } from './CardMiddleSection';\nimport CardBottomSection, { CardBottomSectionProps } from './CardBottomSection';\nimport { COLORS, CommonInteractionStyling } from '..';\n\nexport const CardTopLevelContainer = styled.div<{ interactionType: InteractionType; disabled: boolean; }>`\n background-color: ${COLORS.white};\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n ${props =>\n props.interactionType == InteractionType.Clickable && !props.disabled\n ? `\n\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ${COLORS.neutral_200};\n }\n\n &:hover:focus, &:hover {\n outline: none;\n overflow: visible;\n border-width: 0px;\n border: 1px solid ${COLORS.neutral_200};\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n \n &:focus, &.focus-state {\n border-width: 0px;\n border: 1px solid ${COLORS.neutral_200};\n outline: none;\n overflow: hidden;\n box-shadow: 0px 4px 12px 2px rgba(46, 127, 161, 0.25), 0px 0px 8px 2px #2E7FA1;\n }`\n : ``}\n`;\n\nexport enum InteractionType {\n None,\n Clickable,\n Selectable,\n}\n\nexport interface CardProps {\n interactionType: InteractionType;\n onCardClicked: () => {};\n disabled: boolean;\n topSectionProps?: CardTopSectionProps;\n middleSectionProps?: CardMiddleSectionProps;\n bottomSectionProps?: CardBottomSectionProps;\n}\n\nconst Card: React.FunctionComponent<CardProps> = ({\n interactionType = InteractionType.None,\n onCardClicked,\n topSectionProps,\n middleSectionProps,\n bottomSectionProps,\n disabled\n}: CardProps) => {\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n const onCardClick = () => {\n if (interactionType == InteractionType.Clickable) {\n if(onCardClicked) onCardClicked();\n rootRef.current?.blur();\n }\n };\n\n return (\n <CardTopLevelContainer disabled={disabled} ref={rootRef} tabIndex={interactionType == InteractionType.Clickable && !disabled ? 0 : -1} interactionType={interactionType} onClick={onCardClick}>\n {topSectionProps && <CardTopSection {...topSectionProps} disabled={disabled} interactionType={interactionType} />}\n {middleSectionProps && <CardMiddleSection {...middleSectionProps} disabled={disabled} interactionType={interactionType} />}\n {bottomSectionProps && <CardBottomSection {...bottomSectionProps} disabled={disabled} interactionType={interactionType} />}\n </CardTopLevelContainer>\n );\n};\n\nexport default Card;\n"],"file":"Card.js"}
1
+ {"version":3,"sources":["../../src/Card/Card.tsx"],"names":["React","styled","CardTopSection","CardMiddleSection","CardBottomSection","COLORS","defaultOnMouseDownHandler","focusStyles","CardTopLevelContainer","div","white","Wrapper","neutral_200","Card","onCardClicked","topSectionProps","middleSectionProps","bottomSectionProps","disabled","cls","a","key","e"],"mappings":";;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,cAAP,MAAkD,kBAAlD;AACA,OAAOC,iBAAP,MAAwD,qBAAxD;AACA,OAAOC,iBAAP,MAAwD,qBAAxD;AACA,SAAQC,MAAR,EAAgBC,yBAAhB,EAA2CC,WAA3C,QAA6D,IAA7D;;;AAEA,OAAO,IAAMC,qBAAqB,GAAGP,MAAM,CAACQ,GAAV,4TACZJ,MAAM,CAACK,KADK,CAA3B;AAeP,OAAO,IAAMC,OAAO,GAAGV,MAAM,CAACQ,GAAV,mkBAKdF,WALc,EAWdC,qBAXc,EAcQH,MAAM,CAACO,WAdf,EAmBQP,MAAM,CAACO,WAnBf,CAAb;;AAuCP,IAAMC,IAAwC,GAAG,SAA3CA,IAA2C,OAMkB;AAAA,MALfC,aAKe,QALfA,aAKe;AAAA,MAJfC,eAIe,QAJfA,eAIe;AAAA,MAHfC,kBAGe,QAHfA,kBAGe;AAAA,MAFfC,kBAEe,QAFfA,kBAEe;AAAA,MADfC,QACe,QADfA,QACe;AAGjE,MAAMC,GAAG,aAAM,CAAC,CAACL,aAAF,GAAkB,aAAlB,GAAkC,EAAxC,cAA8CI,QAAQ,GAAG,UAAH,GAAgB,EAAtE,CAAT;AAEA,sBAEE,KAAC,OAAD;AAAS,IAAA,SAAS,EAAEC,GAApB;AACS,IAAA,QAAQ,EAAE,CAAC,CAACL,aAAF,IAAmB,CAACI,QAApB,GAA+B,CAA/B,GAAmC,CAAC,CADvD;AAES,IAAA,WAAW,EAAEZ,yBAFtB;AAGS,IAAA,SAAS,EAAE,mBAAAc,CAAC;AAAA,aAAIA,CAAC,CAACC,GAAF,KAAU,OAAV,IAAqB,CAACH,QAAtB,IAAkCJ,aAAlC,IAAmDA,aAAa,EAApE;AAAA,KAHrB;AAIS,IAAA,OAAO,EAAE,iBAAAQ,CAAC;AAAA,aAAI,CAACJ,QAAD,IAAaJ,aAAb,IAA8BA,aAAa,EAA/C;AAAA,KAJnB;AAAA,2BAKE,MAAC,qBAAD;AAAA,iBACGC,eAAe,iBAAI,KAAC,cAAD,kCAAoBA,eAApB;AAAqC,QAAA,QAAQ,EAAEG;AAA/C,SADtB,EAEGF,kBAAkB,iBACjB,KAAC,iBAAD,kCAAuBA,kBAAvB;AAA2C,QAAA,QAAQ,EAAEE;AAArD,SAHJ,EAIGD,kBAAkB,iBACjB,KAAC,iBAAD,kCAAuBA,kBAAvB;AAA2C,QAAA,QAAQ,EAAEC;AAArD,SALJ;AAAA;AALF,IAFF;AAiBD,CA5BD;;;AAPEJ,EAAAA,a;AACAI,EAAAA,Q;;AAoCF,eAAeL,IAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport CardTopSection, {CardTopSectionProps} from './CardTopSection';\nimport CardMiddleSection, {CardMiddleSectionProps} from './CardMiddleSection';\nimport CardBottomSection, {CardBottomSectionProps} from './CardBottomSection';\nimport {COLORS, defaultOnMouseDownHandler, focusStyles} from '..';\n\nexport const CardTopLevelContainer = styled.div`\n background-color: ${COLORS.white};\n\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n\n border: 1px solid transparent;\n background-clip: padding-box;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n}\n`;\n\n\nexport const Wrapper = styled.div`\n height: max-content;\n width: max-content;\n\n &.interactive:focus {\n ${focusStyles}\n }\n\n &.interactive:not(.disabled) {\n cursor: pointer;\n\n ${CardTopLevelContainer} {\n &:active, &.active-state {\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n border: 1px solid ${COLORS.neutral_200};\n }\n\n &:hover {\n overflow: visible;\n border: 1px solid ${COLORS.neutral_200};\n box-shadow: 0px 8px 16px 2px rgba(0, 0, 0, 0.15);\n }\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n }\n`;\n\n\nexport interface CardProps {\n onCardClicked?: () => {};\n disabled: boolean;\n topSectionProps?: CardTopSectionProps;\n middleSectionProps?: CardMiddleSectionProps;\n bottomSectionProps?: CardBottomSectionProps;\n}\n\nconst Card: React.FunctionComponent<CardProps> = ({\n onCardClicked,\n topSectionProps,\n middleSectionProps,\n bottomSectionProps,\n disabled\n }: CardProps) => {\n\n\n const cls = `${!!onCardClicked ? 'interactive' : ''} ${disabled ? 'disabled' : ''}`;\n\n return (\n\n <Wrapper className={cls}\n tabIndex={!!onCardClicked && !disabled ? 0 : -1}\n onMouseDown={defaultOnMouseDownHandler}\n onKeyDown={a => a.key === 'Enter' && !disabled && onCardClicked && onCardClicked()}\n onClick={e => !disabled && onCardClicked && onCardClicked()}>\n <CardTopLevelContainer>\n {topSectionProps && <CardTopSection {...topSectionProps} disabled={disabled}/>}\n {middleSectionProps &&\n <CardMiddleSection {...middleSectionProps} disabled={disabled}/>}\n {bottomSectionProps &&\n <CardBottomSection {...bottomSectionProps} disabled={disabled}/>}\n </CardTopLevelContainer>\n </Wrapper>\n\n );\n};\n\nexport default Card;\n"],"file":"Card.js"}
@@ -33,27 +33,22 @@ var ProgressContainer = _styledComponents.default.div(_templateObject || (_templ
33
33
 
34
34
  var NotesContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 48px;\n position: relative;\n color: ", ";\n display: flex;\n flex-direction: row;\n align-items: center;\n"])), _.COLORS.neutral_500);
35
35
 
36
- var AuthorContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n }\n\n ", "\n"])), function (props) {
36
+ var AuthorContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n ", "\n"])), function (props) {
37
37
  return props.disabled ? "\n color: ".concat(_.COLORS.neutral_300, ";\n svg, img {\n filter: grayscale(100%);\n }\n \n ") : '';
38
38
  });
39
39
 
40
40
  var Divider = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-top: 1px;\n border-top-color: ", ";\n border-top-style: solid;\n width: 100%;\n"])), _.COLORS.neutral_100);
41
41
 
42
- var NoteLeft = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n"])));
42
+ var NoteLeft = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n"])));
43
43
 
44
- var NoteRight = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n"])));
44
+ var NoteRight = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n"])));
45
45
 
46
46
  var ButtonRowContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px;\n border-top-color: ", ";\n border-top-style: solid;\n\n button:last-child{\n margin: 8px 0px 0px 0px;\n }\n\n button:not(:last-child) {\n margin: 8px 0px 0px 0px;\n }\n\n svg {\n color: ", ";\n }\n"])), _.COLORS.neutral_100, _.COLORS.neutral_600);
47
47
 
48
- var Container = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n cursor: ", ";\n\n ", " {\n ", "\n }\n"])), function (props) {
49
- return props.disabled ? 'not-allowed' : 'pointer';
50
- }, ButtonRowContainer, function (props) {
51
- return props.interactionType == _.InteractionType.Clickable ? "cursor: ".concat(props.disabled ? 'not-allowed' : 'auto', ";") : '';
52
- });
48
+ var Container = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n"])));
53
49
 
54
50
  var CardBottomSection = function CardBottomSection(_ref) {
55
- var interactionType = _ref.interactionType,
56
- progressLevel = _ref.progressLevel,
51
+ var progressLevel = _ref.progressLevel,
57
52
  progressMax = _ref.progressMax,
58
53
  _ref$progressType = _ref.progressType,
59
54
  progressType = _ref$progressType === void 0 ? _.LinearProgressType.Line : _ref$progressType,
@@ -67,8 +62,6 @@ var CardBottomSection = function CardBottomSection(_ref) {
67
62
  disabled = _ref.disabled;
68
63
  var haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;
69
64
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
70
- disabled: disabled,
71
- interactionType: interactionType,
72
65
  children: [haveAtLeastSomething && /*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {}), progressLevel != undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(ProgressContainer, {
73
66
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LinearProgress, {
74
67
  size: _.Size.Small,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Card/CardBottomSection.tsx"],"names":["ProgressContainer","styled","div","NotesContainer","COLORS","neutral_500","AuthorContainer","props","disabled","neutral_300","Divider","neutral_100","NoteLeft","NoteRight","ButtonRowContainer","neutral_600","Container","interactionType","InteractionType","Clickable","CardBottomSection","progressLevel","progressMax","progressType","LinearProgressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","authorName","logo","actions","haveAtLeastSomething","undefined","Size","Small","LinearProgressVariant","Normal","ComponentTextStyle","Bold","map","x","e","stopPropagation","onClick","icon"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;;;;AAwBA,IAAMA,iBAAiB,GAAGC,0BAAOC,GAAV,wGAAvB;;AAIA,IAAMC,cAAc,GAAGF,0BAAOC,GAAV,kNAGTE,SAAOC,WAHE,CAApB;;AASA,IAAMC,eAAe,GAAGL,0BAAOC,GAAV,2QAcjB,UAAAK,KAAK;AAAA,SAAIA,KAAK,CAACC,QAAN,0BACAJ,SAAOK,WADP,0EAMP,E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AC,kBAAD;AAAA,gBACTA,OAAO,CAACS,GAAR,CAAY,UAAAC,CAAC;AAAA,4BACZ,qBAAC,kBAAD;AAAY,UAAA,QAAQ,EAAElC,QAAtB;AAAgC,UAAA,OAAO,EAAC,WAAxC;AAAoD,UAAA,KAAK,EAAC,UAA1D;AAAqE,UAAA,MAAM,EAAE,gBAACmC,CAAD,EAAO;AAACA,YAAAA,CAAC,SAAD,IAAAA,CAAC,WAAD,YAAAA,CAAC,CAAEC,eAAH;AAAsBF,YAAAA,CAAC,CAACG,OAAF;AAAa,WAAxH;AAAA,oBACGH,CAAC,CAACI;AADL,UADY;AAAA,OAAb;AADS,MA9Bd;AAAA,IADF;AAwCD,CAxDD;;;AAnHEzB,EAAAA,a;AACAC,EAAAA,W;AAGAI,EAAAA,Q;AACAC,EAAAA,Y;AACAC,EAAAA,S;AACAC,EAAAA,a;AAEAC,EAAAA,U;AACAE,EAAAA,O;AAhBAc,IAAAA,I;AACAD,IAAAA,O;;AAgBAd,EAAAA,I;AACAvB,EAAAA,Q;;eAiKaY,iB","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { COLORS, ComponentTextStyle, ComponentXXS, InteractionType, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '..';\nimport { LaerdalLogo } from '../assets';\nimport { IconButton } from '../Button';\n\nexport interface ActionItem {\n icon: React.ReactNode;\n onClick: () => void;\n}\n\nexport interface CardBottomSectionProps {\n interactionType: InteractionType;\n progressLevel?: number;\n progressMax?: number;\n progressType?: LinearProgressType;\n\n noteLeft?: string;\n noteLeftIcon?: React.ReactNode;\n noteRight?: string;\n noteRightIcon?: React.ReactNode;\n \n authorName?: string;\n actions?: ActionItem[];\n logo?: React.ReactNode;\n disabled: boolean;\n}\n\nconst ProgressContainer = styled.div`\n padding: 8px 0;\n`;\n\nconst NotesContainer = styled.div`\n height: 48px;\n position: relative;\n color: ${COLORS.neutral_500};\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst AuthorContainer = styled.div<{disabled: boolean}>`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n }\n\n ${props => props.disabled ? `\n color: ${COLORS.neutral_300};\n svg, img {\n filter: grayscale(100%);\n }\n \n ` : ''}\n`;\n\nconst Divider = styled.div`\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n width: 100%;\n`;\n\nconst NoteLeft = styled.div`\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n`;\n\nconst NoteRight = styled.div`\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n`;\n\nconst ButtonRowContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n\n button:last-child{\n margin: 8px 0px 0px 0px;\n }\n\n button:not(:last-child) {\n margin: 8px 0px 0px 0px;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n`;\n\nconst Container = styled.div<{interactionType: InteractionType; disabled: boolean}>`\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'};\n\n ${ButtonRowContainer} {\n ${props => props.interactionType == InteractionType.Clickable ? \n `cursor: ${props.disabled ? 'not-allowed' : 'auto'};` : ''}\n }\n`;\n\nconst CardBottomSection: React.FunctionComponent<CardBottomSectionProps> = ({\n interactionType,\n progressLevel,\n progressMax,\n progressType = LinearProgressType.Line,\n noteLeft,\n noteLeftIcon,\n noteRight,\n noteRightIcon,\n authorName,\n logo,\n actions,\n disabled\n}: CardBottomSectionProps) => {\n\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;\n return (\n <Container disabled={disabled} interactionType={interactionType}>\n {haveAtLeastSomething && <Divider />}\n {progressLevel != undefined && <ProgressContainer>\n <LinearProgress size={Size.Small}\n type={progressType}\n variant={LinearProgressVariant.Normal}\n value={progressLevel}\n max={progressMax ?? progressLevel} />\n </ProgressContainer>}\n\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <NotesContainer>\n {(noteLeft || noteLeftIcon) && (\n <NoteLeft>\n {noteLeftIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\n </NoteLeft>\n )}\n {(noteRight || noteRightIcon) && (\n <NoteRight>\n {noteRightIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\n </NoteRight>\n )}\n </NotesContainer>}\n\n {(authorName || logo) && <AuthorContainer disabled={disabled}>\n <ComponentXXS>{authorName}</ComponentXXS>\n {logo}\n </AuthorContainer>}\n\n {actions && <ButtonRowContainer>\n {actions.map(x => (\n <IconButton disabled={disabled} variant=\"secondary\" shape=\"circular\" action={(e) => {e?.stopPropagation(); x.onClick();}}>\n {x.icon}\n </IconButton>\n ))}\n </ButtonRowContainer>}\n </Container>\n );\n};\n\nexport default CardBottomSection;\n"],"file":"CardBottomSection.cjs"}
1
+ {"version":3,"sources":["../../src/Card/CardBottomSection.tsx"],"names":["ProgressContainer","styled","div","NotesContainer","COLORS","neutral_500","AuthorContainer","props","disabled","neutral_300","Divider","neutral_100","NoteLeft","NoteRight","ButtonRowContainer","neutral_600","Container","CardBottomSection","progressLevel","progressMax","progressType","LinearProgressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","authorName","logo","actions","haveAtLeastSomething","undefined","Size","Small","LinearProgressVariant","Normal","ComponentTextStyle","Bold","map","x","e","stopPropagation","onClick","icon"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AAuBA,IAAMA,iBAAiB,GAAGC,0BAAOC,GAAV,wGAAvB;;AAI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,EAAC,UAA1D;AAAqE,UAAA,MAAM,EAAE,gBAACgC,CAAD,EAAO;AAACA,YAAAA,CAAC,SAAD,IAAAA,CAAC,WAAD,YAAAA,CAAC,CAAEC,eAAH;AAAsBF,YAAAA,CAAC,CAACG,OAAF;AAAa,WAAxH;AAAA,oBACGH,CAAC,CAACI;AADL,UADY;AAAA,OAAb;AADS,MA9Bd;AAAA,IADF;AAwCD,CAvDD;;;AAnHEzB,EAAAA,a;AACAC,EAAAA,W;AAGAI,EAAAA,Q;AACAC,EAAAA,Y;AACAC,EAAAA,S;AACAC,EAAAA,a;AAEAC,EAAAA,U;AACAE,EAAAA,O;AAfAc,IAAAA,I;AACAD,IAAAA,O;;AAeAd,EAAAA,I;AACApB,EAAAA,Q;;eAgKaS,iB","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { COLORS, ComponentTextStyle, ComponentXXS, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '..';\nimport { IconButton } from '../Button';\n\nexport interface ActionItem {\n icon: React.ReactNode;\n onClick: () => void;\n}\n\nexport interface CardBottomSectionProps {\n progressLevel?: number;\n progressMax?: number;\n progressType?: LinearProgressType;\n\n noteLeft?: string;\n noteLeftIcon?: React.ReactNode;\n noteRight?: string;\n noteRightIcon?: React.ReactNode;\n \n authorName?: string;\n actions?: ActionItem[];\n logo?: React.ReactNode;\n disabled: boolean;\n}\n\nconst ProgressContainer = styled.div`\n padding: 8px 0;\n`;\n\nconst NotesContainer = styled.div`\n height: 48px;\n position: relative;\n color: ${COLORS.neutral_500};\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst AuthorContainer = styled.div<{disabled: boolean}>`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n ${props => props.disabled ? `\n color: ${COLORS.neutral_300};\n svg, img {\n filter: grayscale(100%);\n }\n \n ` : ''}\n`;\n\nconst Divider = styled.div`\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n width: 100%;\n`;\n\nconst NoteLeft = styled.div`\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n`;\n\nconst NoteRight = styled.div`\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n`;\n\nconst ButtonRowContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n\n button:last-child{\n margin: 8px 0px 0px 0px;\n }\n\n button:not(:last-child) {\n margin: 8px 0px 0px 0px;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n`;\n\nconst Container = styled.div`\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n`;\n\nconst CardBottomSection: React.FunctionComponent<CardBottomSectionProps> = ({\n progressLevel,\n progressMax,\n progressType = LinearProgressType.Line,\n noteLeft,\n noteLeftIcon,\n noteRight,\n noteRightIcon,\n authorName,\n logo,\n actions,\n disabled\n}: CardBottomSectionProps) => {\n\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;\n return (\n <Container>\n {haveAtLeastSomething && <Divider />}\n {progressLevel != undefined && <ProgressContainer>\n <LinearProgress size={Size.Small}\n type={progressType}\n variant={LinearProgressVariant.Normal}\n value={progressLevel}\n max={progressMax ?? progressLevel} />\n </ProgressContainer>}\n\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <NotesContainer>\n {(noteLeft || noteLeftIcon) && (\n <NoteLeft>\n {noteLeftIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\n </NoteLeft>\n )}\n {(noteRight || noteRightIcon) && (\n <NoteRight>\n {noteRightIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\n </NoteRight>\n )}\n </NotesContainer>}\n\n {(authorName || logo) && <AuthorContainer disabled={disabled}>\n <ComponentXXS>{authorName}</ComponentXXS>\n {logo}\n </AuthorContainer>}\n\n {actions && <ButtonRowContainer>\n {actions.map(x => (\n <IconButton disabled={disabled} variant=\"secondary\" shape=\"circular\" action={(e) => {e?.stopPropagation(); x.onClick();}}>\n {x.icon}\n </IconButton>\n ))}\n </ButtonRowContainer>}\n </Container>\n );\n};\n\nexport default CardBottomSection;\n"],"file":"CardBottomSection.cjs"}
@@ -1,11 +1,10 @@
1
1
  import * as React from 'react';
2
- import { InteractionType, LinearProgressType } from '..';
2
+ import { LinearProgressType } from '..';
3
3
  export interface ActionItem {
4
4
  icon: React.ReactNode;
5
5
  onClick: () => void;
6
6
  }
7
7
  export interface CardBottomSectionProps {
8
- interactionType: InteractionType;
9
8
  progressLevel?: number;
10
9
  progressMax?: number;
11
10
  progressType?: LinearProgressType;
@@ -5,28 +5,23 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
5
5
 
6
6
  import * as React from 'react';
7
7
  import styled from 'styled-components';
8
- import { COLORS, ComponentTextStyle, ComponentXXS, InteractionType, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '..';
8
+ import { COLORS, ComponentTextStyle, ComponentXXS, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '..';
9
9
  import { IconButton } from '../Button';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
12
  var ProgressContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 8px 0;\n"])));
13
13
  var NotesContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 48px;\n position: relative;\n color: ", ";\n display: flex;\n flex-direction: row;\n align-items: center;\n"])), COLORS.neutral_500);
14
- var AuthorContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n }\n\n ", "\n"])), function (props) {
14
+ var AuthorContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n ", "\n"])), function (props) {
15
15
  return props.disabled ? "\n color: ".concat(COLORS.neutral_300, ";\n svg, img {\n filter: grayscale(100%);\n }\n \n ") : '';
16
16
  });
17
17
  var Divider = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-top: 1px;\n border-top-color: ", ";\n border-top-style: solid;\n width: 100%;\n"])), COLORS.neutral_100);
18
- var NoteLeft = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n"])));
19
- var NoteRight = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n"])));
18
+ var NoteLeft = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n"])));
19
+ var NoteRight = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n"])));
20
20
  var ButtonRowContainer = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px;\n border-top-color: ", ";\n border-top-style: solid;\n\n button:last-child{\n margin: 8px 0px 0px 0px;\n }\n\n button:not(:last-child) {\n margin: 8px 0px 0px 0px;\n }\n\n svg {\n color: ", ";\n }\n"])), COLORS.neutral_100, COLORS.neutral_600);
21
- var Container = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n cursor: ", ";\n\n ", " {\n ", "\n }\n"])), function (props) {
22
- return props.disabled ? 'not-allowed' : 'pointer';
23
- }, ButtonRowContainer, function (props) {
24
- return props.interactionType == InteractionType.Clickable ? "cursor: ".concat(props.disabled ? 'not-allowed' : 'auto', ";") : '';
25
- });
21
+ var Container = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n"])));
26
22
 
27
23
  var CardBottomSection = function CardBottomSection(_ref) {
28
- var interactionType = _ref.interactionType,
29
- progressLevel = _ref.progressLevel,
24
+ var progressLevel = _ref.progressLevel,
30
25
  progressMax = _ref.progressMax,
31
26
  _ref$progressType = _ref.progressType,
32
27
  progressType = _ref$progressType === void 0 ? LinearProgressType.Line : _ref$progressType,
@@ -40,8 +35,6 @@ var CardBottomSection = function CardBottomSection(_ref) {
40
35
  disabled = _ref.disabled;
41
36
  var haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;
42
37
  return /*#__PURE__*/_jsxs(Container, {
43
- disabled: disabled,
44
- interactionType: interactionType,
45
38
  children: [haveAtLeastSomething && /*#__PURE__*/_jsx(Divider, {}), progressLevel != undefined && /*#__PURE__*/_jsx(ProgressContainer, {
46
39
  children: /*#__PURE__*/_jsx(LinearProgress, {
47
40
  size: Size.Small,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Card/CardBottomSection.tsx"],"names":["React","styled","COLORS","ComponentTextStyle","ComponentXXS","InteractionType","LinearProgress","LinearProgressType","LinearProgressVariant","Size","IconButton","ProgressContainer","div","NotesContainer","neutral_500","AuthorContainer","props","disabled","neutral_300","Divider","neutral_100","NoteLeft","NoteRight","ButtonRowContainer","neutral_600","Container","interactionType","Clickable","CardBottomSection","progressLevel","progressMax","progressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","authorName","logo","actions","haveAtLeastSomething","undefined","Small","Normal","Bold","map","x","e","stopPropagation","onClick","icon"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,MAAT,EAAiBC,kBAAjB,EAAqCC,YAArC,EAAmDC,eAAnD,EAAoEC,cAApE,EAAoFC,kBAApF,EAAwGC,qBAAxG,EAA+HC,IAA/H,QAA2I,IAA3I;AAEA,SAASC,UAAT,QAA2B,WAA3B;;;AAwBA,IAAMC,iBAAiB,GAAGV,MAAM,CAACW,GAAV,0FAAvB;AAIA,IAAMC,cAAc,GAAGZ,MAAM,CAACW,GAAV,oMAGTV,MAAM,CAACY,WAHE,CAApB;AASA,IAAMC,eAAe,GAAGd,MAAM,CAACW,GAAV,6PAcjB,UAAAI,KAAK;AAAA,SAAIA,KAAK,CAACC,QAAN,0BACAf,MAAM,CAACgB,WADP,0EAMP,EANG;AAAA,CAdY,CAArB;AAuBA,IAAMC,OAAO,GAAGlB,MAAM,CAACW,GAAV,qKAESV,MAAM,CAACkB,WAFhB,CAAb;AAOA,IAAMC,QAAQ,GAAGpB,MAAM,CAACW,GAAV,wNAAd;AAYA,IAAMU,SAAS,GAAGrB,MAAM,CAACW,GAAV,yNAAf;AAYA,IAAMW,kBAAkB,GAAGtB,MAAM,CAACW,GAAV,oZAMFV,MAAM,CAACkB,WANL,EAkBXlB,MAAM,CAACsB,WAlBI,CAAxB;A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CAAC,WAAD,YAAAA,CAAC,CAAEC,eAAH;AAAsBF,YAAAA,CAAC,CAACG,OAAF;AAAa,WAAxH;AAAA,oBACGH,CAAC,CAACI;AADL,UADY;AAAA,OAAb;AADS,MA9Bd;AAAA,IADF;AAwCD,CAxDD;;;AAnHErB,EAAAA,a;AACAC,EAAAA,W;AAGAG,EAAAA,Q;AACAC,EAAAA,Y;AACAC,EAAAA,S;AACAC,EAAAA,a;AAEAC,EAAAA,U;AACAE,EAAAA,O;AAhBAW,IAAAA,I;AACAD,IAAAA,O;;AAgBAX,EAAAA,I;AACArB,EAAAA,Q;;AAiKF,eAAeW,iBAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { COLORS, ComponentTextStyle, ComponentXXS, InteractionType, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '..';\nimport { LaerdalLogo } from '../assets';\nimport { IconButton } from '../Button';\n\nexport interface ActionItem {\n icon: React.ReactNode;\n onClick: () => void;\n}\n\nexport interface CardBottomSectionProps {\n interactionType: InteractionType;\n progressLevel?: number;\n progressMax?: number;\n progressType?: LinearProgressType;\n\n noteLeft?: string;\n noteLeftIcon?: React.ReactNode;\n noteRight?: string;\n noteRightIcon?: React.ReactNode;\n \n authorName?: string;\n actions?: ActionItem[];\n logo?: React.ReactNode;\n disabled: boolean;\n}\n\nconst ProgressContainer = styled.div`\n padding: 8px 0;\n`;\n\nconst NotesContainer = styled.div`\n height: 48px;\n position: relative;\n color: ${COLORS.neutral_500};\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst AuthorContainer = styled.div<{disabled: boolean}>`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n }\n\n ${props => props.disabled ? `\n color: ${COLORS.neutral_300};\n svg, img {\n filter: grayscale(100%);\n }\n \n ` : ''}\n`;\n\nconst Divider = styled.div`\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n width: 100%;\n`;\n\nconst NoteLeft = styled.div`\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n`;\n\nconst NoteRight = styled.div`\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n }\n`;\n\nconst ButtonRowContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n\n button:last-child{\n margin: 8px 0px 0px 0px;\n }\n\n button:not(:last-child) {\n margin: 8px 0px 0px 0px;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n`;\n\nconst Container = styled.div<{interactionType: InteractionType; disabled: boolean}>`\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'};\n\n ${ButtonRowContainer} {\n ${props => props.interactionType == InteractionType.Clickable ? \n `cursor: ${props.disabled ? 'not-allowed' : 'auto'};` : ''}\n }\n`;\n\nconst CardBottomSection: React.FunctionComponent<CardBottomSectionProps> = ({\n interactionType,\n progressLevel,\n progressMax,\n progressType = LinearProgressType.Line,\n noteLeft,\n noteLeftIcon,\n noteRight,\n noteRightIcon,\n authorName,\n logo,\n actions,\n disabled\n}: CardBottomSectionProps) => {\n\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;\n return (\n <Container disabled={disabled} interactionType={interactionType}>\n {haveAtLeastSomething && <Divider />}\n {progressLevel != undefined && <ProgressContainer>\n <LinearProgress size={Size.Small}\n type={progressType}\n variant={LinearProgressVariant.Normal}\n value={progressLevel}\n max={progressMax ?? progressLevel} />\n </ProgressContainer>}\n\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <NotesContainer>\n {(noteLeft || noteLeftIcon) && (\n <NoteLeft>\n {noteLeftIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\n </NoteLeft>\n )}\n {(noteRight || noteRightIcon) && (\n <NoteRight>\n {noteRightIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\n </NoteRight>\n )}\n </NotesContainer>}\n\n {(authorName || logo) && <AuthorContainer disabled={disabled}>\n <ComponentXXS>{authorName}</ComponentXXS>\n {logo}\n </AuthorContainer>}\n\n {actions && <ButtonRowContainer>\n {actions.map(x => (\n <IconButton disabled={disabled} variant=\"secondary\" shape=\"circular\" action={(e) => {e?.stopPropagation(); x.onClick();}}>\n {x.icon}\n </IconButton>\n ))}\n </ButtonRowContainer>}\n </Container>\n );\n};\n\nexport default CardBottomSection;\n"],"file":"CardBottomSection.js"}
1
+ {"version":3,"sources":["../../src/Card/CardBottomSection.tsx"],"names":["React","styled","COLORS","ComponentTextStyle","ComponentXXS","LinearProgress","LinearProgressType","LinearProgressVariant","Size","IconButton","ProgressContainer","div","NotesContainer","neutral_500","AuthorContainer","props","disabled","neutral_300","Divider","neutral_100","NoteLeft","NoteRight","ButtonRowContainer","neutral_600","Container","CardBottomSection","progressLevel","progressMax","progressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","authorName","logo","actions","haveAtLeastSomething","undefined","Small","Normal","Bold","map","x","e","stopPropagation","onClick","icon"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,MAAT,EAAiBC,kBAAjB,EAAqCC,YAArC,EAAmDC,cAAnD,EAAmEC,kBAAnE,EAAuFC,qBAAvF,EAA8GC,IAA9G,QAA0H,IAA1H;AACA,SAASC,UAAT,QAA2B,WAA3B;;;AAuBA,IAAMC,iBAAiB,GAAGT,MAAM,CAACU,GAAV,0FAAvB;AAIA,IAAMC,cAAc,GAAGX,MAAM,CAACU,GAAV,oM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AAxC;AAAoD,UAAA,KAAK,EAAC,UAA1D;AAAqE,UAAA,MAAM,EAAE,gBAAC4B,CAAD,EAAO;AAACA,YAAAA,CAAC,SAAD,IAAAA,CAAC,WAAD,YAAAA,CAAC,CAAEC,eAAH;AAAsBF,YAAAA,CAAC,CAACG,OAAF;AAAa,WAAxH;AAAA,oBACGH,CAAC,CAACI;AADL,UADY;AAAA,OAAb;AADS,MA9Bd;AAAA,IADF;AAwCD,CAvDD;;;AAnHErB,EAAAA,a;AACAC,EAAAA,W;AAGAG,EAAAA,Q;AACAC,EAAAA,Y;AACAC,EAAAA,S;AACAC,EAAAA,a;AAEAC,EAAAA,U;AACAE,EAAAA,O;AAfAW,IAAAA,I;AACAD,IAAAA,O;;AAeAX,EAAAA,I;AACAnB,EAAAA,Q;;AAgKF,eAAeS,iBAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { COLORS, ComponentTextStyle, ComponentXXS, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '..';\nimport { IconButton } from '../Button';\n\nexport interface ActionItem {\n icon: React.ReactNode;\n onClick: () => void;\n}\n\nexport interface CardBottomSectionProps {\n progressLevel?: number;\n progressMax?: number;\n progressType?: LinearProgressType;\n\n noteLeft?: string;\n noteLeftIcon?: React.ReactNode;\n noteRight?: string;\n noteRightIcon?: React.ReactNode;\n \n authorName?: string;\n actions?: ActionItem[];\n logo?: React.ReactNode;\n disabled: boolean;\n}\n\nconst ProgressContainer = styled.div`\n padding: 8px 0;\n`;\n\nconst NotesContainer = styled.div`\n height: 48px;\n position: relative;\n color: ${COLORS.neutral_500};\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst AuthorContainer = styled.div<{disabled: boolean}>`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 48px;\n\n div:first-child {\n flex-grow: 2;\n }\n\n svg, img {\n width: 80px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n ${props => props.disabled ? `\n color: ${COLORS.neutral_300};\n svg, img {\n filter: grayscale(100%);\n }\n \n ` : ''}\n`;\n\nconst Divider = styled.div`\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n width: 100%;\n`;\n\nconst NoteLeft = styled.div`\n position: absolute;\n left: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n`;\n\nconst NoteRight = styled.div`\n position: absolute;\n right: 0px;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n svg {\n margin-right: 4px;\n flex-grow: 0;\n flex-shrink: 0;\n }\n`;\n\nconst ButtonRowContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n border-top: 1px;\n border-top-color: ${COLORS.neutral_100};\n border-top-style: solid;\n\n button:last-child{\n margin: 8px 0px 0px 0px;\n }\n\n button:not(:last-child) {\n margin: 8px 0px 0px 0px;\n }\n\n svg {\n color: ${COLORS.neutral_600};\n }\n`;\n\nconst Container = styled.div`\n padding: 0px 16px 8px 16px;\n width: calc(100% - 32px);\n`;\n\nconst CardBottomSection: React.FunctionComponent<CardBottomSectionProps> = ({\n progressLevel,\n progressMax,\n progressType = LinearProgressType.Line,\n noteLeft,\n noteLeftIcon,\n noteRight,\n noteRightIcon,\n authorName,\n logo,\n actions,\n disabled\n}: CardBottomSectionProps) => {\n\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName;\n return (\n <Container>\n {haveAtLeastSomething && <Divider />}\n {progressLevel != undefined && <ProgressContainer>\n <LinearProgress size={Size.Small}\n type={progressType}\n variant={LinearProgressVariant.Normal}\n value={progressLevel}\n max={progressMax ?? progressLevel} />\n </ProgressContainer>}\n\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <NotesContainer>\n {(noteLeft || noteLeftIcon) && (\n <NoteLeft>\n {noteLeftIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\n </NoteLeft>\n )}\n {(noteRight || noteRightIcon) && (\n <NoteRight>\n {noteRightIcon}\n <ComponentXXS color={COLORS.neutral_500} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\n </NoteRight>\n )}\n </NotesContainer>}\n\n {(authorName || logo) && <AuthorContainer disabled={disabled}>\n <ComponentXXS>{authorName}</ComponentXXS>\n {logo}\n </AuthorContainer>}\n\n {actions && <ButtonRowContainer>\n {actions.map(x => (\n <IconButton disabled={disabled} variant=\"secondary\" shape=\"circular\" action={(e) => {e?.stopPropagation(); x.onClick();}}>\n {x.icon}\n </IconButton>\n ))}\n </ButtonRowContainer>}\n </Container>\n );\n};\n\nexport default CardBottomSection;\n"],"file":"CardBottomSection.js"}
@@ -21,29 +21,24 @@ var _ = require("..");
21
21
 
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
 
24
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
24
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
25
25
 
26
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
27
 
28
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
29
 
30
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-grow: 1;\n width: calc(100% - 32px);\n position: relative;\n flex-direction: column;\n padding: 16px;\n gap: 8px;\n\n .descriptionBlock {\n padding: 2px 0;\n }\n\n .titleBlock {\n padding: 2px 0;\n }\n\n ", "\n"])), function (props) {
31
- return props.interactionType == _.InteractionType.Clickable ? "\n cursor: ".concat(props.disabled ? 'not-allowed' : 'pointer', ";\n ") : '';
32
- });
30
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-grow: 1;\n width: calc(100% - 32px);\n position: relative;\n flex-direction: column;\n padding: 16px;\n gap: 8px;\n\n .descriptionBlock {\n padding: 2px 0;\n }\n\n .titleBlock {\n padding: 2px 0;\n }\n"])));
33
31
 
34
32
  var ColorBand = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 100%;\n top: 0px;\n left: 0px;\n height: 8px;\n background-color: ", ";\n"])), function (props) {
35
33
  return props.$color;
36
34
  });
37
35
 
38
- var TagsContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n padding: 4px 0;\n gap: 4px;\n"])));
39
-
40
- var Tag = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: 4px 8px 4px 8px;\n background-color: ", ";\n margin-right: 4px;\n border-radius: 2px;\n"])), _.COLORS.neutral_100);
36
+ var TagsContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n padding: 4px 0;\n gap: 4px;\n flex-wrap: wrap;\n"])));
41
37
 
42
- var CategoryContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: none;\n gap: 6px;\n \n svg {\n margin-right: 6px;\n color: ", ";\n }\n"])), _.COLORS.neutral_500);
38
+ var CategoryContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: none;\n gap: 6px;\n \n svg {\n color: ", ";\n flex-grow: 0;\n flex-shrink: 0;\n }\n"])), _.COLORS.neutral_500);
43
39
 
44
40
  var CardMiddleSection = function CardMiddleSection(_ref) {
45
- var interactionType = _ref.interactionType,
46
- colorBandColor = _ref.colorBandColor,
41
+ var colorBandColor = _ref.colorBandColor,
47
42
  categoryIcon = _ref.categoryIcon,
48
43
  categoryLabel = _ref.categoryLabel,
49
44
  title = _ref.title,
@@ -51,8 +46,6 @@ var CardMiddleSection = function CardMiddleSection(_ref) {
51
46
  tags = _ref.tags,
52
47
  disabled = _ref.disabled;
53
48
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
54
- disabled: disabled,
55
- interactionType: interactionType,
56
49
  children: [colorBandColor && /*#__PURE__*/(0, _jsxRuntime.jsx)(ColorBand, {
57
50
  $color: colorBandColor
58
51
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(CategoryContainer, {
@@ -74,12 +67,8 @@ var CardMiddleSection = function CardMiddleSection(_ref) {
74
67
  children: description
75
68
  }), tags && /*#__PURE__*/(0, _jsxRuntime.jsx)(TagsContainer, {
76
69
  children: tags.map(function (x) {
77
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, {
78
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.ComponentXS, {
79
- textStyle: _.ComponentTextStyle.Bold,
80
- color: _.COLORS.neutral_600,
81
- children: x
82
- })
70
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Tag, {
71
+ label: x
83
72
  });
84
73
  })
85
74
  })]