@skodaflow/web-library 5.0.0 → 6.0.0

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 (325) hide show
  1. package/cjs/components/accordion/accordion.js +1 -1
  2. package/cjs/components/accordion/accordion.js.map +1 -1
  3. package/cjs/components/banner/banner.d.ts +13 -51
  4. package/cjs/components/banner/banner.js +1 -1
  5. package/cjs/components/banner/banner.js.map +1 -1
  6. package/cjs/components/button/button.d.ts +2 -1
  7. package/cjs/components/button/button.js +1 -1
  8. package/cjs/components/button/button.js.map +1 -1
  9. package/cjs/components/card/Card.d.ts +92 -0
  10. package/cjs/components/card/Card.js +2 -0
  11. package/cjs/components/card/Card.js.map +1 -0
  12. package/cjs/components/card/FlippingCard.d.ts +3 -0
  13. package/cjs/components/card/FlippingCard.js +2 -0
  14. package/cjs/components/card/FlippingCard.js.map +1 -0
  15. package/cjs/components/card/LinkCard.d.ts +3 -0
  16. package/cjs/components/card/LinkCard.js +2 -0
  17. package/cjs/components/card/LinkCard.js.map +1 -0
  18. package/cjs/components/card/SelectableCard.d.ts +3 -0
  19. package/cjs/components/card/SelectableCard.js +2 -0
  20. package/cjs/components/card/SelectableCard.js.map +1 -0
  21. package/cjs/components/card/SimpleCard.d.ts +3 -0
  22. package/cjs/components/card/SimpleCard.js +2 -0
  23. package/cjs/components/card/SimpleCard.js.map +1 -0
  24. package/cjs/components/card/index.d.ts +1 -0
  25. package/cjs/components/cardContainer/cardContainer.d.ts +1 -0
  26. package/cjs/components/cardContainer/cardContainer.js.map +1 -1
  27. package/cjs/components/cardMenu/cardMenu.d.ts +2 -1
  28. package/cjs/components/cardMenu/cardMenu.js +1 -1
  29. package/cjs/components/cardMenu/cardMenu.js.map +1 -1
  30. package/cjs/components/chip/chipDropdownChildren/chipDropdownChildren.js +1 -1
  31. package/cjs/components/chip/chipDropdownChildren/chipDropdownChildren.js.map +1 -1
  32. package/cjs/components/chip/chipMultiselect/multiSelectChip.d.ts +2 -1
  33. package/cjs/components/chip/chipMultiselect/multiSelectChip.js +1 -1
  34. package/cjs/components/chip/chipMultiselect/multiSelectChip.js.map +1 -1
  35. package/cjs/components/chip/regular/chip.d.ts +2 -1
  36. package/cjs/components/chip/regular/chip.js +1 -1
  37. package/cjs/components/chip/regular/chip.js.map +1 -1
  38. package/cjs/components/closeDialogButton/index.js +1 -1
  39. package/cjs/components/closeDialogButton/index.js.map +1 -1
  40. package/cjs/components/common/interface/textInputInterface.d.ts +2 -1
  41. package/cjs/components/controls/controls.d.ts +2 -1
  42. package/cjs/components/controls/controls.js +1 -1
  43. package/cjs/components/controls/controls.js.map +1 -1
  44. package/cjs/components/icon/icon.d.ts +11 -2
  45. package/cjs/components/icon/icon.definitions.d.ts +847 -0
  46. package/cjs/components/icon/icon.definitions.js +2 -0
  47. package/cjs/components/icon/icon.definitions.js.map +1 -0
  48. package/cjs/components/icon/icon.js +1 -1
  49. package/cjs/components/icon/icon.js.map +1 -1
  50. package/cjs/components/icon/index.d.ts +1 -1
  51. package/cjs/components/index.d.ts +1 -0
  52. package/cjs/components/indicator/indicator.d.ts +9 -3
  53. package/cjs/components/indicator/indicator.js +1 -18
  54. package/cjs/components/indicator/indicator.js.map +1 -1
  55. package/cjs/components/labelStatus/labelStatus.d.ts +1 -0
  56. package/cjs/components/labelStatus/labelStatus.js.map +1 -1
  57. package/cjs/components/menu/menu.js +1 -1
  58. package/cjs/components/menu/menu.js.map +1 -1
  59. package/cjs/components/mobileStepper/mobileStepperButton.js +1 -1
  60. package/cjs/components/mobileStepper/mobileStepperButton.js.map +1 -1
  61. package/cjs/components/modal/modal.js +1 -1
  62. package/cjs/components/modal/modal.js.map +1 -1
  63. package/cjs/components/pagination/pagination.js +1 -1
  64. package/cjs/components/pagination/pagination.js.map +1 -1
  65. package/cjs/components/progressBar/components/loader.js +1 -1
  66. package/cjs/components/progressBar/components/loader.js.map +1 -1
  67. package/cjs/components/progressBar/components/spinner.js +1 -1
  68. package/cjs/components/progressBar/components/spinner.js.map +1 -1
  69. package/cjs/components/selectInput/selectInput.d.ts +2 -1
  70. package/cjs/components/selectInput/selectInput.js +1 -1
  71. package/cjs/components/selectInput/selectInput.js.map +1 -1
  72. package/cjs/components/snackbar/snackbarMessage.js +1 -1
  73. package/cjs/components/snackbar/snackbarMessage.js.map +1 -1
  74. package/cjs/components/tab/hook/useTabs.d.ts +1 -0
  75. package/cjs/components/tab/hook/useTabs.js.map +1 -1
  76. package/cjs/components/tab/menuTab.d.ts +1 -0
  77. package/cjs/components/tab/menuTab.js +1 -1
  78. package/cjs/components/tab/menuTab.js.map +1 -1
  79. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js +1 -1
  80. package/cjs/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +1 -1
  81. package/cjs/components/tab/tab.d.ts +1 -0
  82. package/cjs/components/tab/tab.js.map +1 -1
  83. package/cjs/components/tab/tabPanel.d.ts +1 -0
  84. package/cjs/components/tab/tabPanel.js.map +1 -1
  85. package/cjs/components/tab/tabStyled.d.ts +1 -0
  86. package/cjs/components/tab/tabStyled.js.map +1 -1
  87. package/cjs/components/tab/tabs.d.ts +1 -0
  88. package/cjs/components/tab/tabs.js.map +1 -1
  89. package/cjs/components/textInput/textInput.js +1 -1
  90. package/cjs/components/textInput/textInput.js.map +1 -1
  91. package/cjs/components/upload/UploadField.d.ts +2 -2
  92. package/cjs/components/upload/UploadField.js +1 -1
  93. package/cjs/components/upload/UploadField.js.map +1 -1
  94. package/cjs/components/upload/UploadPreview.d.ts +1 -1
  95. package/cjs/components/upload/UploadPreviewList.d.ts +1 -1
  96. package/cjs/components/upload/UploadPreviewList.js +1 -1
  97. package/cjs/components/upload/UploadPreviewList.js.map +1 -1
  98. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  99. package/cjs/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  100. package/cjs/design/skoda/components/autocomplete.theme.js +1 -1
  101. package/cjs/design/skoda/components/autocomplete.theme.js.map +1 -1
  102. package/cjs/design/skoda/components/dialog/dialog.theme.js +1 -1
  103. package/cjs/design/skoda/components/dialog/dialog.theme.js.map +1 -1
  104. package/cjs/design/skoda/components/form/select.theme.js +1 -1
  105. package/cjs/design/skoda/components/form/select.theme.js.map +1 -1
  106. package/cjs/design/skoda/components/tabs/tabs.theme.js +1 -1
  107. package/cjs/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  108. package/cjs/index.js +1 -1
  109. package/cjs/layout/Footer/FooterAccordion.js +1 -1
  110. package/cjs/layout/Footer/FooterAccordion.js.map +1 -1
  111. package/cjs/layout/Footer/FooterIconButton.d.ts +2 -2
  112. package/cjs/layout/Footer/FooterIconButton.js +1 -1
  113. package/cjs/layout/Footer/FooterIconButton.js.map +1 -1
  114. package/cjs/layout/Footer/FooterLink.d.ts +2 -2
  115. package/cjs/layout/Footer/FooterLink.js +1 -1
  116. package/cjs/layout/Footer/FooterLink.js.map +1 -1
  117. package/cjs/layout/Footer/FooterMenu.js +1 -1
  118. package/cjs/layout/Footer/FooterMenu.js.map +1 -1
  119. package/cjs/layout/Header/HeaderButton.d.ts +3 -3
  120. package/cjs/layout/Header/HeaderButton.js +1 -1
  121. package/cjs/layout/Header/HeaderButton.js.map +1 -1
  122. package/cjs/layout/Header/PredefinedHeaderButtons.js +1 -1
  123. package/cjs/layout/Header/PredefinedHeaderButtons.js.map +1 -1
  124. package/cjs/layout/SideMenu/SideMenu.js +1 -1
  125. package/cjs/layout/SideMenu/SideMenu.js.map +1 -1
  126. package/cjs/layout/cookieModal/CookieModal.d.ts +69 -0
  127. package/cjs/layout/cookieModal/CookieModal.js +2 -0
  128. package/cjs/layout/cookieModal/CookieModal.js.map +1 -0
  129. package/cjs/layout/cookieModal/CookieModalItem.d.ts +37 -0
  130. package/cjs/layout/cookieModal/CookieModalItem.js +2 -0
  131. package/cjs/layout/cookieModal/CookieModalItem.js.map +1 -0
  132. package/cjs/layout/cookieModal/index.d.ts +2 -0
  133. package/cjs/layout/index.d.ts +1 -0
  134. package/cjs/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js +1 -1
  135. package/cjs/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js.map +1 -1
  136. package/cjs/organisms/carousel/carousel.d.ts +3 -2
  137. package/cjs/organisms/carousel/carouselTemplate.d.ts +2 -1
  138. package/cjs/organisms/carousel2/carousel2.d.ts +3 -2
  139. package/cjs/organisms/carousel2/components/NavButton.js +1 -1
  140. package/cjs/organisms/carousel2/components/NavButton.js.map +1 -1
  141. package/cjs/organisms/common/menuCardComponent/menuCardComponent.js +1 -1
  142. package/cjs/organisms/common/menuCardComponent/menuCardComponent.js.map +1 -1
  143. package/cjs/organisms/gallery/Gallery.js +1 -1
  144. package/cjs/organisms/gallery/Gallery.js.map +1 -1
  145. package/cjs/organisms/gallery/GalleryTrigger.js +1 -1
  146. package/cjs/organisms/gallery/GalleryTrigger.js.map +1 -1
  147. package/cjs/organisms/heroImageCard/videoCardController.js +1 -1
  148. package/cjs/organisms/heroImageCard/videoCardController.js.map +1 -1
  149. package/cjs/organisms/notification/Notification.js +1 -1
  150. package/cjs/organisms/notification/Notification.js.map +1 -1
  151. package/cjs/organisms/notification/NotificationCenterHeaderButton.d.ts +1 -1
  152. package/cjs/organisms/shortcutLink/shortcutLink.d.ts +2 -1
  153. package/cjs/organisms/shortcutLink/shortcutLink.js +1 -1
  154. package/cjs/organisms/shortcutLink/shortcutLink.js.map +1 -1
  155. package/cjs/organisms/textCta/textCta.d.ts +2 -1
  156. package/cjs/organisms/textCta/textCta.js +1 -1
  157. package/cjs/organisms/textCta/textCta.js.map +1 -1
  158. package/components/accordion/accordion.js +1 -1
  159. package/components/accordion/accordion.js.map +1 -1
  160. package/components/banner/banner.d.ts +13 -51
  161. package/components/banner/banner.js +1 -1
  162. package/components/banner/banner.js.map +1 -1
  163. package/components/button/button.d.ts +2 -1
  164. package/components/button/button.js +1 -1
  165. package/components/button/button.js.map +1 -1
  166. package/components/card/Card.d.ts +92 -0
  167. package/components/card/Card.js +2 -0
  168. package/components/card/Card.js.map +1 -0
  169. package/components/card/FlippingCard.d.ts +3 -0
  170. package/components/card/FlippingCard.js +2 -0
  171. package/components/card/FlippingCard.js.map +1 -0
  172. package/components/card/LinkCard.d.ts +3 -0
  173. package/components/card/LinkCard.js +2 -0
  174. package/components/card/LinkCard.js.map +1 -0
  175. package/components/card/SelectableCard.d.ts +3 -0
  176. package/components/card/SelectableCard.js +2 -0
  177. package/components/card/SelectableCard.js.map +1 -0
  178. package/components/card/SimpleCard.d.ts +3 -0
  179. package/components/card/SimpleCard.js +2 -0
  180. package/components/card/SimpleCard.js.map +1 -0
  181. package/components/card/index.d.ts +1 -0
  182. package/components/cardContainer/cardContainer.d.ts +1 -0
  183. package/components/cardContainer/cardContainer.js.map +1 -1
  184. package/components/cardMenu/cardMenu.d.ts +2 -1
  185. package/components/cardMenu/cardMenu.js +1 -1
  186. package/components/cardMenu/cardMenu.js.map +1 -1
  187. package/components/chip/chipDropdownChildren/chipDropdownChildren.js +1 -1
  188. package/components/chip/chipDropdownChildren/chipDropdownChildren.js.map +1 -1
  189. package/components/chip/chipMultiselect/multiSelectChip.d.ts +2 -1
  190. package/components/chip/chipMultiselect/multiSelectChip.js +1 -1
  191. package/components/chip/chipMultiselect/multiSelectChip.js.map +1 -1
  192. package/components/chip/regular/chip.d.ts +2 -1
  193. package/components/chip/regular/chip.js +1 -1
  194. package/components/chip/regular/chip.js.map +1 -1
  195. package/components/closeDialogButton/index.js +1 -1
  196. package/components/closeDialogButton/index.js.map +1 -1
  197. package/components/common/interface/textInputInterface.d.ts +2 -1
  198. package/components/controls/controls.d.ts +2 -1
  199. package/components/controls/controls.js +1 -1
  200. package/components/controls/controls.js.map +1 -1
  201. package/components/icon/icon.d.ts +11 -2
  202. package/components/icon/icon.definitions.d.ts +847 -0
  203. package/components/icon/icon.definitions.js +2 -0
  204. package/components/icon/icon.definitions.js.map +1 -0
  205. package/components/icon/icon.js +1 -1
  206. package/components/icon/icon.js.map +1 -1
  207. package/components/icon/index.d.ts +1 -1
  208. package/components/index.d.ts +1 -0
  209. package/components/indicator/indicator.d.ts +9 -3
  210. package/components/indicator/indicator.js +1 -18
  211. package/components/indicator/indicator.js.map +1 -1
  212. package/components/labelStatus/labelStatus.d.ts +1 -0
  213. package/components/labelStatus/labelStatus.js.map +1 -1
  214. package/components/menu/menu.js +1 -1
  215. package/components/menu/menu.js.map +1 -1
  216. package/components/mobileStepper/mobileStepperButton.js +1 -1
  217. package/components/mobileStepper/mobileStepperButton.js.map +1 -1
  218. package/components/modal/modal.js +1 -1
  219. package/components/modal/modal.js.map +1 -1
  220. package/components/pagination/pagination.js +1 -1
  221. package/components/pagination/pagination.js.map +1 -1
  222. package/components/progressBar/components/loader.js +1 -1
  223. package/components/progressBar/components/loader.js.map +1 -1
  224. package/components/progressBar/components/spinner.js +1 -1
  225. package/components/progressBar/components/spinner.js.map +1 -1
  226. package/components/selectInput/selectInput.d.ts +2 -1
  227. package/components/selectInput/selectInput.js +1 -1
  228. package/components/selectInput/selectInput.js.map +1 -1
  229. package/components/snackbar/snackbarMessage.js +1 -1
  230. package/components/snackbar/snackbarMessage.js.map +1 -1
  231. package/components/tab/hook/useTabs.d.ts +1 -0
  232. package/components/tab/hook/useTabs.js.map +1 -1
  233. package/components/tab/menuTab.d.ts +1 -0
  234. package/components/tab/menuTab.js +1 -1
  235. package/components/tab/menuTab.js.map +1 -1
  236. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js +1 -1
  237. package/components/tab/secondaryNavigation/secondaryNavigationTabs.js.map +1 -1
  238. package/components/tab/tab.d.ts +1 -0
  239. package/components/tab/tab.js.map +1 -1
  240. package/components/tab/tabPanel.d.ts +1 -0
  241. package/components/tab/tabPanel.js.map +1 -1
  242. package/components/tab/tabStyled.d.ts +1 -0
  243. package/components/tab/tabStyled.js.map +1 -1
  244. package/components/tab/tabs.d.ts +1 -0
  245. package/components/tab/tabs.js.map +1 -1
  246. package/components/textInput/textInput.js +1 -1
  247. package/components/textInput/textInput.js.map +1 -1
  248. package/components/upload/UploadField.d.ts +2 -2
  249. package/components/upload/UploadField.js +1 -1
  250. package/components/upload/UploadField.js.map +1 -1
  251. package/components/upload/UploadPreview.d.ts +1 -1
  252. package/components/upload/UploadPreviewList.d.ts +1 -1
  253. package/components/upload/UploadPreviewList.js +1 -1
  254. package/components/upload/UploadPreviewList.js.map +1 -1
  255. package/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
  256. package/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
  257. package/design/skoda/components/autocomplete.theme.js +1 -1
  258. package/design/skoda/components/autocomplete.theme.js.map +1 -1
  259. package/design/skoda/components/dialog/dialog.theme.js +1 -1
  260. package/design/skoda/components/dialog/dialog.theme.js.map +1 -1
  261. package/design/skoda/components/form/select.theme.js +1 -1
  262. package/design/skoda/components/form/select.theme.js.map +1 -1
  263. package/design/skoda/components/tabs/tabs.theme.js +1 -1
  264. package/design/skoda/components/tabs/tabs.theme.js.map +1 -1
  265. package/eula.txt +40 -0
  266. package/index.js +1 -1
  267. package/layout/Footer/FooterAccordion.js +1 -1
  268. package/layout/Footer/FooterAccordion.js.map +1 -1
  269. package/layout/Footer/FooterIconButton.d.ts +2 -2
  270. package/layout/Footer/FooterIconButton.js +1 -1
  271. package/layout/Footer/FooterIconButton.js.map +1 -1
  272. package/layout/Footer/FooterLink.d.ts +2 -2
  273. package/layout/Footer/FooterLink.js +1 -1
  274. package/layout/Footer/FooterLink.js.map +1 -1
  275. package/layout/Footer/FooterMenu.js +1 -1
  276. package/layout/Footer/FooterMenu.js.map +1 -1
  277. package/layout/Header/HeaderButton.d.ts +3 -3
  278. package/layout/Header/HeaderButton.js +1 -1
  279. package/layout/Header/HeaderButton.js.map +1 -1
  280. package/layout/Header/PredefinedHeaderButtons.js +1 -1
  281. package/layout/Header/PredefinedHeaderButtons.js.map +1 -1
  282. package/layout/SideMenu/SideMenu.js +1 -1
  283. package/layout/SideMenu/SideMenu.js.map +1 -1
  284. package/layout/cookieModal/CookieModal.d.ts +69 -0
  285. package/layout/cookieModal/CookieModal.js +2 -0
  286. package/layout/cookieModal/CookieModal.js.map +1 -0
  287. package/layout/cookieModal/CookieModalItem.d.ts +37 -0
  288. package/layout/cookieModal/CookieModalItem.js +2 -0
  289. package/layout/cookieModal/CookieModalItem.js.map +1 -0
  290. package/layout/cookieModal/index.d.ts +2 -0
  291. package/layout/index.d.ts +1 -0
  292. package/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js +1 -1
  293. package/organisms/cardOwnedVehicle/cardOwnedVehicleComponent.js.map +1 -1
  294. package/organisms/carousel/carousel.d.ts +3 -2
  295. package/organisms/carousel/carouselTemplate.d.ts +2 -1
  296. package/organisms/carousel2/carousel2.d.ts +3 -2
  297. package/organisms/carousel2/components/NavButton.js +1 -1
  298. package/organisms/carousel2/components/NavButton.js.map +1 -1
  299. package/organisms/common/menuCardComponent/menuCardComponent.js +1 -1
  300. package/organisms/common/menuCardComponent/menuCardComponent.js.map +1 -1
  301. package/organisms/gallery/Gallery.js +1 -1
  302. package/organisms/gallery/Gallery.js.map +1 -1
  303. package/organisms/gallery/GalleryTrigger.js +1 -1
  304. package/organisms/gallery/GalleryTrigger.js.map +1 -1
  305. package/organisms/heroImageCard/videoCardController.js +1 -1
  306. package/organisms/heroImageCard/videoCardController.js.map +1 -1
  307. package/organisms/notification/Notification.js +1 -1
  308. package/organisms/notification/Notification.js.map +1 -1
  309. package/organisms/notification/NotificationCenterHeaderButton.d.ts +1 -1
  310. package/organisms/shortcutLink/shortcutLink.d.ts +2 -1
  311. package/organisms/shortcutLink/shortcutLink.js +1 -1
  312. package/organisms/shortcutLink/shortcutLink.js.map +1 -1
  313. package/organisms/textCta/textCta.d.ts +2 -1
  314. package/organisms/textCta/textCta.js +1 -1
  315. package/organisms/textCta/textCta.js.map +1 -1
  316. package/package.json +1 -1
  317. package/theme/skoda/icons.css +1 -1
  318. package/cjs/components/icon/availableIcons.d.ts +0 -1
  319. package/cjs/components/icon/availableIcons.js +0 -2
  320. package/cjs/components/icon/availableIcons.js.map +0 -1
  321. package/cjs/components/tab/examples.d.ts +0 -3
  322. package/components/icon/availableIcons.d.ts +0 -1
  323. package/components/icon/availableIcons.js +0 -2
  324. package/components/icon/availableIcons.js.map +0 -1
  325. package/components/tab/examples.d.ts +0 -3
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../components/icon/icon.js"),i=require("@emotion/styled"),n=require("@mui/material/styles");function o(e){return e&&e.__esModule?e:{default:e}}const s=o(i).default("div")((({theme:e})=>{let t={};return t={[e.breakpoints.up("md")]:Object.assign(Object.assign({},t),{position:"absolute",zIndex:1e3,cursor:"pointer",bottom:"24px",right:"24px","& > div":{width:"44px",height:"44px",borderRadius:"100%",textAlign:"center",border:`2.5px solid ${e.palette.background.primary}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","& > .MuiIcon-root":{color:e.palette.background.primary,width:"20px",height:"20px",fontSize:"22px"}}}),[e.breakpoints.down("md")]:{position:"absolute",zIndex:1e3,left:"50%",top:"50%",width:"312px",height:"132px",transform:" translate(-50%, -50%)",transitionDelay:"2s",transitionDuration:"0.3s",transitionProperty:"opacity",transitionTimingFunction:"ease-out","& > div":{position:"absolute",left:"50%",top:"50%",transform:" translate(-50%, -50%)",width:"44px",height:"44px",margin:"0 auto",borderRadius:"100%",textAlign:"center",border:`2.5px solid ${e.palette.background.primary}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","& > .MuiIcon-root":{color:e.palette.background.primary,width:"20px",height:"20px",fontSize:"22px"}}}},t}));exports.default=({videoRef:i,playPauseCallback:o})=>{const[a,l]=t.useState(!1),u=t.useRef(null),p=n.useTheme(),c=t.useCallback((e=>{a?(o&&o("play",e),i.current.play()):(o&&o("pause",e),i.current.pause()),l(!a)}),[a,o,i]);return t.useEffect((()=>{window.innerWidth<p.breakpoints.values.md&&(i.current.pause(),l(!0))}),[i,p.breakpoints.values.md]),t.useEffect((()=>{window.innerWidth<p.breakpoints.values.md?a?(u.current.style.transitionDelay="0s",u.current.style.opacity=1):(u.current.style.transitionDelay="2s",u.current.style.opacity=0):(u.current.style.transitionDelay="0s",u.current.style.opacity=1)}),[a,p.breakpoints.values.md]),e.jsx(s,{ref:u,onClick:e=>c(e),children:e.jsx("div",{children:e.jsx(r.Icon,{className:a?"play-right":"pause"})})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../components/icon/icon.js");require("../../components/icon/icon.definitions.js");var i=require("@emotion/styled"),n=require("@mui/material/styles");function o(e){return e&&e.__esModule?e:{default:e}}const s=o(i).default("div")((({theme:e})=>{let t={};return t={[e.breakpoints.up("md")]:Object.assign(Object.assign({},t),{position:"absolute",zIndex:1e3,cursor:"pointer",bottom:"24px",right:"24px","& > div":{width:"44px",height:"44px",borderRadius:"100%",textAlign:"center",border:`2.5px solid ${e.palette.background.primary}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","& > .MuiIcon-root":{color:e.palette.background.primary,width:"20px",height:"20px",fontSize:"22px"}}}),[e.breakpoints.down("md")]:{position:"absolute",zIndex:1e3,left:"50%",top:"50%",width:"312px",height:"132px",transform:" translate(-50%, -50%)",transitionDelay:"2s",transitionDuration:"0.3s",transitionProperty:"opacity",transitionTimingFunction:"ease-out","& > div":{position:"absolute",left:"50%",top:"50%",transform:" translate(-50%, -50%)",width:"44px",height:"44px",margin:"0 auto",borderRadius:"100%",textAlign:"center",border:`2.5px solid ${e.palette.background.primary}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center","& > .MuiIcon-root":{color:e.palette.background.primary,width:"20px",height:"20px",fontSize:"22px"}}}},t}));exports.default=({videoRef:i,playPauseCallback:o})=>{const[a,u]=t.useState(!1),l=t.useRef(null),p=n.useTheme(),c=t.useCallback((e=>{a?(o&&o("play",e),i.current.play()):(o&&o("pause",e),i.current.pause()),u(!a)}),[a,o,i]);return t.useEffect((()=>{window.innerWidth<p.breakpoints.values.md&&(i.current.pause(),u(!0))}),[i,p.breakpoints.values.md]),t.useEffect((()=>{window.innerWidth<p.breakpoints.values.md?a?(l.current.style.transitionDelay="0s",l.current.style.opacity=1):(l.current.style.transitionDelay="2s",l.current.style.opacity=0):(l.current.style.transitionDelay="0s",l.current.style.opacity=1)}),[a,p.breakpoints.values.md]),e.jsx(s,{ref:l,onClick:e=>c(e),children:e.jsx("div",{children:e.jsx(r.Icon,{name:a?"play":"pause"})})})};
2
2
  //# sourceMappingURL=videoCardController.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"videoCardController.js","sources":["../../../../src/organisms/heroImageCard/videoCardController.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { Icon } from '../../components/icon';\nimport styled from '@emotion/styled';\nimport { useTheme } from '@mui/material/styles';\nconst VideoCardController = ({ videoRef, playPauseCallback }) => {\n const [isPaused, setIsPaused] = useState(false);\n const videoControllerRef = useRef(null);\n const theme = useTheme();\n //When the videoController is clicked, pause or play the video\n const handlePlayClick = useCallback((event) => {\n if (isPaused) {\n playPauseCallback && playPauseCallback('play', event);\n videoRef.current.play();\n }\n else {\n playPauseCallback && playPauseCallback('pause', event);\n videoRef.current.pause();\n }\n setIsPaused(!isPaused);\n }, [isPaused, playPauseCallback, videoRef]);\n //set the video puased as default if we are on mobile view\n useEffect(() => {\n if (window.innerWidth < theme.breakpoints.values.md) {\n videoRef.current.pause();\n setIsPaused(true);\n }\n }, [videoRef, theme.breakpoints.values.md]);\n //Add the transition effect from play to pause if on mobile view\n useEffect(() => {\n if (window.innerWidth < theme.breakpoints.values.md) {\n if (isPaused) {\n videoControllerRef.current.style.transitionDelay = '0s';\n videoControllerRef.current.style.opacity = 1;\n }\n else {\n videoControllerRef.current.style.transitionDelay = '2s';\n videoControllerRef.current.style.opacity = 0;\n }\n }\n else {\n videoControllerRef.current.style.transitionDelay = '0s';\n videoControllerRef.current.style.opacity = 1;\n }\n }, [isPaused, theme.breakpoints.values.md]);\n return (_jsx(VideoControllerStyled, { ref: videoControllerRef, onClick: (event) => handlePlayClick(event), children: _jsx(\"div\", { children: _jsx(Icon, { className: isPaused ? 'play-right' : 'pause' }) }) }));\n};\nconst VideoControllerStyled = styled('div')(({ theme }) => {\n let style = {};\n style = {\n [theme.breakpoints.up('md')]: Object.assign(Object.assign({}, style), { position: 'absolute', zIndex: 1000, cursor: 'pointer', bottom: '24px', right: '24px', '& > div': {\n width: '44px',\n height: '44px',\n borderRadius: '100%',\n textAlign: 'center',\n border: `2.5px solid ${theme.palette.background.primary}`,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n '& > .MuiIcon-root': {\n color: theme.palette.background.primary,\n width: '20px',\n height: '20px',\n fontSize: '22px',\n },\n } }),\n [theme.breakpoints.down('md')]: {\n position: 'absolute',\n zIndex: 1000,\n left: '50%',\n top: '50%',\n width: '312px',\n height: '132px',\n transform: ' translate(-50%, -50%)',\n transitionDelay: '2s',\n transitionDuration: '0.3s',\n transitionProperty: 'opacity',\n transitionTimingFunction: 'ease-out',\n '& > div': {\n position: 'absolute',\n left: '50%',\n top: '50%',\n transform: ' translate(-50%, -50%)',\n width: '44px',\n height: '44px',\n margin: '0 auto',\n borderRadius: '100%',\n textAlign: 'center',\n border: `2.5px solid ${theme.palette.background.primary}`,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n '& > .MuiIcon-root': {\n color: theme.palette.background.primary,\n width: '20px',\n height: '20px',\n fontSize: '22px',\n },\n },\n },\n };\n return style;\n});\nexport default VideoCardController;\n//# sourceMappingURL=videoCardController.js.map"],"names":["VideoControllerStyled","styled","theme","style","breakpoints","up","Object","assign","position","zIndex","cursor","bottom","right","width","height","borderRadius","textAlign","border","palette","background","primary","display","flexDirection","alignItems","justifyContent","color","fontSize","down","left","top","transform","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","margin","videoRef","playPauseCallback","isPaused","setIsPaused","useState","videoControllerRef","useRef","useTheme","handlePlayClick","useCallback","event","current","play","pause","useEffect","window","innerWidth","values","md","opacity","_jsx","ref","onClick","children","Icon","className"],"mappings":"uRAKK,MA0CCA,OAAwBC,QAAO,MAAPA,EAAc,EAAGC,YAC3C,IAAIC,EAAQ,CAAA,EAuDZ,OAtDAA,EAAQ,CACJ,CAACD,EAAME,YAAYC,GAAG,OAAQC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIJ,GAAQ,CAAEK,SAAU,WAAYC,OAAQ,IAAMC,OAAQ,UAAWC,OAAQ,OAAQC,MAAO,OAAQ,UAAW,CACjKC,MAAO,OACPC,OAAQ,OACRC,aAAc,OACdC,UAAW,SACXC,OAAQ,eAAef,EAAMgB,QAAQC,WAAWC,UAChDC,QAAS,OACTC,cAAe,SACfC,WAAY,SACZC,eAAgB,SAChB,oBAAqB,CACjBC,MAAOvB,EAAMgB,QAAQC,WAAWC,QAChCP,MAAO,OACPC,OAAQ,OACRY,SAAU,WAGtB,CAACxB,EAAME,YAAYuB,KAAK,OAAQ,CAC5BnB,SAAU,WACVC,OAAQ,IACRmB,KAAM,MACNC,IAAK,MACLhB,MAAO,QACPC,OAAQ,QACRgB,UAAW,yBACXC,gBAAiB,KACjBC,mBAAoB,OACpBC,mBAAoB,UACpBC,yBAA0B,WAC1B,UAAW,CACP1B,SAAU,WACVoB,KAAM,MACNC,IAAK,MACLC,UAAW,yBACXjB,MAAO,OACPC,OAAQ,OACRqB,OAAQ,SACRpB,aAAc,OACdC,UAAW,SACXC,OAAQ,eAAef,EAAMgB,QAAQC,WAAWC,UAChDC,QAAS,OACTC,cAAe,SACfC,WAAY,SACZC,eAAgB,SAChB,oBAAqB,CACjBC,MAAOvB,EAAMgB,QAAQC,WAAWC,QAChCP,MAAO,OACPC,OAAQ,OACRY,SAAU,WAKnBvB,CAAK,oBAlGY,EAAGiC,WAAUC,wBACrC,MAAOC,EAAUC,GAAeC,EAAQA,UAAC,GACnCC,EAAqBC,SAAO,MAC5BxC,EAAQyC,EAAAA,WAERC,EAAkBC,eAAaC,IAC7BR,GACAD,GAAqBA,EAAkB,OAAQS,GAC/CV,EAASW,QAAQC,SAGjBX,GAAqBA,EAAkB,QAASS,GAChDV,EAASW,QAAQE,SAErBV,GAAaD,EAAS,GACvB,CAACA,EAAUD,EAAmBD,IAyBjC,OAvBAc,EAAAA,WAAU,KACFC,OAAOC,WAAalD,EAAME,YAAYiD,OAAOC,KAC7ClB,EAASW,QAAQE,QACjBV,GAAY,GACf,GACF,CAACH,EAAUlC,EAAME,YAAYiD,OAAOC,KAEvCJ,EAAAA,WAAU,KACFC,OAAOC,WAAalD,EAAME,YAAYiD,OAAOC,GACzChB,GACAG,EAAmBM,QAAQ5C,MAAM4B,gBAAkB,KACnDU,EAAmBM,QAAQ5C,MAAMoD,QAAU,IAG3Cd,EAAmBM,QAAQ5C,MAAM4B,gBAAkB,KACnDU,EAAmBM,QAAQ5C,MAAMoD,QAAU,IAI/Cd,EAAmBM,QAAQ5C,MAAM4B,gBAAkB,KACnDU,EAAmBM,QAAQ5C,MAAMoD,QAAU,EAC9C,GACF,CAACjB,EAAUpC,EAAME,YAAYiD,OAAOC,KAC/BE,MAAKxD,EAAuB,CAAEyD,IAAKhB,EAAoBiB,QAAUZ,GAAUF,EAAgBE,GAAQa,SAAUH,EAAAA,IAAK,MAAO,CAAEG,SAAUH,MAAKI,EAAAA,KAAM,CAAEC,UAAWvB,EAAW,aAAe,aAAkB"}
1
+ {"version":3,"file":"videoCardController.js","sources":["../../../../src/organisms/heroImageCard/videoCardController.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { Icon } from '../../components/icon';\nimport styled from '@emotion/styled';\nimport { useTheme } from '@mui/material/styles';\nconst VideoCardController = ({ videoRef, playPauseCallback }) => {\n const [isPaused, setIsPaused] = useState(false);\n const videoControllerRef = useRef(null);\n const theme = useTheme();\n //When the videoController is clicked, pause or play the video\n const handlePlayClick = useCallback((event) => {\n if (isPaused) {\n playPauseCallback && playPauseCallback('play', event);\n videoRef.current.play();\n }\n else {\n playPauseCallback && playPauseCallback('pause', event);\n videoRef.current.pause();\n }\n setIsPaused(!isPaused);\n }, [isPaused, playPauseCallback, videoRef]);\n //set the video puased as default if we are on mobile view\n useEffect(() => {\n if (window.innerWidth < theme.breakpoints.values.md) {\n videoRef.current.pause();\n setIsPaused(true);\n }\n }, [videoRef, theme.breakpoints.values.md]);\n //Add the transition effect from play to pause if on mobile view\n useEffect(() => {\n if (window.innerWidth < theme.breakpoints.values.md) {\n if (isPaused) {\n videoControllerRef.current.style.transitionDelay = '0s';\n videoControllerRef.current.style.opacity = 1;\n }\n else {\n videoControllerRef.current.style.transitionDelay = '2s';\n videoControllerRef.current.style.opacity = 0;\n }\n }\n else {\n videoControllerRef.current.style.transitionDelay = '0s';\n videoControllerRef.current.style.opacity = 1;\n }\n }, [isPaused, theme.breakpoints.values.md]);\n return (_jsx(VideoControllerStyled, { ref: videoControllerRef, onClick: (event) => handlePlayClick(event), children: _jsx(\"div\", { children: _jsx(Icon, { name: isPaused ? 'play' : 'pause' }) }) }));\n};\nconst VideoControllerStyled = styled('div')(({ theme }) => {\n let style = {};\n style = {\n [theme.breakpoints.up('md')]: Object.assign(Object.assign({}, style), { position: 'absolute', zIndex: 1000, cursor: 'pointer', bottom: '24px', right: '24px', '& > div': {\n width: '44px',\n height: '44px',\n borderRadius: '100%',\n textAlign: 'center',\n border: `2.5px solid ${theme.palette.background.primary}`,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n '& > .MuiIcon-root': {\n color: theme.palette.background.primary,\n width: '20px',\n height: '20px',\n fontSize: '22px',\n },\n } }),\n [theme.breakpoints.down('md')]: {\n position: 'absolute',\n zIndex: 1000,\n left: '50%',\n top: '50%',\n width: '312px',\n height: '132px',\n transform: ' translate(-50%, -50%)',\n transitionDelay: '2s',\n transitionDuration: '0.3s',\n transitionProperty: 'opacity',\n transitionTimingFunction: 'ease-out',\n '& > div': {\n position: 'absolute',\n left: '50%',\n top: '50%',\n transform: ' translate(-50%, -50%)',\n width: '44px',\n height: '44px',\n margin: '0 auto',\n borderRadius: '100%',\n textAlign: 'center',\n border: `2.5px solid ${theme.palette.background.primary}`,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n '& > .MuiIcon-root': {\n color: theme.palette.background.primary,\n width: '20px',\n height: '20px',\n fontSize: '22px',\n },\n },\n },\n };\n return style;\n});\nexport default VideoCardController;\n//# sourceMappingURL=videoCardController.js.map"],"names":["VideoControllerStyled","styled","theme","style","breakpoints","up","Object","assign","position","zIndex","cursor","bottom","right","width","height","borderRadius","textAlign","border","palette","background","primary","display","flexDirection","alignItems","justifyContent","color","fontSize","down","left","top","transform","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","margin","videoRef","playPauseCallback","isPaused","setIsPaused","useState","videoControllerRef","useRef","useTheme","handlePlayClick","useCallback","event","current","play","pause","useEffect","window","innerWidth","values","md","opacity","_jsx","ref","onClick","children","Icon","name"],"mappings":"gVAKK,MA0CCA,OAAwBC,QAAO,MAAPA,EAAc,EAAGC,YAC3C,IAAIC,EAAQ,CAAA,EAuDZ,OAtDAA,EAAQ,CACJ,CAACD,EAAME,YAAYC,GAAG,OAAQC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIJ,GAAQ,CAAEK,SAAU,WAAYC,OAAQ,IAAMC,OAAQ,UAAWC,OAAQ,OAAQC,MAAO,OAAQ,UAAW,CACjKC,MAAO,OACPC,OAAQ,OACRC,aAAc,OACdC,UAAW,SACXC,OAAQ,eAAef,EAAMgB,QAAQC,WAAWC,UAChDC,QAAS,OACTC,cAAe,SACfC,WAAY,SACZC,eAAgB,SAChB,oBAAqB,CACjBC,MAAO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AAkB,KACnDU,EAAmBM,QAAQ5C,MAAMoD,QAAU,IAI/Cd,EAAmBM,QAAQ5C,MAAM4B,gBAAkB,KACnDU,EAAmBM,QAAQ5C,MAAMoD,QAAU,EAC9C,GACF,CAACjB,EAAUpC,EAAME,YAAYiD,OAAOC,KAC/BE,MAAKxD,EAAuB,CAAEyD,IAAKhB,EAAoBiB,QAAUZ,GAAUF,EAAgBE,GAAQa,SAAUH,EAAAA,IAAK,MAAO,CAAEG,SAAUH,MAAKI,EAAAA,KAAM,CAAEC,KAAMvB,EAAW,OAAS,aAAkB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime");require("../../components/accordion/accordion.js"),require("../../components/backdrop/backdrop.js"),require("../../components/button/button.js"),require("../../components/banner/banner.js"),require("../../components/cardContainer/cardContainer.js"),require("../../components/cardMenu/cardMenu.js"),require("../../components/checkbox/checkbox.js"),require("../../components/chip/chipImage/chipImage.js"),require("../../components/chip/regular/chip.js"),require("../../components/chip/chipMultiselect/multiSelectChip.js"),require("../../components/chip/chipDropdownChildren/chipDropdownChildren.js"),require("@mui/material/Container"),require("../../components/controls/controls.js"),require("../../components/divider/divider.js"),require("../../components/drawer/drawer.js"),require("../../components/flag/flag.js"),require("tslib"),require("@mui/material/Grid"),require("../../components/icon/icon.js");var r=require("../../components/indicator/indicator.js");require("../../components/label/label.js"),require("../../components/labelCO2/labelCO2.js"),require("../../components/labelFeature/labelFeature.js"),require("../../components/labelPromotional/labelPromotional.js"),require("../../components/labelStatus/labelStatus.js"),require("../../components/menu/menu.js"),require("@mui/material/MenuItem");var o=require("@mui/material");require("@mui/material/MobileStepper"),require("react"),require("../../components/mobileStepper/mobileStepperButton.js"),require("../../components/modal/modal.js"),require("../../components/modal/modalTitle.js"),require("../../components/numbering/numbering.js"),require("../../components/pagination/pagination.js"),require("../../components/progressBar/progressBar.js"),require("../../components/radioButton/radioButton.js"),require("../../components/selectInput/selectInput.js"),require("../../components/slider/slider.js"),require("../../components/snackbar/snackbar.js"),require("../../components/stepper/stepper.js"),require("../../components/tab/tab.js"),require("../../components/tab/tabs.js"),require("../../components/tab/secondaryNavigation/secondaryNavigationTabs.js"),require("../../components/textArea/textArea.js"),require("../../components/common/styled/textFieldStyled.js"),require("../../components/helperTextContent/index.js"),require("lodash/noop"),require("../../components/toggleSwitch/toggleSwitch.js"),require("../../components/agGrid/agGrid.js"),require("../../components/avatar/Avatar.js"),require("../../components/iconButton/index.js"),require("../../components/alert/AlertButton.js"),require("../gallery/Gallery.js"),require("../gallery/GalleryItem.js"),require("@mui/material/styles"),require("../../design/skoda/palette.theme.js"),require("../../design/skoda/components/accordion/accordionSummary.theme.js"),require("../../design/skoda/components/autocomplete.theme.js"),require("../../design/skoda/components/backdrop.theme.js"),require("@skodaflow/web-tokens/src/tokens.json"),require("@mui/system"),require("../../design/skoda/theme.breakpoints.js"),require("../../design/skoda/theme.constants.js"),require("@mui/x-date-pickers/internals"),require("../../design/skoda/components/divider.theme.js"),require("../../design/skoda/components/drawer.theme.js"),require("../../design/skoda/components/form/slider.theme.js"),require("../../design/skoda/components/icon.theme.js"),require("../../design/skoda/components/mobileStepper.theme.js"),require("../../design/skoda/components/modal.theme.js"),require("../../design/skoda/components/pagination.theme.js"),require("../../design/skoda/components/snackbar.theme.js"),require("../../design/skoda/components/stepper/stepIcon/errorStepIcon.js"),require("../../design/skoda/components/stepper/stepIcon/qontoStepIcon.js"),require("../../design/skoda/components/tabs/tabs.theme.js"),require("../../design/skoda/components/tooltip.theme.js"),require("react-use"),require("../cardOwnedVehicle/cardOwnedVehicle.js"),require("../cardPhotoAdjustable/cardPhotoAdjustable.js"),require("../cardPhotoFixed/cardPhotoFixed.js"),require("../cardPromoVehicle/cardPromoVehicleComponent.js"),require("../common/styled/cardStandardWrapperStyled.js"),require("../cardTypeOnly/cardTypeOnly.js"),require("embla-carousel-react"),require("embla-carousel-class-names"),require("embla-carousel-autoplay"),require("../carousel/styledComponents/styledCarouselHorizontal.js"),require("../carousel/styledComponents/styledCarouselVertical.js"),require("../../utils/enum.js"),require("../heroImageCard/heroImageCard.js"),require("@googlemaps/react-wrapper"),require("@googlemaps/markerclusterer"),require("../maps/utils/mapIcons.js"),require("../maps/mapComponents/mapStyled.js"),require("../shortcutLink/shortcutLink.js"),require("../textCta/textCta.js"),require("../tile/tile.js"),require("lodash/merge"),require("../carousel2/galleryCarousel/galleryContext.js"),require("../carousel2/galleryCarousel/galleryItemContext.js"),require("../carousel2/heroCarousel/heroCarouselContext.js"),require("./NotificationCenter.js"),require("../../layout/Header/HeaderContext.js"),require("../../layout/Header/HeaderButton.js"),require("../../layout/Header/HeaderNavigationHero.js"),require("../../layout/Header/HeaderNavigationLink.js"),require("../../layout/Header/HeaderNavigationMenu.js"),require("../../layout/Header/PredefinedHeaderButtons.js"),require("../../layout/Header/HeaderOverheadItem.js"),require("../../layout/SideMenu/SideMenuItem.js"),require("@mui/material/Unstable_Grid2"),require("react-keyed-flatten-children"),require("../../layout/SecondaryNavigation/SecondaryNavigationCta.js"),require("../../layout/SecondaryNavigation/SecondaryNavigationItem.js"),require("../../production/Button/Button.js"),require("minimatch");const i=o.styled(o.Box)((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",width:"56px",height:"56px",background:e.palette.onSurface.os200,flexShrink:0})));exports.Notification=t=>{const s=o.useTheme();return e.jsxs(o.Box,{sx:{background:"grey"===t.color?s.palette.surface.primary:s.palette.onSurface.os0,padding:"24px 32px",display:"flex",flexDirection:"row",gap:"24px",alignItems:"center",position:"relative"},"data-testid":"Notification",children:[t.icon&&e.jsx(i,{sx:{display:{sm:"flex",xs:"none"},overflow:"hidden",img:{width:"100%",height:"100%",objectFit:"cover"}},"data-testid":"Notification.icon",children:t.icon}),e.jsxs(o.Box,{sx:{width:"100%",maxWidth:"100%",overflow:"hidden",display:"flex",gap:"8px",flexDirection:"column"},children:[e.jsxs(o.Box,{display:"flex",alignItems:"center",children:[t.isNew&&e.jsx(r.Indicator,{variant:"neutral"}),e.jsx(o.Box,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.jsx(o.Typography,{variant:"subheadline","data-testid":"Notification.headline",children:t.headline})})]}),e.jsx(o.Box,{"data-testid":"Notification.description",children:"string"==typeof t.description?e.jsx(o.Typography,{sx:{lineHeight:"16px",maxHeight:"32px",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"2",WebkitBoxOrient:"vertical"},variant:"disclaimer",children:t.description}):t.description}),t.footer&&e.jsx(o.Typography,{variant:"disclaimer",color:s.palette.onSurface.os500,"data-testid":"Notification.footer",children:t.footer}),t.buttons&&e.jsx(o.Stack,{direction:"row",spacing:1,"data-testid":"Notification.buttons",children:t.buttons})]}),t.onDismiss&&e.jsx(o.IconButton,{onClick:t.onDismiss,size:"small",sx:{position:"absolute",right:"8px",top:"8px",".sa-i":{height:"28px"}},"data-testid":"Notification.dismiss",children:e.jsx(o.Icon,{fontSize:"small",className:"ballotx"})})]})};
1
+ "use strict";var e=require("react/jsx-runtime");require("../../components/accordion/accordion.js"),require("../../components/backdrop/backdrop.js"),require("../../components/button/button.js"),require("react");var r=require("@mui/material");require("@mui/material/styles"),require("../../design/skoda/palette.theme.js"),require("../../design/skoda/components/accordion/accordionSummary.theme.js"),require("../../design/skoda/components/autocomplete.theme.js"),require("../../design/skoda/components/backdrop.theme.js"),require("@skodaflow/web-tokens/src/tokens.json"),require("@mui/system"),require("../../design/skoda/theme.breakpoints.js"),require("../../design/skoda/theme.constants.js"),require("tslib"),require("@mui/x-date-pickers/internals"),require("../../design/skoda/components/divider.theme.js"),require("../../design/skoda/components/drawer.theme.js"),require("../../design/skoda/components/form/slider.theme.js"),require("../../design/skoda/components/icon.theme.js"),require("../../design/skoda/components/mobileStepper.theme.js"),require("../../design/skoda/components/modal.theme.js"),require("../../design/skoda/components/pagination.theme.js"),require("../../design/skoda/components/snackbar.theme.js"),require("../../design/skoda/components/stepper/stepIcon/errorStepIcon.js"),require("../../design/skoda/components/stepper/stepIcon/qontoStepIcon.js"),require("../../design/skoda/components/tabs/tabs.theme.js"),require("../../design/skoda/components/tooltip.theme.js"),require("react-use"),require("../cardOwnedVehicle/cardOwnedVehicle.js"),require("../cardPhotoAdjustable/cardPhotoAdjustable.js"),require("../cardPhotoFixed/cardPhotoFixed.js"),require("../cardPromoVehicle/cardPromoVehicleComponent.js"),require("../common/styled/cardStandardWrapperStyled.js"),require("../cardTypeOnly/cardTypeOnly.js"),require("embla-carousel-react"),require("embla-carousel-class-names"),require("embla-carousel-autoplay"),require("../carousel/styledComponents/styledCarouselHorizontal.js"),require("../carousel/styledComponents/styledCarouselVertical.js"),require("../../components/controls/controls.js"),require("../../components/numbering/numbering.js"),require("../../utils/enum.js"),require("../heroImageCard/heroImageCard.js"),require("@googlemaps/react-wrapper"),require("@googlemaps/markerclusterer"),require("../maps/utils/mapIcons.js"),require("../maps/mapComponents/mapStyled.js"),require("../shortcutLink/shortcutLink.js"),require("../textCta/textCta.js"),require("../tile/tile.js"),require("lodash/merge"),require("lodash/noop"),require("../carousel2/galleryCarousel/galleryContext.js"),require("../carousel2/galleryCarousel/galleryItemContext.js"),require("../carousel2/heroCarousel/heroCarouselContext.js"),require("./NotificationCenter.js"),require("../../layout/Header/HeaderContext.js"),require("../../layout/Header/HeaderButton.js"),require("../../layout/Header/HeaderNavigationHero.js"),require("../../layout/Header/HeaderNavigationLink.js"),require("../../layout/Header/HeaderNavigationMenu.js"),require("../../layout/Header/PredefinedHeaderButtons.js"),require("../../layout/Header/HeaderOverheadItem.js"),require("../../components/icon/icon.js"),require("../../components/icon/icon.definitions.js"),require("../../layout/SideMenu/SideMenuItem.js"),require("@mui/material/Unstable_Grid2"),require("react-keyed-flatten-children"),require("../../layout/SecondaryNavigation/SecondaryNavigationCta.js"),require("../../layout/SecondaryNavigation/SecondaryNavigationItem.js"),require("../../production/Button/Button.js"),require("../../components/cardContainer/cardContainer.js"),require("../../components/cardMenu/cardMenu.js"),require("../../components/checkbox/checkbox.js"),require("../../components/chip/chipImage/chipImage.js"),require("../../components/chip/regular/chip.js"),require("../../components/chip/chipMultiselect/multiSelectChip.js"),require("../../components/chip/chipDropdownChildren/chipDropdownChildren.js"),require("@mui/material/Container"),require("../../components/divider/divider.js"),require("../../components/drawer/drawer.js"),require("../../components/flag/flag.js"),require("@mui/material/Grid");var o=require("../../components/indicator/indicator.js");require("../../components/label/label.js"),require("../../components/labelCO2/labelCO2.js"),require("../../components/labelFeature/labelFeature.js"),require("../../components/labelPromotional/labelPromotional.js"),require("../../components/labelStatus/labelStatus.js"),require("../../components/menu/menu.js"),require("@mui/material/MenuItem"),require("@mui/material/MobileStepper"),require("../../components/mobileStepper/mobileStepperButton.js"),require("../../components/modal/modal.js"),require("../../components/modal/modalTitle.js"),require("../../components/pagination/pagination.js"),require("../../components/progressBar/progressBar.js"),require("../../components/radioButton/radioButton.js"),require("../../components/selectInput/selectInput.js"),require("../../components/slider/slider.js"),require("../../components/snackbar/snackbar.js"),require("../../components/stepper/stepper.js"),require("../../components/tab/tab.js"),require("../../components/tab/tabs.js"),require("../../components/tab/secondaryNavigation/secondaryNavigationTabs.js"),require("../../components/textArea/textArea.js"),require("../../components/common/styled/textFieldStyled.js"),require("../../components/helperTextContent/index.js"),require("../../components/toggleSwitch/toggleSwitch.js"),require("../../components/agGrid/agGrid.js"),require("../../components/avatar/Avatar.js"),require("../../components/iconButton/index.js"),require("../../components/alert/AlertButton.js"),require("../gallery/Gallery.js"),require("../gallery/GalleryItem.js"),require("minimatch");const i=r.styled(r.Box)((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",width:"56px",height:"56px",background:e.palette.onSurface.os200,flexShrink:0})));exports.Notification=t=>{const s=r.useTheme();return e.jsxs(r.Box,{sx:{background:"grey"===t.color?s.palette.surface.primary:s.palette.onSurface.os0,padding:"24px 32px",display:"flex",flexDirection:"row",gap:"24px",alignItems:"center",position:"relative"},"data-testid":"Notification",children:[t.icon&&e.jsx(i,{sx:{display:{sm:"flex",xs:"none"},overflow:"hidden",img:{width:"100%",height:"100%",objectFit:"cover"}},"data-testid":"Notification.icon",children:t.icon}),e.jsxs(r.Box,{sx:{width:"100%",maxWidth:"100%",overflow:"hidden",display:"flex",gap:"8px",flexDirection:"column"},children:[e.jsxs(r.Box,{display:"flex",alignItems:"center",children:[t.isNew&&e.jsx(o.Indicator,{color:"neutral"}),e.jsx(r.Box,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.jsx(r.Typography,{variant:"subheadline","data-testid":"Notification.headline",children:t.headline})})]}),e.jsx(r.Box,{"data-testid":"Notification.description",children:"string"==typeof t.description?e.jsx(r.Typography,{sx:{lineHeight:"16px",maxHeight:"32px",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"2",WebkitBoxOrient:"vertical"},variant:"disclaimer",children:t.description}):t.description}),t.footer&&e.jsx(r.Typography,{variant:"disclaimer",color:s.palette.onSurface.os500,"data-testid":"Notification.footer",children:t.footer}),t.buttons&&e.jsx(r.Stack,{direction:"row",spacing:1,"data-testid":"Notification.buttons",children:t.buttons})]}),t.onDismiss&&e.jsx(r.IconButton,{onClick:t.onDismiss,size:"small",sx:{position:"absolute",right:"8px",top:"8px",".sa-i":{height:"28px"}},"data-testid":"Notification.dismiss",children:e.jsx(r.Icon,{fontSize:"small",className:"ballotx close"})})]})};
2
2
  //# sourceMappingURL=Notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","sources":["../../../../src/organisms/notification/Notification.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Indicator } from '@/src/components';\nimport { Box, Icon, IconButton, Stack, Typography, styled, useTheme } from '@mui/material';\nexport const Notification = (props) => {\n const theme = useTheme();\n return (_jsxs(Box, { sx: {\n background: props.color === 'grey' ? theme.palette.surface.primary : theme.palette.onSurface.os0,\n padding: '24px 32px',\n display: 'flex',\n flexDirection: 'row',\n gap: '24px',\n alignItems: 'center',\n position: 'relative',\n }, \"data-testid\": \"Notification\", children: [props.icon && (_jsx(IconBox, { sx: {\n display: { sm: 'flex', xs: 'none' },\n overflow: 'hidden',\n img: { width: '100%', height: '100%', objectFit: 'cover' },\n }, \"data-testid\": \"Notification.icon\", children: props.icon })), _jsxs(Box, { sx: {\n width: '100%',\n maxWidth: '100%',\n overflow: 'hidden',\n display: 'flex',\n gap: '8px',\n flexDirection: 'column',\n }, children: [_jsxs(Box, { display: \"flex\", alignItems: \"center\", children: [props.isNew && _jsx(Indicator, { variant: \"neutral\" }), _jsx(Box, { sx: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }, children: _jsx(Typography, { variant: \"subheadline\", \"data-testid\": \"Notification.headline\", children: props.headline }) })] }), _jsx(Box, { \"data-testid\": \"Notification.description\", children: typeof props.description === 'string' ? (_jsx(Typography, { sx: {\n lineHeight: '16px',\n maxHeight: '32px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: '2',\n WebkitBoxOrient: 'vertical',\n }, variant: \"disclaimer\", children: props.description })) : (props.description) }), props.footer && (_jsx(Typography, { variant: \"disclaimer\", color: theme.palette.onSurface.os500, \"data-testid\": \"Notification.footer\", children: props.footer })), props.buttons && (_jsx(Stack, { direction: \"row\", spacing: 1, \"data-testid\": \"Notification.buttons\", children: props.buttons }))] }), props.onDismiss && (_jsx(IconButton, { onClick: props.onDismiss, size: \"small\", sx: {\n position: 'absolute',\n right: '8px',\n top: '8px',\n '.sa-i': {\n height: '28px',\n },\n }, \"data-testid\": \"Notification.dismiss\", children: _jsx(Icon, { fontSize: \"small\", className: \"ballotx\" }) }))] }));\n};\nconst IconBox = styled(Box)(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '50%',\n width: '56px',\n height: '56px',\n background: theme.palette.onSurface.os200,\n flexShrink: 0,\n}));\n//# sourceMappingURL=Notification.js.map"],"names":["IconBox","styled","Box","theme","display","justifyContent","alignItems","borderRadius","width","height","background","palette","onSurface","os200","flexShrink","props","useTheme","_jsxs","jsxs","sx","color","surface","primary","os0","padding","flexDirection","gap","position","children","icon","_jsx","jsx","sm","xs","overflow","img","objectFit","maxWidth","isNew","Indicator","variant","whiteSpace","textOverflow","Typography","headline","description","lineHeight","maxHeight","WebkitLineClamp","WebkitBoxOrient","footer","os500","buttons","Stack","direction","spacing","onDismiss","IconButton","onClick","size","right","top","Icon","fontSize","className"],"mappings":"2nLAGY,MA0CNA,EAAUC,EAAAA,OAAOC,EAAAA,IAAPD,EAAY,EAAGE,YAAa,CACxCC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,aAAc,MACdC,MAAO,OACPC,OAAQ,OACRC,WAAYP,EAAMQ,QAAQC,UAAUC,MACpCC,WAAY,2BAlDaC,IACzB,MAAMZ,EAAQa,EAAAA,WACd,OAAQC,EAAKC,KAAChB,MAAK,CAAEiB,GAAI,CACjBT,WAA4B,SAAhBK,EAAMK,MAAmBjB,EAAMQ,QAAQU,QAAQC,QAAUnB,EAAMQ,QAAQC,UAAUW,IAC7FC,QAAS,YACTpB,QAAS,OACTqB,cAAe,MACfC,IAAK,OACLpB,WAAY,SACZqB,SAAU,YACX,cAAe,eAAgBC,SAAU,CAACb,EAAMc,MAASC,EAAIC,IAAC/B,EAAS,CAAEmB,GAAI,CACpEf,QAAS,CAAE4B,GAAI,OAAQC,GAAI,QAC3BC,SAAU,SACVC,IAAK,CAAE3B,MAAO,OAAQC,OAAQ,OAAQ2B,UAAW,UAClD,cAAe,oBAAqBR,SAAUb,EAAMc,OAAUZ,EAAKC,KAAChB,MAAK,CAAEiB,GAAI,CAC9EX,MAAO,OACP6B,SAAU,OACVH,SAAU,SACV9B,QAAS,OACTsB,IAAK,MACLD,cAAe,UAChBG,SAAU,CAACX,EAAKC,KAAChB,MAAK,CAAEE,QAAS,OAAQE,WAAY,SAAUsB,SAAU,CAACb,EAAMuB,OAASR,EAAAA,IAAKS,EAASA,UAAE,CAAEC,QAAS,YAAcV,EAAIC,IAAC7B,MAAK,CAAEiB,GAAI,CACjIsB,WAAY,SACZP,SAAU,SACVQ,aAAc,YACfd,SAAUE,EAAIC,IAACY,aAAY,CAAEH,QAAS,cAAe,cAAe,wBAAyBZ,SAAUb,EAAM6B,gBAAoBd,EAAIC,IAAC7B,EAAGA,IAAE,CAAE,cAAe,2BAA4B0B,SAAuC,iBAAtBb,EAAM8B,YAA4Bf,EAAIC,IAACY,EAAUA,WAAE,CAAExB,GAAI,CACrQ2B,WAAY,OACZC,UAAW,OACXb,SAAU,SACVQ,aAAc,WACdtC,QAAS,cACT4C,gBAAiB,IACjBC,gBAAiB,YAClBT,QAAS,aAAcZ,SAAUb,EAAM8B,cAAmB9B,EAAiB,cAAMA,EAAMmC,QAAWpB,EAAIC,IAACY,aAAY,CAAEH,QAAS,aAAcpB,MAAOjB,EAAMQ,QAAQC,UAAUuC,MAAO,cAAe,sBAAuBvB,SAAUb,EAAMmC,SAAYnC,EAAMqC,SAAYtB,EAAAA,IAAKuB,EAAKA,MAAE,CAAEC,UAAW,MAAOC,QAAS,EAAG,cAAe,uBAAwB3B,SAAUb,EAAMqC,aAAiBrC,EAAMyC,WAAc1B,EAAAA,IAAK2B,EAAAA,WAAY,CAAEC,QAAS3C,EAAMyC,UAAWG,KAAM,QAASxC,GAAI,CACzdQ,SAAU,WACViC,MAAO,MACPC,IAAK,MACL,QAAS,CACLpD,OAAQ,SAEb,cAAe,uBAAwBmB,SAAUE,EAAIC,IAAC+B,EAAIA,KAAE,CAAEC,SAAU,QAASC,UAAW,gBAAsB"}
1
+ {"version":3,"file":"Notification.js","sources":["../../../../src/organisms/notification/Notification.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Indicator } from '@/src/components';\nimport { Box, Icon, IconButton, Stack, Typography, styled, useTheme } from '@mui/material';\nexport const Notification = (props) => {\n const theme = useTheme();\n return (_jsxs(Box, { sx: {\n background: props.color === 'grey' ? theme.palette.surface.primary : theme.palette.onSurface.os0,\n padding: '24px 32px',\n display: 'flex',\n flexDirection: 'row',\n gap: '24px',\n alignItems: 'center',\n position: 'relative',\n }, \"data-testid\": \"Notification\", children: [props.icon && (_jsx(IconBox, { sx: {\n display: { sm: 'flex', xs: 'none' },\n overflow: 'hidden',\n img: { width: '100%', height: '100%', objectFit: 'cover' },\n }, \"data-testid\": \"Notification.icon\", children: props.icon })), _jsxs(Box, { sx: {\n width: '100%',\n maxWidth: '100%',\n overflow: 'hidden',\n display: 'flex',\n gap: '8px',\n flexDirection: 'column',\n }, children: [_jsxs(Box, { display: \"flex\", alignItems: \"center\", children: [props.isNew && _jsx(Indicator, { color: \"neutral\" }), _jsx(Box, { sx: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }, children: _jsx(Typography, { variant: \"subheadline\", \"data-testid\": \"Notification.headline\", children: props.headline }) })] }), _jsx(Box, { \"data-testid\": \"Notification.description\", children: typeof props.description === 'string' ? (_jsx(Typography, { sx: {\n lineHeight: '16px',\n maxHeight: '32px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: '2',\n WebkitBoxOrient: 'vertical',\n }, variant: \"disclaimer\", children: props.description })) : (props.description) }), props.footer && (_jsx(Typography, { variant: \"disclaimer\", color: theme.palette.onSurface.os500, \"data-testid\": \"Notification.footer\", children: props.footer })), props.buttons && (_jsx(Stack, { direction: \"row\", spacing: 1, \"data-testid\": \"Notification.buttons\", children: props.buttons }))] }), props.onDismiss && (_jsx(IconButton, { onClick: props.onDismiss, size: \"small\", sx: {\n position: 'absolute',\n right: '8px',\n top: '8px',\n '.sa-i': {\n height: '28px',\n },\n }, \"data-testid\": \"Notification.dismiss\", children: _jsx(Icon, { fontSize: \"small\", className: \"ballotx close\" }) }))] }));\n};\nconst IconBox = styled(Box)(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '50%',\n width: '56px',\n height: '56px',\n background: theme.palette.onSurface.os200,\n flexShrink: 0,\n}));\n//# sourceMappingURL=Notification.js.map"],"names":["IconBox","styled","Box","theme","display","justifyContent","alignItems","borderRadius","width","height","background","palette","onSurface","os200","flexShrink","props","useTheme","_jsxs","jsxs","sx","color","surface","primary","os0","padding","flexDirection","gap","position","children","icon","_jsx","jsx","sm","xs","overflow","img","objectFit","maxWidth","isNew","Indicator","whiteSpace","textOverflow","Typography","variant","headline","description","lineHeight","maxHeight","WebkitLineClamp","WebkitBoxOrient","footer","os500","buttons","Stack","direction","spacing","onDismiss","IconButton","onClick","size","right","top","Icon","fontSize","className"],"mappings":"moLAGY,MA0CNA,EAAUC,EAAAA,OAAOC,EAAAA,IAAPD,EAAY,EAAGE,YAAa,CACxCC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,aAAc,MACdC,MAAO,OACPC,OAAQ,OACRC,WAAYP,EAAMQ,QAAQC,UAAUC,MACpCC,WAAY,2BAlDaC,IACzB,MAAMZ,EAAQa,EAAAA,WACd,OAAQC,EAAKC,KAAChB,MAAK,CAAEiB,GAAI,CACjBT,WAA4B,SAAhBK,EAAMK,MAAmBjB,EAAMQ,QAAQU,QAAQC,QAAUnB,EAAMQ,QAAQC,UAAUW,IAC7FC,QAAS,YACTpB,QAAS,OACTqB,cAAe,MACfC,IAAK,OACLpB,WAAY,SACZqB,SAAU,YACX,cAAe,eAAgBC,SAAU,CAACb,EAAMc,MAASC,EAAIC,IAAC/B,EAAS,CAAEmB,GAAI,CACpEf,QAAS,CAAE4B,GAAI,OAAQC,GAAI,QAC3BC,SAAU,SACVC,IAAK,CAAE3B,MAAO,OAAQC,OAAQ,OAAQ2B,UAAW,UAClD,cAAe,oBAAqBR,SAAUb,EAAMc,OAAUZ,EAAKC,KAAChB,MAAK,CAAEiB,GAAI,CAC9EX,MAAO,OACP6B,SAAU,OACVH,SAAU,SACV9B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
  export type NotificationCenterHeaderButtonProps = NotificationCenterProps & {
5
- indicator?: IndicatorProps['variant'];
5
+ indicator?: IndicatorProps['color'];
6
6
  };
7
7
  export declare const NotificationCenterHeaderButton: React.FC<NotificationCenterHeaderButtonProps>;
@@ -1,5 +1,6 @@
1
+ import { IconNameProp } from '../../components/icon';
1
2
  export interface ShortcutLinkProps {
2
- iconName: string;
3
+ iconName: IconNameProp;
3
4
  title: string;
4
5
  subTitle: string;
5
6
  linkLabel: string;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("../../components/button/button.js"),i=require("../../components/icon/icon.js");const a=require("@mui/material").styled("div")((({theme:e})=>{let t={};return t=Object.assign(Object.assign({},t),{display:"flex",alignItems:"center",justifyContent:"space-between",a:{textDecoration:"none"},button:{paddingLeft:"0"},".text-wrapper":{paddingTop:"20px",paddingBottom:"6px"},span:{display:"block"},"> .sa-i":{display:"none"},h4:{marginTop:"0",letterSpacing:"0.4px"},".body":{letterSpacing:"0.4px"},".sl-icon":{fontSize:"32px"},[e.breakpoints.down("md")]:{h4:{marginBottom:"2px",fontSize:"16px",lineHeight:"24px",letterSpacing:"0.2px"},".body":{letterSpacing:"0.2px",lineHeight:"16px",fontSize:"12px"}},[e.breakpoints.up("md")]:{flexDirection:"column",alignItems:"flex-start","> .sa-i":{display:"block"},h4:{marginBottom:"0"}}}),t}));exports.ShortcutLink=({iconName:r,title:s,subTitle:o,linkLabel:l,linkURL:c,isExternalLink:p,analyticsCallback:x})=>{const d=t.useCallback((e=>{x&&x(e)}),[x]);return e.jsxs(a,{children:[e.jsx(i.Icon,{className:`${r} sl-icon`,fontSize:"large"}),e.jsxs("div",{className:"text-wrapper",children:[e.jsx("h4",{children:s}),e.jsx("span",{className:"body",children:o})]}),e.jsx("a",{href:c,target:p?"_blank":"_self",rel:"noreferrer",children:e.jsx(n.Button,{variant:n.ButtonVariants.NAVIGATION,label:l,direction:"forward",onClick:d})})]})};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("../../components/button/button.js"),i=require("../../components/icon/icon.js");require("../../components/icon/icon.definitions.js");const a=require("@mui/material").styled("div")((({theme:e})=>{let t={};return t=Object.assign(Object.assign({},t),{display:"flex",alignItems:"center",justifyContent:"space-between",a:{textDecoration:"none"},button:{paddingLeft:"0"},".text-wrapper":{paddingTop:"20px",paddingBottom:"6px"},span:{display:"block"},"> .sa-i":{display:"none"},h4:{marginTop:"0",letterSpacing:"0.4px"},".body":{letterSpacing:"0.4px"},".sl-icon":{fontSize:"32px"},[e.breakpoints.down("md")]:{h4:{marginBottom:"2px",fontSize:"16px",lineHeight:"24px",letterSpacing:"0.2px"},".body":{letterSpacing:"0.2px",lineHeight:"16px",fontSize:"12px"}},[e.breakpoints.up("md")]:{flexDirection:"column",alignItems:"flex-start","> .sa-i":{display:"block"},h4:{marginBottom:"0"}}}),t}));exports.ShortcutLink=({iconName:r,title:s,subTitle:o,linkLabel:l,linkURL:c,isExternalLink:p,analyticsCallback:x})=>{const d=t.useCallback((e=>{x&&x(e)}),[x]);return e.jsxs(a,{children:[e.jsx(i.Icon,{name:r,className:"sl-icon",fontSize:"large"}),e.jsxs("div",{className:"text-wrapper",children:[e.jsx("h4",{children:s}),e.jsx("span",{className:"body",children:o})]}),e.jsx("a",{href:c,target:p?"_blank":"_self",rel:"noreferrer",children:e.jsx(n.Button,{variant:n.ButtonVariants.NAVIGATION,label:l,direction:"forward",onClick:d})})]})};
2
2
  //# sourceMappingURL=shortcutLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shortcutLink.js","sources":["../../../../src/organisms/shortcutLink/shortcutLink.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback } from 'react';\nimport { Button, ButtonVariants } from '../../components/button';\nimport { Icon } from '../../components/icon';\nimport { styled } from '@mui/material';\n/** @deprecated */\nexport const ShortcutLink = ({ iconName, title, subTitle, linkLabel, linkURL, isExternalLink, analyticsCallback, }) => {\n const handleOnClick = useCallback((e) => {\n analyticsCallback && analyticsCallback(e);\n }, [analyticsCallback]);\n return (_jsxs(ShortcutLinkStyled, { children: [_jsx(Icon, { className: `${iconName} sl-icon`, fontSize: \"large\" }), _jsxs(\"div\", { className: \"text-wrapper\", children: [_jsx(\"h4\", { children: title }), _jsx(\"span\", { className: \"body\", children: subTitle })] }), _jsx(\"a\", { href: linkURL, target: isExternalLink ? '_blank' : '_self', rel: \"noreferrer\", children: _jsx(Button, { variant: ButtonVariants.NAVIGATION, label: linkLabel, direction: \"forward\", onClick: handleOnClick }) })] }));\n};\nconst ShortcutLinkStyled = styled('div')(({ theme }) => {\n let styles = {};\n styles = Object.assign(Object.assign({}, styles), { display: 'flex', alignItems: 'center', justifyContent: 'space-between', a: {\n textDecoration: 'none',\n }, button: {\n paddingLeft: '0',\n }, '.text-wrapper': {\n paddingTop: '20px',\n paddingBottom: '6px',\n }, span: {\n display: 'block',\n }, '> .sa-i': {\n display: 'none',\n }, h4: {\n marginTop: '0',\n letterSpacing: '0.4px',\n }, '.body': {\n letterSpacing: '0.4px',\n }, '.sl-icon': {\n fontSize: '32px',\n }, [theme.breakpoints.down('md')]: {\n h4: {\n marginBottom: '2px',\n fontSize: '16px',\n lineHeight: '24px',\n letterSpacing: '0.2px',\n },\n '.body': {\n letterSpacing: '0.2px',\n lineHeight: '16px',\n fontSize: '12px',\n },\n }, [theme.breakpoints.up('md')]: {\n flexDirection: 'column',\n alignItems: 'flex-start',\n '> .sa-i': {\n display: 'block',\n },\n h4: {\n marginBottom: '0',\n },\n } });\n return styles;\n});\n//# sourceMappingURL=shortcutLink.js.map"],"names":["ShortcutLinkStyled","styled","theme","styles","Object","assign","display","alignItems","justifyContent","a","textDecoration","button","paddingLeft","paddingTop","paddingBottom","span","h4","marginTop","letterSpacing","fontSize","breakpoints","down","marginBottom","lineHeight","up","flexDirection","iconName","title","subTitle","linkLabel","linkURL","isExternalLink","analyticsCallback","handleOnClick","useCallback","e","_jsxs","jsxs","children","_jsx","jsx","Icon","className","href","target","rel","Button","variant","ButtonVariants","NAVIGATION","label","direction","onClick"],"mappings":"6JAMY,MAMNA,2BAAqBC,OAAO,MAAPA,EAAc,EAAGC,YACxC,IAAIC,EAAS,CAAA,EAyCb,OAxCAA,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAEF,GAAS,CAAEG,QAAS,OAAQC,WAAY,SAAUC,eAAgB,gBAAiBC,EAAG,CACvHC,eAAgB,QACjBC,OAAQ,CACPC,YAAa,KACd,gBAAiB,CAChBC,WAAY,OACZC,cAAe,OAChBC,KAAM,CACLT,QAAS,SACV,UAAW,CACVA,QAAS,QACVU,GAAI,CACHC,UAAW,IACXC,cAAe,SAChB,QAAS,CACRA,cAAe,SAChB,WAAY,CACXC,SAAU,QACX,CAACjB,EAAMkB,YAAYC,KAAK,OAAQ,CAC/BL,GAAI,CACAM,aAAc,MACdH,SAAU,OACVI,WAAY,OACZL,cAAe,SAEnB,QAAS,CACLA,cAAe,QACfK,WAAY,OACZJ,SAAU,SAEf,CAACjB,EAAMkB,YAAYI,GAAG,OAAQ,CAC7BC,cAAe,SACflB,WAAY,aACZ,UAAW,CACPD,QAAS,SAEbU,GAAI,CACAM,aAAc,QAGnBnB,CAAM,yBAhDW,EAAGuB,WAAUC,QAAOC,WAAUC,YAAWC,UAASC,iBAAgBC,wBAC1F,MAAMC,EAAgBC,eAAaC,IAC/BH,GAAqBA,EAAkBG,EAAE,GAC1C,CAACH,IACJ,OAAQI,EAAKC,KAACrC,EAAoB,CAAEsC,SAAU,CAACC,EAAIC,IAACC,EAAIA,KAAE,CAAEC,UAAW,GAAGhB,YAAoBP,SAAU,UAAYiB,EAAKC,KAAC,MAAO,CAAEK,UAAW,eAAgBJ,SAAU,CAACC,EAAIC,IAAC,KAAM,CAAEF,SAAUX,IAAUY,EAAAA,IAAK,OAAQ,CAAEG,UAAW,OAAQJ,SAAUV,OAAiBW,EAAIC,IAAC,IAAK,CAAEG,KAAMb,EAASc,OAAQb,EAAiB,SAAW,QAASc,IAAK,aAAcP,SAAUC,EAAAA,IAAKO,EAAAA,OAAQ,CAAEC,QAASC,EAAcA,eAACC,WAAYC,MAAOrB,EAAWsB,UAAW,UAAWC,QAASnB,QAAyB"}
1
+ {"version":3,"file":"shortcutLink.js","sources":["../../../../src/organisms/shortcutLink/shortcutLink.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback } from 'react';\nimport { Button, ButtonVariants } from '../../components/button';\nimport { Icon } from '../../components/icon';\nimport { styled } from '@mui/material';\n/** @deprecated */\nexport const ShortcutLink = ({ iconName, title, subTitle, linkLabel, linkURL, isExternalLink, analyticsCallback, }) => {\n const handleOnClick = useCallback((e) => {\n analyticsCallback && analyticsCallback(e);\n }, [analyticsCallback]);\n return (_jsxs(ShortcutLinkStyled, { children: [_jsx(Icon, { name: iconName, className: \"sl-icon\", fontSize: \"large\" }), _jsxs(\"div\", { className: \"text-wrapper\", children: [_jsx(\"h4\", { children: title }), _jsx(\"span\", { className: \"body\", children: subTitle })] }), _jsx(\"a\", { href: linkURL, target: isExternalLink ? '_blank' : '_self', rel: \"noreferrer\", children: _jsx(Button, { variant: ButtonVariants.NAVIGATION, label: linkLabel, direction: \"forward\", onClick: handleOnClick }) })] }));\n};\nconst ShortcutLinkStyled = styled('div')(({ theme }) => {\n let styles = {};\n styles = Object.assign(Object.assign({}, styles), { display: 'flex', alignItems: 'center', justifyContent: 'space-between', a: {\n textDecoration: 'none',\n }, button: {\n paddingLeft: '0',\n }, '.text-wrapper': {\n paddingTop: '20px',\n paddingBottom: '6px',\n }, span: {\n display: 'block',\n }, '> .sa-i': {\n display: 'none',\n }, h4: {\n marginTop: '0',\n letterSpacing: '0.4px',\n }, '.body': {\n letterSpacing: '0.4px',\n }, '.sl-icon': {\n fontSize: '32px',\n }, [theme.breakpoints.down('md')]: {\n h4: {\n marginBottom: '2px',\n fontSize: '16px',\n lineHeight: '24px',\n letterSpacing: '0.2px',\n },\n '.body': {\n letterSpacing: '0.2px',\n lineHeight: '16px',\n fontSize: '12px',\n },\n }, [theme.breakpoints.up('md')]: {\n flexDirection: 'column',\n alignItems: 'flex-start',\n '> .sa-i': {\n display: 'block',\n },\n h4: {\n marginBottom: '0',\n },\n } });\n return styles;\n});\n//# sourceMappingURL=shortcutLink.js.map"],"names":["ShortcutLinkStyled","styled","theme","styles","Object","assign","display","alignItems","justifyContent","a","textDecoration","button","paddingLeft","paddingTop","paddingBottom","span","h4","marginTop","letterSpacing","fontSize","breakpoints","down","marginBottom","lineHeight","up","flexDirection","iconName","title","subTitle","linkLabel","linkURL","isExternalLink","analyticsCallback","handleOnClick","useCallback","e","_jsxs","jsxs","children","_jsx","jsx","Icon","name","className","href","target","rel","Button","variant","ButtonVariants","NAVIGATION","label","direction","onClick"],"mappings":"kNAMY,MAMNA,2BAAqBC,OAAO,MAAPA,EAAc,EAAGC,YACxC,IAAIC,EAAS,CAAA,EAyCb,OAxCAA,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAE,EAAEF,GAAS,CAAEG,QAAS,OAAQC,WAAY,SAAUC,eAAgB,gBAAiBC,EAAG,CACvHC,eAAgB,QACjBC,OAAQ,CACPC,YAAa,KACd,gBAAiB,CAChBC,WAAY,OACZC,cAAe,OAChBC,KAAM,CACLT,QAAS,SACV,UAAW,CACVA,QAAS,QACVU,GAAI,CACHC,UAAW,IACXC,cAAe,SAChB,QAAS,CACRA,cAAe,SAChB,WAAY,CACXC,SAAU,QACX,CAACjB,EAAMkB,YAAYC,KAAK,OAAQ,CAC/BL,GAAI,CACAM,aAAc,MACdH,SAAU,OACVI,WAAY,OACZL,cAAe,SAEnB,QAAS,CACLA,cAAe,QACfK,WAAY,OACZJ,SAAU,SAEf,CAACjB,EAAMkB,YAAYI,GAAG,OAAQ,CAC7BC,cAAe,SACflB,WAAY,aACZ,UAAW,CACPD,QAAS,SAEbU,GAAI,CACAM,aAAc,QAGnBnB,CAAM,yBAhDW,EAAGuB,WAAUC,QAAOC,WAAUC,YAAWC,UAASC,iBAAgBC,wBAC1F,MAAMC,EAAgBC,eAAaC,IAC/BH,GAAqBA,EAAkBG,EAAE,GAC1C,CAACH,IACJ,OAAQI,EAAKC,KAACrC,EAAoB,CAAEsC,SAAU,CAACC,EAAIC,IAACC,EAAIA,KAAE,CAAEC,KAAMhB,EAAUiB,UAAW,UAAWxB,SAAU,UAAYiB,EAAAA,KAAM,MAAO,CAAEO,UAAW,eAAgBL,SAAU,CAACC,EAAIC,IAAC,KAAM,CAAEF,SAAUX,IAAUY,EAAAA,IAAK,OAAQ,CAAEI,UAAW,OAAQL,SAAUV,OAAiBW,EAAIC,IAAC,IAAK,CAAEI,KAAMd,EAASe,OAAQd,EAAiB,SAAW,QAASe,IAAK,aAAcR,SAAUC,EAAAA,IAAKQ,EAAAA,OAAQ,CAAEC,QAASC,EAAcA,eAACC,WAAYC,MAAOtB,EAAWuB,UAAW,UAAWC,QAASpB,QAAyB"}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from '../../components/button';
3
+ import { IconNameProp } from '../../components/icon';
3
4
  export type variants = 'subHeadline' | 'h1' | 'h2' | 'h3' | 'h4';
4
5
  export interface TextCtaProps {
5
6
  /**
@@ -60,7 +61,7 @@ export interface TextCtaProps {
60
61
  */
61
62
  listItems?: {
62
63
  text?: string;
63
- icon?: string;
64
+ icon?: IconNameProp;
64
65
  }[];
65
66
  /**
66
67
  *object appStore Badge:
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),n=require("@mui/material/styles"),r=require("../../components/label/label.js"),s=require("@mui/material"),o=require("../../components/button/button.js"),a=require("../../components/icon/icon.js");const l=i.forwardRef(((n,l)=>{var{label:p,headlineTitle:d,text:c,showFirstButton:h=!1,showSecondButton:m=!1,onClickFirstBtn:u,onClickSecondBtn:g,firstButtonProps:S,secondButtonProps:B,listItems:b,showAppStore:j=!1,showPlayStore:f=!1,appStoreProps:C,playStoreProps:w}=n,y=t.__rest(n,["label","headlineTitle","text","showFirstButton","showSecondButton","onClickFirstBtn","onClickSecondBtn","firstButtonProps","secondButtonProps","listItems","showAppStore","showPlayStore","appStoreProps","playStoreProps"]);const k=i.useCallback((t=>{window.open(t,"_blank")}),[]),P=i.useCallback(((t,e,i)=>{i&&k(i),e&&e(t)}),[k]),v=i.useCallback(((t,i)=>{const n=Object.assign(Object.assign({},t),{url:t.url||null});return e.jsx(o.Button,Object.assign({},n,{onClick:t=>P(t,i,n.url)}))}),[P]);return e.jsxs(x,Object.assign({ref:l,listItems:b},y,{children:[p&&e.jsx(r.Label,{label:p}),d&&e.jsx("div",{className:"headlineContainer",children:e.jsx(s.Typography,{className:"textCtaHeadline",children:d})}),c&&e.jsx("p",{className:`textCtaText ${f&&"isPlayStore"}`,children:c}),b&&b.length>0&&e.jsx(s.List,{className:"textCtaList",children:b.map(((t,i)=>e.jsxs(s.ListItem,{children:[e.jsx(a.Icon,{className:t.icon||"check"}),t.text]},"text-cta-list-item"+i)))}),e.jsxs("div",{className:"textCtaBtnGroup",children:[(!j||!f)&&e.jsxs(e.Fragment,{children:[h&&v(S,u),m&&v(B,g)]}),(!h||!m)&&e.jsxs(e.Fragment,{children:[j&&e.jsx("span",{className:"appStoreBadge",onClick:()=>k(C.url),children:e.jsx("img",{src:C.img,alt:C.alt})}),f&&e.jsx("span",{className:"playStoreBadge",dangerouslySetInnerHTML:{__html:w}})]})]})]}))})),p=t=>{switch(t){case"h1":return{fontSize:"44px",lineHeight:"52px"};case"h2":return{fontSize:"36px",lineHeight:"44px"};case"h3":return{fontSize:"30px",lineHeight:"36px"};case"h4":return{fontSize:"24px",lineHeight:"28px"};default:return{fontSize:"18px",lineHeight:"28px"}}},x=n.styled("div",{shouldForwardProp:t=>"listItems"!==t&&"headlineVariant"!==t})((e=>{var{theme:i}=e,n=t.__rest(e,["theme"]);let r={};return r={"& > span":{margin:0},"& > div.headlineContainer":{marginBottom:"10px",marginTop:"5px","& > .textCtaHeadline":Object.assign({fontWeight:"bold"},p(n.headlineVariant))},"& > div.subheadlineContainer":{marginBottom:"10px","& > .textCtaSubheadline":{fontWeight:"bold",fontSize:"18px",lineHeight:"28px"}},"& > .textCtaList":{marginBottom:"10px"},"& > .textCtaText":{fontSize:"18px",lineHeight:"28px",margin:"12px 0 16px 0","&.isPlayStore":{marginBottom:"2px"}},"& > div.textCtaBtnGroup":{display:"flex",alignItems:"center",justifyContent:"flex-start",flexWrap:"wrap","& > div":{[i.breakpoints.down("sm")]:{width:"100%"}},"& > .appStoreBadge":{cursor:"pointer",marginRight:"8px","& > img":{height:"40px"}},"& > .playStoreBadge":{cursor:"pointer","& img":{maxWidth:"153px"}},"& .MuiButton-root":{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"2px",fontSize:"14px",minWidth:"93px",height:"32px",[i.breakpoints.down("sm")]:{height:"44px",width:"100%"}},"& .MuiButton-root:first-of-type":{marginRight:"16px",marginBottom:0,[i.breakpoints.down("sm")]:{marginBottom:"16px"}}}," & > .MuiList-root":{padding:"0px","& > .MuiListItem-root":{padding:"0px 0px 6px 0px","& > .MuiIcon-root":{width:"20px",height:"24px",fontSize:"14px"}}}},r}));exports.TextCta=l;
1
+ "use strict";var t=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),n=require("@mui/material/styles"),o=require("../../components/label/label.js"),r=require("@mui/material"),s=require("../../components/button/button.js"),a=require("../../components/icon/icon.js");require("../../components/icon/icon.definitions.js");const l=i.forwardRef(((n,l)=>{var{label:p,headlineTitle:c,text:d,showFirstButton:h=!1,showSecondButton:m=!1,onClickFirstBtn:u,onClickSecondBtn:g,firstButtonProps:S,secondButtonProps:B,listItems:j,showAppStore:b=!1,showPlayStore:f=!1,appStoreProps:C,playStoreProps:w}=n,y=t.__rest(n,["label","headlineTitle","text","showFirstButton","showSecondButton","onClickFirstBtn","onClickSecondBtn","firstButtonProps","secondButtonProps","listItems","showAppStore","showPlayStore","appStoreProps","playStoreProps"]);const k=i.useCallback((t=>{window.open(t,"_blank")}),[]),P=i.useCallback(((t,e,i)=>{i&&k(i),e&&e(t)}),[k]),v=i.useCallback(((t,i)=>{const n=Object.assign(Object.assign({},t),{url:t.url||null});return e.jsx(s.Button,Object.assign({},n,{onClick:t=>P(t,i,n.url)}))}),[P]);return e.jsxs(x,Object.assign({ref:l,listItems:j},y,{children:[p&&e.jsx(o.Label,{label:p}),c&&e.jsx("div",{className:"headlineContainer",children:e.jsx(r.Typography,{className:"textCtaHeadline",children:c})}),d&&e.jsx("p",{className:`textCtaText ${f&&"isPlayStore"}`,children:d}),j&&j.length>0&&e.jsx(r.List,{className:"textCtaList",children:j.map(((t,i)=>e.jsxs(r.ListItem,{children:[e.jsx(a.Icon,{name:t.icon||"check"}),t.text]},"text-cta-list-item"+i)))}),e.jsxs("div",{className:"textCtaBtnGroup",children:[(!b||!f)&&e.jsxs(e.Fragment,{children:[h&&v(S,u),m&&v(B,g)]}),(!h||!m)&&e.jsxs(e.Fragment,{children:[b&&e.jsx("span",{className:"appStoreBadge",onClick:()=>k(C.url),children:e.jsx("img",{src:C.img,alt:C.alt})}),f&&e.jsx("span",{className:"playStoreBadge",dangerouslySetInnerHTML:{__html:w}})]})]})]}))})),p=t=>{switch(t){case"h1":return{fontSize:"44px",lineHeight:"52px"};case"h2":return{fontSize:"36px",lineHeight:"44px"};case"h3":return{fontSize:"30px",lineHeight:"36px"};case"h4":return{fontSize:"24px",lineHeight:"28px"};default:return{fontSize:"18px",lineHeight:"28px"}}},x=n.styled("div",{shouldForwardProp:t=>"listItems"!==t&&"headlineVariant"!==t})((e=>{var{theme:i}=e,n=t.__rest(e,["theme"]);let o={};return o={"& > span":{margin:0},"& > div.headlineContainer":{marginBottom:"10px",marginTop:"5px","& > .textCtaHeadline":Object.assign({fontWeight:"bold"},p(n.headlineVariant))},"& > div.subheadlineContainer":{marginBottom:"10px","& > .textCtaSubheadline":{fontWeight:"bold",fontSize:"18px",lineHeight:"28px"}},"& > .textCtaList":{marginBottom:"10px"},"& > .textCtaText":{fontSize:"18px",lineHeight:"28px",margin:"12px 0 16px 0","&.isPlayStore":{marginBottom:"2px"}},"& > div.textCtaBtnGroup":{display:"flex",alignItems:"center",justifyContent:"flex-start",flexWrap:"wrap","& > div":{[i.breakpoints.down("sm")]:{width:"100%"}},"& > .appStoreBadge":{cursor:"pointer",marginRight:"8px","& > img":{height:"40px"}},"& > .playStoreBadge":{cursor:"pointer","& img":{maxWidth:"153px"}},"& .MuiButton-root":{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"2px",fontSize:"14px",minWidth:"93px",height:"32px",[i.breakpoints.down("sm")]:{height:"44px",width:"100%"}},"& .MuiButton-root:first-of-type":{marginRight:"16px",marginBottom:0,[i.breakpoints.down("sm")]:{marginBottom:"16px"}}}," & > .MuiList-root":{padding:"0px","& > .MuiListItem-root":{padding:"0px 0px 6px 0px","& > .MuiIcon-root":{width:"20px",height:"24px",fontSize:"14px"}}}},o}));exports.TextCta=l;
2
2
  //# sourceMappingURL=textCta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textCta.js","sources":["../../../../src/organisms/textCta/textCta.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useCallback, forwardRef } from 'react';\nimport { styled } from '@mui/material/styles';\nimport { Label } from '../../components/label';\nimport { List, ListItem, Typography } from '@mui/material';\nimport { Button } from '../../components/button';\nimport { Icon } from '../../components/icon';\n/**\n * @description SkodaFlow Button component.\n * Properties are inherited from HTML Button element.\n * @param props ButtonProps\n * @returns React Functional Component\n * @deprecated\n */\nexport const TextCta = forwardRef((_a, ref) => {\n var { label, headlineTitle, text, showFirstButton = false, showSecondButton = false, onClickFirstBtn, onClickSecondBtn, firstButtonProps, secondButtonProps, listItems, showAppStore = false, showPlayStore = false, appStoreProps, playStoreProps } = _a, props = __rest(_a, [\"label\", \"headlineTitle\", \"text\", \"showFirstButton\", \"showSecondButton\", \"onClickFirstBtn\", \"onClickSecondBtn\", \"firstButtonProps\", \"secondButtonProps\", \"listItems\", \"showAppStore\", \"showPlayStore\", \"appStoreProps\", \"playStoreProps\"]);\n const handleUrlClick = useCallback((url) => {\n window.open(url, '_blank');\n }, []);\n const handleOnClickBtn = useCallback((e, callback, url) => {\n if (url) {\n handleUrlClick(url);\n }\n callback && callback(e);\n }, [handleUrlClick]);\n const handleRenderBtn = useCallback((btnProps, onClickHandler) => {\n const propsA = Object.assign(Object.assign({}, btnProps), { url: btnProps.url || null });\n return _jsx(Button, Object.assign({}, propsA, { onClick: (e) => handleOnClickBtn(e, onClickHandler, propsA.url) }));\n }, [handleOnClickBtn]);\n return (_jsxs(TextCtaContainerStyled, Object.assign({ ref: ref, listItems: listItems }, props, { children: [label && _jsx(Label, { label: label }), headlineTitle && (_jsx(\"div\", { className: \"headlineContainer\", children: _jsx(Typography, { className: \"textCtaHeadline\", children: headlineTitle }) })), text && _jsx(\"p\", { className: `textCtaText ${showPlayStore && 'isPlayStore'}`, children: text }), listItems && listItems.length > 0 && (_jsx(List, { className: \"textCtaList\", children: listItems.map((item, index) => {\n return (_jsxs(ListItem, { children: [_jsx(Icon, { className: item.icon || 'check' }), item.text] }, 'text-cta-list-item' + index));\n }) })), _jsxs(\"div\", { className: \"textCtaBtnGroup\", children: [(!showAppStore || !showPlayStore) && (_jsxs(_Fragment, { children: [showFirstButton && handleRenderBtn(firstButtonProps, onClickFirstBtn), showSecondButton && handleRenderBtn(secondButtonProps, onClickSecondBtn)] })), (!showFirstButton || !showSecondButton) && (_jsxs(_Fragment, { children: [showAppStore && (_jsx(\"span\", { className: \"appStoreBadge\", onClick: () => handleUrlClick(appStoreProps.url), children: _jsx(\"img\", { src: appStoreProps.img, alt: appStoreProps.alt }) })), showPlayStore && (_jsx(\"span\", { className: \"playStoreBadge\", dangerouslySetInnerHTML: { __html: playStoreProps } }))] }))] })] })));\n});\n//Set the correct font and lineheight depending on the prop variant passed\nconst getHeadlineStyle = (headlineVariant) => {\n switch (headlineVariant) {\n case 'h1':\n return {\n fontSize: '44px',\n lineHeight: '52px',\n };\n case 'h2':\n return {\n fontSize: '36px',\n lineHeight: '44px',\n };\n case 'h3':\n return {\n fontSize: '30px',\n lineHeight: '36px',\n };\n case 'h4':\n return {\n fontSize: '24px',\n lineHeight: '28px',\n };\n default:\n return {\n fontSize: '18px',\n lineHeight: '28px',\n };\n }\n};\n/**\n * @description Button styling defintion based on props\n */\nconst TextCtaContainerStyled = styled('div', {\n shouldForwardProp: (prop) => prop !== 'listItems' && prop !== 'headlineVariant',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n let styles = {};\n styles = {\n '& > span': {\n margin: 0,\n },\n '& > div.headlineContainer': {\n marginBottom: '10px',\n marginTop: '5px',\n '& > .textCtaHeadline': Object.assign({ fontWeight: 'bold' }, getHeadlineStyle(args.headlineVariant)),\n },\n '& > div.subheadlineContainer': {\n marginBottom: '10px',\n '& > .textCtaSubheadline': {\n fontWeight: 'bold',\n fontSize: '18px',\n lineHeight: '28px',\n },\n },\n '& > .textCtaList': {\n marginBottom: '10px',\n },\n '& > .textCtaText': {\n fontSize: '18px',\n lineHeight: '28px',\n margin: '12px 0 16px 0',\n '&.isPlayStore': {\n marginBottom: '2px',\n },\n },\n '& > div.textCtaBtnGroup': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n flexWrap: 'wrap',\n '& > div': {\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n },\n },\n '& > .appStoreBadge': {\n cursor: 'pointer',\n marginRight: '8px',\n '& > img': {\n height: '40px',\n },\n },\n '& > .playStoreBadge': {\n cursor: 'pointer',\n '& img': {\n maxWidth: '153px',\n },\n },\n '& .MuiButton-root': {\n paddingLeft: '16px',\n paddingRight: '16px',\n paddingBottom: '2px',\n fontSize: '14px',\n minWidth: '93px',\n height: '32px',\n [theme.breakpoints.down('sm')]: {\n height: '44px',\n width: '100%',\n },\n },\n '& .MuiButton-root:first-of-type': {\n marginRight: '16px',\n marginBottom: 0,\n [theme.breakpoints.down('sm')]: {\n marginBottom: '16px',\n },\n },\n },\n ' & > .MuiList-root': {\n padding: '0px',\n '& > .MuiListItem-root': {\n padding: '0px 0px 6px 0px',\n '& > .MuiIcon-root': {\n width: '20px',\n height: '24px',\n fontSize: '14px',\n },\n },\n },\n };\n return styles;\n});\n//# sourceMappingURL=textCta.js.map"],"names":["TextCta","forwardRef","_a","ref","label","headlineTitle","text","showFirstButton","showSecondButton","onClickFirstBtn","onClickSecondBtn","firstButtonProps","secondButtonProps","listItems","showAppStore","showPlayStore","appStoreProps","playStoreProps","props","__rest","handleUrlClick","useCallback","url","window","open","handleOnClickBtn","e","callback","handleRenderBtn","btnProps","onClickHandler","propsA","Object","assign","_jsx","Button","onClick","_jsxs","jsxs","TextCtaContainerStyled","children","jsx","Label","className","Typography","length","List","map","item","index","ListItem","Icon","icon","_Fragment","Fragment","src","img","alt","dangerouslySetInnerHTML","__html","getHeadlineStyle","headlineVariant","fontSize","lineHeight","styled","shouldForwardProp","prop","theme","args","styles","margin","marginBottom","marginTop","fontWeight","display","alignItems","justifyContent","flexWrap","breakpoints","down","width","cursor","marginRight","height","maxWidth","paddingLeft","paddingRight","paddingBottom","minWidth","padding"],"mappings":"0RAeY,MAACA,EAAUC,EAAUA,YAAC,CAACC,EAAIC,KACnC,IAAMC,MAAAA,EAAKC,cAAEA,EAAaC,KAAEA,EAAIC,gBAAEA,GAAkB,EAAKC,iBAAEA,GAAmB,EAAKC,gBAAEA,EAAeC,iBAAEA,EAAgBC,iBAAEA,EAAgBC,kBAAEA,EAAiBC,UAAEA,EAASC,aAAEA,GAAe,EAAKC,cAAEA,GAAgB,EAAKC,cAAEA,EAAaC,eAAEA,GAAmBf,EAAIgB,EAAQC,EAAMA,OAACjB,EAAI,CAAC,QAAS,gBAAiB,OAAQ,kBAAmB,mBAAoB,kBAAmB,mBAAoB,mBAAoB,oBAA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B,0BAA2B,CACvBG,QAAS,OACTC,WAAY,SACZC,eAAgB,aAChBC,SAAU,OACV,UAAW,CACP,CAACV,EAAMW,YAAYC,KAAK,OAAQ,CAC5BC,MAAO,SAGf,qBAAsB,CAClBC,OAAQ,UACRC,YAAa,MACb,UAAW,CACPC,OAAQ,SAGhB,sBAAuB,CACnBF,OAAQ,UACR,QAAS,CACLG,SAAU,UAGlB,oBAAqB,CACjBC,YAAa,OACbC,aAAc,OACdC,cAAe,MACfzB,SAAU,OACV0B,SAAU,OACVL,OAAQ,OACR,CAAChB,EAAMW,YAAYC,KAAK,OAAQ,CAC5BI,OAAQ,OACRH,MAAO,SAGf,kCAAmC,CAC/BE,YAAa,OACbX,aAAc,EACd,CAACJ,EAAMW,YAAYC,KAAK,OAAQ,CAC5BR,aAAc,UAI1B,qBAAsB,CAClBkB,QAAS,MACT,wBAAyB,CACrBA,QAAS,kBACT,oBAAqB,CACjBT,MAAO,OACPG,OAAQ,OACRrB,SAAU,WAKnBO,CAAM"}
1
+ {"version":3,"file":"textCta.js","sources":["../../../../src/organisms/textCta/textCta.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useCallback, forwardRef } from 'react';\nimport { styled } from '@mui/material/styles';\nimport { Label } from '../../components/label';\nimport { List, ListItem, Typography } from '@mui/material';\nimport { Button } from '../../components/button';\nimport { Icon } from '../../components/icon';\n/**\n * @description SkodaFlow Button component.\n * Properties are inherited from HTML Button element.\n * @param props ButtonProps\n * @returns React Functional Component\n * @deprecated\n */\nexport const TextCta = forwardRef((_a, ref) => {\n var { label, headlineTitle, text, showFirstButton = false, showSecondButton = false, onClickFirstBtn, onClickSecondBtn, firstButtonProps, secondButtonProps, listItems, showAppStore = false, showPlayStore = false, appStoreProps, playStoreProps } = _a, props = __rest(_a, [\"label\", \"headlineTitle\", \"text\", \"showFirstButton\", \"showSecondButton\", \"onClickFirstBtn\", \"onClickSecondBtn\", \"firstButtonProps\", \"secondButtonProps\", \"listItems\", \"showAppStore\", \"showPlayStore\", \"appStoreProps\", \"playStoreProps\"]);\n const handleUrlClick = useCallback((url) => {\n window.open(url, '_blank');\n }, []);\n const handleOnClickBtn = useCallback((e, callback, url) => {\n if (url) {\n handleUrlClick(url);\n }\n callback && callback(e);\n }, [handleUrlClick]);\n const handleRenderBtn = useCallback((btnProps, onClickHandler) => {\n const propsA = Object.assign(Object.assign({}, btnProps), { url: btnProps.url || null });\n return _jsx(Button, Object.assign({}, propsA, { onClick: (e) => handleOnClickBtn(e, onClickHandler, propsA.url) }));\n }, [handleOnClickBtn]);\n return (_jsxs(TextCtaContainerStyled, Object.assign({ ref: ref, listItems: listItems }, props, { children: [label && _jsx(Label, { label: label }), headlineTitle && (_jsx(\"div\", { className: \"headlineContainer\", children: _jsx(Typography, { className: \"textCtaHeadline\", children: headlineTitle }) })), text && _jsx(\"p\", { className: `textCtaText ${showPlayStore && 'isPlayStore'}`, children: text }), listItems && listItems.length > 0 && (_jsx(List, { className: \"textCtaList\", children: listItems.map((item, index) => {\n return (_jsxs(ListItem, { children: [_jsx(Icon, { name: item.icon || 'check' }), item.text] }, 'text-cta-list-item' + index));\n }) })), _jsxs(\"div\", { className: \"textCtaBtnGroup\", children: [(!showAppStore || !showPlayStore) && (_jsxs(_Fragment, { children: [showFirstButton && handleRenderBtn(firstButtonProps, onClickFirstBtn), showSecondButton && handleRenderBtn(secondButtonProps, onClickSecondBtn)] })), (!showFirstButton || !showSecondButton) && (_jsxs(_Fragment, { children: [showAppStore && (_jsx(\"span\", { className: \"appStoreBadge\", onClick: () => handleUrlClick(appStoreProps.url), children: _jsx(\"img\", { src: appStoreProps.img, alt: appStoreProps.alt }) })), showPlayStore && (_jsx(\"span\", { className: \"playStoreBadge\", dangerouslySetInnerHTML: { __html: playStoreProps } }))] }))] })] })));\n});\n//Set the correct font and lineheight depending on the prop variant passed\nconst getHeadlineStyle = (headlineVariant) => {\n switch (headlineVariant) {\n case 'h1':\n return {\n fontSize: '44px',\n lineHeight: '52px',\n };\n case 'h2':\n return {\n fontSize: '36px',\n lineHeight: '44px',\n };\n case 'h3':\n return {\n fontSize: '30px',\n lineHeight: '36px',\n };\n case 'h4':\n return {\n fontSize: '24px',\n lineHeight: '28px',\n };\n default:\n return {\n fontSize: '18px',\n lineHeight: '28px',\n };\n }\n};\n/**\n * @description Button styling defintion based on props\n */\nconst TextCtaContainerStyled = styled('div', {\n shouldForwardProp: (prop) => prop !== 'listItems' && prop !== 'headlineVariant',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n let styles = {};\n styles = {\n '& > span': {\n margin: 0,\n },\n '& > div.headlineContainer': {\n marginBottom: '10px',\n marginTop: '5px',\n '& > .textCtaHeadline': Object.assign({ fontWeight: 'bold' }, getHeadlineStyle(args.headlineVariant)),\n },\n '& > div.subheadlineContainer': {\n marginBottom: '10px',\n '& > .textCtaSubheadline': {\n fontWeight: 'bold',\n fontSize: '18px',\n lineHeight: '28px',\n },\n },\n '& > .textCtaList': {\n marginBottom: '10px',\n },\n '& > .textCtaText': {\n fontSize: '18px',\n lineHeight: '28px',\n margin: '12px 0 16px 0',\n '&.isPlayStore': {\n marginBottom: '2px',\n },\n },\n '& > div.textCtaBtnGroup': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n flexWrap: 'wrap',\n '& > div': {\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n },\n },\n '& > .appStoreBadge': {\n cursor: 'pointer',\n marginRight: '8px',\n '& > img': {\n height: '40px',\n },\n },\n '& > .playStoreBadge': {\n cursor: 'pointer',\n '& img': {\n maxWidth: '153px',\n },\n },\n '& .MuiButton-root': {\n paddingLeft: '16px',\n paddingRight: '16px',\n paddingBottom: '2px',\n fontSize: '14px',\n minWidth: '93px',\n height: '32px',\n [theme.breakpoints.down('sm')]: {\n height: '44px',\n width: '100%',\n },\n },\n '& .MuiButton-root:first-of-type': {\n marginRight: '16px',\n marginBottom: 0,\n [theme.breakpoints.down('sm')]: {\n marginBottom: '16px',\n },\n },\n },\n ' & > .MuiList-root': {\n padding: '0px',\n '& > .MuiListItem-root': {\n padding: '0px 0px 6px 0px',\n '& > .MuiIcon-root': {\n width: '20px',\n height: '24px',\n fontSize: '14px',\n },\n },\n },\n };\n return styles;\n});\n//# sourceMappingURL=textCta.js.map"],"names":["TextCta","forwardRef","_a","ref","label","headlineTitle","text","showFirstButton","showSecondButton","onClickFirstBtn","onClickSecondBtn","firstButtonProps","secondButtonProps","listItems","showAppStore","showPlayStore","appStoreProps","playStoreProps","props","__rest","handleUrlClick","useCallback","url","window","open","handleOnClickBtn","e","callback","handleRenderBtn","btnProps","onClickHandler","propsA","Object","assign","_jsx","Button","onClick","_jsxs","jsxs","TextCtaContainerStyled","children","jsx","Label","className","Typography","length","List","map","item","index","ListItem","Icon","name","icon","_Fragment","Fragment","src","img","alt","dangerouslySetInnerHTML","__html","getHeadlineStyle","headlineVariant","fontSize","lineHeight","styled","shouldForwardProp","prop","theme","args","styles","margin","marginBottom","marginTop","fontWeight","display","alignItems","justifyContent","flexWrap","breakpoints","down","width","cursor","marginRight","height","maxWidth","paddingLeft","paddingRight","paddingBottom","minWidth","padding"],"mappings":"+UAeY,MAACA,EAAUC,EAAUA,YAAC,CAACC,EAAIC,KACnC,IAAMC,MAAAA,EAAKC,cAAEA,EAAaC,KAAEA,EAAIC,gBAAEA,GAAkB,EAAKC,iBAAEA,GAAmB,EAAKC,gBAAEA,EAAeC,iBAAEA,EAAgBC,iBAAEA,EAAgBC,kBAAEA,EAAiBC,UAAEA,EAASC,aAAEA,GAAe,EAAKC,cAAEA,GAAgB,EAAKC,cAAEA,EAAaC,eAAEA,GAAmBf,EAAIgB,EAAQC,EAAMA,OAACjB,EAAI,CAAC,QAAS,gBAAiB,OAAQ,kBAAmB,mBAAoB,kBAAmB,mBAAoB,mBAAoB,oBAAqB,YAAa,eAAgB,gBAAiB,gBAAiB,mBACve,MAAMk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,eAAgB,aAChBC,SAAU,OACV,UAAW,CACP,CAACV,EAAMW,YAAYC,KAAK,OAAQ,CAC5BC,MAAO,SAGf,qBAAsB,CAClBC,OAAQ,UACRC,YAAa,MACb,UAAW,CACPC,OAAQ,SAGhB,sBAAuB,CACnBF,OAAQ,UACR,QAAS,CACLG,SAAU,UAGlB,oBAAqB,CACjBC,YAAa,OACbC,aAAc,OACdC,cAAe,MACfzB,SAAU,OACV0B,SAAU,OACVL,OAAQ,OACR,CAAChB,EAAMW,YAAYC,KAAK,OAAQ,CAC5BI,OAAQ,OACRH,MAAO,SAGf,kCAAmC,CAC/BE,YAAa,OACbX,aAAc,EACd,CAACJ,EAAMW,YAAYC,KAAK,OAAQ,CAC5BR,aAAc,UAI1B,qBAAsB,CAClBkB,QAAS,MACT,wBAAyB,CACrBA,QAAS,kBACT,oBAAqB,CACjBT,MAAO,OACPG,OAAQ,OACRrB,SAAU,WAKnBO,CAAM"}
@@ -1,2 +1,2 @@
1
- import{__rest as e}from"tslib";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{forwardRef as i,useState as o,useRef as a,useEffect as r,useCallback as c,useMemo as s,createElement as d}from"react";import{Box as l,AccordionSummary as m,IconButton as p,AccordionDetails as u}from"@mui/material";import h from"@mui/material/Accordion";import{styled as f}from"@mui/material/styles";import{handleMaxChars as g}from"../../utils/utilities.js";import{Icon as x}from"../icon/icon.js";const b=i(((i,h)=>{var{items:f,onChange:b,disableAnimation:v,accordionContainerProps:j,accordionPanelMaxHeight:y,allowMultipleExpand:A}=i,C=e(i,["items","onChange","disableAnimation","accordionContainerProps","accordionPanelMaxHeight","allowMultipleExpand"]);const[M,w]=o(!1),H=a(null);r((()=>{if(A){const e={};for(let t=0;t<f.length;t++){const n=f[t].id||`panel${t}`;e[n]=!!f[t].isDefaultExpanded}w((()=>e))}else{let e;const t=f.find(((t,n)=>{if(t.isDefaultExpanded)return e=n,t}));t&&w(t.id||`panel${e}`)}}),[A,f]),r((()=>{if(H&&H.current){const e=H.current.querySelector("button");e&&e.addEventListener("focusin",(e=>{e.preventDefault()}))}}),[H]);const N=c((e=>(t,n)=>{b&&b(e,n),w(A?t=>Object.assign(Object.assign({},t),{[e]:n}):!!n&&e)}),[A,b]),O=c((e=>"string"==typeof e?g(e,100):e),[]),E=s((()=>v?{timeout:0}:C.TransitionProps),[v,C.TransitionProps]);return t(l,Object.assign({ref:h},j,{"data-testid":"Accordion",children:f.map(((e,i)=>{const o=e.id||`panel${i}`,a=A?!!M[o]:M===o,r="string"==typeof e.content;return d(P,Object.assign({},C,{id:o,key:o,className:o,TransitionProps:E,expanded:a,onChange:N(o),isContentTypeString:r,disableGutters:!0,accordionPanelMaxHeight:y,square:!0,"data-testid":"Accordion.item"}),n(m,{className:"subheadline","aria-controls":`${o}d-content`,id:`${o}d-header`,expandIcon:t(p,{ref:H,"data-testid":"Accordion.btn",sx:{color:e=>e.palette.text.primary},children:t(x,{color:"inherit",className:"chevron-down"})}),"data-testid":"Accordion.summary",children:[t("div",{className:"accordion-panel-title",children:e.title}),C.previewContent&&r&&!a&&t("div",{className:"accordion-panel-title--sneak-peak","data-testid":"Accordion.peek",children:O(e.content)})]}),t(u,{"data-testid":"Accordion.content",children:t("div",{className:"text",children:e.content})}))}))}))})),P=f(h,{shouldForwardProp:e=>"previewContent"!==e&&"expandIcon"!==e&&"isContentTypeString"!==e&&"accordionPanelMaxHeight"!==e})((t=>{var n=e(t,["theme"]);let i={};return n.accordionPanelMaxHeight&&(i=Object.assign(Object.assign({},i),{"& .text":{maxHeight:n.accordionPanelMaxHeight,overflowY:"auto"}})),i}));export{b as Accordion};
1
+ import{__rest as e}from"tslib";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{forwardRef as i,useState as o,useRef as a,useEffect as r,useCallback as c,useMemo as s,createElement as d}from"react";import{Box as l,AccordionSummary as m,IconButton as p,AccordionDetails as u}from"@mui/material";import h from"@mui/material/Accordion";import{styled as f}from"@mui/material/styles";import{handleMaxChars as g}from"../../utils/utilities.js";import{Icon as x}from"../icon/icon.js";import"../icon/icon.definitions.js";const b=i(((i,h)=>{var{items:f,onChange:b,disableAnimation:v,accordionContainerProps:j,accordionPanelMaxHeight:y,allowMultipleExpand:A}=i,C=e(i,["items","onChange","disableAnimation","accordionContainerProps","accordionPanelMaxHeight","allowMultipleExpand"]);const[M,w]=o(!1),H=a(null);r((()=>{if(A){const e={};for(let t=0;t<f.length;t++){const n=f[t].id||`panel${t}`;e[n]=!!f[t].isDefaultExpanded}w((()=>e))}else{let e;const t=f.find(((t,n)=>{if(t.isDefaultExpanded)return e=n,t}));t&&w(t.id||`panel${e}`)}}),[A,f]),r((()=>{if(H&&H.current){const e=H.current.querySelector("button");e&&e.addEventListener("focusin",(e=>{e.preventDefault()}))}}),[H]);const O=c((e=>(t,n)=>{b&&b(e,n),w(A?t=>Object.assign(Object.assign({},t),{[e]:n}):!!n&&e)}),[A,b]),E=c((e=>"string"==typeof e?g(e,100):e),[]),N=s((()=>v?{timeout:0}:C.TransitionProps),[v,C.TransitionProps]);return t(l,Object.assign({ref:h},j,{"data-testid":"Accordion",children:f.map(((e,i)=>{const o=e.id||`panel${i}`,a=A?!!M[o]:M===o,r="string"==typeof e.content;return d(P,Object.assign({},C,{id:o,key:o,className:o,TransitionProps:N,expanded:a,onChange:O(o),isContentTypeString:r,disableGutters:!0,accordionPanelMaxHeight:y,square:!0,"data-testid":"Accordion.item"}),n(m,{className:"subheadline","aria-controls":`${o}d-content`,id:`${o}d-header`,expandIcon:t(p,{ref:H,"data-testid":"Accordion.btn",sx:{color:e=>e.palette.text.primary},children:t(x,{color:"inherit",name:"chevron-down"})}),"data-testid":"Accordion.summary",children:[t("div",{className:"accordion-panel-title",children:e.title}),C.previewContent&&r&&!a&&t("div",{className:"accordion-panel-title--sneak-peak","data-testid":"Accordion.peek",children:E(e.content)})]}),t(u,{"data-testid":"Accordion.content",children:t("div",{className:"text",children:e.content})}))}))}))})),P=f(h,{shouldForwardProp:e=>"previewContent"!==e&&"expandIcon"!==e&&"isContentTypeString"!==e&&"accordionPanelMaxHeight"!==e})((t=>{var n=e(t,["theme"]);let i={};return n.accordionPanelMaxHeight&&(i=Object.assign(Object.assign({},i),{"& .text":{maxHeight:n.accordionPanelMaxHeight,overflowY:"auto"}})),i}));export{b as Accordion};
2
2
  //# sourceMappingURL=accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sources":["../../../src/components/accordion/accordion.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { createElement as _createElement } from \"react\";\nimport { AccordionDetails, AccordionSummary, Box, IconButton } from '@mui/material';\nimport MuiAccordion from '@mui/material/Accordion';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef, useCallback, useEffect, useMemo, useRef, useState, } from 'react';\nimport { handleMaxChars } from '../../utils/utilities';\nimport { Icon } from '../icon';\nexport const Accordion = forwardRef((_a, ref) => {\n var { items, onChange, disableAnimation, accordionContainerProps, accordionPanelMaxHeight, allowMultipleExpand } = _a, props = __rest(_a, [\"items\", \"onChange\", \"disableAnimation\", \"accordionContainerProps\", \"accordionPanelMaxHeight\", \"allowMultipleExpand\"]);\n const [expand, setExpanded] = useState(false);\n const controlRef = useRef(null);\n useEffect(() => {\n if (!allowMultipleExpand) {\n let id;\n const firstDefaultExpandedItem = items.find((item, index) => {\n if (item.isDefaultExpanded) {\n id = index;\n return item;\n }\n return undefined;\n });\n if (firstDefaultExpandedItem) {\n setExpanded(firstDefaultExpandedItem.id || `panel${id}`);\n }\n }\n else {\n const expandItems = {};\n for (let index = 0; index < items.length; index++) {\n const itemId = items[index].id || `panel${index}`;\n expandItems[itemId] = !!items[index].isDefaultExpanded;\n }\n setExpanded(() => expandItems);\n }\n }, [allowMultipleExpand, items]);\n //disable black rounded circle on icon controller click\n useEffect(() => {\n if (controlRef && controlRef.current) {\n const controlBtn = controlRef.current.querySelector('button');\n if (controlBtn) {\n controlBtn.addEventListener('focusin', (e) => {\n e.preventDefault();\n });\n }\n }\n }, [controlRef]);\n const handleChange = useCallback((panel) => (_, isExpanded) => {\n onChange && onChange(panel, isExpanded);\n if (!allowMultipleExpand) {\n setExpanded(isExpanded ? panel : false);\n }\n else {\n setExpanded((curr) => {\n return Object.assign(Object.assign({}, curr), { [panel]: isExpanded });\n });\n }\n }, [allowMultipleExpand, onChange]);\n const handlePreviewContent = useCallback((content) => {\n if (typeof content === 'string')\n return handleMaxChars(content, 100);\n return content;\n }, []);\n const getTransitionProps = useMemo(() => {\n if (disableAnimation)\n return { timeout: 0 };\n else\n return props.TransitionProps;\n }, [disableAnimation, props.TransitionProps]);\n return (_jsx(Box, Object.assign({ ref: ref }, accordionContainerProps, { \"data-testid\": \"Accordion\", children: items.map((item, index) => {\n const panel = item.id || `panel${index}`;\n const isExpanded = allowMultipleExpand ? !!expand[panel] : expand === panel;\n const isContentTypeString = typeof item.content === 'string';\n return (_createElement(AccordionStyled, Object.assign({}, props, { id: panel, key: panel, className: panel, TransitionProps: getTransitionProps, expanded: isExpanded, onChange: handleChange(panel), isContentTypeString: isContentTypeString, disableGutters: true, accordionPanelMaxHeight: accordionPanelMaxHeight, square: true, \"data-testid\": \"Accordion.item\" }),\n _jsxs(AccordionSummary, { className: \"subheadline\", \"aria-controls\": `${panel}d-content`, id: `${panel}d-header`, expandIcon: _jsx(IconButton, { ref: controlRef, \"data-testid\": \"Accordion.btn\", sx: { color: (theme) => theme.palette.text.primary }, children: _jsx(Icon, { color: \"inherit\", className: \"chevron-down\" }) }), \"data-testid\": \"Accordion.summary\", children: [_jsx(\"div\", { className: \"accordion-panel-title\", children: item.title }), props.previewContent && isContentTypeString && !isExpanded && (_jsx(\"div\", { className: \"accordion-panel-title--sneak-peak\", \"data-testid\": \"Accordion.peek\", children: handlePreviewContent(item.content) }))] }),\n _jsx(AccordionDetails, { \"data-testid\": \"Accordion.content\", children: _jsx(\"div\", { className: \"text\", children: item.content }) })));\n }) })));\n});\nconst AccordionStyled = styled(MuiAccordion, {\n shouldForwardProp: (prop) => prop !== 'previewContent' &&\n prop !== 'expandIcon' &&\n prop !== 'isContentTypeString' &&\n prop !== 'accordionPanelMaxHeight',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n let style = {};\n if (args.accordionPanelMaxHeight) {\n style = Object.assign(Object.assign({}, style), { '& .text': {\n maxHeight: args.accordionPanelMaxHeight,\n overflowY: 'auto',\n } });\n }\n return style;\n});\n//# sourceMappingURL=accordion.js.map"],"names":["Accordion","forwardRef","_a","ref","items","onChange","disableAnimation","accordionContainerProps","accordionPanelMaxHeight","allowMultipleExpand","props","__rest","expand","setExpanded","useState","controlRef","useRef","useEffect","expandItems","index","length","itemId","id","isDefaultExpanded","firstDefaultExpandedItem","find","item","current","controlBtn","querySelector","addEventListener","e","preventDefault","handleChange","useCallback","panel","_","isExpanded","curr","Object","assign","handlePreviewContent","content","handleMaxChars","getTransitionProps","useMemo","timeout","TransitionProps","_jsx","Box","children","map","isContentTypeString","_createElement","AccordionStyled","key","className","expanded","disableGutters","square","_jsxs","AccordionSummary","expandIcon","IconButton","sx","color","theme","palette","text","primary","Icon","title","previewContent","AccordionDetails","styled","MuiAccordion","shouldForwardProp","prop","args","style","maxHeight","overflowY"],"mappings":"oeASY,MAACA,EAAYC,GAAW,CAACC,EAAIC,KACrC,IAAIC,MAAEA,EAAKC,SAAEA,EAAQC,iBAAEA,EAAgBC,wBAAEA,EAAuBC,wBAAEA,EAAuBC,oBAAEA,GAAwBP,EAAIQ,EAAQC,EAAOT,EAAI,CAAC,QAAS,WAAY,mBAAoB,0BAA2B,0BAA2B,wBAC1O,MAAOU,EAAQC,GAAeC,GAAS,GACjCC,EAAaC,EAAO,MAC1BC,GAAU,KACN,GAAKR,EAaA,CACD,MAAMS,EAAc,CAAA,EACpB,IAAK,IAAIC,EAAQ,EAAGA,EAAQf,EAAMgB,OAAQD,IAAS,CAC/C,MAAME,EAASjB,EAAMe,GAAOG,IAAM,QAAQH,IAC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YhC,SAAU4B,EAAaE,GAAQiB,oBAAqBA,EAAqBM,gBAAgB,EAAMlD,wBAAyBA,EAAyBmD,QAAQ,EAAM,cAAe,mBACjVC,EAAMC,EAAkB,CAAEL,UAAW,cAAe,gBAAiB,GAAGrB,aAAkBb,GAAI,GAAGa,YAAiB2B,WAAYd,EAAKe,EAAY,CAAE5D,IAAKY,EAAY,cAAe,gBAAiBiD,GAAI,CAAEC,MAAQC,GAAUA,EAAMC,QAAQC,KAAKC,SAAWnB,SAAUF,EAAKsB,EAAM,CAAEL,MAAO,UAAWT,UAAW,mBAAsB,cAAe,oBAAqBN,SAAU,CAACF,EAAK,MAAO,CAAEQ,UAAW,wBAAyBN,SAAUxB,EAAK6C,QAAU7D,EAAM8D,gBAAkBpB,IAAwBf,GAAeW,EAAK,MAAO,CAAEQ,UAAW,oCAAqC,cAAe,iBAAkBN,SAAUT,EAAqBf,EAAKgB,cAC9nBM,EAAKyB,EAAkB,CAAE,cAAe,oBAAqBvB,SAAUF,EAAK,MAAO,CAAEQ,UAAW,OAAQN,SAAUxB,EAAKgB,YAAgB,MACvI,IAEVY,EAAkBoB,EAAOC,EAAc,CACzCC,kBAAoBC,GAAkB,mBAATA,GAChB,eAATA,GACS,wBAATA,GACS,4BAATA,GAJgBH,EAKpBxE,IACG,IAAiB4E,EAAOnE,EAAOT,EAAI,CAAC,UACvC,IAAI6E,EAAQ,CAAA,EAOZ,OANID,EAAKtE,0BACLuE,EAAQxC,OAAOC,OAAOD,OAAOC,OAAO,GAAIuC,GAAQ,CAAE,UAAW,CACrDC,UAAWF,EAAKtE,wBAChByE,UAAW,WAGhBF,CAAK"}
1
+ {"version":3,"file":"accordion.js","sources":["../../../src/components/accordion/accordion.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { createElement as _createElement } from \"react\";\nimport { AccordionDetails, AccordionSummary, Box, IconButton } from '@mui/material';\nimport MuiAccordion from '@mui/material/Accordion';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef, useCallback, useEffect, useMemo, useRef, useState, } from 'react';\nimport { handleMaxChars } from '../../utils/utilities';\nimport { Icon } from '../icon';\nexport const Accordion = forwardRef((_a, ref) => {\n var { items, onChange, disableAnimation, accordionContainerProps, accordionPanelMaxHeight, allowMultipleExpand } = _a, props = __rest(_a, [\"items\", \"onChange\", \"disableAnimation\", \"accordionContainerProps\", \"accordionPanelMaxHeight\", \"allowMultipleExpand\"]);\n const [expand, setExpanded] = useState(false);\n const controlRef = useRef(null);\n useEffect(() => {\n if (!allowMultipleExpand) {\n let id;\n const firstDefaultExpandedItem = items.find((item, index) => {\n if (item.isDefaultExpanded) {\n id = index;\n return item;\n }\n return undefined;\n });\n if (firstDefaultExpandedItem) {\n setExpanded(firstDefaultExpandedItem.id || `panel${id}`);\n }\n }\n else {\n const expandItems = {};\n for (let index = 0; index < items.length; index++) {\n const itemId = items[index].id || `panel${index}`;\n expandItems[itemId] = !!items[index].isDefaultExpanded;\n }\n setExpanded(() => expandItems);\n }\n }, [allowMultipleExpand, items]);\n //disable black rounded circle on icon controller click\n useEffect(() => {\n if (controlRef && controlRef.current) {\n const controlBtn = controlRef.current.querySelector('button');\n if (controlBtn) {\n controlBtn.addEventListener('focusin', (e) => {\n e.preventDefault();\n });\n }\n }\n }, [controlRef]);\n const handleChange = useCallback((panel) => (_, isExpanded) => {\n onChange && onChange(panel, isExpanded);\n if (!allowMultipleExpand) {\n setExpanded(isExpanded ? panel : false);\n }\n else {\n setExpanded((curr) => {\n return Object.assign(Object.assign({}, curr), { [panel]: isExpanded });\n });\n }\n }, [allowMultipleExpand, onChange]);\n const handlePreviewContent = useCallback((content) => {\n if (typeof content === 'string')\n return handleMaxChars(content, 100);\n return content;\n }, []);\n const getTransitionProps = useMemo(() => {\n if (disableAnimation)\n return { timeout: 0 };\n else\n return props.TransitionProps;\n }, [disableAnimation, props.TransitionProps]);\n return (_jsx(Box, Object.assign({ ref: ref }, accordionContainerProps, { \"data-testid\": \"Accordion\", children: items.map((item, index) => {\n const panel = item.id || `panel${index}`;\n const isExpanded = allowMultipleExpand ? !!expand[panel] : expand === panel;\n const isContentTypeString = typeof item.content === 'string';\n return (_createElement(AccordionStyled, Object.assign({}, props, { id: panel, key: panel, className: panel, TransitionProps: getTransitionProps, expanded: isExpanded, onChange: handleChange(panel), isContentTypeString: isContentTypeString, disableGutters: true, accordionPanelMaxHeight: accordionPanelMaxHeight, square: true, \"data-testid\": \"Accordion.item\" }),\n _jsxs(AccordionSummary, { className: \"subheadline\", \"aria-controls\": `${panel}d-content`, id: `${panel}d-header`, expandIcon: _jsx(IconButton, { ref: controlRef, \"data-testid\": \"Accordion.btn\", sx: { color: (theme) => theme.palette.text.primary }, children: _jsx(Icon, { color: \"inherit\", name: \"chevron-down\" }) }), \"data-testid\": \"Accordion.summary\", children: [_jsx(\"div\", { className: \"accordion-panel-title\", children: item.title }), props.previewContent && isContentTypeString && !isExpanded && (_jsx(\"div\", { className: \"accordion-panel-title--sneak-peak\", \"data-testid\": \"Accordion.peek\", children: handlePreviewContent(item.content) }))] }),\n _jsx(AccordionDetails, { \"data-testid\": \"Accordion.content\", children: _jsx(\"div\", { className: \"text\", children: item.content }) })));\n }) })));\n});\nconst AccordionStyled = styled(MuiAccordion, {\n shouldForwardProp: (prop) => prop !== 'previewContent' &&\n prop !== 'expandIcon' &&\n prop !== 'isContentTypeString' &&\n prop !== 'accordionPanelMaxHeight',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n let style = {};\n if (args.accordionPanelMaxHeight) {\n style = Object.assign(Object.assign({}, style), { '& .text': {\n maxHeight: args.accordionPanelMaxHeight,\n overflowY: 'auto',\n } });\n }\n return style;\n});\n//# sourceMappingURL=accordion.js.map"],"names":["Accordion","forwardRef","_a","ref","items","onChange","disableAnimation","accordionContainerProps","accordionPanelMaxHeight","allowMultipleExpand","props","__rest","expand","setExpanded","useState","controlRef","useRef","useEffect","expandItems","index","length","itemId","id","isDefaultExpanded","firstDefaultExpandedItem","find","item","current","controlBtn","querySelector","addEventListener","e","preventDefault","handleChange","useCallback","panel","_","isExpanded","curr","Object","assign","handlePreviewContent","content","handleMaxChars","getTransitionProps","useMemo","timeout","TransitionProps","_jsx","Box","children","map","isContentTypeString","_createElement","AccordionStyled","key","className","expanded","disableGutters","square","_jsxs","AccordionSummary","expandIcon","IconButton","sx","color","theme","palette","text","primary","Icon","name","title","previewContent","AccordionDetails","styled","MuiAccordion","shouldForwardProp","prop","args","style","maxHeight","overflowY"],"mappings":"wgBASY,MAACA,EAAYC,GAAW,CAACC,EAAIC,KACrC,IAAIC,MAAEA,EAAKC,SAAEA,EAAQC,iBAAEA,EAAgBC,wBAAEA,EAAuBC,wBAAEA,EAAuBC,oBAAEA,GAAwBP,EAAIQ,EAAQC,EAAOT,EAAI,CAAC,QAAS,WAAY,mBAAoB,0BAA2B,0BAA2B,wBAC1O,MAAOU,EAAQC,GAAeC,GAAS,GACjCC,EAAaC,EAAO,MAC1BC,GAAU,KACN,GAAKR,EAaA,CACD,MAAMS,EAAc,CAAA,EACpB,IAAK,IAAIC,EAAQ,EAAGA,EAAQf,EAAMgB,OAAQD,IAAS,CAC/C,MAAME,EAASjB,EAAMe,GAAOG,IAAM,QAAQH,IAC1CD,EAAYG,KAAYjB,EAAMe,GAAOI,iBACxC,CACDV,GAAY,IAAMK,GACrB,KApByB,CACtB,IAAII,EACJ,MAAME,EAA2BpB,EAAMqB,MAAK,CAACC,EAAMP,KAC/C,GAAIO,EAAKH,kBAEL,OADAD,EAAKH,EACEO,CAEK,IAEhBF,GACAX,EAAYW,EAAyBF,IAAM,QAAQA,IAE1D,CAQA,GACF,CAACb,EAAqBL,IAEzBa,GAAU,KACN,GAAIF,GAAcA,EAAWY,QAAS,CAClC,MAAMC,EAAab,EAAWY,QAAQE,cAAc,UAChDD,GACAA,EAAWE,iBAAiB,WAAYC,IACpCA,EAAEC,gBAAgB,GAG7B,IACF,CAACjB,IACJ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UxB,EAAK8C,QAAU9D,EAAM+D,gBAAkBrB,IAAwBf,GAAeW,EAAK,MAAO,CAAEQ,UAAW,oCAAqC,cAAe,iBAAkBN,SAAUT,EAAqBf,EAAKgB,cACznBM,EAAK0B,EAAkB,CAAE,cAAe,oBAAqBxB,SAAUF,EAAK,MAAO,CAAEQ,UAAW,OAAQN,SAAUxB,EAAKgB,YAAgB,MACvI,IAEVY,EAAkBqB,EAAOC,EAAc,CACzCC,kBAAoBC,GAAkB,mBAATA,GAChB,eAATA,GACS,wBAATA,GACS,4BAATA,GAJgBH,EAKpBzE,IACG,IAAiB6E,EAAOpE,EAAOT,EAAI,CAAC,UACvC,IAAI8E,EAAQ,CAAA,EAOZ,OANID,EAAKvE,0BACLwE,EAAQzC,OAAOC,OAAOD,OAAOC,OAAO,GAAIwC,GAAQ,CAAE,UAAW,CACrDC,UAAWF,EAAKvE,wBAChB0E,UAAW,WAGhBF,CAAK"}
@@ -1,57 +1,19 @@
1
- import { MouseEvent } from 'react';
2
- import { ButtonVariant } from '../common/type/ButtonVariant';
3
- export interface BannerProps {
1
+ import React, { ReactNode } from 'react';
2
+ export type BannerProps = {
4
3
  /**
5
- * Variant of banner defines different look and style
4
+ * Defines which variant of Banner component should be rendered
5
+ * @default info
6
6
  */
7
- variant: 'primary' | 'secondary' | 'tertiary';
7
+ variant?: 'error' | 'warning' | 'info';
8
8
  /**
9
- * Icon name base on Icon component
9
+ * ReactNode that renders buttons. If multiple buttons are needed, wrap them in React.Fragment
10
+ * @default undefined
10
11
  */
11
- icon?: string;
12
+ buttons?: ReactNode;
12
13
  /**
13
- * Icon Type if icon is normal or filled
14
+ * Content of Banner component
15
+ * @requires
14
16
  */
15
- iconIsFilled?: boolean;
16
- /**
17
- * Text of banner
18
- */
19
- textContent?: string;
20
- /**
21
- * Dismiss Button label
22
- */
23
- buttonLabel?: string;
24
- /**
25
- * Dismiss Button variant
26
- */
27
- buttonVariant?: ButtonVariant;
28
- /**
29
- * Dismiss button callback
30
- */
31
- buttonCallback?: (ev: MouseEvent) => void;
32
- /**
33
- * Additional Button show/hide
34
- */
35
- additionalButton?: boolean;
36
- /**
37
- * Additional Button variant
38
- */
39
- additionalButtonVariant?: ButtonVariant;
40
- /**
41
- * Additional Button Label
42
- */
43
- additionalButtonLabel?: string;
44
- /**
45
- * Additional Button Callback
46
- */
47
- additionalButtonCallback?: (ev: MouseEvent) => void;
48
- /**
49
- * Additional Button Callback
50
- */
51
- analyticsCallback?: (ev: MouseEvent) => void;
52
- /**
53
- * Visibility control over whole banner
54
- */
55
- isVisible?: boolean;
56
- }
57
- export declare const Banner: import("react").ForwardRefExoticComponent<BannerProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ children: ReactNode;
18
+ };
19
+ export declare const Banner: React.FC<BannerProps>;
@@ -1,2 +1,2 @@
1
- import{__rest as a}from"tslib";import{jsx as n,Fragment as t,jsxs as e}from"react/jsx-runtime";import{forwardRef as i,useState as o,useEffect as r}from"react";import l from"@emotion/styled";import{Icon as d}from"../icon/icon.js";import{Button as s}from"../button/button.js";import{flowColors as c}from"../../design/skoda/palette.theme.js";import{ColourSheme as b}from"../../utils/enum.js";const m=i(((i,l)=>{var c=a(i,[]);const[m,u]=o(!0);r((()=>{(c.isVisible||!1===c.isVisible)&&u(c.isVisible)}),[c.isVisible]);const f=(a,n)=>{var t,e,i;"additional"===n?null===(t=c.additionalButtonCallback)||void 0===t||t.call(c,a):null===(e=c.buttonCallback)||void 0===e||e.call(c,a),null===(i=c.analyticsCallback)||void 0===i||i.call(c,a),u(!1)},x=c.iconIsFilled?" filled":"",g=c.buttonVariant,v=c.additionalButtonVariant;return n(t,{children:m&&n(p,{className:c.variant,variant:c.variant,ref:l,"data-testid":"Banner",children:e("div",{className:"bannerWrapper",children:[e("div",{className:"bannerHeader",children:[c.icon&&n(d,{fontSize:"medium",className:`${c.icon} ${x}`,"data-testid":"Banner.icon"}),n("p",{className:"body","data-testid":"Banner.body",children:c.textContent})]}),e("div",{className:"bannerBtnContainer",children:[c.additionalButton&&n(s,{variant:v,compact:!0,label:c.additionalButtonLabel,onClick:a=>f(a,"additional"),"data-testid":"Banner.btn2"}),"secondary"===c.variant?n(s,{variant:g,colourScheme:b.LIGHT_MODE,compact:!0,label:c.additionalButtonLabel,onClick:a=>f(a,"main"),"data-testid":"Banner.btn1"}):n(s,{variant:g,compact:!0,label:c.buttonLabel,onClick:a=>f(a,"main"),"data-testid":"Banner.btn1"})]})]})})})})),p=l.div((n=>{var{theme:t}=n;const e=a(n,["theme"]);let i={};switch(i=Object.assign(Object.assign({},i),{"& > .bannerWrapper":{boxSizing:"border-box",padding:"16px",display:"flex",flexDirection:"column",flexWrap:"nowrap",width:"100%",[t.breakpoints.up("md")]:{padding:"7px 16px",flexDirection:"row"},"& *":{boxSizing:"border-box"}},"& .bannerHeader":{display:"flex",alignItems:"flex-start",justifyContent:"flex-items",width:"100%",marginBottom:"16px",[t.breakpoints.up("md")]:{alignItems:"center",marginBottom:"0"},"& .MuiIcon-root":{color:c.brand.tertiary,fontSize:"20px"}},"& .body":{margin:"0 0 0 8px",fontSize:"14px",fontWeight:"400",letterSpacing:"0.05px"},"& .bannerBtnContainer":{display:"flex",width:"100%",justifyContent:"flex-start",[t.breakpoints.up("md")]:{justifyContent:"flex-end"},"& > div + div":{marginLeft:"16px"}}}),e.variant){case"secondary":i=Object.assign(Object.assign({},i),{backgroundColor:c.brand.tertiary,color:c.onSurface.os0,"& .bannerHeader .MuiIcon-root":{color:c.brand.secondary}});break;case"tertiary":i=Object.assign(Object.assign({},i),{backgroundColor:c.surface.secondary,color:c.onSurface.os800,"& .bannerHeader .MuiIcon-root":{color:c.brand.primary}});break;default:i=Object.assign(Object.assign({},i),{backgroundColor:c.brand.secondary,color:c.onSurface.os900})}return i}));export{m as Banner};
1
+ import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import{useTheme as r,lighten as i,Stack as a,Box as s,Typography as n}from"@mui/material";import"@mui/material/styles";import"../../design/skoda/palette.theme.js";import"../../design/skoda/components/accordion/accordionSummary.theme.js";import"../../design/skoda/components/autocomplete.theme.js";import"../../design/skoda/components/backdrop.theme.js";import"@skodaflow/web-tokens/src/tokens.json";import"@mui/system";import"../../design/skoda/theme.breakpoints.js";import"../../design/skoda/theme.constants.js";import"tslib";import"@mui/x-date-pickers/internals";import"../../design/skoda/components/divider.theme.js";import"../../design/skoda/components/drawer.theme.js";import"../accordion/accordion.js";import"../backdrop/backdrop.js";import"../button/button.js";import"../cardContainer/cardContainer.js";import"../cardMenu/cardMenu.js";import"../checkbox/checkbox.js";import"../chip/chipImage/chipImage.js";import"../chip/regular/chip.js";import"../chip/chipMultiselect/multiSelectChip.js";import"../chip/chipDropdownChildren/chipDropdownChildren.js";import"@mui/material/Container";import"../controls/controls.js";import"../divider/divider.js";import"../drawer/drawer.js";import"../flag/flag.js";import"@mui/material/Grid";import{Icon as m}from"../icon/icon.js";import"../icon/icon.definitions.js";import"../indicator/indicator.js";import"../label/label.js";import"../labelCO2/labelCO2.js";import"../labelFeature/labelFeature.js";import"../labelPromotional/labelPromotional.js";import"../labelStatus/labelStatus.js";import"../menu/menu.js";import"@mui/material/MenuItem";import"@mui/material/MobileStepper";import"../mobileStepper/mobileStepperButton.js";import"../modal/modal.js";import"../modal/modalTitle.js";import"../numbering/numbering.js";import"../pagination/pagination.js";import"../progressBar/progressBar.js";import"../radioButton/radioButton.js";import"../selectInput/selectInput.js";import"../slider/slider.js";import"../snackbar/snackbar.js";import"../stepper/stepper.js";import"../tab/tab.js";import"../tab/tabs.js";import"../tab/secondaryNavigation/secondaryNavigationTabs.js";import"../textArea/textArea.js";import"../common/styled/textFieldStyled.js";import"../helperTextContent/index.js";import"lodash/noop";import"../toggleSwitch/toggleSwitch.js";import"../agGrid/agGrid.js";import"../avatar/Avatar.js";import"../iconButton/index.js";import"../alert/AlertButton.js";import"../../organisms/gallery/Gallery.js";import"../../organisms/gallery/GalleryItem.js";import"minimatch";import"../../utils/enum.js";import"../../design/skoda/components/form/slider.theme.js";import"../../design/skoda/components/icon.theme.js";import"../../design/skoda/components/mobileStepper.theme.js";import"../../design/skoda/components/modal.theme.js";import"../../design/skoda/components/pagination.theme.js";import"../../design/skoda/components/snackbar.theme.js";import"../../design/skoda/components/stepper/stepIcon/errorStepIcon.js";import"../../design/skoda/components/stepper/stepIcon/qontoStepIcon.js";import"../../design/skoda/components/tabs/tabs.theme.js";import"../../design/skoda/components/tooltip.theme.js";import"react-use";import"../../organisms/cardOwnedVehicle/cardOwnedVehicle.js";import"../../organisms/cardPhotoAdjustable/cardPhotoAdjustable.js";import"../../organisms/cardPhotoFixed/cardPhotoFixed.js";import"../../organisms/cardPromoVehicle/cardPromoVehicleComponent.js";import"../../organisms/common/styled/cardStandardWrapperStyled.js";import"../../organisms/cardTypeOnly/cardTypeOnly.js";import"embla-carousel-react";import"embla-carousel-class-names";import"embla-carousel-autoplay";import"../../organisms/carousel/styledComponents/styledCarouselHorizontal.js";import"../../organisms/carousel/styledComponents/styledCarouselVertical.js";import"../../organisms/heroImageCard/heroImageCard.js";import"@googlemaps/react-wrapper";import"@googlemaps/markerclusterer";import"../../organisms/maps/utils/mapIcons.js";import"../../organisms/maps/mapComponents/mapStyled.js";import"../../organisms/shortcutLink/shortcutLink.js";import"../../organisms/textCta/textCta.js";import"../../organisms/tile/tile.js";import"lodash/merge";import"../../organisms/carousel2/galleryCarousel/galleryContext.js";import"../../organisms/carousel2/galleryCarousel/galleryItemContext.js";import"../../organisms/carousel2/heroCarousel/heroCarouselContext.js";import"../../organisms/notification/Notification.js";import"../../organisms/notification/NotificationCenter.js";import"../../layout/Header/HeaderContext.js";import"../../layout/Header/HeaderButton.js";import"../../layout/Header/HeaderNavigationHero.js";import"../../layout/Header/HeaderNavigationLink.js";import"../../layout/Header/HeaderNavigationMenu.js";import"../../layout/Header/PredefinedHeaderButtons.js";import"../../layout/Header/HeaderOverheadItem.js";import"../../layout/SideMenu/SideMenuItem.js";import"@mui/material/Unstable_Grid2";import"react-keyed-flatten-children";import"../../layout/SecondaryNavigation/SecondaryNavigationCta.js";import"../../layout/SecondaryNavigation/SecondaryNavigationItem.js";import"../../production/Button/Button.js";const p=({children:p,variant:l="info",buttons:d})=>{const c=r(),g=e((()=>{switch(l){case"error":return c.palette.error.main;case"warning":return c.palette.warning.main;default:return c.palette.info.main}}),[l,c]),j=e((()=>{switch(l){case"error":return i(c.palette.error.light,.9);case"warning":return i(c.palette.warning.light,.9);default:return i(c.palette.info.light,.9)}}),[l,c]);return o(a,{direction:{md:"row",sm:"column"},spacing:0,sx:{borderLeft:"6px solid",alignItems:"flex-start",borderColor:g,backgroundColor:j},"data-testid":"Banner",children:[o(a,{direction:"row",spacing:2,sx:{padding:{md:"12px 16px",sm:"16px",xs:"11px 16px"},flexGrow:1,alignItems:"center"},children:[t(s,{component:m,className:"info"===l?"circle-information":"circle-exclamation",iconStyle:"filled",color:l,sx:{alignSelf:"flex-start",color:g,marginTop:{lg:"2px !important",md:"1px !important",sm:"-2px !important"}}}),t(s,{children:"string"==typeof p?t(n,{children:p}):p})]}),d&&t(a,{direction:"row",spacing:1,useFlexGap:!0,sx:{padding:"8px 16px",textWrap:"nowrap",flexWrap:"wrap",alignSelf:"center",marginRight:"auto"},"data-testid":"Banner.buttons",children:d})]})};export{p as Banner};
2
2
  //# sourceMappingURL=banner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"banner.js","sources":["../../../src/components/banner/banner.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useEffect, useState, forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Icon } from '../../components/icon';\nimport { Button } from '../../components/button';\nimport { flowColors } from '../../design/skoda/palette.theme';\nimport { ColourSheme } from '../../utils/enum';\nexport const Banner = forwardRef((_a, ref) => {\n var props = __rest(_a, []);\n const [isBannerVisible, setIsBannerVisible] = useState(true);\n useEffect(() => {\n if (props.isVisible || props.isVisible === false) {\n setIsBannerVisible(props.isVisible);\n }\n }, [props.isVisible]);\n const onClickButtons = (ev, btnType) => {\n var _a, _b, _c;\n if (btnType === 'additional') {\n (_a = props.additionalButtonCallback) === null || _a === void 0 ? void 0 : _a.call(props, ev);\n }\n else {\n (_b = props.buttonCallback) === null || _b === void 0 ? void 0 : _b.call(props, ev);\n }\n (_c = props.analyticsCallback) === null || _c === void 0 ? void 0 : _c.call(props, ev);\n setIsBannerVisible(false);\n };\n const isFilled = props.iconIsFilled ? ' filled' : '';\n const buttonVariantMain = props.buttonVariant;\n const buttonVariantAdditional = props.additionalButtonVariant;\n return (_jsx(_Fragment, { children: isBannerVisible && (_jsx(BannerStyled, { className: props.variant, variant: props.variant, ref: ref, \"data-testid\": \"Banner\", children: _jsxs(\"div\", { className: \"bannerWrapper\", children: [_jsxs(\"div\", { className: \"bannerHeader\", children: [props.icon && (_jsx(Icon, { fontSize: \"medium\", className: `${props.icon} ${isFilled}`, \"data-testid\": \"Banner.icon\" })), _jsx(\"p\", { className: \"body\", \"data-testid\": \"Banner.body\", children: props.textContent })] }), _jsxs(\"div\", { className: \"bannerBtnContainer\", children: [props.additionalButton && (_jsx(Button, { variant: buttonVariantAdditional, compact: true, label: props.additionalButtonLabel, onClick: (ev) => onClickButtons(ev, 'additional'), \"data-testid\": \"Banner.btn2\" })), props.variant === 'secondary' ? (_jsx(Button, { variant: buttonVariantMain, colourScheme: ColourSheme.LIGHT_MODE, compact: true, label: props.additionalButtonLabel, onClick: (ev) => onClickButtons(ev, 'main'), \"data-testid\": \"Banner.btn1\" })) : (_jsx(Button, { variant: buttonVariantMain, compact: true, label: props.buttonLabel, onClick: (ev) => onClickButtons(ev, 'main'), \"data-testid\": \"Banner.btn1\" }))] })] }) })) }));\n});\nconst BannerStyled = styled.div((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const props = args;\n let styles = {};\n styles = Object.assign(Object.assign({}, styles), { '& > .bannerWrapper': {\n boxSizing: 'border-box',\n padding: '16px',\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'nowrap',\n width: '100%',\n [theme.breakpoints.up('md')]: {\n padding: '7px 16px',\n flexDirection: 'row',\n },\n '& *': {\n boxSizing: 'border-box',\n },\n }, '& .bannerHeader': {\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'flex-items',\n width: '100%',\n marginBottom: '16px',\n [theme.breakpoints.up('md')]: {\n alignItems: 'center',\n marginBottom: '0',\n },\n '& .MuiIcon-root': {\n color: flowColors.brand.tertiary,\n fontSize: '20px',\n },\n }, '& .body': {\n margin: '0 0 0 8px',\n fontSize: '14px',\n fontWeight: '400',\n letterSpacing: '0.05px',\n }, '& .bannerBtnContainer': {\n display: 'flex',\n width: '100%',\n justifyContent: 'flex-start',\n [theme.breakpoints.up('md')]: {\n justifyContent: 'flex-end',\n },\n '& > div + div': {\n marginLeft: '16px',\n },\n } });\n switch (props.variant) {\n case 'secondary':\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.brand.tertiary, color: flowColors.onSurface.os0, '& .bannerHeader .MuiIcon-root': {\n color: flowColors.brand.secondary,\n } });\n break;\n case 'tertiary':\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.surface.secondary, color: flowColors.onSurface.os800, '& .bannerHeader .MuiIcon-root': {\n color: flowColors.brand.primary,\n } });\n break;\n case 'primary':\n default:\n styles = Object.assign(Object.assign({}, styles), { backgroundColor: flowColors.brand.secondary, color: flowColors.onSurface.os900 });\n break;\n }\n return styles;\n});\n//# sourceMappingURL=banner.js.map"],"names":["Banner","forwardRef","_a","ref","props","__rest","isBannerVisible","setIsBannerVisible","useState","useEffect","isVisible","onClickButtons","ev","btnType","_b","_c","additionalButtonCallback","call","buttonCallback","analyticsCallback","isFilled","iconIsFilled","buttonVariantMain","buttonVariant","buttonVariantAdditional","additionalButtonVariant","_jsx","_Fragment","children","BannerStyled","className","variant","_jsxs","icon","Icon","fontSize","textContent","additionalButton","Button","compact","label","additionalButtonLabel","onClick","colourScheme","ColourSheme","LIGHT_MODE","buttonLabel","styled","div","theme","styles","Object","assign","boxSizing","padding","display","flexDirection","flexWrap","width","breakpoints","up","alignItems","justifyContent","marginBottom","color","flowColors","brand","tertiary","margin","fontWeight","letterSpacing","marginLeft","backgroundColor","onSurface","os0","secondary","surface","os800","primary","os900"],"mappings":"qYAQY,MAACA,EAASC,GAAW,CAACC,EAAIC,KAClC,IAAIC,EAAQC,EAAOH,EAAI,IACvB,MAAOI,EAAiBC,GAAsBC,GAAS,GACvDC,GAAU,MACFL,EAAMM,YAAiC,IAApBN,EAAMM,YACzBH,EAAmBH,EAAMM,UAC5B,GACF,CAACN,EAAMM,YACV,MAAMC,EAAiB,CAACC,EAAIC,KACxB,IAAIX,EAAIY,EAAIC,EACI,eAAZF,EAC0C,QAAzCX,EAAKE,EAAMY,gCAA6C,IAAPd,GAAyBA,EAAGe,KAAKb,EAAOQ,GAG1D,QAA/BE,EAAKV,EAAMc,sBAAmC,IAAPJ,GAAyBA,EAAGG,KAAKb,EAAOQ,GAEjD,QAAlCG,EAAKX,EAAMe,yBAAsC,IAAPJ,GAAyBA,EAAGE,KAAKb,EAAOQ,GACnFL,GAAmB,EAAM,EAEvBa,EAAWhB,EAAMiB,aAAe,UAAY,GAC5CC,EAAoBlB,EAAMmB,cAC1BC,EAA0BpB,EAAMqB,wBACtC,OAAQC,EAAKC,EAAW,CAAEC,SAAUtB,GAAoBoB,EAAKG,EAAc,CAAEC,UAAW1B,EAAM2B,QAASA,QAAS3B,EAAM2B,QAAS5B,IAAKA,EAAK,cAAe,SAAUyB,SAAUI,EAAM,MAAO,CAAEF,UAAW,gBAAiBF,SAAU,CAACI,EAAM,MAAO,CAAEF,UAAW,eAAgBF,SAAU,CAACxB,EAAM6B,MAASP,EAAKQ,EAAM,CAAEC,SAAU,SAAUL,UAAW,GAAG1B,EAAM6B,QAAQb,IAAY,cAAe,gBAAmBM,EAAK,IAAK,CAAEI,UAAW,OAAQ,cAAe,cAAeF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AAYC,GAAG,OAAQ,CAC1BE,eAAgB,YAEpB,gBAAiB,CACbS,WAAY,WAGhBnE,EAAM2B,SACV,IAAK,YACDmB,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIF,GAAS,CAAEsB,gBAAiBP,EAAWC,MAAMC,SAAUH,MAAOC,EAAWQ,UAAUC,IAAK,gCAAiC,CAC1JV,MAAOC,EAAWC,MAAMS,aAEhC,MACJ,IAAK,WACDzB,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIF,GAAS,CAAEsB,gBAAiBP,EAAWW,QAAQD,UAAWX,MAAOC,EAAWQ,UAAUI,MAAO,gCAAiC,CAC/Jb,MAAOC,EAAWC,MAAMY,WAEhC,MAEJ,QACI5B,EAASC,OAAOC,OAAOD,OAAOC,OAAO,CAAA,EAAIF,GAAS,CAAEsB,gBAAiBP,EAAWC,MAAMS,UAAWX,MAAOC,EAAWQ,UAAUM,QAGrI,OAAO7B,CAAM"}
1
+ {"version":3,"file":"banner.js","sources":["../../../src/components/banner/banner.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Icon } from '@/src';\nimport { Box, Stack, Typography, lighten, useTheme } from '@mui/material';\nimport { useMemo } from 'react';\nexport const Banner = ({ children, variant = 'info', buttons }) => {\n const theme = useTheme();\n const borderColor = useMemo(() => {\n switch (variant) {\n case 'error':\n return theme.palette.error.main;\n case 'warning':\n return theme.palette.warning.main;\n case 'info':\n default:\n return theme.palette.info.main;\n }\n }, [variant, theme]);\n const backgroundColor = useMemo(() => {\n switch (variant) {\n case 'error':\n return lighten(theme.palette.error.light, 0.9);\n case 'warning':\n return lighten(theme.palette.warning.light, 0.9);\n case 'info':\n default:\n return lighten(theme.palette.info.light, 0.9);\n }\n }, [variant, theme]);\n return (_jsxs(Stack, { direction: { md: 'row', sm: 'column' }, spacing: 0, sx: {\n borderLeft: '6px solid',\n alignItems: 'flex-start',\n borderColor,\n backgroundColor,\n }, \"data-testid\": \"Banner\", children: [_jsxs(Stack, { direction: \"row\", spacing: 2, sx: { padding: { md: '12px 16px', sm: '16px', xs: '11px 16px' }, flexGrow: 1, alignItems: 'center' }, children: [_jsx(Box, { component: Icon, className: variant === 'info' ? 'circle-information' : 'circle-exclamation', iconStyle: \"filled\", color: variant, sx: {\n alignSelf: 'flex-start',\n color: borderColor,\n marginTop: { lg: '2px !important', md: '1px !important', sm: '-2px !important' },\n } }), _jsx(Box, { children: typeof children === 'string' ? _jsx(Typography, { children: children }) : children })] }), buttons && (_jsx(Stack, { direction: \"row\", spacing: 1, useFlexGap: true, sx: { padding: '8px 16px', textWrap: 'nowrap', flexWrap: 'wrap', alignSelf: 'center', marginRight: 'auto' }, \"data-testid\": \"Banner.buttons\", children: buttons }))] }));\n};\n//# sourceMappingURL=banner.js.map"],"names":["Banner","children","variant","buttons","theme","useTheme","borderColor","useMemo","palette","error","main","warning","info","backgroundColor","lighten","light","_jsxs","Stack","direction","md","sm","spacing","sx","borderLeft","alignItems","padding","xs","flexGrow","_jsx","Box","component","Icon","className","iconStyle","color","alignSelf","marginTop","lg","Typography","useFlexGap","textWrap","flexWrap","marginRight"],"mappings":"glKAIY,MAACA,EAAS,EAAGC,WAAUC,UAAU,OAAQC,cACjD,MAAMC,EAAQC,IACRC,EAAcC,GAAQ,KACxB,OAAQL,GACJ,IAAK,QACD,OAAOE,EAAMI,QAAQC,MAAMC,KAC/B,IAAK,UACD,OAAON,EAAMI,QAAQG,QAAQD,KAEjC,QACI,OAAON,EAAMI,QAAQI,KAAKF,KACjC,GACF,CAACR,EAASE,IACPS,EAAkBN,GAAQ,KAC5B,OAAQL,GACJ,IAAK,QACD,OAAOY,EAAQV,EAAMI,QAAQC,MAAMM,MAAO,IAC9C,IAAK,UACD,OAAOD,EAAQV,EAAMI,QAAQG,QAAQI,MAAO,IAEhD,QACI,OAAOD,EAAQV,EAAMI,QAAQI,KAAKG,MAAO,IAChD,GACF,CAACb,EAASE,IACb,OAAQ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